From c7b120fb0fac4a26ad817a73e9f0c134ed6c6f8b Mon Sep 17 00:00:00 2001 From: sbansla <104902068+sbansla@users.noreply.github.com> Date: Thu, 8 Aug 2024 11:33:31 +0530 Subject: [PATCH 01/16] chore: fixed failed test cases due to go upgrade (#477) * chore: fixed failed test cases due to go 1.22 upgrade --- .github/workflows/test-and-deploy.yml | 5 +++++ Dockerfile | 3 +-- LICENSE | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-and-deploy.yml b/.github/workflows/test-and-deploy.yml index f447a23c..da0a2bc2 100644 --- a/.github/workflows/test-and-deploy.yml +++ b/.github/workflows/test-and-deploy.yml @@ -42,6 +42,11 @@ jobs: echo "GOBIN=$HOME/bin" >> $GITHUB_ENV echo "GO111MODULE=off" >> $GITHUB_ENV + - name: Install Docker Compose + run: | + sudo apt-get update + sudo apt-get install -y docker-compose + - name: Run Tests run: make test-docker diff --git a/Dockerfile b/Dockerfile index 09f21116..5b17ca24 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,4 @@ -ARG version=latest -FROM golang:$version +FROM golang:1.21.11 ENV GO111MODULE 'off' diff --git a/LICENSE b/LICENSE index 3154774a..d703157e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (C) 2023, Twilio SendGrid, Inc. +Copyright (C) 2024, Twilio SendGrid, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in From e1fa535ae5491d742df983566ed2e7d3344d096f Mon Sep 17 00:00:00 2001 From: sbansla <104902068+sbansla@users.noreply.github.com> Date: Thu, 8 Aug 2024 18:48:46 +0530 Subject: [PATCH 02/16] updates for manual release (#479) --- CHANGELOG.md | 6 ++++++ base_interface.go | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe962665..4c744194 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ # Change Log All notable changes to this project will be documented in this file. +[2024-08-08] Version 3.15.0 +--------------------------- +**Library - Feature** +- [PR #471](https://github.com/sendgrid/sendgrid-go/pull/471): add mail_v3 functionality for reply_to_list + + [2023-12-01] Version 3.14.0 --------------------------- **Library - Chore** diff --git a/base_interface.go b/base_interface.go index f9c0d609..8cd0b79d 100644 --- a/base_interface.go +++ b/base_interface.go @@ -15,7 +15,7 @@ import ( // Version is this client library's current version const ( - Version = "3.14.0" + Version = "3.15.0" rateLimitRetry = 5 rateLimitSleep = 1100 ) From 5860d2c3ed7bbcb69e41b5b706ae72faad728a0a Mon Sep 17 00:00:00 2001 From: Twilio Date: Mon, 26 Aug 2024 11:17:52 +0000 Subject: [PATCH 03/16] [Librarian] Version Bump --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c744194..ad1db81f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,16 @@ # Change Log All notable changes to this project will be documented in this file. +[2024-08-26] Version 3.16.0 +--------------------------- +**Library - Chore** +- [PR #479](https://github.com/sendgrid/sendgrid-go/pull/479): updates for manual release. Thanks to [@sbansla](https://github.com/sbansla)! +- [PR #477](https://github.com/sendgrid/sendgrid-go/pull/477): fixed failed test cases due to go upgrade. Thanks to [@sbansla](https://github.com/sbansla)! + +**Library - Feature** +- [PR #471](https://github.com/sendgrid/sendgrid-go/pull/471): add mail_v3 functionality for reply_to_list. Thanks to [@lopezator](https://github.com/lopezator)! + + [2024-08-08] Version 3.15.0 --------------------------- **Library - Feature** From 16f25e4d92886b2733473a19977ccf1aa625a89b Mon Sep 17 00:00:00 2001 From: Twilio Date: Mon, 26 Aug 2024 11:17:52 +0000 Subject: [PATCH 04/16] Release v3.16.0 --- base_interface.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base_interface.go b/base_interface.go index 8cd0b79d..6fdaf3cf 100644 --- a/base_interface.go +++ b/base_interface.go @@ -15,7 +15,7 @@ import ( // Version is this client library's current version const ( - Version = "3.15.0" + Version = "3.16.0" rateLimitRetry = 5 rateLimitSleep = 1100 ) From 7ab686d0329c3390ec938ff74e471edc195af67e Mon Sep 17 00:00:00 2001 From: Shubham Tiwari Date: Tue, 3 Sep 2024 00:14:35 +0530 Subject: [PATCH 05/16] chore: added client files --- Makefile | 7 +- client/base_client.go | 13 + client/client.go | 180 +++++++ client/client_test.go | 317 ++++++++++++ client/error.go | 21 + client/error_test.go | 44 ++ client/form/encode.go | 400 +++++++++++++++ client/form/form.go | 17 + client/form/node.go | 154 ++++++ client/jwt/access_token.go | 211 ++++++++ client/jwt/access_token_test.go | 484 ++++++++++++++++++ client/jwt/base_grants.go | 7 + client/jwt/chat_grant.go | 36 ++ client/jwt/conversations_grant.go | 25 + client/jwt/ip_messaging_grant.go | 36 ++ client/jwt/jwt.go | 169 ++++++ client/jwt/jwt_test.go | 41 ++ client/jwt/playback_grant.go | 17 + client/jwt/sync_grant.go | 28 + client/jwt/taskrouter/capability_token.go | 184 +++++++ .../jwt/taskrouter/capability_token_test.go | 227 ++++++++ client/jwt/taskrouter/policy.go | 36 ++ client/jwt/taskrouter/taskrouter_utils.go | 101 ++++ client/jwt/taskrouter_grant.go | 33 ++ client/jwt/util/util.go | 14 + client/jwt/util/util_test.go | 13 + client/jwt/video_grant.go | 25 + client/jwt/voice_grant.go | 53 ++ client/mock_client.go | 83 +++ client/page_util.go | 75 +++ client/page_util_test.go | 182 +++++++ client/request_handler.go | 103 ++++ client/request_handler_test.go | 119 +++++ client/request_validator.go | 158 ++++++ client/request_validator_test.go | 95 ++++ client/unmarshal.go | 32 ++ client/unmarshal_test.go | 44 ++ client/version.go | 5 + go.mod | 18 + go.sum | 22 + sendgrid.go | 58 +++ 41 files changed, 3886 insertions(+), 1 deletion(-) create mode 100644 client/base_client.go create mode 100644 client/client.go create mode 100644 client/client_test.go create mode 100644 client/error.go create mode 100644 client/error_test.go create mode 100644 client/form/encode.go create mode 100644 client/form/form.go create mode 100644 client/form/node.go create mode 100644 client/jwt/access_token.go create mode 100644 client/jwt/access_token_test.go create mode 100644 client/jwt/base_grants.go create mode 100644 client/jwt/chat_grant.go create mode 100644 client/jwt/conversations_grant.go create mode 100644 client/jwt/ip_messaging_grant.go create mode 100644 client/jwt/jwt.go create mode 100644 client/jwt/jwt_test.go create mode 100644 client/jwt/playback_grant.go create mode 100644 client/jwt/sync_grant.go create mode 100644 client/jwt/taskrouter/capability_token.go create mode 100644 client/jwt/taskrouter/capability_token_test.go create mode 100644 client/jwt/taskrouter/policy.go create mode 100644 client/jwt/taskrouter/taskrouter_utils.go create mode 100644 client/jwt/taskrouter_grant.go create mode 100644 client/jwt/util/util.go create mode 100644 client/jwt/util/util_test.go create mode 100644 client/jwt/video_grant.go create mode 100644 client/jwt/voice_grant.go create mode 100644 client/mock_client.go create mode 100644 client/page_util.go create mode 100644 client/page_util_test.go create mode 100644 client/request_handler.go create mode 100644 client/request_handler_test.go create mode 100644 client/request_validator.go create mode 100644 client/request_validator_test.go create mode 100644 client/unmarshal.go create mode 100644 client/unmarshal_test.go create mode 100644 client/version.go create mode 100644 go.mod create mode 100644 go.sum diff --git a/Makefile b/Makefile index f1802268..91f5d732 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: test install test-integ test-docker +.PHONY: test install test-integ test-docker goimports install: go get -t -v ./... @@ -13,3 +13,8 @@ version ?= latest test-docker: curl -s https://raw.githubusercontent.com/sendgrid/sendgrid-oai/HEAD/prism/prism.sh -o prism.sh version=$(version) bash ./prism.sh + +goimports: + go install golang.org/x/tools/cmd/goimports@latest + goimports -w . + go mod tidy diff --git a/client/base_client.go b/client/base_client.go new file mode 100644 index 00000000..8a6ca33e --- /dev/null +++ b/client/base_client.go @@ -0,0 +1,13 @@ +package client + +import ( + "net/http" + "net/url" + "time" +) + +type BaseClient interface { + SetTimeout(timeout time.Duration) + SendRequest(method string, rawURL string, data url.Values, + headers map[string]interface{}, body ...byte) (*http.Response, error) +} diff --git a/client/client.go b/client/client.go new file mode 100644 index 00000000..57a70cca --- /dev/null +++ b/client/client.go @@ -0,0 +1,180 @@ +// Package client provides internal utilities for the twilio-go client library. +package client + +import ( + "bytes" + "encoding/json" + "fmt" + "net/http" + "net/url" + "regexp" + "runtime" + "strconv" + "strings" + "time" + + "github.com/pkg/errors" + "github.com/sendgrid/sendgrid-go/client/form" +) + +var alphanumericRegex *regexp.Regexp +var delimitingRegex *regexp.Regexp + +func init() { + alphanumericRegex = regexp.MustCompile(`^[a-zA-Z0-9]*$`) + delimitingRegex = regexp.MustCompile(`\.\d+`) +} + +// Credentials store user authentication credentials. +type Credentials struct { + Apikey string +} + +func NewCredentials(apikey string) *Credentials { + return &Credentials{Apikey: apikey} +} + +// Client encapsulates a standard HTTP backend with authorization. +type Client struct { + *Credentials + HTTPClient *http.Client + UserAgentExtensions []string +} + +// default http Client should not follow redirects and return the most recent response. +func defaultHTTPClient() *http.Client { + return &http.Client{ + CheckRedirect: func(req *http.Request, via []*http.Request) error { + return http.ErrUseLastResponse + }, + Timeout: time.Second * 10, + } +} + +func (c *Client) basicAuth() (string, string) { + return c.Credentials.Apikey, "" +} + +func (c *Client) bearerAuth() string { + return c.Credentials.Apikey +} + +// SetTimeout sets the Timeout for HTTP requests. +func (c *Client) SetTimeout(timeout time.Duration) { + if c.HTTPClient == nil { + c.HTTPClient = defaultHTTPClient() + } + c.HTTPClient.Timeout = timeout +} + +func extractContentTypeHeader(headers map[string]interface{}) (cType string) { + headerType, ok := headers["Content-Type"] + if !ok { + return urlEncodedContentType + } + return headerType.(string) +} + +const ( + urlEncodedContentType = "application/x-www-form-urlencoded" + jsonContentType = "application/json" + keepZeros = true + delimiter = '.' + escapee = '\\' +) + +func (c *Client) doWithErr(req *http.Request) (*http.Response, error) { + client := c.HTTPClient + + if client == nil { + client = defaultHTTPClient() + } + + res, err := client.Do(req) + if err != nil { + return nil, err + } + + // Note that 3XX response codes are allowed for fetches + if res.StatusCode < 200 || res.StatusCode >= 400 { + err = &SendgridRestError{} + decodeErrs := json.NewDecoder(res.Body) + decodeErr := decodeErrs.Decode(err) + if decodeErr != nil { + err = errors.Wrap(decodeErr, "error decoding the response for an HTTP error code: "+strconv.Itoa(res.StatusCode)) + return nil, err + } + + return nil, err + } + return res, nil +} + +func setBearerToken(req *http.Request, token string) { + req.Header.Set("Authorization", "Bearer "+token) +} + +// SendRequest verifies, constructs, and authorizes an HTTP request. +func (c *Client) SendRequest(method string, rawURL string, data url.Values, + headers map[string]interface{}, body ...byte) (*http.Response, error) { + + contentType := extractContentTypeHeader(headers) + + u, err := url.Parse(rawURL) + if err != nil { + return nil, err + } + + valueReader := &strings.Reader{} + goVersion := runtime.Version() + var req *http.Request + + //For HTTP GET Method there are no body parameters. All other parameters like query, path etc + // are added as information in the url itself. Also while Content-Type is json, we are sending + // json body. In that case, data variable contains all other parameters than body, which is the + //same case as GET method. In that case as well all parameters will be added to url + if method == http.MethodGet || contentType == jsonContentType { + if data != nil { + v, _ := form.EncodeToStringWith(data, delimiter, escapee, keepZeros) + s := delimitingRegex.ReplaceAllString(v, "") + + u.RawQuery = s + } + } + + //data is already processed and information will be added to u(the url) in the + //previous step. Now body will solely contain json payload + if contentType == jsonContentType { + req, err = http.NewRequest(method, u.String(), bytes.NewBuffer(body)) + if err != nil { + return nil, err + } + } else { + //Here the HTTP POST methods which is not having json content type are processed + //All the values will be added in data and encoded (all body, query, path parameters) + if method == http.MethodPost || method == http.MethodPut { + valueReader = strings.NewReader(data.Encode()) + } + req, err = http.NewRequest(method, u.String(), valueReader) + if err != nil { + return nil, err + } + + } + + setBearerToken(req, c.bearerAuth()) + + // E.g. "User-Agent": "twilio-go/1.0.0 (darwin amd64) go/go1.17.8" + userAgent := fmt.Sprintf("sendgrid-go/%s (%s %s) go/%s", LibraryVersion, runtime.GOOS, runtime.GOARCH, goVersion) + + if len(c.UserAgentExtensions) > 0 { + userAgent += " " + strings.Join(c.UserAgentExtensions, " ") + } + + req.Header.Add("User-Agent", userAgent) + + for k, v := range headers { + req.Header.Add(k, fmt.Sprint(v)) + } + return c.doWithErr(req) +} diff --git a/client/client_test.go b/client/client_test.go new file mode 100644 index 00000000..e139d18e --- /dev/null +++ b/client/client_test.go @@ -0,0 +1,317 @@ +package client_test + +import ( + "encoding/json" + "io" + "net/http" + "net/http/httptest" + "net/url" + "os" + "regexp" + "strings" + "testing" + "time" + + "github.com/stretchr/testify/assert" + twilio "github.com/twilio/twilio-go/client" +) + +var mockServer *httptest.Server +var testClient *twilio.Client + +func NewClient(accountSid string, authToken string) *twilio.Client { + c := &twilio.Client{ + Credentials: twilio.NewCredentials(accountSid, authToken), + HTTPClient: http.DefaultClient, + } + + return c +} + +func TestMain(m *testing.M) { + mockServer = httptest.NewServer(http.HandlerFunc( + func(writer http.ResponseWriter, request *http.Request) { + d := map[string]interface{}{ + "response": "ok", + } + encoder := json.NewEncoder(writer) + _ = encoder.Encode(&d) + })) + defer mockServer.Close() + + testClient = NewClient("user", "pass") + os.Exit(m.Run()) +} + +func TestClient_SendRequestError(t *testing.T) { + errorResponse := `{ + "status": 400, + "code":20001, + "message":"Bad request", + "more_info":"https://www.twilio.com/docs/errors/20001" +}` + errorServer := httptest.NewServer(http.HandlerFunc( + func(resp http.ResponseWriter, req *http.Request) { + resp.WriteHeader(400) + _, _ = resp.Write([]byte(errorResponse)) + })) + defer errorServer.Close() + + resp, err := testClient.SendRequest("GET", errorServer.URL, nil, nil) //nolint:bodyclose + twilioError := err.(*twilio.TwilioRestError) + assert.Nil(t, resp) + assert.Equal(t, 400, twilioError.Status) + assert.Equal(t, 20001, twilioError.Code) + assert.Equal(t, "https://www.twilio.com/docs/errors/20001", twilioError.MoreInfo) + assert.Equal(t, "Bad request", twilioError.Message) + assert.Nil(t, twilioError.Details) +} + +func TestClient_SendRequestDecodeError(t *testing.T) { + errorResponse := `{ + "status": 400, + "code":20001, + "message":"Bad request", + "more_info":"https://www.twilio.com/docs/errors/20001", +}` + errorServer := httptest.NewServer(http.HandlerFunc( + func(resp http.ResponseWriter, req *http.Request) { + resp.WriteHeader(400) + _, _ = resp.Write([]byte(errorResponse)) + })) + defer errorServer.Close() + + resp, err := testClient.SendRequest("GET", errorServer.URL, nil, nil) //nolint:bodyclose + assert.Error(t, err) + assert.Contains(t, err.Error(), "error decoding the response for an HTTP error code: 400") + assert.Nil(t, resp) +} + +func TestClient_SendRequestErrorWithDetails(t *testing.T) { + errorResponse := []byte(`{ + "status": 400, + "message": "Bad request", + "code": 20001, + "more_info": "https://www.twilio.com/docs/errors/20001", + "details": { + "foo": "bar" + } +}`) + errorServer := httptest.NewServer(http.HandlerFunc( + func(resp http.ResponseWriter, req *http.Request) { + resp.WriteHeader(400) + _, _ = resp.Write(errorResponse) + })) + defer errorServer.Close() + + resp, err := testClient.SendRequest("GET", errorServer.URL, nil, nil) //nolint:bodyclose + twilioError := err.(*twilio.TwilioRestError) + details := make(map[string]interface{}) + details["foo"] = "bar" + assert.Nil(t, resp) + assert.Equal(t, 400, twilioError.Status) + assert.Equal(t, 20001, twilioError.Code) + assert.Equal(t, "https://www.twilio.com/docs/errors/20001", twilioError.MoreInfo) + assert.Equal(t, "Bad request", twilioError.Message) + assert.Equal(t, details, twilioError.Details) +} + +func TestClient_SendRequestUsernameError(t *testing.T) { + newTestClient := NewClient("user1\nuser2", "pass") + resp, err := newTestClient.SendRequest("GET", "http://example.org", nil, nil) //nolint:bodyclose + twilioError := err.(*twilio.TwilioRestError) + assert.Nil(t, resp) + assert.Equal(t, 400, twilioError.Status) + assert.Equal(t, 21222, twilioError.Code) + assert.Equal(t, "https://www.twilio.com/docs/errors/21222", twilioError.MoreInfo) + assert.Equal(t, "Invalid Username. Illegal chars", twilioError.Message) +} + +func TestClient_SendRequestPasswordError(t *testing.T) { + newTestClient := NewClient("user1", "pass1\npass2") + resp, err := newTestClient.SendRequest("GET", "http://example.org", nil, nil) //nolint:bodyclose + twilioError := err.(*twilio.TwilioRestError) + assert.Nil(t, resp) + assert.Equal(t, 400, twilioError.Status) + assert.Equal(t, 21224, twilioError.Code) + assert.Equal(t, "https://www.twilio.com/docs/errors/21224", twilioError.MoreInfo) + assert.Equal(t, "Invalid Password. Illegal chars", twilioError.Message) +} + +func TestClient_SendRequestWithRedirect(t *testing.T) { + redirectServer := httptest.NewServer(http.HandlerFunc( + func(writer http.ResponseWriter, request *http.Request) { + writer.WriteHeader(307) + _, _ = writer.Write([]byte(`{"redirect_to": "some_place"}`)) + })) + defer redirectServer.Close() + + resp, _ := testClient.SendRequest("GET", redirectServer.URL, nil, nil) //nolint:bodyclose + assert.Equal(t, 307, resp.StatusCode) +} + +func TestClient_SendRequestCreatesClient(t *testing.T) { + c := &twilio.Client{ + Credentials: twilio.NewCredentials("user", "pass"), + } + resp, err := c.SendRequest("GET", mockServer.URL, nil, nil) //nolint:bodyclose + assert.NoError(t, err) + assert.Equal(t, 200, resp.StatusCode) +} + +func TestClient_SendRequestWithData(t *testing.T) { + dataServer := httptest.NewServer(http.HandlerFunc( + func(writer http.ResponseWriter, request *http.Request) { + _ = request.ParseForm() + assert.Equal(t, "bar", request.FormValue("foo")) + d := map[string]interface{}{ + "response": "ok", + } + encoder := json.NewEncoder(writer) + err := encoder.Encode(&d) + if err != nil { + t.Error(err) + } + })) + defer dataServer.Close() + + tests := []string{http.MethodGet, http.MethodPost} + for _, tc := range tests { + t.Run(tc, func(t *testing.T) { + data := url.Values{} + data.Set("foo", "bar") + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + resp, err := testClient.SendRequest(tc, dataServer.URL, data, headers) //nolint:bodyclose + assert.NoError(t, err) + assert.Equal(t, 200, resp.StatusCode) + }) + } +} + +func TestClient_SendRequestWithHeaders(t *testing.T) { + headerServer := httptest.NewServer(http.HandlerFunc( + func(writer http.ResponseWriter, request *http.Request) { + assert.Equal(t, "bar", request.Header.Get("foo")) + d := map[string]interface{}{ + "response": "ok", + } + encoder := json.NewEncoder(writer) + err := encoder.Encode(&d) + if err != nil { + t.Error(err) + } + })) + defer headerServer.Close() + + headers := map[string]interface{}{ + "foo": "bar", + } + resp, err := testClient.SendRequest("GET", headerServer.URL, nil, headers) //nolint:bodyclose + assert.NoError(t, err) + assert.Equal(t, 200, resp.StatusCode) +} + +func TestClient_SetTimeoutTimesOut(t *testing.T) { + timeoutServer := httptest.NewServer(http.HandlerFunc( + func(writer http.ResponseWriter, request *http.Request) { + d := map[string]interface{}{ + "response": "ok", + } + time.Sleep(100 * time.Microsecond) + encoder := json.NewEncoder(writer) + err := encoder.Encode(&d) + if err != nil { + t.Error(err) + } + writer.WriteHeader(http.StatusOK) + })) + defer timeoutServer.Close() + + c := NewClient("user", "pass") + c.SetTimeout(10 * time.Microsecond) + _, err := c.SendRequest("GET", timeoutServer.URL, nil, nil) //nolint:bodyclose + assert.Error(t, err) +} + +func TestClient_SetTimeoutSucceeds(t *testing.T) { + timeoutServer := httptest.NewServer(http.HandlerFunc( + func(writer http.ResponseWriter, request *http.Request) { + d := map[string]interface{}{ + "response": "ok", + } + time.Sleep(100 * time.Microsecond) + encoder := json.NewEncoder(writer) + err := encoder.Encode(&d) + if err != nil { + t.Error(err) + } + })) + defer timeoutServer.Close() + + c := NewClient("user", "pass") + c.SetTimeout(10 * time.Second) + resp, err := c.SendRequest("GET", timeoutServer.URL, nil, nil) //nolint:bodyclose + assert.NoError(t, err) + assert.Equal(t, 200, resp.StatusCode) +} + +func TestClient_SetTimeoutCreatesClient(t *testing.T) { + c := &twilio.Client{ + Credentials: twilio.NewCredentials("user", "pass"), + } + c.SetTimeout(20 * time.Second) + resp, err := c.SendRequest("GET", mockServer.URL, nil, nil) //nolint:bodyclose + assert.NoError(t, err) + assert.Equal(t, 200, resp.StatusCode) +} + +func TestClient_UnicodeResponse(t *testing.T) { + unicodeServer := httptest.NewServer(http.HandlerFunc( + func(writer http.ResponseWriter, request *http.Request) { + d := map[string]interface{}{ + "testing-unicode": "Ω≈ç√, 💩", + } + encoder := json.NewEncoder(writer) + err := encoder.Encode(&d) + if err != nil { + t.Error(err) + } + })) + defer unicodeServer.Close() + + c := NewClient("user", "pass") + resp, _ := c.SendRequest("GET", unicodeServer.URL, nil, nil) //nolint:bodyclose + assert.Equal(t, 200, resp.StatusCode) + body, _ := io.ReadAll(resp.Body) + assert.Equal(t, "{\"testing-unicode\":\"Ω≈ç√, 💩\"}\n", string(body)) +} + +func TestClient_SetAccountSid(t *testing.T) { + client := NewClient("user", "pass") + client.SetAccountSid("account_sid") + assert.Equal(t, "account_sid", client.AccountSid()) +} + +func TestClient_DefaultUserAgentHeaders(t *testing.T) { + headerServer := httptest.NewServer(http.HandlerFunc( + func(writer http.ResponseWriter, request *http.Request) { + assert.Regexp(t, regexp.MustCompile(`^twilio-go/[0-9.]+(-rc.[0-9])*\s\(\w+\s\w+\)\sgo/\S+$`), request.Header.Get("User-Agent")) + })) + + resp, _ := testClient.SendRequest("GET", headerServer.URL, nil, nil) + assert.Equal(t, 200, resp.StatusCode) +} + +func TestClient_UserAgentExtensionsHeaders(t *testing.T) { + var expectedExtensions = []string{"twilio-run/2.0.0-test", "flex-plugin/3.4.0"} + testClient.UserAgentExtensions = expectedExtensions + headerServer := httptest.NewServer(http.HandlerFunc( + func(writer http.ResponseWriter, request *http.Request) { + var headersList = strings.Split(request.Header.Get("User-Agent"), " ") + assert.Equal(t, headersList[len(headersList)-len(expectedExtensions):], expectedExtensions) + })) + resp, _ := testClient.SendRequest("GET", headerServer.URL, nil, nil) + assert.Equal(t, 200, resp.StatusCode) +} diff --git a/client/error.go b/client/error.go new file mode 100644 index 00000000..460692ba --- /dev/null +++ b/client/error.go @@ -0,0 +1,21 @@ +// Package error provides the interface for Twilio specific errors. +package client + +import ( + "fmt" +) + +// SendgridRestError provides information about an unsuccessful request. +type ErrorField struct { + Field interface{} `json:"field"` // null can be captured as interface{} + Message string `json:"message"` +} + +type SendgridRestError struct { + Errors []ErrorField `json:"errors"` +} + +func (err *SendgridRestError) Error() string { + return fmt.Sprintf("Error Field: %v - Error Message: %s", + err.Errors[0].Field, err.Errors[0].Message) +} diff --git a/client/error_test.go b/client/error_test.go new file mode 100644 index 00000000..431ce135 --- /dev/null +++ b/client/error_test.go @@ -0,0 +1,44 @@ +package client_test + +import ( + "encoding/json" + "strings" + "testing" + + assert "github.com/stretchr/testify/require" + "github.com/twilio/twilio-go/client" +) + +const ( + errorCode = 20001 + errorMessage = "Bad request" + errorMoreInfo = "https://www.twilio.com/docs/errors/20001" + errorStatus = 400 +) + +func TestTwilioRestError_Error(t *testing.T) { + details := make(map[string]interface{}) + details["foo"] = "bar" + err := &client.TwilioRestError{ + Code: errorCode, + Details: details, + Message: errorMessage, + MoreInfo: errorMoreInfo, + Status: errorStatus, + } + expected := "Status: 400 - ApiError 20001: Bad request ({\"foo\":\"bar\"}) More info: https://www.twilio.com/docs/errors/20001" + assert.Equal(t, expected, err.Error()) +} + +func TestTwilioRestError_NoDetails(t *testing.T) { + err := &client.TwilioRestError{} + response := `{"code":20001,"message":"Bad request","more_info":"https://www.twilio.com/docs/errors/20001","status":400}` + responseReader := strings.NewReader(response) + decodeErr := json.NewDecoder(responseReader).Decode(err) + assert.Nil(t, decodeErr) + assert.Equal(t, err.Code, errorCode) + assert.Equal(t, err.Status, errorStatus) + assert.Equal(t, err.Message, errorMessage) + assert.Equal(t, err.MoreInfo, errorMoreInfo) + assert.Nil(t, err.Details) +} diff --git a/client/form/encode.go b/client/form/encode.go new file mode 100644 index 00000000..ca4319ef --- /dev/null +++ b/client/form/encode.go @@ -0,0 +1,400 @@ +// Forked code from https://github.com/ajg/form + +// Copyright 2014 Alvaro J. Genial. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. +// nolint +package form + +import ( + "encoding" + "errors" + "fmt" + "io" + "net/url" + "reflect" + "strconv" + "strings" + "time" +) + +// NewEncoder returns a new form Encoder. +func NewEncoder(w io.Writer) *Encoder { + return &Encoder{w, defaultDelimiter, defaultEscape, false} +} + +// Encoder provides a way to encode to a Writer. +type Encoder struct { + w io.Writer + d rune + e rune + z bool +} + +// DelimitWith sets r as the delimiter used for composite keys by Encoder e and returns the latter; it is '.' by default. +func (e *Encoder) DelimitWith(r rune) *Encoder { + e.d = r + return e +} + +// EscapeWith sets r as the escape used for delimiters (and to escape itself) by Encoder e and returns the latter; it is '\\' by default. +func (e *Encoder) EscapeWith(r rune) *Encoder { + e.e = r + return e +} + +// KeepZeros sets whether Encoder e should keep zero (default) values in their literal form when encoding, and returns the former; by default zero values are not kept, but are rather encoded as the empty string. +func (e *Encoder) KeepZeros(z bool) *Encoder { + e.z = z + return e +} + +// Encode encodes dst as form and writes it out using the Encoder's Writer. +func (e Encoder) Encode(dst interface{}) error { + v := reflect.ValueOf(dst) + n, err := encodeToNode(v, e.z) + if err != nil { + return err + } + s := n.values(e.d, e.e).Encode() + l, err := io.WriteString(e.w, s) + switch { + case err != nil: + return err + case l != len(s): + return errors.New("could not write data completely") + } + return nil +} + +// EncodeToString encodes dst as a form and returns it as a string. +func EncodeToString(dst interface{}) (string, error) { + return EncodeToStringWith(dst, defaultDelimiter, defaultEscape, defaultKeepZeros) +} + +// EncodeToStringWith encodes dst as a form with delimiter d, escape e, keeping zero values if z, and returns it as a string. +func EncodeToStringWith(dst interface{}, d rune, e rune, z bool) (string, error) { + v := reflect.ValueOf(dst) + n, err := encodeToNode(v, z) + if err != nil { + return "", err + } + vs := n.values(d, e) + return vs.Encode(), nil +} + +// EncodeToValues encodes dst as a form and returns it as Values. +func EncodeToValues(dst interface{}) (url.Values, error) { + return EncodeToValuesWith(dst, defaultDelimiter, defaultEscape, defaultKeepZeros) +} + +// EncodeToValuesWith encodes dst as a form with delimiter d, escape e, keeping zero values if z, and returns it as Values. +func EncodeToValuesWith(dst interface{}, d rune, e rune, z bool) (url.Values, error) { + v := reflect.ValueOf(dst) + n, err := encodeToNode(v, z) + if err != nil { + return nil, err + } + vs := n.values(d, e) + return vs, nil +} + +func encodeToNode(v reflect.Value, z bool) (n node, err error) { + defer func() { + if e := recover(); e != nil { + err = fmt.Errorf("%v", e) + } + }() + return getNode(encodeValue(v, z)), nil +} + +func encodeValue(v reflect.Value, z bool) interface{} { + t := v.Type() + k := v.Kind() + + if s, ok := marshalValue(v); ok { + return s + } else if !z && isEmptyValue(v) { + return "" // Treat the zero value as the empty string. + } + + switch k { + case reflect.Ptr, reflect.Interface: + return encodeValue(v.Elem(), z) + case reflect.Struct: + if t.ConvertibleTo(timeType) { + return encodeTime(v) + } else if t.ConvertibleTo(urlType) { + return encodeURL(v) + } + return encodeStruct(v, z) + case reflect.Slice: + return encodeSlice(v, z) + case reflect.Array: + return encodeArray(v, z) + case reflect.Map: + return encodeMap(v, z) + case reflect.Invalid, reflect.Uintptr, reflect.UnsafePointer, reflect.Chan, reflect.Func: + panic(t.String() + " has unsupported kind " + t.Kind().String()) + default: + return encodeBasic(v) + } +} + +func encodeStruct(v reflect.Value, z bool) interface{} { + t := v.Type() + n := node{} + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + k, oe := fieldInfo(f) + + if k == "-" { + continue + } else if fv := v.Field(i); oe && isEmptyValue(fv) { + delete(n, k) + } else { + n[k] = encodeValue(fv, z) + } + } + return n +} + +func encodeMap(v reflect.Value, z bool) interface{} { + n := node{} + for _, i := range v.MapKeys() { + k := getString(encodeValue(i, z)) + n[k] = encodeValue(v.MapIndex(i), z) + } + return n +} + +func encodeArray(v reflect.Value, z bool) interface{} { + n := node{} + for i := 0; i < v.Len(); i++ { + n[strconv.Itoa(i)] = encodeValue(v.Index(i), z) + } + return n +} + +func encodeSlice(v reflect.Value, z bool) interface{} { + t := v.Type() + if t.Elem().Kind() == reflect.Uint8 { + return string(v.Bytes()) // Encode byte slices as a single string by default. + } + n := node{} + for i := 0; i < v.Len(); i++ { + n[strconv.Itoa(i)] = encodeValue(v.Index(i), z) + } + return n +} + +func encodeTime(v reflect.Value) string { + t := v.Convert(timeType).Interface().(time.Time) + if t.Year() == 0 && (t.Month() == 0 || t.Month() == 1) && (t.Day() == 0 || t.Day() == 1) { + return t.Format("15:04:05.999999999Z07:00") + } else if t.Hour() == 0 && t.Minute() == 0 && t.Second() == 0 && t.Nanosecond() == 0 { + return t.Format("2006-01-02") + } + return t.Format("2006-01-02T15:04:05.999999999Z07:00") +} + +func encodeURL(v reflect.Value) string { + u := v.Convert(urlType).Interface().(url.URL) + return u.String() +} + +func encodeBasic(v reflect.Value) string { + t := v.Type() + switch k := t.Kind(); k { + case reflect.Bool: + return strconv.FormatBool(v.Bool()) + case reflect.Int, + reflect.Int8, + reflect.Int16, + reflect.Int32, + reflect.Int64: + return strconv.FormatInt(v.Int(), 10) + case reflect.Uint, + reflect.Uint8, + reflect.Uint16, + reflect.Uint32, + reflect.Uint64: + return strconv.FormatUint(v.Uint(), 10) + case reflect.Float32: + return strconv.FormatFloat(v.Float(), 'g', -1, 32) + case reflect.Float64: + return strconv.FormatFloat(v.Float(), 'g', -1, 64) + case reflect.Complex64, reflect.Complex128: + s := fmt.Sprintf("%g", v.Complex()) + return strings.TrimSuffix(strings.TrimPrefix(s, "("), ")") + case reflect.String: + return v.String() + } + panic(t.String() + " has unsupported kind " + t.Kind().String()) +} + +func isEmptyValue(v reflect.Value) bool { + switch t := v.Type(); v.Kind() { + case reflect.Array, reflect.Map, reflect.Slice, reflect.String: + return v.Len() == 0 + case reflect.Bool: + return !v.Bool() + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.Complex64, reflect.Complex128: + return v.Complex() == 0 + case reflect.Interface, reflect.Ptr: + return v.IsNil() + case reflect.Struct: + if t.ConvertibleTo(timeType) { + return v.Convert(timeType).Interface().(time.Time).IsZero() + } + return reflect.DeepEqual(v, reflect.Zero(t)) + } + return false +} + +// canIndexOrdinally returns whether a value contains an ordered sequence of elements. +func canIndexOrdinally(v reflect.Value) bool { + if !v.IsValid() { + return false + } + switch t := v.Type(); t.Kind() { + case reflect.Ptr, reflect.Interface: + return canIndexOrdinally(v.Elem()) + case reflect.Slice, reflect.Array: + return true + } + return false +} + +func fieldInfo(f reflect.StructField) (k string, oe bool) { + if f.PkgPath != "" { // Skip private fields. + return omittedKey, oe + } + + k = f.Name + tag := f.Tag.Get("form") + if tag == "" { + return k, oe + } + + ps := strings.SplitN(tag, ",", 2) + if ps[0] != "" { + k = ps[0] + } + if len(ps) == 2 { + oe = ps[1] == "omitempty" + } + return k, oe +} + +func findField(v reflect.Value, n string, ignoreCase bool) (reflect.Value, bool) { + t := v.Type() + l := v.NumField() + + var lowerN string + caseInsensitiveMatch := -1 + if ignoreCase { + lowerN = strings.ToLower(n) + } + + // First try named fields. + for i := 0; i < l; i++ { + f := t.Field(i) + k, _ := fieldInfo(f) + if k == omittedKey { + continue + } else if n == k { + return v.Field(i), true + } else if ignoreCase && lowerN == strings.ToLower(k) { + caseInsensitiveMatch = i + } + } + + // If no exact match was found try case insensitive match. + if caseInsensitiveMatch != -1 { + return v.Field(caseInsensitiveMatch), true + } + + // Then try anonymous (embedded) fields. + for i := 0; i < l; i++ { + f := t.Field(i) + k, _ := fieldInfo(f) + if k == omittedKey || !f.Anonymous { // || k != "" ? + continue + } + fv := v.Field(i) + fk := fv.Kind() + for fk == reflect.Ptr || fk == reflect.Interface { + fv = fv.Elem() + fk = fv.Kind() + } + + if fk != reflect.Struct { + continue + } + if ev, ok := findField(fv, n, ignoreCase); ok { + return ev, true + } + } + + return reflect.Value{}, false +} + +var ( + stringType = reflect.TypeOf(string("")) + stringMapType = reflect.TypeOf(map[string]interface{}{}) + timeType = reflect.TypeOf(time.Time{}) + timePtrType = reflect.TypeOf(&time.Time{}) + urlType = reflect.TypeOf(url.URL{}) +) + +func skipTextMarshalling(t reflect.Type) bool { + /*// Skip time.Time because its text unmarshaling is overly rigid: + return t == timeType || t == timePtrType*/ + // Skip time.Time & convertibles because its text unmarshaling is overly rigid: + return t.ConvertibleTo(timeType) || t.ConvertibleTo(timePtrType) +} + +func unmarshalValue(v reflect.Value, x interface{}) bool { + if skipTextMarshalling(v.Type()) { + return false + } + + tu, ok := v.Interface().(encoding.TextUnmarshaler) + if !ok && !v.CanAddr() { + return false + } else if !ok { + return unmarshalValue(v.Addr(), x) + } + + s := getString(x) + if err := tu.UnmarshalText([]byte(s)); err != nil { + panic(err) + } + return true +} + +func marshalValue(v reflect.Value) (string, bool) { + if skipTextMarshalling(v.Type()) { + return "", false + } + + tm, ok := v.Interface().(encoding.TextMarshaler) + if !ok && !v.CanAddr() { + return "", false + } else if !ok { + return marshalValue(v.Addr()) + } + + bs, err := tm.MarshalText() + if err != nil { + panic(err) + } + return string(bs), true +} diff --git a/client/form/form.go b/client/form/form.go new file mode 100644 index 00000000..49b7542b --- /dev/null +++ b/client/form/form.go @@ -0,0 +1,17 @@ +// Forked code from https://github.com/ajg/form + +// Copyright 2014 Alvaro J. Genial. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package form implements encoding and decoding of application/x-www-form-urlencoded data. +package form + +const ( + implicitKey = "_" + omittedKey = "-" + + defaultDelimiter = '.' + defaultEscape = '\\' + defaultKeepZeros = false +) diff --git a/client/form/node.go b/client/form/node.go new file mode 100644 index 00000000..c99247f2 --- /dev/null +++ b/client/form/node.go @@ -0,0 +1,154 @@ +// Forked code from https://github.com/ajg/form + +// Copyright 2014 Alvaro J. Genial. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. +// nolint +package form + +import ( + "net/url" + "strconv" + "strings" +) + +type node map[string]interface{} + +func (n node) values(d, e rune) url.Values { + vs := url.Values{} + n.merge(d, e, "", &vs) + return vs +} + +func (n node) merge(d, e rune, p string, vs *url.Values) { + for k, x := range n { + switch y := x.(type) { + case string: + vs.Add(p+escape(d, e, k), y) + case node: + y.merge(d, e, p+escape(d, e, k)+string(d), vs) + default: + panic("value is neither string nor node") + } + } +} + +// TODO: Add tests for implicit indexing. +func parseValues(d, e rune, vs url.Values, canIndexFirstLevelOrdinally bool) node { + // NOTE: Because of the flattening of potentially multiple strings to one key, implicit indexing works: + // i. At the first level; e.g. Foo.Bar=A&Foo.Bar=B becomes 0.Foo.Bar=A&1.Foo.Bar=B + // ii. At the last level; e.g. Foo.Bar._=A&Foo.Bar._=B becomes Foo.Bar.0=A&Foo.Bar.1=B + // TODO: At in-between levels; e.g. Foo._.Bar=A&Foo._.Bar=B becomes Foo.0.Bar=A&Foo.1.Bar=B + // (This last one requires that there only be one placeholder in order for it to be unambiguous.) + + m := map[string]string{} + for k, ss := range vs { + indexLastLevelOrdinally := strings.HasSuffix(k, string(d)+implicitKey) + + for i, s := range ss { + if canIndexFirstLevelOrdinally { + k = strconv.Itoa(i) + string(d) + k + } else if indexLastLevelOrdinally { + k = strings.TrimSuffix(k, implicitKey) + strconv.Itoa(i) + } + + m[k] = s + } + } + + n := node{} + for k, s := range m { + n = n.split(d, e, k, s) + } + return n +} + +func splitPath(d, e rune, path string) (k, rest string) { + esc := false + for i, r := range path { + switch { + case !esc && r == e: + esc = true + case !esc && r == d: + return unescape(d, e, path[:i]), path[i+1:] + default: + esc = false + } + } + return unescape(d, e, path), "" +} + +func (n node) split(d, e rune, path, s string) node { + k, rest := splitPath(d, e, path) + if rest == "" { + return add(n, k, s) + } + if _, ok := n[k]; !ok { + n[k] = node{} + } + + c := getNode(n[k]) + n[k] = c.split(d, e, rest, s) + return n +} + +func add(n node, k, s string) node { + if n == nil { + return node{k: s} + } + + if _, ok := n[k]; ok { + panic("key " + k + " already set") + } + + n[k] = s + return n +} + +func isEmpty(x interface{}) bool { + switch y := x.(type) { + case string: + return y == "" + case node: + if s, ok := y[""].(string); ok { + return s == "" + } + return false + } + panic("value is neither string nor node") +} + +func getNode(x interface{}) node { + switch y := x.(type) { + case string: + return node{"": y} + case node: + return y + } + panic("value is neither string nor node") +} + +func getString(x interface{}) string { + switch y := x.(type) { + case string: + return y + case node: + if s, ok := y[""].(string); ok { + return s + } + return "" + } + panic("value is neither string nor node") +} + +func escape(d, e rune, s string) string { + s = strings.Replace(s, string(e), string(e)+string(e), -1) // Escape the escape (\ => \\) + s = strings.Replace(s, string(d), string(e)+string(d), -1) // Escape the delimiter (. => \.) + return s +} + +func unescape(d, e rune, s string) string { + s = strings.Replace(s, string(e)+string(d), string(d), -1) // Unescape the delimiter (\. => .) + s = strings.Replace(s, string(e)+string(e), string(e), -1) // Unescape the escape (\\ => \) + return s +} diff --git a/client/jwt/access_token.go b/client/jwt/access_token.go new file mode 100644 index 00000000..89dcf258 --- /dev/null +++ b/client/jwt/access_token.go @@ -0,0 +1,211 @@ +package jwt + +import ( + "encoding/json" + "fmt" + "strconv" + "time" + + . "github.com/twilio/twilio-go/client/jwt/util" +) + +type AccessToken struct { + baseJwt *Jwt + // List of permissions that the token grants + Grants []BaseGrant `json:"grants,omitempty"` + // Twilio Account SID + AccountSid string `json:"account_sid,omitempty"` + // API key + SigningKeySid string `json:"signing_key_sid,omitempty"` + // User's identity + Identity string `json:"identity,omitempty"` + // User's region + Region interface{} `json:"region,omitempty"` +} + +type AccessTokenParams struct { + // Twilio Account sid + AccountSid string + // The issuer of the token + SigningKeySid string + // The secret used to sign the token + Secret string + // Identity of the token issuer + Identity string + // User's Region + Region string + // Time in secs since epoch before which this JWT is invalid, defaults to now + Nbf float64 + // Time to live of the JWT in seconds, defaults to 1 hour + Ttl float64 + // Time in secs since epoch this JWT is valid for. Overrides ttl if provided. + ValidUntil float64 + // Access permissions granted to this token + Grants []BaseGrant +} + +func CreateAccessToken(params AccessTokenParams) AccessToken { + return AccessToken{ + baseJwt: &Jwt{ + SecretKey: params.Secret, + Issuer: params.SigningKeySid, + Subject: params.AccountSid, + Algorithm: HS256, + Nbf: params.Nbf, + Ttl: Max(params.Ttl, 3600), + ValidUntil: params.ValidUntil, + }, + Grants: params.Grants, + AccountSid: params.AccountSid, + SigningKeySid: params.SigningKeySid, + Identity: params.Identity, + Region: params.Region, + } +} + +func (token *AccessToken) Payload() map[string]interface{} { + if token.baseJwt.DecodedPayload == nil { + token.baseJwt.DecodedPayload = token.GeneratePayload() + } + + return token.baseJwt.DecodedPayload +} + +func (token *AccessToken) AddGrant(grant BaseGrant) { + if grant == nil { + panic("Grant to add is nil") + } + token.Grants = append(token.Grants, grant) +} + +func (token *AccessToken) Headers() map[string]interface{} { + if token.baseJwt.DecodedHeaders == nil { + token.baseJwt.DecodedHeaders = token.generateHeaders() + } + + return token.baseJwt.DecodedHeaders +} + +func (token *AccessToken) generateHeaders() map[string]interface{} { + headers := make(map[string]interface{}) + headers["cty"] = CType + + if token.Region != "" { + headers["twr"] = token.Region + } + + headers["alg"] = HS256 + headers["typ"] = JWT + + return headers +} + +func (token *AccessToken) GeneratePayload() map[string]interface{} { + now := float64(time.Now().Unix()) + + grants := make(map[string]interface{}) + for _, grant := range token.Grants { + grants[grant.Key()] = grant.ToPayload() + } + + payload := map[string]interface{}{ + "jti": fmt.Sprintf("%s-%s", token.SigningKeySid, strconv.Itoa(int(now))), + "grants": grants, + } + + if token.Identity != "" { + val := payload["grants"].(map[string]interface{}) + val["identity"] = token.Identity + } + + payload["iss"] = token.baseJwt.Issuer + payload["exp"] = now + token.baseJwt.Ttl + + if token.baseJwt.Nbf != 0 { + payload["nbf"] = token.baseJwt.Nbf + } else { + payload["nbf"] = now + } + + if token.baseJwt.ValidUntil != 0 { + payload["exp"] = token.baseJwt.ValidUntil + } + if token.baseJwt.Subject != "" { + payload["sub"] = token.baseJwt.Subject + } + + return payload +} + +// Encode this JWT struct into a string. +// algorithm - algorithm used to encode the JWT that overrides the default +// ttl - specify ttl to override the default +func (token *AccessToken) ToJwt() (string, error) { + signedToken, err := token.baseJwt.ToJwt(token.generateHeaders, token.GeneratePayload) + if err != nil { + return "", err + } + return signedToken, nil +} + +func decodeGrants(grants interface{}) []BaseGrant { + var decodedGrants []BaseGrant + + for k, v := range grants.(map[string]interface{}) { + var grant BaseGrant + if data, err := json.Marshal(v); err == nil { + switch k { + case "chat": + grant = &ChatGrant{} + case "rtc": + grant = &ConversationsGrant{} + case "ip_messaging": + grant = &IpMessagingGrant{} + case "data_sync": + grant = &SyncGrant{} + case "task_router": + grant = &TaskRouterGrant{} + case "video": + grant = &VideoGrant{} + case "voice": + grant = &VoiceGrant{} + case "player": + grant = &PlaybackGrant{} + } + + if errJson := json.Unmarshal(data, &grant); errJson == nil { + decodedGrants = append(decodedGrants, grant) + } + } + } + + return decodedGrants +} + +// Decode a JWT string into a Jwt struct. +// jwt - JWT string +// key - string key used to verify the JWT signature; if not provided, then validation is skipped +func (token *AccessToken) FromJwt(jwtStr string, key string) (*AccessToken, error) { + baseToken, err := token.baseJwt.FromJwt(jwtStr, key) + if err != nil { + return nil, err + } + + decodedToken := &AccessToken{ + baseJwt: baseToken, + Grants: decodeGrants(baseToken.Payload()["grants"]), + AccountSid: baseToken.Payload()["sub"].(string), + SigningKeySid: baseToken.Payload()["iss"].(string), + } + + if val, ok := baseToken.Headers()["twr"]; ok { + decodedToken.Region = val + } + if val, ok := baseToken.Payload()["grants"]; ok { + if iVal, iOk := val.(map[string]interface{})["identity"]; iOk { + decodedToken.Identity = iVal.(string) + } + } + + return decodedToken, nil +} diff --git a/client/jwt/access_token_test.go b/client/jwt/access_token_test.go new file mode 100644 index 00000000..54f65751 --- /dev/null +++ b/client/jwt/access_token_test.go @@ -0,0 +1,484 @@ +package jwt + +import ( + "os" + "strings" + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +var AccountSid string +var SigningKeySid string +var Params AccessTokenParams + +func TestMain(m *testing.M) { + AccountSid = "AC123" + SigningKeySid = "SK123" + Params = AccessTokenParams{ + AccountSid: AccountSid, + SigningKeySid: SigningKeySid, + Secret: "secret", + } + ret := m.Run() + os.Exit(ret) +} + +func validateClaims(t *testing.T, payload map[string]interface{}) { + assert.Equal(t, SigningKeySid, payload["iss"]) + assert.Equal(t, AccountSid, payload["sub"]) + assert.NotZero(t, payload["jti"]) + assert.NotZero(t, payload["exp"]) + assert.NotNil(t, payload["grants"]) + now := float64(time.Now().Unix()) + assert.Greater(t, payload["exp"].(float64), now) + assert.True(t, strings.Contains(payload["jti"].(string), payload["iss"].(string))) +} + +func testInit(t *testing.T) *AccessToken { + accessToken := CreateAccessToken(Params) + token, err := accessToken.ToJwt() + assert.Nil(t, err) + assert.NotNil(t, token) + + decodedToken, err := accessToken.FromJwt(token, "secret") + assert.Nil(t, err) + assert.NotNil(t, decodedToken) + return decodedToken +} + +func assertPanic(t *testing.T, f func(grant BaseGrant)) { + defer func() { + if r := recover(); r == nil { + t.Errorf("The code did not panic") + } + }() + f(nil) +} + +func TestAccessTokenSimple(t *testing.T) { + params := Params + params.Identity = "identity" + params.Nbf = 3600 + accessToken := CreateAccessToken(params) + + token, err := accessToken.ToJwt() + assert.Nil(t, err) + assert.NotNil(t, token) + + decodedToken, err := accessToken.FromJwt(token, "secret") + assert.Nil(t, err) + assert.NotNil(t, decodedToken) + assert.Equal(t, "secret", decodedToken.baseJwt.SecretKey) + validateClaims(t, decodedToken.Payload()) +} + +func TestAccessTokenWithNoValidation(t *testing.T) { + accessToken := CreateAccessToken(Params) + token, err := accessToken.ToJwt() + assert.Nil(t, err) + assert.NotNil(t, token) + + decodedToken, err := accessToken.FromJwt(token, "") + assert.Nil(t, err) + assert.NotNil(t, decodedToken) + assert.Equal(t, "", decodedToken.baseJwt.SecretKey) + validateClaims(t, decodedToken.Payload()) +} + +func TestAccessTokenWithoutSecret(t *testing.T) { + params := Params + params.Secret = "" + accessToken := CreateAccessToken(params) + defer func() { + if r := recover(); r == nil { + t.Errorf("The code did not panic") + } + }() + _, _ = accessToken.ToJwt() +} + +func TestAccessTokenHeaders(t *testing.T) { + params := Params + params.Identity = "identity" + params.Region = "US" + params.Nbf = 0 + params.Ttl = 50 + params.ValidUntil = 0 + accessToken := CreateAccessToken(params) + + token, err := accessToken.ToJwt() + assert.Nil(t, err) + assert.NotNil(t, token) + + decodedToken, err := accessToken.FromJwt(token, "secret") + assert.Nil(t, err) + assert.NotNil(t, decodedToken) + assert.Equal(t, "secret", decodedToken.baseJwt.SecretKey) + + headers := decodedToken.Headers() + + assert.Equal(t, "US", headers["twr"]) + assert.Equal(t, "HS256", headers["alg"]) + assert.Equal(t, "twilio-fpa;v=1", headers["cty"]) + assert.Equal(t, "JWT", headers["typ"]) +} + +func TestParams(t *testing.T) { + now := float64(time.Now().Unix()) + params := Params + params.Identity = "identity" + params.Region = "US" + params.Nbf = now + params.Ttl = 7200 + params.ValidUntil = now + 10800 + accessToken := CreateAccessToken(params) + token, err := accessToken.ToJwt() + assert.Nil(t, err) + assert.NotNil(t, token) + + decodedToken, err := accessToken.FromJwt(token, "secret") + assert.Nil(t, err) + assert.NotNil(t, decodedToken) + payload := decodedToken.Payload() + assert.Equal(t, now, payload["nbf"]) + assert.Equal(t, now+10800, payload["exp"]) +} + +func TestAccessTokenPayload(t *testing.T) { + now := float64(time.Now().Unix()) + params := Params + params.Identity = "identity" + params.Region = "US" + params.Nbf = 360 + params.Ttl = 50 + params.ValidUntil = 200 + now + accessToken := CreateAccessToken(params) + token, err := accessToken.ToJwt() + assert.Nil(t, err) + assert.NotNil(t, token) + + decodedToken, err := accessToken.FromJwt(token, "secret") + assert.Nil(t, err) + assert.NotNil(t, decodedToken) + assert.Equal(t, "secret", decodedToken.baseJwt.SecretKey) + assert.Equal(t, "US", decodedToken.Region) + assert.Equal(t, "identity", decodedToken.Identity) + assert.Equal(t, AccountSid, decodedToken.AccountSid) + assert.Equal(t, SigningKeySid, decodedToken.SigningKeySid) + + payload := decodedToken.Payload() + assert.Equal(t, "SK123", payload["iss"]) + assert.Equal(t, float64(360), payload["nbf"]) + assert.Equal(t, "AC123", payload["sub"]) + assert.True(t, strings.Contains(payload["jti"].(string), payload["iss"].(string))) + assert.Len(t, decodedToken.Grants, 0) +} + +func TestHeaders(t *testing.T) { + decodedToken := testInit(t) + headers := decodedToken.Headers() + assert.Equal(t, "HS256", headers["alg"]) + assert.Equal(t, "twilio-fpa;v=1", headers["cty"]) + assert.Equal(t, "JWT", headers["typ"]) +} + +func TestChatGrant(t *testing.T) { + params := Params + params.Identity = "identity" + params.Region = "US" + params.Nbf = 3600 + accessToken := CreateAccessToken(params) + + accessToken.AddGrant(&ChatGrant{ + ServiceSid: "IS123", + EndpointID: "Endpoint123", + DeploymentRoleSid: "Role123", + PushCredentialSid: "CR123", + }) + + token, err := accessToken.ToJwt() + assert.Nil(t, err) + assert.NotNil(t, token) + + decodedToken, err := accessToken.FromJwt(token, "secret") + assert.Nil(t, err) + assert.NotNil(t, decodedToken) + assert.Len(t, decodedToken.Grants, 1) + payload := decodedToken.Payload() + // identity should exist in the grants map as well + assert.Len(t, payload["grants"], 2) + + chatGrantDecoded := payload["grants"].(map[string]interface{})["chat"].(map[string]interface{}) + assert.NotNil(t, chatGrantDecoded) + assert.Equal(t, "Role123", chatGrantDecoded["deployment_role_sid"]) + assert.Equal(t, "Endpoint123", chatGrantDecoded["endpoint_id"]) + assert.Equal(t, "CR123", chatGrantDecoded["push_credential_sid"]) + assert.Equal(t, "IS123", chatGrantDecoded["service_sid"]) +} + +func TestConversationsGrant(t *testing.T) { + accessToken := CreateAccessToken(Params) + accessToken.AddGrant(&ConversationsGrant{ConfigurationProfileSid: "CP123"}) + + token, err := accessToken.ToJwt() + assert.Nil(t, err) + assert.NotNil(t, token) + + decodedToken, err := accessToken.FromJwt(token, "secret") + assert.Nil(t, err) + assert.NotNil(t, decodedToken) + payload := decodedToken.Payload() + assert.Len(t, decodedToken.Grants, 1) + assert.Len(t, payload["grants"], 1) + + conversationsGrantDecoded := payload["grants"].(map[string]interface{})["rtc"].(map[string]interface{}) + assert.NotNil(t, conversationsGrantDecoded) + assert.Equal(t, "CP123", conversationsGrantDecoded["configuration_profile_sid"]) +} + +func TestIpMessagingGrant(t *testing.T) { + accessToken := CreateAccessToken(Params) + accessToken.AddGrant(&IpMessagingGrant{ + ServiceSid: "IS123", + EndpointID: "Endpoint123", + DeploymentRoleSid: "Role123", + PushCredentialSid: "CR123", + }) + + token, err := accessToken.ToJwt() + assert.Nil(t, err) + assert.NotNil(t, token) + + decodedToken, err := accessToken.FromJwt(token, "secret") + assert.Nil(t, err) + assert.NotNil(t, decodedToken) + assert.Len(t, decodedToken.Grants, 1) + payload := decodedToken.Payload() + assert.Len(t, payload["grants"], 1) + + ipMessagingGrantDecoded := payload["grants"].(map[string]interface{})["ip_messaging"].(map[string]interface{}) + assert.NotNil(t, ipMessagingGrantDecoded) + assert.Equal(t, "IS123", ipMessagingGrantDecoded["service_sid"]) + assert.Equal(t, "Endpoint123", ipMessagingGrantDecoded["endpoint_id"]) + assert.Equal(t, "Role123", ipMessagingGrantDecoded["deployment_role_sid"]) + assert.Equal(t, "CR123", ipMessagingGrantDecoded["push_credential_sid"]) +} + +func TestSyncGrant(t *testing.T) { + accessToken := CreateAccessToken(Params) + accessToken.AddGrant(&SyncGrant{ + ServiceSid: "IS123", + EndpointID: "Endpoint123", + }) + + token, err := accessToken.ToJwt() + assert.Nil(t, err) + assert.NotNil(t, token) + + decodedToken, err := accessToken.FromJwt(token, "secret") + assert.Nil(t, err) + assert.NotNil(t, decodedToken) + assert.Len(t, decodedToken.Grants, 1) + payload := decodedToken.Payload() + assert.Len(t, payload["grants"], 1) + + syncGrantDecoded := payload["grants"].(map[string]interface{})["data_sync"].(map[string]interface{}) + assert.NotNil(t, syncGrantDecoded) + assert.Equal(t, "IS123", syncGrantDecoded["service_sid"]) + assert.Equal(t, "Endpoint123", syncGrantDecoded["endpoint_id"]) +} + +func TestVideoGrant(t *testing.T) { + accessToken := CreateAccessToken(Params) + accessToken.AddGrant(&VideoGrant{Room: "RM123"}) + + token, err := accessToken.ToJwt() + assert.Nil(t, err) + assert.NotNil(t, token) + + decodedToken, err := accessToken.FromJwt(token, "secret") + assert.Nil(t, err) + assert.NotNil(t, decodedToken) + assert.Len(t, decodedToken.Grants, 1) + payload := decodedToken.Payload() + assert.Len(t, payload["grants"], 1) + + videoGrantDecoded := payload["grants"].(map[string]interface{})["video"].(map[string]interface{}) + assert.NotNil(t, videoGrantDecoded) + assert.Equal(t, "RM123", videoGrantDecoded["room"]) +} + +func TestVoiceGrant(t *testing.T) { + accessToken := CreateAccessToken(Params) + accessToken.AddGrant(&VoiceGrant{ + Incoming: Incoming{Allow: true}, + Outgoing: Outgoing{ + ApplicationSid: "SID123", + ApplicationParams: map[string]interface{}{ + "foo": "bar", + }, + }, + PushCredentialSid: "Push123", + EndpointID: "Endpoint123", + }) + + token, err := accessToken.ToJwt() + assert.Nil(t, err) + assert.NotNil(t, token) + + decodedToken, err := accessToken.FromJwt(token, "secret") + assert.Nil(t, err) + assert.NotNil(t, decodedToken) + assert.Len(t, decodedToken.Grants, 1) + payload := decodedToken.Payload() + assert.Len(t, payload["grants"], 1) + + voiceGrantDecoded := payload["grants"].(map[string]interface{})["voice"].(map[string]interface{}) + assert.NotNil(t, voiceGrantDecoded) + assert.Equal(t, "Endpoint123", voiceGrantDecoded["endpoint_id"]) + assert.Equal(t, "Push123", voiceGrantDecoded["push_credential_sid"]) + + incoming := voiceGrantDecoded["incoming"].(map[string]interface{}) + assert.Equal(t, true, incoming["allow"]) + outgoing := voiceGrantDecoded["outgoing"].(map[string]interface{}) + assert.Equal(t, "SID123", outgoing["application_sid"]) + assert.Equal(t, "bar", outgoing["params"].(map[string]interface{})["foo"]) +} + +func TestTaskRouterGrant(t *testing.T) { + accessToken := CreateAccessToken(Params) + accessToken.AddGrant(&TaskRouterGrant{ + WorkspaceSid: "WS123", + WorkerSid: "WK123", + Role: "worker", + }) + + token, err := accessToken.ToJwt() + assert.Nil(t, err) + assert.NotNil(t, token) + + decodedToken, err := accessToken.FromJwt(token, "secret") + assert.Nil(t, err) + assert.NotNil(t, decodedToken) + payload := decodedToken.Payload() + assert.Len(t, payload["grants"], 1) + + taskRouterGrantDecoded := payload["grants"].(map[string]interface{})["task_router"].(map[string]interface{}) + assert.NotNil(t, taskRouterGrantDecoded) + assert.Equal(t, "WS123", taskRouterGrantDecoded["workspace_sid"]) + assert.Equal(t, "WK123", taskRouterGrantDecoded["worker_sid"]) + assert.Equal(t, "worker", taskRouterGrantDecoded["role"]) +} + +func TestPlaybackGrant(t *testing.T) { + accessToken := CreateAccessToken(Params) + accessToken.AddGrant(&PlaybackGrant{ + "requestCredentials": nil, + "playbackUrl": "https://000.us-east-1.playback.live-video.net/api/video/v1/us-east-000.channel.000?token=xxxxx", + "playerStreamerSid": "VJXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", + }) + + token, err := accessToken.ToJwt() + assert.Nil(t, err) + assert.NotNil(t, token) + + decodedToken, err := accessToken.FromJwt(token, "secret") + assert.Nil(t, err) + assert.NotNil(t, decodedToken) + assert.Len(t, decodedToken.Grants, 1) + payload := decodedToken.Payload() + assert.Len(t, payload["grants"], 1) + + playbackGrantDecoded := payload["grants"].(map[string]interface{})["player"].(map[string]interface{}) + assert.NotNil(t, playbackGrantDecoded) + assert.Equal(t, nil, playbackGrantDecoded["requestCredentials"]) + assert.Equal(t, "https://000.us-east-1.playback.live-video.net/api/video/v1/us-east-000.channel.000?token=xxxxx", playbackGrantDecoded["playbackUrl"]) + assert.Equal(t, "VJXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", playbackGrantDecoded["playerStreamerSid"]) +} + +func TestMultipleGrants(t *testing.T) { + accessToken := CreateAccessToken(Params) + accessToken.AddGrant(&TaskRouterGrant{ + WorkspaceSid: "WS123", + WorkerSid: "WK123", + Role: "worker", + }) + + accessToken.AddGrant(&SyncGrant{}) + + token, err := accessToken.ToJwt() + assert.Nil(t, err) + assert.NotNil(t, token) + + decodedToken, err := accessToken.FromJwt(token, "secret") + assert.Nil(t, err) + assert.NotNil(t, decodedToken) + payload := decodedToken.Payload() + assert.Len(t, payload["grants"], 2) + + taskRouterGrantDecoded := payload["grants"].(map[string]interface{})["task_router"].(map[string]interface{}) + assert.NotNil(t, taskRouterGrantDecoded) + assert.Equal(t, "WS123", taskRouterGrantDecoded["workspace_sid"]) + assert.Equal(t, "WK123", taskRouterGrantDecoded["worker_sid"]) + assert.Equal(t, "worker", taskRouterGrantDecoded["role"]) + + syncGrantDecoded := payload["grants"].(map[string]interface{})["data_sync"].(map[string]interface{}) + assert.NotNil(t, syncGrantDecoded) +} + +func TestGrantsDuringInit(t *testing.T) { + grants := []BaseGrant{ + &VideoGrant{Room: "room"}, + &VoiceGrant{}, + } + params := Params + params.Grants = grants + accessToken := CreateAccessToken(params) + token, err := accessToken.ToJwt() + assert.Nil(t, err) + assert.NotNil(t, token) + + decodedToken, err := accessToken.FromJwt(token, "secret") + assert.Nil(t, err) + assert.NotNil(t, decodedToken) + + payload := decodedToken.Payload() + assert.Len(t, payload["grants"], 2) + + videoGrantDecoded := payload["grants"].(map[string]interface{})["video"].(map[string]interface{}) + assert.NotNil(t, videoGrantDecoded) + assert.Equal(t, "room", videoGrantDecoded["room"]) + + voiceGrantDecoded := payload["grants"].(map[string]interface{})["voice"].(map[string]interface{}) + assert.NotNil(t, voiceGrantDecoded) +} + +func TestValidateGrant(t *testing.T) { + accessToken := CreateAccessToken(Params) + assertPanic(t, accessToken.AddGrant) +} + +func TestGrantsToString(t *testing.T) { + chatGrant := &ChatGrant{} + assert.True(t, strings.HasPrefix(chatGrant.ToString(), "", "ChatGrant", chatGrant.ToPayload()) +} diff --git a/client/jwt/conversations_grant.go b/client/jwt/conversations_grant.go new file mode 100644 index 00000000..7a689937 --- /dev/null +++ b/client/jwt/conversations_grant.go @@ -0,0 +1,25 @@ +package jwt + +import "fmt" + +type ConversationsGrant struct { + ConfigurationProfileSid string `json:"configuration_profile_sid"` +} + +func (conversationsGrant *ConversationsGrant) Key() string { + return "rtc" +} + +func (conversationsGrant *ConversationsGrant) ToPayload() map[string]interface{} { + grant := make(map[string]interface{}) + + if conversationsGrant.ConfigurationProfileSid != "" { + grant["configuration_profile_sid"] = conversationsGrant.ConfigurationProfileSid + } + + return grant +} + +func (conversationsGrant *ConversationsGrant) ToString() string { + return fmt.Sprintf("<%s %s>", "ConversationsGrant", conversationsGrant.ToPayload()) +} diff --git a/client/jwt/ip_messaging_grant.go b/client/jwt/ip_messaging_grant.go new file mode 100644 index 00000000..780385fd --- /dev/null +++ b/client/jwt/ip_messaging_grant.go @@ -0,0 +1,36 @@ +package jwt + +import "fmt" + +type IpMessagingGrant struct { + ServiceSid string `json:"service_sid"` + EndpointID string `json:"endpoint_id"` + DeploymentRoleSid string `json:"deployment_role_sid"` + PushCredentialSid string `json:"push_credential_sid"` +} + +func (ipMessagingGrant *IpMessagingGrant) Key() string { + return "ip_messaging" +} + +func (ipMessagingGrant *IpMessagingGrant) ToPayload() map[string]interface{} { + grant := make(map[string]interface{}) + if ipMessagingGrant.ServiceSid != "" { + grant["service_sid"] = ipMessagingGrant.ServiceSid + } + if ipMessagingGrant.EndpointID != "" { + grant["endpoint_id"] = ipMessagingGrant.EndpointID + } + if ipMessagingGrant.DeploymentRoleSid != "" { + grant["deployment_role_sid"] = ipMessagingGrant.DeploymentRoleSid + } + if ipMessagingGrant.PushCredentialSid != "" { + grant["push_credential_sid"] = ipMessagingGrant.PushCredentialSid + } + + return grant +} + +func (ipMessagingGrant *IpMessagingGrant) ToString() string { + return fmt.Sprintf("<%s %s>", "IpMessagingGrant", ipMessagingGrant.ToPayload()) +} diff --git a/client/jwt/jwt.go b/client/jwt/jwt.go new file mode 100644 index 00000000..893c7de4 --- /dev/null +++ b/client/jwt/jwt.go @@ -0,0 +1,169 @@ +package jwt + +import ( + "errors" + "fmt" + "strconv" + "time" + + "github.com/golang-jwt/jwt" + . "github.com/twilio/twilio-go/client/jwt/util" +) + +type TokenType string + +type Jwt struct { + // The secret used to encode the JWT token. + SecretKey string + // The issuer of the JWT token. + Issuer string + // The subject of this JWT, omitted from the payload by default. + Subject string + // The algorithm used to encode the JWT token, defaults to 'HS256'. + Algorithm string + // Time in seconds before the JWT token is invalid. Defaults to now. + Nbf float64 + // Time to live of the JWT in seconds; defaults to 1 hour. + Ttl float64 + // Time in seconds since epoch this JWT is valid for. Override ttl if provided. + ValidUntil float64 + + DecodedHeaders map[string]interface{} + DecodedPayload map[string]interface{} +} + +func (token *Jwt) generatePayload(payload map[string]interface{}) map[string]interface{} { + now := time.Now().Unix() + + payload["iss"] = token.Issuer + payload["exp"] = float64(now) + token.Ttl + + if token.Nbf != 0 { + payload["nbf"] = token.Nbf + } else { + payload["nbf"] = float64(now) + } + + if token.ValidUntil != 0 { + payload["exp"] = token.ValidUntil + } + if token.Subject != "" { + payload["sub"] = token.Subject + } + + return payload +} + +func (token *Jwt) FromJwt(jwtStr string, key string) (*Jwt, error) { + verifyToken := true + if key == "" { + verifyToken = false + } + + // Parse takes the token string and a function for looking up the key. The latter is especially + // useful if you use multiple keys for your application. The standard is to use 'kid' in the + // head of the token to identify which key to use, but the parsed token (head and claims) is provided + // to the callback, providing flexibility. + decodedToken, err := jwt.Parse(jwtStr, func(token *jwt.Token) (interface{}, error) { + // Validate the alg is what you expect + if _, ok := token.Method.(*jwt.SigningMethodHMAC); !ok { + return nil, fmt.Errorf("unexpected signing method: %v", token.Header["alg"]) + } + + return []byte(key), nil + }) + + if decodedToken != nil { + if claims, ok := decodedToken.Claims.(jwt.MapClaims); ok { + if verifyToken && !decodedToken.Valid { + return nil, errors.New("token could not be validated") + } + jwtToken := Jwt{ + SecretKey: key, + Issuer: claims["iss"].(string), + Algorithm: decodedToken.Header["alg"].(string), + } + + if val, ok := claims["sub"].(string); ok { + jwtToken.Subject = val + } + + if val, ok := claims["exp"].(float64); ok { + jwtToken.ValidUntil = val + } + + nbf, err := strconv.ParseFloat(fmt.Sprintf("%v", claims["nbf"]), 64) + if err == nil { + jwtToken.Nbf = nbf + } + + jwtToken.DecodedHeaders = decodedToken.Header + jwtToken.DecodedPayload = claims + return &jwtToken, nil + } else { + return nil, err + } + } + + return nil, errors.New("error decoding JWT token") +} + +func (token *Jwt) Payload() map[string]interface{} { + if token.DecodedPayload == nil { + token.DecodedPayload = token.generatePayload(map[string]interface{}{}) + } + + return token.DecodedPayload +} + +func (token *Jwt) Headers() map[string]interface{} { + if token.DecodedHeaders == nil { + token.DecodedHeaders = token.generateHeaders() + } + + return token.DecodedHeaders +} + +func (token *Jwt) generateHeaders() map[string]interface{} { + headers := make(map[string]interface{}) + headers["alg"] = HS256 + headers["typ"] = JWT + return headers +} + +// Encode this JWT struct into a string. +// algorithm - algorithm used to encode the JWT that overrides the default +// ttl - specify ttl to override the default +func (token *Jwt) ToJwt(generateHeaders, generatePayload func() map[string]interface{}) (string, error) { + if token.SecretKey == "" { + panic("JWT does not have a signing key configured.") + } + + headers := generateHeaders() + payload := generatePayload() + if signedToken, err := SignTokenWithHMAC(headers, payload, token.SecretKey); err != nil { + return "", err + } else { + return signedToken, nil + } +} + +func SignTokenWithHMAC(headers, payload map[string]interface{}, secret string) (string, error) { + claims := jwt.MapClaims{} + + for k, v := range payload { + claims[k] = v + } + + jwtToken := jwt.NewWithClaims(jwt.SigningMethodHS256, claims) + + for hk, hv := range headers { + jwtToken.Header[hk] = hv + } + + if tokenString, err := jwtToken.SignedString([]byte(secret)); err != nil { + return "", err + } else { + return tokenString, nil + } +} diff --git a/client/jwt/jwt_test.go b/client/jwt/jwt_test.go new file mode 100644 index 00000000..2ab6568e --- /dev/null +++ b/client/jwt/jwt_test.go @@ -0,0 +1,41 @@ +package jwt + +import ( + "testing" + + "github.com/stretchr/testify/assert" + . "github.com/twilio/twilio-go/client/jwt/util" +) + +func TestGetHeaders(t *testing.T) { + jwtT := Jwt{ + SecretKey: "secret", + Issuer: "twilio", + Subject: "twilio jwt", + Algorithm: "HS256", + } + headers := jwtT.Headers() + assert.Equal(t, HS256, headers["alg"]) + assert.Equal(t, JWT, headers["typ"]) +} + +func TestGetPayload(t *testing.T) { + jwtT := Jwt{ + SecretKey: "secret", + Issuer: "twilio", + Subject: "twilio jwt", + Algorithm: "HS256", + Nbf: 0, + Ttl: 0, + ValidUntil: 0, + DecodedHeaders: nil, + DecodedPayload: nil, + } + + payload := map[string]interface{}{} + payload = jwtT.generatePayload(payload) + assert.Equal(t, "twilio", payload["iss"]) + assert.NotZero(t, payload["exp"]) + assert.NotZero(t, payload["nbf"]) + assert.Equal(t, "twilio jwt", payload["sub"]) +} diff --git a/client/jwt/playback_grant.go b/client/jwt/playback_grant.go new file mode 100644 index 00000000..a1e8bdff --- /dev/null +++ b/client/jwt/playback_grant.go @@ -0,0 +1,17 @@ +package jwt + +import "fmt" + +type PlaybackGrant map[string]interface{} + +func (playbackGrant *PlaybackGrant) Key() string { + return "player" +} + +func (playbackGrant *PlaybackGrant) ToPayload() map[string]interface{} { + return *playbackGrant +} + +func (playbackGrant *PlaybackGrant) ToString() string { + return fmt.Sprintf("<%s %s>", "PlaybackGrant", playbackGrant.ToPayload()) +} diff --git a/client/jwt/sync_grant.go b/client/jwt/sync_grant.go new file mode 100644 index 00000000..9fe72975 --- /dev/null +++ b/client/jwt/sync_grant.go @@ -0,0 +1,28 @@ +package jwt + +import "fmt" + +type SyncGrant struct { + ServiceSid string `json:"service_sid"` + EndpointID string `json:"endpoint_id"` +} + +func (syncGrant *SyncGrant) Key() string { + return "data_sync" +} + +func (syncGrant *SyncGrant) ToPayload() map[string]interface{} { + grant := make(map[string]interface{}) + if syncGrant.ServiceSid != "" { + grant["service_sid"] = syncGrant.ServiceSid + } + if syncGrant.EndpointID != "" { + grant["endpoint_id"] = syncGrant.EndpointID + } + + return grant +} + +func (syncGrant *SyncGrant) ToString() string { + return fmt.Sprintf("<%s %s>", "SyncGrant", syncGrant.ToPayload()) +} diff --git a/client/jwt/taskrouter/capability_token.go b/client/jwt/taskrouter/capability_token.go new file mode 100644 index 00000000..e36a58b3 --- /dev/null +++ b/client/jwt/taskrouter/capability_token.go @@ -0,0 +1,184 @@ +package taskrouter + +import ( + "encoding/json" + "fmt" + "reflect" + "strings" + "time" + + baseJwt "github.com/twilio/twilio-go/client/jwt" + . "github.com/twilio/twilio-go/client/jwt/util" +) + +type CapabilityToken struct { + baseJwt *baseJwt.Jwt + AccountSid string + AuthToken string + WorkspaceSid string + ChannelID string + Policies []Policy +} + +type CapabilityTokenParams struct { + // Twilio Account sid + AccountSid string + // Twilio auth token used to sign the JWT + AuthToken string + // TaskRouter Workspace SID + WorkspaceSid string + // TaskRouter Channel SID + ChannelID string + // Time in secs since epoch before which this JWT is invalid, defaults to now + Nbf float64 + // Time to live of the JWT in seconds, defaults to 1 hour + Ttl float64 + // Time in secs since epoch this JWT is valid for. Overrides ttl if provided. + ValidUntil float64 +} + +// Create Capability Token for TaskRouter +func CreateCapabilityToken(params CapabilityTokenParams) CapabilityToken { + return CapabilityToken{ + baseJwt: &baseJwt.Jwt{ + SecretKey: params.AuthToken, + Issuer: params.AccountSid, + Subject: "", + Algorithm: HS256, + Nbf: params.Nbf, + Ttl: Max(params.Ttl, 3600), + ValidUntil: params.ValidUntil, + }, + AccountSid: params.AccountSid, + AuthToken: params.AuthToken, + WorkspaceSid: params.WorkspaceSid, + ChannelID: params.ChannelID, + Policies: make([]Policy, 0), + } +} + +func (token *CapabilityToken) AddPolicy(policy Policy) { + token.Policies = append(token.Policies, policy) +} + +func (token *CapabilityToken) generatePayload() map[string]interface{} { + now := float64(time.Now().Unix()) + + // These are required since we want to authenticate and authorize the opening of a websocket in the first place. + // Subsequent events to GET, POST or DELETE to other APIs will utilize this websocket. + defaultPolicies := WebSocketPolicies(token.AccountSid, token.ChannelID) + token.Policies = append(token.Policies, defaultPolicies...) + + payload := map[string]interface{}{ + "version": Version, + } + if token.AccountSid != "" { + payload["account_sid"] = token.AccountSid + } + if token.WorkspaceSid != "" { + payload["workspace_sid"] = token.WorkspaceSid + } + if token.ChannelID != "" { + payload["channel"] = token.ChannelID + payload["friendly_name"] = token.ChannelID + } + + var policies []map[string]interface{} + for _, policy := range token.Policies { + policyPayload := policy.Payload() + policies = append(policies, policyPayload) + } + + if len(policies) > 0 { + payload["policies"] = policies + } + + payload["iss"] = token.baseJwt.Issuer + payload["exp"] = now + token.baseJwt.Ttl + if token.baseJwt.Nbf != 0 { + payload["nbf"] = token.baseJwt.Nbf + } else { + payload["nbf"] = now + } + if token.baseJwt.ValidUntil != 0 { + payload["exp"] = token.baseJwt.ValidUntil + } + if strings.HasPrefix(token.ChannelID, "WK") { + payload["worker_sid"] = token.ChannelID + } else if strings.HasPrefix(token.ChannelID, "WQ") { + payload["taskqueue_sid"] = token.ChannelID + } + + return payload +} + +func (token *CapabilityToken) ToString() string { + signedStr, err := token.ToJwt() + if err != nil { + return "" + } + return fmt.Sprintf("", signedStr) +} + +// Encode the JWT struct into a string. +func (token *CapabilityToken) ToJwt() (string, error) { + signedToken, err := token.baseJwt.ToJwt(token.baseJwt.Headers, token.generatePayload) + if err != nil { + return "", err + } + + return signedToken, nil +} + +// Get the decoded token back from the jwt String +func (token *CapabilityToken) FromJwt(jwtStr string, key string) (*CapabilityToken, error) { + baseToken, err := token.baseJwt.FromJwt(jwtStr, key) + if err != nil { + return nil, err + } + + return &CapabilityToken{ + baseJwt: baseToken, + AccountSid: baseToken.Issuer, + AuthToken: baseToken.SecretKey, + WorkspaceSid: baseToken.Payload()["workspace_sid"].(string), + ChannelID: baseToken.Payload()["channel"].(string), + Policies: decodePolicies(baseToken.Payload()["policies"]), + }, nil +} + +func decodePolicies(policies interface{}) []Policy { + var decodedPolicies []Policy + switch reflect.TypeOf(policies).Kind() { + case reflect.Slice: + s := reflect.ValueOf(policies) + + for i := 0; i < s.Len(); i++ { + var pol Policy + val := s.Index(i).Interface().(map[string]interface{}) + if data, err := json.Marshal(val); err == nil { + if errJson := json.Unmarshal(data, &pol); errJson == nil { + decodedPolicies = append(decodedPolicies, pol) + } + } + } + } + + return decodedPolicies +} + +func (token *CapabilityToken) Headers() map[string]interface{} { + if token.baseJwt.DecodedHeaders == nil { + token.baseJwt.DecodedHeaders = token.baseJwt.Headers() + } + + return token.baseJwt.DecodedHeaders +} + +func (token *CapabilityToken) Payload() map[string]interface{} { + if token.baseJwt.DecodedPayload == nil { + token.baseJwt.DecodedPayload = token.generatePayload() + } + + return token.baseJwt.DecodedPayload +} diff --git a/client/jwt/taskrouter/capability_token_test.go b/client/jwt/taskrouter/capability_token_test.go new file mode 100644 index 00000000..a52e5e8a --- /dev/null +++ b/client/jwt/taskrouter/capability_token_test.go @@ -0,0 +1,227 @@ +package taskrouter + +import ( + "os" + "reflect" + "strings" + "testing" + + "github.com/stretchr/testify/assert" +) + +var AccountSid string +var AuthToken string +var WorkspaceSid string +var TaskqueueSid string +var Params CapabilityTokenParams + +func TestMain(m *testing.M) { + AccountSid = "AC123" + AuthToken = "foobar" + WorkspaceSid = "WS123" + TaskqueueSid = "WQ123" + Params = CapabilityTokenParams{ + AccountSid: AccountSid, + AuthToken: AuthToken, + WorkspaceSid: WorkspaceSid, + ChannelID: TaskqueueSid, + } + ret := m.Run() + os.Exit(ret) +} + +func TestCapabilityTokenGenerate(t *testing.T) { + capabilityToken := CreateCapabilityToken(Params) + + token, _ := capabilityToken.ToJwt() + assert.NotNil(t, token) + + decodedToken, err := capabilityToken.FromJwt(token, AuthToken) + assert.Nil(t, err) + assert.NotNil(t, decodedToken) + payload := decodedToken.Payload() + + assert.Equal(t, AccountSid, payload["iss"]) + assert.Len(t, payload["policies"], 2) + assert.Equal(t, AccountSid, payload["iss"]) + assert.Equal(t, TaskqueueSid, payload["channel"]) + assert.Equal(t, WorkspaceSid, payload["workspace_sid"]) + assert.Equal(t, "v1", payload["version"]) + assert.Equal(t, TaskqueueSid, payload["friendly_name"]) +} + +func TestHeaders(t *testing.T) { + capabilityToken := CreateCapabilityToken(Params) + token, _ := capabilityToken.ToJwt() + decodedToken, err := capabilityToken.FromJwt(token, AuthToken) + assert.Nil(t, err) + headers := decodedToken.Headers() + assert.Equal(t, "HS256", headers["alg"]) + assert.Equal(t, "JWT", headers["typ"]) +} + +func TestToString(t *testing.T) { + capabilityToken := CreateCapabilityToken(Params) + tokenStr := capabilityToken.ToString() + assert.True(t, strings.HasPrefix(tokenStr, "", "TaskRouterGrant", taskRouterGrant.ToPayload()) +} diff --git a/client/jwt/util/util.go b/client/jwt/util/util.go new file mode 100644 index 00000000..b91c81ae --- /dev/null +++ b/client/jwt/util/util.go @@ -0,0 +1,14 @@ +package util + +const ( + HS256 = "HS256" + JWT = "JWT" + CType = "twilio-fpa;v=1" +) + +func Max(a, b float64) float64 { + if a > b { + return a + } + return b +} diff --git a/client/jwt/util/util_test.go b/client/jwt/util/util_test.go new file mode 100644 index 00000000..be2a21f4 --- /dev/null +++ b/client/jwt/util/util_test.go @@ -0,0 +1,13 @@ +package util + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestMax(t *testing.T) { + assert.Equal(t, float64(5), Max(1, 5)) + assert.Equal(t, float64(-40), Max(-100, -40)) + assert.Equal(t, 5.5, Max(5.5, 5.1)) +} diff --git a/client/jwt/video_grant.go b/client/jwt/video_grant.go new file mode 100644 index 00000000..d254da22 --- /dev/null +++ b/client/jwt/video_grant.go @@ -0,0 +1,25 @@ +package jwt + +import "fmt" + +type VideoGrant struct { + Room string `json:"room"` +} + +func (videoGrant *VideoGrant) Key() string { + return "video" +} + +func (videoGrant *VideoGrant) ToPayload() map[string]interface{} { + grant := make(map[string]interface{}) + + if videoGrant.Room != "" { + grant["room"] = videoGrant.Room + } + + return grant +} + +func (videoGrant *VideoGrant) ToString() string { + return fmt.Sprintf("<%s %s>", "VideoGrant", videoGrant.ToPayload()) +} diff --git a/client/jwt/voice_grant.go b/client/jwt/voice_grant.go new file mode 100644 index 00000000..ee5f49c8 --- /dev/null +++ b/client/jwt/voice_grant.go @@ -0,0 +1,53 @@ +package jwt + +import "fmt" + +type VoiceGrant struct { + Incoming Incoming `json:"incoming"` + Outgoing Outgoing `json:"outgoing"` + PushCredentialSid string `json:"push_credential_sid"` + EndpointID string `json:"endpoint_id"` +} + +type Incoming struct { + Allow bool `json:"allow"` +} + +type Outgoing struct { + ApplicationSid string `json:"application_sid"` + ApplicationParams map[string]interface{} `json:"params"` +} + +func (voiceGrant *VoiceGrant) Key() string { + return "voice" +} + +func (voiceGrant *VoiceGrant) ToPayload() map[string]interface{} { + grant := make(map[string]interface{}) + if voiceGrant.Incoming.Allow { + grant["incoming"] = map[string]interface{}{ + "allow": true, + } + } + if voiceGrant.Outgoing.ApplicationSid != "" { + grant["outgoing"] = map[string]interface{}{ + "application_sid": voiceGrant.Outgoing.ApplicationSid, + } + if len(voiceGrant.Outgoing.ApplicationParams) != 0 { + grant["outgoing"].(map[string]interface{})["params"] = voiceGrant.Outgoing.ApplicationParams + } + } + + if voiceGrant.PushCredentialSid != "" { + grant["push_credential_sid"] = voiceGrant.PushCredentialSid + } + if voiceGrant.EndpointID != "" { + grant["endpoint_id"] = voiceGrant.EndpointID + } + + return grant +} + +func (voiceGrant *VoiceGrant) ToString() string { + return fmt.Sprintf("<%s %s>", "VoiceGrant", voiceGrant.ToPayload()) +} diff --git a/client/mock_client.go b/client/mock_client.go new file mode 100644 index 00000000..59dddb8b --- /dev/null +++ b/client/mock_client.go @@ -0,0 +1,83 @@ +// Code generated by MockGen. DO NOT EDIT. +// Source: client/base_client.go + +// Package mock_client is a generated GoMock package. +package client + +import ( + http "net/http" + url "net/url" + reflect "reflect" + time "time" + + gomock "github.com/golang/mock/gomock" +) + +// MockBaseClient is a mock of BaseClient interface. +type MockBaseClient struct { + ctrl *gomock.Controller + recorder *MockBaseClientMockRecorder +} + +// MockBaseClientMockRecorder is the mock recorder for MockBaseClient. +type MockBaseClientMockRecorder struct { + mock *MockBaseClient +} + +// NewMockBaseClient creates a new mock instance. +func NewMockBaseClient(ctrl *gomock.Controller) *MockBaseClient { + mock := &MockBaseClient{ctrl: ctrl} + mock.recorder = &MockBaseClientMockRecorder{mock} + return mock +} + +// EXPECT returns an object that allows the caller to indicate expected use. +func (m *MockBaseClient) EXPECT() *MockBaseClientMockRecorder { + return m.recorder +} + +// AccountSid mocks base method. +func (m *MockBaseClient) AccountSid() string { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "AccountSid") + ret0, _ := ret[0].(string) + return ret0 +} + +// AccountSid indicates an expected call of AccountSid. +func (mr *MockBaseClientMockRecorder) AccountSid() *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AccountSid", reflect.TypeOf((*MockBaseClient)(nil).AccountSid)) +} + +// SendRequest mocks base method. +func (m *MockBaseClient) SendRequest(method, rawURL string, data url.Values, headers map[string]interface{}, body ...byte) (*http.Response, error) { + m.ctrl.T.Helper() + varargs := []interface{}{method, rawURL, data, headers} + for _, a := range body { + varargs = append(varargs, a) + } + ret := m.ctrl.Call(m, "SendRequest", varargs...) + ret0, _ := ret[0].(*http.Response) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// SendRequest indicates an expected call of SendRequest. +func (mr *MockBaseClientMockRecorder) SendRequest(method, rawURL, data, headers interface{}, body ...interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + varargs := append([]interface{}{method, rawURL, data, headers}, body...) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendRequest", reflect.TypeOf((*MockBaseClient)(nil).SendRequest), varargs...) +} + +// SetTimeout mocks base method. +func (m *MockBaseClient) SetTimeout(timeout time.Duration) { + m.ctrl.T.Helper() + m.ctrl.Call(m, "SetTimeout", timeout) +} + +// SetTimeout indicates an expected call of SetTimeout. +func (mr *MockBaseClientMockRecorder) SetTimeout(timeout interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetTimeout", reflect.TypeOf((*MockBaseClient)(nil).SetTimeout), timeout) +} diff --git a/client/page_util.go b/client/page_util.go new file mode 100644 index 00000000..a9b722f7 --- /dev/null +++ b/client/page_util.go @@ -0,0 +1,75 @@ +package client + +import ( + "encoding/json" + "fmt" + "strings" +) + +// Takes a limit on the max number of records to read and a max pageSize and calculates the max number of pages to read. +func ReadLimits(pageSize *int, limit *int) int { + //don't care about pageSize + if pageSize == nil { + if limit == nil { + //don't care about the limit either + return 50 //default + } + //return the most efficient pageSize + return min(*limit, 1000) + } else { + if limit == nil { + //we care about the pageSize but not the limit + return *pageSize + } + return min(*pageSize, *limit) + } +} + +func GetNext(baseUrl string, response interface{}, getNextPage func(nextPageUri string) (interface{}, error)) (interface{}, error) { + nextPageUrl, err := getNextPageUrl(baseUrl, response) + if err != nil { + return nil, err + } + + return getNextPage(nextPageUrl) +} + +func toMap(s interface{}) (map[string]interface{}, error) { + var payload map[string]interface{} + data, err := json.Marshal(s) + if err != nil { + return nil, err + } + + err = json.Unmarshal(data, &payload) + if err != nil { + return nil, err + } + + return payload, err +} + +func getNextPageUrl(baseUrl string, response interface{}) (string, error) { + payload, err := toMap(response) + if err != nil { + return "", err + } + + if payload != nil && payload["meta"] != nil && payload["meta"].(map[string]interface{})["next_page_url"] != nil { + return payload["meta"].(map[string]interface{})["next_page_url"].(string), nil + } + + if payload != nil && payload["next_page_uri"] != nil { + // remove any leading and trailing '/' + return fmt.Sprintf("%s/%s", strings.Trim(baseUrl, "/"), strings.Trim(payload["next_page_uri"].(string), "/")), nil + } + + return "", nil +} + +func min(a int, b int) int { + if a > b { + return b + } + return a +} diff --git a/client/page_util_test.go b/client/page_util_test.go new file mode 100644 index 00000000..ebfd8550 --- /dev/null +++ b/client/page_util_test.go @@ -0,0 +1,182 @@ +package client + +import ( + "bytes" + "encoding/json" + "io" + "net/http" + "net/url" + "testing" + + "github.com/golang/mock/gomock" + + "github.com/stretchr/testify/assert" +) + +func TestPageUtil_ReadLimits(t *testing.T) { + assert.Equal(t, 5, ReadLimits(nil, setLimit(5))) + assert.Equal(t, 5, ReadLimits(setPageSize(10), setLimit(5))) + assert.Equal(t, 1000, ReadLimits(nil, setLimit(5000))) + assert.Equal(t, 10, ReadLimits(setPageSize(10), nil)) + assert.Equal(t, 50, ReadLimits(nil, nil)) +} + +func setLimit(limit int) *int { + return &limit +} + +func setPageSize(pageSize int) *int { + return &pageSize +} + +func TestPageUtil_GetNextPageUri(t *testing.T) { + payload := map[string]interface{}{ + "next_page_uri": "/2010-04-01/Accounts/ACXX/IncomingPhoneNumbers.json?PageSize=50&Page=1", + "page_size": 50, + } + baseUrl := "https://api.twilio.com/" + nextPageUrl, err := getNextPageUrl(baseUrl, payload) + assert.Nil(t, err) + assert.Equal(t, "https://api.twilio.com/2010-04-01/Accounts/ACXX/IncomingPhoneNumbers.json?PageSize=50&Page=1", nextPageUrl) + + payload["next_page_uri"] = "2010-04-01/Accounts/ACXX/IncomingPhoneNumbers.json?PageSize=50&Page=1" + baseUrl = "https://api.twilio.com" + nextPageUrl, err = getNextPageUrl(baseUrl, payload) + assert.Nil(t, err) + assert.Equal(t, "https://api.twilio.com/2010-04-01/Accounts/ACXX/IncomingPhoneNumbers.json?PageSize=50&Page=1", nextPageUrl) + + payload = map[string]interface{}{} + nextPageUrl, err = getNextPageUrl(baseUrl, payload) + assert.Nil(t, err) + assert.Equal(t, "", nextPageUrl) +} + +func TestPageUtil_GetNextPageUrl(t *testing.T) { + payload := map[string]interface{}{ + "meta": map[string]interface{}{ + "next_page_url": "https://api.twilio.com/2010-04-01/Accounts/ACXX/IncomingPhoneNumbers.json?PageSize=50&Page=1", + "page_size": 50, + }, + } + + nextPageUrl, err := getNextPageUrl("https://apitest.twilio.com", payload) + assert.Nil(t, err) + assert.Equal(t, "https://api.twilio.com/2010-04-01/Accounts/ACXX/IncomingPhoneNumbers.json?PageSize=50&Page=1", nextPageUrl) +} + +func getTestClient(t *testing.T) *MockBaseClient { + mockCtrl := gomock.NewController(t) + testClient := NewMockBaseClient(mockCtrl) + testClient.EXPECT().AccountSid().DoAndReturn(func() string { + return "AC222222222222222222222222222222" + }).AnyTimes() + + testClient.EXPECT().SendRequest( + gomock.Any(), + gomock.Any(), + gomock.Any(), + gomock.Any()). + DoAndReturn(func(method string, rawURL string, data url.Values, + headers map[string]interface{}, body ...interface{}) (*http.Response, error) { + response := map[string]interface{}{ + "end": 4, + "first_page_uri": "/2010-04-01/Accounts/ACXX/Messages.json?From=9999999999&PageNumber=&To=4444444444&PageSize=2&Page=0", + "messages": []map[string]interface{}{ + { + "direction": "outbound-api", + "from": "4444444444", + "to": "9999999999", + "body": "Message 0", + "status": "delivered", + }, + { + "direction": "outbound-api", + "from": "4444444444", + "to": "9999999999", + "body": "Message 1", + "status": "delivered", + }, + }, + "uri": "/2010-04-01/Accounts/ACXX/Messages.json?From=9999999999&PageNumber=&To=4444444444&PageSize=2&Page=0&PageToken=dummy", + "page_size": 5, + "start": 0, + "next_page_uri": "/2010-04-01/Accounts/ACXX/Messages.json?From=9999999999&PageNumber=&To=4444444444&PageSize=2&Page=1&PageToken=PASMXX", + "page": 0, + } + + resp, _ := json.Marshal(response) + + return &http.Response{ + Body: io.NopCloser(bytes.NewReader(resp)), + }, nil + }, + ) + + return testClient +} + +type testResponse struct { + End int `json:"end,omitempty"` + FirstPageUri string `json:"first_page_uri,omitempty"` + Messages []testMessage `json:"messages,omitempty"` + NextPageUri string `json:"next_page_uri,omitempty"` + Page int `json:"page,omitempty"` + PageSize int `json:"page_size,omitempty"` + PreviousPageUri string `json:"previous_page_uri,omitempty"` + Start int `json:"start,omitempty"` + Uri string `json:"uri,omitempty"` +} + +type testMessage struct { + // The message text + Body *string `json:"body,omitempty"` + // The direction of the message + Direction *string `json:"direction,omitempty"` + // The phone number that initiated the message + From *string `json:"from,omitempty"` + // The status of the message + Status *string `json:"status,omitempty"` + // The phone number that received the message + To *string `json:"to,omitempty"` +} + +func getSomething(nextPageUrl string) (interface{}, error) { + return nextPageUrl, nil +} + +func TestPageUtil_GetNext(t *testing.T) { + testClient := getTestClient(t) + baseUrl := "https://api.twilio.com" + response, _ := testClient.SendRequest("get", "", nil, nil) //nolint:bodyclose + ps := &testResponse{} + _ = json.NewDecoder(response.Body).Decode(ps) + + nextPageUrl, err := GetNext(baseUrl, ps, getSomething) + assert.Equal(t, "https://api.twilio.com/2010-04-01/Accounts/ACXX/Messages.json?From=9999999999&PageNumber=&To=4444444444&PageSize=2&Page=1&PageToken=PASMXX", nextPageUrl) + assert.Nil(t, err) + + nextPageUrl, err = GetNext(baseUrl, nil, getSomething) + assert.Empty(t, nextPageUrl) + assert.Nil(t, err) +} + +func TestPageUtil_ToMap(t *testing.T) { + testMap, err := toMap("invalid") + assert.NotNil(t, err) + assert.Nil(t, testMap) + + valid := testResponse{ + End: 0, + FirstPageUri: "first", + Messages: nil, + NextPageUri: "next", + Page: 0, + PageSize: 0, + PreviousPageUri: "previous", + Start: 0, + Uri: "uri", + } + testMap, err = toMap(valid) + assert.Nil(t, err) + assert.NotNil(t, testMap) +} diff --git a/client/request_handler.go b/client/request_handler.go new file mode 100644 index 00000000..0789176e --- /dev/null +++ b/client/request_handler.go @@ -0,0 +1,103 @@ +// Package client provides internal utilities for the twilio-go client library. +package client + +import ( + "net/http" + "net/url" + "os" + "strings" +) + +type RequestHandler struct { + Client BaseClient + Edge string + Region string +} + +func NewRequestHandler(client BaseClient) *RequestHandler { + return &RequestHandler{ + Client: client, + Edge: os.Getenv("SENDGRID_EDGE"), + Region: os.Getenv("SENDGRID_REGION"), + } +} + +func (c *RequestHandler) sendRequest(method string, rawURL string, data url.Values, + headers map[string]interface{}, body ...byte) (*http.Response, error) { + parsedURL, err := c.BuildUrl(rawURL) + if err != nil { + return nil, err + } + return c.Client.SendRequest(method, parsedURL, data, headers, body...) +} + +// BuildUrl builds the target host string taking into account region and edge configurations. +func (c *RequestHandler) BuildUrl(rawURL string) (string, error) { + u, err := url.Parse(rawURL) + if err != nil { + return "", err + } + + var ( + edge = "" + region = "" + pieces = strings.Split(u.Host, ".") + product = pieces[0] + result []string + ) + suffix := "" + + if len(pieces) >= 3 { + suffix = strings.Join(pieces[len(pieces)-2:], ".") + } else { + return u.String(), nil + } + + if len(pieces) == 4 { + // product.region.twilio.com + region = pieces[1] + } else if len(pieces) == 5 { + // product.edge.region.twilio.com + edge = pieces[1] + region = pieces[2] + } + + if c.Edge != "" { + edge = c.Edge + } + + if c.Region != "" { + region = c.Region + } else if region == "" && edge != "" { + region = "us1" + } + + for _, item := range []string{product, edge, region, suffix} { + if item != "" { + result = append(result, item) + } + } + + u.Host = strings.Join(result, ".") + return u.String(), nil +} + +func (c *RequestHandler) Post(path string, bodyData url.Values, headers map[string]interface{}, body ...byte) (*http.Response, error) { + return c.sendRequest(http.MethodPost, path, bodyData, headers, body...) +} + +func (c *RequestHandler) Put(path string, bodyData url.Values, headers map[string]interface{}, body ...byte) (*http.Response, error) { + return c.sendRequest(http.MethodPut, path, bodyData, headers, body...) +} + +func (c *RequestHandler) Patch(path string, bodyData url.Values, headers map[string]interface{}, body ...byte) (*http.Response, error) { + return c.sendRequest(http.MethodPatch, path, bodyData, headers, body...) +} + +func (c *RequestHandler) Get(path string, queryData url.Values, headers map[string]interface{}) (*http.Response, error) { + return c.sendRequest(http.MethodGet, path, queryData, headers) +} + +func (c *RequestHandler) Delete(path string, nothing url.Values, headers map[string]interface{}) (*http.Response, error) { + return c.sendRequest(http.MethodDelete, path, nil, headers) +} diff --git a/client/request_handler_test.go b/client/request_handler_test.go new file mode 100644 index 00000000..1756ae52 --- /dev/null +++ b/client/request_handler_test.go @@ -0,0 +1,119 @@ +package client_test + +import ( + "errors" + "net/http" + "net/http/httptest" + "net/url" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/twilio/twilio-go/client" +) + +func NewRequestHandler(accountSid string, authToken string) *client.RequestHandler { + c := NewClient(accountSid, authToken) + return client.NewRequestHandler(c) +} + +func TestRequestHandler_BuildUrlSetRegion(t *testing.T) { + // Region set via url + requestHandler := NewRequestHandler("user", "pass") + assert.Equal(t, "https://api.region.twilio.com", assertAndGetURL(t, requestHandler, "https://api.region.twilio.com")) + + // Region set via requestHandler + requestHandler.Region = "region" + assert.Equal(t, "https://api.region.twilio.com", assertAndGetURL(t, requestHandler, "https://api.twilio.com")) + assert.Equal(t, "https://api.region.twilio.com", assertAndGetURL(t, requestHandler, "https://api.urlRegion.twilio.com")) +} + +func TestRequestHandler_BuildUrlSetEdgeDefaultRegion(t *testing.T) { + // Edge set via client + requestHandler := NewRequestHandler("user", "pass") + requestHandler.Edge = "edge" + assert.Equal(t, "https://api.edge.us1.twilio.com", assertAndGetURL(t, requestHandler, "https://api.twilio.com")) +} + +func TestRequestHandler_BuildUrlSetEdgeRegion(t *testing.T) { + //Edge and Region set via url + requestHandler := NewRequestHandler("user", "pass") + assert.Equal(t, "https://api.edge.region.twilio.com", assertAndGetURL(t, requestHandler, "https://api.edge.region.twilio.com")) + + // Edge and Region set via client + requestHandler.Edge = "edge" + assert.Equal(t, "https://api.edge.region.twilio.com", assertAndGetURL(t, requestHandler, "https://api.region.twilio.com")) + requestHandler.Region = "region" + assert.Equal(t, "https://api.edge.region.twilio.com", assertAndGetURL(t, requestHandler, "https://api.twilio.com")) + assert.Equal(t, "https://api.edge.region.twilio.com", assertAndGetURL(t, requestHandler, "https://api.urlEdge.urlRegion.twilio.com")) +} + +func TestRequestHandler_BuildHostRawHostWithoutPeriods(t *testing.T) { + requestHandler := NewRequestHandler("user", "pass") + assert.Equal(t, "https://prism_twilio:4010", assertAndGetURL(t, requestHandler, "https://prism_twilio:4010")) +} + +func TestRequestHandler_BuildUrlInvalidCTLCharacter(t *testing.T) { + requestHandler := NewRequestHandler("user", "pass") + rawURL := "https://api.twilio.com/ServiceId\n" + parsedURL, err := requestHandler.BuildUrl(rawURL) + + expectedErr := url.Error{Op: "parse", URL: rawURL, Err: errors.New("net/url: invalid control character in URL")} + assert.Equal(t, &expectedErr, err) + assert.Equal(t, parsedURL, "") +} + +func assertAndGetURL(t *testing.T, requestHandler *client.RequestHandler, rawURL string) string { + parsedURL, err := requestHandler.BuildUrl(rawURL) + assert.Nil(t, err) + return parsedURL +} + +func TestRequestHandler_SendGetRequest(t *testing.T) { + errorResponse := `{ + "status": 400, + "code":20001, + "message":"Bad request", + "more_info":"https://www.twilio.com/docs/errors/20001" +}` + errorServer := httptest.NewServer(http.HandlerFunc( + func(resp http.ResponseWriter, req *http.Request) { + resp.WriteHeader(400) + _, _ = resp.Write([]byte(errorResponse)) + })) + defer errorServer.Close() + + requestHandler := NewRequestHandler("user", "pass") + resp, err := requestHandler.Get(errorServer.URL, nil, nil) //nolint:bodyclose + twilioError := err.(*client.TwilioRestError) + assert.Nil(t, resp) + assert.Equal(t, 400, twilioError.Status) + assert.Equal(t, 20001, twilioError.Code) + assert.Equal(t, "https://www.twilio.com/docs/errors/20001", twilioError.MoreInfo) + assert.Equal(t, "Bad request", twilioError.Message) + assert.Nil(t, twilioError.Details) +} + +func TestRequestHandler_SendPostRequest(t *testing.T) { + errorResponse := `{ + "status": 400, + "code":20001, + "message":"Bad request", + "more_info":"https://www.twilio.com/docs/errors/20001" +}` + errorServer := httptest.NewServer(http.HandlerFunc( + func(resp http.ResponseWriter, req *http.Request) { + resp.WriteHeader(400) + _, _ = resp.Write([]byte(errorResponse)) + })) + defer errorServer.Close() + + requestHandler := NewRequestHandler("user", "pass") + resp, err := requestHandler.Post(errorServer.URL, nil, nil) //nolint:bodyclose + twilioError := err.(*client.TwilioRestError) + assert.Nil(t, resp) + assert.Equal(t, 400, twilioError.Status) + assert.Equal(t, 20001, twilioError.Code) + assert.Equal(t, "https://www.twilio.com/docs/errors/20001", twilioError.MoreInfo) + assert.Equal(t, "Bad request", twilioError.Message) + assert.Nil(t, twilioError.Details) +} diff --git a/client/request_validator.go b/client/request_validator.go new file mode 100644 index 00000000..8ea2ecaf --- /dev/null +++ b/client/request_validator.go @@ -0,0 +1,158 @@ +package client + +import ( + "crypto/hmac" + "crypto/sha1" + "crypto/sha256" + "crypto/subtle" + "encoding/base64" + "fmt" + urllib "net/url" + "sort" + "strings" +) + +// RequestValidator is used to verify the Twilio Signature included with Twilio requests to webhooks. +// This ensures the request is actually coming from Twilio and helps with securing your webhooks. +type RequestValidator struct { + signingKey []byte +} + +// NewRequestValidator returns a new RequestValidator which uses the specified auth token when verifying +// Twilio signatures. +func NewRequestValidator(authToken string) RequestValidator { + return RequestValidator{ + signingKey: []byte(authToken), + } +} + +// Validate can be used for Twilio Signatures sent with webhooks configured for GET calls. It returns true +// if the computed signature matches the expectedSignature. Params are a map of string to string containing +// all the query params Twilio added to the configured webhook URL. +func (rv *RequestValidator) Validate(url string, params map[string]string, expectedSignature string) bool { + //sort the keys of query params then concatenated key+value strings + var paramKeys []string + for k := range params { + paramKeys = append(paramKeys, k) + } + sort.Strings(paramKeys) + var paramSlc []string + for _, k := range paramKeys { + paramSlc = append(paramSlc, fmt.Sprintf("%s%s", k, params[k])) + } + + // check signature of testURL with and without port, since sig generation on back-end is inconsistent + signatureWithPort := rv.getValidationSignature(addPort(url), paramSlc) + signatureWithoutPort := rv.getValidationSignature(removePort(url), paramSlc) + return compare(signatureWithPort, expectedSignature) || + compare(signatureWithoutPort, expectedSignature) +} + +// ValidateBody can be used for Twilio Signatures sent with webhooks configured for POST calls. It returns true +// if the computed signature matches the expectedSignature. Body is the HTTP request body from the webhook call +// as a slice of bytes. +func (rv *RequestValidator) ValidateBody(url string, body []byte, expectedSignature string) bool { + parsed, err := urllib.Parse(url) + if err != nil { + return false + } + + bodySHA256 := parsed.Query().Get("bodySHA256") + + // For x-www-form-urlencoded Request body + if len(bodySHA256) == 0 { + parsedBody, err := urllib.ParseQuery(string(body)) + if err != nil { + return false + } + params := make(map[string]string) + for k, v := range parsedBody { + //validate with first value of each key + params[k] = v[0] + } + return rv.Validate(url, params, expectedSignature) + } + + return rv.Validate(url, map[string]string{}, expectedSignature) && + rv.validateBody(body, bodySHA256) +} + +func compare(x, y string) bool { + return subtle.ConstantTimeCompare([]byte(x), []byte(y)) == 1 +} + +func (rv *RequestValidator) validateBody(body []byte, expectedSHA string) bool { + hasher := sha256.New() + _, err := hasher.Write(body) + if err != nil { + return false + } + sum := hasher.Sum(nil) + return compare(fmt.Sprintf("%x", sum), expectedSHA) +} + +func (rv *RequestValidator) getValidationSignature(url string, sortedConcatenatedParams []string) string { + for _, param := range sortedConcatenatedParams { + url += param + } + + h := hmac.New(sha1.New, rv.signingKey) + _, err := h.Write([]byte(url)) + if err != nil { + return "" + } + sum := h.Sum(nil) + return base64.StdEncoding.EncodeToString(sum) +} + +func addPort(url string) string { + parsed, err := urllib.Parse(url) + if err != nil { + return url + } + + port := parsed.Port() + if len(port) != 0 { + return url // url already has port + } + + if parsed.Scheme == "https" { + return updatePort(url, 443) + } + return updatePort(url, 80) +} + +func updatePort(url string, newPort int) string { + parsed, err := urllib.Parse(url) + if err != nil { + return url + } + + var newHost string + if len(parsed.Port()) == 0 { + // url didn't already have port, add it + newHost = fmt.Sprintf("%s:%d", parsed.Host, newPort) + } else { + // url already had port, grab just the host and add new port + oldHost := strings.Split(parsed.Host, ":")[0] + newHost = fmt.Sprintf("%s:%d", oldHost, newPort) + } + + parsed.Host = newHost + return parsed.String() +} + +func removePort(url string) string { + parsed, err := urllib.Parse(url) + if err != nil { + return url + } + + if len(parsed.Port()) == 0 { + return url + } + + newHost := strings.Split(parsed.Host, ":")[0] + parsed.Host = newHost + return parsed.String() +} diff --git a/client/request_validator_test.go b/client/request_validator_test.go new file mode 100644 index 00000000..6c695581 --- /dev/null +++ b/client/request_validator_test.go @@ -0,0 +1,95 @@ +package client + +import ( + "strings" + "testing" + + "github.com/stretchr/testify/assert" +) + +const ( + testURL = "https://mycompany.com/myapp.php?foo=1&bar=2" + signature = "vOEb5UThFn24KEfnOFLQY2AE5FY=" // of the testURL above with the params below + bodyHash = "0a1ff7634d9ab3b95db5c9a2dfe9416e41502b283a80c7cf19632632f96e6620" +) + +var ( + validator = NewRequestValidator("12345") + params = map[string]string{ + "Digits": "1234", + "CallSid": "CA1234567890ABCDE", + "To": "+18005551212", + "Caller": "+14158675309", + "From": "+14158675309", + "ReasonConferenceEnded": "test", + "Reason": "Participant", + } + jsonBody = []byte(`{"property": "value", "boolean": true}`) + formBody = []byte(`property=value&boolean=true`) +) + +func TestRequestValidator_Validate(t *testing.T) { + t.Parallel() + + t.Run("returns true when validation succeeds", func(t *testing.T) { + assert.True(t, validator.Validate(testURL, params, signature)) + }) + + t.Run("returns false when validation fails", func(t *testing.T) { + assert.False(t, validator.Validate(testURL, params, "WRONG SIGNATURE")) + }) + + t.Run("returns true when https and port is specified but signature is generated without it", func(t *testing.T) { + theURL := strings.Replace(testURL, ".com", ".com:1234", 1) + assert.True(t, validator.Validate(theURL, params, signature)) + }) + + t.Run("returns true when https and port is specified and signature is generated with it", func(t *testing.T) { + expectedSignature := "vOEb5UThFn24KEfnOFLQY2AE5FY=" // hash of https uri without port + assert.True(t, validator.Validate(testURL, params, expectedSignature)) + }) + + t.Run("returns true when http and port port is specified but signature is generated without it", func(t *testing.T) { + theURL := strings.Replace(testURL, ".com", ".com", 1) + theURL = strings.Replace(theURL, "https", "http", 1) + expectedSignature := "n2xBNyzSW7rfYStDtOFiFMv7qNo=" // hash of http uri without port + assert.True(t, validator.Validate(theURL, params, expectedSignature)) + }) + + t.Run("returns true when http and port is specified and signature is generated with it", func(t *testing.T) { + theURL := strings.Replace(testURL, ".com", ".com:1234", 1) + theURL = strings.Replace(theURL, "https", "http", 1) + expectedSignature := "n2xBNyzSW7rfYStDtOFiFMv7qNo=" // hash of http uri with port 1234 + assert.True(t, validator.Validate(theURL, params, expectedSignature)) + }) + + t.Run("return false when params are sorted incorrectly", func(t *testing.T) { + incorrectSignature := "95+Bu0JVPi0r/SsESZCVf0dWAjw=" //Params ReasonConferenceEnded is sorted before Reason + assert.False(t, validator.Validate(testURL, params, incorrectSignature)) + }) +} + +func TestRequestValidator_ValidateBody(t *testing.T) { + t.Parallel() + + t.Run("returns true when validation succeeds with json body", func(t *testing.T) { + theURL := testURL + "&bodySHA256=" + bodyHash + signatureWithBodyHash := "a9nBmqA0ju/hNViExpshrM61xv4=" + assert.True(t, validator.ValidateBody(theURL, jsonBody, signatureWithBodyHash)) + }) + + t.Run("returns true when validation succeeds with form body", func(t *testing.T) { + expectedSignature := "NBdBDr/T/lgjI+tlgpXjKZQZs/k=" + assert.True(t, validator.ValidateBody(testURL, formBody, expectedSignature)) + }) + + t.Run("returns false when validation fails with json body", func(t *testing.T) { + assert.False(t, validator.ValidateBody(testURL, jsonBody, signature)) + }) + + t.Run("returns true when there's no other parameters and the signature is right", func(t *testing.T) { + theURL := "https://mycompany.com/myapp.php?bodySHA256=" + bodyHash + signatureForURL := "y77kIzt2vzLz71DgmJGsen2scGs=" + assert.True(t, validator.ValidateBody(theURL, jsonBody, signatureForURL)) + }) +} diff --git a/client/unmarshal.go b/client/unmarshal.go new file mode 100644 index 00000000..9315b285 --- /dev/null +++ b/client/unmarshal.go @@ -0,0 +1,32 @@ +package client + +import ( + "fmt" + "strconv" +) + +func UnmarshalFloat32(input *interface{}) (*float32, error) { + if input == nil { + return nil, nil + } + + switch value := (*input).(type) { + case float32: + return &value, nil + case float64: + value32 := float32(value) + return &value32, nil + case int: + value32 := float32(value) + return &value32, nil + case string: + parsed, err := strconv.ParseFloat(value, 32) + if err != nil { + return nil, err + } + value32 := float32(parsed) + return &value32, nil + default: + return nil, fmt.Errorf("unhandled input type for float32: %T %#v", value, value) + } +} diff --git a/client/unmarshal_test.go b/client/unmarshal_test.go new file mode 100644 index 00000000..23d63212 --- /dev/null +++ b/client/unmarshal_test.go @@ -0,0 +1,44 @@ +package client_test + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "github.com/twilio/twilio-go/client" +) + +func TestUnmarshalFloat32(t *testing.T) { + unmarshalFloat32 := func(t *testing.T, input interface{}) float32 { + value, err := client.UnmarshalFloat32(&input) + assert.Nil(t, err) + return *value + } + + assert.Equal(t, float32(0), unmarshalFloat32(t, "0")) + assert.Equal(t, float32(1), unmarshalFloat32(t, "1")) + assert.Equal(t, float32(123), unmarshalFloat32(t, 123)) + assert.Equal(t, float32(123.456), unmarshalFloat32(t, "123.456")) + assert.Equal(t, float32(123.456), unmarshalFloat32(t, 123.456)) + assert.Equal(t, float32(123.456), unmarshalFloat32(t, float32(123.456))) + assert.Equal(t, float32(7), unmarshalFloat32(t, float64(7))) +} + +func TestUnmarshalFloat32_Nil(t *testing.T) { + value, err := client.UnmarshalFloat32(nil) + assert.Nil(t, value) + assert.Nil(t, err) +} + +func TestUnmarshalFloat32_ErrorInvalid(t *testing.T) { + var input interface{} = map[string]interface{}{} + value, err := client.UnmarshalFloat32(&input) + assert.Nil(t, value) + assert.NotNil(t, err) +} + +func TestUnmarshalFloat32_ErrorParse(t *testing.T) { + var input interface{} = "ugh" + value, err := client.UnmarshalFloat32(&input) + assert.Nil(t, value) + assert.NotNil(t, err) +} diff --git a/client/version.go b/client/version.go new file mode 100644 index 00000000..a563c3bb --- /dev/null +++ b/client/version.go @@ -0,0 +1,5 @@ +// Package config for config files. +package client + +// LibraryVersion specifies the current version of twilio-go. +const LibraryVersion = "1.22.3" diff --git a/go.mod b/go.mod new file mode 100644 index 00000000..bf77c18f --- /dev/null +++ b/go.mod @@ -0,0 +1,18 @@ +module github.com/sendgrid/sendgrid-go + +go 1.21.4 + +require ( + github.com/sendgrid/rest v2.6.9+incompatible + github.com/stretchr/testify v1.9.0 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + golang.org/x/mod v0.20.0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/tools v0.24.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 00000000..5690857f --- /dev/null +++ b/go.sum @@ -0,0 +1,22 @@ +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/sendgrid/rest v2.6.9+incompatible h1:1EyIcsNdn9KIisLW50MKwmSRSK+ekueiEMJ7NEoxJo0= +github.com/sendgrid/rest v2.6.9+incompatible/go.mod h1:kXX7q3jZtJXK5c5qK83bSGMdV6tsOE70KbHoqJls4lE= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= +golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys= +golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= +golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/sendgrid.go b/sendgrid.go index 1c50451c..0cc65514 100644 --- a/sendgrid.go +++ b/sendgrid.go @@ -3,9 +3,31 @@ package sendgrid import ( "errors" "github.com/sendgrid/rest" + "github.com/sendgrid/sendgrid-go/client" + Alert "github.com/sendgrid/sendgrid-go/rest/api/v3/alerts" + Student "github.com/sendgrid/sendgrid-go/rest/api/v3/student" "net/url" + "os" ) +type RestClient struct { + *client.RequestHandler + Student *Student.ApiService + Alert *Alert.ApiService +} + +// Meta holds relevant pagination resources. +type Meta struct { + FirstPageURL *string `json:"first_page_url"` + Key *string `json:"key"` + LastPageURL *string `json:"last_page_url,omitempty"` + NextPageURL *string `json:"next_page_url"` + Page *int `json:"page"` + PageSize *int `json:"page_size"` + PreviousPageURL *string `json:"previous_page_url"` + URL *string `json:"url"` +} + // sendGridOptions for CreateRequest type sendGridOptions struct { Key string @@ -49,6 +71,42 @@ func createSendGridRequest(sgOptions sendGridOptions) rest.Request { return requestNew(options) } +type ClientParams struct { + ApiKey string + Client client.BaseClient +} + +// NewRestClientWithParams provides an initialized Twilio RestClient with params. +func NewRestClientWithParams(params ClientParams) *RestClient { + requestHandler := client.NewRequestHandler(params.Client) + + if params.Client == nil { + apiKey := params.ApiKey + if apiKey == "" { + apiKey = os.Getenv("SENDGRID_API_KEY") + } + + defaultClient := &client.Client{ + Credentials: client.NewCredentials(apiKey), + } + + requestHandler = client.NewRequestHandler(defaultClient) + } + + c := &RestClient{ + RequestHandler: requestHandler, + } + + c.Student = Student.NewApiService(c.RequestHandler) + c.Alert = Alert.NewApiService(c.RequestHandler) + return c +} + +// NewRestClient provides an initialized Twilio RestClient. +func NewRestClient() *RestClient { + return NewRestClientWithParams(ClientParams{}) +} + // NewSendClient constructs a new Twilio SendGrid client given an API key func NewSendClient(key string) *Client { request := GetRequest(key, "/v3/mail/send", "") From a2e91a7e019e1b1816f93f115ea08018c1159e2a Mon Sep 17 00:00:00 2001 From: Shubham Tiwari Date: Thu, 26 Sep 2024 11:15:12 +0530 Subject: [PATCH 06/16] chore: set edge, region --- sendgrid.go | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/sendgrid.go b/sendgrid.go index 0cc65514..4cef9234 100644 --- a/sendgrid.go +++ b/sendgrid.go @@ -42,6 +42,12 @@ var allowedRegionsHostMap = map[string]string{ "global": "https://api.sendgrid.com", } +// map for allowed regions, global and eu currently +var allowedRegions = map[string]bool{ + "eu": true, + "global": true, +} + // GetRequest // @return [Request] a default request object func GetRequest(key, endpoint, host string) rest.Request { @@ -124,6 +130,28 @@ func extractEndpoint(link string) (string, error) { return parsedURL.Path, nil } +// SetTimeout sets the Timeout for Twilio HTTP requests. +func (c *RestClient) SetTimeout(timeout time.Duration) { + c.RequestHandler.Client.SetTimeout(timeout) +} + +// SetEdge sets the Edge for the Twilio request. +// Not supported in sendgrid currently +func (c *RestClient) SetEdge(edge string) { + c.RequestHandler.Edge = edge +} + +// SetRegion sets the Region for the Twilio request. Defaults to "us1" if an edge is provided. +func (c *RestClient) SetRegion(region string) { + // check if region in "eu" or "global" + + //isAllowed, presentInMap := allowedRegions[region] + //if !presentInMap || !isAllowed { + // return errors.New("error: region can only be \"eu\" or \"global\"") + //} + c.RequestHandler.Region = region +} + // SetDataResidency modifies the host as per the region /* * This allows support for global and eu regions only. This set will likely expand in the future. From d99cf2ebab49e741db8b573e38da9e8dfc0d0f53 Mon Sep 17 00:00:00 2001 From: Shubham Tiwari Date: Thu, 26 Sep 2024 13:47:02 +0530 Subject: [PATCH 07/16] chore: add local changes --- sendgrid.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sendgrid.go b/sendgrid.go index 4cef9234..c065a5bb 100644 --- a/sendgrid.go +++ b/sendgrid.go @@ -2,12 +2,14 @@ package sendgrid import ( "errors" - "github.com/sendgrid/rest" - "github.com/sendgrid/sendgrid-go/client" - Alert "github.com/sendgrid/sendgrid-go/rest/api/v3/alerts" - Student "github.com/sendgrid/sendgrid-go/rest/api/v3/student" "net/url" "os" + "time" + + "github.com/sendgrid/rest" + "github.com/sendgrid/sendgrid-go/client" + Alert "github.com/sendgrid/sendgrid-go/rest/alerts" + Student "github.com/sendgrid/sendgrid-go/rest/student" ) type RestClient struct { From e3131be9f93232a321ecc1b55fe8891398d74941 Mon Sep 17 00:00:00 2001 From: Shubham Tiwari Date: Fri, 27 Sep 2024 14:34:17 +0530 Subject: [PATCH 08/16] chore: add body to get and delete --- client/request_handler.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/request_handler.go b/client/request_handler.go index 0789176e..37ae12b4 100644 --- a/client/request_handler.go +++ b/client/request_handler.go @@ -94,10 +94,10 @@ func (c *RequestHandler) Patch(path string, bodyData url.Values, headers map[str return c.sendRequest(http.MethodPatch, path, bodyData, headers, body...) } -func (c *RequestHandler) Get(path string, queryData url.Values, headers map[string]interface{}) (*http.Response, error) { - return c.sendRequest(http.MethodGet, path, queryData, headers) +func (c *RequestHandler) Get(path string, queryData url.Values, headers map[string]interface{}, body ...byte) (*http.Response, error) { + return c.sendRequest(http.MethodGet, path, queryData, headers, body...) } -func (c *RequestHandler) Delete(path string, nothing url.Values, headers map[string]interface{}) (*http.Response, error) { - return c.sendRequest(http.MethodDelete, path, nil, headers) +func (c *RequestHandler) Delete(path string, nothing url.Values, headers map[string]interface{}, body ...byte) (*http.Response, error) { + return c.sendRequest(http.MethodDelete, path, nil, headers, body...) } From ff8fd097d800b6fded3c5b44492363a052488781 Mon Sep 17 00:00:00 2001 From: Shubham Tiwari Date: Fri, 27 Sep 2024 14:34:35 +0530 Subject: [PATCH 09/16] chore: remove twilio refs --- client/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/client.go b/client/client.go index 57a70cca..4cb0d447 100644 --- a/client/client.go +++ b/client/client.go @@ -1,4 +1,4 @@ -// Package client provides internal utilities for the twilio-go client library. +// Package client provides internal utilities for the sendgrid-go client library. package client import ( @@ -164,7 +164,7 @@ func (c *Client) SendRequest(method string, rawURL string, data url.Values, setBearerToken(req, c.bearerAuth()) - // E.g. "User-Agent": "twilio-go/1.0.0 (darwin amd64) go/go1.17.8" + // E.g. "User-Agent": "sendgrid-go/1.0.0 (darwin amd64) go/go1.17.8" userAgent := fmt.Sprintf("sendgrid-go/%s (%s %s) go/%s", LibraryVersion, runtime.GOOS, runtime.GOARCH, goVersion) if len(c.UserAgentExtensions) > 0 { From 4d6646f6979f83ca78db328c045ce677e2b46266 Mon Sep 17 00:00:00 2001 From: Shubham Tiwari Date: Fri, 4 Oct 2024 13:46:18 +0530 Subject: [PATCH 10/16] chore: pass error to the api for handling --- client/client.go | 21 +------ sendgrid.go | 157 ++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 135 insertions(+), 43 deletions(-) diff --git a/client/client.go b/client/client.go index 4cb0d447..7b20616a 100644 --- a/client/client.go +++ b/client/client.go @@ -3,17 +3,14 @@ package client import ( "bytes" - "encoding/json" "fmt" "net/http" "net/url" "regexp" "runtime" - "strconv" "strings" "time" - "github.com/pkg/errors" "github.com/sendgrid/sendgrid-go/client/form" ) @@ -91,23 +88,7 @@ func (c *Client) doWithErr(req *http.Request) (*http.Response, error) { } res, err := client.Do(req) - if err != nil { - return nil, err - } - - // Note that 3XX response codes are allowed for fetches - if res.StatusCode < 200 || res.StatusCode >= 400 { - err = &SendgridRestError{} - decodeErrs := json.NewDecoder(res.Body) - decodeErr := decodeErrs.Decode(err) - if decodeErr != nil { - err = errors.Wrap(decodeErr, "error decoding the response for an HTTP error code: "+strconv.Itoa(res.StatusCode)) - return nil, err - } - - return nil, err - } - return res, nil + return res, err } func setBearerToken(req *http.Request, token string) { diff --git a/sendgrid.go b/sendgrid.go index c065a5bb..4a1b2881 100644 --- a/sendgrid.go +++ b/sendgrid.go @@ -1,3 +1,13 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ +// Package sendgrid provides bindings for Sendgrid's REST APIs. package sendgrid import ( @@ -8,14 +18,85 @@ import ( "github.com/sendgrid/rest" "github.com/sendgrid/sendgrid-go/client" - Alert "github.com/sendgrid/sendgrid-go/rest/alerts" - Student "github.com/sendgrid/sendgrid-go/rest/student" + AccountProvisioningV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/account_provisioning" + AlertsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/alerts" + ApiKeysV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/api_keys" + DomainAuthenticationV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/domain_authentication" + EmailActivityV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/email_activity" + EmailValidationV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/email_validation" + EnforcedTlsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/enforced_tls" + IntegrationsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/integrations" + IpAccessManagementV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/ip_access_management" + IpAddressManagementV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/ip_address_management" + IpWarmupV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/ip_warmup" + IpsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/ips" + LinkBrandingV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/link_branding" + LmcCampaignsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/lmc_campaigns" + LmcContactdbV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/lmc_contactdb" + LmcSendersV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/lmc_senders" + MailV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mail" + MailSettingsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mail_settings" + McDesignsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_designs" + McListsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_lists" + McSegmentsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_segments" + McSegments2V3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_segments_2" + McSendersV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_senders" + McSinglesendsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_singlesends" + McTestV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_test" + PartnerV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/partner" + RecipientsDataErasureV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/recipients_data_erasure" + ReverseDnsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/reverse_dns" + ScheduledSendsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/scheduled_sends" + SeqV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/seq" + SsoV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/sso" + StatsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/stats" + SubusersV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/subusers" + TeammatesV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/teammates" + TemplatesV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/templates" + TrackingSettingsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/tracking_settings" + WebhooksV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/webhooks" ) +// RestClient provides access to Sendgrid services. type RestClient struct { *client.RequestHandler - Student *Student.ApiService - Alert *Alert.ApiService + AccountProvisioningV3 *AccountProvisioningV3.ApiService + AlertsV3 *AlertsV3.ApiService + ApiKeysV3 *ApiKeysV3.ApiService + DomainAuthenticationV3 *DomainAuthenticationV3.ApiService + EmailActivityV3 *EmailActivityV3.ApiService + EmailValidationV3 *EmailValidationV3.ApiService + EnforcedTlsV3 *EnforcedTlsV3.ApiService + IntegrationsV3 *IntegrationsV3.ApiService + IpAccessManagementV3 *IpAccessManagementV3.ApiService + IpAddressManagementV3 *IpAddressManagementV3.ApiService + IpWarmupV3 *IpWarmupV3.ApiService + IpsV3 *IpsV3.ApiService + LinkBrandingV3 *LinkBrandingV3.ApiService + LmcCampaignsV3 *LmcCampaignsV3.ApiService + LmcContactdbV3 *LmcContactdbV3.ApiService + LmcSendersV3 *LmcSendersV3.ApiService + MailV3 *MailV3.ApiService + MailSettingsV3 *MailSettingsV3.ApiService + McDesignsV3 *McDesignsV3.ApiService + McListsV3 *McListsV3.ApiService + McSegmentsV3 *McSegmentsV3.ApiService + McSegments2V3 *McSegments2V3.ApiService + McSendersV3 *McSendersV3.ApiService + McSinglesendsV3 *McSinglesendsV3.ApiService + McTestV3 *McTestV3.ApiService + PartnerV3 *PartnerV3.ApiService + RecipientsDataErasureV3 *RecipientsDataErasureV3.ApiService + ReverseDnsV3 *ReverseDnsV3.ApiService + ScheduledSendsV3 *ScheduledSendsV3.ApiService + SeqV3 *SeqV3.ApiService + SsoV3 *SsoV3.ApiService + StatsV3 *StatsV3.ApiService + SubusersV3 *SubusersV3.ApiService + TeammatesV3 *TeammatesV3.ApiService + TemplatesV3 *TemplatesV3.ApiService + TrackingSettingsV3 *TrackingSettingsV3.ApiService + WebhooksV3 *WebhooksV3.ApiService } // Meta holds relevant pagination resources. @@ -84,7 +165,7 @@ type ClientParams struct { Client client.BaseClient } -// NewRestClientWithParams provides an initialized Twilio RestClient with params. +// NewRestClientWithParams provides an initialized Sendgrid RestClient with params. func NewRestClientWithParams(params ClientParams) *RestClient { requestHandler := client.NewRequestHandler(params.Client) @@ -105,12 +186,48 @@ func NewRestClientWithParams(params ClientParams) *RestClient { RequestHandler: requestHandler, } - c.Student = Student.NewApiService(c.RequestHandler) - c.Alert = Alert.NewApiService(c.RequestHandler) + c.AccountProvisioningV3 = AccountProvisioningV3.NewApiService(c.RequestHandler) + c.AlertsV3 = AlertsV3.NewApiService(c.RequestHandler) + c.ApiKeysV3 = ApiKeysV3.NewApiService(c.RequestHandler) + c.DomainAuthenticationV3 = DomainAuthenticationV3.NewApiService(c.RequestHandler) + c.EmailActivityV3 = EmailActivityV3.NewApiService(c.RequestHandler) + c.EmailValidationV3 = EmailValidationV3.NewApiService(c.RequestHandler) + c.EnforcedTlsV3 = EnforcedTlsV3.NewApiService(c.RequestHandler) + c.IntegrationsV3 = IntegrationsV3.NewApiService(c.RequestHandler) + c.IpAccessManagementV3 = IpAccessManagementV3.NewApiService(c.RequestHandler) + c.IpAddressManagementV3 = IpAddressManagementV3.NewApiService(c.RequestHandler) + c.IpWarmupV3 = IpWarmupV3.NewApiService(c.RequestHandler) + c.IpsV3 = IpsV3.NewApiService(c.RequestHandler) + c.LinkBrandingV3 = LinkBrandingV3.NewApiService(c.RequestHandler) + c.LmcCampaignsV3 = LmcCampaignsV3.NewApiService(c.RequestHandler) + c.LmcContactdbV3 = LmcContactdbV3.NewApiService(c.RequestHandler) + c.LmcSendersV3 = LmcSendersV3.NewApiService(c.RequestHandler) + c.MailV3 = MailV3.NewApiService(c.RequestHandler) + c.MailSettingsV3 = MailSettingsV3.NewApiService(c.RequestHandler) + c.McDesignsV3 = McDesignsV3.NewApiService(c.RequestHandler) + c.McListsV3 = McListsV3.NewApiService(c.RequestHandler) + c.McSegmentsV3 = McSegmentsV3.NewApiService(c.RequestHandler) + c.McSegments2V3 = McSegments2V3.NewApiService(c.RequestHandler) + c.McSendersV3 = McSendersV3.NewApiService(c.RequestHandler) + c.McSinglesendsV3 = McSinglesendsV3.NewApiService(c.RequestHandler) + c.McTestV3 = McTestV3.NewApiService(c.RequestHandler) + c.PartnerV3 = PartnerV3.NewApiService(c.RequestHandler) + c.RecipientsDataErasureV3 = RecipientsDataErasureV3.NewApiService(c.RequestHandler) + c.ReverseDnsV3 = ReverseDnsV3.NewApiService(c.RequestHandler) + c.ScheduledSendsV3 = ScheduledSendsV3.NewApiService(c.RequestHandler) + c.SeqV3 = SeqV3.NewApiService(c.RequestHandler) + c.SsoV3 = SsoV3.NewApiService(c.RequestHandler) + c.StatsV3 = StatsV3.NewApiService(c.RequestHandler) + c.SubusersV3 = SubusersV3.NewApiService(c.RequestHandler) + c.TeammatesV3 = TeammatesV3.NewApiService(c.RequestHandler) + c.TemplatesV3 = TemplatesV3.NewApiService(c.RequestHandler) + c.TrackingSettingsV3 = TrackingSettingsV3.NewApiService(c.RequestHandler) + c.WebhooksV3 = WebhooksV3.NewApiService(c.RequestHandler) + return c } -// NewRestClient provides an initialized Twilio RestClient. +// NewRestClient provides an initialized Sendgrid RestClient. func NewRestClient() *RestClient { return NewRestClientWithParams(ClientParams{}) } @@ -132,36 +249,30 @@ func extractEndpoint(link string) (string, error) { return parsedURL.Path, nil } -// SetTimeout sets the Timeout for Twilio HTTP requests. +// SetTimeout sets the Timeout for Sendgrid HTTP requests. func (c *RestClient) SetTimeout(timeout time.Duration) { c.RequestHandler.Client.SetTimeout(timeout) } -// SetEdge sets the Edge for the Twilio request. +// SetEdge sets the Edge for the Sendgrid request. // Not supported in sendgrid currently func (c *RestClient) SetEdge(edge string) { c.RequestHandler.Edge = edge } -// SetRegion sets the Region for the Twilio request. Defaults to "us1" if an edge is provided. +// SetRegion sets the Region for the Sendgrid request. Defaults to "us1" if an edge is provided. func (c *RestClient) SetRegion(region string) { - // check if region in "eu" or "global" - - //isAllowed, presentInMap := allowedRegions[region] - //if !presentInMap || !isAllowed { - // return errors.New("error: region can only be \"eu\" or \"global\"") - //} c.RequestHandler.Region = region } // SetDataResidency modifies the host as per the region /* - * This allows support for global and eu regions only. This set will likely expand in the future. - * Global should be the default - * Global region means the message should be sent through: - * HTTP: api.sendgrid.com - * EU region means the message should be sent through: - * HTTP: api.eu.sendgrid.com +* This allows support for global and eu regions only. This set will likely expand in the future. +* Global should be the default +* Global region means the message should be sent through: +* HTTP: api.sendgrid.com +* EU region means the message should be sent through: +* HTTP: api.eu.sendgrid.com */ // @return [Request] the modified request object func SetDataResidency(request rest.Request, region string) (rest.Request, error) { From 2bbf1ccb91d352f5a38dbc4f0c997627245384e4 Mon Sep 17 00:00:00 2001 From: Shubham Tiwari Date: Fri, 4 Oct 2024 13:46:57 +0530 Subject: [PATCH 11/16] chore: add rest folder --- .../account_provisioning/.openapi-generator | 58 ++++++ .../.openapi-generator-ignore | 23 +++ rest/api/v3/account_provisioning/README.md | 87 +++++++++ .../api_authenticate_account.go | 51 +++++ .../api_create_account.go | 73 +++++++ .../api_delete_account.go | 51 +++++ .../api_get_account_state.go | 60 ++++++ .../account_provisioning/api_list_account.go | 69 +++++++ .../api_list_account_offering.go | 60 ++++++ .../account_provisioning/api_list_offering.go | 48 +++++ .../v3/account_provisioning/api_service.go | 34 ++++ .../api_update_account_offering.go | 75 +++++++ .../api_update_account_state.go | 67 +++++++ .../account_provisioning/docs/AccountList.md | 12 ++ .../docs/AccountProvisioningAccount.md | 12 ++ .../docs/AccountProvisioningAccountId.md | 11 ++ .../docs/AccountProvisioningCatalog.md | 11 ++ .../docs/AccountProvisioningOfferingList.md | 11 ++ .../docs/AccountProvisioningOfferingV1.md | 13 ++ .../docs/AccountProvisioningPagination.md | 12 ++ .../docs/AccountProvisioningProfile.md | 17 ++ .../docs/AccountProvisioningStateRead.md | 11 ++ .../docs/AccountProvisioningStateWrite.md | 11 ++ .../docs/AuthenticateAccount.md | 51 +++++ .../account_provisioning/docs/CatalogEntry.md | 12 ++ .../docs/CatalogEntryEntitlements.md | 14 ++ .../docs/CreateAccount.md | 48 +++++ .../docs/CreateAccountParams.md | 12 ++ .../docs/DeleteAccount.md | 51 +++++ .../docs/ErrorResponse.md | 13 ++ .../docs/GetAccountState.md | 51 +++++ .../account_provisioning/docs/ListAccount.md | 49 +++++ .../docs/ListAccountOffering.md | 51 +++++ .../account_provisioning/docs/ListOffering.md | 44 +++++ .../docs/OfferingsToAdd.md | 11 ++ .../api/v3/account_provisioning/docs/State.md | 16 ++ .../v3/account_provisioning/docs/State1.md | 13 ++ rest/api/v3/account_provisioning/docs/Type.md | 13 ++ .../docs/UpdateAccountOffering.md | 51 +++++ .../docs/UpdateAccountState.md | 51 +++++ .../model_account_list.go | 21 ++ .../model_account_provisioning_account.go | 26 +++ .../model_account_provisioning_account_id.go | 20 ++ .../model_account_provisioning_catalog.go | 19 ++ ...odel_account_provisioning_offering_list.go | 19 ++ .../model_account_provisioning_offering_v1.go | 24 +++ .../model_account_provisioning_pagination.go | 21 ++ .../model_account_provisioning_profile.go | 32 +++ .../model_account_provisioning_state_read.go | 20 ++ .../model_account_provisioning_state_write.go | 20 ++ .../model_catalog_entry.go | 20 ++ .../model_catalog_entry_entitlements.go | 26 +++ .../model_create_account_params.go | 21 ++ .../model_error_response.go | 24 +++ .../model_offerings_to_add.go | 20 ++ .../v3/account_provisioning/model_state.go | 26 +++ .../v3/account_provisioning/model_state1.go | 23 +++ .../api/v3/account_provisioning/model_type.go | 23 +++ rest/api/v3/alerts/.openapi-generator | 38 ++++ rest/api/v3/alerts/.openapi-generator-ignore | 23 +++ rest/api/v3/alerts/README.md | 77 ++++++++ rest/api/v3/alerts/api_create_alert.go | 81 ++++++++ rest/api/v3/alerts/api_delete_alert.go | 61 ++++++ rest/api/v3/alerts/api_get_alert.go | 70 +++++++ rest/api/v3/alerts/api_list_alert.go | 58 ++++++ rest/api/v3/alerts/api_service.go | 34 ++++ rest/api/v3/alerts/api_update_alert.go | 85 ++++++++ rest/api/v3/alerts/docs/CreateAlert.md | 49 +++++ .../v3/alerts/docs/CreateAlert201Response.md | 17 ++ rest/api/v3/alerts/docs/CreateAlertRequest.md | 14 ++ rest/api/v3/alerts/docs/DeleteAlert.md | 52 +++++ rest/api/v3/alerts/docs/ErrorResponse.md | 12 ++ .../alerts/docs/ErrorResponseErrorsInner.md | 13 ++ rest/api/v3/alerts/docs/GetAlert.md | 52 +++++ .../api/v3/alerts/docs/GetAlert200Response.md | 17 ++ rest/api/v3/alerts/docs/ListAlert.md | 48 +++++ .../alerts/docs/ListAlert200ResponseInner.md | 17 ++ rest/api/v3/alerts/docs/Type.md | 13 ++ rest/api/v3/alerts/docs/Type1.md | 13 ++ rest/api/v3/alerts/docs/Type2.md | 13 ++ rest/api/v3/alerts/docs/Type3.md | 13 ++ rest/api/v3/alerts/docs/UpdateAlert.md | 53 +++++ .../v3/alerts/docs/UpdateAlert200Response.md | 17 ++ rest/api/v3/alerts/docs/UpdateAlertRequest.md | 13 ++ .../alerts/model_create_alert_201_response.go | 32 +++ .../v3/alerts/model_create_alert_request.go | 26 +++ rest/api/v3/alerts/model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ .../v3/alerts/model_get_alert_200_response.go | 32 +++ .../model_list_alert_200_response_inner.go | 32 +++ rest/api/v3/alerts/model_type.go | 23 +++ rest/api/v3/alerts/model_type1.go | 23 +++ rest/api/v3/alerts/model_type2.go | 23 +++ rest/api/v3/alerts/model_type3.go | 23 +++ .../alerts/model_update_alert_200_response.go | 32 +++ .../v3/alerts/model_update_alert_request.go | 24 +++ rest/api/v3/api_keys/.openapi-generator | 36 ++++ .../api/v3/api_keys/.openapi-generator-ignore | 23 +++ rest/api/v3/api_keys/README.md | 76 ++++++++ rest/api/v3/api_keys/api_create_api_key.go | 105 ++++++++++ rest/api/v3/api_keys/api_delete_api_key.go | 93 +++++++++ rest/api/v3/api_keys/api_get_api_key.go | 101 ++++++++++ rest/api/v3/api_keys/api_list_api_key.go | 93 +++++++++ rest/api/v3/api_keys/api_service.go | 34 ++++ rest/api/v3/api_keys/api_update_api_key.go | 116 +++++++++++ .../v3/api_keys/api_update_api_key_name.go | 116 +++++++++++ rest/api/v3/api_keys/docs/ApiKeyResponse.md | 12 ++ .../v3/api_keys/docs/ApiKeyScopesResponse.md | 13 ++ rest/api/v3/api_keys/docs/CreateApiKey.md | 49 +++++ .../api_keys/docs/CreateApiKey201Response.md | 14 ++ .../v3/api_keys/docs/CreateApiKeyRequest.md | 12 ++ rest/api/v3/api_keys/docs/DeleteApiKey.md | 52 +++++ rest/api/v3/api_keys/docs/ErrorResponse.md | 12 ++ .../api_keys/docs/ErrorResponseErrorsInner.md | 13 ++ rest/api/v3/api_keys/docs/GetApiKey.md | 52 +++++ .../v3/api_keys/docs/GetApiKey200Response.md | 11 ++ rest/api/v3/api_keys/docs/ListApiKey.md | 49 +++++ .../v3/api_keys/docs/ListApiKey200Response.md | 11 ++ rest/api/v3/api_keys/docs/UpdateApiKey.md | 53 +++++ rest/api/v3/api_keys/docs/UpdateApiKeyName.md | 53 +++++ .../api_keys/docs/UpdateApiKeyNameRequest.md | 11 ++ .../v3/api_keys/docs/UpdateApiKeyRequest.md | 12 ++ .../api/v3/api_keys/model_api_key_response.go | 22 +++ .../api_keys/model_api_key_scopes_response.go | 24 +++ .../model_create_api_key_201_response.go | 22 +++ .../api_keys/model_create_api_key_request.go | 22 +++ rest/api/v3/api_keys/model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ .../model_get_api_key_200_response.go | 19 ++ .../model_list_api_key_200_response.go | 19 ++ .../model_update_api_key_name_request.go | 20 ++ .../api_keys/model_update_api_key_request.go | 20 ++ .../domain_authentication/.openapi-generator | 86 ++++++++ .../.openapi-generator-ignore | 23 +++ rest/api/v3/domain_authentication/README.md | 103 ++++++++++ .../api_add_ip_to_authenticated_domain.go | 85 ++++++++ .../api_associate_subuser_with_domain.go | 76 ++++++++ ..._associate_subuser_with_domain_multiple.go | 76 ++++++++ .../api_authenticate_domain.go | 73 +++++++ .../api_delete_authenticated_domain.go | 69 +++++++ ...api_delete_ip_from_authenticated_domain.go | 79 ++++++++ ...ssociate_authenticated_domain_from_user.go | 59 ++++++ .../api_disassociate_subuser_from_domain.go | 71 +++++++ .../api_email_dns_record.go | 64 ++++++ .../api_get_authenticated_domain.go | 69 +++++++ ...list_all_authenticated_domain_with_user.go | 59 ++++++ .../api_list_authenticated_domain.go | 105 ++++++++++ ...api_list_authenticated_domain_with_user.go | 59 ++++++ .../api_list_default_authenticated_domain.go | 68 +++++++ .../v3/domain_authentication/api_service.go | 34 ++++ .../api_update_authenticated_domain.go | 84 ++++++++ .../api_validate_authenticated_domain.go | 78 ++++++++ .../docs/AddIpToAuthenticatedDomain.md | 53 +++++ .../docs/AddIpToAuthenticatedDomainRequest.md | 11 ++ .../docs/AssociateSubuserWithDomain.md | 52 +++++ .../AssociateSubuserWithDomainMultiple.md | 52 +++++ .../docs/AssociateSubuserWithDomainRequest.md | 11 ++ .../docs/AuthenticateDomain.md | 49 +++++ .../docs/AuthenticateDomainRequest.md | 19 ++ .../docs/AuthenticatedDomain.md | 22 +++ .../docs/AuthenticatedDomainSpf.md | 22 +++ .../docs/AuthenticatedDomainSpfDns.md | 14 ++ .../docs/AuthenticatedDomainSpfDnsDkim.md | 14 ++ .../AuthenticatedDomainSpfDnsDomainSpf.md | 14 ++ .../AuthenticatedDomainSpfDnsMailServer.md | 14 ++ .../AuthenticatedDomainSpfDnsSubdomainSpf.md | 14 ++ .../docs/DeleteAuthenticatedDomain.md | 52 +++++ .../docs/DeleteIpFromAuthenticatedDomain.md | 53 +++++ ...DisassociateAuthenticatedDomainFromUser.md | 48 +++++ .../docs/DisassociateSubuserFromDomain.md | 52 +++++ .../docs/EmailDnsRecord.md | 48 +++++ .../docs/EmailDnsRecord400Response.md | 11 ++ .../docs/EmailDnsRecord400ResponseErrors.md | 12 ++ .../docs/EmailDnsRecordRequest.md | 14 ++ .../docs/GetAuthenticatedDomain.md | 52 +++++ .../ListAllAuthenticatedDomainWithUser.md | 47 +++++ ...enticatedDomainWithUser200ResponseInner.md | 22 +++ ...icatedDomainWithUser200ResponseInnerDns.md | 13 ++ ...dDomainWithUser200ResponseInnerDnsDkim1.md | 14 ++ ...ainWithUser200ResponseInnerDnsMailCname.md | 14 ++ .../docs/ListAuthenticatedDomain.md | 53 +++++ .../docs/ListAuthenticatedDomainWithUser.md | 47 +++++ .../docs/ListDefaultAuthenticatedDomain.md | 49 +++++ .../docs/UpdateAuthenticatedDomain.md | 53 +++++ .../docs/UpdateAuthenticatedDomainRequest.md | 12 ++ .../docs/ValidateAuthenticatedDomain.md | 52 +++++ .../ValidateAuthenticatedDomain200Response.md | 13 ++ ...catedDomain200ResponseValidationResults.md | 14 ++ ...Domain200ResponseValidationResultsDkim1.md | 12 ++ ...in200ResponseValidationResultsMailCname.md | 12 ++ ...edDomain200ResponseValidationResultsSpf.md | 12 ++ .../ValidateAuthenticatedDomain500Response.md | 11 ++ ...thenticatedDomain500ResponseErrorsInner.md | 11 ++ ..._add_ip_to_authenticated_domain_request.go | 20 ++ ...l_associate_subuser_with_domain_request.go | 20 ++ .../model_authenticate_domain_request.go | 36 ++++ .../model_authenticated_domain.go | 41 ++++ .../model_authenticated_domain_spf.go | 41 ++++ .../model_authenticated_domain_spf_dns.go | 22 +++ ...model_authenticated_domain_spf_dns_dkim.go | 26 +++ ...authenticated_domain_spf_dns_domain_spf.go | 26 +++ ...uthenticated_domain_spf_dns_mail_server.go | 26 +++ ...henticated_domain_spf_dns_subdomain_spf.go | 26 +++ .../model_email_dns_record_400_response.go | 19 ++ ...el_email_dns_record_400_response_errors.go | 20 ++ .../model_email_dns_record_request.go | 26 +++ ...ted_domain_with_user_200_response_inner.go | 41 ++++ ...domain_with_user_200_response_inner_dns.go | 21 ++ ..._with_user_200_response_inner_dns_dkim1.go | 26 +++ ..._user_200_response_inner_dns_mail_cname.go | 26 +++ ...del_update_authenticated_domain_request.go | 22 +++ ...idate_authenticated_domain_200_response.go | 23 +++ ..._domain_200_response_validation_results.go | 22 +++ ...n_200_response_validation_results_dkim1.go | 21 ++ ..._response_validation_results_mail_cname.go | 22 +++ ...ain_200_response_validation_results_spf.go | 21 ++ ...idate_authenticated_domain_500_response.go | 19 ++ ...icated_domain_500_response_errors_inner.go | 20 ++ rest/api/v3/email_activity/.openapi-generator | 58 ++++++ .../email_activity/.openapi-generator-ignore | 23 +++ rest/api/v3/email_activity/README.md | 89 +++++++++ .../api/v3/email_activity/api_download_csv.go | 76 ++++++++ rest/api/v3/email_activity/api_get_message.go | 84 ++++++++ .../api/v3/email_activity/api_list_message.go | 85 ++++++++ rest/api/v3/email_activity/api_request_csv.go | 83 ++++++++ rest/api/v3/email_activity/api_service.go | 34 ++++ .../api/v3/email_activity/docs/AbbvMessage.md | 18 ++ rest/api/v3/email_activity/docs/BounceType.md | 13 ++ .../api/v3/email_activity/docs/BounceType1.md | 13 ++ .../api/v3/email_activity/docs/DownloadCsv.md | 51 +++++ .../docs/DownloadCsv200Response.md | 12 ++ .../docs/EmailActivityResponseBaseProps.md | 15 ++ rest/api/v3/email_activity/docs/Event.md | 18 ++ rest/api/v3/email_activity/docs/EventName.md | 22 +++ rest/api/v3/email_activity/docs/EventName1.md | 22 +++ rest/api/v3/email_activity/docs/GetMessage.md | 51 +++++ .../docs/GetMessage404Response.md | 11 ++ .../docs/GetMessage404ResponseErrorsInner.md | 12 ++ .../api/v3/email_activity/docs/ListMessage.md | 48 +++++ .../docs/ListMessage200Response.md | 11 ++ .../docs/ListMessage400Response.md | 11 ++ .../docs/ListMessage400ResponseErrorsInner.md | 11 ++ .../docs/ListMessage429Response.md | 11 ++ .../docs/ListMessage429ResponseErrorsInner.md | 11 ++ rest/api/v3/email_activity/docs/Message.md | 25 +++ .../v3/email_activity/docs/OutboundIpType.md | 13 ++ .../v3/email_activity/docs/OutboundIpType1.md | 13 ++ rest/api/v3/email_activity/docs/RequestCsv.md | 48 +++++ .../docs/RequestCsv202Response.md | 12 ++ rest/api/v3/email_activity/docs/Status.md | 14 ++ rest/api/v3/email_activity/docs/Status1.md | 14 ++ rest/api/v3/email_activity/docs/Status2.md | 12 ++ rest/api/v3/email_activity/docs/Status3.md | 14 ++ .../v3/email_activity/model_abbv__message.go | 27 +++ .../v3/email_activity/model_bounce_type.go | 23 +++ .../v3/email_activity/model_bounce_type1.go | 23 +++ .../model_download_csv_200_response.go | 22 +++ ...odel_email_activity_response_base_props.go | 28 +++ rest/api/v3/email_activity/model_event.go | 34 ++++ .../api/v3/email_activity/model_event_name.go | 32 +++ .../v3/email_activity/model_event_name1.go | 32 +++ .../model_get_message_404_response.go | 19 ++ ...l_get_message_404_response_errors_inner.go | 20 ++ .../model_list_message_200_response.go | 19 ++ .../model_list_message_400_response.go | 19 ++ ..._list_message_400_response_errors_inner.go | 19 ++ .../model_list_message_429_response.go | 19 ++ ..._list_message_429_response_errors_inner.go | 19 ++ rest/api/v3/email_activity/model_message.go | 48 +++++ .../email_activity/model_outbound_ip_type.go | 23 +++ .../email_activity/model_outbound_ip_type1.go | 23 +++ .../model_request_csv_202_response.go | 20 ++ rest/api/v3/email_activity/model_status.go | 24 +++ rest/api/v3/email_activity/model_status1.go | 24 +++ rest/api/v3/email_activity/model_status2.go | 22 +++ rest/api/v3/email_activity/model_status3.go | 24 +++ .../v3/email_validation/.openapi-generator | 54 ++++++ .../.openapi-generator-ignore | 23 +++ rest/api/v3/email_validation/README.md | 94 +++++++++ .../api_get_email_job_for_verification.go | 76 ++++++++ .../api_get_validations_email_jobs.go | 64 ++++++ .../api_list_email_job_for_verification.go | 80 ++++++++ rest/api/v3/email_validation/api_service.go | 34 ++++ .../v3/email_validation/api_validate_email.go | 64 ++++++ .../v3/email_validation/docs/ErrorResponse.md | 12 ++ .../docs/ErrorResponseErrorsInner.md | 13 ++ rest/api/v3/email_validation/docs/FileType.md | 13 ++ .../docs/GetEmailJobForVerification.md | 51 +++++ .../docs/GetValidationsEmailJobs.md | 44 +++++ .../GetValidationsEmailJobs200Response.md | 11 ++ ...idationsEmailJobs200ResponseResultInner.md | 14 ++ ...GetValidationsEmailJobsJobId200Response.md | 11 ++ ...idationsEmailJobsJobId200ResponseResult.md | 18 ++ ...ilJobsJobId200ResponseResultErrorsInner.md | 11 ++ .../docs/ListEmailJobForVerification.md | 48 +++++ .../ListEmailJobForVerificationRequest.md | 11 ++ .../PutValidationsEmailJobs200Response.md | 13 ++ ...sEmailJobs200ResponseUploadHeadersInner.md | 12 ++ rest/api/v3/email_validation/docs/Status.md | 17 ++ rest/api/v3/email_validation/docs/Status1.md | 17 ++ .../v3/email_validation/docs/ValidateEmail.md | 48 +++++ .../docs/ValidateEmail200Response.md | 11 ++ .../docs/ValidateEmail200ResponseResult.md | 19 ++ .../ValidateEmail200ResponseResultChecks.md | 13 ++ ...eEmail200ResponseResultChecksAdditional.md | 12 ++ ...idateEmail200ResponseResultChecksDomain.md | 13 ++ ...teEmail200ResponseResultChecksLocalPart.md | 11 ++ .../docs/ValidateEmailRequest.md | 12 ++ rest/api/v3/email_validation/docs/Verdict.md | 14 ++ .../email_validation/model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ .../v3/email_validation/model_file_type.go | 23 +++ ..._get_validations_email_jobs200_response.go | 20 ++ ...ons_email_jobs200_response_result_inner.go | 26 +++ ...lidations_email_jobs_job_id200_response.go | 19 ++ ...ns_email_jobs_job_id200_response_result.go | 34 ++++ ..._job_id200_response_result_errors_inner.go | 20 ++ ...list_email_job_for_verification_request.go | 20 ++ ..._put_validations_email_jobs200_response.go | 24 +++ ...l_jobs200_response_upload_headers_inner.go | 22 +++ rest/api/v3/email_validation/model_status.go | 27 +++ rest/api/v3/email_validation/model_status1.go | 27 +++ .../model_validate_email_200_response.go | 19 ++ ...odel_validate_email_200_response_result.go | 35 ++++ ...lidate_email_200_response_result_checks.go | 21 ++ ...l_200_response_result_checks_additional.go | 22 +++ ...email_200_response_result_checks_domain.go | 24 +++ ...l_200_response_result_checks_local_part.go | 20 ++ .../model_validate_email_request.go | 22 +++ rest/api/v3/email_validation/model_verdict.go | 24 +++ rest/api/v3/enforced_tls/.openapi-generator | 16 ++ .../v3/enforced_tls/.openapi-generator-ignore | 23 +++ rest/api/v3/enforced_tls/README.md | 68 +++++++ .../api_list_enforced_tls_setting.go | 82 ++++++++ rest/api/v3/enforced_tls/api_service.go | 34 ++++ .../api_update_enforced_tls_setting.go | 97 ++++++++++ .../docs/EnforcedTlsRequestResponse.md | 13 ++ .../api/v3/enforced_tls/docs/ErrorResponse.md | 12 ++ .../docs/ErrorResponseErrorsInner.md | 13 ++ .../docs/ListEnforcedTlsSetting.md | 48 +++++ .../docs/UpdateEnforcedTlsSetting.md | 49 +++++ rest/api/v3/enforced_tls/docs/Version.md | 14 ++ .../model_enforced_tls_request_response.go | 24 +++ .../v3/enforced_tls/model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ rest/api/v3/enforced_tls/model_version.go | 24 +++ rest/api/v3/integrations/.openapi-generator | 76 ++++++++ .../v3/integrations/.openapi-generator-ignore | 23 +++ rest/api/v3/integrations/README.md | 94 +++++++++ .../v3/integrations/api_add_integration.go | 88 +++++++++ .../v3/integrations/api_delete_integration.go | 92 +++++++++ .../api_find_integration_by_id.go | 84 ++++++++ .../api_get_integrations_by_user.go | 64 ++++++ rest/api/v3/integrations/api_service.go | 34 ++++ .../v3/integrations/api_update_integration.go | 107 ++++++++++ .../v3/integrations/docs/AddIntegration.md | 47 +++++ .../docs/AddIntegration400Response.md | 11 ++ .../v3/integrations/docs/DeleteIntegration.md | 47 +++++ .../docs/DeleteIntegration400Response.md | 11 ++ .../docs/DeleteIntegration404Response.md | 11 ++ rest/api/v3/integrations/docs/Destination.md | 12 ++ rest/api/v3/integrations/docs/Destination1.md | 12 ++ rest/api/v3/integrations/docs/Destination2.md | 12 ++ rest/api/v3/integrations/docs/Destination3.md | 12 ++ .../v3/integrations/docs/DestinationRegion.md | 13 ++ .../integrations/docs/DestinationRegion1.md | 13 ++ .../integrations/docs/DestinationRegion2.md | 13 ++ .../integrations/docs/FindIntegrationById.md | 51 +++++ rest/api/v3/integrations/docs/Forbidden.md | 11 ++ .../docs/GetIntegrationsByUser.md | 44 +++++ .../docs/GetIntegrationsByUser200Response.md | 11 ++ .../docs/GetIntegrationsByUser403Response.md | 11 ++ .../docs/GetIntegrationsByUser500Response.md | 11 ++ rest/api/v3/integrations/docs/Id.md | 11 ++ rest/api/v3/integrations/docs/Integration.md | 16 ++ .../integrations/docs/IntegrationFilters.md | 11 ++ .../v3/integrations/docs/IntegrationInput.md | 14 ++ .../docs/IntegrationInputFilters.md | 11 ++ .../docs/IntegrationInputProperties.md | 12 ++ .../integrations/docs/IntegrationNotFound.md | 11 ++ .../v3/integrations/docs/IntegrationPatch.md | 14 ++ .../docs/IntegrationPatchFilters.md | 11 ++ .../docs/IntegrationPatchProperties.md | 12 ++ .../docs/IntegrationProperties.md | 12 ++ .../api/v3/integrations/docs/InternalError.md | 11 ++ .../integrations/docs/InvalidDeleteRequest.md | 12 ++ .../v3/integrations/docs/InvalidRequest.md | 12 ++ rest/api/v3/integrations/docs/Items.md | 23 +++ rest/api/v3/integrations/docs/Items1.md | 23 +++ rest/api/v3/integrations/docs/Items2.md | 23 +++ .../v3/integrations/docs/UpdateIntegration.md | 51 +++++ .../model_add_integration_400_response.go | 19 ++ .../model_delete_integration_400_response.go | 19 ++ .../model_delete_integration_404_response.go | 19 ++ rest/api/v3/integrations/model_destination.go | 22 +++ .../api/v3/integrations/model_destination1.go | 22 +++ .../api/v3/integrations/model_destination2.go | 22 +++ .../api/v3/integrations/model_destination3.go | 22 +++ .../integrations/model_destination_region.go | 23 +++ .../integrations/model_destination_region1.go | 23 +++ .../integrations/model_destination_region2.go | 23 +++ rest/api/v3/integrations/model_forbidden.go | 20 ++ ...l_get_integrations_by_user_200_response.go | 19 ++ ...l_get_integrations_by_user_403_response.go | 19 ++ ...l_get_integrations_by_user_500_response.go | 19 ++ rest/api/v3/integrations/model_id.go | 19 ++ rest/api/v3/integrations/model_integration.go | 28 +++ .../integrations/model_integration_filters.go | 20 ++ .../integrations/model_integration_input.go | 24 +++ .../model_integration_input_filters.go | 20 ++ .../model_integration_input_properties.go | 22 +++ .../model_integration_not_found.go | 20 ++ .../integrations/model_integration_patch.go | 24 +++ .../model_integration_patch_filters.go | 20 ++ .../model_integration_patch_properties.go | 22 +++ .../model_integration_properties.go | 22 +++ .../v3/integrations/model_internal_error.go | 20 ++ .../model_invalid_delete_request.go | 22 +++ .../v3/integrations/model_invalid_request.go | 22 +++ rest/api/v3/integrations/model_items.go | 33 ++++ rest/api/v3/integrations/model_items1.go | 33 ++++ rest/api/v3/integrations/model_items2.go | 33 ++++ .../ip_access_management/.openapi-generator | 34 ++++ .../.openapi-generator-ignore | 23 +++ rest/api/v3/ip_access_management/README.md | 79 ++++++++ .../api_add_ip_to_allow_list.go | 97 ++++++++++ .../api_delete_allowed_ip.go | 69 +++++++ .../api_delete_allowed_ips.go | 97 ++++++++++ .../api_get_allowed_ip.go | 69 +++++++ .../api_list_access_activity.go | 93 +++++++++ .../api_list_allowed_ip.go | 82 ++++++++ .../v3/ip_access_management/api_service.go | 34 ++++ .../docs/AddIpToAllowList.md | 49 +++++ .../docs/AddIpToAllowListRequest.md | 11 ++ .../docs/AddIpToAllowListRequestIpsInner.md | 11 ++ .../docs/DeleteAllowedIp.md | 52 +++++ .../docs/DeleteAllowedIps.md | 49 +++++ .../docs/DeleteAllowedIpsRequest.md | 11 ++ .../docs/ErrorResponse.md | 12 ++ .../docs/ErrorResponseErrorsInner.md | 13 ++ .../ip_access_management/docs/GetAllowedIp.md | 52 +++++ .../docs/IpAccessManagement2xx.md | 11 ++ .../docs/IpAccessManagement2xxResultInner.md | 14 ++ .../docs/ListAccessActivity.md | 49 +++++ .../docs/ListAccessActivity200Response.md | 11 ++ ...istAccessActivity200ResponseResultInner.md | 16 ++ .../docs/ListAllowedIp.md | 48 +++++ .../model_add_ip_to_allow_list_request.go | 20 ++ ..._add_ip_to_allow_list_request_ips_inner.go | 20 ++ .../model_delete_allowed_ips_request.go | 20 ++ .../model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ .../model_ip_access_management2xx.go | 20 ++ ...el_ip_access_management2xx_result_inner.go | 26 +++ ...model_list_access_activity_200_response.go | 20 ++ ...cess_activity_200_response_result_inner.go | 30 +++ .../ip_address_management/.openapi-generator | 124 ++++++++++++ .../.openapi-generator-ignore | 23 +++ rest/api/v3/ip_address_management/README.md | 118 +++++++++++ .../v3/ip_address_management/api_add_ip.go | 88 +++++++++ .../api_add_ips_to_ip_pool.go | 99 ++++++++++ .../api_add_sub_users_to_ip.go | 99 ++++++++++ .../api_create_ip_pool.go | 88 +++++++++ .../api_delete_ip_pool.go | 76 ++++++++ .../api_delete_ips_from_ip_pool.go | 91 +++++++++ .../api_delete_sub_users_from_ip.go | 91 +++++++++ .../v3/ip_address_management/api_get_ip.go | 84 ++++++++ .../ip_address_management/api_get_ip_pool.go | 84 ++++++++ .../v3/ip_address_management/api_list_ip.go | 183 ++++++++++++++++++ .../api_list_ip_assigned_to_ip_pool.go | 102 ++++++++++ .../ip_address_management/api_list_ip_pool.go | 120 ++++++++++++ .../api_list_sub_user_assigned_to_ip.go | 93 +++++++++ .../v3/ip_address_management/api_service.go | 34 ++++ .../v3/ip_address_management/api_update_ip.go | 99 ++++++++++ .../api_update_ip_pool.go | 99 ++++++++++ .../v3/ip_address_management/docs/AddIp.md | 48 +++++ .../docs/AddIp201Response.md | 15 ++ .../docs/AddIpRequest.md | 15 ++ .../docs/AddIpsToIpPool.md | 52 +++++ .../docs/AddIpsToIpPool200Response.md | 13 ++ .../docs/AddIpsToIpPoolRequest.md | 11 ++ .../docs/AddSubUsersToIp.md | 52 +++++ .../docs/AddSubUsersToIp200Response.md | 12 ++ .../docs/AddSubUsersToIpRequest.md | 11 ++ .../docs/CreateIpPool.md | 48 +++++ .../docs/CreateIpPool201Response.md | 13 ++ .../docs/CreateIpPoolRequest.md | 12 ++ .../docs/DeleteIpPool.md | 51 +++++ .../docs/DeleteIpsFromIpPool.md | 52 +++++ .../docs/DeleteIpsFromIpPoolRequest.md | 11 ++ .../docs/DeleteSubUsersFromIp.md | 52 +++++ .../docs/DeleteSubUsersFromIpRequest.md | 11 ++ .../v3/ip_address_management/docs/GetIp.md | 48 +++++ .../docs/GetIp200Response.md | 19 ++ .../docs/GetIp200ResponsePoolsInner.md | 12 ++ .../ip_address_management/docs/GetIpPool.md | 48 +++++ .../docs/GetIpPool200Response.md | 15 ++ ...etIpPool200ResponseIpCountByRegionInner.md | 12 ++ .../docs/IpAddressManagementErrorResponse.md | 11 ++ ...dressManagementErrorResponseErrorsInner.md | 12 ++ .../v3/ip_address_management/docs/Items.md | 13 ++ .../v3/ip_address_management/docs/ListIp.md | 59 ++++++ .../docs/ListIp200Response.md | 12 ++ .../docs/ListIp200ResponseMetadata.md | 11 ++ .../ListIp200ResponseMetadataNextParams.md | 22 +++ .../docs/ListIp200ResponseResultInner.md | 19 ++ .../ListIp200ResponseResultInnerPoolsInner.md | 12 ++ .../docs/ListIpAssignedToIpPool.md | 50 +++++ .../docs/ListIpAssignedToIpPool200Response.md | 12 ++ ...stIpAssignedToIpPool200ResponseMetadata.md | 11 ++ ...edToIpPool200ResponseMetadataNextParams.md | 13 ++ ...pAssignedToIpPool200ResponseResultInner.md | 13 ++ .../ip_address_management/docs/ListIpPool.md | 52 +++++ .../docs/ListIpPool200Response.md | 12 ++ .../docs/ListIpPool200ResponseMetadata.md | 11 ++ ...ListIpPool200ResponseMetadataNextParams.md | 15 ++ .../docs/ListIpPool200ResponseResultInner.md | 15 ++ .../docs/ListSubUserAssignedToIp.md | 49 +++++ .../ListSubUserAssignedToIp200Response.md | 12 ++ ...tSubUserAssignedToIp200ResponseMetadata.md | 11 ++ ...signedToIp200ResponseMetadataNextParams.md | 12 ++ .../v3/ip_address_management/docs/Region.md | 13 ++ .../v3/ip_address_management/docs/Region1.md | 14 ++ .../v3/ip_address_management/docs/Region2.md | 13 ++ .../v3/ip_address_management/docs/Region3.md | 13 ++ .../v3/ip_address_management/docs/Region4.md | 14 ++ .../v3/ip_address_management/docs/Region5.md | 13 ++ .../v3/ip_address_management/docs/Region6.md | 13 ++ .../v3/ip_address_management/docs/Region7.md | 14 ++ .../v3/ip_address_management/docs/UpdateIp.md | 52 +++++ .../docs/UpdateIp200Response.md | 14 ++ .../docs/UpdateIpPool.md | 52 +++++ .../docs/UpdateIpPool200Response.md | 12 ++ .../docs/UpdateIpPoolRequest.md | 11 ++ .../docs/UpdateIpRequest.md | 13 ++ .../model_add_ip_201_response.go | 28 +++ .../model_add_ip_request.go | 28 +++ .../model_add_ips_to_ip_pool_200_response.go | 24 +++ .../model_add_ips_to_ip_pool_request.go | 20 ++ .../model_add_sub_users_to_ip_200_response.go | 22 +++ .../model_add_sub_users_to_ip_request.go | 20 ++ .../model_create_ip_pool_201_response.go | 24 +++ .../model_create_ip_pool_request.go | 22 +++ .../model_delete_ips_from_ip_pool_request.go | 20 ++ .../model_delete_sub_users_from_ip_request.go | 20 ++ .../model_get_ip_200_response.go | 36 ++++ .../model_get_ip_200_response_pools_inner.go | 22 +++ .../model_get_ip_pool_200_response.go | 28 +++ ...l_200_response_ip_count_by_region_inner.go | 22 +++ ...el_ip_address_management_error_response.go | 20 ++ ..._management_error_response_errors_inner.go | 22 +++ .../v3/ip_address_management/model_items.go | 23 +++ .../model_list_ip_200_response.go | 20 ++ .../model_list_ip_200_response__metadata.go | 19 ++ ...t_ip_200_response__metadata_next_params.go | 42 ++++ ...model_list_ip_200_response_result_inner.go | 36 ++++ ...p_200_response_result_inner_pools_inner.go | 22 +++ ...ist_ip_assigned_to_ip_pool_200_response.go | 20 ++ ...igned_to_ip_pool_200_response__metadata.go | 19 ++ ...pool_200_response__metadata_next_params.go | 24 +++ ...ed_to_ip_pool_200_response_result_inner.go | 24 +++ .../model_list_ip_pool_200_response.go | 20 ++ ...del_list_ip_pool_200_response__metadata.go | 19 ++ ...pool_200_response__metadata_next_params.go | 28 +++ ..._list_ip_pool_200_response_result_inner.go | 28 +++ ...st_sub_user_assigned_to_ip_200_response.go | 21 ++ ...r_assigned_to_ip_200_response__metadata.go | 19 ++ ...o_ip_200_response__metadata_next_params.go | 22 +++ .../v3/ip_address_management/model_region.go | 23 +++ .../v3/ip_address_management/model_region1.go | 24 +++ .../v3/ip_address_management/model_region2.go | 23 +++ .../v3/ip_address_management/model_region3.go | 23 +++ .../v3/ip_address_management/model_region4.go | 24 +++ .../v3/ip_address_management/model_region5.go | 23 +++ .../v3/ip_address_management/model_region6.go | 23 +++ .../v3/ip_address_management/model_region7.go | 24 +++ .../model_update_ip_200_response.go | 26 +++ .../model_update_ip_pool_200_response.go | 22 +++ .../model_update_ip_pool_request.go | 20 ++ .../model_update_ip_request.go | 24 +++ rest/api/v3/ip_warmup/.openapi-generator | 28 +++ .../v3/ip_warmup/.openapi-generator-ignore | 23 +++ rest/api/v3/ip_warmup/README.md | 76 ++++++++ rest/api/v3/ip_warmup/api_get_warm_up_ip.go | 68 +++++++ rest/api/v3/ip_warmup/api_list_warm_up_ip.go | 48 +++++ rest/api/v3/ip_warmup/api_service.go | 34 ++++ rest/api/v3/ip_warmup/api_stop_ip_warm_up.go | 68 +++++++ rest/api/v3/ip_warmup/api_warm_up_ip.go | 72 +++++++ rest/api/v3/ip_warmup/docs/GetWarmUpIp.md | 51 +++++ .../ip_warmup/docs/GetWarmUpIp404Response.md | 11 ++ .../docs/GetWarmUpIp404ResponseErrorsInner.md | 12 ++ .../api/v3/ip_warmup/docs/IpWarmup200Inner.md | 12 ++ rest/api/v3/ip_warmup/docs/ListWarmUpIp.md | 44 +++++ rest/api/v3/ip_warmup/docs/StopIpWarmUp.md | 51 +++++ .../ip_warmup/docs/StopIpWarmUp404Response.md | 11 ++ .../StopIpWarmUp404ResponseErrorsInner.md | 12 ++ rest/api/v3/ip_warmup/docs/WarmUpIp.md | 48 +++++ .../v3/ip_warmup/docs/WarmUpIp404Response.md | 11 ++ .../docs/WarmUpIp404ResponseErrorsInner.md | 12 ++ rest/api/v3/ip_warmup/docs/WarmUpIpRequest.md | 11 ++ .../model_get_warm_up_ip_404_response.go | 20 ++ ...et_warm_up_ip_404_response_errors_inner.go | 21 ++ .../v3/ip_warmup/model_ip_warmup200_inner.go | 22 +++ .../model_stop_ip_warm_up_404_response.go | 20 ++ ...op_ip_warm_up_404_response_errors_inner.go | 21 ++ .../model_warm_up_ip_404_response.go | 20 ++ ...el_warm_up_ip_404_response_errors_inner.go | 21 ++ .../v3/ip_warmup/model_warm_up_ip_request.go | 20 ++ rest/api/v3/ips/.openapi-generator | 78 ++++++++ rest/api/v3/ips/.openapi-generator-ignore | 23 +++ rest/api/v3/ips/README.md | 95 +++++++++ rest/api/v3/ips/api_add_ip.go | 72 +++++++ rest/api/v3/ips/api_add_ip_to_ip_pool.go | 83 ++++++++ rest/api/v3/ips/api_create_ip_pool.go | 64 ++++++ rest/api/v3/ips/api_delete_ip_from_ip_pool.go | 77 ++++++++ rest/api/v3/ips/api_delete_ip_pool.go | 68 +++++++ rest/api/v3/ips/api_get_ip.go | 60 ++++++ rest/api/v3/ips/api_get_ip_pool.go | 68 +++++++ rest/api/v3/ips/api_list_assigned_ip.go | 48 +++++ rest/api/v3/ips/api_list_ip.go | 105 ++++++++++ rest/api/v3/ips/api_list_ip_pool.go | 48 +++++ .../api/v3/ips/api_list_remaining_ip_count.go | 48 +++++ rest/api/v3/ips/api_service.go | 34 ++++ rest/api/v3/ips/api_update_ip_pool.go | 83 ++++++++ rest/api/v3/ips/docs/AddIp.md | 48 +++++ rest/api/v3/ips/docs/AddIp201Response.md | 13 ++ .../v3/ips/docs/AddIp201ResponseIpsInner.md | 12 ++ rest/api/v3/ips/docs/AddIpRequest.md | 13 ++ rest/api/v3/ips/docs/AddIpToIpPool.md | 52 +++++ .../v3/ips/docs/AddIpToIpPool201Response.md | 14 ++ .../v3/ips/docs/AddIpToIpPool404Response.md | 11 ++ .../AddIpToIpPool404ResponseErrorsInner.md | 12 ++ rest/api/v3/ips/docs/AddIpToIpPoolRequest.md | 11 ++ rest/api/v3/ips/docs/CreateIpPool.md | 48 +++++ rest/api/v3/ips/docs/CreateIpPoolRequest.md | 11 ++ rest/api/v3/ips/docs/DeleteIpFromIpPool.md | 52 +++++ .../ips/docs/DeleteIpFromIpPool404Response.md | 11 ++ rest/api/v3/ips/docs/DeleteIpPool.md | 51 +++++ .../v3/ips/docs/DeleteIpPool404Response.md | 11 ++ rest/api/v3/ips/docs/ErrorResponse.md | 12 ++ .../v3/ips/docs/ErrorResponseErrorsInner.md | 13 ++ rest/api/v3/ips/docs/GetIp.md | 51 +++++ rest/api/v3/ips/docs/GetIp200Response.md | 17 ++ rest/api/v3/ips/docs/GetIpPool.md | 51 +++++ rest/api/v3/ips/docs/GetIpPool200Response.md | 12 ++ rest/api/v3/ips/docs/GetIpPool404Response.md | 11 ++ .../docs/GetIpPool404ResponseErrorsInner.md | 12 ++ rest/api/v3/ips/docs/IpPools200.md | 11 ++ rest/api/v3/ips/docs/ListAssignedIp.md | 44 +++++ .../docs/ListAssignedIp200ResponseInner.md | 14 ++ rest/api/v3/ips/docs/ListIp.md | 53 +++++ .../api/v3/ips/docs/ListIp200ResponseInner.md | 18 ++ rest/api/v3/ips/docs/ListIpPool.md | 44 +++++ rest/api/v3/ips/docs/ListRemainingIpCount.md | 44 +++++ .../docs/ListRemainingIpCount200Response.md | 11 ++ ...RemainingIpCount200ResponseResultsInner.md | 13 ++ rest/api/v3/ips/docs/SortByDirection.md | 13 ++ rest/api/v3/ips/docs/UpdateIpPool.md | 52 +++++ .../v3/ips/docs/UpdateIpPool404Response.md | 11 ++ .../UpdateIpPool404ResponseErrorsInner.md | 12 ++ rest/api/v3/ips/docs/UpdateIpPoolRequest.md | 11 ++ rest/api/v3/ips/model_add_ip_201_response.go | 24 +++ .../model_add_ip_201_response_ips_inner.go | 22 +++ rest/api/v3/ips/model_add_ip_request.go | 24 +++ .../model_add_ip_to_ip_pool_201_response.go | 26 +++ .../model_add_ip_to_ip_pool_404_response.go | 20 ++ ...ip_to_ip_pool_404_response_errors_inner.go | 21 ++ .../v3/ips/model_add_ip_to_ip_pool_request.go | 20 ++ .../v3/ips/model_create_ip_pool_request.go | 20 ++ ...del_delete_ip_from_ip_pool_404_response.go | 20 ++ .../ips/model_delete_ip_pool_404_response.go | 20 ++ rest/api/v3/ips/model_error_response.go | 21 ++ .../ips/model_error_response_errors_inner.go | 24 +++ rest/api/v3/ips/model_get_ip_200_response.go | 32 +++ .../v3/ips/model_get_ip_pool_200_response.go | 22 +++ .../v3/ips/model_get_ip_pool_404_response.go | 19 ++ ...l_get_ip_pool_404_response_errors_inner.go | 22 +++ rest/api/v3/ips/model_ip_pools200.go | 20 ++ ...del_list_assigned_ip_200_response_inner.go | 26 +++ .../ips/model_list_ip_200_response_inner.go | 34 ++++ ...el_list_remaining_ip_count_200_response.go | 19 ++ ...ing_ip_count_200_response_results_inner.go | 24 +++ rest/api/v3/ips/model_sort_by_direction.go | 23 +++ .../ips/model_update_ip_pool_404_response.go | 19 ++ ...pdate_ip_pool_404_response_errors_inner.go | 21 ++ .../v3/ips/model_update_ip_pool_request.go | 20 ++ rest/api/v3/link_branding/.openapi-generator | 76 ++++++++ .../link_branding/.openapi-generator-ignore | 23 +++ rest/api/v3/link_branding/README.md | 98 ++++++++++ ...api_associate_branded_link_with_subuser.go | 76 ++++++++ .../link_branding/api_create_branded_link.go | 73 +++++++ .../link_branding/api_delete_branded_link.go | 70 +++++++ ..._disassociate_branded_link_from_subuser.go | 59 ++++++ .../v3/link_branding/api_get_branded_link.go | 70 +++++++ .../v3/link_branding/api_list_branded_link.go | 69 +++++++ .../api_list_default_branded_link.go | 68 +++++++ .../api_list_subuser_branded_link.go | 59 ++++++ rest/api/v3/link_branding/api_service.go | 34 ++++ .../link_branding/api_update_branded_link.go | 85 ++++++++ .../api_validate_branded_link.go | 78 ++++++++ .../docs/AssociateBrandedLinkWithSubuser.md | 52 +++++ .../AssociateBrandedLinkWithSubuserRequest.md | 11 ++ .../link_branding/docs/CreateBrandedLink.md | 49 +++++ .../docs/CreateBrandedLinkRequest.md | 14 ++ rest/api/v3/link_branding/docs/Default.md | 13 ++ rest/api/v3/link_branding/docs/Default1.md | 13 ++ rest/api/v3/link_branding/docs/Default2.md | 13 ++ .../link_branding/docs/DeleteBrandedLink.md | 52 +++++ .../DisassociateBrandedLinkFromSubuser.md | 47 +++++ .../v3/link_branding/docs/GetBrandedLink.md | 52 +++++ rest/api/v3/link_branding/docs/Legacy.md | 13 ++ .../v3/link_branding/docs/LinkBranding200.md | 19 ++ .../link_branding/docs/LinkBranding200Dns.md | 12 ++ .../docs/LinkBranding200DnsDomainCname.md | 14 ++ .../docs/LinkBranding200DnsOwnerCname.md | 14 ++ .../v3/link_branding/docs/ListBrandedLink.md | 49 +++++ .../docs/ListDefaultBrandedLink.md | 49 +++++ .../docs/ListSubuserBrandedLink.md | 47 +++++ rest/api/v3/link_branding/docs/Region.md | 13 ++ rest/api/v3/link_branding/docs/Type.md | 14 ++ rest/api/v3/link_branding/docs/Type1.md | 14 ++ .../link_branding/docs/UpdateBrandedLink.md | 53 +++++ .../docs/UpdateBrandedLinkRequest.md | 11 ++ rest/api/v3/link_branding/docs/Valid.md | 13 ++ rest/api/v3/link_branding/docs/Valid1.md | 13 ++ rest/api/v3/link_branding/docs/Valid2.md | 13 ++ rest/api/v3/link_branding/docs/Valid3.md | 13 ++ rest/api/v3/link_branding/docs/Valid4.md | 13 ++ rest/api/v3/link_branding/docs/Valid5.md | 13 ++ .../link_branding/docs/ValidateBrandedLink.md | 52 +++++ .../docs/ValidateBrandedLink200Response.md | 13 ++ ...BrandedLink200ResponseValidationResults.md | 12 ++ ...200ResponseValidationResultsDomainCname.md | 12 ++ ...k200ResponseValidationResultsOwnerCname.md | 12 ++ .../docs/ValidateBrandedLink500Response.md | 11 ++ ...lidateBrandedLink500ResponseErrorsInner.md | 11 ++ ...ciate_branded_link_with_subuser_request.go | 20 ++ .../model_create_branded_link_request.go | 26 +++ rest/api/v3/link_branding/model_default.go | 23 +++ rest/api/v3/link_branding/model_default1.go | 23 +++ rest/api/v3/link_branding/model_default2.go | 23 +++ rest/api/v3/link_branding/model_legacy.go | 23 +++ .../link_branding/model_link_branding200.go | 35 ++++ .../model_link_branding200_dns.go | 20 ++ ...model_link_branding200_dns_domain_cname.go | 26 +++ .../model_link_branding200_dns_owner_cname.go | 26 +++ rest/api/v3/link_branding/model_region.go | 23 +++ rest/api/v3/link_branding/model_type.go | 24 +++ rest/api/v3/link_branding/model_type1.go | 24 +++ .../model_update_branded_link_request.go | 20 ++ rest/api/v3/link_branding/model_valid.go | 23 +++ rest/api/v3/link_branding/model_valid1.go | 23 +++ rest/api/v3/link_branding/model_valid2.go | 23 +++ rest/api/v3/link_branding/model_valid3.go | 23 +++ rest/api/v3/link_branding/model_valid4.go | 23 +++ rest/api/v3/link_branding/model_valid5.go | 23 +++ ...odel_validate_branded_link_200_response.go | 23 +++ ...ed_link_200_response_validation_results.go | 20 ++ ...esponse_validation_results_domain_cname.go | 22 +++ ...response_validation_results_owner_cname.go | 22 +++ ...odel_validate_branded_link_500_response.go | 20 ++ ..._branded_link_500_response_errors_inner.go | 20 ++ rest/api/v3/lmc_campaigns/.openapi-generator | 60 ++++++ .../lmc_campaigns/.openapi-generator-ignore | 23 +++ rest/api/v3/lmc_campaigns/README.md | 88 +++++++++ .../v3/lmc_campaigns/api_create_campaign.go | 89 +++++++++ .../v3/lmc_campaigns/api_delete_campaign.go | 78 ++++++++ rest/api/v3/lmc_campaigns/api_get_campaign.go | 86 ++++++++ .../api_get_scheduled_campaign.go | 78 ++++++++ .../api/v3/lmc_campaigns/api_list_campaign.go | 78 ++++++++ .../v3/lmc_campaigns/api_schedule_campaign.go | 117 +++++++++++ .../api/v3/lmc_campaigns/api_send_campaign.go | 102 ++++++++++ .../lmc_campaigns/api_send_test_campaign.go | 101 ++++++++++ rest/api/v3/lmc_campaigns/api_service.go | 34 ++++ .../lmc_campaigns/api_un_schedule_campaign.go | 78 ++++++++ .../v3/lmc_campaigns/api_update_campaign.go | 117 +++++++++++ .../api_update_scheduled_campaign.go | 109 +++++++++++ .../api/v3/lmc_campaigns/docs/Campaigns2xx.md | 24 +++ .../v3/lmc_campaigns/docs/CreateCampaign.md | 49 +++++ .../v3/lmc_campaigns/docs/DeleteCampaign.md | 52 +++++ rest/api/v3/lmc_campaigns/docs/Editor.md | 13 ++ .../v3/lmc_campaigns/docs/ErrorResponse.md | 12 ++ .../docs/ErrorResponseErrorsInner.md | 13 ++ rest/api/v3/lmc_campaigns/docs/GetCampaign.md | 52 +++++ .../docs/GetCampaign200Response.md | 23 +++ .../docs/GetScheduledCampaign.md | 52 +++++ .../api/v3/lmc_campaigns/docs/ListCampaign.md | 50 +++++ .../docs/ListCampaign200Response.md | 11 ++ .../docs/PostCampaignsRequest.md | 22 +++ .../docs/ScheduleACampaignRequest.md | 11 ++ .../docs/ScheduleACampaignResponse.md | 13 ++ .../v3/lmc_campaigns/docs/ScheduleCampaign.md | 53 +++++ .../docs/SendACampaignResponse.md | 12 ++ .../docs/SendATestCampaignRequest.md | 11 ++ .../api/v3/lmc_campaigns/docs/SendCampaign.md | 52 +++++ .../v3/lmc_campaigns/docs/SendTestCampaign.md | 53 +++++ .../docs/SendTestCampaignRequest.md | 11 ++ rest/api/v3/lmc_campaigns/docs/Status.md | 12 ++ .../lmc_campaigns/docs/UnScheduleCampaign.md | 52 +++++ .../docs/UpdateACampaignRequest.md | 15 ++ .../docs/UpdateAScheduledCampaignRequest.md | 11 ++ .../docs/UpdateAScheduledCampaignResponse.md | 13 ++ .../v3/lmc_campaigns/docs/UpdateCampaign.md | 53 +++++ .../docs/UpdateScheduledCampaign.md | 53 +++++ .../ViewScheduledTimeOfACampaignResponse.md | 11 ++ .../v3/lmc_campaigns/model_campaigns2xx.go | 45 +++++ rest/api/v3/lmc_campaigns/model_editor.go | 23 +++ .../v3/lmc_campaigns/model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ .../model_get_campaign_200_response.go | 31 +++ .../model_list_campaign_200_response.go | 19 ++ .../model_post_campaigns_request.go | 42 ++++ .../model_schedule_a_campaign_request.go | 20 ++ .../model_schedule_a_campaign_response.go | 24 +++ .../model_send_a_campaign_response.go | 20 ++ .../model_send_a_test_campaign_request.go | 19 ++ .../model_send_test_campaign_request.go | 20 ++ rest/api/v3/lmc_campaigns/model_status.go | 22 +++ .../model_update_a_campaign_request.go | 28 +++ ...del_update_a_scheduled_campaign_request.go | 19 ++ ...el_update_a_scheduled_campaign_response.go | 24 +++ ...w_scheduled_time_of_a_campaign_response.go | 19 ++ rest/api/v3/lmc_contactdb/.openapi-generator | 152 +++++++++++++++ .../lmc_contactdb/.openapi-generator-ignore | 23 +++ rest/api/v3/lmc_contactdb/README.md | 134 +++++++++++++ .../api/v3/lmc_contactdb/api_add_recipient.go | 89 +++++++++ .../api_add_recipient_to_contact_db_list.go | 95 +++++++++ .../api_add_recipients_to_contact_db_list.go | 101 ++++++++++ .../api_create_contact_db_list.go | 89 +++++++++ .../lmc_contactdb/api_create_custom_field.go | 81 ++++++++ .../v3/lmc_contactdb/api_create_segment.go | 89 +++++++++ .../api_delete_contact_db_list.go | 110 +++++++++++ .../api_delete_contact_db_lists.go | 81 ++++++++ .../lmc_contactdb/api_delete_custom_field.go | 94 +++++++++ .../v3/lmc_contactdb/api_delete_recipient.go | 93 +++++++++ ...i_delete_recipient_from_contact_db_list.go | 110 +++++++++++ .../v3/lmc_contactdb/api_delete_recipients.go | 89 +++++++++ .../v3/lmc_contactdb/api_delete_segment.go | 110 +++++++++++ rest/api/v3/lmc_contactdb/api_get_billable.go | 66 +++++++ .../lmc_contactdb/api_get_contact_db_list.go | 94 +++++++++ .../v3/lmc_contactdb/api_get_custom_field.go | 94 +++++++++ .../api/v3/lmc_contactdb/api_get_recipient.go | 93 +++++++++ .../lmc_contactdb/api_get_recipient_list.go | 93 +++++++++ rest/api/v3/lmc_contactdb/api_get_segment.go | 94 +++++++++ .../lmc_contactdb/api_list_contact_db_list.go | 58 ++++++ .../v3/lmc_contactdb/api_list_custom_field.go | 66 +++++++ .../v3/lmc_contactdb/api_list_recipient.go | 94 +++++++++ .../lmc_contactdb/api_list_recipient_count.go | 66 +++++++ .../api_list_recipient_for_segment.go | 113 +++++++++++ ...pi_list_recipients_from_contact_db_list.go | 105 ++++++++++ .../lmc_contactdb/api_list_reserved_field.go | 66 +++++++ .../api_list_search_recipient.go | 84 ++++++++ rest/api/v3/lmc_contactdb/api_list_segment.go | 66 +++++++ rest/api/v3/lmc_contactdb/api_list_status.go | 58 ++++++ .../v3/lmc_contactdb/api_search_recipient.go | 64 ++++++ rest/api/v3/lmc_contactdb/api_service.go | 34 ++++ .../api_update_contact_db_list.go | 101 ++++++++++ .../v3/lmc_contactdb/api_update_recipient.go | 89 +++++++++ .../v3/lmc_contactdb/api_update_segment.go | 101 ++++++++++ .../api/v3/lmc_contactdb/docs/AddRecipient.md | 49 +++++ .../docs/AddRecipientRequestInner.md | 14 ++ .../docs/AddRecipientToContactDbList.md | 53 +++++ .../docs/AddRecipientsToContactDbList.md | 53 +++++ rest/api/v3/lmc_contactdb/docs/AndOr.md | 14 ++ .../docs/ContactdbCustomField.md | 12 ++ .../docs/ContactdbCustomFieldId2xx.md | 13 ++ .../docs/ContactdbCustomFieldIdValue.md | 14 ++ .../v3/lmc_contactdb/docs/ContactdbList2xx.md | 13 ++ .../docs/ContactdbRecipient200.md | 11 ++ .../ContactdbRecipient200RecipientsInner.md | 20 ++ .../docs/ContactdbRecipientCount200.md | 11 ++ .../docs/ContactdbRecipientResponse201.md | 16 ++ ...ontactdbRecipientResponse201ErrorsInner.md | 12 ++ .../lmc_contactdb/docs/ContactdbSegments.md | 14 ++ .../docs/ContactdbSegmentsConditions.md | 14 ++ .../docs/ContactdbSegmentsId200.md | 15 ++ .../lmc_contactdb/docs/CreateAListRequest.md | 11 ++ .../lmc_contactdb/docs/CreateContactDbList.md | 49 +++++ .../lmc_contactdb/docs/CreateCustomField.md | 49 +++++ .../docs/CreateCustomFieldRequest.md | 12 ++ .../v3/lmc_contactdb/docs/CreateSegment.md | 49 +++++ .../lmc_contactdb/docs/DeleteContactDbList.md | 54 ++++++ .../docs/DeleteContactDbLists.md | 49 +++++ .../v3/lmc_contactdb/docs/DeleteContacts.md | 13 ++ .../lmc_contactdb/docs/DeleteCustomField.md | 52 +++++ .../v3/lmc_contactdb/docs/DeleteRecipient.md | 52 +++++ .../docs/DeleteRecipientFromContactDbList.md | 54 ++++++ .../v3/lmc_contactdb/docs/DeleteRecipients.md | 49 +++++ .../v3/lmc_contactdb/docs/DeleteSegment.md | 54 ++++++ .../v3/lmc_contactdb/docs/ErrorResponse.md | 12 ++ .../docs/ErrorResponseErrorsInner.md | 13 ++ rest/api/v3/lmc_contactdb/docs/GetBillable.md | 48 +++++ .../v3/lmc_contactdb/docs/GetContactDbList.md | 52 +++++ .../v3/lmc_contactdb/docs/GetCustomField.md | 52 +++++ .../api/v3/lmc_contactdb/docs/GetRecipient.md | 52 +++++ .../v3/lmc_contactdb/docs/GetRecipientList.md | 52 +++++ .../docs/GetRecipientList200Response.md | 11 ++ rest/api/v3/lmc_contactdb/docs/GetSegment.md | 52 +++++ .../docs/ListAllCustomFieldsResponse.md | 11 ++ .../docs/ListAllListsResponse.md | 11 ++ .../docs/ListAllSegmentsResponse.md | 11 ++ .../lmc_contactdb/docs/ListContactDbList.md | 48 +++++ .../v3/lmc_contactdb/docs/ListCustomField.md | 48 +++++ .../v3/lmc_contactdb/docs/ListRecipient.md | 50 +++++ .../lmc_contactdb/docs/ListRecipientCount.md | 48 +++++ .../docs/ListRecipientForSegment.md | 54 ++++++ .../docs/ListRecipientsFromContactDbList.md | 54 ++++++ ...tRecipientsFromContactDbList200Response.md | 11 ++ .../docs/ListRecipientsOnASegmentResponse.md | 11 ++ .../docs/ListRecipientsResponse.md | 11 ++ .../lmc_contactdb/docs/ListReservedField.md | 48 +++++ .../docs/ListReservedField200Response.md | 11 ++ ...rvedField200ResponseReservedFieldsInner.md | 12 ++ .../lmc_contactdb/docs/ListSearchRecipient.md | 49 +++++ rest/api/v3/lmc_contactdb/docs/ListSegment.md | 48 +++++ rest/api/v3/lmc_contactdb/docs/ListStatus.md | 48 +++++ .../docs/ListStatus200Response.md | 11 ++ .../docs/ListStatus200ResponseStatusInner.md | 12 ++ rest/api/v3/lmc_contactdb/docs/Operator.md | 16 ++ .../v3/lmc_contactdb/docs/SearchRecipient.md | 48 +++++ .../docs/SearchRecipient200Response.md | 12 ++ ...archRecipient200ResponseRecipientsInner.md | 19 ++ ...esponseRecipientsInnerCustomFieldsInner.md | 14 ++ ...seRecipientsInnerCustomFieldsInnerValue.md | 10 + .../docs/SearchRecipientRequest.md | 12 ++ rest/api/v3/lmc_contactdb/docs/Type.md | 14 ++ .../lmc_contactdb/docs/UpdateAListRequest.md | 11 ++ .../lmc_contactdb/docs/UpdateContactDbList.md | 53 +++++ .../docs/UpdateContactDbList200Response.md | 13 ++ .../v3/lmc_contactdb/docs/UpdateRecipient.md | 49 +++++ .../docs/UpdateRecipientRequestInner.md | 13 ++ .../v3/lmc_contactdb/docs/UpdateSegment.md | 53 +++++ .../docs/UpdateSegmentRequest.md | 13 ++ .../model_add_recipient_request_inner.go | 25 +++ rest/api/v3/lmc_contactdb/model_and_or.go | 24 +++ .../model_contactdb_custom_field.go | 22 +++ .../model_contactdb_custom_field_id2xx.go | 24 +++ .../model_contactdb_custom_field_id_value.go | 26 +++ .../lmc_contactdb/model_contactdb_list2xx.go | 24 +++ .../model_contactdb_recipient200.go | 19 ++ ...contactdb_recipient200_recipients_inner.go | 38 ++++ .../model_contactdb_recipient_count200.go | 20 ++ .../model_contactdb_recipient_response201.go | 29 +++ ...ctdb_recipient_response201_errors_inner.go | 20 ++ .../lmc_contactdb/model_contactdb_segments.go | 26 +++ .../model_contactdb_segments_conditions.go | 22 +++ .../model_contactdb_segments_id200.go | 28 +++ .../model_create_a_list_request.go | 19 ++ .../model_create_custom_field_request.go | 20 ++ .../v3/lmc_contactdb/model_delete_contacts.go | 23 +++ .../v3/lmc_contactdb/model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ .../model_get_recipient_list_200_response.go | 19 ++ .../model_list_all_custom_fields_response.go | 19 ++ .../model_list_all_lists_response.go | 19 ++ .../model_list_all_segments_response.go | 19 ++ ...ients_from_contact_db_list_200_response.go | 19 ++ ...l_list_recipients_on_a_segment_response.go | 19 ++ .../model_list_recipients_response.go | 19 ++ .../model_list_reserved_field_200_response.go | 19 ++ ...ield_200_response_reserved_fields_inner.go | 20 ++ .../model_list_status_200_response.go | 19 ++ ...l_list_status_200_response_status_inner.go | 22 +++ rest/api/v3/lmc_contactdb/model_operator.go | 26 +++ .../model_search_recipient_200_response.go | 20 ++ ...recipient_200_response_recipients_inner.go | 27 +++ ...se_recipients_inner_custom_fields_inner.go | 22 +++ ...ipients_inner_custom_fields_inner_value.go | 18 ++ .../model_search_recipient_request.go | 21 ++ rest/api/v3/lmc_contactdb/model_type.go | 24 +++ .../model_update_a_list_request.go | 20 ++ ...del_update_contact_db_list_200_response.go | 24 +++ .../model_update_recipient_request_inner.go | 23 +++ .../model_update_segment_request.go | 23 +++ rest/api/v3/lmc_senders/.openapi-generator | 32 +++ .../v3/lmc_senders/.openapi-generator-ignore | 23 +++ rest/api/v3/lmc_senders/README.md | 74 +++++++ rest/api/v3/lmc_senders/api_create_sender.go | 81 ++++++++ rest/api/v3/lmc_senders/api_delete_sender.go | 86 ++++++++ rest/api/v3/lmc_senders/api_get_sender.go | 78 ++++++++ rest/api/v3/lmc_senders/api_list_sender.go | 58 ++++++ .../api_reset_sender_verification.go | 86 ++++++++ rest/api/v3/lmc_senders/api_service.go | 34 ++++ rest/api/v3/lmc_senders/api_update_sender.go | 109 +++++++++++ rest/api/v3/lmc_senders/docs/CreateSender.md | 49 +++++ .../docs/CreateSender400Response.md | 11 ++ .../CreateSender400ResponseErrorsInner.md | 12 ++ .../lmc_senders/docs/CreateSenderRequest.md | 19 ++ rest/api/v3/lmc_senders/docs/DeleteSender.md | 52 +++++ rest/api/v3/lmc_senders/docs/GetSender.md | 52 +++++ rest/api/v3/lmc_senders/docs/ListSender.md | 48 +++++ .../lmc_senders/docs/ListSender200Response.md | 11 ++ .../docs/ResetSenderVerification.md | 52 +++++ rest/api/v3/lmc_senders/docs/SenderId.md | 24 +++ .../v3/lmc_senders/docs/SenderIdRequest.md | 19 ++ .../lmc_senders/docs/SenderIdRequestFrom.md | 12 ++ .../docs/SenderIdRequestReplyTo.md | 12 ++ rest/api/v3/lmc_senders/docs/UpdateSender.md | 53 +++++ .../model_create_sender_400_response.go | 19 ++ ...create_sender_400_response_errors_inner.go | 20 ++ .../model_create_sender_request.go | 34 ++++ .../model_list_sender_200_response.go | 19 ++ rest/api/v3/lmc_senders/model_sender_id.go | 44 +++++ .../v3/lmc_senders/model_sender_id_request.go | 34 ++++ .../model_sender_id_request_from.go | 22 +++ .../model_sender_id_request_reply_to.go | 22 +++ rest/api/v3/mail/.openapi-generator | 58 ++++++ rest/api/v3/mail/.openapi-generator-ignore | 23 +++ rest/api/v3/mail/README.md | 85 ++++++++ rest/api/v3/mail/api_create_mail_batch.go | 106 ++++++++++ rest/api/v3/mail/api_get_mail_batch.go | 98 ++++++++++ rest/api/v3/mail/api_send_mail.go | 121 ++++++++++++ rest/api/v3/mail/api_service.go | 34 ++++ rest/api/v3/mail/docs/ContentEncoding.md | 12 ++ rest/api/v3/mail/docs/CreateMailBatch.md | 48 +++++ rest/api/v3/mail/docs/Disposition.md | 13 ++ rest/api/v3/mail/docs/ErrorResponse.md | 12 ++ .../v3/mail/docs/ErrorResponseErrorsInner.md | 13 ++ rest/api/v3/mail/docs/GetMailBatch.md | 48 +++++ rest/api/v3/mail/docs/MailBatchResponse.md | 11 ++ rest/api/v3/mail/docs/MailFrom.md | 12 ++ rest/api/v3/mail/docs/MailTo.md | 12 ++ rest/api/v3/mail/docs/SendMail.md | 49 +++++ rest/api/v3/mail/docs/SendMailRequest.md | 27 +++ rest/api/v3/mail/docs/SendMailRequestAsm.md | 12 ++ .../docs/SendMailRequestAttachmentsInner.md | 15 ++ .../mail/docs/SendMailRequestContentInner.md | 12 ++ .../mail/docs/SendMailRequestMailSettings.md | 16 ++ ...questMailSettingsBypassBounceManagement.md | 11 ++ ...RequestMailSettingsBypassListManagement.md | 11 ++ ...RequestMailSettingsBypassSpamManagement.md | 11 ++ ...MailSettingsBypassUnsubscribeManagement.md | 11 ++ .../docs/SendMailRequestMailSettingsFooter.md | 13 ++ .../SendMailRequestMailSettingsSandboxMode.md | 11 ++ .../SendMailRequestPersonalizationsInner.md | 20 ++ .../docs/SendMailRequestTrackingSettings.md | 14 ++ ...ailRequestTrackingSettingsClickTracking.md | 12 ++ ...ndMailRequestTrackingSettingsGanalytics.md | 16 ++ ...MailRequestTrackingSettingsOpenTracking.md | 12 ++ ...estTrackingSettingsSubscriptionTracking.md | 14 ++ rest/api/v3/mail/model_content_encoding.go | 22 +++ rest/api/v3/mail/model_disposition.go | 23 +++ rest/api/v3/mail/model_error_response.go | 21 ++ .../mail/model_error_response_errors_inner.go | 24 +++ rest/api/v3/mail/model_mail_batch_response.go | 20 ++ rest/api/v3/mail/model_mail_from.go | 22 +++ rest/api/v3/mail/model_mail_to.go | 22 +++ rest/api/v3/mail/model_send_mail_request.go | 47 +++++ .../v3/mail/model_send_mail_request_asm.go | 22 +++ ...del_send_mail_request_attachments_inner.go | 28 +++ .../model_send_mail_request_content_inner.go | 22 +++ .../model_send_mail_request_mail_settings.go | 24 +++ ..._mail_settings_bypass_bounce_management.go | 20 ++ ...st_mail_settings_bypass_list_management.go | 20 ++ ...st_mail_settings_bypass_spam_management.go | 20 ++ ..._settings_bypass_unsubscribe_management.go | 20 ++ ..._send_mail_request_mail_settings_footer.go | 24 +++ ...mail_request_mail_settings_sandbox_mode.go | 20 ++ ...end_mail_request_personalizations_inner.go | 37 ++++ ...del_send_mail_request_tracking_settings.go | 22 +++ ...equest_tracking_settings_click_tracking.go | 22 +++ ...il_request_tracking_settings_ganalytics.go | 30 +++ ...request_tracking_settings_open_tracking.go | 22 +++ ...tracking_settings_subscription_tracking.go | 26 +++ rest/api/v3/mail_settings/.openapi-generator | 52 +++++ .../mail_settings/.openapi-generator-ignore | 23 +++ rest/api/v3/mail_settings/README.md | 86 ++++++++ .../api_list_address_whitelist.go | 58 ++++++ .../v3/mail_settings/api_list_bounce_purge.go | 58 ++++++ rest/api/v3/mail_settings/api_list_footer.go | 58 ++++++ .../mail_settings/api_list_forward_bounce.go | 58 ++++++ .../v3/mail_settings/api_list_forward_spam.go | 58 ++++++ .../v3/mail_settings/api_list_mail_setting.go | 78 ++++++++ .../api/v3/mail_settings/api_list_template.go | 58 ++++++ rest/api/v3/mail_settings/api_service.go | 34 ++++ .../api_update_address_whitelist.go | 73 +++++++ .../mail_settings/api_update_bounce_purge.go | 73 +++++++ .../api/v3/mail_settings/api_update_footer.go | 73 +++++++ .../api_update_forward_bounce.go | 73 +++++++ .../mail_settings/api_update_forward_spam.go | 73 +++++++ .../v3/mail_settings/api_update_template.go | 73 +++++++ .../docs/ListAddressWhitelist.md | 48 +++++ .../v3/mail_settings/docs/ListBouncePurge.md | 48 +++++ rest/api/v3/mail_settings/docs/ListFooter.md | 48 +++++ .../mail_settings/docs/ListForwardBounce.md | 48 +++++ .../v3/mail_settings/docs/ListForwardSpam.md | 48 +++++ .../v3/mail_settings/docs/ListMailSetting.md | 50 +++++ .../docs/ListMailSetting200Response.md | 11 ++ .../ListMailSetting200ResponseResultInner.md | 14 ++ .../api/v3/mail_settings/docs/ListTemplate.md | 48 +++++ .../docs/MailSettingsAddressWhitelabel200.md | 12 ++ .../docs/MailSettingsBouncePurge.md | 13 ++ .../mail_settings/docs/MailSettingsFooter.md | 13 ++ .../docs/MailSettingsForwardBounce.md | 12 ++ .../docs/MailSettingsForwardSpam.md | 12 ++ .../docs/MailSettingsTemplate200.md | 12 ++ .../docs/UpdateAddressWhitelist.md | 49 +++++ .../docs/UpdateAddressWhitelistRequest.md | 12 ++ .../mail_settings/docs/UpdateBouncePurge.md | 49 +++++ .../api/v3/mail_settings/docs/UpdateFooter.md | 49 +++++ .../mail_settings/docs/UpdateForwardBounce.md | 49 +++++ .../mail_settings/docs/UpdateForwardSpam.md | 49 +++++ .../v3/mail_settings/docs/UpdateTemplate.md | 49 +++++ .../docs/UpdateTemplate200Response.md | 12 ++ .../docs/UpdateTemplateRequest.md | 12 ++ .../model_list_mail_setting_200_response.go | 20 ++ ..._mail_setting_200_response_result_inner.go | 26 +++ ...del_mail_settings_address_whitelabel200.go | 22 +++ .../model_mail_settings_bounce_purge.go | 24 +++ .../model_mail_settings_footer.go | 24 +++ .../model_mail_settings_forward_bounce.go | 22 +++ .../model_mail_settings_forward_spam.go | 22 +++ .../model_mail_settings_template200.go | 22 +++ .../model_update_address_whitelist_request.go | 22 +++ .../model_update_template_200_response.go | 22 +++ .../model_update_template_request.go | 22 +++ rest/api/v3/mc_designs/.openapi-generator | 43 ++++ .../v3/mc_designs/.openapi-generator-ignore | 23 +++ rest/api/v3/mc_designs/README.md | 84 ++++++++ rest/api/v3/mc_designs/api_create_design.go | 72 +++++++ rest/api/v3/mc_designs/api_delete_design.go | 76 ++++++++ .../api/v3/mc_designs/api_duplicate_design.go | 91 +++++++++ .../api_duplicate_pre_built_design.go | 91 +++++++++ rest/api/v3/mc_designs/api_get_design.go | 76 ++++++++ .../v3/mc_designs/api_get_pre_built_design.go | 76 ++++++++ rest/api/v3/mc_designs/api_list_design.go | 78 ++++++++ .../mc_designs/api_list_pre_built_design.go | 78 ++++++++ rest/api/v3/mc_designs/api_service.go | 34 ++++ rest/api/v3/mc_designs/api_update_design.go | 91 +++++++++ rest/api/v3/mc_designs/docs/ApiError.md | 13 ++ rest/api/v3/mc_designs/docs/ApiErrors.md | 11 ++ rest/api/v3/mc_designs/docs/CreateDesign.md | 48 +++++ rest/api/v3/mc_designs/docs/DeleteDesign.md | 51 +++++ .../mc_designs/docs/DesignCommonProperties.md | 15 ++ .../mc_designs/docs/DesignDuplicateInput.md | 12 ++ rest/api/v3/mc_designs/docs/DesignInput.md | 14 ++ rest/api/v3/mc_designs/docs/DesignOutput.md | 14 ++ .../v3/mc_designs/docs/DesignOutputSummary.md | 16 ++ .../api/v3/mc_designs/docs/DuplicateDesign.md | 52 +++++ .../docs/DuplicatePreBuiltDesign.md | 52 +++++ rest/api/v3/mc_designs/docs/Editor.md | 13 ++ rest/api/v3/mc_designs/docs/GetDesign.md | 51 +++++ .../v3/mc_designs/docs/GetPreBuiltDesign.md | 51 +++++ rest/api/v3/mc_designs/docs/ListDesign.md | 50 +++++ .../mc_designs/docs/ListDesign200Response.md | 12 ++ .../v3/mc_designs/docs/ListPreBuiltDesign.md | 50 +++++ rest/api/v3/mc_designs/docs/Metadata.md | 14 ++ rest/api/v3/mc_designs/docs/UpdateDesign.md | 52 +++++ .../v3/mc_designs/docs/UpdateDesignRequest.md | 16 ++ rest/api/v3/mc_designs/model_api_error.go | 21 ++ rest/api/v3/mc_designs/model_api_errors.go | 19 ++ .../model_design_common_properties.go | 28 +++ .../model_design_duplicate_input.go | 22 +++ rest/api/v3/mc_designs/model_design_input.go | 26 +++ rest/api/v3/mc_designs/model_design_output.go | 26 +++ .../mc_designs/model_design_output_summary.go | 30 +++ rest/api/v3/mc_designs/model_editor.go | 23 +++ .../model_list_design_200_response.go | 20 ++ rest/api/v3/mc_designs/model_metadata.go | 22 +++ .../mc_designs/model_update_design_request.go | 30 +++ rest/api/v3/mc_lists/.openapi-generator | 45 +++++ .../api/v3/mc_lists/.openapi-generator-ignore | 23 +++ rest/api/v3/mc_lists/README.md | 81 ++++++++ .../v3/mc_lists/api_create_marketing_list.go | 72 +++++++ rest/api/v3/mc_lists/api_delete_contact.go | 78 ++++++++ .../v3/mc_lists/api_delete_marketing_list.go | 88 +++++++++ .../api/v3/mc_lists/api_get_marketing_list.go | 79 ++++++++ .../api/v3/mc_lists/api_list_contact_count.go | 68 +++++++ .../v3/mc_lists/api_list_marketing_list.go | 69 +++++++ rest/api/v3/mc_lists/api_service.go | 34 ++++ .../v3/mc_lists/api_update_marketing_list.go | 91 +++++++++ rest/api/v3/mc_lists/docs/ContactDetails.md | 35 ++++ .../v3/mc_lists/docs/CreateMarketingList.md | 48 +++++ .../docs/CreateMarketingList400Response.md | 11 ++ .../docs/CreateMarketingListRequest.md | 11 ++ rest/api/v3/mc_lists/docs/DeleteContact.md | 51 +++++ .../mc_lists/docs/DeleteContact202Response.md | 11 ++ .../v3/mc_lists/docs/DeleteMarketingList.md | 52 +++++ .../docs/DeleteMarketingList200Response.md | 11 ++ .../docs/DeleteMarketingList404Response.md | 11 ++ rest/api/v3/mc_lists/docs/Error.md | 14 ++ rest/api/v3/mc_lists/docs/GetMarketingList.md | 52 +++++ .../docs/GetMarketingList200Response.md | 15 ++ rest/api/v3/mc_lists/docs/List.md | 14 ++ rest/api/v3/mc_lists/docs/ListContactCount.md | 51 +++++ .../docs/ListContactCount200Response.md | 12 ++ .../api/v3/mc_lists/docs/ListMarketingList.md | 49 +++++ .../docs/ListMarketingList200Response.md | 12 ++ rest/api/v3/mc_lists/docs/Metadata.md | 14 ++ rest/api/v3/mc_lists/docs/SelfMetadata.md | 11 ++ .../v3/mc_lists/docs/UpdateMarketingList.md | 52 +++++ .../docs/UpdateMarketingListRequest.md | 11 ++ rest/api/v3/mc_lists/model_contact_details.go | 47 +++++ ...odel_create_marketing_list_400_response.go | 19 ++ .../model_create_marketing_list_request.go | 20 ++ .../model_delete_contact_202_response.go | 20 ++ ...odel_delete_marketing_list_200_response.go | 20 ++ ...odel_delete_marketing_list_404_response.go | 19 ++ rest/api/v3/mc_lists/model_error.go | 22 +++ .../model_get_marketing_list_200_response.go | 26 +++ rest/api/v3/mc_lists/model_list.go | 25 +++ .../model_list_contact_count_200_response.go | 20 ++ .../model_list_marketing_list_200_response.go | 20 ++ rest/api/v3/mc_lists/model_metadata.go | 26 +++ rest/api/v3/mc_lists/model_self_metadata.go | 20 ++ .../model_update_marketing_list_request.go | 20 ++ rest/api/v3/mc_segments/.openapi-generator | 34 ++++ .../v3/mc_segments/.openapi-generator-ignore | 23 +++ rest/api/v3/mc_segments/README.md | 75 +++++++ rest/api/v3/mc_segments/api_delete_segment.go | 100 ++++++++++ rest/api/v3/mc_segments/api_get_segment.go | 103 ++++++++++ rest/api/v3/mc_segments/api_list_segment.go | 119 ++++++++++++ rest/api/v3/mc_segments/api_service.go | 34 ++++ .../v3/mc_segments/docs/ContactResponse.md | 27 +++ .../docs/ContactResponseCustomFields.md | 12 ++ rest/api/v3/mc_segments/docs/DeleteSegment.md | 51 +++++ rest/api/v3/mc_segments/docs/ErrorResponse.md | 12 ++ .../docs/ErrorResponseErrorsInner.md | 13 ++ rest/api/v3/mc_segments/docs/FullSegment.md | 22 +++ rest/api/v3/mc_segments/docs/GetSegment.md | 52 +++++ .../mc_segments/docs/GetSegment404Response.md | 11 ++ .../docs/GetSegment404ResponseErrorsInner.md | 12 ++ rest/api/v3/mc_segments/docs/ListSegment.md | 50 +++++ .../docs/ListSegment200Response.md | 11 ++ .../docs/ListSegment500Response.md | 11 ++ .../docs/ListSegment500ResponseErrorsInner.md | 11 ++ .../api/v3/mc_segments/docs/SegmentSummary.md | 18 ++ .../api/v3/mc_segments/docs/SegmentWriteV2.md | 13 ++ .../v3/mc_segments/model_contact_response.go | 51 +++++ .../model_contact_response_custom_fields.go | 20 ++ .../v3/mc_segments/model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ rest/api/v3/mc_segments/model_full_segment.go | 43 ++++ .../model_get_segment_404_response.go | 19 ++ ...l_get_segment_404_response_errors_inner.go | 20 ++ .../model_list_segment_200_response.go | 19 ++ .../model_list_segment_500_response.go | 19 ++ ..._list_segment_500_response_errors_inner.go | 19 ++ .../v3/mc_segments/model_segment_summary.go | 35 ++++ .../v3/mc_segments/model_segment_write_v2.go | 24 +++ rest/api/v3/mc_segments_2/.openapi-generator | 42 ++++ .../mc_segments_2/.openapi-generator-ignore | 23 +++ rest/api/v3/mc_segments_2/README.md | 87 +++++++++ .../v3/mc_segments_2/api_create_segment.go | 80 ++++++++ .../v3/mc_segments_2/api_delete_segment.go | 68 +++++++ rest/api/v3/mc_segments_2/api_get_segment.go | 87 +++++++++ rest/api/v3/mc_segments_2/api_list_segment.go | 103 ++++++++++ .../v3/mc_segments_2/api_refresh_segment.go | 91 +++++++++ rest/api/v3/mc_segments_2/api_service.go | 34 ++++ .../v3/mc_segments_2/api_update_segment.go | 91 +++++++++ .../v3/mc_segments_2/docs/AllSegments200.md | 21 ++ .../v3/mc_segments_2/docs/ContactResponse.md | 27 +++ .../docs/ContactResponseCustomFields.md | 12 ++ .../v3/mc_segments_2/docs/CreateSegment.md | 48 +++++ .../v3/mc_segments_2/docs/DeleteSegment.md | 51 +++++ .../v3/mc_segments_2/docs/ErrorsSegmentV2.md | 11 ++ .../docs/ErrorsSegmentV2ErrorsInner.md | 12 ++ rest/api/v3/mc_segments_2/docs/GetSegment.md | 52 +++++ rest/api/v3/mc_segments_2/docs/ListSegment.md | 50 +++++ rest/api/v3/mc_segments_2/docs/Metadata.md | 14 ++ .../v3/mc_segments_2/docs/RefreshSegment.md | 51 +++++ rest/api/v3/mc_segments_2/docs/Segment2xx.md | 25 +++ .../api/v3/mc_segments_2/docs/SegmentError.md | 11 ++ .../mc_segments_2/docs/SegmentRefresh202.md | 11 ++ .../docs/SegmentRefreshRequest.md | 11 ++ .../docs/SegmentStatusResponse.md | 12 ++ .../v3/mc_segments_2/docs/SegmentUpdate.md | 12 ++ .../v3/mc_segments_2/docs/SegmentWriteV2.md | 13 ++ .../v3/mc_segments_2/docs/UpdateSegment.md | 52 +++++ .../v3/mc_segments_2/model_all_segments200.go | 38 ++++ .../mc_segments_2/model_contact_response.go | 51 +++++ .../model_contact_response_custom_fields.go | 20 ++ .../mc_segments_2/model_errors_segment_v2.go | 19 ++ .../model_errors_segment_v2_errors_inner.go | 22 +++ rest/api/v3/mc_segments_2/model_metadata.go | 22 +++ rest/api/v3/mc_segments_2/model_segment2xx.go | 47 +++++ .../v3/mc_segments_2/model_segment_error.go | 20 ++ .../mc_segments_2/model_segment_refresh202.go | 20 ++ .../model_segment_refresh_request.go | 20 ++ .../model_segment_status_response.go | 22 +++ .../v3/mc_segments_2/model_segment_update.go | 22 +++ .../mc_segments_2/model_segment_write_v2.go | 24 +++ rest/api/v3/mc_senders/.openapi-generator | 35 ++++ .../v3/mc_senders/.openapi-generator-ignore | 23 +++ rest/api/v3/mc_senders/README.md | 74 +++++++ rest/api/v3/mc_senders/api_create_sender.go | 97 ++++++++++ rest/api/v3/mc_senders/api_delete_sender.go | 78 ++++++++ rest/api/v3/mc_senders/api_get_sender.go | 78 ++++++++ rest/api/v3/mc_senders/api_list_sender.go | 66 +++++++ .../api_reset_sender_verification.go | 78 ++++++++ rest/api/v3/mc_senders/api_service.go | 34 ++++ rest/api/v3/mc_senders/api_update_sender.go | 109 +++++++++++ rest/api/v3/mc_senders/docs/CreateSender.md | 49 +++++ .../v3/mc_senders/docs/CreateSenderRequest.md | 19 ++ .../docs/CreateSenderRequestFrom.md | 12 ++ .../docs/CreateSenderRequestReplyTo.md | 12 ++ rest/api/v3/mc_senders/docs/DeleteSender.md | 52 +++++ rest/api/v3/mc_senders/docs/ErrorResponse.md | 12 ++ .../docs/ErrorResponseErrorsInner.md | 13 ++ rest/api/v3/mc_senders/docs/GetSender.md | 52 +++++ rest/api/v3/mc_senders/docs/ListSender.md | 48 +++++ .../mc_senders/docs/ListSender200Response.md | 11 ++ .../docs/ResetSenderVerification.md | 52 +++++ rest/api/v3/mc_senders/docs/Sender.md | 24 +++ rest/api/v3/mc_senders/docs/SenderRequest.md | 19 ++ .../v3/mc_senders/docs/SenderRequestFrom.md | 12 ++ .../mc_senders/docs/SenderRequestReplyTo.md | 12 ++ rest/api/v3/mc_senders/docs/UpdateSender.md | 53 +++++ .../mc_senders/model_create_sender_request.go | 34 ++++ .../model_create_sender_request_from.go | 22 +++ .../model_create_sender_request_reply_to.go | 22 +++ .../api/v3/mc_senders/model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ .../model_list_sender_200_response.go | 20 ++ rest/api/v3/mc_senders/model_sender.go | 44 +++++ .../api/v3/mc_senders/model_sender_request.go | 34 ++++ .../mc_senders/model_sender_request_from.go | 22 +++ .../model_sender_request_reply_to.go | 22 +++ rest/api/v3/mc_singlesends/.openapi-generator | 82 ++++++++ .../mc_singlesends/.openapi-generator-ignore | 23 +++ rest/api/v3/mc_singlesends/README.md | 103 ++++++++++ .../mc_singlesends/api_create_single_send.go | 80 ++++++++ .../api_delete_scheduled_single_send.go | 76 ++++++++ .../mc_singlesends/api_delete_single_send.go | 68 +++++++ .../mc_singlesends/api_delete_single_sends.go | 76 ++++++++ .../api_duplicate_single_send.go | 91 +++++++++ .../v3/mc_singlesends/api_get_single_send.go | 76 ++++++++ .../v3/mc_singlesends/api_list_category.go | 56 ++++++ .../v3/mc_singlesends/api_list_single_send.go | 77 ++++++++ .../api_schedule_single_send.go | 91 +++++++++ .../mc_singlesends/api_search_single_send.go | 91 +++++++++ rest/api/v3/mc_singlesends/api_service.go | 34 ++++ .../mc_singlesends/api_update_single_send.go | 99 ++++++++++ .../v3/mc_singlesends/docs/AbTestSummary.md | 17 ++ .../mc_singlesends/docs/CreateSingleSend.md | 48 +++++ .../docs/DeleteScheduledSingleSend.md | 51 +++++ .../mc_singlesends/docs/DeleteSingleSend.md | 51 +++++ .../mc_singlesends/docs/DeleteSingleSends.md | 48 +++++ .../docs/DuplicateSingleSend.md | 52 +++++ .../docs/DuplicateSingleSendRequest.md | 11 ++ rest/api/v3/mc_singlesends/docs/Editor.md | 13 ++ rest/api/v3/mc_singlesends/docs/Editor1.md | 13 ++ .../v3/mc_singlesends/docs/GetSingleSend.md | 51 +++++ rest/api/v3/mc_singlesends/docs/Items.md | 14 ++ .../v3/mc_singlesends/docs/ListCategory.md | 44 +++++ .../docs/ListCategory200Response.md | 11 ++ .../v3/mc_singlesends/docs/ListSingleSend.md | 49 +++++ .../docs/ListSingleSend200Response.md | 12 ++ .../docs/ListSingleSend500Response.md | 11 ++ .../ListSingleSend500ResponseErrorsInner.md | 13 ++ rest/api/v3/mc_singlesends/docs/Metadata.md | 14 ++ .../mc_singlesends/docs/ScheduleSingleSend.md | 52 +++++ .../docs/ScheduleSingleSend201Response.md | 12 ++ .../docs/ScheduleSingleSendRequest.md | 11 ++ .../mc_singlesends/docs/SearchSingleSend.md | 50 +++++ .../mc_singlesends/docs/SinglesendRequest.md | 15 ++ .../docs/SinglesendRequestEmailConfig.md | 20 ++ .../docs/SinglesendRequestSendTo.md | 13 ++ .../mc_singlesends/docs/SinglesendResponse.md | 20 ++ .../docs/SinglesendResponseEmailConfig.md | 20 ++ .../docs/SinglesendResponseSendTo.md | 13 ++ .../docs/SinglesendResponseShort.md | 19 ++ .../docs/SinglesendResponseWarningsInner.md | 13 ++ .../mc_singlesends/docs/SinglesendSchedule.md | 12 ++ .../mc_singlesends/docs/SinglesendSearch.md | 13 ++ rest/api/v3/mc_singlesends/docs/Status.md | 12 ++ rest/api/v3/mc_singlesends/docs/Status1.md | 14 ++ rest/api/v3/mc_singlesends/docs/Status2.md | 14 ++ rest/api/v3/mc_singlesends/docs/Status3.md | 14 ++ rest/api/v3/mc_singlesends/docs/Type.md | 13 ++ .../mc_singlesends/docs/UpdateSingleSend.md | 52 +++++ .../v3/mc_singlesends/docs/WinnerCriteria.md | 14 ++ .../mc_singlesends/model_ab_test_summary.go | 32 +++ .../model_duplicate_single_send_request.go | 20 ++ rest/api/v3/mc_singlesends/model_editor.go | 23 +++ rest/api/v3/mc_singlesends/model_editor1.go | 23 +++ rest/api/v3/mc_singlesends/model_items.go | 24 +++ .../model_list_category_200_response.go | 20 ++ .../model_list_single_send_200_response.go | 20 ++ .../model_list_single_send_500_response.go | 19 ++ ...t_single_send_500_response_errors_inner.go | 21 ++ rest/api/v3/mc_singlesends/model_metadata.go | 22 +++ ...model_schedule_single_send_201_response.go | 25 +++ .../model_schedule_single_send_request.go | 24 +++ .../model_singlesend_request.go | 30 +++ .../model_singlesend_request_email_config.go | 38 ++++ .../model_singlesend_request_send_to.go | 24 +++ .../model_singlesend_response.go | 39 ++++ .../model_singlesend_response_email_config.go | 38 ++++ .../model_singlesend_response_send_to.go | 24 +++ .../model_singlesend_response_short.go | 38 ++++ ...odel_singlesend_response_warnings_inner.go | 21 ++ .../model_singlesend_schedule.go | 25 +++ .../mc_singlesends/model_singlesend_search.go | 24 +++ rest/api/v3/mc_singlesends/model_status.go | 22 +++ rest/api/v3/mc_singlesends/model_status1.go | 24 +++ rest/api/v3/mc_singlesends/model_status2.go | 24 +++ rest/api/v3/mc_singlesends/model_status3.go | 24 +++ rest/api/v3/mc_singlesends/model_type.go | 23 +++ .../mc_singlesends/model_winner_criteria.go | 24 +++ rest/api/v3/mc_test/.openapi-generator | 12 ++ rest/api/v3/mc_test/.openapi-generator-ignore | 23 +++ rest/api/v3/mc_test/README.md | 62 ++++++ .../mc_test/api_send_test_marketing_email.go | 72 +++++++ rest/api/v3/mc_test/api_service.go | 34 ++++ rest/api/v3/mc_test/docs/ErrorResponse.md | 12 ++ .../mc_test/docs/ErrorResponseErrorsInner.md | 13 ++ .../v3/mc_test/docs/SendTestMarketingEmail.md | 48 +++++ .../docs/SendTestMarketingEmailRequest.md | 17 ++ rest/api/v3/mc_test/model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ ...model_send_test_marketing_email_request.go | 31 +++ rest/api/v3/partner/.openapi-generator | 10 + rest/api/v3/partner/.openapi-generator-ignore | 23 +++ rest/api/v3/partner/README.md | 61 ++++++ .../v3/partner/api_list_partner_setting.go | 78 ++++++++ rest/api/v3/partner/api_service.go | 34 ++++ .../api/v3/partner/docs/ListPartnerSetting.md | 50 +++++ .../docs/ListPartnerSetting200Response.md | 11 ++ ...istPartnerSetting200ResponseResultInner.md | 14 ++ ...model_list_partner_setting_200_response.go | 19 ++ ...rtner_setting_200_response_result_inner.go | 26 +++ .../.openapi-generator | 12 ++ .../.openapi-generator-ignore | 23 +++ rest/api/v3/recipients_data_erasure/README.md | 62 ++++++ .../api_erase_recipient_email_data.go | 73 +++++++ .../v3/recipients_data_erasure/api_service.go | 34 ++++ .../docs/EraseRecipientEmailData.md | 48 +++++ ...pientsDataErasureEraseRecipientsRequest.md | 11 ++ .../docs/RecipientsDataErasureErrorV1.md | 12 ++ .../docs/RecipientsDataErasureJobId.md | 11 ++ ...s_data_erasure_erase_recipients_request.go | 20 ++ .../model_recipients_data_erasure_error_v1.go | 22 +++ .../model_recipients_data_erasure_job_id.go | 20 ++ rest/api/v3/reverse_dns/.openapi-generator | 40 ++++ .../v3/reverse_dns/.openapi-generator-ignore | 23 +++ rest/api/v3/reverse_dns/README.md | 84 ++++++++ .../v3/reverse_dns/api_delete_reverse_dns.go | 69 +++++++ .../api/v3/reverse_dns/api_get_reverse_dns.go | 69 +++++++ .../v3/reverse_dns/api_list_reverse_dns.go | 87 +++++++++ rest/api/v3/reverse_dns/api_service.go | 34 ++++ .../v3/reverse_dns/api_set_up_reverse_dns.go | 73 +++++++ .../reverse_dns/api_validate_reverse_dns.go | 85 ++++++++ .../v3/reverse_dns/docs/DeleteReverseDns.md | 52 +++++ rest/api/v3/reverse_dns/docs/GetReverseDns.md | 52 +++++ .../api/v3/reverse_dns/docs/ListReverseDns.md | 51 +++++ rest/api/v3/reverse_dns/docs/ReverseDns.md | 20 ++ .../v3/reverse_dns/docs/ReverseDnsARecord.md | 14 ++ .../reverse_dns/docs/ReverseDnsUsersInner.md | 12 ++ .../v3/reverse_dns/docs/SetUpReverseDns.md | 49 +++++ .../docs/SetUpReverseDnsRequest.md | 13 ++ rest/api/v3/reverse_dns/docs/Valid.md | 13 ++ rest/api/v3/reverse_dns/docs/Valid1.md | 13 ++ .../v3/reverse_dns/docs/ValidateReverseDns.md | 52 +++++ .../docs/ValidateReverseDns200Response.md | 13 ++ ...eReverseDns200ResponseValidationResults.md | 11 ++ ...eDns200ResponseValidationResultsARecord.md | 12 ++ .../docs/ValidateReverseDns404Response.md | 11 ++ ...alidateReverseDns404ResponseErrorsInner.md | 11 ++ .../docs/ValidateReverseDns500Response.md | 11 ++ ...alidateReverseDns500ResponseErrorsInner.md | 11 ++ rest/api/v3/reverse_dns/model_reverse_dns.go | 37 ++++ .../reverse_dns/model_reverse_dns_a_record.go | 26 +++ .../model_reverse_dns_users_inner.go | 22 +++ .../model_set_up_reverse_dns_request.go | 24 +++ rest/api/v3/reverse_dns/model_valid.go | 23 +++ rest/api/v3/reverse_dns/model_valid1.go | 23 +++ ...model_validate_reverse_dns_200_response.go | 23 +++ ...rse_dns_200_response_validation_results.go | 19 ++ ...00_response_validation_results_a_record.go | 22 +++ ...model_validate_reverse_dns_404_response.go | 20 ++ ...e_reverse_dns_404_response_errors_inner.go | 20 ++ ...model_validate_reverse_dns_500_response.go | 20 ++ ...e_reverse_dns_500_response_errors_inner.go | 20 ++ .../api/v3/scheduled_sends/.openapi-generator | 31 +++ .../scheduled_sends/.openapi-generator-ignore | 23 +++ rest/api/v3/scheduled_sends/README.md | 82 ++++++++ .../api_create_scheduled_send.go | 105 ++++++++++ .../api_delete_scheduled_send.go | 93 +++++++++ .../scheduled_sends/api_get_scheduled_send.go | 101 ++++++++++ .../api_list_scheduled_send.go | 90 +++++++++ rest/api/v3/scheduled_sends/api_service.go | 34 ++++ .../api_update_scheduled_send.go | 108 +++++++++++ .../CancelOrPauseAScheduledSendRequest.md | 12 ++ .../docs/CreateScheduledSend.md | 49 +++++ .../docs/DeleteScheduledSend.md | 52 +++++ .../v3/scheduled_sends/docs/ErrorResponse.md | 12 ++ .../docs/ErrorResponseErrorsInner.md | 13 ++ .../scheduled_sends/docs/GetScheduledSend.md | 52 +++++ .../scheduled_sends/docs/ListScheduledSend.md | 48 +++++ .../v3/scheduled_sends/docs/MailBatchId.md | 11 ++ .../docs/ScheduledSendStatus.md | 12 ++ rest/api/v3/scheduled_sends/docs/Status.md | 13 ++ rest/api/v3/scheduled_sends/docs/Status1.md | 13 ++ rest/api/v3/scheduled_sends/docs/Status2.md | 13 ++ .../docs/UpdateScheduledSend.md | 53 +++++ .../docs/UpdateScheduledSendRequest.md | 11 ++ ...ancel_or_pause_a_scheduled_send_request.go | 22 +++ .../scheduled_sends/model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ .../v3/scheduled_sends/model_mail_batch_id.go | 19 ++ .../model_scheduled_send_status.go | 21 ++ rest/api/v3/scheduled_sends/model_status.go | 23 +++ rest/api/v3/scheduled_sends/model_status1.go | 23 +++ rest/api/v3/scheduled_sends/model_status2.go | 23 +++ .../model_update_scheduled_send_request.go | 20 ++ rest/api/v3/seq/.openapi-generator | 18 ++ rest/api/v3/seq/.openapi-generator-ignore | 23 +++ rest/api/v3/seq/README.md | 71 +++++++ .../seq/api_list_engagement_quality_score.go | 69 +++++++ ...i_list_subuser_engagement_quality_score.go | 78 ++++++++ rest/api/v3/seq/api_service.go | 34 ++++ .../v3/seq/docs/ListEngagementQualityScore.md | 48 +++++ .../docs/ListSubuserEngagementQualityScore.md | 50 +++++ rest/api/v3/seq/docs/SeqError.md | 12 ++ rest/api/v3/seq/docs/SeqMetadata.md | 11 ++ rest/api/v3/seq/docs/SeqMetadataNextParams.md | 11 ++ rest/api/v3/seq/docs/SeqMetrics.md | 15 ++ rest/api/v3/seq/docs/SeqScore.md | 15 ++ rest/api/v3/seq/model_seq_error.go | 22 +++ rest/api/v3/seq/model_seq_metadata.go | 19 ++ .../v3/seq/model_seq_metadata_next_params.go | 20 ++ rest/api/v3/seq/model_seq_metrics.go | 28 +++ rest/api/v3/seq/model_seq_score.go | 27 +++ rest/api/v3/sso/.openapi-generator | 64 ++++++ rest/api/v3/sso/.openapi-generator-ignore | 23 +++ rest/api/v3/sso/README.md | 94 +++++++++ rest/api/v3/sso/api_create_sso_certificate.go | 104 ++++++++++ rest/api/v3/sso/api_create_sso_integration.go | 104 ++++++++++ rest/api/v3/sso/api_create_sso_teammate.go | 104 ++++++++++ rest/api/v3/sso/api_delete_sso_certificate.go | 100 ++++++++++ rest/api/v3/sso/api_delete_sso_integration.go | 92 +++++++++ rest/api/v3/sso/api_get_sso_certificate.go | 100 ++++++++++ rest/api/v3/sso/api_get_sso_integration.go | 111 +++++++++++ rest/api/v3/sso/api_list_sso_integration.go | 100 ++++++++++ .../api_list_sso_integration_certificate.go | 100 ++++++++++ rest/api/v3/sso/api_service.go | 34 ++++ rest/api/v3/sso/api_update_sso_certificate.go | 115 +++++++++++ rest/api/v3/sso/api_update_sso_integration.go | 125 ++++++++++++ rest/api/v3/sso/api_update_sso_teammate.go | 115 +++++++++++ rest/api/v3/sso/docs/CreateSsoCertificate.md | 48 +++++ .../sso/docs/CreateSsoCertificateRequest.md | 13 ++ rest/api/v3/sso/docs/CreateSsoIntegration.md | 48 +++++ rest/api/v3/sso/docs/CreateSsoTeammate.md | 48 +++++ rest/api/v3/sso/docs/DeleteSsoCertificate.md | 51 +++++ rest/api/v3/sso/docs/DeleteSsoIntegration.md | 51 +++++ rest/api/v3/sso/docs/GetSsoCertificate.md | 51 +++++ rest/api/v3/sso/docs/GetSsoIntegration.md | 52 +++++ rest/api/v3/sso/docs/ListSsoIntegration.md | 48 +++++ .../sso/docs/ListSsoIntegrationCertificate.md | 51 +++++ rest/api/v3/sso/docs/PatchSsoTeammates200.md | 29 +++ rest/api/v3/sso/docs/PermissionType.md | 13 ++ rest/api/v3/sso/docs/PermissionType1.md | 13 ++ rest/api/v3/sso/docs/Persona.md | 15 ++ .../sso/docs/PostPatchIntegrationRequest.md | 16 ++ rest/api/v3/sso/docs/PostSsoTeammates201.md | 18 ++ .../v3/sso/docs/PostSsoTeammatesRequest.md | 18 ++ rest/api/v3/sso/docs/SsoCertificateBody.md | 15 ++ rest/api/v3/sso/docs/SsoErrorResponseInner.md | 13 ++ rest/api/v3/sso/docs/SsoIntegration.md | 20 ++ .../sso/docs/SsoTeammatesBaseRequestProps.md | 17 ++ ...matesBaseRequestPropsSubuserAccessInner.md | 13 ++ .../sso/docs/SsoTeammatesBaseResponseProps.md | 16 ++ ...TeammatesRestrictedSubuserResponseProps.md | 12 ++ ...dSubuserResponsePropsSubuserAccessInner.md | 16 ++ rest/api/v3/sso/docs/UpdateSsoCertificate.md | 52 +++++ .../sso/docs/UpdateSsoCertificateRequest.md | 13 ++ rest/api/v3/sso/docs/UpdateSsoIntegration.md | 53 +++++ rest/api/v3/sso/docs/UpdateSsoTeammate.md | 52 +++++ rest/api/v3/sso/docs/UserType.md | 14 ++ .../model_create_sso_certificate_request.go | 24 +++ .../v3/sso/model_patch_sso_teammates200.go | 56 ++++++ rest/api/v3/sso/model_permission_type.go | 23 +++ rest/api/v3/sso/model_permission_type1.go | 23 +++ rest/api/v3/sso/model_persona.go | 25 +++ .../model_post_patch_integration_request.go | 30 +++ .../api/v3/sso/model_post_sso_teammates201.go | 34 ++++ .../sso/model_post_sso_teammates_request.go | 34 ++++ rest/api/v3/sso/model_sso_certificate_body.go | 28 +++ .../v3/sso/model_sso_error_response_inner.go | 21 ++ rest/api/v3/sso/model_sso_integration.go | 38 ++++ .../model_sso_teammates_base_request_props.go | 32 +++ ...base_request_props_subuser_access_inner.go | 24 +++ ...model_sso_teammates_base_response_props.go | 30 +++ ...mates_restricted_subuser_response_props.go | 22 +++ ...ser_response_props_subuser_access_inner.go | 30 +++ .../model_update_sso_certificate_request.go | 24 +++ rest/api/v3/sso/model_user_type.go | 24 +++ rest/api/v3/stats/.openapi-generator | 80 ++++++++ rest/api/v3/stats/.openapi-generator-ignore | 23 +++ rest/api/v3/stats/README.md | 104 ++++++++++ rest/api/v3/stats/api_get_client_stat.go | 98 ++++++++++ rest/api/v3/stats/api_list_browser_stat.go | 114 +++++++++++ rest/api/v3/stats/api_list_category.go | 95 +++++++++ rest/api/v3/stats/api_list_category_stat.go | 96 +++++++++ .../v3/stats/api_list_category_stat_sum.go | 123 ++++++++++++ rest/api/v3/stats/api_list_client_stat.go | 87 +++++++++ rest/api/v3/stats/api_list_device_stat.go | 105 ++++++++++ rest/api/v3/stats/api_list_geo_stat.go | 114 +++++++++++ .../stats/api_list_mailbox_provider_stat.go | 114 +++++++++++ rest/api/v3/stats/api_list_stat.go | 105 ++++++++++ rest/api/v3/stats/api_service.go | 34 ++++ rest/api/v3/stats/docs/AdvancedStatsClicks.md | 12 ++ .../v3/stats/docs/AdvancedStatsClicksOpens.md | 14 ++ .../docs/AdvancedStatsMailboxProvider.md | 18 ++ rest/api/v3/stats/docs/AdvancedStatsOpens.md | 12 ++ rest/api/v3/stats/docs/AggregatedBy.md | 14 ++ rest/api/v3/stats/docs/AggregatedBy1.md | 14 ++ rest/api/v3/stats/docs/AggregatedBy2.md | 14 ++ rest/api/v3/stats/docs/AggregatedBy3.md | 14 ++ rest/api/v3/stats/docs/CategoryStats.md | 12 ++ .../v3/stats/docs/CategoryStatsStatsInner.md | 13 ++ .../docs/CategoryStatsStatsInnerMetrics.md | 26 +++ rest/api/v3/stats/docs/ClientType.md | 15 ++ rest/api/v3/stats/docs/Country.md | 13 ++ rest/api/v3/stats/docs/GetClientStat.md | 54 ++++++ rest/api/v3/stats/docs/ListBrowserStat.md | 53 +++++ .../docs/ListBrowserStat200ResponseInner.md | 12 ++ ...stBrowserStat200ResponseInnerStatsInner.md | 13 ++ rest/api/v3/stats/docs/ListCategory.md | 51 +++++ .../docs/ListCategory200ResponseInner.md | 11 ++ .../v3/stats/docs/ListCategory400Response.md | 11 ++ .../ListCategory400ResponseErrorsInner.md | 12 ++ rest/api/v3/stats/docs/ListCategoryStat.md | 50 +++++ rest/api/v3/stats/docs/ListCategoryStatSum.md | 54 ++++++ rest/api/v3/stats/docs/ListClientStat.md | 50 +++++ .../docs/ListClientStat200ResponseInner.md | 12 ++ ...istClientStat200ResponseInnerStatsInner.md | 13 ++ rest/api/v3/stats/docs/ListDeviceStat.md | 52 +++++ rest/api/v3/stats/docs/ListGeoStat.md | 53 +++++ .../stats/docs/ListGeoStat200ResponseInner.md | 12 ++ .../ListGeoStat200ResponseInnerStatsInner.md | 13 ++ .../v3/stats/docs/ListMailboxProviderStat.md | 53 +++++ ...ListMailboxProviderStat200ResponseInner.md | 12 ++ ...xProviderStat200ResponseInnerStatsInner.md | 13 ++ rest/api/v3/stats/docs/ListStat.md | 52 +++++ .../v3/stats/docs/ListStat200ResponseInner.md | 12 ++ .../ListStat200ResponseInnerStatsInner.md | 11 ++ rest/api/v3/stats/docs/SortByDirection.md | 13 ++ .../v3/stats/docs/StatsAdvancedGlobalStats.md | 26 +++ .../v3/stats/model_advanced_stats_clicks.go | 22 +++ .../model_advanced_stats_clicks_opens.go | 26 +++ .../model_advanced_stats_mailbox_provider.go | 34 ++++ .../v3/stats/model_advanced_stats_opens.go | 22 +++ rest/api/v3/stats/model_aggregated_by.go | 24 +++ rest/api/v3/stats/model_aggregated_by1.go | 24 +++ rest/api/v3/stats/model_aggregated_by2.go | 24 +++ rest/api/v3/stats/model_aggregated_by3.go | 24 +++ rest/api/v3/stats/model_category_stats.go | 21 ++ .../stats/model_category_stats_stats_inner.go | 23 +++ ...odel_category_stats_stats_inner_metrics.go | 50 +++++ rest/api/v3/stats/model_client_type.go | 25 +++ rest/api/v3/stats/model_country.go | 23 +++ ...el_list_browser_stat_200_response_inner.go | 22 +++ ...ser_stat_200_response_inner_stats_inner.go | 23 +++ .../model_list_category_200_response_inner.go | 20 ++ .../stats/model_list_category_400_response.go | 20 ++ ...list_category_400_response_errors_inner.go | 21 ++ ...del_list_client_stat_200_response_inner.go | 22 +++ ...ent_stat_200_response_inner_stats_inner.go | 23 +++ .../model_list_geo_stat_200_response_inner.go | 22 +++ ...geo_stat_200_response_inner_stats_inner.go | 23 +++ ...ailbox_provider_stat_200_response_inner.go | 22 +++ ...der_stat_200_response_inner_stats_inner.go | 23 +++ .../model_list_stat_200_response_inner.go | 22 +++ ...ist_stat_200_response_inner_stats_inner.go | 19 ++ rest/api/v3/stats/model_sort_by_direction.go | 23 +++ .../model_stats_advanced_global_stats.go | 50 +++++ rest/api/v3/subusers/.openapi-generator | 95 +++++++++ .../api/v3/subusers/.openapi-generator-ignore | 23 +++ rest/api/v3/subusers/README.md | 106 ++++++++++ rest/api/v3/subusers/api_create_subuser.go | 96 +++++++++ rest/api/v3/subusers/api_delete_subuser.go | 68 +++++++ .../api/v3/subusers/api_get_subuser_credit.go | 68 +++++++ rest/api/v3/subusers/api_list_monthly_stat.go | 105 ++++++++++ rest/api/v3/subusers/api_list_reputation.go | 59 ++++++ rest/api/v3/subusers/api_list_stat.go | 105 ++++++++++ rest/api/v3/subusers/api_list_stat_sum.go | 114 +++++++++++ rest/api/v3/subusers/api_list_subuser.go | 104 ++++++++++ .../subusers/api_list_subuser_monthly_stat.go | 107 ++++++++++ rest/api/v3/subusers/api_service.go | 34 ++++ rest/api/v3/subusers/api_update_subuser.go | 99 ++++++++++ .../v3/subusers/api_update_subuser_credit.go | 83 ++++++++ rest/api/v3/subusers/api_update_subuser_ip.go | 83 ++++++++ .../api_update_subuser_remaining_credit.go | 83 ++++++++ .../api_update_subuser_website_access.go | 75 +++++++ rest/api/v3/subusers/docs/AggregatedBy.md | 14 ++ rest/api/v3/subusers/docs/CategoryStats.md | 12 ++ .../subusers/docs/CategoryStatsStatsInner.md | 13 ++ .../docs/CategoryStatsStatsInnerMetrics.md | 26 +++ rest/api/v3/subusers/docs/CreateSubuser.md | 48 +++++ .../v3/subusers/docs/CreateSubuserRequest.md | 16 ++ rest/api/v3/subusers/docs/DeleteSubuser.md | 51 +++++ rest/api/v3/subusers/docs/ErrorResponse.md | 12 ++ .../subusers/docs/ErrorResponseErrorsInner.md | 13 ++ rest/api/v3/subusers/docs/GetSubuserCredit.md | 51 +++++ rest/api/v3/subusers/docs/ListMonthlyStat.md | 52 +++++ rest/api/v3/subusers/docs/ListReputation.md | 48 +++++ .../docs/ListReputation200ResponseInner.md | 12 ++ rest/api/v3/subusers/docs/ListStat.md | 51 +++++ rest/api/v3/subusers/docs/ListStatSum.md | 53 +++++ rest/api/v3/subusers/docs/ListSubuser.md | 52 +++++ .../subusers/docs/ListSubuserMonthlyStat.md | 55 ++++++ rest/api/v3/subusers/docs/Region.md | 14 ++ rest/api/v3/subusers/docs/Region1.md | 13 ++ rest/api/v3/subusers/docs/Region2.md | 13 ++ rest/api/v3/subusers/docs/Region3.md | 13 ++ rest/api/v3/subusers/docs/ResetFrequency.md | 14 ++ rest/api/v3/subusers/docs/ResetFrequency1.md | 14 ++ rest/api/v3/subusers/docs/SortByDirection.md | 13 ++ rest/api/v3/subusers/docs/SortByDirection1.md | 13 ++ rest/api/v3/subusers/docs/SortByDirection2.md | 13 ++ rest/api/v3/subusers/docs/SortByMetric.md | 20 ++ rest/api/v3/subusers/docs/Subuser.md | 15 ++ rest/api/v3/subusers/docs/SubuserCredits.md | 15 ++ .../v3/subusers/docs/SubuserCreditsRequest.md | 13 ++ rest/api/v3/subusers/docs/SubuserPost.md | 15 ++ .../docs/SubuserPostCreditAllocation.md | 11 ++ rest/api/v3/subusers/docs/SubuserStats.md | 12 ++ .../subusers/docs/SubuserStatsStatsInner.md | 15 ++ .../docs/SubuserStatsStatsInnerMetrics.md | 26 +++ rest/api/v3/subusers/docs/Type.md | 14 ++ rest/api/v3/subusers/docs/Type1.md | 14 ++ rest/api/v3/subusers/docs/UpdateSubuser.md | 52 +++++ .../v3/subusers/docs/UpdateSubuserCredit.md | 51 +++++ rest/api/v3/subusers/docs/UpdateSubuserIp.md | 52 +++++ .../docs/UpdateSubuserIp200Response.md | 11 ++ .../docs/UpdateSubuserRemainingCredit.md | 51 +++++ .../UpdateSubuserRemainingCreditRequest.md | 11 ++ .../v3/subusers/docs/UpdateSubuserRequest.md | 11 ++ .../docs/UpdateSubuserWebsiteAccess.md | 52 +++++ .../docs/UpdateSubuserWebsiteAccessRequest.md | 11 ++ rest/api/v3/subusers/model_aggregated_by.go | 24 +++ rest/api/v3/subusers/model_category_stats.go | 21 ++ .../model_category_stats_stats_inner.go | 23 +++ ...odel_category_stats_stats_inner_metrics.go | 50 +++++ .../subusers/model_create_subuser_request.go | 30 +++ rest/api/v3/subusers/model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ ...odel_list_reputation_200_response_inner.go | 22 +++ rest/api/v3/subusers/model_region.go | 24 +++ rest/api/v3/subusers/model_region1.go | 23 +++ rest/api/v3/subusers/model_region2.go | 23 +++ rest/api/v3/subusers/model_region3.go | 23 +++ rest/api/v3/subusers/model_reset_frequency.go | 24 +++ .../api/v3/subusers/model_reset_frequency1.go | 24 +++ .../v3/subusers/model_sort_by_direction.go | 23 +++ .../v3/subusers/model_sort_by_direction1.go | 23 +++ .../v3/subusers/model_sort_by_direction2.go | 23 +++ rest/api/v3/subusers/model_sort_by_metric.go | 30 +++ rest/api/v3/subusers/model_subuser.go | 28 +++ rest/api/v3/subusers/model_subuser_credits.go | 28 +++ .../subusers/model_subuser_credits_request.go | 24 +++ rest/api/v3/subusers/model_subuser_post.go | 27 +++ .../model_subuser_post_credit_allocation.go | 19 ++ rest/api/v3/subusers/model_subuser_stats.go | 22 +++ .../model_subuser_stats_stats_inner.go | 27 +++ ...model_subuser_stats_stats_inner_metrics.go | 50 +++++ rest/api/v3/subusers/model_type.go | 24 +++ rest/api/v3/subusers/model_type1.go | 24 +++ .../model_update_subuser_ip_200_response.go | 20 ++ ...update_subuser_remaining_credit_request.go | 20 ++ .../subusers/model_update_subuser_request.go | 20 ++ ...l_update_subuser_website_access_request.go | 20 ++ rest/api/v3/teammates/.openapi-generator | 65 +++++++ .../v3/teammates/.openapi-generator-ignore | 23 +++ rest/api/v3/teammates/README.md | 89 +++++++++ .../teammates/api_delete_pending_teammate.go | 69 +++++++ rest/api/v3/teammates/api_delete_teammate.go | 69 +++++++ rest/api/v3/teammates/api_get_teammate.go | 69 +++++++ rest/api/v3/teammates/api_invite_teammate.go | 81 ++++++++ .../v3/teammates/api_list_pending_teammate.go | 58 ++++++ .../teammates/api_list_subuser_by_template.go | 121 ++++++++++++ rest/api/v3/teammates/api_list_teammate.go | 78 ++++++++ .../teammates/api_resend_teammate_invite.go | 77 ++++++++ rest/api/v3/teammates/api_service.go | 34 ++++ rest/api/v3/teammates/api_update_teammate.go | 100 ++++++++++ .../teammates/docs/DeletePendingTeammate.md | 52 +++++ rest/api/v3/teammates/docs/DeleteTeammate.md | 52 +++++ rest/api/v3/teammates/docs/GetTeammate.md | 52 +++++ .../teammates/docs/GetTeammate200Response.md | 25 +++ rest/api/v3/teammates/docs/InviteTeammate.md | 49 +++++ .../docs/InviteTeammate201Response.md | 14 ++ .../docs/InviteTeammate400Response.md | 11 ++ .../InviteTeammate400ResponseErrorsInner.md | 12 ++ .../teammates/docs/InviteTeammateRequest.md | 13 ++ .../v3/teammates/docs/ListPendingTeammate.md | 48 +++++ .../docs/ListPendingTeammate200Response.md | 11 ++ ...stPendingTeammate200ResponseResultInner.md | 15 ++ .../teammates/docs/ListSubuserByTemplate.md | 54 ++++++ .../docs/ListSubuserByTemplate200Response.md | 13 ++ ...istSubuserByTemplate200ResponseMetadata.md | 11 ++ ...ByTemplate200ResponseMetadataNextParams.md | 13 ++ ...ByTemplate200ResponseSubuserAccessInner.md | 16 ++ .../docs/ListSubuserByTemplate400Response.md | 11 ++ ...SubuserByTemplate400ResponseErrorsInner.md | 12 ++ rest/api/v3/teammates/docs/ListTeammate.md | 50 +++++ .../teammates/docs/ListTeammate200Response.md | 11 ++ .../ListTeammate200ResponseResultInner.md | 24 +++ rest/api/v3/teammates/docs/PermissionType.md | 13 ++ .../v3/teammates/docs/ResendTeammateInvite.md | 52 +++++ .../docs/ResendTeammateInvite200Response.md | 14 ++ rest/api/v3/teammates/docs/UpdateTeammate.md | 53 +++++ .../docs/UpdateTeammate200Response.md | 25 +++ .../teammates/docs/UpdateTeammateRequest.md | 12 ++ rest/api/v3/teammates/docs/UserType.md | 14 ++ rest/api/v3/teammates/docs/UserType1.md | 14 ++ rest/api/v3/teammates/docs/UserType2.md | 14 ++ .../model_get_teammate_200_response.go | 48 +++++ .../model_invite_teammate_201_response.go | 26 +++ .../model_invite_teammate_400_response.go | 19 ++ ...vite_teammate_400_response_errors_inner.go | 20 ++ .../model_invite_teammate_request.go | 24 +++ ...odel_list_pending_teammate_200_response.go | 19 ++ ...ding_teammate_200_response_result_inner.go | 28 +++ ...l_list_subuser_by_template_200_response.go | 23 +++ ...user_by_template_200_response__metadata.go | 19 ++ ...late_200_response__metadata_next_params.go | 24 +++ ...plate_200_response_subuser_access_inner.go | 30 +++ ...l_list_subuser_by_template_400_response.go | 19 ++ ...r_by_template_400_response_errors_inner.go | 22 +++ .../model_list_teammate_200_response.go | 19 ++ ...list_teammate_200_response_result_inner.go | 46 +++++ .../api/v3/teammates/model_permission_type.go | 23 +++ ...del_resend_teammate_invite_200_response.go | 26 +++ .../model_update_teammate_200_response.go | 48 +++++ .../model_update_teammate_request.go | 22 +++ rest/api/v3/teammates/model_user_type.go | 24 +++ rest/api/v3/teammates/model_user_type1.go | 24 +++ rest/api/v3/teammates/model_user_type2.go | 24 +++ rest/api/v3/templates/.openapi-generator | 65 +++++++ .../v3/templates/.openapi-generator-ignore | 23 +++ rest/api/v3/templates/README.md | 93 +++++++++ .../api_activate_template_version.go | 78 ++++++++ rest/api/v3/templates/api_create_template.go | 73 +++++++ .../templates/api_create_template_version.go | 84 ++++++++ rest/api/v3/templates/api_delete_template.go | 69 +++++++ .../templates/api_delete_template_version.go | 69 +++++++ .../v3/templates/api_duplicate_template.go | 84 ++++++++ rest/api/v3/templates/api_get_template.go | 69 +++++++ .../v3/templates/api_get_template_version.go | 78 ++++++++ rest/api/v3/templates/api_list_template.go | 95 +++++++++ rest/api/v3/templates/api_service.go | 34 ++++ rest/api/v3/templates/api_update_template.go | 84 ++++++++ .../templates/api_update_template_version.go | 93 +++++++++ .../templates/docs/ActivateTemplateVersion.md | 53 +++++ rest/api/v3/templates/docs/Active.md | 13 ++ rest/api/v3/templates/docs/Active1.md | 13 ++ rest/api/v3/templates/docs/CreateTemplate.md | 49 +++++ .../templates/docs/CreateTemplateRequest.md | 12 ++ .../templates/docs/CreateTemplateVersion.md | 53 +++++ rest/api/v3/templates/docs/DeleteTemplate.md | 52 +++++ .../templates/docs/DeleteTemplateVersion.md | 53 +++++ .../v3/templates/docs/DuplicateTemplate.md | 53 +++++ .../docs/DuplicateTemplateRequest.md | 11 ++ rest/api/v3/templates/docs/Editor.md | 13 ++ rest/api/v3/templates/docs/Editor1.md | 13 ++ rest/api/v3/templates/docs/Generation.md | 13 ++ rest/api/v3/templates/docs/Generation1.md | 13 ++ rest/api/v3/templates/docs/Generations.md | 14 ++ rest/api/v3/templates/docs/GetTemplate.md | 52 +++++ .../v3/templates/docs/GetTemplateVersion.md | 53 +++++ rest/api/v3/templates/docs/ListTemplate.md | 50 +++++ .../templates/docs/ListTemplate200Response.md | 12 ++ .../templates/docs/ListTemplate400Response.md | 11 ++ .../ListTemplate400ResponseErrorsInner.md | 12 ++ rest/api/v3/templates/docs/Metadata.md | 14 ++ .../templates/docs/TransactionalTemplate.md | 16 ++ .../TransactionalTemplateVersionCreate.md | 18 ++ .../TransactionalTemplateVersionOutput.md | 23 +++ .../docs/TransactionalTemplateWarning.md | 11 ++ .../TransactionalTemplatesTemplateLean.md | 15 ++ ...TransactionalTemplatesVersionOutputLean.md | 21 ++ rest/api/v3/templates/docs/UpdateTemplate.md | 53 +++++ .../templates/docs/UpdateTemplateRequest.md | 11 ++ .../templates/docs/UpdateTemplateVersion.md | 54 ++++++ rest/api/v3/templates/model_active.go | 23 +++ rest/api/v3/templates/model_active1.go | 23 +++ .../model_create_template_request.go | 22 +++ .../model_duplicate_template_request.go | 20 ++ rest/api/v3/templates/model_editor.go | 23 +++ rest/api/v3/templates/model_editor1.go | 23 +++ rest/api/v3/templates/model_generation.go | 23 +++ rest/api/v3/templates/model_generation1.go | 23 +++ rest/api/v3/templates/model_generations.go | 24 +++ .../model_list_template_200_response.go | 21 ++ .../model_list_template_400_response.go | 19 ++ ...list_template_400_response_errors_inner.go | 20 ++ rest/api/v3/templates/model_metadata.go | 22 +++ .../templates/model_transactional_template.go | 29 +++ ...l_transactional_template_version_create.go | 34 ++++ ...l_transactional_template_version_output.go | 43 ++++ .../model_transactional_template_warning.go | 20 ++ ...l_transactional_templates_template_lean.go | 28 +++ ...sactional_templates_version_output_lean.go | 40 ++++ .../model_update_template_request.go | 20 ++ .../v3/tracking_settings/.openapi-generator | 38 ++++ .../.openapi-generator-ignore | 23 +++ rest/api/v3/tracking_settings/README.md | 75 +++++++ .../api_list_click_tracking_setting.go | 58 ++++++ ..._list_google_analytics_tracking_setting.go | 58 ++++++ .../api_list_open_tracking_setting.go | 58 ++++++ .../api_list_subscription_tracking_setting.go | 58 ++++++ .../api_list_tracking_setting.go | 58 ++++++ rest/api/v3/tracking_settings/api_service.go | 34 ++++ .../api_update_click_tracking_setting.go | 73 +++++++ ...pdate_google_analytics_tracking_setting.go | 73 +++++++ .../api_update_open_tracking_setting.go | 73 +++++++ ...pi_update_subscription_tracking_setting.go | 73 +++++++ .../tracking_settings/docs/ClickTracking.md | 12 ++ .../docs/GoogleAnalyticsSettings.md | 16 ++ .../docs/ListClickTrackingSetting.md | 48 +++++ .../ListGoogleAnalyticsTrackingSetting.md | 48 +++++ .../docs/ListOpenTrackingSetting.md | 48 +++++ .../ListOpenTrackingSetting200Response.md | 11 ++ .../docs/ListSubscriptionTrackingSetting.md | 48 +++++ .../docs/ListTrackingSetting.md | 48 +++++ .../docs/ListTrackingSetting200Response.md | 11 ++ ...stTrackingSetting200ResponseResultInner.md | 14 ++ .../docs/SubscriptionTrackingSettings.md | 16 ++ .../docs/UpdateClickTrackingSetting.md | 49 +++++ .../docs/UpdateClickTrackingSettingRequest.md | 11 ++ .../UpdateGoogleAnalyticsTrackingSetting.md | 49 +++++ .../docs/UpdateOpenTrackingSetting.md | 49 +++++ .../docs/UpdateOpenTrackingSettingRequest.md | 11 ++ .../docs/UpdateSubscriptionTrackingSetting.md | 49 +++++ .../tracking_settings/model_click_tracking.go | 22 +++ .../model_google_analytics_settings.go | 30 +++ ...list_open_tracking_setting_200_response.go | 20 ++ ...odel_list_tracking_setting_200_response.go | 20 ++ ...cking_setting_200_response_result_inner.go | 26 +++ .../model_subscription_tracking_settings.go | 30 +++ ...l_update_click_tracking_setting_request.go | 20 ++ ...el_update_open_tracking_setting_request.go | 20 ++ rest/api/v3/webhooks/.openapi-generator | 80 ++++++++ .../api/v3/webhooks/.openapi-generator-ignore | 23 +++ rest/api/v3/webhooks/README.md | 100 ++++++++++ .../v3/webhooks/api_create_event_webhook.go | 81 ++++++++ .../v3/webhooks/api_create_parse_setting.go | 97 ++++++++++ .../v3/webhooks/api_delete_event_webhook.go | 69 +++++++ .../v3/webhooks/api_delete_parse_setting.go | 93 +++++++++ rest/api/v3/webhooks/api_get_event_webhook.go | 87 +++++++++ rest/api/v3/webhooks/api_get_parse_setting.go | 93 +++++++++ .../webhooks/api_get_signed_event_webhook.go | 77 ++++++++ .../api/v3/webhooks/api_list_event_webhook.go | 68 +++++++ .../api/v3/webhooks/api_list_parse_setting.go | 82 ++++++++ rest/api/v3/webhooks/api_list_parse_static.go | 105 ++++++++++ rest/api/v3/webhooks/api_service.go | 34 ++++ .../api/v3/webhooks/api_test_event_webhook.go | 65 +++++++ .../v3/webhooks/api_update_event_webhook.go | 109 +++++++++++ .../v3/webhooks/api_update_parse_setting.go | 108 +++++++++++ .../api_update_signed_event_webhook.go | 92 +++++++++ rest/api/v3/webhooks/docs/AggregatedBy.md | 14 ++ .../v3/webhooks/docs/CreateEventWebhook.md | 49 +++++ .../docs/CreateEventWebhook400Response.md | 11 ++ ...reateEventWebhook400ResponseErrorsInner.md | 13 ++ .../v3/webhooks/docs/CreateParseSetting.md | 49 +++++ .../v3/webhooks/docs/DeleteEventWebhook.md | 52 +++++ .../v3/webhooks/docs/DeleteParseSetting.md | 52 +++++ rest/api/v3/webhooks/docs/ErrorResponse.md | 12 ++ .../webhooks/docs/ErrorResponseErrorsInner.md | 13 ++ .../webhooks/docs/EventWebhookAllResponse.md | 12 ++ .../docs/EventWebhookBaseResponseProps.md | 26 +++ .../docs/EventWebhookDateResponseProps.md | 12 ++ .../docs/EventWebhookNoDatesResponse.md | 29 +++ .../docs/EventWebhookOauthResponseProps.md | 12 ++ .../v3/webhooks/docs/EventWebhookRequest.md | 27 +++ .../docs/EventWebhookSignedResponse.md | 31 +++ .../docs/EventWebhookSignedResponseProp.md | 11 ++ .../webhooks/docs/EventWebhookTestRequest.md | 15 ++ .../docs/EventWebhookUnsignedResponse.md | 30 +++ rest/api/v3/webhooks/docs/GetEventWebhook.md | 53 +++++ rest/api/v3/webhooks/docs/GetParseSetting.md | 52 +++++ .../v3/webhooks/docs/GetSignedEventWebhook.md | 52 +++++ .../docs/GetSignedEventWebhook200Response.md | 12 ++ .../docs/GetSignedEventWebhook404Response.md | 11 ++ ...ignedEventWebhook404ResponseErrorsInner.md | 11 ++ rest/api/v3/webhooks/docs/ListEventWebhook.md | 49 +++++ rest/api/v3/webhooks/docs/ListParseSetting.md | 48 +++++ .../docs/ListParseSetting200Response.md | 11 ++ rest/api/v3/webhooks/docs/ListParseStatic.md | 52 +++++ .../docs/ListParseStatic200ResponseInner.md | 12 ++ ...stParseStatic200ResponseInnerStatsInner.md | 11 ++ ...Static200ResponseInnerStatsInnerMetrics.md | 11 ++ rest/api/v3/webhooks/docs/ParseSetting.md | 14 ++ rest/api/v3/webhooks/docs/TestEventWebhook.md | 49 +++++ .../v3/webhooks/docs/UpdateEventWebhook.md | 54 ++++++ .../v3/webhooks/docs/UpdateParseSetting.md | 53 +++++ .../webhooks/docs/UpdateSignedEventWebhook.md | 53 +++++ .../docs/UpdateSignedEventWebhookRequest.md | 11 ++ rest/api/v3/webhooks/model_aggregated_by.go | 24 +++ ...model_create_event_webhook_400_response.go | 19 ++ ...event_webhook_400_response_errors_inner.go | 24 +++ rest/api/v3/webhooks/model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ .../model_event_webhook_all_response.go | 22 +++ ...model_event_webhook_base_response_props.go | 50 +++++ ...model_event_webhook_date_response_props.go | 26 +++ .../model_event_webhook_no_dates_response.go | 56 ++++++ ...odel_event_webhook_oauth_response_props.go | 22 +++ .../webhooks/model_event_webhook_request.go | 52 +++++ .../model_event_webhook_signed_response.go | 64 ++++++ ...odel_event_webhook_signed_response_prop.go | 20 ++ .../model_event_webhook_test_request.go | 28 +++ .../model_event_webhook_unsigned_response.go | 62 ++++++ ...l_get_signed_event_webhook_200_response.go | 22 +++ ...l_get_signed_event_webhook_404_response.go | 19 ++ ...event_webhook_404_response_errors_inner.go | 20 ++ .../model_list_parse_setting_200_response.go | 20 ++ ...el_list_parse_static_200_response_inner.go | 22 +++ ...e_static_200_response_inner_stats_inner.go | 19 ++ ..._200_response_inner_stats_inner_metrics.go | 20 ++ rest/api/v3/webhooks/model_parse_setting.go | 26 +++ ...del_update_signed_event_webhook_request.go | 20 ++ 2014 files changed, 71516 insertions(+) create mode 100644 rest/api/v3/account_provisioning/.openapi-generator create mode 100644 rest/api/v3/account_provisioning/.openapi-generator-ignore create mode 100644 rest/api/v3/account_provisioning/README.md create mode 100644 rest/api/v3/account_provisioning/api_authenticate_account.go create mode 100644 rest/api/v3/account_provisioning/api_create_account.go create mode 100644 rest/api/v3/account_provisioning/api_delete_account.go create mode 100644 rest/api/v3/account_provisioning/api_get_account_state.go create mode 100644 rest/api/v3/account_provisioning/api_list_account.go create mode 100644 rest/api/v3/account_provisioning/api_list_account_offering.go create mode 100644 rest/api/v3/account_provisioning/api_list_offering.go create mode 100644 rest/api/v3/account_provisioning/api_service.go create mode 100644 rest/api/v3/account_provisioning/api_update_account_offering.go create mode 100644 rest/api/v3/account_provisioning/api_update_account_state.go create mode 100644 rest/api/v3/account_provisioning/docs/AccountList.md create mode 100644 rest/api/v3/account_provisioning/docs/AccountProvisioningAccount.md create mode 100644 rest/api/v3/account_provisioning/docs/AccountProvisioningAccountId.md create mode 100644 rest/api/v3/account_provisioning/docs/AccountProvisioningCatalog.md create mode 100644 rest/api/v3/account_provisioning/docs/AccountProvisioningOfferingList.md create mode 100644 rest/api/v3/account_provisioning/docs/AccountProvisioningOfferingV1.md create mode 100644 rest/api/v3/account_provisioning/docs/AccountProvisioningPagination.md create mode 100644 rest/api/v3/account_provisioning/docs/AccountProvisioningProfile.md create mode 100644 rest/api/v3/account_provisioning/docs/AccountProvisioningStateRead.md create mode 100644 rest/api/v3/account_provisioning/docs/AccountProvisioningStateWrite.md create mode 100644 rest/api/v3/account_provisioning/docs/AuthenticateAccount.md create mode 100644 rest/api/v3/account_provisioning/docs/CatalogEntry.md create mode 100644 rest/api/v3/account_provisioning/docs/CatalogEntryEntitlements.md create mode 100644 rest/api/v3/account_provisioning/docs/CreateAccount.md create mode 100644 rest/api/v3/account_provisioning/docs/CreateAccountParams.md create mode 100644 rest/api/v3/account_provisioning/docs/DeleteAccount.md create mode 100644 rest/api/v3/account_provisioning/docs/ErrorResponse.md create mode 100644 rest/api/v3/account_provisioning/docs/GetAccountState.md create mode 100644 rest/api/v3/account_provisioning/docs/ListAccount.md create mode 100644 rest/api/v3/account_provisioning/docs/ListAccountOffering.md create mode 100644 rest/api/v3/account_provisioning/docs/ListOffering.md create mode 100644 rest/api/v3/account_provisioning/docs/OfferingsToAdd.md create mode 100644 rest/api/v3/account_provisioning/docs/State.md create mode 100644 rest/api/v3/account_provisioning/docs/State1.md create mode 100644 rest/api/v3/account_provisioning/docs/Type.md create mode 100644 rest/api/v3/account_provisioning/docs/UpdateAccountOffering.md create mode 100644 rest/api/v3/account_provisioning/docs/UpdateAccountState.md create mode 100644 rest/api/v3/account_provisioning/model_account_list.go create mode 100644 rest/api/v3/account_provisioning/model_account_provisioning_account.go create mode 100644 rest/api/v3/account_provisioning/model_account_provisioning_account_id.go create mode 100644 rest/api/v3/account_provisioning/model_account_provisioning_catalog.go create mode 100644 rest/api/v3/account_provisioning/model_account_provisioning_offering_list.go create mode 100644 rest/api/v3/account_provisioning/model_account_provisioning_offering_v1.go create mode 100644 rest/api/v3/account_provisioning/model_account_provisioning_pagination.go create mode 100644 rest/api/v3/account_provisioning/model_account_provisioning_profile.go create mode 100644 rest/api/v3/account_provisioning/model_account_provisioning_state_read.go create mode 100644 rest/api/v3/account_provisioning/model_account_provisioning_state_write.go create mode 100644 rest/api/v3/account_provisioning/model_catalog_entry.go create mode 100644 rest/api/v3/account_provisioning/model_catalog_entry_entitlements.go create mode 100644 rest/api/v3/account_provisioning/model_create_account_params.go create mode 100644 rest/api/v3/account_provisioning/model_error_response.go create mode 100644 rest/api/v3/account_provisioning/model_offerings_to_add.go create mode 100644 rest/api/v3/account_provisioning/model_state.go create mode 100644 rest/api/v3/account_provisioning/model_state1.go create mode 100644 rest/api/v3/account_provisioning/model_type.go create mode 100644 rest/api/v3/alerts/.openapi-generator create mode 100644 rest/api/v3/alerts/.openapi-generator-ignore create mode 100644 rest/api/v3/alerts/README.md create mode 100644 rest/api/v3/alerts/api_create_alert.go create mode 100644 rest/api/v3/alerts/api_delete_alert.go create mode 100644 rest/api/v3/alerts/api_get_alert.go create mode 100644 rest/api/v3/alerts/api_list_alert.go create mode 100644 rest/api/v3/alerts/api_service.go create mode 100644 rest/api/v3/alerts/api_update_alert.go create mode 100644 rest/api/v3/alerts/docs/CreateAlert.md create mode 100644 rest/api/v3/alerts/docs/CreateAlert201Response.md create mode 100644 rest/api/v3/alerts/docs/CreateAlertRequest.md create mode 100644 rest/api/v3/alerts/docs/DeleteAlert.md create mode 100644 rest/api/v3/alerts/docs/ErrorResponse.md create mode 100644 rest/api/v3/alerts/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/alerts/docs/GetAlert.md create mode 100644 rest/api/v3/alerts/docs/GetAlert200Response.md create mode 100644 rest/api/v3/alerts/docs/ListAlert.md create mode 100644 rest/api/v3/alerts/docs/ListAlert200ResponseInner.md create mode 100644 rest/api/v3/alerts/docs/Type.md create mode 100644 rest/api/v3/alerts/docs/Type1.md create mode 100644 rest/api/v3/alerts/docs/Type2.md create mode 100644 rest/api/v3/alerts/docs/Type3.md create mode 100644 rest/api/v3/alerts/docs/UpdateAlert.md create mode 100644 rest/api/v3/alerts/docs/UpdateAlert200Response.md create mode 100644 rest/api/v3/alerts/docs/UpdateAlertRequest.md create mode 100644 rest/api/v3/alerts/model_create_alert_201_response.go create mode 100644 rest/api/v3/alerts/model_create_alert_request.go create mode 100644 rest/api/v3/alerts/model_error_response.go create mode 100644 rest/api/v3/alerts/model_error_response_errors_inner.go create mode 100644 rest/api/v3/alerts/model_get_alert_200_response.go create mode 100644 rest/api/v3/alerts/model_list_alert_200_response_inner.go create mode 100644 rest/api/v3/alerts/model_type.go create mode 100644 rest/api/v3/alerts/model_type1.go create mode 100644 rest/api/v3/alerts/model_type2.go create mode 100644 rest/api/v3/alerts/model_type3.go create mode 100644 rest/api/v3/alerts/model_update_alert_200_response.go create mode 100644 rest/api/v3/alerts/model_update_alert_request.go create mode 100644 rest/api/v3/api_keys/.openapi-generator create mode 100644 rest/api/v3/api_keys/.openapi-generator-ignore create mode 100644 rest/api/v3/api_keys/README.md create mode 100644 rest/api/v3/api_keys/api_create_api_key.go create mode 100644 rest/api/v3/api_keys/api_delete_api_key.go create mode 100644 rest/api/v3/api_keys/api_get_api_key.go create mode 100644 rest/api/v3/api_keys/api_list_api_key.go create mode 100644 rest/api/v3/api_keys/api_service.go create mode 100644 rest/api/v3/api_keys/api_update_api_key.go create mode 100644 rest/api/v3/api_keys/api_update_api_key_name.go create mode 100644 rest/api/v3/api_keys/docs/ApiKeyResponse.md create mode 100644 rest/api/v3/api_keys/docs/ApiKeyScopesResponse.md create mode 100644 rest/api/v3/api_keys/docs/CreateApiKey.md create mode 100644 rest/api/v3/api_keys/docs/CreateApiKey201Response.md create mode 100644 rest/api/v3/api_keys/docs/CreateApiKeyRequest.md create mode 100644 rest/api/v3/api_keys/docs/DeleteApiKey.md create mode 100644 rest/api/v3/api_keys/docs/ErrorResponse.md create mode 100644 rest/api/v3/api_keys/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/api_keys/docs/GetApiKey.md create mode 100644 rest/api/v3/api_keys/docs/GetApiKey200Response.md create mode 100644 rest/api/v3/api_keys/docs/ListApiKey.md create mode 100644 rest/api/v3/api_keys/docs/ListApiKey200Response.md create mode 100644 rest/api/v3/api_keys/docs/UpdateApiKey.md create mode 100644 rest/api/v3/api_keys/docs/UpdateApiKeyName.md create mode 100644 rest/api/v3/api_keys/docs/UpdateApiKeyNameRequest.md create mode 100644 rest/api/v3/api_keys/docs/UpdateApiKeyRequest.md create mode 100644 rest/api/v3/api_keys/model_api_key_response.go create mode 100644 rest/api/v3/api_keys/model_api_key_scopes_response.go create mode 100644 rest/api/v3/api_keys/model_create_api_key_201_response.go create mode 100644 rest/api/v3/api_keys/model_create_api_key_request.go create mode 100644 rest/api/v3/api_keys/model_error_response.go create mode 100644 rest/api/v3/api_keys/model_error_response_errors_inner.go create mode 100644 rest/api/v3/api_keys/model_get_api_key_200_response.go create mode 100644 rest/api/v3/api_keys/model_list_api_key_200_response.go create mode 100644 rest/api/v3/api_keys/model_update_api_key_name_request.go create mode 100644 rest/api/v3/api_keys/model_update_api_key_request.go create mode 100644 rest/api/v3/domain_authentication/.openapi-generator create mode 100644 rest/api/v3/domain_authentication/.openapi-generator-ignore create mode 100644 rest/api/v3/domain_authentication/README.md create mode 100644 rest/api/v3/domain_authentication/api_add_ip_to_authenticated_domain.go create mode 100644 rest/api/v3/domain_authentication/api_associate_subuser_with_domain.go create mode 100644 rest/api/v3/domain_authentication/api_associate_subuser_with_domain_multiple.go create mode 100644 rest/api/v3/domain_authentication/api_authenticate_domain.go create mode 100644 rest/api/v3/domain_authentication/api_delete_authenticated_domain.go create mode 100644 rest/api/v3/domain_authentication/api_delete_ip_from_authenticated_domain.go create mode 100644 rest/api/v3/domain_authentication/api_disassociate_authenticated_domain_from_user.go create mode 100644 rest/api/v3/domain_authentication/api_disassociate_subuser_from_domain.go create mode 100644 rest/api/v3/domain_authentication/api_email_dns_record.go create mode 100644 rest/api/v3/domain_authentication/api_get_authenticated_domain.go create mode 100644 rest/api/v3/domain_authentication/api_list_all_authenticated_domain_with_user.go create mode 100644 rest/api/v3/domain_authentication/api_list_authenticated_domain.go create mode 100644 rest/api/v3/domain_authentication/api_list_authenticated_domain_with_user.go create mode 100644 rest/api/v3/domain_authentication/api_list_default_authenticated_domain.go create mode 100644 rest/api/v3/domain_authentication/api_service.go create mode 100644 rest/api/v3/domain_authentication/api_update_authenticated_domain.go create mode 100644 rest/api/v3/domain_authentication/api_validate_authenticated_domain.go create mode 100644 rest/api/v3/domain_authentication/docs/AddIpToAuthenticatedDomain.md create mode 100644 rest/api/v3/domain_authentication/docs/AddIpToAuthenticatedDomainRequest.md create mode 100644 rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomain.md create mode 100644 rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomainMultiple.md create mode 100644 rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomainRequest.md create mode 100644 rest/api/v3/domain_authentication/docs/AuthenticateDomain.md create mode 100644 rest/api/v3/domain_authentication/docs/AuthenticateDomainRequest.md create mode 100644 rest/api/v3/domain_authentication/docs/AuthenticatedDomain.md create mode 100644 rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpf.md create mode 100644 rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDns.md create mode 100644 rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsDkim.md create mode 100644 rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsDomainSpf.md create mode 100644 rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsMailServer.md create mode 100644 rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsSubdomainSpf.md create mode 100644 rest/api/v3/domain_authentication/docs/DeleteAuthenticatedDomain.md create mode 100644 rest/api/v3/domain_authentication/docs/DeleteIpFromAuthenticatedDomain.md create mode 100644 rest/api/v3/domain_authentication/docs/DisassociateAuthenticatedDomainFromUser.md create mode 100644 rest/api/v3/domain_authentication/docs/DisassociateSubuserFromDomain.md create mode 100644 rest/api/v3/domain_authentication/docs/EmailDnsRecord.md create mode 100644 rest/api/v3/domain_authentication/docs/EmailDnsRecord400Response.md create mode 100644 rest/api/v3/domain_authentication/docs/EmailDnsRecord400ResponseErrors.md create mode 100644 rest/api/v3/domain_authentication/docs/EmailDnsRecordRequest.md create mode 100644 rest/api/v3/domain_authentication/docs/GetAuthenticatedDomain.md create mode 100644 rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser.md create mode 100644 rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInner.md create mode 100644 rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDns.md create mode 100644 rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1.md create mode 100644 rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname.md create mode 100644 rest/api/v3/domain_authentication/docs/ListAuthenticatedDomain.md create mode 100644 rest/api/v3/domain_authentication/docs/ListAuthenticatedDomainWithUser.md create mode 100644 rest/api/v3/domain_authentication/docs/ListDefaultAuthenticatedDomain.md create mode 100644 rest/api/v3/domain_authentication/docs/UpdateAuthenticatedDomain.md create mode 100644 rest/api/v3/domain_authentication/docs/UpdateAuthenticatedDomainRequest.md create mode 100644 rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain.md create mode 100644 rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200Response.md create mode 100644 rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResults.md create mode 100644 rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsDkim1.md create mode 100644 rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsMailCname.md create mode 100644 rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsSpf.md create mode 100644 rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain500Response.md create mode 100644 rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain500ResponseErrorsInner.md create mode 100644 rest/api/v3/domain_authentication/model_add_ip_to_authenticated_domain_request.go create mode 100644 rest/api/v3/domain_authentication/model_associate_subuser_with_domain_request.go create mode 100644 rest/api/v3/domain_authentication/model_authenticate_domain_request.go create mode 100644 rest/api/v3/domain_authentication/model_authenticated_domain.go create mode 100644 rest/api/v3/domain_authentication/model_authenticated_domain_spf.go create mode 100644 rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns.go create mode 100644 rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_dkim.go create mode 100644 rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_domain_spf.go create mode 100644 rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_mail_server.go create mode 100644 rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_subdomain_spf.go create mode 100644 rest/api/v3/domain_authentication/model_email_dns_record_400_response.go create mode 100644 rest/api/v3/domain_authentication/model_email_dns_record_400_response_errors.go create mode 100644 rest/api/v3/domain_authentication/model_email_dns_record_request.go create mode 100644 rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner.go create mode 100644 rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns.go create mode 100644 rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns_dkim1.go create mode 100644 rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns_mail_cname.go create mode 100644 rest/api/v3/domain_authentication/model_update_authenticated_domain_request.go create mode 100644 rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response.go create mode 100644 rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results.go create mode 100644 rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_dkim1.go create mode 100644 rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_mail_cname.go create mode 100644 rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_spf.go create mode 100644 rest/api/v3/domain_authentication/model_validate_authenticated_domain_500_response.go create mode 100644 rest/api/v3/domain_authentication/model_validate_authenticated_domain_500_response_errors_inner.go create mode 100644 rest/api/v3/email_activity/.openapi-generator create mode 100644 rest/api/v3/email_activity/.openapi-generator-ignore create mode 100644 rest/api/v3/email_activity/README.md create mode 100644 rest/api/v3/email_activity/api_download_csv.go create mode 100644 rest/api/v3/email_activity/api_get_message.go create mode 100644 rest/api/v3/email_activity/api_list_message.go create mode 100644 rest/api/v3/email_activity/api_request_csv.go create mode 100644 rest/api/v3/email_activity/api_service.go create mode 100644 rest/api/v3/email_activity/docs/AbbvMessage.md create mode 100644 rest/api/v3/email_activity/docs/BounceType.md create mode 100644 rest/api/v3/email_activity/docs/BounceType1.md create mode 100644 rest/api/v3/email_activity/docs/DownloadCsv.md create mode 100644 rest/api/v3/email_activity/docs/DownloadCsv200Response.md create mode 100644 rest/api/v3/email_activity/docs/EmailActivityResponseBaseProps.md create mode 100644 rest/api/v3/email_activity/docs/Event.md create mode 100644 rest/api/v3/email_activity/docs/EventName.md create mode 100644 rest/api/v3/email_activity/docs/EventName1.md create mode 100644 rest/api/v3/email_activity/docs/GetMessage.md create mode 100644 rest/api/v3/email_activity/docs/GetMessage404Response.md create mode 100644 rest/api/v3/email_activity/docs/GetMessage404ResponseErrorsInner.md create mode 100644 rest/api/v3/email_activity/docs/ListMessage.md create mode 100644 rest/api/v3/email_activity/docs/ListMessage200Response.md create mode 100644 rest/api/v3/email_activity/docs/ListMessage400Response.md create mode 100644 rest/api/v3/email_activity/docs/ListMessage400ResponseErrorsInner.md create mode 100644 rest/api/v3/email_activity/docs/ListMessage429Response.md create mode 100644 rest/api/v3/email_activity/docs/ListMessage429ResponseErrorsInner.md create mode 100644 rest/api/v3/email_activity/docs/Message.md create mode 100644 rest/api/v3/email_activity/docs/OutboundIpType.md create mode 100644 rest/api/v3/email_activity/docs/OutboundIpType1.md create mode 100644 rest/api/v3/email_activity/docs/RequestCsv.md create mode 100644 rest/api/v3/email_activity/docs/RequestCsv202Response.md create mode 100644 rest/api/v3/email_activity/docs/Status.md create mode 100644 rest/api/v3/email_activity/docs/Status1.md create mode 100644 rest/api/v3/email_activity/docs/Status2.md create mode 100644 rest/api/v3/email_activity/docs/Status3.md create mode 100644 rest/api/v3/email_activity/model_abbv__message.go create mode 100644 rest/api/v3/email_activity/model_bounce_type.go create mode 100644 rest/api/v3/email_activity/model_bounce_type1.go create mode 100644 rest/api/v3/email_activity/model_download_csv_200_response.go create mode 100644 rest/api/v3/email_activity/model_email_activity_response_base_props.go create mode 100644 rest/api/v3/email_activity/model_event.go create mode 100644 rest/api/v3/email_activity/model_event_name.go create mode 100644 rest/api/v3/email_activity/model_event_name1.go create mode 100644 rest/api/v3/email_activity/model_get_message_404_response.go create mode 100644 rest/api/v3/email_activity/model_get_message_404_response_errors_inner.go create mode 100644 rest/api/v3/email_activity/model_list_message_200_response.go create mode 100644 rest/api/v3/email_activity/model_list_message_400_response.go create mode 100644 rest/api/v3/email_activity/model_list_message_400_response_errors_inner.go create mode 100644 rest/api/v3/email_activity/model_list_message_429_response.go create mode 100644 rest/api/v3/email_activity/model_list_message_429_response_errors_inner.go create mode 100644 rest/api/v3/email_activity/model_message.go create mode 100644 rest/api/v3/email_activity/model_outbound_ip_type.go create mode 100644 rest/api/v3/email_activity/model_outbound_ip_type1.go create mode 100644 rest/api/v3/email_activity/model_request_csv_202_response.go create mode 100644 rest/api/v3/email_activity/model_status.go create mode 100644 rest/api/v3/email_activity/model_status1.go create mode 100644 rest/api/v3/email_activity/model_status2.go create mode 100644 rest/api/v3/email_activity/model_status3.go create mode 100644 rest/api/v3/email_validation/.openapi-generator create mode 100644 rest/api/v3/email_validation/.openapi-generator-ignore create mode 100644 rest/api/v3/email_validation/README.md create mode 100644 rest/api/v3/email_validation/api_get_email_job_for_verification.go create mode 100644 rest/api/v3/email_validation/api_get_validations_email_jobs.go create mode 100644 rest/api/v3/email_validation/api_list_email_job_for_verification.go create mode 100644 rest/api/v3/email_validation/api_service.go create mode 100644 rest/api/v3/email_validation/api_validate_email.go create mode 100644 rest/api/v3/email_validation/docs/ErrorResponse.md create mode 100644 rest/api/v3/email_validation/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/email_validation/docs/FileType.md create mode 100644 rest/api/v3/email_validation/docs/GetEmailJobForVerification.md create mode 100644 rest/api/v3/email_validation/docs/GetValidationsEmailJobs.md create mode 100644 rest/api/v3/email_validation/docs/GetValidationsEmailJobs200Response.md create mode 100644 rest/api/v3/email_validation/docs/GetValidationsEmailJobs200ResponseResultInner.md create mode 100644 rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200Response.md create mode 100644 rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200ResponseResult.md create mode 100644 rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200ResponseResultErrorsInner.md create mode 100644 rest/api/v3/email_validation/docs/ListEmailJobForVerification.md create mode 100644 rest/api/v3/email_validation/docs/ListEmailJobForVerificationRequest.md create mode 100644 rest/api/v3/email_validation/docs/PutValidationsEmailJobs200Response.md create mode 100644 rest/api/v3/email_validation/docs/PutValidationsEmailJobs200ResponseUploadHeadersInner.md create mode 100644 rest/api/v3/email_validation/docs/Status.md create mode 100644 rest/api/v3/email_validation/docs/Status1.md create mode 100644 rest/api/v3/email_validation/docs/ValidateEmail.md create mode 100644 rest/api/v3/email_validation/docs/ValidateEmail200Response.md create mode 100644 rest/api/v3/email_validation/docs/ValidateEmail200ResponseResult.md create mode 100644 rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecks.md create mode 100644 rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksAdditional.md create mode 100644 rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksDomain.md create mode 100644 rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksLocalPart.md create mode 100644 rest/api/v3/email_validation/docs/ValidateEmailRequest.md create mode 100644 rest/api/v3/email_validation/docs/Verdict.md create mode 100644 rest/api/v3/email_validation/model_error_response.go create mode 100644 rest/api/v3/email_validation/model_error_response_errors_inner.go create mode 100644 rest/api/v3/email_validation/model_file_type.go create mode 100644 rest/api/v3/email_validation/model_get_validations_email_jobs200_response.go create mode 100644 rest/api/v3/email_validation/model_get_validations_email_jobs200_response_result_inner.go create mode 100644 rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response.go create mode 100644 rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response_result.go create mode 100644 rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response_result_errors_inner.go create mode 100644 rest/api/v3/email_validation/model_list_email_job_for_verification_request.go create mode 100644 rest/api/v3/email_validation/model_put_validations_email_jobs200_response.go create mode 100644 rest/api/v3/email_validation/model_put_validations_email_jobs200_response_upload_headers_inner.go create mode 100644 rest/api/v3/email_validation/model_status.go create mode 100644 rest/api/v3/email_validation/model_status1.go create mode 100644 rest/api/v3/email_validation/model_validate_email_200_response.go create mode 100644 rest/api/v3/email_validation/model_validate_email_200_response_result.go create mode 100644 rest/api/v3/email_validation/model_validate_email_200_response_result_checks.go create mode 100644 rest/api/v3/email_validation/model_validate_email_200_response_result_checks_additional.go create mode 100644 rest/api/v3/email_validation/model_validate_email_200_response_result_checks_domain.go create mode 100644 rest/api/v3/email_validation/model_validate_email_200_response_result_checks_local_part.go create mode 100644 rest/api/v3/email_validation/model_validate_email_request.go create mode 100644 rest/api/v3/email_validation/model_verdict.go create mode 100644 rest/api/v3/enforced_tls/.openapi-generator create mode 100644 rest/api/v3/enforced_tls/.openapi-generator-ignore create mode 100644 rest/api/v3/enforced_tls/README.md create mode 100644 rest/api/v3/enforced_tls/api_list_enforced_tls_setting.go create mode 100644 rest/api/v3/enforced_tls/api_service.go create mode 100644 rest/api/v3/enforced_tls/api_update_enforced_tls_setting.go create mode 100644 rest/api/v3/enforced_tls/docs/EnforcedTlsRequestResponse.md create mode 100644 rest/api/v3/enforced_tls/docs/ErrorResponse.md create mode 100644 rest/api/v3/enforced_tls/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/enforced_tls/docs/ListEnforcedTlsSetting.md create mode 100644 rest/api/v3/enforced_tls/docs/UpdateEnforcedTlsSetting.md create mode 100644 rest/api/v3/enforced_tls/docs/Version.md create mode 100644 rest/api/v3/enforced_tls/model_enforced_tls_request_response.go create mode 100644 rest/api/v3/enforced_tls/model_error_response.go create mode 100644 rest/api/v3/enforced_tls/model_error_response_errors_inner.go create mode 100644 rest/api/v3/enforced_tls/model_version.go create mode 100644 rest/api/v3/integrations/.openapi-generator create mode 100644 rest/api/v3/integrations/.openapi-generator-ignore create mode 100644 rest/api/v3/integrations/README.md create mode 100644 rest/api/v3/integrations/api_add_integration.go create mode 100644 rest/api/v3/integrations/api_delete_integration.go create mode 100644 rest/api/v3/integrations/api_find_integration_by_id.go create mode 100644 rest/api/v3/integrations/api_get_integrations_by_user.go create mode 100644 rest/api/v3/integrations/api_service.go create mode 100644 rest/api/v3/integrations/api_update_integration.go create mode 100644 rest/api/v3/integrations/docs/AddIntegration.md create mode 100644 rest/api/v3/integrations/docs/AddIntegration400Response.md create mode 100644 rest/api/v3/integrations/docs/DeleteIntegration.md create mode 100644 rest/api/v3/integrations/docs/DeleteIntegration400Response.md create mode 100644 rest/api/v3/integrations/docs/DeleteIntegration404Response.md create mode 100644 rest/api/v3/integrations/docs/Destination.md create mode 100644 rest/api/v3/integrations/docs/Destination1.md create mode 100644 rest/api/v3/integrations/docs/Destination2.md create mode 100644 rest/api/v3/integrations/docs/Destination3.md create mode 100644 rest/api/v3/integrations/docs/DestinationRegion.md create mode 100644 rest/api/v3/integrations/docs/DestinationRegion1.md create mode 100644 rest/api/v3/integrations/docs/DestinationRegion2.md create mode 100644 rest/api/v3/integrations/docs/FindIntegrationById.md create mode 100644 rest/api/v3/integrations/docs/Forbidden.md create mode 100644 rest/api/v3/integrations/docs/GetIntegrationsByUser.md create mode 100644 rest/api/v3/integrations/docs/GetIntegrationsByUser200Response.md create mode 100644 rest/api/v3/integrations/docs/GetIntegrationsByUser403Response.md create mode 100644 rest/api/v3/integrations/docs/GetIntegrationsByUser500Response.md create mode 100644 rest/api/v3/integrations/docs/Id.md create mode 100644 rest/api/v3/integrations/docs/Integration.md create mode 100644 rest/api/v3/integrations/docs/IntegrationFilters.md create mode 100644 rest/api/v3/integrations/docs/IntegrationInput.md create mode 100644 rest/api/v3/integrations/docs/IntegrationInputFilters.md create mode 100644 rest/api/v3/integrations/docs/IntegrationInputProperties.md create mode 100644 rest/api/v3/integrations/docs/IntegrationNotFound.md create mode 100644 rest/api/v3/integrations/docs/IntegrationPatch.md create mode 100644 rest/api/v3/integrations/docs/IntegrationPatchFilters.md create mode 100644 rest/api/v3/integrations/docs/IntegrationPatchProperties.md create mode 100644 rest/api/v3/integrations/docs/IntegrationProperties.md create mode 100644 rest/api/v3/integrations/docs/InternalError.md create mode 100644 rest/api/v3/integrations/docs/InvalidDeleteRequest.md create mode 100644 rest/api/v3/integrations/docs/InvalidRequest.md create mode 100644 rest/api/v3/integrations/docs/Items.md create mode 100644 rest/api/v3/integrations/docs/Items1.md create mode 100644 rest/api/v3/integrations/docs/Items2.md create mode 100644 rest/api/v3/integrations/docs/UpdateIntegration.md create mode 100644 rest/api/v3/integrations/model_add_integration_400_response.go create mode 100644 rest/api/v3/integrations/model_delete_integration_400_response.go create mode 100644 rest/api/v3/integrations/model_delete_integration_404_response.go create mode 100644 rest/api/v3/integrations/model_destination.go create mode 100644 rest/api/v3/integrations/model_destination1.go create mode 100644 rest/api/v3/integrations/model_destination2.go create mode 100644 rest/api/v3/integrations/model_destination3.go create mode 100644 rest/api/v3/integrations/model_destination_region.go create mode 100644 rest/api/v3/integrations/model_destination_region1.go create mode 100644 rest/api/v3/integrations/model_destination_region2.go create mode 100644 rest/api/v3/integrations/model_forbidden.go create mode 100644 rest/api/v3/integrations/model_get_integrations_by_user_200_response.go create mode 100644 rest/api/v3/integrations/model_get_integrations_by_user_403_response.go create mode 100644 rest/api/v3/integrations/model_get_integrations_by_user_500_response.go create mode 100644 rest/api/v3/integrations/model_id.go create mode 100644 rest/api/v3/integrations/model_integration.go create mode 100644 rest/api/v3/integrations/model_integration_filters.go create mode 100644 rest/api/v3/integrations/model_integration_input.go create mode 100644 rest/api/v3/integrations/model_integration_input_filters.go create mode 100644 rest/api/v3/integrations/model_integration_input_properties.go create mode 100644 rest/api/v3/integrations/model_integration_not_found.go create mode 100644 rest/api/v3/integrations/model_integration_patch.go create mode 100644 rest/api/v3/integrations/model_integration_patch_filters.go create mode 100644 rest/api/v3/integrations/model_integration_patch_properties.go create mode 100644 rest/api/v3/integrations/model_integration_properties.go create mode 100644 rest/api/v3/integrations/model_internal_error.go create mode 100644 rest/api/v3/integrations/model_invalid_delete_request.go create mode 100644 rest/api/v3/integrations/model_invalid_request.go create mode 100644 rest/api/v3/integrations/model_items.go create mode 100644 rest/api/v3/integrations/model_items1.go create mode 100644 rest/api/v3/integrations/model_items2.go create mode 100644 rest/api/v3/ip_access_management/.openapi-generator create mode 100644 rest/api/v3/ip_access_management/.openapi-generator-ignore create mode 100644 rest/api/v3/ip_access_management/README.md create mode 100644 rest/api/v3/ip_access_management/api_add_ip_to_allow_list.go create mode 100644 rest/api/v3/ip_access_management/api_delete_allowed_ip.go create mode 100644 rest/api/v3/ip_access_management/api_delete_allowed_ips.go create mode 100644 rest/api/v3/ip_access_management/api_get_allowed_ip.go create mode 100644 rest/api/v3/ip_access_management/api_list_access_activity.go create mode 100644 rest/api/v3/ip_access_management/api_list_allowed_ip.go create mode 100644 rest/api/v3/ip_access_management/api_service.go create mode 100644 rest/api/v3/ip_access_management/docs/AddIpToAllowList.md create mode 100644 rest/api/v3/ip_access_management/docs/AddIpToAllowListRequest.md create mode 100644 rest/api/v3/ip_access_management/docs/AddIpToAllowListRequestIpsInner.md create mode 100644 rest/api/v3/ip_access_management/docs/DeleteAllowedIp.md create mode 100644 rest/api/v3/ip_access_management/docs/DeleteAllowedIps.md create mode 100644 rest/api/v3/ip_access_management/docs/DeleteAllowedIpsRequest.md create mode 100644 rest/api/v3/ip_access_management/docs/ErrorResponse.md create mode 100644 rest/api/v3/ip_access_management/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/ip_access_management/docs/GetAllowedIp.md create mode 100644 rest/api/v3/ip_access_management/docs/IpAccessManagement2xx.md create mode 100644 rest/api/v3/ip_access_management/docs/IpAccessManagement2xxResultInner.md create mode 100644 rest/api/v3/ip_access_management/docs/ListAccessActivity.md create mode 100644 rest/api/v3/ip_access_management/docs/ListAccessActivity200Response.md create mode 100644 rest/api/v3/ip_access_management/docs/ListAccessActivity200ResponseResultInner.md create mode 100644 rest/api/v3/ip_access_management/docs/ListAllowedIp.md create mode 100644 rest/api/v3/ip_access_management/model_add_ip_to_allow_list_request.go create mode 100644 rest/api/v3/ip_access_management/model_add_ip_to_allow_list_request_ips_inner.go create mode 100644 rest/api/v3/ip_access_management/model_delete_allowed_ips_request.go create mode 100644 rest/api/v3/ip_access_management/model_error_response.go create mode 100644 rest/api/v3/ip_access_management/model_error_response_errors_inner.go create mode 100644 rest/api/v3/ip_access_management/model_ip_access_management2xx.go create mode 100644 rest/api/v3/ip_access_management/model_ip_access_management2xx_result_inner.go create mode 100644 rest/api/v3/ip_access_management/model_list_access_activity_200_response.go create mode 100644 rest/api/v3/ip_access_management/model_list_access_activity_200_response_result_inner.go create mode 100644 rest/api/v3/ip_address_management/.openapi-generator create mode 100644 rest/api/v3/ip_address_management/.openapi-generator-ignore create mode 100644 rest/api/v3/ip_address_management/README.md create mode 100644 rest/api/v3/ip_address_management/api_add_ip.go create mode 100644 rest/api/v3/ip_address_management/api_add_ips_to_ip_pool.go create mode 100644 rest/api/v3/ip_address_management/api_add_sub_users_to_ip.go create mode 100644 rest/api/v3/ip_address_management/api_create_ip_pool.go create mode 100644 rest/api/v3/ip_address_management/api_delete_ip_pool.go create mode 100644 rest/api/v3/ip_address_management/api_delete_ips_from_ip_pool.go create mode 100644 rest/api/v3/ip_address_management/api_delete_sub_users_from_ip.go create mode 100644 rest/api/v3/ip_address_management/api_get_ip.go create mode 100644 rest/api/v3/ip_address_management/api_get_ip_pool.go create mode 100644 rest/api/v3/ip_address_management/api_list_ip.go create mode 100644 rest/api/v3/ip_address_management/api_list_ip_assigned_to_ip_pool.go create mode 100644 rest/api/v3/ip_address_management/api_list_ip_pool.go create mode 100644 rest/api/v3/ip_address_management/api_list_sub_user_assigned_to_ip.go create mode 100644 rest/api/v3/ip_address_management/api_service.go create mode 100644 rest/api/v3/ip_address_management/api_update_ip.go create mode 100644 rest/api/v3/ip_address_management/api_update_ip_pool.go create mode 100644 rest/api/v3/ip_address_management/docs/AddIp.md create mode 100644 rest/api/v3/ip_address_management/docs/AddIp201Response.md create mode 100644 rest/api/v3/ip_address_management/docs/AddIpRequest.md create mode 100644 rest/api/v3/ip_address_management/docs/AddIpsToIpPool.md create mode 100644 rest/api/v3/ip_address_management/docs/AddIpsToIpPool200Response.md create mode 100644 rest/api/v3/ip_address_management/docs/AddIpsToIpPoolRequest.md create mode 100644 rest/api/v3/ip_address_management/docs/AddSubUsersToIp.md create mode 100644 rest/api/v3/ip_address_management/docs/AddSubUsersToIp200Response.md create mode 100644 rest/api/v3/ip_address_management/docs/AddSubUsersToIpRequest.md create mode 100644 rest/api/v3/ip_address_management/docs/CreateIpPool.md create mode 100644 rest/api/v3/ip_address_management/docs/CreateIpPool201Response.md create mode 100644 rest/api/v3/ip_address_management/docs/CreateIpPoolRequest.md create mode 100644 rest/api/v3/ip_address_management/docs/DeleteIpPool.md create mode 100644 rest/api/v3/ip_address_management/docs/DeleteIpsFromIpPool.md create mode 100644 rest/api/v3/ip_address_management/docs/DeleteIpsFromIpPoolRequest.md create mode 100644 rest/api/v3/ip_address_management/docs/DeleteSubUsersFromIp.md create mode 100644 rest/api/v3/ip_address_management/docs/DeleteSubUsersFromIpRequest.md create mode 100644 rest/api/v3/ip_address_management/docs/GetIp.md create mode 100644 rest/api/v3/ip_address_management/docs/GetIp200Response.md create mode 100644 rest/api/v3/ip_address_management/docs/GetIp200ResponsePoolsInner.md create mode 100644 rest/api/v3/ip_address_management/docs/GetIpPool.md create mode 100644 rest/api/v3/ip_address_management/docs/GetIpPool200Response.md create mode 100644 rest/api/v3/ip_address_management/docs/GetIpPool200ResponseIpCountByRegionInner.md create mode 100644 rest/api/v3/ip_address_management/docs/IpAddressManagementErrorResponse.md create mode 100644 rest/api/v3/ip_address_management/docs/IpAddressManagementErrorResponseErrorsInner.md create mode 100644 rest/api/v3/ip_address_management/docs/Items.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIp.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIp200Response.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIp200ResponseMetadata.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIp200ResponseMetadataNextParams.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIp200ResponseResultInner.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIp200ResponseResultInnerPoolsInner.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200Response.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseMetadata.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseMetadataNextParams.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseResultInner.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIpPool.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIpPool200Response.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIpPool200ResponseMetadata.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIpPool200ResponseMetadataNextParams.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIpPool200ResponseResultInner.md create mode 100644 rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp.md create mode 100644 rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200Response.md create mode 100644 rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200ResponseMetadata.md create mode 100644 rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200ResponseMetadataNextParams.md create mode 100644 rest/api/v3/ip_address_management/docs/Region.md create mode 100644 rest/api/v3/ip_address_management/docs/Region1.md create mode 100644 rest/api/v3/ip_address_management/docs/Region2.md create mode 100644 rest/api/v3/ip_address_management/docs/Region3.md create mode 100644 rest/api/v3/ip_address_management/docs/Region4.md create mode 100644 rest/api/v3/ip_address_management/docs/Region5.md create mode 100644 rest/api/v3/ip_address_management/docs/Region6.md create mode 100644 rest/api/v3/ip_address_management/docs/Region7.md create mode 100644 rest/api/v3/ip_address_management/docs/UpdateIp.md create mode 100644 rest/api/v3/ip_address_management/docs/UpdateIp200Response.md create mode 100644 rest/api/v3/ip_address_management/docs/UpdateIpPool.md create mode 100644 rest/api/v3/ip_address_management/docs/UpdateIpPool200Response.md create mode 100644 rest/api/v3/ip_address_management/docs/UpdateIpPoolRequest.md create mode 100644 rest/api/v3/ip_address_management/docs/UpdateIpRequest.md create mode 100644 rest/api/v3/ip_address_management/model_add_ip_201_response.go create mode 100644 rest/api/v3/ip_address_management/model_add_ip_request.go create mode 100644 rest/api/v3/ip_address_management/model_add_ips_to_ip_pool_200_response.go create mode 100644 rest/api/v3/ip_address_management/model_add_ips_to_ip_pool_request.go create mode 100644 rest/api/v3/ip_address_management/model_add_sub_users_to_ip_200_response.go create mode 100644 rest/api/v3/ip_address_management/model_add_sub_users_to_ip_request.go create mode 100644 rest/api/v3/ip_address_management/model_create_ip_pool_201_response.go create mode 100644 rest/api/v3/ip_address_management/model_create_ip_pool_request.go create mode 100644 rest/api/v3/ip_address_management/model_delete_ips_from_ip_pool_request.go create mode 100644 rest/api/v3/ip_address_management/model_delete_sub_users_from_ip_request.go create mode 100644 rest/api/v3/ip_address_management/model_get_ip_200_response.go create mode 100644 rest/api/v3/ip_address_management/model_get_ip_200_response_pools_inner.go create mode 100644 rest/api/v3/ip_address_management/model_get_ip_pool_200_response.go create mode 100644 rest/api/v3/ip_address_management/model_get_ip_pool_200_response_ip_count_by_region_inner.go create mode 100644 rest/api/v3/ip_address_management/model_ip_address_management_error_response.go create mode 100644 rest/api/v3/ip_address_management/model_ip_address_management_error_response_errors_inner.go create mode 100644 rest/api/v3/ip_address_management/model_items.go create mode 100644 rest/api/v3/ip_address_management/model_list_ip_200_response.go create mode 100644 rest/api/v3/ip_address_management/model_list_ip_200_response__metadata.go create mode 100644 rest/api/v3/ip_address_management/model_list_ip_200_response__metadata_next_params.go create mode 100644 rest/api/v3/ip_address_management/model_list_ip_200_response_result_inner.go create mode 100644 rest/api/v3/ip_address_management/model_list_ip_200_response_result_inner_pools_inner.go create mode 100644 rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response.go create mode 100644 rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response__metadata.go create mode 100644 rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response__metadata_next_params.go create mode 100644 rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response_result_inner.go create mode 100644 rest/api/v3/ip_address_management/model_list_ip_pool_200_response.go create mode 100644 rest/api/v3/ip_address_management/model_list_ip_pool_200_response__metadata.go create mode 100644 rest/api/v3/ip_address_management/model_list_ip_pool_200_response__metadata_next_params.go create mode 100644 rest/api/v3/ip_address_management/model_list_ip_pool_200_response_result_inner.go create mode 100644 rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response.go create mode 100644 rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response__metadata.go create mode 100644 rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response__metadata_next_params.go create mode 100644 rest/api/v3/ip_address_management/model_region.go create mode 100644 rest/api/v3/ip_address_management/model_region1.go create mode 100644 rest/api/v3/ip_address_management/model_region2.go create mode 100644 rest/api/v3/ip_address_management/model_region3.go create mode 100644 rest/api/v3/ip_address_management/model_region4.go create mode 100644 rest/api/v3/ip_address_management/model_region5.go create mode 100644 rest/api/v3/ip_address_management/model_region6.go create mode 100644 rest/api/v3/ip_address_management/model_region7.go create mode 100644 rest/api/v3/ip_address_management/model_update_ip_200_response.go create mode 100644 rest/api/v3/ip_address_management/model_update_ip_pool_200_response.go create mode 100644 rest/api/v3/ip_address_management/model_update_ip_pool_request.go create mode 100644 rest/api/v3/ip_address_management/model_update_ip_request.go create mode 100644 rest/api/v3/ip_warmup/.openapi-generator create mode 100644 rest/api/v3/ip_warmup/.openapi-generator-ignore create mode 100644 rest/api/v3/ip_warmup/README.md create mode 100644 rest/api/v3/ip_warmup/api_get_warm_up_ip.go create mode 100644 rest/api/v3/ip_warmup/api_list_warm_up_ip.go create mode 100644 rest/api/v3/ip_warmup/api_service.go create mode 100644 rest/api/v3/ip_warmup/api_stop_ip_warm_up.go create mode 100644 rest/api/v3/ip_warmup/api_warm_up_ip.go create mode 100644 rest/api/v3/ip_warmup/docs/GetWarmUpIp.md create mode 100644 rest/api/v3/ip_warmup/docs/GetWarmUpIp404Response.md create mode 100644 rest/api/v3/ip_warmup/docs/GetWarmUpIp404ResponseErrorsInner.md create mode 100644 rest/api/v3/ip_warmup/docs/IpWarmup200Inner.md create mode 100644 rest/api/v3/ip_warmup/docs/ListWarmUpIp.md create mode 100644 rest/api/v3/ip_warmup/docs/StopIpWarmUp.md create mode 100644 rest/api/v3/ip_warmup/docs/StopIpWarmUp404Response.md create mode 100644 rest/api/v3/ip_warmup/docs/StopIpWarmUp404ResponseErrorsInner.md create mode 100644 rest/api/v3/ip_warmup/docs/WarmUpIp.md create mode 100644 rest/api/v3/ip_warmup/docs/WarmUpIp404Response.md create mode 100644 rest/api/v3/ip_warmup/docs/WarmUpIp404ResponseErrorsInner.md create mode 100644 rest/api/v3/ip_warmup/docs/WarmUpIpRequest.md create mode 100644 rest/api/v3/ip_warmup/model_get_warm_up_ip_404_response.go create mode 100644 rest/api/v3/ip_warmup/model_get_warm_up_ip_404_response_errors_inner.go create mode 100644 rest/api/v3/ip_warmup/model_ip_warmup200_inner.go create mode 100644 rest/api/v3/ip_warmup/model_stop_ip_warm_up_404_response.go create mode 100644 rest/api/v3/ip_warmup/model_stop_ip_warm_up_404_response_errors_inner.go create mode 100644 rest/api/v3/ip_warmup/model_warm_up_ip_404_response.go create mode 100644 rest/api/v3/ip_warmup/model_warm_up_ip_404_response_errors_inner.go create mode 100644 rest/api/v3/ip_warmup/model_warm_up_ip_request.go create mode 100644 rest/api/v3/ips/.openapi-generator create mode 100644 rest/api/v3/ips/.openapi-generator-ignore create mode 100644 rest/api/v3/ips/README.md create mode 100644 rest/api/v3/ips/api_add_ip.go create mode 100644 rest/api/v3/ips/api_add_ip_to_ip_pool.go create mode 100644 rest/api/v3/ips/api_create_ip_pool.go create mode 100644 rest/api/v3/ips/api_delete_ip_from_ip_pool.go create mode 100644 rest/api/v3/ips/api_delete_ip_pool.go create mode 100644 rest/api/v3/ips/api_get_ip.go create mode 100644 rest/api/v3/ips/api_get_ip_pool.go create mode 100644 rest/api/v3/ips/api_list_assigned_ip.go create mode 100644 rest/api/v3/ips/api_list_ip.go create mode 100644 rest/api/v3/ips/api_list_ip_pool.go create mode 100644 rest/api/v3/ips/api_list_remaining_ip_count.go create mode 100644 rest/api/v3/ips/api_service.go create mode 100644 rest/api/v3/ips/api_update_ip_pool.go create mode 100644 rest/api/v3/ips/docs/AddIp.md create mode 100644 rest/api/v3/ips/docs/AddIp201Response.md create mode 100644 rest/api/v3/ips/docs/AddIp201ResponseIpsInner.md create mode 100644 rest/api/v3/ips/docs/AddIpRequest.md create mode 100644 rest/api/v3/ips/docs/AddIpToIpPool.md create mode 100644 rest/api/v3/ips/docs/AddIpToIpPool201Response.md create mode 100644 rest/api/v3/ips/docs/AddIpToIpPool404Response.md create mode 100644 rest/api/v3/ips/docs/AddIpToIpPool404ResponseErrorsInner.md create mode 100644 rest/api/v3/ips/docs/AddIpToIpPoolRequest.md create mode 100644 rest/api/v3/ips/docs/CreateIpPool.md create mode 100644 rest/api/v3/ips/docs/CreateIpPoolRequest.md create mode 100644 rest/api/v3/ips/docs/DeleteIpFromIpPool.md create mode 100644 rest/api/v3/ips/docs/DeleteIpFromIpPool404Response.md create mode 100644 rest/api/v3/ips/docs/DeleteIpPool.md create mode 100644 rest/api/v3/ips/docs/DeleteIpPool404Response.md create mode 100644 rest/api/v3/ips/docs/ErrorResponse.md create mode 100644 rest/api/v3/ips/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/ips/docs/GetIp.md create mode 100644 rest/api/v3/ips/docs/GetIp200Response.md create mode 100644 rest/api/v3/ips/docs/GetIpPool.md create mode 100644 rest/api/v3/ips/docs/GetIpPool200Response.md create mode 100644 rest/api/v3/ips/docs/GetIpPool404Response.md create mode 100644 rest/api/v3/ips/docs/GetIpPool404ResponseErrorsInner.md create mode 100644 rest/api/v3/ips/docs/IpPools200.md create mode 100644 rest/api/v3/ips/docs/ListAssignedIp.md create mode 100644 rest/api/v3/ips/docs/ListAssignedIp200ResponseInner.md create mode 100644 rest/api/v3/ips/docs/ListIp.md create mode 100644 rest/api/v3/ips/docs/ListIp200ResponseInner.md create mode 100644 rest/api/v3/ips/docs/ListIpPool.md create mode 100644 rest/api/v3/ips/docs/ListRemainingIpCount.md create mode 100644 rest/api/v3/ips/docs/ListRemainingIpCount200Response.md create mode 100644 rest/api/v3/ips/docs/ListRemainingIpCount200ResponseResultsInner.md create mode 100644 rest/api/v3/ips/docs/SortByDirection.md create mode 100644 rest/api/v3/ips/docs/UpdateIpPool.md create mode 100644 rest/api/v3/ips/docs/UpdateIpPool404Response.md create mode 100644 rest/api/v3/ips/docs/UpdateIpPool404ResponseErrorsInner.md create mode 100644 rest/api/v3/ips/docs/UpdateIpPoolRequest.md create mode 100644 rest/api/v3/ips/model_add_ip_201_response.go create mode 100644 rest/api/v3/ips/model_add_ip_201_response_ips_inner.go create mode 100644 rest/api/v3/ips/model_add_ip_request.go create mode 100644 rest/api/v3/ips/model_add_ip_to_ip_pool_201_response.go create mode 100644 rest/api/v3/ips/model_add_ip_to_ip_pool_404_response.go create mode 100644 rest/api/v3/ips/model_add_ip_to_ip_pool_404_response_errors_inner.go create mode 100644 rest/api/v3/ips/model_add_ip_to_ip_pool_request.go create mode 100644 rest/api/v3/ips/model_create_ip_pool_request.go create mode 100644 rest/api/v3/ips/model_delete_ip_from_ip_pool_404_response.go create mode 100644 rest/api/v3/ips/model_delete_ip_pool_404_response.go create mode 100644 rest/api/v3/ips/model_error_response.go create mode 100644 rest/api/v3/ips/model_error_response_errors_inner.go create mode 100644 rest/api/v3/ips/model_get_ip_200_response.go create mode 100644 rest/api/v3/ips/model_get_ip_pool_200_response.go create mode 100644 rest/api/v3/ips/model_get_ip_pool_404_response.go create mode 100644 rest/api/v3/ips/model_get_ip_pool_404_response_errors_inner.go create mode 100644 rest/api/v3/ips/model_ip_pools200.go create mode 100644 rest/api/v3/ips/model_list_assigned_ip_200_response_inner.go create mode 100644 rest/api/v3/ips/model_list_ip_200_response_inner.go create mode 100644 rest/api/v3/ips/model_list_remaining_ip_count_200_response.go create mode 100644 rest/api/v3/ips/model_list_remaining_ip_count_200_response_results_inner.go create mode 100644 rest/api/v3/ips/model_sort_by_direction.go create mode 100644 rest/api/v3/ips/model_update_ip_pool_404_response.go create mode 100644 rest/api/v3/ips/model_update_ip_pool_404_response_errors_inner.go create mode 100644 rest/api/v3/ips/model_update_ip_pool_request.go create mode 100644 rest/api/v3/link_branding/.openapi-generator create mode 100644 rest/api/v3/link_branding/.openapi-generator-ignore create mode 100644 rest/api/v3/link_branding/README.md create mode 100644 rest/api/v3/link_branding/api_associate_branded_link_with_subuser.go create mode 100644 rest/api/v3/link_branding/api_create_branded_link.go create mode 100644 rest/api/v3/link_branding/api_delete_branded_link.go create mode 100644 rest/api/v3/link_branding/api_disassociate_branded_link_from_subuser.go create mode 100644 rest/api/v3/link_branding/api_get_branded_link.go create mode 100644 rest/api/v3/link_branding/api_list_branded_link.go create mode 100644 rest/api/v3/link_branding/api_list_default_branded_link.go create mode 100644 rest/api/v3/link_branding/api_list_subuser_branded_link.go create mode 100644 rest/api/v3/link_branding/api_service.go create mode 100644 rest/api/v3/link_branding/api_update_branded_link.go create mode 100644 rest/api/v3/link_branding/api_validate_branded_link.go create mode 100644 rest/api/v3/link_branding/docs/AssociateBrandedLinkWithSubuser.md create mode 100644 rest/api/v3/link_branding/docs/AssociateBrandedLinkWithSubuserRequest.md create mode 100644 rest/api/v3/link_branding/docs/CreateBrandedLink.md create mode 100644 rest/api/v3/link_branding/docs/CreateBrandedLinkRequest.md create mode 100644 rest/api/v3/link_branding/docs/Default.md create mode 100644 rest/api/v3/link_branding/docs/Default1.md create mode 100644 rest/api/v3/link_branding/docs/Default2.md create mode 100644 rest/api/v3/link_branding/docs/DeleteBrandedLink.md create mode 100644 rest/api/v3/link_branding/docs/DisassociateBrandedLinkFromSubuser.md create mode 100644 rest/api/v3/link_branding/docs/GetBrandedLink.md create mode 100644 rest/api/v3/link_branding/docs/Legacy.md create mode 100644 rest/api/v3/link_branding/docs/LinkBranding200.md create mode 100644 rest/api/v3/link_branding/docs/LinkBranding200Dns.md create mode 100644 rest/api/v3/link_branding/docs/LinkBranding200DnsDomainCname.md create mode 100644 rest/api/v3/link_branding/docs/LinkBranding200DnsOwnerCname.md create mode 100644 rest/api/v3/link_branding/docs/ListBrandedLink.md create mode 100644 rest/api/v3/link_branding/docs/ListDefaultBrandedLink.md create mode 100644 rest/api/v3/link_branding/docs/ListSubuserBrandedLink.md create mode 100644 rest/api/v3/link_branding/docs/Region.md create mode 100644 rest/api/v3/link_branding/docs/Type.md create mode 100644 rest/api/v3/link_branding/docs/Type1.md create mode 100644 rest/api/v3/link_branding/docs/UpdateBrandedLink.md create mode 100644 rest/api/v3/link_branding/docs/UpdateBrandedLinkRequest.md create mode 100644 rest/api/v3/link_branding/docs/Valid.md create mode 100644 rest/api/v3/link_branding/docs/Valid1.md create mode 100644 rest/api/v3/link_branding/docs/Valid2.md create mode 100644 rest/api/v3/link_branding/docs/Valid3.md create mode 100644 rest/api/v3/link_branding/docs/Valid4.md create mode 100644 rest/api/v3/link_branding/docs/Valid5.md create mode 100644 rest/api/v3/link_branding/docs/ValidateBrandedLink.md create mode 100644 rest/api/v3/link_branding/docs/ValidateBrandedLink200Response.md create mode 100644 rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResults.md create mode 100644 rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResultsDomainCname.md create mode 100644 rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResultsOwnerCname.md create mode 100644 rest/api/v3/link_branding/docs/ValidateBrandedLink500Response.md create mode 100644 rest/api/v3/link_branding/docs/ValidateBrandedLink500ResponseErrorsInner.md create mode 100644 rest/api/v3/link_branding/model_associate_branded_link_with_subuser_request.go create mode 100644 rest/api/v3/link_branding/model_create_branded_link_request.go create mode 100644 rest/api/v3/link_branding/model_default.go create mode 100644 rest/api/v3/link_branding/model_default1.go create mode 100644 rest/api/v3/link_branding/model_default2.go create mode 100644 rest/api/v3/link_branding/model_legacy.go create mode 100644 rest/api/v3/link_branding/model_link_branding200.go create mode 100644 rest/api/v3/link_branding/model_link_branding200_dns.go create mode 100644 rest/api/v3/link_branding/model_link_branding200_dns_domain_cname.go create mode 100644 rest/api/v3/link_branding/model_link_branding200_dns_owner_cname.go create mode 100644 rest/api/v3/link_branding/model_region.go create mode 100644 rest/api/v3/link_branding/model_type.go create mode 100644 rest/api/v3/link_branding/model_type1.go create mode 100644 rest/api/v3/link_branding/model_update_branded_link_request.go create mode 100644 rest/api/v3/link_branding/model_valid.go create mode 100644 rest/api/v3/link_branding/model_valid1.go create mode 100644 rest/api/v3/link_branding/model_valid2.go create mode 100644 rest/api/v3/link_branding/model_valid3.go create mode 100644 rest/api/v3/link_branding/model_valid4.go create mode 100644 rest/api/v3/link_branding/model_valid5.go create mode 100644 rest/api/v3/link_branding/model_validate_branded_link_200_response.go create mode 100644 rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results.go create mode 100644 rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results_domain_cname.go create mode 100644 rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results_owner_cname.go create mode 100644 rest/api/v3/link_branding/model_validate_branded_link_500_response.go create mode 100644 rest/api/v3/link_branding/model_validate_branded_link_500_response_errors_inner.go create mode 100644 rest/api/v3/lmc_campaigns/.openapi-generator create mode 100644 rest/api/v3/lmc_campaigns/.openapi-generator-ignore create mode 100644 rest/api/v3/lmc_campaigns/README.md create mode 100644 rest/api/v3/lmc_campaigns/api_create_campaign.go create mode 100644 rest/api/v3/lmc_campaigns/api_delete_campaign.go create mode 100644 rest/api/v3/lmc_campaigns/api_get_campaign.go create mode 100644 rest/api/v3/lmc_campaigns/api_get_scheduled_campaign.go create mode 100644 rest/api/v3/lmc_campaigns/api_list_campaign.go create mode 100644 rest/api/v3/lmc_campaigns/api_schedule_campaign.go create mode 100644 rest/api/v3/lmc_campaigns/api_send_campaign.go create mode 100644 rest/api/v3/lmc_campaigns/api_send_test_campaign.go create mode 100644 rest/api/v3/lmc_campaigns/api_service.go create mode 100644 rest/api/v3/lmc_campaigns/api_un_schedule_campaign.go create mode 100644 rest/api/v3/lmc_campaigns/api_update_campaign.go create mode 100644 rest/api/v3/lmc_campaigns/api_update_scheduled_campaign.go create mode 100644 rest/api/v3/lmc_campaigns/docs/Campaigns2xx.md create mode 100644 rest/api/v3/lmc_campaigns/docs/CreateCampaign.md create mode 100644 rest/api/v3/lmc_campaigns/docs/DeleteCampaign.md create mode 100644 rest/api/v3/lmc_campaigns/docs/Editor.md create mode 100644 rest/api/v3/lmc_campaigns/docs/ErrorResponse.md create mode 100644 rest/api/v3/lmc_campaigns/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/lmc_campaigns/docs/GetCampaign.md create mode 100644 rest/api/v3/lmc_campaigns/docs/GetCampaign200Response.md create mode 100644 rest/api/v3/lmc_campaigns/docs/GetScheduledCampaign.md create mode 100644 rest/api/v3/lmc_campaigns/docs/ListCampaign.md create mode 100644 rest/api/v3/lmc_campaigns/docs/ListCampaign200Response.md create mode 100644 rest/api/v3/lmc_campaigns/docs/PostCampaignsRequest.md create mode 100644 rest/api/v3/lmc_campaigns/docs/ScheduleACampaignRequest.md create mode 100644 rest/api/v3/lmc_campaigns/docs/ScheduleACampaignResponse.md create mode 100644 rest/api/v3/lmc_campaigns/docs/ScheduleCampaign.md create mode 100644 rest/api/v3/lmc_campaigns/docs/SendACampaignResponse.md create mode 100644 rest/api/v3/lmc_campaigns/docs/SendATestCampaignRequest.md create mode 100644 rest/api/v3/lmc_campaigns/docs/SendCampaign.md create mode 100644 rest/api/v3/lmc_campaigns/docs/SendTestCampaign.md create mode 100644 rest/api/v3/lmc_campaigns/docs/SendTestCampaignRequest.md create mode 100644 rest/api/v3/lmc_campaigns/docs/Status.md create mode 100644 rest/api/v3/lmc_campaigns/docs/UnScheduleCampaign.md create mode 100644 rest/api/v3/lmc_campaigns/docs/UpdateACampaignRequest.md create mode 100644 rest/api/v3/lmc_campaigns/docs/UpdateAScheduledCampaignRequest.md create mode 100644 rest/api/v3/lmc_campaigns/docs/UpdateAScheduledCampaignResponse.md create mode 100644 rest/api/v3/lmc_campaigns/docs/UpdateCampaign.md create mode 100644 rest/api/v3/lmc_campaigns/docs/UpdateScheduledCampaign.md create mode 100644 rest/api/v3/lmc_campaigns/docs/ViewScheduledTimeOfACampaignResponse.md create mode 100644 rest/api/v3/lmc_campaigns/model_campaigns2xx.go create mode 100644 rest/api/v3/lmc_campaigns/model_editor.go create mode 100644 rest/api/v3/lmc_campaigns/model_error_response.go create mode 100644 rest/api/v3/lmc_campaigns/model_error_response_errors_inner.go create mode 100644 rest/api/v3/lmc_campaigns/model_get_campaign_200_response.go create mode 100644 rest/api/v3/lmc_campaigns/model_list_campaign_200_response.go create mode 100644 rest/api/v3/lmc_campaigns/model_post_campaigns_request.go create mode 100644 rest/api/v3/lmc_campaigns/model_schedule_a_campaign_request.go create mode 100644 rest/api/v3/lmc_campaigns/model_schedule_a_campaign_response.go create mode 100644 rest/api/v3/lmc_campaigns/model_send_a_campaign_response.go create mode 100644 rest/api/v3/lmc_campaigns/model_send_a_test_campaign_request.go create mode 100644 rest/api/v3/lmc_campaigns/model_send_test_campaign_request.go create mode 100644 rest/api/v3/lmc_campaigns/model_status.go create mode 100644 rest/api/v3/lmc_campaigns/model_update_a_campaign_request.go create mode 100644 rest/api/v3/lmc_campaigns/model_update_a_scheduled_campaign_request.go create mode 100644 rest/api/v3/lmc_campaigns/model_update_a_scheduled_campaign_response.go create mode 100644 rest/api/v3/lmc_campaigns/model_view_scheduled_time_of_a_campaign_response.go create mode 100644 rest/api/v3/lmc_contactdb/.openapi-generator create mode 100644 rest/api/v3/lmc_contactdb/.openapi-generator-ignore create mode 100644 rest/api/v3/lmc_contactdb/README.md create mode 100644 rest/api/v3/lmc_contactdb/api_add_recipient.go create mode 100644 rest/api/v3/lmc_contactdb/api_add_recipient_to_contact_db_list.go create mode 100644 rest/api/v3/lmc_contactdb/api_add_recipients_to_contact_db_list.go create mode 100644 rest/api/v3/lmc_contactdb/api_create_contact_db_list.go create mode 100644 rest/api/v3/lmc_contactdb/api_create_custom_field.go create mode 100644 rest/api/v3/lmc_contactdb/api_create_segment.go create mode 100644 rest/api/v3/lmc_contactdb/api_delete_contact_db_list.go create mode 100644 rest/api/v3/lmc_contactdb/api_delete_contact_db_lists.go create mode 100644 rest/api/v3/lmc_contactdb/api_delete_custom_field.go create mode 100644 rest/api/v3/lmc_contactdb/api_delete_recipient.go create mode 100644 rest/api/v3/lmc_contactdb/api_delete_recipient_from_contact_db_list.go create mode 100644 rest/api/v3/lmc_contactdb/api_delete_recipients.go create mode 100644 rest/api/v3/lmc_contactdb/api_delete_segment.go create mode 100644 rest/api/v3/lmc_contactdb/api_get_billable.go create mode 100644 rest/api/v3/lmc_contactdb/api_get_contact_db_list.go create mode 100644 rest/api/v3/lmc_contactdb/api_get_custom_field.go create mode 100644 rest/api/v3/lmc_contactdb/api_get_recipient.go create mode 100644 rest/api/v3/lmc_contactdb/api_get_recipient_list.go create mode 100644 rest/api/v3/lmc_contactdb/api_get_segment.go create mode 100644 rest/api/v3/lmc_contactdb/api_list_contact_db_list.go create mode 100644 rest/api/v3/lmc_contactdb/api_list_custom_field.go create mode 100644 rest/api/v3/lmc_contactdb/api_list_recipient.go create mode 100644 rest/api/v3/lmc_contactdb/api_list_recipient_count.go create mode 100644 rest/api/v3/lmc_contactdb/api_list_recipient_for_segment.go create mode 100644 rest/api/v3/lmc_contactdb/api_list_recipients_from_contact_db_list.go create mode 100644 rest/api/v3/lmc_contactdb/api_list_reserved_field.go create mode 100644 rest/api/v3/lmc_contactdb/api_list_search_recipient.go create mode 100644 rest/api/v3/lmc_contactdb/api_list_segment.go create mode 100644 rest/api/v3/lmc_contactdb/api_list_status.go create mode 100644 rest/api/v3/lmc_contactdb/api_search_recipient.go create mode 100644 rest/api/v3/lmc_contactdb/api_service.go create mode 100644 rest/api/v3/lmc_contactdb/api_update_contact_db_list.go create mode 100644 rest/api/v3/lmc_contactdb/api_update_recipient.go create mode 100644 rest/api/v3/lmc_contactdb/api_update_segment.go create mode 100644 rest/api/v3/lmc_contactdb/docs/AddRecipient.md create mode 100644 rest/api/v3/lmc_contactdb/docs/AddRecipientRequestInner.md create mode 100644 rest/api/v3/lmc_contactdb/docs/AddRecipientToContactDbList.md create mode 100644 rest/api/v3/lmc_contactdb/docs/AddRecipientsToContactDbList.md create mode 100644 rest/api/v3/lmc_contactdb/docs/AndOr.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbCustomField.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbCustomFieldId2xx.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbCustomFieldIdValue.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbList2xx.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbRecipient200.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbRecipient200RecipientsInner.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbRecipientCount200.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbRecipientResponse201.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbRecipientResponse201ErrorsInner.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbSegments.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbSegmentsConditions.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbSegmentsId200.md create mode 100644 rest/api/v3/lmc_contactdb/docs/CreateAListRequest.md create mode 100644 rest/api/v3/lmc_contactdb/docs/CreateContactDbList.md create mode 100644 rest/api/v3/lmc_contactdb/docs/CreateCustomField.md create mode 100644 rest/api/v3/lmc_contactdb/docs/CreateCustomFieldRequest.md create mode 100644 rest/api/v3/lmc_contactdb/docs/CreateSegment.md create mode 100644 rest/api/v3/lmc_contactdb/docs/DeleteContactDbList.md create mode 100644 rest/api/v3/lmc_contactdb/docs/DeleteContactDbLists.md create mode 100644 rest/api/v3/lmc_contactdb/docs/DeleteContacts.md create mode 100644 rest/api/v3/lmc_contactdb/docs/DeleteCustomField.md create mode 100644 rest/api/v3/lmc_contactdb/docs/DeleteRecipient.md create mode 100644 rest/api/v3/lmc_contactdb/docs/DeleteRecipientFromContactDbList.md create mode 100644 rest/api/v3/lmc_contactdb/docs/DeleteRecipients.md create mode 100644 rest/api/v3/lmc_contactdb/docs/DeleteSegment.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ErrorResponse.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/lmc_contactdb/docs/GetBillable.md create mode 100644 rest/api/v3/lmc_contactdb/docs/GetContactDbList.md create mode 100644 rest/api/v3/lmc_contactdb/docs/GetCustomField.md create mode 100644 rest/api/v3/lmc_contactdb/docs/GetRecipient.md create mode 100644 rest/api/v3/lmc_contactdb/docs/GetRecipientList.md create mode 100644 rest/api/v3/lmc_contactdb/docs/GetRecipientList200Response.md create mode 100644 rest/api/v3/lmc_contactdb/docs/GetSegment.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListAllCustomFieldsResponse.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListAllListsResponse.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListAllSegmentsResponse.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListContactDbList.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListCustomField.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListRecipient.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListRecipientCount.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListRecipientForSegment.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListRecipientsFromContactDbList.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListRecipientsFromContactDbList200Response.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListRecipientsOnASegmentResponse.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListRecipientsResponse.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListReservedField.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListReservedField200Response.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListReservedField200ResponseReservedFieldsInner.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListSearchRecipient.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListSegment.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListStatus.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListStatus200Response.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListStatus200ResponseStatusInner.md create mode 100644 rest/api/v3/lmc_contactdb/docs/Operator.md create mode 100644 rest/api/v3/lmc_contactdb/docs/SearchRecipient.md create mode 100644 rest/api/v3/lmc_contactdb/docs/SearchRecipient200Response.md create mode 100644 rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInner.md create mode 100644 rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInnerCustomFieldsInner.md create mode 100644 rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue.md create mode 100644 rest/api/v3/lmc_contactdb/docs/SearchRecipientRequest.md create mode 100644 rest/api/v3/lmc_contactdb/docs/Type.md create mode 100644 rest/api/v3/lmc_contactdb/docs/UpdateAListRequest.md create mode 100644 rest/api/v3/lmc_contactdb/docs/UpdateContactDbList.md create mode 100644 rest/api/v3/lmc_contactdb/docs/UpdateContactDbList200Response.md create mode 100644 rest/api/v3/lmc_contactdb/docs/UpdateRecipient.md create mode 100644 rest/api/v3/lmc_contactdb/docs/UpdateRecipientRequestInner.md create mode 100644 rest/api/v3/lmc_contactdb/docs/UpdateSegment.md create mode 100644 rest/api/v3/lmc_contactdb/docs/UpdateSegmentRequest.md create mode 100644 rest/api/v3/lmc_contactdb/model_add_recipient_request_inner.go create mode 100644 rest/api/v3/lmc_contactdb/model_and_or.go create mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_custom_field.go create mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_custom_field_id2xx.go create mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_custom_field_id_value.go create mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_list2xx.go create mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_recipient200.go create mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_recipient200_recipients_inner.go create mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_recipient_count200.go create mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_recipient_response201.go create mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_recipient_response201_errors_inner.go create mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_segments.go create mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_segments_conditions.go create mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_segments_id200.go create mode 100644 rest/api/v3/lmc_contactdb/model_create_a_list_request.go create mode 100644 rest/api/v3/lmc_contactdb/model_create_custom_field_request.go create mode 100644 rest/api/v3/lmc_contactdb/model_delete_contacts.go create mode 100644 rest/api/v3/lmc_contactdb/model_error_response.go create mode 100644 rest/api/v3/lmc_contactdb/model_error_response_errors_inner.go create mode 100644 rest/api/v3/lmc_contactdb/model_get_recipient_list_200_response.go create mode 100644 rest/api/v3/lmc_contactdb/model_list_all_custom_fields_response.go create mode 100644 rest/api/v3/lmc_contactdb/model_list_all_lists_response.go create mode 100644 rest/api/v3/lmc_contactdb/model_list_all_segments_response.go create mode 100644 rest/api/v3/lmc_contactdb/model_list_recipients_from_contact_db_list_200_response.go create mode 100644 rest/api/v3/lmc_contactdb/model_list_recipients_on_a_segment_response.go create mode 100644 rest/api/v3/lmc_contactdb/model_list_recipients_response.go create mode 100644 rest/api/v3/lmc_contactdb/model_list_reserved_field_200_response.go create mode 100644 rest/api/v3/lmc_contactdb/model_list_reserved_field_200_response_reserved_fields_inner.go create mode 100644 rest/api/v3/lmc_contactdb/model_list_status_200_response.go create mode 100644 rest/api/v3/lmc_contactdb/model_list_status_200_response_status_inner.go create mode 100644 rest/api/v3/lmc_contactdb/model_operator.go create mode 100644 rest/api/v3/lmc_contactdb/model_search_recipient_200_response.go create mode 100644 rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner.go create mode 100644 rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner_custom_fields_inner.go create mode 100644 rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner_custom_fields_inner_value.go create mode 100644 rest/api/v3/lmc_contactdb/model_search_recipient_request.go create mode 100644 rest/api/v3/lmc_contactdb/model_type.go create mode 100644 rest/api/v3/lmc_contactdb/model_update_a_list_request.go create mode 100644 rest/api/v3/lmc_contactdb/model_update_contact_db_list_200_response.go create mode 100644 rest/api/v3/lmc_contactdb/model_update_recipient_request_inner.go create mode 100644 rest/api/v3/lmc_contactdb/model_update_segment_request.go create mode 100644 rest/api/v3/lmc_senders/.openapi-generator create mode 100644 rest/api/v3/lmc_senders/.openapi-generator-ignore create mode 100644 rest/api/v3/lmc_senders/README.md create mode 100644 rest/api/v3/lmc_senders/api_create_sender.go create mode 100644 rest/api/v3/lmc_senders/api_delete_sender.go create mode 100644 rest/api/v3/lmc_senders/api_get_sender.go create mode 100644 rest/api/v3/lmc_senders/api_list_sender.go create mode 100644 rest/api/v3/lmc_senders/api_reset_sender_verification.go create mode 100644 rest/api/v3/lmc_senders/api_service.go create mode 100644 rest/api/v3/lmc_senders/api_update_sender.go create mode 100644 rest/api/v3/lmc_senders/docs/CreateSender.md create mode 100644 rest/api/v3/lmc_senders/docs/CreateSender400Response.md create mode 100644 rest/api/v3/lmc_senders/docs/CreateSender400ResponseErrorsInner.md create mode 100644 rest/api/v3/lmc_senders/docs/CreateSenderRequest.md create mode 100644 rest/api/v3/lmc_senders/docs/DeleteSender.md create mode 100644 rest/api/v3/lmc_senders/docs/GetSender.md create mode 100644 rest/api/v3/lmc_senders/docs/ListSender.md create mode 100644 rest/api/v3/lmc_senders/docs/ListSender200Response.md create mode 100644 rest/api/v3/lmc_senders/docs/ResetSenderVerification.md create mode 100644 rest/api/v3/lmc_senders/docs/SenderId.md create mode 100644 rest/api/v3/lmc_senders/docs/SenderIdRequest.md create mode 100644 rest/api/v3/lmc_senders/docs/SenderIdRequestFrom.md create mode 100644 rest/api/v3/lmc_senders/docs/SenderIdRequestReplyTo.md create mode 100644 rest/api/v3/lmc_senders/docs/UpdateSender.md create mode 100644 rest/api/v3/lmc_senders/model_create_sender_400_response.go create mode 100644 rest/api/v3/lmc_senders/model_create_sender_400_response_errors_inner.go create mode 100644 rest/api/v3/lmc_senders/model_create_sender_request.go create mode 100644 rest/api/v3/lmc_senders/model_list_sender_200_response.go create mode 100644 rest/api/v3/lmc_senders/model_sender_id.go create mode 100644 rest/api/v3/lmc_senders/model_sender_id_request.go create mode 100644 rest/api/v3/lmc_senders/model_sender_id_request_from.go create mode 100644 rest/api/v3/lmc_senders/model_sender_id_request_reply_to.go create mode 100644 rest/api/v3/mail/.openapi-generator create mode 100644 rest/api/v3/mail/.openapi-generator-ignore create mode 100644 rest/api/v3/mail/README.md create mode 100644 rest/api/v3/mail/api_create_mail_batch.go create mode 100644 rest/api/v3/mail/api_get_mail_batch.go create mode 100644 rest/api/v3/mail/api_send_mail.go create mode 100644 rest/api/v3/mail/api_service.go create mode 100644 rest/api/v3/mail/docs/ContentEncoding.md create mode 100644 rest/api/v3/mail/docs/CreateMailBatch.md create mode 100644 rest/api/v3/mail/docs/Disposition.md create mode 100644 rest/api/v3/mail/docs/ErrorResponse.md create mode 100644 rest/api/v3/mail/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/mail/docs/GetMailBatch.md create mode 100644 rest/api/v3/mail/docs/MailBatchResponse.md create mode 100644 rest/api/v3/mail/docs/MailFrom.md create mode 100644 rest/api/v3/mail/docs/MailTo.md create mode 100644 rest/api/v3/mail/docs/SendMail.md create mode 100644 rest/api/v3/mail/docs/SendMailRequest.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestAsm.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestAttachmentsInner.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestContentInner.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestMailSettings.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassBounceManagement.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassListManagement.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassSpamManagement.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassUnsubscribeManagement.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestMailSettingsFooter.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestMailSettingsSandboxMode.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestPersonalizationsInner.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestTrackingSettings.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestTrackingSettingsClickTracking.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestTrackingSettingsGanalytics.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestTrackingSettingsOpenTracking.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestTrackingSettingsSubscriptionTracking.md create mode 100644 rest/api/v3/mail/model_content_encoding.go create mode 100644 rest/api/v3/mail/model_disposition.go create mode 100644 rest/api/v3/mail/model_error_response.go create mode 100644 rest/api/v3/mail/model_error_response_errors_inner.go create mode 100644 rest/api/v3/mail/model_mail_batch_response.go create mode 100644 rest/api/v3/mail/model_mail_from.go create mode 100644 rest/api/v3/mail/model_mail_to.go create mode 100644 rest/api/v3/mail/model_send_mail_request.go create mode 100644 rest/api/v3/mail/model_send_mail_request_asm.go create mode 100644 rest/api/v3/mail/model_send_mail_request_attachments_inner.go create mode 100644 rest/api/v3/mail/model_send_mail_request_content_inner.go create mode 100644 rest/api/v3/mail/model_send_mail_request_mail_settings.go create mode 100644 rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_bounce_management.go create mode 100644 rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_list_management.go create mode 100644 rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_spam_management.go create mode 100644 rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_unsubscribe_management.go create mode 100644 rest/api/v3/mail/model_send_mail_request_mail_settings_footer.go create mode 100644 rest/api/v3/mail/model_send_mail_request_mail_settings_sandbox_mode.go create mode 100644 rest/api/v3/mail/model_send_mail_request_personalizations_inner.go create mode 100644 rest/api/v3/mail/model_send_mail_request_tracking_settings.go create mode 100644 rest/api/v3/mail/model_send_mail_request_tracking_settings_click_tracking.go create mode 100644 rest/api/v3/mail/model_send_mail_request_tracking_settings_ganalytics.go create mode 100644 rest/api/v3/mail/model_send_mail_request_tracking_settings_open_tracking.go create mode 100644 rest/api/v3/mail/model_send_mail_request_tracking_settings_subscription_tracking.go create mode 100644 rest/api/v3/mail_settings/.openapi-generator create mode 100644 rest/api/v3/mail_settings/.openapi-generator-ignore create mode 100644 rest/api/v3/mail_settings/README.md create mode 100644 rest/api/v3/mail_settings/api_list_address_whitelist.go create mode 100644 rest/api/v3/mail_settings/api_list_bounce_purge.go create mode 100644 rest/api/v3/mail_settings/api_list_footer.go create mode 100644 rest/api/v3/mail_settings/api_list_forward_bounce.go create mode 100644 rest/api/v3/mail_settings/api_list_forward_spam.go create mode 100644 rest/api/v3/mail_settings/api_list_mail_setting.go create mode 100644 rest/api/v3/mail_settings/api_list_template.go create mode 100644 rest/api/v3/mail_settings/api_service.go create mode 100644 rest/api/v3/mail_settings/api_update_address_whitelist.go create mode 100644 rest/api/v3/mail_settings/api_update_bounce_purge.go create mode 100644 rest/api/v3/mail_settings/api_update_footer.go create mode 100644 rest/api/v3/mail_settings/api_update_forward_bounce.go create mode 100644 rest/api/v3/mail_settings/api_update_forward_spam.go create mode 100644 rest/api/v3/mail_settings/api_update_template.go create mode 100644 rest/api/v3/mail_settings/docs/ListAddressWhitelist.md create mode 100644 rest/api/v3/mail_settings/docs/ListBouncePurge.md create mode 100644 rest/api/v3/mail_settings/docs/ListFooter.md create mode 100644 rest/api/v3/mail_settings/docs/ListForwardBounce.md create mode 100644 rest/api/v3/mail_settings/docs/ListForwardSpam.md create mode 100644 rest/api/v3/mail_settings/docs/ListMailSetting.md create mode 100644 rest/api/v3/mail_settings/docs/ListMailSetting200Response.md create mode 100644 rest/api/v3/mail_settings/docs/ListMailSetting200ResponseResultInner.md create mode 100644 rest/api/v3/mail_settings/docs/ListTemplate.md create mode 100644 rest/api/v3/mail_settings/docs/MailSettingsAddressWhitelabel200.md create mode 100644 rest/api/v3/mail_settings/docs/MailSettingsBouncePurge.md create mode 100644 rest/api/v3/mail_settings/docs/MailSettingsFooter.md create mode 100644 rest/api/v3/mail_settings/docs/MailSettingsForwardBounce.md create mode 100644 rest/api/v3/mail_settings/docs/MailSettingsForwardSpam.md create mode 100644 rest/api/v3/mail_settings/docs/MailSettingsTemplate200.md create mode 100644 rest/api/v3/mail_settings/docs/UpdateAddressWhitelist.md create mode 100644 rest/api/v3/mail_settings/docs/UpdateAddressWhitelistRequest.md create mode 100644 rest/api/v3/mail_settings/docs/UpdateBouncePurge.md create mode 100644 rest/api/v3/mail_settings/docs/UpdateFooter.md create mode 100644 rest/api/v3/mail_settings/docs/UpdateForwardBounce.md create mode 100644 rest/api/v3/mail_settings/docs/UpdateForwardSpam.md create mode 100644 rest/api/v3/mail_settings/docs/UpdateTemplate.md create mode 100644 rest/api/v3/mail_settings/docs/UpdateTemplate200Response.md create mode 100644 rest/api/v3/mail_settings/docs/UpdateTemplateRequest.md create mode 100644 rest/api/v3/mail_settings/model_list_mail_setting_200_response.go create mode 100644 rest/api/v3/mail_settings/model_list_mail_setting_200_response_result_inner.go create mode 100644 rest/api/v3/mail_settings/model_mail_settings_address_whitelabel200.go create mode 100644 rest/api/v3/mail_settings/model_mail_settings_bounce_purge.go create mode 100644 rest/api/v3/mail_settings/model_mail_settings_footer.go create mode 100644 rest/api/v3/mail_settings/model_mail_settings_forward_bounce.go create mode 100644 rest/api/v3/mail_settings/model_mail_settings_forward_spam.go create mode 100644 rest/api/v3/mail_settings/model_mail_settings_template200.go create mode 100644 rest/api/v3/mail_settings/model_update_address_whitelist_request.go create mode 100644 rest/api/v3/mail_settings/model_update_template_200_response.go create mode 100644 rest/api/v3/mail_settings/model_update_template_request.go create mode 100644 rest/api/v3/mc_designs/.openapi-generator create mode 100644 rest/api/v3/mc_designs/.openapi-generator-ignore create mode 100644 rest/api/v3/mc_designs/README.md create mode 100644 rest/api/v3/mc_designs/api_create_design.go create mode 100644 rest/api/v3/mc_designs/api_delete_design.go create mode 100644 rest/api/v3/mc_designs/api_duplicate_design.go create mode 100644 rest/api/v3/mc_designs/api_duplicate_pre_built_design.go create mode 100644 rest/api/v3/mc_designs/api_get_design.go create mode 100644 rest/api/v3/mc_designs/api_get_pre_built_design.go create mode 100644 rest/api/v3/mc_designs/api_list_design.go create mode 100644 rest/api/v3/mc_designs/api_list_pre_built_design.go create mode 100644 rest/api/v3/mc_designs/api_service.go create mode 100644 rest/api/v3/mc_designs/api_update_design.go create mode 100644 rest/api/v3/mc_designs/docs/ApiError.md create mode 100644 rest/api/v3/mc_designs/docs/ApiErrors.md create mode 100644 rest/api/v3/mc_designs/docs/CreateDesign.md create mode 100644 rest/api/v3/mc_designs/docs/DeleteDesign.md create mode 100644 rest/api/v3/mc_designs/docs/DesignCommonProperties.md create mode 100644 rest/api/v3/mc_designs/docs/DesignDuplicateInput.md create mode 100644 rest/api/v3/mc_designs/docs/DesignInput.md create mode 100644 rest/api/v3/mc_designs/docs/DesignOutput.md create mode 100644 rest/api/v3/mc_designs/docs/DesignOutputSummary.md create mode 100644 rest/api/v3/mc_designs/docs/DuplicateDesign.md create mode 100644 rest/api/v3/mc_designs/docs/DuplicatePreBuiltDesign.md create mode 100644 rest/api/v3/mc_designs/docs/Editor.md create mode 100644 rest/api/v3/mc_designs/docs/GetDesign.md create mode 100644 rest/api/v3/mc_designs/docs/GetPreBuiltDesign.md create mode 100644 rest/api/v3/mc_designs/docs/ListDesign.md create mode 100644 rest/api/v3/mc_designs/docs/ListDesign200Response.md create mode 100644 rest/api/v3/mc_designs/docs/ListPreBuiltDesign.md create mode 100644 rest/api/v3/mc_designs/docs/Metadata.md create mode 100644 rest/api/v3/mc_designs/docs/UpdateDesign.md create mode 100644 rest/api/v3/mc_designs/docs/UpdateDesignRequest.md create mode 100644 rest/api/v3/mc_designs/model_api_error.go create mode 100644 rest/api/v3/mc_designs/model_api_errors.go create mode 100644 rest/api/v3/mc_designs/model_design_common_properties.go create mode 100644 rest/api/v3/mc_designs/model_design_duplicate_input.go create mode 100644 rest/api/v3/mc_designs/model_design_input.go create mode 100644 rest/api/v3/mc_designs/model_design_output.go create mode 100644 rest/api/v3/mc_designs/model_design_output_summary.go create mode 100644 rest/api/v3/mc_designs/model_editor.go create mode 100644 rest/api/v3/mc_designs/model_list_design_200_response.go create mode 100644 rest/api/v3/mc_designs/model_metadata.go create mode 100644 rest/api/v3/mc_designs/model_update_design_request.go create mode 100644 rest/api/v3/mc_lists/.openapi-generator create mode 100644 rest/api/v3/mc_lists/.openapi-generator-ignore create mode 100644 rest/api/v3/mc_lists/README.md create mode 100644 rest/api/v3/mc_lists/api_create_marketing_list.go create mode 100644 rest/api/v3/mc_lists/api_delete_contact.go create mode 100644 rest/api/v3/mc_lists/api_delete_marketing_list.go create mode 100644 rest/api/v3/mc_lists/api_get_marketing_list.go create mode 100644 rest/api/v3/mc_lists/api_list_contact_count.go create mode 100644 rest/api/v3/mc_lists/api_list_marketing_list.go create mode 100644 rest/api/v3/mc_lists/api_service.go create mode 100644 rest/api/v3/mc_lists/api_update_marketing_list.go create mode 100644 rest/api/v3/mc_lists/docs/ContactDetails.md create mode 100644 rest/api/v3/mc_lists/docs/CreateMarketingList.md create mode 100644 rest/api/v3/mc_lists/docs/CreateMarketingList400Response.md create mode 100644 rest/api/v3/mc_lists/docs/CreateMarketingListRequest.md create mode 100644 rest/api/v3/mc_lists/docs/DeleteContact.md create mode 100644 rest/api/v3/mc_lists/docs/DeleteContact202Response.md create mode 100644 rest/api/v3/mc_lists/docs/DeleteMarketingList.md create mode 100644 rest/api/v3/mc_lists/docs/DeleteMarketingList200Response.md create mode 100644 rest/api/v3/mc_lists/docs/DeleteMarketingList404Response.md create mode 100644 rest/api/v3/mc_lists/docs/Error.md create mode 100644 rest/api/v3/mc_lists/docs/GetMarketingList.md create mode 100644 rest/api/v3/mc_lists/docs/GetMarketingList200Response.md create mode 100644 rest/api/v3/mc_lists/docs/List.md create mode 100644 rest/api/v3/mc_lists/docs/ListContactCount.md create mode 100644 rest/api/v3/mc_lists/docs/ListContactCount200Response.md create mode 100644 rest/api/v3/mc_lists/docs/ListMarketingList.md create mode 100644 rest/api/v3/mc_lists/docs/ListMarketingList200Response.md create mode 100644 rest/api/v3/mc_lists/docs/Metadata.md create mode 100644 rest/api/v3/mc_lists/docs/SelfMetadata.md create mode 100644 rest/api/v3/mc_lists/docs/UpdateMarketingList.md create mode 100644 rest/api/v3/mc_lists/docs/UpdateMarketingListRequest.md create mode 100644 rest/api/v3/mc_lists/model_contact_details.go create mode 100644 rest/api/v3/mc_lists/model_create_marketing_list_400_response.go create mode 100644 rest/api/v3/mc_lists/model_create_marketing_list_request.go create mode 100644 rest/api/v3/mc_lists/model_delete_contact_202_response.go create mode 100644 rest/api/v3/mc_lists/model_delete_marketing_list_200_response.go create mode 100644 rest/api/v3/mc_lists/model_delete_marketing_list_404_response.go create mode 100644 rest/api/v3/mc_lists/model_error.go create mode 100644 rest/api/v3/mc_lists/model_get_marketing_list_200_response.go create mode 100644 rest/api/v3/mc_lists/model_list.go create mode 100644 rest/api/v3/mc_lists/model_list_contact_count_200_response.go create mode 100644 rest/api/v3/mc_lists/model_list_marketing_list_200_response.go create mode 100644 rest/api/v3/mc_lists/model_metadata.go create mode 100644 rest/api/v3/mc_lists/model_self_metadata.go create mode 100644 rest/api/v3/mc_lists/model_update_marketing_list_request.go create mode 100644 rest/api/v3/mc_segments/.openapi-generator create mode 100644 rest/api/v3/mc_segments/.openapi-generator-ignore create mode 100644 rest/api/v3/mc_segments/README.md create mode 100644 rest/api/v3/mc_segments/api_delete_segment.go create mode 100644 rest/api/v3/mc_segments/api_get_segment.go create mode 100644 rest/api/v3/mc_segments/api_list_segment.go create mode 100644 rest/api/v3/mc_segments/api_service.go create mode 100644 rest/api/v3/mc_segments/docs/ContactResponse.md create mode 100644 rest/api/v3/mc_segments/docs/ContactResponseCustomFields.md create mode 100644 rest/api/v3/mc_segments/docs/DeleteSegment.md create mode 100644 rest/api/v3/mc_segments/docs/ErrorResponse.md create mode 100644 rest/api/v3/mc_segments/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/mc_segments/docs/FullSegment.md create mode 100644 rest/api/v3/mc_segments/docs/GetSegment.md create mode 100644 rest/api/v3/mc_segments/docs/GetSegment404Response.md create mode 100644 rest/api/v3/mc_segments/docs/GetSegment404ResponseErrorsInner.md create mode 100644 rest/api/v3/mc_segments/docs/ListSegment.md create mode 100644 rest/api/v3/mc_segments/docs/ListSegment200Response.md create mode 100644 rest/api/v3/mc_segments/docs/ListSegment500Response.md create mode 100644 rest/api/v3/mc_segments/docs/ListSegment500ResponseErrorsInner.md create mode 100644 rest/api/v3/mc_segments/docs/SegmentSummary.md create mode 100644 rest/api/v3/mc_segments/docs/SegmentWriteV2.md create mode 100644 rest/api/v3/mc_segments/model_contact_response.go create mode 100644 rest/api/v3/mc_segments/model_contact_response_custom_fields.go create mode 100644 rest/api/v3/mc_segments/model_error_response.go create mode 100644 rest/api/v3/mc_segments/model_error_response_errors_inner.go create mode 100644 rest/api/v3/mc_segments/model_full_segment.go create mode 100644 rest/api/v3/mc_segments/model_get_segment_404_response.go create mode 100644 rest/api/v3/mc_segments/model_get_segment_404_response_errors_inner.go create mode 100644 rest/api/v3/mc_segments/model_list_segment_200_response.go create mode 100644 rest/api/v3/mc_segments/model_list_segment_500_response.go create mode 100644 rest/api/v3/mc_segments/model_list_segment_500_response_errors_inner.go create mode 100644 rest/api/v3/mc_segments/model_segment_summary.go create mode 100644 rest/api/v3/mc_segments/model_segment_write_v2.go create mode 100644 rest/api/v3/mc_segments_2/.openapi-generator create mode 100644 rest/api/v3/mc_segments_2/.openapi-generator-ignore create mode 100644 rest/api/v3/mc_segments_2/README.md create mode 100644 rest/api/v3/mc_segments_2/api_create_segment.go create mode 100644 rest/api/v3/mc_segments_2/api_delete_segment.go create mode 100644 rest/api/v3/mc_segments_2/api_get_segment.go create mode 100644 rest/api/v3/mc_segments_2/api_list_segment.go create mode 100644 rest/api/v3/mc_segments_2/api_refresh_segment.go create mode 100644 rest/api/v3/mc_segments_2/api_service.go create mode 100644 rest/api/v3/mc_segments_2/api_update_segment.go create mode 100644 rest/api/v3/mc_segments_2/docs/AllSegments200.md create mode 100644 rest/api/v3/mc_segments_2/docs/ContactResponse.md create mode 100644 rest/api/v3/mc_segments_2/docs/ContactResponseCustomFields.md create mode 100644 rest/api/v3/mc_segments_2/docs/CreateSegment.md create mode 100644 rest/api/v3/mc_segments_2/docs/DeleteSegment.md create mode 100644 rest/api/v3/mc_segments_2/docs/ErrorsSegmentV2.md create mode 100644 rest/api/v3/mc_segments_2/docs/ErrorsSegmentV2ErrorsInner.md create mode 100644 rest/api/v3/mc_segments_2/docs/GetSegment.md create mode 100644 rest/api/v3/mc_segments_2/docs/ListSegment.md create mode 100644 rest/api/v3/mc_segments_2/docs/Metadata.md create mode 100644 rest/api/v3/mc_segments_2/docs/RefreshSegment.md create mode 100644 rest/api/v3/mc_segments_2/docs/Segment2xx.md create mode 100644 rest/api/v3/mc_segments_2/docs/SegmentError.md create mode 100644 rest/api/v3/mc_segments_2/docs/SegmentRefresh202.md create mode 100644 rest/api/v3/mc_segments_2/docs/SegmentRefreshRequest.md create mode 100644 rest/api/v3/mc_segments_2/docs/SegmentStatusResponse.md create mode 100644 rest/api/v3/mc_segments_2/docs/SegmentUpdate.md create mode 100644 rest/api/v3/mc_segments_2/docs/SegmentWriteV2.md create mode 100644 rest/api/v3/mc_segments_2/docs/UpdateSegment.md create mode 100644 rest/api/v3/mc_segments_2/model_all_segments200.go create mode 100644 rest/api/v3/mc_segments_2/model_contact_response.go create mode 100644 rest/api/v3/mc_segments_2/model_contact_response_custom_fields.go create mode 100644 rest/api/v3/mc_segments_2/model_errors_segment_v2.go create mode 100644 rest/api/v3/mc_segments_2/model_errors_segment_v2_errors_inner.go create mode 100644 rest/api/v3/mc_segments_2/model_metadata.go create mode 100644 rest/api/v3/mc_segments_2/model_segment2xx.go create mode 100644 rest/api/v3/mc_segments_2/model_segment_error.go create mode 100644 rest/api/v3/mc_segments_2/model_segment_refresh202.go create mode 100644 rest/api/v3/mc_segments_2/model_segment_refresh_request.go create mode 100644 rest/api/v3/mc_segments_2/model_segment_status_response.go create mode 100644 rest/api/v3/mc_segments_2/model_segment_update.go create mode 100644 rest/api/v3/mc_segments_2/model_segment_write_v2.go create mode 100644 rest/api/v3/mc_senders/.openapi-generator create mode 100644 rest/api/v3/mc_senders/.openapi-generator-ignore create mode 100644 rest/api/v3/mc_senders/README.md create mode 100644 rest/api/v3/mc_senders/api_create_sender.go create mode 100644 rest/api/v3/mc_senders/api_delete_sender.go create mode 100644 rest/api/v3/mc_senders/api_get_sender.go create mode 100644 rest/api/v3/mc_senders/api_list_sender.go create mode 100644 rest/api/v3/mc_senders/api_reset_sender_verification.go create mode 100644 rest/api/v3/mc_senders/api_service.go create mode 100644 rest/api/v3/mc_senders/api_update_sender.go create mode 100644 rest/api/v3/mc_senders/docs/CreateSender.md create mode 100644 rest/api/v3/mc_senders/docs/CreateSenderRequest.md create mode 100644 rest/api/v3/mc_senders/docs/CreateSenderRequestFrom.md create mode 100644 rest/api/v3/mc_senders/docs/CreateSenderRequestReplyTo.md create mode 100644 rest/api/v3/mc_senders/docs/DeleteSender.md create mode 100644 rest/api/v3/mc_senders/docs/ErrorResponse.md create mode 100644 rest/api/v3/mc_senders/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/mc_senders/docs/GetSender.md create mode 100644 rest/api/v3/mc_senders/docs/ListSender.md create mode 100644 rest/api/v3/mc_senders/docs/ListSender200Response.md create mode 100644 rest/api/v3/mc_senders/docs/ResetSenderVerification.md create mode 100644 rest/api/v3/mc_senders/docs/Sender.md create mode 100644 rest/api/v3/mc_senders/docs/SenderRequest.md create mode 100644 rest/api/v3/mc_senders/docs/SenderRequestFrom.md create mode 100644 rest/api/v3/mc_senders/docs/SenderRequestReplyTo.md create mode 100644 rest/api/v3/mc_senders/docs/UpdateSender.md create mode 100644 rest/api/v3/mc_senders/model_create_sender_request.go create mode 100644 rest/api/v3/mc_senders/model_create_sender_request_from.go create mode 100644 rest/api/v3/mc_senders/model_create_sender_request_reply_to.go create mode 100644 rest/api/v3/mc_senders/model_error_response.go create mode 100644 rest/api/v3/mc_senders/model_error_response_errors_inner.go create mode 100644 rest/api/v3/mc_senders/model_list_sender_200_response.go create mode 100644 rest/api/v3/mc_senders/model_sender.go create mode 100644 rest/api/v3/mc_senders/model_sender_request.go create mode 100644 rest/api/v3/mc_senders/model_sender_request_from.go create mode 100644 rest/api/v3/mc_senders/model_sender_request_reply_to.go create mode 100644 rest/api/v3/mc_singlesends/.openapi-generator create mode 100644 rest/api/v3/mc_singlesends/.openapi-generator-ignore create mode 100644 rest/api/v3/mc_singlesends/README.md create mode 100644 rest/api/v3/mc_singlesends/api_create_single_send.go create mode 100644 rest/api/v3/mc_singlesends/api_delete_scheduled_single_send.go create mode 100644 rest/api/v3/mc_singlesends/api_delete_single_send.go create mode 100644 rest/api/v3/mc_singlesends/api_delete_single_sends.go create mode 100644 rest/api/v3/mc_singlesends/api_duplicate_single_send.go create mode 100644 rest/api/v3/mc_singlesends/api_get_single_send.go create mode 100644 rest/api/v3/mc_singlesends/api_list_category.go create mode 100644 rest/api/v3/mc_singlesends/api_list_single_send.go create mode 100644 rest/api/v3/mc_singlesends/api_schedule_single_send.go create mode 100644 rest/api/v3/mc_singlesends/api_search_single_send.go create mode 100644 rest/api/v3/mc_singlesends/api_service.go create mode 100644 rest/api/v3/mc_singlesends/api_update_single_send.go create mode 100644 rest/api/v3/mc_singlesends/docs/AbTestSummary.md create mode 100644 rest/api/v3/mc_singlesends/docs/CreateSingleSend.md create mode 100644 rest/api/v3/mc_singlesends/docs/DeleteScheduledSingleSend.md create mode 100644 rest/api/v3/mc_singlesends/docs/DeleteSingleSend.md create mode 100644 rest/api/v3/mc_singlesends/docs/DeleteSingleSends.md create mode 100644 rest/api/v3/mc_singlesends/docs/DuplicateSingleSend.md create mode 100644 rest/api/v3/mc_singlesends/docs/DuplicateSingleSendRequest.md create mode 100644 rest/api/v3/mc_singlesends/docs/Editor.md create mode 100644 rest/api/v3/mc_singlesends/docs/Editor1.md create mode 100644 rest/api/v3/mc_singlesends/docs/GetSingleSend.md create mode 100644 rest/api/v3/mc_singlesends/docs/Items.md create mode 100644 rest/api/v3/mc_singlesends/docs/ListCategory.md create mode 100644 rest/api/v3/mc_singlesends/docs/ListCategory200Response.md create mode 100644 rest/api/v3/mc_singlesends/docs/ListSingleSend.md create mode 100644 rest/api/v3/mc_singlesends/docs/ListSingleSend200Response.md create mode 100644 rest/api/v3/mc_singlesends/docs/ListSingleSend500Response.md create mode 100644 rest/api/v3/mc_singlesends/docs/ListSingleSend500ResponseErrorsInner.md create mode 100644 rest/api/v3/mc_singlesends/docs/Metadata.md create mode 100644 rest/api/v3/mc_singlesends/docs/ScheduleSingleSend.md create mode 100644 rest/api/v3/mc_singlesends/docs/ScheduleSingleSend201Response.md create mode 100644 rest/api/v3/mc_singlesends/docs/ScheduleSingleSendRequest.md create mode 100644 rest/api/v3/mc_singlesends/docs/SearchSingleSend.md create mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendRequest.md create mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendRequestEmailConfig.md create mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendRequestSendTo.md create mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendResponse.md create mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendResponseEmailConfig.md create mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendResponseSendTo.md create mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendResponseShort.md create mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendResponseWarningsInner.md create mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendSchedule.md create mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendSearch.md create mode 100644 rest/api/v3/mc_singlesends/docs/Status.md create mode 100644 rest/api/v3/mc_singlesends/docs/Status1.md create mode 100644 rest/api/v3/mc_singlesends/docs/Status2.md create mode 100644 rest/api/v3/mc_singlesends/docs/Status3.md create mode 100644 rest/api/v3/mc_singlesends/docs/Type.md create mode 100644 rest/api/v3/mc_singlesends/docs/UpdateSingleSend.md create mode 100644 rest/api/v3/mc_singlesends/docs/WinnerCriteria.md create mode 100644 rest/api/v3/mc_singlesends/model_ab_test_summary.go create mode 100644 rest/api/v3/mc_singlesends/model_duplicate_single_send_request.go create mode 100644 rest/api/v3/mc_singlesends/model_editor.go create mode 100644 rest/api/v3/mc_singlesends/model_editor1.go create mode 100644 rest/api/v3/mc_singlesends/model_items.go create mode 100644 rest/api/v3/mc_singlesends/model_list_category_200_response.go create mode 100644 rest/api/v3/mc_singlesends/model_list_single_send_200_response.go create mode 100644 rest/api/v3/mc_singlesends/model_list_single_send_500_response.go create mode 100644 rest/api/v3/mc_singlesends/model_list_single_send_500_response_errors_inner.go create mode 100644 rest/api/v3/mc_singlesends/model_metadata.go create mode 100644 rest/api/v3/mc_singlesends/model_schedule_single_send_201_response.go create mode 100644 rest/api/v3/mc_singlesends/model_schedule_single_send_request.go create mode 100644 rest/api/v3/mc_singlesends/model_singlesend_request.go create mode 100644 rest/api/v3/mc_singlesends/model_singlesend_request_email_config.go create mode 100644 rest/api/v3/mc_singlesends/model_singlesend_request_send_to.go create mode 100644 rest/api/v3/mc_singlesends/model_singlesend_response.go create mode 100644 rest/api/v3/mc_singlesends/model_singlesend_response_email_config.go create mode 100644 rest/api/v3/mc_singlesends/model_singlesend_response_send_to.go create mode 100644 rest/api/v3/mc_singlesends/model_singlesend_response_short.go create mode 100644 rest/api/v3/mc_singlesends/model_singlesend_response_warnings_inner.go create mode 100644 rest/api/v3/mc_singlesends/model_singlesend_schedule.go create mode 100644 rest/api/v3/mc_singlesends/model_singlesend_search.go create mode 100644 rest/api/v3/mc_singlesends/model_status.go create mode 100644 rest/api/v3/mc_singlesends/model_status1.go create mode 100644 rest/api/v3/mc_singlesends/model_status2.go create mode 100644 rest/api/v3/mc_singlesends/model_status3.go create mode 100644 rest/api/v3/mc_singlesends/model_type.go create mode 100644 rest/api/v3/mc_singlesends/model_winner_criteria.go create mode 100644 rest/api/v3/mc_test/.openapi-generator create mode 100644 rest/api/v3/mc_test/.openapi-generator-ignore create mode 100644 rest/api/v3/mc_test/README.md create mode 100644 rest/api/v3/mc_test/api_send_test_marketing_email.go create mode 100644 rest/api/v3/mc_test/api_service.go create mode 100644 rest/api/v3/mc_test/docs/ErrorResponse.md create mode 100644 rest/api/v3/mc_test/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/mc_test/docs/SendTestMarketingEmail.md create mode 100644 rest/api/v3/mc_test/docs/SendTestMarketingEmailRequest.md create mode 100644 rest/api/v3/mc_test/model_error_response.go create mode 100644 rest/api/v3/mc_test/model_error_response_errors_inner.go create mode 100644 rest/api/v3/mc_test/model_send_test_marketing_email_request.go create mode 100644 rest/api/v3/partner/.openapi-generator create mode 100644 rest/api/v3/partner/.openapi-generator-ignore create mode 100644 rest/api/v3/partner/README.md create mode 100644 rest/api/v3/partner/api_list_partner_setting.go create mode 100644 rest/api/v3/partner/api_service.go create mode 100644 rest/api/v3/partner/docs/ListPartnerSetting.md create mode 100644 rest/api/v3/partner/docs/ListPartnerSetting200Response.md create mode 100644 rest/api/v3/partner/docs/ListPartnerSetting200ResponseResultInner.md create mode 100644 rest/api/v3/partner/model_list_partner_setting_200_response.go create mode 100644 rest/api/v3/partner/model_list_partner_setting_200_response_result_inner.go create mode 100644 rest/api/v3/recipients_data_erasure/.openapi-generator create mode 100644 rest/api/v3/recipients_data_erasure/.openapi-generator-ignore create mode 100644 rest/api/v3/recipients_data_erasure/README.md create mode 100644 rest/api/v3/recipients_data_erasure/api_erase_recipient_email_data.go create mode 100644 rest/api/v3/recipients_data_erasure/api_service.go create mode 100644 rest/api/v3/recipients_data_erasure/docs/EraseRecipientEmailData.md create mode 100644 rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureEraseRecipientsRequest.md create mode 100644 rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureErrorV1.md create mode 100644 rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureJobId.md create mode 100644 rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_erase_recipients_request.go create mode 100644 rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_error_v1.go create mode 100644 rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_job_id.go create mode 100644 rest/api/v3/reverse_dns/.openapi-generator create mode 100644 rest/api/v3/reverse_dns/.openapi-generator-ignore create mode 100644 rest/api/v3/reverse_dns/README.md create mode 100644 rest/api/v3/reverse_dns/api_delete_reverse_dns.go create mode 100644 rest/api/v3/reverse_dns/api_get_reverse_dns.go create mode 100644 rest/api/v3/reverse_dns/api_list_reverse_dns.go create mode 100644 rest/api/v3/reverse_dns/api_service.go create mode 100644 rest/api/v3/reverse_dns/api_set_up_reverse_dns.go create mode 100644 rest/api/v3/reverse_dns/api_validate_reverse_dns.go create mode 100644 rest/api/v3/reverse_dns/docs/DeleteReverseDns.md create mode 100644 rest/api/v3/reverse_dns/docs/GetReverseDns.md create mode 100644 rest/api/v3/reverse_dns/docs/ListReverseDns.md create mode 100644 rest/api/v3/reverse_dns/docs/ReverseDns.md create mode 100644 rest/api/v3/reverse_dns/docs/ReverseDnsARecord.md create mode 100644 rest/api/v3/reverse_dns/docs/ReverseDnsUsersInner.md create mode 100644 rest/api/v3/reverse_dns/docs/SetUpReverseDns.md create mode 100644 rest/api/v3/reverse_dns/docs/SetUpReverseDnsRequest.md create mode 100644 rest/api/v3/reverse_dns/docs/Valid.md create mode 100644 rest/api/v3/reverse_dns/docs/Valid1.md create mode 100644 rest/api/v3/reverse_dns/docs/ValidateReverseDns.md create mode 100644 rest/api/v3/reverse_dns/docs/ValidateReverseDns200Response.md create mode 100644 rest/api/v3/reverse_dns/docs/ValidateReverseDns200ResponseValidationResults.md create mode 100644 rest/api/v3/reverse_dns/docs/ValidateReverseDns200ResponseValidationResultsARecord.md create mode 100644 rest/api/v3/reverse_dns/docs/ValidateReverseDns404Response.md create mode 100644 rest/api/v3/reverse_dns/docs/ValidateReverseDns404ResponseErrorsInner.md create mode 100644 rest/api/v3/reverse_dns/docs/ValidateReverseDns500Response.md create mode 100644 rest/api/v3/reverse_dns/docs/ValidateReverseDns500ResponseErrorsInner.md create mode 100644 rest/api/v3/reverse_dns/model_reverse_dns.go create mode 100644 rest/api/v3/reverse_dns/model_reverse_dns_a_record.go create mode 100644 rest/api/v3/reverse_dns/model_reverse_dns_users_inner.go create mode 100644 rest/api/v3/reverse_dns/model_set_up_reverse_dns_request.go create mode 100644 rest/api/v3/reverse_dns/model_valid.go create mode 100644 rest/api/v3/reverse_dns/model_valid1.go create mode 100644 rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response.go create mode 100644 rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response_validation_results.go create mode 100644 rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response_validation_results_a_record.go create mode 100644 rest/api/v3/reverse_dns/model_validate_reverse_dns_404_response.go create mode 100644 rest/api/v3/reverse_dns/model_validate_reverse_dns_404_response_errors_inner.go create mode 100644 rest/api/v3/reverse_dns/model_validate_reverse_dns_500_response.go create mode 100644 rest/api/v3/reverse_dns/model_validate_reverse_dns_500_response_errors_inner.go create mode 100644 rest/api/v3/scheduled_sends/.openapi-generator create mode 100644 rest/api/v3/scheduled_sends/.openapi-generator-ignore create mode 100644 rest/api/v3/scheduled_sends/README.md create mode 100644 rest/api/v3/scheduled_sends/api_create_scheduled_send.go create mode 100644 rest/api/v3/scheduled_sends/api_delete_scheduled_send.go create mode 100644 rest/api/v3/scheduled_sends/api_get_scheduled_send.go create mode 100644 rest/api/v3/scheduled_sends/api_list_scheduled_send.go create mode 100644 rest/api/v3/scheduled_sends/api_service.go create mode 100644 rest/api/v3/scheduled_sends/api_update_scheduled_send.go create mode 100644 rest/api/v3/scheduled_sends/docs/CancelOrPauseAScheduledSendRequest.md create mode 100644 rest/api/v3/scheduled_sends/docs/CreateScheduledSend.md create mode 100644 rest/api/v3/scheduled_sends/docs/DeleteScheduledSend.md create mode 100644 rest/api/v3/scheduled_sends/docs/ErrorResponse.md create mode 100644 rest/api/v3/scheduled_sends/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/scheduled_sends/docs/GetScheduledSend.md create mode 100644 rest/api/v3/scheduled_sends/docs/ListScheduledSend.md create mode 100644 rest/api/v3/scheduled_sends/docs/MailBatchId.md create mode 100644 rest/api/v3/scheduled_sends/docs/ScheduledSendStatus.md create mode 100644 rest/api/v3/scheduled_sends/docs/Status.md create mode 100644 rest/api/v3/scheduled_sends/docs/Status1.md create mode 100644 rest/api/v3/scheduled_sends/docs/Status2.md create mode 100644 rest/api/v3/scheduled_sends/docs/UpdateScheduledSend.md create mode 100644 rest/api/v3/scheduled_sends/docs/UpdateScheduledSendRequest.md create mode 100644 rest/api/v3/scheduled_sends/model_cancel_or_pause_a_scheduled_send_request.go create mode 100644 rest/api/v3/scheduled_sends/model_error_response.go create mode 100644 rest/api/v3/scheduled_sends/model_error_response_errors_inner.go create mode 100644 rest/api/v3/scheduled_sends/model_mail_batch_id.go create mode 100644 rest/api/v3/scheduled_sends/model_scheduled_send_status.go create mode 100644 rest/api/v3/scheduled_sends/model_status.go create mode 100644 rest/api/v3/scheduled_sends/model_status1.go create mode 100644 rest/api/v3/scheduled_sends/model_status2.go create mode 100644 rest/api/v3/scheduled_sends/model_update_scheduled_send_request.go create mode 100644 rest/api/v3/seq/.openapi-generator create mode 100644 rest/api/v3/seq/.openapi-generator-ignore create mode 100644 rest/api/v3/seq/README.md create mode 100644 rest/api/v3/seq/api_list_engagement_quality_score.go create mode 100644 rest/api/v3/seq/api_list_subuser_engagement_quality_score.go create mode 100644 rest/api/v3/seq/api_service.go create mode 100644 rest/api/v3/seq/docs/ListEngagementQualityScore.md create mode 100644 rest/api/v3/seq/docs/ListSubuserEngagementQualityScore.md create mode 100644 rest/api/v3/seq/docs/SeqError.md create mode 100644 rest/api/v3/seq/docs/SeqMetadata.md create mode 100644 rest/api/v3/seq/docs/SeqMetadataNextParams.md create mode 100644 rest/api/v3/seq/docs/SeqMetrics.md create mode 100644 rest/api/v3/seq/docs/SeqScore.md create mode 100644 rest/api/v3/seq/model_seq_error.go create mode 100644 rest/api/v3/seq/model_seq_metadata.go create mode 100644 rest/api/v3/seq/model_seq_metadata_next_params.go create mode 100644 rest/api/v3/seq/model_seq_metrics.go create mode 100644 rest/api/v3/seq/model_seq_score.go create mode 100644 rest/api/v3/sso/.openapi-generator create mode 100644 rest/api/v3/sso/.openapi-generator-ignore create mode 100644 rest/api/v3/sso/README.md create mode 100644 rest/api/v3/sso/api_create_sso_certificate.go create mode 100644 rest/api/v3/sso/api_create_sso_integration.go create mode 100644 rest/api/v3/sso/api_create_sso_teammate.go create mode 100644 rest/api/v3/sso/api_delete_sso_certificate.go create mode 100644 rest/api/v3/sso/api_delete_sso_integration.go create mode 100644 rest/api/v3/sso/api_get_sso_certificate.go create mode 100644 rest/api/v3/sso/api_get_sso_integration.go create mode 100644 rest/api/v3/sso/api_list_sso_integration.go create mode 100644 rest/api/v3/sso/api_list_sso_integration_certificate.go create mode 100644 rest/api/v3/sso/api_service.go create mode 100644 rest/api/v3/sso/api_update_sso_certificate.go create mode 100644 rest/api/v3/sso/api_update_sso_integration.go create mode 100644 rest/api/v3/sso/api_update_sso_teammate.go create mode 100644 rest/api/v3/sso/docs/CreateSsoCertificate.md create mode 100644 rest/api/v3/sso/docs/CreateSsoCertificateRequest.md create mode 100644 rest/api/v3/sso/docs/CreateSsoIntegration.md create mode 100644 rest/api/v3/sso/docs/CreateSsoTeammate.md create mode 100644 rest/api/v3/sso/docs/DeleteSsoCertificate.md create mode 100644 rest/api/v3/sso/docs/DeleteSsoIntegration.md create mode 100644 rest/api/v3/sso/docs/GetSsoCertificate.md create mode 100644 rest/api/v3/sso/docs/GetSsoIntegration.md create mode 100644 rest/api/v3/sso/docs/ListSsoIntegration.md create mode 100644 rest/api/v3/sso/docs/ListSsoIntegrationCertificate.md create mode 100644 rest/api/v3/sso/docs/PatchSsoTeammates200.md create mode 100644 rest/api/v3/sso/docs/PermissionType.md create mode 100644 rest/api/v3/sso/docs/PermissionType1.md create mode 100644 rest/api/v3/sso/docs/Persona.md create mode 100644 rest/api/v3/sso/docs/PostPatchIntegrationRequest.md create mode 100644 rest/api/v3/sso/docs/PostSsoTeammates201.md create mode 100644 rest/api/v3/sso/docs/PostSsoTeammatesRequest.md create mode 100644 rest/api/v3/sso/docs/SsoCertificateBody.md create mode 100644 rest/api/v3/sso/docs/SsoErrorResponseInner.md create mode 100644 rest/api/v3/sso/docs/SsoIntegration.md create mode 100644 rest/api/v3/sso/docs/SsoTeammatesBaseRequestProps.md create mode 100644 rest/api/v3/sso/docs/SsoTeammatesBaseRequestPropsSubuserAccessInner.md create mode 100644 rest/api/v3/sso/docs/SsoTeammatesBaseResponseProps.md create mode 100644 rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponseProps.md create mode 100644 rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md create mode 100644 rest/api/v3/sso/docs/UpdateSsoCertificate.md create mode 100644 rest/api/v3/sso/docs/UpdateSsoCertificateRequest.md create mode 100644 rest/api/v3/sso/docs/UpdateSsoIntegration.md create mode 100644 rest/api/v3/sso/docs/UpdateSsoTeammate.md create mode 100644 rest/api/v3/sso/docs/UserType.md create mode 100644 rest/api/v3/sso/model_create_sso_certificate_request.go create mode 100644 rest/api/v3/sso/model_patch_sso_teammates200.go create mode 100644 rest/api/v3/sso/model_permission_type.go create mode 100644 rest/api/v3/sso/model_permission_type1.go create mode 100644 rest/api/v3/sso/model_persona.go create mode 100644 rest/api/v3/sso/model_post_patch_integration_request.go create mode 100644 rest/api/v3/sso/model_post_sso_teammates201.go create mode 100644 rest/api/v3/sso/model_post_sso_teammates_request.go create mode 100644 rest/api/v3/sso/model_sso_certificate_body.go create mode 100644 rest/api/v3/sso/model_sso_error_response_inner.go create mode 100644 rest/api/v3/sso/model_sso_integration.go create mode 100644 rest/api/v3/sso/model_sso_teammates_base_request_props.go create mode 100644 rest/api/v3/sso/model_sso_teammates_base_request_props_subuser_access_inner.go create mode 100644 rest/api/v3/sso/model_sso_teammates_base_response_props.go create mode 100644 rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props.go create mode 100644 rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props_subuser_access_inner.go create mode 100644 rest/api/v3/sso/model_update_sso_certificate_request.go create mode 100644 rest/api/v3/sso/model_user_type.go create mode 100644 rest/api/v3/stats/.openapi-generator create mode 100644 rest/api/v3/stats/.openapi-generator-ignore create mode 100644 rest/api/v3/stats/README.md create mode 100644 rest/api/v3/stats/api_get_client_stat.go create mode 100644 rest/api/v3/stats/api_list_browser_stat.go create mode 100644 rest/api/v3/stats/api_list_category.go create mode 100644 rest/api/v3/stats/api_list_category_stat.go create mode 100644 rest/api/v3/stats/api_list_category_stat_sum.go create mode 100644 rest/api/v3/stats/api_list_client_stat.go create mode 100644 rest/api/v3/stats/api_list_device_stat.go create mode 100644 rest/api/v3/stats/api_list_geo_stat.go create mode 100644 rest/api/v3/stats/api_list_mailbox_provider_stat.go create mode 100644 rest/api/v3/stats/api_list_stat.go create mode 100644 rest/api/v3/stats/api_service.go create mode 100644 rest/api/v3/stats/docs/AdvancedStatsClicks.md create mode 100644 rest/api/v3/stats/docs/AdvancedStatsClicksOpens.md create mode 100644 rest/api/v3/stats/docs/AdvancedStatsMailboxProvider.md create mode 100644 rest/api/v3/stats/docs/AdvancedStatsOpens.md create mode 100644 rest/api/v3/stats/docs/AggregatedBy.md create mode 100644 rest/api/v3/stats/docs/AggregatedBy1.md create mode 100644 rest/api/v3/stats/docs/AggregatedBy2.md create mode 100644 rest/api/v3/stats/docs/AggregatedBy3.md create mode 100644 rest/api/v3/stats/docs/CategoryStats.md create mode 100644 rest/api/v3/stats/docs/CategoryStatsStatsInner.md create mode 100644 rest/api/v3/stats/docs/CategoryStatsStatsInnerMetrics.md create mode 100644 rest/api/v3/stats/docs/ClientType.md create mode 100644 rest/api/v3/stats/docs/Country.md create mode 100644 rest/api/v3/stats/docs/GetClientStat.md create mode 100644 rest/api/v3/stats/docs/ListBrowserStat.md create mode 100644 rest/api/v3/stats/docs/ListBrowserStat200ResponseInner.md create mode 100644 rest/api/v3/stats/docs/ListBrowserStat200ResponseInnerStatsInner.md create mode 100644 rest/api/v3/stats/docs/ListCategory.md create mode 100644 rest/api/v3/stats/docs/ListCategory200ResponseInner.md create mode 100644 rest/api/v3/stats/docs/ListCategory400Response.md create mode 100644 rest/api/v3/stats/docs/ListCategory400ResponseErrorsInner.md create mode 100644 rest/api/v3/stats/docs/ListCategoryStat.md create mode 100644 rest/api/v3/stats/docs/ListCategoryStatSum.md create mode 100644 rest/api/v3/stats/docs/ListClientStat.md create mode 100644 rest/api/v3/stats/docs/ListClientStat200ResponseInner.md create mode 100644 rest/api/v3/stats/docs/ListClientStat200ResponseInnerStatsInner.md create mode 100644 rest/api/v3/stats/docs/ListDeviceStat.md create mode 100644 rest/api/v3/stats/docs/ListGeoStat.md create mode 100644 rest/api/v3/stats/docs/ListGeoStat200ResponseInner.md create mode 100644 rest/api/v3/stats/docs/ListGeoStat200ResponseInnerStatsInner.md create mode 100644 rest/api/v3/stats/docs/ListMailboxProviderStat.md create mode 100644 rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInner.md create mode 100644 rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInnerStatsInner.md create mode 100644 rest/api/v3/stats/docs/ListStat.md create mode 100644 rest/api/v3/stats/docs/ListStat200ResponseInner.md create mode 100644 rest/api/v3/stats/docs/ListStat200ResponseInnerStatsInner.md create mode 100644 rest/api/v3/stats/docs/SortByDirection.md create mode 100644 rest/api/v3/stats/docs/StatsAdvancedGlobalStats.md create mode 100644 rest/api/v3/stats/model_advanced_stats_clicks.go create mode 100644 rest/api/v3/stats/model_advanced_stats_clicks_opens.go create mode 100644 rest/api/v3/stats/model_advanced_stats_mailbox_provider.go create mode 100644 rest/api/v3/stats/model_advanced_stats_opens.go create mode 100644 rest/api/v3/stats/model_aggregated_by.go create mode 100644 rest/api/v3/stats/model_aggregated_by1.go create mode 100644 rest/api/v3/stats/model_aggregated_by2.go create mode 100644 rest/api/v3/stats/model_aggregated_by3.go create mode 100644 rest/api/v3/stats/model_category_stats.go create mode 100644 rest/api/v3/stats/model_category_stats_stats_inner.go create mode 100644 rest/api/v3/stats/model_category_stats_stats_inner_metrics.go create mode 100644 rest/api/v3/stats/model_client_type.go create mode 100644 rest/api/v3/stats/model_country.go create mode 100644 rest/api/v3/stats/model_list_browser_stat_200_response_inner.go create mode 100644 rest/api/v3/stats/model_list_browser_stat_200_response_inner_stats_inner.go create mode 100644 rest/api/v3/stats/model_list_category_200_response_inner.go create mode 100644 rest/api/v3/stats/model_list_category_400_response.go create mode 100644 rest/api/v3/stats/model_list_category_400_response_errors_inner.go create mode 100644 rest/api/v3/stats/model_list_client_stat_200_response_inner.go create mode 100644 rest/api/v3/stats/model_list_client_stat_200_response_inner_stats_inner.go create mode 100644 rest/api/v3/stats/model_list_geo_stat_200_response_inner.go create mode 100644 rest/api/v3/stats/model_list_geo_stat_200_response_inner_stats_inner.go create mode 100644 rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner.go create mode 100644 rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner_stats_inner.go create mode 100644 rest/api/v3/stats/model_list_stat_200_response_inner.go create mode 100644 rest/api/v3/stats/model_list_stat_200_response_inner_stats_inner.go create mode 100644 rest/api/v3/stats/model_sort_by_direction.go create mode 100644 rest/api/v3/stats/model_stats_advanced_global_stats.go create mode 100644 rest/api/v3/subusers/.openapi-generator create mode 100644 rest/api/v3/subusers/.openapi-generator-ignore create mode 100644 rest/api/v3/subusers/README.md create mode 100644 rest/api/v3/subusers/api_create_subuser.go create mode 100644 rest/api/v3/subusers/api_delete_subuser.go create mode 100644 rest/api/v3/subusers/api_get_subuser_credit.go create mode 100644 rest/api/v3/subusers/api_list_monthly_stat.go create mode 100644 rest/api/v3/subusers/api_list_reputation.go create mode 100644 rest/api/v3/subusers/api_list_stat.go create mode 100644 rest/api/v3/subusers/api_list_stat_sum.go create mode 100644 rest/api/v3/subusers/api_list_subuser.go create mode 100644 rest/api/v3/subusers/api_list_subuser_monthly_stat.go create mode 100644 rest/api/v3/subusers/api_service.go create mode 100644 rest/api/v3/subusers/api_update_subuser.go create mode 100644 rest/api/v3/subusers/api_update_subuser_credit.go create mode 100644 rest/api/v3/subusers/api_update_subuser_ip.go create mode 100644 rest/api/v3/subusers/api_update_subuser_remaining_credit.go create mode 100644 rest/api/v3/subusers/api_update_subuser_website_access.go create mode 100644 rest/api/v3/subusers/docs/AggregatedBy.md create mode 100644 rest/api/v3/subusers/docs/CategoryStats.md create mode 100644 rest/api/v3/subusers/docs/CategoryStatsStatsInner.md create mode 100644 rest/api/v3/subusers/docs/CategoryStatsStatsInnerMetrics.md create mode 100644 rest/api/v3/subusers/docs/CreateSubuser.md create mode 100644 rest/api/v3/subusers/docs/CreateSubuserRequest.md create mode 100644 rest/api/v3/subusers/docs/DeleteSubuser.md create mode 100644 rest/api/v3/subusers/docs/ErrorResponse.md create mode 100644 rest/api/v3/subusers/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/subusers/docs/GetSubuserCredit.md create mode 100644 rest/api/v3/subusers/docs/ListMonthlyStat.md create mode 100644 rest/api/v3/subusers/docs/ListReputation.md create mode 100644 rest/api/v3/subusers/docs/ListReputation200ResponseInner.md create mode 100644 rest/api/v3/subusers/docs/ListStat.md create mode 100644 rest/api/v3/subusers/docs/ListStatSum.md create mode 100644 rest/api/v3/subusers/docs/ListSubuser.md create mode 100644 rest/api/v3/subusers/docs/ListSubuserMonthlyStat.md create mode 100644 rest/api/v3/subusers/docs/Region.md create mode 100644 rest/api/v3/subusers/docs/Region1.md create mode 100644 rest/api/v3/subusers/docs/Region2.md create mode 100644 rest/api/v3/subusers/docs/Region3.md create mode 100644 rest/api/v3/subusers/docs/ResetFrequency.md create mode 100644 rest/api/v3/subusers/docs/ResetFrequency1.md create mode 100644 rest/api/v3/subusers/docs/SortByDirection.md create mode 100644 rest/api/v3/subusers/docs/SortByDirection1.md create mode 100644 rest/api/v3/subusers/docs/SortByDirection2.md create mode 100644 rest/api/v3/subusers/docs/SortByMetric.md create mode 100644 rest/api/v3/subusers/docs/Subuser.md create mode 100644 rest/api/v3/subusers/docs/SubuserCredits.md create mode 100644 rest/api/v3/subusers/docs/SubuserCreditsRequest.md create mode 100644 rest/api/v3/subusers/docs/SubuserPost.md create mode 100644 rest/api/v3/subusers/docs/SubuserPostCreditAllocation.md create mode 100644 rest/api/v3/subusers/docs/SubuserStats.md create mode 100644 rest/api/v3/subusers/docs/SubuserStatsStatsInner.md create mode 100644 rest/api/v3/subusers/docs/SubuserStatsStatsInnerMetrics.md create mode 100644 rest/api/v3/subusers/docs/Type.md create mode 100644 rest/api/v3/subusers/docs/Type1.md create mode 100644 rest/api/v3/subusers/docs/UpdateSubuser.md create mode 100644 rest/api/v3/subusers/docs/UpdateSubuserCredit.md create mode 100644 rest/api/v3/subusers/docs/UpdateSubuserIp.md create mode 100644 rest/api/v3/subusers/docs/UpdateSubuserIp200Response.md create mode 100644 rest/api/v3/subusers/docs/UpdateSubuserRemainingCredit.md create mode 100644 rest/api/v3/subusers/docs/UpdateSubuserRemainingCreditRequest.md create mode 100644 rest/api/v3/subusers/docs/UpdateSubuserRequest.md create mode 100644 rest/api/v3/subusers/docs/UpdateSubuserWebsiteAccess.md create mode 100644 rest/api/v3/subusers/docs/UpdateSubuserWebsiteAccessRequest.md create mode 100644 rest/api/v3/subusers/model_aggregated_by.go create mode 100644 rest/api/v3/subusers/model_category_stats.go create mode 100644 rest/api/v3/subusers/model_category_stats_stats_inner.go create mode 100644 rest/api/v3/subusers/model_category_stats_stats_inner_metrics.go create mode 100644 rest/api/v3/subusers/model_create_subuser_request.go create mode 100644 rest/api/v3/subusers/model_error_response.go create mode 100644 rest/api/v3/subusers/model_error_response_errors_inner.go create mode 100644 rest/api/v3/subusers/model_list_reputation_200_response_inner.go create mode 100644 rest/api/v3/subusers/model_region.go create mode 100644 rest/api/v3/subusers/model_region1.go create mode 100644 rest/api/v3/subusers/model_region2.go create mode 100644 rest/api/v3/subusers/model_region3.go create mode 100644 rest/api/v3/subusers/model_reset_frequency.go create mode 100644 rest/api/v3/subusers/model_reset_frequency1.go create mode 100644 rest/api/v3/subusers/model_sort_by_direction.go create mode 100644 rest/api/v3/subusers/model_sort_by_direction1.go create mode 100644 rest/api/v3/subusers/model_sort_by_direction2.go create mode 100644 rest/api/v3/subusers/model_sort_by_metric.go create mode 100644 rest/api/v3/subusers/model_subuser.go create mode 100644 rest/api/v3/subusers/model_subuser_credits.go create mode 100644 rest/api/v3/subusers/model_subuser_credits_request.go create mode 100644 rest/api/v3/subusers/model_subuser_post.go create mode 100644 rest/api/v3/subusers/model_subuser_post_credit_allocation.go create mode 100644 rest/api/v3/subusers/model_subuser_stats.go create mode 100644 rest/api/v3/subusers/model_subuser_stats_stats_inner.go create mode 100644 rest/api/v3/subusers/model_subuser_stats_stats_inner_metrics.go create mode 100644 rest/api/v3/subusers/model_type.go create mode 100644 rest/api/v3/subusers/model_type1.go create mode 100644 rest/api/v3/subusers/model_update_subuser_ip_200_response.go create mode 100644 rest/api/v3/subusers/model_update_subuser_remaining_credit_request.go create mode 100644 rest/api/v3/subusers/model_update_subuser_request.go create mode 100644 rest/api/v3/subusers/model_update_subuser_website_access_request.go create mode 100644 rest/api/v3/teammates/.openapi-generator create mode 100644 rest/api/v3/teammates/.openapi-generator-ignore create mode 100644 rest/api/v3/teammates/README.md create mode 100644 rest/api/v3/teammates/api_delete_pending_teammate.go create mode 100644 rest/api/v3/teammates/api_delete_teammate.go create mode 100644 rest/api/v3/teammates/api_get_teammate.go create mode 100644 rest/api/v3/teammates/api_invite_teammate.go create mode 100644 rest/api/v3/teammates/api_list_pending_teammate.go create mode 100644 rest/api/v3/teammates/api_list_subuser_by_template.go create mode 100644 rest/api/v3/teammates/api_list_teammate.go create mode 100644 rest/api/v3/teammates/api_resend_teammate_invite.go create mode 100644 rest/api/v3/teammates/api_service.go create mode 100644 rest/api/v3/teammates/api_update_teammate.go create mode 100644 rest/api/v3/teammates/docs/DeletePendingTeammate.md create mode 100644 rest/api/v3/teammates/docs/DeleteTeammate.md create mode 100644 rest/api/v3/teammates/docs/GetTeammate.md create mode 100644 rest/api/v3/teammates/docs/GetTeammate200Response.md create mode 100644 rest/api/v3/teammates/docs/InviteTeammate.md create mode 100644 rest/api/v3/teammates/docs/InviteTeammate201Response.md create mode 100644 rest/api/v3/teammates/docs/InviteTeammate400Response.md create mode 100644 rest/api/v3/teammates/docs/InviteTeammate400ResponseErrorsInner.md create mode 100644 rest/api/v3/teammates/docs/InviteTeammateRequest.md create mode 100644 rest/api/v3/teammates/docs/ListPendingTeammate.md create mode 100644 rest/api/v3/teammates/docs/ListPendingTeammate200Response.md create mode 100644 rest/api/v3/teammates/docs/ListPendingTeammate200ResponseResultInner.md create mode 100644 rest/api/v3/teammates/docs/ListSubuserByTemplate.md create mode 100644 rest/api/v3/teammates/docs/ListSubuserByTemplate200Response.md create mode 100644 rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadata.md create mode 100644 rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadataNextParams.md create mode 100644 rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseSubuserAccessInner.md create mode 100644 rest/api/v3/teammates/docs/ListSubuserByTemplate400Response.md create mode 100644 rest/api/v3/teammates/docs/ListSubuserByTemplate400ResponseErrorsInner.md create mode 100644 rest/api/v3/teammates/docs/ListTeammate.md create mode 100644 rest/api/v3/teammates/docs/ListTeammate200Response.md create mode 100644 rest/api/v3/teammates/docs/ListTeammate200ResponseResultInner.md create mode 100644 rest/api/v3/teammates/docs/PermissionType.md create mode 100644 rest/api/v3/teammates/docs/ResendTeammateInvite.md create mode 100644 rest/api/v3/teammates/docs/ResendTeammateInvite200Response.md create mode 100644 rest/api/v3/teammates/docs/UpdateTeammate.md create mode 100644 rest/api/v3/teammates/docs/UpdateTeammate200Response.md create mode 100644 rest/api/v3/teammates/docs/UpdateTeammateRequest.md create mode 100644 rest/api/v3/teammates/docs/UserType.md create mode 100644 rest/api/v3/teammates/docs/UserType1.md create mode 100644 rest/api/v3/teammates/docs/UserType2.md create mode 100644 rest/api/v3/teammates/model_get_teammate_200_response.go create mode 100644 rest/api/v3/teammates/model_invite_teammate_201_response.go create mode 100644 rest/api/v3/teammates/model_invite_teammate_400_response.go create mode 100644 rest/api/v3/teammates/model_invite_teammate_400_response_errors_inner.go create mode 100644 rest/api/v3/teammates/model_invite_teammate_request.go create mode 100644 rest/api/v3/teammates/model_list_pending_teammate_200_response.go create mode 100644 rest/api/v3/teammates/model_list_pending_teammate_200_response_result_inner.go create mode 100644 rest/api/v3/teammates/model_list_subuser_by_template_200_response.go create mode 100644 rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata.go create mode 100644 rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata_next_params.go create mode 100644 rest/api/v3/teammates/model_list_subuser_by_template_200_response_subuser_access_inner.go create mode 100644 rest/api/v3/teammates/model_list_subuser_by_template_400_response.go create mode 100644 rest/api/v3/teammates/model_list_subuser_by_template_400_response_errors_inner.go create mode 100644 rest/api/v3/teammates/model_list_teammate_200_response.go create mode 100644 rest/api/v3/teammates/model_list_teammate_200_response_result_inner.go create mode 100644 rest/api/v3/teammates/model_permission_type.go create mode 100644 rest/api/v3/teammates/model_resend_teammate_invite_200_response.go create mode 100644 rest/api/v3/teammates/model_update_teammate_200_response.go create mode 100644 rest/api/v3/teammates/model_update_teammate_request.go create mode 100644 rest/api/v3/teammates/model_user_type.go create mode 100644 rest/api/v3/teammates/model_user_type1.go create mode 100644 rest/api/v3/teammates/model_user_type2.go create mode 100644 rest/api/v3/templates/.openapi-generator create mode 100644 rest/api/v3/templates/.openapi-generator-ignore create mode 100644 rest/api/v3/templates/README.md create mode 100644 rest/api/v3/templates/api_activate_template_version.go create mode 100644 rest/api/v3/templates/api_create_template.go create mode 100644 rest/api/v3/templates/api_create_template_version.go create mode 100644 rest/api/v3/templates/api_delete_template.go create mode 100644 rest/api/v3/templates/api_delete_template_version.go create mode 100644 rest/api/v3/templates/api_duplicate_template.go create mode 100644 rest/api/v3/templates/api_get_template.go create mode 100644 rest/api/v3/templates/api_get_template_version.go create mode 100644 rest/api/v3/templates/api_list_template.go create mode 100644 rest/api/v3/templates/api_service.go create mode 100644 rest/api/v3/templates/api_update_template.go create mode 100644 rest/api/v3/templates/api_update_template_version.go create mode 100644 rest/api/v3/templates/docs/ActivateTemplateVersion.md create mode 100644 rest/api/v3/templates/docs/Active.md create mode 100644 rest/api/v3/templates/docs/Active1.md create mode 100644 rest/api/v3/templates/docs/CreateTemplate.md create mode 100644 rest/api/v3/templates/docs/CreateTemplateRequest.md create mode 100644 rest/api/v3/templates/docs/CreateTemplateVersion.md create mode 100644 rest/api/v3/templates/docs/DeleteTemplate.md create mode 100644 rest/api/v3/templates/docs/DeleteTemplateVersion.md create mode 100644 rest/api/v3/templates/docs/DuplicateTemplate.md create mode 100644 rest/api/v3/templates/docs/DuplicateTemplateRequest.md create mode 100644 rest/api/v3/templates/docs/Editor.md create mode 100644 rest/api/v3/templates/docs/Editor1.md create mode 100644 rest/api/v3/templates/docs/Generation.md create mode 100644 rest/api/v3/templates/docs/Generation1.md create mode 100644 rest/api/v3/templates/docs/Generations.md create mode 100644 rest/api/v3/templates/docs/GetTemplate.md create mode 100644 rest/api/v3/templates/docs/GetTemplateVersion.md create mode 100644 rest/api/v3/templates/docs/ListTemplate.md create mode 100644 rest/api/v3/templates/docs/ListTemplate200Response.md create mode 100644 rest/api/v3/templates/docs/ListTemplate400Response.md create mode 100644 rest/api/v3/templates/docs/ListTemplate400ResponseErrorsInner.md create mode 100644 rest/api/v3/templates/docs/Metadata.md create mode 100644 rest/api/v3/templates/docs/TransactionalTemplate.md create mode 100644 rest/api/v3/templates/docs/TransactionalTemplateVersionCreate.md create mode 100644 rest/api/v3/templates/docs/TransactionalTemplateVersionOutput.md create mode 100644 rest/api/v3/templates/docs/TransactionalTemplateWarning.md create mode 100644 rest/api/v3/templates/docs/TransactionalTemplatesTemplateLean.md create mode 100644 rest/api/v3/templates/docs/TransactionalTemplatesVersionOutputLean.md create mode 100644 rest/api/v3/templates/docs/UpdateTemplate.md create mode 100644 rest/api/v3/templates/docs/UpdateTemplateRequest.md create mode 100644 rest/api/v3/templates/docs/UpdateTemplateVersion.md create mode 100644 rest/api/v3/templates/model_active.go create mode 100644 rest/api/v3/templates/model_active1.go create mode 100644 rest/api/v3/templates/model_create_template_request.go create mode 100644 rest/api/v3/templates/model_duplicate_template_request.go create mode 100644 rest/api/v3/templates/model_editor.go create mode 100644 rest/api/v3/templates/model_editor1.go create mode 100644 rest/api/v3/templates/model_generation.go create mode 100644 rest/api/v3/templates/model_generation1.go create mode 100644 rest/api/v3/templates/model_generations.go create mode 100644 rest/api/v3/templates/model_list_template_200_response.go create mode 100644 rest/api/v3/templates/model_list_template_400_response.go create mode 100644 rest/api/v3/templates/model_list_template_400_response_errors_inner.go create mode 100644 rest/api/v3/templates/model_metadata.go create mode 100644 rest/api/v3/templates/model_transactional_template.go create mode 100644 rest/api/v3/templates/model_transactional_template_version_create.go create mode 100644 rest/api/v3/templates/model_transactional_template_version_output.go create mode 100644 rest/api/v3/templates/model_transactional_template_warning.go create mode 100644 rest/api/v3/templates/model_transactional_templates_template_lean.go create mode 100644 rest/api/v3/templates/model_transactional_templates_version_output_lean.go create mode 100644 rest/api/v3/templates/model_update_template_request.go create mode 100644 rest/api/v3/tracking_settings/.openapi-generator create mode 100644 rest/api/v3/tracking_settings/.openapi-generator-ignore create mode 100644 rest/api/v3/tracking_settings/README.md create mode 100644 rest/api/v3/tracking_settings/api_list_click_tracking_setting.go create mode 100644 rest/api/v3/tracking_settings/api_list_google_analytics_tracking_setting.go create mode 100644 rest/api/v3/tracking_settings/api_list_open_tracking_setting.go create mode 100644 rest/api/v3/tracking_settings/api_list_subscription_tracking_setting.go create mode 100644 rest/api/v3/tracking_settings/api_list_tracking_setting.go create mode 100644 rest/api/v3/tracking_settings/api_service.go create mode 100644 rest/api/v3/tracking_settings/api_update_click_tracking_setting.go create mode 100644 rest/api/v3/tracking_settings/api_update_google_analytics_tracking_setting.go create mode 100644 rest/api/v3/tracking_settings/api_update_open_tracking_setting.go create mode 100644 rest/api/v3/tracking_settings/api_update_subscription_tracking_setting.go create mode 100644 rest/api/v3/tracking_settings/docs/ClickTracking.md create mode 100644 rest/api/v3/tracking_settings/docs/GoogleAnalyticsSettings.md create mode 100644 rest/api/v3/tracking_settings/docs/ListClickTrackingSetting.md create mode 100644 rest/api/v3/tracking_settings/docs/ListGoogleAnalyticsTrackingSetting.md create mode 100644 rest/api/v3/tracking_settings/docs/ListOpenTrackingSetting.md create mode 100644 rest/api/v3/tracking_settings/docs/ListOpenTrackingSetting200Response.md create mode 100644 rest/api/v3/tracking_settings/docs/ListSubscriptionTrackingSetting.md create mode 100644 rest/api/v3/tracking_settings/docs/ListTrackingSetting.md create mode 100644 rest/api/v3/tracking_settings/docs/ListTrackingSetting200Response.md create mode 100644 rest/api/v3/tracking_settings/docs/ListTrackingSetting200ResponseResultInner.md create mode 100644 rest/api/v3/tracking_settings/docs/SubscriptionTrackingSettings.md create mode 100644 rest/api/v3/tracking_settings/docs/UpdateClickTrackingSetting.md create mode 100644 rest/api/v3/tracking_settings/docs/UpdateClickTrackingSettingRequest.md create mode 100644 rest/api/v3/tracking_settings/docs/UpdateGoogleAnalyticsTrackingSetting.md create mode 100644 rest/api/v3/tracking_settings/docs/UpdateOpenTrackingSetting.md create mode 100644 rest/api/v3/tracking_settings/docs/UpdateOpenTrackingSettingRequest.md create mode 100644 rest/api/v3/tracking_settings/docs/UpdateSubscriptionTrackingSetting.md create mode 100644 rest/api/v3/tracking_settings/model_click_tracking.go create mode 100644 rest/api/v3/tracking_settings/model_google_analytics_settings.go create mode 100644 rest/api/v3/tracking_settings/model_list_open_tracking_setting_200_response.go create mode 100644 rest/api/v3/tracking_settings/model_list_tracking_setting_200_response.go create mode 100644 rest/api/v3/tracking_settings/model_list_tracking_setting_200_response_result_inner.go create mode 100644 rest/api/v3/tracking_settings/model_subscription_tracking_settings.go create mode 100644 rest/api/v3/tracking_settings/model_update_click_tracking_setting_request.go create mode 100644 rest/api/v3/tracking_settings/model_update_open_tracking_setting_request.go create mode 100644 rest/api/v3/webhooks/.openapi-generator create mode 100644 rest/api/v3/webhooks/.openapi-generator-ignore create mode 100644 rest/api/v3/webhooks/README.md create mode 100644 rest/api/v3/webhooks/api_create_event_webhook.go create mode 100644 rest/api/v3/webhooks/api_create_parse_setting.go create mode 100644 rest/api/v3/webhooks/api_delete_event_webhook.go create mode 100644 rest/api/v3/webhooks/api_delete_parse_setting.go create mode 100644 rest/api/v3/webhooks/api_get_event_webhook.go create mode 100644 rest/api/v3/webhooks/api_get_parse_setting.go create mode 100644 rest/api/v3/webhooks/api_get_signed_event_webhook.go create mode 100644 rest/api/v3/webhooks/api_list_event_webhook.go create mode 100644 rest/api/v3/webhooks/api_list_parse_setting.go create mode 100644 rest/api/v3/webhooks/api_list_parse_static.go create mode 100644 rest/api/v3/webhooks/api_service.go create mode 100644 rest/api/v3/webhooks/api_test_event_webhook.go create mode 100644 rest/api/v3/webhooks/api_update_event_webhook.go create mode 100644 rest/api/v3/webhooks/api_update_parse_setting.go create mode 100644 rest/api/v3/webhooks/api_update_signed_event_webhook.go create mode 100644 rest/api/v3/webhooks/docs/AggregatedBy.md create mode 100644 rest/api/v3/webhooks/docs/CreateEventWebhook.md create mode 100644 rest/api/v3/webhooks/docs/CreateEventWebhook400Response.md create mode 100644 rest/api/v3/webhooks/docs/CreateEventWebhook400ResponseErrorsInner.md create mode 100644 rest/api/v3/webhooks/docs/CreateParseSetting.md create mode 100644 rest/api/v3/webhooks/docs/DeleteEventWebhook.md create mode 100644 rest/api/v3/webhooks/docs/DeleteParseSetting.md create mode 100644 rest/api/v3/webhooks/docs/ErrorResponse.md create mode 100644 rest/api/v3/webhooks/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/webhooks/docs/EventWebhookAllResponse.md create mode 100644 rest/api/v3/webhooks/docs/EventWebhookBaseResponseProps.md create mode 100644 rest/api/v3/webhooks/docs/EventWebhookDateResponseProps.md create mode 100644 rest/api/v3/webhooks/docs/EventWebhookNoDatesResponse.md create mode 100644 rest/api/v3/webhooks/docs/EventWebhookOauthResponseProps.md create mode 100644 rest/api/v3/webhooks/docs/EventWebhookRequest.md create mode 100644 rest/api/v3/webhooks/docs/EventWebhookSignedResponse.md create mode 100644 rest/api/v3/webhooks/docs/EventWebhookSignedResponseProp.md create mode 100644 rest/api/v3/webhooks/docs/EventWebhookTestRequest.md create mode 100644 rest/api/v3/webhooks/docs/EventWebhookUnsignedResponse.md create mode 100644 rest/api/v3/webhooks/docs/GetEventWebhook.md create mode 100644 rest/api/v3/webhooks/docs/GetParseSetting.md create mode 100644 rest/api/v3/webhooks/docs/GetSignedEventWebhook.md create mode 100644 rest/api/v3/webhooks/docs/GetSignedEventWebhook200Response.md create mode 100644 rest/api/v3/webhooks/docs/GetSignedEventWebhook404Response.md create mode 100644 rest/api/v3/webhooks/docs/GetSignedEventWebhook404ResponseErrorsInner.md create mode 100644 rest/api/v3/webhooks/docs/ListEventWebhook.md create mode 100644 rest/api/v3/webhooks/docs/ListParseSetting.md create mode 100644 rest/api/v3/webhooks/docs/ListParseSetting200Response.md create mode 100644 rest/api/v3/webhooks/docs/ListParseStatic.md create mode 100644 rest/api/v3/webhooks/docs/ListParseStatic200ResponseInner.md create mode 100644 rest/api/v3/webhooks/docs/ListParseStatic200ResponseInnerStatsInner.md create mode 100644 rest/api/v3/webhooks/docs/ListParseStatic200ResponseInnerStatsInnerMetrics.md create mode 100644 rest/api/v3/webhooks/docs/ParseSetting.md create mode 100644 rest/api/v3/webhooks/docs/TestEventWebhook.md create mode 100644 rest/api/v3/webhooks/docs/UpdateEventWebhook.md create mode 100644 rest/api/v3/webhooks/docs/UpdateParseSetting.md create mode 100644 rest/api/v3/webhooks/docs/UpdateSignedEventWebhook.md create mode 100644 rest/api/v3/webhooks/docs/UpdateSignedEventWebhookRequest.md create mode 100644 rest/api/v3/webhooks/model_aggregated_by.go create mode 100644 rest/api/v3/webhooks/model_create_event_webhook_400_response.go create mode 100644 rest/api/v3/webhooks/model_create_event_webhook_400_response_errors_inner.go create mode 100644 rest/api/v3/webhooks/model_error_response.go create mode 100644 rest/api/v3/webhooks/model_error_response_errors_inner.go create mode 100644 rest/api/v3/webhooks/model_event_webhook_all_response.go create mode 100644 rest/api/v3/webhooks/model_event_webhook_base_response_props.go create mode 100644 rest/api/v3/webhooks/model_event_webhook_date_response_props.go create mode 100644 rest/api/v3/webhooks/model_event_webhook_no_dates_response.go create mode 100644 rest/api/v3/webhooks/model_event_webhook_oauth_response_props.go create mode 100644 rest/api/v3/webhooks/model_event_webhook_request.go create mode 100644 rest/api/v3/webhooks/model_event_webhook_signed_response.go create mode 100644 rest/api/v3/webhooks/model_event_webhook_signed_response_prop.go create mode 100644 rest/api/v3/webhooks/model_event_webhook_test_request.go create mode 100644 rest/api/v3/webhooks/model_event_webhook_unsigned_response.go create mode 100644 rest/api/v3/webhooks/model_get_signed_event_webhook_200_response.go create mode 100644 rest/api/v3/webhooks/model_get_signed_event_webhook_404_response.go create mode 100644 rest/api/v3/webhooks/model_get_signed_event_webhook_404_response_errors_inner.go create mode 100644 rest/api/v3/webhooks/model_list_parse_setting_200_response.go create mode 100644 rest/api/v3/webhooks/model_list_parse_static_200_response_inner.go create mode 100644 rest/api/v3/webhooks/model_list_parse_static_200_response_inner_stats_inner.go create mode 100644 rest/api/v3/webhooks/model_list_parse_static_200_response_inner_stats_inner_metrics.go create mode 100644 rest/api/v3/webhooks/model_parse_setting.go create mode 100644 rest/api/v3/webhooks/model_update_signed_event_webhook_request.go diff --git a/rest/api/v3/account_provisioning/.openapi-generator b/rest/api/v3/account_provisioning/.openapi-generator new file mode 100644 index 00000000..97bc3ef8 --- /dev/null +++ b/rest/api/v3/account_provisioning/.openapi-generator @@ -0,0 +1,58 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_authenticate_account.go +api_create_account.go +api_delete_account.go +api_get_account_state.go +api_list_account.go +api_list_account_offering.go +api_list_offering.go +api_service.go +api_update_account_offering.go +api_update_account_state.go +docs/AccountList.md +docs/AccountProvisioningAccount.md +docs/AccountProvisioningAccountId.md +docs/AccountProvisioningCatalog.md +docs/AccountProvisioningOfferingList.md +docs/AccountProvisioningOfferingV1.md +docs/AccountProvisioningPagination.md +docs/AccountProvisioningProfile.md +docs/AccountProvisioningStateRead.md +docs/AccountProvisioningStateWrite.md +docs/AuthenticateAccount.md +docs/CatalogEntry.md +docs/CatalogEntryEntitlements.md +docs/CreateAccount.md +docs/CreateAccountParams.md +docs/DeleteAccount.md +docs/ErrorResponse.md +docs/GetAccountState.md +docs/ListAccount.md +docs/ListAccountOffering.md +docs/ListOffering.md +docs/OfferingsToAdd.md +docs/State.md +docs/State1.md +docs/Type.md +docs/UpdateAccountOffering.md +docs/UpdateAccountState.md +model_account_list.go +model_account_provisioning_account.go +model_account_provisioning_account_id.go +model_account_provisioning_catalog.go +model_account_provisioning_offering_list.go +model_account_provisioning_offering_v1.go +model_account_provisioning_pagination.go +model_account_provisioning_profile.go +model_account_provisioning_state_read.go +model_account_provisioning_state_write.go +model_catalog_entry.go +model_catalog_entry_entitlements.go +model_create_account_params.go +model_error_response.go +model_offerings_to_add.go +model_state.go +model_state1.go +model_type.go diff --git a/rest/api/v3/account_provisioning/.openapi-generator-ignore b/rest/api/v3/account_provisioning/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/account_provisioning/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/account_provisioning/README.md b/rest/api/v3/account_provisioning/README.md new file mode 100644 index 00000000..8ef85c0a --- /dev/null +++ b/rest/api/v3/account_provisioning/README.md @@ -0,0 +1,87 @@ +# Go API client for + +The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. + +You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:43.514185+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AuthenticateAccount* | [**AuthenticateAccount**](docs/AuthenticateAccount.md#authenticateaccount) | **Post** /v3/partners/accounts/{AccountID}/sso | Authenticate an account with single sign on +*CreateAccount* | [**CreateAccount**](docs/CreateAccount.md#createaccount) | **Post** /v3/partners/accounts | Create an account +*DeleteAccount* | [**DeleteAccount**](docs/DeleteAccount.md#deleteaccount) | **Delete** /v3/partners/accounts/{AccountID} | Delete an account +*GetAccountState* | [**GetAccountState**](docs/GetAccountState.md#getaccountstate) | **Get** /v3/partners/accounts/{AccountID}/state | Get an account's state +*ListAccount* | [**ListAccount**](docs/ListAccount.md#listaccount) | **Get** /v3/partners/accounts | Get all accounts +*ListAccountOffering* | [**ListAccountOffering**](docs/ListAccountOffering.md#listaccountoffering) | **Get** /v3/partners/accounts/{AccountID}/offerings | Get account offerings +*ListOffering* | [**ListOffering**](docs/ListOffering.md#listoffering) | **Get** /v3/partners/offerings | Get all available offerings +*UpdateAccountOffering* | [**UpdateAccountOffering**](docs/UpdateAccountOffering.md#updateaccountoffering) | **Put** /v3/partners/accounts/{AccountID}/offerings | Update account offerings +*UpdateAccountState* | [**UpdateAccountState**](docs/UpdateAccountState.md#updateaccountstate) | **Put** /v3/partners/accounts/{AccountID}/state | Update an account's state + + +## Documentation For Models + + - [AccountList](AccountList.md) + - [AccountProvisioningAccount](AccountProvisioningAccount.md) + - [AccountProvisioningAccountId](AccountProvisioningAccountId.md) + - [AccountProvisioningCatalog](AccountProvisioningCatalog.md) + - [AccountProvisioningOfferingList](AccountProvisioningOfferingList.md) + - [AccountProvisioningOfferingV1](AccountProvisioningOfferingV1.md) + - [AccountProvisioningPagination](AccountProvisioningPagination.md) + - [AccountProvisioningProfile](AccountProvisioningProfile.md) + - [AccountProvisioningStateRead](AccountProvisioningStateRead.md) + - [AccountProvisioningStateWrite](AccountProvisioningStateWrite.md) + - [CatalogEntry](CatalogEntry.md) + - [CatalogEntryEntitlements](CatalogEntryEntitlements.md) + - [CreateAccountParams](CreateAccountParams.md) + - [ErrorResponse](ErrorResponse.md) + - [OfferingsToAdd](OfferingsToAdd.md) + - [State](State.md) + - [State1](State1.md) + - [Type](Type.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/account_provisioning/api_authenticate_account.go b/rest/api/v3/account_provisioning/api_authenticate_account.go new file mode 100644 index 00000000..e5383bab --- /dev/null +++ b/rest/api/v3/account_provisioning/api_authenticate_account.go @@ -0,0 +1,51 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "net/url" + + "strings" +) + +type AuthenticateAccountParam struct { + // Twilio SendGrid account ID + AccountID *string `json:"accountID"` +} + +func (params *AuthenticateAccountParam) SetAccountID(AccountID string) *AuthenticateAccountParam { + params.AccountID = &AccountID + return params +} + +// Authenticates and logs in a user to Twilio Sendgrid as a specific admin identity configured for SSO by partner. Any additional teammates or subusers will need to log in directly via app.sendgrid.com +func (c *ApiService) AuthenticateAccount(params *AuthenticateAccountParam) (interface{}, error) { + path := "/v3/partners/accounts/{AccountID}/sso" + if params != nil && params.AccountID != nil { + path = strings.Replace(path, "{"+"AccountID"+"}", *params.AccountID, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + return nil, nil +} diff --git a/rest/api/v3/account_provisioning/api_create_account.go b/rest/api/v3/account_provisioning/api_create_account.go new file mode 100644 index 00000000..86290d88 --- /dev/null +++ b/rest/api/v3/account_provisioning/api_create_account.go @@ -0,0 +1,73 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type CreateAccountParam struct { + // + CreateAccountParams *CreateAccountParams `json:"CreateAccountParams"` + // **OPTIONAL** Custom request header provided ONLY for a test account + TTestAccount *string `json:"T-Test-Account,omitempty"` +} + +func (params *CreateAccountParam) SetCreateAccountParams(CreateAccountParams CreateAccountParams) *CreateAccountParam { + params.CreateAccountParams = &CreateAccountParams + return params +} +func (params *CreateAccountParam) SetTTestAccount(TTestAccount string) *CreateAccountParam { + params.TTestAccount = &TTestAccount + return params +} + +// Creates a new account, with specified offering, under the organization. +func (c *ApiService) CreateAccount(params *CreateAccountParam) (interface{}, error) { + path := "/v3/partners/accounts" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateAccountParams != nil { + b, err := json.Marshal(*params.CreateAccountParams) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.TTestAccount != nil { + headers["T-Test-Account"] = *params.TTestAccount + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &AccountProvisioningAccountId{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/account_provisioning/api_delete_account.go b/rest/api/v3/account_provisioning/api_delete_account.go new file mode 100644 index 00000000..cacc4b80 --- /dev/null +++ b/rest/api/v3/account_provisioning/api_delete_account.go @@ -0,0 +1,51 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "net/url" + + "strings" +) + +type DeleteAccountParam struct { + // Twilio SendGrid account ID + AccountID *string `json:"accountID"` +} + +func (params *DeleteAccountParam) SetAccountID(AccountID string) *DeleteAccountParam { + params.AccountID = &AccountID + return params +} + +// Delete a specific account under your organization by account ID. Note that this is an **irreversible** action that does the following: - Revokes API Keys and SSO so that the account user cannot log in or access SendGrid data. - Removes all offerings and configured SendGrid resources such as dedicated IPs. - Cancels billing effective immediately. +func (c *ApiService) DeleteAccount(params *DeleteAccountParam) (interface{}, error) { + path := "/v3/partners/accounts/{AccountID}" + if params != nil && params.AccountID != nil { + path = strings.Replace(path, "{"+"AccountID"+"}", *params.AccountID, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + return nil, nil +} diff --git a/rest/api/v3/account_provisioning/api_get_account_state.go b/rest/api/v3/account_provisioning/api_get_account_state.go new file mode 100644 index 00000000..621e565a --- /dev/null +++ b/rest/api/v3/account_provisioning/api_get_account_state.go @@ -0,0 +1,60 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type GetAccountStateParam struct { + // Twilio SendGrid account ID + AccountID *string `json:"accountID"` +} + +func (params *GetAccountStateParam) SetAccountID(AccountID string) *GetAccountStateParam { + params.AccountID = &AccountID + return params +} + +// Retrieve the state of the specified account. +func (c *ApiService) GetAccountState(params *GetAccountStateParam) (interface{}, error) { + path := "/v3/partners/accounts/{AccountID}/state" + if params != nil && params.AccountID != nil { + path = strings.Replace(path, "{"+"AccountID"+"}", *params.AccountID, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AccountProvisioningStateRead{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/account_provisioning/api_list_account.go b/rest/api/v3/account_provisioning/api_list_account.go new file mode 100644 index 00000000..2cb085c6 --- /dev/null +++ b/rest/api/v3/account_provisioning/api_list_account.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListAccountParam struct { + // The last item successfully retrieved + Offset *string `json:"offset,omitempty"` + // The number of items to return + Limit *int32 `json:"limit,omitempty"` +} + +func (params *ListAccountParam) SetOffset(Offset string) *ListAccountParam { + params.Offset = &Offset + return params +} +func (params *ListAccountParam) SetLimit(Limit int32) *ListAccountParam { + params.Limit = &Limit + return params +} + +// Retrieves all accounts under the organization. +func (c *ApiService) ListAccount(params *ListAccountParam) (interface{}, error) { + path := "/v3/partners/accounts" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Offset != nil { + data.Set("offset", *params.Offset) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AccountList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/account_provisioning/api_list_account_offering.go b/rest/api/v3/account_provisioning/api_list_account_offering.go new file mode 100644 index 00000000..c594e8f3 --- /dev/null +++ b/rest/api/v3/account_provisioning/api_list_account_offering.go @@ -0,0 +1,60 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type ListAccountOfferingParam struct { + // Twilio SendGrid account ID + AccountID *string `json:"accountID"` +} + +func (params *ListAccountOfferingParam) SetAccountID(AccountID string) *ListAccountOfferingParam { + params.AccountID = &AccountID + return params +} + +// Retrieves offering information about the specified account. +func (c *ApiService) ListAccountOffering(params *ListAccountOfferingParam) (interface{}, error) { + path := "/v3/partners/accounts/{AccountID}/offerings" + if params != nil && params.AccountID != nil { + path = strings.Replace(path, "{"+"AccountID"+"}", *params.AccountID, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AccountProvisioningOfferingList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/account_provisioning/api_list_offering.go b/rest/api/v3/account_provisioning/api_list_offering.go new file mode 100644 index 00000000..07e96bc6 --- /dev/null +++ b/rest/api/v3/account_provisioning/api_list_offering.go @@ -0,0 +1,48 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListOfferingParam struct { +} + +// Retrieves offerings available under the organization. +func (c *ApiService) ListOffering() (interface{}, error) { + path := "/v3/partners/offerings" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AccountProvisioningCatalog{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/account_provisioning/api_service.go b/rest/api/v3/account_provisioning/api_service.go new file mode 100644 index 00000000..6459d6eb --- /dev/null +++ b/rest/api/v3/account_provisioning/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/account_provisioning/api_update_account_offering.go b/rest/api/v3/account_provisioning/api_update_account_offering.go new file mode 100644 index 00000000..c825d25d --- /dev/null +++ b/rest/api/v3/account_provisioning/api_update_account_offering.go @@ -0,0 +1,75 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type UpdateAccountOfferingParam struct { + // Twilio SendGrid account ID + AccountID *string `json:"accountID"` + // + OfferingsToAdd *OfferingsToAdd `json:"OfferingsToAdd"` +} + +func (params *UpdateAccountOfferingParam) SetAccountID(AccountID string) *UpdateAccountOfferingParam { + params.AccountID = &AccountID + return params +} +func (params *UpdateAccountOfferingParam) SetOfferingsToAdd(OfferingsToAdd OfferingsToAdd) *UpdateAccountOfferingParam { + params.OfferingsToAdd = &OfferingsToAdd + return params +} + +// Changes a package offering for the specified account. Please note that an account can have only one package offering. Also associates one or more add-on offerings such as Marketing Campaigns, Dedicated IP Addresses, and Expert Services to the specified account. +func (c *ApiService) UpdateAccountOffering(params *UpdateAccountOfferingParam) (interface{}, error) { + path := "/v3/partners/accounts/{AccountID}/offerings" + if params != nil && params.AccountID != nil { + path = strings.Replace(path, "{"+"AccountID"+"}", *params.AccountID, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.OfferingsToAdd != nil { + b, err := json.Marshal(*params.OfferingsToAdd) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AccountProvisioningOfferingList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/account_provisioning/api_update_account_state.go b/rest/api/v3/account_provisioning/api_update_account_state.go new file mode 100644 index 00000000..300491b2 --- /dev/null +++ b/rest/api/v3/account_provisioning/api_update_account_state.go @@ -0,0 +1,67 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type UpdateAccountStateParam struct { + // Twilio SendGrid account ID + AccountID *string `json:"accountID"` + // + AccountProvisioningStateWrite *AccountProvisioningStateWrite `json:"AccountProvisioningStateWrite"` +} + +func (params *UpdateAccountStateParam) SetAccountID(AccountID string) *UpdateAccountStateParam { + params.AccountID = &AccountID + return params +} +func (params *UpdateAccountStateParam) SetAccountProvisioningStateWrite(AccountProvisioningStateWrite AccountProvisioningStateWrite) *UpdateAccountStateParam { + params.AccountProvisioningStateWrite = &AccountProvisioningStateWrite + return params +} + +// Update the state of the specified account. +func (c *ApiService) UpdateAccountState(params *UpdateAccountStateParam) (interface{}, error) { + path := "/v3/partners/accounts/{AccountID}/state" + if params != nil && params.AccountID != nil { + path = strings.Replace(path, "{"+"AccountID"+"}", *params.AccountID, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.AccountProvisioningStateWrite != nil { + b, err := json.Marshal(*params.AccountProvisioningStateWrite) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + return nil, nil +} diff --git a/rest/api/v3/account_provisioning/docs/AccountList.md b/rest/api/v3/account_provisioning/docs/AccountList.md new file mode 100644 index 00000000..8ce68222 --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/AccountList.md @@ -0,0 +1,12 @@ +# AccountList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Accounts** | [**[]AccountProvisioningAccount**](AccountProvisioningAccount.md) | List of account objects. |[optional] +**Pages** | [**AccountProvisioningPagination**](AccountProvisioningPagination.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/AccountProvisioningAccount.md b/rest/api/v3/account_provisioning/docs/AccountProvisioningAccount.md new file mode 100644 index 00000000..acb44d9b --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/AccountProvisioningAccount.md @@ -0,0 +1,12 @@ +# AccountProvisioningAccount + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | Twilio SendGrid account ID | +**CreatedAt** | [**time.Time**](time.Time.md) | Timestamp indicating when the account was created. Format is [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/AccountProvisioningAccountId.md b/rest/api/v3/account_provisioning/docs/AccountProvisioningAccountId.md new file mode 100644 index 00000000..47063845 --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/AccountProvisioningAccountId.md @@ -0,0 +1,11 @@ +# AccountProvisioningAccountId + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountId** | **string** | Twilio SendGrid account ID | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/AccountProvisioningCatalog.md b/rest/api/v3/account_provisioning/docs/AccountProvisioningCatalog.md new file mode 100644 index 00000000..d0fe779b --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/AccountProvisioningCatalog.md @@ -0,0 +1,11 @@ +# AccountProvisioningCatalog + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Catalog** | [**[]CatalogEntry**](CatalogEntry.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/AccountProvisioningOfferingList.md b/rest/api/v3/account_provisioning/docs/AccountProvisioningOfferingList.md new file mode 100644 index 00000000..7bea6750 --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/AccountProvisioningOfferingList.md @@ -0,0 +1,11 @@ +# AccountProvisioningOfferingList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Offerings** | [**[]AccountProvisioningOfferingV1**](AccountProvisioningOfferingV1.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/AccountProvisioningOfferingV1.md b/rest/api/v3/account_provisioning/docs/AccountProvisioningOfferingV1.md new file mode 100644 index 00000000..d4da851a --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/AccountProvisioningOfferingV1.md @@ -0,0 +1,13 @@ +# AccountProvisioningOfferingV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the offering | +**Type** | [**Type**](Type.md) | Defines the type of offering (e.g., package or addon). | +**Quantity** | **int64** | Quantity of the specified addon to be added. If offering type is `package`, quantity must be 1. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/AccountProvisioningPagination.md b/rest/api/v3/account_provisioning/docs/AccountProvisioningPagination.md new file mode 100644 index 00000000..1c2e4e18 --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/AccountProvisioningPagination.md @@ -0,0 +1,12 @@ +# AccountProvisioningPagination + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Last** | **string** | The last item returned |[optional] +**Example** | Pointer to **interface{}** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/AccountProvisioningProfile.md b/rest/api/v3/account_provisioning/docs/AccountProvisioningProfile.md new file mode 100644 index 00000000..9f5c6154 --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/AccountProvisioningProfile.md @@ -0,0 +1,17 @@ +# AccountProvisioningProfile + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstName** | **string** | First name of the account holder |[optional] +**LastName** | **string** | Last name of the account holder |[optional] +**CompanyName** | **string** | Company name of the account holder |[optional] +**CompanyWebsite** | **string** | Company website of the account holder |[optional] +**Email** | **string** | Email of the account holder |[optional] +**Phone** | **string** | Phone number with a maximum of fifteen digits formatted using the E.164 standard consisting of [+] [country code] [subscriber number including area code] |[optional] +**Timezone** | **string** | Area/Location as listed in the [IANA Time Zone database](https://www.iana.org/time-zones) |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/AccountProvisioningStateRead.md b/rest/api/v3/account_provisioning/docs/AccountProvisioningStateRead.md new file mode 100644 index 00000000..8d2164df --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/AccountProvisioningStateRead.md @@ -0,0 +1,11 @@ +# AccountProvisioningStateRead + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | [**State**](State.md) | The state of the account (e.g., `activated`, `deactivated`, `suspended`, `banned`, or `indeterminate`) | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/AccountProvisioningStateWrite.md b/rest/api/v3/account_provisioning/docs/AccountProvisioningStateWrite.md new file mode 100644 index 00000000..e0e3fdae --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/AccountProvisioningStateWrite.md @@ -0,0 +1,11 @@ +# AccountProvisioningStateWrite + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | [**State1**](State1.md) | The state of the account (e.g., `activated`, `deactivated`) | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/AuthenticateAccount.md b/rest/api/v3/account_provisioning/docs/AuthenticateAccount.md new file mode 100644 index 00000000..c4d769bc --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/AuthenticateAccount.md @@ -0,0 +1,51 @@ +# AuthenticateAccount + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AuthenticateAccount**](AuthenticateAccount.md#AuthenticateAccount) | **Post** /v3/partners/accounts/{AccountID}/sso | Authenticate an account with single sign on + + + +## AuthenticateAccount + +> AuthenticateAccount(ctx, AccountID) + +Authenticate an account with single sign on + +Authenticates and logs in a user to Twilio Sendgrid as a specific admin identity configured for SSO by partner. Any additional teammates or subusers will need to log in directly via app.sendgrid.com + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountID** | **string** | Twilio SendGrid account ID + +### Other Parameters + +Other parameters are passed through a pointer to a AuthenticateAccountParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/account_provisioning/docs/CatalogEntry.md b/rest/api/v3/account_provisioning/docs/CatalogEntry.md new file mode 100644 index 00000000..b9c58b86 --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/CatalogEntry.md @@ -0,0 +1,12 @@ +# CatalogEntry + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Offering** | [**AccountProvisioningOfferingV1**](AccountProvisioningOfferingV1.md) | |[optional] +**Entitlements** | [**CatalogEntryEntitlements**](CatalogEntryEntitlements.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/CatalogEntryEntitlements.md b/rest/api/v3/account_provisioning/docs/CatalogEntryEntitlements.md new file mode 100644 index 00000000..295aba0e --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/CatalogEntryEntitlements.md @@ -0,0 +1,14 @@ +# CatalogEntryEntitlements + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EmailSendsMaxMonthly** | **int64** | Total number of email sends per month |[optional] +**IpCount** | **int64** | Number of dedicated IPs offered |[optional] +**TeammatesMaxTotal** | **int64** | Total number of teammates allowed |[optional] +**UsersMaxTotal** | **int64** | Total number of subusers allowed |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/CreateAccount.md b/rest/api/v3/account_provisioning/docs/CreateAccount.md new file mode 100644 index 00000000..ecbf0664 --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/CreateAccount.md @@ -0,0 +1,48 @@ +# CreateAccount + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateAccount**](CreateAccount.md#CreateAccount) | **Post** /v3/partners/accounts | Create an account + + + +## CreateAccount + +> AccountProvisioningAccountId CreateAccount(ctx, CreateAccountParamsoptional) + +Create an account + +Creates a new account, with specified offering, under the organization. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateAccountParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**TTestAccount** | **string** | **OPTIONAL** Custom request header provided ONLY for a test account + +### Return type + +[**AccountProvisioningAccountId**](AccountProvisioningAccountId.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/account_provisioning/docs/CreateAccountParams.md b/rest/api/v3/account_provisioning/docs/CreateAccountParams.md new file mode 100644 index 00000000..0770960f --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/CreateAccountParams.md @@ -0,0 +1,12 @@ +# CreateAccountParams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Profile** | [**AccountProvisioningProfile**](AccountProvisioningProfile.md) | |[optional] +**Offerings** | [**[]AccountProvisioningOfferingV1**](AccountProvisioningOfferingV1.md) | List of offering names to assign to account. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/DeleteAccount.md b/rest/api/v3/account_provisioning/docs/DeleteAccount.md new file mode 100644 index 00000000..56c25b9b --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/DeleteAccount.md @@ -0,0 +1,51 @@ +# DeleteAccount + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteAccount**](DeleteAccount.md#DeleteAccount) | **Delete** /v3/partners/accounts/{AccountID} | Delete an account + + + +## DeleteAccount + +> DeleteAccount(ctx, AccountID) + +Delete an account + +Delete a specific account under your organization by account ID. Note that this is an **irreversible** action that does the following: - Revokes API Keys and SSO so that the account user cannot log in or access SendGrid data. - Removes all offerings and configured SendGrid resources such as dedicated IPs. - Cancels billing effective immediately. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountID** | **string** | Twilio SendGrid account ID + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteAccountParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/account_provisioning/docs/ErrorResponse.md b/rest/api/v3/account_provisioning/docs/ErrorResponse.md new file mode 100644 index 00000000..976ef82d --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/ErrorResponse.md @@ -0,0 +1,13 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | The message representing the error from the API. | +**Field** | **string** | The field associated with the error. | +**ErrorId** | **string** | ID representing the error as a unique nubmer. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/GetAccountState.md b/rest/api/v3/account_provisioning/docs/GetAccountState.md new file mode 100644 index 00000000..72f545d0 --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/GetAccountState.md @@ -0,0 +1,51 @@ +# GetAccountState + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetAccountState**](GetAccountState.md#GetAccountState) | **Get** /v3/partners/accounts/{AccountID}/state | Get an account's state + + + +## GetAccountState + +> AccountProvisioningStateRead GetAccountState(ctx, AccountID) + +Get an account's state + +Retrieve the state of the specified account. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountID** | **string** | Twilio SendGrid account ID + +### Other Parameters + +Other parameters are passed through a pointer to a GetAccountStateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**AccountProvisioningStateRead**](AccountProvisioningStateRead.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/account_provisioning/docs/ListAccount.md b/rest/api/v3/account_provisioning/docs/ListAccount.md new file mode 100644 index 00000000..08835e00 --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/ListAccount.md @@ -0,0 +1,49 @@ +# ListAccount + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListAccount**](ListAccount.md#ListAccount) | **Get** /v3/partners/accounts | Get all accounts + + + +## ListAccount + +> AccountList ListAccount(ctx, optional) + +Get all accounts + +Retrieves all accounts under the organization. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListAccountParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Offset** | **string** | The last item successfully retrieved +**Limit** | **int32** | The number of items to return + +### Return type + +[**AccountList**](AccountList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/account_provisioning/docs/ListAccountOffering.md b/rest/api/v3/account_provisioning/docs/ListAccountOffering.md new file mode 100644 index 00000000..dfcc05e9 --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/ListAccountOffering.md @@ -0,0 +1,51 @@ +# ListAccountOffering + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListAccountOffering**](ListAccountOffering.md#ListAccountOffering) | **Get** /v3/partners/accounts/{AccountID}/offerings | Get account offerings + + + +## ListAccountOffering + +> AccountProvisioningOfferingList ListAccountOffering(ctx, AccountID) + +Get account offerings + +Retrieves offering information about the specified account. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountID** | **string** | Twilio SendGrid account ID + +### Other Parameters + +Other parameters are passed through a pointer to a ListAccountOfferingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**AccountProvisioningOfferingList**](AccountProvisioningOfferingList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/account_provisioning/docs/ListOffering.md b/rest/api/v3/account_provisioning/docs/ListOffering.md new file mode 100644 index 00000000..7f8f7f4d --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/ListOffering.md @@ -0,0 +1,44 @@ +# ListOffering + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListOffering**](ListOffering.md#ListOffering) | **Get** /v3/partners/offerings | Get all available offerings + + + +## ListOffering + +> AccountProvisioningCatalog ListOffering(ctx, ) + +Get all available offerings + +Retrieves offerings available under the organization. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListOfferingParams struct + + +### Return type + +[**AccountProvisioningCatalog**](AccountProvisioningCatalog.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/account_provisioning/docs/OfferingsToAdd.md b/rest/api/v3/account_provisioning/docs/OfferingsToAdd.md new file mode 100644 index 00000000..331a737f --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/OfferingsToAdd.md @@ -0,0 +1,11 @@ +# OfferingsToAdd + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Offerings** | [**[]AccountProvisioningOfferingV1**](AccountProvisioningOfferingV1.md) | List of offerings to assign to account. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/State.md b/rest/api/v3/account_provisioning/docs/State.md new file mode 100644 index 00000000..e6eafdea --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/State.md @@ -0,0 +1,16 @@ +# State + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**ACTIVATED** | string | (value: `"activated"`) +**DEACTIVATED** | string | (value: `"deactivated"`) +**SUSPENDED** | string | (value: `"suspended"`) +**BANNED** | string | (value: `"banned"`) +**INDETERMINATE** | string | (value: `"indeterminate"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/State1.md b/rest/api/v3/account_provisioning/docs/State1.md new file mode 100644 index 00000000..ef3ce852 --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/State1.md @@ -0,0 +1,13 @@ +# State1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**ACTIVATED** | string | (value: `"activated"`) +**DEACTIVATED** | string | (value: `"deactivated"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/Type.md b/rest/api/v3/account_provisioning/docs/Type.md new file mode 100644 index 00000000..f07e195a --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/Type.md @@ -0,0 +1,13 @@ +# Type + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**PACKAGE** | string | (value: `"package"`) +**ADDON** | string | (value: `"addon"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/UpdateAccountOffering.md b/rest/api/v3/account_provisioning/docs/UpdateAccountOffering.md new file mode 100644 index 00000000..2e4299a3 --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/UpdateAccountOffering.md @@ -0,0 +1,51 @@ +# UpdateAccountOffering + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateAccountOffering**](UpdateAccountOffering.md#UpdateAccountOffering) | **Put** /v3/partners/accounts/{AccountID}/offerings | Update account offerings + + + +## UpdateAccountOffering + +> AccountProvisioningOfferingList UpdateAccountOffering(ctx, AccountIDOfferingsToAdd) + +Update account offerings + +Changes a package offering for the specified account. Please note that an account can have only one package offering. Also associates one or more add-on offerings such as Marketing Campaigns, Dedicated IP Addresses, and Expert Services to the specified account. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountID** | **string** | Twilio SendGrid account ID + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateAccountOfferingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**AccountProvisioningOfferingList**](AccountProvisioningOfferingList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/account_provisioning/docs/UpdateAccountState.md b/rest/api/v3/account_provisioning/docs/UpdateAccountState.md new file mode 100644 index 00000000..c8a82904 --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/UpdateAccountState.md @@ -0,0 +1,51 @@ +# UpdateAccountState + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateAccountState**](UpdateAccountState.md#UpdateAccountState) | **Put** /v3/partners/accounts/{AccountID}/state | Update an account's state + + + +## UpdateAccountState + +> UpdateAccountState(ctx, AccountIDAccountProvisioningStateWrite) + +Update an account's state + +Update the state of the specified account. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountID** | **string** | Twilio SendGrid account ID + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateAccountStateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/account_provisioning/model_account_list.go b/rest/api/v3/account_provisioning/model_account_list.go new file mode 100644 index 00000000..59f5e79d --- /dev/null +++ b/rest/api/v3/account_provisioning/model_account_list.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AccountList struct for AccountList +type AccountList struct { + // List of account objects. + Accounts *[]AccountProvisioningAccount `json:"accounts,omitempty"` + Pages *AccountProvisioningPagination `json:"pages,omitempty"` +} diff --git a/rest/api/v3/account_provisioning/model_account_provisioning_account.go b/rest/api/v3/account_provisioning/model_account_provisioning_account.go new file mode 100644 index 00000000..bcbe2fdb --- /dev/null +++ b/rest/api/v3/account_provisioning/model_account_provisioning_account.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "time" +) + +// AccountProvisioningAccount struct for AccountProvisioningAccount +type AccountProvisioningAccount struct { + // Twilio SendGrid account ID + Id string `json:"id"` + // Timestamp indicating when the account was created. Format is [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) + CreatedAt time.Time `json:"created_at"` +} diff --git a/rest/api/v3/account_provisioning/model_account_provisioning_account_id.go b/rest/api/v3/account_provisioning/model_account_provisioning_account_id.go new file mode 100644 index 00000000..c73f6222 --- /dev/null +++ b/rest/api/v3/account_provisioning/model_account_provisioning_account_id.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AccountProvisioningAccountId struct for AccountProvisioningAccountId +type AccountProvisioningAccountId struct { + // Twilio SendGrid account ID + AccountId string `json:"account_id"` +} diff --git a/rest/api/v3/account_provisioning/model_account_provisioning_catalog.go b/rest/api/v3/account_provisioning/model_account_provisioning_catalog.go new file mode 100644 index 00000000..717c1073 --- /dev/null +++ b/rest/api/v3/account_provisioning/model_account_provisioning_catalog.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AccountProvisioningCatalog struct for AccountProvisioningCatalog +type AccountProvisioningCatalog struct { + Catalog *[]CatalogEntry `json:"catalog,omitempty"` +} diff --git a/rest/api/v3/account_provisioning/model_account_provisioning_offering_list.go b/rest/api/v3/account_provisioning/model_account_provisioning_offering_list.go new file mode 100644 index 00000000..2381fe06 --- /dev/null +++ b/rest/api/v3/account_provisioning/model_account_provisioning_offering_list.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AccountProvisioningOfferingList struct for AccountProvisioningOfferingList +type AccountProvisioningOfferingList struct { + Offerings *[]AccountProvisioningOfferingV1 `json:"offerings,omitempty"` +} diff --git a/rest/api/v3/account_provisioning/model_account_provisioning_offering_v1.go b/rest/api/v3/account_provisioning/model_account_provisioning_offering_v1.go new file mode 100644 index 00000000..e3652f95 --- /dev/null +++ b/rest/api/v3/account_provisioning/model_account_provisioning_offering_v1.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AccountProvisioningOfferingV1 An offering is a package (email infrastructure) or add-on (marketing campaigns, dedicated IP addresses, EASE) that an account can acquire. Each offering has a list of entitlements that indicate the benefits the account receives from the acquisition. +type AccountProvisioningOfferingV1 struct { + // Name of the offering + Name string `json:"name"` + // Defines the type of offering (e.g., package or addon). + Type Type `json:"type"` + // Quantity of the specified addon to be added. If offering type is `package`, quantity must be 1. + Quantity *int64 `json:"quantity,omitempty"` +} diff --git a/rest/api/v3/account_provisioning/model_account_provisioning_pagination.go b/rest/api/v3/account_provisioning/model_account_provisioning_pagination.go new file mode 100644 index 00000000..a4f93bf0 --- /dev/null +++ b/rest/api/v3/account_provisioning/model_account_provisioning_pagination.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AccountProvisioningPagination struct for AccountProvisioningPagination +type AccountProvisioningPagination struct { + // The last item returned + Last *string `json:"last,omitempty"` + Example *interface{} `json:"example,omitempty"` +} diff --git a/rest/api/v3/account_provisioning/model_account_provisioning_profile.go b/rest/api/v3/account_provisioning/model_account_provisioning_profile.go new file mode 100644 index 00000000..c352a637 --- /dev/null +++ b/rest/api/v3/account_provisioning/model_account_provisioning_profile.go @@ -0,0 +1,32 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AccountProvisioningProfile struct for AccountProvisioningProfile +type AccountProvisioningProfile struct { + // First name of the account holder + FirstName *string `json:"first_name,omitempty"` + // Last name of the account holder + LastName *string `json:"last_name,omitempty"` + // Company name of the account holder + CompanyName *string `json:"company_name,omitempty"` + // Company website of the account holder + CompanyWebsite *string `json:"company_website,omitempty"` + // Email of the account holder + Email *string `json:"email,omitempty"` + // Phone number with a maximum of fifteen digits formatted using the E.164 standard consisting of [+] [country code] [subscriber number including area code] + Phone *string `json:"phone,omitempty"` + // Area/Location as listed in the [IANA Time Zone database](https://www.iana.org/time-zones) + Timezone *string `json:"timezone,omitempty"` +} diff --git a/rest/api/v3/account_provisioning/model_account_provisioning_state_read.go b/rest/api/v3/account_provisioning/model_account_provisioning_state_read.go new file mode 100644 index 00000000..84d25d48 --- /dev/null +++ b/rest/api/v3/account_provisioning/model_account_provisioning_state_read.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AccountProvisioningStateRead struct for AccountProvisioningStateRead +type AccountProvisioningStateRead struct { + // The state of the account (e.g., `activated`, `deactivated`, `suspended`, `banned`, or `indeterminate`) + State State `json:"state"` +} diff --git a/rest/api/v3/account_provisioning/model_account_provisioning_state_write.go b/rest/api/v3/account_provisioning/model_account_provisioning_state_write.go new file mode 100644 index 00000000..625284be --- /dev/null +++ b/rest/api/v3/account_provisioning/model_account_provisioning_state_write.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AccountProvisioningStateWrite struct for AccountProvisioningStateWrite +type AccountProvisioningStateWrite struct { + // The state of the account (e.g., `activated`, `deactivated`) + State State1 `json:"state"` +} diff --git a/rest/api/v3/account_provisioning/model_catalog_entry.go b/rest/api/v3/account_provisioning/model_catalog_entry.go new file mode 100644 index 00000000..b488d947 --- /dev/null +++ b/rest/api/v3/account_provisioning/model_catalog_entry.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CatalogEntry struct for CatalogEntry +type CatalogEntry struct { + Offering *AccountProvisioningOfferingV1 `json:"offering,omitempty"` + Entitlements *CatalogEntryEntitlements `json:"entitlements,omitempty"` +} diff --git a/rest/api/v3/account_provisioning/model_catalog_entry_entitlements.go b/rest/api/v3/account_provisioning/model_catalog_entry_entitlements.go new file mode 100644 index 00000000..841d6738 --- /dev/null +++ b/rest/api/v3/account_provisioning/model_catalog_entry_entitlements.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CatalogEntryEntitlements Set of entitlements the specified offering comes with +type CatalogEntryEntitlements struct { + // Total number of email sends per month + EmailSendsMaxMonthly *int64 `json:"email_sends_max_monthly,omitempty"` + // Number of dedicated IPs offered + IpCount *int64 `json:"ip_count,omitempty"` + // Total number of teammates allowed + TeammatesMaxTotal *int64 `json:"teammates_max_total,omitempty"` + // Total number of subusers allowed + UsersMaxTotal *int64 `json:"users_max_total,omitempty"` +} diff --git a/rest/api/v3/account_provisioning/model_create_account_params.go b/rest/api/v3/account_provisioning/model_create_account_params.go new file mode 100644 index 00000000..dd953c68 --- /dev/null +++ b/rest/api/v3/account_provisioning/model_create_account_params.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateAccountParams struct for CreateAccountParams +type CreateAccountParams struct { + Profile *AccountProvisioningProfile `json:"profile,omitempty"` + // List of offering names to assign to account. + Offerings []AccountProvisioningOfferingV1 `json:"offerings"` +} diff --git a/rest/api/v3/account_provisioning/model_error_response.go b/rest/api/v3/account_provisioning/model_error_response.go new file mode 100644 index 00000000..553b37fa --- /dev/null +++ b/rest/api/v3/account_provisioning/model_error_response.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + // The message representing the error from the API. + Message string `json:"message"` + // The field associated with the error. + Field string `json:"field"` + // ID representing the error as a unique nubmer. + ErrorId string `json:"error_id"` +} diff --git a/rest/api/v3/account_provisioning/model_offerings_to_add.go b/rest/api/v3/account_provisioning/model_offerings_to_add.go new file mode 100644 index 00000000..8913aff0 --- /dev/null +++ b/rest/api/v3/account_provisioning/model_offerings_to_add.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// OfferingsToAdd struct for OfferingsToAdd +type OfferingsToAdd struct { + // List of offerings to assign to account. + Offerings []AccountProvisioningOfferingV1 `json:"offerings"` +} diff --git a/rest/api/v3/account_provisioning/model_state.go b/rest/api/v3/account_provisioning/model_state.go new file mode 100644 index 00000000..b9deec05 --- /dev/null +++ b/rest/api/v3/account_provisioning/model_state.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// State the model 'State' +type State string + +// List of State +const ( + STATE_ACTIVATED State = "activated" + STATE_DEACTIVATED State = "deactivated" + STATE_SUSPENDED State = "suspended" + STATE_BANNED State = "banned" + STATE_INDETERMINATE State = "indeterminate" +) diff --git a/rest/api/v3/account_provisioning/model_state1.go b/rest/api/v3/account_provisioning/model_state1.go new file mode 100644 index 00000000..16b6afaf --- /dev/null +++ b/rest/api/v3/account_provisioning/model_state1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// State1 the model 'State1' +type State1 string + +// List of State1 +const ( + STATE1_ACTIVATED State1 = "activated" + STATE1_DEACTIVATED State1 = "deactivated" +) diff --git a/rest/api/v3/account_provisioning/model_type.go b/rest/api/v3/account_provisioning/model_type.go new file mode 100644 index 00000000..8b89c8bf --- /dev/null +++ b/rest/api/v3/account_provisioning/model_type.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Type the model 'Type' +type Type string + +// List of Type +const ( + TYPE_PACKAGE Type = "package" + TYPE_ADDON Type = "addon" +) diff --git a/rest/api/v3/alerts/.openapi-generator b/rest/api/v3/alerts/.openapi-generator new file mode 100644 index 00000000..26ec3615 --- /dev/null +++ b/rest/api/v3/alerts/.openapi-generator @@ -0,0 +1,38 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_create_alert.go +api_delete_alert.go +api_get_alert.go +api_list_alert.go +api_service.go +api_update_alert.go +docs/CreateAlert.md +docs/CreateAlert201Response.md +docs/CreateAlertRequest.md +docs/DeleteAlert.md +docs/ErrorResponse.md +docs/ErrorResponseErrorsInner.md +docs/GetAlert.md +docs/GetAlert200Response.md +docs/ListAlert.md +docs/ListAlert200ResponseInner.md +docs/Type.md +docs/Type1.md +docs/Type2.md +docs/Type3.md +docs/UpdateAlert.md +docs/UpdateAlert200Response.md +docs/UpdateAlertRequest.md +model_create_alert_201_response.go +model_create_alert_request.go +model_error_response.go +model_error_response_errors_inner.go +model_get_alert_200_response.go +model_list_alert_200_response_inner.go +model_type.go +model_type1.go +model_type2.go +model_type3.go +model_update_alert_200_response.go +model_update_alert_request.go diff --git a/rest/api/v3/alerts/.openapi-generator-ignore b/rest/api/v3/alerts/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/alerts/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/alerts/README.md b/rest/api/v3/alerts/README.md new file mode 100644 index 00000000..2b2b690f --- /dev/null +++ b/rest/api/v3/alerts/README.md @@ -0,0 +1,77 @@ +# Go API client for + +The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. + +For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:43.514404+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateAlert* | [**CreateAlert**](docs/CreateAlert.md#createalert) | **Post** /v3/alerts | Create a new Alert +*DeleteAlert* | [**DeleteAlert**](docs/DeleteAlert.md#deletealert) | **Delete** /v3/alerts/{AlertId} | Delete an alert +*GetAlert* | [**GetAlert**](docs/GetAlert.md#getalert) | **Get** /v3/alerts/{AlertId} | Retrieve a specific alert +*ListAlert* | [**ListAlert**](docs/ListAlert.md#listalert) | **Get** /v3/alerts | Retrieve all alerts +*UpdateAlert* | [**UpdateAlert**](docs/UpdateAlert.md#updatealert) | **Patch** /v3/alerts/{AlertId} | Update an alert + + +## Documentation For Models + + - [CreateAlert201Response](CreateAlert201Response.md) + - [CreateAlertRequest](CreateAlertRequest.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [GetAlert200Response](GetAlert200Response.md) + - [ListAlert200ResponseInner](ListAlert200ResponseInner.md) + - [Type](Type.md) + - [Type1](Type1.md) + - [Type2](Type2.md) + - [Type3](Type3.md) + - [UpdateAlert200Response](UpdateAlert200Response.md) + - [UpdateAlertRequest](UpdateAlertRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/alerts/api_create_alert.go b/rest/api/v3/alerts/api_create_alert.go new file mode 100644 index 00000000..840688d3 --- /dev/null +++ b/rest/api/v3/alerts/api_create_alert.go @@ -0,0 +1,81 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type CreateAlertParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + CreateAlertRequest *CreateAlertRequest `json:"CreateAlertRequest,omitempty"` +} + +func (params *CreateAlertParam) SetOnbehalfof(Onbehalfof string) *CreateAlertParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateAlertParam) SetCreateAlertRequest(CreateAlertRequest CreateAlertRequest) *CreateAlertParam { + params.CreateAlertRequest = &CreateAlertRequest + return params +} + +// **This endpoint allows you to create a new alert.** +func (c *ApiService) CreateAlert(params *CreateAlertParam) (interface{}, error) { + path := "/v3/alerts" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateAlertRequest != nil { + b, err := json.Marshal(*params.CreateAlertRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &CreateAlert201Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/alerts/api_delete_alert.go b/rest/api/v3/alerts/api_delete_alert.go new file mode 100644 index 00000000..c3b11758 --- /dev/null +++ b/rest/api/v3/alerts/api_delete_alert.go @@ -0,0 +1,61 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "fmt" + "net/url" + + "strings" +) + +type DeleteAlertParam struct { + // The ID of the alert you would like to retrieve. + AlertId *int32 `json:"alert_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteAlertParam) SetAlertId(AlertId int32) *DeleteAlertParam { + params.AlertId = &AlertId + return params +} +func (params *DeleteAlertParam) SetOnbehalfof(Onbehalfof string) *DeleteAlertParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete an alert.** +func (c *ApiService) DeleteAlert(params *DeleteAlertParam) (interface{}, error) { + path := "/v3/alerts/{AlertId}" + if params != nil && params.AlertId != nil { + path = strings.Replace(path, "{"+"AlertId"+"}", fmt.Sprint(*params.AlertId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + return nil, nil +} diff --git a/rest/api/v3/alerts/api_get_alert.go b/rest/api/v3/alerts/api_get_alert.go new file mode 100644 index 00000000..90a60725 --- /dev/null +++ b/rest/api/v3/alerts/api_get_alert.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type GetAlertParam struct { + // The ID of the alert you would like to retrieve. + AlertId *int32 `json:"alert_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetAlertParam) SetAlertId(AlertId int32) *GetAlertParam { + params.AlertId = &AlertId + return params +} +func (params *GetAlertParam) SetOnbehalfof(Onbehalfof string) *GetAlertParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a specific alert.** +func (c *ApiService) GetAlert(params *GetAlertParam) (interface{}, error) { + path := "/v3/alerts/{AlertId}" + if params != nil && params.AlertId != nil { + path = strings.Replace(path, "{"+"AlertId"+"}", fmt.Sprint(*params.AlertId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetAlert200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/alerts/api_list_alert.go b/rest/api/v3/alerts/api_list_alert.go new file mode 100644 index 00000000..df938ee4 --- /dev/null +++ b/rest/api/v3/alerts/api_list_alert.go @@ -0,0 +1,58 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListAlertParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListAlertParam) SetOnbehalfof(Onbehalfof string) *ListAlertParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve all of your alerts.** +func (c *ApiService) ListAlert(params *ListAlertParam) (interface{}, error) { + path := "/v3/alerts" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListAlert200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/alerts/api_service.go b/rest/api/v3/alerts/api_service.go new file mode 100644 index 00000000..79301822 --- /dev/null +++ b/rest/api/v3/alerts/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/alerts/api_update_alert.go b/rest/api/v3/alerts/api_update_alert.go new file mode 100644 index 00000000..f99d96d3 --- /dev/null +++ b/rest/api/v3/alerts/api_update_alert.go @@ -0,0 +1,85 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type UpdateAlertParam struct { + // The ID of the alert you would like to retrieve. + AlertId *int32 `json:"alert_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateAlertRequest *UpdateAlertRequest `json:"UpdateAlertRequest,omitempty"` +} + +func (params *UpdateAlertParam) SetAlertId(AlertId int32) *UpdateAlertParam { + params.AlertId = &AlertId + return params +} +func (params *UpdateAlertParam) SetOnbehalfof(Onbehalfof string) *UpdateAlertParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateAlertParam) SetUpdateAlertRequest(UpdateAlertRequest UpdateAlertRequest) *UpdateAlertParam { + params.UpdateAlertRequest = &UpdateAlertRequest + return params +} + +// **This endpoint allows you to update an alert.** +func (c *ApiService) UpdateAlert(params *UpdateAlertParam) (interface{}, error) { + path := "/v3/alerts/{AlertId}" + if params != nil && params.AlertId != nil { + path = strings.Replace(path, "{"+"AlertId"+"}", fmt.Sprint(*params.AlertId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateAlertRequest != nil { + b, err := json.Marshal(*params.UpdateAlertRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &UpdateAlert200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/alerts/docs/CreateAlert.md b/rest/api/v3/alerts/docs/CreateAlert.md new file mode 100644 index 00000000..5b8a4c69 --- /dev/null +++ b/rest/api/v3/alerts/docs/CreateAlert.md @@ -0,0 +1,49 @@ +# CreateAlert + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateAlert**](CreateAlert.md#CreateAlert) | **Post** /v3/alerts | Create a new Alert + + + +## CreateAlert + +> CreateAlert201Response CreateAlert(ctx, optional) + +Create a new Alert + +**This endpoint allows you to create a new alert.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateAlertParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**CreateAlertRequest** | [**CreateAlertRequest**](CreateAlertRequest.md) | + +### Return type + +[**CreateAlert201Response**](CreateAlert201Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/alerts/docs/CreateAlert201Response.md b/rest/api/v3/alerts/docs/CreateAlert201Response.md new file mode 100644 index 00000000..8d9fce20 --- /dev/null +++ b/rest/api/v3/alerts/docs/CreateAlert201Response.md @@ -0,0 +1,17 @@ +# CreateAlert201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | **int32** | A Unix timestamp indicating when the alert was created. | +**EmailTo** | **string** | The email address that the alert will be sent to. | +**Frequency** | **string** | If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent. For example, \"daily\", \"weekly\", or \"monthly\". |[optional] +**Id** | **int32** | The ID of the alert. | +**Type** | **string** | The type of alert. | +**UpdatedAt** | **int32** | A Unix timestamp indicating when the alert was last modified. | +**Percentage** | **int32** | If the alert is of type `usage_limit`, this indicates the percentage of email usage that must be reached before the alert will be sent. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/alerts/docs/CreateAlertRequest.md b/rest/api/v3/alerts/docs/CreateAlertRequest.md new file mode 100644 index 00000000..b043fc6a --- /dev/null +++ b/rest/api/v3/alerts/docs/CreateAlertRequest.md @@ -0,0 +1,14 @@ +# CreateAlertRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | [**Type**](Type.md) | The type of alert you want to create. Can be either usage_limit or stats_notification. Example: usage_limit | +**EmailTo** | **string** | The email address the alert will be sent to. Example: test@example.com | +**Frequency** | **string** | Required for stats_notification. How frequently the alert will be sent. Example: daily |[optional] +**Percentage** | **int32** | Required for usage_limit. When this usage threshold is reached, the alert will be sent. Example: 90 |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/alerts/docs/DeleteAlert.md b/rest/api/v3/alerts/docs/DeleteAlert.md new file mode 100644 index 00000000..ba62219b --- /dev/null +++ b/rest/api/v3/alerts/docs/DeleteAlert.md @@ -0,0 +1,52 @@ +# DeleteAlert + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteAlert**](DeleteAlert.md#DeleteAlert) | **Delete** /v3/alerts/{AlertId} | Delete an alert + + + +## DeleteAlert + +> DeleteAlert(ctx, AlertIdoptional) + +Delete an alert + +**This endpoint allows you to delete an alert.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AlertId** | **int32** | The ID of the alert you would like to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteAlertParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/alerts/docs/ErrorResponse.md b/rest/api/v3/alerts/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/alerts/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/alerts/docs/ErrorResponseErrorsInner.md b/rest/api/v3/alerts/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/alerts/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/alerts/docs/GetAlert.md b/rest/api/v3/alerts/docs/GetAlert.md new file mode 100644 index 00000000..345075a6 --- /dev/null +++ b/rest/api/v3/alerts/docs/GetAlert.md @@ -0,0 +1,52 @@ +# GetAlert + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetAlert**](GetAlert.md#GetAlert) | **Get** /v3/alerts/{AlertId} | Retrieve a specific alert + + + +## GetAlert + +> GetAlert200Response GetAlert(ctx, AlertIdoptional) + +Retrieve a specific alert + +**This endpoint allows you to retrieve a specific alert.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AlertId** | **int32** | The ID of the alert you would like to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetAlertParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**GetAlert200Response**](GetAlert200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/alerts/docs/GetAlert200Response.md b/rest/api/v3/alerts/docs/GetAlert200Response.md new file mode 100644 index 00000000..4ea6ac01 --- /dev/null +++ b/rest/api/v3/alerts/docs/GetAlert200Response.md @@ -0,0 +1,17 @@ +# GetAlert200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | **int32** | A Unix timestamp indicating when the alert was created. | +**EmailTo** | **string** | The email address that the alert will be sent to. | +**Frequency** | **string** | If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent. For example: \"daily\", \"weekly\", or \"monthly\". |[optional] +**Id** | **int32** | The ID of the alert. | +**Type** | [**Type2**](Type2.md) | The type of alert. | +**UpdatedAt** | **int32** | A Unix timestamp indicating when the alert was last modified. | +**Percentage** | **int32** | If the alert is of type usage_limit, this indicates the percentage of email usage that must be reached before the alert will be sent. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/alerts/docs/ListAlert.md b/rest/api/v3/alerts/docs/ListAlert.md new file mode 100644 index 00000000..9996e4cd --- /dev/null +++ b/rest/api/v3/alerts/docs/ListAlert.md @@ -0,0 +1,48 @@ +# ListAlert + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListAlert**](ListAlert.md#ListAlert) | **Get** /v3/alerts | Retrieve all alerts + + + +## ListAlert + +> []ListAlert200ResponseInner ListAlert(ctx, optional) + +Retrieve all alerts + +**This endpoint allows you to retrieve all of your alerts.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListAlertParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**[]ListAlert200ResponseInner**](ListAlert200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/alerts/docs/ListAlert200ResponseInner.md b/rest/api/v3/alerts/docs/ListAlert200ResponseInner.md new file mode 100644 index 00000000..a078cc54 --- /dev/null +++ b/rest/api/v3/alerts/docs/ListAlert200ResponseInner.md @@ -0,0 +1,17 @@ +# ListAlert200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | **int32** | A Unix timestamp indicating when the alert was created. | +**EmailTo** | **string** | The email address that the alert will be sent to. | +**Id** | **int32** | The ID of the alert. | +**Percentage** | **int32** | If the alert is of type usage_limit, this indicates the percentage of email usage that must be reached before the alert will be sent. |[optional] +**Type** | [**Type1**](Type1.md) | The type of alert. | +**UpdatedAt** | **int32** | A Unix timestamp indicating when the alert was last modified. |[optional] +**Frequency** | **string** | If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent. For example, \"daily\", \"weekly\", or \"monthly\". |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/alerts/docs/Type.md b/rest/api/v3/alerts/docs/Type.md new file mode 100644 index 00000000..31653d8d --- /dev/null +++ b/rest/api/v3/alerts/docs/Type.md @@ -0,0 +1,13 @@ +# Type + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**STATS_NOTIFICATION** | string | (value: `"stats_notification"`) +**USAGE_LIMIT** | string | (value: `"usage_limit"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/alerts/docs/Type1.md b/rest/api/v3/alerts/docs/Type1.md new file mode 100644 index 00000000..6ae1d3bf --- /dev/null +++ b/rest/api/v3/alerts/docs/Type1.md @@ -0,0 +1,13 @@ +# Type1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**USAGE_LIMIT** | string | (value: `"usage_limit"`) +**STATS_NOTIFICATION** | string | (value: `"stats_notification"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/alerts/docs/Type2.md b/rest/api/v3/alerts/docs/Type2.md new file mode 100644 index 00000000..54da2c21 --- /dev/null +++ b/rest/api/v3/alerts/docs/Type2.md @@ -0,0 +1,13 @@ +# Type2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**USAGE_LIMIT** | string | (value: `"usage_limit"`) +**STATS_NOTIFICATION** | string | (value: `"stats_notification"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/alerts/docs/Type3.md b/rest/api/v3/alerts/docs/Type3.md new file mode 100644 index 00000000..60187fd5 --- /dev/null +++ b/rest/api/v3/alerts/docs/Type3.md @@ -0,0 +1,13 @@ +# Type3 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**USAGE_LIMIT** | string | (value: `"usage_limit"`) +**STATS_NOTIFICATION** | string | (value: `"stats_notification"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/alerts/docs/UpdateAlert.md b/rest/api/v3/alerts/docs/UpdateAlert.md new file mode 100644 index 00000000..85acdfc3 --- /dev/null +++ b/rest/api/v3/alerts/docs/UpdateAlert.md @@ -0,0 +1,53 @@ +# UpdateAlert + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateAlert**](UpdateAlert.md#UpdateAlert) | **Patch** /v3/alerts/{AlertId} | Update an alert + + + +## UpdateAlert + +> UpdateAlert200Response UpdateAlert(ctx, AlertIdoptional) + +Update an alert + +**This endpoint allows you to update an alert.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AlertId** | **int32** | The ID of the alert you would like to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateAlertParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateAlertRequest** | [**UpdateAlertRequest**](UpdateAlertRequest.md) | + +### Return type + +[**UpdateAlert200Response**](UpdateAlert200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/alerts/docs/UpdateAlert200Response.md b/rest/api/v3/alerts/docs/UpdateAlert200Response.md new file mode 100644 index 00000000..49e6cfb3 --- /dev/null +++ b/rest/api/v3/alerts/docs/UpdateAlert200Response.md @@ -0,0 +1,17 @@ +# UpdateAlert200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | **int32** | A Unix timestamp indicating when the alert was created. | +**EmailTo** | **string** | The email address that the alert will be sent to. | +**Frequency** | **string** | If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent. For example: \"daily\", \"weekly\", or \"monthly\". |[optional] +**Id** | **int32** | The ID of the alert. | +**Type** | [**Type3**](Type3.md) | The type of alert. | +**UpdatedAt** | **int32** | A Unix timestamp indicating when the alert was last modified. | +**Percentage** | **int32** | If the alert is of type usage_limit, this indicates the percentage of email usage that must be reached before the alert will be sent. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/alerts/docs/UpdateAlertRequest.md b/rest/api/v3/alerts/docs/UpdateAlertRequest.md new file mode 100644 index 00000000..1bb4d6f0 --- /dev/null +++ b/rest/api/v3/alerts/docs/UpdateAlertRequest.md @@ -0,0 +1,13 @@ +# UpdateAlertRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EmailTo** | **string** | The new email address you want your alert to be sent to. Example: test@example.com |[optional] +**Frequency** | **string** | The new frequency at which to send the stats_notification alert. Example: monthly |[optional] +**Percentage** | **int32** | The new percentage threshold at which the usage_limit alert will be sent. Example: 90 |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/alerts/model_create_alert_201_response.go b/rest/api/v3/alerts/model_create_alert_201_response.go new file mode 100644 index 00000000..7b4d5d87 --- /dev/null +++ b/rest/api/v3/alerts/model_create_alert_201_response.go @@ -0,0 +1,32 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateAlert201Response struct for CreateAlert201Response +type CreateAlert201Response struct { + // A Unix timestamp indicating when the alert was created. + CreatedAt int32 `json:"created_at"` + // The email address that the alert will be sent to. + EmailTo string `json:"email_to"` + // If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent. For example, \"daily\", \"weekly\", or \"monthly\". + Frequency *string `json:"frequency,omitempty"` + // The ID of the alert. + Id int32 `json:"id"` + // The type of alert. + Type string `json:"type"` + // A Unix timestamp indicating when the alert was last modified. + UpdatedAt int32 `json:"updated_at"` + // If the alert is of type `usage_limit`, this indicates the percentage of email usage that must be reached before the alert will be sent. + Percentage *int32 `json:"percentage,omitempty"` +} diff --git a/rest/api/v3/alerts/model_create_alert_request.go b/rest/api/v3/alerts/model_create_alert_request.go new file mode 100644 index 00000000..a741cf0f --- /dev/null +++ b/rest/api/v3/alerts/model_create_alert_request.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateAlertRequest struct for CreateAlertRequest +type CreateAlertRequest struct { + // The type of alert you want to create. Can be either usage_limit or stats_notification. Example: usage_limit + Type Type `json:"type"` + // The email address the alert will be sent to. Example: test@example.com + EmailTo string `json:"email_to"` + // Required for stats_notification. How frequently the alert will be sent. Example: daily + Frequency *string `json:"frequency,omitempty"` + // Required for usage_limit. When this usage threshold is reached, the alert will be sent. Example: 90 + Percentage *int32 `json:"percentage,omitempty"` +} diff --git a/rest/api/v3/alerts/model_error_response.go b/rest/api/v3/alerts/model_error_response.go new file mode 100644 index 00000000..98b54223 --- /dev/null +++ b/rest/api/v3/alerts/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/alerts/model_error_response_errors_inner.go b/rest/api/v3/alerts/model_error_response_errors_inner.go new file mode 100644 index 00000000..2cbef824 --- /dev/null +++ b/rest/api/v3/alerts/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/alerts/model_get_alert_200_response.go b/rest/api/v3/alerts/model_get_alert_200_response.go new file mode 100644 index 00000000..bc0595ff --- /dev/null +++ b/rest/api/v3/alerts/model_get_alert_200_response.go @@ -0,0 +1,32 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetAlert200Response struct for GetAlert200Response +type GetAlert200Response struct { + // A Unix timestamp indicating when the alert was created. + CreatedAt int32 `json:"created_at"` + // The email address that the alert will be sent to. + EmailTo string `json:"email_to"` + // If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent. For example: \"daily\", \"weekly\", or \"monthly\". + Frequency *string `json:"frequency,omitempty"` + // The ID of the alert. + Id int32 `json:"id"` + // The type of alert. + Type Type2 `json:"type"` + // A Unix timestamp indicating when the alert was last modified. + UpdatedAt int32 `json:"updated_at"` + // If the alert is of type usage_limit, this indicates the percentage of email usage that must be reached before the alert will be sent. + Percentage *int32 `json:"percentage,omitempty"` +} diff --git a/rest/api/v3/alerts/model_list_alert_200_response_inner.go b/rest/api/v3/alerts/model_list_alert_200_response_inner.go new file mode 100644 index 00000000..06751c6c --- /dev/null +++ b/rest/api/v3/alerts/model_list_alert_200_response_inner.go @@ -0,0 +1,32 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListAlert200ResponseInner struct for ListAlert200ResponseInner +type ListAlert200ResponseInner struct { + // A Unix timestamp indicating when the alert was created. + CreatedAt int32 `json:"created_at"` + // The email address that the alert will be sent to. + EmailTo string `json:"email_to"` + // The ID of the alert. + Id int32 `json:"id"` + // If the alert is of type usage_limit, this indicates the percentage of email usage that must be reached before the alert will be sent. + Percentage *int32 `json:"percentage,omitempty"` + // The type of alert. + Type Type1 `json:"type"` + // A Unix timestamp indicating when the alert was last modified. + UpdatedAt *int32 `json:"updated_at,omitempty"` + // If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent. For example, \"daily\", \"weekly\", or \"monthly\". + Frequency *string `json:"frequency,omitempty"` +} diff --git a/rest/api/v3/alerts/model_type.go b/rest/api/v3/alerts/model_type.go new file mode 100644 index 00000000..83d8da9f --- /dev/null +++ b/rest/api/v3/alerts/model_type.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Type the model 'Type' +type Type string + +// List of Type +const ( + TYPE_STATS_NOTIFICATION Type = "stats_notification" + TYPE_USAGE_LIMIT Type = "usage_limit" +) diff --git a/rest/api/v3/alerts/model_type1.go b/rest/api/v3/alerts/model_type1.go new file mode 100644 index 00000000..1c9bb449 --- /dev/null +++ b/rest/api/v3/alerts/model_type1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Type1 the model 'Type1' +type Type1 string + +// List of Type1 +const ( + TYPE1_USAGE_LIMIT Type1 = "usage_limit" + TYPE1_STATS_NOTIFICATION Type1 = "stats_notification" +) diff --git a/rest/api/v3/alerts/model_type2.go b/rest/api/v3/alerts/model_type2.go new file mode 100644 index 00000000..27b77da8 --- /dev/null +++ b/rest/api/v3/alerts/model_type2.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Type2 the model 'Type2' +type Type2 string + +// List of Type2 +const ( + TYPE2_USAGE_LIMIT Type2 = "usage_limit" + TYPE2_STATS_NOTIFICATION Type2 = "stats_notification" +) diff --git a/rest/api/v3/alerts/model_type3.go b/rest/api/v3/alerts/model_type3.go new file mode 100644 index 00000000..25e96e17 --- /dev/null +++ b/rest/api/v3/alerts/model_type3.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Type3 the model 'Type3' +type Type3 string + +// List of Type3 +const ( + TYPE3_USAGE_LIMIT Type3 = "usage_limit" + TYPE3_STATS_NOTIFICATION Type3 = "stats_notification" +) diff --git a/rest/api/v3/alerts/model_update_alert_200_response.go b/rest/api/v3/alerts/model_update_alert_200_response.go new file mode 100644 index 00000000..da9d6c62 --- /dev/null +++ b/rest/api/v3/alerts/model_update_alert_200_response.go @@ -0,0 +1,32 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateAlert200Response struct for UpdateAlert200Response +type UpdateAlert200Response struct { + // A Unix timestamp indicating when the alert was created. + CreatedAt int32 `json:"created_at"` + // The email address that the alert will be sent to. + EmailTo string `json:"email_to"` + // If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent. For example: \"daily\", \"weekly\", or \"monthly\". + Frequency *string `json:"frequency,omitempty"` + // The ID of the alert. + Id int32 `json:"id"` + // The type of alert. + Type Type3 `json:"type"` + // A Unix timestamp indicating when the alert was last modified. + UpdatedAt int32 `json:"updated_at"` + // If the alert is of type usage_limit, this indicates the percentage of email usage that must be reached before the alert will be sent. + Percentage *int32 `json:"percentage,omitempty"` +} diff --git a/rest/api/v3/alerts/model_update_alert_request.go b/rest/api/v3/alerts/model_update_alert_request.go new file mode 100644 index 00000000..3573cc14 --- /dev/null +++ b/rest/api/v3/alerts/model_update_alert_request.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateAlertRequest struct for UpdateAlertRequest +type UpdateAlertRequest struct { + // The new email address you want your alert to be sent to. Example: test@example.com + EmailTo *string `json:"email_to,omitempty"` + // The new frequency at which to send the stats_notification alert. Example: monthly + Frequency *string `json:"frequency,omitempty"` + // The new percentage threshold at which the usage_limit alert will be sent. Example: 90 + Percentage *int32 `json:"percentage,omitempty"` +} diff --git a/rest/api/v3/api_keys/.openapi-generator b/rest/api/v3/api_keys/.openapi-generator new file mode 100644 index 00000000..70c88658 --- /dev/null +++ b/rest/api/v3/api_keys/.openapi-generator @@ -0,0 +1,36 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_create_api_key.go +api_delete_api_key.go +api_get_api_key.go +api_list_api_key.go +api_service.go +api_update_api_key.go +api_update_api_key_name.go +docs/ApiKeyResponse.md +docs/ApiKeyScopesResponse.md +docs/CreateApiKey.md +docs/CreateApiKey201Response.md +docs/CreateApiKeyRequest.md +docs/DeleteApiKey.md +docs/ErrorResponse.md +docs/ErrorResponseErrorsInner.md +docs/GetApiKey.md +docs/GetApiKey200Response.md +docs/ListApiKey.md +docs/ListApiKey200Response.md +docs/UpdateApiKey.md +docs/UpdateApiKeyName.md +docs/UpdateApiKeyNameRequest.md +docs/UpdateApiKeyRequest.md +model_api_key_response.go +model_api_key_scopes_response.go +model_create_api_key_201_response.go +model_create_api_key_request.go +model_error_response.go +model_error_response_errors_inner.go +model_get_api_key_200_response.go +model_list_api_key_200_response.go +model_update_api_key_name_request.go +model_update_api_key_request.go diff --git a/rest/api/v3/api_keys/.openapi-generator-ignore b/rest/api/v3/api_keys/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/api_keys/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/api_keys/README.md b/rest/api/v3/api_keys/README.md new file mode 100644 index 00000000..f903de6f --- /dev/null +++ b/rest/api/v3/api_keys/README.md @@ -0,0 +1,76 @@ +# Go API client for + +The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. + +To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:43.513429+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateApiKey* | [**CreateApiKey**](docs/CreateApiKey.md#createapikey) | **Post** /v3/api_keys | Create API keys +*DeleteApiKey* | [**DeleteApiKey**](docs/DeleteApiKey.md#deleteapikey) | **Delete** /v3/api_keys/{ApiKeyId} | Delete API keys +*GetApiKey* | [**GetApiKey**](docs/GetApiKey.md#getapikey) | **Get** /v3/api_keys/{ApiKeyId} | Retrieve an existing API Key +*ListApiKey* | [**ListApiKey**](docs/ListApiKey.md#listapikey) | **Get** /v3/api_keys | Retrieve all API Keys belonging to the authenticated user +*UpdateApiKey* | [**UpdateApiKey**](docs/UpdateApiKey.md#updateapikey) | **Put** /v3/api_keys/{ApiKeyId} | Update API key name and scopes +*UpdateApiKeyName* | [**UpdateApiKeyName**](docs/UpdateApiKeyName.md#updateapikeyname) | **Patch** /v3/api_keys/{ApiKeyId} | Update API key name + + +## Documentation For Models + + - [ApiKeyResponse](ApiKeyResponse.md) + - [ApiKeyScopesResponse](ApiKeyScopesResponse.md) + - [CreateApiKey201Response](CreateApiKey201Response.md) + - [CreateApiKeyRequest](CreateApiKeyRequest.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [GetApiKey200Response](GetApiKey200Response.md) + - [ListApiKey200Response](ListApiKey200Response.md) + - [UpdateApiKeyNameRequest](UpdateApiKeyNameRequest.md) + - [UpdateApiKeyRequest](UpdateApiKeyRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/api_keys/api_create_api_key.go b/rest/api/v3/api_keys/api_create_api_key.go new file mode 100644 index 00000000..4007a9d4 --- /dev/null +++ b/rest/api/v3/api_keys/api_create_api_key.go @@ -0,0 +1,105 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type CreateApiKeyParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + CreateApiKeyRequest *CreateApiKeyRequest `json:"CreateApiKeyRequest,omitempty"` +} + +func (params *CreateApiKeyParam) SetOnbehalfof(Onbehalfof string) *CreateApiKeyParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateApiKeyParam) SetCreateApiKeyRequest(CreateApiKeyRequest CreateApiKeyRequest) *CreateApiKeyParam { + params.CreateApiKeyRequest = &CreateApiKeyRequest + return params +} + +// **This endpoint allows you to create a new API Key for the user.** To create your initial SendGrid API Key, you should [use the SendGrid App](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. A JSON request body containing a `name` property is required when making requests to this endpoint. If the number of maximum keys, 100, is reached, a `403` status will be returned. Though the `name` field is required, it does not need to be unique. A unique API key ID will be generated for each key you create and returned in the response body. It is not necessary to pass a `scopes` field to the API when creating a key, but you should be aware that omitting the `scopes` field from your request will create a key with \"Full Access\" permissions by default. See the [API Key Permissions List](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/authorization) for all available scopes. An API key's scopes can be updated after creation using the \"Update API keys\" endpoint. +func (c *ApiService) CreateApiKey(params *CreateApiKeyParam) (interface{}, error) { + path := "/v3/api_keys" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateApiKeyRequest != nil { + b, err := json.Marshal(*params.CreateApiKeyRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &CreateApiKey201Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/api_keys/api_delete_api_key.go b/rest/api/v3/api_keys/api_delete_api_key.go new file mode 100644 index 00000000..e7870f10 --- /dev/null +++ b/rest/api/v3/api_keys/api_delete_api_key.go @@ -0,0 +1,93 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DeleteApiKeyParam struct { + // + ApiKeyId *string `json:"api_key_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteApiKeyParam) SetApiKeyId(ApiKeyId string) *DeleteApiKeyParam { + params.ApiKeyId = &ApiKeyId + return params +} +func (params *DeleteApiKeyParam) SetOnbehalfof(Onbehalfof string) *DeleteApiKeyParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to revoke an existing API Key using an `api_key_id`** Authentications using a revoked API Key will fail after after some small propogation delay. If the API Key ID does not exist, a `404` status will be returned. +func (c *ApiService) DeleteApiKey(params *DeleteApiKeyParam) (interface{}, error) { + path := "/v3/api_keys/{ApiKeyId}" + if params != nil && params.ApiKeyId != nil { + path = strings.Replace(path, "{"+"ApiKeyId"+"}", *params.ApiKeyId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/api_keys/api_get_api_key.go b/rest/api/v3/api_keys/api_get_api_key.go new file mode 100644 index 00000000..fddef224 --- /dev/null +++ b/rest/api/v3/api_keys/api_get_api_key.go @@ -0,0 +1,101 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type GetApiKeyParam struct { + // + ApiKeyId *string `json:"api_key_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetApiKeyParam) SetApiKeyId(ApiKeyId string) *GetApiKeyParam { + params.ApiKeyId = &ApiKeyId + return params +} +func (params *GetApiKeyParam) SetOnbehalfof(Onbehalfof string) *GetApiKeyParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a single API key using an `api_key_id`.** The endpoint will return a key's name, ID, and scopes. If the API Key ID does not, exist a `404` status will be returned. See the [API Key Permissions List](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/authorization) for all available scopes. An API key's scopes can be updated after creation using the \"Update API keys\" endpoint. +func (c *ApiService) GetApiKey(params *GetApiKeyParam) (interface{}, error) { + path := "/v3/api_keys/{ApiKeyId}" + if params != nil && params.ApiKeyId != nil { + path = strings.Replace(path, "{"+"ApiKeyId"+"}", *params.ApiKeyId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetApiKey200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/api_keys/api_list_api_key.go b/rest/api/v3/api_keys/api_list_api_key.go new file mode 100644 index 00000000..f6e17fc8 --- /dev/null +++ b/rest/api/v3/api_keys/api_list_api_key.go @@ -0,0 +1,93 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListApiKeyParam struct { + // + Limit *int32 `json:"limit,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListApiKeyParam) SetLimit(Limit int32) *ListApiKeyParam { + params.Limit = &Limit + return params +} +func (params *ListApiKeyParam) SetOnbehalfof(Onbehalfof string) *ListApiKeyParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve all API Keys that belong to the authenticated user.** A successful response from this API will include all available API keys' names and IDs. For security reasons, there is not a way to retrieve the key itself after it's created. If you lose your API key, you must create a new one. Only the \"Create API keys\" endpoint will return a key to you and only at the time of creation. An `api_key_id` can be used to update or delete the key, as well as retrieve the key's details, such as its scopes. +func (c *ApiService) ListApiKey(params *ListApiKeyParam) (interface{}, error) { + path := "/v3/api_keys" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListApiKey200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/api_keys/api_service.go b/rest/api/v3/api_keys/api_service.go new file mode 100644 index 00000000..24d94ab9 --- /dev/null +++ b/rest/api/v3/api_keys/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/api_keys/api_update_api_key.go b/rest/api/v3/api_keys/api_update_api_key.go new file mode 100644 index 00000000..449310cd --- /dev/null +++ b/rest/api/v3/api_keys/api_update_api_key.go @@ -0,0 +1,116 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type UpdateApiKeyParam struct { + // + ApiKeyId *string `json:"api_key_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateApiKeyRequest *UpdateApiKeyRequest `json:"UpdateApiKeyRequest,omitempty"` +} + +func (params *UpdateApiKeyParam) SetApiKeyId(ApiKeyId string) *UpdateApiKeyParam { + params.ApiKeyId = &ApiKeyId + return params +} +func (params *UpdateApiKeyParam) SetOnbehalfof(Onbehalfof string) *UpdateApiKeyParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateApiKeyParam) SetUpdateApiKeyRequest(UpdateApiKeyRequest UpdateApiKeyRequest) *UpdateApiKeyParam { + params.UpdateApiKeyRequest = &UpdateApiKeyRequest + return params +} + +// **This endpoint allows you to update the name and scopes of a given API key.** You must pass this endpoint a JSON request body with a `name` field and a `scopes` array containing at least one scope. The `name` and `scopes` fields will be used to update the key associated with the `api_key_id` in the request URL. If you need to update a key's scopes only, pass the `name` field with the key's existing name; the `name` will not be modified. If you need to update a key's name only, use the \"Update API key name\" endpoint. See the [API Key Permissions List](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/authorization) for all available scopes. +func (c *ApiService) UpdateApiKey(params *UpdateApiKeyParam) (interface{}, error) { + path := "/v3/api_keys/{ApiKeyId}" + if params != nil && params.ApiKeyId != nil { + path = strings.Replace(path, "{"+"ApiKeyId"+"}", *params.ApiKeyId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateApiKeyRequest != nil { + b, err := json.Marshal(*params.UpdateApiKeyRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ApiKeyResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/api_keys/api_update_api_key_name.go b/rest/api/v3/api_keys/api_update_api_key_name.go new file mode 100644 index 00000000..cb3f5574 --- /dev/null +++ b/rest/api/v3/api_keys/api_update_api_key_name.go @@ -0,0 +1,116 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type UpdateApiKeyNameParam struct { + // + ApiKeyId *string `json:"api_key_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateApiKeyNameRequest *UpdateApiKeyNameRequest `json:"UpdateApiKeyNameRequest,omitempty"` +} + +func (params *UpdateApiKeyNameParam) SetApiKeyId(ApiKeyId string) *UpdateApiKeyNameParam { + params.ApiKeyId = &ApiKeyId + return params +} +func (params *UpdateApiKeyNameParam) SetOnbehalfof(Onbehalfof string) *UpdateApiKeyNameParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateApiKeyNameParam) SetUpdateApiKeyNameRequest(UpdateApiKeyNameRequest UpdateApiKeyNameRequest) *UpdateApiKeyNameParam { + params.UpdateApiKeyNameRequest = &UpdateApiKeyNameRequest + return params +} + +// **This endpoint allows you to update the name of an existing API Key.** You must pass this endpoint a JSON request body with a `name` property, which will be used to rename the key associated with the `api_key_id` passed in the URL. +func (c *ApiService) UpdateApiKeyName(params *UpdateApiKeyNameParam) (interface{}, error) { + path := "/v3/api_keys/{ApiKeyId}" + if params != nil && params.ApiKeyId != nil { + path = strings.Replace(path, "{"+"ApiKeyId"+"}", *params.ApiKeyId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateApiKeyNameRequest != nil { + b, err := json.Marshal(*params.UpdateApiKeyNameRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ApiKeyResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/api_keys/docs/ApiKeyResponse.md b/rest/api/v3/api_keys/docs/ApiKeyResponse.md new file mode 100644 index 00000000..2a77ce3f --- /dev/null +++ b/rest/api/v3/api_keys/docs/ApiKeyResponse.md @@ -0,0 +1,12 @@ +# ApiKeyResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiKeyId** | **string** | The ID of your API Key. |[optional] +**Name** | **string** | The name of your API Key. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/api_keys/docs/ApiKeyScopesResponse.md b/rest/api/v3/api_keys/docs/ApiKeyScopesResponse.md new file mode 100644 index 00000000..1e853c9b --- /dev/null +++ b/rest/api/v3/api_keys/docs/ApiKeyScopesResponse.md @@ -0,0 +1,13 @@ +# ApiKeyScopesResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Scopes** | **[]string** | The permissions this API Key has access to. |[optional] +**ApiKeyId** | **string** | The ID of your API Key. |[optional] +**Name** | **string** | The name of your API Key. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/api_keys/docs/CreateApiKey.md b/rest/api/v3/api_keys/docs/CreateApiKey.md new file mode 100644 index 00000000..a51a16ca --- /dev/null +++ b/rest/api/v3/api_keys/docs/CreateApiKey.md @@ -0,0 +1,49 @@ +# CreateApiKey + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateApiKey**](CreateApiKey.md#CreateApiKey) | **Post** /v3/api_keys | Create API keys + + + +## CreateApiKey + +> CreateApiKey201Response CreateApiKey(ctx, optional) + +Create API keys + +**This endpoint allows you to create a new API Key for the user.** To create your initial SendGrid API Key, you should [use the SendGrid App](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. A JSON request body containing a `name` property is required when making requests to this endpoint. If the number of maximum keys, 100, is reached, a `403` status will be returned. Though the `name` field is required, it does not need to be unique. A unique API key ID will be generated for each key you create and returned in the response body. It is not necessary to pass a `scopes` field to the API when creating a key, but you should be aware that omitting the `scopes` field from your request will create a key with \"Full Access\" permissions by default. See the [API Key Permissions List](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/authorization) for all available scopes. An API key's scopes can be updated after creation using the \"Update API keys\" endpoint. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateApiKeyParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**CreateApiKeyRequest** | [**CreateApiKeyRequest**](CreateApiKeyRequest.md) | + +### Return type + +[**CreateApiKey201Response**](CreateApiKey201Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/api_keys/docs/CreateApiKey201Response.md b/rest/api/v3/api_keys/docs/CreateApiKey201Response.md new file mode 100644 index 00000000..e0b7aa07 --- /dev/null +++ b/rest/api/v3/api_keys/docs/CreateApiKey201Response.md @@ -0,0 +1,14 @@ +# CreateApiKey201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiKey** | **string** | |[optional] +**ApiKeyId** | **string** | |[optional] +**Name** | **string** | |[optional] +**Scopes** | **[]string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/api_keys/docs/CreateApiKeyRequest.md b/rest/api/v3/api_keys/docs/CreateApiKeyRequest.md new file mode 100644 index 00000000..e9ef1a2c --- /dev/null +++ b/rest/api/v3/api_keys/docs/CreateApiKeyRequest.md @@ -0,0 +1,12 @@ +# CreateApiKeyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name you will use to describe this API Key. | +**Scopes** | **[]string** | The individual permissions that you are giving to this API Key. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/api_keys/docs/DeleteApiKey.md b/rest/api/v3/api_keys/docs/DeleteApiKey.md new file mode 100644 index 00000000..4a144d28 --- /dev/null +++ b/rest/api/v3/api_keys/docs/DeleteApiKey.md @@ -0,0 +1,52 @@ +# DeleteApiKey + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteApiKey**](DeleteApiKey.md#DeleteApiKey) | **Delete** /v3/api_keys/{ApiKeyId} | Delete API keys + + + +## DeleteApiKey + +> DeleteApiKey(ctx, ApiKeyIdoptional) + +Delete API keys + +**This endpoint allows you to revoke an existing API Key using an `api_key_id`** Authentications using a revoked API Key will fail after after some small propogation delay. If the API Key ID does not exist, a `404` status will be returned. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ApiKeyId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteApiKeyParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/api_keys/docs/ErrorResponse.md b/rest/api/v3/api_keys/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/api_keys/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/api_keys/docs/ErrorResponseErrorsInner.md b/rest/api/v3/api_keys/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/api_keys/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/api_keys/docs/GetApiKey.md b/rest/api/v3/api_keys/docs/GetApiKey.md new file mode 100644 index 00000000..053b02e9 --- /dev/null +++ b/rest/api/v3/api_keys/docs/GetApiKey.md @@ -0,0 +1,52 @@ +# GetApiKey + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetApiKey**](GetApiKey.md#GetApiKey) | **Get** /v3/api_keys/{ApiKeyId} | Retrieve an existing API Key + + + +## GetApiKey + +> GetApiKey200Response GetApiKey(ctx, ApiKeyIdoptional) + +Retrieve an existing API Key + +**This endpoint allows you to retrieve a single API key using an `api_key_id`.** The endpoint will return a key's name, ID, and scopes. If the API Key ID does not, exist a `404` status will be returned. See the [API Key Permissions List](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/authorization) for all available scopes. An API key's scopes can be updated after creation using the \"Update API keys\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ApiKeyId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a GetApiKeyParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**GetApiKey200Response**](GetApiKey200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/api_keys/docs/GetApiKey200Response.md b/rest/api/v3/api_keys/docs/GetApiKey200Response.md new file mode 100644 index 00000000..43bebd71 --- /dev/null +++ b/rest/api/v3/api_keys/docs/GetApiKey200Response.md @@ -0,0 +1,11 @@ +# GetApiKey200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ApiKeyScopesResponse**](ApiKeyScopesResponse.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/api_keys/docs/ListApiKey.md b/rest/api/v3/api_keys/docs/ListApiKey.md new file mode 100644 index 00000000..5fd1de6d --- /dev/null +++ b/rest/api/v3/api_keys/docs/ListApiKey.md @@ -0,0 +1,49 @@ +# ListApiKey + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListApiKey**](ListApiKey.md#ListApiKey) | **Get** /v3/api_keys | Retrieve all API Keys belonging to the authenticated user + + + +## ListApiKey + +> ListApiKey200Response ListApiKey(ctx, optional) + +Retrieve all API Keys belonging to the authenticated user + +**This endpoint allows you to retrieve all API Keys that belong to the authenticated user.** A successful response from this API will include all available API keys' names and IDs. For security reasons, there is not a way to retrieve the key itself after it's created. If you lose your API key, you must create a new one. Only the \"Create API keys\" endpoint will return a key to you and only at the time of creation. An `api_key_id` can be used to update or delete the key, as well as retrieve the key's details, such as its scopes. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListApiKeyParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **int32** | +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListApiKey200Response**](ListApiKey200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/api_keys/docs/ListApiKey200Response.md b/rest/api/v3/api_keys/docs/ListApiKey200Response.md new file mode 100644 index 00000000..66bb5c12 --- /dev/null +++ b/rest/api/v3/api_keys/docs/ListApiKey200Response.md @@ -0,0 +1,11 @@ +# ListApiKey200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ApiKeyResponse**](ApiKeyResponse.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/api_keys/docs/UpdateApiKey.md b/rest/api/v3/api_keys/docs/UpdateApiKey.md new file mode 100644 index 00000000..c763c8ac --- /dev/null +++ b/rest/api/v3/api_keys/docs/UpdateApiKey.md @@ -0,0 +1,53 @@ +# UpdateApiKey + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateApiKey**](UpdateApiKey.md#UpdateApiKey) | **Put** /v3/api_keys/{ApiKeyId} | Update API key name and scopes + + + +## UpdateApiKey + +> ApiKeyResponse UpdateApiKey(ctx, ApiKeyIdoptional) + +Update API key name and scopes + +**This endpoint allows you to update the name and scopes of a given API key.** You must pass this endpoint a JSON request body with a `name` field and a `scopes` array containing at least one scope. The `name` and `scopes` fields will be used to update the key associated with the `api_key_id` in the request URL. If you need to update a key's scopes only, pass the `name` field with the key's existing name; the `name` will not be modified. If you need to update a key's name only, use the \"Update API key name\" endpoint. See the [API Key Permissions List](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/authorization) for all available scopes. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ApiKeyId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateApiKeyParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateApiKeyRequest** | [**UpdateApiKeyRequest**](UpdateApiKeyRequest.md) | + +### Return type + +[**ApiKeyResponse**](ApiKeyResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/api_keys/docs/UpdateApiKeyName.md b/rest/api/v3/api_keys/docs/UpdateApiKeyName.md new file mode 100644 index 00000000..84379fe3 --- /dev/null +++ b/rest/api/v3/api_keys/docs/UpdateApiKeyName.md @@ -0,0 +1,53 @@ +# UpdateApiKeyName + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateApiKeyName**](UpdateApiKeyName.md#UpdateApiKeyName) | **Patch** /v3/api_keys/{ApiKeyId} | Update API key name + + + +## UpdateApiKeyName + +> ApiKeyResponse UpdateApiKeyName(ctx, ApiKeyIdoptional) + +Update API key name + +**This endpoint allows you to update the name of an existing API Key.** You must pass this endpoint a JSON request body with a `name` property, which will be used to rename the key associated with the `api_key_id` passed in the URL. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ApiKeyId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateApiKeyNameParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateApiKeyNameRequest** | [**UpdateApiKeyNameRequest**](UpdateApiKeyNameRequest.md) | + +### Return type + +[**ApiKeyResponse**](ApiKeyResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/api_keys/docs/UpdateApiKeyNameRequest.md b/rest/api/v3/api_keys/docs/UpdateApiKeyNameRequest.md new file mode 100644 index 00000000..bf4a4e51 --- /dev/null +++ b/rest/api/v3/api_keys/docs/UpdateApiKeyNameRequest.md @@ -0,0 +1,11 @@ +# UpdateApiKeyNameRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The new name of the API Key. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/api_keys/docs/UpdateApiKeyRequest.md b/rest/api/v3/api_keys/docs/UpdateApiKeyRequest.md new file mode 100644 index 00000000..06c502e3 --- /dev/null +++ b/rest/api/v3/api_keys/docs/UpdateApiKeyRequest.md @@ -0,0 +1,12 @@ +# UpdateApiKeyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Scopes** | **[]string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/api_keys/model_api_key_response.go b/rest/api/v3/api_keys/model_api_key_response.go new file mode 100644 index 00000000..32f2fcf9 --- /dev/null +++ b/rest/api/v3/api_keys/model_api_key_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ApiKeyResponse struct for ApiKeyResponse +type ApiKeyResponse struct { + // The ID of your API Key. + ApiKeyId *string `json:"api_key_id,omitempty"` + // The name of your API Key. + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/api_keys/model_api_key_scopes_response.go b/rest/api/v3/api_keys/model_api_key_scopes_response.go new file mode 100644 index 00000000..25d1c7bc --- /dev/null +++ b/rest/api/v3/api_keys/model_api_key_scopes_response.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ApiKeyScopesResponse struct for ApiKeyScopesResponse +type ApiKeyScopesResponse struct { + // The permissions this API Key has access to. + Scopes *[]string `json:"scopes,omitempty"` + // The ID of your API Key. + ApiKeyId *string `json:"api_key_id,omitempty"` + // The name of your API Key. + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/api_keys/model_create_api_key_201_response.go b/rest/api/v3/api_keys/model_create_api_key_201_response.go new file mode 100644 index 00000000..bd196421 --- /dev/null +++ b/rest/api/v3/api_keys/model_create_api_key_201_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateApiKey201Response struct for CreateApiKey201Response +type CreateApiKey201Response struct { + ApiKey *string `json:"api_key,omitempty"` + ApiKeyId *string `json:"api_key_id,omitempty"` + Name *string `json:"name,omitempty"` + Scopes *[]string `json:"scopes,omitempty"` +} diff --git a/rest/api/v3/api_keys/model_create_api_key_request.go b/rest/api/v3/api_keys/model_create_api_key_request.go new file mode 100644 index 00000000..3185d573 --- /dev/null +++ b/rest/api/v3/api_keys/model_create_api_key_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateApiKeyRequest struct for CreateApiKeyRequest +type CreateApiKeyRequest struct { + // The name you will use to describe this API Key. + Name string `json:"name"` + // The individual permissions that you are giving to this API Key. + Scopes *[]string `json:"scopes,omitempty"` +} diff --git a/rest/api/v3/api_keys/model_error_response.go b/rest/api/v3/api_keys/model_error_response.go new file mode 100644 index 00000000..593ee939 --- /dev/null +++ b/rest/api/v3/api_keys/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/api_keys/model_error_response_errors_inner.go b/rest/api/v3/api_keys/model_error_response_errors_inner.go new file mode 100644 index 00000000..909b9fc2 --- /dev/null +++ b/rest/api/v3/api_keys/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/api_keys/model_get_api_key_200_response.go b/rest/api/v3/api_keys/model_get_api_key_200_response.go new file mode 100644 index 00000000..72056608 --- /dev/null +++ b/rest/api/v3/api_keys/model_get_api_key_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetApiKey200Response struct for GetApiKey200Response +type GetApiKey200Response struct { + Result *[]ApiKeyScopesResponse `json:"result,omitempty"` +} diff --git a/rest/api/v3/api_keys/model_list_api_key_200_response.go b/rest/api/v3/api_keys/model_list_api_key_200_response.go new file mode 100644 index 00000000..06fb1c13 --- /dev/null +++ b/rest/api/v3/api_keys/model_list_api_key_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListApiKey200Response struct for ListApiKey200Response +type ListApiKey200Response struct { + Result *[]ApiKeyResponse `json:"result,omitempty"` +} diff --git a/rest/api/v3/api_keys/model_update_api_key_name_request.go b/rest/api/v3/api_keys/model_update_api_key_name_request.go new file mode 100644 index 00000000..6b90e1a1 --- /dev/null +++ b/rest/api/v3/api_keys/model_update_api_key_name_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateApiKeyNameRequest struct for UpdateApiKeyNameRequest +type UpdateApiKeyNameRequest struct { + // The new name of the API Key. + Name string `json:"name"` +} diff --git a/rest/api/v3/api_keys/model_update_api_key_request.go b/rest/api/v3/api_keys/model_update_api_key_request.go new file mode 100644 index 00000000..303efc75 --- /dev/null +++ b/rest/api/v3/api_keys/model_update_api_key_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateApiKeyRequest struct for UpdateApiKeyRequest +type UpdateApiKeyRequest struct { + Name string `json:"name"` + Scopes *[]string `json:"scopes,omitempty"` +} diff --git a/rest/api/v3/domain_authentication/.openapi-generator b/rest/api/v3/domain_authentication/.openapi-generator new file mode 100644 index 00000000..dfdb5d90 --- /dev/null +++ b/rest/api/v3/domain_authentication/.openapi-generator @@ -0,0 +1,86 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_add_ip_to_authenticated_domain.go +api_associate_subuser_with_domain.go +api_associate_subuser_with_domain_multiple.go +api_authenticate_domain.go +api_delete_authenticated_domain.go +api_delete_ip_from_authenticated_domain.go +api_disassociate_authenticated_domain_from_user.go +api_disassociate_subuser_from_domain.go +api_email_dns_record.go +api_get_authenticated_domain.go +api_list_all_authenticated_domain_with_user.go +api_list_authenticated_domain.go +api_list_authenticated_domain_with_user.go +api_list_default_authenticated_domain.go +api_service.go +api_update_authenticated_domain.go +api_validate_authenticated_domain.go +docs/AddIpToAuthenticatedDomain.md +docs/AddIpToAuthenticatedDomainRequest.md +docs/AssociateSubuserWithDomain.md +docs/AssociateSubuserWithDomainMultiple.md +docs/AssociateSubuserWithDomainRequest.md +docs/AuthenticateDomain.md +docs/AuthenticateDomainRequest.md +docs/AuthenticatedDomain.md +docs/AuthenticatedDomainSpf.md +docs/AuthenticatedDomainSpfDns.md +docs/AuthenticatedDomainSpfDnsDkim.md +docs/AuthenticatedDomainSpfDnsDomainSpf.md +docs/AuthenticatedDomainSpfDnsMailServer.md +docs/AuthenticatedDomainSpfDnsSubdomainSpf.md +docs/DeleteAuthenticatedDomain.md +docs/DeleteIpFromAuthenticatedDomain.md +docs/DisassociateAuthenticatedDomainFromUser.md +docs/DisassociateSubuserFromDomain.md +docs/EmailDnsRecord.md +docs/EmailDnsRecord400Response.md +docs/EmailDnsRecord400ResponseErrors.md +docs/EmailDnsRecordRequest.md +docs/GetAuthenticatedDomain.md +docs/ListAllAuthenticatedDomainWithUser.md +docs/ListAllAuthenticatedDomainWithUser200ResponseInner.md +docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDns.md +docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1.md +docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname.md +docs/ListAuthenticatedDomain.md +docs/ListAuthenticatedDomainWithUser.md +docs/ListDefaultAuthenticatedDomain.md +docs/UpdateAuthenticatedDomain.md +docs/UpdateAuthenticatedDomainRequest.md +docs/ValidateAuthenticatedDomain.md +docs/ValidateAuthenticatedDomain200Response.md +docs/ValidateAuthenticatedDomain200ResponseValidationResults.md +docs/ValidateAuthenticatedDomain200ResponseValidationResultsDkim1.md +docs/ValidateAuthenticatedDomain200ResponseValidationResultsMailCname.md +docs/ValidateAuthenticatedDomain200ResponseValidationResultsSpf.md +docs/ValidateAuthenticatedDomain500Response.md +docs/ValidateAuthenticatedDomain500ResponseErrorsInner.md +model_add_ip_to_authenticated_domain_request.go +model_associate_subuser_with_domain_request.go +model_authenticate_domain_request.go +model_authenticated_domain.go +model_authenticated_domain_spf.go +model_authenticated_domain_spf_dns.go +model_authenticated_domain_spf_dns_dkim.go +model_authenticated_domain_spf_dns_domain_spf.go +model_authenticated_domain_spf_dns_mail_server.go +model_authenticated_domain_spf_dns_subdomain_spf.go +model_email_dns_record_400_response.go +model_email_dns_record_400_response_errors.go +model_email_dns_record_request.go +model_list_all_authenticated_domain_with_user_200_response_inner.go +model_list_all_authenticated_domain_with_user_200_response_inner_dns.go +model_list_all_authenticated_domain_with_user_200_response_inner_dns_dkim1.go +model_list_all_authenticated_domain_with_user_200_response_inner_dns_mail_cname.go +model_update_authenticated_domain_request.go +model_validate_authenticated_domain_200_response.go +model_validate_authenticated_domain_200_response_validation_results.go +model_validate_authenticated_domain_200_response_validation_results_dkim1.go +model_validate_authenticated_domain_200_response_validation_results_mail_cname.go +model_validate_authenticated_domain_200_response_validation_results_spf.go +model_validate_authenticated_domain_500_response.go +model_validate_authenticated_domain_500_response_errors_inner.go diff --git a/rest/api/v3/domain_authentication/.openapi-generator-ignore b/rest/api/v3/domain_authentication/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/domain_authentication/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/domain_authentication/README.md b/rest/api/v3/domain_authentication/README.md new file mode 100644 index 00000000..464525b5 --- /dev/null +++ b/rest/api/v3/domain_authentication/README.md @@ -0,0 +1,103 @@ +# Go API client for + +The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. + +Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). + +Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:43.542993+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AddIpToAuthenticatedDomain* | [**AddIpToAuthenticatedDomain**](docs/AddIpToAuthenticatedDomain.md#addiptoauthenticateddomain) | **Post** /v3/whitelabel/domains/{Id}/ips | Add an IP to an authenticated domain +*AssociateSubuserWithDomain* | [**AssociateSubuserWithDomain**](docs/AssociateSubuserWithDomain.md#associatesubuserwithdomain) | **Post** /v3/whitelabel/domains/{DomainId}/subuser | Associate an authenticated domain with a given user. +*AssociateSubuserWithDomainMultiple* | [**AssociateSubuserWithDomainMultiple**](docs/AssociateSubuserWithDomainMultiple.md#associatesubuserwithdomainmultiple) | **Post** /v3/whitelabel/domains/{DomainId}/subuser:add | Associate an authenticated domain with a given user, for up to five domains. +*AuthenticateDomain* | [**AuthenticateDomain**](docs/AuthenticateDomain.md#authenticatedomain) | **Post** /v3/whitelabel/domains | Authenticate a domain +*DeleteAuthenticatedDomain* | [**DeleteAuthenticatedDomain**](docs/DeleteAuthenticatedDomain.md#deleteauthenticateddomain) | **Delete** /v3/whitelabel/domains/{DomainId} | Delete an authenticated domain. +*DeleteIpFromAuthenticatedDomain* | [**DeleteIpFromAuthenticatedDomain**](docs/DeleteIpFromAuthenticatedDomain.md#deleteipfromauthenticateddomain) | **Delete** /v3/whitelabel/domains/{Id}/ips/{Ip} | Remove an IP from an authenticated domain. +*DisassociateAuthenticatedDomainFromUser* | [**DisassociateAuthenticatedDomainFromUser**](docs/DisassociateAuthenticatedDomainFromUser.md#disassociateauthenticateddomainfromuser) | **Delete** /v3/whitelabel/domains/subuser | Disassociate an authenticated domain from a given user. +*DisassociateSubuserFromDomain* | [**DisassociateSubuserFromDomain**](docs/DisassociateSubuserFromDomain.md#disassociatesubuserfromdomain) | **Delete** /v3/whitelabel/domains/{DomainId}/subuser | Disassociate an authenticated domain from a given user for users with up to five associated domains. +*EmailDnsRecord* | [**EmailDnsRecord**](docs/EmailDnsRecord.md#emaildnsrecord) | **Post** /v3/whitelabel/dns/email | Email DNS records to a co-worker +*GetAuthenticatedDomain* | [**GetAuthenticatedDomain**](docs/GetAuthenticatedDomain.md#getauthenticateddomain) | **Get** /v3/whitelabel/domains/{DomainId} | Retrieve an authenticated domain +*ListAllAuthenticatedDomainWithUser* | [**ListAllAuthenticatedDomainWithUser**](docs/ListAllAuthenticatedDomainWithUser.md#listallauthenticateddomainwithuser) | **Get** /v3/whitelabel/domains/subuser/all | List all the authenticated domains associated with the given user. +*ListAuthenticatedDomain* | [**ListAuthenticatedDomain**](docs/ListAuthenticatedDomain.md#listauthenticateddomain) | **Get** /v3/whitelabel/domains | List all authenticated domains +*ListAuthenticatedDomainWithUser* | [**ListAuthenticatedDomainWithUser**](docs/ListAuthenticatedDomainWithUser.md#listauthenticateddomainwithuser) | **Get** /v3/whitelabel/domains/subuser | List the authenticated domain associated with the given user. +*ListDefaultAuthenticatedDomain* | [**ListDefaultAuthenticatedDomain**](docs/ListDefaultAuthenticatedDomain.md#listdefaultauthenticateddomain) | **Get** /v3/whitelabel/domains/default | Get the default authentication +*UpdateAuthenticatedDomain* | [**UpdateAuthenticatedDomain**](docs/UpdateAuthenticatedDomain.md#updateauthenticateddomain) | **Patch** /v3/whitelabel/domains/{DomainId} | Update an authenticated domain +*ValidateAuthenticatedDomain* | [**ValidateAuthenticatedDomain**](docs/ValidateAuthenticatedDomain.md#validateauthenticateddomain) | **Post** /v3/whitelabel/domains/{Id}/validate | Validate a domain authentication. + + +## Documentation For Models + + - [AddIpToAuthenticatedDomainRequest](AddIpToAuthenticatedDomainRequest.md) + - [AssociateSubuserWithDomainRequest](AssociateSubuserWithDomainRequest.md) + - [AuthenticateDomainRequest](AuthenticateDomainRequest.md) + - [AuthenticatedDomain](AuthenticatedDomain.md) + - [AuthenticatedDomainSpf](AuthenticatedDomainSpf.md) + - [AuthenticatedDomainSpfDns](AuthenticatedDomainSpfDns.md) + - [AuthenticatedDomainSpfDnsDkim](AuthenticatedDomainSpfDnsDkim.md) + - [AuthenticatedDomainSpfDnsDomainSpf](AuthenticatedDomainSpfDnsDomainSpf.md) + - [AuthenticatedDomainSpfDnsMailServer](AuthenticatedDomainSpfDnsMailServer.md) + - [AuthenticatedDomainSpfDnsSubdomainSpf](AuthenticatedDomainSpfDnsSubdomainSpf.md) + - [EmailDnsRecord400Response](EmailDnsRecord400Response.md) + - [EmailDnsRecord400ResponseErrors](EmailDnsRecord400ResponseErrors.md) + - [EmailDnsRecordRequest](EmailDnsRecordRequest.md) + - [ListAllAuthenticatedDomainWithUser200ResponseInner](ListAllAuthenticatedDomainWithUser200ResponseInner.md) + - [ListAllAuthenticatedDomainWithUser200ResponseInnerDns](ListAllAuthenticatedDomainWithUser200ResponseInnerDns.md) + - [ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1](ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1.md) + - [ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname](ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname.md) + - [UpdateAuthenticatedDomainRequest](UpdateAuthenticatedDomainRequest.md) + - [ValidateAuthenticatedDomain200Response](ValidateAuthenticatedDomain200Response.md) + - [ValidateAuthenticatedDomain200ResponseValidationResults](ValidateAuthenticatedDomain200ResponseValidationResults.md) + - [ValidateAuthenticatedDomain200ResponseValidationResultsDkim1](ValidateAuthenticatedDomain200ResponseValidationResultsDkim1.md) + - [ValidateAuthenticatedDomain200ResponseValidationResultsMailCname](ValidateAuthenticatedDomain200ResponseValidationResultsMailCname.md) + - [ValidateAuthenticatedDomain200ResponseValidationResultsSpf](ValidateAuthenticatedDomain200ResponseValidationResultsSpf.md) + - [ValidateAuthenticatedDomain500Response](ValidateAuthenticatedDomain500Response.md) + - [ValidateAuthenticatedDomain500ResponseErrorsInner](ValidateAuthenticatedDomain500ResponseErrorsInner.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/domain_authentication/api_add_ip_to_authenticated_domain.go b/rest/api/v3/domain_authentication/api_add_ip_to_authenticated_domain.go new file mode 100644 index 00000000..ed9f553c --- /dev/null +++ b/rest/api/v3/domain_authentication/api_add_ip_to_authenticated_domain.go @@ -0,0 +1,85 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type AddIpToAuthenticatedDomainParam struct { + // ID of the domain to which you are adding an IP + Id *int32 `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + AddIpToAuthenticatedDomainRequest *AddIpToAuthenticatedDomainRequest `json:"AddIpToAuthenticatedDomainRequest,omitempty"` +} + +func (params *AddIpToAuthenticatedDomainParam) SetId(Id int32) *AddIpToAuthenticatedDomainParam { + params.Id = &Id + return params +} +func (params *AddIpToAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *AddIpToAuthenticatedDomainParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *AddIpToAuthenticatedDomainParam) SetAddIpToAuthenticatedDomainRequest(AddIpToAuthenticatedDomainRequest AddIpToAuthenticatedDomainRequest) *AddIpToAuthenticatedDomainParam { + params.AddIpToAuthenticatedDomainRequest = &AddIpToAuthenticatedDomainRequest + return params +} + +// **This endpoint allows you to add an IP address to an authenticated domain.** +func (c *ApiService) AddIpToAuthenticatedDomain(params *AddIpToAuthenticatedDomainParam) (interface{}, error) { + path := "/v3/whitelabel/domains/{Id}/ips" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.AddIpToAuthenticatedDomainRequest != nil { + b, err := json.Marshal(*params.AddIpToAuthenticatedDomainRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AuthenticatedDomainSpf{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/domain_authentication/api_associate_subuser_with_domain.go b/rest/api/v3/domain_authentication/api_associate_subuser_with_domain.go new file mode 100644 index 00000000..4ad4d29e --- /dev/null +++ b/rest/api/v3/domain_authentication/api_associate_subuser_with_domain.go @@ -0,0 +1,76 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type AssociateSubuserWithDomainParam struct { + // ID of the authenticated domain to associate with the subuser. + DomainId *int32 `json:"domain_id"` + // + AssociateSubuserWithDomainRequest *AssociateSubuserWithDomainRequest `json:"AssociateSubuserWithDomainRequest,omitempty"` +} + +func (params *AssociateSubuserWithDomainParam) SetDomainId(DomainId int32) *AssociateSubuserWithDomainParam { + params.DomainId = &DomainId + return params +} +func (params *AssociateSubuserWithDomainParam) SetAssociateSubuserWithDomainRequest(AssociateSubuserWithDomainRequest AssociateSubuserWithDomainRequest) *AssociateSubuserWithDomainParam { + params.AssociateSubuserWithDomainRequest = &AssociateSubuserWithDomainRequest + return params +} + +// **This endpoint allows you to associate a specific authenticated domain with a subuser.** Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent's domain. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. [You can associate more than one domain with a subuser using the `v3/whitelabel/domains/{domain_id}/subuser:add` endpoint](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/associate-an-authenticated-domain-with-a-subuser-multiple). +func (c *ApiService) AssociateSubuserWithDomain(params *AssociateSubuserWithDomainParam) (interface{}, error) { + path := "/v3/whitelabel/domains/{DomainId}/subuser" + if params != nil && params.DomainId != nil { + path = strings.Replace(path, "{"+"DomainId"+"}", fmt.Sprint(*params.DomainId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.AssociateSubuserWithDomainRequest != nil { + b, err := json.Marshal(*params.AssociateSubuserWithDomainRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &AuthenticatedDomainSpf{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/domain_authentication/api_associate_subuser_with_domain_multiple.go b/rest/api/v3/domain_authentication/api_associate_subuser_with_domain_multiple.go new file mode 100644 index 00000000..a2c7706f --- /dev/null +++ b/rest/api/v3/domain_authentication/api_associate_subuser_with_domain_multiple.go @@ -0,0 +1,76 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type AssociateSubuserWithDomainMultipleParam struct { + // ID of the authenticated domain to associate with the subuser. + DomainId *int32 `json:"domain_id"` + // + AssociateSubuserWithDomainRequest *AssociateSubuserWithDomainRequest `json:"AssociateSubuserWithDomainRequest,omitempty"` +} + +func (params *AssociateSubuserWithDomainMultipleParam) SetDomainId(DomainId int32) *AssociateSubuserWithDomainMultipleParam { + params.DomainId = &DomainId + return params +} +func (params *AssociateSubuserWithDomainMultipleParam) SetAssociateSubuserWithDomainRequest(AssociateSubuserWithDomainRequest AssociateSubuserWithDomainRequest) *AssociateSubuserWithDomainMultipleParam { + params.AssociateSubuserWithDomainRequest = &AssociateSubuserWithDomainRequest + return params +} + +// **This endpoint allows you to associate a specific authenticated domain with a subuser. It can be used to associate up to five authenticated domains.** This functionality allows subusers to send mail using their parent's domain. Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. A subuser can have up to five associated authenticated domains. To see the domains that have already been associated with this user, you can [use the API to list the domains currently associated with the subuser](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/list-the-authenticated-domain-associated-with-a-subuser-multiple). When selecting a domain to send email from, SendGrid checks for domains in the following order and chooses the first one that appears in the hierarchy: 1. Domain assigned by the subuser that matches the email's `From` address domain. 2. The subuser's default domain. 3. Domain assigned by the parent user that matches the `From` address domain. 4. Parent user's default domain. 5. sendgrid.net +func (c *ApiService) AssociateSubuserWithDomainMultiple(params *AssociateSubuserWithDomainMultipleParam) (interface{}, error) { + path := "/v3/whitelabel/domains/{DomainId}/subuser:add" + if params != nil && params.DomainId != nil { + path = strings.Replace(path, "{"+"DomainId"+"}", fmt.Sprint(*params.DomainId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.AssociateSubuserWithDomainRequest != nil { + b, err := json.Marshal(*params.AssociateSubuserWithDomainRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &AuthenticatedDomainSpf{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/domain_authentication/api_authenticate_domain.go b/rest/api/v3/domain_authentication/api_authenticate_domain.go new file mode 100644 index 00000000..394ef926 --- /dev/null +++ b/rest/api/v3/domain_authentication/api_authenticate_domain.go @@ -0,0 +1,73 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type AuthenticateDomainParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + AuthenticateDomainRequest *AuthenticateDomainRequest `json:"AuthenticateDomainRequest,omitempty"` +} + +func (params *AuthenticateDomainParam) SetOnbehalfof(Onbehalfof string) *AuthenticateDomainParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *AuthenticateDomainParam) SetAuthenticateDomainRequest(AuthenticateDomainRequest AuthenticateDomainRequest) *AuthenticateDomainParam { + params.AuthenticateDomainRequest = &AuthenticateDomainRequest + return params +} + +// **This endpoint allows you to authenticate a domain.** If you are authenticating a domain for a subuser, you have two options: 1. Use the \"username\" parameter. This allows you to authenticate a domain on behalf of your subuser. This means the subuser is able to see and modify the authenticated domain. 2. Use the Association workflow (see Associate Domain section). This allows you to authenticate a domain created by the parent to a subuser. This means the subuser will default to the assigned domain, but will not be able to see or modify that authenticated domain. However, if the subuser authenticates their own domain it will overwrite the assigned domain. +func (c *ApiService) AuthenticateDomain(params *AuthenticateDomainParam) (interface{}, error) { + path := "/v3/whitelabel/domains" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.AuthenticateDomainRequest != nil { + b, err := json.Marshal(*params.AuthenticateDomainRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &AuthenticatedDomain{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/domain_authentication/api_delete_authenticated_domain.go b/rest/api/v3/domain_authentication/api_delete_authenticated_domain.go new file mode 100644 index 00000000..9c22693b --- /dev/null +++ b/rest/api/v3/domain_authentication/api_delete_authenticated_domain.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DeleteAuthenticatedDomainParam struct { + // + DomainId *string `json:"domain_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteAuthenticatedDomainParam) SetDomainId(DomainId string) *DeleteAuthenticatedDomainParam { + params.DomainId = &DomainId + return params +} +func (params *DeleteAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *DeleteAuthenticatedDomainParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete an authenticated domain.** +func (c *ApiService) DeleteAuthenticatedDomain(params *DeleteAuthenticatedDomainParam) (interface{}, error) { + path := "/v3/whitelabel/domains/{DomainId}" + if params != nil && params.DomainId != nil { + path = strings.Replace(path, "{"+"DomainId"+"}", *params.DomainId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/domain_authentication/api_delete_ip_from_authenticated_domain.go b/rest/api/v3/domain_authentication/api_delete_ip_from_authenticated_domain.go new file mode 100644 index 00000000..6ae7453f --- /dev/null +++ b/rest/api/v3/domain_authentication/api_delete_ip_from_authenticated_domain.go @@ -0,0 +1,79 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type DeleteIpFromAuthenticatedDomainParam struct { + // ID of the domain to delete the IP from. + Id *int32 `json:"id"` + // IP to remove from the domain. + Ip *string `json:"ip"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteIpFromAuthenticatedDomainParam) SetId(Id int32) *DeleteIpFromAuthenticatedDomainParam { + params.Id = &Id + return params +} +func (params *DeleteIpFromAuthenticatedDomainParam) SetIp(Ip string) *DeleteIpFromAuthenticatedDomainParam { + params.Ip = &Ip + return params +} +func (params *DeleteIpFromAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *DeleteIpFromAuthenticatedDomainParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to remove an IP address from that domain's authentication.** +func (c *ApiService) DeleteIpFromAuthenticatedDomain(params *DeleteIpFromAuthenticatedDomainParam) (interface{}, error) { + path := "/v3/whitelabel/domains/{Id}/ips/{Ip}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) + } + if params != nil && params.Ip != nil { + path = strings.Replace(path, "{"+"Ip"+"}", *params.Ip, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AuthenticatedDomainSpf{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/domain_authentication/api_disassociate_authenticated_domain_from_user.go b/rest/api/v3/domain_authentication/api_disassociate_authenticated_domain_from_user.go new file mode 100644 index 00000000..8b814581 --- /dev/null +++ b/rest/api/v3/domain_authentication/api_disassociate_authenticated_domain_from_user.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type DisassociateAuthenticatedDomainFromUserParam struct { + // Username for the subuser to find associated authenticated domain. + Username *string `json:"username,omitempty"` +} + +func (params *DisassociateAuthenticatedDomainFromUserParam) SetUsername(Username string) *DisassociateAuthenticatedDomainFromUserParam { + params.Username = &Username + return params +} + +// **This endpoint allows you to disassociate a specific authenticated domain from a subuser.** Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent's domain. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. Note that if you used the [`/v3/whitelabel/domains/{domain_id}/subuser:add` endpoint](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/associate-an-authenticated-domain-with-a-subuser-multiple) to add multiple domains to the subuser, you should use the [`/v3/whitelabel/domains/{domain_id}/subuser` endpoint](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/disassociate-an-authenticated-domain-from-a-subuser-multiple) to disassociate those domains. +func (c *ApiService) DisassociateAuthenticatedDomainFromUser(params *DisassociateAuthenticatedDomainFromUserParam) (interface{}, error) { + path := "/v3/whitelabel/domains/subuser" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Username != nil { + data.Set("username", *params.Username) + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/domain_authentication/api_disassociate_subuser_from_domain.go b/rest/api/v3/domain_authentication/api_disassociate_subuser_from_domain.go new file mode 100644 index 00000000..706777aa --- /dev/null +++ b/rest/api/v3/domain_authentication/api_disassociate_subuser_from_domain.go @@ -0,0 +1,71 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type DisassociateSubuserFromDomainParam struct { + // ID of the authenticated domain to be disassociated with the subuser. + DomainId *int32 `json:"domain_id"` + // Username for the subuser to find associated authenticated domain. + Username *string `json:"username,omitempty"` +} + +func (params *DisassociateSubuserFromDomainParam) SetDomainId(DomainId int32) *DisassociateSubuserFromDomainParam { + params.DomainId = &DomainId + return params +} +func (params *DisassociateSubuserFromDomainParam) SetUsername(Username string) *DisassociateSubuserFromDomainParam { + params.Username = &Username + return params +} + +// **This endpoint allows you to disassociate a specific authenticated domain from a subuser, for users with up to five associated domains.** This functionality allows subusers to send mail using their parent's domain. Authenticated domains can be associated with (i.e. assigned to) subusers kknt, and a subuser can have up to five associated authenticated domains. You can dissociate an authenticated domain from any subuser that has one or more authenticated domains using this endpoint. +func (c *ApiService) DisassociateSubuserFromDomain(params *DisassociateSubuserFromDomainParam) (interface{}, error) { + path := "/v3/whitelabel/domains/{DomainId}/subuser" + if params != nil && params.DomainId != nil { + path = strings.Replace(path, "{"+"DomainId"+"}", fmt.Sprint(*params.DomainId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Username != nil { + data.Set("username", *params.Username) + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/domain_authentication/api_email_dns_record.go b/rest/api/v3/domain_authentication/api_email_dns_record.go new file mode 100644 index 00000000..044f297a --- /dev/null +++ b/rest/api/v3/domain_authentication/api_email_dns_record.go @@ -0,0 +1,64 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type EmailDnsRecordParam struct { + // + EmailDnsRecordRequest *EmailDnsRecordRequest `json:"EmailDnsRecordRequest,omitempty"` +} + +func (params *EmailDnsRecordParam) SetEmailDnsRecordRequest(EmailDnsRecordRequest EmailDnsRecordRequest) *EmailDnsRecordParam { + params.EmailDnsRecordRequest = &EmailDnsRecordRequest + return params +} + +// **This endpoint is used to share DNS records with a colleagues** Use this endpoint to send SendGrid-generated DNS record information to a co-worker so they can enter it into your DNS provider to validate your domain and link branding. What type of records are sent will depend on whether you have chosen Automated Security or not. When using Automated Security, SendGrid provides you with three CNAME records. If you turn Automated Security off, you are instead given TXT and MX records. If you pass a `link_id` to this endpoint, the generated email will supply the DNS records necessary to complete [Link Branding](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) setup. If you pass a `domain_id` to this endpoint, the generated email will supply the DNS records needed to complete [Domain Authentication](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Passing both IDs will generate an email with the records needed to complete both setup steps. You can retrieve all your domain IDs from the returned `id` fields for each domain using the \"List all authenticated domains\" endpoint. You can retrieve all of your link IDs using the \"Retrieve all branded links\" endpoint. +func (c *ApiService) EmailDnsRecord(params *EmailDnsRecordParam) (interface{}, error) { + path := "/v3/whitelabel/dns/email" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.EmailDnsRecordRequest != nil { + b, err := json.Marshal(*params.EmailDnsRecordRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &EmailDnsRecord400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/domain_authentication/api_get_authenticated_domain.go b/rest/api/v3/domain_authentication/api_get_authenticated_domain.go new file mode 100644 index 00000000..c2c0d5f1 --- /dev/null +++ b/rest/api/v3/domain_authentication/api_get_authenticated_domain.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type GetAuthenticatedDomainParam struct { + // + DomainId *string `json:"domain_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetAuthenticatedDomainParam) SetDomainId(DomainId string) *GetAuthenticatedDomainParam { + params.DomainId = &DomainId + return params +} +func (params *GetAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *GetAuthenticatedDomainParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a specific authenticated domain.** +func (c *ApiService) GetAuthenticatedDomain(params *GetAuthenticatedDomainParam) (interface{}, error) { + path := "/v3/whitelabel/domains/{DomainId}" + if params != nil && params.DomainId != nil { + path = strings.Replace(path, "{"+"DomainId"+"}", *params.DomainId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AuthenticatedDomain{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/domain_authentication/api_list_all_authenticated_domain_with_user.go b/rest/api/v3/domain_authentication/api_list_all_authenticated_domain_with_user.go new file mode 100644 index 00000000..9a54f824 --- /dev/null +++ b/rest/api/v3/domain_authentication/api_list_all_authenticated_domain_with_user.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListAllAuthenticatedDomainWithUserParam struct { + // Username for the subuser to find associated authenticated domains. + Username *string `json:"username"` +} + +func (params *ListAllAuthenticatedDomainWithUserParam) SetUsername(Username string) *ListAllAuthenticatedDomainWithUserParam { + params.Username = &Username + return params +} + +// **This endpoint allows you to retrieve all of the authenticated domains that have been assigned to a specific subuser.** This functionality allows subusers to send mail using their parent's domain. Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account, and a subuser can have up to five associated domains. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. When selecting a domain to send email from, SendGrid checks for domains in the following order and chooses the first one that appears in the hierarchy: 1. Domain assigned by the subuser that matches the email's `From` address domain. 2. The subuser's default domain. 3. Domain assigned by the parent user that matches the `From` address domain. 4. Parent user's default domain. 5. sendgrid.net +func (c *ApiService) ListAllAuthenticatedDomainWithUser(params *ListAllAuthenticatedDomainWithUserParam) (interface{}, error) { + path := "/v3/whitelabel/domains/subuser/all" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Username != nil { + data.Set("username", *params.Username) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListAllAuthenticatedDomainWithUser200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/domain_authentication/api_list_authenticated_domain.go b/rest/api/v3/domain_authentication/api_list_authenticated_domain.go new file mode 100644 index 00000000..58604ba7 --- /dev/null +++ b/rest/api/v3/domain_authentication/api_list_authenticated_domain.go @@ -0,0 +1,105 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListAuthenticatedDomainParam struct { + // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. + Limit *int32 `json:"limit,omitempty"` + // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + Offset *int32 `json:"offset,omitempty"` + // Exclude subuser domains from the result. + ExcludeSubusers *bool `json:"exclude_subusers,omitempty"` + // The username associated with an authenticated domain. + Username *string `json:"username,omitempty"` + // Search for authenticated domains. + Domain *string `json:"domain,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListAuthenticatedDomainParam) SetLimit(Limit int32) *ListAuthenticatedDomainParam { + params.Limit = &Limit + return params +} +func (params *ListAuthenticatedDomainParam) SetOffset(Offset int32) *ListAuthenticatedDomainParam { + params.Offset = &Offset + return params +} +func (params *ListAuthenticatedDomainParam) SetExcludeSubusers(ExcludeSubusers bool) *ListAuthenticatedDomainParam { + params.ExcludeSubusers = &ExcludeSubusers + return params +} +func (params *ListAuthenticatedDomainParam) SetUsername(Username string) *ListAuthenticatedDomainParam { + params.Username = &Username + return params +} +func (params *ListAuthenticatedDomainParam) SetDomain(Domain string) *ListAuthenticatedDomainParam { + params.Domain = &Domain + return params +} +func (params *ListAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *ListAuthenticatedDomainParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a paginated list of all domains you have authenticated.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. +func (c *ApiService) ListAuthenticatedDomain(params *ListAuthenticatedDomainParam) (interface{}, error) { + path := "/v3/whitelabel/domains" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + if params != nil && params.ExcludeSubusers != nil { + data.Set("exclude_subusers", fmt.Sprint(*params.ExcludeSubusers)) + } + if params != nil && params.Username != nil { + data.Set("username", *params.Username) + } + if params != nil && params.Domain != nil { + data.Set("domain", *params.Domain) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/domain_authentication/api_list_authenticated_domain_with_user.go b/rest/api/v3/domain_authentication/api_list_authenticated_domain_with_user.go new file mode 100644 index 00000000..03476a2f --- /dev/null +++ b/rest/api/v3/domain_authentication/api_list_authenticated_domain_with_user.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListAuthenticatedDomainWithUserParam struct { + // Username for the subuser to find associated authenticated domain. + Username *string `json:"username"` +} + +func (params *ListAuthenticatedDomainWithUserParam) SetUsername(Username string) *ListAuthenticatedDomainWithUserParam { + params.Username = &Username + return params +} + +// **This endpoint allows you to retrieve all of the authenticated domains that have been assigned to a specific subuser.** Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent's domain. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. Note that if you used the [`/v3/whitelabel/domains/{domain_id}/subuser:add` endpoint]( https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/associate-an-authenticated-domain-with-a-subuser-multiple) to add multiple domains to the subuser, you can use the [`/v3/whitelabel/domains/subuser/all` endpoint](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/list-the-authenticated-domain-associated-with-a-subuser-multiple) to list those associated domains. +func (c *ApiService) ListAuthenticatedDomainWithUser(params *ListAuthenticatedDomainWithUserParam) (interface{}, error) { + path := "/v3/whitelabel/domains/subuser" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Username != nil { + data.Set("username", *params.Username) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AuthenticatedDomainSpf{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/domain_authentication/api_list_default_authenticated_domain.go b/rest/api/v3/domain_authentication/api_list_default_authenticated_domain.go new file mode 100644 index 00000000..4f2cfef6 --- /dev/null +++ b/rest/api/v3/domain_authentication/api_list_default_authenticated_domain.go @@ -0,0 +1,68 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListDefaultAuthenticatedDomainParam struct { + // The domain to find a default authentication. + Domain *string `json:"domain,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListDefaultAuthenticatedDomainParam) SetDomain(Domain string) *ListDefaultAuthenticatedDomainParam { + params.Domain = &Domain + return params +} +func (params *ListDefaultAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *ListDefaultAuthenticatedDomainParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve the default authentication for a domain.** When creating or updating a domain authentication, you can set the domain as a default. The default domain will be used to send all mail. If you have multiple authenticated domains, the authenticated domain matching the domain of the From address will be used, and the default will be overridden. This endpoint will return a default domain and its details only if a default is set. You are not required to set a default. If you do not set a default domain, this endpoint will return general information about your domain authentication status. +func (c *ApiService) ListDefaultAuthenticatedDomain(params *ListDefaultAuthenticatedDomainParam) (interface{}, error) { + path := "/v3/whitelabel/domains/default" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Domain != nil { + data.Set("domain", *params.Domain) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/domain_authentication/api_service.go b/rest/api/v3/domain_authentication/api_service.go new file mode 100644 index 00000000..bfe66aff --- /dev/null +++ b/rest/api/v3/domain_authentication/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/domain_authentication/api_update_authenticated_domain.go b/rest/api/v3/domain_authentication/api_update_authenticated_domain.go new file mode 100644 index 00000000..2f4483f9 --- /dev/null +++ b/rest/api/v3/domain_authentication/api_update_authenticated_domain.go @@ -0,0 +1,84 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type UpdateAuthenticatedDomainParam struct { + // + DomainId *string `json:"domain_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateAuthenticatedDomainRequest *UpdateAuthenticatedDomainRequest `json:"UpdateAuthenticatedDomainRequest,omitempty"` +} + +func (params *UpdateAuthenticatedDomainParam) SetDomainId(DomainId string) *UpdateAuthenticatedDomainParam { + params.DomainId = &DomainId + return params +} +func (params *UpdateAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *UpdateAuthenticatedDomainParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateAuthenticatedDomainParam) SetUpdateAuthenticatedDomainRequest(UpdateAuthenticatedDomainRequest UpdateAuthenticatedDomainRequest) *UpdateAuthenticatedDomainParam { + params.UpdateAuthenticatedDomainRequest = &UpdateAuthenticatedDomainRequest + return params +} + +// **This endpoint allows you to update the settings for an authenticated domain.** +func (c *ApiService) UpdateAuthenticatedDomain(params *UpdateAuthenticatedDomainParam) (interface{}, error) { + path := "/v3/whitelabel/domains/{DomainId}" + if params != nil && params.DomainId != nil { + path = strings.Replace(path, "{"+"DomainId"+"}", *params.DomainId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateAuthenticatedDomainRequest != nil { + b, err := json.Marshal(*params.UpdateAuthenticatedDomainRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/domain_authentication/api_validate_authenticated_domain.go b/rest/api/v3/domain_authentication/api_validate_authenticated_domain.go new file mode 100644 index 00000000..7317b99c --- /dev/null +++ b/rest/api/v3/domain_authentication/api_validate_authenticated_domain.go @@ -0,0 +1,78 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type ValidateAuthenticatedDomainParam struct { + // ID of the domain to validate. + Id *int32 `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ValidateAuthenticatedDomainParam) SetId(Id int32) *ValidateAuthenticatedDomainParam { + params.Id = &Id + return params +} +func (params *ValidateAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *ValidateAuthenticatedDomainParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to validate an authenticated domain. If it fails, it will return an error message describing why the domain could not be validated.** +func (c *ApiService) ValidateAuthenticatedDomain(params *ValidateAuthenticatedDomainParam) (interface{}, error) { + path := "/v3/whitelabel/domains/{Id}/validate" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ValidateAuthenticatedDomain200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ValidateAuthenticatedDomain500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/domain_authentication/docs/AddIpToAuthenticatedDomain.md b/rest/api/v3/domain_authentication/docs/AddIpToAuthenticatedDomain.md new file mode 100644 index 00000000..cc716fea --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/AddIpToAuthenticatedDomain.md @@ -0,0 +1,53 @@ +# AddIpToAuthenticatedDomain + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddIpToAuthenticatedDomain**](AddIpToAuthenticatedDomain.md#AddIpToAuthenticatedDomain) | **Post** /v3/whitelabel/domains/{Id}/ips | Add an IP to an authenticated domain + + + +## AddIpToAuthenticatedDomain + +> AuthenticatedDomainSpf AddIpToAuthenticatedDomain(ctx, Idoptional) + +Add an IP to an authenticated domain + +**This endpoint allows you to add an IP address to an authenticated domain.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **int32** | ID of the domain to which you are adding an IP + +### Other Parameters + +Other parameters are passed through a pointer to a AddIpToAuthenticatedDomainParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**AddIpToAuthenticatedDomainRequest** | [**AddIpToAuthenticatedDomainRequest**](AddIpToAuthenticatedDomainRequest.md) | + +### Return type + +[**AuthenticatedDomainSpf**](AuthenticatedDomainSpf.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/AddIpToAuthenticatedDomainRequest.md b/rest/api/v3/domain_authentication/docs/AddIpToAuthenticatedDomainRequest.md new file mode 100644 index 00000000..6eba37a6 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/AddIpToAuthenticatedDomainRequest.md @@ -0,0 +1,11 @@ +# AddIpToAuthenticatedDomainRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | IP to associate with the domain. Used for manually specifying IPs for custom SPF. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomain.md b/rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomain.md new file mode 100644 index 00000000..f96c9ebb --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomain.md @@ -0,0 +1,52 @@ +# AssociateSubuserWithDomain + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AssociateSubuserWithDomain**](AssociateSubuserWithDomain.md#AssociateSubuserWithDomain) | **Post** /v3/whitelabel/domains/{DomainId}/subuser | Associate an authenticated domain with a given user. + + + +## AssociateSubuserWithDomain + +> AuthenticatedDomainSpf AssociateSubuserWithDomain(ctx, DomainIdoptional) + +Associate an authenticated domain with a given user. + +**This endpoint allows you to associate a specific authenticated domain with a subuser.** Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent's domain. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. [You can associate more than one domain with a subuser using the `v3/whitelabel/domains/{domain_id}/subuser:add` endpoint](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/associate-an-authenticated-domain-with-a-subuser-multiple). + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**DomainId** | **int32** | ID of the authenticated domain to associate with the subuser. + +### Other Parameters + +Other parameters are passed through a pointer to a AssociateSubuserWithDomainParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**AssociateSubuserWithDomainRequest** | [**AssociateSubuserWithDomainRequest**](AssociateSubuserWithDomainRequest.md) | + +### Return type + +[**AuthenticatedDomainSpf**](AuthenticatedDomainSpf.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomainMultiple.md b/rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomainMultiple.md new file mode 100644 index 00000000..7aec4d78 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomainMultiple.md @@ -0,0 +1,52 @@ +# AssociateSubuserWithDomainMultiple + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AssociateSubuserWithDomainMultiple**](AssociateSubuserWithDomainMultiple.md#AssociateSubuserWithDomainMultiple) | **Post** /v3/whitelabel/domains/{DomainId}/subuser:add | Associate an authenticated domain with a given user, for up to five domains. + + + +## AssociateSubuserWithDomainMultiple + +> AuthenticatedDomainSpf AssociateSubuserWithDomainMultiple(ctx, DomainIdoptional) + +Associate an authenticated domain with a given user, for up to five domains. + +**This endpoint allows you to associate a specific authenticated domain with a subuser. It can be used to associate up to five authenticated domains.** This functionality allows subusers to send mail using their parent's domain. Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. A subuser can have up to five associated authenticated domains. To see the domains that have already been associated with this user, you can [use the API to list the domains currently associated with the subuser](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/list-the-authenticated-domain-associated-with-a-subuser-multiple). When selecting a domain to send email from, SendGrid checks for domains in the following order and chooses the first one that appears in the hierarchy: 1. Domain assigned by the subuser that matches the email's `From` address domain. 2. The subuser's default domain. 3. Domain assigned by the parent user that matches the `From` address domain. 4. Parent user's default domain. 5. sendgrid.net + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**DomainId** | **int32** | ID of the authenticated domain to associate with the subuser. + +### Other Parameters + +Other parameters are passed through a pointer to a AssociateSubuserWithDomainMultipleParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**AssociateSubuserWithDomainRequest** | [**AssociateSubuserWithDomainRequest**](AssociateSubuserWithDomainRequest.md) | + +### Return type + +[**AuthenticatedDomainSpf**](AuthenticatedDomainSpf.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomainRequest.md b/rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomainRequest.md new file mode 100644 index 00000000..ed7c75bf --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomainRequest.md @@ -0,0 +1,11 @@ +# AssociateSubuserWithDomainRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | Username to associate with the authenticated domain. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/AuthenticateDomain.md b/rest/api/v3/domain_authentication/docs/AuthenticateDomain.md new file mode 100644 index 00000000..950f3cce --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/AuthenticateDomain.md @@ -0,0 +1,49 @@ +# AuthenticateDomain + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AuthenticateDomain**](AuthenticateDomain.md#AuthenticateDomain) | **Post** /v3/whitelabel/domains | Authenticate a domain + + + +## AuthenticateDomain + +> AuthenticatedDomain AuthenticateDomain(ctx, optional) + +Authenticate a domain + +**This endpoint allows you to authenticate a domain.** If you are authenticating a domain for a subuser, you have two options: 1. Use the \"username\" parameter. This allows you to authenticate a domain on behalf of your subuser. This means the subuser is able to see and modify the authenticated domain. 2. Use the Association workflow (see Associate Domain section). This allows you to authenticate a domain created by the parent to a subuser. This means the subuser will default to the assigned domain, but will not be able to see or modify that authenticated domain. However, if the subuser authenticates their own domain it will overwrite the assigned domain. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a AuthenticateDomainParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**AuthenticateDomainRequest** | [**AuthenticateDomainRequest**](AuthenticateDomainRequest.md) | + +### Return type + +[**AuthenticatedDomain**](AuthenticatedDomain.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/AuthenticateDomainRequest.md b/rest/api/v3/domain_authentication/docs/AuthenticateDomainRequest.md new file mode 100644 index 00000000..35a69969 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/AuthenticateDomainRequest.md @@ -0,0 +1,19 @@ +# AuthenticateDomainRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Domain** | **string** | Domain being authenticated. | +**Subdomain** | **string** | The subdomain to use for this authenticated domain. |[optional] +**Username** | **string** | The username associated with this domain. |[optional] +**Ips** | **[]string** | The IP addresses that will be included in the custom SPF record for this authenticated domain. |[optional] +**CustomSpf** | **bool** | Specify whether to use a custom SPF or allow SendGrid to manage your SPF. This option is only available to authenticated domains set up for manual security. |[optional] +**Default** | **bool** | Whether to use this authenticated domain as the fallback if no authenticated domains match the sender's domain. |[optional] +**AutomaticSecurity** | **bool** | Whether to allow SendGrid to manage your SPF records, DKIM keys, and DKIM key rotation. |[optional] +**CustomDkimSelector** | **string** | Add a custom DKIM selector. Accepts three letters or numbers. |[optional] +**Region** | **string** | The region of the domain. Allowed values are `global` and `eu`. The default value is `global`. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/AuthenticatedDomain.md b/rest/api/v3/domain_authentication/docs/AuthenticatedDomain.md new file mode 100644 index 00000000..6cd5c65b --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/AuthenticatedDomain.md @@ -0,0 +1,22 @@ +# AuthenticatedDomain + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **float32** | The ID of the authenticated domain. | +**UserId** | **float32** | The ID of the user that this domain is associated with. | +**Subdomain** | **string** | The subdomain to use for this authenticated domain. | +**Domain** | **string** | The domain to be authenticated. | +**Username** | **string** | The username that this domain will be associated with. | +**Ips** | **[]string** | The IPs to be included in the custom SPF record for this authenticated domain. | +**CustomSpf** | **bool** | Indicates whether this authenticated domain uses custom SPF. | +**Default** | **bool** | Indicates if this is the default authenticated domain. | +**Legacy** | **bool** | Indicates if this authenticated domain was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new authenticated domain if you need to update it. | +**AutomaticSecurity** | **bool** | Indicates if this authenticated domain uses automated security. | +**Valid** | **bool** | Indicates if this is a valid authenticated domain. | +**Dns** | [**ListAllAuthenticatedDomainWithUser200ResponseInnerDns**](ListAllAuthenticatedDomainWithUser200ResponseInnerDns.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpf.md b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpf.md new file mode 100644 index 00000000..1f08a00e --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpf.md @@ -0,0 +1,22 @@ +# AuthenticatedDomainSpf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The ID of the authenticated domain. | +**Domain** | **string** | The domain authenticated. | +**Subdomain** | **string** | The subdomain that was used to create this authenticated domain. |[optional] +**Username** | **string** | The username of the account that this authenticated domain is associated with. | +**UserId** | **int32** | The user_id of the account that this authenticated domain is associated with. | +**Ips** | **[]interface{}** | The IP addresses that are included in the SPF record for this authenticated domain. | +**CustomSpf** | **bool** | Indicates if this authenticated domain uses custom SPF. | +**Default** | **bool** | Indicates if this is the default domain. | +**Legacy** | **bool** | Indicates if this authenticated domain was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new authenticated domain if you need to update it. | +**AutomaticSecurity** | **bool** | Indicates if this authenticated domain uses automated security. | +**Valid** | **bool** | Indicates if this is a valid authenticated domain . | +**Dns** | [**AuthenticatedDomainSpfDns**](AuthenticatedDomainSpfDns.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDns.md b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDns.md new file mode 100644 index 00000000..d4eaca8b --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDns.md @@ -0,0 +1,14 @@ +# AuthenticatedDomainSpfDns + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MailServer** | [**AuthenticatedDomainSpfDnsMailServer**](AuthenticatedDomainSpfDnsMailServer.md) | | +**SubdomainSpf** | [**AuthenticatedDomainSpfDnsSubdomainSpf**](AuthenticatedDomainSpfDnsSubdomainSpf.md) | | +**DomainSpf** | [**AuthenticatedDomainSpfDnsDomainSpf**](AuthenticatedDomainSpfDnsDomainSpf.md) | | +**Dkim** | [**AuthenticatedDomainSpfDnsDkim**](AuthenticatedDomainSpfDnsDkim.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsDkim.md b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsDkim.md new file mode 100644 index 00000000..ec37b619 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsDkim.md @@ -0,0 +1,14 @@ +# AuthenticatedDomainSpfDnsDkim + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Host** | **string** | The DNS labels for the DKIM signature. | +**Type** | **string** | The type of data in the DKIM record. | +**Data** | **string** | The DKIM record. | +**Valid** | **bool** | Indicates if the DKIM record is valid. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsDomainSpf.md b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsDomainSpf.md new file mode 100644 index 00000000..f8f4e368 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsDomainSpf.md @@ -0,0 +1,14 @@ +# AuthenticatedDomainSpfDnsDomainSpf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Host** | **string** | The root domain that this SPF record will be used to authenticate. | +**Type** | **string** | The type of data in the SPF record. | +**Data** | **string** | The SPF record. | +**Valid** | **bool** | Indicates if the SPF record is valid. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsMailServer.md b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsMailServer.md new file mode 100644 index 00000000..b50d175b --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsMailServer.md @@ -0,0 +1,14 @@ +# AuthenticatedDomainSpfDnsMailServer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Host** | **string** | The domain sending the messages. | +**Type** | **string** | They type of DNS record. | +**Data** | **string** | The mail server responsible for accepting messages from the sending domain. | +**Valid** | **bool** | Indicates if this is a valid DNS record. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsSubdomainSpf.md b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsSubdomainSpf.md new file mode 100644 index 00000000..f2665a2a --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsSubdomainSpf.md @@ -0,0 +1,14 @@ +# AuthenticatedDomainSpfDnsSubdomainSpf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Host** | **string** | The domain that this SPF record will be used to authenticate. | +**Type** | **string** | The type of data in the SPF record. | +**Data** | **string** | The SPF record. | +**Valid** | **bool** | Indicates if this is a valid SPF record. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/DeleteAuthenticatedDomain.md b/rest/api/v3/domain_authentication/docs/DeleteAuthenticatedDomain.md new file mode 100644 index 00000000..eb4c9a6c --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/DeleteAuthenticatedDomain.md @@ -0,0 +1,52 @@ +# DeleteAuthenticatedDomain + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteAuthenticatedDomain**](DeleteAuthenticatedDomain.md#DeleteAuthenticatedDomain) | **Delete** /v3/whitelabel/domains/{DomainId} | Delete an authenticated domain. + + + +## DeleteAuthenticatedDomain + +> map[string]interface{} DeleteAuthenticatedDomain(ctx, DomainIdoptional) + +Delete an authenticated domain. + +**This endpoint allows you to delete an authenticated domain.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**DomainId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteAuthenticatedDomainParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/DeleteIpFromAuthenticatedDomain.md b/rest/api/v3/domain_authentication/docs/DeleteIpFromAuthenticatedDomain.md new file mode 100644 index 00000000..a8b5e6a5 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/DeleteIpFromAuthenticatedDomain.md @@ -0,0 +1,53 @@ +# DeleteIpFromAuthenticatedDomain + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteIpFromAuthenticatedDomain**](DeleteIpFromAuthenticatedDomain.md#DeleteIpFromAuthenticatedDomain) | **Delete** /v3/whitelabel/domains/{Id}/ips/{Ip} | Remove an IP from an authenticated domain. + + + +## DeleteIpFromAuthenticatedDomain + +> AuthenticatedDomainSpf DeleteIpFromAuthenticatedDomain(ctx, IdIpoptional) + +Remove an IP from an authenticated domain. + +**This endpoint allows you to remove an IP address from that domain's authentication.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **int32** | ID of the domain to delete the IP from. +**Ip** | **string** | IP to remove from the domain. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteIpFromAuthenticatedDomainParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**AuthenticatedDomainSpf**](AuthenticatedDomainSpf.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/DisassociateAuthenticatedDomainFromUser.md b/rest/api/v3/domain_authentication/docs/DisassociateAuthenticatedDomainFromUser.md new file mode 100644 index 00000000..ccfdb2ea --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/DisassociateAuthenticatedDomainFromUser.md @@ -0,0 +1,48 @@ +# DisassociateAuthenticatedDomainFromUser + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DisassociateAuthenticatedDomainFromUser**](DisassociateAuthenticatedDomainFromUser.md#DisassociateAuthenticatedDomainFromUser) | **Delete** /v3/whitelabel/domains/subuser | Disassociate an authenticated domain from a given user. + + + +## DisassociateAuthenticatedDomainFromUser + +> map[string]interface{} DisassociateAuthenticatedDomainFromUser(ctx, optional) + +Disassociate an authenticated domain from a given user. + +**This endpoint allows you to disassociate a specific authenticated domain from a subuser.** Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent's domain. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. Note that if you used the [`/v3/whitelabel/domains/{domain_id}/subuser:add` endpoint](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/associate-an-authenticated-domain-with-a-subuser-multiple) to add multiple domains to the subuser, you should use the [`/v3/whitelabel/domains/{domain_id}/subuser` endpoint](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/disassociate-an-authenticated-domain-from-a-subuser-multiple) to disassociate those domains. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a DisassociateAuthenticatedDomainFromUserParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Username** | **string** | Username for the subuser to find associated authenticated domain. + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/DisassociateSubuserFromDomain.md b/rest/api/v3/domain_authentication/docs/DisassociateSubuserFromDomain.md new file mode 100644 index 00000000..beb09018 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/DisassociateSubuserFromDomain.md @@ -0,0 +1,52 @@ +# DisassociateSubuserFromDomain + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DisassociateSubuserFromDomain**](DisassociateSubuserFromDomain.md#DisassociateSubuserFromDomain) | **Delete** /v3/whitelabel/domains/{DomainId}/subuser | Disassociate an authenticated domain from a given user for users with up to five associated domains. + + + +## DisassociateSubuserFromDomain + +> map[string]interface{} DisassociateSubuserFromDomain(ctx, DomainIdoptional) + +Disassociate an authenticated domain from a given user for users with up to five associated domains. + +**This endpoint allows you to disassociate a specific authenticated domain from a subuser, for users with up to five associated domains.** This functionality allows subusers to send mail using their parent's domain. Authenticated domains can be associated with (i.e. assigned to) subusers kknt, and a subuser can have up to five associated authenticated domains. You can dissociate an authenticated domain from any subuser that has one or more authenticated domains using this endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**DomainId** | **int32** | ID of the authenticated domain to be disassociated with the subuser. + +### Other Parameters + +Other parameters are passed through a pointer to a DisassociateSubuserFromDomainParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Username** | **string** | Username for the subuser to find associated authenticated domain. + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/EmailDnsRecord.md b/rest/api/v3/domain_authentication/docs/EmailDnsRecord.md new file mode 100644 index 00000000..6e37810d --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/EmailDnsRecord.md @@ -0,0 +1,48 @@ +# EmailDnsRecord + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**EmailDnsRecord**](EmailDnsRecord.md#EmailDnsRecord) | **Post** /v3/whitelabel/dns/email | Email DNS records to a co-worker + + + +## EmailDnsRecord + +> EmailDnsRecord(ctx, optional) + +Email DNS records to a co-worker + +**This endpoint is used to share DNS records with a colleagues** Use this endpoint to send SendGrid-generated DNS record information to a co-worker so they can enter it into your DNS provider to validate your domain and link branding. What type of records are sent will depend on whether you have chosen Automated Security or not. When using Automated Security, SendGrid provides you with three CNAME records. If you turn Automated Security off, you are instead given TXT and MX records. If you pass a `link_id` to this endpoint, the generated email will supply the DNS records necessary to complete [Link Branding](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) setup. If you pass a `domain_id` to this endpoint, the generated email will supply the DNS records needed to complete [Domain Authentication](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Passing both IDs will generate an email with the records needed to complete both setup steps. You can retrieve all your domain IDs from the returned `id` fields for each domain using the \"List all authenticated domains\" endpoint. You can retrieve all of your link IDs using the \"Retrieve all branded links\" endpoint. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a EmailDnsRecordParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**EmailDnsRecordRequest** | [**EmailDnsRecordRequest**](EmailDnsRecordRequest.md) | + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/EmailDnsRecord400Response.md b/rest/api/v3/domain_authentication/docs/EmailDnsRecord400Response.md new file mode 100644 index 00000000..74634e08 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/EmailDnsRecord400Response.md @@ -0,0 +1,11 @@ +# EmailDnsRecord400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**EmailDnsRecord400ResponseErrors**](EmailDnsRecord400ResponseErrors.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/EmailDnsRecord400ResponseErrors.md b/rest/api/v3/domain_authentication/docs/EmailDnsRecord400ResponseErrors.md new file mode 100644 index 00000000..285e881a --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/EmailDnsRecord400ResponseErrors.md @@ -0,0 +1,12 @@ +# EmailDnsRecord400ResponseErrors + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | **string** | |[optional] +**Field** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/EmailDnsRecordRequest.md b/rest/api/v3/domain_authentication/docs/EmailDnsRecordRequest.md new file mode 100644 index 00000000..f4f61a68 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/EmailDnsRecordRequest.md @@ -0,0 +1,14 @@ +# EmailDnsRecordRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LinkId** | **int32** | The ID of the branded link. | +**DomainId** | **int32** | The ID of your SendGrid domain record. | +**Email** | **string** | The email address to send the DNS information to. | +**Message** | **string** | A custom text block to include in the email body sent with the records. |[optional] [default to "Please set these DNS records in our hosting solution."] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/GetAuthenticatedDomain.md b/rest/api/v3/domain_authentication/docs/GetAuthenticatedDomain.md new file mode 100644 index 00000000..e472f781 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/GetAuthenticatedDomain.md @@ -0,0 +1,52 @@ +# GetAuthenticatedDomain + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetAuthenticatedDomain**](GetAuthenticatedDomain.md#GetAuthenticatedDomain) | **Get** /v3/whitelabel/domains/{DomainId} | Retrieve an authenticated domain + + + +## GetAuthenticatedDomain + +> AuthenticatedDomain GetAuthenticatedDomain(ctx, DomainIdoptional) + +Retrieve an authenticated domain + +**This endpoint allows you to retrieve a specific authenticated domain.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**DomainId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a GetAuthenticatedDomainParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**AuthenticatedDomain**](AuthenticatedDomain.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser.md b/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser.md new file mode 100644 index 00000000..facdf5b6 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser.md @@ -0,0 +1,47 @@ +# ListAllAuthenticatedDomainWithUser + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListAllAuthenticatedDomainWithUser**](ListAllAuthenticatedDomainWithUser.md#ListAllAuthenticatedDomainWithUser) | **Get** /v3/whitelabel/domains/subuser/all | List all the authenticated domains associated with the given user. + + + +## ListAllAuthenticatedDomainWithUser + +> []ListAllAuthenticatedDomainWithUser200ResponseInner ListAllAuthenticatedDomainWithUser(ctx, Username) + +List all the authenticated domains associated with the given user. + +**This endpoint allows you to retrieve all of the authenticated domains that have been assigned to a specific subuser.** This functionality allows subusers to send mail using their parent's domain. Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account, and a subuser can have up to five associated domains. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. When selecting a domain to send email from, SendGrid checks for domains in the following order and chooses the first one that appears in the hierarchy: 1. Domain assigned by the subuser that matches the email's `From` address domain. 2. The subuser's default domain. 3. Domain assigned by the parent user that matches the `From` address domain. 4. Parent user's default domain. 5. sendgrid.net + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListAllAuthenticatedDomainWithUserParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**[]ListAllAuthenticatedDomainWithUser200ResponseInner**](ListAllAuthenticatedDomainWithUser200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInner.md b/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInner.md new file mode 100644 index 00000000..01be72df --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInner.md @@ -0,0 +1,22 @@ +# ListAllAuthenticatedDomainWithUser200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **float32** | The ID of the authenticated domain. | +**UserId** | **float32** | The ID of the user that this domain is associated with. | +**Subdomain** | **string** | The subdomain to use for this authenticated domain. | +**Domain** | **string** | The domain to be authenticated. | +**Username** | **string** | The username that this domain will be associated with. | +**Ips** | **[]string** | The IPs to be included in the custom SPF record for this authenticated domain. | +**CustomSpf** | **bool** | Indicates whether this authenticated domain uses custom SPF. | +**Default** | **bool** | Indicates if this is the default authenticated domain. | +**Legacy** | **bool** | Indicates if this authenticated domain was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new authenticated domain if you need to update it. | +**AutomaticSecurity** | **bool** | Indicates if this authenticated domain uses automated security. | +**Valid** | **bool** | Indicates if this is a valid authenticated domain. | +**Dns** | [**ListAllAuthenticatedDomainWithUser200ResponseInnerDns**](ListAllAuthenticatedDomainWithUser200ResponseInnerDns.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDns.md b/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDns.md new file mode 100644 index 00000000..52d1114c --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDns.md @@ -0,0 +1,13 @@ +# ListAllAuthenticatedDomainWithUser200ResponseInnerDns + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MailCname** | [**ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname**](ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname.md) | | +**Dkim1** | [**ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1**](ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1.md) | | +**Dkim2** | [**ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1**](ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1.md b/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1.md new file mode 100644 index 00000000..be86cafd --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1.md @@ -0,0 +1,14 @@ +# ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Valid** | **bool** | Indicates if this is a valid DNS record. | +**Type** | **string** | The type of DNS record. | +**Host** | **string** | The domain that this DNS record was created for. | +**Data** | **string** | The DNS record. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname.md b/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname.md new file mode 100644 index 00000000..f15d047a --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname.md @@ -0,0 +1,14 @@ +# ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Valid** | **bool** | Indicates if this is a valid CNAME. | +**Type** | **string** | The type of DNS record. | +**Host** | **string** | The domain that this CNAME is created for. | +**Data** | **string** | The CNAME record. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/ListAuthenticatedDomain.md b/rest/api/v3/domain_authentication/docs/ListAuthenticatedDomain.md new file mode 100644 index 00000000..b8031638 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ListAuthenticatedDomain.md @@ -0,0 +1,53 @@ +# ListAuthenticatedDomain + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListAuthenticatedDomain**](ListAuthenticatedDomain.md#ListAuthenticatedDomain) | **Get** /v3/whitelabel/domains | List all authenticated domains + + + +## ListAuthenticatedDomain + +> []interface{} ListAuthenticatedDomain(ctx, optional) + +List all authenticated domains + +**This endpoint allows you to retrieve a paginated list of all domains you have authenticated.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListAuthenticatedDomainParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. +**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. +**ExcludeSubusers** | **bool** | Exclude subuser domains from the result. +**Username** | **string** | The username associated with an authenticated domain. +**Domain** | **string** | Search for authenticated domains. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**[]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/ListAuthenticatedDomainWithUser.md b/rest/api/v3/domain_authentication/docs/ListAuthenticatedDomainWithUser.md new file mode 100644 index 00000000..18628529 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ListAuthenticatedDomainWithUser.md @@ -0,0 +1,47 @@ +# ListAuthenticatedDomainWithUser + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListAuthenticatedDomainWithUser**](ListAuthenticatedDomainWithUser.md#ListAuthenticatedDomainWithUser) | **Get** /v3/whitelabel/domains/subuser | List the authenticated domain associated with the given user. + + + +## ListAuthenticatedDomainWithUser + +> AuthenticatedDomainSpf ListAuthenticatedDomainWithUser(ctx, Username) + +List the authenticated domain associated with the given user. + +**This endpoint allows you to retrieve all of the authenticated domains that have been assigned to a specific subuser.** Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent's domain. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. Note that if you used the [`/v3/whitelabel/domains/{domain_id}/subuser:add` endpoint]( https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/associate-an-authenticated-domain-with-a-subuser-multiple) to add multiple domains to the subuser, you can use the [`/v3/whitelabel/domains/subuser/all` endpoint](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/list-the-authenticated-domain-associated-with-a-subuser-multiple) to list those associated domains. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListAuthenticatedDomainWithUserParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**AuthenticatedDomainSpf**](AuthenticatedDomainSpf.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/ListDefaultAuthenticatedDomain.md b/rest/api/v3/domain_authentication/docs/ListDefaultAuthenticatedDomain.md new file mode 100644 index 00000000..0c23d724 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ListDefaultAuthenticatedDomain.md @@ -0,0 +1,49 @@ +# ListDefaultAuthenticatedDomain + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListDefaultAuthenticatedDomain**](ListDefaultAuthenticatedDomain.md#ListDefaultAuthenticatedDomain) | **Get** /v3/whitelabel/domains/default | Get the default authentication + + + +## ListDefaultAuthenticatedDomain + +> []interface{} ListDefaultAuthenticatedDomain(ctx, optional) + +Get the default authentication + +**This endpoint allows you to retrieve the default authentication for a domain.** When creating or updating a domain authentication, you can set the domain as a default. The default domain will be used to send all mail. If you have multiple authenticated domains, the authenticated domain matching the domain of the From address will be used, and the default will be overridden. This endpoint will return a default domain and its details only if a default is set. You are not required to set a default. If you do not set a default domain, this endpoint will return general information about your domain authentication status. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListDefaultAuthenticatedDomainParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Domain** | **string** | The domain to find a default authentication. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**[]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/UpdateAuthenticatedDomain.md b/rest/api/v3/domain_authentication/docs/UpdateAuthenticatedDomain.md new file mode 100644 index 00000000..aa6feaad --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/UpdateAuthenticatedDomain.md @@ -0,0 +1,53 @@ +# UpdateAuthenticatedDomain + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateAuthenticatedDomain**](UpdateAuthenticatedDomain.md#UpdateAuthenticatedDomain) | **Patch** /v3/whitelabel/domains/{DomainId} | Update an authenticated domain + + + +## UpdateAuthenticatedDomain + +> []interface{} UpdateAuthenticatedDomain(ctx, DomainIdoptional) + +Update an authenticated domain + +**This endpoint allows you to update the settings for an authenticated domain.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**DomainId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateAuthenticatedDomainParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateAuthenticatedDomainRequest** | [**UpdateAuthenticatedDomainRequest**](UpdateAuthenticatedDomainRequest.md) | + +### Return type + +**[]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/UpdateAuthenticatedDomainRequest.md b/rest/api/v3/domain_authentication/docs/UpdateAuthenticatedDomainRequest.md new file mode 100644 index 00000000..99eac6b7 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/UpdateAuthenticatedDomainRequest.md @@ -0,0 +1,12 @@ +# UpdateAuthenticatedDomainRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Default** | **bool** | Indicates whether this is the default authenticated domain. |[optional] [default to false] +**CustomSpf** | **bool** | Indicates whether to generate a custom SPF record for manual security. |[optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain.md b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain.md new file mode 100644 index 00000000..2382aa2a --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain.md @@ -0,0 +1,52 @@ +# ValidateAuthenticatedDomain + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ValidateAuthenticatedDomain**](ValidateAuthenticatedDomain.md#ValidateAuthenticatedDomain) | **Post** /v3/whitelabel/domains/{Id}/validate | Validate a domain authentication. + + + +## ValidateAuthenticatedDomain + +> ValidateAuthenticatedDomain200Response ValidateAuthenticatedDomain(ctx, Idoptional) + +Validate a domain authentication. + +**This endpoint allows you to validate an authenticated domain. If it fails, it will return an error message describing why the domain could not be validated.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **int32** | ID of the domain to validate. + +### Other Parameters + +Other parameters are passed through a pointer to a ValidateAuthenticatedDomainParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ValidateAuthenticatedDomain200Response**](ValidateAuthenticatedDomain200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200Response.md b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200Response.md new file mode 100644 index 00000000..12efc7d9 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200Response.md @@ -0,0 +1,13 @@ +# ValidateAuthenticatedDomain200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The ID of the authenticated domain. |[optional] +**Valid** | **bool** | Indicates if this is a valid authenticated domain. |[optional] +**ValidationResults** | [**ValidateAuthenticatedDomain200ResponseValidationResults**](ValidateAuthenticatedDomain200ResponseValidationResults.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResults.md b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResults.md new file mode 100644 index 00000000..5afcb1d5 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResults.md @@ -0,0 +1,14 @@ +# ValidateAuthenticatedDomain200ResponseValidationResults + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MailCname** | [**ValidateAuthenticatedDomain200ResponseValidationResultsMailCname**](ValidateAuthenticatedDomain200ResponseValidationResultsMailCname.md) | |[optional] +**Dkim1** | [**ValidateAuthenticatedDomain200ResponseValidationResultsDkim1**](ValidateAuthenticatedDomain200ResponseValidationResultsDkim1.md) | |[optional] +**Dkim2** | [**ValidateAuthenticatedDomain200ResponseValidationResultsDkim1**](ValidateAuthenticatedDomain200ResponseValidationResultsDkim1.md) | |[optional] +**Spf** | [**ValidateAuthenticatedDomain200ResponseValidationResultsSpf**](ValidateAuthenticatedDomain200ResponseValidationResultsSpf.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsDkim1.md b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsDkim1.md new file mode 100644 index 00000000..48d7eb03 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsDkim1.md @@ -0,0 +1,12 @@ +# ValidateAuthenticatedDomain200ResponseValidationResultsDkim1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Valid** | **bool** | Indicates if the DNS record is valid. |[optional] +**Reason** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsMailCname.md b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsMailCname.md new file mode 100644 index 00000000..b87534f9 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsMailCname.md @@ -0,0 +1,12 @@ +# ValidateAuthenticatedDomain200ResponseValidationResultsMailCname + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Valid** | **bool** | Indicates if this DNS record is valid. |[optional] +**Reason** | **string** | The reason this record is invalid. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsSpf.md b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsSpf.md new file mode 100644 index 00000000..12ba1b89 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsSpf.md @@ -0,0 +1,12 @@ +# ValidateAuthenticatedDomain200ResponseValidationResultsSpf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Valid** | **bool** | Indicates if the SPF record is valid. |[optional] +**Reason** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain500Response.md b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain500Response.md new file mode 100644 index 00000000..47da7002 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain500Response.md @@ -0,0 +1,11 @@ +# ValidateAuthenticatedDomain500Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ValidateAuthenticatedDomain500ResponseErrorsInner**](ValidateAuthenticatedDomain500ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain500ResponseErrorsInner.md b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain500ResponseErrorsInner.md new file mode 100644 index 00000000..ddc1de56 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain500ResponseErrorsInner.md @@ -0,0 +1,11 @@ +# ValidateAuthenticatedDomain500ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | A message explaining the reason for the error. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/model_add_ip_to_authenticated_domain_request.go b/rest/api/v3/domain_authentication/model_add_ip_to_authenticated_domain_request.go new file mode 100644 index 00000000..618ecd41 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_add_ip_to_authenticated_domain_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIpToAuthenticatedDomainRequest struct for AddIpToAuthenticatedDomainRequest +type AddIpToAuthenticatedDomainRequest struct { + // IP to associate with the domain. Used for manually specifying IPs for custom SPF. + Ip string `json:"ip"` +} diff --git a/rest/api/v3/domain_authentication/model_associate_subuser_with_domain_request.go b/rest/api/v3/domain_authentication/model_associate_subuser_with_domain_request.go new file mode 100644 index 00000000..46d3898a --- /dev/null +++ b/rest/api/v3/domain_authentication/model_associate_subuser_with_domain_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AssociateSubuserWithDomainRequest struct for AssociateSubuserWithDomainRequest +type AssociateSubuserWithDomainRequest struct { + // Username to associate with the authenticated domain. + Username string `json:"username"` +} diff --git a/rest/api/v3/domain_authentication/model_authenticate_domain_request.go b/rest/api/v3/domain_authentication/model_authenticate_domain_request.go new file mode 100644 index 00000000..1896d15f --- /dev/null +++ b/rest/api/v3/domain_authentication/model_authenticate_domain_request.go @@ -0,0 +1,36 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AuthenticateDomainRequest struct for AuthenticateDomainRequest +type AuthenticateDomainRequest struct { + // Domain being authenticated. + Domain string `json:"domain"` + // The subdomain to use for this authenticated domain. + Subdomain *string `json:"subdomain,omitempty"` + // The username associated with this domain. + Username *string `json:"username,omitempty"` + // The IP addresses that will be included in the custom SPF record for this authenticated domain. + Ips *[]string `json:"ips,omitempty"` + // Specify whether to use a custom SPF or allow SendGrid to manage your SPF. This option is only available to authenticated domains set up for manual security. + CustomSpf *bool `json:"custom_spf,omitempty"` + // Whether to use this authenticated domain as the fallback if no authenticated domains match the sender's domain. + Default *bool `json:"default,omitempty"` + // Whether to allow SendGrid to manage your SPF records, DKIM keys, and DKIM key rotation. + AutomaticSecurity *bool `json:"automatic_security,omitempty"` + // Add a custom DKIM selector. Accepts three letters or numbers. + CustomDkimSelector *string `json:"custom_dkim_selector,omitempty"` + // The region of the domain. Allowed values are `global` and `eu`. The default value is `global`. + Region *string `json:"region,omitempty"` +} diff --git a/rest/api/v3/domain_authentication/model_authenticated_domain.go b/rest/api/v3/domain_authentication/model_authenticated_domain.go new file mode 100644 index 00000000..1de91ca9 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_authenticated_domain.go @@ -0,0 +1,41 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AuthenticatedDomain struct for AuthenticatedDomain +type AuthenticatedDomain struct { + // The ID of the authenticated domain. + Id float32 `json:"id"` + // The ID of the user that this domain is associated with. + UserId float32 `json:"user_id"` + // The subdomain to use for this authenticated domain. + Subdomain string `json:"subdomain"` + // The domain to be authenticated. + Domain string `json:"domain"` + // The username that this domain will be associated with. + Username string `json:"username"` + // The IPs to be included in the custom SPF record for this authenticated domain. + Ips []string `json:"ips"` + // Indicates whether this authenticated domain uses custom SPF. + CustomSpf bool `json:"custom_spf"` + // Indicates if this is the default authenticated domain. + Default bool `json:"default"` + // Indicates if this authenticated domain was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new authenticated domain if you need to update it. + Legacy bool `json:"legacy"` + // Indicates if this authenticated domain uses automated security. + AutomaticSecurity bool `json:"automatic_security"` + // Indicates if this is a valid authenticated domain. + Valid bool `json:"valid"` + Dns ListAllAuthenticatedDomainWithUser200ResponseInnerDns `json:"dns"` +} diff --git a/rest/api/v3/domain_authentication/model_authenticated_domain_spf.go b/rest/api/v3/domain_authentication/model_authenticated_domain_spf.go new file mode 100644 index 00000000..8253d6a7 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_authenticated_domain_spf.go @@ -0,0 +1,41 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AuthenticatedDomainSpf struct for AuthenticatedDomainSpf +type AuthenticatedDomainSpf struct { + // The ID of the authenticated domain. + Id int32 `json:"id"` + // The domain authenticated. + Domain string `json:"domain"` + // The subdomain that was used to create this authenticated domain. + Subdomain *string `json:"subdomain,omitempty"` + // The username of the account that this authenticated domain is associated with. + Username string `json:"username"` + // The user_id of the account that this authenticated domain is associated with. + UserId int32 `json:"user_id"` + // The IP addresses that are included in the SPF record for this authenticated domain. + Ips []interface{} `json:"ips"` + // Indicates if this authenticated domain uses custom SPF. + CustomSpf bool `json:"custom_spf"` + // Indicates if this is the default domain. + Default bool `json:"default"` + // Indicates if this authenticated domain was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new authenticated domain if you need to update it. + Legacy bool `json:"legacy"` + // Indicates if this authenticated domain uses automated security. + AutomaticSecurity bool `json:"automatic_security"` + // Indicates if this is a valid authenticated domain . + Valid bool `json:"valid"` + Dns AuthenticatedDomainSpfDns `json:"dns"` +} diff --git a/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns.go b/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns.go new file mode 100644 index 00000000..776411ba --- /dev/null +++ b/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AuthenticatedDomainSpfDns The DNS records for this authenticated domain. +type AuthenticatedDomainSpfDns struct { + MailServer AuthenticatedDomainSpfDnsMailServer `json:"mail_server"` + SubdomainSpf AuthenticatedDomainSpfDnsSubdomainSpf `json:"subdomain_spf"` + DomainSpf AuthenticatedDomainSpfDnsDomainSpf `json:"domain_spf"` + Dkim AuthenticatedDomainSpfDnsDkim `json:"dkim"` +} diff --git a/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_dkim.go b/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_dkim.go new file mode 100644 index 00000000..e7001397 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_dkim.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AuthenticatedDomainSpfDnsDkim The DKIM record for messages sent using this authenticated domain. +type AuthenticatedDomainSpfDnsDkim struct { + // The DNS labels for the DKIM signature. + Host string `json:"host"` + // The type of data in the DKIM record. + Type string `json:"type"` + // The DKIM record. + Data string `json:"data"` + // Indicates if the DKIM record is valid. + Valid bool `json:"valid"` +} diff --git a/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_domain_spf.go b/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_domain_spf.go new file mode 100644 index 00000000..4a5499ee --- /dev/null +++ b/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_domain_spf.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AuthenticatedDomainSpfDnsDomainSpf The SPF record for the root domain. +type AuthenticatedDomainSpfDnsDomainSpf struct { + // The root domain that this SPF record will be used to authenticate. + Host string `json:"host"` + // The type of data in the SPF record. + Type string `json:"type"` + // The SPF record. + Data string `json:"data"` + // Indicates if the SPF record is valid. + Valid bool `json:"valid"` +} diff --git a/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_mail_server.go b/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_mail_server.go new file mode 100644 index 00000000..cd48d541 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_mail_server.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AuthenticatedDomainSpfDnsMailServer Designates which mail server is responsible for accepting messages from a domain. +type AuthenticatedDomainSpfDnsMailServer struct { + // The domain sending the messages. + Host string `json:"host"` + // They type of DNS record. + Type string `json:"type"` + // The mail server responsible for accepting messages from the sending domain. + Data string `json:"data"` + // Indicates if this is a valid DNS record. + Valid bool `json:"valid"` +} diff --git a/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_subdomain_spf.go b/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_subdomain_spf.go new file mode 100644 index 00000000..9b298d28 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_subdomain_spf.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AuthenticatedDomainSpfDnsSubdomainSpf The SPF record for the subdomain used to create this authenticated domain. +type AuthenticatedDomainSpfDnsSubdomainSpf struct { + // The domain that this SPF record will be used to authenticate. + Host string `json:"host"` + // The type of data in the SPF record. + Type string `json:"type"` + // The SPF record. + Data string `json:"data"` + // Indicates if this is a valid SPF record. + Valid bool `json:"valid"` +} diff --git a/rest/api/v3/domain_authentication/model_email_dns_record_400_response.go b/rest/api/v3/domain_authentication/model_email_dns_record_400_response.go new file mode 100644 index 00000000..5c9bd4d1 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_email_dns_record_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// EmailDnsRecord400Response struct for EmailDnsRecord400Response +type EmailDnsRecord400Response struct { + Errors *EmailDnsRecord400ResponseErrors `json:"errors,omitempty"` +} diff --git a/rest/api/v3/domain_authentication/model_email_dns_record_400_response_errors.go b/rest/api/v3/domain_authentication/model_email_dns_record_400_response_errors.go new file mode 100644 index 00000000..b694a199 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_email_dns_record_400_response_errors.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// EmailDnsRecord400ResponseErrors struct for EmailDnsRecord400ResponseErrors +type EmailDnsRecord400ResponseErrors struct { + Error *string `json:"error,omitempty"` + Field *string `json:"field,omitempty"` +} diff --git a/rest/api/v3/domain_authentication/model_email_dns_record_request.go b/rest/api/v3/domain_authentication/model_email_dns_record_request.go new file mode 100644 index 00000000..f8ddf111 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_email_dns_record_request.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// EmailDnsRecordRequest struct for EmailDnsRecordRequest +type EmailDnsRecordRequest struct { + // The ID of the branded link. + LinkId int32 `json:"link_id"` + // The ID of your SendGrid domain record. + DomainId int32 `json:"domain_id"` + // The email address to send the DNS information to. + Email string `json:"email"` + // A custom text block to include in the email body sent with the records. + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner.go b/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner.go new file mode 100644 index 00000000..ffc38779 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner.go @@ -0,0 +1,41 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListAllAuthenticatedDomainWithUser200ResponseInner struct for ListAllAuthenticatedDomainWithUser200ResponseInner +type ListAllAuthenticatedDomainWithUser200ResponseInner struct { + // The ID of the authenticated domain. + Id float32 `json:"id"` + // The ID of the user that this domain is associated with. + UserId float32 `json:"user_id"` + // The subdomain to use for this authenticated domain. + Subdomain string `json:"subdomain"` + // The domain to be authenticated. + Domain string `json:"domain"` + // The username that this domain will be associated with. + Username string `json:"username"` + // The IPs to be included in the custom SPF record for this authenticated domain. + Ips []string `json:"ips"` + // Indicates whether this authenticated domain uses custom SPF. + CustomSpf bool `json:"custom_spf"` + // Indicates if this is the default authenticated domain. + Default bool `json:"default"` + // Indicates if this authenticated domain was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new authenticated domain if you need to update it. + Legacy bool `json:"legacy"` + // Indicates if this authenticated domain uses automated security. + AutomaticSecurity bool `json:"automatic_security"` + // Indicates if this is a valid authenticated domain. + Valid bool `json:"valid"` + Dns ListAllAuthenticatedDomainWithUser200ResponseInnerDns `json:"dns"` +} diff --git a/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns.go b/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns.go new file mode 100644 index 00000000..4d4066b6 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListAllAuthenticatedDomainWithUser200ResponseInnerDns The DNS records used to authenticate the sending domain. +type ListAllAuthenticatedDomainWithUser200ResponseInnerDns struct { + MailCname ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname `json:"mail_cname"` + Dkim1 ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1 `json:"dkim1"` + Dkim2 ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1 `json:"dkim2"` +} diff --git a/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns_dkim1.go b/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns_dkim1.go new file mode 100644 index 00000000..527e6c15 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns_dkim1.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1 A DNS record. +type ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1 struct { + // Indicates if this is a valid DNS record. + Valid bool `json:"valid"` + // The type of DNS record. + Type string `json:"type"` + // The domain that this DNS record was created for. + Host string `json:"host"` + // The DNS record. + Data string `json:"data"` +} diff --git a/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns_mail_cname.go b/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns_mail_cname.go new file mode 100644 index 00000000..fe6f1868 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns_mail_cname.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname The CNAME for your sending domain that points to sendgrid.net. +type ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname struct { + // Indicates if this is a valid CNAME. + Valid bool `json:"valid"` + // The type of DNS record. + Type string `json:"type"` + // The domain that this CNAME is created for. + Host string `json:"host"` + // The CNAME record. + Data string `json:"data"` +} diff --git a/rest/api/v3/domain_authentication/model_update_authenticated_domain_request.go b/rest/api/v3/domain_authentication/model_update_authenticated_domain_request.go new file mode 100644 index 00000000..37075169 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_update_authenticated_domain_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateAuthenticatedDomainRequest struct for UpdateAuthenticatedDomainRequest +type UpdateAuthenticatedDomainRequest struct { + // Indicates whether this is the default authenticated domain. + Default *bool `json:"default,omitempty"` + // Indicates whether to generate a custom SPF record for manual security. + CustomSpf *bool `json:"custom_spf,omitempty"` +} diff --git a/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response.go b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response.go new file mode 100644 index 00000000..8d90293f --- /dev/null +++ b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateAuthenticatedDomain200Response struct for ValidateAuthenticatedDomain200Response +type ValidateAuthenticatedDomain200Response struct { + // The ID of the authenticated domain. + Id *int32 `json:"id,omitempty"` + // Indicates if this is a valid authenticated domain. + Valid *bool `json:"valid,omitempty"` + ValidationResults *ValidateAuthenticatedDomain200ResponseValidationResults `json:"validation_results,omitempty"` +} diff --git a/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results.go b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results.go new file mode 100644 index 00000000..127ec9c9 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateAuthenticatedDomain200ResponseValidationResults The individual DNS records that are checked when validating, including the reason for any invalid DNS records. +type ValidateAuthenticatedDomain200ResponseValidationResults struct { + MailCname *ValidateAuthenticatedDomain200ResponseValidationResultsMailCname `json:"mail_cname,omitempty"` + Dkim1 *ValidateAuthenticatedDomain200ResponseValidationResultsDkim1 `json:"dkim1,omitempty"` + Dkim2 *ValidateAuthenticatedDomain200ResponseValidationResultsDkim1 `json:"dkim2,omitempty"` + Spf *ValidateAuthenticatedDomain200ResponseValidationResultsSpf `json:"spf,omitempty"` +} diff --git a/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_dkim1.go b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_dkim1.go new file mode 100644 index 00000000..9a8df2e2 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_dkim1.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateAuthenticatedDomain200ResponseValidationResultsDkim1 A DNS record for this authenticated domain. +type ValidateAuthenticatedDomain200ResponseValidationResultsDkim1 struct { + // Indicates if the DNS record is valid. + Valid *bool `json:"valid,omitempty"` + Reason *string `json:"reason,omitempty"` +} diff --git a/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_mail_cname.go b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_mail_cname.go new file mode 100644 index 00000000..d7664480 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_mail_cname.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateAuthenticatedDomain200ResponseValidationResultsMailCname The CNAME record for the authenticated domain. +type ValidateAuthenticatedDomain200ResponseValidationResultsMailCname struct { + // Indicates if this DNS record is valid. + Valid *bool `json:"valid,omitempty"` + // The reason this record is invalid. + Reason *string `json:"reason,omitempty"` +} diff --git a/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_spf.go b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_spf.go new file mode 100644 index 00000000..1505eba8 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_spf.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateAuthenticatedDomain200ResponseValidationResultsSpf The SPF record for the authenticated domain. +type ValidateAuthenticatedDomain200ResponseValidationResultsSpf struct { + // Indicates if the SPF record is valid. + Valid *bool `json:"valid,omitempty"` + Reason *string `json:"reason,omitempty"` +} diff --git a/rest/api/v3/domain_authentication/model_validate_authenticated_domain_500_response.go b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_500_response.go new file mode 100644 index 00000000..d3f70be7 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_500_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateAuthenticatedDomain500Response struct for ValidateAuthenticatedDomain500Response +type ValidateAuthenticatedDomain500Response struct { + Errors *[]ValidateAuthenticatedDomain500ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/domain_authentication/model_validate_authenticated_domain_500_response_errors_inner.go b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_500_response_errors_inner.go new file mode 100644 index 00000000..fc47a4c6 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_500_response_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateAuthenticatedDomain500ResponseErrorsInner struct for ValidateAuthenticatedDomain500ResponseErrorsInner +type ValidateAuthenticatedDomain500ResponseErrorsInner struct { + // A message explaining the reason for the error. + Message string `json:"message"` +} diff --git a/rest/api/v3/email_activity/.openapi-generator b/rest/api/v3/email_activity/.openapi-generator new file mode 100644 index 00000000..2406166e --- /dev/null +++ b/rest/api/v3/email_activity/.openapi-generator @@ -0,0 +1,58 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_download_csv.go +api_get_message.go +api_list_message.go +api_request_csv.go +api_service.go +docs/AbbvMessage.md +docs/BounceType.md +docs/BounceType1.md +docs/DownloadCsv.md +docs/DownloadCsv200Response.md +docs/EmailActivityResponseBaseProps.md +docs/Event.md +docs/EventName.md +docs/EventName1.md +docs/GetMessage.md +docs/GetMessage404Response.md +docs/GetMessage404ResponseErrorsInner.md +docs/ListMessage.md +docs/ListMessage200Response.md +docs/ListMessage400Response.md +docs/ListMessage400ResponseErrorsInner.md +docs/ListMessage429Response.md +docs/ListMessage429ResponseErrorsInner.md +docs/Message.md +docs/OutboundIpType.md +docs/OutboundIpType1.md +docs/RequestCsv.md +docs/RequestCsv202Response.md +docs/Status.md +docs/Status1.md +docs/Status2.md +docs/Status3.md +model_abbv__message.go +model_bounce_type.go +model_bounce_type1.go +model_download_csv_200_response.go +model_email_activity_response_base_props.go +model_event.go +model_event_name.go +model_event_name1.go +model_get_message_404_response.go +model_get_message_404_response_errors_inner.go +model_list_message_200_response.go +model_list_message_400_response.go +model_list_message_400_response_errors_inner.go +model_list_message_429_response.go +model_list_message_429_response_errors_inner.go +model_message.go +model_outbound_ip_type.go +model_outbound_ip_type1.go +model_request_csv_202_response.go +model_status.go +model_status1.go +model_status2.go +model_status3.go diff --git a/rest/api/v3/email_activity/.openapi-generator-ignore b/rest/api/v3/email_activity/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/email_activity/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/email_activity/README.md b/rest/api/v3/email_activity/README.md new file mode 100644 index 00000000..da29d146 --- /dev/null +++ b/rest/api/v3/email_activity/README.md @@ -0,0 +1,89 @@ +# Go API client for + +The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. + +You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. + +See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:43.522151+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DownloadCsv* | [**DownloadCsv**](docs/DownloadCsv.md#downloadcsv) | **Get** /v3/messages/download/{DownloadUuid} | Download CSV +*GetMessage* | [**GetMessage**](docs/GetMessage.md#getmessage) | **Get** /v3/messages/{MsgId} | Filter messages by message ID +*ListMessage* | [**ListMessage**](docs/ListMessage.md#listmessage) | **Get** /v3/messages | Filter all messages +*RequestCsv* | [**RequestCsv**](docs/RequestCsv.md#requestcsv) | **Post** /v3/messages/download | Request CSV + + +## Documentation For Models + + - [AbbvMessage](AbbvMessage.md) + - [BounceType](BounceType.md) + - [BounceType1](BounceType1.md) + - [DownloadCsv200Response](DownloadCsv200Response.md) + - [EmailActivityResponseBaseProps](EmailActivityResponseBaseProps.md) + - [Event](Event.md) + - [EventName](EventName.md) + - [EventName1](EventName1.md) + - [GetMessage404Response](GetMessage404Response.md) + - [GetMessage404ResponseErrorsInner](GetMessage404ResponseErrorsInner.md) + - [ListMessage200Response](ListMessage200Response.md) + - [ListMessage400Response](ListMessage400Response.md) + - [ListMessage400ResponseErrorsInner](ListMessage400ResponseErrorsInner.md) + - [ListMessage429Response](ListMessage429Response.md) + - [ListMessage429ResponseErrorsInner](ListMessage429ResponseErrorsInner.md) + - [Message](Message.md) + - [OutboundIpType](OutboundIpType.md) + - [OutboundIpType1](OutboundIpType1.md) + - [RequestCsv202Response](RequestCsv202Response.md) + - [Status](Status.md) + - [Status1](Status1.md) + - [Status2](Status2.md) + - [Status3](Status3.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/email_activity/api_download_csv.go b/rest/api/v3/email_activity/api_download_csv.go new file mode 100644 index 00000000..8ca4e14c --- /dev/null +++ b/rest/api/v3/email_activity/api_download_csv.go @@ -0,0 +1,76 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DownloadCsvParam struct { + // UUID used to locate the download csv request entry in the DB. This is the UUID provided in the email sent to the user when their csv file is ready to download + DownloadUuid *string `json:"download_uuid"` +} + +func (params *DownloadCsvParam) SetDownloadUuid(DownloadUuid string) *DownloadCsvParam { + params.DownloadUuid = &DownloadUuid + return params +} + +// **This endpoint will return a presigned URL that can be used to download the CSV that was requested from the \"Request a CSV\" endpoint.** +func (c *ApiService) DownloadCsv(params *DownloadCsvParam) (interface{}, error) { + path := "/v3/messages/download/{DownloadUuid}" + if params != nil && params.DownloadUuid != nil { + path = strings.Replace(path, "{"+"DownloadUuid"+"}", *params.DownloadUuid, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &DownloadCsv200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ListMessage429Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListMessage429Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/email_activity/api_get_message.go b/rest/api/v3/email_activity/api_get_message.go new file mode 100644 index 00000000..9466caef --- /dev/null +++ b/rest/api/v3/email_activity/api_get_message.go @@ -0,0 +1,84 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type GetMessageParam struct { + // The ID of the message you are requesting details for. + MsgId *string `json:"msg_id"` +} + +func (params *GetMessageParam) SetMsgId(MsgId string) *GetMessageParam { + params.MsgId = &MsgId + return params +} + +// Get all of the details about the specified message. +func (c *ApiService) GetMessage(params *GetMessageParam) (interface{}, error) { + path := "/v3/messages/{MsgId}" + if params != nil && params.MsgId != nil { + path = strings.Replace(path, "{"+"MsgId"+"}", *params.MsgId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &Message{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ListMessage429Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &GetMessage404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &ListMessage429Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/email_activity/api_list_message.go b/rest/api/v3/email_activity/api_list_message.go new file mode 100644 index 00000000..9788cb21 --- /dev/null +++ b/rest/api/v3/email_activity/api_list_message.go @@ -0,0 +1,85 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListMessageParam struct { + // Use the query syntax to filter your email activity. + Query *string `json:"query"` + // The number of messages returned. This parameter must be greater than 0 and less than or equal to 1000 + Limit *float32 `json:"limit,omitempty"` +} + +func (params *ListMessageParam) SetQuery(Query string) *ListMessageParam { + params.Query = &Query + return params +} +func (params *ListMessageParam) SetLimit(Limit float32) *ListMessageParam { + params.Limit = &Limit + return params +} + +// Filter all messages to search your Email Activity. All queries must be [URL encoded](https://meyerweb.com/eric/tools/dencoder/), and use the following format: `query={query_type}=\"{query_content}\"` Once URL encoded, the previous query will look like this: `query=type%3D%22query_content%22` For example, to filter by a specific email, use the following query: `query=to_email%3D%22example%40example.com%22` Visit our [Query Reference section](https://docs.sendgrid.com/for-developers/sending-email/getting-started-email-activity-api#query-reference) to see a full list of basic query types and examples. +func (c *ApiService) ListMessage(params *ListMessageParam) (interface{}, error) { + path := "/v3/messages" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Query != nil { + data.Set("query", *params.Query) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListMessage200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ListMessage400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &ListMessage429Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/email_activity/api_request_csv.go b/rest/api/v3/email_activity/api_request_csv.go new file mode 100644 index 00000000..6c195154 --- /dev/null +++ b/rest/api/v3/email_activity/api_request_csv.go @@ -0,0 +1,83 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type RequestCsvParam struct { + // Uses a SQL like syntax to indicate which messages to include in the CSV + Query *string `json:"query,omitempty"` +} + +func (params *RequestCsvParam) SetQuery(Query string) *RequestCsvParam { + params.Query = &Query + return params +} + +// This request will kick off a backend process to generate a CSV file. Once generated, the worker will then send an email for the user download the file. The link will expire in 3 days. The CSV will contain the events from the last 30 days, limited to the last 1 million events maximum. This endpoint will be rate limited to 1 request every 12 hours (rate limit may change). This endpoint is similar to the GET Single Message endpoint - the only difference is that /download is added to indicate that this is a CSV download requests but the same query is used to determine what the CSV should contain. +func (c *ApiService) RequestCsv(params *RequestCsvParam) (interface{}, error) { + path := "/v3/messages/download" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Query != nil { + data.Set("query", *params.Query) + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 202 { + ps := &RequestCsv202Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ListMessage429Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &ListMessage429Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListMessage429Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/email_activity/api_service.go b/rest/api/v3/email_activity/api_service.go new file mode 100644 index 00000000..9a929e14 --- /dev/null +++ b/rest/api/v3/email_activity/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/email_activity/docs/AbbvMessage.md b/rest/api/v3/email_activity/docs/AbbvMessage.md new file mode 100644 index 00000000..d5eb580e --- /dev/null +++ b/rest/api/v3/email_activity/docs/AbbvMessage.md @@ -0,0 +1,18 @@ +# AbbvMessage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FromEmail** | **string** | | +**MsgId** | **string** | | +**Subject** | **string** | | +**ToEmail** | **string** | | +**Status** | [**Status**](Status.md) | | +**OpensCount** | **int32** | | +**ClicksCount** | **int32** | | +**LastEventTime** | **string** | iso 8601 format | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/BounceType.md b/rest/api/v3/email_activity/docs/BounceType.md new file mode 100644 index 00000000..d419a200 --- /dev/null +++ b/rest/api/v3/email_activity/docs/BounceType.md @@ -0,0 +1,13 @@ +# BounceType + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**SOFT** | string | (value: `"soft"`) +**HARD** | string | (value: `"hard"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/BounceType1.md b/rest/api/v3/email_activity/docs/BounceType1.md new file mode 100644 index 00000000..6c717285 --- /dev/null +++ b/rest/api/v3/email_activity/docs/BounceType1.md @@ -0,0 +1,13 @@ +# BounceType1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**SOFT** | string | (value: `"soft"`) +**HARD** | string | (value: `"hard"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/DownloadCsv.md b/rest/api/v3/email_activity/docs/DownloadCsv.md new file mode 100644 index 00000000..e53ea921 --- /dev/null +++ b/rest/api/v3/email_activity/docs/DownloadCsv.md @@ -0,0 +1,51 @@ +# DownloadCsv + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DownloadCsv**](DownloadCsv.md#DownloadCsv) | **Get** /v3/messages/download/{DownloadUuid} | Download CSV + + + +## DownloadCsv + +> DownloadCsv200Response DownloadCsv(ctx, DownloadUuid) + +Download CSV + +**This endpoint will return a presigned URL that can be used to download the CSV that was requested from the \"Request a CSV\" endpoint.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**DownloadUuid** | **string** | UUID used to locate the download csv request entry in the DB. This is the UUID provided in the email sent to the user when their csv file is ready to download + +### Other Parameters + +Other parameters are passed through a pointer to a DownloadCsvParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**DownloadCsv200Response**](DownloadCsv200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/email_activity/docs/DownloadCsv200Response.md b/rest/api/v3/email_activity/docs/DownloadCsv200Response.md new file mode 100644 index 00000000..5a2abcc5 --- /dev/null +++ b/rest/api/v3/email_activity/docs/DownloadCsv200Response.md @@ -0,0 +1,12 @@ +# DownloadCsv200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PresignedUrl** | **string** | A signed link that will allow you to download the CSV file requested by the Request a CSV endpoint. |[optional] +**Csv** | **string** | Returns the aws signed link to the csv file which mako UI should perform a get on to trigger the csv download for the user | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/EmailActivityResponseBaseProps.md b/rest/api/v3/email_activity/docs/EmailActivityResponseBaseProps.md new file mode 100644 index 00000000..9a6546f4 --- /dev/null +++ b/rest/api/v3/email_activity/docs/EmailActivityResponseBaseProps.md @@ -0,0 +1,15 @@ +# EmailActivityResponseBaseProps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FromEmail** | **string** | The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account. |[optional] [default to "test0@example.com"] +**MsgId** | **string** | A unique ID assigned to the message. This ID can be used to retrieve activity data for the specific message. |[optional] +**Subject** | **string** | The email's subject line. |[optional] +**ToEmail** | **string** | The intended recipient's email address. |[optional] +**Status** | [**Status3**](Status3.md) | The message's status. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/Event.md b/rest/api/v3/email_activity/docs/Event.md new file mode 100644 index 00000000..78e02233 --- /dev/null +++ b/rest/api/v3/email_activity/docs/Event.md @@ -0,0 +1,18 @@ +# Event + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EventName** | [**EventName**](EventName.md) | Name of event | +**Processed** | **string** | The date when the event was processed | +**Reason** | **string** | Explanation of what caused the message to be \"bounced\", \"deferred\", or \"blocked\". Usually contains error message from the server - e.g. message from gmail why mail was deferred. |[optional] +**AttemptNum** | **int32** | Used with \"deferred\" events to indicate the attempt number out of 10. One \"deferred\" entry will exists under events array for each time a message was deferred with error message from the server. |[optional] +**Url** | **string** | Used with \"clicked\" event to indicate which url the user clicked. |[optional] +**BounceType** | [**BounceType**](BounceType.md) | Use to distinguish between types of bounces | +**HttpUserAgent** | **string** | Client recipient used to click or open message | +**MxServer** | **string** | The MX server that received the email. For example, mx.gmail.com | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/EventName.md b/rest/api/v3/email_activity/docs/EventName.md new file mode 100644 index 00000000..fc3500e5 --- /dev/null +++ b/rest/api/v3/email_activity/docs/EventName.md @@ -0,0 +1,22 @@ +# EventName + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**BOUNCED** | string | (value: `"bounced"`) +**OPENED** | string | (value: `"opened"`) +**CLICKED** | string | (value: `"clicked"`) +**PROCESSED** | string | (value: `"processed"`) +**DROPPED** | string | (value: `"dropped"`) +**DELIVERED** | string | (value: `"delivered"`) +**DEFERRED** | string | (value: `"deferred"`) +**SPAM_REPORT** | string | (value: `"spam_report"`) +**UNSUBSCRIBE** | string | (value: `"unsubscribe"`) +**GROUP_UNSUBSCRIBE** | string | (value: `"group_unsubscribe"`) +**GROUP_RESUBSCRIBE** | string | (value: `"group_resubscribe"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/EventName1.md b/rest/api/v3/email_activity/docs/EventName1.md new file mode 100644 index 00000000..32f92dff --- /dev/null +++ b/rest/api/v3/email_activity/docs/EventName1.md @@ -0,0 +1,22 @@ +# EventName1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**BOUNCED** | string | (value: `"bounced"`) +**OPENED** | string | (value: `"opened"`) +**CLICKED** | string | (value: `"clicked"`) +**PROCESSED** | string | (value: `"processed"`) +**DROPPED** | string | (value: `"dropped"`) +**DELIVERED** | string | (value: `"delivered"`) +**DEFERRED** | string | (value: `"deferred"`) +**SPAM_REPORT** | string | (value: `"spam_report"`) +**UNSUBSCRIBE** | string | (value: `"unsubscribe"`) +**GROUP_UNSUBSCRIBE** | string | (value: `"group_unsubscribe"`) +**GROUP_RESUBSCRIBE** | string | (value: `"group_resubscribe"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/GetMessage.md b/rest/api/v3/email_activity/docs/GetMessage.md new file mode 100644 index 00000000..aa7a5818 --- /dev/null +++ b/rest/api/v3/email_activity/docs/GetMessage.md @@ -0,0 +1,51 @@ +# GetMessage + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetMessage**](GetMessage.md#GetMessage) | **Get** /v3/messages/{MsgId} | Filter messages by message ID + + + +## GetMessage + +> Message GetMessage(ctx, MsgId) + +Filter messages by message ID + +Get all of the details about the specified message. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**MsgId** | **string** | The ID of the message you are requesting details for. + +### Other Parameters + +Other parameters are passed through a pointer to a GetMessageParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**Message**](Message.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/email_activity/docs/GetMessage404Response.md b/rest/api/v3/email_activity/docs/GetMessage404Response.md new file mode 100644 index 00000000..488a3b4d --- /dev/null +++ b/rest/api/v3/email_activity/docs/GetMessage404Response.md @@ -0,0 +1,11 @@ +# GetMessage404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]GetMessage404ResponseErrorsInner**](GetMessage404ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/GetMessage404ResponseErrorsInner.md b/rest/api/v3/email_activity/docs/GetMessage404ResponseErrorsInner.md new file mode 100644 index 00000000..fd1ec1f1 --- /dev/null +++ b/rest/api/v3/email_activity/docs/GetMessage404ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# GetMessage404ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | |[optional] +**Field** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/ListMessage.md b/rest/api/v3/email_activity/docs/ListMessage.md new file mode 100644 index 00000000..e2438fc5 --- /dev/null +++ b/rest/api/v3/email_activity/docs/ListMessage.md @@ -0,0 +1,48 @@ +# ListMessage + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListMessage**](ListMessage.md#ListMessage) | **Get** /v3/messages | Filter all messages + + + +## ListMessage + +> ListMessage200Response ListMessage(ctx, Queryoptional) + +Filter all messages + +Filter all messages to search your Email Activity. All queries must be [URL encoded](https://meyerweb.com/eric/tools/dencoder/), and use the following format: `query={query_type}=\"{query_content}\"` Once URL encoded, the previous query will look like this: `query=type%3D%22query_content%22` For example, to filter by a specific email, use the following query: `query=to_email%3D%22example%40example.com%22` Visit our [Query Reference section](https://docs.sendgrid.com/for-developers/sending-email/getting-started-email-activity-api#query-reference) to see a full list of basic query types and examples. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListMessageParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **float32** | The number of messages returned. This parameter must be greater than 0 and less than or equal to 1000 + +### Return type + +[**ListMessage200Response**](ListMessage200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/email_activity/docs/ListMessage200Response.md b/rest/api/v3/email_activity/docs/ListMessage200Response.md new file mode 100644 index 00000000..4c8b0b60 --- /dev/null +++ b/rest/api/v3/email_activity/docs/ListMessage200Response.md @@ -0,0 +1,11 @@ +# ListMessage200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Messages** | [**[]AbbvMessage**](AbbvMessage.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/ListMessage400Response.md b/rest/api/v3/email_activity/docs/ListMessage400Response.md new file mode 100644 index 00000000..66b20996 --- /dev/null +++ b/rest/api/v3/email_activity/docs/ListMessage400Response.md @@ -0,0 +1,11 @@ +# ListMessage400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ListMessage400ResponseErrorsInner**](ListMessage400ResponseErrorsInner.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/ListMessage400ResponseErrorsInner.md b/rest/api/v3/email_activity/docs/ListMessage400ResponseErrorsInner.md new file mode 100644 index 00000000..f75aa149 --- /dev/null +++ b/rest/api/v3/email_activity/docs/ListMessage400ResponseErrorsInner.md @@ -0,0 +1,11 @@ +# ListMessage400ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/ListMessage429Response.md b/rest/api/v3/email_activity/docs/ListMessage429Response.md new file mode 100644 index 00000000..5f0af5e3 --- /dev/null +++ b/rest/api/v3/email_activity/docs/ListMessage429Response.md @@ -0,0 +1,11 @@ +# ListMessage429Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ListMessage429ResponseErrorsInner**](ListMessage429ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/ListMessage429ResponseErrorsInner.md b/rest/api/v3/email_activity/docs/ListMessage429ResponseErrorsInner.md new file mode 100644 index 00000000..14d3e696 --- /dev/null +++ b/rest/api/v3/email_activity/docs/ListMessage429ResponseErrorsInner.md @@ -0,0 +1,11 @@ +# ListMessage429ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/Message.md b/rest/api/v3/email_activity/docs/Message.md new file mode 100644 index 00000000..db81f245 --- /dev/null +++ b/rest/api/v3/email_activity/docs/Message.md @@ -0,0 +1,25 @@ +# Message + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FromEmail** | **string** | The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account. |[optional] [default to "test0@example.com"] +**MsgId** | **string** | A unique ID assigned to the message. This ID can be used to retrieve activity data for the specific message. |[optional] +**Subject** | **string** | The email's subject line. |[optional] +**ToEmail** | **string** | The intended recipient's email address. |[optional] +**Status** | [**Status3**](Status3.md) | The message's status. |[optional] +**TemplateId** | **string** | The ID associated with a Twilio SendGrid email template used to format the message. | +**AsmGroupId** | **int32** | The unsubscribe group associated with this email. | +**Teammate** | **string** | Teammate's username | +**ApiKeyId** | **string** | The ID of the API Key used to authenticate the sending request for the message. | +**Events** | [**[]Event**](Event.md) | List of events related to email message | +**OriginatingIp** | **string** | This is the IP of the user who sent the message. | +**Categories** | **[]string** | Categories users associated to the message | +**UniqueArgs** | **string** | JSON hash of key-value pairs associated with the message. |[default to "Null"] +**OutboundIp** | **string** | IP used to send to the remote Mail Transfer Agent. | +**OutboundIpType** | [**OutboundIpType**](OutboundIpType.md) | Whether or not the outbound IP is dedicated vs shared | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/OutboundIpType.md b/rest/api/v3/email_activity/docs/OutboundIpType.md new file mode 100644 index 00000000..0b59274a --- /dev/null +++ b/rest/api/v3/email_activity/docs/OutboundIpType.md @@ -0,0 +1,13 @@ +# OutboundIpType + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DEDICATED** | string | (value: `"dedicated"`) +**SHARED** | string | (value: `"shared"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/OutboundIpType1.md b/rest/api/v3/email_activity/docs/OutboundIpType1.md new file mode 100644 index 00000000..e6261498 --- /dev/null +++ b/rest/api/v3/email_activity/docs/OutboundIpType1.md @@ -0,0 +1,13 @@ +# OutboundIpType1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DEDICATED** | string | (value: `"dedicated"`) +**SHARED** | string | (value: `"shared"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/RequestCsv.md b/rest/api/v3/email_activity/docs/RequestCsv.md new file mode 100644 index 00000000..c18ac4b3 --- /dev/null +++ b/rest/api/v3/email_activity/docs/RequestCsv.md @@ -0,0 +1,48 @@ +# RequestCsv + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**RequestCsv**](RequestCsv.md#RequestCsv) | **Post** /v3/messages/download | Request CSV + + + +## RequestCsv + +> RequestCsv202Response RequestCsv(ctx, optional) + +Request CSV + +This request will kick off a backend process to generate a CSV file. Once generated, the worker will then send an email for the user download the file. The link will expire in 3 days. The CSV will contain the events from the last 30 days, limited to the last 1 million events maximum. This endpoint will be rate limited to 1 request every 12 hours (rate limit may change). This endpoint is similar to the GET Single Message endpoint - the only difference is that /download is added to indicate that this is a CSV download requests but the same query is used to determine what the CSV should contain. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a RequestCsvParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Query** | **string** | Uses a SQL like syntax to indicate which messages to include in the CSV + +### Return type + +[**RequestCsv202Response**](RequestCsv202Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/email_activity/docs/RequestCsv202Response.md b/rest/api/v3/email_activity/docs/RequestCsv202Response.md new file mode 100644 index 00000000..04c55510 --- /dev/null +++ b/rest/api/v3/email_activity/docs/RequestCsv202Response.md @@ -0,0 +1,12 @@ +# RequestCsv202Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | [**Status2**](Status2.md) | |[optional] +**Message** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/Status.md b/rest/api/v3/email_activity/docs/Status.md new file mode 100644 index 00000000..9c0176ea --- /dev/null +++ b/rest/api/v3/email_activity/docs/Status.md @@ -0,0 +1,14 @@ +# Status + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**PROCESSED** | string | (value: `"processed"`) +**DELIVERED** | string | (value: `"delivered"`) +**NOT_DELIVERED** | string | (value: `"not_delivered"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/Status1.md b/rest/api/v3/email_activity/docs/Status1.md new file mode 100644 index 00000000..835d5e5c --- /dev/null +++ b/rest/api/v3/email_activity/docs/Status1.md @@ -0,0 +1,14 @@ +# Status1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**PROCESSED** | string | (value: `"processed"`) +**NOT_DELIVERED** | string | (value: `"not_delivered"`) +**DELIVERED** | string | (value: `"delivered"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/Status2.md b/rest/api/v3/email_activity/docs/Status2.md new file mode 100644 index 00000000..35da3328 --- /dev/null +++ b/rest/api/v3/email_activity/docs/Status2.md @@ -0,0 +1,12 @@ +# Status2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**PENDING** | string | (value: `"pending"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/Status3.md b/rest/api/v3/email_activity/docs/Status3.md new file mode 100644 index 00000000..0cccb107 --- /dev/null +++ b/rest/api/v3/email_activity/docs/Status3.md @@ -0,0 +1,14 @@ +# Status3 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**PROCESSED** | string | (value: `"processed"`) +**DELIVERED** | string | (value: `"delivered"`) +**NOT_DELIVERED** | string | (value: `"not_delivered"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/model_abbv__message.go b/rest/api/v3/email_activity/model_abbv__message.go new file mode 100644 index 00000000..11ab95ae --- /dev/null +++ b/rest/api/v3/email_activity/model_abbv__message.go @@ -0,0 +1,27 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AbbvMessage struct for AbbvMessage +type AbbvMessage struct { + FromEmail string `json:"from_email"` + MsgId string `json:"msg_id"` + Subject string `json:"subject"` + ToEmail string `json:"to_email"` + Status Status `json:"status"` + OpensCount int32 `json:"opens_count"` + ClicksCount int32 `json:"clicks_count"` + // iso 8601 format + LastEventTime string `json:"last_event_time"` +} diff --git a/rest/api/v3/email_activity/model_bounce_type.go b/rest/api/v3/email_activity/model_bounce_type.go new file mode 100644 index 00000000..76c31a7f --- /dev/null +++ b/rest/api/v3/email_activity/model_bounce_type.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// BounceType the model 'BounceType' +type BounceType string + +// List of BounceType +const ( + BOUNCETYPE_SOFT BounceType = "soft" + BOUNCETYPE_HARD BounceType = "hard" +) diff --git a/rest/api/v3/email_activity/model_bounce_type1.go b/rest/api/v3/email_activity/model_bounce_type1.go new file mode 100644 index 00000000..a9c49152 --- /dev/null +++ b/rest/api/v3/email_activity/model_bounce_type1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// BounceType1 the model 'BounceType1' +type BounceType1 string + +// List of BounceType1 +const ( + BOUNCETYPE1_SOFT BounceType1 = "soft" + BOUNCETYPE1_HARD BounceType1 = "hard" +) diff --git a/rest/api/v3/email_activity/model_download_csv_200_response.go b/rest/api/v3/email_activity/model_download_csv_200_response.go new file mode 100644 index 00000000..ee65ebd8 --- /dev/null +++ b/rest/api/v3/email_activity/model_download_csv_200_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DownloadCsv200Response struct for DownloadCsv200Response +type DownloadCsv200Response struct { + // A signed link that will allow you to download the CSV file requested by the Request a CSV endpoint. + PresignedUrl *string `json:"presigned_url,omitempty"` + // Returns the aws signed link to the csv file which mako UI should perform a get on to trigger the csv download for the user + Csv string `json:"csv"` +} diff --git a/rest/api/v3/email_activity/model_email_activity_response_base_props.go b/rest/api/v3/email_activity/model_email_activity_response_base_props.go new file mode 100644 index 00000000..3de2c61d --- /dev/null +++ b/rest/api/v3/email_activity/model_email_activity_response_base_props.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// EmailActivityResponseBaseProps struct for EmailActivityResponseBaseProps +type EmailActivityResponseBaseProps struct { + // The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account. + FromEmail *string `json:"from_email,omitempty"` + // A unique ID assigned to the message. This ID can be used to retrieve activity data for the specific message. + MsgId *string `json:"msg_id,omitempty"` + // The email's subject line. + Subject *string `json:"subject,omitempty"` + // The intended recipient's email address. + ToEmail *string `json:"to_email,omitempty"` + // The message's status. + Status *Status3 `json:"status,omitempty"` +} diff --git a/rest/api/v3/email_activity/model_event.go b/rest/api/v3/email_activity/model_event.go new file mode 100644 index 00000000..1353170d --- /dev/null +++ b/rest/api/v3/email_activity/model_event.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Event struct for Event +type Event struct { + // Name of event + EventName EventName `json:"event_name"` + // The date when the event was processed + Processed string `json:"processed"` + // Explanation of what caused the message to be \"bounced\", \"deferred\", or \"blocked\". Usually contains error message from the server - e.g. message from gmail why mail was deferred. + Reason *string `json:"reason,omitempty"` + // Used with \"deferred\" events to indicate the attempt number out of 10. One \"deferred\" entry will exists under events array for each time a message was deferred with error message from the server. + AttemptNum *int32 `json:"attempt_num,omitempty"` + // Used with \"clicked\" event to indicate which url the user clicked. + Url *string `json:"url,omitempty"` + // Use to distinguish between types of bounces + BounceType BounceType `json:"bounce_type"` + // Client recipient used to click or open message + HttpUserAgent string `json:"http_user_agent"` + // The MX server that received the email. For example, mx.gmail.com + MxServer string `json:"mx_server"` +} diff --git a/rest/api/v3/email_activity/model_event_name.go b/rest/api/v3/email_activity/model_event_name.go new file mode 100644 index 00000000..0756869a --- /dev/null +++ b/rest/api/v3/email_activity/model_event_name.go @@ -0,0 +1,32 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// EventName the model 'EventName' +type EventName string + +// List of EventName +const ( + EVENTNAME_BOUNCED EventName = "bounced" + EVENTNAME_OPENED EventName = "opened" + EVENTNAME_CLICKED EventName = "clicked" + EVENTNAME_PROCESSED EventName = "processed" + EVENTNAME_DROPPED EventName = "dropped" + EVENTNAME_DELIVERED EventName = "delivered" + EVENTNAME_DEFERRED EventName = "deferred" + EVENTNAME_SPAM_REPORT EventName = "spam_report" + EVENTNAME_UNSUBSCRIBE EventName = "unsubscribe" + EVENTNAME_GROUP_UNSUBSCRIBE EventName = "group_unsubscribe" + EVENTNAME_GROUP_RESUBSCRIBE EventName = "group_resubscribe" +) diff --git a/rest/api/v3/email_activity/model_event_name1.go b/rest/api/v3/email_activity/model_event_name1.go new file mode 100644 index 00000000..28041369 --- /dev/null +++ b/rest/api/v3/email_activity/model_event_name1.go @@ -0,0 +1,32 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// EventName1 the model 'EventName1' +type EventName1 string + +// List of EventName1 +const ( + EVENTNAME1_BOUNCED EventName1 = "bounced" + EVENTNAME1_OPENED EventName1 = "opened" + EVENTNAME1_CLICKED EventName1 = "clicked" + EVENTNAME1_PROCESSED EventName1 = "processed" + EVENTNAME1_DROPPED EventName1 = "dropped" + EVENTNAME1_DELIVERED EventName1 = "delivered" + EVENTNAME1_DEFERRED EventName1 = "deferred" + EVENTNAME1_SPAM_REPORT EventName1 = "spam_report" + EVENTNAME1_UNSUBSCRIBE EventName1 = "unsubscribe" + EVENTNAME1_GROUP_UNSUBSCRIBE EventName1 = "group_unsubscribe" + EVENTNAME1_GROUP_RESUBSCRIBE EventName1 = "group_resubscribe" +) diff --git a/rest/api/v3/email_activity/model_get_message_404_response.go b/rest/api/v3/email_activity/model_get_message_404_response.go new file mode 100644 index 00000000..4ba14b45 --- /dev/null +++ b/rest/api/v3/email_activity/model_get_message_404_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetMessage404Response struct for GetMessage404Response +type GetMessage404Response struct { + Errors *[]GetMessage404ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/email_activity/model_get_message_404_response_errors_inner.go b/rest/api/v3/email_activity/model_get_message_404_response_errors_inner.go new file mode 100644 index 00000000..c2a0aa50 --- /dev/null +++ b/rest/api/v3/email_activity/model_get_message_404_response_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetMessage404ResponseErrorsInner struct for GetMessage404ResponseErrorsInner +type GetMessage404ResponseErrorsInner struct { + Message *string `json:"message,omitempty"` + Field *string `json:"field,omitempty"` +} diff --git a/rest/api/v3/email_activity/model_list_message_200_response.go b/rest/api/v3/email_activity/model_list_message_200_response.go new file mode 100644 index 00000000..f66abfe1 --- /dev/null +++ b/rest/api/v3/email_activity/model_list_message_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListMessage200Response struct for ListMessage200Response +type ListMessage200Response struct { + Messages *[]AbbvMessage `json:"messages,omitempty"` +} diff --git a/rest/api/v3/email_activity/model_list_message_400_response.go b/rest/api/v3/email_activity/model_list_message_400_response.go new file mode 100644 index 00000000..2ad9c3ff --- /dev/null +++ b/rest/api/v3/email_activity/model_list_message_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListMessage400Response struct for ListMessage400Response +type ListMessage400Response struct { + Errors []ListMessage400ResponseErrorsInner `json:"errors"` +} diff --git a/rest/api/v3/email_activity/model_list_message_400_response_errors_inner.go b/rest/api/v3/email_activity/model_list_message_400_response_errors_inner.go new file mode 100644 index 00000000..561b7001 --- /dev/null +++ b/rest/api/v3/email_activity/model_list_message_400_response_errors_inner.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListMessage400ResponseErrorsInner struct for ListMessage400ResponseErrorsInner +type ListMessage400ResponseErrorsInner struct { + Message string `json:"message"` +} diff --git a/rest/api/v3/email_activity/model_list_message_429_response.go b/rest/api/v3/email_activity/model_list_message_429_response.go new file mode 100644 index 00000000..46d73b1f --- /dev/null +++ b/rest/api/v3/email_activity/model_list_message_429_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListMessage429Response struct for ListMessage429Response +type ListMessage429Response struct { + Errors *[]ListMessage429ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/email_activity/model_list_message_429_response_errors_inner.go b/rest/api/v3/email_activity/model_list_message_429_response_errors_inner.go new file mode 100644 index 00000000..6d46e6cc --- /dev/null +++ b/rest/api/v3/email_activity/model_list_message_429_response_errors_inner.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListMessage429ResponseErrorsInner struct for ListMessage429ResponseErrorsInner +type ListMessage429ResponseErrorsInner struct { + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/email_activity/model_message.go b/rest/api/v3/email_activity/model_message.go new file mode 100644 index 00000000..dad57509 --- /dev/null +++ b/rest/api/v3/email_activity/model_message.go @@ -0,0 +1,48 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Message struct for Message +type Message struct { + // The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account. + FromEmail *string `json:"from_email,omitempty"` + // A unique ID assigned to the message. This ID can be used to retrieve activity data for the specific message. + MsgId *string `json:"msg_id,omitempty"` + // The email's subject line. + Subject *string `json:"subject,omitempty"` + // The intended recipient's email address. + ToEmail *string `json:"to_email,omitempty"` + // The message's status. + Status *Status3 `json:"status,omitempty"` + // The ID associated with a Twilio SendGrid email template used to format the message. + TemplateId string `json:"template_id"` + // The unsubscribe group associated with this email. + AsmGroupId int32 `json:"asm_group_id"` + // Teammate's username + Teammate string `json:"teammate"` + // The ID of the API Key used to authenticate the sending request for the message. + ApiKeyId string `json:"api_key_id"` + // List of events related to email message + Events []Event `json:"events"` + // This is the IP of the user who sent the message. + OriginatingIp string `json:"originating_ip"` + // Categories users associated to the message + Categories []string `json:"categories"` + // JSON hash of key-value pairs associated with the message. + UniqueArgs string `json:"unique_args"` + // IP used to send to the remote Mail Transfer Agent. + OutboundIp string `json:"outbound_ip"` + // Whether or not the outbound IP is dedicated vs shared + OutboundIpType OutboundIpType `json:"outbound_ip_type"` +} diff --git a/rest/api/v3/email_activity/model_outbound_ip_type.go b/rest/api/v3/email_activity/model_outbound_ip_type.go new file mode 100644 index 00000000..ae6cfae7 --- /dev/null +++ b/rest/api/v3/email_activity/model_outbound_ip_type.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// OutboundIpType the model 'OutboundIpType' +type OutboundIpType string + +// List of OutboundIpType +const ( + OUTBOUNDIPTYPE_DEDICATED OutboundIpType = "dedicated" + OUTBOUNDIPTYPE_SHARED OutboundIpType = "shared" +) diff --git a/rest/api/v3/email_activity/model_outbound_ip_type1.go b/rest/api/v3/email_activity/model_outbound_ip_type1.go new file mode 100644 index 00000000..ad734c10 --- /dev/null +++ b/rest/api/v3/email_activity/model_outbound_ip_type1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// OutboundIpType1 the model 'OutboundIpType1' +type OutboundIpType1 string + +// List of OutboundIpType1 +const ( + OUTBOUNDIPTYPE1_DEDICATED OutboundIpType1 = "dedicated" + OUTBOUNDIPTYPE1_SHARED OutboundIpType1 = "shared" +) diff --git a/rest/api/v3/email_activity/model_request_csv_202_response.go b/rest/api/v3/email_activity/model_request_csv_202_response.go new file mode 100644 index 00000000..567a4c3f --- /dev/null +++ b/rest/api/v3/email_activity/model_request_csv_202_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// RequestCsv202Response struct for RequestCsv202Response +type RequestCsv202Response struct { + Status *Status2 `json:"status,omitempty"` + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/email_activity/model_status.go b/rest/api/v3/email_activity/model_status.go new file mode 100644 index 00000000..5e003d33 --- /dev/null +++ b/rest/api/v3/email_activity/model_status.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status the model 'Status' +type Status string + +// List of Status +const ( + STATUS_PROCESSED Status = "processed" + STATUS_DELIVERED Status = "delivered" + STATUS_NOT_DELIVERED Status = "not_delivered" +) diff --git a/rest/api/v3/email_activity/model_status1.go b/rest/api/v3/email_activity/model_status1.go new file mode 100644 index 00000000..84650532 --- /dev/null +++ b/rest/api/v3/email_activity/model_status1.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status1 the model 'Status1' +type Status1 string + +// List of Status1 +const ( + STATUS1_PROCESSED Status1 = "processed" + STATUS1_NOT_DELIVERED Status1 = "not_delivered" + STATUS1_DELIVERED Status1 = "delivered" +) diff --git a/rest/api/v3/email_activity/model_status2.go b/rest/api/v3/email_activity/model_status2.go new file mode 100644 index 00000000..f54b4277 --- /dev/null +++ b/rest/api/v3/email_activity/model_status2.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status2 the model 'Status2' +type Status2 string + +// List of Status2 +const ( + STATUS2_PENDING Status2 = "pending" +) diff --git a/rest/api/v3/email_activity/model_status3.go b/rest/api/v3/email_activity/model_status3.go new file mode 100644 index 00000000..0bbf51d8 --- /dev/null +++ b/rest/api/v3/email_activity/model_status3.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status3 the model 'Status3' +type Status3 string + +// List of Status3 +const ( + STATUS3_PROCESSED Status3 = "processed" + STATUS3_DELIVERED Status3 = "delivered" + STATUS3_NOT_DELIVERED Status3 = "not_delivered" +) diff --git a/rest/api/v3/email_validation/.openapi-generator b/rest/api/v3/email_validation/.openapi-generator new file mode 100644 index 00000000..58bf91fb --- /dev/null +++ b/rest/api/v3/email_validation/.openapi-generator @@ -0,0 +1,54 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_get_email_job_for_verification.go +api_get_validations_email_jobs.go +api_list_email_job_for_verification.go +api_service.go +api_validate_email.go +docs/ErrorResponse.md +docs/ErrorResponseErrorsInner.md +docs/FileType.md +docs/GetEmailJobForVerification.md +docs/GetValidationsEmailJobs.md +docs/GetValidationsEmailJobs200Response.md +docs/GetValidationsEmailJobs200ResponseResultInner.md +docs/GetValidationsEmailJobsJobId200Response.md +docs/GetValidationsEmailJobsJobId200ResponseResult.md +docs/GetValidationsEmailJobsJobId200ResponseResultErrorsInner.md +docs/ListEmailJobForVerification.md +docs/ListEmailJobForVerificationRequest.md +docs/PutValidationsEmailJobs200Response.md +docs/PutValidationsEmailJobs200ResponseUploadHeadersInner.md +docs/Status.md +docs/Status1.md +docs/ValidateEmail.md +docs/ValidateEmail200Response.md +docs/ValidateEmail200ResponseResult.md +docs/ValidateEmail200ResponseResultChecks.md +docs/ValidateEmail200ResponseResultChecksAdditional.md +docs/ValidateEmail200ResponseResultChecksDomain.md +docs/ValidateEmail200ResponseResultChecksLocalPart.md +docs/ValidateEmailRequest.md +docs/Verdict.md +model_error_response.go +model_error_response_errors_inner.go +model_file_type.go +model_get_validations_email_jobs200_response.go +model_get_validations_email_jobs200_response_result_inner.go +model_get_validations_email_jobs_job_id200_response.go +model_get_validations_email_jobs_job_id200_response_result.go +model_get_validations_email_jobs_job_id200_response_result_errors_inner.go +model_list_email_job_for_verification_request.go +model_put_validations_email_jobs200_response.go +model_put_validations_email_jobs200_response_upload_headers_inner.go +model_status.go +model_status1.go +model_validate_email_200_response.go +model_validate_email_200_response_result.go +model_validate_email_200_response_result_checks.go +model_validate_email_200_response_result_checks_additional.go +model_validate_email_200_response_result_checks_domain.go +model_validate_email_200_response_result_checks_local_part.go +model_validate_email_request.go +model_verdict.go diff --git a/rest/api/v3/email_validation/.openapi-generator-ignore b/rest/api/v3/email_validation/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/email_validation/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/email_validation/README.md b/rest/api/v3/email_validation/README.md new file mode 100644 index 00000000..f12c5d19 --- /dev/null +++ b/rest/api/v3/email_validation/README.md @@ -0,0 +1,94 @@ +# Go API client for + +The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. + +Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. + +You can use this API to: +- Indicate to users that the address they have entered into a form is invalid. +- Drop invalid email addresses from your database. +- Suppress invalid email addresses from your sending to decrease your bounce rate. + +See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. + +You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:43.518805+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*GetEmailJobForVerification* | [**GetEmailJobForVerification**](docs/GetEmailJobForVerification.md#getemailjobforverification) | **Get** /v3/validations/email/jobs/{JobId} | This request returns a single Bulk Email Validation Job. +*GetValidationsEmailJobs* | [**GetValidationsEmailJobs**](docs/GetValidationsEmailJobs.md#getvalidationsemailjobs) | **Get** /v3/validations/email/jobs | This request lists all of a user's Bulk Email Validation Jobs. +*ListEmailJobForVerification* | [**ListEmailJobForVerification**](docs/ListEmailJobForVerification.md#listemailjobforverification) | **Put** /v3/validations/email/jobs | Request a presigned URL and headers for Bulk Email Address Validation list upload. +*ValidateEmail* | [**ValidateEmail**](docs/ValidateEmail.md#validateemail) | **Post** /v3/validations/email | Validate an email + + +## Documentation For Models + + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [FileType](FileType.md) + - [GetValidationsEmailJobs200Response](GetValidationsEmailJobs200Response.md) + - [GetValidationsEmailJobs200ResponseResultInner](GetValidationsEmailJobs200ResponseResultInner.md) + - [GetValidationsEmailJobsJobId200Response](GetValidationsEmailJobsJobId200Response.md) + - [GetValidationsEmailJobsJobId200ResponseResult](GetValidationsEmailJobsJobId200ResponseResult.md) + - [GetValidationsEmailJobsJobId200ResponseResultErrorsInner](GetValidationsEmailJobsJobId200ResponseResultErrorsInner.md) + - [ListEmailJobForVerificationRequest](ListEmailJobForVerificationRequest.md) + - [PutValidationsEmailJobs200Response](PutValidationsEmailJobs200Response.md) + - [PutValidationsEmailJobs200ResponseUploadHeadersInner](PutValidationsEmailJobs200ResponseUploadHeadersInner.md) + - [Status](Status.md) + - [Status1](Status1.md) + - [ValidateEmail200Response](ValidateEmail200Response.md) + - [ValidateEmail200ResponseResult](ValidateEmail200ResponseResult.md) + - [ValidateEmail200ResponseResultChecks](ValidateEmail200ResponseResultChecks.md) + - [ValidateEmail200ResponseResultChecksAdditional](ValidateEmail200ResponseResultChecksAdditional.md) + - [ValidateEmail200ResponseResultChecksDomain](ValidateEmail200ResponseResultChecksDomain.md) + - [ValidateEmail200ResponseResultChecksLocalPart](ValidateEmail200ResponseResultChecksLocalPart.md) + - [ValidateEmailRequest](ValidateEmailRequest.md) + - [Verdict](Verdict.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/email_validation/api_get_email_job_for_verification.go b/rest/api/v3/email_validation/api_get_email_job_for_verification.go new file mode 100644 index 00000000..d1299b7f --- /dev/null +++ b/rest/api/v3/email_validation/api_get_email_job_for_verification.go @@ -0,0 +1,76 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type GetEmailJobForVerificationParam struct { + // The ID of the Bulk Email Address Validation Job you wish to retrieve. + JobId *string `json:"job_id"` +} + +func (params *GetEmailJobForVerificationParam) SetJobId(JobId string) *GetEmailJobForVerificationParam { + params.JobId = &JobId + return params +} + +// **This endpoint returns a specific Bulk Email Validation Job. You can use this endpoint to check on the progress of a Job.** +func (c *ApiService) GetEmailJobForVerification(params *GetEmailJobForVerificationParam) (interface{}, error) { + path := "/v3/validations/email/jobs/{JobId}" + if params != nil && params.JobId != nil { + path = strings.Replace(path, "{"+"JobId"+"}", *params.JobId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetValidationsEmailJobsJobId200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/email_validation/api_get_validations_email_jobs.go b/rest/api/v3/email_validation/api_get_validations_email_jobs.go new file mode 100644 index 00000000..689f190d --- /dev/null +++ b/rest/api/v3/email_validation/api_get_validations_email_jobs.go @@ -0,0 +1,64 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type GetValidationsEmailJobsParam struct { +} + +// **This endpoint returns a list of all of a user's Bulk Email Validation Jobs.** +func (c *ApiService) GetValidationsEmailJobs() (interface{}, error) { + path := "/v3/validations/email/jobs" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetValidationsEmailJobs200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/email_validation/api_list_email_job_for_verification.go b/rest/api/v3/email_validation/api_list_email_job_for_verification.go new file mode 100644 index 00000000..1461af35 --- /dev/null +++ b/rest/api/v3/email_validation/api_list_email_job_for_verification.go @@ -0,0 +1,80 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListEmailJobForVerificationParam struct { + // + ListEmailJobForVerificationRequest *ListEmailJobForVerificationRequest `json:"ListEmailJobForVerificationRequest,omitempty"` +} + +func (params *ListEmailJobForVerificationParam) SetListEmailJobForVerificationRequest(ListEmailJobForVerificationRequest ListEmailJobForVerificationRequest) *ListEmailJobForVerificationParam { + params.ListEmailJobForVerificationRequest = &ListEmailJobForVerificationRequest + return params +} + +// **This endpoint returns a presigned URL and request headers. Use this information to upload a list of email addresses for verification.** Note that in a successful response the `content-type` header value matches the provided `file_type` parameter in the `PUT` request. Once you have an `upload_uri` and the `upload_headers`, you're ready to upload your email address list for verification. For the expected format of the email address list and a sample upload request, see the [Bulk Email Address Validation Overview page](https://www.twilio.com/docs/sendgrid/ui/managing-contacts/email-address-validation/bulk-email-address-validation-overview). +func (c *ApiService) ListEmailJobForVerification(params *ListEmailJobForVerificationParam) (interface{}, error) { + path := "/v3/validations/email/jobs" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.ListEmailJobForVerificationRequest != nil { + b, err := json.Marshal(*params.ListEmailJobForVerificationRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &PutValidationsEmailJobs200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/email_validation/api_service.go b/rest/api/v3/email_validation/api_service.go new file mode 100644 index 00000000..12f01b4a --- /dev/null +++ b/rest/api/v3/email_validation/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/email_validation/api_validate_email.go b/rest/api/v3/email_validation/api_validate_email.go new file mode 100644 index 00000000..bc117d8c --- /dev/null +++ b/rest/api/v3/email_validation/api_validate_email.go @@ -0,0 +1,64 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ValidateEmailParam struct { + // + ValidateEmailRequest *ValidateEmailRequest `json:"ValidateEmailRequest,omitempty"` +} + +func (params *ValidateEmailParam) SetValidateEmailRequest(ValidateEmailRequest ValidateEmailRequest) *ValidateEmailParam { + params.ValidateEmailRequest = &ValidateEmailRequest + return params +} + +// **This endpoint allows you to validate an email address.** +func (c *ApiService) ValidateEmail(params *ValidateEmailParam) (interface{}, error) { + path := "/v3/validations/email" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.ValidateEmailRequest != nil { + b, err := json.Marshal(*params.ValidateEmailRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ValidateEmail200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/email_validation/docs/ErrorResponse.md b/rest/api/v3/email_validation/docs/ErrorResponse.md new file mode 100644 index 00000000..7e5e23ed --- /dev/null +++ b/rest/api/v3/email_validation/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | ID representing the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/ErrorResponseErrorsInner.md b/rest/api/v3/email_validation/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..f2c33b2a --- /dev/null +++ b/rest/api/v3/email_validation/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | The message representing the error from the API. | +**Field** | **string** | The field associated with the error. |[optional] +**Help** | **map[string]interface{}** | Helper text or docs for troubleshooting. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/FileType.md b/rest/api/v3/email_validation/docs/FileType.md new file mode 100644 index 00000000..0108ebdf --- /dev/null +++ b/rest/api/v3/email_validation/docs/FileType.md @@ -0,0 +1,13 @@ +# FileType + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**CSV** | string | (value: `"csv"`) +**ZIP** | string | (value: `"zip"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/GetEmailJobForVerification.md b/rest/api/v3/email_validation/docs/GetEmailJobForVerification.md new file mode 100644 index 00000000..0184c450 --- /dev/null +++ b/rest/api/v3/email_validation/docs/GetEmailJobForVerification.md @@ -0,0 +1,51 @@ +# GetEmailJobForVerification + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetEmailJobForVerification**](GetEmailJobForVerification.md#GetEmailJobForVerification) | **Get** /v3/validations/email/jobs/{JobId} | This request returns a single Bulk Email Validation Job. + + + +## GetEmailJobForVerification + +> GetValidationsEmailJobsJobId200Response GetEmailJobForVerification(ctx, JobId) + +This request returns a single Bulk Email Validation Job. + +**This endpoint returns a specific Bulk Email Validation Job. You can use this endpoint to check on the progress of a Job.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**JobId** | **string** | The ID of the Bulk Email Address Validation Job you wish to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetEmailJobForVerificationParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**GetValidationsEmailJobsJobId200Response**](GetValidationsEmailJobsJobId200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/email_validation/docs/GetValidationsEmailJobs.md b/rest/api/v3/email_validation/docs/GetValidationsEmailJobs.md new file mode 100644 index 00000000..65bc01db --- /dev/null +++ b/rest/api/v3/email_validation/docs/GetValidationsEmailJobs.md @@ -0,0 +1,44 @@ +# GetValidationsEmailJobs + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetValidationsEmailJobs**](GetValidationsEmailJobs.md#GetValidationsEmailJobs) | **Get** /v3/validations/email/jobs | This request lists all of a user's Bulk Email Validation Jobs. + + + +## GetValidationsEmailJobs + +> GetValidationsEmailJobs200Response GetValidationsEmailJobs(ctx, ) + +This request lists all of a user's Bulk Email Validation Jobs. + +**This endpoint returns a list of all of a user's Bulk Email Validation Jobs.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a GetValidationsEmailJobsParams struct + + +### Return type + +[**GetValidationsEmailJobs200Response**](GetValidationsEmailJobs200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/email_validation/docs/GetValidationsEmailJobs200Response.md b/rest/api/v3/email_validation/docs/GetValidationsEmailJobs200Response.md new file mode 100644 index 00000000..6005e09e --- /dev/null +++ b/rest/api/v3/email_validation/docs/GetValidationsEmailJobs200Response.md @@ -0,0 +1,11 @@ +# GetValidationsEmailJobs200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]GetValidationsEmailJobs200ResponseResultInner**](GetValidationsEmailJobs200ResponseResultInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/GetValidationsEmailJobs200ResponseResultInner.md b/rest/api/v3/email_validation/docs/GetValidationsEmailJobs200ResponseResultInner.md new file mode 100644 index 00000000..9f39fef1 --- /dev/null +++ b/rest/api/v3/email_validation/docs/GetValidationsEmailJobs200ResponseResultInner.md @@ -0,0 +1,14 @@ +# GetValidationsEmailJobs200ResponseResultInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The unique ID of the Bulk Email Address Validation Job. |[optional] +**Status** | [**Status**](Status.md) | The status of the Bulk Email Address Validation Job. |[optional] +**StartedAt** | **float32** | The ISO8601 timestamp when the Job was created. This is the time at which the upload request was sent to the `upload_uri`. |[optional] +**FinishedAt** | **float32** | The ISO8601 timestamp when the Job was finished. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200Response.md b/rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200Response.md new file mode 100644 index 00000000..62a5383d --- /dev/null +++ b/rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200Response.md @@ -0,0 +1,11 @@ +# GetValidationsEmailJobsJobId200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**GetValidationsEmailJobsJobId200ResponseResult**](GetValidationsEmailJobsJobId200ResponseResult.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200ResponseResult.md b/rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200ResponseResult.md new file mode 100644 index 00000000..d9c9395f --- /dev/null +++ b/rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200ResponseResult.md @@ -0,0 +1,18 @@ +# GetValidationsEmailJobsJobId200ResponseResult + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The unique ID of the Bulk Email Address Validation Job. |[optional] +**Status** | [**Status1**](Status1.md) | The status of the Bulk Email Address Validation Job. |[optional] +**Segments** | **float32** | The total number of segments in the Bulk Email Address Validation Job. There are 1,500 email addresses per segment. The value is `0` until the Job `status` is `Processing`. |[optional] +**SegmentsProcessed** | **float32** | The number of segments processed at the time of the request. 100 segments process in parallel at a time. |[optional] +**IsDownloadAvailable** | **bool** | Boolean indicating whether the results CSV file is available for download. |[optional] +**StartedAt** | **float32** | The ISO8601 timestamp when the Job was created. This is the time at which the upload request was sent to the `upload_uri`. |[optional] +**FinishedAt** | **float32** | The ISO8601 timestamp when the Job was finished. |[optional] +**Errors** | [**[]GetValidationsEmailJobsJobId200ResponseResultErrorsInner**](GetValidationsEmailJobsJobId200ResponseResultErrorsInner.md) | Array containing error messages related to the Bulk Email Address Validation Job. Array is empty if no errors ocurred. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200ResponseResultErrorsInner.md b/rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200ResponseResultErrorsInner.md new file mode 100644 index 00000000..0d5492ae --- /dev/null +++ b/rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200ResponseResultErrorsInner.md @@ -0,0 +1,11 @@ +# GetValidationsEmailJobsJobId200ResponseResultErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | Description of the error encountered during execution of the Bulk Email Address Validation Job. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/ListEmailJobForVerification.md b/rest/api/v3/email_validation/docs/ListEmailJobForVerification.md new file mode 100644 index 00000000..6cd0053d --- /dev/null +++ b/rest/api/v3/email_validation/docs/ListEmailJobForVerification.md @@ -0,0 +1,48 @@ +# ListEmailJobForVerification + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListEmailJobForVerification**](ListEmailJobForVerification.md#ListEmailJobForVerification) | **Put** /v3/validations/email/jobs | Request a presigned URL and headers for Bulk Email Address Validation list upload. + + + +## ListEmailJobForVerification + +> PutValidationsEmailJobs200Response ListEmailJobForVerification(ctx, optional) + +Request a presigned URL and headers for Bulk Email Address Validation list upload. + +**This endpoint returns a presigned URL and request headers. Use this information to upload a list of email addresses for verification.** Note that in a successful response the `content-type` header value matches the provided `file_type` parameter in the `PUT` request. Once you have an `upload_uri` and the `upload_headers`, you're ready to upload your email address list for verification. For the expected format of the email address list and a sample upload request, see the [Bulk Email Address Validation Overview page](https://www.twilio.com/docs/sendgrid/ui/managing-contacts/email-address-validation/bulk-email-address-validation-overview). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListEmailJobForVerificationParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**ListEmailJobForVerificationRequest** | [**ListEmailJobForVerificationRequest**](ListEmailJobForVerificationRequest.md) | + +### Return type + +[**PutValidationsEmailJobs200Response**](PutValidationsEmailJobs200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/email_validation/docs/ListEmailJobForVerificationRequest.md b/rest/api/v3/email_validation/docs/ListEmailJobForVerificationRequest.md new file mode 100644 index 00000000..a3d4fb06 --- /dev/null +++ b/rest/api/v3/email_validation/docs/ListEmailJobForVerificationRequest.md @@ -0,0 +1,11 @@ +# ListEmailJobForVerificationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FileType** | [**FileType**](FileType.md) | The format of the file you wish to upload. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/PutValidationsEmailJobs200Response.md b/rest/api/v3/email_validation/docs/PutValidationsEmailJobs200Response.md new file mode 100644 index 00000000..7caf2bcc --- /dev/null +++ b/rest/api/v3/email_validation/docs/PutValidationsEmailJobs200Response.md @@ -0,0 +1,13 @@ +# PutValidationsEmailJobs200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**JobId** | **string** | The unique ID of the Bulk Email Address Validation Job. |[optional] +**UploadUri** | **string** | The URI to use for the request to upload your list of email addresses. |[optional] +**UploadHeaders** | [**[]PutValidationsEmailJobs200ResponseUploadHeadersInner**](PutValidationsEmailJobs200ResponseUploadHeadersInner.md) | Array containing headers and header values. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/PutValidationsEmailJobs200ResponseUploadHeadersInner.md b/rest/api/v3/email_validation/docs/PutValidationsEmailJobs200ResponseUploadHeadersInner.md new file mode 100644 index 00000000..96781e62 --- /dev/null +++ b/rest/api/v3/email_validation/docs/PutValidationsEmailJobs200ResponseUploadHeadersInner.md @@ -0,0 +1,12 @@ +# PutValidationsEmailJobs200ResponseUploadHeadersInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Header** | **string** | The name of the header that must be included in the upload request. |[optional] +**Value** | **string** | The value of the header that must be included in the upload request. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/Status.md b/rest/api/v3/email_validation/docs/Status.md new file mode 100644 index 00000000..3915e79c --- /dev/null +++ b/rest/api/v3/email_validation/docs/Status.md @@ -0,0 +1,17 @@ +# Status + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**INITIATED** | string | (value: `"Initiated"`) +**QUEUED** | string | (value: `"Queued"`) +**READY** | string | (value: `"Ready"`) +**PROCESSING** | string | (value: `"Processing"`) +**DONE** | string | (value: `"Done"`) +**ERROR** | string | (value: `"Error"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/Status1.md b/rest/api/v3/email_validation/docs/Status1.md new file mode 100644 index 00000000..a6d983e9 --- /dev/null +++ b/rest/api/v3/email_validation/docs/Status1.md @@ -0,0 +1,17 @@ +# Status1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**INITIATED** | string | (value: `"Initiated"`) +**QUEUED** | string | (value: `"Queued"`) +**READY** | string | (value: `"Ready"`) +**PROCESSING** | string | (value: `"Processing"`) +**DONE** | string | (value: `"Done"`) +**ERROR** | string | (value: `"Error"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/ValidateEmail.md b/rest/api/v3/email_validation/docs/ValidateEmail.md new file mode 100644 index 00000000..6d217df2 --- /dev/null +++ b/rest/api/v3/email_validation/docs/ValidateEmail.md @@ -0,0 +1,48 @@ +# ValidateEmail + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ValidateEmail**](ValidateEmail.md#ValidateEmail) | **Post** /v3/validations/email | Validate an email + + + +## ValidateEmail + +> ValidateEmail200Response ValidateEmail(ctx, optional) + +Validate an email + +**This endpoint allows you to validate an email address.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ValidateEmailParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**ValidateEmailRequest** | [**ValidateEmailRequest**](ValidateEmailRequest.md) | + +### Return type + +[**ValidateEmail200Response**](ValidateEmail200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/email_validation/docs/ValidateEmail200Response.md b/rest/api/v3/email_validation/docs/ValidateEmail200Response.md new file mode 100644 index 00000000..1fe2612e --- /dev/null +++ b/rest/api/v3/email_validation/docs/ValidateEmail200Response.md @@ -0,0 +1,11 @@ +# ValidateEmail200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**ValidateEmail200ResponseResult**](ValidateEmail200ResponseResult.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResult.md b/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResult.md new file mode 100644 index 00000000..1de44347 --- /dev/null +++ b/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResult.md @@ -0,0 +1,19 @@ +# ValidateEmail200ResponseResult + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email being validated | +**Verdict** | [**Verdict**](Verdict.md) | A generic classification of whether or not the email address is valid. | +**Score** | **float32** | A numeric representation of the email validity. | +**Local** | **string** | The local part of the email address. | +**Host** | **string** | The domain of the email address. | +**Suggestion** | **string** | A suggested correction in the event of domain name typos (e.g., gmial.com) |[optional] +**Checks** | [**ValidateEmail200ResponseResultChecks**](ValidateEmail200ResponseResultChecks.md) | | +**Source** | **string** | The source of the validation, as per the API request. |[optional] +**IpAddress** | **string** | The IP address associated with this email. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecks.md b/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecks.md new file mode 100644 index 00000000..d664bcf0 --- /dev/null +++ b/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecks.md @@ -0,0 +1,13 @@ +# ValidateEmail200ResponseResultChecks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Domain** | [**ValidateEmail200ResponseResultChecksDomain**](ValidateEmail200ResponseResultChecksDomain.md) | | +**LocalPart** | [**ValidateEmail200ResponseResultChecksLocalPart**](ValidateEmail200ResponseResultChecksLocalPart.md) | | +**Additional** | [**ValidateEmail200ResponseResultChecksAdditional**](ValidateEmail200ResponseResultChecksAdditional.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksAdditional.md b/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksAdditional.md new file mode 100644 index 00000000..ff503099 --- /dev/null +++ b/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksAdditional.md @@ -0,0 +1,12 @@ +# ValidateEmail200ResponseResultChecksAdditional + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**HasKnownBounces** | **bool** | Whether email sent to this address from your account has bounced. | +**HasSuspectedBounces** | **bool** | Whether our model predicts that the email address might bounce. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksDomain.md b/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksDomain.md new file mode 100644 index 00000000..3d2d75b3 --- /dev/null +++ b/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksDomain.md @@ -0,0 +1,13 @@ +# ValidateEmail200ResponseResultChecksDomain + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**HasValidAddressSyntax** | **bool** | Whether the email address syntax is valid. | +**HasMxOrARecord** | **bool** | Whether the email has appropriate DNS records to deliver a message. | +**IsSuspectedDisposableAddress** | **bool** | Whether the domain appears to be from a disposable email address service. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksLocalPart.md b/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksLocalPart.md new file mode 100644 index 00000000..7219d6de --- /dev/null +++ b/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksLocalPart.md @@ -0,0 +1,11 @@ +# ValidateEmail200ResponseResultChecksLocalPart + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsSuspectedRoleAddress** | **bool** | Whether the local part of email appears to be a role or group (e.g., hr, admin) | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/ValidateEmailRequest.md b/rest/api/v3/email_validation/docs/ValidateEmailRequest.md new file mode 100644 index 00000000..404db498 --- /dev/null +++ b/rest/api/v3/email_validation/docs/ValidateEmailRequest.md @@ -0,0 +1,12 @@ +# ValidateEmailRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address that you want to validate. | +**Source** | **string** | A one-word classifier for where this validation originated. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/Verdict.md b/rest/api/v3/email_validation/docs/Verdict.md new file mode 100644 index 00000000..5f6dae14 --- /dev/null +++ b/rest/api/v3/email_validation/docs/Verdict.md @@ -0,0 +1,14 @@ +# Verdict + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**VALID** | string | (value: `"Valid"`) +**RISKY** | string | (value: `"Risky"`) +**INVALID** | string | (value: `"Invalid"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/model_error_response.go b/rest/api/v3/email_validation/model_error_response.go new file mode 100644 index 00000000..0471f1b6 --- /dev/null +++ b/rest/api/v3/email_validation/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // ID representing the error. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/email_validation/model_error_response_errors_inner.go b/rest/api/v3/email_validation/model_error_response_errors_inner.go new file mode 100644 index 00000000..363c1a49 --- /dev/null +++ b/rest/api/v3/email_validation/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // The message representing the error from the API. + Message string `json:"message"` + // The field associated with the error. + Field *string `json:"field,omitempty"` + // Helper text or docs for troubleshooting. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/email_validation/model_file_type.go b/rest/api/v3/email_validation/model_file_type.go new file mode 100644 index 00000000..9326cdd5 --- /dev/null +++ b/rest/api/v3/email_validation/model_file_type.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// FileType the model 'FileType' +type FileType string + +// List of FileType +const ( + FILETYPE_CSV FileType = "csv" + FILETYPE_ZIP FileType = "zip" +) diff --git a/rest/api/v3/email_validation/model_get_validations_email_jobs200_response.go b/rest/api/v3/email_validation/model_get_validations_email_jobs200_response.go new file mode 100644 index 00000000..435a4a34 --- /dev/null +++ b/rest/api/v3/email_validation/model_get_validations_email_jobs200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetValidationsEmailJobs200Response struct for GetValidationsEmailJobs200Response +type GetValidationsEmailJobs200Response struct { + // + Result *[]GetValidationsEmailJobs200ResponseResultInner `json:"result,omitempty"` +} diff --git a/rest/api/v3/email_validation/model_get_validations_email_jobs200_response_result_inner.go b/rest/api/v3/email_validation/model_get_validations_email_jobs200_response_result_inner.go new file mode 100644 index 00000000..8e1859d9 --- /dev/null +++ b/rest/api/v3/email_validation/model_get_validations_email_jobs200_response_result_inner.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetValidationsEmailJobs200ResponseResultInner struct for GetValidationsEmailJobs200ResponseResultInner +type GetValidationsEmailJobs200ResponseResultInner struct { + // The unique ID of the Bulk Email Address Validation Job. + Id *string `json:"id,omitempty"` + // The status of the Bulk Email Address Validation Job. + Status *Status `json:"status,omitempty"` + // The ISO8601 timestamp when the Job was created. This is the time at which the upload request was sent to the `upload_uri`. + StartedAt *float32 `json:"started_at,omitempty"` + // The ISO8601 timestamp when the Job was finished. + FinishedAt *float32 `json:"finished_at,omitempty"` +} diff --git a/rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response.go b/rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response.go new file mode 100644 index 00000000..d7625423 --- /dev/null +++ b/rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetValidationsEmailJobsJobId200Response struct for GetValidationsEmailJobsJobId200Response +type GetValidationsEmailJobsJobId200Response struct { + Result *GetValidationsEmailJobsJobId200ResponseResult `json:"result,omitempty"` +} diff --git a/rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response_result.go b/rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response_result.go new file mode 100644 index 00000000..0f6d9761 --- /dev/null +++ b/rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response_result.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetValidationsEmailJobsJobId200ResponseResult +type GetValidationsEmailJobsJobId200ResponseResult struct { + // The unique ID of the Bulk Email Address Validation Job. + Id *string `json:"id,omitempty"` + // The status of the Bulk Email Address Validation Job. + Status *Status1 `json:"status,omitempty"` + // The total number of segments in the Bulk Email Address Validation Job. There are 1,500 email addresses per segment. The value is `0` until the Job `status` is `Processing`. + Segments *float32 `json:"segments,omitempty"` + // The number of segments processed at the time of the request. 100 segments process in parallel at a time. + SegmentsProcessed *float32 `json:"segments_processed,omitempty"` + // Boolean indicating whether the results CSV file is available for download. + IsDownloadAvailable *bool `json:"is_download_available,omitempty"` + // The ISO8601 timestamp when the Job was created. This is the time at which the upload request was sent to the `upload_uri`. + StartedAt *float32 `json:"started_at,omitempty"` + // The ISO8601 timestamp when the Job was finished. + FinishedAt *float32 `json:"finished_at,omitempty"` + // Array containing error messages related to the Bulk Email Address Validation Job. Array is empty if no errors ocurred. + Errors *[]GetValidationsEmailJobsJobId200ResponseResultErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response_result_errors_inner.go b/rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response_result_errors_inner.go new file mode 100644 index 00000000..db8ee837 --- /dev/null +++ b/rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response_result_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetValidationsEmailJobsJobId200ResponseResultErrorsInner struct for GetValidationsEmailJobsJobId200ResponseResultErrorsInner +type GetValidationsEmailJobsJobId200ResponseResultErrorsInner struct { + // Description of the error encountered during execution of the Bulk Email Address Validation Job. + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/email_validation/model_list_email_job_for_verification_request.go b/rest/api/v3/email_validation/model_list_email_job_for_verification_request.go new file mode 100644 index 00000000..6ec08c9a --- /dev/null +++ b/rest/api/v3/email_validation/model_list_email_job_for_verification_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListEmailJobForVerificationRequest struct for ListEmailJobForVerificationRequest +type ListEmailJobForVerificationRequest struct { + // The format of the file you wish to upload. + FileType FileType `json:"file_type"` +} diff --git a/rest/api/v3/email_validation/model_put_validations_email_jobs200_response.go b/rest/api/v3/email_validation/model_put_validations_email_jobs200_response.go new file mode 100644 index 00000000..3c8bfba2 --- /dev/null +++ b/rest/api/v3/email_validation/model_put_validations_email_jobs200_response.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// PutValidationsEmailJobs200Response struct for PutValidationsEmailJobs200Response +type PutValidationsEmailJobs200Response struct { + // The unique ID of the Bulk Email Address Validation Job. + JobId *string `json:"job_id,omitempty"` + // The URI to use for the request to upload your list of email addresses. + UploadUri *string `json:"upload_uri,omitempty"` + // Array containing headers and header values. + UploadHeaders *[]PutValidationsEmailJobs200ResponseUploadHeadersInner `json:"upload_headers,omitempty"` +} diff --git a/rest/api/v3/email_validation/model_put_validations_email_jobs200_response_upload_headers_inner.go b/rest/api/v3/email_validation/model_put_validations_email_jobs200_response_upload_headers_inner.go new file mode 100644 index 00000000..5763532e --- /dev/null +++ b/rest/api/v3/email_validation/model_put_validations_email_jobs200_response_upload_headers_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// PutValidationsEmailJobs200ResponseUploadHeadersInner struct for PutValidationsEmailJobs200ResponseUploadHeadersInner +type PutValidationsEmailJobs200ResponseUploadHeadersInner struct { + // The name of the header that must be included in the upload request. + Header *string `json:"header,omitempty"` + // The value of the header that must be included in the upload request. + Value *string `json:"value,omitempty"` +} diff --git a/rest/api/v3/email_validation/model_status.go b/rest/api/v3/email_validation/model_status.go new file mode 100644 index 00000000..c92c4771 --- /dev/null +++ b/rest/api/v3/email_validation/model_status.go @@ -0,0 +1,27 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status the model 'Status' +type Status string + +// List of Status +const ( + STATUS_INITIATED Status = "Initiated" + STATUS_QUEUED Status = "Queued" + STATUS_READY Status = "Ready" + STATUS_PROCESSING Status = "Processing" + STATUS_DONE Status = "Done" + STATUS_ERROR Status = "Error" +) diff --git a/rest/api/v3/email_validation/model_status1.go b/rest/api/v3/email_validation/model_status1.go new file mode 100644 index 00000000..eb3f76b1 --- /dev/null +++ b/rest/api/v3/email_validation/model_status1.go @@ -0,0 +1,27 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status1 the model 'Status1' +type Status1 string + +// List of Status1 +const ( + STATUS1_INITIATED Status1 = "Initiated" + STATUS1_QUEUED Status1 = "Queued" + STATUS1_READY Status1 = "Ready" + STATUS1_PROCESSING Status1 = "Processing" + STATUS1_DONE Status1 = "Done" + STATUS1_ERROR Status1 = "Error" +) diff --git a/rest/api/v3/email_validation/model_validate_email_200_response.go b/rest/api/v3/email_validation/model_validate_email_200_response.go new file mode 100644 index 00000000..bd91dd02 --- /dev/null +++ b/rest/api/v3/email_validation/model_validate_email_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateEmail200Response struct for ValidateEmail200Response +type ValidateEmail200Response struct { + Result ValidateEmail200ResponseResult `json:"result"` +} diff --git a/rest/api/v3/email_validation/model_validate_email_200_response_result.go b/rest/api/v3/email_validation/model_validate_email_200_response_result.go new file mode 100644 index 00000000..44356b58 --- /dev/null +++ b/rest/api/v3/email_validation/model_validate_email_200_response_result.go @@ -0,0 +1,35 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateEmail200ResponseResult struct for ValidateEmail200ResponseResult +type ValidateEmail200ResponseResult struct { + // The email being validated + Email string `json:"email"` + // A generic classification of whether or not the email address is valid. + Verdict Verdict `json:"verdict"` + // A numeric representation of the email validity. + Score float32 `json:"score"` + // The local part of the email address. + Local string `json:"local"` + // The domain of the email address. + Host string `json:"host"` + // A suggested correction in the event of domain name typos (e.g., gmial.com) + Suggestion *string `json:"suggestion,omitempty"` + Checks ValidateEmail200ResponseResultChecks `json:"checks"` + // The source of the validation, as per the API request. + Source *string `json:"source,omitempty"` + // The IP address associated with this email. + IpAddress string `json:"ip_address"` +} diff --git a/rest/api/v3/email_validation/model_validate_email_200_response_result_checks.go b/rest/api/v3/email_validation/model_validate_email_200_response_result_checks.go new file mode 100644 index 00000000..5238ab2c --- /dev/null +++ b/rest/api/v3/email_validation/model_validate_email_200_response_result_checks.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateEmail200ResponseResultChecks Granular checks for email address validity. +type ValidateEmail200ResponseResultChecks struct { + Domain ValidateEmail200ResponseResultChecksDomain `json:"domain"` + LocalPart ValidateEmail200ResponseResultChecksLocalPart `json:"local_part"` + Additional ValidateEmail200ResponseResultChecksAdditional `json:"additional"` +} diff --git a/rest/api/v3/email_validation/model_validate_email_200_response_result_checks_additional.go b/rest/api/v3/email_validation/model_validate_email_200_response_result_checks_additional.go new file mode 100644 index 00000000..a805b2f6 --- /dev/null +++ b/rest/api/v3/email_validation/model_validate_email_200_response_result_checks_additional.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateEmail200ResponseResultChecksAdditional Additional checks on the email address. +type ValidateEmail200ResponseResultChecksAdditional struct { + // Whether email sent to this address from your account has bounced. + HasKnownBounces bool `json:"has_known_bounces"` + // Whether our model predicts that the email address might bounce. + HasSuspectedBounces bool `json:"has_suspected_bounces"` +} diff --git a/rest/api/v3/email_validation/model_validate_email_200_response_result_checks_domain.go b/rest/api/v3/email_validation/model_validate_email_200_response_result_checks_domain.go new file mode 100644 index 00000000..2effd822 --- /dev/null +++ b/rest/api/v3/email_validation/model_validate_email_200_response_result_checks_domain.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateEmail200ResponseResultChecksDomain Checks on the domain portion of the email address. +type ValidateEmail200ResponseResultChecksDomain struct { + // Whether the email address syntax is valid. + HasValidAddressSyntax bool `json:"has_valid_address_syntax"` + // Whether the email has appropriate DNS records to deliver a message. + HasMxOrARecord bool `json:"has_mx_or_a_record"` + // Whether the domain appears to be from a disposable email address service. + IsSuspectedDisposableAddress bool `json:"is_suspected_disposable_address"` +} diff --git a/rest/api/v3/email_validation/model_validate_email_200_response_result_checks_local_part.go b/rest/api/v3/email_validation/model_validate_email_200_response_result_checks_local_part.go new file mode 100644 index 00000000..2290db2a --- /dev/null +++ b/rest/api/v3/email_validation/model_validate_email_200_response_result_checks_local_part.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateEmail200ResponseResultChecksLocalPart Checks on the local part of the email address. +type ValidateEmail200ResponseResultChecksLocalPart struct { + // Whether the local part of email appears to be a role or group (e.g., hr, admin) + IsSuspectedRoleAddress bool `json:"is_suspected_role_address"` +} diff --git a/rest/api/v3/email_validation/model_validate_email_request.go b/rest/api/v3/email_validation/model_validate_email_request.go new file mode 100644 index 00000000..f8f03693 --- /dev/null +++ b/rest/api/v3/email_validation/model_validate_email_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateEmailRequest struct for ValidateEmailRequest +type ValidateEmailRequest struct { + // The email address that you want to validate. + Email string `json:"email"` + // A one-word classifier for where this validation originated. + Source *string `json:"source,omitempty"` +} diff --git a/rest/api/v3/email_validation/model_verdict.go b/rest/api/v3/email_validation/model_verdict.go new file mode 100644 index 00000000..d7fdf767 --- /dev/null +++ b/rest/api/v3/email_validation/model_verdict.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Verdict the model 'Verdict' +type Verdict string + +// List of Verdict +const ( + VERDICT_VALID Verdict = "Valid" + VERDICT_RISKY Verdict = "Risky" + VERDICT_INVALID Verdict = "Invalid" +) diff --git a/rest/api/v3/enforced_tls/.openapi-generator b/rest/api/v3/enforced_tls/.openapi-generator new file mode 100644 index 00000000..39211a73 --- /dev/null +++ b/rest/api/v3/enforced_tls/.openapi-generator @@ -0,0 +1,16 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_list_enforced_tls_setting.go +api_service.go +api_update_enforced_tls_setting.go +docs/EnforcedTlsRequestResponse.md +docs/ErrorResponse.md +docs/ErrorResponseErrorsInner.md +docs/ListEnforcedTlsSetting.md +docs/UpdateEnforcedTlsSetting.md +docs/Version.md +model_enforced_tls_request_response.go +model_error_response.go +model_error_response_errors_inner.go +model_version.go diff --git a/rest/api/v3/enforced_tls/.openapi-generator-ignore b/rest/api/v3/enforced_tls/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/enforced_tls/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/enforced_tls/README.md b/rest/api/v3/enforced_tls/README.md new file mode 100644 index 00000000..5a6ee8a6 --- /dev/null +++ b/rest/api/v3/enforced_tls/README.md @@ -0,0 +1,68 @@ +# Go API client for + +The Twilio SendGrid Enforced TLS API allows you to specify whether or not the recipient of your mail send is required to support TLS or have a valid certificate. + +Twilio SendGrid sends all emails with [Opportunistic TLS](https://sendgrid.com/blog/myth-opportunistic-tls-email-privacy/) by default, meaning email is sent with TLS, and if the recipient's inbox provider does not accept the TLS encryption, we then send the message unencrypted. + +You can optionally choose to enforce TLS encryption, meaning that if the recipient's inbox provider does not accept the TLS encryption, Twilio SendGrid drops the message and sends a block event with the message, “TLS required but not supported” as the description. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:43.510881+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ListEnforcedTlsSetting* | [**ListEnforcedTlsSetting**](docs/ListEnforcedTlsSetting.md#listenforcedtlssetting) | **Get** /v3/user/settings/enforced_tls | Retrieve current Enforced TLS settings. +*UpdateEnforcedTlsSetting* | [**UpdateEnforcedTlsSetting**](docs/UpdateEnforcedTlsSetting.md#updateenforcedtlssetting) | **Patch** /v3/user/settings/enforced_tls | Update Enforced TLS settings + + +## Documentation For Models + + - [EnforcedTlsRequestResponse](EnforcedTlsRequestResponse.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [Version](Version.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/enforced_tls/api_list_enforced_tls_setting.go b/rest/api/v3/enforced_tls/api_list_enforced_tls_setting.go new file mode 100644 index 00000000..07044502 --- /dev/null +++ b/rest/api/v3/enforced_tls/api_list_enforced_tls_setting.go @@ -0,0 +1,82 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Enforced TLS API +* The Twilio SendGrid Enforced TLS API allows you to specify whether or not the recipient of your mail send is required to support TLS or have a valid certificate. Twilio SendGrid sends all emails with [Opportunistic TLS](https://sendgrid.com/blog/myth-opportunistic-tls-email-privacy/) by default, meaning email is sent with TLS, and if the recipient's inbox provider does not accept the TLS encryption, we then send the message unencrypted. You can optionally choose to enforce TLS encryption, meaning that if the recipient's inbox provider does not accept the TLS encryption, Twilio SendGrid drops the message and sends a block event with the message, “TLS required but not supported” as the description. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListEnforcedTlsSettingParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListEnforcedTlsSettingParam) SetOnbehalfof(Onbehalfof string) *ListEnforcedTlsSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve your current Enforced TLS settings.** The Enforced TLS settings specify whether or not the recipient is required to support TLS or have a valid certificate. If either `require_tls` or `require_valid_cert` is set to `true`, the recipient must support TLS 1.1 or higher or have a valid certificate. If these conditions are not met, Twilio SendGrid will drop the message and send a block event with “TLS required but not supported” as the description. +func (c *ApiService) ListEnforcedTlsSetting(params *ListEnforcedTlsSettingParam) (interface{}, error) { + path := "/v3/user/settings/enforced_tls" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &EnforcedTlsRequestResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/enforced_tls/api_service.go b/rest/api/v3/enforced_tls/api_service.go new file mode 100644 index 00000000..b52f212f --- /dev/null +++ b/rest/api/v3/enforced_tls/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Enforced TLS API +* The Twilio SendGrid Enforced TLS API allows you to specify whether or not the recipient of your mail send is required to support TLS or have a valid certificate. Twilio SendGrid sends all emails with [Opportunistic TLS](https://sendgrid.com/blog/myth-opportunistic-tls-email-privacy/) by default, meaning email is sent with TLS, and if the recipient's inbox provider does not accept the TLS encryption, we then send the message unencrypted. You can optionally choose to enforce TLS encryption, meaning that if the recipient's inbox provider does not accept the TLS encryption, Twilio SendGrid drops the message and sends a block event with the message, “TLS required but not supported” as the description. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/enforced_tls/api_update_enforced_tls_setting.go b/rest/api/v3/enforced_tls/api_update_enforced_tls_setting.go new file mode 100644 index 00000000..8736c394 --- /dev/null +++ b/rest/api/v3/enforced_tls/api_update_enforced_tls_setting.go @@ -0,0 +1,97 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Enforced TLS API +* The Twilio SendGrid Enforced TLS API allows you to specify whether or not the recipient of your mail send is required to support TLS or have a valid certificate. Twilio SendGrid sends all emails with [Opportunistic TLS](https://sendgrid.com/blog/myth-opportunistic-tls-email-privacy/) by default, meaning email is sent with TLS, and if the recipient's inbox provider does not accept the TLS encryption, we then send the message unencrypted. You can optionally choose to enforce TLS encryption, meaning that if the recipient's inbox provider does not accept the TLS encryption, Twilio SendGrid drops the message and sends a block event with the message, “TLS required but not supported” as the description. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type UpdateEnforcedTlsSettingParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + EnforcedTlsRequestResponse *EnforcedTlsRequestResponse `json:"EnforcedTlsRequestResponse,omitempty"` +} + +func (params *UpdateEnforcedTlsSettingParam) SetOnbehalfof(Onbehalfof string) *UpdateEnforcedTlsSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateEnforcedTlsSettingParam) SetEnforcedTlsRequestResponse(EnforcedTlsRequestResponse EnforcedTlsRequestResponse) *UpdateEnforcedTlsSettingParam { + params.EnforcedTlsRequestResponse = &EnforcedTlsRequestResponse + return params +} + +// **This endpoint allows you to update your Enforced TLS settings.** To require TLS from recipients, set `require_tls` to `true`. If either `require_tls` or `require_valid_cert` is set to `true`, the recipient must support TLS 1.1 or higher or have a valid certificate. If these conditions are not met, Twilio SendGrid will drop the message and send a block event with “TLS required but not supported” as the description. +func (c *ApiService) UpdateEnforcedTlsSetting(params *UpdateEnforcedTlsSettingParam) (interface{}, error) { + path := "/v3/user/settings/enforced_tls" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.EnforcedTlsRequestResponse != nil { + b, err := json.Marshal(*params.EnforcedTlsRequestResponse) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &EnforcedTlsRequestResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/enforced_tls/docs/EnforcedTlsRequestResponse.md b/rest/api/v3/enforced_tls/docs/EnforcedTlsRequestResponse.md new file mode 100644 index 00000000..afa34268 --- /dev/null +++ b/rest/api/v3/enforced_tls/docs/EnforcedTlsRequestResponse.md @@ -0,0 +1,13 @@ +# EnforcedTlsRequestResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RequireTls** | **bool** | Indicates if you want to require your recipients to support TLS. |[optional] +**RequireValidCert** | **bool** | Indicates if you want to require your recipients to have a valid certificate. |[optional] +**Version** | [**Version**](Version.md) | The minimum required TLS certificate version. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/enforced_tls/docs/ErrorResponse.md b/rest/api/v3/enforced_tls/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/enforced_tls/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/enforced_tls/docs/ErrorResponseErrorsInner.md b/rest/api/v3/enforced_tls/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/enforced_tls/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/enforced_tls/docs/ListEnforcedTlsSetting.md b/rest/api/v3/enforced_tls/docs/ListEnforcedTlsSetting.md new file mode 100644 index 00000000..43d636d3 --- /dev/null +++ b/rest/api/v3/enforced_tls/docs/ListEnforcedTlsSetting.md @@ -0,0 +1,48 @@ +# ListEnforcedTlsSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListEnforcedTlsSetting**](ListEnforcedTlsSetting.md#ListEnforcedTlsSetting) | **Get** /v3/user/settings/enforced_tls | Retrieve current Enforced TLS settings. + + + +## ListEnforcedTlsSetting + +> EnforcedTlsRequestResponse ListEnforcedTlsSetting(ctx, optional) + +Retrieve current Enforced TLS settings. + +**This endpoint allows you to retrieve your current Enforced TLS settings.** The Enforced TLS settings specify whether or not the recipient is required to support TLS or have a valid certificate. If either `require_tls` or `require_valid_cert` is set to `true`, the recipient must support TLS 1.1 or higher or have a valid certificate. If these conditions are not met, Twilio SendGrid will drop the message and send a block event with “TLS required but not supported” as the description. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListEnforcedTlsSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**EnforcedTlsRequestResponse**](EnforcedTlsRequestResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/enforced_tls/docs/UpdateEnforcedTlsSetting.md b/rest/api/v3/enforced_tls/docs/UpdateEnforcedTlsSetting.md new file mode 100644 index 00000000..958bc070 --- /dev/null +++ b/rest/api/v3/enforced_tls/docs/UpdateEnforcedTlsSetting.md @@ -0,0 +1,49 @@ +# UpdateEnforcedTlsSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateEnforcedTlsSetting**](UpdateEnforcedTlsSetting.md#UpdateEnforcedTlsSetting) | **Patch** /v3/user/settings/enforced_tls | Update Enforced TLS settings + + + +## UpdateEnforcedTlsSetting + +> EnforcedTlsRequestResponse UpdateEnforcedTlsSetting(ctx, optional) + +Update Enforced TLS settings + +**This endpoint allows you to update your Enforced TLS settings.** To require TLS from recipients, set `require_tls` to `true`. If either `require_tls` or `require_valid_cert` is set to `true`, the recipient must support TLS 1.1 or higher or have a valid certificate. If these conditions are not met, Twilio SendGrid will drop the message and send a block event with “TLS required but not supported” as the description. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateEnforcedTlsSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**EnforcedTlsRequestResponse** | [**EnforcedTlsRequestResponse**](EnforcedTlsRequestResponse.md) | + +### Return type + +[**EnforcedTlsRequestResponse**](EnforcedTlsRequestResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/enforced_tls/docs/Version.md b/rest/api/v3/enforced_tls/docs/Version.md new file mode 100644 index 00000000..0dff80c4 --- /dev/null +++ b/rest/api/v3/enforced_tls/docs/Version.md @@ -0,0 +1,14 @@ +# Version + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**_1_DOT_1** | float32 | (value: `1.1`) +**_1_DOT_2** | float32 | (value: `1.2`) +**_1_DOT_3** | float32 | (value: `1.3`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/enforced_tls/model_enforced_tls_request_response.go b/rest/api/v3/enforced_tls/model_enforced_tls_request_response.go new file mode 100644 index 00000000..7788c006 --- /dev/null +++ b/rest/api/v3/enforced_tls/model_enforced_tls_request_response.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Enforced TLS API +* The Twilio SendGrid Enforced TLS API allows you to specify whether or not the recipient of your mail send is required to support TLS or have a valid certificate. Twilio SendGrid sends all emails with [Opportunistic TLS](https://sendgrid.com/blog/myth-opportunistic-tls-email-privacy/) by default, meaning email is sent with TLS, and if the recipient's inbox provider does not accept the TLS encryption, we then send the message unencrypted. You can optionally choose to enforce TLS encryption, meaning that if the recipient's inbox provider does not accept the TLS encryption, Twilio SendGrid drops the message and sends a block event with the message, “TLS required but not supported” as the description. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// EnforcedTlsRequestResponse struct for EnforcedTlsRequestResponse +type EnforcedTlsRequestResponse struct { + // Indicates if you want to require your recipients to support TLS. + RequireTls *bool `json:"require_tls,omitempty"` + // Indicates if you want to require your recipients to have a valid certificate. + RequireValidCert *bool `json:"require_valid_cert,omitempty"` + // The minimum required TLS certificate version. + Version *Version `json:"version,omitempty"` +} diff --git a/rest/api/v3/enforced_tls/model_error_response.go b/rest/api/v3/enforced_tls/model_error_response.go new file mode 100644 index 00000000..5c54a419 --- /dev/null +++ b/rest/api/v3/enforced_tls/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Enforced TLS API +* The Twilio SendGrid Enforced TLS API allows you to specify whether or not the recipient of your mail send is required to support TLS or have a valid certificate. Twilio SendGrid sends all emails with [Opportunistic TLS](https://sendgrid.com/blog/myth-opportunistic-tls-email-privacy/) by default, meaning email is sent with TLS, and if the recipient's inbox provider does not accept the TLS encryption, we then send the message unencrypted. You can optionally choose to enforce TLS encryption, meaning that if the recipient's inbox provider does not accept the TLS encryption, Twilio SendGrid drops the message and sends a block event with the message, “TLS required but not supported” as the description. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/enforced_tls/model_error_response_errors_inner.go b/rest/api/v3/enforced_tls/model_error_response_errors_inner.go new file mode 100644 index 00000000..f31a0e09 --- /dev/null +++ b/rest/api/v3/enforced_tls/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Enforced TLS API +* The Twilio SendGrid Enforced TLS API allows you to specify whether or not the recipient of your mail send is required to support TLS or have a valid certificate. Twilio SendGrid sends all emails with [Opportunistic TLS](https://sendgrid.com/blog/myth-opportunistic-tls-email-privacy/) by default, meaning email is sent with TLS, and if the recipient's inbox provider does not accept the TLS encryption, we then send the message unencrypted. You can optionally choose to enforce TLS encryption, meaning that if the recipient's inbox provider does not accept the TLS encryption, Twilio SendGrid drops the message and sends a block event with the message, “TLS required but not supported” as the description. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/enforced_tls/model_version.go b/rest/api/v3/enforced_tls/model_version.go new file mode 100644 index 00000000..731e1719 --- /dev/null +++ b/rest/api/v3/enforced_tls/model_version.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Enforced TLS API +* The Twilio SendGrid Enforced TLS API allows you to specify whether or not the recipient of your mail send is required to support TLS or have a valid certificate. Twilio SendGrid sends all emails with [Opportunistic TLS](https://sendgrid.com/blog/myth-opportunistic-tls-email-privacy/) by default, meaning email is sent with TLS, and if the recipient's inbox provider does not accept the TLS encryption, we then send the message unencrypted. You can optionally choose to enforce TLS encryption, meaning that if the recipient's inbox provider does not accept the TLS encryption, Twilio SendGrid drops the message and sends a block event with the message, “TLS required but not supported” as the description. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Version the model 'Version' +type Version float32 + +// List of Version +const ( + VERSION__1_DOT_1 Version = 1.1 + VERSION__1_DOT_2 Version = 1.2 + VERSION__1_DOT_3 Version = 1.3 +) diff --git a/rest/api/v3/integrations/.openapi-generator b/rest/api/v3/integrations/.openapi-generator new file mode 100644 index 00000000..f98f8c43 --- /dev/null +++ b/rest/api/v3/integrations/.openapi-generator @@ -0,0 +1,76 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_add_integration.go +api_delete_integration.go +api_find_integration_by_id.go +api_get_integrations_by_user.go +api_service.go +api_update_integration.go +docs/AddIntegration.md +docs/AddIntegration400Response.md +docs/DeleteIntegration.md +docs/DeleteIntegration400Response.md +docs/DeleteIntegration404Response.md +docs/Destination.md +docs/Destination1.md +docs/Destination2.md +docs/Destination3.md +docs/DestinationRegion.md +docs/DestinationRegion1.md +docs/DestinationRegion2.md +docs/FindIntegrationById.md +docs/Forbidden.md +docs/GetIntegrationsByUser.md +docs/GetIntegrationsByUser200Response.md +docs/GetIntegrationsByUser403Response.md +docs/GetIntegrationsByUser500Response.md +docs/Id.md +docs/Integration.md +docs/IntegrationFilters.md +docs/IntegrationInput.md +docs/IntegrationInputFilters.md +docs/IntegrationInputProperties.md +docs/IntegrationNotFound.md +docs/IntegrationPatch.md +docs/IntegrationPatchFilters.md +docs/IntegrationPatchProperties.md +docs/IntegrationProperties.md +docs/InternalError.md +docs/InvalidDeleteRequest.md +docs/InvalidRequest.md +docs/Items.md +docs/Items1.md +docs/Items2.md +docs/UpdateIntegration.md +model_add_integration_400_response.go +model_delete_integration_400_response.go +model_delete_integration_404_response.go +model_destination.go +model_destination1.go +model_destination2.go +model_destination3.go +model_destination_region.go +model_destination_region1.go +model_destination_region2.go +model_forbidden.go +model_get_integrations_by_user_200_response.go +model_get_integrations_by_user_403_response.go +model_get_integrations_by_user_500_response.go +model_id.go +model_integration.go +model_integration_filters.go +model_integration_input.go +model_integration_input_filters.go +model_integration_input_properties.go +model_integration_not_found.go +model_integration_patch.go +model_integration_patch_filters.go +model_integration_patch_properties.go +model_integration_properties.go +model_internal_error.go +model_invalid_delete_request.go +model_invalid_request.go +model_items.go +model_items1.go +model_items2.go diff --git a/rest/api/v3/integrations/.openapi-generator-ignore b/rest/api/v3/integrations/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/integrations/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/integrations/README.md b/rest/api/v3/integrations/README.md new file mode 100644 index 00000000..788587b1 --- /dev/null +++ b/rest/api/v3/integrations/README.md @@ -0,0 +1,94 @@ +# Go API client for + +Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:43.514382+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AddIntegration* | [**AddIntegration**](docs/AddIntegration.md#addintegration) | **Post** /v3/marketing/integrations | CreateIntegration +*DeleteIntegration* | [**DeleteIntegration**](docs/DeleteIntegration.md#deleteintegration) | **Delete** /v3/marketing/integrations | DeleteBulkIntegration +*FindIntegrationById* | [**FindIntegrationById**](docs/FindIntegrationById.md#findintegrationbyid) | **Get** /v3/marketing/integrations/{Id} | GetIntegration +*GetIntegrationsByUser* | [**GetIntegrationsByUser**](docs/GetIntegrationsByUser.md#getintegrationsbyuser) | **Get** /v3/marketing/integrations | ListIntegration +*UpdateIntegration* | [**UpdateIntegration**](docs/UpdateIntegration.md#updateintegration) | **Patch** /v3/marketing/integrations/{Id} | UpdateIntegration + + +## Documentation For Models + + - [AddIntegration400Response](AddIntegration400Response.md) + - [DeleteIntegration400Response](DeleteIntegration400Response.md) + - [DeleteIntegration404Response](DeleteIntegration404Response.md) + - [Destination](Destination.md) + - [Destination1](Destination1.md) + - [Destination2](Destination2.md) + - [Destination3](Destination3.md) + - [DestinationRegion](DestinationRegion.md) + - [DestinationRegion1](DestinationRegion1.md) + - [DestinationRegion2](DestinationRegion2.md) + - [Forbidden](Forbidden.md) + - [GetIntegrationsByUser200Response](GetIntegrationsByUser200Response.md) + - [GetIntegrationsByUser403Response](GetIntegrationsByUser403Response.md) + - [GetIntegrationsByUser500Response](GetIntegrationsByUser500Response.md) + - [Id](Id.md) + - [Integration](Integration.md) + - [IntegrationFilters](IntegrationFilters.md) + - [IntegrationInput](IntegrationInput.md) + - [IntegrationInputFilters](IntegrationInputFilters.md) + - [IntegrationInputProperties](IntegrationInputProperties.md) + - [IntegrationNotFound](IntegrationNotFound.md) + - [IntegrationPatch](IntegrationPatch.md) + - [IntegrationPatchFilters](IntegrationPatchFilters.md) + - [IntegrationPatchProperties](IntegrationPatchProperties.md) + - [IntegrationProperties](IntegrationProperties.md) + - [InternalError](InternalError.md) + - [InvalidDeleteRequest](InvalidDeleteRequest.md) + - [InvalidRequest](InvalidRequest.md) + - [Items](Items.md) + - [Items1](Items1.md) + - [Items2](Items2.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/integrations/api_add_integration.go b/rest/api/v3/integrations/api_add_integration.go new file mode 100644 index 00000000..ecf7f465 --- /dev/null +++ b/rest/api/v3/integrations/api_add_integration.go @@ -0,0 +1,88 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type AddIntegrationParam struct { + // + IntegrationInput *IntegrationInput `json:"IntegrationInput"` +} + +func (params *AddIntegrationParam) SetIntegrationInput(IntegrationInput IntegrationInput) *AddIntegrationParam { + params.IntegrationInput = &IntegrationInput + return params +} + +// This endpoint creates an Integration for email event forwarding. Each Integration has a maximum number of allowed Integration instances per user. For example, users can create up to 10 Segment Integrations. +func (c *ApiService) AddIntegration(params *AddIntegrationParam) (interface{}, error) { + path := "/v3/marketing/integrations" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.IntegrationInput != nil { + b, err := json.Marshal(*params.IntegrationInput) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &Integration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &AddIntegration400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &GetIntegrationsByUser403Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &GetIntegrationsByUser500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/integrations/api_delete_integration.go b/rest/api/v3/integrations/api_delete_integration.go new file mode 100644 index 00000000..18cba8d4 --- /dev/null +++ b/rest/api/v3/integrations/api_delete_integration.go @@ -0,0 +1,92 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type DeleteIntegrationParam struct { + // Comma-delimited Integration IDs for the Integrations to delete. + Ids *[]Id `json:"ids"` +} + +func (params *DeleteIntegrationParam) SetIds(Ids []Id) *DeleteIntegrationParam { + params.Ids = &Ids + return params +} + +// This endpoint deletes Integrations. +func (c *ApiService) DeleteIntegration(params *DeleteIntegrationParam) (interface{}, error) { + path := "/v3/marketing/integrations" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Ids != nil { + for _, item := range *params.Ids { + v, err := json.Marshal(item) + + if err != nil { + return nil, err + } + + data.Add("ids", string(v)) + + } + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &DeleteIntegration400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &GetIntegrationsByUser403Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &DeleteIntegration404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &GetIntegrationsByUser500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/integrations/api_find_integration_by_id.go b/rest/api/v3/integrations/api_find_integration_by_id.go new file mode 100644 index 00000000..44a96ac6 --- /dev/null +++ b/rest/api/v3/integrations/api_find_integration_by_id.go @@ -0,0 +1,84 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type FindIntegrationByIdParam struct { + // The ID of the Integration you would like to retrieve. + Id *string `json:"id"` +} + +func (params *FindIntegrationByIdParam) SetId(Id string) *FindIntegrationByIdParam { + params.Id = &Id + return params +} + +// This endpoint returns the data for a specific Integration. +func (c *ApiService) FindIntegrationById(params *FindIntegrationByIdParam) (interface{}, error) { + path := "/v3/marketing/integrations/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &Integration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &GetIntegrationsByUser403Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &DeleteIntegration404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &GetIntegrationsByUser500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/integrations/api_get_integrations_by_user.go b/rest/api/v3/integrations/api_get_integrations_by_user.go new file mode 100644 index 00000000..10cf76a9 --- /dev/null +++ b/rest/api/v3/integrations/api_get_integrations_by_user.go @@ -0,0 +1,64 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type GetIntegrationsByUserParam struct { +} + +// This endpoint returns all the Integrations for the user making this call. +func (c *ApiService) GetIntegrationsByUser() (interface{}, error) { + path := "/v3/marketing/integrations" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetIntegrationsByUser200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &GetIntegrationsByUser403Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &GetIntegrationsByUser500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/integrations/api_service.go b/rest/api/v3/integrations/api_service.go new file mode 100644 index 00000000..6a43a8ff --- /dev/null +++ b/rest/api/v3/integrations/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/integrations/api_update_integration.go b/rest/api/v3/integrations/api_update_integration.go new file mode 100644 index 00000000..ef197361 --- /dev/null +++ b/rest/api/v3/integrations/api_update_integration.go @@ -0,0 +1,107 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type UpdateIntegrationParam struct { + // The ID of the Integration you would like to update. + Id *string `json:"id"` + // + IntegrationPatch *IntegrationPatch `json:"IntegrationPatch"` +} + +func (params *UpdateIntegrationParam) SetId(Id string) *UpdateIntegrationParam { + params.Id = &Id + return params +} +func (params *UpdateIntegrationParam) SetIntegrationPatch(IntegrationPatch IntegrationPatch) *UpdateIntegrationParam { + params.IntegrationPatch = &IntegrationPatch + return params +} + +// This endpoint updates an existing Integration. +func (c *ApiService) UpdateIntegration(params *UpdateIntegrationParam) (interface{}, error) { + path := "/v3/marketing/integrations/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.IntegrationPatch != nil { + b, err := json.Marshal(*params.IntegrationPatch) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &Integration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &AddIntegration400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &GetIntegrationsByUser403Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &DeleteIntegration404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &GetIntegrationsByUser500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/integrations/docs/AddIntegration.md b/rest/api/v3/integrations/docs/AddIntegration.md new file mode 100644 index 00000000..ffe11319 --- /dev/null +++ b/rest/api/v3/integrations/docs/AddIntegration.md @@ -0,0 +1,47 @@ +# AddIntegration + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddIntegration**](AddIntegration.md#AddIntegration) | **Post** /v3/marketing/integrations | CreateIntegration + + + +## AddIntegration + +> Integration AddIntegration(ctx, IntegrationInput) + +CreateIntegration + +This endpoint creates an Integration for email event forwarding. Each Integration has a maximum number of allowed Integration instances per user. For example, users can create up to 10 Segment Integrations. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a AddIntegrationParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**Integration**](Integration.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/integrations/docs/AddIntegration400Response.md b/rest/api/v3/integrations/docs/AddIntegration400Response.md new file mode 100644 index 00000000..c08231ce --- /dev/null +++ b/rest/api/v3/integrations/docs/AddIntegration400Response.md @@ -0,0 +1,11 @@ +# AddIntegration400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]InvalidRequest**](InvalidRequest.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/DeleteIntegration.md b/rest/api/v3/integrations/docs/DeleteIntegration.md new file mode 100644 index 00000000..730e43f0 --- /dev/null +++ b/rest/api/v3/integrations/docs/DeleteIntegration.md @@ -0,0 +1,47 @@ +# DeleteIntegration + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteIntegration**](DeleteIntegration.md#DeleteIntegration) | **Delete** /v3/marketing/integrations | DeleteBulkIntegration + + + +## DeleteIntegration + +> DeleteIntegration(ctx, Ids) + +DeleteBulkIntegration + +This endpoint deletes Integrations. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteIntegrationParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/integrations/docs/DeleteIntegration400Response.md b/rest/api/v3/integrations/docs/DeleteIntegration400Response.md new file mode 100644 index 00000000..52a6707f --- /dev/null +++ b/rest/api/v3/integrations/docs/DeleteIntegration400Response.md @@ -0,0 +1,11 @@ +# DeleteIntegration400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]InvalidDeleteRequest**](InvalidDeleteRequest.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/DeleteIntegration404Response.md b/rest/api/v3/integrations/docs/DeleteIntegration404Response.md new file mode 100644 index 00000000..ab33a208 --- /dev/null +++ b/rest/api/v3/integrations/docs/DeleteIntegration404Response.md @@ -0,0 +1,11 @@ +# DeleteIntegration404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]IntegrationNotFound**](IntegrationNotFound.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/Destination.md b/rest/api/v3/integrations/docs/Destination.md new file mode 100644 index 00000000..e0a69331 --- /dev/null +++ b/rest/api/v3/integrations/docs/Destination.md @@ -0,0 +1,12 @@ +# Destination + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**SEGMENT** | string | (value: `"Segment"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/Destination1.md b/rest/api/v3/integrations/docs/Destination1.md new file mode 100644 index 00000000..eeff58b5 --- /dev/null +++ b/rest/api/v3/integrations/docs/Destination1.md @@ -0,0 +1,12 @@ +# Destination1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**SEGMENT** | string | (value: `"Segment"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/Destination2.md b/rest/api/v3/integrations/docs/Destination2.md new file mode 100644 index 00000000..6c18c7f8 --- /dev/null +++ b/rest/api/v3/integrations/docs/Destination2.md @@ -0,0 +1,12 @@ +# Destination2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**SEGMENT** | string | (value: `"Segment"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/Destination3.md b/rest/api/v3/integrations/docs/Destination3.md new file mode 100644 index 00000000..bfbae361 --- /dev/null +++ b/rest/api/v3/integrations/docs/Destination3.md @@ -0,0 +1,12 @@ +# Destination3 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**SEGMENT** | string | (value: `"Segment"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/DestinationRegion.md b/rest/api/v3/integrations/docs/DestinationRegion.md new file mode 100644 index 00000000..1a56b3c2 --- /dev/null +++ b/rest/api/v3/integrations/docs/DestinationRegion.md @@ -0,0 +1,13 @@ +# DestinationRegion + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**EU** | string | (value: `"EU"`) +**US** | string | (value: `"US"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/DestinationRegion1.md b/rest/api/v3/integrations/docs/DestinationRegion1.md new file mode 100644 index 00000000..42ac76a4 --- /dev/null +++ b/rest/api/v3/integrations/docs/DestinationRegion1.md @@ -0,0 +1,13 @@ +# DestinationRegion1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**EU** | string | (value: `"EU"`) +**US** | string | (value: `"US"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/DestinationRegion2.md b/rest/api/v3/integrations/docs/DestinationRegion2.md new file mode 100644 index 00000000..b79835bb --- /dev/null +++ b/rest/api/v3/integrations/docs/DestinationRegion2.md @@ -0,0 +1,13 @@ +# DestinationRegion2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**EU** | string | (value: `"EU"`) +**US** | string | (value: `"US"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/FindIntegrationById.md b/rest/api/v3/integrations/docs/FindIntegrationById.md new file mode 100644 index 00000000..3f19621a --- /dev/null +++ b/rest/api/v3/integrations/docs/FindIntegrationById.md @@ -0,0 +1,51 @@ +# FindIntegrationById + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**FindIntegrationById**](FindIntegrationById.md#FindIntegrationById) | **Get** /v3/marketing/integrations/{Id} | GetIntegration + + + +## FindIntegrationById + +> Integration FindIntegrationById(ctx, Id) + +GetIntegration + +This endpoint returns the data for a specific Integration. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the Integration you would like to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a FindIntegrationByIdParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**Integration**](Integration.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/integrations/docs/Forbidden.md b/rest/api/v3/integrations/docs/Forbidden.md new file mode 100644 index 00000000..1852697e --- /dev/null +++ b/rest/api/v3/integrations/docs/Forbidden.md @@ -0,0 +1,11 @@ +# Forbidden + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | The error message tells you the cause of failure. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/GetIntegrationsByUser.md b/rest/api/v3/integrations/docs/GetIntegrationsByUser.md new file mode 100644 index 00000000..c692ef46 --- /dev/null +++ b/rest/api/v3/integrations/docs/GetIntegrationsByUser.md @@ -0,0 +1,44 @@ +# GetIntegrationsByUser + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetIntegrationsByUser**](GetIntegrationsByUser.md#GetIntegrationsByUser) | **Get** /v3/marketing/integrations | ListIntegration + + + +## GetIntegrationsByUser + +> GetIntegrationsByUser200Response GetIntegrationsByUser(ctx, ) + +ListIntegration + +This endpoint returns all the Integrations for the user making this call. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a GetIntegrationsByUserParams struct + + +### Return type + +[**GetIntegrationsByUser200Response**](GetIntegrationsByUser200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/integrations/docs/GetIntegrationsByUser200Response.md b/rest/api/v3/integrations/docs/GetIntegrationsByUser200Response.md new file mode 100644 index 00000000..511b87d8 --- /dev/null +++ b/rest/api/v3/integrations/docs/GetIntegrationsByUser200Response.md @@ -0,0 +1,11 @@ +# GetIntegrationsByUser200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]Integration**](Integration.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/GetIntegrationsByUser403Response.md b/rest/api/v3/integrations/docs/GetIntegrationsByUser403Response.md new file mode 100644 index 00000000..59d7a833 --- /dev/null +++ b/rest/api/v3/integrations/docs/GetIntegrationsByUser403Response.md @@ -0,0 +1,11 @@ +# GetIntegrationsByUser403Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]Forbidden**](Forbidden.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/GetIntegrationsByUser500Response.md b/rest/api/v3/integrations/docs/GetIntegrationsByUser500Response.md new file mode 100644 index 00000000..6d5d7f88 --- /dev/null +++ b/rest/api/v3/integrations/docs/GetIntegrationsByUser500Response.md @@ -0,0 +1,11 @@ +# GetIntegrationsByUser500Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]InternalError**](InternalError.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/Id.md b/rest/api/v3/integrations/docs/Id.md new file mode 100644 index 00000000..67dc46d0 --- /dev/null +++ b/rest/api/v3/integrations/docs/Id.md @@ -0,0 +1,11 @@ +# Id + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IntegrationId** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/Integration.md b/rest/api/v3/integrations/docs/Integration.md new file mode 100644 index 00000000..a3645110 --- /dev/null +++ b/rest/api/v3/integrations/docs/Integration.md @@ -0,0 +1,16 @@ +# Integration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IntegrationId** | **string** | The unique ID of an Integration. |[optional] +**UserId** | **string** | Your Twilio SendGrid account ID. |[optional] +**Filters** | [**IntegrationFilters**](IntegrationFilters.md) | |[optional] +**Properties** | [**IntegrationProperties**](IntegrationProperties.md) | |[optional] +**Label** | **string** | The nickname for the Integration. |[optional] [default to "Untitled Integration"] +**Destination** | [**Destination3**](Destination3.md) | The third-party application you would like to forward your events to. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/IntegrationFilters.md b/rest/api/v3/integrations/docs/IntegrationFilters.md new file mode 100644 index 00000000..17812e6e --- /dev/null +++ b/rest/api/v3/integrations/docs/IntegrationFilters.md @@ -0,0 +1,11 @@ +# IntegrationFilters + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EmailEvents** | [**[]Items2**](Items2.md) | The possible SendGrid email event types for event forwarding. Specify all the email event types that you would like to forward to the Integration's destination. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/IntegrationInput.md b/rest/api/v3/integrations/docs/IntegrationInput.md new file mode 100644 index 00000000..0d6fa829 --- /dev/null +++ b/rest/api/v3/integrations/docs/IntegrationInput.md @@ -0,0 +1,14 @@ +# IntegrationInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Destination** | [**Destination2**](Destination2.md) | The third-party application you would like to forward your events to. | +**Filters** | [**IntegrationInputFilters**](IntegrationInputFilters.md) | | +**Properties** | [**IntegrationInputProperties**](IntegrationInputProperties.md) | | +**Label** | **string** | The nickname for the Integration. |[optional] [default to "Untitled Integration"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/IntegrationInputFilters.md b/rest/api/v3/integrations/docs/IntegrationInputFilters.md new file mode 100644 index 00000000..dc1ebf0f --- /dev/null +++ b/rest/api/v3/integrations/docs/IntegrationInputFilters.md @@ -0,0 +1,11 @@ +# IntegrationInputFilters + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EmailEvents** | [**[]Items1**](Items1.md) | The possible SendGrid email event types for event forwarding. Specify all the email event types that you would like to forward to the Integration's destination. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/IntegrationInputProperties.md b/rest/api/v3/integrations/docs/IntegrationInputProperties.md new file mode 100644 index 00000000..5e56f5d6 --- /dev/null +++ b/rest/api/v3/integrations/docs/IntegrationInputProperties.md @@ -0,0 +1,12 @@ +# IntegrationInputProperties + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**WriteKey** | **string** | The write key provided by the Segment Source you'd like to have events forwarded to. Must be between 6 and 51 characters. | +**DestinationRegion** | [**DestinationRegion1**](DestinationRegion1.md) | The workspace region where the Segment Source write key lives. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/IntegrationNotFound.md b/rest/api/v3/integrations/docs/IntegrationNotFound.md new file mode 100644 index 00000000..dc5cbacf --- /dev/null +++ b/rest/api/v3/integrations/docs/IntegrationNotFound.md @@ -0,0 +1,11 @@ +# IntegrationNotFound + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | The error message tells you the cause of failure. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/IntegrationPatch.md b/rest/api/v3/integrations/docs/IntegrationPatch.md new file mode 100644 index 00000000..bf974d8c --- /dev/null +++ b/rest/api/v3/integrations/docs/IntegrationPatch.md @@ -0,0 +1,14 @@ +# IntegrationPatch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Destination** | [**Destination1**](Destination1.md) | The third-party application you would like to forward your email events to. |[optional] +**Filters** | [**IntegrationPatchFilters**](IntegrationPatchFilters.md) | |[optional] +**Properties** | [**IntegrationPatchProperties**](IntegrationPatchProperties.md) | |[optional] +**Label** | **string** | The nickname for the Integration. |[optional] [default to "Untitled Integration"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/IntegrationPatchFilters.md b/rest/api/v3/integrations/docs/IntegrationPatchFilters.md new file mode 100644 index 00000000..4feb447e --- /dev/null +++ b/rest/api/v3/integrations/docs/IntegrationPatchFilters.md @@ -0,0 +1,11 @@ +# IntegrationPatchFilters + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EmailEvents** | [**[]Items**](Items.md) | The possible SendGrid email event types for event forwarding. Specify all the email event types that you would like to forward to the Integration's destination. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/IntegrationPatchProperties.md b/rest/api/v3/integrations/docs/IntegrationPatchProperties.md new file mode 100644 index 00000000..2ef4f33f --- /dev/null +++ b/rest/api/v3/integrations/docs/IntegrationPatchProperties.md @@ -0,0 +1,12 @@ +# IntegrationPatchProperties + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**WriteKey** | **string** | The write key provided by the Segment Source you'd like to have events forwarded to. Must be between 6 and 51 characters. |[optional] +**DestinationRegion** | [**DestinationRegion**](DestinationRegion.md) | The workspace region where the Segment Source write key lives. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/IntegrationProperties.md b/rest/api/v3/integrations/docs/IntegrationProperties.md new file mode 100644 index 00000000..9ddebe9b --- /dev/null +++ b/rest/api/v3/integrations/docs/IntegrationProperties.md @@ -0,0 +1,12 @@ +# IntegrationProperties + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**WriteKey** | **string** | The write key provided by the Segment Source you'd like to have events forwarded to. Must be between 6 and 51 characters. |[optional] +**DestinationRegion** | [**DestinationRegion2**](DestinationRegion2.md) | The workspace region where the Segment Source write key lives. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/InternalError.md b/rest/api/v3/integrations/docs/InternalError.md new file mode 100644 index 00000000..46bca29a --- /dev/null +++ b/rest/api/v3/integrations/docs/InternalError.md @@ -0,0 +1,11 @@ +# InternalError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | The error message tells you the cause of failure. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/InvalidDeleteRequest.md b/rest/api/v3/integrations/docs/InvalidDeleteRequest.md new file mode 100644 index 00000000..0a26bf26 --- /dev/null +++ b/rest/api/v3/integrations/docs/InvalidDeleteRequest.md @@ -0,0 +1,12 @@ +# InvalidDeleteRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | The error message tells you the cause of failure. |[optional] +**Parameter** | **string** | The parameter shows more information about where the error is. The number in the brackets is the invalid ID indexed. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/InvalidRequest.md b/rest/api/v3/integrations/docs/InvalidRequest.md new file mode 100644 index 00000000..2058d058 --- /dev/null +++ b/rest/api/v3/integrations/docs/InvalidRequest.md @@ -0,0 +1,12 @@ +# InvalidRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | The error message tells you the cause of validation failure(s), separated by commas if there are multiple failures. |[optional] +**Field** | **string** | The field shows more information on where the error is when available. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/Items.md b/rest/api/v3/integrations/docs/Items.md new file mode 100644 index 00000000..31a64e99 --- /dev/null +++ b/rest/api/v3/integrations/docs/Items.md @@ -0,0 +1,23 @@ +# Items + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DROP** | string | (value: `"drop"`) +**PROCESSED** | string | (value: `"processed"`) +**DEFERRED** | string | (value: `"deferred"`) +**GROUP_UNSUBSCRIBE** | string | (value: `"group_unsubscribe"`) +**BOUNCE** | string | (value: `"bounce"`) +**DELIVERED** | string | (value: `"delivered"`) +**CLICK** | string | (value: `"click"`) +**UNSUBSCRIBE** | string | (value: `"unsubscribe"`) +**OPEN** | string | (value: `"open"`) +**GROUP_RESUBSCRIBE** | string | (value: `"group_resubscribe"`) +**SPAMREPORT** | string | (value: `"spamreport"`) +**MACHINE_OPENED** | string | (value: `"machine_opened"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/Items1.md b/rest/api/v3/integrations/docs/Items1.md new file mode 100644 index 00000000..70d35e3a --- /dev/null +++ b/rest/api/v3/integrations/docs/Items1.md @@ -0,0 +1,23 @@ +# Items1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DROP** | string | (value: `"drop"`) +**PROCESSED** | string | (value: `"processed"`) +**DEFERRED** | string | (value: `"deferred"`) +**GROUP_UNSUBSCRIBE** | string | (value: `"group_unsubscribe"`) +**BOUNCE** | string | (value: `"bounce"`) +**DELIVERED** | string | (value: `"delivered"`) +**CLICK** | string | (value: `"click"`) +**UNSUBSCRIBE** | string | (value: `"unsubscribe"`) +**OPEN** | string | (value: `"open"`) +**GROUP_RESUBSCRIBE** | string | (value: `"group_resubscribe"`) +**SPAMREPORT** | string | (value: `"spamreport"`) +**MACHINE_OPENED** | string | (value: `"machine_opened"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/Items2.md b/rest/api/v3/integrations/docs/Items2.md new file mode 100644 index 00000000..07701e8f --- /dev/null +++ b/rest/api/v3/integrations/docs/Items2.md @@ -0,0 +1,23 @@ +# Items2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DROP** | string | (value: `"drop"`) +**PROCESSED** | string | (value: `"processed"`) +**DEFERRED** | string | (value: `"deferred"`) +**GROUP_UNSUBSCRIBE** | string | (value: `"group_unsubscribe"`) +**BOUNCE** | string | (value: `"bounce"`) +**DELIVERED** | string | (value: `"delivered"`) +**CLICK** | string | (value: `"click"`) +**UNSUBSCRIBE** | string | (value: `"unsubscribe"`) +**OPEN** | string | (value: `"open"`) +**GROUP_RESUBSCRIBE** | string | (value: `"group_resubscribe"`) +**SPAMREPORT** | string | (value: `"spamreport"`) +**MACHINE_OPENED** | string | (value: `"machine_opened"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/UpdateIntegration.md b/rest/api/v3/integrations/docs/UpdateIntegration.md new file mode 100644 index 00000000..f3fb79c2 --- /dev/null +++ b/rest/api/v3/integrations/docs/UpdateIntegration.md @@ -0,0 +1,51 @@ +# UpdateIntegration + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateIntegration**](UpdateIntegration.md#UpdateIntegration) | **Patch** /v3/marketing/integrations/{Id} | UpdateIntegration + + + +## UpdateIntegration + +> Integration UpdateIntegration(ctx, IdIntegrationPatch) + +UpdateIntegration + +This endpoint updates an existing Integration. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the Integration you would like to update. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateIntegrationParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**Integration**](Integration.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/integrations/model_add_integration_400_response.go b/rest/api/v3/integrations/model_add_integration_400_response.go new file mode 100644 index 00000000..ad8e53b3 --- /dev/null +++ b/rest/api/v3/integrations/model_add_integration_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIntegration400Response struct for AddIntegration400Response +type AddIntegration400Response struct { + Errors *[]InvalidRequest `json:"errors,omitempty"` +} diff --git a/rest/api/v3/integrations/model_delete_integration_400_response.go b/rest/api/v3/integrations/model_delete_integration_400_response.go new file mode 100644 index 00000000..81d15a69 --- /dev/null +++ b/rest/api/v3/integrations/model_delete_integration_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteIntegration400Response struct for DeleteIntegration400Response +type DeleteIntegration400Response struct { + Errors *[]InvalidDeleteRequest `json:"errors,omitempty"` +} diff --git a/rest/api/v3/integrations/model_delete_integration_404_response.go b/rest/api/v3/integrations/model_delete_integration_404_response.go new file mode 100644 index 00000000..990eeba8 --- /dev/null +++ b/rest/api/v3/integrations/model_delete_integration_404_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteIntegration404Response struct for DeleteIntegration404Response +type DeleteIntegration404Response struct { + Errors *[]IntegrationNotFound `json:"errors,omitempty"` +} diff --git a/rest/api/v3/integrations/model_destination.go b/rest/api/v3/integrations/model_destination.go new file mode 100644 index 00000000..133a8563 --- /dev/null +++ b/rest/api/v3/integrations/model_destination.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Destination The third-party application you would like to forward your email events to. +type Destination string + +// List of Destination +const ( + DESTINATION_SEGMENT Destination = "Segment" +) diff --git a/rest/api/v3/integrations/model_destination1.go b/rest/api/v3/integrations/model_destination1.go new file mode 100644 index 00000000..4350d666 --- /dev/null +++ b/rest/api/v3/integrations/model_destination1.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Destination1 the model 'Destination1' +type Destination1 string + +// List of Destination1 +const ( + DESTINATION1_SEGMENT Destination1 = "Segment" +) diff --git a/rest/api/v3/integrations/model_destination2.go b/rest/api/v3/integrations/model_destination2.go new file mode 100644 index 00000000..f888e2ef --- /dev/null +++ b/rest/api/v3/integrations/model_destination2.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Destination2 the model 'Destination2' +type Destination2 string + +// List of Destination2 +const ( + DESTINATION2_SEGMENT Destination2 = "Segment" +) diff --git a/rest/api/v3/integrations/model_destination3.go b/rest/api/v3/integrations/model_destination3.go new file mode 100644 index 00000000..7ef311db --- /dev/null +++ b/rest/api/v3/integrations/model_destination3.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Destination3 the model 'Destination3' +type Destination3 string + +// List of Destination3 +const ( + DESTINATION3_SEGMENT Destination3 = "Segment" +) diff --git a/rest/api/v3/integrations/model_destination_region.go b/rest/api/v3/integrations/model_destination_region.go new file mode 100644 index 00000000..b972f4cc --- /dev/null +++ b/rest/api/v3/integrations/model_destination_region.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DestinationRegion the model 'DestinationRegion' +type DestinationRegion string + +// List of DestinationRegion +const ( + DESTINATIONREGION_EU DestinationRegion = "EU" + DESTINATIONREGION_US DestinationRegion = "US" +) diff --git a/rest/api/v3/integrations/model_destination_region1.go b/rest/api/v3/integrations/model_destination_region1.go new file mode 100644 index 00000000..fe5b5c33 --- /dev/null +++ b/rest/api/v3/integrations/model_destination_region1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DestinationRegion1 the model 'DestinationRegion1' +type DestinationRegion1 string + +// List of DestinationRegion1 +const ( + DESTINATIONREGION1_EU DestinationRegion1 = "EU" + DESTINATIONREGION1_US DestinationRegion1 = "US" +) diff --git a/rest/api/v3/integrations/model_destination_region2.go b/rest/api/v3/integrations/model_destination_region2.go new file mode 100644 index 00000000..85079c07 --- /dev/null +++ b/rest/api/v3/integrations/model_destination_region2.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DestinationRegion2 the model 'DestinationRegion2' +type DestinationRegion2 string + +// List of DestinationRegion2 +const ( + DESTINATIONREGION2_EU DestinationRegion2 = "EU" + DESTINATIONREGION2_US DestinationRegion2 = "US" +) diff --git a/rest/api/v3/integrations/model_forbidden.go b/rest/api/v3/integrations/model_forbidden.go new file mode 100644 index 00000000..9e941266 --- /dev/null +++ b/rest/api/v3/integrations/model_forbidden.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Forbidden struct for Forbidden +type Forbidden struct { + // The error message tells you the cause of failure. + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/integrations/model_get_integrations_by_user_200_response.go b/rest/api/v3/integrations/model_get_integrations_by_user_200_response.go new file mode 100644 index 00000000..f7421247 --- /dev/null +++ b/rest/api/v3/integrations/model_get_integrations_by_user_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetIntegrationsByUser200Response struct for GetIntegrationsByUser200Response +type GetIntegrationsByUser200Response struct { + Result *[]Integration `json:"result,omitempty"` +} diff --git a/rest/api/v3/integrations/model_get_integrations_by_user_403_response.go b/rest/api/v3/integrations/model_get_integrations_by_user_403_response.go new file mode 100644 index 00000000..c0b4cf0a --- /dev/null +++ b/rest/api/v3/integrations/model_get_integrations_by_user_403_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetIntegrationsByUser403Response struct for GetIntegrationsByUser403Response +type GetIntegrationsByUser403Response struct { + Errors *[]Forbidden `json:"errors,omitempty"` +} diff --git a/rest/api/v3/integrations/model_get_integrations_by_user_500_response.go b/rest/api/v3/integrations/model_get_integrations_by_user_500_response.go new file mode 100644 index 00000000..c315cb2b --- /dev/null +++ b/rest/api/v3/integrations/model_get_integrations_by_user_500_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetIntegrationsByUser500Response struct for GetIntegrationsByUser500Response +type GetIntegrationsByUser500Response struct { + Errors *[]InternalError `json:"errors,omitempty"` +} diff --git a/rest/api/v3/integrations/model_id.go b/rest/api/v3/integrations/model_id.go new file mode 100644 index 00000000..e5ddf078 --- /dev/null +++ b/rest/api/v3/integrations/model_id.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Id The unique ID of an Integration. +type Id struct { + IntegrationId *string `json:"integration_id,omitempty"` +} diff --git a/rest/api/v3/integrations/model_integration.go b/rest/api/v3/integrations/model_integration.go new file mode 100644 index 00000000..82d04c57 --- /dev/null +++ b/rest/api/v3/integrations/model_integration.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Integration struct for Integration +type Integration struct { + // The unique ID of an Integration. + IntegrationId *string `json:"integration_id,omitempty"` + // Your Twilio SendGrid account ID. + UserId *string `json:"user_id,omitempty"` + Filters *IntegrationFilters `json:"filters,omitempty"` + Properties *IntegrationProperties `json:"properties,omitempty"` + // The nickname for the Integration. + Label *string `json:"label,omitempty"` + // The third-party application you would like to forward your events to. + Destination *Destination3 `json:"destination,omitempty"` +} diff --git a/rest/api/v3/integrations/model_integration_filters.go b/rest/api/v3/integrations/model_integration_filters.go new file mode 100644 index 00000000..fbf2911c --- /dev/null +++ b/rest/api/v3/integrations/model_integration_filters.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IntegrationFilters The configurable filters for SendGrid to destination email event forwarding. +type IntegrationFilters struct { + // The possible SendGrid email event types for event forwarding. Specify all the email event types that you would like to forward to the Integration's destination. + EmailEvents *[]Items2 `json:"email_events,omitempty"` +} diff --git a/rest/api/v3/integrations/model_integration_input.go b/rest/api/v3/integrations/model_integration_input.go new file mode 100644 index 00000000..032d394b --- /dev/null +++ b/rest/api/v3/integrations/model_integration_input.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IntegrationInput struct for IntegrationInput +type IntegrationInput struct { + // The third-party application you would like to forward your events to. + Destination Destination2 `json:"destination"` + Filters IntegrationInputFilters `json:"filters"` + Properties IntegrationInputProperties `json:"properties"` + // The nickname for the Integration. + Label *string `json:"label,omitempty"` +} diff --git a/rest/api/v3/integrations/model_integration_input_filters.go b/rest/api/v3/integrations/model_integration_input_filters.go new file mode 100644 index 00000000..15f01bb0 --- /dev/null +++ b/rest/api/v3/integrations/model_integration_input_filters.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IntegrationInputFilters The configurable filters for SendGrid to destination email event forwarding. +type IntegrationInputFilters struct { + // The possible SendGrid email event types for event forwarding. Specify all the email event types that you would like to forward to the Integration's destination. + EmailEvents []Items1 `json:"email_events"` +} diff --git a/rest/api/v3/integrations/model_integration_input_properties.go b/rest/api/v3/integrations/model_integration_input_properties.go new file mode 100644 index 00000000..b4c3a181 --- /dev/null +++ b/rest/api/v3/integrations/model_integration_input_properties.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IntegrationInputProperties The properties of an Integration required to send events to a specific third-party application. +type IntegrationInputProperties struct { + // The write key provided by the Segment Source you'd like to have events forwarded to. Must be between 6 and 51 characters. + WriteKey string `json:"write_key"` + // The workspace region where the Segment Source write key lives. + DestinationRegion DestinationRegion1 `json:"destination_region"` +} diff --git a/rest/api/v3/integrations/model_integration_not_found.go b/rest/api/v3/integrations/model_integration_not_found.go new file mode 100644 index 00000000..ae903136 --- /dev/null +++ b/rest/api/v3/integrations/model_integration_not_found.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IntegrationNotFound struct for IntegrationNotFound +type IntegrationNotFound struct { + // The error message tells you the cause of failure. + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/integrations/model_integration_patch.go b/rest/api/v3/integrations/model_integration_patch.go new file mode 100644 index 00000000..0f43f1a8 --- /dev/null +++ b/rest/api/v3/integrations/model_integration_patch.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IntegrationPatch struct for IntegrationPatch +type IntegrationPatch struct { + // The third-party application you would like to forward your email events to. + Destination *Destination1 `json:"destination,omitempty"` + Filters *IntegrationPatchFilters `json:"filters,omitempty"` + Properties *IntegrationPatchProperties `json:"properties,omitempty"` + // The nickname for the Integration. + Label *string `json:"label,omitempty"` +} diff --git a/rest/api/v3/integrations/model_integration_patch_filters.go b/rest/api/v3/integrations/model_integration_patch_filters.go new file mode 100644 index 00000000..0ded71fd --- /dev/null +++ b/rest/api/v3/integrations/model_integration_patch_filters.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IntegrationPatchFilters The configurable filters for SendGrid to destination email event forwarding. +type IntegrationPatchFilters struct { + // The possible SendGrid email event types for event forwarding. Specify all the email event types that you would like to forward to the Integration's destination. + EmailEvents *[]Items `json:"email_events,omitempty"` +} diff --git a/rest/api/v3/integrations/model_integration_patch_properties.go b/rest/api/v3/integrations/model_integration_patch_properties.go new file mode 100644 index 00000000..f8fd78c1 --- /dev/null +++ b/rest/api/v3/integrations/model_integration_patch_properties.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IntegrationPatchProperties The properties of an Integration required to send events to a specific third-party application. +type IntegrationPatchProperties struct { + // The write key provided by the Segment Source you'd like to have events forwarded to. Must be between 6 and 51 characters. + WriteKey *string `json:"write_key,omitempty"` + // The workspace region where the Segment Source write key lives. + DestinationRegion *DestinationRegion `json:"destination_region,omitempty"` +} diff --git a/rest/api/v3/integrations/model_integration_properties.go b/rest/api/v3/integrations/model_integration_properties.go new file mode 100644 index 00000000..822fec09 --- /dev/null +++ b/rest/api/v3/integrations/model_integration_properties.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IntegrationProperties The properties of an Integration required to send events to a specific third-party application. +type IntegrationProperties struct { + // The write key provided by the Segment Source you'd like to have events forwarded to. Must be between 6 and 51 characters. + WriteKey *string `json:"write_key,omitempty"` + // The workspace region where the Segment Source write key lives. + DestinationRegion *DestinationRegion2 `json:"destination_region,omitempty"` +} diff --git a/rest/api/v3/integrations/model_internal_error.go b/rest/api/v3/integrations/model_internal_error.go new file mode 100644 index 00000000..34b072b8 --- /dev/null +++ b/rest/api/v3/integrations/model_internal_error.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// InternalError struct for InternalError +type InternalError struct { + // The error message tells you the cause of failure. + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/integrations/model_invalid_delete_request.go b/rest/api/v3/integrations/model_invalid_delete_request.go new file mode 100644 index 00000000..6adbbc72 --- /dev/null +++ b/rest/api/v3/integrations/model_invalid_delete_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// InvalidDeleteRequest struct for InvalidDeleteRequest +type InvalidDeleteRequest struct { + // The error message tells you the cause of failure. + Message *string `json:"message,omitempty"` + // The parameter shows more information about where the error is. The number in the brackets is the invalid ID indexed. + Parameter *string `json:"parameter,omitempty"` +} diff --git a/rest/api/v3/integrations/model_invalid_request.go b/rest/api/v3/integrations/model_invalid_request.go new file mode 100644 index 00000000..9fae34ad --- /dev/null +++ b/rest/api/v3/integrations/model_invalid_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// InvalidRequest struct for InvalidRequest +type InvalidRequest struct { + // The error message tells you the cause of validation failure(s), separated by commas if there are multiple failures. + Message *string `json:"message,omitempty"` + // The field shows more information on where the error is when available. + Field *string `json:"field,omitempty"` +} diff --git a/rest/api/v3/integrations/model_items.go b/rest/api/v3/integrations/model_items.go new file mode 100644 index 00000000..c90149eb --- /dev/null +++ b/rest/api/v3/integrations/model_items.go @@ -0,0 +1,33 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Items the model 'Items' +type Items string + +// List of Items +const ( + ITEMS_DROP Items = "drop" + ITEMS_PROCESSED Items = "processed" + ITEMS_DEFERRED Items = "deferred" + ITEMS_GROUP_UNSUBSCRIBE Items = "group_unsubscribe" + ITEMS_BOUNCE Items = "bounce" + ITEMS_DELIVERED Items = "delivered" + ITEMS_CLICK Items = "click" + ITEMS_UNSUBSCRIBE Items = "unsubscribe" + ITEMS_OPEN Items = "open" + ITEMS_GROUP_RESUBSCRIBE Items = "group_resubscribe" + ITEMS_SPAMREPORT Items = "spamreport" + ITEMS_MACHINE_OPENED Items = "machine_opened" +) diff --git a/rest/api/v3/integrations/model_items1.go b/rest/api/v3/integrations/model_items1.go new file mode 100644 index 00000000..ff8a80da --- /dev/null +++ b/rest/api/v3/integrations/model_items1.go @@ -0,0 +1,33 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Items1 the model 'Items1' +type Items1 string + +// List of Items1 +const ( + ITEMS1_DROP Items1 = "drop" + ITEMS1_PROCESSED Items1 = "processed" + ITEMS1_DEFERRED Items1 = "deferred" + ITEMS1_GROUP_UNSUBSCRIBE Items1 = "group_unsubscribe" + ITEMS1_BOUNCE Items1 = "bounce" + ITEMS1_DELIVERED Items1 = "delivered" + ITEMS1_CLICK Items1 = "click" + ITEMS1_UNSUBSCRIBE Items1 = "unsubscribe" + ITEMS1_OPEN Items1 = "open" + ITEMS1_GROUP_RESUBSCRIBE Items1 = "group_resubscribe" + ITEMS1_SPAMREPORT Items1 = "spamreport" + ITEMS1_MACHINE_OPENED Items1 = "machine_opened" +) diff --git a/rest/api/v3/integrations/model_items2.go b/rest/api/v3/integrations/model_items2.go new file mode 100644 index 00000000..1cb6e646 --- /dev/null +++ b/rest/api/v3/integrations/model_items2.go @@ -0,0 +1,33 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Items2 the model 'Items2' +type Items2 string + +// List of Items2 +const ( + ITEMS2_DROP Items2 = "drop" + ITEMS2_PROCESSED Items2 = "processed" + ITEMS2_DEFERRED Items2 = "deferred" + ITEMS2_GROUP_UNSUBSCRIBE Items2 = "group_unsubscribe" + ITEMS2_BOUNCE Items2 = "bounce" + ITEMS2_DELIVERED Items2 = "delivered" + ITEMS2_CLICK Items2 = "click" + ITEMS2_UNSUBSCRIBE Items2 = "unsubscribe" + ITEMS2_OPEN Items2 = "open" + ITEMS2_GROUP_RESUBSCRIBE Items2 = "group_resubscribe" + ITEMS2_SPAMREPORT Items2 = "spamreport" + ITEMS2_MACHINE_OPENED Items2 = "machine_opened" +) diff --git a/rest/api/v3/ip_access_management/.openapi-generator b/rest/api/v3/ip_access_management/.openapi-generator new file mode 100644 index 00000000..c17313c5 --- /dev/null +++ b/rest/api/v3/ip_access_management/.openapi-generator @@ -0,0 +1,34 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_add_ip_to_allow_list.go +api_delete_allowed_ip.go +api_delete_allowed_ips.go +api_get_allowed_ip.go +api_list_access_activity.go +api_list_allowed_ip.go +api_service.go +docs/AddIpToAllowList.md +docs/AddIpToAllowListRequest.md +docs/AddIpToAllowListRequestIpsInner.md +docs/DeleteAllowedIp.md +docs/DeleteAllowedIps.md +docs/DeleteAllowedIpsRequest.md +docs/ErrorResponse.md +docs/ErrorResponseErrorsInner.md +docs/GetAllowedIp.md +docs/IpAccessManagement2xx.md +docs/IpAccessManagement2xxResultInner.md +docs/ListAccessActivity.md +docs/ListAccessActivity200Response.md +docs/ListAccessActivity200ResponseResultInner.md +docs/ListAllowedIp.md +model_add_ip_to_allow_list_request.go +model_add_ip_to_allow_list_request_ips_inner.go +model_delete_allowed_ips_request.go +model_error_response.go +model_error_response_errors_inner.go +model_ip_access_management2xx.go +model_ip_access_management2xx_result_inner.go +model_list_access_activity_200_response.go +model_list_access_activity_200_response_result_inner.go diff --git a/rest/api/v3/ip_access_management/.openapi-generator-ignore b/rest/api/v3/ip_access_management/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/ip_access_management/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/ip_access_management/README.md b/rest/api/v3/ip_access_management/README.md new file mode 100644 index 00000000..ad618659 --- /dev/null +++ b/rest/api/v3/ip_access_management/README.md @@ -0,0 +1,79 @@ +# Go API client for + +IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. + +There is no limit to the number of IP addresses that you can allow. + +It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. + +See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:43.514160+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AddIpToAllowList* | [**AddIpToAllowList**](docs/AddIpToAllowList.md#addiptoallowlist) | **Post** /v3/access_settings/whitelist | Add one or more IPs to the allow list +*DeleteAllowedIp* | [**DeleteAllowedIp**](docs/DeleteAllowedIp.md#deleteallowedip) | **Delete** /v3/access_settings/whitelist/{RuleId} | Remove a specific IP from the allowed list +*DeleteAllowedIps* | [**DeleteAllowedIps**](docs/DeleteAllowedIps.md#deleteallowedips) | **Delete** /v3/access_settings/whitelist | Remove one or more IPs from the allow list +*GetAllowedIp* | [**GetAllowedIp**](docs/GetAllowedIp.md#getallowedip) | **Get** /v3/access_settings/whitelist/{RuleId} | Retrieve a specific allowed IP +*ListAccessActivity* | [**ListAccessActivity**](docs/ListAccessActivity.md#listaccessactivity) | **Get** /v3/access_settings/activity | Retrieve all recent access attempts +*ListAllowedIp* | [**ListAllowedIp**](docs/ListAllowedIp.md#listallowedip) | **Get** /v3/access_settings/whitelist | Retrieve a list of currently allowed IPs + + +## Documentation For Models + + - [AddIpToAllowListRequest](AddIpToAllowListRequest.md) + - [AddIpToAllowListRequestIpsInner](AddIpToAllowListRequestIpsInner.md) + - [DeleteAllowedIpsRequest](DeleteAllowedIpsRequest.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [IpAccessManagement2xx](IpAccessManagement2xx.md) + - [IpAccessManagement2xxResultInner](IpAccessManagement2xxResultInner.md) + - [ListAccessActivity200Response](ListAccessActivity200Response.md) + - [ListAccessActivity200ResponseResultInner](ListAccessActivity200ResponseResultInner.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/ip_access_management/api_add_ip_to_allow_list.go b/rest/api/v3/ip_access_management/api_add_ip_to_allow_list.go new file mode 100644 index 00000000..9cdb8ae4 --- /dev/null +++ b/rest/api/v3/ip_access_management/api_add_ip_to_allow_list.go @@ -0,0 +1,97 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type AddIpToAllowListParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + AddIpToAllowListRequest *AddIpToAllowListRequest `json:"AddIpToAllowListRequest,omitempty"` +} + +func (params *AddIpToAllowListParam) SetOnbehalfof(Onbehalfof string) *AddIpToAllowListParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *AddIpToAllowListParam) SetAddIpToAllowListRequest(AddIpToAllowListRequest AddIpToAllowListRequest) *AddIpToAllowListParam { + params.AddIpToAllowListRequest = &AddIpToAllowListRequest + return params +} + +// **This endpoint allows you to add one or more allowed IP addresses.** To allow one or more IP addresses, pass them to this endpoint in an array. Once an IP address is added to your allow list, it will be assigned an `id` that can be used to remove the address. You can retrieve the ID associated with an IP using the \"Retrieve a list of currently allowed IPs\" endpoint. +func (c *ApiService) AddIpToAllowList(params *AddIpToAllowListParam) (interface{}, error) { + path := "/v3/access_settings/whitelist" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.AddIpToAllowListRequest != nil { + b, err := json.Marshal(*params.AddIpToAllowListRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &IpAccessManagement2xx{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ip_access_management/api_delete_allowed_ip.go b/rest/api/v3/ip_access_management/api_delete_allowed_ip.go new file mode 100644 index 00000000..6a4b052b --- /dev/null +++ b/rest/api/v3/ip_access_management/api_delete_allowed_ip.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DeleteAllowedIpParam struct { + // The ID of the allowed IP address that you want to retrieve. + RuleId *string `json:"rule_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteAllowedIpParam) SetRuleId(RuleId string) *DeleteAllowedIpParam { + params.RuleId = &RuleId + return params +} +func (params *DeleteAllowedIpParam) SetOnbehalfof(Onbehalfof string) *DeleteAllowedIpParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to remove a specific IP address from your list of allowed addresses.** When removing a specific IP address from your list, you must include the ID in your call. You can retrieve the IDs associated with your allowed IP addresses using the \"Retrieve a list of currently allowed IPs\" endpoint. +func (c *ApiService) DeleteAllowedIp(params *DeleteAllowedIpParam) (interface{}, error) { + path := "/v3/access_settings/whitelist/{RuleId}" + if params != nil && params.RuleId != nil { + path = strings.Replace(path, "{"+"RuleId"+"}", *params.RuleId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ip_access_management/api_delete_allowed_ips.go b/rest/api/v3/ip_access_management/api_delete_allowed_ips.go new file mode 100644 index 00000000..f3762e71 --- /dev/null +++ b/rest/api/v3/ip_access_management/api_delete_allowed_ips.go @@ -0,0 +1,97 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type DeleteAllowedIpsParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + DeleteAllowedIpsRequest *DeleteAllowedIpsRequest `json:"DeleteAllowedIpsRequest,omitempty"` +} + +func (params *DeleteAllowedIpsParam) SetOnbehalfof(Onbehalfof string) *DeleteAllowedIpsParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *DeleteAllowedIpsParam) SetDeleteAllowedIpsRequest(DeleteAllowedIpsRequest DeleteAllowedIpsRequest) *DeleteAllowedIpsParam { + params.DeleteAllowedIpsRequest = &DeleteAllowedIpsRequest + return params +} + +// **This endpoint allows you to remove one or more IP addresses from your list of allowed addresses.** To remove one or more IP addresses, pass this endpoint an array containing the ID(s) associated with the IP(s) you intend to remove. You can retrieve the IDs associated with your allowed IP addresses using the \"Retrieve a list of currently allowed IPs\" endpoint. It is possible to remove your own IP address, which will block access to your account. You will need to submit a [support ticket](https://sendgrid.com/docs/ui/account-and-settings/support/) if this happens. For this reason, it is important to double check that you are removing only the IPs you intend to remove when using this endpoint. +func (c *ApiService) DeleteAllowedIps(params *DeleteAllowedIpsParam) (interface{}, error) { + path := "/v3/access_settings/whitelist" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.DeleteAllowedIpsRequest != nil { + b, err := json.Marshal(*params.DeleteAllowedIpsRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ip_access_management/api_get_allowed_ip.go b/rest/api/v3/ip_access_management/api_get_allowed_ip.go new file mode 100644 index 00000000..d4cafeb4 --- /dev/null +++ b/rest/api/v3/ip_access_management/api_get_allowed_ip.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type GetAllowedIpParam struct { + // The ID of the allowed IP address that you want to retrieve. + RuleId *string `json:"rule_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetAllowedIpParam) SetRuleId(RuleId string) *GetAllowedIpParam { + params.RuleId = &RuleId + return params +} +func (params *GetAllowedIpParam) SetOnbehalfof(Onbehalfof string) *GetAllowedIpParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retreive a specific IP address that has been allowed to access your account.** You must include the ID for the specific IP address you want to retrieve in your call. You can retrieve the IDs associated with your allowed IP addresses using the \"Retrieve a list of currently allowed IPs\" endpoint. +func (c *ApiService) GetAllowedIp(params *GetAllowedIpParam) (interface{}, error) { + path := "/v3/access_settings/whitelist/{RuleId}" + if params != nil && params.RuleId != nil { + path = strings.Replace(path, "{"+"RuleId"+"}", *params.RuleId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &IpAccessManagement2xx{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ip_access_management/api_list_access_activity.go b/rest/api/v3/ip_access_management/api_list_access_activity.go new file mode 100644 index 00000000..831b257a --- /dev/null +++ b/rest/api/v3/ip_access_management/api_list_access_activity.go @@ -0,0 +1,93 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListAccessActivityParam struct { + // Limits the number of IPs to return. + Limit *int32 `json:"limit,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListAccessActivityParam) SetLimit(Limit int32) *ListAccessActivityParam { + params.Limit = &Limit + return params +} +func (params *ListAccessActivityParam) SetOnbehalfof(Onbehalfof string) *ListAccessActivityParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a list of all of the IP addresses that recently attempted to access your account either through the User Interface or the API.** +func (c *ApiService) ListAccessActivity(params *ListAccessActivityParam) (interface{}, error) { + path := "/v3/access_settings/activity" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListAccessActivity200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ip_access_management/api_list_allowed_ip.go b/rest/api/v3/ip_access_management/api_list_allowed_ip.go new file mode 100644 index 00000000..9c988c12 --- /dev/null +++ b/rest/api/v3/ip_access_management/api_list_allowed_ip.go @@ -0,0 +1,82 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListAllowedIpParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListAllowedIpParam) SetOnbehalfof(Onbehalfof string) *ListAllowedIpParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a list of IP addresses that are currently allowed to access your account.** Each IP address returned to you will have `created_at` and `updated_at` dates. Each IP will also be associated with an `id` that can be used to remove the address from your allow list. +func (c *ApiService) ListAllowedIp(params *ListAllowedIpParam) (interface{}, error) { + path := "/v3/access_settings/whitelist" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &IpAccessManagement2xx{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ip_access_management/api_service.go b/rest/api/v3/ip_access_management/api_service.go new file mode 100644 index 00000000..d43663e0 --- /dev/null +++ b/rest/api/v3/ip_access_management/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/ip_access_management/docs/AddIpToAllowList.md b/rest/api/v3/ip_access_management/docs/AddIpToAllowList.md new file mode 100644 index 00000000..71f14dd1 --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/AddIpToAllowList.md @@ -0,0 +1,49 @@ +# AddIpToAllowList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddIpToAllowList**](AddIpToAllowList.md#AddIpToAllowList) | **Post** /v3/access_settings/whitelist | Add one or more IPs to the allow list + + + +## AddIpToAllowList + +> IpAccessManagement2xx AddIpToAllowList(ctx, optional) + +Add one or more IPs to the allow list + +**This endpoint allows you to add one or more allowed IP addresses.** To allow one or more IP addresses, pass them to this endpoint in an array. Once an IP address is added to your allow list, it will be assigned an `id` that can be used to remove the address. You can retrieve the ID associated with an IP using the \"Retrieve a list of currently allowed IPs\" endpoint. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a AddIpToAllowListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**AddIpToAllowListRequest** | [**AddIpToAllowListRequest**](AddIpToAllowListRequest.md) | + +### Return type + +[**IpAccessManagement2xx**](IpAccessManagement2xx.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_access_management/docs/AddIpToAllowListRequest.md b/rest/api/v3/ip_access_management/docs/AddIpToAllowListRequest.md new file mode 100644 index 00000000..f4318398 --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/AddIpToAllowListRequest.md @@ -0,0 +1,11 @@ +# AddIpToAllowListRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ips** | [**[]AddIpToAllowListRequestIpsInner**](AddIpToAllowListRequestIpsInner.md) | An array containing the IP(s) you want to allow. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_access_management/docs/AddIpToAllowListRequestIpsInner.md b/rest/api/v3/ip_access_management/docs/AddIpToAllowListRequestIpsInner.md new file mode 100644 index 00000000..7f0dc81f --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/AddIpToAllowListRequestIpsInner.md @@ -0,0 +1,11 @@ +# AddIpToAllowListRequestIpsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | An IP address that you want to allow. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_access_management/docs/DeleteAllowedIp.md b/rest/api/v3/ip_access_management/docs/DeleteAllowedIp.md new file mode 100644 index 00000000..64cf1795 --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/DeleteAllowedIp.md @@ -0,0 +1,52 @@ +# DeleteAllowedIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteAllowedIp**](DeleteAllowedIp.md#DeleteAllowedIp) | **Delete** /v3/access_settings/whitelist/{RuleId} | Remove a specific IP from the allowed list + + + +## DeleteAllowedIp + +> map[string]interface{} DeleteAllowedIp(ctx, RuleIdoptional) + +Remove a specific IP from the allowed list + +**This endpoint allows you to remove a specific IP address from your list of allowed addresses.** When removing a specific IP address from your list, you must include the ID in your call. You can retrieve the IDs associated with your allowed IP addresses using the \"Retrieve a list of currently allowed IPs\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RuleId** | **string** | The ID of the allowed IP address that you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteAllowedIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_access_management/docs/DeleteAllowedIps.md b/rest/api/v3/ip_access_management/docs/DeleteAllowedIps.md new file mode 100644 index 00000000..ffe7222a --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/DeleteAllowedIps.md @@ -0,0 +1,49 @@ +# DeleteAllowedIps + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteAllowedIps**](DeleteAllowedIps.md#DeleteAllowedIps) | **Delete** /v3/access_settings/whitelist | Remove one or more IPs from the allow list + + + +## DeleteAllowedIps + +> map[string]interface{} DeleteAllowedIps(ctx, optional) + +Remove one or more IPs from the allow list + +**This endpoint allows you to remove one or more IP addresses from your list of allowed addresses.** To remove one or more IP addresses, pass this endpoint an array containing the ID(s) associated with the IP(s) you intend to remove. You can retrieve the IDs associated with your allowed IP addresses using the \"Retrieve a list of currently allowed IPs\" endpoint. It is possible to remove your own IP address, which will block access to your account. You will need to submit a [support ticket](https://sendgrid.com/docs/ui/account-and-settings/support/) if this happens. For this reason, it is important to double check that you are removing only the IPs you intend to remove when using this endpoint. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteAllowedIpsParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**DeleteAllowedIpsRequest** | [**DeleteAllowedIpsRequest**](DeleteAllowedIpsRequest.md) | + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_access_management/docs/DeleteAllowedIpsRequest.md b/rest/api/v3/ip_access_management/docs/DeleteAllowedIpsRequest.md new file mode 100644 index 00000000..9c466261 --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/DeleteAllowedIpsRequest.md @@ -0,0 +1,11 @@ +# DeleteAllowedIpsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ids** | **[]int32** | An array of the IDs of the IP address that you want to remove from your allow list. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_access_management/docs/ErrorResponse.md b/rest/api/v3/ip_access_management/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_access_management/docs/ErrorResponseErrorsInner.md b/rest/api/v3/ip_access_management/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_access_management/docs/GetAllowedIp.md b/rest/api/v3/ip_access_management/docs/GetAllowedIp.md new file mode 100644 index 00000000..4ea75448 --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/GetAllowedIp.md @@ -0,0 +1,52 @@ +# GetAllowedIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetAllowedIp**](GetAllowedIp.md#GetAllowedIp) | **Get** /v3/access_settings/whitelist/{RuleId} | Retrieve a specific allowed IP + + + +## GetAllowedIp + +> IpAccessManagement2xx GetAllowedIp(ctx, RuleIdoptional) + +Retrieve a specific allowed IP + +**This endpoint allows you to retreive a specific IP address that has been allowed to access your account.** You must include the ID for the specific IP address you want to retrieve in your call. You can retrieve the IDs associated with your allowed IP addresses using the \"Retrieve a list of currently allowed IPs\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RuleId** | **string** | The ID of the allowed IP address that you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetAllowedIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**IpAccessManagement2xx**](IpAccessManagement2xx.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_access_management/docs/IpAccessManagement2xx.md b/rest/api/v3/ip_access_management/docs/IpAccessManagement2xx.md new file mode 100644 index 00000000..5391826f --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/IpAccessManagement2xx.md @@ -0,0 +1,11 @@ +# IpAccessManagement2xx + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]IpAccessManagement2xxResultInner**](IpAccessManagement2xxResultInner.md) | An array listing one or more of your allowed IPs. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_access_management/docs/IpAccessManagement2xxResultInner.md b/rest/api/v3/ip_access_management/docs/IpAccessManagement2xxResultInner.md new file mode 100644 index 00000000..853651fa --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/IpAccessManagement2xxResultInner.md @@ -0,0 +1,14 @@ +# IpAccessManagement2xxResultInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The ID of the allowed IP. |[optional] +**Ip** | **string** | The allowed IP. |[optional] +**CreatedAt** | **int32** | A Unix timestamp indicating when the IP was added to the allow list. |[optional] +**UpdatedAt** | **int32** | A Unix timestamp indicating when the IPs allow status was most recently updated. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_access_management/docs/ListAccessActivity.md b/rest/api/v3/ip_access_management/docs/ListAccessActivity.md new file mode 100644 index 00000000..ef433ccb --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/ListAccessActivity.md @@ -0,0 +1,49 @@ +# ListAccessActivity + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListAccessActivity**](ListAccessActivity.md#ListAccessActivity) | **Get** /v3/access_settings/activity | Retrieve all recent access attempts + + + +## ListAccessActivity + +> ListAccessActivity200Response ListAccessActivity(ctx, optional) + +Retrieve all recent access attempts + +**This endpoint allows you to retrieve a list of all of the IP addresses that recently attempted to access your account either through the User Interface or the API.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListAccessActivityParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **int32** | Limits the number of IPs to return. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListAccessActivity200Response**](ListAccessActivity200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_access_management/docs/ListAccessActivity200Response.md b/rest/api/v3/ip_access_management/docs/ListAccessActivity200Response.md new file mode 100644 index 00000000..b78a8525 --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/ListAccessActivity200Response.md @@ -0,0 +1,11 @@ +# ListAccessActivity200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ListAccessActivity200ResponseResultInner**](ListAccessActivity200ResponseResultInner.md) | An array containing the IPs that recently attempted to access your account. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_access_management/docs/ListAccessActivity200ResponseResultInner.md b/rest/api/v3/ip_access_management/docs/ListAccessActivity200ResponseResultInner.md new file mode 100644 index 00000000..8ca798d0 --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/ListAccessActivity200ResponseResultInner.md @@ -0,0 +1,16 @@ +# ListAccessActivity200ResponseResultInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Allowed** | **bool** | Indicates if the IP address was granted access to the account. | +**AuthMethod** | **string** | The authentication method used when attempting access. | +**FirstAt** | **int32** | A Unix timestamp indicating when the first access attempt was made. | +**Ip** | **string** | The IP addressed used during the access attempt. | +**LastAt** | **int32** | A Unix timestamp indicating when the most recent access attempt was made | +**Location** | **string** | The geographic location from which the access attempt originated. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_access_management/docs/ListAllowedIp.md b/rest/api/v3/ip_access_management/docs/ListAllowedIp.md new file mode 100644 index 00000000..00008876 --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/ListAllowedIp.md @@ -0,0 +1,48 @@ +# ListAllowedIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListAllowedIp**](ListAllowedIp.md#ListAllowedIp) | **Get** /v3/access_settings/whitelist | Retrieve a list of currently allowed IPs + + + +## ListAllowedIp + +> IpAccessManagement2xx ListAllowedIp(ctx, optional) + +Retrieve a list of currently allowed IPs + +**This endpoint allows you to retrieve a list of IP addresses that are currently allowed to access your account.** Each IP address returned to you will have `created_at` and `updated_at` dates. Each IP will also be associated with an `id` that can be used to remove the address from your allow list. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListAllowedIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**IpAccessManagement2xx**](IpAccessManagement2xx.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_access_management/model_add_ip_to_allow_list_request.go b/rest/api/v3/ip_access_management/model_add_ip_to_allow_list_request.go new file mode 100644 index 00000000..023d725d --- /dev/null +++ b/rest/api/v3/ip_access_management/model_add_ip_to_allow_list_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIpToAllowListRequest struct for AddIpToAllowListRequest +type AddIpToAllowListRequest struct { + // An array containing the IP(s) you want to allow. + Ips []AddIpToAllowListRequestIpsInner `json:"ips"` +} diff --git a/rest/api/v3/ip_access_management/model_add_ip_to_allow_list_request_ips_inner.go b/rest/api/v3/ip_access_management/model_add_ip_to_allow_list_request_ips_inner.go new file mode 100644 index 00000000..34ad310c --- /dev/null +++ b/rest/api/v3/ip_access_management/model_add_ip_to_allow_list_request_ips_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIpToAllowListRequestIpsInner struct for AddIpToAllowListRequestIpsInner +type AddIpToAllowListRequestIpsInner struct { + // An IP address that you want to allow. + Ip string `json:"ip"` +} diff --git a/rest/api/v3/ip_access_management/model_delete_allowed_ips_request.go b/rest/api/v3/ip_access_management/model_delete_allowed_ips_request.go new file mode 100644 index 00000000..ceba5206 --- /dev/null +++ b/rest/api/v3/ip_access_management/model_delete_allowed_ips_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteAllowedIpsRequest struct for DeleteAllowedIpsRequest +type DeleteAllowedIpsRequest struct { + // An array of the IDs of the IP address that you want to remove from your allow list. + Ids *[]int32 `json:"ids,omitempty"` +} diff --git a/rest/api/v3/ip_access_management/model_error_response.go b/rest/api/v3/ip_access_management/model_error_response.go new file mode 100644 index 00000000..025b609b --- /dev/null +++ b/rest/api/v3/ip_access_management/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/ip_access_management/model_error_response_errors_inner.go b/rest/api/v3/ip_access_management/model_error_response_errors_inner.go new file mode 100644 index 00000000..02c85e55 --- /dev/null +++ b/rest/api/v3/ip_access_management/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/ip_access_management/model_ip_access_management2xx.go b/rest/api/v3/ip_access_management/model_ip_access_management2xx.go new file mode 100644 index 00000000..868be517 --- /dev/null +++ b/rest/api/v3/ip_access_management/model_ip_access_management2xx.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IpAccessManagement2xx struct for IpAccessManagement2xx +type IpAccessManagement2xx struct { + // An array listing one or more of your allowed IPs. + Result *[]IpAccessManagement2xxResultInner `json:"result,omitempty"` +} diff --git a/rest/api/v3/ip_access_management/model_ip_access_management2xx_result_inner.go b/rest/api/v3/ip_access_management/model_ip_access_management2xx_result_inner.go new file mode 100644 index 00000000..ea547bb2 --- /dev/null +++ b/rest/api/v3/ip_access_management/model_ip_access_management2xx_result_inner.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IpAccessManagement2xxResultInner struct for IpAccessManagement2xxResultInner +type IpAccessManagement2xxResultInner struct { + // The ID of the allowed IP. + Id *int32 `json:"id,omitempty"` + // The allowed IP. + Ip *string `json:"ip,omitempty"` + // A Unix timestamp indicating when the IP was added to the allow list. + CreatedAt *int32 `json:"created_at,omitempty"` + // A Unix timestamp indicating when the IPs allow status was most recently updated. + UpdatedAt *int32 `json:"updated_at,omitempty"` +} diff --git a/rest/api/v3/ip_access_management/model_list_access_activity_200_response.go b/rest/api/v3/ip_access_management/model_list_access_activity_200_response.go new file mode 100644 index 00000000..f39f3d16 --- /dev/null +++ b/rest/api/v3/ip_access_management/model_list_access_activity_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListAccessActivity200Response struct for ListAccessActivity200Response +type ListAccessActivity200Response struct { + // An array containing the IPs that recently attempted to access your account. + Result []ListAccessActivity200ResponseResultInner `json:"result"` +} diff --git a/rest/api/v3/ip_access_management/model_list_access_activity_200_response_result_inner.go b/rest/api/v3/ip_access_management/model_list_access_activity_200_response_result_inner.go new file mode 100644 index 00000000..b1a28ff3 --- /dev/null +++ b/rest/api/v3/ip_access_management/model_list_access_activity_200_response_result_inner.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListAccessActivity200ResponseResultInner struct for ListAccessActivity200ResponseResultInner +type ListAccessActivity200ResponseResultInner struct { + // Indicates if the IP address was granted access to the account. + Allowed bool `json:"allowed"` + // The authentication method used when attempting access. + AuthMethod string `json:"auth_method"` + // A Unix timestamp indicating when the first access attempt was made. + FirstAt int32 `json:"first_at"` + // The IP addressed used during the access attempt. + Ip string `json:"ip"` + // A Unix timestamp indicating when the most recent access attempt was made + LastAt int32 `json:"last_at"` + // The geographic location from which the access attempt originated. + Location string `json:"location"` +} diff --git a/rest/api/v3/ip_address_management/.openapi-generator b/rest/api/v3/ip_address_management/.openapi-generator new file mode 100644 index 00000000..228b2a71 --- /dev/null +++ b/rest/api/v3/ip_address_management/.openapi-generator @@ -0,0 +1,124 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_add_ip.go +api_add_ips_to_ip_pool.go +api_add_sub_users_to_ip.go +api_create_ip_pool.go +api_delete_ip_pool.go +api_delete_ips_from_ip_pool.go +api_delete_sub_users_from_ip.go +api_get_ip.go +api_get_ip_pool.go +api_list_ip.go +api_list_ip_assigned_to_ip_pool.go +api_list_ip_pool.go +api_list_sub_user_assigned_to_ip.go +api_service.go +api_update_ip.go +api_update_ip_pool.go +docs/AddIp.md +docs/AddIp201Response.md +docs/AddIpRequest.md +docs/AddIpsToIpPool.md +docs/AddIpsToIpPool200Response.md +docs/AddIpsToIpPoolRequest.md +docs/AddSubUsersToIp.md +docs/AddSubUsersToIp200Response.md +docs/AddSubUsersToIpRequest.md +docs/CreateIpPool.md +docs/CreateIpPool201Response.md +docs/CreateIpPoolRequest.md +docs/DeleteIpPool.md +docs/DeleteIpsFromIpPool.md +docs/DeleteIpsFromIpPoolRequest.md +docs/DeleteSubUsersFromIp.md +docs/DeleteSubUsersFromIpRequest.md +docs/GetIp.md +docs/GetIp200Response.md +docs/GetIp200ResponsePoolsInner.md +docs/GetIpPool.md +docs/GetIpPool200Response.md +docs/GetIpPool200ResponseIpCountByRegionInner.md +docs/IpAddressManagementErrorResponse.md +docs/IpAddressManagementErrorResponseErrorsInner.md +docs/Items.md +docs/ListIp.md +docs/ListIp200Response.md +docs/ListIp200ResponseMetadata.md +docs/ListIp200ResponseMetadataNextParams.md +docs/ListIp200ResponseResultInner.md +docs/ListIp200ResponseResultInnerPoolsInner.md +docs/ListIpAssignedToIpPool.md +docs/ListIpAssignedToIpPool200Response.md +docs/ListIpAssignedToIpPool200ResponseMetadata.md +docs/ListIpAssignedToIpPool200ResponseMetadataNextParams.md +docs/ListIpAssignedToIpPool200ResponseResultInner.md +docs/ListIpPool.md +docs/ListIpPool200Response.md +docs/ListIpPool200ResponseMetadata.md +docs/ListIpPool200ResponseMetadataNextParams.md +docs/ListIpPool200ResponseResultInner.md +docs/ListSubUserAssignedToIp.md +docs/ListSubUserAssignedToIp200Response.md +docs/ListSubUserAssignedToIp200ResponseMetadata.md +docs/ListSubUserAssignedToIp200ResponseMetadataNextParams.md +docs/Region.md +docs/Region1.md +docs/Region2.md +docs/Region3.md +docs/Region4.md +docs/Region5.md +docs/Region6.md +docs/Region7.md +docs/UpdateIp.md +docs/UpdateIp200Response.md +docs/UpdateIpPool.md +docs/UpdateIpPool200Response.md +docs/UpdateIpPoolRequest.md +docs/UpdateIpRequest.md +model_add_ip_201_response.go +model_add_ip_request.go +model_add_ips_to_ip_pool_200_response.go +model_add_ips_to_ip_pool_request.go +model_add_sub_users_to_ip_200_response.go +model_add_sub_users_to_ip_request.go +model_create_ip_pool_201_response.go +model_create_ip_pool_request.go +model_delete_ips_from_ip_pool_request.go +model_delete_sub_users_from_ip_request.go +model_get_ip_200_response.go +model_get_ip_200_response_pools_inner.go +model_get_ip_pool_200_response.go +model_get_ip_pool_200_response_ip_count_by_region_inner.go +model_ip_address_management_error_response.go +model_ip_address_management_error_response_errors_inner.go +model_items.go +model_list_ip_200_response.go +model_list_ip_200_response__metadata.go +model_list_ip_200_response__metadata_next_params.go +model_list_ip_200_response_result_inner.go +model_list_ip_200_response_result_inner_pools_inner.go +model_list_ip_assigned_to_ip_pool_200_response.go +model_list_ip_assigned_to_ip_pool_200_response__metadata.go +model_list_ip_assigned_to_ip_pool_200_response__metadata_next_params.go +model_list_ip_assigned_to_ip_pool_200_response_result_inner.go +model_list_ip_pool_200_response.go +model_list_ip_pool_200_response__metadata.go +model_list_ip_pool_200_response__metadata_next_params.go +model_list_ip_pool_200_response_result_inner.go +model_list_sub_user_assigned_to_ip_200_response.go +model_list_sub_user_assigned_to_ip_200_response__metadata.go +model_list_sub_user_assigned_to_ip_200_response__metadata_next_params.go +model_region.go +model_region1.go +model_region2.go +model_region3.go +model_region4.go +model_region5.go +model_region6.go +model_region7.go +model_update_ip_200_response.go +model_update_ip_pool_200_response.go +model_update_ip_pool_request.go +model_update_ip_request.go diff --git a/rest/api/v3/ip_address_management/.openapi-generator-ignore b/rest/api/v3/ip_address_management/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/ip_address_management/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/ip_address_management/README.md b/rest/api/v3/ip_address_management/README.md new file mode 100644 index 00000000..ed077e30 --- /dev/null +++ b/rest/api/v3/ip_address_management/README.md @@ -0,0 +1,118 @@ +# Go API client for + +The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:43.593659+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AddIp* | [**AddIp**](docs/AddIp.md#addip) | **Post** /v3/send_ips/ips | Add a Twilio SendGrid IP Address +*AddIpsToIpPool* | [**AddIpsToIpPool**](docs/AddIpsToIpPool.md#addipstoippool) | **Post** /v3/send_ips/pools/{Poolid}/ips:batchAdd | Add a Batch of IPs to an IP Pool +*AddSubUsersToIp* | [**AddSubUsersToIp**](docs/AddSubUsersToIp.md#addsubuserstoip) | **Post** /v3/send_ips/ips/{Ip}/subusers:batchAdd | Assign a Batch of Subusers to an IP +*CreateIpPool* | [**CreateIpPool**](docs/CreateIpPool.md#createippool) | **Post** /v3/send_ips/pools | Create an IP Pool with a Name and IP Assignments +*DeleteIpPool* | [**DeleteIpPool**](docs/DeleteIpPool.md#deleteippool) | **Delete** /v3/send_ips/pools/{Poolid} | Delete IP Pool +*DeleteIpsFromIpPool* | [**DeleteIpsFromIpPool**](docs/DeleteIpsFromIpPool.md#deleteipsfromippool) | **Post** /v3/send_ips/pools/{Poolid}/ips:batchDelete | Delete a Batch of IPs from an IP Pool +*DeleteSubUsersFromIp* | [**DeleteSubUsersFromIp**](docs/DeleteSubUsersFromIp.md#deletesubusersfromip) | **Post** /v3/send_ips/ips/{Ip}/subusers:batchDelete | Delete a Batch of Subusers from an IP +*GetIp* | [**GetIp**](docs/GetIp.md#getip) | **Get** /v3/send_ips/ips/{Ip} | Get Details for an IP Address +*GetIpPool* | [**GetIpPool**](docs/GetIpPool.md#getippool) | **Get** /v3/send_ips/pools/{Poolid} | Get Details for an IP Pool +*ListIp* | [**ListIp**](docs/ListIp.md#listip) | **Get** /v3/send_ips/ips | Get a List of all IP Addresses on your Account +*ListIpAssignedToIpPool* | [**ListIpAssignedToIpPool**](docs/ListIpAssignedToIpPool.md#listipassignedtoippool) | **Get** /v3/send_ips/pools/{Poolid}/ips | Get IPs Assigned to an IP Pool +*ListIpPool* | [**ListIpPool**](docs/ListIpPool.md#listippool) | **Get** /v3/send_ips/pools | GET all IP Pools that have Associated IPs +*ListSubUserAssignedToIp* | [**ListSubUserAssignedToIp**](docs/ListSubUserAssignedToIp.md#listsubuserassignedtoip) | **Get** /v3/send_ips/ips/{Ip}/subusers | Get a List of Subusers Assigned to an IP +*UpdateIp* | [**UpdateIp**](docs/UpdateIp.md#updateip) | **Patch** /v3/send_ips/ips/{Ip} | Update Details for an IP Address +*UpdateIpPool* | [**UpdateIpPool**](docs/UpdateIpPool.md#updateippool) | **Put** /v3/send_ips/pools/{Poolid} | Update an IP Pool Name + + +## Documentation For Models + + - [AddIp201Response](AddIp201Response.md) + - [AddIpRequest](AddIpRequest.md) + - [AddIpsToIpPool200Response](AddIpsToIpPool200Response.md) + - [AddIpsToIpPoolRequest](AddIpsToIpPoolRequest.md) + - [AddSubUsersToIp200Response](AddSubUsersToIp200Response.md) + - [AddSubUsersToIpRequest](AddSubUsersToIpRequest.md) + - [CreateIpPool201Response](CreateIpPool201Response.md) + - [CreateIpPoolRequest](CreateIpPoolRequest.md) + - [DeleteIpsFromIpPoolRequest](DeleteIpsFromIpPoolRequest.md) + - [DeleteSubUsersFromIpRequest](DeleteSubUsersFromIpRequest.md) + - [GetIp200Response](GetIp200Response.md) + - [GetIp200ResponsePoolsInner](GetIp200ResponsePoolsInner.md) + - [GetIpPool200Response](GetIpPool200Response.md) + - [GetIpPool200ResponseIpCountByRegionInner](GetIpPool200ResponseIpCountByRegionInner.md) + - [IpAddressManagementErrorResponse](IpAddressManagementErrorResponse.md) + - [IpAddressManagementErrorResponseErrorsInner](IpAddressManagementErrorResponseErrorsInner.md) + - [Items](Items.md) + - [ListIp200Response](ListIp200Response.md) + - [ListIp200ResponseMetadata](ListIp200ResponseMetadata.md) + - [ListIp200ResponseMetadataNextParams](ListIp200ResponseMetadataNextParams.md) + - [ListIp200ResponseResultInner](ListIp200ResponseResultInner.md) + - [ListIp200ResponseResultInnerPoolsInner](ListIp200ResponseResultInnerPoolsInner.md) + - [ListIpAssignedToIpPool200Response](ListIpAssignedToIpPool200Response.md) + - [ListIpAssignedToIpPool200ResponseMetadata](ListIpAssignedToIpPool200ResponseMetadata.md) + - [ListIpAssignedToIpPool200ResponseMetadataNextParams](ListIpAssignedToIpPool200ResponseMetadataNextParams.md) + - [ListIpAssignedToIpPool200ResponseResultInner](ListIpAssignedToIpPool200ResponseResultInner.md) + - [ListIpPool200Response](ListIpPool200Response.md) + - [ListIpPool200ResponseMetadata](ListIpPool200ResponseMetadata.md) + - [ListIpPool200ResponseMetadataNextParams](ListIpPool200ResponseMetadataNextParams.md) + - [ListIpPool200ResponseResultInner](ListIpPool200ResponseResultInner.md) + - [ListSubUserAssignedToIp200Response](ListSubUserAssignedToIp200Response.md) + - [ListSubUserAssignedToIp200ResponseMetadata](ListSubUserAssignedToIp200ResponseMetadata.md) + - [ListSubUserAssignedToIp200ResponseMetadataNextParams](ListSubUserAssignedToIp200ResponseMetadataNextParams.md) + - [Region](Region.md) + - [Region1](Region1.md) + - [Region2](Region2.md) + - [Region3](Region3.md) + - [Region4](Region4.md) + - [Region5](Region5.md) + - [Region6](Region6.md) + - [Region7](Region7.md) + - [UpdateIp200Response](UpdateIp200Response.md) + - [UpdateIpPool200Response](UpdateIpPool200Response.md) + - [UpdateIpPoolRequest](UpdateIpPoolRequest.md) + - [UpdateIpRequest](UpdateIpRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/ip_address_management/api_add_ip.go b/rest/api/v3/ip_address_management/api_add_ip.go new file mode 100644 index 00000000..d1f65162 --- /dev/null +++ b/rest/api/v3/ip_address_management/api_add_ip.go @@ -0,0 +1,88 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type AddIpParam struct { + // + AddIpRequest *AddIpRequest `json:"AddIpRequest,omitempty"` +} + +func (params *AddIpParam) SetAddIpRequest(AddIpRequest AddIpRequest) *AddIpParam { + params.AddIpRequest = &AddIpRequest + return params +} + +// This operation adds a Twilio SendGrid IP address to your account. You can also assign up to 100 Subusers to the IP address at creation. +func (c *ApiService) AddIp(params *AddIpParam) (interface{}, error) { + path := "/v3/send_ips/ips" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.AddIpRequest != nil { + b, err := json.Marshal(*params.AddIpRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &AddIp201Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ip_address_management/api_add_ips_to_ip_pool.go b/rest/api/v3/ip_address_management/api_add_ips_to_ip_pool.go new file mode 100644 index 00000000..87c4bc6a --- /dev/null +++ b/rest/api/v3/ip_address_management/api_add_ips_to_ip_pool.go @@ -0,0 +1,99 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type AddIpsToIpPoolParam struct { + // Specifies the unique ID for an IP Pool. + Poolid *string `json:"poolid"` + // + AddIpsToIpPoolRequest *AddIpsToIpPoolRequest `json:"AddIpsToIpPoolRequest,omitempty"` +} + +func (params *AddIpsToIpPoolParam) SetPoolid(Poolid string) *AddIpsToIpPoolParam { + params.Poolid = &Poolid + return params +} +func (params *AddIpsToIpPoolParam) SetAddIpsToIpPoolRequest(AddIpsToIpPoolRequest AddIpsToIpPoolRequest) *AddIpsToIpPoolParam { + params.AddIpsToIpPoolRequest = &AddIpsToIpPoolRequest + return params +} + +// This operation appends a batch of IPs to an IP Pool. This operation requires all IP assignments to succeed. If any IP assignments fail, this endpoint will return an error. +func (c *ApiService) AddIpsToIpPool(params *AddIpsToIpPoolParam) (interface{}, error) { + path := "/v3/send_ips/pools/{Poolid}/ips:batchAdd" + if params != nil && params.Poolid != nil { + path = strings.Replace(path, "{"+"Poolid"+"}", *params.Poolid, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.AddIpsToIpPoolRequest != nil { + b, err := json.Marshal(*params.AddIpsToIpPoolRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AddIpsToIpPool200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ip_address_management/api_add_sub_users_to_ip.go b/rest/api/v3/ip_address_management/api_add_sub_users_to_ip.go new file mode 100644 index 00000000..e1c90a7d --- /dev/null +++ b/rest/api/v3/ip_address_management/api_add_sub_users_to_ip.go @@ -0,0 +1,99 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type AddSubUsersToIpParam struct { + // The `ip` path parameter specifies an IP address to make the request against. + Ip *string `json:"ip"` + // + AddSubUsersToIpRequest *AddSubUsersToIpRequest `json:"AddSubUsersToIpRequest,omitempty"` +} + +func (params *AddSubUsersToIpParam) SetIp(Ip string) *AddSubUsersToIpParam { + params.Ip = &Ip + return params +} +func (params *AddSubUsersToIpParam) SetAddSubUsersToIpRequest(AddSubUsersToIpRequest AddSubUsersToIpRequest) *AddSubUsersToIpParam { + params.AddSubUsersToIpRequest = &AddSubUsersToIpRequest + return params +} + +// This operation appends a batch of Subusers to a specified IP address. This endpoint requires all Subuser assignments to succeed. If a Subuser assignment fails, this endpoint will return an error. +func (c *ApiService) AddSubUsersToIp(params *AddSubUsersToIpParam) (interface{}, error) { + path := "/v3/send_ips/ips/{Ip}/subusers:batchAdd" + if params != nil && params.Ip != nil { + path = strings.Replace(path, "{"+"Ip"+"}", *params.Ip, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.AddSubUsersToIpRequest != nil { + b, err := json.Marshal(*params.AddSubUsersToIpRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AddSubUsersToIp200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ip_address_management/api_create_ip_pool.go b/rest/api/v3/ip_address_management/api_create_ip_pool.go new file mode 100644 index 00000000..534e9e15 --- /dev/null +++ b/rest/api/v3/ip_address_management/api_create_ip_pool.go @@ -0,0 +1,88 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type CreateIpPoolParam struct { + // + CreateIpPoolRequest *CreateIpPoolRequest `json:"CreateIpPoolRequest,omitempty"` +} + +func (params *CreateIpPoolParam) SetCreateIpPoolRequest(CreateIpPoolRequest CreateIpPoolRequest) *CreateIpPoolParam { + params.CreateIpPoolRequest = &CreateIpPoolRequest + return params +} + +// This operation will create a named IP Pool and associate specified IP addresses with the newly created Pool. This operation requires all IP assignments to succeed. If any IP assignments fail, this endpoint will return an error and the Pool will not be created. Each IP Pool may have a maximum of 100 assigned IP addresses. +func (c *ApiService) CreateIpPool(params *CreateIpPoolParam) (interface{}, error) { + path := "/v3/send_ips/pools" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateIpPoolRequest != nil { + b, err := json.Marshal(*params.CreateIpPoolRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &CreateIpPool201Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ip_address_management/api_delete_ip_pool.go b/rest/api/v3/ip_address_management/api_delete_ip_pool.go new file mode 100644 index 00000000..d4c18090 --- /dev/null +++ b/rest/api/v3/ip_address_management/api_delete_ip_pool.go @@ -0,0 +1,76 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DeleteIpPoolParam struct { + // Specifies the unique ID for an IP Pool. + Poolid *string `json:"poolid"` +} + +func (params *DeleteIpPoolParam) SetPoolid(Poolid string) *DeleteIpPoolParam { + params.Poolid = &Poolid + return params +} + +// This operation deletes an IP Pool and unassigns all IP addresses associated with the Pool. IP addresses associated with the deleted Pool will remain in your account. +func (c *ApiService) DeleteIpPool(params *DeleteIpPoolParam) (interface{}, error) { + path := "/v3/send_ips/pools/{Poolid}" + if params != nil && params.Poolid != nil { + path = strings.Replace(path, "{"+"Poolid"+"}", *params.Poolid, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ip_address_management/api_delete_ips_from_ip_pool.go b/rest/api/v3/ip_address_management/api_delete_ips_from_ip_pool.go new file mode 100644 index 00000000..5fe7b538 --- /dev/null +++ b/rest/api/v3/ip_address_management/api_delete_ips_from_ip_pool.go @@ -0,0 +1,91 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DeleteIpsFromIpPoolParam struct { + // Specifies the unique ID for an IP Pool. + Poolid *string `json:"poolid"` + // + DeleteIpsFromIpPoolRequest *DeleteIpsFromIpPoolRequest `json:"DeleteIpsFromIpPoolRequest,omitempty"` +} + +func (params *DeleteIpsFromIpPoolParam) SetPoolid(Poolid string) *DeleteIpsFromIpPoolParam { + params.Poolid = &Poolid + return params +} +func (params *DeleteIpsFromIpPoolParam) SetDeleteIpsFromIpPoolRequest(DeleteIpsFromIpPoolRequest DeleteIpsFromIpPoolRequest) *DeleteIpsFromIpPoolParam { + params.DeleteIpsFromIpPoolRequest = &DeleteIpsFromIpPoolRequest + return params +} + +// This operation removes a batch of IPs from an IP Pool. All IPs associated with the Pool will be unassigned from the deleted Pool. However, this operation does not remove the IPs from your account. +func (c *ApiService) DeleteIpsFromIpPool(params *DeleteIpsFromIpPoolParam) (interface{}, error) { + path := "/v3/send_ips/pools/{Poolid}/ips:batchDelete" + if params != nil && params.Poolid != nil { + path = strings.Replace(path, "{"+"Poolid"+"}", *params.Poolid, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.DeleteIpsFromIpPoolRequest != nil { + b, err := json.Marshal(*params.DeleteIpsFromIpPoolRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ip_address_management/api_delete_sub_users_from_ip.go b/rest/api/v3/ip_address_management/api_delete_sub_users_from_ip.go new file mode 100644 index 00000000..3a769dc3 --- /dev/null +++ b/rest/api/v3/ip_address_management/api_delete_sub_users_from_ip.go @@ -0,0 +1,91 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DeleteSubUsersFromIpParam struct { + // The `ip` path parameter specifies an IP address to make the request against. + Ip *string `json:"ip"` + // + DeleteSubUsersFromIpRequest *DeleteSubUsersFromIpRequest `json:"DeleteSubUsersFromIpRequest,omitempty"` +} + +func (params *DeleteSubUsersFromIpParam) SetIp(Ip string) *DeleteSubUsersFromIpParam { + params.Ip = &Ip + return params +} +func (params *DeleteSubUsersFromIpParam) SetDeleteSubUsersFromIpRequest(DeleteSubUsersFromIpRequest DeleteSubUsersFromIpRequest) *DeleteSubUsersFromIpParam { + params.DeleteSubUsersFromIpRequest = &DeleteSubUsersFromIpRequest + return params +} + +// This operation removes a batch of Subusers from a specified IP address. +func (c *ApiService) DeleteSubUsersFromIp(params *DeleteSubUsersFromIpParam) (interface{}, error) { + path := "/v3/send_ips/ips/{Ip}/subusers:batchDelete" + if params != nil && params.Ip != nil { + path = strings.Replace(path, "{"+"Ip"+"}", *params.Ip, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.DeleteSubUsersFromIpRequest != nil { + b, err := json.Marshal(*params.DeleteSubUsersFromIpRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ip_address_management/api_get_ip.go b/rest/api/v3/ip_address_management/api_get_ip.go new file mode 100644 index 00000000..5f957bed --- /dev/null +++ b/rest/api/v3/ip_address_management/api_get_ip.go @@ -0,0 +1,84 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type GetIpParam struct { + // Boolean indicating whether or not to return the IP Pool's region information in the response. + IncludeRegion *bool `json:"include_region,omitempty"` +} + +func (params *GetIpParam) SetIncludeRegion(IncludeRegion bool) *GetIpParam { + params.IncludeRegion = &IncludeRegion + return params +} + +// This operation returns details for a specified IP address. Details include whether the IP is assigned to a parent account, set to warm up automatically, which Pools the IP is associated with, when the IP was added and modified, whether the IP is leased, and whether the IP is enabled. Note that this operation will not return Subuser information associated with the IP. To retrieve Subuser information, use the \"Get a List of Subusers Assigned to an IP\" endpoint. +func (c *ApiService) GetIp(params *GetIpParam) (interface{}, error) { + path := "/v3/send_ips/ips/{Ip}" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.IncludeRegion != nil { + data.Set("include_region", fmt.Sprint(*params.IncludeRegion)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetIp200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ip_address_management/api_get_ip_pool.go b/rest/api/v3/ip_address_management/api_get_ip_pool.go new file mode 100644 index 00000000..364e3f40 --- /dev/null +++ b/rest/api/v3/ip_address_management/api_get_ip_pool.go @@ -0,0 +1,84 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type GetIpPoolParam struct { + // Boolean indicating whether or not to return the IP Pool's region information in the response. + IncludeRegion *bool `json:"include_region,omitempty"` +} + +func (params *GetIpPoolParam) SetIncludeRegion(IncludeRegion bool) *GetIpPoolParam { + params.IncludeRegion = &IncludeRegion + return params +} + +// This operation will return the details for a specified IP Pool, including the Pool's name, ID, a sample list of the IPs associated with the Pool, and the total number of IPs belonging to the Pool. A maximum of 10 IPs will be returned per IP Pool by default. To retrieve additional IP addresses associated with a Pool, use the \"Get IPs Assigned to an IP Pool\" operation. +func (c *ApiService) GetIpPool(params *GetIpPoolParam) (interface{}, error) { + path := "/v3/send_ips/pools/{Poolid}" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.IncludeRegion != nil { + data.Set("include_region", fmt.Sprint(*params.IncludeRegion)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetIpPool200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ip_address_management/api_list_ip.go b/rest/api/v3/ip_address_management/api_list_ip.go new file mode 100644 index 00000000..f0f31220 --- /dev/null +++ b/rest/api/v3/ip_address_management/api_list_ip.go @@ -0,0 +1,183 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListIpParam struct { + // Specifies an IP address. The `ip` query parameter can be used to filter results by IP address. + Ip *string `json:"ip,omitempty"` + // Specifies the number of results to be returned by the API. This parameter can be used in combination with the `before_key` or `after_key` parameters to iterate through paginated results. + Limit *int32 `json:"limit,omitempty"` + // Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. + AfterKey *int32 `json:"after_key,omitempty"` + // Specifies which items to be returned by the API. When the `before_key` is specified, the API will return items beginning from the first item before the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. + BeforeKey *string `json:"before_key,omitempty"` + // Indicates whether an IP address is leased from Twilio SendGrid. If `false`, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account. + IsLeased *bool `json:"is_leased,omitempty"` + // Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. + IsEnabled *bool `json:"is_enabled,omitempty"` + // A parent must be assigned to an IP address before the parent can send mail from the IP and before the address can be assigned to an IP pool. Set this parameter value to true to allow the parent to send mail from the IP and make the IP eligible for IP pool assignment using the IP pool endpoints. + IsParentAssigned *bool `json:"is_parent_assigned,omitempty"` + // Specifies the unique ID for an IP Pool. When included, only IP addresses belonging to the specified Pool will be returned. + Pool *string `json:"pool,omitempty"` + // The `start_added_at` and `end_added_at` parameters are used to set a time window. IP addresses that were added to your account in the specified time window will be returned. The `start_added_at` parameter sets the beginning of the time window. + StartAddedAt *int32 `json:"start_added_at,omitempty"` + // The `start_added_at` and `end_added_at` parameters are used to set a time window. IP addresses that were added to your account in the specified time window will be returned. The `end_added_at` parameter sets the end of the time window. + EndAddedAt *int32 `json:"end_added_at,omitempty"` + // Allowed values are `all`, `eu`, and `us`. If you provide a specific region, results will include all pools that have at least one IP in the filtered region. If `all`, pools with at least one IP (regardless of region) will be returned. If the `region` filter is not provided, the query returns all pools, including empty ones. + Region *Region7 `json:"region,omitempty"` + // Boolean indicating whether or not to return the IP Pool's region information in the response. + IncludeRegion *bool `json:"include_region,omitempty"` +} + +func (params *ListIpParam) SetIp(Ip string) *ListIpParam { + params.Ip = &Ip + return params +} +func (params *ListIpParam) SetLimit(Limit int32) *ListIpParam { + params.Limit = &Limit + return params +} +func (params *ListIpParam) SetAfterKey(AfterKey int32) *ListIpParam { + params.AfterKey = &AfterKey + return params +} +func (params *ListIpParam) SetBeforeKey(BeforeKey string) *ListIpParam { + params.BeforeKey = &BeforeKey + return params +} +func (params *ListIpParam) SetIsLeased(IsLeased bool) *ListIpParam { + params.IsLeased = &IsLeased + return params +} +func (params *ListIpParam) SetIsEnabled(IsEnabled bool) *ListIpParam { + params.IsEnabled = &IsEnabled + return params +} +func (params *ListIpParam) SetIsParentAssigned(IsParentAssigned bool) *ListIpParam { + params.IsParentAssigned = &IsParentAssigned + return params +} +func (params *ListIpParam) SetPool(Pool string) *ListIpParam { + params.Pool = &Pool + return params +} +func (params *ListIpParam) SetStartAddedAt(StartAddedAt int32) *ListIpParam { + params.StartAddedAt = &StartAddedAt + return params +} +func (params *ListIpParam) SetEndAddedAt(EndAddedAt int32) *ListIpParam { + params.EndAddedAt = &EndAddedAt + return params +} +func (params *ListIpParam) SetRegion(Region Region7) *ListIpParam { + params.Region = &Region + return params +} +func (params *ListIpParam) SetIncludeRegion(IncludeRegion bool) *ListIpParam { + params.IncludeRegion = &IncludeRegion + return params +} + +// This operation returns a list of all IP addresses associated with your account. A sample of IP details is returned with each IP, including which Pools the IP is associated with, whether the IP is set to warm up automatically, and when the IP was last updated. ### Limitations The `is_parent_assigned` parameter and `pool` parameter cannot be used at the same time. By definition, an IP cannot be assigned to a Pool if it is not first enabled. You can use either the `before_key` or `after_key` in combination with the `limit` parameter to iterate through paginated results but not both. +func (c *ApiService) ListIp(params *ListIpParam) (interface{}, error) { + path := "/v3/send_ips/ips" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Ip != nil { + data.Set("ip", *params.Ip) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.AfterKey != nil { + data.Set("after_key", fmt.Sprint(*params.AfterKey)) + } + if params != nil && params.BeforeKey != nil { + data.Set("before_key", *params.BeforeKey) + } + if params != nil && params.IsLeased != nil { + data.Set("is_leased", fmt.Sprint(*params.IsLeased)) + } + if params != nil && params.IsEnabled != nil { + data.Set("is_enabled", fmt.Sprint(*params.IsEnabled)) + } + if params != nil && params.IsParentAssigned != nil { + data.Set("is_parent_assigned", fmt.Sprint(*params.IsParentAssigned)) + } + if params != nil && params.Pool != nil { + data.Set("pool", *params.Pool) + } + if params != nil && params.StartAddedAt != nil { + data.Set("start_added_at", fmt.Sprint(*params.StartAddedAt)) + } + if params != nil && params.EndAddedAt != nil { + data.Set("end_added_at", fmt.Sprint(*params.EndAddedAt)) + } + if params != nil && params.Region != nil { + data.Set("region", fmt.Sprint(*params.Region)) + } + if params != nil && params.IncludeRegion != nil { + data.Set("include_region", fmt.Sprint(*params.IncludeRegion)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListIp200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ip_address_management/api_list_ip_assigned_to_ip_pool.go b/rest/api/v3/ip_address_management/api_list_ip_assigned_to_ip_pool.go new file mode 100644 index 00000000..028ca395 --- /dev/null +++ b/rest/api/v3/ip_address_management/api_list_ip_assigned_to_ip_pool.go @@ -0,0 +1,102 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListIpAssignedToIpPoolParam struct { + // Specifies the number of results to be returned by the API. This parameter can be used in combination with the `before_key` or `after_key` parameters to iterate through paginated results. + Limit *int32 `json:"limit,omitempty"` + // Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. + AfterKey *int32 `json:"after_key,omitempty"` + // Boolean indicating whether or not to return the IP Pool's region information in the response. + IncludeRegion *bool `json:"include_region,omitempty"` +} + +func (params *ListIpAssignedToIpPoolParam) SetLimit(Limit int32) *ListIpAssignedToIpPoolParam { + params.Limit = &Limit + return params +} +func (params *ListIpAssignedToIpPoolParam) SetAfterKey(AfterKey int32) *ListIpAssignedToIpPoolParam { + params.AfterKey = &AfterKey + return params +} +func (params *ListIpAssignedToIpPoolParam) SetIncludeRegion(IncludeRegion bool) *ListIpAssignedToIpPoolParam { + params.IncludeRegion = &IncludeRegion + return params +} + +// This operation returns the IP addresses that are assigned to the specified IP pool. +func (c *ApiService) ListIpAssignedToIpPool(params *ListIpAssignedToIpPoolParam) (interface{}, error) { + path := "/v3/send_ips/pools/{Poolid}/ips" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.AfterKey != nil { + data.Set("after_key", fmt.Sprint(*params.AfterKey)) + } + if params != nil && params.IncludeRegion != nil { + data.Set("include_region", fmt.Sprint(*params.IncludeRegion)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListIpAssignedToIpPool200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ip_address_management/api_list_ip_pool.go b/rest/api/v3/ip_address_management/api_list_ip_pool.go new file mode 100644 index 00000000..ab8a4dca --- /dev/null +++ b/rest/api/v3/ip_address_management/api_list_ip_pool.go @@ -0,0 +1,120 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListIpPoolParam struct { + // Specifies the number of results to be returned by the API. This parameter can be used in combination with the `before_key` or `after_key` parameters to iterate through paginated results. + Limit *int32 `json:"limit,omitempty"` + // Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. + AfterKey *int32 `json:"after_key,omitempty"` + // Specifies an IP address. The `ip` query parameter can be used to filter results by IP address. + Ip *string `json:"ip,omitempty"` + // Allowed values are `all`, `eu`, and `us`. If you provide a specific region, results will include all pools that have at least one IP in the filtered region. If `all`, pools with at least one IP (regardless of region) will be returned. If the `region` filter is not provided, the query returns all pools, including empty ones. + Region *Region7 `json:"region,omitempty"` + // Boolean indicating whether or not to return the IP Pool's region information in the response. + IncludeRegion *bool `json:"include_region,omitempty"` +} + +func (params *ListIpPoolParam) SetLimit(Limit int32) *ListIpPoolParam { + params.Limit = &Limit + return params +} +func (params *ListIpPoolParam) SetAfterKey(AfterKey int32) *ListIpPoolParam { + params.AfterKey = &AfterKey + return params +} +func (params *ListIpPoolParam) SetIp(Ip string) *ListIpPoolParam { + params.Ip = &Ip + return params +} +func (params *ListIpPoolParam) SetRegion(Region Region7) *ListIpPoolParam { + params.Region = &Region + return params +} +func (params *ListIpPoolParam) SetIncludeRegion(IncludeRegion bool) *ListIpPoolParam { + params.IncludeRegion = &IncludeRegion + return params +} + +// This operation returns a list of your IP Pools and a sample of each Pools' associated IP addresses. A maximum of 10 IPs will be returned per IP Pool by default. To retrieve additional IP addresses associated with a Pool, use the \"Get IPs Assigned to an IP Pool\" operation. Each user may have a maximum of 100 IP Pools. +func (c *ApiService) ListIpPool(params *ListIpPoolParam) (interface{}, error) { + path := "/v3/send_ips/pools" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.AfterKey != nil { + data.Set("after_key", fmt.Sprint(*params.AfterKey)) + } + if params != nil && params.Ip != nil { + data.Set("ip", *params.Ip) + } + if params != nil && params.Region != nil { + data.Set("region", fmt.Sprint(*params.Region)) + } + if params != nil && params.IncludeRegion != nil { + data.Set("include_region", fmt.Sprint(*params.IncludeRegion)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListIpPool200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ip_address_management/api_list_sub_user_assigned_to_ip.go b/rest/api/v3/ip_address_management/api_list_sub_user_assigned_to_ip.go new file mode 100644 index 00000000..83a88d5a --- /dev/null +++ b/rest/api/v3/ip_address_management/api_list_sub_user_assigned_to_ip.go @@ -0,0 +1,93 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListSubUserAssignedToIpParam struct { + // Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. + AfterKey *int32 `json:"after_key,omitempty"` + // Specifies the number of results to be returned by the API. This parameter can be used in combination with the `after_key` parameters to iterate through paginated results. The maximum limit is 100. + Limit *int32 `json:"limit,omitempty"` +} + +func (params *ListSubUserAssignedToIpParam) SetAfterKey(AfterKey int32) *ListSubUserAssignedToIpParam { + params.AfterKey = &AfterKey + return params +} +func (params *ListSubUserAssignedToIpParam) SetLimit(Limit int32) *ListSubUserAssignedToIpParam { + params.Limit = &Limit + return params +} + +// This operation returns a list of Subuser IDs that have been assigned the specified IP address. To retrieve more information about the returned Subusers, use the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/list-all-subusers). You can use the `after_key` and `limit` query parameters to iterate through paginated results. The maximum limit is 100, meaning you may retrieve up to 100 Subusers per request. If the `after_key` in the API response is not null, there are more Subusers assigned to the IP address than those returned in the request. You can repeat the request with the non-null `after_key` value and the same limit to retrieve the next group of Subusers. +func (c *ApiService) ListSubUserAssignedToIp(params *ListSubUserAssignedToIpParam) (interface{}, error) { + path := "/v3/send_ips/ips/{Ip}/subusers" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.AfterKey != nil { + data.Set("after_key", fmt.Sprint(*params.AfterKey)) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListSubUserAssignedToIp200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ip_address_management/api_service.go b/rest/api/v3/ip_address_management/api_service.go new file mode 100644 index 00000000..b08b7968 --- /dev/null +++ b/rest/api/v3/ip_address_management/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/ip_address_management/api_update_ip.go b/rest/api/v3/ip_address_management/api_update_ip.go new file mode 100644 index 00000000..3e638417 --- /dev/null +++ b/rest/api/v3/ip_address_management/api_update_ip.go @@ -0,0 +1,99 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type UpdateIpParam struct { + // The `ip` path parameter specifies an IP address to make the request against. + Ip *string `json:"ip"` + // + UpdateIpRequest *UpdateIpRequest `json:"UpdateIpRequest,omitempty"` +} + +func (params *UpdateIpParam) SetIp(Ip string) *UpdateIpParam { + params.Ip = &Ip + return params +} +func (params *UpdateIpParam) SetUpdateIpRequest(UpdateIpRequest UpdateIpRequest) *UpdateIpParam { + params.UpdateIpRequest = &UpdateIpRequest + return params +} + +// This operation updates an IP address's settings, including whether the IP is set to warm up automatically, if the IP is assigned by a parent account, and whether the IP is enabled or disabled. The request body must include at least one of the `is_auto_warmup`, `is_parent_assigned`, or `is_enabled` fields. +func (c *ApiService) UpdateIp(params *UpdateIpParam) (interface{}, error) { + path := "/v3/send_ips/ips/{Ip}" + if params != nil && params.Ip != nil { + path = strings.Replace(path, "{"+"Ip"+"}", *params.Ip, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateIpRequest != nil { + b, err := json.Marshal(*params.UpdateIpRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &UpdateIp200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ip_address_management/api_update_ip_pool.go b/rest/api/v3/ip_address_management/api_update_ip_pool.go new file mode 100644 index 00000000..05ac6c6f --- /dev/null +++ b/rest/api/v3/ip_address_management/api_update_ip_pool.go @@ -0,0 +1,99 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type UpdateIpPoolParam struct { + // Specifies the unique ID for an IP Pool. + Poolid *string `json:"poolid"` + // + UpdateIpPoolRequest *UpdateIpPoolRequest `json:"UpdateIpPoolRequest,omitempty"` +} + +func (params *UpdateIpPoolParam) SetPoolid(Poolid string) *UpdateIpPoolParam { + params.Poolid = &Poolid + return params +} +func (params *UpdateIpPoolParam) SetUpdateIpPoolRequest(UpdateIpPoolRequest UpdateIpPoolRequest) *UpdateIpPoolParam { + params.UpdateIpPoolRequest = &UpdateIpPoolRequest + return params +} + +// This operation will rename an IP Pool. An IP Pool name cannot start with a dot/period (.) or space. +func (c *ApiService) UpdateIpPool(params *UpdateIpPoolParam) (interface{}, error) { + path := "/v3/send_ips/pools/{Poolid}" + if params != nil && params.Poolid != nil { + path = strings.Replace(path, "{"+"Poolid"+"}", *params.Poolid, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateIpPoolRequest != nil { + b, err := json.Marshal(*params.UpdateIpPoolRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &UpdateIpPool200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ip_address_management/docs/AddIp.md b/rest/api/v3/ip_address_management/docs/AddIp.md new file mode 100644 index 00000000..9a9abe96 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/AddIp.md @@ -0,0 +1,48 @@ +# AddIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddIp**](AddIp.md#AddIp) | **Post** /v3/send_ips/ips | Add a Twilio SendGrid IP Address + + + +## AddIp + +> AddIp201Response AddIp(ctx, optional) + +Add a Twilio SendGrid IP Address + +This operation adds a Twilio SendGrid IP address to your account. You can also assign up to 100 Subusers to the IP address at creation. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a AddIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**AddIpRequest** | [**AddIpRequest**](AddIpRequest.md) | + +### Return type + +[**AddIp201Response**](AddIp201Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/AddIp201Response.md b/rest/api/v3/ip_address_management/docs/AddIp201Response.md new file mode 100644 index 00000000..dd163214 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/AddIp201Response.md @@ -0,0 +1,15 @@ +# AddIp201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | The IP address that was added to your account. |[optional] +**IsAutoWarmup** | **bool** | Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). This parameter is returned only if the IP address is set to automatically warm up. |[optional] +**IsParentAssigned** | **bool** | Indicates if a parent on the account is able to send email from the IP address. |[optional] +**Subusers** | **[]string** | An array of Subuser IDs the IP address was assigned to. |[optional] +**Region** | [**Region2**](Region2.md) | The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/AddIpRequest.md b/rest/api/v3/ip_address_management/docs/AddIpRequest.md new file mode 100644 index 00000000..55d0e7b0 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/AddIpRequest.md @@ -0,0 +1,15 @@ +# AddIpRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsAutoWarmup** | **bool** | Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). | +**IsParentAssigned** | **bool** | Indicates if a parent on the account is able to send email from the IP address. | +**Subusers** | **[]string** | An array of Subuser IDs the IP address will be assigned to. |[optional] +**Region** | [**Region3**](Region3.md) | The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. |[optional] +**IncludeRegion** | **bool** | Boolean indicating whether or not to return the IP address's region information in the response. |[optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/AddIpsToIpPool.md b/rest/api/v3/ip_address_management/docs/AddIpsToIpPool.md new file mode 100644 index 00000000..a04565b8 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/AddIpsToIpPool.md @@ -0,0 +1,52 @@ +# AddIpsToIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddIpsToIpPool**](AddIpsToIpPool.md#AddIpsToIpPool) | **Post** /v3/send_ips/pools/{Poolid}/ips:batchAdd | Add a Batch of IPs to an IP Pool + + + +## AddIpsToIpPool + +> AddIpsToIpPool200Response AddIpsToIpPool(ctx, Poolidoptional) + +Add a Batch of IPs to an IP Pool + +This operation appends a batch of IPs to an IP Pool. This operation requires all IP assignments to succeed. If any IP assignments fail, this endpoint will return an error. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Poolid** | **string** | Specifies the unique ID for an IP Pool. + +### Other Parameters + +Other parameters are passed through a pointer to a AddIpsToIpPoolParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**AddIpsToIpPoolRequest** | [**AddIpsToIpPoolRequest**](AddIpsToIpPoolRequest.md) | + +### Return type + +[**AddIpsToIpPool200Response**](AddIpsToIpPool200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/AddIpsToIpPool200Response.md b/rest/api/v3/ip_address_management/docs/AddIpsToIpPool200Response.md new file mode 100644 index 00000000..b7c91aa0 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/AddIpsToIpPool200Response.md @@ -0,0 +1,13 @@ +# AddIpsToIpPool200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the IP Pool. |[optional] +**Id** | **string** | The unique ID of the IP Pool. |[optional] +**Ips** | **[]string** | An array of IP addresses assigned to the IP Pool. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/AddIpsToIpPoolRequest.md b/rest/api/v3/ip_address_management/docs/AddIpsToIpPoolRequest.md new file mode 100644 index 00000000..179f44fa --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/AddIpsToIpPoolRequest.md @@ -0,0 +1,11 @@ +# AddIpsToIpPoolRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ips** | **[]string** | An array of IP addresses to assign to the specified IP Pool. All assignments must succeed. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/AddSubUsersToIp.md b/rest/api/v3/ip_address_management/docs/AddSubUsersToIp.md new file mode 100644 index 00000000..bfbe9f17 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/AddSubUsersToIp.md @@ -0,0 +1,52 @@ +# AddSubUsersToIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddSubUsersToIp**](AddSubUsersToIp.md#AddSubUsersToIp) | **Post** /v3/send_ips/ips/{Ip}/subusers:batchAdd | Assign a Batch of Subusers to an IP + + + +## AddSubUsersToIp + +> AddSubUsersToIp200Response AddSubUsersToIp(ctx, Ipoptional) + +Assign a Batch of Subusers to an IP + +This operation appends a batch of Subusers to a specified IP address. This endpoint requires all Subuser assignments to succeed. If a Subuser assignment fails, this endpoint will return an error. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Ip** | **string** | The `ip` path parameter specifies an IP address to make the request against. + +### Other Parameters + +Other parameters are passed through a pointer to a AddSubUsersToIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**AddSubUsersToIpRequest** | [**AddSubUsersToIpRequest**](AddSubUsersToIpRequest.md) | + +### Return type + +[**AddSubUsersToIp200Response**](AddSubUsersToIp200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/AddSubUsersToIp200Response.md b/rest/api/v3/ip_address_management/docs/AddSubUsersToIp200Response.md new file mode 100644 index 00000000..735f87af --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/AddSubUsersToIp200Response.md @@ -0,0 +1,12 @@ +# AddSubUsersToIp200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | The IP address the Subusers were assigned to. |[optional] +**Subusers** | **[]string** | An array of Subuser IDs that were assigned to the specified IP address. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/AddSubUsersToIpRequest.md b/rest/api/v3/ip_address_management/docs/AddSubUsersToIpRequest.md new file mode 100644 index 00000000..cdfb8a0d --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/AddSubUsersToIpRequest.md @@ -0,0 +1,11 @@ +# AddSubUsersToIpRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Subusers** | **[]string** | An array of Subuser IDs to be assigned to the specified IP address. All Subuser assignments must succeed. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/CreateIpPool.md b/rest/api/v3/ip_address_management/docs/CreateIpPool.md new file mode 100644 index 00000000..a047e28f --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/CreateIpPool.md @@ -0,0 +1,48 @@ +# CreateIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateIpPool**](CreateIpPool.md#CreateIpPool) | **Post** /v3/send_ips/pools | Create an IP Pool with a Name and IP Assignments + + + +## CreateIpPool + +> CreateIpPool201Response CreateIpPool(ctx, optional) + +Create an IP Pool with a Name and IP Assignments + +This operation will create a named IP Pool and associate specified IP addresses with the newly created Pool. This operation requires all IP assignments to succeed. If any IP assignments fail, this endpoint will return an error and the Pool will not be created. Each IP Pool may have a maximum of 100 assigned IP addresses. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateIpPoolParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**CreateIpPoolRequest** | [**CreateIpPoolRequest**](CreateIpPoolRequest.md) | + +### Return type + +[**CreateIpPool201Response**](CreateIpPool201Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/CreateIpPool201Response.md b/rest/api/v3/ip_address_management/docs/CreateIpPool201Response.md new file mode 100644 index 00000000..0e1723bd --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/CreateIpPool201Response.md @@ -0,0 +1,13 @@ +# CreateIpPool201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name assigned to the IP Pool. |[optional] +**Id** | **string** | The unique ID of the IP Pool. |[optional] +**Ips** | **[]string** | An array of IP addresses assigned to the IP Pool. All assignments must succeed. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/CreateIpPoolRequest.md b/rest/api/v3/ip_address_management/docs/CreateIpPoolRequest.md new file mode 100644 index 00000000..77aa2295 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/CreateIpPoolRequest.md @@ -0,0 +1,12 @@ +# CreateIpPoolRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name to assign to the IP Pool. An IP Pool name cannot begin with a space or period. | +**Ips** | **[]string** | An array of IP addresses to assign to the IP Pool. All assignments must succeed. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/DeleteIpPool.md b/rest/api/v3/ip_address_management/docs/DeleteIpPool.md new file mode 100644 index 00000000..ddfe136d --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/DeleteIpPool.md @@ -0,0 +1,51 @@ +# DeleteIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteIpPool**](DeleteIpPool.md#DeleteIpPool) | **Delete** /v3/send_ips/pools/{Poolid} | Delete IP Pool + + + +## DeleteIpPool + +> DeleteIpPool(ctx, Poolid) + +Delete IP Pool + +This operation deletes an IP Pool and unassigns all IP addresses associated with the Pool. IP addresses associated with the deleted Pool will remain in your account. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Poolid** | **string** | Specifies the unique ID for an IP Pool. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteIpPoolParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/DeleteIpsFromIpPool.md b/rest/api/v3/ip_address_management/docs/DeleteIpsFromIpPool.md new file mode 100644 index 00000000..0d7f751b --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/DeleteIpsFromIpPool.md @@ -0,0 +1,52 @@ +# DeleteIpsFromIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteIpsFromIpPool**](DeleteIpsFromIpPool.md#DeleteIpsFromIpPool) | **Post** /v3/send_ips/pools/{Poolid}/ips:batchDelete | Delete a Batch of IPs from an IP Pool + + + +## DeleteIpsFromIpPool + +> DeleteIpsFromIpPool(ctx, Poolidoptional) + +Delete a Batch of IPs from an IP Pool + +This operation removes a batch of IPs from an IP Pool. All IPs associated with the Pool will be unassigned from the deleted Pool. However, this operation does not remove the IPs from your account. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Poolid** | **string** | Specifies the unique ID for an IP Pool. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteIpsFromIpPoolParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**DeleteIpsFromIpPoolRequest** | [**DeleteIpsFromIpPoolRequest**](DeleteIpsFromIpPoolRequest.md) | + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/DeleteIpsFromIpPoolRequest.md b/rest/api/v3/ip_address_management/docs/DeleteIpsFromIpPoolRequest.md new file mode 100644 index 00000000..61bb0a31 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/DeleteIpsFromIpPoolRequest.md @@ -0,0 +1,11 @@ +# DeleteIpsFromIpPoolRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ips** | **[]string** | An array of IP addresses to remove from the specified IP Pool. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/DeleteSubUsersFromIp.md b/rest/api/v3/ip_address_management/docs/DeleteSubUsersFromIp.md new file mode 100644 index 00000000..811d1638 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/DeleteSubUsersFromIp.md @@ -0,0 +1,52 @@ +# DeleteSubUsersFromIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSubUsersFromIp**](DeleteSubUsersFromIp.md#DeleteSubUsersFromIp) | **Post** /v3/send_ips/ips/{Ip}/subusers:batchDelete | Delete a Batch of Subusers from an IP + + + +## DeleteSubUsersFromIp + +> DeleteSubUsersFromIp(ctx, Ipoptional) + +Delete a Batch of Subusers from an IP + +This operation removes a batch of Subusers from a specified IP address. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Ip** | **string** | The `ip` path parameter specifies an IP address to make the request against. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSubUsersFromIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**DeleteSubUsersFromIpRequest** | [**DeleteSubUsersFromIpRequest**](DeleteSubUsersFromIpRequest.md) | + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/DeleteSubUsersFromIpRequest.md b/rest/api/v3/ip_address_management/docs/DeleteSubUsersFromIpRequest.md new file mode 100644 index 00000000..f8017d53 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/DeleteSubUsersFromIpRequest.md @@ -0,0 +1,11 @@ +# DeleteSubUsersFromIpRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Subusers** | **[]string** | An array of Subuser IDs to be removed from the specified IP address. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/GetIp.md b/rest/api/v3/ip_address_management/docs/GetIp.md new file mode 100644 index 00000000..e911a0d5 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/GetIp.md @@ -0,0 +1,48 @@ +# GetIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetIp**](GetIp.md#GetIp) | **Get** /v3/send_ips/ips/{Ip} | Get Details for an IP Address + + + +## GetIp + +> GetIp200Response GetIp(ctx, optional) + +Get Details for an IP Address + +This operation returns details for a specified IP address. Details include whether the IP is assigned to a parent account, set to warm up automatically, which Pools the IP is associated with, when the IP was added and modified, whether the IP is leased, and whether the IP is enabled. Note that this operation will not return Subuser information associated with the IP. To retrieve Subuser information, use the \"Get a List of Subusers Assigned to an IP\" endpoint. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a GetIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**IncludeRegion** | **bool** | Boolean indicating whether or not to return the IP Pool's region information in the response. + +### Return type + +[**GetIp200Response**](GetIp200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/GetIp200Response.md b/rest/api/v3/ip_address_management/docs/GetIp200Response.md new file mode 100644 index 00000000..92877de3 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/GetIp200Response.md @@ -0,0 +1,19 @@ +# GetIp200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | The IP address specified in the request. |[optional] +**IsParentAssigned** | **bool** | Indicates if a parent on the account is able to send email from the IP address. |[optional] +**IsAutoWarmup** | **bool** | Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). |[optional] +**Pools** | [**[]GetIp200ResponsePoolsInner**](GetIp200ResponsePoolsInner.md) | An array of IP Pools the IP address is assigned to. |[optional] +**AddedAt** | **int32** | A timestamp indicating when the IP address was added to your account. |[optional] +**UpdatedAt** | Pointer to **int32** | A timestamp indicating when the IP was last updated. | +**IsEnabled** | Pointer to **bool** | Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. | +**IsLeased** | **bool** | Indicates whether an IP address is leased from Twilio SendGrid. If `false`, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account. |[optional] +**Region** | **string** | The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. Possible values are `us` or `eu`. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/GetIp200ResponsePoolsInner.md b/rest/api/v3/ip_address_management/docs/GetIp200ResponsePoolsInner.md new file mode 100644 index 00000000..4dff4853 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/GetIp200ResponsePoolsInner.md @@ -0,0 +1,12 @@ +# GetIp200ResponsePoolsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The ID of the IP Pool. |[optional] +**Name** | **string** | The name of the IP Pool. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/GetIpPool.md b/rest/api/v3/ip_address_management/docs/GetIpPool.md new file mode 100644 index 00000000..efbc6181 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/GetIpPool.md @@ -0,0 +1,48 @@ +# GetIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetIpPool**](GetIpPool.md#GetIpPool) | **Get** /v3/send_ips/pools/{Poolid} | Get Details for an IP Pool + + + +## GetIpPool + +> GetIpPool200Response GetIpPool(ctx, optional) + +Get Details for an IP Pool + +This operation will return the details for a specified IP Pool, including the Pool's name, ID, a sample list of the IPs associated with the Pool, and the total number of IPs belonging to the Pool. A maximum of 10 IPs will be returned per IP Pool by default. To retrieve additional IP addresses associated with a Pool, use the \"Get IPs Assigned to an IP Pool\" operation. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a GetIpPoolParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**IncludeRegion** | **bool** | Boolean indicating whether or not to return the IP Pool's region information in the response. + +### Return type + +[**GetIpPool200Response**](GetIpPool200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/GetIpPool200Response.md b/rest/api/v3/ip_address_management/docs/GetIpPool200Response.md new file mode 100644 index 00000000..38fffdf5 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/GetIpPool200Response.md @@ -0,0 +1,15 @@ +# GetIpPool200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the IP Pool. |[optional] +**Id** | **string** | The unique ID of the IP Pool. |[optional] +**IpsPreview** | **[]string** | A sample list of IP addresses associated with the IP Pool. The sample is limited to 10 results. |[optional] +**TotalIpCount** | **int32** | The total number of IP addresses in the IP Pool. An IP Pool can have a maximum of 100 associated IP addresses. |[optional] +**IpCountByRegion** | [**[]GetIpPool200ResponseIpCountByRegionInner**](GetIpPool200ResponseIpCountByRegionInner.md) | The total number of IP addresses by region. this object is only returned if the `include_region` parameter is included and set to `true` in the API request. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/GetIpPool200ResponseIpCountByRegionInner.md b/rest/api/v3/ip_address_management/docs/GetIpPool200ResponseIpCountByRegionInner.md new file mode 100644 index 00000000..287c899e --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/GetIpPool200ResponseIpCountByRegionInner.md @@ -0,0 +1,12 @@ +# GetIpPool200ResponseIpCountByRegionInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Region** | [**Region5**](Region5.md) | The region associated with the number of IPs listed in the `count` property. |[optional] +**Count** | **int32** | The number of IP addresses in the pool that are assigned to the region specified in the `region` property for this count. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/IpAddressManagementErrorResponse.md b/rest/api/v3/ip_address_management/docs/IpAddressManagementErrorResponse.md new file mode 100644 index 00000000..dcf00eaf --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/IpAddressManagementErrorResponse.md @@ -0,0 +1,11 @@ +# IpAddressManagementErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]IpAddressManagementErrorResponseErrorsInner**](IpAddressManagementErrorResponseErrorsInner.md) | An array of error objects. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/IpAddressManagementErrorResponseErrorsInner.md b/rest/api/v3/ip_address_management/docs/IpAddressManagementErrorResponseErrorsInner.md new file mode 100644 index 00000000..ce08001a --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/IpAddressManagementErrorResponseErrorsInner.md @@ -0,0 +1,12 @@ +# IpAddressManagementErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | Indicates which field caused the error. This may be an empty string if no specific field is responsible for the error. |[optional] +**Message** | **string** | An error-specific message that provides more information about the error's cause. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/Items.md b/rest/api/v3/ip_address_management/docs/Items.md new file mode 100644 index 00000000..fb3e88bd --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/Items.md @@ -0,0 +1,13 @@ +# Items + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**EU** | string | (value: `"eu"`) +**US** | string | (value: `"us"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListIp.md b/rest/api/v3/ip_address_management/docs/ListIp.md new file mode 100644 index 00000000..4386ce78 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIp.md @@ -0,0 +1,59 @@ +# ListIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListIp**](ListIp.md#ListIp) | **Get** /v3/send_ips/ips | Get a List of all IP Addresses on your Account + + + +## ListIp + +> ListIp200Response ListIp(ctx, optional) + +Get a List of all IP Addresses on your Account + +This operation returns a list of all IP addresses associated with your account. A sample of IP details is returned with each IP, including which Pools the IP is associated with, whether the IP is set to warm up automatically, and when the IP was last updated. ### Limitations The `is_parent_assigned` parameter and `pool` parameter cannot be used at the same time. By definition, an IP cannot be assigned to a Pool if it is not first enabled. You can use either the `before_key` or `after_key` in combination with the `limit` parameter to iterate through paginated results but not both. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Ip** | **string** | Specifies an IP address. The `ip` query parameter can be used to filter results by IP address. +**Limit** | **int32** | Specifies the number of results to be returned by the API. This parameter can be used in combination with the `before_key` or `after_key` parameters to iterate through paginated results. +**AfterKey** | **int32** | Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. +**BeforeKey** | **string** | Specifies which items to be returned by the API. When the `before_key` is specified, the API will return items beginning from the first item before the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. +**IsLeased** | **bool** | Indicates whether an IP address is leased from Twilio SendGrid. If `false`, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account. +**IsEnabled** | **bool** | Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. +**IsParentAssigned** | **bool** | A parent must be assigned to an IP address before the parent can send mail from the IP and before the address can be assigned to an IP pool. Set this parameter value to true to allow the parent to send mail from the IP and make the IP eligible for IP pool assignment using the IP pool endpoints. +**Pool** | **string** | Specifies the unique ID for an IP Pool. When included, only IP addresses belonging to the specified Pool will be returned. +**StartAddedAt** | **int32** | The `start_added_at` and `end_added_at` parameters are used to set a time window. IP addresses that were added to your account in the specified time window will be returned. The `start_added_at` parameter sets the beginning of the time window. +**EndAddedAt** | **int32** | The `start_added_at` and `end_added_at` parameters are used to set a time window. IP addresses that were added to your account in the specified time window will be returned. The `end_added_at` parameter sets the end of the time window. +**Region** | [**Region7**](Region7Region7.md) | Allowed values are `all`, `eu`, and `us`. If you provide a specific region, results will include all pools that have at least one IP in the filtered region. If `all`, pools with at least one IP (regardless of region) will be returned. If the `region` filter is not provided, the query returns all pools, including empty ones. +**IncludeRegion** | **bool** | Boolean indicating whether or not to return the IP Pool's region information in the response. + +### Return type + +[**ListIp200Response**](ListIp200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/ListIp200Response.md b/rest/api/v3/ip_address_management/docs/ListIp200Response.md new file mode 100644 index 00000000..d4e0057c --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIp200Response.md @@ -0,0 +1,12 @@ +# ListIp200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ListIp200ResponseResultInner**](ListIp200ResponseResultInner.md) | |[optional] +**Metadata** | [**ListIp200ResponseMetadata**](ListIp200ResponseMetadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListIp200ResponseMetadata.md b/rest/api/v3/ip_address_management/docs/ListIp200ResponseMetadata.md new file mode 100644 index 00000000..025e9096 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIp200ResponseMetadata.md @@ -0,0 +1,11 @@ +# ListIp200ResponseMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NextParams** | [**ListIp200ResponseMetadataNextParams**](ListIp200ResponseMetadataNextParams.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListIp200ResponseMetadataNextParams.md b/rest/api/v3/ip_address_management/docs/ListIp200ResponseMetadataNextParams.md new file mode 100644 index 00000000..5b3f6867 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIp200ResponseMetadataNextParams.md @@ -0,0 +1,22 @@ +# ListIp200ResponseMetadataNextParams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AfterKey** | Pointer to **string** | Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `after_key` cannot be used in combination with the `before_key` parameter. | +**BeforeKey** | Pointer to **string** | Specifies which items to be returned by the API. When the `before_key` is specified, the API will return items beginning from the first item before the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `before_key` cannot be used in combination with the `after_key` parameter. | +**Ip** | **string** | The IP address specified in the request with the `ip` query parameter. This parameter is returned only when an IP is included in the request. |[optional] +**IsLeased** | **bool** | Indicates whether an IP address is leased from Twilio SendGrid. If `false`, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account. This parameter is returned only if the IP address is leased. |[optional] +**IsEnabled** | **bool** | Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. This parameter is returned only if the IP address is enabled. |[optional] +**IsParentAssigned** | **bool** | Indicates if a parent on the account is able to send email from the IP address. This parameter is returned only if the IP address is parent assigned. |[optional] +**Pool** | **string** | The IP Pool ID specified in the request with the `pool` query parameter. This parameter is returned only when an IP Pool is included in the request. |[optional] +**StartAddedAt** | **string** | The beginning of the time window specified in the request with the `start_added_at` query parameter. This parameter is returned only when the `start_added_at` parameter is included in the request. |[optional] +**EndAddedAt** | **string** | The end of the time window specified in the request with the `end_added_at` query parameter. This parameter is returned only when the `end_added_at` parameter is included in the request. |[optional] +**Limit** | **string** | The number of items returned in the request. This parameter is returned only when a `limit` is set using the `limit` query parameter in the request. |[optional] +**Region** | [**Region1**](Region1.md) | The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request, |[optional] +**IncludeRegion** | **string** | Indicates whether or not to include the IP address's region. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListIp200ResponseResultInner.md b/rest/api/v3/ip_address_management/docs/ListIp200ResponseResultInner.md new file mode 100644 index 00000000..f5afc216 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIp200ResponseResultInner.md @@ -0,0 +1,19 @@ +# ListIp200ResponseResultInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | An IP address on your account. |[optional] +**Pools** | [**[]ListIp200ResponseResultInnerPoolsInner**](ListIp200ResponseResultInnerPoolsInner.md) | An array of IP Pools the IP address is assigned to. |[optional] +**IsAutoWarmup** | **bool** | Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). |[optional] +**IsParentAssigned** | Pointer to **bool** | Indicates if a parent on the account is able to send email from the IP address. This parameter will be returned only if the request was made by the parent account. | +**UpdatedAt** | Pointer to **int32** | A timestamp indicating when the IP was last updated. | +**IsEnabled** | Pointer to **bool** | Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. | +**IsLeased** | **bool** | Indicates whether an IP address is leased from Twilio SendGrid. If `false`, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account. |[optional] +**AddedAt** | **int32** | A timestamp representing when the IP address was added to your account. |[optional] +**Region** | [**Region**](Region.md) | The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListIp200ResponseResultInnerPoolsInner.md b/rest/api/v3/ip_address_management/docs/ListIp200ResponseResultInnerPoolsInner.md new file mode 100644 index 00000000..2457686e --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIp200ResponseResultInnerPoolsInner.md @@ -0,0 +1,12 @@ +# ListIp200ResponseResultInnerPoolsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the IP Pool. |[optional] +**Id** | **string** | The unique ID of the IP Pool. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool.md b/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool.md new file mode 100644 index 00000000..27120fb3 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool.md @@ -0,0 +1,50 @@ +# ListIpAssignedToIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListIpAssignedToIpPool**](ListIpAssignedToIpPool.md#ListIpAssignedToIpPool) | **Get** /v3/send_ips/pools/{Poolid}/ips | Get IPs Assigned to an IP Pool + + + +## ListIpAssignedToIpPool + +> ListIpAssignedToIpPool200Response ListIpAssignedToIpPool(ctx, optional) + +Get IPs Assigned to an IP Pool + +This operation returns the IP addresses that are assigned to the specified IP pool. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListIpAssignedToIpPoolParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **int32** | Specifies the number of results to be returned by the API. This parameter can be used in combination with the `before_key` or `after_key` parameters to iterate through paginated results. +**AfterKey** | **int32** | Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. +**IncludeRegion** | **bool** | Boolean indicating whether or not to return the IP Pool's region information in the response. + +### Return type + +[**ListIpAssignedToIpPool200Response**](ListIpAssignedToIpPool200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200Response.md b/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200Response.md new file mode 100644 index 00000000..6bbf46ba --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200Response.md @@ -0,0 +1,12 @@ +# ListIpAssignedToIpPool200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ListIpAssignedToIpPool200ResponseResultInner**](ListIpAssignedToIpPool200ResponseResultInner.md) | |[optional] +**Metadata** | [**ListIpAssignedToIpPool200ResponseMetadata**](ListIpAssignedToIpPool200ResponseMetadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseMetadata.md b/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseMetadata.md new file mode 100644 index 00000000..f8890c12 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseMetadata.md @@ -0,0 +1,11 @@ +# ListIpAssignedToIpPool200ResponseMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NextParams** | [**ListIpAssignedToIpPool200ResponseMetadataNextParams**](ListIpAssignedToIpPool200ResponseMetadataNextParams.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseMetadataNextParams.md b/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseMetadataNextParams.md new file mode 100644 index 00000000..1988a996 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseMetadataNextParams.md @@ -0,0 +1,13 @@ +# ListIpAssignedToIpPool200ResponseMetadataNextParams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AfterKey** | Pointer to **string** | Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `after_key` cannot be used in combination with the `before_key` parameter. | +**Limit** | **string** | The `limit` specified in the request. This parameter will be included only if it was specified in the request. This is not the default limit enforced by the API. |[optional] +**IncludeRegion** | **string** | Indicates whether or not to include the IP address's region. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseResultInner.md b/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseResultInner.md new file mode 100644 index 00000000..d8ffe910 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseResultInner.md @@ -0,0 +1,13 @@ +# ListIpAssignedToIpPool200ResponseResultInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | An IP address assigned to the IP Pool. |[optional] +**Region** | [**Region6**](Region6.md) | The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. |[optional] +**Pools** | [**[]ListIp200ResponseResultInnerPoolsInner**](ListIp200ResponseResultInnerPoolsInner.md) | IP Pools the IP address is assigned to. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListIpPool.md b/rest/api/v3/ip_address_management/docs/ListIpPool.md new file mode 100644 index 00000000..e49c30f6 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIpPool.md @@ -0,0 +1,52 @@ +# ListIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListIpPool**](ListIpPool.md#ListIpPool) | **Get** /v3/send_ips/pools | GET all IP Pools that have Associated IPs + + + +## ListIpPool + +> ListIpPool200Response ListIpPool(ctx, optional) + +GET all IP Pools that have Associated IPs + +This operation returns a list of your IP Pools and a sample of each Pools' associated IP addresses. A maximum of 10 IPs will be returned per IP Pool by default. To retrieve additional IP addresses associated with a Pool, use the \"Get IPs Assigned to an IP Pool\" operation. Each user may have a maximum of 100 IP Pools. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListIpPoolParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **int32** | Specifies the number of results to be returned by the API. This parameter can be used in combination with the `before_key` or `after_key` parameters to iterate through paginated results. +**AfterKey** | **int32** | Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. +**Ip** | **string** | Specifies an IP address. The `ip` query parameter can be used to filter results by IP address. +**Region** | [**Region7**](Region7Region7.md) | Allowed values are `all`, `eu`, and `us`. If you provide a specific region, results will include all pools that have at least one IP in the filtered region. If `all`, pools with at least one IP (regardless of region) will be returned. If the `region` filter is not provided, the query returns all pools, including empty ones. +**IncludeRegion** | **bool** | Boolean indicating whether or not to return the IP Pool's region information in the response. + +### Return type + +[**ListIpPool200Response**](ListIpPool200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/ListIpPool200Response.md b/rest/api/v3/ip_address_management/docs/ListIpPool200Response.md new file mode 100644 index 00000000..30b278aa --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIpPool200Response.md @@ -0,0 +1,12 @@ +# ListIpPool200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ListIpPool200ResponseResultInner**](ListIpPool200ResponseResultInner.md) | |[optional] +**Metadata** | [**ListIpPool200ResponseMetadata**](ListIpPool200ResponseMetadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListIpPool200ResponseMetadata.md b/rest/api/v3/ip_address_management/docs/ListIpPool200ResponseMetadata.md new file mode 100644 index 00000000..33136f18 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIpPool200ResponseMetadata.md @@ -0,0 +1,11 @@ +# ListIpPool200ResponseMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NextParams** | [**ListIpPool200ResponseMetadataNextParams**](ListIpPool200ResponseMetadataNextParams.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListIpPool200ResponseMetadataNextParams.md b/rest/api/v3/ip_address_management/docs/ListIpPool200ResponseMetadataNextParams.md new file mode 100644 index 00000000..b59951d5 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIpPool200ResponseMetadataNextParams.md @@ -0,0 +1,15 @@ +# ListIpPool200ResponseMetadataNextParams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AfterKey** | Pointer to **string** | Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `after_key` cannot be used in combination with the `before_key` parameter. | +**Ip** | **string** | The IP address specified in the request. This parameter will be returned only if it was specified in the request. |[optional] +**Limit** | **string** | The `limit` specified in the request. This parameter will be included only if it was specified in the request. This is not the default limit enforced by the API. |[optional] +**Region** | [**Region4**](Region4.md) | The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. |[optional] +**IncludeRegion** | **string** | Indicates whether or not to include the IP address's region. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListIpPool200ResponseResultInner.md b/rest/api/v3/ip_address_management/docs/ListIpPool200ResponseResultInner.md new file mode 100644 index 00000000..f8b44a23 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIpPool200ResponseResultInner.md @@ -0,0 +1,15 @@ +# ListIpPool200ResponseResultInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the IP Pool. |[optional] +**Id** | **string** | The unique ID of the IP Pool. |[optional] +**Regions** | [**[]Items**](Items.md) | An array of the unique regions of all the IP addresses returned within the IP pool. |[optional] +**IpsPreview** | **[]string** | A sample list of IP addresses associated with the IP Pool. The sample is limited to 10 results. |[optional] +**TotalIpCount** | **int32** | The total number of IP addresses in the IP Pool. An IP Pool can have a maximum of 100 associated IP addresses. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp.md b/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp.md new file mode 100644 index 00000000..e672cdd2 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp.md @@ -0,0 +1,49 @@ +# ListSubUserAssignedToIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSubUserAssignedToIp**](ListSubUserAssignedToIp.md#ListSubUserAssignedToIp) | **Get** /v3/send_ips/ips/{Ip}/subusers | Get a List of Subusers Assigned to an IP + + + +## ListSubUserAssignedToIp + +> ListSubUserAssignedToIp200Response ListSubUserAssignedToIp(ctx, optional) + +Get a List of Subusers Assigned to an IP + +This operation returns a list of Subuser IDs that have been assigned the specified IP address. To retrieve more information about the returned Subusers, use the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/list-all-subusers). You can use the `after_key` and `limit` query parameters to iterate through paginated results. The maximum limit is 100, meaning you may retrieve up to 100 Subusers per request. If the `after_key` in the API response is not null, there are more Subusers assigned to the IP address than those returned in the request. You can repeat the request with the non-null `after_key` value and the same limit to retrieve the next group of Subusers. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSubUserAssignedToIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**AfterKey** | **int32** | Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. +**Limit** | **int32** | Specifies the number of results to be returned by the API. This parameter can be used in combination with the `after_key` parameters to iterate through paginated results. The maximum limit is 100. + +### Return type + +[**ListSubUserAssignedToIp200Response**](ListSubUserAssignedToIp200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200Response.md b/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200Response.md new file mode 100644 index 00000000..df5554fb --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200Response.md @@ -0,0 +1,12 @@ +# ListSubUserAssignedToIp200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | **[]string** | An array of Subuser IDs that have been assigned the specified IP address. |[optional] +**Metadata** | [**ListSubUserAssignedToIp200ResponseMetadata**](ListSubUserAssignedToIp200ResponseMetadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200ResponseMetadata.md b/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200ResponseMetadata.md new file mode 100644 index 00000000..05e6ef0a --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200ResponseMetadata.md @@ -0,0 +1,11 @@ +# ListSubUserAssignedToIp200ResponseMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NextParams** | [**ListSubUserAssignedToIp200ResponseMetadataNextParams**](ListSubUserAssignedToIp200ResponseMetadataNextParams.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200ResponseMetadataNextParams.md b/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200ResponseMetadataNextParams.md new file mode 100644 index 00000000..36b362e5 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200ResponseMetadataNextParams.md @@ -0,0 +1,12 @@ +# ListSubUserAssignedToIp200ResponseMetadataNextParams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AfterKey** | Pointer to **string** | Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `after_key` cannot be used in combination with the `before_key` parameter. | +**Limit** | **string** | The `limit` specified in the request. This parameter will be included only if it was specified in the request. This is not the default limit enforced by the API. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/Region.md b/rest/api/v3/ip_address_management/docs/Region.md new file mode 100644 index 00000000..e861b3d5 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/Region.md @@ -0,0 +1,13 @@ +# Region + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**EU** | string | (value: `"eu"`) +**US** | string | (value: `"us"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/Region1.md b/rest/api/v3/ip_address_management/docs/Region1.md new file mode 100644 index 00000000..ca0566cb --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/Region1.md @@ -0,0 +1,14 @@ +# Region1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**ALL** | string | (value: `"all"`) +**US** | string | (value: `"us"`) +**EU** | string | (value: `"eu"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/Region2.md b/rest/api/v3/ip_address_management/docs/Region2.md new file mode 100644 index 00000000..09a272e0 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/Region2.md @@ -0,0 +1,13 @@ +# Region2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**EU** | string | (value: `"eu"`) +**US** | string | (value: `"us"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/Region3.md b/rest/api/v3/ip_address_management/docs/Region3.md new file mode 100644 index 00000000..c39c27e1 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/Region3.md @@ -0,0 +1,13 @@ +# Region3 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**EU** | string | (value: `"eu"`) +**US** | string | (value: `"us"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/Region4.md b/rest/api/v3/ip_address_management/docs/Region4.md new file mode 100644 index 00000000..928b038b --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/Region4.md @@ -0,0 +1,14 @@ +# Region4 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**ALL** | string | (value: `"all"`) +**US** | string | (value: `"us"`) +**EU** | string | (value: `"eu"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/Region5.md b/rest/api/v3/ip_address_management/docs/Region5.md new file mode 100644 index 00000000..2e619fff --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/Region5.md @@ -0,0 +1,13 @@ +# Region5 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**US** | string | (value: `"us"`) +**EU** | string | (value: `"eu"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/Region6.md b/rest/api/v3/ip_address_management/docs/Region6.md new file mode 100644 index 00000000..9a492375 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/Region6.md @@ -0,0 +1,13 @@ +# Region6 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**EU** | string | (value: `"eu"`) +**US** | string | (value: `"us"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/Region7.md b/rest/api/v3/ip_address_management/docs/Region7.md new file mode 100644 index 00000000..c7db2ec2 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/Region7.md @@ -0,0 +1,14 @@ +# Region7 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**ALL** | string | (value: `"all"`) +**EU** | string | (value: `"eu"`) +**US** | string | (value: `"us"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/UpdateIp.md b/rest/api/v3/ip_address_management/docs/UpdateIp.md new file mode 100644 index 00000000..4dffc656 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/UpdateIp.md @@ -0,0 +1,52 @@ +# UpdateIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateIp**](UpdateIp.md#UpdateIp) | **Patch** /v3/send_ips/ips/{Ip} | Update Details for an IP Address + + + +## UpdateIp + +> UpdateIp200Response UpdateIp(ctx, Ipoptional) + +Update Details for an IP Address + +This operation updates an IP address's settings, including whether the IP is set to warm up automatically, if the IP is assigned by a parent account, and whether the IP is enabled or disabled. The request body must include at least one of the `is_auto_warmup`, `is_parent_assigned`, or `is_enabled` fields. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Ip** | **string** | The `ip` path parameter specifies an IP address to make the request against. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**UpdateIpRequest** | [**UpdateIpRequest**](UpdateIpRequest.md) | + +### Return type + +[**UpdateIp200Response**](UpdateIp200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/UpdateIp200Response.md b/rest/api/v3/ip_address_management/docs/UpdateIp200Response.md new file mode 100644 index 00000000..ed2bc116 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/UpdateIp200Response.md @@ -0,0 +1,14 @@ +# UpdateIp200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | The IP address that was updated. |[optional] +**IsAutoWarmup** | **bool** | Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). |[optional] +**IsParentAssigned** | **bool** | Indicates if a parent on the account is able to send email from the IP address. This parameter is returned only if the IP address is parent assigned. |[optional] +**IsEnabled** | **bool** | An array of Subuser IDs the IP address was assigned to. This parameter is returned only if the IP address is enabled. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/UpdateIpPool.md b/rest/api/v3/ip_address_management/docs/UpdateIpPool.md new file mode 100644 index 00000000..ab0e11fd --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/UpdateIpPool.md @@ -0,0 +1,52 @@ +# UpdateIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateIpPool**](UpdateIpPool.md#UpdateIpPool) | **Put** /v3/send_ips/pools/{Poolid} | Update an IP Pool Name + + + +## UpdateIpPool + +> UpdateIpPool200Response UpdateIpPool(ctx, Poolidoptional) + +Update an IP Pool Name + +This operation will rename an IP Pool. An IP Pool name cannot start with a dot/period (.) or space. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Poolid** | **string** | Specifies the unique ID for an IP Pool. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateIpPoolParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**UpdateIpPoolRequest** | [**UpdateIpPoolRequest**](UpdateIpPoolRequest.md) | + +### Return type + +[**UpdateIpPool200Response**](UpdateIpPool200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/UpdateIpPool200Response.md b/rest/api/v3/ip_address_management/docs/UpdateIpPool200Response.md new file mode 100644 index 00000000..787fe0cc --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/UpdateIpPool200Response.md @@ -0,0 +1,12 @@ +# UpdateIpPool200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name assigned to the IP Pool. |[optional] +**Id** | **string** | The unique ID of the IP Pool. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/UpdateIpPoolRequest.md b/rest/api/v3/ip_address_management/docs/UpdateIpPoolRequest.md new file mode 100644 index 00000000..30357410 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/UpdateIpPoolRequest.md @@ -0,0 +1,11 @@ +# UpdateIpPoolRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name to assign to the IP Pool. An IP Pool name cannot begin with a space or period. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/UpdateIpRequest.md b/rest/api/v3/ip_address_management/docs/UpdateIpRequest.md new file mode 100644 index 00000000..a3c255d2 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/UpdateIpRequest.md @@ -0,0 +1,13 @@ +# UpdateIpRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsAutoWarmup** | **bool** | Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). |[optional] +**IsParentAssigned** | **bool** | Indicates if a parent on the account is able to send email from the IP address. |[optional] +**IsEnabled** | **bool** | Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/model_add_ip_201_response.go b/rest/api/v3/ip_address_management/model_add_ip_201_response.go new file mode 100644 index 00000000..7efdcac8 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_add_ip_201_response.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIp201Response struct for AddIp201Response +type AddIp201Response struct { + // The IP address that was added to your account. + Ip *string `json:"ip,omitempty"` + // Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). This parameter is returned only if the IP address is set to automatically warm up. + IsAutoWarmup *bool `json:"is_auto_warmup,omitempty"` + // Indicates if a parent on the account is able to send email from the IP address. + IsParentAssigned *bool `json:"is_parent_assigned,omitempty"` + // An array of Subuser IDs the IP address was assigned to. + Subusers *[]string `json:"subusers,omitempty"` + // The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. + Region *Region2 `json:"region,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_add_ip_request.go b/rest/api/v3/ip_address_management/model_add_ip_request.go new file mode 100644 index 00000000..919d2b8a --- /dev/null +++ b/rest/api/v3/ip_address_management/model_add_ip_request.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIpRequest struct for AddIpRequest +type AddIpRequest struct { + // Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). + IsAutoWarmup bool `json:"is_auto_warmup"` + // Indicates if a parent on the account is able to send email from the IP address. + IsParentAssigned bool `json:"is_parent_assigned"` + // An array of Subuser IDs the IP address will be assigned to. + Subusers *[]string `json:"subusers,omitempty"` + // The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. + Region *Region3 `json:"region,omitempty"` + // Boolean indicating whether or not to return the IP address's region information in the response. + IncludeRegion *bool `json:"include_region,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_add_ips_to_ip_pool_200_response.go b/rest/api/v3/ip_address_management/model_add_ips_to_ip_pool_200_response.go new file mode 100644 index 00000000..98259263 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_add_ips_to_ip_pool_200_response.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIpsToIpPool200Response struct for AddIpsToIpPool200Response +type AddIpsToIpPool200Response struct { + // The name of the IP Pool. + Name *string `json:"name,omitempty"` + // The unique ID of the IP Pool. + Id *string `json:"id,omitempty"` + // An array of IP addresses assigned to the IP Pool. + Ips *[]string `json:"ips,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_add_ips_to_ip_pool_request.go b/rest/api/v3/ip_address_management/model_add_ips_to_ip_pool_request.go new file mode 100644 index 00000000..e6bc299e --- /dev/null +++ b/rest/api/v3/ip_address_management/model_add_ips_to_ip_pool_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIpsToIpPoolRequest struct for AddIpsToIpPoolRequest +type AddIpsToIpPoolRequest struct { + // An array of IP addresses to assign to the specified IP Pool. All assignments must succeed. + Ips []string `json:"ips"` +} diff --git a/rest/api/v3/ip_address_management/model_add_sub_users_to_ip_200_response.go b/rest/api/v3/ip_address_management/model_add_sub_users_to_ip_200_response.go new file mode 100644 index 00000000..c565c49b --- /dev/null +++ b/rest/api/v3/ip_address_management/model_add_sub_users_to_ip_200_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddSubUsersToIp200Response struct for AddSubUsersToIp200Response +type AddSubUsersToIp200Response struct { + // The IP address the Subusers were assigned to. + Ip *string `json:"ip,omitempty"` + // An array of Subuser IDs that were assigned to the specified IP address. + Subusers *[]string `json:"subusers,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_add_sub_users_to_ip_request.go b/rest/api/v3/ip_address_management/model_add_sub_users_to_ip_request.go new file mode 100644 index 00000000..72670bf6 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_add_sub_users_to_ip_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddSubUsersToIpRequest struct for AddSubUsersToIpRequest +type AddSubUsersToIpRequest struct { + // An array of Subuser IDs to be assigned to the specified IP address. All Subuser assignments must succeed. + Subusers []string `json:"subusers"` +} diff --git a/rest/api/v3/ip_address_management/model_create_ip_pool_201_response.go b/rest/api/v3/ip_address_management/model_create_ip_pool_201_response.go new file mode 100644 index 00000000..8fa8d726 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_create_ip_pool_201_response.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateIpPool201Response struct for CreateIpPool201Response +type CreateIpPool201Response struct { + // The name assigned to the IP Pool. + Name *string `json:"name,omitempty"` + // The unique ID of the IP Pool. + Id *string `json:"id,omitempty"` + // An array of IP addresses assigned to the IP Pool. All assignments must succeed. + Ips *[]string `json:"ips,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_create_ip_pool_request.go b/rest/api/v3/ip_address_management/model_create_ip_pool_request.go new file mode 100644 index 00000000..c702be5a --- /dev/null +++ b/rest/api/v3/ip_address_management/model_create_ip_pool_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateIpPoolRequest struct for CreateIpPoolRequest +type CreateIpPoolRequest struct { + // The name to assign to the IP Pool. An IP Pool name cannot begin with a space or period. + Name string `json:"name"` + // An array of IP addresses to assign to the IP Pool. All assignments must succeed. + Ips *[]string `json:"ips,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_delete_ips_from_ip_pool_request.go b/rest/api/v3/ip_address_management/model_delete_ips_from_ip_pool_request.go new file mode 100644 index 00000000..f61bee66 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_delete_ips_from_ip_pool_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteIpsFromIpPoolRequest struct for DeleteIpsFromIpPoolRequest +type DeleteIpsFromIpPoolRequest struct { + // An array of IP addresses to remove from the specified IP Pool. + Ips []string `json:"ips"` +} diff --git a/rest/api/v3/ip_address_management/model_delete_sub_users_from_ip_request.go b/rest/api/v3/ip_address_management/model_delete_sub_users_from_ip_request.go new file mode 100644 index 00000000..b558ec05 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_delete_sub_users_from_ip_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteSubUsersFromIpRequest struct for DeleteSubUsersFromIpRequest +type DeleteSubUsersFromIpRequest struct { + // An array of Subuser IDs to be removed from the specified IP address. + Subusers []string `json:"subusers"` +} diff --git a/rest/api/v3/ip_address_management/model_get_ip_200_response.go b/rest/api/v3/ip_address_management/model_get_ip_200_response.go new file mode 100644 index 00000000..e9e90214 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_get_ip_200_response.go @@ -0,0 +1,36 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetIp200Response struct for GetIp200Response +type GetIp200Response struct { + // The IP address specified in the request. + Ip *string `json:"ip,omitempty"` + // Indicates if a parent on the account is able to send email from the IP address. + IsParentAssigned *bool `json:"is_parent_assigned,omitempty"` + // Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). + IsAutoWarmup *bool `json:"is_auto_warmup,omitempty"` + // An array of IP Pools the IP address is assigned to. + Pools *[]GetIp200ResponsePoolsInner `json:"pools,omitempty"` + // A timestamp indicating when the IP address was added to your account. + AddedAt *int32 `json:"added_at,omitempty"` + // A timestamp indicating when the IP was last updated. + UpdatedAt *int32 `json:"updated_at,omitempty"` + // Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. + IsEnabled *bool `json:"is_enabled,omitempty"` + // Indicates whether an IP address is leased from Twilio SendGrid. If `false`, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account. + IsLeased *bool `json:"is_leased,omitempty"` + // The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. Possible values are `us` or `eu`. + Region *string `json:"region,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_get_ip_200_response_pools_inner.go b/rest/api/v3/ip_address_management/model_get_ip_200_response_pools_inner.go new file mode 100644 index 00000000..36e7d5ee --- /dev/null +++ b/rest/api/v3/ip_address_management/model_get_ip_200_response_pools_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetIp200ResponsePoolsInner struct for GetIp200ResponsePoolsInner +type GetIp200ResponsePoolsInner struct { + // The ID of the IP Pool. + Id *string `json:"id,omitempty"` + // The name of the IP Pool. + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_get_ip_pool_200_response.go b/rest/api/v3/ip_address_management/model_get_ip_pool_200_response.go new file mode 100644 index 00000000..cd1b5410 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_get_ip_pool_200_response.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetIpPool200Response struct for GetIpPool200Response +type GetIpPool200Response struct { + // The name of the IP Pool. + Name *string `json:"name,omitempty"` + // The unique ID of the IP Pool. + Id *string `json:"id,omitempty"` + // A sample list of IP addresses associated with the IP Pool. The sample is limited to 10 results. + IpsPreview *[]string `json:"ips_preview,omitempty"` + // The total number of IP addresses in the IP Pool. An IP Pool can have a maximum of 100 associated IP addresses. + TotalIpCount *int32 `json:"total_ip_count,omitempty"` + // The total number of IP addresses by region. this object is only returned if the `include_region` parameter is included and set to `true` in the API request. + IpCountByRegion *[]GetIpPool200ResponseIpCountByRegionInner `json:"ip_count_by_region,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_get_ip_pool_200_response_ip_count_by_region_inner.go b/rest/api/v3/ip_address_management/model_get_ip_pool_200_response_ip_count_by_region_inner.go new file mode 100644 index 00000000..e16b374a --- /dev/null +++ b/rest/api/v3/ip_address_management/model_get_ip_pool_200_response_ip_count_by_region_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetIpPool200ResponseIpCountByRegionInner struct for GetIpPool200ResponseIpCountByRegionInner +type GetIpPool200ResponseIpCountByRegionInner struct { + // The region associated with the number of IPs listed in the `count` property. + Region *Region5 `json:"region,omitempty"` + // The number of IP addresses in the pool that are assigned to the region specified in the `region` property for this count. + Count *int32 `json:"count,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_ip_address_management_error_response.go b/rest/api/v3/ip_address_management/model_ip_address_management_error_response.go new file mode 100644 index 00000000..a9104eff --- /dev/null +++ b/rest/api/v3/ip_address_management/model_ip_address_management_error_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IpAddressManagementErrorResponse IP Address Management Error Response Schema +type IpAddressManagementErrorResponse struct { + // An array of error objects. + Errors *[]IpAddressManagementErrorResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_ip_address_management_error_response_errors_inner.go b/rest/api/v3/ip_address_management/model_ip_address_management_error_response_errors_inner.go new file mode 100644 index 00000000..731e72c3 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_ip_address_management_error_response_errors_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IpAddressManagementErrorResponseErrorsInner struct for IpAddressManagementErrorResponseErrorsInner +type IpAddressManagementErrorResponseErrorsInner struct { + // Indicates which field caused the error. This may be an empty string if no specific field is responsible for the error. + Field *string `json:"field,omitempty"` + // An error-specific message that provides more information about the error's cause. + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_items.go b/rest/api/v3/ip_address_management/model_items.go new file mode 100644 index 00000000..87d3f404 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_items.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Items the model 'Items' +type Items string + +// List of Items +const ( + ITEMS_EU Items = "eu" + ITEMS_US Items = "us" +) diff --git a/rest/api/v3/ip_address_management/model_list_ip_200_response.go b/rest/api/v3/ip_address_management/model_list_ip_200_response.go new file mode 100644 index 00000000..9ad4f44c --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_ip_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListIp200Response struct for ListIp200Response +type ListIp200Response struct { + Result *[]ListIp200ResponseResultInner `json:"result,omitempty"` + Metadata *ListIp200ResponseMetadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_ip_200_response__metadata.go b/rest/api/v3/ip_address_management/model_list_ip_200_response__metadata.go new file mode 100644 index 00000000..6607e47c --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_ip_200_response__metadata.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListIp200ResponseMetadata struct for ListIp200ResponseMetadata +type ListIp200ResponseMetadata struct { + NextParams *ListIp200ResponseMetadataNextParams `json:"next_params,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_ip_200_response__metadata_next_params.go b/rest/api/v3/ip_address_management/model_list_ip_200_response__metadata_next_params.go new file mode 100644 index 00000000..51a639b8 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_ip_200_response__metadata_next_params.go @@ -0,0 +1,42 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListIp200ResponseMetadataNextParams struct for ListIp200ResponseMetadataNextParams +type ListIp200ResponseMetadataNextParams struct { + // Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `after_key` cannot be used in combination with the `before_key` parameter. + AfterKey *string `json:"after_key,omitempty"` + // Specifies which items to be returned by the API. When the `before_key` is specified, the API will return items beginning from the first item before the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `before_key` cannot be used in combination with the `after_key` parameter. + BeforeKey *string `json:"before_key,omitempty"` + // The IP address specified in the request with the `ip` query parameter. This parameter is returned only when an IP is included in the request. + Ip *string `json:"ip,omitempty"` + // Indicates whether an IP address is leased from Twilio SendGrid. If `false`, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account. This parameter is returned only if the IP address is leased. + IsLeased *bool `json:"is_leased,omitempty"` + // Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. This parameter is returned only if the IP address is enabled. + IsEnabled *bool `json:"is_enabled,omitempty"` + // Indicates if a parent on the account is able to send email from the IP address. This parameter is returned only if the IP address is parent assigned. + IsParentAssigned *bool `json:"is_parent_assigned,omitempty"` + // The IP Pool ID specified in the request with the `pool` query parameter. This parameter is returned only when an IP Pool is included in the request. + Pool *string `json:"pool,omitempty"` + // The beginning of the time window specified in the request with the `start_added_at` query parameter. This parameter is returned only when the `start_added_at` parameter is included in the request. + StartAddedAt *string `json:"start_added_at,omitempty"` + // The end of the time window specified in the request with the `end_added_at` query parameter. This parameter is returned only when the `end_added_at` parameter is included in the request. + EndAddedAt *string `json:"end_added_at,omitempty"` + // The number of items returned in the request. This parameter is returned only when a `limit` is set using the `limit` query parameter in the request. + Limit *string `json:"limit,omitempty"` + // The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request, + Region *Region1 `json:"region,omitempty"` + // Indicates whether or not to include the IP address's region. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. + IncludeRegion *string `json:"include_region,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_ip_200_response_result_inner.go b/rest/api/v3/ip_address_management/model_list_ip_200_response_result_inner.go new file mode 100644 index 00000000..594cf786 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_ip_200_response_result_inner.go @@ -0,0 +1,36 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListIp200ResponseResultInner struct for ListIp200ResponseResultInner +type ListIp200ResponseResultInner struct { + // An IP address on your account. + Ip *string `json:"ip,omitempty"` + // An array of IP Pools the IP address is assigned to. + Pools *[]ListIp200ResponseResultInnerPoolsInner `json:"pools,omitempty"` + // Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). + IsAutoWarmup *bool `json:"is_auto_warmup,omitempty"` + // Indicates if a parent on the account is able to send email from the IP address. This parameter will be returned only if the request was made by the parent account. + IsParentAssigned *bool `json:"is_parent_assigned,omitempty"` + // A timestamp indicating when the IP was last updated. + UpdatedAt *int32 `json:"updated_at,omitempty"` + // Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. + IsEnabled *bool `json:"is_enabled,omitempty"` + // Indicates whether an IP address is leased from Twilio SendGrid. If `false`, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account. + IsLeased *bool `json:"is_leased,omitempty"` + // A timestamp representing when the IP address was added to your account. + AddedAt *int32 `json:"added_at,omitempty"` + // The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. + Region *Region `json:"region,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_ip_200_response_result_inner_pools_inner.go b/rest/api/v3/ip_address_management/model_list_ip_200_response_result_inner_pools_inner.go new file mode 100644 index 00000000..c16d1584 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_ip_200_response_result_inner_pools_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListIp200ResponseResultInnerPoolsInner struct for ListIp200ResponseResultInnerPoolsInner +type ListIp200ResponseResultInnerPoolsInner struct { + // The name of the IP Pool. + Name *string `json:"name,omitempty"` + // The unique ID of the IP Pool. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response.go b/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response.go new file mode 100644 index 00000000..9ba7de72 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListIpAssignedToIpPool200Response struct for ListIpAssignedToIpPool200Response +type ListIpAssignedToIpPool200Response struct { + Result *[]ListIpAssignedToIpPool200ResponseResultInner `json:"result,omitempty"` + Metadata *ListIpAssignedToIpPool200ResponseMetadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response__metadata.go b/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response__metadata.go new file mode 100644 index 00000000..4ba29e47 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response__metadata.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListIpAssignedToIpPool200ResponseMetadata struct for ListIpAssignedToIpPool200ResponseMetadata +type ListIpAssignedToIpPool200ResponseMetadata struct { + NextParams *ListIpAssignedToIpPool200ResponseMetadataNextParams `json:"next_params,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response__metadata_next_params.go b/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response__metadata_next_params.go new file mode 100644 index 00000000..2849251f --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response__metadata_next_params.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListIpAssignedToIpPool200ResponseMetadataNextParams A collection of fields that can be used to work the endpoint. +type ListIpAssignedToIpPool200ResponseMetadataNextParams struct { + // Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `after_key` cannot be used in combination with the `before_key` parameter. + AfterKey *string `json:"after_key,omitempty"` + // The `limit` specified in the request. This parameter will be included only if it was specified in the request. This is not the default limit enforced by the API. + Limit *string `json:"limit,omitempty"` + // Indicates whether or not to include the IP address's region. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. + IncludeRegion *string `json:"include_region,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response_result_inner.go b/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response_result_inner.go new file mode 100644 index 00000000..29a22c36 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response_result_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListIpAssignedToIpPool200ResponseResultInner struct for ListIpAssignedToIpPool200ResponseResultInner +type ListIpAssignedToIpPool200ResponseResultInner struct { + // An IP address assigned to the IP Pool. + Ip *string `json:"ip,omitempty"` + // The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. + Region *Region6 `json:"region,omitempty"` + // IP Pools the IP address is assigned to. + Pools *[]ListIp200ResponseResultInnerPoolsInner `json:"pools,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_ip_pool_200_response.go b/rest/api/v3/ip_address_management/model_list_ip_pool_200_response.go new file mode 100644 index 00000000..8e432462 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_ip_pool_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListIpPool200Response struct for ListIpPool200Response +type ListIpPool200Response struct { + Result *[]ListIpPool200ResponseResultInner `json:"result,omitempty"` + Metadata *ListIpPool200ResponseMetadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_ip_pool_200_response__metadata.go b/rest/api/v3/ip_address_management/model_list_ip_pool_200_response__metadata.go new file mode 100644 index 00000000..1d7363c6 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_ip_pool_200_response__metadata.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListIpPool200ResponseMetadata struct for ListIpPool200ResponseMetadata +type ListIpPool200ResponseMetadata struct { + NextParams *ListIpPool200ResponseMetadataNextParams `json:"next_params,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_ip_pool_200_response__metadata_next_params.go b/rest/api/v3/ip_address_management/model_list_ip_pool_200_response__metadata_next_params.go new file mode 100644 index 00000000..7b965b61 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_ip_pool_200_response__metadata_next_params.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListIpPool200ResponseMetadataNextParams A collection of fields that can be used to work the endpoint. +type ListIpPool200ResponseMetadataNextParams struct { + // Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `after_key` cannot be used in combination with the `before_key` parameter. + AfterKey *string `json:"after_key,omitempty"` + // The IP address specified in the request. This parameter will be returned only if it was specified in the request. + Ip *string `json:"ip,omitempty"` + // The `limit` specified in the request. This parameter will be included only if it was specified in the request. This is not the default limit enforced by the API. + Limit *string `json:"limit,omitempty"` + // The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. + Region *Region4 `json:"region,omitempty"` + // Indicates whether or not to include the IP address's region. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. + IncludeRegion *string `json:"include_region,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_ip_pool_200_response_result_inner.go b/rest/api/v3/ip_address_management/model_list_ip_pool_200_response_result_inner.go new file mode 100644 index 00000000..002e0453 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_ip_pool_200_response_result_inner.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListIpPool200ResponseResultInner struct for ListIpPool200ResponseResultInner +type ListIpPool200ResponseResultInner struct { + // The name of the IP Pool. + Name *string `json:"name,omitempty"` + // The unique ID of the IP Pool. + Id *string `json:"id,omitempty"` + // An array of the unique regions of all the IP addresses returned within the IP pool. + Regions *[]Items `json:"regions,omitempty"` + // A sample list of IP addresses associated with the IP Pool. The sample is limited to 10 results. + IpsPreview *[]string `json:"ips_preview,omitempty"` + // The total number of IP addresses in the IP Pool. An IP Pool can have a maximum of 100 associated IP addresses. + TotalIpCount *int32 `json:"total_ip_count,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response.go b/rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response.go new file mode 100644 index 00000000..90af39cf --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSubUserAssignedToIp200Response struct for ListSubUserAssignedToIp200Response +type ListSubUserAssignedToIp200Response struct { + // An array of Subuser IDs that have been assigned the specified IP address. + Result *[]string `json:"result,omitempty"` + Metadata *ListSubUserAssignedToIp200ResponseMetadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response__metadata.go b/rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response__metadata.go new file mode 100644 index 00000000..5b8c875a --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response__metadata.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSubUserAssignedToIp200ResponseMetadata struct for ListSubUserAssignedToIp200ResponseMetadata +type ListSubUserAssignedToIp200ResponseMetadata struct { + NextParams *ListSubUserAssignedToIp200ResponseMetadataNextParams `json:"next_params,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response__metadata_next_params.go b/rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response__metadata_next_params.go new file mode 100644 index 00000000..4f1dad9c --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response__metadata_next_params.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSubUserAssignedToIp200ResponseMetadataNextParams A collection of fields that can be used to work the endpoint. +type ListSubUserAssignedToIp200ResponseMetadataNextParams struct { + // Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `after_key` cannot be used in combination with the `before_key` parameter. + AfterKey *string `json:"after_key,omitempty"` + // The `limit` specified in the request. This parameter will be included only if it was specified in the request. This is not the default limit enforced by the API. + Limit *string `json:"limit,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_region.go b/rest/api/v3/ip_address_management/model_region.go new file mode 100644 index 00000000..5821628d --- /dev/null +++ b/rest/api/v3/ip_address_management/model_region.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Region the model 'Region' +type Region string + +// List of Region +const ( + REGION_EU Region = "eu" + REGION_US Region = "us" +) diff --git a/rest/api/v3/ip_address_management/model_region1.go b/rest/api/v3/ip_address_management/model_region1.go new file mode 100644 index 00000000..a6404f11 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_region1.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Region1 the model 'Region1' +type Region1 string + +// List of Region1 +const ( + REGION1_ALL Region1 = "all" + REGION1_US Region1 = "us" + REGION1_EU Region1 = "eu" +) diff --git a/rest/api/v3/ip_address_management/model_region2.go b/rest/api/v3/ip_address_management/model_region2.go new file mode 100644 index 00000000..ec82c157 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_region2.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Region2 the model 'Region2' +type Region2 string + +// List of Region2 +const ( + REGION2_EU Region2 = "eu" + REGION2_US Region2 = "us" +) diff --git a/rest/api/v3/ip_address_management/model_region3.go b/rest/api/v3/ip_address_management/model_region3.go new file mode 100644 index 00000000..ea2e6c10 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_region3.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Region3 the model 'Region3' +type Region3 string + +// List of Region3 +const ( + REGION3_EU Region3 = "eu" + REGION3_US Region3 = "us" +) diff --git a/rest/api/v3/ip_address_management/model_region4.go b/rest/api/v3/ip_address_management/model_region4.go new file mode 100644 index 00000000..9ccd77db --- /dev/null +++ b/rest/api/v3/ip_address_management/model_region4.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Region4 the model 'Region4' +type Region4 string + +// List of Region4 +const ( + REGION4_ALL Region4 = "all" + REGION4_US Region4 = "us" + REGION4_EU Region4 = "eu" +) diff --git a/rest/api/v3/ip_address_management/model_region5.go b/rest/api/v3/ip_address_management/model_region5.go new file mode 100644 index 00000000..888ec48e --- /dev/null +++ b/rest/api/v3/ip_address_management/model_region5.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Region5 the model 'Region5' +type Region5 string + +// List of Region5 +const ( + REGION5_US Region5 = "us" + REGION5_EU Region5 = "eu" +) diff --git a/rest/api/v3/ip_address_management/model_region6.go b/rest/api/v3/ip_address_management/model_region6.go new file mode 100644 index 00000000..df05d87e --- /dev/null +++ b/rest/api/v3/ip_address_management/model_region6.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Region6 the model 'Region6' +type Region6 string + +// List of Region6 +const ( + REGION6_EU Region6 = "eu" + REGION6_US Region6 = "us" +) diff --git a/rest/api/v3/ip_address_management/model_region7.go b/rest/api/v3/ip_address_management/model_region7.go new file mode 100644 index 00000000..e6136ec0 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_region7.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Region7 the model 'Region7' +type Region7 string + +// List of Region7 +const ( + REGION7_ALL Region7 = "all" + REGION7_EU Region7 = "eu" + REGION7_US Region7 = "us" +) diff --git a/rest/api/v3/ip_address_management/model_update_ip_200_response.go b/rest/api/v3/ip_address_management/model_update_ip_200_response.go new file mode 100644 index 00000000..de980353 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_update_ip_200_response.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateIp200Response struct for UpdateIp200Response +type UpdateIp200Response struct { + // The IP address that was updated. + Ip *string `json:"ip,omitempty"` + // Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). + IsAutoWarmup *bool `json:"is_auto_warmup,omitempty"` + // Indicates if a parent on the account is able to send email from the IP address. This parameter is returned only if the IP address is parent assigned. + IsParentAssigned *bool `json:"is_parent_assigned,omitempty"` + // An array of Subuser IDs the IP address was assigned to. This parameter is returned only if the IP address is enabled. + IsEnabled *bool `json:"is_enabled,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_update_ip_pool_200_response.go b/rest/api/v3/ip_address_management/model_update_ip_pool_200_response.go new file mode 100644 index 00000000..53bb550b --- /dev/null +++ b/rest/api/v3/ip_address_management/model_update_ip_pool_200_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateIpPool200Response struct for UpdateIpPool200Response +type UpdateIpPool200Response struct { + // The name assigned to the IP Pool. + Name *string `json:"name,omitempty"` + // The unique ID of the IP Pool. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_update_ip_pool_request.go b/rest/api/v3/ip_address_management/model_update_ip_pool_request.go new file mode 100644 index 00000000..28600e4e --- /dev/null +++ b/rest/api/v3/ip_address_management/model_update_ip_pool_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateIpPoolRequest struct for UpdateIpPoolRequest +type UpdateIpPoolRequest struct { + // The name to assign to the IP Pool. An IP Pool name cannot begin with a space or period. + Name string `json:"name"` +} diff --git a/rest/api/v3/ip_address_management/model_update_ip_request.go b/rest/api/v3/ip_address_management/model_update_ip_request.go new file mode 100644 index 00000000..1d627eb2 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_update_ip_request.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateIpRequest struct for UpdateIpRequest +type UpdateIpRequest struct { + // Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). + IsAutoWarmup *bool `json:"is_auto_warmup,omitempty"` + // Indicates if a parent on the account is able to send email from the IP address. + IsParentAssigned *bool `json:"is_parent_assigned,omitempty"` + // Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. + IsEnabled *bool `json:"is_enabled,omitempty"` +} diff --git a/rest/api/v3/ip_warmup/.openapi-generator b/rest/api/v3/ip_warmup/.openapi-generator new file mode 100644 index 00000000..58aa6542 --- /dev/null +++ b/rest/api/v3/ip_warmup/.openapi-generator @@ -0,0 +1,28 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_get_warm_up_ip.go +api_list_warm_up_ip.go +api_service.go +api_stop_ip_warm_up.go +api_warm_up_ip.go +docs/GetWarmUpIp.md +docs/GetWarmUpIp404Response.md +docs/GetWarmUpIp404ResponseErrorsInner.md +docs/IpWarmup200Inner.md +docs/ListWarmUpIp.md +docs/StopIpWarmUp.md +docs/StopIpWarmUp404Response.md +docs/StopIpWarmUp404ResponseErrorsInner.md +docs/WarmUpIp.md +docs/WarmUpIp404Response.md +docs/WarmUpIp404ResponseErrorsInner.md +docs/WarmUpIpRequest.md +model_get_warm_up_ip_404_response.go +model_get_warm_up_ip_404_response_errors_inner.go +model_ip_warmup200_inner.go +model_stop_ip_warm_up_404_response.go +model_stop_ip_warm_up_404_response_errors_inner.go +model_warm_up_ip_404_response.go +model_warm_up_ip_404_response_errors_inner.go +model_warm_up_ip_request.go diff --git a/rest/api/v3/ip_warmup/.openapi-generator-ignore b/rest/api/v3/ip_warmup/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/ip_warmup/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/ip_warmup/README.md b/rest/api/v3/ip_warmup/README.md new file mode 100644 index 00000000..879bf54d --- /dev/null +++ b/rest/api/v3/ip_warmup/README.md @@ -0,0 +1,76 @@ +# Go API client for + +The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. + +SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. + +See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. + +You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:43.513778+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*GetWarmUpIp* | [**GetWarmUpIp**](docs/GetWarmUpIp.md#getwarmupip) | **Get** /v3/ips/warmup/{IpAddress} | Retrieve the warmup status for a specific IP address +*ListWarmUpIp* | [**ListWarmUpIp**](docs/ListWarmUpIp.md#listwarmupip) | **Get** /v3/ips/warmup | Retrieve all IPs currently in warmup +*StopIpWarmUp* | [**StopIpWarmUp**](docs/StopIpWarmUp.md#stopipwarmup) | **Delete** /v3/ips/warmup/{IpAddress} | Stop warming up an IP address +*WarmUpIp* | [**WarmUpIp**](docs/WarmUpIp.md#warmupip) | **Post** /v3/ips/warmup | Start warming up an IP address + + +## Documentation For Models + + - [GetWarmUpIp404Response](GetWarmUpIp404Response.md) + - [GetWarmUpIp404ResponseErrorsInner](GetWarmUpIp404ResponseErrorsInner.md) + - [IpWarmup200Inner](IpWarmup200Inner.md) + - [StopIpWarmUp404Response](StopIpWarmUp404Response.md) + - [StopIpWarmUp404ResponseErrorsInner](StopIpWarmUp404ResponseErrorsInner.md) + - [WarmUpIp404Response](WarmUpIp404Response.md) + - [WarmUpIp404ResponseErrorsInner](WarmUpIp404ResponseErrorsInner.md) + - [WarmUpIpRequest](WarmUpIpRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/ip_warmup/api_get_warm_up_ip.go b/rest/api/v3/ip_warmup/api_get_warm_up_ip.go new file mode 100644 index 00000000..a8a66b37 --- /dev/null +++ b/rest/api/v3/ip_warmup/api_get_warm_up_ip.go @@ -0,0 +1,68 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Warmup API +* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type GetWarmUpIpParam struct { + // The IP address that you want to retrieve the warmup status for. + IpAddress *string `json:"ip_address"` +} + +func (params *GetWarmUpIpParam) SetIpAddress(IpAddress string) *GetWarmUpIpParam { + params.IpAddress = &IpAddress + return params +} + +// **This endpoint allows you to retrieve the warmup status for a specific IP address.** You can retrieve all of your warming IPs using the \"Retrieve all IPs currently in warmup\" endpoint. +func (c *ApiService) GetWarmUpIp(params *GetWarmUpIpParam) (interface{}, error) { + path := "/v3/ips/warmup/{IpAddress}" + if params != nil && params.IpAddress != nil { + path = strings.Replace(path, "{"+"IpAddress"+"}", *params.IpAddress, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]IpWarmup200Inner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &GetWarmUpIp404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ip_warmup/api_list_warm_up_ip.go b/rest/api/v3/ip_warmup/api_list_warm_up_ip.go new file mode 100644 index 00000000..43a096d9 --- /dev/null +++ b/rest/api/v3/ip_warmup/api_list_warm_up_ip.go @@ -0,0 +1,48 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Warmup API +* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListWarmUpIpParam struct { +} + +// **This endpoint allows you to retrieve all of your IP addresses that are currently warming up.** +func (c *ApiService) ListWarmUpIp() (interface{}, error) { + path := "/v3/ips/warmup" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]IpWarmup200Inner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ip_warmup/api_service.go b/rest/api/v3/ip_warmup/api_service.go new file mode 100644 index 00000000..53f0581d --- /dev/null +++ b/rest/api/v3/ip_warmup/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Warmup API +* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/ip_warmup/api_stop_ip_warm_up.go b/rest/api/v3/ip_warmup/api_stop_ip_warm_up.go new file mode 100644 index 00000000..dc086167 --- /dev/null +++ b/rest/api/v3/ip_warmup/api_stop_ip_warm_up.go @@ -0,0 +1,68 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Warmup API +* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type StopIpWarmUpParam struct { + // The IP address that you want to retrieve the warmup status for. + IpAddress *string `json:"ip_address"` +} + +func (params *StopIpWarmUpParam) SetIpAddress(IpAddress string) *StopIpWarmUpParam { + params.IpAddress = &IpAddress + return params +} + +// **This endpoint allows you to remove an IP address from warmup mode.** Your request will return a 204 status code if the specified IP was successfully removed from warmup mode. To retrieve details of the IP’s warmup status *before* removing it from warmup mode, call the \"Retrieve the warmpup status for a specific IP address\" endpoint. +func (c *ApiService) StopIpWarmUp(params *StopIpWarmUpParam) (interface{}, error) { + path := "/v3/ips/warmup/{IpAddress}" + if params != nil && params.IpAddress != nil { + path = strings.Replace(path, "{"+"IpAddress"+"}", *params.IpAddress, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &StopIpWarmUp404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ip_warmup/api_warm_up_ip.go b/rest/api/v3/ip_warmup/api_warm_up_ip.go new file mode 100644 index 00000000..5348c525 --- /dev/null +++ b/rest/api/v3/ip_warmup/api_warm_up_ip.go @@ -0,0 +1,72 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Warmup API +* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type WarmUpIpParam struct { + // + WarmUpIpRequest *WarmUpIpRequest `json:"WarmUpIpRequest,omitempty"` +} + +func (params *WarmUpIpParam) SetWarmUpIpRequest(WarmUpIpRequest WarmUpIpRequest) *WarmUpIpParam { + params.WarmUpIpRequest = &WarmUpIpRequest + return params +} + +// **This endpoint allows you to put an IP address into warmup mode.** +func (c *ApiService) WarmUpIp(params *WarmUpIpParam) (interface{}, error) { + path := "/v3/ips/warmup" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.WarmUpIpRequest != nil { + b, err := json.Marshal(*params.WarmUpIpRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]IpWarmup200Inner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &WarmUpIp404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ip_warmup/docs/GetWarmUpIp.md b/rest/api/v3/ip_warmup/docs/GetWarmUpIp.md new file mode 100644 index 00000000..0339c3f5 --- /dev/null +++ b/rest/api/v3/ip_warmup/docs/GetWarmUpIp.md @@ -0,0 +1,51 @@ +# GetWarmUpIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetWarmUpIp**](GetWarmUpIp.md#GetWarmUpIp) | **Get** /v3/ips/warmup/{IpAddress} | Retrieve the warmup status for a specific IP address + + + +## GetWarmUpIp + +> []IpWarmup200Inner GetWarmUpIp(ctx, IpAddress) + +Retrieve the warmup status for a specific IP address + +**This endpoint allows you to retrieve the warmup status for a specific IP address.** You can retrieve all of your warming IPs using the \"Retrieve all IPs currently in warmup\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**IpAddress** | **string** | The IP address that you want to retrieve the warmup status for. + +### Other Parameters + +Other parameters are passed through a pointer to a GetWarmUpIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**[]IpWarmup200Inner**](IpWarmup200Inner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_warmup/docs/GetWarmUpIp404Response.md b/rest/api/v3/ip_warmup/docs/GetWarmUpIp404Response.md new file mode 100644 index 00000000..9126d1b7 --- /dev/null +++ b/rest/api/v3/ip_warmup/docs/GetWarmUpIp404Response.md @@ -0,0 +1,11 @@ +# GetWarmUpIp404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]GetWarmUpIp404ResponseErrorsInner**](GetWarmUpIp404ResponseErrorsInner.md) | The errors that were encountered. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_warmup/docs/GetWarmUpIp404ResponseErrorsInner.md b/rest/api/v3/ip_warmup/docs/GetWarmUpIp404ResponseErrorsInner.md new file mode 100644 index 00000000..64076c11 --- /dev/null +++ b/rest/api/v3/ip_warmup/docs/GetWarmUpIp404ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# GetWarmUpIp404ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | |[optional] +**Message** | **string** | A message explaining why the warmup status could not be retrieved. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_warmup/docs/IpWarmup200Inner.md b/rest/api/v3/ip_warmup/docs/IpWarmup200Inner.md new file mode 100644 index 00000000..7a2a6aa0 --- /dev/null +++ b/rest/api/v3/ip_warmup/docs/IpWarmup200Inner.md @@ -0,0 +1,12 @@ +# IpWarmup200Inner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | The IP address. | +**StartDate** | **int32** | A Unix timestamp indicating when the IP address entered warmup mode. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_warmup/docs/ListWarmUpIp.md b/rest/api/v3/ip_warmup/docs/ListWarmUpIp.md new file mode 100644 index 00000000..5944ebf3 --- /dev/null +++ b/rest/api/v3/ip_warmup/docs/ListWarmUpIp.md @@ -0,0 +1,44 @@ +# ListWarmUpIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListWarmUpIp**](ListWarmUpIp.md#ListWarmUpIp) | **Get** /v3/ips/warmup | Retrieve all IPs currently in warmup + + + +## ListWarmUpIp + +> []IpWarmup200Inner ListWarmUpIp(ctx, ) + +Retrieve all IPs currently in warmup + +**This endpoint allows you to retrieve all of your IP addresses that are currently warming up.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListWarmUpIpParams struct + + +### Return type + +[**[]IpWarmup200Inner**](IpWarmup200Inner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_warmup/docs/StopIpWarmUp.md b/rest/api/v3/ip_warmup/docs/StopIpWarmUp.md new file mode 100644 index 00000000..e8b5e45b --- /dev/null +++ b/rest/api/v3/ip_warmup/docs/StopIpWarmUp.md @@ -0,0 +1,51 @@ +# StopIpWarmUp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**StopIpWarmUp**](StopIpWarmUp.md#StopIpWarmUp) | **Delete** /v3/ips/warmup/{IpAddress} | Stop warming up an IP address + + + +## StopIpWarmUp + +> map[string]interface{} StopIpWarmUp(ctx, IpAddress) + +Stop warming up an IP address + +**This endpoint allows you to remove an IP address from warmup mode.** Your request will return a 204 status code if the specified IP was successfully removed from warmup mode. To retrieve details of the IP’s warmup status *before* removing it from warmup mode, call the \"Retrieve the warmpup status for a specific IP address\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**IpAddress** | **string** | The IP address that you want to retrieve the warmup status for. + +### Other Parameters + +Other parameters are passed through a pointer to a StopIpWarmUpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_warmup/docs/StopIpWarmUp404Response.md b/rest/api/v3/ip_warmup/docs/StopIpWarmUp404Response.md new file mode 100644 index 00000000..2d45e893 --- /dev/null +++ b/rest/api/v3/ip_warmup/docs/StopIpWarmUp404Response.md @@ -0,0 +1,11 @@ +# StopIpWarmUp404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]StopIpWarmUp404ResponseErrorsInner**](StopIpWarmUp404ResponseErrorsInner.md) | The errors that were encountered. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_warmup/docs/StopIpWarmUp404ResponseErrorsInner.md b/rest/api/v3/ip_warmup/docs/StopIpWarmUp404ResponseErrorsInner.md new file mode 100644 index 00000000..e3f1a0e8 --- /dev/null +++ b/rest/api/v3/ip_warmup/docs/StopIpWarmUp404ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# StopIpWarmUp404ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | |[optional] +**Message** | **string** | A message explaining why the IP couldn't be removed from warmup. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_warmup/docs/WarmUpIp.md b/rest/api/v3/ip_warmup/docs/WarmUpIp.md new file mode 100644 index 00000000..336117c8 --- /dev/null +++ b/rest/api/v3/ip_warmup/docs/WarmUpIp.md @@ -0,0 +1,48 @@ +# WarmUpIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**WarmUpIp**](WarmUpIp.md#WarmUpIp) | **Post** /v3/ips/warmup | Start warming up an IP address + + + +## WarmUpIp + +> []IpWarmup200Inner WarmUpIp(ctx, optional) + +Start warming up an IP address + +**This endpoint allows you to put an IP address into warmup mode.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a WarmUpIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**WarmUpIpRequest** | [**WarmUpIpRequest**](WarmUpIpRequest.md) | + +### Return type + +[**[]IpWarmup200Inner**](IpWarmup200Inner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_warmup/docs/WarmUpIp404Response.md b/rest/api/v3/ip_warmup/docs/WarmUpIp404Response.md new file mode 100644 index 00000000..7c3164cf --- /dev/null +++ b/rest/api/v3/ip_warmup/docs/WarmUpIp404Response.md @@ -0,0 +1,11 @@ +# WarmUpIp404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]WarmUpIp404ResponseErrorsInner**](WarmUpIp404ResponseErrorsInner.md) | The errors that were encountered. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_warmup/docs/WarmUpIp404ResponseErrorsInner.md b/rest/api/v3/ip_warmup/docs/WarmUpIp404ResponseErrorsInner.md new file mode 100644 index 00000000..82a7d9bc --- /dev/null +++ b/rest/api/v3/ip_warmup/docs/WarmUpIp404ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# WarmUpIp404ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | |[optional] +**Message** | **string** | A message explaining why the IP couldn't entered into warmup mode. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_warmup/docs/WarmUpIpRequest.md b/rest/api/v3/ip_warmup/docs/WarmUpIpRequest.md new file mode 100644 index 00000000..c929749a --- /dev/null +++ b/rest/api/v3/ip_warmup/docs/WarmUpIpRequest.md @@ -0,0 +1,11 @@ +# WarmUpIpRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | The IP address that you want to begin warming up. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_warmup/model_get_warm_up_ip_404_response.go b/rest/api/v3/ip_warmup/model_get_warm_up_ip_404_response.go new file mode 100644 index 00000000..f61bd268 --- /dev/null +++ b/rest/api/v3/ip_warmup/model_get_warm_up_ip_404_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Warmup API +* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetWarmUpIp404Response struct for GetWarmUpIp404Response +type GetWarmUpIp404Response struct { + // The errors that were encountered. + Errors *[]GetWarmUpIp404ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/ip_warmup/model_get_warm_up_ip_404_response_errors_inner.go b/rest/api/v3/ip_warmup/model_get_warm_up_ip_404_response_errors_inner.go new file mode 100644 index 00000000..a8376a66 --- /dev/null +++ b/rest/api/v3/ip_warmup/model_get_warm_up_ip_404_response_errors_inner.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Warmup API +* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetWarmUpIp404ResponseErrorsInner struct for GetWarmUpIp404ResponseErrorsInner +type GetWarmUpIp404ResponseErrorsInner struct { + Field *string `json:"field,omitempty"` + // A message explaining why the warmup status could not be retrieved. + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/ip_warmup/model_ip_warmup200_inner.go b/rest/api/v3/ip_warmup/model_ip_warmup200_inner.go new file mode 100644 index 00000000..f25f10fe --- /dev/null +++ b/rest/api/v3/ip_warmup/model_ip_warmup200_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Warmup API +* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IpWarmup200Inner struct for IpWarmup200Inner +type IpWarmup200Inner struct { + // The IP address. + Ip string `json:"ip"` + // A Unix timestamp indicating when the IP address entered warmup mode. + StartDate int32 `json:"start_date"` +} diff --git a/rest/api/v3/ip_warmup/model_stop_ip_warm_up_404_response.go b/rest/api/v3/ip_warmup/model_stop_ip_warm_up_404_response.go new file mode 100644 index 00000000..040be57a --- /dev/null +++ b/rest/api/v3/ip_warmup/model_stop_ip_warm_up_404_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Warmup API +* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// StopIpWarmUp404Response struct for StopIpWarmUp404Response +type StopIpWarmUp404Response struct { + // The errors that were encountered. + Errors *[]StopIpWarmUp404ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/ip_warmup/model_stop_ip_warm_up_404_response_errors_inner.go b/rest/api/v3/ip_warmup/model_stop_ip_warm_up_404_response_errors_inner.go new file mode 100644 index 00000000..050ce700 --- /dev/null +++ b/rest/api/v3/ip_warmup/model_stop_ip_warm_up_404_response_errors_inner.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Warmup API +* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// StopIpWarmUp404ResponseErrorsInner struct for StopIpWarmUp404ResponseErrorsInner +type StopIpWarmUp404ResponseErrorsInner struct { + Field *string `json:"field,omitempty"` + // A message explaining why the IP couldn't be removed from warmup. + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/ip_warmup/model_warm_up_ip_404_response.go b/rest/api/v3/ip_warmup/model_warm_up_ip_404_response.go new file mode 100644 index 00000000..64719fc9 --- /dev/null +++ b/rest/api/v3/ip_warmup/model_warm_up_ip_404_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Warmup API +* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// WarmUpIp404Response struct for WarmUpIp404Response +type WarmUpIp404Response struct { + // The errors that were encountered. + Errors *[]WarmUpIp404ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/ip_warmup/model_warm_up_ip_404_response_errors_inner.go b/rest/api/v3/ip_warmup/model_warm_up_ip_404_response_errors_inner.go new file mode 100644 index 00000000..745260ae --- /dev/null +++ b/rest/api/v3/ip_warmup/model_warm_up_ip_404_response_errors_inner.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Warmup API +* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// WarmUpIp404ResponseErrorsInner struct for WarmUpIp404ResponseErrorsInner +type WarmUpIp404ResponseErrorsInner struct { + Field *string `json:"field,omitempty"` + // A message explaining why the IP couldn't entered into warmup mode. + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/ip_warmup/model_warm_up_ip_request.go b/rest/api/v3/ip_warmup/model_warm_up_ip_request.go new file mode 100644 index 00000000..ac2c2bf4 --- /dev/null +++ b/rest/api/v3/ip_warmup/model_warm_up_ip_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Warmup API +* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// WarmUpIpRequest struct for WarmUpIpRequest +type WarmUpIpRequest struct { + // The IP address that you want to begin warming up. + Ip *string `json:"ip,omitempty"` +} diff --git a/rest/api/v3/ips/.openapi-generator b/rest/api/v3/ips/.openapi-generator new file mode 100644 index 00000000..a1797269 --- /dev/null +++ b/rest/api/v3/ips/.openapi-generator @@ -0,0 +1,78 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_add_ip.go +api_add_ip_to_ip_pool.go +api_create_ip_pool.go +api_delete_ip_from_ip_pool.go +api_delete_ip_pool.go +api_get_ip.go +api_get_ip_pool.go +api_list_assigned_ip.go +api_list_ip.go +api_list_ip_pool.go +api_list_remaining_ip_count.go +api_service.go +api_update_ip_pool.go +docs/AddIp.md +docs/AddIp201Response.md +docs/AddIp201ResponseIpsInner.md +docs/AddIpRequest.md +docs/AddIpToIpPool.md +docs/AddIpToIpPool201Response.md +docs/AddIpToIpPool404Response.md +docs/AddIpToIpPool404ResponseErrorsInner.md +docs/AddIpToIpPoolRequest.md +docs/CreateIpPool.md +docs/CreateIpPoolRequest.md +docs/DeleteIpFromIpPool.md +docs/DeleteIpFromIpPool404Response.md +docs/DeleteIpPool.md +docs/DeleteIpPool404Response.md +docs/ErrorResponse.md +docs/ErrorResponseErrorsInner.md +docs/GetIp.md +docs/GetIp200Response.md +docs/GetIpPool.md +docs/GetIpPool200Response.md +docs/GetIpPool404Response.md +docs/GetIpPool404ResponseErrorsInner.md +docs/IpPools200.md +docs/ListAssignedIp.md +docs/ListAssignedIp200ResponseInner.md +docs/ListIp.md +docs/ListIp200ResponseInner.md +docs/ListIpPool.md +docs/ListRemainingIpCount.md +docs/ListRemainingIpCount200Response.md +docs/ListRemainingIpCount200ResponseResultsInner.md +docs/SortByDirection.md +docs/UpdateIpPool.md +docs/UpdateIpPool404Response.md +docs/UpdateIpPool404ResponseErrorsInner.md +docs/UpdateIpPoolRequest.md +model_add_ip_201_response.go +model_add_ip_201_response_ips_inner.go +model_add_ip_request.go +model_add_ip_to_ip_pool_201_response.go +model_add_ip_to_ip_pool_404_response.go +model_add_ip_to_ip_pool_404_response_errors_inner.go +model_add_ip_to_ip_pool_request.go +model_create_ip_pool_request.go +model_delete_ip_from_ip_pool_404_response.go +model_delete_ip_pool_404_response.go +model_error_response.go +model_error_response_errors_inner.go +model_get_ip_200_response.go +model_get_ip_pool_200_response.go +model_get_ip_pool_404_response.go +model_get_ip_pool_404_response_errors_inner.go +model_ip_pools200.go +model_list_assigned_ip_200_response_inner.go +model_list_ip_200_response_inner.go +model_list_remaining_ip_count_200_response.go +model_list_remaining_ip_count_200_response_results_inner.go +model_sort_by_direction.go +model_update_ip_pool_404_response.go +model_update_ip_pool_404_response_errors_inner.go +model_update_ip_pool_request.go diff --git a/rest/api/v3/ips/.openapi-generator-ignore b/rest/api/v3/ips/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/ips/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/ips/README.md b/rest/api/v3/ips/README.md new file mode 100644 index 00000000..6d950aac --- /dev/null +++ b/rest/api/v3/ips/README.md @@ -0,0 +1,95 @@ +# Go API client for + +The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:43.525925+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AddIp* | [**AddIp**](docs/AddIp.md#addip) | **Post** /v3/ips | Add IPs +*AddIpToIpPool* | [**AddIpToIpPool**](docs/AddIpToIpPool.md#addiptoippool) | **Post** /v3/ips/pools/{PoolName}/ips | Add an IP address to a pool +*CreateIpPool* | [**CreateIpPool**](docs/CreateIpPool.md#createippool) | **Post** /v3/ips/pools | Create an IP pool +*DeleteIpFromIpPool* | [**DeleteIpFromIpPool**](docs/DeleteIpFromIpPool.md#deleteipfromippool) | **Delete** /v3/ips/pools/{PoolName}/ips/{Ip} | Remove an IP address from a pool +*DeleteIpPool* | [**DeleteIpPool**](docs/DeleteIpPool.md#deleteippool) | **Delete** /v3/ips/pools/{PoolName} | Delete an IP pool +*GetIp* | [**GetIp**](docs/GetIp.md#getip) | **Get** /v3/ips/{IpAddress} | Retrieve all IP pools an IP address belongs to +*GetIpPool* | [**GetIpPool**](docs/GetIpPool.md#getippool) | **Get** /v3/ips/pools/{PoolName} | Retrieve all the IPs in a specified pool +*ListAssignedIp* | [**ListAssignedIp**](docs/ListAssignedIp.md#listassignedip) | **Get** /v3/ips/assigned | Retrieve all assigned IPs +*ListIp* | [**ListIp**](docs/ListIp.md#listip) | **Get** /v3/ips | Retrieve all IP addresses +*ListIpPool* | [**ListIpPool**](docs/ListIpPool.md#listippool) | **Get** /v3/ips/pools | Retrieve all IP pools +*ListRemainingIpCount* | [**ListRemainingIpCount**](docs/ListRemainingIpCount.md#listremainingipcount) | **Get** /v3/ips/remaining | Get remaining IPs count +*UpdateIpPool* | [**UpdateIpPool**](docs/UpdateIpPool.md#updateippool) | **Put** /v3/ips/pools/{PoolName} | Rename an IP pool + + +## Documentation For Models + + - [AddIp201Response](AddIp201Response.md) + - [AddIp201ResponseIpsInner](AddIp201ResponseIpsInner.md) + - [AddIpRequest](AddIpRequest.md) + - [AddIpToIpPool201Response](AddIpToIpPool201Response.md) + - [AddIpToIpPool404Response](AddIpToIpPool404Response.md) + - [AddIpToIpPool404ResponseErrorsInner](AddIpToIpPool404ResponseErrorsInner.md) + - [AddIpToIpPoolRequest](AddIpToIpPoolRequest.md) + - [CreateIpPoolRequest](CreateIpPoolRequest.md) + - [DeleteIpFromIpPool404Response](DeleteIpFromIpPool404Response.md) + - [DeleteIpPool404Response](DeleteIpPool404Response.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [GetIp200Response](GetIp200Response.md) + - [GetIpPool200Response](GetIpPool200Response.md) + - [GetIpPool404Response](GetIpPool404Response.md) + - [GetIpPool404ResponseErrorsInner](GetIpPool404ResponseErrorsInner.md) + - [IpPools200](IpPools200.md) + - [ListAssignedIp200ResponseInner](ListAssignedIp200ResponseInner.md) + - [ListIp200ResponseInner](ListIp200ResponseInner.md) + - [ListRemainingIpCount200Response](ListRemainingIpCount200Response.md) + - [ListRemainingIpCount200ResponseResultsInner](ListRemainingIpCount200ResponseResultsInner.md) + - [SortByDirection](SortByDirection.md) + - [UpdateIpPool404Response](UpdateIpPool404Response.md) + - [UpdateIpPool404ResponseErrorsInner](UpdateIpPool404ResponseErrorsInner.md) + - [UpdateIpPoolRequest](UpdateIpPoolRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/ips/api_add_ip.go b/rest/api/v3/ips/api_add_ip.go new file mode 100644 index 00000000..b9da2f59 --- /dev/null +++ b/rest/api/v3/ips/api_add_ip.go @@ -0,0 +1,72 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type AddIpParam struct { + // + AddIpRequest *AddIpRequest `json:"AddIpRequest,omitempty"` +} + +func (params *AddIpParam) SetAddIpRequest(AddIpRequest AddIpRequest) *AddIpParam { + params.AddIpRequest = &AddIpRequest + return params +} + +// **This endpoint is for adding a(n) IP Address(es) to your account.** +func (c *ApiService) AddIp(params *AddIpParam) (interface{}, error) { + path := "/v3/ips" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.AddIpRequest != nil { + b, err := json.Marshal(*params.AddIpRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &AddIp201Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ips/api_add_ip_to_ip_pool.go b/rest/api/v3/ips/api_add_ip_to_ip_pool.go new file mode 100644 index 00000000..80609038 --- /dev/null +++ b/rest/api/v3/ips/api_add_ip_to_ip_pool.go @@ -0,0 +1,83 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type AddIpToIpPoolParam struct { + // The name of the IP pool you want to add the address to. If the name contains spaces, they must be URL encoded (e.g., \"Test Pool\" becomes \"Test%20Pool\"). + PoolName *string `json:"pool_name"` + // + AddIpToIpPoolRequest *AddIpToIpPoolRequest `json:"AddIpToIpPoolRequest,omitempty"` +} + +func (params *AddIpToIpPoolParam) SetPoolName(PoolName string) *AddIpToIpPoolParam { + params.PoolName = &PoolName + return params +} +func (params *AddIpToIpPoolParam) SetAddIpToIpPoolRequest(AddIpToIpPoolRequest AddIpToIpPoolRequest) *AddIpToIpPoolParam { + params.AddIpToIpPoolRequest = &AddIpToIpPoolRequest + return params +} + +// **This endpoint allows you to add an IP address to an IP pool.** You can add the same IP address to multiple pools. It may take up to 60 seconds for your IP address to be added to a pool after your request is made. Before you can add an IP to a pool, you need to activate it in your SendGrid account: 1. Log into your SendGrid account. 1. Navigate to **Settings** and then select **IP Addresses**. 1. Find the IP address you want to activate and then click **Edit**. 1. Check **Allow my account to send mail using this IP address**. 1. Click **Save**. You can retrieve all of your available IP addresses from the \"Retrieve all IP addresses\" endpoint. +func (c *ApiService) AddIpToIpPool(params *AddIpToIpPoolParam) (interface{}, error) { + path := "/v3/ips/pools/{PoolName}/ips" + if params != nil && params.PoolName != nil { + path = strings.Replace(path, "{"+"PoolName"+"}", *params.PoolName, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.AddIpToIpPoolRequest != nil { + b, err := json.Marshal(*params.AddIpToIpPoolRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &AddIpToIpPool201Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &AddIpToIpPool404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ips/api_create_ip_pool.go b/rest/api/v3/ips/api_create_ip_pool.go new file mode 100644 index 00000000..527612c4 --- /dev/null +++ b/rest/api/v3/ips/api_create_ip_pool.go @@ -0,0 +1,64 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type CreateIpPoolParam struct { + // + CreateIpPoolRequest *CreateIpPoolRequest `json:"CreateIpPoolRequest,omitempty"` +} + +func (params *CreateIpPoolParam) SetCreateIpPoolRequest(CreateIpPoolRequest CreateIpPoolRequest) *CreateIpPoolParam { + params.CreateIpPoolRequest = &CreateIpPoolRequest + return params +} + +// **This endpoint allows you to create an IP pool.** Before you can create an IP pool, you need to activate the IP in your SendGrid account: 1. Log into your SendGrid account. 1. Navigate to **Settings** and then select **IP Addresses**. 1. Find the IP address you want to activate and then click **Edit**. 1. Check **Allow my account to send mail using this IP address**. 1. Click **Save**. +func (c *ApiService) CreateIpPool(params *CreateIpPoolParam) (interface{}, error) { + path := "/v3/ips/pools" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateIpPoolRequest != nil { + b, err := json.Marshal(*params.CreateIpPoolRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &IpPools200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ips/api_delete_ip_from_ip_pool.go b/rest/api/v3/ips/api_delete_ip_from_ip_pool.go new file mode 100644 index 00000000..87376334 --- /dev/null +++ b/rest/api/v3/ips/api_delete_ip_from_ip_pool.go @@ -0,0 +1,77 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DeleteIpFromIpPoolParam struct { + // The name of the IP pool that you are removing the IP address from. + PoolName *string `json:"pool_name"` + // The IP address that you wish to remove. + Ip *string `json:"ip"` +} + +func (params *DeleteIpFromIpPoolParam) SetPoolName(PoolName string) *DeleteIpFromIpPoolParam { + params.PoolName = &PoolName + return params +} +func (params *DeleteIpFromIpPoolParam) SetIp(Ip string) *DeleteIpFromIpPoolParam { + params.Ip = &Ip + return params +} + +// **This endpoint allows you to remove an IP address from an IP pool.** +func (c *ApiService) DeleteIpFromIpPool(params *DeleteIpFromIpPoolParam) (interface{}, error) { + path := "/v3/ips/pools/{PoolName}/ips/{Ip}" + if params != nil && params.PoolName != nil { + path = strings.Replace(path, "{"+"PoolName"+"}", *params.PoolName, -1) + } + if params != nil && params.Ip != nil { + path = strings.Replace(path, "{"+"Ip"+"}", *params.Ip, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &DeleteIpFromIpPool404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ips/api_delete_ip_pool.go b/rest/api/v3/ips/api_delete_ip_pool.go new file mode 100644 index 00000000..d72c63be --- /dev/null +++ b/rest/api/v3/ips/api_delete_ip_pool.go @@ -0,0 +1,68 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DeleteIpPoolParam struct { + // The name of the IP pool that you want to retrieve the IP addresses for. + PoolName *string `json:"pool_name"` +} + +func (params *DeleteIpPoolParam) SetPoolName(PoolName string) *DeleteIpPoolParam { + params.PoolName = &PoolName + return params +} + +// **This endpoint allows you to delete an IP pool.** +func (c *ApiService) DeleteIpPool(params *DeleteIpPoolParam) (interface{}, error) { + path := "/v3/ips/pools/{PoolName}" + if params != nil && params.PoolName != nil { + path = strings.Replace(path, "{"+"PoolName"+"}", *params.PoolName, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &DeleteIpPool404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ips/api_get_ip.go b/rest/api/v3/ips/api_get_ip.go new file mode 100644 index 00000000..91adac52 --- /dev/null +++ b/rest/api/v3/ips/api_get_ip.go @@ -0,0 +1,60 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type GetIpParam struct { + // The IP address you are retrieving the IP pools for. + IpAddress *string `json:"ip_address"` +} + +func (params *GetIpParam) SetIpAddress(IpAddress string) *GetIpParam { + params.IpAddress = &IpAddress + return params +} + +// **This endpoint allows you to see which IP pools a particular IP address has been added to.** The same IP address can be added to multiple IP pools. A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is based on the aggregate performance of all the senders who use it. +func (c *ApiService) GetIp(params *GetIpParam) (interface{}, error) { + path := "/v3/ips/{IpAddress}" + if params != nil && params.IpAddress != nil { + path = strings.Replace(path, "{"+"IpAddress"+"}", *params.IpAddress, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetIp200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ips/api_get_ip_pool.go b/rest/api/v3/ips/api_get_ip_pool.go new file mode 100644 index 00000000..75806195 --- /dev/null +++ b/rest/api/v3/ips/api_get_ip_pool.go @@ -0,0 +1,68 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type GetIpPoolParam struct { + // The name of the IP pool that you want to retrieve the IP addresses for. + PoolName *string `json:"pool_name"` +} + +func (params *GetIpPoolParam) SetPoolName(PoolName string) *GetIpPoolParam { + params.PoolName = &PoolName + return params +} + +// **This endpoint allows you to get all of the IP addresses that are in a specific IP pool.** +func (c *ApiService) GetIpPool(params *GetIpPoolParam) (interface{}, error) { + path := "/v3/ips/pools/{PoolName}" + if params != nil && params.PoolName != nil { + path = strings.Replace(path, "{"+"PoolName"+"}", *params.PoolName, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetIpPool200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &GetIpPool404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ips/api_list_assigned_ip.go b/rest/api/v3/ips/api_list_assigned_ip.go new file mode 100644 index 00000000..1d031d00 --- /dev/null +++ b/rest/api/v3/ips/api_list_assigned_ip.go @@ -0,0 +1,48 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListAssignedIpParam struct { +} + +// **This endpoint allows you to retrieve only assigned IP addresses.** A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is based on the aggregate performance of all the senders who use it. +func (c *ApiService) ListAssignedIp() (interface{}, error) { + path := "/v3/ips/assigned" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListAssignedIp200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ips/api_list_ip.go b/rest/api/v3/ips/api_list_ip.go new file mode 100644 index 00000000..28ba0487 --- /dev/null +++ b/rest/api/v3/ips/api_list_ip.go @@ -0,0 +1,105 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListIpParam struct { + // The IP address to get + Ip *string `json:"ip,omitempty"` + // Should we exclude reverse DNS records (whitelabels)? + ExcludeWhitelabels *bool `json:"exclude_whitelabels,omitempty"` + // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. + Limit *int32 `json:"limit,omitempty"` + // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + Offset *int32 `json:"offset,omitempty"` + // The subuser you are requesting for. + Subuser *string `json:"subuser,omitempty"` + // The direction to sort the results. + SortByDirection *SortByDirection `json:"sort_by_direction,omitempty"` +} + +func (params *ListIpParam) SetIp(Ip string) *ListIpParam { + params.Ip = &Ip + return params +} +func (params *ListIpParam) SetExcludeWhitelabels(ExcludeWhitelabels bool) *ListIpParam { + params.ExcludeWhitelabels = &ExcludeWhitelabels + return params +} +func (params *ListIpParam) SetLimit(Limit int32) *ListIpParam { + params.Limit = &Limit + return params +} +func (params *ListIpParam) SetOffset(Offset int32) *ListIpParam { + params.Offset = &Offset + return params +} +func (params *ListIpParam) SetSubuser(Subuser string) *ListIpParam { + params.Subuser = &Subuser + return params +} +func (params *ListIpParam) SetSortByDirection(SortByDirection SortByDirection) *ListIpParam { + params.SortByDirection = &SortByDirection + return params +} + +// **This endpoint allows you to retrieve a paginated list of all assigned and unassigned IPs.** Response includes warm up status, pools, assigned subusers, and reverse DNS info. The start_date field corresponds to when warmup started for that IP. A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is determined by the aggregate performance of all email traffic sent from it. You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. +func (c *ApiService) ListIp(params *ListIpParam) (interface{}, error) { + path := "/v3/ips" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Ip != nil { + data.Set("ip", *params.Ip) + } + if params != nil && params.ExcludeWhitelabels != nil { + data.Set("exclude_whitelabels", fmt.Sprint(*params.ExcludeWhitelabels)) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + if params != nil && params.Subuser != nil { + data.Set("subuser", *params.Subuser) + } + if params != nil && params.SortByDirection != nil { + data.Set("sort_by_direction", fmt.Sprint(*params.SortByDirection)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListIp200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ips/api_list_ip_pool.go b/rest/api/v3/ips/api_list_ip_pool.go new file mode 100644 index 00000000..5afcda48 --- /dev/null +++ b/rest/api/v3/ips/api_list_ip_pool.go @@ -0,0 +1,48 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListIpPoolParam struct { +} + +// **This endpoint allows you to get all of your IP pools.** +func (c *ApiService) ListIpPool() (interface{}, error) { + path := "/v3/ips/pools" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]IpPools200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ips/api_list_remaining_ip_count.go b/rest/api/v3/ips/api_list_remaining_ip_count.go new file mode 100644 index 00000000..1a63697e --- /dev/null +++ b/rest/api/v3/ips/api_list_remaining_ip_count.go @@ -0,0 +1,48 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListRemainingIpCountParam struct { +} + +// **This endpoint gets amount of IP Addresses that can still be created during a given period and the price of those IPs.** +func (c *ApiService) ListRemainingIpCount() (interface{}, error) { + path := "/v3/ips/remaining" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListRemainingIpCount200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ips/api_service.go b/rest/api/v3/ips/api_service.go new file mode 100644 index 00000000..63970833 --- /dev/null +++ b/rest/api/v3/ips/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/ips/api_update_ip_pool.go b/rest/api/v3/ips/api_update_ip_pool.go new file mode 100644 index 00000000..619c53b4 --- /dev/null +++ b/rest/api/v3/ips/api_update_ip_pool.go @@ -0,0 +1,83 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type UpdateIpPoolParam struct { + // The name of the IP pool that you want to retrieve the IP addresses for. + PoolName *string `json:"pool_name"` + // + UpdateIpPoolRequest *UpdateIpPoolRequest `json:"UpdateIpPoolRequest,omitempty"` +} + +func (params *UpdateIpPoolParam) SetPoolName(PoolName string) *UpdateIpPoolParam { + params.PoolName = &PoolName + return params +} +func (params *UpdateIpPoolParam) SetUpdateIpPoolRequest(UpdateIpPoolRequest UpdateIpPoolRequest) *UpdateIpPoolParam { + params.UpdateIpPoolRequest = &UpdateIpPoolRequest + return params +} + +// **This endpoint allows you to update the name of an IP pool.** +func (c *ApiService) UpdateIpPool(params *UpdateIpPoolParam) (interface{}, error) { + path := "/v3/ips/pools/{PoolName}" + if params != nil && params.PoolName != nil { + path = strings.Replace(path, "{"+"PoolName"+"}", *params.PoolName, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateIpPoolRequest != nil { + b, err := json.Marshal(*params.UpdateIpPoolRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &IpPools200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &UpdateIpPool404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/ips/docs/AddIp.md b/rest/api/v3/ips/docs/AddIp.md new file mode 100644 index 00000000..ec934377 --- /dev/null +++ b/rest/api/v3/ips/docs/AddIp.md @@ -0,0 +1,48 @@ +# AddIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddIp**](AddIp.md#AddIp) | **Post** /v3/ips | Add IPs + + + +## AddIp + +> AddIp201Response AddIp(ctx, optional) + +Add IPs + +**This endpoint is for adding a(n) IP Address(es) to your account.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a AddIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**AddIpRequest** | [**AddIpRequest**](AddIpRequest.md) | + +### Return type + +[**AddIp201Response**](AddIp201Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ips/docs/AddIp201Response.md b/rest/api/v3/ips/docs/AddIp201Response.md new file mode 100644 index 00000000..f62ecfe0 --- /dev/null +++ b/rest/api/v3/ips/docs/AddIp201Response.md @@ -0,0 +1,13 @@ +# AddIp201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ips** | [**[]AddIp201ResponseIpsInner**](AddIp201ResponseIpsInner.md) | List of IP objects. | +**RemainingIps** | **int32** | The number of IPs that can still be added to the user. | +**Warmup** | **bool** | Whether or not the IPs are being warmed up. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/AddIp201ResponseIpsInner.md b/rest/api/v3/ips/docs/AddIp201ResponseIpsInner.md new file mode 100644 index 00000000..511cef97 --- /dev/null +++ b/rest/api/v3/ips/docs/AddIp201ResponseIpsInner.md @@ -0,0 +1,12 @@ +# AddIp201ResponseIpsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | IP added to account. | +**Subusers** | **[]string** | Array of usernames assigned a send IP. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/AddIpRequest.md b/rest/api/v3/ips/docs/AddIpRequest.md new file mode 100644 index 00000000..1db399db --- /dev/null +++ b/rest/api/v3/ips/docs/AddIpRequest.md @@ -0,0 +1,13 @@ +# AddIpRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | **int32** | The amount of IPs to add to the account. | +**Subusers** | **[]string** | Array of usernames to be assigned a send IP. |[optional] +**Warmup** | **bool** | Whether or not to warmup the IPs being added. |[optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/AddIpToIpPool.md b/rest/api/v3/ips/docs/AddIpToIpPool.md new file mode 100644 index 00000000..77559a2a --- /dev/null +++ b/rest/api/v3/ips/docs/AddIpToIpPool.md @@ -0,0 +1,52 @@ +# AddIpToIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddIpToIpPool**](AddIpToIpPool.md#AddIpToIpPool) | **Post** /v3/ips/pools/{PoolName}/ips | Add an IP address to a pool + + + +## AddIpToIpPool + +> AddIpToIpPool201Response AddIpToIpPool(ctx, PoolNameoptional) + +Add an IP address to a pool + +**This endpoint allows you to add an IP address to an IP pool.** You can add the same IP address to multiple pools. It may take up to 60 seconds for your IP address to be added to a pool after your request is made. Before you can add an IP to a pool, you need to activate it in your SendGrid account: 1. Log into your SendGrid account. 1. Navigate to **Settings** and then select **IP Addresses**. 1. Find the IP address you want to activate and then click **Edit**. 1. Check **Allow my account to send mail using this IP address**. 1. Click **Save**. You can retrieve all of your available IP addresses from the \"Retrieve all IP addresses\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**PoolName** | **string** | The name of the IP pool you want to add the address to. If the name contains spaces, they must be URL encoded (e.g., \"Test Pool\" becomes \"Test%20Pool\"). + +### Other Parameters + +Other parameters are passed through a pointer to a AddIpToIpPoolParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**AddIpToIpPoolRequest** | [**AddIpToIpPoolRequest**](AddIpToIpPoolRequest.md) | + +### Return type + +[**AddIpToIpPool201Response**](AddIpToIpPool201Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ips/docs/AddIpToIpPool201Response.md b/rest/api/v3/ips/docs/AddIpToIpPool201Response.md new file mode 100644 index 00000000..1121a789 --- /dev/null +++ b/rest/api/v3/ips/docs/AddIpToIpPool201Response.md @@ -0,0 +1,14 @@ +# AddIpToIpPool201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | The IP address. | +**Pools** | **[]string** | The IP pools that this IP address has been added to. | +**StartDate** | **int32** | A Unix timestamp indicating when the warmup process began for the added IP address. | +**Warmup** | **bool** | Indicates if the IP address is in warmup. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/AddIpToIpPool404Response.md b/rest/api/v3/ips/docs/AddIpToIpPool404Response.md new file mode 100644 index 00000000..ad57ab01 --- /dev/null +++ b/rest/api/v3/ips/docs/AddIpToIpPool404Response.md @@ -0,0 +1,11 @@ +# AddIpToIpPool404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]AddIpToIpPool404ResponseErrorsInner**](AddIpToIpPool404ResponseErrorsInner.md) | The error returned. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/AddIpToIpPool404ResponseErrorsInner.md b/rest/api/v3/ips/docs/AddIpToIpPool404ResponseErrorsInner.md new file mode 100644 index 00000000..8c076206 --- /dev/null +++ b/rest/api/v3/ips/docs/AddIpToIpPool404ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# AddIpToIpPool404ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | |[optional] +**Message** | **string** | A message explaining why the IP address could not be added to the IP Pool. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/AddIpToIpPoolRequest.md b/rest/api/v3/ips/docs/AddIpToIpPoolRequest.md new file mode 100644 index 00000000..71990c86 --- /dev/null +++ b/rest/api/v3/ips/docs/AddIpToIpPoolRequest.md @@ -0,0 +1,11 @@ +# AddIpToIpPoolRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | The IP address that you want to add to the named pool. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/CreateIpPool.md b/rest/api/v3/ips/docs/CreateIpPool.md new file mode 100644 index 00000000..53cb6ad9 --- /dev/null +++ b/rest/api/v3/ips/docs/CreateIpPool.md @@ -0,0 +1,48 @@ +# CreateIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateIpPool**](CreateIpPool.md#CreateIpPool) | **Post** /v3/ips/pools | Create an IP pool + + + +## CreateIpPool + +> IpPools200 CreateIpPool(ctx, optional) + +Create an IP pool + +**This endpoint allows you to create an IP pool.** Before you can create an IP pool, you need to activate the IP in your SendGrid account: 1. Log into your SendGrid account. 1. Navigate to **Settings** and then select **IP Addresses**. 1. Find the IP address you want to activate and then click **Edit**. 1. Check **Allow my account to send mail using this IP address**. 1. Click **Save**. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateIpPoolParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**CreateIpPoolRequest** | [**CreateIpPoolRequest**](CreateIpPoolRequest.md) | + +### Return type + +[**IpPools200**](IpPools200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ips/docs/CreateIpPoolRequest.md b/rest/api/v3/ips/docs/CreateIpPoolRequest.md new file mode 100644 index 00000000..22c450a9 --- /dev/null +++ b/rest/api/v3/ips/docs/CreateIpPoolRequest.md @@ -0,0 +1,11 @@ +# CreateIpPoolRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of your new IP pool. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/DeleteIpFromIpPool.md b/rest/api/v3/ips/docs/DeleteIpFromIpPool.md new file mode 100644 index 00000000..0f701fa8 --- /dev/null +++ b/rest/api/v3/ips/docs/DeleteIpFromIpPool.md @@ -0,0 +1,52 @@ +# DeleteIpFromIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteIpFromIpPool**](DeleteIpFromIpPool.md#DeleteIpFromIpPool) | **Delete** /v3/ips/pools/{PoolName}/ips/{Ip} | Remove an IP address from a pool + + + +## DeleteIpFromIpPool + +> map[string]interface{} DeleteIpFromIpPool(ctx, PoolNameIp) + +Remove an IP address from a pool + +**This endpoint allows you to remove an IP address from an IP pool.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**PoolName** | **string** | The name of the IP pool that you are removing the IP address from. +**Ip** | **string** | The IP address that you wish to remove. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteIpFromIpPoolParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ips/docs/DeleteIpFromIpPool404Response.md b/rest/api/v3/ips/docs/DeleteIpFromIpPool404Response.md new file mode 100644 index 00000000..de7496d3 --- /dev/null +++ b/rest/api/v3/ips/docs/DeleteIpFromIpPool404Response.md @@ -0,0 +1,11 @@ +# DeleteIpFromIpPool404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | **string** | An error explaining why the IP address could not be removed from the IP pool. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/DeleteIpPool.md b/rest/api/v3/ips/docs/DeleteIpPool.md new file mode 100644 index 00000000..1afd2aee --- /dev/null +++ b/rest/api/v3/ips/docs/DeleteIpPool.md @@ -0,0 +1,51 @@ +# DeleteIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteIpPool**](DeleteIpPool.md#DeleteIpPool) | **Delete** /v3/ips/pools/{PoolName} | Delete an IP pool + + + +## DeleteIpPool + +> map[string]interface{} DeleteIpPool(ctx, PoolName) + +Delete an IP pool + +**This endpoint allows you to delete an IP pool.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**PoolName** | **string** | The name of the IP pool that you want to retrieve the IP addresses for. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteIpPoolParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ips/docs/DeleteIpPool404Response.md b/rest/api/v3/ips/docs/DeleteIpPool404Response.md new file mode 100644 index 00000000..667bd47e --- /dev/null +++ b/rest/api/v3/ips/docs/DeleteIpPool404Response.md @@ -0,0 +1,11 @@ +# DeleteIpPool404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | **string** | An error explaining why the pool could not be deleted. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/ErrorResponse.md b/rest/api/v3/ips/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/ips/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/ErrorResponseErrorsInner.md b/rest/api/v3/ips/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/ips/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/GetIp.md b/rest/api/v3/ips/docs/GetIp.md new file mode 100644 index 00000000..c9ea8a87 --- /dev/null +++ b/rest/api/v3/ips/docs/GetIp.md @@ -0,0 +1,51 @@ +# GetIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetIp**](GetIp.md#GetIp) | **Get** /v3/ips/{IpAddress} | Retrieve all IP pools an IP address belongs to + + + +## GetIp + +> GetIp200Response GetIp(ctx, IpAddress) + +Retrieve all IP pools an IP address belongs to + +**This endpoint allows you to see which IP pools a particular IP address has been added to.** The same IP address can be added to multiple IP pools. A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is based on the aggregate performance of all the senders who use it. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**IpAddress** | **string** | The IP address you are retrieving the IP pools for. + +### Other Parameters + +Other parameters are passed through a pointer to a GetIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**GetIp200Response**](GetIp200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ips/docs/GetIp200Response.md b/rest/api/v3/ips/docs/GetIp200Response.md new file mode 100644 index 00000000..34637db0 --- /dev/null +++ b/rest/api/v3/ips/docs/GetIp200Response.md @@ -0,0 +1,17 @@ +# GetIp200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | The IP address. | +**Subusers** | **[]string** | The subusers that can send email using this IP address. | +**Rdns** | **string** | The reverse DNS record for this IP address. | +**Pools** | **[]string** | The list of IP pools that this IP address belongs to. | +**Warmup** | **bool** | Indicates if this IP address is currently warming up. | +**StartDate** | **int32** | The date that the IP address was entered into warmup. | +**Whitelabeled** | **bool** | Indicates if this IP address is associated with a reverse DNS record. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/GetIpPool.md b/rest/api/v3/ips/docs/GetIpPool.md new file mode 100644 index 00000000..8cd51783 --- /dev/null +++ b/rest/api/v3/ips/docs/GetIpPool.md @@ -0,0 +1,51 @@ +# GetIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetIpPool**](GetIpPool.md#GetIpPool) | **Get** /v3/ips/pools/{PoolName} | Retrieve all the IPs in a specified pool + + + +## GetIpPool + +> GetIpPool200Response GetIpPool(ctx, PoolName) + +Retrieve all the IPs in a specified pool + +**This endpoint allows you to get all of the IP addresses that are in a specific IP pool.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**PoolName** | **string** | The name of the IP pool that you want to retrieve the IP addresses for. + +### Other Parameters + +Other parameters are passed through a pointer to a GetIpPoolParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**GetIpPool200Response**](GetIpPool200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ips/docs/GetIpPool200Response.md b/rest/api/v3/ips/docs/GetIpPool200Response.md new file mode 100644 index 00000000..6f59aa12 --- /dev/null +++ b/rest/api/v3/ips/docs/GetIpPool200Response.md @@ -0,0 +1,12 @@ +# GetIpPool200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PoolName** | **string** | The name of the IP pool. |[optional] +**Ips** | **[]string** | The IP addresses that belong to this pool. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/GetIpPool404Response.md b/rest/api/v3/ips/docs/GetIpPool404Response.md new file mode 100644 index 00000000..6e2dcd12 --- /dev/null +++ b/rest/api/v3/ips/docs/GetIpPool404Response.md @@ -0,0 +1,11 @@ +# GetIpPool404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]GetIpPool404ResponseErrorsInner**](GetIpPool404ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/GetIpPool404ResponseErrorsInner.md b/rest/api/v3/ips/docs/GetIpPool404ResponseErrorsInner.md new file mode 100644 index 00000000..03472198 --- /dev/null +++ b/rest/api/v3/ips/docs/GetIpPool404ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# GetIpPool404ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | The name of the error. |[optional] +**Message** | **string** | A message explaining why the IP addresses could not be listed. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/IpPools200.md b/rest/api/v3/ips/docs/IpPools200.md new file mode 100644 index 00000000..4fcf9926 --- /dev/null +++ b/rest/api/v3/ips/docs/IpPools200.md @@ -0,0 +1,11 @@ +# IpPools200 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the IP pool. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/ListAssignedIp.md b/rest/api/v3/ips/docs/ListAssignedIp.md new file mode 100644 index 00000000..1aed835b --- /dev/null +++ b/rest/api/v3/ips/docs/ListAssignedIp.md @@ -0,0 +1,44 @@ +# ListAssignedIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListAssignedIp**](ListAssignedIp.md#ListAssignedIp) | **Get** /v3/ips/assigned | Retrieve all assigned IPs + + + +## ListAssignedIp + +> []ListAssignedIp200ResponseInner ListAssignedIp(ctx, ) + +Retrieve all assigned IPs + +**This endpoint allows you to retrieve only assigned IP addresses.** A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is based on the aggregate performance of all the senders who use it. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListAssignedIpParams struct + + +### Return type + +[**[]ListAssignedIp200ResponseInner**](ListAssignedIp200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ips/docs/ListAssignedIp200ResponseInner.md b/rest/api/v3/ips/docs/ListAssignedIp200ResponseInner.md new file mode 100644 index 00000000..0992bd04 --- /dev/null +++ b/rest/api/v3/ips/docs/ListAssignedIp200ResponseInner.md @@ -0,0 +1,14 @@ +# ListAssignedIp200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | The IP address. | +**Pools** | **[]string** | The IP pools that this IP address has been added to. | +**Warmup** | **bool** | Indicates if this IP address is currently warming up. | +**StartDate** | **int32** | The start date that this IP address was entered into warmup. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/ListIp.md b/rest/api/v3/ips/docs/ListIp.md new file mode 100644 index 00000000..29d02acc --- /dev/null +++ b/rest/api/v3/ips/docs/ListIp.md @@ -0,0 +1,53 @@ +# ListIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListIp**](ListIp.md#ListIp) | **Get** /v3/ips | Retrieve all IP addresses + + + +## ListIp + +> []ListIp200ResponseInner ListIp(ctx, optional) + +Retrieve all IP addresses + +**This endpoint allows you to retrieve a paginated list of all assigned and unassigned IPs.** Response includes warm up status, pools, assigned subusers, and reverse DNS info. The start_date field corresponds to when warmup started for that IP. A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is determined by the aggregate performance of all email traffic sent from it. You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Ip** | **string** | The IP address to get +**ExcludeWhitelabels** | **bool** | Should we exclude reverse DNS records (whitelabels)? +**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. +**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. +**Subuser** | **string** | The subuser you are requesting for. +**SortByDirection** | [**SortByDirection**](SortByDirectionSortByDirection.md) | The direction to sort the results. + +### Return type + +[**[]ListIp200ResponseInner**](ListIp200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ips/docs/ListIp200ResponseInner.md b/rest/api/v3/ips/docs/ListIp200ResponseInner.md new file mode 100644 index 00000000..7b8e15a9 --- /dev/null +++ b/rest/api/v3/ips/docs/ListIp200ResponseInner.md @@ -0,0 +1,18 @@ +# ListIp200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | An IP address. | +**Subusers** | **[]string** | The subusers that are able to send email from this IP. | +**Rdns** | **string** | The reverse DNS record for this IP address. |[optional] +**Pools** | **[]string** | The IP pools that this IP has been added to. | +**Warmup** | **bool** | Indicates if this IP address is currently warming up. | +**StartDate** | **float32** | The date that the IP address was entered into warmup. | +**Whitelabeled** | **bool** | Indicates if this IP address is associated with a reverse DNS record. | +**AssignedAt** | **int32** | The date that the IP address was assigned to the user. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/ListIpPool.md b/rest/api/v3/ips/docs/ListIpPool.md new file mode 100644 index 00000000..56fc7cf8 --- /dev/null +++ b/rest/api/v3/ips/docs/ListIpPool.md @@ -0,0 +1,44 @@ +# ListIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListIpPool**](ListIpPool.md#ListIpPool) | **Get** /v3/ips/pools | Retrieve all IP pools + + + +## ListIpPool + +> []IpPools200 ListIpPool(ctx, ) + +Retrieve all IP pools + +**This endpoint allows you to get all of your IP pools.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListIpPoolParams struct + + +### Return type + +[**[]IpPools200**](IpPools200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ips/docs/ListRemainingIpCount.md b/rest/api/v3/ips/docs/ListRemainingIpCount.md new file mode 100644 index 00000000..f3df4a93 --- /dev/null +++ b/rest/api/v3/ips/docs/ListRemainingIpCount.md @@ -0,0 +1,44 @@ +# ListRemainingIpCount + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListRemainingIpCount**](ListRemainingIpCount.md#ListRemainingIpCount) | **Get** /v3/ips/remaining | Get remaining IPs count + + + +## ListRemainingIpCount + +> ListRemainingIpCount200Response ListRemainingIpCount(ctx, ) + +Get remaining IPs count + +**This endpoint gets amount of IP Addresses that can still be created during a given period and the price of those IPs.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListRemainingIpCountParams struct + + +### Return type + +[**ListRemainingIpCount200Response**](ListRemainingIpCount200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ips/docs/ListRemainingIpCount200Response.md b/rest/api/v3/ips/docs/ListRemainingIpCount200Response.md new file mode 100644 index 00000000..8496c11d --- /dev/null +++ b/rest/api/v3/ips/docs/ListRemainingIpCount200Response.md @@ -0,0 +1,11 @@ +# ListRemainingIpCount200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | [**[]ListRemainingIpCount200ResponseResultsInner**](ListRemainingIpCount200ResponseResultsInner.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/ListRemainingIpCount200ResponseResultsInner.md b/rest/api/v3/ips/docs/ListRemainingIpCount200ResponseResultsInner.md new file mode 100644 index 00000000..2eddbb09 --- /dev/null +++ b/rest/api/v3/ips/docs/ListRemainingIpCount200ResponseResultsInner.md @@ -0,0 +1,13 @@ +# ListRemainingIpCount200ResponseResultsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Remaining** | **int32** | The number of IPs that can still be added to the user. | +**Period** | **string** | The length of time until user can add more IPs. | +**PricePerIp** | **float32** | The current cost to add an IP. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/SortByDirection.md b/rest/api/v3/ips/docs/SortByDirection.md new file mode 100644 index 00000000..0431e9a0 --- /dev/null +++ b/rest/api/v3/ips/docs/SortByDirection.md @@ -0,0 +1,13 @@ +# SortByDirection + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DESC** | string | (value: `"desc"`) +**ASC** | string | (value: `"asc"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/UpdateIpPool.md b/rest/api/v3/ips/docs/UpdateIpPool.md new file mode 100644 index 00000000..8f766155 --- /dev/null +++ b/rest/api/v3/ips/docs/UpdateIpPool.md @@ -0,0 +1,52 @@ +# UpdateIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateIpPool**](UpdateIpPool.md#UpdateIpPool) | **Put** /v3/ips/pools/{PoolName} | Rename an IP pool + + + +## UpdateIpPool + +> IpPools200 UpdateIpPool(ctx, PoolNameoptional) + +Rename an IP pool + +**This endpoint allows you to update the name of an IP pool.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**PoolName** | **string** | The name of the IP pool that you want to retrieve the IP addresses for. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateIpPoolParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**UpdateIpPoolRequest** | [**UpdateIpPoolRequest**](UpdateIpPoolRequest.md) | + +### Return type + +[**IpPools200**](IpPools200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ips/docs/UpdateIpPool404Response.md b/rest/api/v3/ips/docs/UpdateIpPool404Response.md new file mode 100644 index 00000000..e3c5d6d7 --- /dev/null +++ b/rest/api/v3/ips/docs/UpdateIpPool404Response.md @@ -0,0 +1,11 @@ +# UpdateIpPool404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]UpdateIpPool404ResponseErrorsInner**](UpdateIpPool404ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/UpdateIpPool404ResponseErrorsInner.md b/rest/api/v3/ips/docs/UpdateIpPool404ResponseErrorsInner.md new file mode 100644 index 00000000..58d029a9 --- /dev/null +++ b/rest/api/v3/ips/docs/UpdateIpPool404ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# UpdateIpPool404ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | |[optional] +**Message** | **string** | A message explaining why the name of your IP pool could not be updated. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/UpdateIpPoolRequest.md b/rest/api/v3/ips/docs/UpdateIpPoolRequest.md new file mode 100644 index 00000000..dff93b64 --- /dev/null +++ b/rest/api/v3/ips/docs/UpdateIpPoolRequest.md @@ -0,0 +1,11 @@ +# UpdateIpPoolRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The new name for your IP pool. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/model_add_ip_201_response.go b/rest/api/v3/ips/model_add_ip_201_response.go new file mode 100644 index 00000000..ac46d11c --- /dev/null +++ b/rest/api/v3/ips/model_add_ip_201_response.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIp201Response struct for AddIp201Response +type AddIp201Response struct { + // List of IP objects. + Ips []AddIp201ResponseIpsInner `json:"ips"` + // The number of IPs that can still be added to the user. + RemainingIps int32 `json:"remaining_ips"` + // Whether or not the IPs are being warmed up. + Warmup bool `json:"warmup"` +} diff --git a/rest/api/v3/ips/model_add_ip_201_response_ips_inner.go b/rest/api/v3/ips/model_add_ip_201_response_ips_inner.go new file mode 100644 index 00000000..e69af04a --- /dev/null +++ b/rest/api/v3/ips/model_add_ip_201_response_ips_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIp201ResponseIpsInner struct for AddIp201ResponseIpsInner +type AddIp201ResponseIpsInner struct { + // IP added to account. + Ip string `json:"ip"` + // Array of usernames assigned a send IP. + Subusers []string `json:"subusers"` +} diff --git a/rest/api/v3/ips/model_add_ip_request.go b/rest/api/v3/ips/model_add_ip_request.go new file mode 100644 index 00000000..4a68e8ca --- /dev/null +++ b/rest/api/v3/ips/model_add_ip_request.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIpRequest struct for AddIpRequest +type AddIpRequest struct { + // The amount of IPs to add to the account. + Count int32 `json:"count"` + // Array of usernames to be assigned a send IP. + Subusers *[]string `json:"subusers,omitempty"` + // Whether or not to warmup the IPs being added. + Warmup *bool `json:"warmup,omitempty"` +} diff --git a/rest/api/v3/ips/model_add_ip_to_ip_pool_201_response.go b/rest/api/v3/ips/model_add_ip_to_ip_pool_201_response.go new file mode 100644 index 00000000..dbbb205e --- /dev/null +++ b/rest/api/v3/ips/model_add_ip_to_ip_pool_201_response.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIpToIpPool201Response struct for AddIpToIpPool201Response +type AddIpToIpPool201Response struct { + // The IP address. + Ip string `json:"ip"` + // The IP pools that this IP address has been added to. + Pools []string `json:"pools"` + // A Unix timestamp indicating when the warmup process began for the added IP address. + StartDate int32 `json:"start_date"` + // Indicates if the IP address is in warmup. + Warmup bool `json:"warmup"` +} diff --git a/rest/api/v3/ips/model_add_ip_to_ip_pool_404_response.go b/rest/api/v3/ips/model_add_ip_to_ip_pool_404_response.go new file mode 100644 index 00000000..a0333b44 --- /dev/null +++ b/rest/api/v3/ips/model_add_ip_to_ip_pool_404_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIpToIpPool404Response struct for AddIpToIpPool404Response +type AddIpToIpPool404Response struct { + // The error returned. + Errors *[]AddIpToIpPool404ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/ips/model_add_ip_to_ip_pool_404_response_errors_inner.go b/rest/api/v3/ips/model_add_ip_to_ip_pool_404_response_errors_inner.go new file mode 100644 index 00000000..eccc086a --- /dev/null +++ b/rest/api/v3/ips/model_add_ip_to_ip_pool_404_response_errors_inner.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIpToIpPool404ResponseErrorsInner struct for AddIpToIpPool404ResponseErrorsInner +type AddIpToIpPool404ResponseErrorsInner struct { + Field *string `json:"field,omitempty"` + // A message explaining why the IP address could not be added to the IP Pool. + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/ips/model_add_ip_to_ip_pool_request.go b/rest/api/v3/ips/model_add_ip_to_ip_pool_request.go new file mode 100644 index 00000000..4ab23abf --- /dev/null +++ b/rest/api/v3/ips/model_add_ip_to_ip_pool_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIpToIpPoolRequest struct for AddIpToIpPoolRequest +type AddIpToIpPoolRequest struct { + // The IP address that you want to add to the named pool. + Ip *string `json:"ip,omitempty"` +} diff --git a/rest/api/v3/ips/model_create_ip_pool_request.go b/rest/api/v3/ips/model_create_ip_pool_request.go new file mode 100644 index 00000000..03bc175b --- /dev/null +++ b/rest/api/v3/ips/model_create_ip_pool_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateIpPoolRequest struct for CreateIpPoolRequest +type CreateIpPoolRequest struct { + // The name of your new IP pool. + Name string `json:"name"` +} diff --git a/rest/api/v3/ips/model_delete_ip_from_ip_pool_404_response.go b/rest/api/v3/ips/model_delete_ip_from_ip_pool_404_response.go new file mode 100644 index 00000000..c07d37d5 --- /dev/null +++ b/rest/api/v3/ips/model_delete_ip_from_ip_pool_404_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteIpFromIpPool404Response struct for DeleteIpFromIpPool404Response +type DeleteIpFromIpPool404Response struct { + // An error explaining why the IP address could not be removed from the IP pool. + Error *string `json:"error,omitempty"` +} diff --git a/rest/api/v3/ips/model_delete_ip_pool_404_response.go b/rest/api/v3/ips/model_delete_ip_pool_404_response.go new file mode 100644 index 00000000..e44f5d7a --- /dev/null +++ b/rest/api/v3/ips/model_delete_ip_pool_404_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteIpPool404Response struct for DeleteIpPool404Response +type DeleteIpPool404Response struct { + // An error explaining why the pool could not be deleted. + Error *string `json:"error,omitempty"` +} diff --git a/rest/api/v3/ips/model_error_response.go b/rest/api/v3/ips/model_error_response.go new file mode 100644 index 00000000..56fbd3ec --- /dev/null +++ b/rest/api/v3/ips/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/ips/model_error_response_errors_inner.go b/rest/api/v3/ips/model_error_response_errors_inner.go new file mode 100644 index 00000000..40c6b644 --- /dev/null +++ b/rest/api/v3/ips/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/ips/model_get_ip_200_response.go b/rest/api/v3/ips/model_get_ip_200_response.go new file mode 100644 index 00000000..e04eb406 --- /dev/null +++ b/rest/api/v3/ips/model_get_ip_200_response.go @@ -0,0 +1,32 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetIp200Response struct for GetIp200Response +type GetIp200Response struct { + // The IP address. + Ip string `json:"ip"` + // The subusers that can send email using this IP address. + Subusers []string `json:"subusers"` + // The reverse DNS record for this IP address. + Rdns string `json:"rdns"` + // The list of IP pools that this IP address belongs to. + Pools []string `json:"pools"` + // Indicates if this IP address is currently warming up. + Warmup bool `json:"warmup"` + // The date that the IP address was entered into warmup. + StartDate int32 `json:"start_date"` + // Indicates if this IP address is associated with a reverse DNS record. + Whitelabeled bool `json:"whitelabeled"` +} diff --git a/rest/api/v3/ips/model_get_ip_pool_200_response.go b/rest/api/v3/ips/model_get_ip_pool_200_response.go new file mode 100644 index 00000000..e76d06e5 --- /dev/null +++ b/rest/api/v3/ips/model_get_ip_pool_200_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetIpPool200Response struct for GetIpPool200Response +type GetIpPool200Response struct { + // The name of the IP pool. + PoolName *string `json:"pool_name,omitempty"` + // The IP addresses that belong to this pool. + Ips *[]string `json:"ips,omitempty"` +} diff --git a/rest/api/v3/ips/model_get_ip_pool_404_response.go b/rest/api/v3/ips/model_get_ip_pool_404_response.go new file mode 100644 index 00000000..d6bf3c53 --- /dev/null +++ b/rest/api/v3/ips/model_get_ip_pool_404_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetIpPool404Response struct for GetIpPool404Response +type GetIpPool404Response struct { + Errors *[]GetIpPool404ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/ips/model_get_ip_pool_404_response_errors_inner.go b/rest/api/v3/ips/model_get_ip_pool_404_response_errors_inner.go new file mode 100644 index 00000000..2478d7b8 --- /dev/null +++ b/rest/api/v3/ips/model_get_ip_pool_404_response_errors_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetIpPool404ResponseErrorsInner struct for GetIpPool404ResponseErrorsInner +type GetIpPool404ResponseErrorsInner struct { + // The name of the error. + Field *string `json:"field,omitempty"` + // A message explaining why the IP addresses could not be listed. + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/ips/model_ip_pools200.go b/rest/api/v3/ips/model_ip_pools200.go new file mode 100644 index 00000000..5e4936fb --- /dev/null +++ b/rest/api/v3/ips/model_ip_pools200.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IpPools200 struct for IpPools200 +type IpPools200 struct { + // The name of the IP pool. + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/ips/model_list_assigned_ip_200_response_inner.go b/rest/api/v3/ips/model_list_assigned_ip_200_response_inner.go new file mode 100644 index 00000000..bdeb0205 --- /dev/null +++ b/rest/api/v3/ips/model_list_assigned_ip_200_response_inner.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListAssignedIp200ResponseInner struct for ListAssignedIp200ResponseInner +type ListAssignedIp200ResponseInner struct { + // The IP address. + Ip string `json:"ip"` + // The IP pools that this IP address has been added to. + Pools []string `json:"pools"` + // Indicates if this IP address is currently warming up. + Warmup bool `json:"warmup"` + // The start date that this IP address was entered into warmup. + StartDate int32 `json:"start_date"` +} diff --git a/rest/api/v3/ips/model_list_ip_200_response_inner.go b/rest/api/v3/ips/model_list_ip_200_response_inner.go new file mode 100644 index 00000000..bed4a8f8 --- /dev/null +++ b/rest/api/v3/ips/model_list_ip_200_response_inner.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListIp200ResponseInner struct for ListIp200ResponseInner +type ListIp200ResponseInner struct { + // An IP address. + Ip string `json:"ip"` + // The subusers that are able to send email from this IP. + Subusers []string `json:"subusers"` + // The reverse DNS record for this IP address. + Rdns *string `json:"rdns,omitempty"` + // The IP pools that this IP has been added to. + Pools []string `json:"pools"` + // Indicates if this IP address is currently warming up. + Warmup bool `json:"warmup"` + // The date that the IP address was entered into warmup. + StartDate float32 `json:"start_date"` + // Indicates if this IP address is associated with a reverse DNS record. + Whitelabeled bool `json:"whitelabeled"` + // The date that the IP address was assigned to the user. + AssignedAt int32 `json:"assigned_at"` +} diff --git a/rest/api/v3/ips/model_list_remaining_ip_count_200_response.go b/rest/api/v3/ips/model_list_remaining_ip_count_200_response.go new file mode 100644 index 00000000..4bdd5881 --- /dev/null +++ b/rest/api/v3/ips/model_list_remaining_ip_count_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListRemainingIpCount200Response struct for ListRemainingIpCount200Response +type ListRemainingIpCount200Response struct { + Results []ListRemainingIpCount200ResponseResultsInner `json:"results"` +} diff --git a/rest/api/v3/ips/model_list_remaining_ip_count_200_response_results_inner.go b/rest/api/v3/ips/model_list_remaining_ip_count_200_response_results_inner.go new file mode 100644 index 00000000..ec67dd2f --- /dev/null +++ b/rest/api/v3/ips/model_list_remaining_ip_count_200_response_results_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListRemainingIpCount200ResponseResultsInner struct for ListRemainingIpCount200ResponseResultsInner +type ListRemainingIpCount200ResponseResultsInner struct { + // The number of IPs that can still be added to the user. + Remaining int32 `json:"remaining"` + // The length of time until user can add more IPs. + Period string `json:"period"` + // The current cost to add an IP. + PricePerIp float32 `json:"price_per_ip"` +} diff --git a/rest/api/v3/ips/model_sort_by_direction.go b/rest/api/v3/ips/model_sort_by_direction.go new file mode 100644 index 00000000..0e012a7d --- /dev/null +++ b/rest/api/v3/ips/model_sort_by_direction.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SortByDirection the model 'SortByDirection' +type SortByDirection string + +// List of SortByDirection +const ( + SORTBYDIRECTION_DESC SortByDirection = "desc" + SORTBYDIRECTION_ASC SortByDirection = "asc" +) diff --git a/rest/api/v3/ips/model_update_ip_pool_404_response.go b/rest/api/v3/ips/model_update_ip_pool_404_response.go new file mode 100644 index 00000000..9fca7b4c --- /dev/null +++ b/rest/api/v3/ips/model_update_ip_pool_404_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateIpPool404Response struct for UpdateIpPool404Response +type UpdateIpPool404Response struct { + Errors *[]UpdateIpPool404ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/ips/model_update_ip_pool_404_response_errors_inner.go b/rest/api/v3/ips/model_update_ip_pool_404_response_errors_inner.go new file mode 100644 index 00000000..906137fd --- /dev/null +++ b/rest/api/v3/ips/model_update_ip_pool_404_response_errors_inner.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateIpPool404ResponseErrorsInner struct for UpdateIpPool404ResponseErrorsInner +type UpdateIpPool404ResponseErrorsInner struct { + Field *string `json:"field,omitempty"` + // A message explaining why the name of your IP pool could not be updated. + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/ips/model_update_ip_pool_request.go b/rest/api/v3/ips/model_update_ip_pool_request.go new file mode 100644 index 00000000..766187d9 --- /dev/null +++ b/rest/api/v3/ips/model_update_ip_pool_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateIpPoolRequest struct for UpdateIpPoolRequest +type UpdateIpPoolRequest struct { + // The new name for your IP pool. + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/link_branding/.openapi-generator b/rest/api/v3/link_branding/.openapi-generator new file mode 100644 index 00000000..95d56b5d --- /dev/null +++ b/rest/api/v3/link_branding/.openapi-generator @@ -0,0 +1,76 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_associate_branded_link_with_subuser.go +api_create_branded_link.go +api_delete_branded_link.go +api_disassociate_branded_link_from_subuser.go +api_get_branded_link.go +api_list_branded_link.go +api_list_default_branded_link.go +api_list_subuser_branded_link.go +api_service.go +api_update_branded_link.go +api_validate_branded_link.go +docs/AssociateBrandedLinkWithSubuser.md +docs/AssociateBrandedLinkWithSubuserRequest.md +docs/CreateBrandedLink.md +docs/CreateBrandedLinkRequest.md +docs/Default.md +docs/Default1.md +docs/Default2.md +docs/DeleteBrandedLink.md +docs/DisassociateBrandedLinkFromSubuser.md +docs/GetBrandedLink.md +docs/Legacy.md +docs/LinkBranding200.md +docs/LinkBranding200Dns.md +docs/LinkBranding200DnsDomainCname.md +docs/LinkBranding200DnsOwnerCname.md +docs/ListBrandedLink.md +docs/ListDefaultBrandedLink.md +docs/ListSubuserBrandedLink.md +docs/Region.md +docs/Type.md +docs/Type1.md +docs/UpdateBrandedLink.md +docs/UpdateBrandedLinkRequest.md +docs/Valid.md +docs/Valid1.md +docs/Valid2.md +docs/Valid3.md +docs/Valid4.md +docs/Valid5.md +docs/ValidateBrandedLink.md +docs/ValidateBrandedLink200Response.md +docs/ValidateBrandedLink200ResponseValidationResults.md +docs/ValidateBrandedLink200ResponseValidationResultsDomainCname.md +docs/ValidateBrandedLink200ResponseValidationResultsOwnerCname.md +docs/ValidateBrandedLink500Response.md +docs/ValidateBrandedLink500ResponseErrorsInner.md +model_associate_branded_link_with_subuser_request.go +model_create_branded_link_request.go +model_default.go +model_default1.go +model_default2.go +model_legacy.go +model_link_branding200.go +model_link_branding200_dns.go +model_link_branding200_dns_domain_cname.go +model_link_branding200_dns_owner_cname.go +model_region.go +model_type.go +model_type1.go +model_update_branded_link_request.go +model_valid.go +model_valid1.go +model_valid2.go +model_valid3.go +model_valid4.go +model_valid5.go +model_validate_branded_link_200_response.go +model_validate_branded_link_200_response_validation_results.go +model_validate_branded_link_200_response_validation_results_domain_cname.go +model_validate_branded_link_200_response_validation_results_owner_cname.go +model_validate_branded_link_500_response.go +model_validate_branded_link_500_response_errors_inner.go diff --git a/rest/api/v3/link_branding/.openapi-generator-ignore b/rest/api/v3/link_branding/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/link_branding/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/link_branding/README.md b/rest/api/v3/link_branding/README.md new file mode 100644 index 00000000..01cfe61b --- /dev/null +++ b/rest/api/v3/link_branding/README.md @@ -0,0 +1,98 @@ +# Go API client for + +The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. + +You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. + + See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:43.518185+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AssociateBrandedLinkWithSubuser* | [**AssociateBrandedLinkWithSubuser**](docs/AssociateBrandedLinkWithSubuser.md#associatebrandedlinkwithsubuser) | **Post** /v3/whitelabel/links/{LinkId}/subuser | Associate a branded link with a subuser +*CreateBrandedLink* | [**CreateBrandedLink**](docs/CreateBrandedLink.md#createbrandedlink) | **Post** /v3/whitelabel/links | Create a branded link +*DeleteBrandedLink* | [**DeleteBrandedLink**](docs/DeleteBrandedLink.md#deletebrandedlink) | **Delete** /v3/whitelabel/links/{Id} | Delete a branded link +*DisassociateBrandedLinkFromSubuser* | [**DisassociateBrandedLinkFromSubuser**](docs/DisassociateBrandedLinkFromSubuser.md#disassociatebrandedlinkfromsubuser) | **Delete** /v3/whitelabel/links/subuser | Disassociate a branded link from a subuser +*GetBrandedLink* | [**GetBrandedLink**](docs/GetBrandedLink.md#getbrandedlink) | **Get** /v3/whitelabel/links/{Id} | Retrieve a branded link +*ListBrandedLink* | [**ListBrandedLink**](docs/ListBrandedLink.md#listbrandedlink) | **Get** /v3/whitelabel/links | Retrieve all branded links +*ListDefaultBrandedLink* | [**ListDefaultBrandedLink**](docs/ListDefaultBrandedLink.md#listdefaultbrandedlink) | **Get** /v3/whitelabel/links/default | Retrieve the default branded link +*ListSubuserBrandedLink* | [**ListSubuserBrandedLink**](docs/ListSubuserBrandedLink.md#listsubuserbrandedlink) | **Get** /v3/whitelabel/links/subuser | Retrieve a subuser's branded link +*UpdateBrandedLink* | [**UpdateBrandedLink**](docs/UpdateBrandedLink.md#updatebrandedlink) | **Patch** /v3/whitelabel/links/{Id} | Update a branded link +*ValidateBrandedLink* | [**ValidateBrandedLink**](docs/ValidateBrandedLink.md#validatebrandedlink) | **Post** /v3/whitelabel/links/{Id}/validate | Validate a branded link + + +## Documentation For Models + + - [AssociateBrandedLinkWithSubuserRequest](AssociateBrandedLinkWithSubuserRequest.md) + - [CreateBrandedLinkRequest](CreateBrandedLinkRequest.md) + - [Default](Default.md) + - [Default1](Default1.md) + - [Default2](Default2.md) + - [Legacy](Legacy.md) + - [LinkBranding200](LinkBranding200.md) + - [LinkBranding200Dns](LinkBranding200Dns.md) + - [LinkBranding200DnsDomainCname](LinkBranding200DnsDomainCname.md) + - [LinkBranding200DnsOwnerCname](LinkBranding200DnsOwnerCname.md) + - [Region](Region.md) + - [Type](Type.md) + - [Type1](Type1.md) + - [UpdateBrandedLinkRequest](UpdateBrandedLinkRequest.md) + - [Valid](Valid.md) + - [Valid1](Valid1.md) + - [Valid2](Valid2.md) + - [Valid3](Valid3.md) + - [Valid4](Valid4.md) + - [Valid5](Valid5.md) + - [ValidateBrandedLink200Response](ValidateBrandedLink200Response.md) + - [ValidateBrandedLink200ResponseValidationResults](ValidateBrandedLink200ResponseValidationResults.md) + - [ValidateBrandedLink200ResponseValidationResultsDomainCname](ValidateBrandedLink200ResponseValidationResultsDomainCname.md) + - [ValidateBrandedLink200ResponseValidationResultsOwnerCname](ValidateBrandedLink200ResponseValidationResultsOwnerCname.md) + - [ValidateBrandedLink500Response](ValidateBrandedLink500Response.md) + - [ValidateBrandedLink500ResponseErrorsInner](ValidateBrandedLink500ResponseErrorsInner.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/link_branding/api_associate_branded_link_with_subuser.go b/rest/api/v3/link_branding/api_associate_branded_link_with_subuser.go new file mode 100644 index 00000000..244537f5 --- /dev/null +++ b/rest/api/v3/link_branding/api_associate_branded_link_with_subuser.go @@ -0,0 +1,76 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type AssociateBrandedLinkWithSubuserParam struct { + // The ID of the branded link you want to associate. + LinkId *int32 `json:"link_id"` + // + AssociateBrandedLinkWithSubuserRequest *AssociateBrandedLinkWithSubuserRequest `json:"AssociateBrandedLinkWithSubuserRequest,omitempty"` +} + +func (params *AssociateBrandedLinkWithSubuserParam) SetLinkId(LinkId int32) *AssociateBrandedLinkWithSubuserParam { + params.LinkId = &LinkId + return params +} +func (params *AssociateBrandedLinkWithSubuserParam) SetAssociateBrandedLinkWithSubuserRequest(AssociateBrandedLinkWithSubuserRequest AssociateBrandedLinkWithSubuserRequest) *AssociateBrandedLinkWithSubuserParam { + params.AssociateBrandedLinkWithSubuserRequest = &AssociateBrandedLinkWithSubuserRequest + return params +} + +// **This endpoint allows you to associate a branded link with a subuser account.** Link branding can be associated with subusers from the parent account. This functionality allows subusers to send mail using their parent's link branding. To associate link branding, the parent account must first create a branded link and validate it. The parent may then associate that branded link with a subuser via the API or the [Subuser Management page of the Twilio SendGrid App](https://app.sendgrid.com/settings/subusers). +func (c *ApiService) AssociateBrandedLinkWithSubuser(params *AssociateBrandedLinkWithSubuserParam) (interface{}, error) { + path := "/v3/whitelabel/links/{LinkId}/subuser" + if params != nil && params.LinkId != nil { + path = strings.Replace(path, "{"+"LinkId"+"}", fmt.Sprint(*params.LinkId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.AssociateBrandedLinkWithSubuserRequest != nil { + b, err := json.Marshal(*params.AssociateBrandedLinkWithSubuserRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &LinkBranding200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/link_branding/api_create_branded_link.go b/rest/api/v3/link_branding/api_create_branded_link.go new file mode 100644 index 00000000..fef3f166 --- /dev/null +++ b/rest/api/v3/link_branding/api_create_branded_link.go @@ -0,0 +1,73 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type CreateBrandedLinkParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + CreateBrandedLinkRequest *CreateBrandedLinkRequest `json:"CreateBrandedLinkRequest,omitempty"` +} + +func (params *CreateBrandedLinkParam) SetOnbehalfof(Onbehalfof string) *CreateBrandedLinkParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateBrandedLinkParam) SetCreateBrandedLinkRequest(CreateBrandedLinkRequest CreateBrandedLinkRequest) *CreateBrandedLinkParam { + params.CreateBrandedLinkRequest = &CreateBrandedLinkRequest + return params +} + +// **This endpoint allows you to create a new branded link.** To create the link branding, supply the root domain and, optionally, the subdomain — these go into separate fields in your request body. The root domain should match your FROM email address. If you provide a subdomain, it must be different from the subdomain you used for authenticating your domain. You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. +func (c *ApiService) CreateBrandedLink(params *CreateBrandedLinkParam) (interface{}, error) { + path := "/v3/whitelabel/links" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateBrandedLinkRequest != nil { + b, err := json.Marshal(*params.CreateBrandedLinkRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &LinkBranding200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/link_branding/api_delete_branded_link.go b/rest/api/v3/link_branding/api_delete_branded_link.go new file mode 100644 index 00000000..781d2c8b --- /dev/null +++ b/rest/api/v3/link_branding/api_delete_branded_link.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type DeleteBrandedLinkParam struct { + // The ID of the branded link you want to retrieve. + Id *int32 `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteBrandedLinkParam) SetId(Id int32) *DeleteBrandedLinkParam { + params.Id = &Id + return params +} +func (params *DeleteBrandedLinkParam) SetOnbehalfof(Onbehalfof string) *DeleteBrandedLinkParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete a branded link.** Your request will receive a response with a 204 status code if the deletion was successful. The call does not return the link's details, so if you wish to record these make sure you call the \"Retrieve a branded link\" endpoint *before* you request its deletion. You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. +func (c *ApiService) DeleteBrandedLink(params *DeleteBrandedLinkParam) (interface{}, error) { + path := "/v3/whitelabel/links/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/link_branding/api_disassociate_branded_link_from_subuser.go b/rest/api/v3/link_branding/api_disassociate_branded_link_from_subuser.go new file mode 100644 index 00000000..4b36641b --- /dev/null +++ b/rest/api/v3/link_branding/api_disassociate_branded_link_from_subuser.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type DisassociateBrandedLinkFromSubuserParam struct { + // The username of the subuser account that you want to disassociate a branded link from. + Username *string `json:"username"` +} + +func (params *DisassociateBrandedLinkFromSubuserParam) SetUsername(Username string) *DisassociateBrandedLinkFromSubuserParam { + params.Username = &Username + return params +} + +// **This endpoint allows you to take a branded link away from a subuser.** Link branding can be associated with subusers from the parent account. This functionality allows subusers to send mail using their parent's link branding. To associate link branding, the parent account must first create a branded link and validate it. The parent may then associate that branded link with a subuser via the API or the [Subuser Management page of the Twilio SendGrid App](https://app.sendgrid.com/settings/subusers). Your request will receive a response with a 204 status code if the disassociation was successful. +func (c *ApiService) DisassociateBrandedLinkFromSubuser(params *DisassociateBrandedLinkFromSubuserParam) (interface{}, error) { + path := "/v3/whitelabel/links/subuser" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Username != nil { + data.Set("username", *params.Username) + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/link_branding/api_get_branded_link.go b/rest/api/v3/link_branding/api_get_branded_link.go new file mode 100644 index 00000000..3957575e --- /dev/null +++ b/rest/api/v3/link_branding/api_get_branded_link.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type GetBrandedLinkParam struct { + // The ID of the branded link you want to retrieve. + Id *int32 `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetBrandedLinkParam) SetId(Id int32) *GetBrandedLinkParam { + params.Id = &Id + return params +} +func (params *GetBrandedLinkParam) SetOnbehalfof(Onbehalfof string) *GetBrandedLinkParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a specific branded link by providing its ID.** You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. +func (c *ApiService) GetBrandedLink(params *GetBrandedLinkParam) (interface{}, error) { + path := "/v3/whitelabel/links/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &LinkBranding200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/link_branding/api_list_branded_link.go b/rest/api/v3/link_branding/api_list_branded_link.go new file mode 100644 index 00000000..6aafbeaa --- /dev/null +++ b/rest/api/v3/link_branding/api_list_branded_link.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListBrandedLinkParam struct { + // Limits the number of results returned per page. + Limit *int32 `json:"limit,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListBrandedLinkParam) SetLimit(Limit int32) *ListBrandedLinkParam { + params.Limit = &Limit + return params +} +func (params *ListBrandedLinkParam) SetOnbehalfof(Onbehalfof string) *ListBrandedLinkParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve all branded links**. You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. +func (c *ApiService) ListBrandedLink(params *ListBrandedLinkParam) (interface{}, error) { + path := "/v3/whitelabel/links" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]LinkBranding200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/link_branding/api_list_default_branded_link.go b/rest/api/v3/link_branding/api_list_default_branded_link.go new file mode 100644 index 00000000..3a00bd17 --- /dev/null +++ b/rest/api/v3/link_branding/api_list_default_branded_link.go @@ -0,0 +1,68 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListDefaultBrandedLinkParam struct { + // The domain to match against when finding the default branded link. + Domain *string `json:"domain,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListDefaultBrandedLinkParam) SetDomain(Domain string) *ListDefaultBrandedLinkParam { + params.Domain = &Domain + return params +} +func (params *ListDefaultBrandedLinkParam) SetOnbehalfof(Onbehalfof string) *ListDefaultBrandedLinkParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve the default branded link.** The default branded link is the actual URL to be used when sending messages. If you have more than one branded link, the default is determined by the following order: * The validated branded link marked as `default` (set when you call the \"Create a branded link\" endpoint or by calling the \"Update a branded link\" endpoint on an existing link) * Legacy branded links (migrated from the whitelabel wizard) * Default SendGrid-branded links (i.e., `100.ct.sendgrid.net`) You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. +func (c *ApiService) ListDefaultBrandedLink(params *ListDefaultBrandedLinkParam) (interface{}, error) { + path := "/v3/whitelabel/links/default" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Domain != nil { + data.Set("domain", *params.Domain) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &LinkBranding200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/link_branding/api_list_subuser_branded_link.go b/rest/api/v3/link_branding/api_list_subuser_branded_link.go new file mode 100644 index 00000000..fdfda6cd --- /dev/null +++ b/rest/api/v3/link_branding/api_list_subuser_branded_link.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListSubuserBrandedLinkParam struct { + // The username of the subuser to retrieve associated branded links for. + Username *string `json:"username"` +} + +func (params *ListSubuserBrandedLinkParam) SetUsername(Username string) *ListSubuserBrandedLinkParam { + params.Username = &Username + return params +} + +// **This endpoint allows you to retrieve the branded link associated with a subuser.** Link branding can be associated with subusers from the parent account. This functionality allows subusers to send mail using their parent's link branding. To associate link branding, the parent account must first create a branded link and then validate it. The parent may then associate that branded link with a subuser via the API or the [Subuser Management page of the Twilio SendGrid App](https://app.sendgrid.com/settings/subusers). +func (c *ApiService) ListSubuserBrandedLink(params *ListSubuserBrandedLinkParam) (interface{}, error) { + path := "/v3/whitelabel/links/subuser" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Username != nil { + data.Set("username", *params.Username) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &LinkBranding200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/link_branding/api_service.go b/rest/api/v3/link_branding/api_service.go new file mode 100644 index 00000000..53680fb0 --- /dev/null +++ b/rest/api/v3/link_branding/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/link_branding/api_update_branded_link.go b/rest/api/v3/link_branding/api_update_branded_link.go new file mode 100644 index 00000000..e9c52c10 --- /dev/null +++ b/rest/api/v3/link_branding/api_update_branded_link.go @@ -0,0 +1,85 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type UpdateBrandedLinkParam struct { + // The ID of the branded link you want to retrieve. + Id *int32 `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateBrandedLinkRequest *UpdateBrandedLinkRequest `json:"UpdateBrandedLinkRequest,omitempty"` +} + +func (params *UpdateBrandedLinkParam) SetId(Id int32) *UpdateBrandedLinkParam { + params.Id = &Id + return params +} +func (params *UpdateBrandedLinkParam) SetOnbehalfof(Onbehalfof string) *UpdateBrandedLinkParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateBrandedLinkParam) SetUpdateBrandedLinkRequest(UpdateBrandedLinkRequest UpdateBrandedLinkRequest) *UpdateBrandedLinkParam { + params.UpdateBrandedLinkRequest = &UpdateBrandedLinkRequest + return params +} + +// **This endpoint allows you to update a specific branded link. You can use this endpoint to change a branded link's default status.** You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. +func (c *ApiService) UpdateBrandedLink(params *UpdateBrandedLinkParam) (interface{}, error) { + path := "/v3/whitelabel/links/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateBrandedLinkRequest != nil { + b, err := json.Marshal(*params.UpdateBrandedLinkRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &LinkBranding200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/link_branding/api_validate_branded_link.go b/rest/api/v3/link_branding/api_validate_branded_link.go new file mode 100644 index 00000000..c3501327 --- /dev/null +++ b/rest/api/v3/link_branding/api_validate_branded_link.go @@ -0,0 +1,78 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type ValidateBrandedLinkParam struct { + // The ID of the branded link that you want to validate. + Id *int32 `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ValidateBrandedLinkParam) SetId(Id int32) *ValidateBrandedLinkParam { + params.Id = &Id + return params +} +func (params *ValidateBrandedLinkParam) SetOnbehalfof(Onbehalfof string) *ValidateBrandedLinkParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to validate a branded link.** You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. +func (c *ApiService) ValidateBrandedLink(params *ValidateBrandedLinkParam) (interface{}, error) { + path := "/v3/whitelabel/links/{Id}/validate" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ValidateBrandedLink200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ValidateBrandedLink500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/link_branding/docs/AssociateBrandedLinkWithSubuser.md b/rest/api/v3/link_branding/docs/AssociateBrandedLinkWithSubuser.md new file mode 100644 index 00000000..f15454e0 --- /dev/null +++ b/rest/api/v3/link_branding/docs/AssociateBrandedLinkWithSubuser.md @@ -0,0 +1,52 @@ +# AssociateBrandedLinkWithSubuser + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AssociateBrandedLinkWithSubuser**](AssociateBrandedLinkWithSubuser.md#AssociateBrandedLinkWithSubuser) | **Post** /v3/whitelabel/links/{LinkId}/subuser | Associate a branded link with a subuser + + + +## AssociateBrandedLinkWithSubuser + +> LinkBranding200 AssociateBrandedLinkWithSubuser(ctx, LinkIdoptional) + +Associate a branded link with a subuser + +**This endpoint allows you to associate a branded link with a subuser account.** Link branding can be associated with subusers from the parent account. This functionality allows subusers to send mail using their parent's link branding. To associate link branding, the parent account must first create a branded link and validate it. The parent may then associate that branded link with a subuser via the API or the [Subuser Management page of the Twilio SendGrid App](https://app.sendgrid.com/settings/subusers). + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**LinkId** | **int32** | The ID of the branded link you want to associate. + +### Other Parameters + +Other parameters are passed through a pointer to a AssociateBrandedLinkWithSubuserParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**AssociateBrandedLinkWithSubuserRequest** | [**AssociateBrandedLinkWithSubuserRequest**](AssociateBrandedLinkWithSubuserRequest.md) | + +### Return type + +[**LinkBranding200**](LinkBranding200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/link_branding/docs/AssociateBrandedLinkWithSubuserRequest.md b/rest/api/v3/link_branding/docs/AssociateBrandedLinkWithSubuserRequest.md new file mode 100644 index 00000000..09cd138a --- /dev/null +++ b/rest/api/v3/link_branding/docs/AssociateBrandedLinkWithSubuserRequest.md @@ -0,0 +1,11 @@ +# AssociateBrandedLinkWithSubuserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | The username of the subuser account that you want to associate the branded link with. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/CreateBrandedLink.md b/rest/api/v3/link_branding/docs/CreateBrandedLink.md new file mode 100644 index 00000000..46b12fea --- /dev/null +++ b/rest/api/v3/link_branding/docs/CreateBrandedLink.md @@ -0,0 +1,49 @@ +# CreateBrandedLink + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateBrandedLink**](CreateBrandedLink.md#CreateBrandedLink) | **Post** /v3/whitelabel/links | Create a branded link + + + +## CreateBrandedLink + +> LinkBranding200 CreateBrandedLink(ctx, optional) + +Create a branded link + +**This endpoint allows you to create a new branded link.** To create the link branding, supply the root domain and, optionally, the subdomain — these go into separate fields in your request body. The root domain should match your FROM email address. If you provide a subdomain, it must be different from the subdomain you used for authenticating your domain. You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateBrandedLinkParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**CreateBrandedLinkRequest** | [**CreateBrandedLinkRequest**](CreateBrandedLinkRequest.md) | + +### Return type + +[**LinkBranding200**](LinkBranding200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/link_branding/docs/CreateBrandedLinkRequest.md b/rest/api/v3/link_branding/docs/CreateBrandedLinkRequest.md new file mode 100644 index 00000000..1f9c4806 --- /dev/null +++ b/rest/api/v3/link_branding/docs/CreateBrandedLinkRequest.md @@ -0,0 +1,14 @@ +# CreateBrandedLinkRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Domain** | **string** | The root domain for the subdomain that you are creating the link branding for. This should match your FROM email address. | +**Subdomain** | **string** | The subdomain to create the link branding for. Must be different from the subdomain you used for authenticating your domain. |[optional] +**Default** | [**Default**](Default.md) | Indicates if you want to use this link branding as the default or fallback. When setting a new default, the existing default link branding will have its default status removed automatically. |[optional] +**Region** | [**Region**](Region.md) | The region of the IP address. Can be `eu` or `us`. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/Default.md b/rest/api/v3/link_branding/docs/Default.md new file mode 100644 index 00000000..d28299bf --- /dev/null +++ b/rest/api/v3/link_branding/docs/Default.md @@ -0,0 +1,13 @@ +# Default + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TRUE** | bool | (value: `true`) +**FALSE** | bool | (value: `false`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/Default1.md b/rest/api/v3/link_branding/docs/Default1.md new file mode 100644 index 00000000..5c6f9287 --- /dev/null +++ b/rest/api/v3/link_branding/docs/Default1.md @@ -0,0 +1,13 @@ +# Default1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TRUE** | bool | (value: `true`) +**FALSE** | bool | (value: `false`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/Default2.md b/rest/api/v3/link_branding/docs/Default2.md new file mode 100644 index 00000000..41b408e4 --- /dev/null +++ b/rest/api/v3/link_branding/docs/Default2.md @@ -0,0 +1,13 @@ +# Default2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TRUE** | bool | (value: `true`) +**FALSE** | bool | (value: `false`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/DeleteBrandedLink.md b/rest/api/v3/link_branding/docs/DeleteBrandedLink.md new file mode 100644 index 00000000..994d7546 --- /dev/null +++ b/rest/api/v3/link_branding/docs/DeleteBrandedLink.md @@ -0,0 +1,52 @@ +# DeleteBrandedLink + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteBrandedLink**](DeleteBrandedLink.md#DeleteBrandedLink) | **Delete** /v3/whitelabel/links/{Id} | Delete a branded link + + + +## DeleteBrandedLink + +> map[string]interface{} DeleteBrandedLink(ctx, Idoptional) + +Delete a branded link + +**This endpoint allows you to delete a branded link.** Your request will receive a response with a 204 status code if the deletion was successful. The call does not return the link's details, so if you wish to record these make sure you call the \"Retrieve a branded link\" endpoint *before* you request its deletion. You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **int32** | The ID of the branded link you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteBrandedLinkParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/link_branding/docs/DisassociateBrandedLinkFromSubuser.md b/rest/api/v3/link_branding/docs/DisassociateBrandedLinkFromSubuser.md new file mode 100644 index 00000000..2ec6eb15 --- /dev/null +++ b/rest/api/v3/link_branding/docs/DisassociateBrandedLinkFromSubuser.md @@ -0,0 +1,47 @@ +# DisassociateBrandedLinkFromSubuser + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DisassociateBrandedLinkFromSubuser**](DisassociateBrandedLinkFromSubuser.md#DisassociateBrandedLinkFromSubuser) | **Delete** /v3/whitelabel/links/subuser | Disassociate a branded link from a subuser + + + +## DisassociateBrandedLinkFromSubuser + +> map[string]interface{} DisassociateBrandedLinkFromSubuser(ctx, Username) + +Disassociate a branded link from a subuser + +**This endpoint allows you to take a branded link away from a subuser.** Link branding can be associated with subusers from the parent account. This functionality allows subusers to send mail using their parent's link branding. To associate link branding, the parent account must first create a branded link and validate it. The parent may then associate that branded link with a subuser via the API or the [Subuser Management page of the Twilio SendGrid App](https://app.sendgrid.com/settings/subusers). Your request will receive a response with a 204 status code if the disassociation was successful. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a DisassociateBrandedLinkFromSubuserParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/link_branding/docs/GetBrandedLink.md b/rest/api/v3/link_branding/docs/GetBrandedLink.md new file mode 100644 index 00000000..ae77aa26 --- /dev/null +++ b/rest/api/v3/link_branding/docs/GetBrandedLink.md @@ -0,0 +1,52 @@ +# GetBrandedLink + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetBrandedLink**](GetBrandedLink.md#GetBrandedLink) | **Get** /v3/whitelabel/links/{Id} | Retrieve a branded link + + + +## GetBrandedLink + +> LinkBranding200 GetBrandedLink(ctx, Idoptional) + +Retrieve a branded link + +**This endpoint allows you to retrieve a specific branded link by providing its ID.** You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **int32** | The ID of the branded link you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetBrandedLinkParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**LinkBranding200**](LinkBranding200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/link_branding/docs/Legacy.md b/rest/api/v3/link_branding/docs/Legacy.md new file mode 100644 index 00000000..fb166798 --- /dev/null +++ b/rest/api/v3/link_branding/docs/Legacy.md @@ -0,0 +1,13 @@ +# Legacy + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TRUE** | bool | (value: `true`) +**FALSE** | bool | (value: `false`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/LinkBranding200.md b/rest/api/v3/link_branding/docs/LinkBranding200.md new file mode 100644 index 00000000..1993e342 --- /dev/null +++ b/rest/api/v3/link_branding/docs/LinkBranding200.md @@ -0,0 +1,19 @@ +# LinkBranding200 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The ID of the branded link. | +**Domain** | **string** | The root domain of the branded link. | +**Subdomain** | **string** | The subdomain used to generate the DNS records for this link branding. This subdomain must be different from the subdomain used for your authenticated domain. |[optional] +**Username** | **string** | The username of the account that this link branding is associated with. | +**UserId** | **int32** | The ID of the user that this link branding is associated with. | +**Default** | [**Default2**](Default2.md) | Indicates if this is the default link branding. | +**Valid** | [**Valid3**](Valid3.md) | Indicates if this link branding is valid. | +**Legacy** | [**Legacy**](Legacy.md) | Indicates if this link branding was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create new link branding if you need to update it. | +**Dns** | [**LinkBranding200Dns**](LinkBranding200Dns.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/LinkBranding200Dns.md b/rest/api/v3/link_branding/docs/LinkBranding200Dns.md new file mode 100644 index 00000000..48e06ca8 --- /dev/null +++ b/rest/api/v3/link_branding/docs/LinkBranding200Dns.md @@ -0,0 +1,12 @@ +# LinkBranding200Dns + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DomainCname** | [**LinkBranding200DnsDomainCname**](LinkBranding200DnsDomainCname.md) | | +**OwnerCname** | [**LinkBranding200DnsOwnerCname**](LinkBranding200DnsOwnerCname.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/LinkBranding200DnsDomainCname.md b/rest/api/v3/link_branding/docs/LinkBranding200DnsDomainCname.md new file mode 100644 index 00000000..4642dbe5 --- /dev/null +++ b/rest/api/v3/link_branding/docs/LinkBranding200DnsDomainCname.md @@ -0,0 +1,14 @@ +# LinkBranding200DnsDomainCname + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Valid** | [**Valid4**](Valid4.md) | Indicates if the DNS record is valid. | +**Type** | [**Type**](Type.md) | The type of DNS record that was generated. | +**Host** | **string** | The domain that this link branding will use for the links in your email. | +**Data** | **string** | The domain that the DNS record points to. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/LinkBranding200DnsOwnerCname.md b/rest/api/v3/link_branding/docs/LinkBranding200DnsOwnerCname.md new file mode 100644 index 00000000..d87102cd --- /dev/null +++ b/rest/api/v3/link_branding/docs/LinkBranding200DnsOwnerCname.md @@ -0,0 +1,14 @@ +# LinkBranding200DnsOwnerCname + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Valid** | [**Valid5**](Valid5.md) | Indicates if the DNS record is valid. | +**Type** | [**Type1**](Type1.md) | The type of DNS record generated. |[optional] +**Host** | **string** | Used to verify the link branding. The subdomain of this domain is the ID of the user who created the link branding. | +**Data** | **string** | The domain that the DNS record points to. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/ListBrandedLink.md b/rest/api/v3/link_branding/docs/ListBrandedLink.md new file mode 100644 index 00000000..c9b5a627 --- /dev/null +++ b/rest/api/v3/link_branding/docs/ListBrandedLink.md @@ -0,0 +1,49 @@ +# ListBrandedLink + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListBrandedLink**](ListBrandedLink.md#ListBrandedLink) | **Get** /v3/whitelabel/links | Retrieve all branded links + + + +## ListBrandedLink + +> []LinkBranding200 ListBrandedLink(ctx, optional) + +Retrieve all branded links + +**This endpoint allows you to retrieve all branded links**. You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListBrandedLinkParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **int32** | Limits the number of results returned per page. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**[]LinkBranding200**](LinkBranding200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/link_branding/docs/ListDefaultBrandedLink.md b/rest/api/v3/link_branding/docs/ListDefaultBrandedLink.md new file mode 100644 index 00000000..b8360084 --- /dev/null +++ b/rest/api/v3/link_branding/docs/ListDefaultBrandedLink.md @@ -0,0 +1,49 @@ +# ListDefaultBrandedLink + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListDefaultBrandedLink**](ListDefaultBrandedLink.md#ListDefaultBrandedLink) | **Get** /v3/whitelabel/links/default | Retrieve the default branded link + + + +## ListDefaultBrandedLink + +> LinkBranding200 ListDefaultBrandedLink(ctx, optional) + +Retrieve the default branded link + +**This endpoint allows you to retrieve the default branded link.** The default branded link is the actual URL to be used when sending messages. If you have more than one branded link, the default is determined by the following order: * The validated branded link marked as `default` (set when you call the \"Create a branded link\" endpoint or by calling the \"Update a branded link\" endpoint on an existing link) * Legacy branded links (migrated from the whitelabel wizard) * Default SendGrid-branded links (i.e., `100.ct.sendgrid.net`) You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListDefaultBrandedLinkParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Domain** | **string** | The domain to match against when finding the default branded link. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**LinkBranding200**](LinkBranding200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/link_branding/docs/ListSubuserBrandedLink.md b/rest/api/v3/link_branding/docs/ListSubuserBrandedLink.md new file mode 100644 index 00000000..5ac2695b --- /dev/null +++ b/rest/api/v3/link_branding/docs/ListSubuserBrandedLink.md @@ -0,0 +1,47 @@ +# ListSubuserBrandedLink + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSubuserBrandedLink**](ListSubuserBrandedLink.md#ListSubuserBrandedLink) | **Get** /v3/whitelabel/links/subuser | Retrieve a subuser's branded link + + + +## ListSubuserBrandedLink + +> LinkBranding200 ListSubuserBrandedLink(ctx, Username) + +Retrieve a subuser's branded link + +**This endpoint allows you to retrieve the branded link associated with a subuser.** Link branding can be associated with subusers from the parent account. This functionality allows subusers to send mail using their parent's link branding. To associate link branding, the parent account must first create a branded link and then validate it. The parent may then associate that branded link with a subuser via the API or the [Subuser Management page of the Twilio SendGrid App](https://app.sendgrid.com/settings/subusers). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSubuserBrandedLinkParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**LinkBranding200**](LinkBranding200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/link_branding/docs/Region.md b/rest/api/v3/link_branding/docs/Region.md new file mode 100644 index 00000000..e861b3d5 --- /dev/null +++ b/rest/api/v3/link_branding/docs/Region.md @@ -0,0 +1,13 @@ +# Region + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**EU** | string | (value: `"eu"`) +**US** | string | (value: `"us"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/Type.md b/rest/api/v3/link_branding/docs/Type.md new file mode 100644 index 00000000..a510350e --- /dev/null +++ b/rest/api/v3/link_branding/docs/Type.md @@ -0,0 +1,14 @@ +# Type + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**CNAME** | string | (value: `"cname"`) +**TXT** | string | (value: `"txt"`) +**MX** | string | (value: `"mx"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/Type1.md b/rest/api/v3/link_branding/docs/Type1.md new file mode 100644 index 00000000..5534cbae --- /dev/null +++ b/rest/api/v3/link_branding/docs/Type1.md @@ -0,0 +1,14 @@ +# Type1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**CNAME** | string | (value: `"cname"`) +**TXT** | string | (value: `"txt"`) +**MX** | string | (value: `"mx"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/UpdateBrandedLink.md b/rest/api/v3/link_branding/docs/UpdateBrandedLink.md new file mode 100644 index 00000000..c86f728b --- /dev/null +++ b/rest/api/v3/link_branding/docs/UpdateBrandedLink.md @@ -0,0 +1,53 @@ +# UpdateBrandedLink + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateBrandedLink**](UpdateBrandedLink.md#UpdateBrandedLink) | **Patch** /v3/whitelabel/links/{Id} | Update a branded link + + + +## UpdateBrandedLink + +> LinkBranding200 UpdateBrandedLink(ctx, Idoptional) + +Update a branded link + +**This endpoint allows you to update a specific branded link. You can use this endpoint to change a branded link's default status.** You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **int32** | The ID of the branded link you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateBrandedLinkParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateBrandedLinkRequest** | [**UpdateBrandedLinkRequest**](UpdateBrandedLinkRequest.md) | + +### Return type + +[**LinkBranding200**](LinkBranding200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/link_branding/docs/UpdateBrandedLinkRequest.md b/rest/api/v3/link_branding/docs/UpdateBrandedLinkRequest.md new file mode 100644 index 00000000..2072273a --- /dev/null +++ b/rest/api/v3/link_branding/docs/UpdateBrandedLinkRequest.md @@ -0,0 +1,11 @@ +# UpdateBrandedLinkRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Default** | [**Default1**](Default1.md) | Indicates if the branded link is set as the default. When setting a new default, the existing default link branding will have its default status removed automatically. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/Valid.md b/rest/api/v3/link_branding/docs/Valid.md new file mode 100644 index 00000000..2addd0e7 --- /dev/null +++ b/rest/api/v3/link_branding/docs/Valid.md @@ -0,0 +1,13 @@ +# Valid + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TRUE** | bool | (value: `true`) +**FALSE** | bool | (value: `false`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/Valid1.md b/rest/api/v3/link_branding/docs/Valid1.md new file mode 100644 index 00000000..bca4d56b --- /dev/null +++ b/rest/api/v3/link_branding/docs/Valid1.md @@ -0,0 +1,13 @@ +# Valid1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TRUE** | bool | (value: `true`) +**FALSE** | bool | (value: `false`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/Valid2.md b/rest/api/v3/link_branding/docs/Valid2.md new file mode 100644 index 00000000..3abe1153 --- /dev/null +++ b/rest/api/v3/link_branding/docs/Valid2.md @@ -0,0 +1,13 @@ +# Valid2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TRUE** | bool | (value: `true`) +**FALSE** | bool | (value: `false`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/Valid3.md b/rest/api/v3/link_branding/docs/Valid3.md new file mode 100644 index 00000000..dfdefa92 --- /dev/null +++ b/rest/api/v3/link_branding/docs/Valid3.md @@ -0,0 +1,13 @@ +# Valid3 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TRUE** | bool | (value: `true`) +**FALSE** | bool | (value: `false`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/Valid4.md b/rest/api/v3/link_branding/docs/Valid4.md new file mode 100644 index 00000000..e088e125 --- /dev/null +++ b/rest/api/v3/link_branding/docs/Valid4.md @@ -0,0 +1,13 @@ +# Valid4 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TRUE** | bool | (value: `true`) +**FALSE** | bool | (value: `false`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/Valid5.md b/rest/api/v3/link_branding/docs/Valid5.md new file mode 100644 index 00000000..a3efe196 --- /dev/null +++ b/rest/api/v3/link_branding/docs/Valid5.md @@ -0,0 +1,13 @@ +# Valid5 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TRUE** | bool | (value: `true`) +**FALSE** | bool | (value: `false`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/ValidateBrandedLink.md b/rest/api/v3/link_branding/docs/ValidateBrandedLink.md new file mode 100644 index 00000000..98ebba01 --- /dev/null +++ b/rest/api/v3/link_branding/docs/ValidateBrandedLink.md @@ -0,0 +1,52 @@ +# ValidateBrandedLink + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ValidateBrandedLink**](ValidateBrandedLink.md#ValidateBrandedLink) | **Post** /v3/whitelabel/links/{Id}/validate | Validate a branded link + + + +## ValidateBrandedLink + +> ValidateBrandedLink200Response ValidateBrandedLink(ctx, Idoptional) + +Validate a branded link + +**This endpoint allows you to validate a branded link.** You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **int32** | The ID of the branded link that you want to validate. + +### Other Parameters + +Other parameters are passed through a pointer to a ValidateBrandedLinkParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ValidateBrandedLink200Response**](ValidateBrandedLink200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/link_branding/docs/ValidateBrandedLink200Response.md b/rest/api/v3/link_branding/docs/ValidateBrandedLink200Response.md new file mode 100644 index 00000000..b90b62ad --- /dev/null +++ b/rest/api/v3/link_branding/docs/ValidateBrandedLink200Response.md @@ -0,0 +1,13 @@ +# ValidateBrandedLink200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The ID of the branded link. | +**Valid** | [**Valid**](Valid.md) | Indicates if the link branding is valid. | +**ValidationResults** | [**ValidateBrandedLink200ResponseValidationResults**](ValidateBrandedLink200ResponseValidationResults.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResults.md b/rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResults.md new file mode 100644 index 00000000..a1fba585 --- /dev/null +++ b/rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResults.md @@ -0,0 +1,12 @@ +# ValidateBrandedLink200ResponseValidationResults + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DomainCname** | [**ValidateBrandedLink200ResponseValidationResultsDomainCname**](ValidateBrandedLink200ResponseValidationResultsDomainCname.md) | | +**OwnerCname** | [**ValidateBrandedLink200ResponseValidationResultsOwnerCname**](ValidateBrandedLink200ResponseValidationResultsOwnerCname.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResultsDomainCname.md b/rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResultsDomainCname.md new file mode 100644 index 00000000..25e06af9 --- /dev/null +++ b/rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResultsDomainCname.md @@ -0,0 +1,12 @@ +# ValidateBrandedLink200ResponseValidationResultsDomainCname + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Valid** | [**Valid1**](Valid1.md) | Indicates if this DNS record is valid. | +**Reason** | **string** | Null if the DNS record is valid. If the DNS record is invalid, this will explain why. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResultsOwnerCname.md b/rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResultsOwnerCname.md new file mode 100644 index 00000000..b9514012 --- /dev/null +++ b/rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResultsOwnerCname.md @@ -0,0 +1,12 @@ +# ValidateBrandedLink200ResponseValidationResultsOwnerCname + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Valid** | [**Valid2**](Valid2.md) | Indicates if the DNS record is valid. | +**Reason** | **string** | Null if valid. If the DNS record is invalid, this will explain why. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/ValidateBrandedLink500Response.md b/rest/api/v3/link_branding/docs/ValidateBrandedLink500Response.md new file mode 100644 index 00000000..53528b60 --- /dev/null +++ b/rest/api/v3/link_branding/docs/ValidateBrandedLink500Response.md @@ -0,0 +1,11 @@ +# ValidateBrandedLink500Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ValidateBrandedLink500ResponseErrorsInner**](ValidateBrandedLink500ResponseErrorsInner.md) | The reasons why the validation failed. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/ValidateBrandedLink500ResponseErrorsInner.md b/rest/api/v3/link_branding/docs/ValidateBrandedLink500ResponseErrorsInner.md new file mode 100644 index 00000000..1e8880fd --- /dev/null +++ b/rest/api/v3/link_branding/docs/ValidateBrandedLink500ResponseErrorsInner.md @@ -0,0 +1,11 @@ +# ValidateBrandedLink500ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | The reason why the link whitelabel could not be validated. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/model_associate_branded_link_with_subuser_request.go b/rest/api/v3/link_branding/model_associate_branded_link_with_subuser_request.go new file mode 100644 index 00000000..58038420 --- /dev/null +++ b/rest/api/v3/link_branding/model_associate_branded_link_with_subuser_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AssociateBrandedLinkWithSubuserRequest struct for AssociateBrandedLinkWithSubuserRequest +type AssociateBrandedLinkWithSubuserRequest struct { + // The username of the subuser account that you want to associate the branded link with. + Username *string `json:"username,omitempty"` +} diff --git a/rest/api/v3/link_branding/model_create_branded_link_request.go b/rest/api/v3/link_branding/model_create_branded_link_request.go new file mode 100644 index 00000000..7a72f580 --- /dev/null +++ b/rest/api/v3/link_branding/model_create_branded_link_request.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateBrandedLinkRequest struct for CreateBrandedLinkRequest +type CreateBrandedLinkRequest struct { + // The root domain for the subdomain that you are creating the link branding for. This should match your FROM email address. + Domain string `json:"domain"` + // The subdomain to create the link branding for. Must be different from the subdomain you used for authenticating your domain. + Subdomain *string `json:"subdomain,omitempty"` + // Indicates if you want to use this link branding as the default or fallback. When setting a new default, the existing default link branding will have its default status removed automatically. + Default *Default `json:"default,omitempty"` + // The region of the IP address. Can be `eu` or `us`. + Region *Region `json:"region,omitempty"` +} diff --git a/rest/api/v3/link_branding/model_default.go b/rest/api/v3/link_branding/model_default.go new file mode 100644 index 00000000..537e69bc --- /dev/null +++ b/rest/api/v3/link_branding/model_default.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Default the model 'Default' +type Default bool + +// List of Default +const ( + DEFAULT_TRUE Default = true + DEFAULT_FALSE Default = false +) diff --git a/rest/api/v3/link_branding/model_default1.go b/rest/api/v3/link_branding/model_default1.go new file mode 100644 index 00000000..eda59858 --- /dev/null +++ b/rest/api/v3/link_branding/model_default1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Default1 the model 'Default1' +type Default1 bool + +// List of Default1 +const ( + DEFAULT1_TRUE Default1 = true + DEFAULT1_FALSE Default1 = false +) diff --git a/rest/api/v3/link_branding/model_default2.go b/rest/api/v3/link_branding/model_default2.go new file mode 100644 index 00000000..e16aeccb --- /dev/null +++ b/rest/api/v3/link_branding/model_default2.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Default2 the model 'Default2' +type Default2 bool + +// List of Default2 +const ( + DEFAULT2_TRUE Default2 = true + DEFAULT2_FALSE Default2 = false +) diff --git a/rest/api/v3/link_branding/model_legacy.go b/rest/api/v3/link_branding/model_legacy.go new file mode 100644 index 00000000..821b3360 --- /dev/null +++ b/rest/api/v3/link_branding/model_legacy.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Legacy the model 'Legacy' +type Legacy bool + +// List of Legacy +const ( + LEGACY_TRUE Legacy = true + LEGACY_FALSE Legacy = false +) diff --git a/rest/api/v3/link_branding/model_link_branding200.go b/rest/api/v3/link_branding/model_link_branding200.go new file mode 100644 index 00000000..ff249aa3 --- /dev/null +++ b/rest/api/v3/link_branding/model_link_branding200.go @@ -0,0 +1,35 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// LinkBranding200 struct for LinkBranding200 +type LinkBranding200 struct { + // The ID of the branded link. + Id int32 `json:"id"` + // The root domain of the branded link. + Domain string `json:"domain"` + // The subdomain used to generate the DNS records for this link branding. This subdomain must be different from the subdomain used for your authenticated domain. + Subdomain *string `json:"subdomain,omitempty"` + // The username of the account that this link branding is associated with. + Username string `json:"username"` + // The ID of the user that this link branding is associated with. + UserId int32 `json:"user_id"` + // Indicates if this is the default link branding. + Default Default2 `json:"default"` + // Indicates if this link branding is valid. + Valid Valid3 `json:"valid"` + // Indicates if this link branding was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create new link branding if you need to update it. + Legacy Legacy `json:"legacy"` + Dns LinkBranding200Dns `json:"dns"` +} diff --git a/rest/api/v3/link_branding/model_link_branding200_dns.go b/rest/api/v3/link_branding/model_link_branding200_dns.go new file mode 100644 index 00000000..6a3cd783 --- /dev/null +++ b/rest/api/v3/link_branding/model_link_branding200_dns.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// LinkBranding200Dns The DNS records generated for this link branding. +type LinkBranding200Dns struct { + DomainCname LinkBranding200DnsDomainCname `json:"domain_cname"` + OwnerCname *LinkBranding200DnsOwnerCname `json:"owner_cname,omitempty"` +} diff --git a/rest/api/v3/link_branding/model_link_branding200_dns_domain_cname.go b/rest/api/v3/link_branding/model_link_branding200_dns_domain_cname.go new file mode 100644 index 00000000..5a324f64 --- /dev/null +++ b/rest/api/v3/link_branding/model_link_branding200_dns_domain_cname.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// LinkBranding200DnsDomainCname The DNS record generated to point to your link branding subdomain. +type LinkBranding200DnsDomainCname struct { + // Indicates if the DNS record is valid. + Valid Valid4 `json:"valid"` + // The type of DNS record that was generated. + Type Type `json:"type"` + // The domain that this link branding will use for the links in your email. + Host string `json:"host"` + // The domain that the DNS record points to. + Data string `json:"data"` +} diff --git a/rest/api/v3/link_branding/model_link_branding200_dns_owner_cname.go b/rest/api/v3/link_branding/model_link_branding200_dns_owner_cname.go new file mode 100644 index 00000000..7f3f73c9 --- /dev/null +++ b/rest/api/v3/link_branding/model_link_branding200_dns_owner_cname.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// LinkBranding200DnsOwnerCname The DNS record generated to verify who created the link branding. +type LinkBranding200DnsOwnerCname struct { + // Indicates if the DNS record is valid. + Valid Valid5 `json:"valid"` + // The type of DNS record generated. + Type *Type1 `json:"type,omitempty"` + // Used to verify the link branding. The subdomain of this domain is the ID of the user who created the link branding. + Host string `json:"host"` + // The domain that the DNS record points to. + Data string `json:"data"` +} diff --git a/rest/api/v3/link_branding/model_region.go b/rest/api/v3/link_branding/model_region.go new file mode 100644 index 00000000..b3919cb6 --- /dev/null +++ b/rest/api/v3/link_branding/model_region.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Region the model 'Region' +type Region string + +// List of Region +const ( + REGION_EU Region = "eu" + REGION_US Region = "us" +) diff --git a/rest/api/v3/link_branding/model_type.go b/rest/api/v3/link_branding/model_type.go new file mode 100644 index 00000000..81e166bf --- /dev/null +++ b/rest/api/v3/link_branding/model_type.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Type the model 'Type' +type Type string + +// List of Type +const ( + TYPE_CNAME Type = "cname" + TYPE_TXT Type = "txt" + TYPE_MX Type = "mx" +) diff --git a/rest/api/v3/link_branding/model_type1.go b/rest/api/v3/link_branding/model_type1.go new file mode 100644 index 00000000..bf73a4a5 --- /dev/null +++ b/rest/api/v3/link_branding/model_type1.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Type1 the model 'Type1' +type Type1 string + +// List of Type1 +const ( + TYPE1_CNAME Type1 = "cname" + TYPE1_TXT Type1 = "txt" + TYPE1_MX Type1 = "mx" +) diff --git a/rest/api/v3/link_branding/model_update_branded_link_request.go b/rest/api/v3/link_branding/model_update_branded_link_request.go new file mode 100644 index 00000000..8f050b3f --- /dev/null +++ b/rest/api/v3/link_branding/model_update_branded_link_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateBrandedLinkRequest struct for UpdateBrandedLinkRequest +type UpdateBrandedLinkRequest struct { + // Indicates if the branded link is set as the default. When setting a new default, the existing default link branding will have its default status removed automatically. + Default *Default1 `json:"default,omitempty"` +} diff --git a/rest/api/v3/link_branding/model_valid.go b/rest/api/v3/link_branding/model_valid.go new file mode 100644 index 00000000..6ff1130e --- /dev/null +++ b/rest/api/v3/link_branding/model_valid.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Valid the model 'Valid' +type Valid bool + +// List of Valid +const ( + VALID_TRUE Valid = true + VALID_FALSE Valid = false +) diff --git a/rest/api/v3/link_branding/model_valid1.go b/rest/api/v3/link_branding/model_valid1.go new file mode 100644 index 00000000..b0a10088 --- /dev/null +++ b/rest/api/v3/link_branding/model_valid1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Valid1 the model 'Valid1' +type Valid1 bool + +// List of Valid1 +const ( + VALID1_TRUE Valid1 = true + VALID1_FALSE Valid1 = false +) diff --git a/rest/api/v3/link_branding/model_valid2.go b/rest/api/v3/link_branding/model_valid2.go new file mode 100644 index 00000000..b5131fe2 --- /dev/null +++ b/rest/api/v3/link_branding/model_valid2.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Valid2 the model 'Valid2' +type Valid2 bool + +// List of Valid2 +const ( + VALID2_TRUE Valid2 = true + VALID2_FALSE Valid2 = false +) diff --git a/rest/api/v3/link_branding/model_valid3.go b/rest/api/v3/link_branding/model_valid3.go new file mode 100644 index 00000000..5dcb4a84 --- /dev/null +++ b/rest/api/v3/link_branding/model_valid3.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Valid3 the model 'Valid3' +type Valid3 bool + +// List of Valid3 +const ( + VALID3_TRUE Valid3 = true + VALID3_FALSE Valid3 = false +) diff --git a/rest/api/v3/link_branding/model_valid4.go b/rest/api/v3/link_branding/model_valid4.go new file mode 100644 index 00000000..6f6bff20 --- /dev/null +++ b/rest/api/v3/link_branding/model_valid4.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Valid4 the model 'Valid4' +type Valid4 bool + +// List of Valid4 +const ( + VALID4_TRUE Valid4 = true + VALID4_FALSE Valid4 = false +) diff --git a/rest/api/v3/link_branding/model_valid5.go b/rest/api/v3/link_branding/model_valid5.go new file mode 100644 index 00000000..3edd72fb --- /dev/null +++ b/rest/api/v3/link_branding/model_valid5.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Valid5 the model 'Valid5' +type Valid5 bool + +// List of Valid5 +const ( + VALID5_TRUE Valid5 = true + VALID5_FALSE Valid5 = false +) diff --git a/rest/api/v3/link_branding/model_validate_branded_link_200_response.go b/rest/api/v3/link_branding/model_validate_branded_link_200_response.go new file mode 100644 index 00000000..260ce5cd --- /dev/null +++ b/rest/api/v3/link_branding/model_validate_branded_link_200_response.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateBrandedLink200Response struct for ValidateBrandedLink200Response +type ValidateBrandedLink200Response struct { + // The ID of the branded link. + Id int32 `json:"id"` + // Indicates if the link branding is valid. + Valid Valid `json:"valid"` + ValidationResults ValidateBrandedLink200ResponseValidationResults `json:"validation_results"` +} diff --git a/rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results.go b/rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results.go new file mode 100644 index 00000000..5d4035c4 --- /dev/null +++ b/rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateBrandedLink200ResponseValidationResults The individual validation results for each of the DNS records associated with this branded link. +type ValidateBrandedLink200ResponseValidationResults struct { + DomainCname ValidateBrandedLink200ResponseValidationResultsDomainCname `json:"domain_cname"` + OwnerCname *ValidateBrandedLink200ResponseValidationResultsOwnerCname `json:"owner_cname,omitempty"` +} diff --git a/rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results_domain_cname.go b/rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results_domain_cname.go new file mode 100644 index 00000000..4abbea3a --- /dev/null +++ b/rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results_domain_cname.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateBrandedLink200ResponseValidationResultsDomainCname The DNS record generated for the sending domain used for this branded link. +type ValidateBrandedLink200ResponseValidationResultsDomainCname struct { + // Indicates if this DNS record is valid. + Valid Valid1 `json:"valid"` + // Null if the DNS record is valid. If the DNS record is invalid, this will explain why. + Reason string `json:"reason"` +} diff --git a/rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results_owner_cname.go b/rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results_owner_cname.go new file mode 100644 index 00000000..0ee10180 --- /dev/null +++ b/rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results_owner_cname.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateBrandedLink200ResponseValidationResultsOwnerCname The DNS record created to verify the branded link. +type ValidateBrandedLink200ResponseValidationResultsOwnerCname struct { + // Indicates if the DNS record is valid. + Valid Valid2 `json:"valid"` + // Null if valid. If the DNS record is invalid, this will explain why. + Reason string `json:"reason"` +} diff --git a/rest/api/v3/link_branding/model_validate_branded_link_500_response.go b/rest/api/v3/link_branding/model_validate_branded_link_500_response.go new file mode 100644 index 00000000..f0ddbfc0 --- /dev/null +++ b/rest/api/v3/link_branding/model_validate_branded_link_500_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateBrandedLink500Response struct for ValidateBrandedLink500Response +type ValidateBrandedLink500Response struct { + // The reasons why the validation failed. + Errors []ValidateBrandedLink500ResponseErrorsInner `json:"errors"` +} diff --git a/rest/api/v3/link_branding/model_validate_branded_link_500_response_errors_inner.go b/rest/api/v3/link_branding/model_validate_branded_link_500_response_errors_inner.go new file mode 100644 index 00000000..d0d11fbc --- /dev/null +++ b/rest/api/v3/link_branding/model_validate_branded_link_500_response_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateBrandedLink500ResponseErrorsInner struct for ValidateBrandedLink500ResponseErrorsInner +type ValidateBrandedLink500ResponseErrorsInner struct { + // The reason why the link whitelabel could not be validated. + Message string `json:"message"` +} diff --git a/rest/api/v3/lmc_campaigns/.openapi-generator b/rest/api/v3/lmc_campaigns/.openapi-generator new file mode 100644 index 00000000..5e92bef0 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/.openapi-generator @@ -0,0 +1,60 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_create_campaign.go +api_delete_campaign.go +api_get_campaign.go +api_get_scheduled_campaign.go +api_list_campaign.go +api_schedule_campaign.go +api_send_campaign.go +api_send_test_campaign.go +api_service.go +api_un_schedule_campaign.go +api_update_campaign.go +api_update_scheduled_campaign.go +docs/Campaigns2xx.md +docs/CreateCampaign.md +docs/DeleteCampaign.md +docs/Editor.md +docs/ErrorResponse.md +docs/ErrorResponseErrorsInner.md +docs/GetCampaign.md +docs/GetCampaign200Response.md +docs/GetScheduledCampaign.md +docs/ListCampaign.md +docs/ListCampaign200Response.md +docs/PostCampaignsRequest.md +docs/ScheduleACampaignRequest.md +docs/ScheduleACampaignResponse.md +docs/ScheduleCampaign.md +docs/SendACampaignResponse.md +docs/SendATestCampaignRequest.md +docs/SendCampaign.md +docs/SendTestCampaign.md +docs/SendTestCampaignRequest.md +docs/Status.md +docs/UnScheduleCampaign.md +docs/UpdateACampaignRequest.md +docs/UpdateAScheduledCampaignRequest.md +docs/UpdateAScheduledCampaignResponse.md +docs/UpdateCampaign.md +docs/UpdateScheduledCampaign.md +docs/ViewScheduledTimeOfACampaignResponse.md +model_campaigns2xx.go +model_editor.go +model_error_response.go +model_error_response_errors_inner.go +model_get_campaign_200_response.go +model_list_campaign_200_response.go +model_post_campaigns_request.go +model_schedule_a_campaign_request.go +model_schedule_a_campaign_response.go +model_send_a_campaign_response.go +model_send_a_test_campaign_request.go +model_send_test_campaign_request.go +model_status.go +model_update_a_campaign_request.go +model_update_a_scheduled_campaign_request.go +model_update_a_scheduled_campaign_response.go +model_view_scheduled_time_of_a_campaign_response.go diff --git a/rest/api/v3/lmc_campaigns/.openapi-generator-ignore b/rest/api/v3/lmc_campaigns/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/lmc_campaigns/README.md b/rest/api/v3/lmc_campaigns/README.md new file mode 100644 index 00000000..b368143a --- /dev/null +++ b/rest/api/v3/lmc_campaigns/README.md @@ -0,0 +1,88 @@ +# Go API client for + +The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). + +See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:43.516245+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateCampaign* | [**CreateCampaign**](docs/CreateCampaign.md#createcampaign) | **Post** /v3/campaigns | Create a Campaign +*DeleteCampaign* | [**DeleteCampaign**](docs/DeleteCampaign.md#deletecampaign) | **Delete** /v3/campaigns/{CampaignId} | Delete a Campaign +*GetCampaign* | [**GetCampaign**](docs/GetCampaign.md#getcampaign) | **Get** /v3/campaigns/{CampaignId} | Retrieve a single campaign +*GetScheduledCampaign* | [**GetScheduledCampaign**](docs/GetScheduledCampaign.md#getscheduledcampaign) | **Get** /v3/campaigns/{CampaignId}/schedules | View Scheduled Time of a Campaign +*ListCampaign* | [**ListCampaign**](docs/ListCampaign.md#listcampaign) | **Get** /v3/campaigns | Retrieve all Campaigns +*ScheduleCampaign* | [**ScheduleCampaign**](docs/ScheduleCampaign.md#schedulecampaign) | **Post** /v3/campaigns/{CampaignId}/schedules | Schedule a Campaign +*SendCampaign* | [**SendCampaign**](docs/SendCampaign.md#sendcampaign) | **Post** /v3/campaigns/{CampaignId}/schedules/now | Send a Campaign +*SendTestCampaign* | [**SendTestCampaign**](docs/SendTestCampaign.md#sendtestcampaign) | **Post** /v3/campaigns/{CampaignId}/schedules/test | Send a Test Campaign +*UnScheduleCampaign* | [**UnScheduleCampaign**](docs/UnScheduleCampaign.md#unschedulecampaign) | **Delete** /v3/campaigns/{CampaignId}/schedules | Unschedule a Scheduled Campaign +*UpdateCampaign* | [**UpdateCampaign**](docs/UpdateCampaign.md#updatecampaign) | **Patch** /v3/campaigns/{CampaignId} | Update a Campaign +*UpdateScheduledCampaign* | [**UpdateScheduledCampaign**](docs/UpdateScheduledCampaign.md#updatescheduledcampaign) | **Patch** /v3/campaigns/{CampaignId}/schedules | Update a Scheduled Campaign + + +## Documentation For Models + + - [Campaigns2xx](Campaigns2xx.md) + - [Editor](Editor.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [GetCampaign200Response](GetCampaign200Response.md) + - [ListCampaign200Response](ListCampaign200Response.md) + - [PostCampaignsRequest](PostCampaignsRequest.md) + - [ScheduleACampaignRequest](ScheduleACampaignRequest.md) + - [ScheduleACampaignResponse](ScheduleACampaignResponse.md) + - [SendACampaignResponse](SendACampaignResponse.md) + - [SendATestCampaignRequest](SendATestCampaignRequest.md) + - [SendTestCampaignRequest](SendTestCampaignRequest.md) + - [Status](Status.md) + - [UpdateACampaignRequest](UpdateACampaignRequest.md) + - [UpdateAScheduledCampaignRequest](UpdateAScheduledCampaignRequest.md) + - [UpdateAScheduledCampaignResponse](UpdateAScheduledCampaignResponse.md) + - [ViewScheduledTimeOfACampaignResponse](ViewScheduledTimeOfACampaignResponse.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/lmc_campaigns/api_create_campaign.go b/rest/api/v3/lmc_campaigns/api_create_campaign.go new file mode 100644 index 00000000..39caf532 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/api_create_campaign.go @@ -0,0 +1,89 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type CreateCampaignParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + PostCampaignsRequest *PostCampaignsRequest `json:"PostCampaignsRequest,omitempty"` +} + +func (params *CreateCampaignParam) SetOnbehalfof(Onbehalfof string) *CreateCampaignParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateCampaignParam) SetPostCampaignsRequest(PostCampaignsRequest PostCampaignsRequest) *CreateCampaignParam { + params.PostCampaignsRequest = &PostCampaignsRequest + return params +} + +// **This endpoint allows you to create a campaign.** In order to send or schedule the campaign, you will be required to provide a subject, sender ID, content (we suggest both html and plain text), and at least one list or segment ID. This information is not required when you create a campaign. +func (c *ApiService) CreateCampaign(params *CreateCampaignParam) (interface{}, error) { + path := "/v3/campaigns" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.PostCampaignsRequest != nil { + b, err := json.Marshal(*params.PostCampaignsRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &Campaigns2xx{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_campaigns/api_delete_campaign.go b/rest/api/v3/lmc_campaigns/api_delete_campaign.go new file mode 100644 index 00000000..da543aa7 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/api_delete_campaign.go @@ -0,0 +1,78 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type DeleteCampaignParam struct { + // The id of the campaign you would like to retrieve. + CampaignId *int32 `json:"campaign_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteCampaignParam) SetCampaignId(CampaignId int32) *DeleteCampaignParam { + params.CampaignId = &CampaignId + return params +} +func (params *DeleteCampaignParam) SetOnbehalfof(Onbehalfof string) *DeleteCampaignParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete a specific campaign.** +func (c *ApiService) DeleteCampaign(params *DeleteCampaignParam) (interface{}, error) { + path := "/v3/campaigns/{CampaignId}" + if params != nil && params.CampaignId != nil { + path = strings.Replace(path, "{"+"CampaignId"+"}", fmt.Sprint(*params.CampaignId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 401 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_campaigns/api_get_campaign.go b/rest/api/v3/lmc_campaigns/api_get_campaign.go new file mode 100644 index 00000000..d337ce94 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/api_get_campaign.go @@ -0,0 +1,86 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type GetCampaignParam struct { + // The id of the campaign you would like to retrieve. + CampaignId *int32 `json:"campaign_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetCampaignParam) SetCampaignId(CampaignId int32) *GetCampaignParam { + params.CampaignId = &CampaignId + return params +} +func (params *GetCampaignParam) SetOnbehalfof(Onbehalfof string) *GetCampaignParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a specific campaign.** +func (c *ApiService) GetCampaign(params *GetCampaignParam) (interface{}, error) { + path := "/v3/campaigns/{CampaignId}" + if params != nil && params.CampaignId != nil { + path = strings.Replace(path, "{"+"CampaignId"+"}", fmt.Sprint(*params.CampaignId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetCampaign200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_campaigns/api_get_scheduled_campaign.go b/rest/api/v3/lmc_campaigns/api_get_scheduled_campaign.go new file mode 100644 index 00000000..15941fd4 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/api_get_scheduled_campaign.go @@ -0,0 +1,78 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type GetScheduledCampaignParam struct { + // + CampaignId *int32 `json:"campaign_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetScheduledCampaignParam) SetCampaignId(CampaignId int32) *GetScheduledCampaignParam { + params.CampaignId = &CampaignId + return params +} +func (params *GetScheduledCampaignParam) SetOnbehalfof(Onbehalfof string) *GetScheduledCampaignParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve the date and time that a campaign has been scheduled to be sent.** +func (c *ApiService) GetScheduledCampaign(params *GetScheduledCampaignParam) (interface{}, error) { + path := "/v3/campaigns/{CampaignId}/schedules" + if params != nil && params.CampaignId != nil { + path = strings.Replace(path, "{"+"CampaignId"+"}", fmt.Sprint(*params.CampaignId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ViewScheduledTimeOfACampaignResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_campaigns/api_list_campaign.go b/rest/api/v3/lmc_campaigns/api_list_campaign.go new file mode 100644 index 00000000..326e4536 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/api_list_campaign.go @@ -0,0 +1,78 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListCampaignParam struct { + // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. + Limit *int32 `json:"limit,omitempty"` + // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + Offset *int32 `json:"offset,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListCampaignParam) SetLimit(Limit int32) *ListCampaignParam { + params.Limit = &Limit + return params +} +func (params *ListCampaignParam) SetOffset(Offset int32) *ListCampaignParam { + params.Offset = &Offset + return params +} +func (params *ListCampaignParam) SetOnbehalfof(Onbehalfof string) *ListCampaignParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a paginated list of all of your campaigns.** Returns campaigns in reverse order they were created (newest first). Returns an empty array if no campaigns exist. You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. +func (c *ApiService) ListCampaign(params *ListCampaignParam) (interface{}, error) { + path := "/v3/campaigns" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListCampaign200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_campaigns/api_schedule_campaign.go b/rest/api/v3/lmc_campaigns/api_schedule_campaign.go new file mode 100644 index 00000000..69a51eb2 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/api_schedule_campaign.go @@ -0,0 +1,117 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type ScheduleCampaignParam struct { + // + CampaignId *int32 `json:"campaign_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + ScheduleACampaignRequest *ScheduleACampaignRequest `json:"ScheduleACampaignRequest,omitempty"` +} + +func (params *ScheduleCampaignParam) SetCampaignId(CampaignId int32) *ScheduleCampaignParam { + params.CampaignId = &CampaignId + return params +} +func (params *ScheduleCampaignParam) SetOnbehalfof(Onbehalfof string) *ScheduleCampaignParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *ScheduleCampaignParam) SetScheduleACampaignRequest(ScheduleACampaignRequest ScheduleACampaignRequest) *ScheduleCampaignParam { + params.ScheduleACampaignRequest = &ScheduleACampaignRequest + return params +} + +// **This endpoint allows you to schedule a specific date and time for your campaign to be sent.** If you have the flexibility, it's better to schedule mail for off-peak times. Most emails are scheduled and sent at the top of the hour or half hour. Scheduling email to avoid those times (for example, scheduling at 10:53) can result in lower deferral rates because it won't be going through our servers at the same times as everyone else's mail. +func (c *ApiService) ScheduleCampaign(params *ScheduleCampaignParam) (interface{}, error) { + path := "/v3/campaigns/{CampaignId}/schedules" + if params != nil && params.CampaignId != nil { + path = strings.Replace(path, "{"+"CampaignId"+"}", fmt.Sprint(*params.CampaignId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.ScheduleACampaignRequest != nil { + b, err := json.Marshal(*params.ScheduleACampaignRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &ScheduleACampaignResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_campaigns/api_send_campaign.go b/rest/api/v3/lmc_campaigns/api_send_campaign.go new file mode 100644 index 00000000..c9415c27 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/api_send_campaign.go @@ -0,0 +1,102 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type SendCampaignParam struct { + // + CampaignId *int32 `json:"campaign_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *SendCampaignParam) SetCampaignId(CampaignId int32) *SendCampaignParam { + params.CampaignId = &CampaignId + return params +} +func (params *SendCampaignParam) SetOnbehalfof(Onbehalfof string) *SendCampaignParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to immediately send an existing campaign.** Normally a POST request would have a body, but since this endpoint is telling us to send a resource that is already created, a request body is not needed. +func (c *ApiService) SendCampaign(params *SendCampaignParam) (interface{}, error) { + path := "/v3/campaigns/{CampaignId}/schedules/now" + if params != nil && params.CampaignId != nil { + path = strings.Replace(path, "{"+"CampaignId"+"}", fmt.Sprint(*params.CampaignId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &SendACampaignResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_campaigns/api_send_test_campaign.go b/rest/api/v3/lmc_campaigns/api_send_test_campaign.go new file mode 100644 index 00000000..b27be894 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/api_send_test_campaign.go @@ -0,0 +1,101 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type SendTestCampaignParam struct { + // + CampaignId *int32 `json:"campaign_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + SendTestCampaignRequest *SendTestCampaignRequest `json:"SendTestCampaignRequest,omitempty"` +} + +func (params *SendTestCampaignParam) SetCampaignId(CampaignId int32) *SendTestCampaignParam { + params.CampaignId = &CampaignId + return params +} +func (params *SendTestCampaignParam) SetOnbehalfof(Onbehalfof string) *SendTestCampaignParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *SendTestCampaignParam) SetSendTestCampaignRequest(SendTestCampaignRequest SendTestCampaignRequest) *SendTestCampaignParam { + params.SendTestCampaignRequest = &SendTestCampaignRequest + return params +} + +// **This endpoint allows you to send a test campaign.** To send to multiple addresses, use an array for the JSON \"to\" value [\"one@address\",\"two@address\"] +func (c *ApiService) SendTestCampaign(params *SendTestCampaignParam) (interface{}, error) { + path := "/v3/campaigns/{CampaignId}/schedules/test" + if params != nil && params.CampaignId != nil { + path = strings.Replace(path, "{"+"CampaignId"+"}", fmt.Sprint(*params.CampaignId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SendTestCampaignRequest != nil { + b, err := json.Marshal(*params.SendTestCampaignRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &SendATestCampaignRequest{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_campaigns/api_service.go b/rest/api/v3/lmc_campaigns/api_service.go new file mode 100644 index 00000000..8f9dfc14 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/lmc_campaigns/api_un_schedule_campaign.go b/rest/api/v3/lmc_campaigns/api_un_schedule_campaign.go new file mode 100644 index 00000000..5f5b5d31 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/api_un_schedule_campaign.go @@ -0,0 +1,78 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type UnScheduleCampaignParam struct { + // + CampaignId *int32 `json:"campaign_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *UnScheduleCampaignParam) SetCampaignId(CampaignId int32) *UnScheduleCampaignParam { + params.CampaignId = &CampaignId + return params +} +func (params *UnScheduleCampaignParam) SetOnbehalfof(Onbehalfof string) *UnScheduleCampaignParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to unschedule a campaign that has already been scheduled to be sent.** A successful unschedule will return a 204. If the specified campaign is in the process of being sent, the only option is to cancel (a different method). +func (c *ApiService) UnScheduleCampaign(params *UnScheduleCampaignParam) (interface{}, error) { + path := "/v3/campaigns/{CampaignId}/schedules" + if params != nil && params.CampaignId != nil { + path = strings.Replace(path, "{"+"CampaignId"+"}", fmt.Sprint(*params.CampaignId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_campaigns/api_update_campaign.go b/rest/api/v3/lmc_campaigns/api_update_campaign.go new file mode 100644 index 00000000..98d6f597 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/api_update_campaign.go @@ -0,0 +1,117 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type UpdateCampaignParam struct { + // The id of the campaign you would like to retrieve. + CampaignId *int32 `json:"campaign_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateACampaignRequest *UpdateACampaignRequest `json:"UpdateACampaignRequest,omitempty"` +} + +func (params *UpdateCampaignParam) SetCampaignId(CampaignId int32) *UpdateCampaignParam { + params.CampaignId = &CampaignId + return params +} +func (params *UpdateCampaignParam) SetOnbehalfof(Onbehalfof string) *UpdateCampaignParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateCampaignParam) SetUpdateACampaignRequest(UpdateACampaignRequest UpdateACampaignRequest) *UpdateCampaignParam { + params.UpdateACampaignRequest = &UpdateACampaignRequest + return params +} + +// **This endpoint allows you to update a specific campaign.** This is especially useful if you only set up the campaign using POST /campaigns, but didn't set many of the parameters. +func (c *ApiService) UpdateCampaign(params *UpdateCampaignParam) (interface{}, error) { + path := "/v3/campaigns/{CampaignId}" + if params != nil && params.CampaignId != nil { + path = strings.Replace(path, "{"+"CampaignId"+"}", fmt.Sprint(*params.CampaignId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateACampaignRequest != nil { + b, err := json.Marshal(*params.UpdateACampaignRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &Campaigns2xx{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_campaigns/api_update_scheduled_campaign.go b/rest/api/v3/lmc_campaigns/api_update_scheduled_campaign.go new file mode 100644 index 00000000..ebb4da29 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/api_update_scheduled_campaign.go @@ -0,0 +1,109 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type UpdateScheduledCampaignParam struct { + // + CampaignId *int32 `json:"campaign_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateAScheduledCampaignRequest *UpdateAScheduledCampaignRequest `json:"UpdateAScheduledCampaignRequest,omitempty"` +} + +func (params *UpdateScheduledCampaignParam) SetCampaignId(CampaignId int32) *UpdateScheduledCampaignParam { + params.CampaignId = &CampaignId + return params +} +func (params *UpdateScheduledCampaignParam) SetOnbehalfof(Onbehalfof string) *UpdateScheduledCampaignParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateScheduledCampaignParam) SetUpdateAScheduledCampaignRequest(UpdateAScheduledCampaignRequest UpdateAScheduledCampaignRequest) *UpdateScheduledCampaignParam { + params.UpdateAScheduledCampaignRequest = &UpdateAScheduledCampaignRequest + return params +} + +// **This endpoint allows to you change the scheduled time and date for a campaign to be sent.** +func (c *ApiService) UpdateScheduledCampaign(params *UpdateScheduledCampaignParam) (interface{}, error) { + path := "/v3/campaigns/{CampaignId}/schedules" + if params != nil && params.CampaignId != nil { + path = strings.Replace(path, "{"+"CampaignId"+"}", fmt.Sprint(*params.CampaignId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateAScheduledCampaignRequest != nil { + b, err := json.Marshal(*params.UpdateAScheduledCampaignRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &UpdateAScheduledCampaignResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_campaigns/docs/Campaigns2xx.md b/rest/api/v3/lmc_campaigns/docs/Campaigns2xx.md new file mode 100644 index 00000000..0d21e23c --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/Campaigns2xx.md @@ -0,0 +1,24 @@ +# Campaigns2xx + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | **string** | The display title of your campaign. This will be viewable by you in the Marketing Campaigns UI. | +**Subject** | **string** | The subject of your campaign that your recipients will see. |[optional] +**SenderId** | **int32** | The ID of the \"sender\" identity that you have created. Your recipients will see this as the \"from\" on your marketing emails. |[optional] +**ListIds** | **[]int32** | The IDs of the lists you are sending this campaign to. You can have both segment IDs and list IDs |[optional] +**SegmentIds** | **[]int32** | The segment IDs that you are sending this list to. You can have both segment IDs and list IDs. Segments are limited to 10 segment IDs. |[optional] +**Categories** | **[]string** | The categories you would like associated to this campaign. |[optional] +**SuppressionGroupId** | **int32** | The suppression group that this marketing email belongs to, allowing recipients to opt-out of emails of this type. |[optional] +**CustomUnsubscribeUrl** | **string** | This is the url of the custom unsubscribe page that you provide for customers to unsubscribe from your suppression groups. |[optional] +**IpPool** | **string** | The pool of IPs that you would like to send this email from. |[optional] +**HtmlContent** | **string** | The HTML of your marketing email. |[optional] +**PlainContent** | **string** | The plain text content of your emails. |[optional] +**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] +**Status** | **string** | The status of your campaign. | +**Id** | **int32** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/CreateCampaign.md b/rest/api/v3/lmc_campaigns/docs/CreateCampaign.md new file mode 100644 index 00000000..f7c28367 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/CreateCampaign.md @@ -0,0 +1,49 @@ +# CreateCampaign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateCampaign**](CreateCampaign.md#CreateCampaign) | **Post** /v3/campaigns | Create a Campaign + + + +## CreateCampaign + +> Campaigns2xx CreateCampaign(ctx, optional) + +Create a Campaign + +**This endpoint allows you to create a campaign.** In order to send or schedule the campaign, you will be required to provide a subject, sender ID, content (we suggest both html and plain text), and at least one list or segment ID. This information is not required when you create a campaign. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateCampaignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**PostCampaignsRequest** | [**PostCampaignsRequest**](PostCampaignsRequest.md) | + +### Return type + +[**Campaigns2xx**](Campaigns2xx.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_campaigns/docs/DeleteCampaign.md b/rest/api/v3/lmc_campaigns/docs/DeleteCampaign.md new file mode 100644 index 00000000..1c2063be --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/DeleteCampaign.md @@ -0,0 +1,52 @@ +# DeleteCampaign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteCampaign**](DeleteCampaign.md#DeleteCampaign) | **Delete** /v3/campaigns/{CampaignId} | Delete a Campaign + + + +## DeleteCampaign + +> DeleteCampaign(ctx, CampaignIdoptional) + +Delete a Campaign + +**This endpoint allows you to delete a specific campaign.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CampaignId** | **int32** | The id of the campaign you would like to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteCampaignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_campaigns/docs/Editor.md b/rest/api/v3/lmc_campaigns/docs/Editor.md new file mode 100644 index 00000000..9d170841 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/Editor.md @@ -0,0 +1,13 @@ +# Editor + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**CODE** | string | (value: `"code"`) +**DESIGN** | string | (value: `"design"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/ErrorResponse.md b/rest/api/v3/lmc_campaigns/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/ErrorResponseErrorsInner.md b/rest/api/v3/lmc_campaigns/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/GetCampaign.md b/rest/api/v3/lmc_campaigns/docs/GetCampaign.md new file mode 100644 index 00000000..7fe9f996 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/GetCampaign.md @@ -0,0 +1,52 @@ +# GetCampaign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetCampaign**](GetCampaign.md#GetCampaign) | **Get** /v3/campaigns/{CampaignId} | Retrieve a single campaign + + + +## GetCampaign + +> GetCampaign200Response GetCampaign(ctx, CampaignIdoptional) + +Retrieve a single campaign + +**This endpoint allows you to retrieve a specific campaign.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CampaignId** | **int32** | The id of the campaign you would like to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetCampaignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**GetCampaign200Response**](GetCampaign200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_campaigns/docs/GetCampaign200Response.md b/rest/api/v3/lmc_campaigns/docs/GetCampaign200Response.md new file mode 100644 index 00000000..081bf696 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/GetCampaign200Response.md @@ -0,0 +1,23 @@ +# GetCampaign200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Categories** | **[]string** | |[optional] +**CustomUnsubscribeUrl** | **string** | |[optional] +**HtmlContent** | **string** | |[optional] +**Id** | **int32** | |[optional] +**IpPool** | **string** | |[optional] +**ListIds** | **[]int32** | |[optional] +**PlainContent** | **string** | |[optional] +**SegmentIds** | **[]int32** | |[optional] +**SenderId** | **int32** | |[optional] +**Status** | **string** | |[optional] +**Subject** | **string** | |[optional] +**SuppressionGroupId** | **int32** | |[optional] +**Title** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/GetScheduledCampaign.md b/rest/api/v3/lmc_campaigns/docs/GetScheduledCampaign.md new file mode 100644 index 00000000..66847be7 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/GetScheduledCampaign.md @@ -0,0 +1,52 @@ +# GetScheduledCampaign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetScheduledCampaign**](GetScheduledCampaign.md#GetScheduledCampaign) | **Get** /v3/campaigns/{CampaignId}/schedules | View Scheduled Time of a Campaign + + + +## GetScheduledCampaign + +> ViewScheduledTimeOfACampaignResponse GetScheduledCampaign(ctx, CampaignIdoptional) + +View Scheduled Time of a Campaign + +**This endpoint allows you to retrieve the date and time that a campaign has been scheduled to be sent.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CampaignId** | **int32** | + +### Other Parameters + +Other parameters are passed through a pointer to a GetScheduledCampaignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ViewScheduledTimeOfACampaignResponse**](ViewScheduledTimeOfACampaignResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_campaigns/docs/ListCampaign.md b/rest/api/v3/lmc_campaigns/docs/ListCampaign.md new file mode 100644 index 00000000..103eaf98 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/ListCampaign.md @@ -0,0 +1,50 @@ +# ListCampaign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListCampaign**](ListCampaign.md#ListCampaign) | **Get** /v3/campaigns | Retrieve all Campaigns + + + +## ListCampaign + +> ListCampaign200Response ListCampaign(ctx, optional) + +Retrieve all Campaigns + +**This endpoint allows you to retrieve a paginated list of all of your campaigns.** Returns campaigns in reverse order they were created (newest first). Returns an empty array if no campaigns exist. You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListCampaignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. +**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListCampaign200Response**](ListCampaign200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_campaigns/docs/ListCampaign200Response.md b/rest/api/v3/lmc_campaigns/docs/ListCampaign200Response.md new file mode 100644 index 00000000..4cb67061 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/ListCampaign200Response.md @@ -0,0 +1,11 @@ +# ListCampaign200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]Campaigns2xx**](Campaigns2xx.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/PostCampaignsRequest.md b/rest/api/v3/lmc_campaigns/docs/PostCampaignsRequest.md new file mode 100644 index 00000000..aa92e8b4 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/PostCampaignsRequest.md @@ -0,0 +1,22 @@ +# PostCampaignsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | **string** | The display title of your campaign. This will be viewable by you in the Marketing Campaigns UI. | +**Subject** | **string** | The subject of your campaign that your recipients will see. |[optional] +**SenderId** | **int32** | The ID of the \"sender\" identity that you have created. Your recipients will see this as the \"from\" on your marketing emails. |[optional] +**ListIds** | **[]int32** | The IDs of the lists you are sending this campaign to. You can have both segment IDs and list IDs |[optional] +**SegmentIds** | **[]int32** | The segment IDs that you are sending this list to. You can have both segment IDs and list IDs. Segments are limited to 10 segment IDs. |[optional] +**Categories** | **[]string** | The categories you would like associated to this campaign. |[optional] +**SuppressionGroupId** | **int32** | The suppression group that this marketing email belongs to, allowing recipients to opt-out of emails of this type. |[optional] +**CustomUnsubscribeUrl** | **string** | This is the url of the custom unsubscribe page that you provide for customers to unsubscribe from your suppression groups. |[optional] +**IpPool** | **string** | The pool of IPs that you would like to send this email from. |[optional] +**HtmlContent** | **string** | The HTML of your marketing email. |[optional] +**PlainContent** | **string** | The plain text content of your emails. |[optional] +**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/ScheduleACampaignRequest.md b/rest/api/v3/lmc_campaigns/docs/ScheduleACampaignRequest.md new file mode 100644 index 00000000..489650a2 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/ScheduleACampaignRequest.md @@ -0,0 +1,11 @@ +# ScheduleACampaignRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SendAt** | **int32** | The unix timestamp for the date and time you would like your campaign to be sent out. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/ScheduleACampaignResponse.md b/rest/api/v3/lmc_campaigns/docs/ScheduleACampaignResponse.md new file mode 100644 index 00000000..3e850370 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/ScheduleACampaignResponse.md @@ -0,0 +1,13 @@ +# ScheduleACampaignResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The campaign ID. | +**SendAt** | **int32** | The date time you scheduled your campaign to be sent. | +**Status** | [**Status**](Status.md) | The status of your campaign. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/ScheduleCampaign.md b/rest/api/v3/lmc_campaigns/docs/ScheduleCampaign.md new file mode 100644 index 00000000..257a83bf --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/ScheduleCampaign.md @@ -0,0 +1,53 @@ +# ScheduleCampaign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ScheduleCampaign**](ScheduleCampaign.md#ScheduleCampaign) | **Post** /v3/campaigns/{CampaignId}/schedules | Schedule a Campaign + + + +## ScheduleCampaign + +> ScheduleACampaignResponse ScheduleCampaign(ctx, CampaignIdoptional) + +Schedule a Campaign + +**This endpoint allows you to schedule a specific date and time for your campaign to be sent.** If you have the flexibility, it's better to schedule mail for off-peak times. Most emails are scheduled and sent at the top of the hour or half hour. Scheduling email to avoid those times (for example, scheduling at 10:53) can result in lower deferral rates because it won't be going through our servers at the same times as everyone else's mail. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CampaignId** | **int32** | + +### Other Parameters + +Other parameters are passed through a pointer to a ScheduleCampaignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**ScheduleACampaignRequest** | [**ScheduleACampaignRequest**](ScheduleACampaignRequest.md) | + +### Return type + +[**ScheduleACampaignResponse**](ScheduleACampaignResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_campaigns/docs/SendACampaignResponse.md b/rest/api/v3/lmc_campaigns/docs/SendACampaignResponse.md new file mode 100644 index 00000000..5b5d6e36 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/SendACampaignResponse.md @@ -0,0 +1,12 @@ +# SendACampaignResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Status** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/SendATestCampaignRequest.md b/rest/api/v3/lmc_campaigns/docs/SendATestCampaignRequest.md new file mode 100644 index 00000000..7312efcb --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/SendATestCampaignRequest.md @@ -0,0 +1,11 @@ +# SendATestCampaignRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**To** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/SendCampaign.md b/rest/api/v3/lmc_campaigns/docs/SendCampaign.md new file mode 100644 index 00000000..8e303880 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/SendCampaign.md @@ -0,0 +1,52 @@ +# SendCampaign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SendCampaign**](SendCampaign.md#SendCampaign) | **Post** /v3/campaigns/{CampaignId}/schedules/now | Send a Campaign + + + +## SendCampaign + +> SendACampaignResponse SendCampaign(ctx, CampaignIdoptional) + +Send a Campaign + +**This endpoint allows you to immediately send an existing campaign.** Normally a POST request would have a body, but since this endpoint is telling us to send a resource that is already created, a request body is not needed. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CampaignId** | **int32** | + +### Other Parameters + +Other parameters are passed through a pointer to a SendCampaignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**SendACampaignResponse**](SendACampaignResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_campaigns/docs/SendTestCampaign.md b/rest/api/v3/lmc_campaigns/docs/SendTestCampaign.md new file mode 100644 index 00000000..8fdf3672 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/SendTestCampaign.md @@ -0,0 +1,53 @@ +# SendTestCampaign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SendTestCampaign**](SendTestCampaign.md#SendTestCampaign) | **Post** /v3/campaigns/{CampaignId}/schedules/test | Send a Test Campaign + + + +## SendTestCampaign + +> SendATestCampaignRequest SendTestCampaign(ctx, CampaignIdoptional) + +Send a Test Campaign + +**This endpoint allows you to send a test campaign.** To send to multiple addresses, use an array for the JSON \"to\" value [\"one@address\",\"two@address\"] + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CampaignId** | **int32** | + +### Other Parameters + +Other parameters are passed through a pointer to a SendTestCampaignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**SendTestCampaignRequest** | [**SendTestCampaignRequest**](SendTestCampaignRequest.md) | + +### Return type + +[**SendATestCampaignRequest**](SendATestCampaignRequest.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_campaigns/docs/SendTestCampaignRequest.md b/rest/api/v3/lmc_campaigns/docs/SendTestCampaignRequest.md new file mode 100644 index 00000000..3b22fcad --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/SendTestCampaignRequest.md @@ -0,0 +1,11 @@ +# SendTestCampaignRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**To** | **string** | The email address that should receive the test campaign. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/Status.md b/rest/api/v3/lmc_campaigns/docs/Status.md new file mode 100644 index 00000000..6f087e79 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/Status.md @@ -0,0 +1,12 @@ +# Status + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**SCHEDULED** | string | (value: `"Scheduled"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/UnScheduleCampaign.md b/rest/api/v3/lmc_campaigns/docs/UnScheduleCampaign.md new file mode 100644 index 00000000..1d0db274 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/UnScheduleCampaign.md @@ -0,0 +1,52 @@ +# UnScheduleCampaign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UnScheduleCampaign**](UnScheduleCampaign.md#UnScheduleCampaign) | **Delete** /v3/campaigns/{CampaignId}/schedules | Unschedule a Scheduled Campaign + + + +## UnScheduleCampaign + +> UnScheduleCampaign(ctx, CampaignIdoptional) + +Unschedule a Scheduled Campaign + +**This endpoint allows you to unschedule a campaign that has already been scheduled to be sent.** A successful unschedule will return a 204. If the specified campaign is in the process of being sent, the only option is to cancel (a different method). + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CampaignId** | **int32** | + +### Other Parameters + +Other parameters are passed through a pointer to a UnScheduleCampaignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_campaigns/docs/UpdateACampaignRequest.md b/rest/api/v3/lmc_campaigns/docs/UpdateACampaignRequest.md new file mode 100644 index 00000000..18686464 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/UpdateACampaignRequest.md @@ -0,0 +1,15 @@ +# UpdateACampaignRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | **string** | The title of the campaign. | +**Subject** | **string** | The subject line for your campaign. | +**Categories** | **[]string** | The categories you want to tag on this campaign. | +**HtmlContent** | **string** | The HTML content of this campaign. | +**PlainContent** | **string** | The plain content of this campaign. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/UpdateAScheduledCampaignRequest.md b/rest/api/v3/lmc_campaigns/docs/UpdateAScheduledCampaignRequest.md new file mode 100644 index 00000000..95153a0c --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/UpdateAScheduledCampaignRequest.md @@ -0,0 +1,11 @@ +# UpdateAScheduledCampaignRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SendAt** | **int64** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/UpdateAScheduledCampaignResponse.md b/rest/api/v3/lmc_campaigns/docs/UpdateAScheduledCampaignResponse.md new file mode 100644 index 00000000..ca58edfc --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/UpdateAScheduledCampaignResponse.md @@ -0,0 +1,13 @@ +# UpdateAScheduledCampaignResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The campaign ID | +**SendAt** | **int32** | The unix timestamp to send the campaign. | +**Status** | **string** | The status of the schedule. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/UpdateCampaign.md b/rest/api/v3/lmc_campaigns/docs/UpdateCampaign.md new file mode 100644 index 00000000..763d4a0a --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/UpdateCampaign.md @@ -0,0 +1,53 @@ +# UpdateCampaign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateCampaign**](UpdateCampaign.md#UpdateCampaign) | **Patch** /v3/campaigns/{CampaignId} | Update a Campaign + + + +## UpdateCampaign + +> Campaigns2xx UpdateCampaign(ctx, CampaignIdoptional) + +Update a Campaign + +**This endpoint allows you to update a specific campaign.** This is especially useful if you only set up the campaign using POST /campaigns, but didn't set many of the parameters. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CampaignId** | **int32** | The id of the campaign you would like to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateCampaignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateACampaignRequest** | [**UpdateACampaignRequest**](UpdateACampaignRequest.md) | + +### Return type + +[**Campaigns2xx**](Campaigns2xx.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_campaigns/docs/UpdateScheduledCampaign.md b/rest/api/v3/lmc_campaigns/docs/UpdateScheduledCampaign.md new file mode 100644 index 00000000..936135ed --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/UpdateScheduledCampaign.md @@ -0,0 +1,53 @@ +# UpdateScheduledCampaign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateScheduledCampaign**](UpdateScheduledCampaign.md#UpdateScheduledCampaign) | **Patch** /v3/campaigns/{CampaignId}/schedules | Update a Scheduled Campaign + + + +## UpdateScheduledCampaign + +> UpdateAScheduledCampaignResponse UpdateScheduledCampaign(ctx, CampaignIdoptional) + +Update a Scheduled Campaign + +**This endpoint allows to you change the scheduled time and date for a campaign to be sent.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CampaignId** | **int32** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateScheduledCampaignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateAScheduledCampaignRequest** | [**UpdateAScheduledCampaignRequest**](UpdateAScheduledCampaignRequest.md) | + +### Return type + +[**UpdateAScheduledCampaignResponse**](UpdateAScheduledCampaignResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_campaigns/docs/ViewScheduledTimeOfACampaignResponse.md b/rest/api/v3/lmc_campaigns/docs/ViewScheduledTimeOfACampaignResponse.md new file mode 100644 index 00000000..76d1e22d --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/ViewScheduledTimeOfACampaignResponse.md @@ -0,0 +1,11 @@ +# ViewScheduledTimeOfACampaignResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SendAt** | **int64** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/model_campaigns2xx.go b/rest/api/v3/lmc_campaigns/model_campaigns2xx.go new file mode 100644 index 00000000..f8c3ccfd --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_campaigns2xx.go @@ -0,0 +1,45 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Campaigns2xx struct for Campaigns2xx +type Campaigns2xx struct { + // The display title of your campaign. This will be viewable by you in the Marketing Campaigns UI. + Title string `json:"title"` + // The subject of your campaign that your recipients will see. + Subject *string `json:"subject,omitempty"` + // The ID of the \"sender\" identity that you have created. Your recipients will see this as the \"from\" on your marketing emails. + SenderId *int32 `json:"sender_id,omitempty"` + // The IDs of the lists you are sending this campaign to. You can have both segment IDs and list IDs + ListIds *[]int32 `json:"list_ids,omitempty"` + // The segment IDs that you are sending this list to. You can have both segment IDs and list IDs. Segments are limited to 10 segment IDs. + SegmentIds *[]int32 `json:"segment_ids,omitempty"` + // The categories you would like associated to this campaign. + Categories *[]string `json:"categories,omitempty"` + // The suppression group that this marketing email belongs to, allowing recipients to opt-out of emails of this type. + SuppressionGroupId *int32 `json:"suppression_group_id,omitempty"` + // This is the url of the custom unsubscribe page that you provide for customers to unsubscribe from your suppression groups. + CustomUnsubscribeUrl *string `json:"custom_unsubscribe_url,omitempty"` + // The pool of IPs that you would like to send this email from. + IpPool *string `json:"ip_pool,omitempty"` + // The HTML of your marketing email. + HtmlContent *string `json:"html_content,omitempty"` + // The plain text content of your emails. + PlainContent *string `json:"plain_content,omitempty"` + // The editor used in the UI. + Editor *Editor `json:"editor,omitempty"` + // The status of your campaign. + Status string `json:"status"` + Id *int32 `json:"id,omitempty"` +} diff --git a/rest/api/v3/lmc_campaigns/model_editor.go b/rest/api/v3/lmc_campaigns/model_editor.go new file mode 100644 index 00000000..4af6f4bb --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_editor.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Editor the model 'Editor' +type Editor string + +// List of Editor +const ( + EDITOR_CODE Editor = "code" + EDITOR_DESIGN Editor = "design" +) diff --git a/rest/api/v3/lmc_campaigns/model_error_response.go b/rest/api/v3/lmc_campaigns/model_error_response.go new file mode 100644 index 00000000..fd2e601a --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/lmc_campaigns/model_error_response_errors_inner.go b/rest/api/v3/lmc_campaigns/model_error_response_errors_inner.go new file mode 100644 index 00000000..77addddc --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/lmc_campaigns/model_get_campaign_200_response.go b/rest/api/v3/lmc_campaigns/model_get_campaign_200_response.go new file mode 100644 index 00000000..7c675785 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_get_campaign_200_response.go @@ -0,0 +1,31 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetCampaign200Response struct for GetCampaign200Response +type GetCampaign200Response struct { + Categories *[]string `json:"categories,omitempty"` + CustomUnsubscribeUrl *string `json:"custom_unsubscribe_url,omitempty"` + HtmlContent *string `json:"html_content,omitempty"` + Id *int32 `json:"id,omitempty"` + IpPool *string `json:"ip_pool,omitempty"` + ListIds *[]int32 `json:"list_ids,omitempty"` + PlainContent *string `json:"plain_content,omitempty"` + SegmentIds *[]int32 `json:"segment_ids,omitempty"` + SenderId *int32 `json:"sender_id,omitempty"` + Status *string `json:"status,omitempty"` + Subject *string `json:"subject,omitempty"` + SuppressionGroupId *int32 `json:"suppression_group_id,omitempty"` + Title *string `json:"title,omitempty"` +} diff --git a/rest/api/v3/lmc_campaigns/model_list_campaign_200_response.go b/rest/api/v3/lmc_campaigns/model_list_campaign_200_response.go new file mode 100644 index 00000000..47cc209c --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_list_campaign_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListCampaign200Response struct for ListCampaign200Response +type ListCampaign200Response struct { + Result *[]Campaigns2xx `json:"result,omitempty"` +} diff --git a/rest/api/v3/lmc_campaigns/model_post_campaigns_request.go b/rest/api/v3/lmc_campaigns/model_post_campaigns_request.go new file mode 100644 index 00000000..0cc45837 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_post_campaigns_request.go @@ -0,0 +1,42 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// PostCampaignsRequest struct for PostCampaignsRequest +type PostCampaignsRequest struct { + // The display title of your campaign. This will be viewable by you in the Marketing Campaigns UI. + Title string `json:"title"` + // The subject of your campaign that your recipients will see. + Subject *string `json:"subject,omitempty"` + // The ID of the \"sender\" identity that you have created. Your recipients will see this as the \"from\" on your marketing emails. + SenderId *int32 `json:"sender_id,omitempty"` + // The IDs of the lists you are sending this campaign to. You can have both segment IDs and list IDs + ListIds *[]int32 `json:"list_ids,omitempty"` + // The segment IDs that you are sending this list to. You can have both segment IDs and list IDs. Segments are limited to 10 segment IDs. + SegmentIds *[]int32 `json:"segment_ids,omitempty"` + // The categories you would like associated to this campaign. + Categories *[]string `json:"categories,omitempty"` + // The suppression group that this marketing email belongs to, allowing recipients to opt-out of emails of this type. + SuppressionGroupId *int32 `json:"suppression_group_id,omitempty"` + // This is the url of the custom unsubscribe page that you provide for customers to unsubscribe from your suppression groups. + CustomUnsubscribeUrl *string `json:"custom_unsubscribe_url,omitempty"` + // The pool of IPs that you would like to send this email from. + IpPool *string `json:"ip_pool,omitempty"` + // The HTML of your marketing email. + HtmlContent *string `json:"html_content,omitempty"` + // The plain text content of your emails. + PlainContent *string `json:"plain_content,omitempty"` + // The editor used in the UI. + Editor *Editor `json:"editor,omitempty"` +} diff --git a/rest/api/v3/lmc_campaigns/model_schedule_a_campaign_request.go b/rest/api/v3/lmc_campaigns/model_schedule_a_campaign_request.go new file mode 100644 index 00000000..4b53f35b --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_schedule_a_campaign_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ScheduleACampaignRequest struct for ScheduleACampaignRequest +type ScheduleACampaignRequest struct { + // The unix timestamp for the date and time you would like your campaign to be sent out. + SendAt int32 `json:"send_at"` +} diff --git a/rest/api/v3/lmc_campaigns/model_schedule_a_campaign_response.go b/rest/api/v3/lmc_campaigns/model_schedule_a_campaign_response.go new file mode 100644 index 00000000..62df9ad9 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_schedule_a_campaign_response.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ScheduleACampaignResponse struct for ScheduleACampaignResponse +type ScheduleACampaignResponse struct { + // The campaign ID. + Id int32 `json:"id"` + // The date time you scheduled your campaign to be sent. + SendAt int32 `json:"send_at"` + // The status of your campaign. + Status Status `json:"status"` +} diff --git a/rest/api/v3/lmc_campaigns/model_send_a_campaign_response.go b/rest/api/v3/lmc_campaigns/model_send_a_campaign_response.go new file mode 100644 index 00000000..75f64bda --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_send_a_campaign_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendACampaignResponse struct for SendACampaignResponse +type SendACampaignResponse struct { + Id int64 `json:"id"` + Status string `json:"status"` +} diff --git a/rest/api/v3/lmc_campaigns/model_send_a_test_campaign_request.go b/rest/api/v3/lmc_campaigns/model_send_a_test_campaign_request.go new file mode 100644 index 00000000..48db5624 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_send_a_test_campaign_request.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendATestCampaignRequest struct for SendATestCampaignRequest +type SendATestCampaignRequest struct { + To string `json:"to"` +} diff --git a/rest/api/v3/lmc_campaigns/model_send_test_campaign_request.go b/rest/api/v3/lmc_campaigns/model_send_test_campaign_request.go new file mode 100644 index 00000000..facd4d89 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_send_test_campaign_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendTestCampaignRequest struct for SendTestCampaignRequest +type SendTestCampaignRequest struct { + // The email address that should receive the test campaign. + To string `json:"to"` +} diff --git a/rest/api/v3/lmc_campaigns/model_status.go b/rest/api/v3/lmc_campaigns/model_status.go new file mode 100644 index 00000000..099841ea --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_status.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status the model 'Status' +type Status string + +// List of Status +const ( + STATUS_SCHEDULED Status = "Scheduled" +) diff --git a/rest/api/v3/lmc_campaigns/model_update_a_campaign_request.go b/rest/api/v3/lmc_campaigns/model_update_a_campaign_request.go new file mode 100644 index 00000000..be297454 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_update_a_campaign_request.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateACampaignRequest struct for UpdateACampaignRequest +type UpdateACampaignRequest struct { + // The title of the campaign. + Title string `json:"title"` + // The subject line for your campaign. + Subject string `json:"subject"` + // The categories you want to tag on this campaign. + Categories []string `json:"categories"` + // The HTML content of this campaign. + HtmlContent string `json:"html_content"` + // The plain content of this campaign. + PlainContent string `json:"plain_content"` +} diff --git a/rest/api/v3/lmc_campaigns/model_update_a_scheduled_campaign_request.go b/rest/api/v3/lmc_campaigns/model_update_a_scheduled_campaign_request.go new file mode 100644 index 00000000..e7a6d7cf --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_update_a_scheduled_campaign_request.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateAScheduledCampaignRequest struct for UpdateAScheduledCampaignRequest +type UpdateAScheduledCampaignRequest struct { + SendAt int64 `json:"send_at"` +} diff --git a/rest/api/v3/lmc_campaigns/model_update_a_scheduled_campaign_response.go b/rest/api/v3/lmc_campaigns/model_update_a_scheduled_campaign_response.go new file mode 100644 index 00000000..1f31db5a --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_update_a_scheduled_campaign_response.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateAScheduledCampaignResponse struct for UpdateAScheduledCampaignResponse +type UpdateAScheduledCampaignResponse struct { + // The campaign ID + Id int32 `json:"id"` + // The unix timestamp to send the campaign. + SendAt int32 `json:"send_at"` + // The status of the schedule. + Status string `json:"status"` +} diff --git a/rest/api/v3/lmc_campaigns/model_view_scheduled_time_of_a_campaign_response.go b/rest/api/v3/lmc_campaigns/model_view_scheduled_time_of_a_campaign_response.go new file mode 100644 index 00000000..e224df4c --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_view_scheduled_time_of_a_campaign_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ViewScheduledTimeOfACampaignResponse struct for ViewScheduledTimeOfACampaignResponse +type ViewScheduledTimeOfACampaignResponse struct { + SendAt int64 `json:"send_at"` +} diff --git a/rest/api/v3/lmc_contactdb/.openapi-generator b/rest/api/v3/lmc_contactdb/.openapi-generator new file mode 100644 index 00000000..2833650b --- /dev/null +++ b/rest/api/v3/lmc_contactdb/.openapi-generator @@ -0,0 +1,152 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_add_recipient.go +api_add_recipient_to_contact_db_list.go +api_add_recipients_to_contact_db_list.go +api_create_contact_db_list.go +api_create_custom_field.go +api_create_segment.go +api_delete_contact_db_list.go +api_delete_contact_db_lists.go +api_delete_custom_field.go +api_delete_recipient.go +api_delete_recipient_from_contact_db_list.go +api_delete_recipients.go +api_delete_segment.go +api_get_billable.go +api_get_contact_db_list.go +api_get_custom_field.go +api_get_recipient.go +api_get_recipient_list.go +api_get_segment.go +api_list_contact_db_list.go +api_list_custom_field.go +api_list_recipient.go +api_list_recipient_count.go +api_list_recipient_for_segment.go +api_list_recipients_from_contact_db_list.go +api_list_reserved_field.go +api_list_search_recipient.go +api_list_segment.go +api_list_status.go +api_search_recipient.go +api_service.go +api_update_contact_db_list.go +api_update_recipient.go +api_update_segment.go +docs/AddRecipient.md +docs/AddRecipientRequestInner.md +docs/AddRecipientToContactDbList.md +docs/AddRecipientsToContactDbList.md +docs/AndOr.md +docs/ContactdbCustomField.md +docs/ContactdbCustomFieldId2xx.md +docs/ContactdbCustomFieldIdValue.md +docs/ContactdbList2xx.md +docs/ContactdbRecipient200.md +docs/ContactdbRecipient200RecipientsInner.md +docs/ContactdbRecipientCount200.md +docs/ContactdbRecipientResponse201.md +docs/ContactdbRecipientResponse201ErrorsInner.md +docs/ContactdbSegments.md +docs/ContactdbSegmentsConditions.md +docs/ContactdbSegmentsId200.md +docs/CreateAListRequest.md +docs/CreateContactDbList.md +docs/CreateCustomField.md +docs/CreateCustomFieldRequest.md +docs/CreateSegment.md +docs/DeleteContactDbList.md +docs/DeleteContactDbLists.md +docs/DeleteContacts.md +docs/DeleteCustomField.md +docs/DeleteRecipient.md +docs/DeleteRecipientFromContactDbList.md +docs/DeleteRecipients.md +docs/DeleteSegment.md +docs/ErrorResponse.md +docs/ErrorResponseErrorsInner.md +docs/GetBillable.md +docs/GetContactDbList.md +docs/GetCustomField.md +docs/GetRecipient.md +docs/GetRecipientList.md +docs/GetRecipientList200Response.md +docs/GetSegment.md +docs/ListAllCustomFieldsResponse.md +docs/ListAllListsResponse.md +docs/ListAllSegmentsResponse.md +docs/ListContactDbList.md +docs/ListCustomField.md +docs/ListRecipient.md +docs/ListRecipientCount.md +docs/ListRecipientForSegment.md +docs/ListRecipientsFromContactDbList.md +docs/ListRecipientsFromContactDbList200Response.md +docs/ListRecipientsOnASegmentResponse.md +docs/ListRecipientsResponse.md +docs/ListReservedField.md +docs/ListReservedField200Response.md +docs/ListReservedField200ResponseReservedFieldsInner.md +docs/ListSearchRecipient.md +docs/ListSegment.md +docs/ListStatus.md +docs/ListStatus200Response.md +docs/ListStatus200ResponseStatusInner.md +docs/Operator.md +docs/SearchRecipient.md +docs/SearchRecipient200Response.md +docs/SearchRecipient200ResponseRecipientsInner.md +docs/SearchRecipient200ResponseRecipientsInnerCustomFieldsInner.md +docs/SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue.md +docs/SearchRecipientRequest.md +docs/Type.md +docs/UpdateAListRequest.md +docs/UpdateContactDbList.md +docs/UpdateContactDbList200Response.md +docs/UpdateRecipient.md +docs/UpdateRecipientRequestInner.md +docs/UpdateSegment.md +docs/UpdateSegmentRequest.md +model_add_recipient_request_inner.go +model_and_or.go +model_contactdb_custom_field.go +model_contactdb_custom_field_id2xx.go +model_contactdb_custom_field_id_value.go +model_contactdb_list2xx.go +model_contactdb_recipient200.go +model_contactdb_recipient200_recipients_inner.go +model_contactdb_recipient_count200.go +model_contactdb_recipient_response201.go +model_contactdb_recipient_response201_errors_inner.go +model_contactdb_segments.go +model_contactdb_segments_conditions.go +model_contactdb_segments_id200.go +model_create_a_list_request.go +model_create_custom_field_request.go +model_delete_contacts.go +model_error_response.go +model_error_response_errors_inner.go +model_get_recipient_list_200_response.go +model_list_all_custom_fields_response.go +model_list_all_lists_response.go +model_list_all_segments_response.go +model_list_recipients_from_contact_db_list_200_response.go +model_list_recipients_on_a_segment_response.go +model_list_recipients_response.go +model_list_reserved_field_200_response.go +model_list_reserved_field_200_response_reserved_fields_inner.go +model_list_status_200_response.go +model_list_status_200_response_status_inner.go +model_operator.go +model_search_recipient_200_response.go +model_search_recipient_200_response_recipients_inner.go +model_search_recipient_200_response_recipients_inner_custom_fields_inner.go +model_search_recipient_200_response_recipients_inner_custom_fields_inner_value.go +model_search_recipient_request.go +model_type.go +model_update_a_list_request.go +model_update_contact_db_list_200_response.go +model_update_recipient_request_inner.go +model_update_segment_request.go diff --git a/rest/api/v3/lmc_contactdb/.openapi-generator-ignore b/rest/api/v3/lmc_contactdb/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/lmc_contactdb/README.md b/rest/api/v3/lmc_contactdb/README.md new file mode 100644 index 00000000..26c0cbfd --- /dev/null +++ b/rest/api/v3/lmc_contactdb/README.md @@ -0,0 +1,134 @@ +# Go API client for + +The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. + +See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:43.558402+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AddRecipient* | [**AddRecipient**](docs/AddRecipient.md#addrecipient) | **Post** /v3/contactdb/recipients | Add recipients +*AddRecipientToContactDbList* | [**AddRecipientToContactDbList**](docs/AddRecipientToContactDbList.md#addrecipienttocontactdblist) | **Post** /v3/contactdb/lists/{ListId}/recipients/{RecipientId} | Add a Single Recipient to a List +*AddRecipientsToContactDbList* | [**AddRecipientsToContactDbList**](docs/AddRecipientsToContactDbList.md#addrecipientstocontactdblist) | **Post** /v3/contactdb/lists/{ListId}/recipients | Add Multiple Recipients to a List +*CreateContactDbList* | [**CreateContactDbList**](docs/CreateContactDbList.md#createcontactdblist) | **Post** /v3/contactdb/lists | Create a List +*CreateCustomField* | [**CreateCustomField**](docs/CreateCustomField.md#createcustomfield) | **Post** /v3/contactdb/custom_fields | Create a Custom Field +*CreateSegment* | [**CreateSegment**](docs/CreateSegment.md#createsegment) | **Post** /v3/contactdb/segments | Create a Segment +*DeleteContactDbList* | [**DeleteContactDbList**](docs/DeleteContactDbList.md#deletecontactdblist) | **Delete** /v3/contactdb/lists/{ListId} | Delete a List +*DeleteContactDbLists* | [**DeleteContactDbLists**](docs/DeleteContactDbLists.md#deletecontactdblists) | **Delete** /v3/contactdb/lists | Delete Multiple lists +*DeleteCustomField* | [**DeleteCustomField**](docs/DeleteCustomField.md#deletecustomfield) | **Delete** /v3/contactdb/custom_fields/{CustomFieldId} | Delete a Custom Field +*DeleteRecipient* | [**DeleteRecipient**](docs/DeleteRecipient.md#deleterecipient) | **Delete** /v3/contactdb/recipients/{RecipientId} | Delete a Recipient +*DeleteRecipientFromContactDbList* | [**DeleteRecipientFromContactDbList**](docs/DeleteRecipientFromContactDbList.md#deleterecipientfromcontactdblist) | **Delete** /v3/contactdb/lists/{ListId}/recipients/{RecipientId} | Delete a Single Recipient from a Single List +*DeleteRecipients* | [**DeleteRecipients**](docs/DeleteRecipients.md#deleterecipients) | **Delete** /v3/contactdb/recipients | Delete Recipients +*DeleteSegment* | [**DeleteSegment**](docs/DeleteSegment.md#deletesegment) | **Delete** /v3/contactdb/segments/{SegmentId} | Delete a segment +*GetBillable* | [**GetBillable**](docs/GetBillable.md#getbillable) | **Get** /v3/contactdb/recipients/billable_count | Retrieve the count of billable recipients +*GetContactDbList* | [**GetContactDbList**](docs/GetContactDbList.md#getcontactdblist) | **Get** /v3/contactdb/lists/{ListId} | Retrieve a single list +*GetCustomField* | [**GetCustomField**](docs/GetCustomField.md#getcustomfield) | **Get** /v3/contactdb/custom_fields/{CustomFieldId} | Retrieve a Custom Field +*GetRecipient* | [**GetRecipient**](docs/GetRecipient.md#getrecipient) | **Get** /v3/contactdb/recipients/{RecipientId} | Retrieve a single recipient +*GetRecipientList* | [**GetRecipientList**](docs/GetRecipientList.md#getrecipientlist) | **Get** /v3/contactdb/recipients/{RecipientId}/lists | Retrieve the lists that a recipient is on +*GetSegment* | [**GetSegment**](docs/GetSegment.md#getsegment) | **Get** /v3/contactdb/segments/{SegmentId} | Retrieve a segment +*ListContactDbList* | [**ListContactDbList**](docs/ListContactDbList.md#listcontactdblist) | **Get** /v3/contactdb/lists | Retrieve all lists +*ListCustomField* | [**ListCustomField**](docs/ListCustomField.md#listcustomfield) | **Get** /v3/contactdb/custom_fields | Retrieve all custom fields +*ListRecipient* | [**ListRecipient**](docs/ListRecipient.md#listrecipient) | **Get** /v3/contactdb/recipients | Retrieve recipients +*ListRecipientCount* | [**ListRecipientCount**](docs/ListRecipientCount.md#listrecipientcount) | **Get** /v3/contactdb/recipients/count | Retrieve a Count of Recipients +*ListRecipientForSegment* | [**ListRecipientForSegment**](docs/ListRecipientForSegment.md#listrecipientforsegment) | **Get** /v3/contactdb/segments/{SegmentId}/recipients | Retrieve recipients on a segment +*ListRecipientsFromContactDbList* | [**ListRecipientsFromContactDbList**](docs/ListRecipientsFromContactDbList.md#listrecipientsfromcontactdblist) | **Get** /v3/contactdb/lists/{ListId}/recipients | Retrieve all recipients on a List +*ListReservedField* | [**ListReservedField**](docs/ListReservedField.md#listreservedfield) | **Get** /v3/contactdb/reserved_fields | Retrieve reserved fields +*ListSearchRecipient* | [**ListSearchRecipient**](docs/ListSearchRecipient.md#listsearchrecipient) | **Get** /v3/contactdb/recipients/search | Search recipients +*ListSegment* | [**ListSegment**](docs/ListSegment.md#listsegment) | **Get** /v3/contactdb/segments | Retrieve all segments +*ListStatus* | [**ListStatus**](docs/ListStatus.md#liststatus) | **Get** /v3/contactdb/status | Get Recipient Upload Status +*SearchRecipient* | [**SearchRecipient**](docs/SearchRecipient.md#searchrecipient) | **Post** /v3/contactdb/recipients/search | Search recipients +*UpdateContactDbList* | [**UpdateContactDbList**](docs/UpdateContactDbList.md#updatecontactdblist) | **Patch** /v3/contactdb/lists/{ListId} | Update a List +*UpdateRecipient* | [**UpdateRecipient**](docs/UpdateRecipient.md#updaterecipient) | **Patch** /v3/contactdb/recipients | Update Recipient +*UpdateSegment* | [**UpdateSegment**](docs/UpdateSegment.md#updatesegment) | **Patch** /v3/contactdb/segments/{SegmentId} | Update a segment + + +## Documentation For Models + + - [AddRecipientRequestInner](AddRecipientRequestInner.md) + - [AndOr](AndOr.md) + - [ContactdbCustomField](ContactdbCustomField.md) + - [ContactdbCustomFieldId2xx](ContactdbCustomFieldId2xx.md) + - [ContactdbCustomFieldIdValue](ContactdbCustomFieldIdValue.md) + - [ContactdbList2xx](ContactdbList2xx.md) + - [ContactdbRecipient200](ContactdbRecipient200.md) + - [ContactdbRecipient200RecipientsInner](ContactdbRecipient200RecipientsInner.md) + - [ContactdbRecipientCount200](ContactdbRecipientCount200.md) + - [ContactdbRecipientResponse201](ContactdbRecipientResponse201.md) + - [ContactdbRecipientResponse201ErrorsInner](ContactdbRecipientResponse201ErrorsInner.md) + - [ContactdbSegments](ContactdbSegments.md) + - [ContactdbSegmentsConditions](ContactdbSegmentsConditions.md) + - [ContactdbSegmentsId200](ContactdbSegmentsId200.md) + - [CreateAListRequest](CreateAListRequest.md) + - [CreateCustomFieldRequest](CreateCustomFieldRequest.md) + - [DeleteContacts](DeleteContacts.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [GetRecipientList200Response](GetRecipientList200Response.md) + - [ListAllCustomFieldsResponse](ListAllCustomFieldsResponse.md) + - [ListAllListsResponse](ListAllListsResponse.md) + - [ListAllSegmentsResponse](ListAllSegmentsResponse.md) + - [ListRecipientsFromContactDbList200Response](ListRecipientsFromContactDbList200Response.md) + - [ListRecipientsOnASegmentResponse](ListRecipientsOnASegmentResponse.md) + - [ListRecipientsResponse](ListRecipientsResponse.md) + - [ListReservedField200Response](ListReservedField200Response.md) + - [ListReservedField200ResponseReservedFieldsInner](ListReservedField200ResponseReservedFieldsInner.md) + - [ListStatus200Response](ListStatus200Response.md) + - [ListStatus200ResponseStatusInner](ListStatus200ResponseStatusInner.md) + - [Operator](Operator.md) + - [SearchRecipient200Response](SearchRecipient200Response.md) + - [SearchRecipient200ResponseRecipientsInner](SearchRecipient200ResponseRecipientsInner.md) + - [SearchRecipient200ResponseRecipientsInnerCustomFieldsInner](SearchRecipient200ResponseRecipientsInnerCustomFieldsInner.md) + - [SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue](SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue.md) + - [SearchRecipientRequest](SearchRecipientRequest.md) + - [Type](Type.md) + - [UpdateAListRequest](UpdateAListRequest.md) + - [UpdateContactDbList200Response](UpdateContactDbList200Response.md) + - [UpdateRecipientRequestInner](UpdateRecipientRequestInner.md) + - [UpdateSegmentRequest](UpdateSegmentRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/lmc_contactdb/api_add_recipient.go b/rest/api/v3/lmc_contactdb/api_add_recipient.go new file mode 100644 index 00000000..acc797b0 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_add_recipient.go @@ -0,0 +1,89 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type AddRecipientParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + AddRecipientRequestInner *[]AddRecipientRequestInner `json:"AddRecipientRequestInner,omitempty"` +} + +func (params *AddRecipientParam) SetOnbehalfof(Onbehalfof string) *AddRecipientParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *AddRecipientParam) SetAddRecipientRequestInner(AddRecipientRequestInner []AddRecipientRequestInner) *AddRecipientParam { + params.AddRecipientRequestInner = &AddRecipientRequestInner + return params +} + +// **This endpoint allows you to add a Marketing Campaigns recipient.** You can add custom field data as a parameter on this endpoint. We have provided an example using some of the default custom fields SendGrid provides. The rate limit is three requests every 2 seconds. You can upload 1000 contacts per request. So the maximum upload rate is 1500 recipients per second. +func (c *ApiService) AddRecipient(params *AddRecipientParam) (interface{}, error) { + path := "/v3/contactdb/recipients" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.AddRecipientRequestInner != nil { + b, err := json.Marshal(*params.AddRecipientRequestInner) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &ContactdbRecipientResponse201{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_add_recipient_to_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_add_recipient_to_contact_db_list.go new file mode 100644 index 00000000..537230e9 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_add_recipient_to_contact_db_list.go @@ -0,0 +1,95 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type AddRecipientToContactDbListParam struct { + // The ID of the list that you want to add the recipient to. + ListId *int32 `json:"list_id"` + // The ID of the recipient you are adding to the list. + RecipientId *string `json:"recipient_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *AddRecipientToContactDbListParam) SetListId(ListId int32) *AddRecipientToContactDbListParam { + params.ListId = &ListId + return params +} +func (params *AddRecipientToContactDbListParam) SetRecipientId(RecipientId string) *AddRecipientToContactDbListParam { + params.RecipientId = &RecipientId + return params +} +func (params *AddRecipientToContactDbListParam) SetOnbehalfof(Onbehalfof string) *AddRecipientToContactDbListParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to add a single recipient to a list.** +func (c *ApiService) AddRecipientToContactDbList(params *AddRecipientToContactDbListParam) (interface{}, error) { + path := "/v3/contactdb/lists/{ListId}/recipients/{RecipientId}" + if params != nil && params.ListId != nil { + path = strings.Replace(path, "{"+"ListId"+"}", fmt.Sprint(*params.ListId), -1) + } + if params != nil && params.RecipientId != nil { + path = strings.Replace(path, "{"+"RecipientId"+"}", *params.RecipientId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_add_recipients_to_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_add_recipients_to_contact_db_list.go new file mode 100644 index 00000000..28277d7b --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_add_recipients_to_contact_db_list.go @@ -0,0 +1,101 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type AddRecipientsToContactDbListParam struct { + // The id of the list of recipients you want to retrieve. + ListId *int32 `json:"list_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + RequestBody *[]int32 `json:"request_body,omitempty"` +} + +func (params *AddRecipientsToContactDbListParam) SetListId(ListId int32) *AddRecipientsToContactDbListParam { + params.ListId = &ListId + return params +} +func (params *AddRecipientsToContactDbListParam) SetOnbehalfof(Onbehalfof string) *AddRecipientsToContactDbListParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *AddRecipientsToContactDbListParam) SetRequestBody(RequestBody []int32) *AddRecipientsToContactDbListParam { + params.RequestBody = &RequestBody + return params +} + +// **This endpoint allows you to add multiple recipients to a list.** Adds existing recipients to a list, passing in the recipient IDs to add. Recipient IDs should be passed exactly as they are returned from recipient endpoints. +func (c *ApiService) AddRecipientsToContactDbList(params *AddRecipientsToContactDbListParam) (interface{}, error) { + path := "/v3/contactdb/lists/{ListId}/recipients" + if params != nil && params.ListId != nil { + path = strings.Replace(path, "{"+"ListId"+"}", fmt.Sprint(*params.ListId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.RequestBody != nil { + b, err := json.Marshal(*params.RequestBody) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_create_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_create_contact_db_list.go new file mode 100644 index 00000000..d9fde69b --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_create_contact_db_list.go @@ -0,0 +1,89 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type CreateContactDbListParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + CreateAListRequest *CreateAListRequest `json:"CreateAListRequest,omitempty"` +} + +func (params *CreateContactDbListParam) SetOnbehalfof(Onbehalfof string) *CreateContactDbListParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateContactDbListParam) SetCreateAListRequest(CreateAListRequest CreateAListRequest) *CreateContactDbListParam { + params.CreateAListRequest = &CreateAListRequest + return params +} + +// **This endpoint allows you to create a list for your recipients.** +func (c *ApiService) CreateContactDbList(params *CreateContactDbListParam) (interface{}, error) { + path := "/v3/contactdb/lists" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateAListRequest != nil { + b, err := json.Marshal(*params.CreateAListRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &ContactdbList2xx{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_create_custom_field.go b/rest/api/v3/lmc_contactdb/api_create_custom_field.go new file mode 100644 index 00000000..6e6a8d32 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_create_custom_field.go @@ -0,0 +1,81 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type CreateCustomFieldParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + CreateCustomFieldRequest *CreateCustomFieldRequest `json:"CreateCustomFieldRequest,omitempty"` +} + +func (params *CreateCustomFieldParam) SetOnbehalfof(Onbehalfof string) *CreateCustomFieldParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateCustomFieldParam) SetCreateCustomFieldRequest(CreateCustomFieldRequest CreateCustomFieldRequest) *CreateCustomFieldParam { + params.CreateCustomFieldRequest = &CreateCustomFieldRequest + return params +} + +// **This endpoint allows you to create a custom field.** **You can create up to 120 custom fields.** +func (c *ApiService) CreateCustomField(params *CreateCustomFieldParam) (interface{}, error) { + path := "/v3/contactdb/custom_fields" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateCustomFieldRequest != nil { + b, err := json.Marshal(*params.CreateCustomFieldRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &ContactdbCustomFieldId2xx{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_create_segment.go b/rest/api/v3/lmc_contactdb/api_create_segment.go new file mode 100644 index 00000000..5ba66b40 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_create_segment.go @@ -0,0 +1,89 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type CreateSegmentParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + ContactdbSegments *ContactdbSegments `json:"ContactdbSegments,omitempty"` +} + +func (params *CreateSegmentParam) SetOnbehalfof(Onbehalfof string) *CreateSegmentParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateSegmentParam) SetContactdbSegments(ContactdbSegments ContactdbSegments) *CreateSegmentParam { + params.ContactdbSegments = &ContactdbSegments + return params +} + +// **This endpoint allows you to create a new segment.** Valid operators for create and update depend on the type of the field for which you are searching. **Dates** - \"eq\", \"ne\", \"lt\" (before), \"gt\" (after) - You may use MM/DD/YYYY for day granularity or an epoch for second granularity. - \"empty\", \"not_empty\" - \"is within\" - You may use an [ISO 8601 date format](https://en.wikipedia.org/wiki/ISO_8601) or the # of days. **Text** - \"contains\" - \"eq\" (is/equals - matches the full field) - \"ne\" (is not/not equals - matches any field where the entire field is not the condition value) - \"empty\" - \"not_empty\" **Numbers** - \"eq\" (is/equals) - \"lt\" (is less than) - \"gt\" (is greater than) - \"empty\" - \"not_empty\" **Email Clicks and Opens** - \"eq\" (opened) - \"ne\" (not opened) All field values must be a string. Conditions using \"eq\" or \"ne\" for email clicks and opens should provide a \"field\" of either `clicks.campaign_identifier` or `opens.campaign_identifier`. The condition value should be a string containing the id of a completed campaign. The conditions list may contain multiple conditions, joined by an \"and\" or \"or\" in the \"and_or\" field. The first condition in the conditions list must have an empty \"and_or\", and subsequent conditions must all specify an \"and_or\". +func (c *ApiService) CreateSegment(params *CreateSegmentParam) (interface{}, error) { + path := "/v3/contactdb/segments" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.ContactdbSegments != nil { + b, err := json.Marshal(*params.ContactdbSegments) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ContactdbSegmentsId200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_delete_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_delete_contact_db_list.go new file mode 100644 index 00000000..5300fcdc --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_delete_contact_db_list.go @@ -0,0 +1,110 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type DeleteContactDbListParam struct { + // + ListId *int32 `json:"list_id"` + // Adds the ability to delete all contacts on the list in addition to deleting the list. + DeleteContacts *DeleteContacts `json:"delete_contacts,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + Body *interface{} `json:"body,omitempty"` +} + +func (params *DeleteContactDbListParam) SetListId(ListId int32) *DeleteContactDbListParam { + params.ListId = &ListId + return params +} +func (params *DeleteContactDbListParam) SetDeleteContacts(DeleteContacts DeleteContacts) *DeleteContactDbListParam { + params.DeleteContacts = &DeleteContacts + return params +} +func (params *DeleteContactDbListParam) SetOnbehalfof(Onbehalfof string) *DeleteContactDbListParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *DeleteContactDbListParam) SetBody(Body interface{}) *DeleteContactDbListParam { + params.Body = &Body + return params +} + +// **This endpoint allows you to delete a specific recipient list with the given ID.** +func (c *ApiService) DeleteContactDbList(params *DeleteContactDbListParam) (interface{}, error) { + path := "/v3/contactdb/lists/{ListId}" + if params != nil && params.ListId != nil { + path = strings.Replace(path, "{"+"ListId"+"}", fmt.Sprint(*params.ListId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + if params != nil && params.DeleteContacts != nil { + data.Set("delete_contacts", fmt.Sprint(*params.DeleteContacts)) + } + body := []byte{} + if params != nil && params.Body != nil { + b, err := json.Marshal(*params.Body) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_delete_contact_db_lists.go b/rest/api/v3/lmc_contactdb/api_delete_contact_db_lists.go new file mode 100644 index 00000000..9698ecdf --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_delete_contact_db_lists.go @@ -0,0 +1,81 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type DeleteContactDbListsParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + RequestBody *[]int32 `json:"request_body,omitempty"` +} + +func (params *DeleteContactDbListsParam) SetOnbehalfof(Onbehalfof string) *DeleteContactDbListsParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *DeleteContactDbListsParam) SetRequestBody(RequestBody []int32) *DeleteContactDbListsParam { + params.RequestBody = &RequestBody + return params +} + +// **This endpoint allows you to delete multiple recipient lists.** +func (c *ApiService) DeleteContactDbLists(params *DeleteContactDbListsParam) (interface{}, error) { + path := "/v3/contactdb/lists" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.RequestBody != nil { + b, err := json.Marshal(*params.RequestBody) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_delete_custom_field.go b/rest/api/v3/lmc_contactdb/api_delete_custom_field.go new file mode 100644 index 00000000..132d5593 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_delete_custom_field.go @@ -0,0 +1,94 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type DeleteCustomFieldParam struct { + // The ID of the custom field that you want to retrieve. + CustomFieldId *int32 `json:"custom_field_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteCustomFieldParam) SetCustomFieldId(CustomFieldId int32) *DeleteCustomFieldParam { + params.CustomFieldId = &CustomFieldId + return params +} +func (params *DeleteCustomFieldParam) SetOnbehalfof(Onbehalfof string) *DeleteCustomFieldParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete a custom field by ID.** +func (c *ApiService) DeleteCustomField(params *DeleteCustomFieldParam) (interface{}, error) { + path := "/v3/contactdb/custom_fields/{CustomFieldId}" + if params != nil && params.CustomFieldId != nil { + path = strings.Replace(path, "{"+"CustomFieldId"+"}", fmt.Sprint(*params.CustomFieldId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 202 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_delete_recipient.go b/rest/api/v3/lmc_contactdb/api_delete_recipient.go new file mode 100644 index 00000000..f6b2d8d3 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_delete_recipient.go @@ -0,0 +1,93 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DeleteRecipientParam struct { + // The ID of the recipient that you want to retrieve. + RecipientId *string `json:"recipient_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteRecipientParam) SetRecipientId(RecipientId string) *DeleteRecipientParam { + params.RecipientId = &RecipientId + return params +} +func (params *DeleteRecipientParam) SetOnbehalfof(Onbehalfof string) *DeleteRecipientParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete a single recipient with the given ID from your contact database.** > Use this to permanently delete your recipients from all of your contact lists and all segments if required by applicable law. +func (c *ApiService) DeleteRecipient(params *DeleteRecipientParam) (interface{}, error) { + path := "/v3/contactdb/recipients/{RecipientId}" + if params != nil && params.RecipientId != nil { + path = strings.Replace(path, "{"+"RecipientId"+"}", *params.RecipientId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_delete_recipient_from_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_delete_recipient_from_contact_db_list.go new file mode 100644 index 00000000..8a2c129e --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_delete_recipient_from_contact_db_list.go @@ -0,0 +1,110 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type DeleteRecipientFromContactDbListParam struct { + // The ID of the list that you want to add the recipient to. + ListId *int32 `json:"list_id"` + // The ID of the recipient you are adding to the list. + RecipientId *string `json:"recipient_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + Body *interface{} `json:"body,omitempty"` +} + +func (params *DeleteRecipientFromContactDbListParam) SetListId(ListId int32) *DeleteRecipientFromContactDbListParam { + params.ListId = &ListId + return params +} +func (params *DeleteRecipientFromContactDbListParam) SetRecipientId(RecipientId string) *DeleteRecipientFromContactDbListParam { + params.RecipientId = &RecipientId + return params +} +func (params *DeleteRecipientFromContactDbListParam) SetOnbehalfof(Onbehalfof string) *DeleteRecipientFromContactDbListParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *DeleteRecipientFromContactDbListParam) SetBody(Body interface{}) *DeleteRecipientFromContactDbListParam { + params.Body = &Body + return params +} + +// **This endpoint allows you to delete a single recipient from a list.** +func (c *ApiService) DeleteRecipientFromContactDbList(params *DeleteRecipientFromContactDbListParam) (interface{}, error) { + path := "/v3/contactdb/lists/{ListId}/recipients/{RecipientId}" + if params != nil && params.ListId != nil { + path = strings.Replace(path, "{"+"ListId"+"}", fmt.Sprint(*params.ListId), -1) + } + if params != nil && params.RecipientId != nil { + path = strings.Replace(path, "{"+"RecipientId"+"}", *params.RecipientId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.Body != nil { + b, err := json.Marshal(*params.Body) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_delete_recipients.go b/rest/api/v3/lmc_contactdb/api_delete_recipients.go new file mode 100644 index 00000000..db2072e4 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_delete_recipients.go @@ -0,0 +1,89 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type DeleteRecipientsParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + RequestBody *[]string `json:"request_body,omitempty"` +} + +func (params *DeleteRecipientsParam) SetOnbehalfof(Onbehalfof string) *DeleteRecipientsParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *DeleteRecipientsParam) SetRequestBody(RequestBody []string) *DeleteRecipientsParam { + params.RequestBody = &RequestBody + return params +} + +// **This endpoint allows you to deletes one or more recipients.** The body of an API call to this endpoint must include an array of recipient IDs of the recipients you want to delete. +func (c *ApiService) DeleteRecipients(params *DeleteRecipientsParam) (interface{}, error) { + path := "/v3/contactdb/recipients" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.RequestBody != nil { + b, err := json.Marshal(*params.RequestBody) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_delete_segment.go b/rest/api/v3/lmc_contactdb/api_delete_segment.go new file mode 100644 index 00000000..bf6607cd --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_delete_segment.go @@ -0,0 +1,110 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type DeleteSegmentParam struct { + // + SegmentId *int32 `json:"segment_id"` + // True to delete all contacts matching the segment in addition to deleting the segment + DeleteContacts *bool `json:"delete_contacts,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + Body *interface{} `json:"body,omitempty"` +} + +func (params *DeleteSegmentParam) SetSegmentId(SegmentId int32) *DeleteSegmentParam { + params.SegmentId = &SegmentId + return params +} +func (params *DeleteSegmentParam) SetDeleteContacts(DeleteContacts bool) *DeleteSegmentParam { + params.DeleteContacts = &DeleteContacts + return params +} +func (params *DeleteSegmentParam) SetOnbehalfof(Onbehalfof string) *DeleteSegmentParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *DeleteSegmentParam) SetBody(Body interface{}) *DeleteSegmentParam { + params.Body = &Body + return params +} + +// **This endpoint allows you to delete a segment from your recipients database.** You also have the option to delete all the contacts from your Marketing Campaigns recipient database who were in this segment. +func (c *ApiService) DeleteSegment(params *DeleteSegmentParam) (interface{}, error) { + path := "/v3/contactdb/segments/{SegmentId}" + if params != nil && params.SegmentId != nil { + path = strings.Replace(path, "{"+"SegmentId"+"}", fmt.Sprint(*params.SegmentId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + if params != nil && params.DeleteContacts != nil { + data.Set("delete_contacts", fmt.Sprint(*params.DeleteContacts)) + } + body := []byte{} + if params != nil && params.Body != nil { + b, err := json.Marshal(*params.Body) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_get_billable.go b/rest/api/v3/lmc_contactdb/api_get_billable.go new file mode 100644 index 00000000..78a99ca0 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_get_billable.go @@ -0,0 +1,66 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type GetBillableParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetBillableParam) SetOnbehalfof(Onbehalfof string) *GetBillableParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve the number of Marketing Campaigns recipients that you will be billed for.** You are billed for marketing campaigns based on the highest number of recipients you have had in your account at one time. This endpoint will allow you to know the current billable count value. +func (c *ApiService) GetBillable(params *GetBillableParam) (interface{}, error) { + path := "/v3/contactdb/recipients/billable_count" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ContactdbRecipientCount200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_get_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_get_contact_db_list.go new file mode 100644 index 00000000..9fa22f4f --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_get_contact_db_list.go @@ -0,0 +1,94 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type GetContactDbListParam struct { + // + ListId *int32 `json:"list_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetContactDbListParam) SetListId(ListId int32) *GetContactDbListParam { + params.ListId = &ListId + return params +} +func (params *GetContactDbListParam) SetOnbehalfof(Onbehalfof string) *GetContactDbListParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a single recipient list.** +func (c *ApiService) GetContactDbList(params *GetContactDbListParam) (interface{}, error) { + path := "/v3/contactdb/lists/{ListId}" + if params != nil && params.ListId != nil { + path = strings.Replace(path, "{"+"ListId"+"}", fmt.Sprint(*params.ListId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ContactdbList2xx{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_get_custom_field.go b/rest/api/v3/lmc_contactdb/api_get_custom_field.go new file mode 100644 index 00000000..4bccbaa4 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_get_custom_field.go @@ -0,0 +1,94 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type GetCustomFieldParam struct { + // The ID of the custom field that you want to retrieve. + CustomFieldId *int32 `json:"custom_field_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetCustomFieldParam) SetCustomFieldId(CustomFieldId int32) *GetCustomFieldParam { + params.CustomFieldId = &CustomFieldId + return params +} +func (params *GetCustomFieldParam) SetOnbehalfof(Onbehalfof string) *GetCustomFieldParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a custom field by ID.** +func (c *ApiService) GetCustomField(params *GetCustomFieldParam) (interface{}, error) { + path := "/v3/contactdb/custom_fields/{CustomFieldId}" + if params != nil && params.CustomFieldId != nil { + path = strings.Replace(path, "{"+"CustomFieldId"+"}", fmt.Sprint(*params.CustomFieldId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ContactdbCustomFieldId2xx{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_get_recipient.go b/rest/api/v3/lmc_contactdb/api_get_recipient.go new file mode 100644 index 00000000..8368814a --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_get_recipient.go @@ -0,0 +1,93 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type GetRecipientParam struct { + // The ID of the recipient that you want to retrieve. + RecipientId *string `json:"recipient_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetRecipientParam) SetRecipientId(RecipientId string) *GetRecipientParam { + params.RecipientId = &RecipientId + return params +} +func (params *GetRecipientParam) SetOnbehalfof(Onbehalfof string) *GetRecipientParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a single recipient by ID from your contact database.** +func (c *ApiService) GetRecipient(params *GetRecipientParam) (interface{}, error) { + path := "/v3/contactdb/recipients/{RecipientId}" + if params != nil && params.RecipientId != nil { + path = strings.Replace(path, "{"+"RecipientId"+"}", *params.RecipientId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ContactdbRecipient200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_get_recipient_list.go b/rest/api/v3/lmc_contactdb/api_get_recipient_list.go new file mode 100644 index 00000000..4307012a --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_get_recipient_list.go @@ -0,0 +1,93 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type GetRecipientListParam struct { + // The ID of the recipient for whom you are retrieving lists. + RecipientId *string `json:"recipient_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetRecipientListParam) SetRecipientId(RecipientId string) *GetRecipientListParam { + params.RecipientId = &RecipientId + return params +} +func (params *GetRecipientListParam) SetOnbehalfof(Onbehalfof string) *GetRecipientListParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve the lists that a given recipient belongs to.** Each recipient can be on many lists. This endpoint gives you all of the lists that any one recipient has been added to. +func (c *ApiService) GetRecipientList(params *GetRecipientListParam) (interface{}, error) { + path := "/v3/contactdb/recipients/{RecipientId}/lists" + if params != nil && params.RecipientId != nil { + path = strings.Replace(path, "{"+"RecipientId"+"}", *params.RecipientId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetRecipientList200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_get_segment.go b/rest/api/v3/lmc_contactdb/api_get_segment.go new file mode 100644 index 00000000..668df630 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_get_segment.go @@ -0,0 +1,94 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type GetSegmentParam struct { + // + SegmentId *int32 `json:"segment_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetSegmentParam) SetSegmentId(SegmentId int32) *GetSegmentParam { + params.SegmentId = &SegmentId + return params +} +func (params *GetSegmentParam) SetOnbehalfof(Onbehalfof string) *GetSegmentParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a single segment with the given ID.** +func (c *ApiService) GetSegment(params *GetSegmentParam) (interface{}, error) { + path := "/v3/contactdb/segments/{SegmentId}" + if params != nil && params.SegmentId != nil { + path = strings.Replace(path, "{"+"SegmentId"+"}", fmt.Sprint(*params.SegmentId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ContactdbSegments{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_list_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_list_contact_db_list.go new file mode 100644 index 00000000..fc1bb3af --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_list_contact_db_list.go @@ -0,0 +1,58 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListContactDbListParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListContactDbListParam) SetOnbehalfof(Onbehalfof string) *ListContactDbListParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve all of your recipient lists. If you don't have any lists, an empty array will be returned.** +func (c *ApiService) ListContactDbList(params *ListContactDbListParam) (interface{}, error) { + path := "/v3/contactdb/lists" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListAllListsResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_list_custom_field.go b/rest/api/v3/lmc_contactdb/api_list_custom_field.go new file mode 100644 index 00000000..90c3c9bd --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_list_custom_field.go @@ -0,0 +1,66 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListCustomFieldParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListCustomFieldParam) SetOnbehalfof(Onbehalfof string) *ListCustomFieldParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve all custom fields.** +func (c *ApiService) ListCustomField(params *ListCustomFieldParam) (interface{}, error) { + path := "/v3/contactdb/custom_fields" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListAllCustomFieldsResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_list_recipient.go b/rest/api/v3/lmc_contactdb/api_list_recipient.go new file mode 100644 index 00000000..db2700e1 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_list_recipient.go @@ -0,0 +1,94 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListRecipientParam struct { + // Page index of first recipients to return (must be a positive integer) + Page *int32 `json:"page,omitempty"` + // Number of recipients to return at a time (must be a positive integer between 1 and 1000) + PageSize *int32 `json:"page_size,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListRecipientParam) SetPage(Page int32) *ListRecipientParam { + params.Page = &Page + return params +} +func (params *ListRecipientParam) SetPageSize(PageSize int32) *ListRecipientParam { + params.PageSize = &PageSize + return params +} +func (params *ListRecipientParam) SetOnbehalfof(Onbehalfof string) *ListRecipientParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve all of your Marketing Campaigns recipients.** Batch deletion of a page makes it possible to receive an empty page of recipients before reaching the end of the list of recipients. To avoid this issue; iterate over pages until a 404 is retrieved. +func (c *ApiService) ListRecipient(params *ListRecipientParam) (interface{}, error) { + path := "/v3/contactdb/recipients" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Page != nil { + data.Set("page", fmt.Sprint(*params.Page)) + } + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListRecipientsResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_list_recipient_count.go b/rest/api/v3/lmc_contactdb/api_list_recipient_count.go new file mode 100644 index 00000000..68baf731 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_list_recipient_count.go @@ -0,0 +1,66 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListRecipientCountParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListRecipientCountParam) SetOnbehalfof(Onbehalfof string) *ListRecipientCountParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve the total number of Marketing Campaigns recipients.** +func (c *ApiService) ListRecipientCount(params *ListRecipientCountParam) (interface{}, error) { + path := "/v3/contactdb/recipients/count" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ContactdbRecipientCount200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_list_recipient_for_segment.go b/rest/api/v3/lmc_contactdb/api_list_recipient_for_segment.go new file mode 100644 index 00000000..3d7a5857 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_list_recipient_for_segment.go @@ -0,0 +1,113 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type ListRecipientForSegmentParam struct { + // The ID of the segment from which you want to retrieve recipients. + SegmentId *int32 `json:"segment_id"` + // + Page *int32 `json:"page,omitempty"` + // + PageSize *int32 `json:"page_size,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListRecipientForSegmentParam) SetSegmentId(SegmentId int32) *ListRecipientForSegmentParam { + params.SegmentId = &SegmentId + return params +} +func (params *ListRecipientForSegmentParam) SetPage(Page int32) *ListRecipientForSegmentParam { + params.Page = &Page + return params +} +func (params *ListRecipientForSegmentParam) SetPageSize(PageSize int32) *ListRecipientForSegmentParam { + params.PageSize = &PageSize + return params +} +func (params *ListRecipientForSegmentParam) SetOnbehalfof(Onbehalfof string) *ListRecipientForSegmentParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve all of the recipients in a segment with the given ID.** +func (c *ApiService) ListRecipientForSegment(params *ListRecipientForSegmentParam) (interface{}, error) { + path := "/v3/contactdb/segments/{SegmentId}/recipients" + if params != nil && params.SegmentId != nil { + path = strings.Replace(path, "{"+"SegmentId"+"}", fmt.Sprint(*params.SegmentId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Page != nil { + data.Set("page", fmt.Sprint(*params.Page)) + } + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListRecipientsOnASegmentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_list_recipients_from_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_list_recipients_from_contact_db_list.go new file mode 100644 index 00000000..b4d2bdf8 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_list_recipients_from_contact_db_list.go @@ -0,0 +1,105 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type ListRecipientsFromContactDbListParam struct { + // The id of the list of recipients you want to retrieve. + ListId *int32 `json:"list_id"` + // Page index of first recipient to return (must be a positive integer) + Page *int32 `json:"page,omitempty"` + // Number of recipients to return at a time (must be a positive integer between 1 and 1000) + PageSize *int32 `json:"page_size,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListRecipientsFromContactDbListParam) SetListId(ListId int32) *ListRecipientsFromContactDbListParam { + params.ListId = &ListId + return params +} +func (params *ListRecipientsFromContactDbListParam) SetPage(Page int32) *ListRecipientsFromContactDbListParam { + params.Page = &Page + return params +} +func (params *ListRecipientsFromContactDbListParam) SetPageSize(PageSize int32) *ListRecipientsFromContactDbListParam { + params.PageSize = &PageSize + return params +} +func (params *ListRecipientsFromContactDbListParam) SetOnbehalfof(Onbehalfof string) *ListRecipientsFromContactDbListParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve all recipients on the list with the given ID.** +func (c *ApiService) ListRecipientsFromContactDbList(params *ListRecipientsFromContactDbListParam) (interface{}, error) { + path := "/v3/contactdb/lists/{ListId}/recipients" + if params != nil && params.ListId != nil { + path = strings.Replace(path, "{"+"ListId"+"}", fmt.Sprint(*params.ListId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Page != nil { + data.Set("page", fmt.Sprint(*params.Page)) + } + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListRecipientsFromContactDbList200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_list_reserved_field.go b/rest/api/v3/lmc_contactdb/api_list_reserved_field.go new file mode 100644 index 00000000..52c27544 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_list_reserved_field.go @@ -0,0 +1,66 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListReservedFieldParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListReservedFieldParam) SetOnbehalfof(Onbehalfof string) *ListReservedFieldParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to list all fields that are reserved and can't be used for custom field names.** +func (c *ApiService) ListReservedField(params *ListReservedFieldParam) (interface{}, error) { + path := "/v3/contactdb/reserved_fields" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListReservedField200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_list_search_recipient.go b/rest/api/v3/lmc_contactdb/api_list_search_recipient.go new file mode 100644 index 00000000..1818c824 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_list_search_recipient.go @@ -0,0 +1,84 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListSearchRecipientParam struct { + // + FieldName *string `json:"{field_name},omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListSearchRecipientParam) SetFieldName(FieldName string) *ListSearchRecipientParam { + params.FieldName = &FieldName + return params +} +func (params *ListSearchRecipientParam) SetOnbehalfof(Onbehalfof string) *ListSearchRecipientParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to perform a search on all of your Marketing Campaigns recipients.** field_name: * is a variable that is substituted for your actual custom field name from your recipient. * Text fields must be url-encoded. Date fields are searchable only by unix timestamp (e.g. 2/2/2015 becomes 1422835200) * If field_name is a 'reserved' date field, such as created_at or updated_at, the system will internally convert your epoch time to a date range encompassing the entire day. For example, an epoch time of 1422835600 converts to Mon, 02 Feb 2015 00:06:40 GMT, but internally the system will search from Mon, 02 Feb 2015 00:00:00 GMT through Mon, 02 Feb 2015 23:59:59 GMT. +func (c *ApiService) ListSearchRecipient(params *ListSearchRecipientParam) (interface{}, error) { + path := "/v3/contactdb/recipients/search" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.FieldName != nil { + data.Set("{field_name}", *params.FieldName) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListRecipientsFromContactDbList200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_list_segment.go b/rest/api/v3/lmc_contactdb/api_list_segment.go new file mode 100644 index 00000000..5f969fda --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_list_segment.go @@ -0,0 +1,66 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListSegmentParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListSegmentParam) SetOnbehalfof(Onbehalfof string) *ListSegmentParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve all of your segments.** +func (c *ApiService) ListSegment(params *ListSegmentParam) (interface{}, error) { + path := "/v3/contactdb/segments" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListAllSegmentsResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_list_status.go b/rest/api/v3/lmc_contactdb/api_list_status.go new file mode 100644 index 00000000..4ea4c9da --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_list_status.go @@ -0,0 +1,58 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListStatusParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListStatusParam) SetOnbehalfof(Onbehalfof string) *ListStatusParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to check the upload status of a Marketing Campaigns recipient.** +func (c *ApiService) ListStatus(params *ListStatusParam) (interface{}, error) { + path := "/v3/contactdb/status" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListStatus200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_search_recipient.go b/rest/api/v3/lmc_contactdb/api_search_recipient.go new file mode 100644 index 00000000..a63395e1 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_search_recipient.go @@ -0,0 +1,64 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type SearchRecipientParam struct { + // + SearchRecipientRequest *SearchRecipientRequest `json:"SearchRecipientRequest,omitempty"` +} + +func (params *SearchRecipientParam) SetSearchRecipientRequest(SearchRecipientRequest SearchRecipientRequest) *SearchRecipientParam { + params.SearchRecipientRequest = &SearchRecipientRequest + return params +} + +// Search using segment conditions without actually creating a segment. Body contains a JSON object with `conditions`, a list of conditions as described below, and an optional `list_id`, which is a valid list ID for a list to limit the search on. Valid operators for create and update depend on the type of the field for which you are searching. - Dates: - `\"eq\"`, `\"ne\"`, `\"lt\"` (before), `\"gt\"` (after) - You may use MM/DD/YYYY for day granularity or an epoch for second granularity. - `\"empty\"`, `\"not_empty\"` - `\"is within\"` - You may use an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date format or the # of days. - Text: `\"contains\"`, `\"eq\"` (is - matches the full field), `\"ne\"` (is not - matches any field where the entire field is not the condition value), `\"empty\"`, `\"not_empty\"` - Numbers: `\"eq\"`, `\"lt\"`, `\"gt\"`, `\"empty\"`, `\"not_empty\"` - Email Clicks and Opens: `\"eq\"` (opened), `\"ne\"` (not opened) Field values must all be a string. Search conditions using `\"eq\"` or `\"ne\"` for email clicks and opens should provide a \"field\" of either `clicks.campaign_identifier` or `opens.campaign_identifier`. The condition value should be a string containing the id of a completed campaign. Search conditions list may contain multiple conditions, joined by an `\"and\"` or `\"or\"` in the `\"and_or\"` field. The first condition in the conditions list must have an empty `\"and_or\"`, and subsequent conditions must all specify an `\"and_or\"`. +func (c *ApiService) SearchRecipient(params *SearchRecipientParam) (interface{}, error) { + path := "/v3/contactdb/recipients/search" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SearchRecipientRequest != nil { + b, err := json.Marshal(*params.SearchRecipientRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SearchRecipient200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_service.go b/rest/api/v3/lmc_contactdb/api_service.go new file mode 100644 index 00000000..47aac07a --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/lmc_contactdb/api_update_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_update_contact_db_list.go new file mode 100644 index 00000000..fea0cc3a --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_update_contact_db_list.go @@ -0,0 +1,101 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type UpdateContactDbListParam struct { + // + ListId *int32 `json:"list_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateAListRequest *UpdateAListRequest `json:"UpdateAListRequest,omitempty"` +} + +func (params *UpdateContactDbListParam) SetListId(ListId int32) *UpdateContactDbListParam { + params.ListId = &ListId + return params +} +func (params *UpdateContactDbListParam) SetOnbehalfof(Onbehalfof string) *UpdateContactDbListParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateContactDbListParam) SetUpdateAListRequest(UpdateAListRequest UpdateAListRequest) *UpdateContactDbListParam { + params.UpdateAListRequest = &UpdateAListRequest + return params +} + +// **This endpoint allows you to update the name of one of your recipient lists.** +func (c *ApiService) UpdateContactDbList(params *UpdateContactDbListParam) (interface{}, error) { + path := "/v3/contactdb/lists/{ListId}" + if params != nil && params.ListId != nil { + path = strings.Replace(path, "{"+"ListId"+"}", fmt.Sprint(*params.ListId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateAListRequest != nil { + b, err := json.Marshal(*params.UpdateAListRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &UpdateContactDbList200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_update_recipient.go b/rest/api/v3/lmc_contactdb/api_update_recipient.go new file mode 100644 index 00000000..7399c4ef --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_update_recipient.go @@ -0,0 +1,89 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type UpdateRecipientParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateRecipientRequestInner *[]UpdateRecipientRequestInner `json:"UpdateRecipientRequestInner,omitempty"` +} + +func (params *UpdateRecipientParam) SetOnbehalfof(Onbehalfof string) *UpdateRecipientParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateRecipientParam) SetUpdateRecipientRequestInner(UpdateRecipientRequestInner []UpdateRecipientRequestInner) *UpdateRecipientParam { + params.UpdateRecipientRequestInner = &UpdateRecipientRequestInner + return params +} + +// **This endpoint allows you to update one or more recipients.** The body of an API call to this endpoint must include an array of one or more recipient objects. It is of note that you can add custom field data as parameters on recipient objects. We have provided an example using some of the default custom fields SendGrid provides. +func (c *ApiService) UpdateRecipient(params *UpdateRecipientParam) (interface{}, error) { + path := "/v3/contactdb/recipients" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateRecipientRequestInner != nil { + b, err := json.Marshal(*params.UpdateRecipientRequestInner) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &ContactdbRecipientResponse201{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_update_segment.go b/rest/api/v3/lmc_contactdb/api_update_segment.go new file mode 100644 index 00000000..10340563 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_update_segment.go @@ -0,0 +1,101 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type UpdateSegmentParam struct { + // + SegmentId *int32 `json:"segment_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateSegmentRequest *UpdateSegmentRequest `json:"UpdateSegmentRequest,omitempty"` +} + +func (params *UpdateSegmentParam) SetSegmentId(SegmentId int32) *UpdateSegmentParam { + params.SegmentId = &SegmentId + return params +} +func (params *UpdateSegmentParam) SetOnbehalfof(Onbehalfof string) *UpdateSegmentParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateSegmentParam) SetUpdateSegmentRequest(UpdateSegmentRequest UpdateSegmentRequest) *UpdateSegmentParam { + params.UpdateSegmentRequest = &UpdateSegmentRequest + return params +} + +// **This endpoint allows you to update a segment.** +func (c *ApiService) UpdateSegment(params *UpdateSegmentParam) (interface{}, error) { + path := "/v3/contactdb/segments/{SegmentId}" + if params != nil && params.SegmentId != nil { + path = strings.Replace(path, "{"+"SegmentId"+"}", fmt.Sprint(*params.SegmentId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateSegmentRequest != nil { + b, err := json.Marshal(*params.UpdateSegmentRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ContactdbSegments{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_contactdb/docs/AddRecipient.md b/rest/api/v3/lmc_contactdb/docs/AddRecipient.md new file mode 100644 index 00000000..9bb1614c --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/AddRecipient.md @@ -0,0 +1,49 @@ +# AddRecipient + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddRecipient**](AddRecipient.md#AddRecipient) | **Post** /v3/contactdb/recipients | Add recipients + + + +## AddRecipient + +> ContactdbRecipientResponse201 AddRecipient(ctx, optional) + +Add recipients + +**This endpoint allows you to add a Marketing Campaigns recipient.** You can add custom field data as a parameter on this endpoint. We have provided an example using some of the default custom fields SendGrid provides. The rate limit is three requests every 2 seconds. You can upload 1000 contacts per request. So the maximum upload rate is 1500 recipients per second. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a AddRecipientParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**AddRecipientRequestInner** | [**[]AddRecipientRequestInner**](AddRecipientRequestInner.md) | + +### Return type + +[**ContactdbRecipientResponse201**](ContactdbRecipientResponse201.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/AddRecipientRequestInner.md b/rest/api/v3/lmc_contactdb/docs/AddRecipientRequestInner.md new file mode 100644 index 00000000..3860b0d0 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/AddRecipientRequestInner.md @@ -0,0 +1,14 @@ +# AddRecipientRequestInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address of the recipient. | +**FirstName** | **string** | The first name of the recipient. |[optional] +**LastName** | **string** | The last name of the recipient. |[optional] +**Age** | **int32** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/AddRecipientToContactDbList.md b/rest/api/v3/lmc_contactdb/docs/AddRecipientToContactDbList.md new file mode 100644 index 00000000..1b9788b1 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/AddRecipientToContactDbList.md @@ -0,0 +1,53 @@ +# AddRecipientToContactDbList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddRecipientToContactDbList**](AddRecipientToContactDbList.md#AddRecipientToContactDbList) | **Post** /v3/contactdb/lists/{ListId}/recipients/{RecipientId} | Add a Single Recipient to a List + + + +## AddRecipientToContactDbList + +> AddRecipientToContactDbList(ctx, ListIdRecipientIdoptional) + +Add a Single Recipient to a List + +**This endpoint allows you to add a single recipient to a list.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ListId** | **int32** | The ID of the list that you want to add the recipient to. +**RecipientId** | **string** | The ID of the recipient you are adding to the list. + +### Other Parameters + +Other parameters are passed through a pointer to a AddRecipientToContactDbListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/AddRecipientsToContactDbList.md b/rest/api/v3/lmc_contactdb/docs/AddRecipientsToContactDbList.md new file mode 100644 index 00000000..ba687bc9 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/AddRecipientsToContactDbList.md @@ -0,0 +1,53 @@ +# AddRecipientsToContactDbList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddRecipientsToContactDbList**](AddRecipientsToContactDbList.md#AddRecipientsToContactDbList) | **Post** /v3/contactdb/lists/{ListId}/recipients | Add Multiple Recipients to a List + + + +## AddRecipientsToContactDbList + +> AddRecipientsToContactDbList(ctx, ListIdoptional) + +Add Multiple Recipients to a List + +**This endpoint allows you to add multiple recipients to a list.** Adds existing recipients to a list, passing in the recipient IDs to add. Recipient IDs should be passed exactly as they are returned from recipient endpoints. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ListId** | **int32** | The id of the list of recipients you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a AddRecipientsToContactDbListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**RequestBody** | **[]int32** | + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/AndOr.md b/rest/api/v3/lmc_contactdb/docs/AndOr.md new file mode 100644 index 00000000..acf7be53 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/AndOr.md @@ -0,0 +1,14 @@ +# AndOr + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**AND** | string | (value: `"and"`) +**OR** | string | (value: `"or"`) +**EMPTY** | string | (value: `""`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbCustomField.md b/rest/api/v3/lmc_contactdb/docs/ContactdbCustomField.md new file mode 100644 index 00000000..d152b843 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ContactdbCustomField.md @@ -0,0 +1,12 @@ +# ContactdbCustomField + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the field |[optional] +**Type** | [**Type**](Type.md) | The type of the field. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbCustomFieldId2xx.md b/rest/api/v3/lmc_contactdb/docs/ContactdbCustomFieldId2xx.md new file mode 100644 index 00000000..c8223d54 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ContactdbCustomFieldId2xx.md @@ -0,0 +1,13 @@ +# ContactdbCustomFieldId2xx + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the field |[optional] +**Type** | [**Type**](Type.md) | The type of the field. |[optional] +**Id** | **float32** | The ID of the custom field. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbCustomFieldIdValue.md b/rest/api/v3/lmc_contactdb/docs/ContactdbCustomFieldIdValue.md new file mode 100644 index 00000000..411b325c --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ContactdbCustomFieldIdValue.md @@ -0,0 +1,14 @@ +# ContactdbCustomFieldIdValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the field |[optional] +**Type** | [**Type**](Type.md) | The type of the field. |[optional] +**Id** | **float32** | The ID of the custom field. |[optional] +**Value** | **string** | The value of this recipient's custom field |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbList2xx.md b/rest/api/v3/lmc_contactdb/docs/ContactdbList2xx.md new file mode 100644 index 00000000..ce51cebb --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ContactdbList2xx.md @@ -0,0 +1,13 @@ +# ContactdbList2xx + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The reference ID of your list. | +**Name** | **string** | The name of your list. Must be unique against all other list and segment names. | +**RecipientCount** | **int32** | The count of recipients currently in the list. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbRecipient200.md b/rest/api/v3/lmc_contactdb/docs/ContactdbRecipient200.md new file mode 100644 index 00000000..b07a679b --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ContactdbRecipient200.md @@ -0,0 +1,11 @@ +# ContactdbRecipient200 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Recipients** | [**[]ContactdbRecipient200RecipientsInner**](ContactdbRecipient200RecipientsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbRecipient200RecipientsInner.md b/rest/api/v3/lmc_contactdb/docs/ContactdbRecipient200RecipientsInner.md new file mode 100644 index 00000000..8ec7cf16 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ContactdbRecipient200RecipientsInner.md @@ -0,0 +1,20 @@ +# ContactdbRecipient200RecipientsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The ID of this recipient. |[optional] +**CreatedAt** | **float32** | The time this record was created in your contactdb, in unixtime. |[optional] +**CustomFields** | [**[]ContactdbCustomFieldIdValue**](ContactdbCustomFieldIdValue.md) | The custom fields assigned to this recipient and their values. |[optional] +**Email** | **string** | The email address of this recipient. This is a default custom field that SendGrid provides. | +**FirstName** | **string** | The first name of this recipient. This is a default custom field that SendGrid provides. |[optional] +**LastName** | **string** | The last name of the recipient. |[optional] +**LastClicked** | **float32** | The last time this recipient clicked a link from one of your campaigns, in unixtime. |[optional] +**LastEmailed** | **float32** | The last time this user was emailed by one of your campaigns, in unixtime. |[optional] +**LastOpened** | **float32** | The last time this recipient opened an email from you, in unixtime. |[optional] +**UpdatedAt** | **float32** | The last update date for this recipient's record. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbRecipientCount200.md b/rest/api/v3/lmc_contactdb/docs/ContactdbRecipientCount200.md new file mode 100644 index 00000000..3a605dbc --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ContactdbRecipientCount200.md @@ -0,0 +1,11 @@ +# ContactdbRecipientCount200 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RecipientCount** | **float32** | The count of recipients. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbRecipientResponse201.md b/rest/api/v3/lmc_contactdb/docs/ContactdbRecipientResponse201.md new file mode 100644 index 00000000..f5b31dc6 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ContactdbRecipientResponse201.md @@ -0,0 +1,16 @@ +# ContactdbRecipientResponse201 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ErrorCount** | **float32** | The number of errors found while adding recipients. |[default to 0] +**ErrorIndices** | **[]float32** | The indices of the recipient(s) sent that caused the error. |[optional] [default to []] +**NewCount** | **float32** | The count of new recipients added to the contactdb. |[default to 0] +**PersistedRecipients** | **[]string** | The recipient IDs of the recipients that already existed from this request. |[default to []] +**UpdatedCount** | **float32** | The recipients who were updated from this request. |[default to 0] +**Errors** | [**[]ContactdbRecipientResponse201ErrorsInner**](ContactdbRecipientResponse201ErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbRecipientResponse201ErrorsInner.md b/rest/api/v3/lmc_contactdb/docs/ContactdbRecipientResponse201ErrorsInner.md new file mode 100644 index 00000000..d7994f83 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ContactdbRecipientResponse201ErrorsInner.md @@ -0,0 +1,12 @@ +# ContactdbRecipientResponse201ErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | |[optional] +**ErrorIndices** | **[]float32** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbSegments.md b/rest/api/v3/lmc_contactdb/docs/ContactdbSegments.md new file mode 100644 index 00000000..c9573dfd --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ContactdbSegments.md @@ -0,0 +1,14 @@ +# ContactdbSegments + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of this segment. | +**ListId** | **int32** | The list id from which to make this segment. Not including this ID will mean your segment is created from the main contactdb rather than a list. |[optional] +**Conditions** | [**[]ContactdbSegmentsConditions**](ContactdbSegmentsConditions.md) | The conditions for a recipient to be included in this segment. | +**RecipientCount** | **float32** | The count of recipients in this list. This is not included on creation of segments. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbSegmentsConditions.md b/rest/api/v3/lmc_contactdb/docs/ContactdbSegmentsConditions.md new file mode 100644 index 00000000..0cac8eb2 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ContactdbSegmentsConditions.md @@ -0,0 +1,14 @@ +# ContactdbSegmentsConditions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | | +**Value** | **string** | | +**Operator** | [**Operator**](Operator.md) | | +**AndOr** | [**AndOr**](AndOr.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbSegmentsId200.md b/rest/api/v3/lmc_contactdb/docs/ContactdbSegmentsId200.md new file mode 100644 index 00000000..8e94dfe6 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ContactdbSegmentsId200.md @@ -0,0 +1,15 @@ +# ContactdbSegmentsId200 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **float32** | The ID of the segment. | +**Name** | **string** | The name of this segment. | +**ListId** | **int32** | The list id from which to make this segment. Not including this ID will mean your segment is created from the main contactdb rather than a list. |[optional] +**Conditions** | [**[]ContactdbSegmentsConditions**](ContactdbSegmentsConditions.md) | The conditions for a recipient to be included in this segment. | +**RecipientCount** | **float32** | The count of recipients in this list. This is not included on creation of segments. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/CreateAListRequest.md b/rest/api/v3/lmc_contactdb/docs/CreateAListRequest.md new file mode 100644 index 00000000..0657b896 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/CreateAListRequest.md @@ -0,0 +1,11 @@ +# CreateAListRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/CreateContactDbList.md b/rest/api/v3/lmc_contactdb/docs/CreateContactDbList.md new file mode 100644 index 00000000..e513375e --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/CreateContactDbList.md @@ -0,0 +1,49 @@ +# CreateContactDbList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateContactDbList**](CreateContactDbList.md#CreateContactDbList) | **Post** /v3/contactdb/lists | Create a List + + + +## CreateContactDbList + +> ContactdbList2xx CreateContactDbList(ctx, optional) + +Create a List + +**This endpoint allows you to create a list for your recipients.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateContactDbListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**CreateAListRequest** | [**CreateAListRequest**](CreateAListRequest.md) | + +### Return type + +[**ContactdbList2xx**](ContactdbList2xx.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/CreateCustomField.md b/rest/api/v3/lmc_contactdb/docs/CreateCustomField.md new file mode 100644 index 00000000..6e9ca61e --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/CreateCustomField.md @@ -0,0 +1,49 @@ +# CreateCustomField + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateCustomField**](CreateCustomField.md#CreateCustomField) | **Post** /v3/contactdb/custom_fields | Create a Custom Field + + + +## CreateCustomField + +> ContactdbCustomFieldId2xx CreateCustomField(ctx, optional) + +Create a Custom Field + +**This endpoint allows you to create a custom field.** **You can create up to 120 custom fields.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateCustomFieldParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**CreateCustomFieldRequest** | [**CreateCustomFieldRequest**](CreateCustomFieldRequest.md) | + +### Return type + +[**ContactdbCustomFieldId2xx**](ContactdbCustomFieldId2xx.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/CreateCustomFieldRequest.md b/rest/api/v3/lmc_contactdb/docs/CreateCustomFieldRequest.md new file mode 100644 index 00000000..7254d6af --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/CreateCustomFieldRequest.md @@ -0,0 +1,12 @@ +# CreateCustomFieldRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | |[optional] +**Type** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/CreateSegment.md b/rest/api/v3/lmc_contactdb/docs/CreateSegment.md new file mode 100644 index 00000000..4019fb85 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/CreateSegment.md @@ -0,0 +1,49 @@ +# CreateSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateSegment**](CreateSegment.md#CreateSegment) | **Post** /v3/contactdb/segments | Create a Segment + + + +## CreateSegment + +> ContactdbSegmentsId200 CreateSegment(ctx, optional) + +Create a Segment + +**This endpoint allows you to create a new segment.** Valid operators for create and update depend on the type of the field for which you are searching. **Dates** - \"eq\", \"ne\", \"lt\" (before), \"gt\" (after) - You may use MM/DD/YYYY for day granularity or an epoch for second granularity. - \"empty\", \"not_empty\" - \"is within\" - You may use an [ISO 8601 date format](https://en.wikipedia.org/wiki/ISO_8601) or the # of days. **Text** - \"contains\" - \"eq\" (is/equals - matches the full field) - \"ne\" (is not/not equals - matches any field where the entire field is not the condition value) - \"empty\" - \"not_empty\" **Numbers** - \"eq\" (is/equals) - \"lt\" (is less than) - \"gt\" (is greater than) - \"empty\" - \"not_empty\" **Email Clicks and Opens** - \"eq\" (opened) - \"ne\" (not opened) All field values must be a string. Conditions using \"eq\" or \"ne\" for email clicks and opens should provide a \"field\" of either `clicks.campaign_identifier` or `opens.campaign_identifier`. The condition value should be a string containing the id of a completed campaign. The conditions list may contain multiple conditions, joined by an \"and\" or \"or\" in the \"and_or\" field. The first condition in the conditions list must have an empty \"and_or\", and subsequent conditions must all specify an \"and_or\". + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**ContactdbSegments** | [**ContactdbSegments**](ContactdbSegments.md) | + +### Return type + +[**ContactdbSegmentsId200**](ContactdbSegmentsId200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/DeleteContactDbList.md b/rest/api/v3/lmc_contactdb/docs/DeleteContactDbList.md new file mode 100644 index 00000000..dfe3bbe6 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/DeleteContactDbList.md @@ -0,0 +1,54 @@ +# DeleteContactDbList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteContactDbList**](DeleteContactDbList.md#DeleteContactDbList) | **Delete** /v3/contactdb/lists/{ListId} | Delete a List + + + +## DeleteContactDbList + +> DeleteContactDbList(ctx, ListIdoptional) + +Delete a List + +**This endpoint allows you to delete a specific recipient list with the given ID.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ListId** | **int32** | + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteContactDbListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**DeleteContacts** | [**DeleteContacts**](DeleteContactsDeleteContacts.md) | Adds the ability to delete all contacts on the list in addition to deleting the list. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**Body** | **interface{}** | + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/DeleteContactDbLists.md b/rest/api/v3/lmc_contactdb/docs/DeleteContactDbLists.md new file mode 100644 index 00000000..4acbb584 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/DeleteContactDbLists.md @@ -0,0 +1,49 @@ +# DeleteContactDbLists + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteContactDbLists**](DeleteContactDbLists.md#DeleteContactDbLists) | **Delete** /v3/contactdb/lists | Delete Multiple lists + + + +## DeleteContactDbLists + +> DeleteContactDbLists(ctx, optional) + +Delete Multiple lists + +**This endpoint allows you to delete multiple recipient lists.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteContactDbListsParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**RequestBody** | **[]int32** | + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/DeleteContacts.md b/rest/api/v3/lmc_contactdb/docs/DeleteContacts.md new file mode 100644 index 00000000..46341479 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/DeleteContacts.md @@ -0,0 +1,13 @@ +# DeleteContacts + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TRUE** | bool | (value: `true`) +**FALSE** | bool | (value: `false`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/DeleteCustomField.md b/rest/api/v3/lmc_contactdb/docs/DeleteCustomField.md new file mode 100644 index 00000000..7e69ff8f --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/DeleteCustomField.md @@ -0,0 +1,52 @@ +# DeleteCustomField + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteCustomField**](DeleteCustomField.md#DeleteCustomField) | **Delete** /v3/contactdb/custom_fields/{CustomFieldId} | Delete a Custom Field + + + +## DeleteCustomField + +> ErrorResponse DeleteCustomField(ctx, CustomFieldIdoptional) + +Delete a Custom Field + +**This endpoint allows you to delete a custom field by ID.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CustomFieldId** | **int32** | The ID of the custom field that you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteCustomFieldParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ErrorResponse**](ErrorResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/DeleteRecipient.md b/rest/api/v3/lmc_contactdb/docs/DeleteRecipient.md new file mode 100644 index 00000000..58d9ecb7 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/DeleteRecipient.md @@ -0,0 +1,52 @@ +# DeleteRecipient + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteRecipient**](DeleteRecipient.md#DeleteRecipient) | **Delete** /v3/contactdb/recipients/{RecipientId} | Delete a Recipient + + + +## DeleteRecipient + +> map[string]interface{} DeleteRecipient(ctx, RecipientIdoptional) + +Delete a Recipient + +**This endpoint allows you to delete a single recipient with the given ID from your contact database.** > Use this to permanently delete your recipients from all of your contact lists and all segments if required by applicable law. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RecipientId** | **string** | The ID of the recipient that you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteRecipientParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/DeleteRecipientFromContactDbList.md b/rest/api/v3/lmc_contactdb/docs/DeleteRecipientFromContactDbList.md new file mode 100644 index 00000000..236c6d0d --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/DeleteRecipientFromContactDbList.md @@ -0,0 +1,54 @@ +# DeleteRecipientFromContactDbList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteRecipientFromContactDbList**](DeleteRecipientFromContactDbList.md#DeleteRecipientFromContactDbList) | **Delete** /v3/contactdb/lists/{ListId}/recipients/{RecipientId} | Delete a Single Recipient from a Single List + + + +## DeleteRecipientFromContactDbList + +> DeleteRecipientFromContactDbList(ctx, ListIdRecipientIdoptional) + +Delete a Single Recipient from a Single List + +**This endpoint allows you to delete a single recipient from a list.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ListId** | **int32** | The ID of the list that you want to add the recipient to. +**RecipientId** | **string** | The ID of the recipient you are adding to the list. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteRecipientFromContactDbListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**Body** | **interface{}** | + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/DeleteRecipients.md b/rest/api/v3/lmc_contactdb/docs/DeleteRecipients.md new file mode 100644 index 00000000..69fe918f --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/DeleteRecipients.md @@ -0,0 +1,49 @@ +# DeleteRecipients + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteRecipients**](DeleteRecipients.md#DeleteRecipients) | **Delete** /v3/contactdb/recipients | Delete Recipients + + + +## DeleteRecipients + +> map[string]interface{} DeleteRecipients(ctx, optional) + +Delete Recipients + +**This endpoint allows you to deletes one or more recipients.** The body of an API call to this endpoint must include an array of recipient IDs of the recipients you want to delete. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteRecipientsParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**RequestBody** | **[]string** | + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/DeleteSegment.md b/rest/api/v3/lmc_contactdb/docs/DeleteSegment.md new file mode 100644 index 00000000..8bf76595 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/DeleteSegment.md @@ -0,0 +1,54 @@ +# DeleteSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSegment**](DeleteSegment.md#DeleteSegment) | **Delete** /v3/contactdb/segments/{SegmentId} | Delete a segment + + + +## DeleteSegment + +> DeleteSegment(ctx, SegmentIdoptional) + +Delete a segment + +**This endpoint allows you to delete a segment from your recipients database.** You also have the option to delete all the contacts from your Marketing Campaigns recipient database who were in this segment. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SegmentId** | **int32** | + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**DeleteContacts** | **bool** | True to delete all contacts matching the segment in addition to deleting the segment +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**Body** | **interface{}** | + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/ErrorResponse.md b/rest/api/v3/lmc_contactdb/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ErrorResponseErrorsInner.md b/rest/api/v3/lmc_contactdb/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/GetBillable.md b/rest/api/v3/lmc_contactdb/docs/GetBillable.md new file mode 100644 index 00000000..ec9018ef --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/GetBillable.md @@ -0,0 +1,48 @@ +# GetBillable + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetBillable**](GetBillable.md#GetBillable) | **Get** /v3/contactdb/recipients/billable_count | Retrieve the count of billable recipients + + + +## GetBillable + +> ContactdbRecipientCount200 GetBillable(ctx, optional) + +Retrieve the count of billable recipients + +**This endpoint allows you to retrieve the number of Marketing Campaigns recipients that you will be billed for.** You are billed for marketing campaigns based on the highest number of recipients you have had in your account at one time. This endpoint will allow you to know the current billable count value. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a GetBillableParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ContactdbRecipientCount200**](ContactdbRecipientCount200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/GetContactDbList.md b/rest/api/v3/lmc_contactdb/docs/GetContactDbList.md new file mode 100644 index 00000000..c7814353 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/GetContactDbList.md @@ -0,0 +1,52 @@ +# GetContactDbList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetContactDbList**](GetContactDbList.md#GetContactDbList) | **Get** /v3/contactdb/lists/{ListId} | Retrieve a single list + + + +## GetContactDbList + +> ContactdbList2xx GetContactDbList(ctx, ListIdoptional) + +Retrieve a single list + +**This endpoint allows you to retrieve a single recipient list.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ListId** | **int32** | + +### Other Parameters + +Other parameters are passed through a pointer to a GetContactDbListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ContactdbList2xx**](ContactdbList2xx.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/GetCustomField.md b/rest/api/v3/lmc_contactdb/docs/GetCustomField.md new file mode 100644 index 00000000..9f0bd912 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/GetCustomField.md @@ -0,0 +1,52 @@ +# GetCustomField + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetCustomField**](GetCustomField.md#GetCustomField) | **Get** /v3/contactdb/custom_fields/{CustomFieldId} | Retrieve a Custom Field + + + +## GetCustomField + +> ContactdbCustomFieldId2xx GetCustomField(ctx, CustomFieldIdoptional) + +Retrieve a Custom Field + +**This endpoint allows you to retrieve a custom field by ID.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CustomFieldId** | **int32** | The ID of the custom field that you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetCustomFieldParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ContactdbCustomFieldId2xx**](ContactdbCustomFieldId2xx.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/GetRecipient.md b/rest/api/v3/lmc_contactdb/docs/GetRecipient.md new file mode 100644 index 00000000..e4908f98 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/GetRecipient.md @@ -0,0 +1,52 @@ +# GetRecipient + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetRecipient**](GetRecipient.md#GetRecipient) | **Get** /v3/contactdb/recipients/{RecipientId} | Retrieve a single recipient + + + +## GetRecipient + +> ContactdbRecipient200 GetRecipient(ctx, RecipientIdoptional) + +Retrieve a single recipient + +**This endpoint allows you to retrieve a single recipient by ID from your contact database.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RecipientId** | **string** | The ID of the recipient that you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetRecipientParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ContactdbRecipient200**](ContactdbRecipient200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/GetRecipientList.md b/rest/api/v3/lmc_contactdb/docs/GetRecipientList.md new file mode 100644 index 00000000..23c85802 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/GetRecipientList.md @@ -0,0 +1,52 @@ +# GetRecipientList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetRecipientList**](GetRecipientList.md#GetRecipientList) | **Get** /v3/contactdb/recipients/{RecipientId}/lists | Retrieve the lists that a recipient is on + + + +## GetRecipientList + +> GetRecipientList200Response GetRecipientList(ctx, RecipientIdoptional) + +Retrieve the lists that a recipient is on + +**This endpoint allows you to retrieve the lists that a given recipient belongs to.** Each recipient can be on many lists. This endpoint gives you all of the lists that any one recipient has been added to. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RecipientId** | **string** | The ID of the recipient for whom you are retrieving lists. + +### Other Parameters + +Other parameters are passed through a pointer to a GetRecipientListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**GetRecipientList200Response**](GetRecipientList200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/GetRecipientList200Response.md b/rest/api/v3/lmc_contactdb/docs/GetRecipientList200Response.md new file mode 100644 index 00000000..ff8b2268 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/GetRecipientList200Response.md @@ -0,0 +1,11 @@ +# GetRecipientList200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Lists** | [**[]ContactdbList2xx**](ContactdbList2xx.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/GetSegment.md b/rest/api/v3/lmc_contactdb/docs/GetSegment.md new file mode 100644 index 00000000..c6d62133 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/GetSegment.md @@ -0,0 +1,52 @@ +# GetSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetSegment**](GetSegment.md#GetSegment) | **Get** /v3/contactdb/segments/{SegmentId} | Retrieve a segment + + + +## GetSegment + +> ContactdbSegments GetSegment(ctx, SegmentIdoptional) + +Retrieve a segment + +**This endpoint allows you to retrieve a single segment with the given ID.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SegmentId** | **int32** | + +### Other Parameters + +Other parameters are passed through a pointer to a GetSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ContactdbSegments**](ContactdbSegments.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/ListAllCustomFieldsResponse.md b/rest/api/v3/lmc_contactdb/docs/ListAllCustomFieldsResponse.md new file mode 100644 index 00000000..58fabba7 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListAllCustomFieldsResponse.md @@ -0,0 +1,11 @@ +# ListAllCustomFieldsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomFields** | [**[]ContactdbCustomFieldId2xx**](ContactdbCustomFieldId2xx.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ListAllListsResponse.md b/rest/api/v3/lmc_contactdb/docs/ListAllListsResponse.md new file mode 100644 index 00000000..c94eff0b --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListAllListsResponse.md @@ -0,0 +1,11 @@ +# ListAllListsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Lists** | [**[]ContactdbList2xx**](ContactdbList2xx.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ListAllSegmentsResponse.md b/rest/api/v3/lmc_contactdb/docs/ListAllSegmentsResponse.md new file mode 100644 index 00000000..1d8fc71c --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListAllSegmentsResponse.md @@ -0,0 +1,11 @@ +# ListAllSegmentsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Segments** | [**[]ContactdbSegments**](ContactdbSegments.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ListContactDbList.md b/rest/api/v3/lmc_contactdb/docs/ListContactDbList.md new file mode 100644 index 00000000..d0a72af7 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListContactDbList.md @@ -0,0 +1,48 @@ +# ListContactDbList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListContactDbList**](ListContactDbList.md#ListContactDbList) | **Get** /v3/contactdb/lists | Retrieve all lists + + + +## ListContactDbList + +> ListAllListsResponse ListContactDbList(ctx, optional) + +Retrieve all lists + +**This endpoint allows you to retrieve all of your recipient lists. If you don't have any lists, an empty array will be returned.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListContactDbListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListAllListsResponse**](ListAllListsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/ListCustomField.md b/rest/api/v3/lmc_contactdb/docs/ListCustomField.md new file mode 100644 index 00000000..d6450a9d --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListCustomField.md @@ -0,0 +1,48 @@ +# ListCustomField + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListCustomField**](ListCustomField.md#ListCustomField) | **Get** /v3/contactdb/custom_fields | Retrieve all custom fields + + + +## ListCustomField + +> ListAllCustomFieldsResponse ListCustomField(ctx, optional) + +Retrieve all custom fields + +**This endpoint allows you to retrieve all custom fields.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListCustomFieldParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListAllCustomFieldsResponse**](ListAllCustomFieldsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/ListRecipient.md b/rest/api/v3/lmc_contactdb/docs/ListRecipient.md new file mode 100644 index 00000000..614b17ca --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListRecipient.md @@ -0,0 +1,50 @@ +# ListRecipient + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListRecipient**](ListRecipient.md#ListRecipient) | **Get** /v3/contactdb/recipients | Retrieve recipients + + + +## ListRecipient + +> ListRecipientsResponse ListRecipient(ctx, optional) + +Retrieve recipients + +**This endpoint allows you to retrieve all of your Marketing Campaigns recipients.** Batch deletion of a page makes it possible to receive an empty page of recipients before reaching the end of the list of recipients. To avoid this issue; iterate over pages until a 404 is retrieved. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListRecipientParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Page** | **int32** | Page index of first recipients to return (must be a positive integer) +**PageSize** | **int32** | Number of recipients to return at a time (must be a positive integer between 1 and 1000) +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListRecipientsResponse**](ListRecipientsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/ListRecipientCount.md b/rest/api/v3/lmc_contactdb/docs/ListRecipientCount.md new file mode 100644 index 00000000..32ab38da --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListRecipientCount.md @@ -0,0 +1,48 @@ +# ListRecipientCount + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListRecipientCount**](ListRecipientCount.md#ListRecipientCount) | **Get** /v3/contactdb/recipients/count | Retrieve a Count of Recipients + + + +## ListRecipientCount + +> ContactdbRecipientCount200 ListRecipientCount(ctx, optional) + +Retrieve a Count of Recipients + +**This endpoint allows you to retrieve the total number of Marketing Campaigns recipients.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListRecipientCountParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ContactdbRecipientCount200**](ContactdbRecipientCount200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/ListRecipientForSegment.md b/rest/api/v3/lmc_contactdb/docs/ListRecipientForSegment.md new file mode 100644 index 00000000..e1484761 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListRecipientForSegment.md @@ -0,0 +1,54 @@ +# ListRecipientForSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListRecipientForSegment**](ListRecipientForSegment.md#ListRecipientForSegment) | **Get** /v3/contactdb/segments/{SegmentId}/recipients | Retrieve recipients on a segment + + + +## ListRecipientForSegment + +> ListRecipientsOnASegmentResponse ListRecipientForSegment(ctx, SegmentIdoptional) + +Retrieve recipients on a segment + +**This endpoint allows you to retrieve all of the recipients in a segment with the given ID.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SegmentId** | **int32** | The ID of the segment from which you want to retrieve recipients. + +### Other Parameters + +Other parameters are passed through a pointer to a ListRecipientForSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Page** | **int32** | +**PageSize** | **int32** | +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListRecipientsOnASegmentResponse**](ListRecipientsOnASegmentResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/ListRecipientsFromContactDbList.md b/rest/api/v3/lmc_contactdb/docs/ListRecipientsFromContactDbList.md new file mode 100644 index 00000000..a0670961 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListRecipientsFromContactDbList.md @@ -0,0 +1,54 @@ +# ListRecipientsFromContactDbList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListRecipientsFromContactDbList**](ListRecipientsFromContactDbList.md#ListRecipientsFromContactDbList) | **Get** /v3/contactdb/lists/{ListId}/recipients | Retrieve all recipients on a List + + + +## ListRecipientsFromContactDbList + +> ListRecipientsFromContactDbList200Response ListRecipientsFromContactDbList(ctx, ListIdoptional) + +Retrieve all recipients on a List + +**This endpoint allows you to retrieve all recipients on the list with the given ID.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ListId** | **int32** | The id of the list of recipients you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a ListRecipientsFromContactDbListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Page** | **int32** | Page index of first recipient to return (must be a positive integer) +**PageSize** | **int32** | Number of recipients to return at a time (must be a positive integer between 1 and 1000) +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListRecipientsFromContactDbList200Response**](ListRecipientsFromContactDbList200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/ListRecipientsFromContactDbList200Response.md b/rest/api/v3/lmc_contactdb/docs/ListRecipientsFromContactDbList200Response.md new file mode 100644 index 00000000..2b06300b --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListRecipientsFromContactDbList200Response.md @@ -0,0 +1,11 @@ +# ListRecipientsFromContactDbList200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Recipients** | [**[]ContactdbRecipient200**](ContactdbRecipient200.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ListRecipientsOnASegmentResponse.md b/rest/api/v3/lmc_contactdb/docs/ListRecipientsOnASegmentResponse.md new file mode 100644 index 00000000..cc781fe7 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListRecipientsOnASegmentResponse.md @@ -0,0 +1,11 @@ +# ListRecipientsOnASegmentResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Recipients** | [**[]ContactdbRecipient200**](ContactdbRecipient200.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ListRecipientsResponse.md b/rest/api/v3/lmc_contactdb/docs/ListRecipientsResponse.md new file mode 100644 index 00000000..9b46f996 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListRecipientsResponse.md @@ -0,0 +1,11 @@ +# ListRecipientsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Recipients** | **[]map[string]interface{}** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ListReservedField.md b/rest/api/v3/lmc_contactdb/docs/ListReservedField.md new file mode 100644 index 00000000..18387270 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListReservedField.md @@ -0,0 +1,48 @@ +# ListReservedField + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListReservedField**](ListReservedField.md#ListReservedField) | **Get** /v3/contactdb/reserved_fields | Retrieve reserved fields + + + +## ListReservedField + +> ListReservedField200Response ListReservedField(ctx, optional) + +Retrieve reserved fields + +**This endpoint allows you to list all fields that are reserved and can't be used for custom field names.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListReservedFieldParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListReservedField200Response**](ListReservedField200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/ListReservedField200Response.md b/rest/api/v3/lmc_contactdb/docs/ListReservedField200Response.md new file mode 100644 index 00000000..5cad5ed8 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListReservedField200Response.md @@ -0,0 +1,11 @@ +# ListReservedField200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ReservedFields** | [**[]ListReservedField200ResponseReservedFieldsInner**](ListReservedField200ResponseReservedFieldsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ListReservedField200ResponseReservedFieldsInner.md b/rest/api/v3/lmc_contactdb/docs/ListReservedField200ResponseReservedFieldsInner.md new file mode 100644 index 00000000..01d7b2cd --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListReservedField200ResponseReservedFieldsInner.md @@ -0,0 +1,12 @@ +# ListReservedField200ResponseReservedFieldsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | |[optional] +**Type** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ListSearchRecipient.md b/rest/api/v3/lmc_contactdb/docs/ListSearchRecipient.md new file mode 100644 index 00000000..1ff79ab8 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListSearchRecipient.md @@ -0,0 +1,49 @@ +# ListSearchRecipient + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSearchRecipient**](ListSearchRecipient.md#ListSearchRecipient) | **Get** /v3/contactdb/recipients/search | Search recipients + + + +## ListSearchRecipient + +> ListRecipientsFromContactDbList200Response ListSearchRecipient(ctx, optional) + +Search recipients + +**This endpoint allows you to perform a search on all of your Marketing Campaigns recipients.** field_name: * is a variable that is substituted for your actual custom field name from your recipient. * Text fields must be url-encoded. Date fields are searchable only by unix timestamp (e.g. 2/2/2015 becomes 1422835200) * If field_name is a 'reserved' date field, such as created_at or updated_at, the system will internally convert your epoch time to a date range encompassing the entire day. For example, an epoch time of 1422835600 converts to Mon, 02 Feb 2015 00:06:40 GMT, but internally the system will search from Mon, 02 Feb 2015 00:00:00 GMT through Mon, 02 Feb 2015 23:59:59 GMT. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSearchRecipientParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**FieldName** | **string** | +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListRecipientsFromContactDbList200Response**](ListRecipientsFromContactDbList200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/ListSegment.md b/rest/api/v3/lmc_contactdb/docs/ListSegment.md new file mode 100644 index 00000000..d4f37a4f --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListSegment.md @@ -0,0 +1,48 @@ +# ListSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSegment**](ListSegment.md#ListSegment) | **Get** /v3/contactdb/segments | Retrieve all segments + + + +## ListSegment + +> ListAllSegmentsResponse ListSegment(ctx, optional) + +Retrieve all segments + +**This endpoint allows you to retrieve all of your segments.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListAllSegmentsResponse**](ListAllSegmentsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/ListStatus.md b/rest/api/v3/lmc_contactdb/docs/ListStatus.md new file mode 100644 index 00000000..99c3cd47 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListStatus.md @@ -0,0 +1,48 @@ +# ListStatus + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListStatus**](ListStatus.md#ListStatus) | **Get** /v3/contactdb/status | Get Recipient Upload Status + + + +## ListStatus + +> ListStatus200Response ListStatus(ctx, optional) + +Get Recipient Upload Status + +**This endpoint allows you to check the upload status of a Marketing Campaigns recipient.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListStatusParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListStatus200Response**](ListStatus200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/ListStatus200Response.md b/rest/api/v3/lmc_contactdb/docs/ListStatus200Response.md new file mode 100644 index 00000000..942a9d91 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListStatus200Response.md @@ -0,0 +1,11 @@ +# ListStatus200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | [**[]ListStatus200ResponseStatusInner**](ListStatus200ResponseStatusInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ListStatus200ResponseStatusInner.md b/rest/api/v3/lmc_contactdb/docs/ListStatus200ResponseStatusInner.md new file mode 100644 index 00000000..4e008b0b --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListStatus200ResponseStatusInner.md @@ -0,0 +1,12 @@ +# ListStatus200ResponseStatusInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | Valid values are \"worker_delay\" and \"worker_delay_seconds\" (the second value appears only if \"worker_delay\" has a value of \"delayed\"). |[optional] [default to ""] +**Value** | **string** | Valid values for the ID \"worker_delay\" are \"OK\" or \"Delayed\". Valid values for the ID \"worker_delay_seconds\" is the time of delay to upload. |[optional] [default to ""] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/Operator.md b/rest/api/v3/lmc_contactdb/docs/Operator.md new file mode 100644 index 00000000..180b3c04 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/Operator.md @@ -0,0 +1,16 @@ +# Operator + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**EQ** | string | (value: `"eq"`) +**NE** | string | (value: `"ne"`) +**LT** | string | (value: `"lt"`) +**GT** | string | (value: `"gt"`) +**CONTAINS** | string | (value: `"contains"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/SearchRecipient.md b/rest/api/v3/lmc_contactdb/docs/SearchRecipient.md new file mode 100644 index 00000000..81e7460c --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/SearchRecipient.md @@ -0,0 +1,48 @@ +# SearchRecipient + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SearchRecipient**](SearchRecipient.md#SearchRecipient) | **Post** /v3/contactdb/recipients/search | Search recipients + + + +## SearchRecipient + +> SearchRecipient200Response SearchRecipient(ctx, optional) + +Search recipients + +Search using segment conditions without actually creating a segment. Body contains a JSON object with `conditions`, a list of conditions as described below, and an optional `list_id`, which is a valid list ID for a list to limit the search on. Valid operators for create and update depend on the type of the field for which you are searching. - Dates: - `\"eq\"`, `\"ne\"`, `\"lt\"` (before), `\"gt\"` (after) - You may use MM/DD/YYYY for day granularity or an epoch for second granularity. - `\"empty\"`, `\"not_empty\"` - `\"is within\"` - You may use an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date format or the # of days. - Text: `\"contains\"`, `\"eq\"` (is - matches the full field), `\"ne\"` (is not - matches any field where the entire field is not the condition value), `\"empty\"`, `\"not_empty\"` - Numbers: `\"eq\"`, `\"lt\"`, `\"gt\"`, `\"empty\"`, `\"not_empty\"` - Email Clicks and Opens: `\"eq\"` (opened), `\"ne\"` (not opened) Field values must all be a string. Search conditions using `\"eq\"` or `\"ne\"` for email clicks and opens should provide a \"field\" of either `clicks.campaign_identifier` or `opens.campaign_identifier`. The condition value should be a string containing the id of a completed campaign. Search conditions list may contain multiple conditions, joined by an `\"and\"` or `\"or\"` in the `\"and_or\"` field. The first condition in the conditions list must have an empty `\"and_or\"`, and subsequent conditions must all specify an `\"and_or\"`. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a SearchRecipientParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**SearchRecipientRequest** | [**SearchRecipientRequest**](SearchRecipientRequest.md) | + +### Return type + +[**SearchRecipient200Response**](SearchRecipient200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/SearchRecipient200Response.md b/rest/api/v3/lmc_contactdb/docs/SearchRecipient200Response.md new file mode 100644 index 00000000..c91ecb0a --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/SearchRecipient200Response.md @@ -0,0 +1,12 @@ +# SearchRecipient200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Recipients** | [**[]SearchRecipient200ResponseRecipientsInner**](SearchRecipient200ResponseRecipientsInner.md) | |[optional] +**RecipientCount** | **int32** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInner.md b/rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInner.md new file mode 100644 index 00000000..7ebc565e --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInner.md @@ -0,0 +1,19 @@ +# SearchRecipient200ResponseRecipientsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | **int32** | |[optional] +**Email** | **string** | |[optional] +**Id** | **string** | |[optional] +**LastEmailed** | **int32** | |[optional] +**LastClicked** | **int32** | |[optional] +**LastOpened** | **int32** | |[optional] +**CustomFields** | [**[]SearchRecipient200ResponseRecipientsInnerCustomFieldsInner**](SearchRecipient200ResponseRecipientsInnerCustomFieldsInner.md) | |[optional] +**UpdatedAt** | **int32** | |[optional] +**FirstName** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInnerCustomFieldsInner.md b/rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInnerCustomFieldsInner.md new file mode 100644 index 00000000..6d09dded --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInnerCustomFieldsInner.md @@ -0,0 +1,14 @@ +# SearchRecipient200ResponseRecipientsInnerCustomFieldsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | |[optional] +**Name** | **string** | |[optional] +**Value** | [**SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue**](SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue.md) | |[optional] +**Type** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue.md b/rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue.md new file mode 100644 index 00000000..73d53eb3 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue.md @@ -0,0 +1,10 @@ +# SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/SearchRecipientRequest.md b/rest/api/v3/lmc_contactdb/docs/SearchRecipientRequest.md new file mode 100644 index 00000000..de0b218c --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/SearchRecipientRequest.md @@ -0,0 +1,12 @@ +# SearchRecipientRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ListId** | **int32** | | +**Conditions** | [**[]ContactdbSegmentsConditions**](ContactdbSegmentsConditions.md) | The conditions by which this segment should be created. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/Type.md b/rest/api/v3/lmc_contactdb/docs/Type.md new file mode 100644 index 00000000..94e01859 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/Type.md @@ -0,0 +1,14 @@ +# Type + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DATE** | string | (value: `"date"`) +**TEXT** | string | (value: `"text"`) +**NUMBER** | string | (value: `"number"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/UpdateAListRequest.md b/rest/api/v3/lmc_contactdb/docs/UpdateAListRequest.md new file mode 100644 index 00000000..5d1b4ce2 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/UpdateAListRequest.md @@ -0,0 +1,11 @@ +# UpdateAListRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The new name for your list. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/UpdateContactDbList.md b/rest/api/v3/lmc_contactdb/docs/UpdateContactDbList.md new file mode 100644 index 00000000..3285fc16 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/UpdateContactDbList.md @@ -0,0 +1,53 @@ +# UpdateContactDbList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateContactDbList**](UpdateContactDbList.md#UpdateContactDbList) | **Patch** /v3/contactdb/lists/{ListId} | Update a List + + + +## UpdateContactDbList + +> UpdateContactDbList200Response UpdateContactDbList(ctx, ListIdoptional) + +Update a List + +**This endpoint allows you to update the name of one of your recipient lists.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ListId** | **int32** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateContactDbListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateAListRequest** | [**UpdateAListRequest**](UpdateAListRequest.md) | + +### Return type + +[**UpdateContactDbList200Response**](UpdateContactDbList200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/UpdateContactDbList200Response.md b/rest/api/v3/lmc_contactdb/docs/UpdateContactDbList200Response.md new file mode 100644 index 00000000..de79f5bc --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/UpdateContactDbList200Response.md @@ -0,0 +1,13 @@ +# UpdateContactDbList200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The ID of the list |[optional] +**Name** | **string** | The new name for the list |[optional] +**RecipientCount** | **int32** | The number of recipients on the list |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/UpdateRecipient.md b/rest/api/v3/lmc_contactdb/docs/UpdateRecipient.md new file mode 100644 index 00000000..91d05ad5 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/UpdateRecipient.md @@ -0,0 +1,49 @@ +# UpdateRecipient + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateRecipient**](UpdateRecipient.md#UpdateRecipient) | **Patch** /v3/contactdb/recipients | Update Recipient + + + +## UpdateRecipient + +> ContactdbRecipientResponse201 UpdateRecipient(ctx, optional) + +Update Recipient + +**This endpoint allows you to update one or more recipients.** The body of an API call to this endpoint must include an array of one or more recipient objects. It is of note that you can add custom field data as parameters on recipient objects. We have provided an example using some of the default custom fields SendGrid provides. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateRecipientParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateRecipientRequestInner** | [**[]UpdateRecipientRequestInner**](UpdateRecipientRequestInner.md) | + +### Return type + +[**ContactdbRecipientResponse201**](ContactdbRecipientResponse201.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/UpdateRecipientRequestInner.md b/rest/api/v3/lmc_contactdb/docs/UpdateRecipientRequestInner.md new file mode 100644 index 00000000..0babc15d --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/UpdateRecipientRequestInner.md @@ -0,0 +1,13 @@ +# UpdateRecipientRequestInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | | +**LastName** | **string** | The last name of the recipient. This is one of the default custom fields. |[optional] +**FirstName** | **string** | The first name of the recipient. This is one of the default custom fields. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/UpdateSegment.md b/rest/api/v3/lmc_contactdb/docs/UpdateSegment.md new file mode 100644 index 00000000..57d79bd4 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/UpdateSegment.md @@ -0,0 +1,53 @@ +# UpdateSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSegment**](UpdateSegment.md#UpdateSegment) | **Patch** /v3/contactdb/segments/{SegmentId} | Update a segment + + + +## UpdateSegment + +> ContactdbSegments UpdateSegment(ctx, SegmentIdoptional) + +Update a segment + +**This endpoint allows you to update a segment.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SegmentId** | **int32** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateSegmentRequest** | [**UpdateSegmentRequest**](UpdateSegmentRequest.md) | + +### Return type + +[**ContactdbSegments**](ContactdbSegments.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/UpdateSegmentRequest.md b/rest/api/v3/lmc_contactdb/docs/UpdateSegmentRequest.md new file mode 100644 index 00000000..606cf19d --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/UpdateSegmentRequest.md @@ -0,0 +1,13 @@ +# UpdateSegmentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**ListId** | **float32** | The list ID you would like this segment to be built from. |[optional] +**Conditions** | [**[]ContactdbSegmentsConditions**](ContactdbSegmentsConditions.md) | The conditions by which this segment should be created. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/model_add_recipient_request_inner.go b/rest/api/v3/lmc_contactdb/model_add_recipient_request_inner.go new file mode 100644 index 00000000..e5fa05f6 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_add_recipient_request_inner.go @@ -0,0 +1,25 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddRecipientRequestInner struct for AddRecipientRequestInner +type AddRecipientRequestInner struct { + // The email address of the recipient. + Email string `json:"email"` + // The first name of the recipient. + FirstName *string `json:"first_name,omitempty"` + // The last name of the recipient. + LastName *string `json:"last_name,omitempty"` + Age *int32 `json:"age,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_and_or.go b/rest/api/v3/lmc_contactdb/model_and_or.go new file mode 100644 index 00000000..60a341a2 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_and_or.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AndOr the model 'AndOr' +type AndOr string + +// List of AndOr +const ( + ANDOR_AND AndOr = "and" + ANDOR_OR AndOr = "or" + ANDOR_EMPTY AndOr = "" +) diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_custom_field.go b/rest/api/v3/lmc_contactdb/model_contactdb_custom_field.go new file mode 100644 index 00000000..480b2ede --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_contactdb_custom_field.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactdbCustomField struct for ContactdbCustomField +type ContactdbCustomField struct { + // The name of the field + Name *string `json:"name,omitempty"` + // The type of the field. + Type *Type `json:"type,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_custom_field_id2xx.go b/rest/api/v3/lmc_contactdb/model_contactdb_custom_field_id2xx.go new file mode 100644 index 00000000..607a50eb --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_contactdb_custom_field_id2xx.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactdbCustomFieldId2xx struct for ContactdbCustomFieldId2xx +type ContactdbCustomFieldId2xx struct { + // The name of the field + Name *string `json:"name,omitempty"` + // The type of the field. + Type *Type `json:"type,omitempty"` + // The ID of the custom field. + Id *float32 `json:"id,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_custom_field_id_value.go b/rest/api/v3/lmc_contactdb/model_contactdb_custom_field_id_value.go new file mode 100644 index 00000000..0e99ac75 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_contactdb_custom_field_id_value.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactdbCustomFieldIdValue struct for ContactdbCustomFieldIdValue +type ContactdbCustomFieldIdValue struct { + // The name of the field + Name *string `json:"name,omitempty"` + // The type of the field. + Type *Type `json:"type,omitempty"` + // The ID of the custom field. + Id *float32 `json:"id,omitempty"` + // The value of this recipient's custom field + Value *string `json:"value,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_list2xx.go b/rest/api/v3/lmc_contactdb/model_contactdb_list2xx.go new file mode 100644 index 00000000..9a8f2703 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_contactdb_list2xx.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactdbList2xx struct for ContactdbList2xx +type ContactdbList2xx struct { + // The reference ID of your list. + Id int32 `json:"id"` + // The name of your list. Must be unique against all other list and segment names. + Name string `json:"name"` + // The count of recipients currently in the list. + RecipientCount int32 `json:"recipient_count"` +} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_recipient200.go b/rest/api/v3/lmc_contactdb/model_contactdb_recipient200.go new file mode 100644 index 00000000..59735840 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_contactdb_recipient200.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactdbRecipient200 struct for ContactdbRecipient200 +type ContactdbRecipient200 struct { + Recipients *[]ContactdbRecipient200RecipientsInner `json:"recipients,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_recipient200_recipients_inner.go b/rest/api/v3/lmc_contactdb/model_contactdb_recipient200_recipients_inner.go new file mode 100644 index 00000000..5b165ca2 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_contactdb_recipient200_recipients_inner.go @@ -0,0 +1,38 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactdbRecipient200RecipientsInner struct for ContactdbRecipient200RecipientsInner +type ContactdbRecipient200RecipientsInner struct { + // The ID of this recipient. + Id *string `json:"id,omitempty"` + // The time this record was created in your contactdb, in unixtime. + CreatedAt *float32 `json:"created_at,omitempty"` + // The custom fields assigned to this recipient and their values. + CustomFields *[]ContactdbCustomFieldIdValue `json:"custom_fields,omitempty"` + // The email address of this recipient. This is a default custom field that SendGrid provides. + Email string `json:"email"` + // The first name of this recipient. This is a default custom field that SendGrid provides. + FirstName *string `json:"first_name,omitempty"` + // The last name of the recipient. + LastName *string `json:"last_name,omitempty"` + // The last time this recipient clicked a link from one of your campaigns, in unixtime. + LastClicked *float32 `json:"last_clicked,omitempty"` + // The last time this user was emailed by one of your campaigns, in unixtime. + LastEmailed *float32 `json:"last_emailed,omitempty"` + // The last time this recipient opened an email from you, in unixtime. + LastOpened *float32 `json:"last_opened,omitempty"` + // The last update date for this recipient's record. + UpdatedAt *float32 `json:"updated_at,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_recipient_count200.go b/rest/api/v3/lmc_contactdb/model_contactdb_recipient_count200.go new file mode 100644 index 00000000..7e4a3521 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_contactdb_recipient_count200.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactdbRecipientCount200 struct for ContactdbRecipientCount200 +type ContactdbRecipientCount200 struct { + // The count of recipients. + RecipientCount float32 `json:"recipient_count"` +} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_recipient_response201.go b/rest/api/v3/lmc_contactdb/model_contactdb_recipient_response201.go new file mode 100644 index 00000000..b48d3be5 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_contactdb_recipient_response201.go @@ -0,0 +1,29 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactdbRecipientResponse201 struct for ContactdbRecipientResponse201 +type ContactdbRecipientResponse201 struct { + // The number of errors found while adding recipients. + ErrorCount float32 `json:"error_count"` + // The indices of the recipient(s) sent that caused the error. + ErrorIndices *[]float32 `json:"error_indices,omitempty"` + // The count of new recipients added to the contactdb. + NewCount float32 `json:"new_count"` + // The recipient IDs of the recipients that already existed from this request. + PersistedRecipients []string `json:"persisted_recipients"` + // The recipients who were updated from this request. + UpdatedCount float32 `json:"updated_count"` + Errors *[]ContactdbRecipientResponse201ErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_recipient_response201_errors_inner.go b/rest/api/v3/lmc_contactdb/model_contactdb_recipient_response201_errors_inner.go new file mode 100644 index 00000000..4ae71cd8 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_contactdb_recipient_response201_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactdbRecipientResponse201ErrorsInner struct for ContactdbRecipientResponse201ErrorsInner +type ContactdbRecipientResponse201ErrorsInner struct { + Message *string `json:"message,omitempty"` + ErrorIndices *[]float32 `json:"error_indices,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_segments.go b/rest/api/v3/lmc_contactdb/model_contactdb_segments.go new file mode 100644 index 00000000..7fe704db --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_contactdb_segments.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactdbSegments struct for ContactdbSegments +type ContactdbSegments struct { + // The name of this segment. + Name string `json:"name"` + // The list id from which to make this segment. Not including this ID will mean your segment is created from the main contactdb rather than a list. + ListId *int32 `json:"list_id,omitempty"` + // The conditions for a recipient to be included in this segment. + Conditions []ContactdbSegmentsConditions `json:"conditions"` + // The count of recipients in this list. This is not included on creation of segments. + RecipientCount *float32 `json:"recipient_count,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_segments_conditions.go b/rest/api/v3/lmc_contactdb/model_contactdb_segments_conditions.go new file mode 100644 index 00000000..c0e67a33 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_contactdb_segments_conditions.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactdbSegmentsConditions struct for ContactdbSegmentsConditions +type ContactdbSegmentsConditions struct { + Field string `json:"field"` + Value string `json:"value"` + Operator Operator `json:"operator"` + AndOr *AndOr `json:"and_or,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_segments_id200.go b/rest/api/v3/lmc_contactdb/model_contactdb_segments_id200.go new file mode 100644 index 00000000..b3a4b612 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_contactdb_segments_id200.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactdbSegmentsId200 struct for ContactdbSegmentsId200 +type ContactdbSegmentsId200 struct { + // The ID of the segment. + Id float32 `json:"id"` + // The name of this segment. + Name string `json:"name"` + // The list id from which to make this segment. Not including this ID will mean your segment is created from the main contactdb rather than a list. + ListId *int32 `json:"list_id,omitempty"` + // The conditions for a recipient to be included in this segment. + Conditions []ContactdbSegmentsConditions `json:"conditions"` + // The count of recipients in this list. This is not included on creation of segments. + RecipientCount *float32 `json:"recipient_count,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_create_a_list_request.go b/rest/api/v3/lmc_contactdb/model_create_a_list_request.go new file mode 100644 index 00000000..773c84de --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_create_a_list_request.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateAListRequest struct for CreateAListRequest +type CreateAListRequest struct { + Name string `json:"name"` +} diff --git a/rest/api/v3/lmc_contactdb/model_create_custom_field_request.go b/rest/api/v3/lmc_contactdb/model_create_custom_field_request.go new file mode 100644 index 00000000..e17c24ac --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_create_custom_field_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateCustomFieldRequest struct for CreateCustomFieldRequest +type CreateCustomFieldRequest struct { + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_delete_contacts.go b/rest/api/v3/lmc_contactdb/model_delete_contacts.go new file mode 100644 index 00000000..f916ee14 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_delete_contacts.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteContacts the model 'DeleteContacts' +type DeleteContacts bool + +// List of DeleteContacts +const ( + DELETECONTACTS_TRUE DeleteContacts = true + DELETECONTACTS_FALSE DeleteContacts = false +) diff --git a/rest/api/v3/lmc_contactdb/model_error_response.go b/rest/api/v3/lmc_contactdb/model_error_response.go new file mode 100644 index 00000000..9edcd5e2 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_error_response_errors_inner.go b/rest/api/v3/lmc_contactdb/model_error_response_errors_inner.go new file mode 100644 index 00000000..64ff20ee --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_get_recipient_list_200_response.go b/rest/api/v3/lmc_contactdb/model_get_recipient_list_200_response.go new file mode 100644 index 00000000..3812b9ef --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_get_recipient_list_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetRecipientList200Response struct for GetRecipientList200Response +type GetRecipientList200Response struct { + Lists *[]ContactdbList2xx `json:"lists,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_list_all_custom_fields_response.go b/rest/api/v3/lmc_contactdb/model_list_all_custom_fields_response.go new file mode 100644 index 00000000..80c1834b --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_list_all_custom_fields_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListAllCustomFieldsResponse struct for ListAllCustomFieldsResponse +type ListAllCustomFieldsResponse struct { + CustomFields []ContactdbCustomFieldId2xx `json:"custom_fields"` +} diff --git a/rest/api/v3/lmc_contactdb/model_list_all_lists_response.go b/rest/api/v3/lmc_contactdb/model_list_all_lists_response.go new file mode 100644 index 00000000..beb23c3c --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_list_all_lists_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListAllListsResponse struct for ListAllListsResponse +type ListAllListsResponse struct { + Lists []ContactdbList2xx `json:"lists"` +} diff --git a/rest/api/v3/lmc_contactdb/model_list_all_segments_response.go b/rest/api/v3/lmc_contactdb/model_list_all_segments_response.go new file mode 100644 index 00000000..9df8c58e --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_list_all_segments_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListAllSegmentsResponse struct for ListAllSegmentsResponse +type ListAllSegmentsResponse struct { + Segments []ContactdbSegments `json:"segments"` +} diff --git a/rest/api/v3/lmc_contactdb/model_list_recipients_from_contact_db_list_200_response.go b/rest/api/v3/lmc_contactdb/model_list_recipients_from_contact_db_list_200_response.go new file mode 100644 index 00000000..d271c30d --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_list_recipients_from_contact_db_list_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListRecipientsFromContactDbList200Response struct for ListRecipientsFromContactDbList200Response +type ListRecipientsFromContactDbList200Response struct { + Recipients *[]ContactdbRecipient200 `json:"recipients,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_list_recipients_on_a_segment_response.go b/rest/api/v3/lmc_contactdb/model_list_recipients_on_a_segment_response.go new file mode 100644 index 00000000..2c9656c9 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_list_recipients_on_a_segment_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListRecipientsOnASegmentResponse struct for ListRecipientsOnASegmentResponse +type ListRecipientsOnASegmentResponse struct { + Recipients []ContactdbRecipient200 `json:"recipients"` +} diff --git a/rest/api/v3/lmc_contactdb/model_list_recipients_response.go b/rest/api/v3/lmc_contactdb/model_list_recipients_response.go new file mode 100644 index 00000000..b09ef108 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_list_recipients_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListRecipientsResponse struct for ListRecipientsResponse +type ListRecipientsResponse struct { + Recipients []map[string]interface{} `json:"recipients"` +} diff --git a/rest/api/v3/lmc_contactdb/model_list_reserved_field_200_response.go b/rest/api/v3/lmc_contactdb/model_list_reserved_field_200_response.go new file mode 100644 index 00000000..19b63d9e --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_list_reserved_field_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListReservedField200Response struct for ListReservedField200Response +type ListReservedField200Response struct { + ReservedFields *[]ListReservedField200ResponseReservedFieldsInner `json:"reserved_fields,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_list_reserved_field_200_response_reserved_fields_inner.go b/rest/api/v3/lmc_contactdb/model_list_reserved_field_200_response_reserved_fields_inner.go new file mode 100644 index 00000000..d213170a --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_list_reserved_field_200_response_reserved_fields_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListReservedField200ResponseReservedFieldsInner struct for ListReservedField200ResponseReservedFieldsInner +type ListReservedField200ResponseReservedFieldsInner struct { + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_list_status_200_response.go b/rest/api/v3/lmc_contactdb/model_list_status_200_response.go new file mode 100644 index 00000000..b357ab9a --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_list_status_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListStatus200Response struct for ListStatus200Response +type ListStatus200Response struct { + Status *[]ListStatus200ResponseStatusInner `json:"status,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_list_status_200_response_status_inner.go b/rest/api/v3/lmc_contactdb/model_list_status_200_response_status_inner.go new file mode 100644 index 00000000..89247e3e --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_list_status_200_response_status_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListStatus200ResponseStatusInner struct for ListStatus200ResponseStatusInner +type ListStatus200ResponseStatusInner struct { + // Valid values are \"worker_delay\" and \"worker_delay_seconds\" (the second value appears only if \"worker_delay\" has a value of \"delayed\"). + Id *string `json:"id,omitempty"` + // Valid values for the ID \"worker_delay\" are \"OK\" or \"Delayed\". Valid values for the ID \"worker_delay_seconds\" is the time of delay to upload. + Value *string `json:"value,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_operator.go b/rest/api/v3/lmc_contactdb/model_operator.go new file mode 100644 index 00000000..da90b9e6 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_operator.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Operator the model 'Operator' +type Operator string + +// List of Operator +const ( + OPERATOR_EQ Operator = "eq" + OPERATOR_NE Operator = "ne" + OPERATOR_LT Operator = "lt" + OPERATOR_GT Operator = "gt" + OPERATOR_CONTAINS Operator = "contains" +) diff --git a/rest/api/v3/lmc_contactdb/model_search_recipient_200_response.go b/rest/api/v3/lmc_contactdb/model_search_recipient_200_response.go new file mode 100644 index 00000000..0285df3f --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_search_recipient_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SearchRecipient200Response struct for SearchRecipient200Response +type SearchRecipient200Response struct { + Recipients *[]SearchRecipient200ResponseRecipientsInner `json:"recipients,omitempty"` + RecipientCount *int32 `json:"recipient_count,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner.go b/rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner.go new file mode 100644 index 00000000..2eba7382 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner.go @@ -0,0 +1,27 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SearchRecipient200ResponseRecipientsInner struct for SearchRecipient200ResponseRecipientsInner +type SearchRecipient200ResponseRecipientsInner struct { + CreatedAt *int32 `json:"created_at,omitempty"` + Email *string `json:"email,omitempty"` + Id *string `json:"id,omitempty"` + LastEmailed *int32 `json:"last_emailed,omitempty"` + LastClicked *int32 `json:"last_clicked,omitempty"` + LastOpened *int32 `json:"last_opened,omitempty"` + CustomFields *[]SearchRecipient200ResponseRecipientsInnerCustomFieldsInner `json:"custom_fields,omitempty"` + UpdatedAt *int32 `json:"updated_at,omitempty"` + FirstName *string `json:"first_name,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner_custom_fields_inner.go b/rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner_custom_fields_inner.go new file mode 100644 index 00000000..d541c438 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner_custom_fields_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SearchRecipient200ResponseRecipientsInnerCustomFieldsInner struct for SearchRecipient200ResponseRecipientsInnerCustomFieldsInner +type SearchRecipient200ResponseRecipientsInnerCustomFieldsInner struct { + Id *int32 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Value *SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue `json:"value,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner_custom_fields_inner_value.go b/rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner_custom_fields_inner_value.go new file mode 100644 index 00000000..6465eb37 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner_custom_fields_inner_value.go @@ -0,0 +1,18 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue struct for SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue +type SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue struct { +} diff --git a/rest/api/v3/lmc_contactdb/model_search_recipient_request.go b/rest/api/v3/lmc_contactdb/model_search_recipient_request.go new file mode 100644 index 00000000..8f940790 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_search_recipient_request.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SearchRecipientRequest struct for SearchRecipientRequest +type SearchRecipientRequest struct { + ListId int32 `json:"list_id"` + // The conditions by which this segment should be created. + Conditions []ContactdbSegmentsConditions `json:"conditions"` +} diff --git a/rest/api/v3/lmc_contactdb/model_type.go b/rest/api/v3/lmc_contactdb/model_type.go new file mode 100644 index 00000000..92c5e4b6 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_type.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Type the model 'Type' +type Type string + +// List of Type +const ( + TYPE_DATE Type = "date" + TYPE_TEXT Type = "text" + TYPE_NUMBER Type = "number" +) diff --git a/rest/api/v3/lmc_contactdb/model_update_a_list_request.go b/rest/api/v3/lmc_contactdb/model_update_a_list_request.go new file mode 100644 index 00000000..db1099c4 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_update_a_list_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateAListRequest struct for UpdateAListRequest +type UpdateAListRequest struct { + // The new name for your list. + Name string `json:"name"` +} diff --git a/rest/api/v3/lmc_contactdb/model_update_contact_db_list_200_response.go b/rest/api/v3/lmc_contactdb/model_update_contact_db_list_200_response.go new file mode 100644 index 00000000..852e50f7 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_update_contact_db_list_200_response.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateContactDbList200Response struct for UpdateContactDbList200Response +type UpdateContactDbList200Response struct { + // The ID of the list + Id *int32 `json:"id,omitempty"` + // The new name for the list + Name *string `json:"name,omitempty"` + // The number of recipients on the list + RecipientCount *int32 `json:"recipient_count,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_update_recipient_request_inner.go b/rest/api/v3/lmc_contactdb/model_update_recipient_request_inner.go new file mode 100644 index 00000000..5382ec99 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_update_recipient_request_inner.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateRecipientRequestInner struct for UpdateRecipientRequestInner +type UpdateRecipientRequestInner struct { + Email string `json:"email"` + // The last name of the recipient. This is one of the default custom fields. + LastName *string `json:"last_name,omitempty"` + // The first name of the recipient. This is one of the default custom fields. + FirstName *string `json:"first_name,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_update_segment_request.go b/rest/api/v3/lmc_contactdb/model_update_segment_request.go new file mode 100644 index 00000000..f2d1e726 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_update_segment_request.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateSegmentRequest struct for UpdateSegmentRequest +type UpdateSegmentRequest struct { + Name string `json:"name"` + // The list ID you would like this segment to be built from. + ListId *float32 `json:"list_id,omitempty"` + // The conditions by which this segment should be created. + Conditions *[]ContactdbSegmentsConditions `json:"conditions,omitempty"` +} diff --git a/rest/api/v3/lmc_senders/.openapi-generator b/rest/api/v3/lmc_senders/.openapi-generator new file mode 100644 index 00000000..0aaf0e82 --- /dev/null +++ b/rest/api/v3/lmc_senders/.openapi-generator @@ -0,0 +1,32 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_create_sender.go +api_delete_sender.go +api_get_sender.go +api_list_sender.go +api_reset_sender_verification.go +api_service.go +api_update_sender.go +docs/CreateSender.md +docs/CreateSender400Response.md +docs/CreateSender400ResponseErrorsInner.md +docs/CreateSenderRequest.md +docs/DeleteSender.md +docs/GetSender.md +docs/ListSender.md +docs/ListSender200Response.md +docs/ResetSenderVerification.md +docs/SenderId.md +docs/SenderIdRequest.md +docs/SenderIdRequestFrom.md +docs/SenderIdRequestReplyTo.md +docs/UpdateSender.md +model_create_sender_400_response.go +model_create_sender_400_response_errors_inner.go +model_create_sender_request.go +model_list_sender_200_response.go +model_sender_id.go +model_sender_id_request.go +model_sender_id_request_from.go +model_sender_id_request_reply_to.go diff --git a/rest/api/v3/lmc_senders/.openapi-generator-ignore b/rest/api/v3/lmc_senders/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/lmc_senders/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/lmc_senders/README.md b/rest/api/v3/lmc_senders/README.md new file mode 100644 index 00000000..ef51bf59 --- /dev/null +++ b/rest/api/v3/lmc_senders/README.md @@ -0,0 +1,74 @@ +# Go API client for + +The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). + +See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:43.517039+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateSender* | [**CreateSender**](docs/CreateSender.md#createsender) | **Post** /v3/senders | Create a Sender Identity +*DeleteSender* | [**DeleteSender**](docs/DeleteSender.md#deletesender) | **Delete** /v3/senders/{SenderId} | Delete a Sender Identity +*GetSender* | [**GetSender**](docs/GetSender.md#getsender) | **Get** /v3/senders/{SenderId} | View a Sender Identity +*ListSender* | [**ListSender**](docs/ListSender.md#listsender) | **Get** /v3/senders | Get all Sender Identities +*ResetSenderVerification* | [**ResetSenderVerification**](docs/ResetSenderVerification.md#resetsenderverification) | **Post** /v3/senders/{SenderId}/resend_verification | Resend Sender Identity Verification +*UpdateSender* | [**UpdateSender**](docs/UpdateSender.md#updatesender) | **Patch** /v3/senders/{SenderId} | Update a Sender Identity + + +## Documentation For Models + + - [CreateSender400Response](CreateSender400Response.md) + - [CreateSender400ResponseErrorsInner](CreateSender400ResponseErrorsInner.md) + - [CreateSenderRequest](CreateSenderRequest.md) + - [ListSender200Response](ListSender200Response.md) + - [SenderId](SenderId.md) + - [SenderIdRequest](SenderIdRequest.md) + - [SenderIdRequestFrom](SenderIdRequestFrom.md) + - [SenderIdRequestReplyTo](SenderIdRequestReplyTo.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/lmc_senders/api_create_sender.go b/rest/api/v3/lmc_senders/api_create_sender.go new file mode 100644 index 00000000..02c7bd06 --- /dev/null +++ b/rest/api/v3/lmc_senders/api_create_sender.go @@ -0,0 +1,81 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type CreateSenderParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + CreateSenderRequest *CreateSenderRequest `json:"CreateSenderRequest,omitempty"` +} + +func (params *CreateSenderParam) SetOnbehalfof(Onbehalfof string) *CreateSenderParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateSenderParam) SetCreateSenderRequest(CreateSenderRequest CreateSenderRequest) *CreateSenderParam { + params.CreateSenderRequest = &CreateSenderRequest + return params +} + +// **This endpoint allows you to create a new sender identity.** You may create up to 100 unique sender identities. +func (c *ApiService) CreateSender(params *CreateSenderParam) (interface{}, error) { + path := "/v3/senders" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateSenderRequest != nil { + b, err := json.Marshal(*params.CreateSenderRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &SenderId{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &CreateSender400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_senders/api_delete_sender.go b/rest/api/v3/lmc_senders/api_delete_sender.go new file mode 100644 index 00000000..0324940b --- /dev/null +++ b/rest/api/v3/lmc_senders/api_delete_sender.go @@ -0,0 +1,86 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type DeleteSenderParam struct { + // The ID of the sender identity that you want to retrieve. + SenderId *int32 `json:"sender_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteSenderParam) SetSenderId(SenderId int32) *DeleteSenderParam { + params.SenderId = &SenderId + return params +} +func (params *DeleteSenderParam) SetOnbehalfof(Onbehalfof string) *DeleteSenderParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete one of your sender identities.** +func (c *ApiService) DeleteSender(params *DeleteSenderParam) (interface{}, error) { + path := "/v3/senders/{SenderId}" + if params != nil && params.SenderId != nil { + path = strings.Replace(path, "{"+"SenderId"+"}", fmt.Sprint(*params.SenderId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &CreateSender400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &CreateSender400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_senders/api_get_sender.go b/rest/api/v3/lmc_senders/api_get_sender.go new file mode 100644 index 00000000..3f95a9ba --- /dev/null +++ b/rest/api/v3/lmc_senders/api_get_sender.go @@ -0,0 +1,78 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type GetSenderParam struct { + // The ID of the sender identity that you want to retrieve. + SenderId *int32 `json:"sender_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetSenderParam) SetSenderId(SenderId int32) *GetSenderParam { + params.SenderId = &SenderId + return params +} +func (params *GetSenderParam) SetOnbehalfof(Onbehalfof string) *GetSenderParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a specific sender identity.** +func (c *ApiService) GetSender(params *GetSenderParam) (interface{}, error) { + path := "/v3/senders/{SenderId}" + if params != nil && params.SenderId != nil { + path = strings.Replace(path, "{"+"SenderId"+"}", fmt.Sprint(*params.SenderId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SenderId{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &CreateSender400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_senders/api_list_sender.go b/rest/api/v3/lmc_senders/api_list_sender.go new file mode 100644 index 00000000..6c4ca9cd --- /dev/null +++ b/rest/api/v3/lmc_senders/api_list_sender.go @@ -0,0 +1,58 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListSenderParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListSenderParam) SetOnbehalfof(Onbehalfof string) *ListSenderParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a list of all sender identities that have been created for your account.** +func (c *ApiService) ListSender(params *ListSenderParam) (interface{}, error) { + path := "/v3/senders" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListSender200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_senders/api_reset_sender_verification.go b/rest/api/v3/lmc_senders/api_reset_sender_verification.go new file mode 100644 index 00000000..13aaa1bd --- /dev/null +++ b/rest/api/v3/lmc_senders/api_reset_sender_verification.go @@ -0,0 +1,86 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type ResetSenderVerificationParam struct { + // The ID of the sender identity for which you would like to resend a verification email. + SenderId *int32 `json:"sender_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ResetSenderVerificationParam) SetSenderId(SenderId int32) *ResetSenderVerificationParam { + params.SenderId = &SenderId + return params +} +func (params *ResetSenderVerificationParam) SetOnbehalfof(Onbehalfof string) *ResetSenderVerificationParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to resend a sender identity verification email.** +func (c *ApiService) ResetSenderVerification(params *ResetSenderVerificationParam) (interface{}, error) { + path := "/v3/senders/{SenderId}/resend_verification" + if params != nil && params.SenderId != nil { + path = strings.Replace(path, "{"+"SenderId"+"}", fmt.Sprint(*params.SenderId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &CreateSender400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &CreateSender400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_senders/api_service.go b/rest/api/v3/lmc_senders/api_service.go new file mode 100644 index 00000000..aa0529a6 --- /dev/null +++ b/rest/api/v3/lmc_senders/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/lmc_senders/api_update_sender.go b/rest/api/v3/lmc_senders/api_update_sender.go new file mode 100644 index 00000000..5c954105 --- /dev/null +++ b/rest/api/v3/lmc_senders/api_update_sender.go @@ -0,0 +1,109 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type UpdateSenderParam struct { + // The ID of the sender identity that you want to retrieve. + SenderId *int32 `json:"sender_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + SenderIdRequest *SenderIdRequest `json:"SenderIdRequest,omitempty"` +} + +func (params *UpdateSenderParam) SetSenderId(SenderId int32) *UpdateSenderParam { + params.SenderId = &SenderId + return params +} +func (params *UpdateSenderParam) SetOnbehalfof(Onbehalfof string) *UpdateSenderParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateSenderParam) SetSenderIdRequest(SenderIdRequest SenderIdRequest) *UpdateSenderParam { + params.SenderIdRequest = &SenderIdRequest + return params +} + +// **This endpoint allows you to update a sender identity.** Updates to `from.email` require re-verification. Partial updates are allowed, but fields that are marked as \"required\" in the POST (create) endpoint must not be nil if that field is included in the PATCH request. +func (c *ApiService) UpdateSender(params *UpdateSenderParam) (interface{}, error) { + path := "/v3/senders/{SenderId}" + if params != nil && params.SenderId != nil { + path = strings.Replace(path, "{"+"SenderId"+"}", fmt.Sprint(*params.SenderId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SenderIdRequest != nil { + b, err := json.Marshal(*params.SenderIdRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SenderId{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &CreateSender400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &CreateSender400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &CreateSender400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/lmc_senders/docs/CreateSender.md b/rest/api/v3/lmc_senders/docs/CreateSender.md new file mode 100644 index 00000000..c3e50784 --- /dev/null +++ b/rest/api/v3/lmc_senders/docs/CreateSender.md @@ -0,0 +1,49 @@ +# CreateSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateSender**](CreateSender.md#CreateSender) | **Post** /v3/senders | Create a Sender Identity + + + +## CreateSender + +> SenderId CreateSender(ctx, optional) + +Create a Sender Identity + +**This endpoint allows you to create a new sender identity.** You may create up to 100 unique sender identities. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**CreateSenderRequest** | [**CreateSenderRequest**](CreateSenderRequest.md) | + +### Return type + +[**SenderId**](SenderId.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_senders/docs/CreateSender400Response.md b/rest/api/v3/lmc_senders/docs/CreateSender400Response.md new file mode 100644 index 00000000..82215c7b --- /dev/null +++ b/rest/api/v3/lmc_senders/docs/CreateSender400Response.md @@ -0,0 +1,11 @@ +# CreateSender400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]CreateSender400ResponseErrorsInner**](CreateSender400ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_senders/docs/CreateSender400ResponseErrorsInner.md b/rest/api/v3/lmc_senders/docs/CreateSender400ResponseErrorsInner.md new file mode 100644 index 00000000..9ed78de2 --- /dev/null +++ b/rest/api/v3/lmc_senders/docs/CreateSender400ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# CreateSender400ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | |[optional] +**Field** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_senders/docs/CreateSenderRequest.md b/rest/api/v3/lmc_senders/docs/CreateSenderRequest.md new file mode 100644 index 00000000..97a03bec --- /dev/null +++ b/rest/api/v3/lmc_senders/docs/CreateSenderRequest.md @@ -0,0 +1,19 @@ +# CreateSenderRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Nickname** | **string** | A nickname for the sender identity. Not used for sending. | +**From** | **map[string]interface{}** | |[optional] +**ReplyTo** | **map[string]interface{}** | |[optional] +**Address** | **string** | The physical address of the sender identity. | +**Address2** | **string** | Additional sender identity address information. |[optional] +**City** | **string** | The city of the sender identity. | +**State** | **string** | The state of the sender identity. |[optional] +**Zip** | **string** | The zipcode of the sender identity. |[optional] +**Country** | **string** | The country of the sender identity. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_senders/docs/DeleteSender.md b/rest/api/v3/lmc_senders/docs/DeleteSender.md new file mode 100644 index 00000000..5a3cd16b --- /dev/null +++ b/rest/api/v3/lmc_senders/docs/DeleteSender.md @@ -0,0 +1,52 @@ +# DeleteSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSender**](DeleteSender.md#DeleteSender) | **Delete** /v3/senders/{SenderId} | Delete a Sender Identity + + + +## DeleteSender + +> map[string]interface{} DeleteSender(ctx, SenderIdoptional) + +Delete a Sender Identity + +**This endpoint allows you to delete one of your sender identities.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SenderId** | **int32** | The ID of the sender identity that you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_senders/docs/GetSender.md b/rest/api/v3/lmc_senders/docs/GetSender.md new file mode 100644 index 00000000..e183cdfd --- /dev/null +++ b/rest/api/v3/lmc_senders/docs/GetSender.md @@ -0,0 +1,52 @@ +# GetSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetSender**](GetSender.md#GetSender) | **Get** /v3/senders/{SenderId} | View a Sender Identity + + + +## GetSender + +> SenderId GetSender(ctx, SenderIdoptional) + +View a Sender Identity + +**This endpoint allows you to retrieve a specific sender identity.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SenderId** | **int32** | The ID of the sender identity that you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**SenderId**](SenderId.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_senders/docs/ListSender.md b/rest/api/v3/lmc_senders/docs/ListSender.md new file mode 100644 index 00000000..e2cdca72 --- /dev/null +++ b/rest/api/v3/lmc_senders/docs/ListSender.md @@ -0,0 +1,48 @@ +# ListSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSender**](ListSender.md#ListSender) | **Get** /v3/senders | Get all Sender Identities + + + +## ListSender + +> ListSender200Response ListSender(ctx, optional) + +Get all Sender Identities + +**This endpoint allows you to retrieve a list of all sender identities that have been created for your account.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListSender200Response**](ListSender200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_senders/docs/ListSender200Response.md b/rest/api/v3/lmc_senders/docs/ListSender200Response.md new file mode 100644 index 00000000..a43f2cf1 --- /dev/null +++ b/rest/api/v3/lmc_senders/docs/ListSender200Response.md @@ -0,0 +1,11 @@ +# ListSender200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]SenderId**](SenderId.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_senders/docs/ResetSenderVerification.md b/rest/api/v3/lmc_senders/docs/ResetSenderVerification.md new file mode 100644 index 00000000..772fee5c --- /dev/null +++ b/rest/api/v3/lmc_senders/docs/ResetSenderVerification.md @@ -0,0 +1,52 @@ +# ResetSenderVerification + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ResetSenderVerification**](ResetSenderVerification.md#ResetSenderVerification) | **Post** /v3/senders/{SenderId}/resend_verification | Resend Sender Identity Verification + + + +## ResetSenderVerification + +> map[string]interface{} ResetSenderVerification(ctx, SenderIdoptional) + +Resend Sender Identity Verification + +**This endpoint allows you to resend a sender identity verification email.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SenderId** | **int32** | The ID of the sender identity for which you would like to resend a verification email. + +### Other Parameters + +Other parameters are passed through a pointer to a ResetSenderVerificationParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_senders/docs/SenderId.md b/rest/api/v3/lmc_senders/docs/SenderId.md new file mode 100644 index 00000000..5873d37d --- /dev/null +++ b/rest/api/v3/lmc_senders/docs/SenderId.md @@ -0,0 +1,24 @@ +# SenderId + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Nickname** | **string** | A nickname for the sender identity. Not used for sending. | +**From** | [**SenderIdRequestFrom**](SenderIdRequestFrom.md) | |[optional] +**ReplyTo** | [**SenderIdRequestReplyTo**](SenderIdRequestReplyTo.md) | |[optional] +**Address** | **string** | The physical address of the sender identity. | +**Address2** | **string** | Additional sender identity address information. |[optional] +**City** | **string** | The city of the sender identity. | +**State** | **string** | The state of the sender identity. |[optional] +**Zip** | **string** | The zipcode of the sender identity. |[optional] +**Country** | **string** | The country of the sender identity. | +**Id** | **int32** | The unique identifier of the sender identity. |[optional] +**Verified** | **bool** | If the sender identity is verified or not. Only verified sender identities can be used to send email. |[optional] +**UpdatedAt** | **int32** | The time the sender identity was last updated. |[optional] +**CreatedAt** | **int32** | The time the sender identity was created. |[optional] +**Locked** | **bool** | True when the sender id is associated to a campaign in the Draft, Scheduled, or In Progress status. You cannot update or delete a locked sender identity. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_senders/docs/SenderIdRequest.md b/rest/api/v3/lmc_senders/docs/SenderIdRequest.md new file mode 100644 index 00000000..263408e5 --- /dev/null +++ b/rest/api/v3/lmc_senders/docs/SenderIdRequest.md @@ -0,0 +1,19 @@ +# SenderIdRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Nickname** | **string** | A nickname for the sender identity. Not used for sending. |[optional] +**From** | [**SenderIdRequestFrom**](SenderIdRequestFrom.md) | |[optional] +**ReplyTo** | [**SenderIdRequestReplyTo**](SenderIdRequestReplyTo.md) | |[optional] +**Address** | **string** | The physical address of the sender identity. |[optional] +**Address2** | **string** | Additional sender identity address information. |[optional] +**City** | **string** | The city of the sender identity. |[optional] +**State** | **string** | The state of the sender identity. |[optional] +**Zip** | **string** | The zipcode of the sender identity. |[optional] +**Country** | **string** | The country of the sender identity. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_senders/docs/SenderIdRequestFrom.md b/rest/api/v3/lmc_senders/docs/SenderIdRequestFrom.md new file mode 100644 index 00000000..eaf4d8fa --- /dev/null +++ b/rest/api/v3/lmc_senders/docs/SenderIdRequestFrom.md @@ -0,0 +1,12 @@ +# SenderIdRequestFrom + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address from which your recipient will receive emails. |[optional] +**Name** | **string** | The name appended to the from email field. Typically your name or company name. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_senders/docs/SenderIdRequestReplyTo.md b/rest/api/v3/lmc_senders/docs/SenderIdRequestReplyTo.md new file mode 100644 index 00000000..bcdd0642 --- /dev/null +++ b/rest/api/v3/lmc_senders/docs/SenderIdRequestReplyTo.md @@ -0,0 +1,12 @@ +# SenderIdRequestReplyTo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address to which your recipient will reply. |[optional] +**Name** | **string** | The name appended to the reply to email field. Typically your name or company name. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_senders/docs/UpdateSender.md b/rest/api/v3/lmc_senders/docs/UpdateSender.md new file mode 100644 index 00000000..c48c1685 --- /dev/null +++ b/rest/api/v3/lmc_senders/docs/UpdateSender.md @@ -0,0 +1,53 @@ +# UpdateSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSender**](UpdateSender.md#UpdateSender) | **Patch** /v3/senders/{SenderId} | Update a Sender Identity + + + +## UpdateSender + +> SenderId UpdateSender(ctx, SenderIdoptional) + +Update a Sender Identity + +**This endpoint allows you to update a sender identity.** Updates to `from.email` require re-verification. Partial updates are allowed, but fields that are marked as \"required\" in the POST (create) endpoint must not be nil if that field is included in the PATCH request. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SenderId** | **int32** | The ID of the sender identity that you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**SenderIdRequest** | [**SenderIdRequest**](SenderIdRequest.md) | + +### Return type + +[**SenderId**](SenderId.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_senders/model_create_sender_400_response.go b/rest/api/v3/lmc_senders/model_create_sender_400_response.go new file mode 100644 index 00000000..81a60813 --- /dev/null +++ b/rest/api/v3/lmc_senders/model_create_sender_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateSender400Response struct for CreateSender400Response +type CreateSender400Response struct { + Errors *[]CreateSender400ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/lmc_senders/model_create_sender_400_response_errors_inner.go b/rest/api/v3/lmc_senders/model_create_sender_400_response_errors_inner.go new file mode 100644 index 00000000..829750a6 --- /dev/null +++ b/rest/api/v3/lmc_senders/model_create_sender_400_response_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateSender400ResponseErrorsInner struct for CreateSender400ResponseErrorsInner +type CreateSender400ResponseErrorsInner struct { + Message *string `json:"message,omitempty"` + Field *string `json:"field,omitempty"` +} diff --git a/rest/api/v3/lmc_senders/model_create_sender_request.go b/rest/api/v3/lmc_senders/model_create_sender_request.go new file mode 100644 index 00000000..a8496af9 --- /dev/null +++ b/rest/api/v3/lmc_senders/model_create_sender_request.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateSenderRequest struct for CreateSenderRequest +type CreateSenderRequest struct { + // A nickname for the sender identity. Not used for sending. + Nickname string `json:"nickname"` + From *map[string]interface{} `json:"from,omitempty"` + ReplyTo *map[string]interface{} `json:"reply_to,omitempty"` + // The physical address of the sender identity. + Address string `json:"address"` + // Additional sender identity address information. + Address2 *string `json:"address_2,omitempty"` + // The city of the sender identity. + City string `json:"city"` + // The state of the sender identity. + State *string `json:"state,omitempty"` + // The zipcode of the sender identity. + Zip *string `json:"zip,omitempty"` + // The country of the sender identity. + Country string `json:"country"` +} diff --git a/rest/api/v3/lmc_senders/model_list_sender_200_response.go b/rest/api/v3/lmc_senders/model_list_sender_200_response.go new file mode 100644 index 00000000..7394409a --- /dev/null +++ b/rest/api/v3/lmc_senders/model_list_sender_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSender200Response struct for ListSender200Response +type ListSender200Response struct { + Result *[]SenderId `json:"result,omitempty"` +} diff --git a/rest/api/v3/lmc_senders/model_sender_id.go b/rest/api/v3/lmc_senders/model_sender_id.go new file mode 100644 index 00000000..aa460bd2 --- /dev/null +++ b/rest/api/v3/lmc_senders/model_sender_id.go @@ -0,0 +1,44 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SenderId struct for SenderId +type SenderId struct { + // A nickname for the sender identity. Not used for sending. + Nickname string `json:"nickname"` + From *SenderIdRequestFrom `json:"from,omitempty"` + ReplyTo *SenderIdRequestReplyTo `json:"reply_to,omitempty"` + // The physical address of the sender identity. + Address string `json:"address"` + // Additional sender identity address information. + Address2 *string `json:"address_2,omitempty"` + // The city of the sender identity. + City string `json:"city"` + // The state of the sender identity. + State *string `json:"state,omitempty"` + // The zipcode of the sender identity. + Zip *string `json:"zip,omitempty"` + // The country of the sender identity. + Country string `json:"country"` + // The unique identifier of the sender identity. + Id *int32 `json:"id,omitempty"` + // If the sender identity is verified or not. Only verified sender identities can be used to send email. + Verified *bool `json:"verified,omitempty"` + // The time the sender identity was last updated. + UpdatedAt *int32 `json:"updated_at,omitempty"` + // The time the sender identity was created. + CreatedAt *int32 `json:"created_at,omitempty"` + // True when the sender id is associated to a campaign in the Draft, Scheduled, or In Progress status. You cannot update or delete a locked sender identity. + Locked *bool `json:"locked,omitempty"` +} diff --git a/rest/api/v3/lmc_senders/model_sender_id_request.go b/rest/api/v3/lmc_senders/model_sender_id_request.go new file mode 100644 index 00000000..be2cf28a --- /dev/null +++ b/rest/api/v3/lmc_senders/model_sender_id_request.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SenderIdRequest struct for SenderIdRequest +type SenderIdRequest struct { + // A nickname for the sender identity. Not used for sending. + Nickname *string `json:"nickname,omitempty"` + From *SenderIdRequestFrom `json:"from,omitempty"` + ReplyTo *SenderIdRequestReplyTo `json:"reply_to,omitempty"` + // The physical address of the sender identity. + Address *string `json:"address,omitempty"` + // Additional sender identity address information. + Address2 *string `json:"address_2,omitempty"` + // The city of the sender identity. + City *string `json:"city,omitempty"` + // The state of the sender identity. + State *string `json:"state,omitempty"` + // The zipcode of the sender identity. + Zip *string `json:"zip,omitempty"` + // The country of the sender identity. + Country *string `json:"country,omitempty"` +} diff --git a/rest/api/v3/lmc_senders/model_sender_id_request_from.go b/rest/api/v3/lmc_senders/model_sender_id_request_from.go new file mode 100644 index 00000000..03edf7fe --- /dev/null +++ b/rest/api/v3/lmc_senders/model_sender_id_request_from.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SenderIdRequestFrom struct for SenderIdRequestFrom +type SenderIdRequestFrom struct { + // The email address from which your recipient will receive emails. + Email *string `json:"email,omitempty"` + // The name appended to the from email field. Typically your name or company name. + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/lmc_senders/model_sender_id_request_reply_to.go b/rest/api/v3/lmc_senders/model_sender_id_request_reply_to.go new file mode 100644 index 00000000..725356c0 --- /dev/null +++ b/rest/api/v3/lmc_senders/model_sender_id_request_reply_to.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SenderIdRequestReplyTo struct for SenderIdRequestReplyTo +type SenderIdRequestReplyTo struct { + // The email address to which your recipient will reply. + Email *string `json:"email,omitempty"` + // The name appended to the reply to email field. Typically your name or company name. + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/mail/.openapi-generator b/rest/api/v3/mail/.openapi-generator new file mode 100644 index 00000000..3c4fde5b --- /dev/null +++ b/rest/api/v3/mail/.openapi-generator @@ -0,0 +1,58 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_create_mail_batch.go +api_get_mail_batch.go +api_send_mail.go +api_service.go +docs/ContentEncoding.md +docs/CreateMailBatch.md +docs/Disposition.md +docs/ErrorResponse.md +docs/ErrorResponseErrorsInner.md +docs/GetMailBatch.md +docs/MailBatchResponse.md +docs/MailFrom.md +docs/MailTo.md +docs/SendMail.md +docs/SendMailRequest.md +docs/SendMailRequestAsm.md +docs/SendMailRequestAttachmentsInner.md +docs/SendMailRequestContentInner.md +docs/SendMailRequestMailSettings.md +docs/SendMailRequestMailSettingsBypassBounceManagement.md +docs/SendMailRequestMailSettingsBypassListManagement.md +docs/SendMailRequestMailSettingsBypassSpamManagement.md +docs/SendMailRequestMailSettingsBypassUnsubscribeManagement.md +docs/SendMailRequestMailSettingsFooter.md +docs/SendMailRequestMailSettingsSandboxMode.md +docs/SendMailRequestPersonalizationsInner.md +docs/SendMailRequestTrackingSettings.md +docs/SendMailRequestTrackingSettingsClickTracking.md +docs/SendMailRequestTrackingSettingsGanalytics.md +docs/SendMailRequestTrackingSettingsOpenTracking.md +docs/SendMailRequestTrackingSettingsSubscriptionTracking.md +model_content_encoding.go +model_disposition.go +model_error_response.go +model_error_response_errors_inner.go +model_mail_batch_response.go +model_mail_from.go +model_mail_to.go +model_send_mail_request.go +model_send_mail_request_asm.go +model_send_mail_request_attachments_inner.go +model_send_mail_request_content_inner.go +model_send_mail_request_mail_settings.go +model_send_mail_request_mail_settings_bypass_bounce_management.go +model_send_mail_request_mail_settings_bypass_list_management.go +model_send_mail_request_mail_settings_bypass_spam_management.go +model_send_mail_request_mail_settings_bypass_unsubscribe_management.go +model_send_mail_request_mail_settings_footer.go +model_send_mail_request_mail_settings_sandbox_mode.go +model_send_mail_request_personalizations_inner.go +model_send_mail_request_tracking_settings.go +model_send_mail_request_tracking_settings_click_tracking.go +model_send_mail_request_tracking_settings_ganalytics.go +model_send_mail_request_tracking_settings_open_tracking.go +model_send_mail_request_tracking_settings_subscription_tracking.go diff --git a/rest/api/v3/mail/.openapi-generator-ignore b/rest/api/v3/mail/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/mail/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/mail/README.md b/rest/api/v3/mail/README.md new file mode 100644 index 00000000..d368a329 --- /dev/null +++ b/rest/api/v3/mail/README.md @@ -0,0 +1,85 @@ +# Go API client for + +The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:44.024951+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateMailBatch* | [**CreateMailBatch**](docs/CreateMailBatch.md#createmailbatch) | **Post** /v3/mail/batch | Create a batch ID. +*GetMailBatch* | [**GetMailBatch**](docs/GetMailBatch.md#getmailbatch) | **Get** /v3/mail/batch/{BatchId} | Validate a batch ID. +*SendMail* | [**SendMail**](docs/SendMail.md#sendmail) | **Post** /v3/mail/send | Send Email with Twilio SendGrid. + + +## Documentation For Models + + - [ContentEncoding](ContentEncoding.md) + - [Disposition](Disposition.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [MailBatchResponse](MailBatchResponse.md) + - [MailFrom](MailFrom.md) + - [MailTo](MailTo.md) + - [SendMailRequest](SendMailRequest.md) + - [SendMailRequestAsm](SendMailRequestAsm.md) + - [SendMailRequestAttachmentsInner](SendMailRequestAttachmentsInner.md) + - [SendMailRequestContentInner](SendMailRequestContentInner.md) + - [SendMailRequestMailSettings](SendMailRequestMailSettings.md) + - [SendMailRequestMailSettingsBypassBounceManagement](SendMailRequestMailSettingsBypassBounceManagement.md) + - [SendMailRequestMailSettingsBypassListManagement](SendMailRequestMailSettingsBypassListManagement.md) + - [SendMailRequestMailSettingsBypassSpamManagement](SendMailRequestMailSettingsBypassSpamManagement.md) + - [SendMailRequestMailSettingsBypassUnsubscribeManagement](SendMailRequestMailSettingsBypassUnsubscribeManagement.md) + - [SendMailRequestMailSettingsFooter](SendMailRequestMailSettingsFooter.md) + - [SendMailRequestMailSettingsSandboxMode](SendMailRequestMailSettingsSandboxMode.md) + - [SendMailRequestPersonalizationsInner](SendMailRequestPersonalizationsInner.md) + - [SendMailRequestTrackingSettings](SendMailRequestTrackingSettings.md) + - [SendMailRequestTrackingSettingsClickTracking](SendMailRequestTrackingSettingsClickTracking.md) + - [SendMailRequestTrackingSettingsGanalytics](SendMailRequestTrackingSettingsGanalytics.md) + - [SendMailRequestTrackingSettingsOpenTracking](SendMailRequestTrackingSettingsOpenTracking.md) + - [SendMailRequestTrackingSettingsSubscriptionTracking](SendMailRequestTrackingSettingsSubscriptionTracking.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/mail/api_create_mail_batch.go b/rest/api/v3/mail/api_create_mail_batch.go new file mode 100644 index 00000000..8b28bd2f --- /dev/null +++ b/rest/api/v3/mail/api_create_mail_batch.go @@ -0,0 +1,106 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type CreateMailBatchParam struct { + // Use the `on-behalf-of` header to make API calls for a particular Subuser through the parent account. You can use this header to automate bulk updates or to administer a Subuser without changing the authentication in your code. You will use the parent account's API key when using this header. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *CreateMailBatchParam) SetOnbehalfof(Onbehalfof string) *CreateMailBatchParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This operation allows you to generate a new mail batch ID.** Once a batch ID is created, you can associate it with a mail send by passing it in the request body of the [Mail Send operation](https://docs.sendgrid.com/api-reference/mail-send/mail-send). This makes it possible to group multiple requests to the Mail Send operation by assigning them the same batch ID. A batch ID that's associated with a mail send can be used to access and modify the associated send. For example, you can pause or cancel a send using its batch ID. See the [Scheduled Sends API](https://www.twilio.com/docs/sendgrid/api-reference/cancel-scheduled-sends) for more information about pausing and cancelling a mail send. +func (c *ApiService) CreateMailBatch(params *CreateMailBatchParam) (interface{}, error) { + path := "/v3/mail/batch" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &MailBatchResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 405 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mail/api_get_mail_batch.go b/rest/api/v3/mail/api_get_mail_batch.go new file mode 100644 index 00000000..30c4ca73 --- /dev/null +++ b/rest/api/v3/mail/api_get_mail_batch.go @@ -0,0 +1,98 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type GetMailBatchParam struct { + // Use the `on-behalf-of` header to make API calls for a particular Subuser through the parent account. You can use this header to automate bulk updates or to administer a Subuser without changing the authentication in your code. You will use the parent account's API key when using this header. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetMailBatchParam) SetOnbehalfof(Onbehalfof string) *GetMailBatchParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This operation allows you to validate a mail batch ID.** If you provide a valid batch ID, this operation will return a `200` status code and the batch ID itself. If you provide an invalid batch ID, you will receive a `400` level status code and an error message. A batch ID does not need to be assigned to a send to be considered valid. A successful response means only that the batch ID has been created, but it does not indicate that the ID has been assigned to a send. +func (c *ApiService) GetMailBatch(params *GetMailBatchParam) (interface{}, error) { + path := "/v3/mail/batch/{BatchId}" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &MailBatchResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 405 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mail/api_send_mail.go b/rest/api/v3/mail/api_send_mail.go new file mode 100644 index 00000000..94051265 --- /dev/null +++ b/rest/api/v3/mail/api_send_mail.go @@ -0,0 +1,121 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type SendMailParam struct { + // Use this header when sending a gzip compressed mail body. Mail body compression is available to some high volume accounts. Submit a [request to support](https://support.sendgrid.com/hc/en-us) to have gzip enabled on your account. + ContentEncoding *ContentEncoding `json:"Content-Encoding,omitempty"` + // + SendMailRequest *SendMailRequest `json:"SendMailRequest,omitempty"` +} + +func (params *SendMailParam) SetContentEncoding(ContentEncoding ContentEncoding) *SendMailParam { + params.ContentEncoding = &ContentEncoding + return params +} +func (params *SendMailParam) SetSendMailRequest(SendMailRequest SendMailRequest) *SendMailParam { + params.SendMailRequest = &SendMailRequest + return params +} + +// *The Mail Send operation allows you to send email over SendGrid's v3 Web API* For an overview of this API, including its features and limitations, please see the [Mail Send API overview page](https://www.twilio.com/docs/sendgrid/api-reference/mail-send) The overview page also includes links to SendGrid's Email API quickstarts and helper libraries to get you working with this endpoint even faster. +func (c *ApiService) SendMail(params *SendMailParam) (interface{}, error) { + path := "/v3/mail/send" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SendMailRequest != nil { + b, err := json.Marshal(*params.SendMailRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.ContentEncoding != nil { + headers["Content-Encoding"] = *params.ContentEncoding + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 405 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 413 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mail/api_service.go b/rest/api/v3/mail/api_service.go new file mode 100644 index 00000000..0ca11aea --- /dev/null +++ b/rest/api/v3/mail/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/mail/docs/ContentEncoding.md b/rest/api/v3/mail/docs/ContentEncoding.md new file mode 100644 index 00000000..d7abc43b --- /dev/null +++ b/rest/api/v3/mail/docs/ContentEncoding.md @@ -0,0 +1,12 @@ +# ContentEncoding + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**GZIP** | string | (value: `"gzip"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/CreateMailBatch.md b/rest/api/v3/mail/docs/CreateMailBatch.md new file mode 100644 index 00000000..f1daaa8b --- /dev/null +++ b/rest/api/v3/mail/docs/CreateMailBatch.md @@ -0,0 +1,48 @@ +# CreateMailBatch + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateMailBatch**](CreateMailBatch.md#CreateMailBatch) | **Post** /v3/mail/batch | Create a batch ID. + + + +## CreateMailBatch + +> MailBatchResponse CreateMailBatch(ctx, optional) + +Create a batch ID. + +**This operation allows you to generate a new mail batch ID.** Once a batch ID is created, you can associate it with a mail send by passing it in the request body of the [Mail Send operation](https://docs.sendgrid.com/api-reference/mail-send/mail-send). This makes it possible to group multiple requests to the Mail Send operation by assigning them the same batch ID. A batch ID that's associated with a mail send can be used to access and modify the associated send. For example, you can pause or cancel a send using its batch ID. See the [Scheduled Sends API](https://www.twilio.com/docs/sendgrid/api-reference/cancel-scheduled-sends) for more information about pausing and cancelling a mail send. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateMailBatchParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | Use the `on-behalf-of` header to make API calls for a particular Subuser through the parent account. You can use this header to automate bulk updates or to administer a Subuser without changing the authentication in your code. You will use the parent account's API key when using this header. + +### Return type + +[**MailBatchResponse**](MailBatchResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail/docs/Disposition.md b/rest/api/v3/mail/docs/Disposition.md new file mode 100644 index 00000000..6240774b --- /dev/null +++ b/rest/api/v3/mail/docs/Disposition.md @@ -0,0 +1,13 @@ +# Disposition + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**INLINE** | string | (value: `"inline"`) +**ATTACHMENT** | string | (value: `"attachment"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/ErrorResponse.md b/rest/api/v3/mail/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/mail/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/ErrorResponseErrorsInner.md b/rest/api/v3/mail/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/mail/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/GetMailBatch.md b/rest/api/v3/mail/docs/GetMailBatch.md new file mode 100644 index 00000000..2257a3fc --- /dev/null +++ b/rest/api/v3/mail/docs/GetMailBatch.md @@ -0,0 +1,48 @@ +# GetMailBatch + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetMailBatch**](GetMailBatch.md#GetMailBatch) | **Get** /v3/mail/batch/{BatchId} | Validate a batch ID. + + + +## GetMailBatch + +> MailBatchResponse GetMailBatch(ctx, optional) + +Validate a batch ID. + +**This operation allows you to validate a mail batch ID.** If you provide a valid batch ID, this operation will return a `200` status code and the batch ID itself. If you provide an invalid batch ID, you will receive a `400` level status code and an error message. A batch ID does not need to be assigned to a send to be considered valid. A successful response means only that the batch ID has been created, but it does not indicate that the ID has been assigned to a send. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a GetMailBatchParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | Use the `on-behalf-of` header to make API calls for a particular Subuser through the parent account. You can use this header to automate bulk updates or to administer a Subuser without changing the authentication in your code. You will use the parent account's API key when using this header. + +### Return type + +[**MailBatchResponse**](MailBatchResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail/docs/MailBatchResponse.md b/rest/api/v3/mail/docs/MailBatchResponse.md new file mode 100644 index 00000000..8103caed --- /dev/null +++ b/rest/api/v3/mail/docs/MailBatchResponse.md @@ -0,0 +1,11 @@ +# MailBatchResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BatchId** | **string** | A mail batch ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/MailFrom.md b/rest/api/v3/mail/docs/MailFrom.md new file mode 100644 index 00000000..3f3d4873 --- /dev/null +++ b/rest/api/v3/mail/docs/MailFrom.md @@ -0,0 +1,12 @@ +# MailFrom + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address from which messages are sent. This address should be a verified sender in your Twilio SendGrid account. Email addresses specified in `personalizations` will override addresses set at the message level outside of the `personalizations` object. | +**Name** | **string** | A name or title associated with the email address such as \"Support\" or \"Alex\". |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/MailTo.md b/rest/api/v3/mail/docs/MailTo.md new file mode 100644 index 00000000..70935e77 --- /dev/null +++ b/rest/api/v3/mail/docs/MailTo.md @@ -0,0 +1,12 @@ +# MailTo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | An email address to which a message is sent. Email addresses specified in `personalizations` will override addresses set at the message level outside of the `personalizations` object. | +**Name** | **string** | A name or title associated with the email address such as \"Alex\". |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMail.md b/rest/api/v3/mail/docs/SendMail.md new file mode 100644 index 00000000..450ee26d --- /dev/null +++ b/rest/api/v3/mail/docs/SendMail.md @@ -0,0 +1,49 @@ +# SendMail + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SendMail**](SendMail.md#SendMail) | **Post** /v3/mail/send | Send Email with Twilio SendGrid. + + + +## SendMail + +> SendMail(ctx, optional) + +Send Email with Twilio SendGrid. + +*The Mail Send operation allows you to send email over SendGrid's v3 Web API* For an overview of this API, including its features and limitations, please see the [Mail Send API overview page](https://www.twilio.com/docs/sendgrid/api-reference/mail-send) The overview page also includes links to SendGrid's Email API quickstarts and helper libraries to get you working with this endpoint even faster. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a SendMailParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**ContentEncoding** | [**ContentEncoding**](ContentEncodingContentEncoding.md) | Use this header when sending a gzip compressed mail body. Mail body compression is available to some high volume accounts. Submit a [request to support](https://support.sendgrid.com/hc/en-us) to have gzip enabled on your account. +**SendMailRequest** | [**SendMailRequest**](SendMailRequest.md) | + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail/docs/SendMailRequest.md b/rest/api/v3/mail/docs/SendMailRequest.md new file mode 100644 index 00000000..0bebde09 --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequest.md @@ -0,0 +1,27 @@ +# SendMailRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Personalizations** | [**[]SendMailRequestPersonalizationsInner**](SendMailRequestPersonalizationsInner.md) | An array of messages and their metadata. Each object within the `personalizations` array can be thought of as a mail envelope—it defines who should receive an individual message and how that message should be handled. See [**Personalizations**](https://sendgrid.com/docs/for-developers/sending-email/personalizations/) for more information. | +**From** | [**MailFrom**](MailFrom.md) | | +**ReplyTo** | [**MailTo**](MailTo.md) | |[optional] +**ReplyToList** | [**[]MailTo**](MailTo.md) | An array of recipients to whom replies will be sent. Each object in this array must contain a recipient's email address. Each object in the array may optionally contain a recipient's name. You can use either the `reply_to` property or `reply_to_list` property but not both. |[optional] +**Subject** | **string** | The global or _message level_ subject of your email. Subject lines set in personalizations objects will override this global subject line. See line length limits specified in [RFC 2822](https://www.rfc-editor.org/rfc/rfc2822#section-2.1.1) for guidance on subject line character limits. |[optional] +**Content** | [**[]SendMailRequestContentInner**](SendMailRequestContentInner.md) | An array of objects, each containing a message body's content and [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types). You must specify at least one MIME type and may include multiple. To include more than one MIME type, add an object for each type to the array. |[optional] +**Attachments** | [**[]SendMailRequestAttachmentsInner**](SendMailRequestAttachmentsInner.md) | An array of objects where you can define any attachments to be included with the message. Each object contains a `content` property, which must be a Base64 encoded string of the attachment itself, and `type`, `filename`, `disposition`, and `content_id` properties that tell SendGrid how to handle the attachment. |[optional] +**TemplateId** | **string** | An email template ID. A template that contains a subject and content—either text or html—will override any subject and content values specified at the `personalizations` or message level. If a template ID begins with `d-`, it is a dynamic template and will work with the `dynamic_template_data` property. If the template ID does not begin with `d-`, it is a standard SendGrid template and will work with the `substitutions` property. See [**How to Send an Email with Dynamic Templates**](https://docs.sendgrid.com/ui/sending-email/how-to-send-an-email-with-dynamic-templates) for more information about working with templates. |[optional] +**Headers** | **map[string]interface{}** | A collection of JSON property name and property value pairs allowing you to specify handling instructions for your email. You may not override the following headers: `x-sg-id`, `x-sg-eid`, `received`, `dkim-signature`, `Content-Type`, `Content-Transfer-Encoding`, `To`, `From`, `Subject`, `Reply-To`, `CC`, `BCC`. |[optional] +**Categories** | **[]string** | An array of category names assigned to this message. Categories allow you to group messages by categories you define. Categories should be used sparingly to create general groups that are relevant to you. Categories are not meant to be used to track individual mail sends. For more granular categorization and tracking, use the `custom_args` property. A category name cannot exceed 255 characters. See [**Working with Categories**](https://docs.sendgrid.com/for-developers/sending-email/categories) for more information. |[optional] +**CustomArgs** | **string** | Values that are specific to the entire send that will be carried along with the email and its activity data. Substitutions will not be made on custom arguments, so any string that is assigned to this property will be assumed to be the custom argument that you would like to be used. This parameter is overridden by `custom_args` set at the personalizations level. Total `custom_args` size may not exceed 10,000 bytes. |[optional] +**SendAt** | **int32** | A [unix timestamp](https://en.wikipedia.org/wiki/Unix_time) allowing you to specify when your email should be sent. A send cannot be scheduled more than 72 hours in advance. This property may be overridden by the `send_at` property set at the personalizations level. |[optional] +**BatchId** | **string** | An ID representing a batch of emails to be sent at the same time. Including a `batch_id` in your request allows you to include this email in that batch. It also enables you to cancel or pause the delivery of that batch. See the [Scheduled Sends API](https://sendgrid.com/docs/api-reference/) for more information about scheduling your email. |[optional] +**Asm** | [**SendMailRequestAsm**](SendMailRequestAsm.md) | |[optional] +**IpPoolName** | **string** | The IP Pool that you would like to send this email from. IP Pools allow you to group your dedicated Twilio SendGrid IP addresses in order to have more control over your deliverability. See [**IP Pools**](https://docs.sendgrid.com/ui/account-and-settings/ip-pools) for more information. |[optional] +**MailSettings** | [**SendMailRequestMailSettings**](SendMailRequestMailSettings.md) | |[optional] +**TrackingSettings** | [**SendMailRequestTrackingSettings**](SendMailRequestTrackingSettings.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestAsm.md b/rest/api/v3/mail/docs/SendMailRequestAsm.md new file mode 100644 index 00000000..b8759b63 --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestAsm.md @@ -0,0 +1,12 @@ +# SendMailRequestAsm + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**GroupId** | **int32** | The unsubscribe group to associate with this email. See the [Suppressions API](https://docs.sendgrid.com/api-reference/suppressions/) to manage unsubscribe group IDs. | +**GroupsToDisplay** | **[]int32** | An array containing the unsubscribe groups that you would like to be displayed to a recipient on the unsubscribe preferences page. This page is displayed in the recipient's browser when they click the unsubscribe link in your message. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestAttachmentsInner.md b/rest/api/v3/mail/docs/SendMailRequestAttachmentsInner.md new file mode 100644 index 00000000..a58a0d58 --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestAttachmentsInner.md @@ -0,0 +1,15 @@ +# SendMailRequestAttachmentsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | **string** | The Base64 encoded content of the attachment. | +**Type** | **string** | The MIME type of the content you are attaching (e.g., `image/jpeg` or `application/pdf`). |[optional] +**Filename** | **string** | The attachment's filename, including the file extension. | +**Disposition** | [**Disposition**](Disposition.md) | The attachment's content-disposition specifies how you would like the attachment to be displayed. For example, `inline` results in the attached file being displayed automatically within the message while `attachment` results in the attached file requiring some action to be taken before it is displayed such as opening or downloading the file. |[optional] +**ContentId** | **string** | The attachment's content ID. The `content_id` is used when the `disposition` is set to `inline` and the attachment is an image, allowing the file to be displayed within the body of the email. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestContentInner.md b/rest/api/v3/mail/docs/SendMailRequestContentInner.md new file mode 100644 index 00000000..43c2ae52 --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestContentInner.md @@ -0,0 +1,12 @@ +# SendMailRequestContentInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | The MIME type of the content assigned in the `value` property of this object (e.g., `text/plain` or `text/html`). | +**Value** | **string** | The content of your message in the specified MIME type assigned in the `type` property of this object. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestMailSettings.md b/rest/api/v3/mail/docs/SendMailRequestMailSettings.md new file mode 100644 index 00000000..c78c164d --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestMailSettings.md @@ -0,0 +1,16 @@ +# SendMailRequestMailSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BypassListManagement** | [**SendMailRequestMailSettingsBypassListManagement**](SendMailRequestMailSettingsBypassListManagement.md) | |[optional] +**BypassSpamManagement** | [**SendMailRequestMailSettingsBypassSpamManagement**](SendMailRequestMailSettingsBypassSpamManagement.md) | |[optional] +**BypassBounceManagement** | [**SendMailRequestMailSettingsBypassBounceManagement**](SendMailRequestMailSettingsBypassBounceManagement.md) | |[optional] +**BypassUnsubscribeManagement** | [**SendMailRequestMailSettingsBypassUnsubscribeManagement**](SendMailRequestMailSettingsBypassUnsubscribeManagement.md) | |[optional] +**Footer** | [**SendMailRequestMailSettingsFooter**](SendMailRequestMailSettingsFooter.md) | |[optional] +**SandboxMode** | [**SendMailRequestMailSettingsSandboxMode**](SendMailRequestMailSettingsSandboxMode.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassBounceManagement.md b/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassBounceManagement.md new file mode 100644 index 00000000..56893dd4 --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassBounceManagement.md @@ -0,0 +1,11 @@ +# SendMailRequestMailSettingsBypassBounceManagement + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enable** | **bool** | Indicates if this setting is enabled. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassListManagement.md b/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassListManagement.md new file mode 100644 index 00000000..fa9c2c7f --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassListManagement.md @@ -0,0 +1,11 @@ +# SendMailRequestMailSettingsBypassListManagement + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enable** | **bool** | Indicates if this setting is enabled. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassSpamManagement.md b/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassSpamManagement.md new file mode 100644 index 00000000..a64754af --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassSpamManagement.md @@ -0,0 +1,11 @@ +# SendMailRequestMailSettingsBypassSpamManagement + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enable** | **bool** | Indicates if this setting is enabled. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassUnsubscribeManagement.md b/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassUnsubscribeManagement.md new file mode 100644 index 00000000..0ba329fe --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassUnsubscribeManagement.md @@ -0,0 +1,11 @@ +# SendMailRequestMailSettingsBypassUnsubscribeManagement + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enable** | **bool** | Indicates if this setting is enabled. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestMailSettingsFooter.md b/rest/api/v3/mail/docs/SendMailRequestMailSettingsFooter.md new file mode 100644 index 00000000..423727ed --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestMailSettingsFooter.md @@ -0,0 +1,13 @@ +# SendMailRequestMailSettingsFooter + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enable** | **bool** | Indicates if this setting is enabled. |[optional] +**Text** | **string** | The plain text content of your footer. |[optional] +**Html** | **string** | The HTML content of your footer. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestMailSettingsSandboxMode.md b/rest/api/v3/mail/docs/SendMailRequestMailSettingsSandboxMode.md new file mode 100644 index 00000000..f23907e5 --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestMailSettingsSandboxMode.md @@ -0,0 +1,11 @@ +# SendMailRequestMailSettingsSandboxMode + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enable** | **bool** | Indicates if this setting is enabled. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestPersonalizationsInner.md b/rest/api/v3/mail/docs/SendMailRequestPersonalizationsInner.md new file mode 100644 index 00000000..f89200e5 --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestPersonalizationsInner.md @@ -0,0 +1,20 @@ +# SendMailRequestPersonalizationsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**From** | [**MailFrom**](MailFrom.md) | |[optional] +**To** | [**[]MailTo**](MailTo.md) | An array of recipients to whom the email will be sent. Each object in this array must contain a recipient's email address. Each object in the array may optionally contain a recipient's name. | +**Cc** | [**[]MailTo**](MailTo.md) | An array of recipients to whom a copy of the email will be sent. Each object in this array must contain a recipient's email address. Each object in the array may optionally contain a recipient's name. |[optional] +**Bcc** | [**[]MailTo**](MailTo.md) | An array of recipients to whom a blind carbon copy of your email will be sent. Each object in this array must contain a recipient's email address. Each object in the array may optionally contain a recipient's name. |[optional] +**Subject** | **string** | The subject of your email. See line length limits specified in [RFC 2822](https://www.rfc-editor.org/rfc/rfc2822#section-2.1.1) for guidance on subject line character limits. |[optional] +**Headers** | **map[string]interface{}** | A collection of JSON property name and property value pairs allowing you to specify handling instructions for your email. You may not override the following headers: `x-sg-id`, `x-sg-eid`, `received`, `dkim-signature`, `Content-Type`, `Content-Transfer-Encoding`, `To`, `From`, `Subject`, `Reply-To`, `CC`, `BCC`. |[optional] +**Substitutions** | **map[string]string** | A collection property names that will be substituted by their corresponding property values in the `subject`, `reply-to` and `content` portions of your message. Name and value pairs follow the pattern `\"substitution_tag\":\"value to substitute\"`. The total collective size of your substitutions may not exceed 10,000 bytes per personalization object. Substitutions allow you to insert data without using SendGrid's Dynamic Templates. This property should not be used in combination with a Dynamic Template, which can be identified by a `template_id` starting with `d-`. See [**Substitution Tags**](https://docs.sendgrid.com/for-developers/sending-email/substitution-tags) for more information. |[optional] +**DynamicTemplateData** | **map[string]interface{}** | A collection property names that will be substituted by their corresponding property values in the `subject`, `reply-to` and `content` portions of a SendGrid Dynamic Template. Dynamic template data is available in a template using [Handlebars](https://docs.sendgrid.com/for-developers/sending-email/using-handlebars) syntax. This property should be used in combination with a Dynamic Template, which can be identified by a `template_id` starting with `d-`. See [**How to Send an Email with Dynamic Templates**](https://docs.sendgrid.com/ui/sending-email/how-to-send-an-email-with-dynamic-templates) for more information. |[optional] +**CustomArgs** | **map[string]interface{}** | Values that are specific to this personalization that will be carried along with the email and its activity data. Substitutions will not be made on custom arguments, so any string that is assigned to this property will be assumed to be the custom argument that you would like to be used. This field may not exceed 10,000 bytes. |[optional] +**SendAt** | **int32** | A [unix timestamp](https://en.wikipedia.org/wiki/Unix_time) allowing you to specify when your email should be sent. A send cannot be scheduled more than 72 hours in advance. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestTrackingSettings.md b/rest/api/v3/mail/docs/SendMailRequestTrackingSettings.md new file mode 100644 index 00000000..f932f68f --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestTrackingSettings.md @@ -0,0 +1,14 @@ +# SendMailRequestTrackingSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClickTracking** | [**SendMailRequestTrackingSettingsClickTracking**](SendMailRequestTrackingSettingsClickTracking.md) | |[optional] +**OpenTracking** | [**SendMailRequestTrackingSettingsOpenTracking**](SendMailRequestTrackingSettingsOpenTracking.md) | |[optional] +**SubscriptionTracking** | [**SendMailRequestTrackingSettingsSubscriptionTracking**](SendMailRequestTrackingSettingsSubscriptionTracking.md) | |[optional] +**Ganalytics** | [**SendMailRequestTrackingSettingsGanalytics**](SendMailRequestTrackingSettingsGanalytics.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsClickTracking.md b/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsClickTracking.md new file mode 100644 index 00000000..ddcd5c9c --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsClickTracking.md @@ -0,0 +1,12 @@ +# SendMailRequestTrackingSettingsClickTracking + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enable** | **bool** | Indicates if this setting is enabled. |[optional] +**EnableText** | **bool** | Indicates if this setting should be included in the `text/plain` portion of your email. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsGanalytics.md b/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsGanalytics.md new file mode 100644 index 00000000..48a45e0f --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsGanalytics.md @@ -0,0 +1,16 @@ +# SendMailRequestTrackingSettingsGanalytics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enable** | **bool** | Indicates if this setting is enabled. |[optional] +**UtmSource** | **string** | Name of the referrer source. (e.g., Google, SomeDomain.com, or Marketing Email) |[optional] +**UtmMedium** | **string** | Name of the marketing medium. (e.g., Email) |[optional] +**UtmTerm** | **string** | Used to identify any paid keywords. |[optional] +**UtmContent** | **string** | Used to differentiate your campaign from advertisements. |[optional] +**UtmCampaign** | **string** | The name of the campaign. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsOpenTracking.md b/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsOpenTracking.md new file mode 100644 index 00000000..79ee6662 --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsOpenTracking.md @@ -0,0 +1,12 @@ +# SendMailRequestTrackingSettingsOpenTracking + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enable** | **bool** | Indicates if this setting is enabled. |[optional] +**SubstitutionTag** | **string** | Allows you to specify a substitution tag that you can insert in the body of your email at a location that you desire. This tag will be replaced by the open tracking pixel. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsSubscriptionTracking.md b/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsSubscriptionTracking.md new file mode 100644 index 00000000..f4bb0483 --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsSubscriptionTracking.md @@ -0,0 +1,14 @@ +# SendMailRequestTrackingSettingsSubscriptionTracking + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enable** | **bool** | Indicates if this setting is enabled. |[optional] +**Text** | **string** | Text to be appended to the email with the subscription tracking link. |[optional] +**Html** | **string** | HTML to be appended to the email with the subscription tracking link. |[optional] +**SubstitutionTag** | **string** | A tag that will be replaced with the unsubscribe URL. If this property is used, it will override both the `text` and `html` properties. The URL of the link will be placed at the substitution tag's location in the message body with no additional formatting. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/model_content_encoding.go b/rest/api/v3/mail/model_content_encoding.go new file mode 100644 index 00000000..5f356d2c --- /dev/null +++ b/rest/api/v3/mail/model_content_encoding.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContentEncoding the model 'ContentEncoding' +type ContentEncoding string + +// List of ContentEncoding +const ( + CONTENTENCODING_GZIP ContentEncoding = "gzip" +) diff --git a/rest/api/v3/mail/model_disposition.go b/rest/api/v3/mail/model_disposition.go new file mode 100644 index 00000000..ca013977 --- /dev/null +++ b/rest/api/v3/mail/model_disposition.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Disposition the model 'Disposition' +type Disposition string + +// List of Disposition +const ( + DISPOSITION_INLINE Disposition = "inline" + DISPOSITION_ATTACHMENT Disposition = "attachment" +) diff --git a/rest/api/v3/mail/model_error_response.go b/rest/api/v3/mail/model_error_response.go new file mode 100644 index 00000000..e74c4c35 --- /dev/null +++ b/rest/api/v3/mail/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/mail/model_error_response_errors_inner.go b/rest/api/v3/mail/model_error_response_errors_inner.go new file mode 100644 index 00000000..d73b63c2 --- /dev/null +++ b/rest/api/v3/mail/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/mail/model_mail_batch_response.go b/rest/api/v3/mail/model_mail_batch_response.go new file mode 100644 index 00000000..5c4311c1 --- /dev/null +++ b/rest/api/v3/mail/model_mail_batch_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// MailBatchResponse struct for MailBatchResponse +type MailBatchResponse struct { + // A mail batch ID. + BatchId *string `json:"batch_id,omitempty"` +} diff --git a/rest/api/v3/mail/model_mail_from.go b/rest/api/v3/mail/model_mail_from.go new file mode 100644 index 00000000..e055fe14 --- /dev/null +++ b/rest/api/v3/mail/model_mail_from.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// MailFrom struct for MailFrom +type MailFrom struct { + // The email address from which messages are sent. This address should be a verified sender in your Twilio SendGrid account. Email addresses specified in `personalizations` will override addresses set at the message level outside of the `personalizations` object. + Email string `json:"email"` + // A name or title associated with the email address such as \"Support\" or \"Alex\". + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/mail/model_mail_to.go b/rest/api/v3/mail/model_mail_to.go new file mode 100644 index 00000000..e0b3d749 --- /dev/null +++ b/rest/api/v3/mail/model_mail_to.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// MailTo struct for MailTo +type MailTo struct { + // An email address to which a message is sent. Email addresses specified in `personalizations` will override addresses set at the message level outside of the `personalizations` object. + Email string `json:"email"` + // A name or title associated with the email address such as \"Alex\". + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request.go b/rest/api/v3/mail/model_send_mail_request.go new file mode 100644 index 00000000..224118e1 --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request.go @@ -0,0 +1,47 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequest struct for SendMailRequest +type SendMailRequest struct { + // An array of messages and their metadata. Each object within the `personalizations` array can be thought of as a mail envelope—it defines who should receive an individual message and how that message should be handled. See [**Personalizations**](https://sendgrid.com/docs/for-developers/sending-email/personalizations/) for more information. + Personalizations []SendMailRequestPersonalizationsInner `json:"personalizations"` + From MailFrom `json:"from"` + ReplyTo *MailTo `json:"reply_to,omitempty"` + // An array of recipients to whom replies will be sent. Each object in this array must contain a recipient's email address. Each object in the array may optionally contain a recipient's name. You can use either the `reply_to` property or `reply_to_list` property but not both. + ReplyToList *[]MailTo `json:"reply_to_list,omitempty"` + // The global or _message level_ subject of your email. Subject lines set in personalizations objects will override this global subject line. See line length limits specified in [RFC 2822](https://www.rfc-editor.org/rfc/rfc2822#section-2.1.1) for guidance on subject line character limits. + Subject *string `json:"subject,omitempty"` + // An array of objects, each containing a message body's content and [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types). You must specify at least one MIME type and may include multiple. To include more than one MIME type, add an object for each type to the array. + Content *[]SendMailRequestContentInner `json:"content,omitempty"` + // An array of objects where you can define any attachments to be included with the message. Each object contains a `content` property, which must be a Base64 encoded string of the attachment itself, and `type`, `filename`, `disposition`, and `content_id` properties that tell SendGrid how to handle the attachment. + Attachments *[]SendMailRequestAttachmentsInner `json:"attachments,omitempty"` + // An email template ID. A template that contains a subject and content—either text or html—will override any subject and content values specified at the `personalizations` or message level. If a template ID begins with `d-`, it is a dynamic template and will work with the `dynamic_template_data` property. If the template ID does not begin with `d-`, it is a standard SendGrid template and will work with the `substitutions` property. See [**How to Send an Email with Dynamic Templates**](https://docs.sendgrid.com/ui/sending-email/how-to-send-an-email-with-dynamic-templates) for more information about working with templates. + TemplateId *string `json:"template_id,omitempty"` + // A collection of JSON property name and property value pairs allowing you to specify handling instructions for your email. You may not override the following headers: `x-sg-id`, `x-sg-eid`, `received`, `dkim-signature`, `Content-Type`, `Content-Transfer-Encoding`, `To`, `From`, `Subject`, `Reply-To`, `CC`, `BCC`. + Headers *map[string]interface{} `json:"headers,omitempty"` + // An array of category names assigned to this message. Categories allow you to group messages by categories you define. Categories should be used sparingly to create general groups that are relevant to you. Categories are not meant to be used to track individual mail sends. For more granular categorization and tracking, use the `custom_args` property. A category name cannot exceed 255 characters. See [**Working with Categories**](https://docs.sendgrid.com/for-developers/sending-email/categories) for more information. + Categories *[]string `json:"categories,omitempty"` + // Values that are specific to the entire send that will be carried along with the email and its activity data. Substitutions will not be made on custom arguments, so any string that is assigned to this property will be assumed to be the custom argument that you would like to be used. This parameter is overridden by `custom_args` set at the personalizations level. Total `custom_args` size may not exceed 10,000 bytes. + CustomArgs *string `json:"custom_args,omitempty"` + // A [unix timestamp](https://en.wikipedia.org/wiki/Unix_time) allowing you to specify when your email should be sent. A send cannot be scheduled more than 72 hours in advance. This property may be overridden by the `send_at` property set at the personalizations level. + SendAt *int32 `json:"send_at,omitempty"` + // An ID representing a batch of emails to be sent at the same time. Including a `batch_id` in your request allows you to include this email in that batch. It also enables you to cancel or pause the delivery of that batch. See the [Scheduled Sends API](https://sendgrid.com/docs/api-reference/) for more information about scheduling your email. + BatchId *string `json:"batch_id,omitempty"` + Asm *SendMailRequestAsm `json:"asm,omitempty"` + // The IP Pool that you would like to send this email from. IP Pools allow you to group your dedicated Twilio SendGrid IP addresses in order to have more control over your deliverability. See [**IP Pools**](https://docs.sendgrid.com/ui/account-and-settings/ip-pools) for more information. + IpPoolName *string `json:"ip_pool_name,omitempty"` + MailSettings *SendMailRequestMailSettings `json:"mail_settings,omitempty"` + TrackingSettings *SendMailRequestTrackingSettings `json:"tracking_settings,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_asm.go b/rest/api/v3/mail/model_send_mail_request_asm.go new file mode 100644 index 00000000..7d2afe19 --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_asm.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestAsm An object allowing you to specify how to handle unsubscribes. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. See [**Suppression Groups**](https://www.twilio.com/docs/sendgrid/api-reference/suppressions-unsubscribe-groups/create-a-new-suppression-group) for more information. +type SendMailRequestAsm struct { + // The unsubscribe group to associate with this email. See the [Suppressions API](https://docs.sendgrid.com/api-reference/suppressions/) to manage unsubscribe group IDs. + GroupId int32 `json:"group_id"` + // An array containing the unsubscribe groups that you would like to be displayed to a recipient on the unsubscribe preferences page. This page is displayed in the recipient's browser when they click the unsubscribe link in your message. + GroupsToDisplay *[]int32 `json:"groups_to_display,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_attachments_inner.go b/rest/api/v3/mail/model_send_mail_request_attachments_inner.go new file mode 100644 index 00000000..9c39ef33 --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_attachments_inner.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestAttachmentsInner struct for SendMailRequestAttachmentsInner +type SendMailRequestAttachmentsInner struct { + // The Base64 encoded content of the attachment. + Content string `json:"content"` + // The MIME type of the content you are attaching (e.g., `image/jpeg` or `application/pdf`). + Type *string `json:"type,omitempty"` + // The attachment's filename, including the file extension. + Filename string `json:"filename"` + // The attachment's content-disposition specifies how you would like the attachment to be displayed. For example, `inline` results in the attached file being displayed automatically within the message while `attachment` results in the attached file requiring some action to be taken before it is displayed such as opening or downloading the file. + Disposition *Disposition `json:"disposition,omitempty"` + // The attachment's content ID. The `content_id` is used when the `disposition` is set to `inline` and the attachment is an image, allowing the file to be displayed within the body of the email. + ContentId *string `json:"content_id,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_content_inner.go b/rest/api/v3/mail/model_send_mail_request_content_inner.go new file mode 100644 index 00000000..e5377596 --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_content_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestContentInner struct for SendMailRequestContentInner +type SendMailRequestContentInner struct { + // The MIME type of the content assigned in the `value` property of this object (e.g., `text/plain` or `text/html`). + Type string `json:"type"` + // The content of your message in the specified MIME type assigned in the `type` property of this object. + Value string `json:"value"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_mail_settings.go b/rest/api/v3/mail/model_send_mail_request_mail_settings.go new file mode 100644 index 00000000..b1ecabc9 --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_mail_settings.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestMailSettings A collection of different mail settings that you can use to specify how you would like this email to be handled. Mail settings provide extra functionality to your mail send. See [**Mail Settings**](https://docs.sendgrid.com/ui/account-and-settings/mail) for more information. +type SendMailRequestMailSettings struct { + BypassListManagement *SendMailRequestMailSettingsBypassListManagement `json:"bypass_list_management,omitempty"` + BypassSpamManagement *SendMailRequestMailSettingsBypassSpamManagement `json:"bypass_spam_management,omitempty"` + BypassBounceManagement *SendMailRequestMailSettingsBypassBounceManagement `json:"bypass_bounce_management,omitempty"` + BypassUnsubscribeManagement *SendMailRequestMailSettingsBypassUnsubscribeManagement `json:"bypass_unsubscribe_management,omitempty"` + Footer *SendMailRequestMailSettingsFooter `json:"footer,omitempty"` + SandboxMode *SendMailRequestMailSettingsSandboxMode `json:"sandbox_mode,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_bounce_management.go b/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_bounce_management.go new file mode 100644 index 00000000..7eb6b77e --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_bounce_management.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestMailSettingsBypassBounceManagement Allows you to bypass the bounce list to ensure that the email is delivered to recipients. Spam report and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the `bypass_list_management` filter. See the [the \"Bypass suppressions\" section of our **Suppressions Overview**](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters. +type SendMailRequestMailSettingsBypassBounceManagement struct { + // Indicates if this setting is enabled. + Enable *bool `json:"enable,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_list_management.go b/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_list_management.go new file mode 100644 index 00000000..c838c86b --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_list_management.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestMailSettingsBypassListManagement Allows you to bypass all unsubscribe groups and suppressions to ensure that the email is delivered to every single recipient. This should only be used in emergencies when it is absolutely necessary that every recipient receives your email. This filter cannot be combined with any other bypass filters. See the [the \"Bypass suppressions\" section of our **Suppressions Overview**](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters. +type SendMailRequestMailSettingsBypassListManagement struct { + // Indicates if this setting is enabled. + Enable *bool `json:"enable,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_spam_management.go b/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_spam_management.go new file mode 100644 index 00000000..0a81e09a --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_spam_management.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestMailSettingsBypassSpamManagement Allows you to bypass the spam report list to ensure that the email is delivered to recipients. Bounce and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the `bypass_list_management` filter. See the [the \"Bypass suppressions\" section of our **Suppressions Overview**](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters. +type SendMailRequestMailSettingsBypassSpamManagement struct { + // Indicates if this setting is enabled. + Enable *bool `json:"enable,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_unsubscribe_management.go b/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_unsubscribe_management.go new file mode 100644 index 00000000..b4990d41 --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_unsubscribe_management.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestMailSettingsBypassUnsubscribeManagement Allows you to bypass the global unsubscribe list to ensure that the email is delivered to recipients. Bounce and spam report lists will still be checked; addresses on these other lists will not receive the message. This filter applies only to global unsubscribes and will not bypass group unsubscribes. This filter cannot be combined with the `bypass_list_management` filter. See the [the \"Bypass suppressions\" section of our **Suppressions Overview**](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters. +type SendMailRequestMailSettingsBypassUnsubscribeManagement struct { + // Indicates if this setting is enabled. + Enable *bool `json:"enable,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_mail_settings_footer.go b/rest/api/v3/mail/model_send_mail_request_mail_settings_footer.go new file mode 100644 index 00000000..b0fa2858 --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_mail_settings_footer.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestMailSettingsFooter Inserts a custom footer at the bottom of the text and HTML bodies of your messages. Use the `html` and `text` properties to include the content of the footers to be inserted. +type SendMailRequestMailSettingsFooter struct { + // Indicates if this setting is enabled. + Enable *bool `json:"enable,omitempty"` + // The plain text content of your footer. + Text *string `json:"text,omitempty"` + // The HTML content of your footer. + Html *string `json:"html,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_mail_settings_sandbox_mode.go b/rest/api/v3/mail/model_send_mail_request_mail_settings_sandbox_mode.go new file mode 100644 index 00000000..f69f6280 --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_mail_settings_sandbox_mode.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestMailSettingsSandboxMode Sandbox Mode allows you to send a test email to ensure that your request body is valid and formatted correctly. +type SendMailRequestMailSettingsSandboxMode struct { + // Indicates if this setting is enabled. + Enable *bool `json:"enable,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_personalizations_inner.go b/rest/api/v3/mail/model_send_mail_request_personalizations_inner.go new file mode 100644 index 00000000..ebcbc7d5 --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_personalizations_inner.go @@ -0,0 +1,37 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestPersonalizationsInner struct for SendMailRequestPersonalizationsInner +type SendMailRequestPersonalizationsInner struct { + From *MailFrom `json:"from,omitempty"` + // An array of recipients to whom the email will be sent. Each object in this array must contain a recipient's email address. Each object in the array may optionally contain a recipient's name. + To []MailTo `json:"to"` + // An array of recipients to whom a copy of the email will be sent. Each object in this array must contain a recipient's email address. Each object in the array may optionally contain a recipient's name. + Cc *[]MailTo `json:"cc,omitempty"` + // An array of recipients to whom a blind carbon copy of your email will be sent. Each object in this array must contain a recipient's email address. Each object in the array may optionally contain a recipient's name. + Bcc *[]MailTo `json:"bcc,omitempty"` + // The subject of your email. See line length limits specified in [RFC 2822](https://www.rfc-editor.org/rfc/rfc2822#section-2.1.1) for guidance on subject line character limits. + Subject *string `json:"subject,omitempty"` + // A collection of JSON property name and property value pairs allowing you to specify handling instructions for your email. You may not override the following headers: `x-sg-id`, `x-sg-eid`, `received`, `dkim-signature`, `Content-Type`, `Content-Transfer-Encoding`, `To`, `From`, `Subject`, `Reply-To`, `CC`, `BCC`. + Headers *map[string]interface{} `json:"headers,omitempty"` + // A collection property names that will be substituted by their corresponding property values in the `subject`, `reply-to` and `content` portions of your message. Name and value pairs follow the pattern `\"substitution_tag\":\"value to substitute\"`. The total collective size of your substitutions may not exceed 10,000 bytes per personalization object. Substitutions allow you to insert data without using SendGrid's Dynamic Templates. This property should not be used in combination with a Dynamic Template, which can be identified by a `template_id` starting with `d-`. See [**Substitution Tags**](https://docs.sendgrid.com/for-developers/sending-email/substitution-tags) for more information. + Substitutions *map[string]string `json:"substitutions,omitempty"` + // A collection property names that will be substituted by their corresponding property values in the `subject`, `reply-to` and `content` portions of a SendGrid Dynamic Template. Dynamic template data is available in a template using [Handlebars](https://docs.sendgrid.com/for-developers/sending-email/using-handlebars) syntax. This property should be used in combination with a Dynamic Template, which can be identified by a `template_id` starting with `d-`. See [**How to Send an Email with Dynamic Templates**](https://docs.sendgrid.com/ui/sending-email/how-to-send-an-email-with-dynamic-templates) for more information. + DynamicTemplateData *map[string]interface{} `json:"dynamic_template_data,omitempty"` + // Values that are specific to this personalization that will be carried along with the email and its activity data. Substitutions will not be made on custom arguments, so any string that is assigned to this property will be assumed to be the custom argument that you would like to be used. This field may not exceed 10,000 bytes. + CustomArgs *map[string]interface{} `json:"custom_args,omitempty"` + // A [unix timestamp](https://en.wikipedia.org/wiki/Unix_time) allowing you to specify when your email should be sent. A send cannot be scheduled more than 72 hours in advance. + SendAt *int32 `json:"send_at,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_tracking_settings.go b/rest/api/v3/mail/model_send_mail_request_tracking_settings.go new file mode 100644 index 00000000..70621f0e --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_tracking_settings.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestTrackingSettings Settings to determine how you would like to track the metrics of how your recipients interact with your email. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +type SendMailRequestTrackingSettings struct { + ClickTracking *SendMailRequestTrackingSettingsClickTracking `json:"click_tracking,omitempty"` + OpenTracking *SendMailRequestTrackingSettingsOpenTracking `json:"open_tracking,omitempty"` + SubscriptionTracking *SendMailRequestTrackingSettingsSubscriptionTracking `json:"subscription_tracking,omitempty"` + Ganalytics *SendMailRequestTrackingSettingsGanalytics `json:"ganalytics,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_tracking_settings_click_tracking.go b/rest/api/v3/mail/model_send_mail_request_tracking_settings_click_tracking.go new file mode 100644 index 00000000..6c9c7e17 --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_tracking_settings_click_tracking.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestTrackingSettingsClickTracking Allows you to track if a recipient clicked a link in your email. +type SendMailRequestTrackingSettingsClickTracking struct { + // Indicates if this setting is enabled. + Enable *bool `json:"enable,omitempty"` + // Indicates if this setting should be included in the `text/plain` portion of your email. + EnableText *bool `json:"enable_text,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_tracking_settings_ganalytics.go b/rest/api/v3/mail/model_send_mail_request_tracking_settings_ganalytics.go new file mode 100644 index 00000000..d3533334 --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_tracking_settings_ganalytics.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestTrackingSettingsGanalytics Allows you to enable tracking provided by Google Analytics. See [**Google Analytics and SendGrid Statistics**](https://docs.sendgrid.com/ui/analytics-and-reporting/google-analytics) for more information about this property. +type SendMailRequestTrackingSettingsGanalytics struct { + // Indicates if this setting is enabled. + Enable *bool `json:"enable,omitempty"` + // Name of the referrer source. (e.g., Google, SomeDomain.com, or Marketing Email) + UtmSource *string `json:"utm_source,omitempty"` + // Name of the marketing medium. (e.g., Email) + UtmMedium *string `json:"utm_medium,omitempty"` + // Used to identify any paid keywords. + UtmTerm *string `json:"utm_term,omitempty"` + // Used to differentiate your campaign from advertisements. + UtmContent *string `json:"utm_content,omitempty"` + // The name of the campaign. + UtmCampaign *string `json:"utm_campaign,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_tracking_settings_open_tracking.go b/rest/api/v3/mail/model_send_mail_request_tracking_settings_open_tracking.go new file mode 100644 index 00000000..90d6421e --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_tracking_settings_open_tracking.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestTrackingSettingsOpenTracking Allows you to track if the email was opened by including a single transparent pixel image in the body of the message content. When the message is opened, a request for the pixel is sent. That request indicates to Twilio SendGrid that the message was opened. +type SendMailRequestTrackingSettingsOpenTracking struct { + // Indicates if this setting is enabled. + Enable *bool `json:"enable,omitempty"` + // Allows you to specify a substitution tag that you can insert in the body of your email at a location that you desire. This tag will be replaced by the open tracking pixel. + SubstitutionTag *string `json:"substitution_tag,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_tracking_settings_subscription_tracking.go b/rest/api/v3/mail/model_send_mail_request_tracking_settings_subscription_tracking.go new file mode 100644 index 00000000..be8695e1 --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_tracking_settings_subscription_tracking.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestTrackingSettingsSubscriptionTracking Allows you to insert a subscription management link at the bottom of the text and HTML bodies of your email. If you would like to specify the location of the link within your email, you may use the `substitution_tag` property. +type SendMailRequestTrackingSettingsSubscriptionTracking struct { + // Indicates if this setting is enabled. + Enable *bool `json:"enable,omitempty"` + // Text to be appended to the email with the subscription tracking link. + Text *string `json:"text,omitempty"` + // HTML to be appended to the email with the subscription tracking link. + Html *string `json:"html,omitempty"` + // A tag that will be replaced with the unsubscribe URL. If this property is used, it will override both the `text` and `html` properties. The URL of the link will be placed at the substitution tag's location in the message body with no additional formatting. + SubstitutionTag *string `json:"substitution_tag,omitempty"` +} diff --git a/rest/api/v3/mail_settings/.openapi-generator b/rest/api/v3/mail_settings/.openapi-generator new file mode 100644 index 00000000..08f7a39b --- /dev/null +++ b/rest/api/v3/mail_settings/.openapi-generator @@ -0,0 +1,52 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_list_address_whitelist.go +api_list_bounce_purge.go +api_list_footer.go +api_list_forward_bounce.go +api_list_forward_spam.go +api_list_mail_setting.go +api_list_template.go +api_service.go +api_update_address_whitelist.go +api_update_bounce_purge.go +api_update_footer.go +api_update_forward_bounce.go +api_update_forward_spam.go +api_update_template.go +docs/ListAddressWhitelist.md +docs/ListBouncePurge.md +docs/ListFooter.md +docs/ListForwardBounce.md +docs/ListForwardSpam.md +docs/ListMailSetting.md +docs/ListMailSetting200Response.md +docs/ListMailSetting200ResponseResultInner.md +docs/ListTemplate.md +docs/MailSettingsAddressWhitelabel200.md +docs/MailSettingsBouncePurge.md +docs/MailSettingsFooter.md +docs/MailSettingsForwardBounce.md +docs/MailSettingsForwardSpam.md +docs/MailSettingsTemplate200.md +docs/UpdateAddressWhitelist.md +docs/UpdateAddressWhitelistRequest.md +docs/UpdateBouncePurge.md +docs/UpdateFooter.md +docs/UpdateForwardBounce.md +docs/UpdateForwardSpam.md +docs/UpdateTemplate.md +docs/UpdateTemplate200Response.md +docs/UpdateTemplateRequest.md +model_list_mail_setting_200_response.go +model_list_mail_setting_200_response_result_inner.go +model_mail_settings_address_whitelabel200.go +model_mail_settings_bounce_purge.go +model_mail_settings_footer.go +model_mail_settings_forward_bounce.go +model_mail_settings_forward_spam.go +model_mail_settings_template200.go +model_update_address_whitelist_request.go +model_update_template_200_response.go +model_update_template_request.go diff --git a/rest/api/v3/mail_settings/.openapi-generator-ignore b/rest/api/v3/mail_settings/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/mail_settings/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/mail_settings/README.md b/rest/api/v3/mail_settings/README.md new file mode 100644 index 00000000..3bb27e29 --- /dev/null +++ b/rest/api/v3/mail_settings/README.md @@ -0,0 +1,86 @@ +# Go API client for + +The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. + +For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). + +You can also manage your Mail Settings in the Twilio SendGrid application user interface. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:44.028733+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ListAddressWhitelist* | [**ListAddressWhitelist**](docs/ListAddressWhitelist.md#listaddresswhitelist) | **Get** /v3/mail_settings/address_whitelist | Retrieve address whitelist mail settings +*ListBouncePurge* | [**ListBouncePurge**](docs/ListBouncePurge.md#listbouncepurge) | **Get** /v3/mail_settings/bounce_purge | Retrieve bounce purge mail settings +*ListFooter* | [**ListFooter**](docs/ListFooter.md#listfooter) | **Get** /v3/mail_settings/footer | Retrieve footer mail settings +*ListForwardBounce* | [**ListForwardBounce**](docs/ListForwardBounce.md#listforwardbounce) | **Get** /v3/mail_settings/forward_bounce | Retrieve forward bounce mail settings +*ListForwardSpam* | [**ListForwardSpam**](docs/ListForwardSpam.md#listforwardspam) | **Get** /v3/mail_settings/forward_spam | Retrieve forward spam mail settings +*ListMailSetting* | [**ListMailSetting**](docs/ListMailSetting.md#listmailsetting) | **Get** /v3/mail_settings | Retrieve all mail settings +*ListTemplate* | [**ListTemplate**](docs/ListTemplate.md#listtemplate) | **Get** /v3/mail_settings/template | Retrieve legacy template mail settings +*UpdateAddressWhitelist* | [**UpdateAddressWhitelist**](docs/UpdateAddressWhitelist.md#updateaddresswhitelist) | **Patch** /v3/mail_settings/address_whitelist | Update address whitelist mail settings +*UpdateBouncePurge* | [**UpdateBouncePurge**](docs/UpdateBouncePurge.md#updatebouncepurge) | **Patch** /v3/mail_settings/bounce_purge | Update bounce purge mail settings +*UpdateFooter* | [**UpdateFooter**](docs/UpdateFooter.md#updatefooter) | **Patch** /v3/mail_settings/footer | Update footer mail settings +*UpdateForwardBounce* | [**UpdateForwardBounce**](docs/UpdateForwardBounce.md#updateforwardbounce) | **Patch** /v3/mail_settings/forward_bounce | Update forward bounce mail settings +*UpdateForwardSpam* | [**UpdateForwardSpam**](docs/UpdateForwardSpam.md#updateforwardspam) | **Patch** /v3/mail_settings/forward_spam | Update forward spam mail settings +*UpdateTemplate* | [**UpdateTemplate**](docs/UpdateTemplate.md#updatetemplate) | **Patch** /v3/mail_settings/template | Update template mail settings + + +## Documentation For Models + + - [ListMailSetting200Response](ListMailSetting200Response.md) + - [ListMailSetting200ResponseResultInner](ListMailSetting200ResponseResultInner.md) + - [MailSettingsAddressWhitelabel200](MailSettingsAddressWhitelabel200.md) + - [MailSettingsBouncePurge](MailSettingsBouncePurge.md) + - [MailSettingsFooter](MailSettingsFooter.md) + - [MailSettingsForwardBounce](MailSettingsForwardBounce.md) + - [MailSettingsForwardSpam](MailSettingsForwardSpam.md) + - [MailSettingsTemplate200](MailSettingsTemplate200.md) + - [UpdateAddressWhitelistRequest](UpdateAddressWhitelistRequest.md) + - [UpdateTemplate200Response](UpdateTemplate200Response.md) + - [UpdateTemplateRequest](UpdateTemplateRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/mail_settings/api_list_address_whitelist.go b/rest/api/v3/mail_settings/api_list_address_whitelist.go new file mode 100644 index 00000000..13dade03 --- /dev/null +++ b/rest/api/v3/mail_settings/api_list_address_whitelist.go @@ -0,0 +1,58 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListAddressWhitelistParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListAddressWhitelistParam) SetOnbehalfof(Onbehalfof string) *ListAddressWhitelistParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve your current email address whitelist settings.** The Address Whitelist setting allows you to specify email addresses or domains for which mail should never be suppressed. For example, if you own the domain `example.com`, and one or more of your recipients use `email@example.com` addresses, placing `example.com` in the address whitelist setting instructs Twilio SendGrid to ignore all bounces, blocks, and unsubscribes logged for that domain. In other words, all bounces, blocks, and unsubscribes will still be sent to `example.com` as if they were sent under normal sending conditions. +func (c *ApiService) ListAddressWhitelist(params *ListAddressWhitelistParam) (interface{}, error) { + path := "/v3/mail_settings/address_whitelist" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &MailSettingsAddressWhitelabel200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mail_settings/api_list_bounce_purge.go b/rest/api/v3/mail_settings/api_list_bounce_purge.go new file mode 100644 index 00000000..c1611625 --- /dev/null +++ b/rest/api/v3/mail_settings/api_list_bounce_purge.go @@ -0,0 +1,58 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListBouncePurgeParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListBouncePurgeParam) SetOnbehalfof(Onbehalfof string) *ListBouncePurgeParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve your current bounce and purge settings.** The Bounce Perge setting allows you to set a schedule that Twilio SendGrid will use to automatically delete contacts from your soft and hard bounce suppression lists. A hard bounce occurs when an email message has been returned to the sender because the recipient's address is invalid. A hard bounce might occur because the domain name doesn't exist or because the recipient is unknown. A soft bounce occurs when an email message reaches the recipient's mail server but is bounced back undelivered before it actually reaches the recipient. A soft bounce might occur because the recipient's inbox is full. You can also manage this setting in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). You can manage your bounces manually using the [Bounces API](https://docs.sendgrid.com/api-reference/bounces-api) or the [Bounces menu in the Twilio SendGrid App](https://app.sendgrid.com/suppressions/bounces). +func (c *ApiService) ListBouncePurge(params *ListBouncePurgeParam) (interface{}, error) { + path := "/v3/mail_settings/bounce_purge" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &MailSettingsBouncePurge{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mail_settings/api_list_footer.go b/rest/api/v3/mail_settings/api_list_footer.go new file mode 100644 index 00000000..d1c8cab0 --- /dev/null +++ b/rest/api/v3/mail_settings/api_list_footer.go @@ -0,0 +1,58 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListFooterParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListFooterParam) SetOnbehalfof(Onbehalfof string) *ListFooterParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve your current Footer mail settings.** The Footer setting will insert a custom footer at the bottom of your text and HTML email message bodies. You can insert your HTML or plain text directly using the \"Update footer mail settings\" endpoint, or you can create the footer using the [Mail Settings menu in the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). +func (c *ApiService) ListFooter(params *ListFooterParam) (interface{}, error) { + path := "/v3/mail_settings/footer" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &MailSettingsFooter{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mail_settings/api_list_forward_bounce.go b/rest/api/v3/mail_settings/api_list_forward_bounce.go new file mode 100644 index 00000000..b6113625 --- /dev/null +++ b/rest/api/v3/mail_settings/api_list_forward_bounce.go @@ -0,0 +1,58 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListForwardBounceParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListForwardBounceParam) SetOnbehalfof(Onbehalfof string) *ListForwardBounceParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve your current bounce forwarding mail settings.** Enabling the Forward Bounce setting allows you to specify `email` addresses to which bounce reports will be forwarded. This endpoint returns the email address you have set to receive forwarded bounces and an `enabled` status indicating if the setting is active. +func (c *ApiService) ListForwardBounce(params *ListForwardBounceParam) (interface{}, error) { + path := "/v3/mail_settings/forward_bounce" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &MailSettingsForwardBounce{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mail_settings/api_list_forward_spam.go b/rest/api/v3/mail_settings/api_list_forward_spam.go new file mode 100644 index 00000000..c8fb14ac --- /dev/null +++ b/rest/api/v3/mail_settings/api_list_forward_spam.go @@ -0,0 +1,58 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListForwardSpamParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListForwardSpamParam) SetOnbehalfof(Onbehalfof string) *ListForwardSpamParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve your current Forward Spam mail settings.** Enabling the Forward Spam setting allows you to specify `email` addresses to which spam reports will be forwarded. This endpoint returns any email address(es) you have set to receive forwarded spam and an `enabled` status indicating if the setting is active. +func (c *ApiService) ListForwardSpam(params *ListForwardSpamParam) (interface{}, error) { + path := "/v3/mail_settings/forward_spam" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &MailSettingsForwardSpam{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mail_settings/api_list_mail_setting.go b/rest/api/v3/mail_settings/api_list_mail_setting.go new file mode 100644 index 00000000..25a5b6e1 --- /dev/null +++ b/rest/api/v3/mail_settings/api_list_mail_setting.go @@ -0,0 +1,78 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListMailSettingParam struct { + // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. + Limit *int32 `json:"limit,omitempty"` + // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + Offset *int32 `json:"offset,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListMailSettingParam) SetLimit(Limit int32) *ListMailSettingParam { + params.Limit = &Limit + return params +} +func (params *ListMailSettingParam) SetOffset(Offset int32) *ListMailSettingParam { + params.Offset = &Offset + return params +} +func (params *ListMailSettingParam) SetOnbehalfof(Onbehalfof string) *ListMailSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a paginated list of all mail settings.** Each setting will be returned with an `enabled` status set to `true` or `false` and a short description that explains what the setting does. You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. +func (c *ApiService) ListMailSetting(params *ListMailSettingParam) (interface{}, error) { + path := "/v3/mail_settings" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListMailSetting200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mail_settings/api_list_template.go b/rest/api/v3/mail_settings/api_list_template.go new file mode 100644 index 00000000..76783e88 --- /dev/null +++ b/rest/api/v3/mail_settings/api_list_template.go @@ -0,0 +1,58 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListTemplateParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListTemplateParam) SetOnbehalfof(Onbehalfof string) *ListTemplateParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve your current legacy email template settings.** This setting refers to our original email templates. We currently support more fully featured [Dynamic Transactional Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/). The legacy email template setting wraps an HTML template around your email content. This can be useful for sending out marketing email and/or other HTML formatted messages. For instructions on using legacy templates, see how to [\"Create and Edit Legacy Transactional Templates](https://sendgrid.com/docs/ui/sending-email/create-and-edit-legacy-transactional-templates/). For help migrating to our current template system, see [\"Migrating from Legacy Templates\"](https://sendgrid.com/docs/ui/sending-email/migrating-from-legacy-templates/). +func (c *ApiService) ListTemplate(params *ListTemplateParam) (interface{}, error) { + path := "/v3/mail_settings/template" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &MailSettingsTemplate200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mail_settings/api_service.go b/rest/api/v3/mail_settings/api_service.go new file mode 100644 index 00000000..e9a35ea3 --- /dev/null +++ b/rest/api/v3/mail_settings/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/mail_settings/api_update_address_whitelist.go b/rest/api/v3/mail_settings/api_update_address_whitelist.go new file mode 100644 index 00000000..9c9381f7 --- /dev/null +++ b/rest/api/v3/mail_settings/api_update_address_whitelist.go @@ -0,0 +1,73 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type UpdateAddressWhitelistParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateAddressWhitelistRequest *UpdateAddressWhitelistRequest `json:"UpdateAddressWhitelistRequest,omitempty"` +} + +func (params *UpdateAddressWhitelistParam) SetOnbehalfof(Onbehalfof string) *UpdateAddressWhitelistParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateAddressWhitelistParam) SetUpdateAddressWhitelistRequest(UpdateAddressWhitelistRequest UpdateAddressWhitelistRequest) *UpdateAddressWhitelistParam { + params.UpdateAddressWhitelistRequest = &UpdateAddressWhitelistRequest + return params +} + +// **This endpoint allows you to update your current email address whitelist settings.** You can select whether or not this setting should be enabled by assigning the `enabled` field a `true` or `false` value. Passing only the `enabled` field to this endpoint will not alter your current `list` of whitelist entries. However, any modifications to your `list` of entries will overwrite the entire list. For this reason, you must included all existing entries you wish to retain in your `list` in addition to any new entries you intend to add. To remove one or more `list` entries, pass a `list` with only the entries you wish to retain. You should not add generic domains such as `gmail.com` or `yahoo.com` in your `list` because your emails will not honor recipients' unsubscribes. This may cause a legal violation of [CAN-SPAM](https://sendgrid.com/docs/glossary/can-spam/) and could damage your sending reputation. The Address Whitelist setting allows you to specify email addresses or domains for which mail should never be suppressed. For example, if you own the domain `example.com`, and one or more of your recipients use `email@example.com` addresses, placing `example.com` in the address whitelist setting instructs Twilio SendGrid to ignore all bounces, blocks, and unsubscribes logged for that domain. In other words, all bounces, blocks, and unsubscribes will still be sent to `example.com` as if they were sent under normal sending conditions. +func (c *ApiService) UpdateAddressWhitelist(params *UpdateAddressWhitelistParam) (interface{}, error) { + path := "/v3/mail_settings/address_whitelist" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateAddressWhitelistRequest != nil { + b, err := json.Marshal(*params.UpdateAddressWhitelistRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &MailSettingsAddressWhitelabel200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mail_settings/api_update_bounce_purge.go b/rest/api/v3/mail_settings/api_update_bounce_purge.go new file mode 100644 index 00000000..8f99dbe9 --- /dev/null +++ b/rest/api/v3/mail_settings/api_update_bounce_purge.go @@ -0,0 +1,73 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type UpdateBouncePurgeParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + MailSettingsBouncePurge *MailSettingsBouncePurge `json:"MailSettingsBouncePurge,omitempty"` +} + +func (params *UpdateBouncePurgeParam) SetOnbehalfof(Onbehalfof string) *UpdateBouncePurgeParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateBouncePurgeParam) SetMailSettingsBouncePurge(MailSettingsBouncePurge MailSettingsBouncePurge) *UpdateBouncePurgeParam { + params.MailSettingsBouncePurge = &MailSettingsBouncePurge + return params +} + +// **This endpoint allows you to update your current bounce and purge settings.** The Bounce Perge setting allows you to set a schedule that Twilio SendGrid will use to automatically delete contacts from your soft and hard bounce suppression lists. The schedule is set in full days by assigning the number of days, an integer, to the `soft_bounces` and/or `hard_bounces` fields. A hard bounce occurs when an email message has been returned to the sender because the recipient's address is invalid. A hard bounce might occur because the domain name doesn't exist or because the recipient is unknown. A soft bounce occurs when an email message reaches the recipient's mail server but is bounced back undelivered before it actually reaches the recipient. A soft bounce might occur because the recipient's inbox is full. You can also manage this setting in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). You can manage your bounces manually using the [Bounces API](https://docs.sendgrid.com/api-reference/bounces-api) or the [Bounces menu in the Twilio SendGrid App](https://app.sendgrid.com/suppressions/bounces). +func (c *ApiService) UpdateBouncePurge(params *UpdateBouncePurgeParam) (interface{}, error) { + path := "/v3/mail_settings/bounce_purge" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.MailSettingsBouncePurge != nil { + b, err := json.Marshal(*params.MailSettingsBouncePurge) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &MailSettingsBouncePurge{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mail_settings/api_update_footer.go b/rest/api/v3/mail_settings/api_update_footer.go new file mode 100644 index 00000000..32551254 --- /dev/null +++ b/rest/api/v3/mail_settings/api_update_footer.go @@ -0,0 +1,73 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type UpdateFooterParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + MailSettingsFooter *MailSettingsFooter `json:"MailSettingsFooter,omitempty"` +} + +func (params *UpdateFooterParam) SetOnbehalfof(Onbehalfof string) *UpdateFooterParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateFooterParam) SetMailSettingsFooter(MailSettingsFooter MailSettingsFooter) *UpdateFooterParam { + params.MailSettingsFooter = &MailSettingsFooter + return params +} + +// **This endpoint allows you to update your current Footer mail settings.** The Footer setting will insert a custom footer at the bottom of your text and HTML email message bodies. You can insert your HTML or plain text directly using this endpoint, or you can create the footer using the [Mail Settings menu in the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). +func (c *ApiService) UpdateFooter(params *UpdateFooterParam) (interface{}, error) { + path := "/v3/mail_settings/footer" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.MailSettingsFooter != nil { + b, err := json.Marshal(*params.MailSettingsFooter) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &MailSettingsFooter{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mail_settings/api_update_forward_bounce.go b/rest/api/v3/mail_settings/api_update_forward_bounce.go new file mode 100644 index 00000000..797b2a04 --- /dev/null +++ b/rest/api/v3/mail_settings/api_update_forward_bounce.go @@ -0,0 +1,73 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type UpdateForwardBounceParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + MailSettingsForwardBounce *MailSettingsForwardBounce `json:"MailSettingsForwardBounce,omitempty"` +} + +func (params *UpdateForwardBounceParam) SetOnbehalfof(Onbehalfof string) *UpdateForwardBounceParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateForwardBounceParam) SetMailSettingsForwardBounce(MailSettingsForwardBounce MailSettingsForwardBounce) *UpdateForwardBounceParam { + params.MailSettingsForwardBounce = &MailSettingsForwardBounce + return params +} + +// **This endpoint allows you to update your current bounce forwarding mail settings.** Enabling the Forward Bounce setting allows you to specify an `email` address to which bounce reports will be forwarded. You can also configure the Forward Spam mail settings in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). +func (c *ApiService) UpdateForwardBounce(params *UpdateForwardBounceParam) (interface{}, error) { + path := "/v3/mail_settings/forward_bounce" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.MailSettingsForwardBounce != nil { + b, err := json.Marshal(*params.MailSettingsForwardBounce) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &MailSettingsForwardBounce{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mail_settings/api_update_forward_spam.go b/rest/api/v3/mail_settings/api_update_forward_spam.go new file mode 100644 index 00000000..dbc04c1b --- /dev/null +++ b/rest/api/v3/mail_settings/api_update_forward_spam.go @@ -0,0 +1,73 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type UpdateForwardSpamParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + MailSettingsForwardSpam *MailSettingsForwardSpam `json:"MailSettingsForwardSpam,omitempty"` +} + +func (params *UpdateForwardSpamParam) SetOnbehalfof(Onbehalfof string) *UpdateForwardSpamParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateForwardSpamParam) SetMailSettingsForwardSpam(MailSettingsForwardSpam MailSettingsForwardSpam) *UpdateForwardSpamParam { + params.MailSettingsForwardSpam = &MailSettingsForwardSpam + return params +} + +// **This endpoint allows you to update your current Forward Spam mail settings.** Enabling the Forward Spam setting allows you to specify `email` addresses to which spam reports will be forwarded. You can set multiple addresses by passing this endpoint a comma separated list of emails in a single string. ``` { \"email\": \"address1@example.com, address2@exapmle.com\", \"enabled\": true } ``` The Forward Spam setting may also be used to receive emails sent to `abuse@` and `postmaster@` role addresses if you have authenticated your domain. For example, if you authenticated `example.com` as your root domain and set a custom return path of `sub` for that domain, you could turn on Forward Spam, and any emails sent to `abuse@sub.example.com` or `postmaster@sub.example.com` would be forwarded to the email address you entered in the `email` field. You can authenticate your domain using the \"Authenticate a domain\" endpoint or in the [Sender Authentication section of the Twilio SendGrid App](https://app.sendgrid.com/settings/sender_auth). You can also configure the Forward Spam mail settings in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). +func (c *ApiService) UpdateForwardSpam(params *UpdateForwardSpamParam) (interface{}, error) { + path := "/v3/mail_settings/forward_spam" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.MailSettingsForwardSpam != nil { + b, err := json.Marshal(*params.MailSettingsForwardSpam) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &MailSettingsForwardSpam{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mail_settings/api_update_template.go b/rest/api/v3/mail_settings/api_update_template.go new file mode 100644 index 00000000..72091647 --- /dev/null +++ b/rest/api/v3/mail_settings/api_update_template.go @@ -0,0 +1,73 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type UpdateTemplateParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateTemplateRequest *UpdateTemplateRequest `json:"UpdateTemplateRequest,omitempty"` +} + +func (params *UpdateTemplateParam) SetOnbehalfof(Onbehalfof string) *UpdateTemplateParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateTemplateParam) SetUpdateTemplateRequest(UpdateTemplateRequest UpdateTemplateRequest) *UpdateTemplateParam { + params.UpdateTemplateRequest = &UpdateTemplateRequest + return params +} + +// **This endpoint allows you to update your current legacy email template settings.** This setting refers to our original email templates. We currently support more fully featured [Dynamic Transactional Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/). The legacy email template setting wraps an HTML template around your email content. This can be useful for sending out marketing email and/or other HTML formatted messages. For instructions on using legacy templates, see how to [\"Create and Edit Legacy Transactional Templates](https://sendgrid.com/docs/ui/sending-email/create-and-edit-legacy-transactional-templates/). For help migrating to our current template system, see [\"Migrating from Legacy Templates\"](https://sendgrid.com/docs/ui/sending-email/migrating-from-legacy-templates/). +func (c *ApiService) UpdateTemplate(params *UpdateTemplateParam) (interface{}, error) { + path := "/v3/mail_settings/template" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateTemplateRequest != nil { + b, err := json.Marshal(*params.UpdateTemplateRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &UpdateTemplate200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mail_settings/docs/ListAddressWhitelist.md b/rest/api/v3/mail_settings/docs/ListAddressWhitelist.md new file mode 100644 index 00000000..19d14d6b --- /dev/null +++ b/rest/api/v3/mail_settings/docs/ListAddressWhitelist.md @@ -0,0 +1,48 @@ +# ListAddressWhitelist + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListAddressWhitelist**](ListAddressWhitelist.md#ListAddressWhitelist) | **Get** /v3/mail_settings/address_whitelist | Retrieve address whitelist mail settings + + + +## ListAddressWhitelist + +> MailSettingsAddressWhitelabel200 ListAddressWhitelist(ctx, optional) + +Retrieve address whitelist mail settings + +**This endpoint allows you to retrieve your current email address whitelist settings.** The Address Whitelist setting allows you to specify email addresses or domains for which mail should never be suppressed. For example, if you own the domain `example.com`, and one or more of your recipients use `email@example.com` addresses, placing `example.com` in the address whitelist setting instructs Twilio SendGrid to ignore all bounces, blocks, and unsubscribes logged for that domain. In other words, all bounces, blocks, and unsubscribes will still be sent to `example.com` as if they were sent under normal sending conditions. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListAddressWhitelistParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**MailSettingsAddressWhitelabel200**](MailSettingsAddressWhitelabel200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail_settings/docs/ListBouncePurge.md b/rest/api/v3/mail_settings/docs/ListBouncePurge.md new file mode 100644 index 00000000..edf160c3 --- /dev/null +++ b/rest/api/v3/mail_settings/docs/ListBouncePurge.md @@ -0,0 +1,48 @@ +# ListBouncePurge + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListBouncePurge**](ListBouncePurge.md#ListBouncePurge) | **Get** /v3/mail_settings/bounce_purge | Retrieve bounce purge mail settings + + + +## ListBouncePurge + +> MailSettingsBouncePurge ListBouncePurge(ctx, optional) + +Retrieve bounce purge mail settings + +**This endpoint allows you to retrieve your current bounce and purge settings.** The Bounce Perge setting allows you to set a schedule that Twilio SendGrid will use to automatically delete contacts from your soft and hard bounce suppression lists. A hard bounce occurs when an email message has been returned to the sender because the recipient's address is invalid. A hard bounce might occur because the domain name doesn't exist or because the recipient is unknown. A soft bounce occurs when an email message reaches the recipient's mail server but is bounced back undelivered before it actually reaches the recipient. A soft bounce might occur because the recipient's inbox is full. You can also manage this setting in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). You can manage your bounces manually using the [Bounces API](https://docs.sendgrid.com/api-reference/bounces-api) or the [Bounces menu in the Twilio SendGrid App](https://app.sendgrid.com/suppressions/bounces). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListBouncePurgeParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**MailSettingsBouncePurge**](MailSettingsBouncePurge.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail_settings/docs/ListFooter.md b/rest/api/v3/mail_settings/docs/ListFooter.md new file mode 100644 index 00000000..67d15a65 --- /dev/null +++ b/rest/api/v3/mail_settings/docs/ListFooter.md @@ -0,0 +1,48 @@ +# ListFooter + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListFooter**](ListFooter.md#ListFooter) | **Get** /v3/mail_settings/footer | Retrieve footer mail settings + + + +## ListFooter + +> MailSettingsFooter ListFooter(ctx, optional) + +Retrieve footer mail settings + +**This endpoint allows you to retrieve your current Footer mail settings.** The Footer setting will insert a custom footer at the bottom of your text and HTML email message bodies. You can insert your HTML or plain text directly using the \"Update footer mail settings\" endpoint, or you can create the footer using the [Mail Settings menu in the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListFooterParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**MailSettingsFooter**](MailSettingsFooter.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail_settings/docs/ListForwardBounce.md b/rest/api/v3/mail_settings/docs/ListForwardBounce.md new file mode 100644 index 00000000..03f8edb4 --- /dev/null +++ b/rest/api/v3/mail_settings/docs/ListForwardBounce.md @@ -0,0 +1,48 @@ +# ListForwardBounce + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListForwardBounce**](ListForwardBounce.md#ListForwardBounce) | **Get** /v3/mail_settings/forward_bounce | Retrieve forward bounce mail settings + + + +## ListForwardBounce + +> MailSettingsForwardBounce ListForwardBounce(ctx, optional) + +Retrieve forward bounce mail settings + +**This endpoint allows you to retrieve your current bounce forwarding mail settings.** Enabling the Forward Bounce setting allows you to specify `email` addresses to which bounce reports will be forwarded. This endpoint returns the email address you have set to receive forwarded bounces and an `enabled` status indicating if the setting is active. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListForwardBounceParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**MailSettingsForwardBounce**](MailSettingsForwardBounce.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail_settings/docs/ListForwardSpam.md b/rest/api/v3/mail_settings/docs/ListForwardSpam.md new file mode 100644 index 00000000..8a50b2a3 --- /dev/null +++ b/rest/api/v3/mail_settings/docs/ListForwardSpam.md @@ -0,0 +1,48 @@ +# ListForwardSpam + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListForwardSpam**](ListForwardSpam.md#ListForwardSpam) | **Get** /v3/mail_settings/forward_spam | Retrieve forward spam mail settings + + + +## ListForwardSpam + +> MailSettingsForwardSpam ListForwardSpam(ctx, optional) + +Retrieve forward spam mail settings + +**This endpoint allows you to retrieve your current Forward Spam mail settings.** Enabling the Forward Spam setting allows you to specify `email` addresses to which spam reports will be forwarded. This endpoint returns any email address(es) you have set to receive forwarded spam and an `enabled` status indicating if the setting is active. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListForwardSpamParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**MailSettingsForwardSpam**](MailSettingsForwardSpam.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail_settings/docs/ListMailSetting.md b/rest/api/v3/mail_settings/docs/ListMailSetting.md new file mode 100644 index 00000000..112b7db3 --- /dev/null +++ b/rest/api/v3/mail_settings/docs/ListMailSetting.md @@ -0,0 +1,50 @@ +# ListMailSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListMailSetting**](ListMailSetting.md#ListMailSetting) | **Get** /v3/mail_settings | Retrieve all mail settings + + + +## ListMailSetting + +> ListMailSetting200Response ListMailSetting(ctx, optional) + +Retrieve all mail settings + +**This endpoint allows you to retrieve a paginated list of all mail settings.** Each setting will be returned with an `enabled` status set to `true` or `false` and a short description that explains what the setting does. You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListMailSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. +**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListMailSetting200Response**](ListMailSetting200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail_settings/docs/ListMailSetting200Response.md b/rest/api/v3/mail_settings/docs/ListMailSetting200Response.md new file mode 100644 index 00000000..cbfa419e --- /dev/null +++ b/rest/api/v3/mail_settings/docs/ListMailSetting200Response.md @@ -0,0 +1,11 @@ +# ListMailSetting200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ListMailSetting200ResponseResultInner**](ListMailSetting200ResponseResultInner.md) | The list of all mail settings. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail_settings/docs/ListMailSetting200ResponseResultInner.md b/rest/api/v3/mail_settings/docs/ListMailSetting200ResponseResultInner.md new file mode 100644 index 00000000..ffcbe98a --- /dev/null +++ b/rest/api/v3/mail_settings/docs/ListMailSetting200ResponseResultInner.md @@ -0,0 +1,14 @@ +# ListMailSetting200ResponseResultInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | **string** | The title of the mail setting. | +**Enabled** | **bool** | Indicates if this mail setting is currently enabled. | +**Name** | **string** | The name of the mail setting. | +**Description** | **string** | A description of the mail setting. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail_settings/docs/ListTemplate.md b/rest/api/v3/mail_settings/docs/ListTemplate.md new file mode 100644 index 00000000..d793d851 --- /dev/null +++ b/rest/api/v3/mail_settings/docs/ListTemplate.md @@ -0,0 +1,48 @@ +# ListTemplate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListTemplate**](ListTemplate.md#ListTemplate) | **Get** /v3/mail_settings/template | Retrieve legacy template mail settings + + + +## ListTemplate + +> MailSettingsTemplate200 ListTemplate(ctx, optional) + +Retrieve legacy template mail settings + +**This endpoint allows you to retrieve your current legacy email template settings.** This setting refers to our original email templates. We currently support more fully featured [Dynamic Transactional Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/). The legacy email template setting wraps an HTML template around your email content. This can be useful for sending out marketing email and/or other HTML formatted messages. For instructions on using legacy templates, see how to [\"Create and Edit Legacy Transactional Templates](https://sendgrid.com/docs/ui/sending-email/create-and-edit-legacy-transactional-templates/). For help migrating to our current template system, see [\"Migrating from Legacy Templates\"](https://sendgrid.com/docs/ui/sending-email/migrating-from-legacy-templates/). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListTemplateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**MailSettingsTemplate200**](MailSettingsTemplate200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail_settings/docs/MailSettingsAddressWhitelabel200.md b/rest/api/v3/mail_settings/docs/MailSettingsAddressWhitelabel200.md new file mode 100644 index 00000000..faa984c3 --- /dev/null +++ b/rest/api/v3/mail_settings/docs/MailSettingsAddressWhitelabel200.md @@ -0,0 +1,12 @@ +# MailSettingsAddressWhitelabel200 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates if you have an email address whitelist enabled. |[optional] +**List** | **[]string** | All email addresses that are currently on the whitelist. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail_settings/docs/MailSettingsBouncePurge.md b/rest/api/v3/mail_settings/docs/MailSettingsBouncePurge.md new file mode 100644 index 00000000..a23734de --- /dev/null +++ b/rest/api/v3/mail_settings/docs/MailSettingsBouncePurge.md @@ -0,0 +1,13 @@ +# MailSettingsBouncePurge + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates if the bounce purge mail setting is enabled. |[optional] +**SoftBounces** | **int32** | The number of days after which SendGrid will purge all contacts from your soft bounces suppression lists. |[optional] +**HardBounces** | **int32** | The number of days after which SendGrid will purge all contacts from your hard bounces suppression lists. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail_settings/docs/MailSettingsFooter.md b/rest/api/v3/mail_settings/docs/MailSettingsFooter.md new file mode 100644 index 00000000..9e32dc8d --- /dev/null +++ b/rest/api/v3/mail_settings/docs/MailSettingsFooter.md @@ -0,0 +1,13 @@ +# MailSettingsFooter + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates if the Footer mail setting is currently enabled. |[optional] +**HtmlContent** | **string** | The custom HTML content of your email footer. |[optional] +**PlainContent** | **string** | The plain text content of your email footer. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail_settings/docs/MailSettingsForwardBounce.md b/rest/api/v3/mail_settings/docs/MailSettingsForwardBounce.md new file mode 100644 index 00000000..b026f5b9 --- /dev/null +++ b/rest/api/v3/mail_settings/docs/MailSettingsForwardBounce.md @@ -0,0 +1,12 @@ +# MailSettingsForwardBounce + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address that you would like your bounce reports forwarded to. |[optional] +**Enabled** | **bool** | Indicates if the bounce forwarding mail setting is enabled. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail_settings/docs/MailSettingsForwardSpam.md b/rest/api/v3/mail_settings/docs/MailSettingsForwardSpam.md new file mode 100644 index 00000000..ab2ac86c --- /dev/null +++ b/rest/api/v3/mail_settings/docs/MailSettingsForwardSpam.md @@ -0,0 +1,12 @@ +# MailSettingsForwardSpam + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address where you would like the spam reports to be forwarded. |[optional] +**Enabled** | **bool** | Indicates if the Forward Spam setting is enabled. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail_settings/docs/MailSettingsTemplate200.md b/rest/api/v3/mail_settings/docs/MailSettingsTemplate200.md new file mode 100644 index 00000000..17d003ec --- /dev/null +++ b/rest/api/v3/mail_settings/docs/MailSettingsTemplate200.md @@ -0,0 +1,12 @@ +# MailSettingsTemplate200 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates if the legacy email template setting is enabled. |[optional] +**HtmlContent** | **string** | The HTML content that you want to use for your legacy email template. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail_settings/docs/UpdateAddressWhitelist.md b/rest/api/v3/mail_settings/docs/UpdateAddressWhitelist.md new file mode 100644 index 00000000..33b8dcda --- /dev/null +++ b/rest/api/v3/mail_settings/docs/UpdateAddressWhitelist.md @@ -0,0 +1,49 @@ +# UpdateAddressWhitelist + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateAddressWhitelist**](UpdateAddressWhitelist.md#UpdateAddressWhitelist) | **Patch** /v3/mail_settings/address_whitelist | Update address whitelist mail settings + + + +## UpdateAddressWhitelist + +> MailSettingsAddressWhitelabel200 UpdateAddressWhitelist(ctx, optional) + +Update address whitelist mail settings + +**This endpoint allows you to update your current email address whitelist settings.** You can select whether or not this setting should be enabled by assigning the `enabled` field a `true` or `false` value. Passing only the `enabled` field to this endpoint will not alter your current `list` of whitelist entries. However, any modifications to your `list` of entries will overwrite the entire list. For this reason, you must included all existing entries you wish to retain in your `list` in addition to any new entries you intend to add. To remove one or more `list` entries, pass a `list` with only the entries you wish to retain. You should not add generic domains such as `gmail.com` or `yahoo.com` in your `list` because your emails will not honor recipients' unsubscribes. This may cause a legal violation of [CAN-SPAM](https://sendgrid.com/docs/glossary/can-spam/) and could damage your sending reputation. The Address Whitelist setting allows you to specify email addresses or domains for which mail should never be suppressed. For example, if you own the domain `example.com`, and one or more of your recipients use `email@example.com` addresses, placing `example.com` in the address whitelist setting instructs Twilio SendGrid to ignore all bounces, blocks, and unsubscribes logged for that domain. In other words, all bounces, blocks, and unsubscribes will still be sent to `example.com` as if they were sent under normal sending conditions. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateAddressWhitelistParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateAddressWhitelistRequest** | [**UpdateAddressWhitelistRequest**](UpdateAddressWhitelistRequest.md) | + +### Return type + +[**MailSettingsAddressWhitelabel200**](MailSettingsAddressWhitelabel200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail_settings/docs/UpdateAddressWhitelistRequest.md b/rest/api/v3/mail_settings/docs/UpdateAddressWhitelistRequest.md new file mode 100644 index 00000000..26fabf56 --- /dev/null +++ b/rest/api/v3/mail_settings/docs/UpdateAddressWhitelistRequest.md @@ -0,0 +1,12 @@ +# UpdateAddressWhitelistRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates if your email address whitelist is enabled. |[optional] +**List** | **[]string** | Either a single email address that you want whitelisted or a domain, for which all email addresses belonging to this domain will be whitelisted. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail_settings/docs/UpdateBouncePurge.md b/rest/api/v3/mail_settings/docs/UpdateBouncePurge.md new file mode 100644 index 00000000..4ffdeafd --- /dev/null +++ b/rest/api/v3/mail_settings/docs/UpdateBouncePurge.md @@ -0,0 +1,49 @@ +# UpdateBouncePurge + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateBouncePurge**](UpdateBouncePurge.md#UpdateBouncePurge) | **Patch** /v3/mail_settings/bounce_purge | Update bounce purge mail settings + + + +## UpdateBouncePurge + +> MailSettingsBouncePurge UpdateBouncePurge(ctx, optional) + +Update bounce purge mail settings + +**This endpoint allows you to update your current bounce and purge settings.** The Bounce Perge setting allows you to set a schedule that Twilio SendGrid will use to automatically delete contacts from your soft and hard bounce suppression lists. The schedule is set in full days by assigning the number of days, an integer, to the `soft_bounces` and/or `hard_bounces` fields. A hard bounce occurs when an email message has been returned to the sender because the recipient's address is invalid. A hard bounce might occur because the domain name doesn't exist or because the recipient is unknown. A soft bounce occurs when an email message reaches the recipient's mail server but is bounced back undelivered before it actually reaches the recipient. A soft bounce might occur because the recipient's inbox is full. You can also manage this setting in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). You can manage your bounces manually using the [Bounces API](https://docs.sendgrid.com/api-reference/bounces-api) or the [Bounces menu in the Twilio SendGrid App](https://app.sendgrid.com/suppressions/bounces). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateBouncePurgeParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**MailSettingsBouncePurge** | [**MailSettingsBouncePurge**](MailSettingsBouncePurge.md) | + +### Return type + +[**MailSettingsBouncePurge**](MailSettingsBouncePurge.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail_settings/docs/UpdateFooter.md b/rest/api/v3/mail_settings/docs/UpdateFooter.md new file mode 100644 index 00000000..758cbdbd --- /dev/null +++ b/rest/api/v3/mail_settings/docs/UpdateFooter.md @@ -0,0 +1,49 @@ +# UpdateFooter + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateFooter**](UpdateFooter.md#UpdateFooter) | **Patch** /v3/mail_settings/footer | Update footer mail settings + + + +## UpdateFooter + +> MailSettingsFooter UpdateFooter(ctx, optional) + +Update footer mail settings + +**This endpoint allows you to update your current Footer mail settings.** The Footer setting will insert a custom footer at the bottom of your text and HTML email message bodies. You can insert your HTML or plain text directly using this endpoint, or you can create the footer using the [Mail Settings menu in the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateFooterParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**MailSettingsFooter** | [**MailSettingsFooter**](MailSettingsFooter.md) | + +### Return type + +[**MailSettingsFooter**](MailSettingsFooter.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail_settings/docs/UpdateForwardBounce.md b/rest/api/v3/mail_settings/docs/UpdateForwardBounce.md new file mode 100644 index 00000000..f7250ada --- /dev/null +++ b/rest/api/v3/mail_settings/docs/UpdateForwardBounce.md @@ -0,0 +1,49 @@ +# UpdateForwardBounce + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateForwardBounce**](UpdateForwardBounce.md#UpdateForwardBounce) | **Patch** /v3/mail_settings/forward_bounce | Update forward bounce mail settings + + + +## UpdateForwardBounce + +> MailSettingsForwardBounce UpdateForwardBounce(ctx, optional) + +Update forward bounce mail settings + +**This endpoint allows you to update your current bounce forwarding mail settings.** Enabling the Forward Bounce setting allows you to specify an `email` address to which bounce reports will be forwarded. You can also configure the Forward Spam mail settings in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateForwardBounceParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**MailSettingsForwardBounce** | [**MailSettingsForwardBounce**](MailSettingsForwardBounce.md) | + +### Return type + +[**MailSettingsForwardBounce**](MailSettingsForwardBounce.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail_settings/docs/UpdateForwardSpam.md b/rest/api/v3/mail_settings/docs/UpdateForwardSpam.md new file mode 100644 index 00000000..72690164 --- /dev/null +++ b/rest/api/v3/mail_settings/docs/UpdateForwardSpam.md @@ -0,0 +1,49 @@ +# UpdateForwardSpam + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateForwardSpam**](UpdateForwardSpam.md#UpdateForwardSpam) | **Patch** /v3/mail_settings/forward_spam | Update forward spam mail settings + + + +## UpdateForwardSpam + +> MailSettingsForwardSpam UpdateForwardSpam(ctx, optional) + +Update forward spam mail settings + +**This endpoint allows you to update your current Forward Spam mail settings.** Enabling the Forward Spam setting allows you to specify `email` addresses to which spam reports will be forwarded. You can set multiple addresses by passing this endpoint a comma separated list of emails in a single string. ``` { \"email\": \"address1@example.com, address2@exapmle.com\", \"enabled\": true } ``` The Forward Spam setting may also be used to receive emails sent to `abuse@` and `postmaster@` role addresses if you have authenticated your domain. For example, if you authenticated `example.com` as your root domain and set a custom return path of `sub` for that domain, you could turn on Forward Spam, and any emails sent to `abuse@sub.example.com` or `postmaster@sub.example.com` would be forwarded to the email address you entered in the `email` field. You can authenticate your domain using the \"Authenticate a domain\" endpoint or in the [Sender Authentication section of the Twilio SendGrid App](https://app.sendgrid.com/settings/sender_auth). You can also configure the Forward Spam mail settings in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateForwardSpamParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**MailSettingsForwardSpam** | [**MailSettingsForwardSpam**](MailSettingsForwardSpam.md) | + +### Return type + +[**MailSettingsForwardSpam**](MailSettingsForwardSpam.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail_settings/docs/UpdateTemplate.md b/rest/api/v3/mail_settings/docs/UpdateTemplate.md new file mode 100644 index 00000000..96add61e --- /dev/null +++ b/rest/api/v3/mail_settings/docs/UpdateTemplate.md @@ -0,0 +1,49 @@ +# UpdateTemplate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateTemplate**](UpdateTemplate.md#UpdateTemplate) | **Patch** /v3/mail_settings/template | Update template mail settings + + + +## UpdateTemplate + +> UpdateTemplate200Response UpdateTemplate(ctx, optional) + +Update template mail settings + +**This endpoint allows you to update your current legacy email template settings.** This setting refers to our original email templates. We currently support more fully featured [Dynamic Transactional Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/). The legacy email template setting wraps an HTML template around your email content. This can be useful for sending out marketing email and/or other HTML formatted messages. For instructions on using legacy templates, see how to [\"Create and Edit Legacy Transactional Templates](https://sendgrid.com/docs/ui/sending-email/create-and-edit-legacy-transactional-templates/). For help migrating to our current template system, see [\"Migrating from Legacy Templates\"](https://sendgrid.com/docs/ui/sending-email/migrating-from-legacy-templates/). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateTemplateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateTemplateRequest** | [**UpdateTemplateRequest**](UpdateTemplateRequest.md) | + +### Return type + +[**UpdateTemplate200Response**](UpdateTemplate200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail_settings/docs/UpdateTemplate200Response.md b/rest/api/v3/mail_settings/docs/UpdateTemplate200Response.md new file mode 100644 index 00000000..507108c7 --- /dev/null +++ b/rest/api/v3/mail_settings/docs/UpdateTemplate200Response.md @@ -0,0 +1,12 @@ +# UpdateTemplate200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates if the legacy email template mail setting is enabled. | +**HtmlContent** | **string** | The HTML content of your legacy email template. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail_settings/docs/UpdateTemplateRequest.md b/rest/api/v3/mail_settings/docs/UpdateTemplateRequest.md new file mode 100644 index 00000000..52fb438d --- /dev/null +++ b/rest/api/v3/mail_settings/docs/UpdateTemplateRequest.md @@ -0,0 +1,12 @@ +# UpdateTemplateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates if you want to enable the legacy email template mail setting. |[optional] +**HtmlContent** | **string** | The new HTML content for your legacy email template. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail_settings/model_list_mail_setting_200_response.go b/rest/api/v3/mail_settings/model_list_mail_setting_200_response.go new file mode 100644 index 00000000..f39bc1d9 --- /dev/null +++ b/rest/api/v3/mail_settings/model_list_mail_setting_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListMailSetting200Response struct for ListMailSetting200Response +type ListMailSetting200Response struct { + // The list of all mail settings. + Result []ListMailSetting200ResponseResultInner `json:"result"` +} diff --git a/rest/api/v3/mail_settings/model_list_mail_setting_200_response_result_inner.go b/rest/api/v3/mail_settings/model_list_mail_setting_200_response_result_inner.go new file mode 100644 index 00000000..7f4d09cb --- /dev/null +++ b/rest/api/v3/mail_settings/model_list_mail_setting_200_response_result_inner.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListMailSetting200ResponseResultInner struct for ListMailSetting200ResponseResultInner +type ListMailSetting200ResponseResultInner struct { + // The title of the mail setting. + Title string `json:"title"` + // Indicates if this mail setting is currently enabled. + Enabled bool `json:"enabled"` + // The name of the mail setting. + Name string `json:"name"` + // A description of the mail setting. + Description string `json:"description"` +} diff --git a/rest/api/v3/mail_settings/model_mail_settings_address_whitelabel200.go b/rest/api/v3/mail_settings/model_mail_settings_address_whitelabel200.go new file mode 100644 index 00000000..541343fc --- /dev/null +++ b/rest/api/v3/mail_settings/model_mail_settings_address_whitelabel200.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// MailSettingsAddressWhitelabel200 struct for MailSettingsAddressWhitelabel200 +type MailSettingsAddressWhitelabel200 struct { + // Indicates if you have an email address whitelist enabled. + Enabled *bool `json:"enabled,omitempty"` + // All email addresses that are currently on the whitelist. + List *[]string `json:"list,omitempty"` +} diff --git a/rest/api/v3/mail_settings/model_mail_settings_bounce_purge.go b/rest/api/v3/mail_settings/model_mail_settings_bounce_purge.go new file mode 100644 index 00000000..f283828f --- /dev/null +++ b/rest/api/v3/mail_settings/model_mail_settings_bounce_purge.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// MailSettingsBouncePurge struct for MailSettingsBouncePurge +type MailSettingsBouncePurge struct { + // Indicates if the bounce purge mail setting is enabled. + Enabled *bool `json:"enabled,omitempty"` + // The number of days after which SendGrid will purge all contacts from your soft bounces suppression lists. + SoftBounces *int32 `json:"soft_bounces,omitempty"` + // The number of days after which SendGrid will purge all contacts from your hard bounces suppression lists. + HardBounces *int32 `json:"hard_bounces,omitempty"` +} diff --git a/rest/api/v3/mail_settings/model_mail_settings_footer.go b/rest/api/v3/mail_settings/model_mail_settings_footer.go new file mode 100644 index 00000000..b3e44acf --- /dev/null +++ b/rest/api/v3/mail_settings/model_mail_settings_footer.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// MailSettingsFooter struct for MailSettingsFooter +type MailSettingsFooter struct { + // Indicates if the Footer mail setting is currently enabled. + Enabled *bool `json:"enabled,omitempty"` + // The custom HTML content of your email footer. + HtmlContent *string `json:"html_content,omitempty"` + // The plain text content of your email footer. + PlainContent *string `json:"plain_content,omitempty"` +} diff --git a/rest/api/v3/mail_settings/model_mail_settings_forward_bounce.go b/rest/api/v3/mail_settings/model_mail_settings_forward_bounce.go new file mode 100644 index 00000000..6b26be5d --- /dev/null +++ b/rest/api/v3/mail_settings/model_mail_settings_forward_bounce.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// MailSettingsForwardBounce struct for MailSettingsForwardBounce +type MailSettingsForwardBounce struct { + // The email address that you would like your bounce reports forwarded to. + Email *string `json:"email,omitempty"` + // Indicates if the bounce forwarding mail setting is enabled. + Enabled *bool `json:"enabled,omitempty"` +} diff --git a/rest/api/v3/mail_settings/model_mail_settings_forward_spam.go b/rest/api/v3/mail_settings/model_mail_settings_forward_spam.go new file mode 100644 index 00000000..82208334 --- /dev/null +++ b/rest/api/v3/mail_settings/model_mail_settings_forward_spam.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// MailSettingsForwardSpam struct for MailSettingsForwardSpam +type MailSettingsForwardSpam struct { + // The email address where you would like the spam reports to be forwarded. + Email *string `json:"email,omitempty"` + // Indicates if the Forward Spam setting is enabled. + Enabled *bool `json:"enabled,omitempty"` +} diff --git a/rest/api/v3/mail_settings/model_mail_settings_template200.go b/rest/api/v3/mail_settings/model_mail_settings_template200.go new file mode 100644 index 00000000..b2529e26 --- /dev/null +++ b/rest/api/v3/mail_settings/model_mail_settings_template200.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// MailSettingsTemplate200 struct for MailSettingsTemplate200 +type MailSettingsTemplate200 struct { + // Indicates if the legacy email template setting is enabled. + Enabled *bool `json:"enabled,omitempty"` + // The HTML content that you want to use for your legacy email template. + HtmlContent *string `json:"html_content,omitempty"` +} diff --git a/rest/api/v3/mail_settings/model_update_address_whitelist_request.go b/rest/api/v3/mail_settings/model_update_address_whitelist_request.go new file mode 100644 index 00000000..f1881e61 --- /dev/null +++ b/rest/api/v3/mail_settings/model_update_address_whitelist_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateAddressWhitelistRequest struct for UpdateAddressWhitelistRequest +type UpdateAddressWhitelistRequest struct { + // Indicates if your email address whitelist is enabled. + Enabled *bool `json:"enabled,omitempty"` + // Either a single email address that you want whitelisted or a domain, for which all email addresses belonging to this domain will be whitelisted. + List *[]string `json:"list,omitempty"` +} diff --git a/rest/api/v3/mail_settings/model_update_template_200_response.go b/rest/api/v3/mail_settings/model_update_template_200_response.go new file mode 100644 index 00000000..a879398f --- /dev/null +++ b/rest/api/v3/mail_settings/model_update_template_200_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateTemplate200Response struct for UpdateTemplate200Response +type UpdateTemplate200Response struct { + // Indicates if the legacy email template mail setting is enabled. + Enabled bool `json:"enabled"` + // The HTML content of your legacy email template. + HtmlContent string `json:"html_content"` +} diff --git a/rest/api/v3/mail_settings/model_update_template_request.go b/rest/api/v3/mail_settings/model_update_template_request.go new file mode 100644 index 00000000..ce310de0 --- /dev/null +++ b/rest/api/v3/mail_settings/model_update_template_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateTemplateRequest struct for UpdateTemplateRequest +type UpdateTemplateRequest struct { + // Indicates if you want to enable the legacy email template mail setting. + Enabled *bool `json:"enabled,omitempty"` + // The new HTML content for your legacy email template. + HtmlContent *string `json:"html_content,omitempty"` +} diff --git a/rest/api/v3/mc_designs/.openapi-generator b/rest/api/v3/mc_designs/.openapi-generator new file mode 100644 index 00000000..6f44dcb1 --- /dev/null +++ b/rest/api/v3/mc_designs/.openapi-generator @@ -0,0 +1,43 @@ +.openapi-generator +README.md +api_create_design.go +api_delete_design.go +api_duplicate_design.go +api_duplicate_pre_built_design.go +api_get_design.go +api_get_pre_built_design.go +api_list_design.go +api_list_pre_built_design.go +api_service.go +api_update_design.go +docs/ApiError.md +docs/ApiErrors.md +docs/CreateDesign.md +docs/DeleteDesign.md +docs/DesignCommonProperties.md +docs/DesignDuplicateInput.md +docs/DesignInput.md +docs/DesignOutput.md +docs/DesignOutputSummary.md +docs/DuplicateDesign.md +docs/DuplicatePreBuiltDesign.md +docs/Editor.md +docs/GetDesign.md +docs/GetPreBuiltDesign.md +docs/ListDesign.md +docs/ListDesign200Response.md +docs/ListPreBuiltDesign.md +docs/Metadata.md +docs/UpdateDesign.md +docs/UpdateDesignRequest.md +model_api_error.go +model_api_errors.go +model_design_common_properties.go +model_design_duplicate_input.go +model_design_input.go +model_design_output.go +model_design_output_summary.go +model_editor.go +model_list_design_200_response.go +model_metadata.go +model_update_design_request.go diff --git a/rest/api/v3/mc_designs/.openapi-generator-ignore b/rest/api/v3/mc_designs/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/mc_designs/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/mc_designs/README.md b/rest/api/v3/mc_designs/README.md new file mode 100644 index 00000000..3de167f1 --- /dev/null +++ b/rest/api/v3/mc_designs/README.md @@ -0,0 +1,84 @@ +# Go API client for + +The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). + +The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. + +You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. + +The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:44.066640+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateDesign* | [**CreateDesign**](docs/CreateDesign.md#createdesign) | **Post** /v3/designs | Create Design +*DeleteDesign* | [**DeleteDesign**](docs/DeleteDesign.md#deletedesign) | **Delete** /v3/designs/{Id} | Delete Design +*DuplicateDesign* | [**DuplicateDesign**](docs/DuplicateDesign.md#duplicatedesign) | **Post** /v3/designs/{Id} | Duplicate Design +*DuplicatePreBuiltDesign* | [**DuplicatePreBuiltDesign**](docs/DuplicatePreBuiltDesign.md#duplicateprebuiltdesign) | **Post** /v3/designs/pre-builts/{Id} | Duplicate SendGrid Pre-built Design +*GetDesign* | [**GetDesign**](docs/GetDesign.md#getdesign) | **Get** /v3/designs/{Id} | Get Design +*GetPreBuiltDesign* | [**GetPreBuiltDesign**](docs/GetPreBuiltDesign.md#getprebuiltdesign) | **Get** /v3/designs/pre-builts/{Id} | Get SendGrid Pre-built Design +*ListDesign* | [**ListDesign**](docs/ListDesign.md#listdesign) | **Get** /v3/designs | List Designs +*ListPreBuiltDesign* | [**ListPreBuiltDesign**](docs/ListPreBuiltDesign.md#listprebuiltdesign) | **Get** /v3/designs/pre-builts | List SendGrid Pre-built Designs +*UpdateDesign* | [**UpdateDesign**](docs/UpdateDesign.md#updatedesign) | **Patch** /v3/designs/{Id} | Update Design + + +## Documentation For Models + + - [ApiError](ApiError.md) + - [ApiErrors](ApiErrors.md) + - [DesignCommonProperties](DesignCommonProperties.md) + - [DesignDuplicateInput](DesignDuplicateInput.md) + - [DesignInput](DesignInput.md) + - [DesignOutput](DesignOutput.md) + - [DesignOutputSummary](DesignOutputSummary.md) + - [Editor](Editor.md) + - [ListDesign200Response](ListDesign200Response.md) + - [Metadata](Metadata.md) + - [UpdateDesignRequest](UpdateDesignRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/mc_designs/api_create_design.go b/rest/api/v3/mc_designs/api_create_design.go new file mode 100644 index 00000000..c8b41d3c --- /dev/null +++ b/rest/api/v3/mc_designs/api_create_design.go @@ -0,0 +1,72 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type CreateDesignParam struct { + // + DesignInput *DesignInput `json:"DesignInput,omitempty"` +} + +func (params *CreateDesignParam) SetDesignInput(DesignInput DesignInput) *CreateDesignParam { + params.DesignInput = &DesignInput + return params +} + +// **This endpoint allows you to create a new design**. You can add a new design by passing data, including a string of HTML email content, to `/designs`. When creating designs from scratch, be aware of the styling constraints inherent to many email clients. For a list of best practices, see our guide to [Cross-Platform Email Design](https://sendgrid.com/docs/ui/sending-email/cross-platform-html-design/). The Design Library can also convert your design’s HTML elements into drag and drop modules that are editable in the Designs Library user interface. For more, visit the [Design and Code Editor documentation](https://sendgrid.com/docs/ui/sending-email/editor/#drag--drop-markup). Because the `/designs` endpoint makes it easy to add designs, you can create a design with your preferred tooling or migrate designs you already own without relying on the Design Library UI. +func (c *ApiService) CreateDesign(params *CreateDesignParam) (interface{}, error) { + path := "/v3/designs" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.DesignInput != nil { + b, err := json.Marshal(*params.DesignInput) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &DesignOutput{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ApiErrors{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_designs/api_delete_design.go b/rest/api/v3/mc_designs/api_delete_design.go new file mode 100644 index 00000000..eec2321c --- /dev/null +++ b/rest/api/v3/mc_designs/api_delete_design.go @@ -0,0 +1,76 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DeleteDesignParam struct { + // The ID of the Design you want to duplicate. + Id *string `json:"id"` +} + +func (params *DeleteDesignParam) SetId(Id string) *DeleteDesignParam { + params.Id = &Id + return params +} + +// **This endpoint allows you to delete a single design**. Be sure to check the ID of the design you intend to delete before making this request; deleting a design is a permanent action. +func (c *ApiService) DeleteDesign(params *DeleteDesignParam) (interface{}, error) { + path := "/v3/designs/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ApiErrors{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ApiErrors{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_designs/api_duplicate_design.go b/rest/api/v3/mc_designs/api_duplicate_design.go new file mode 100644 index 00000000..823d9a41 --- /dev/null +++ b/rest/api/v3/mc_designs/api_duplicate_design.go @@ -0,0 +1,91 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DuplicateDesignParam struct { + // The ID of the Design you want to duplicate. + Id *string `json:"id"` + // + DesignDuplicateInput *DesignDuplicateInput `json:"DesignDuplicateInput,omitempty"` +} + +func (params *DuplicateDesignParam) SetId(Id string) *DuplicateDesignParam { + params.Id = &Id + return params +} +func (params *DuplicateDesignParam) SetDesignDuplicateInput(DesignDuplicateInput DesignDuplicateInput) *DuplicateDesignParam { + params.DesignDuplicateInput = &DesignDuplicateInput + return params +} + +// **This endpoint allows you to duplicate one of your existing designs**. Modifying an existing design is often the easiest way to create something new. You are not required to pass any data in the body of a request to this endpoint. If you choose to leave the `name` field blank, your duplicate will be assigned the name of the design it was copied from with the text \"Duplicate: \" prepended to it. This name change is only a convenience, as the duplicate will be assigned a unique ID that differentiates it from your other designs. You can modify your duplicate’s name at the time of creation by passing an updated value to the `name` field when making the initial request. More on retrieving design IDs can be found below. +func (c *ApiService) DuplicateDesign(params *DuplicateDesignParam) (interface{}, error) { + path := "/v3/designs/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.DesignDuplicateInput != nil { + b, err := json.Marshal(*params.DesignDuplicateInput) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &DesignOutput{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ApiError{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ApiErrors{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_designs/api_duplicate_pre_built_design.go b/rest/api/v3/mc_designs/api_duplicate_pre_built_design.go new file mode 100644 index 00000000..f8965925 --- /dev/null +++ b/rest/api/v3/mc_designs/api_duplicate_pre_built_design.go @@ -0,0 +1,91 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DuplicatePreBuiltDesignParam struct { + // The ID of the pre-built Design you want to duplicate. + Id *string `json:"id"` + // + DesignDuplicateInput *DesignDuplicateInput `json:"DesignDuplicateInput,omitempty"` +} + +func (params *DuplicatePreBuiltDesignParam) SetId(Id string) *DuplicatePreBuiltDesignParam { + params.Id = &Id + return params +} +func (params *DuplicatePreBuiltDesignParam) SetDesignDuplicateInput(DesignDuplicateInput DesignDuplicateInput) *DuplicatePreBuiltDesignParam { + params.DesignDuplicateInput = &DesignDuplicateInput + return params +} + +// **This endpoint allows you to duplicate one of the pre-built Twilio SendGrid designs**. Like duplicating one of your existing designs, you are not required to pass any data in the body of a request to this endpoint. If you choose to leave the `name` field blank, your duplicate will be assigned the name of the design it was copied from with the text \"Duplicate: \" prepended to it. This name change is only a convenience, as the duplicate design will be assigned a unique ID that differentiates it from your other designs. You can retrieve the IDs for Twilio SendGrid pre-built designs using the \"List SendGrid Pre-built Designs\" endpoint. You can modify your duplicate’s name at the time of creation by passing an updated value to the `name` field when making the initial request. More on retrieving design IDs can be found above. +func (c *ApiService) DuplicatePreBuiltDesign(params *DuplicatePreBuiltDesignParam) (interface{}, error) { + path := "/v3/designs/pre-builts/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.DesignDuplicateInput != nil { + b, err := json.Marshal(*params.DesignDuplicateInput) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &DesignOutput{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ApiErrors{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ApiErrors{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_designs/api_get_design.go b/rest/api/v3/mc_designs/api_get_design.go new file mode 100644 index 00000000..39708536 --- /dev/null +++ b/rest/api/v3/mc_designs/api_get_design.go @@ -0,0 +1,76 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type GetDesignParam struct { + // The ID of the Design you want to duplicate. + Id *string `json:"id"` +} + +func (params *GetDesignParam) SetId(Id string) *GetDesignParam { + params.Id = &Id + return params +} + +// **This endpoint allows you to retrieve a single design**. A GET request to `/designs/{id}` will retrieve details about a specific design in your Design Library. This endpoint is valuable when retrieving information stored in a field that you wish to update using a PATCH request. +func (c *ApiService) GetDesign(params *GetDesignParam) (interface{}, error) { + path := "/v3/designs/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &DesignOutput{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ApiErrors{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ApiErrors{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_designs/api_get_pre_built_design.go b/rest/api/v3/mc_designs/api_get_pre_built_design.go new file mode 100644 index 00000000..026869c5 --- /dev/null +++ b/rest/api/v3/mc_designs/api_get_pre_built_design.go @@ -0,0 +1,76 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type GetPreBuiltDesignParam struct { + // The ID of the pre-built Design you want to duplicate. + Id *string `json:"id"` +} + +func (params *GetPreBuiltDesignParam) SetId(Id string) *GetPreBuiltDesignParam { + params.Id = &Id + return params +} + +// **This endpoint allows you to retrieve a single pre-built design**. A GET request to `/designs/pre-builts/{id}` will retrieve details about a specific pre-built design. This endpoint is valuable when retrieving details about a pre-built design that you wish to duplicate and modify. +func (c *ApiService) GetPreBuiltDesign(params *GetPreBuiltDesignParam) (interface{}, error) { + path := "/v3/designs/pre-builts/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &DesignOutput{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ApiErrors{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ApiErrors{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_designs/api_list_design.go b/rest/api/v3/mc_designs/api_list_design.go new file mode 100644 index 00000000..246480bf --- /dev/null +++ b/rest/api/v3/mc_designs/api_list_design.go @@ -0,0 +1,78 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListDesignParam struct { + // number of results to return + PageSize *int32 `json:"page_size,omitempty"` + // token corresponding to a specific page of results, as provided by metadata + PageToken *string `json:"page_token,omitempty"` + // set to false to return all fields + Summary *bool `json:"summary,omitempty"` +} + +func (params *ListDesignParam) SetPageSize(PageSize int32) *ListDesignParam { + params.PageSize = &PageSize + return params +} +func (params *ListDesignParam) SetPageToken(PageToken string) *ListDesignParam { + params.PageToken = &PageToken + return params +} +func (params *ListDesignParam) SetSummary(Summary bool) *ListDesignParam { + params.Summary = &Summary + return params +} + +// **This endpoint allows you to retrieve a list of designs already stored in your Design Library**. A GET request to `/designs` will return a list of your existing designs. This endpoint will not return the pre-built Twilio SendGrid designs. Pre-built designs can be retrieved using the `/designs/pre-builts` endpoint, which is detailed below. By default, you will receive 100 results per request; however, you can modify the number of results returned by passing an integer to the `page_size` query parameter. +func (c *ApiService) ListDesign(params *ListDesignParam) (interface{}, error) { + path := "/v3/designs" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + if params != nil && params.PageToken != nil { + data.Set("page_token", *params.PageToken) + } + if params != nil && params.Summary != nil { + data.Set("summary", fmt.Sprint(*params.Summary)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListDesign200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_designs/api_list_pre_built_design.go b/rest/api/v3/mc_designs/api_list_pre_built_design.go new file mode 100644 index 00000000..2416565f --- /dev/null +++ b/rest/api/v3/mc_designs/api_list_pre_built_design.go @@ -0,0 +1,78 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListPreBuiltDesignParam struct { + // number of results to return + PageSize *int32 `json:"page_size,omitempty"` + // token corresponding to a specific page of results, as provided by metadata + PageToken *string `json:"page_token,omitempty"` + // set to false to return all fields + Summary *bool `json:"summary,omitempty"` +} + +func (params *ListPreBuiltDesignParam) SetPageSize(PageSize int32) *ListPreBuiltDesignParam { + params.PageSize = &PageSize + return params +} +func (params *ListPreBuiltDesignParam) SetPageToken(PageToken string) *ListPreBuiltDesignParam { + params.PageToken = &PageToken + return params +} +func (params *ListPreBuiltDesignParam) SetSummary(Summary bool) *ListPreBuiltDesignParam { + params.Summary = &Summary + return params +} + +// **This endpoint allows you to retrieve a list of pre-built designs provided by Twilio SendGrid**. Unlike the `/designs` endpoint where *your* designs are stored, a GET request made to `designs/pre-builts` will retrieve a list of the pre-built Twilio SendGrid designs. This endpoint will not return the designs stored in your Design Library. By default, you will receive 100 results per request; however, you can modify the number of results returned by passing an integer to the `page_size` query parameter. This endpoint is useful for retrieving the IDs of Twilio SendGrid designs that you want to duplicate and modify. +func (c *ApiService) ListPreBuiltDesign(params *ListPreBuiltDesignParam) (interface{}, error) { + path := "/v3/designs/pre-builts" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + if params != nil && params.PageToken != nil { + data.Set("page_token", *params.PageToken) + } + if params != nil && params.Summary != nil { + data.Set("summary", fmt.Sprint(*params.Summary)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListDesign200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_designs/api_service.go b/rest/api/v3/mc_designs/api_service.go new file mode 100644 index 00000000..d0bf8bbe --- /dev/null +++ b/rest/api/v3/mc_designs/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/mc_designs/api_update_design.go b/rest/api/v3/mc_designs/api_update_design.go new file mode 100644 index 00000000..3b1122bc --- /dev/null +++ b/rest/api/v3/mc_designs/api_update_design.go @@ -0,0 +1,91 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type UpdateDesignParam struct { + // The ID of the Design you want to duplicate. + Id *string `json:"id"` + // + UpdateDesignRequest *UpdateDesignRequest `json:"UpdateDesignRequest,omitempty"` +} + +func (params *UpdateDesignParam) SetId(Id string) *UpdateDesignParam { + params.Id = &Id + return params +} +func (params *UpdateDesignParam) SetUpdateDesignRequest(UpdateDesignRequest UpdateDesignRequest) *UpdateDesignParam { + params.UpdateDesignRequest = &UpdateDesignRequest + return params +} + +// **This endpoint allows you to edit a design**. The Design API supports PATCH requests, which allow you to make partial updates to a single design. Passing data to a specific field will update only the data stored in that field; all other fields will be unaltered. For example, updating a design's name requires that you make a PATCH request to this endpoint with data specified for the `name` field only. ``` { \"name\": \"\" } ``` +func (c *ApiService) UpdateDesign(params *UpdateDesignParam) (interface{}, error) { + path := "/v3/designs/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateDesignRequest != nil { + b, err := json.Marshal(*params.UpdateDesignRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &DesignOutput{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ApiErrors{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ApiErrors{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_designs/docs/ApiError.md b/rest/api/v3/mc_designs/docs/ApiError.md new file mode 100644 index 00000000..65ebab4d --- /dev/null +++ b/rest/api/v3/mc_designs/docs/ApiError.md @@ -0,0 +1,13 @@ +# ApiError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | | +**Field** | **string** | | +**ErrorId** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_designs/docs/ApiErrors.md b/rest/api/v3/mc_designs/docs/ApiErrors.md new file mode 100644 index 00000000..9228c171 --- /dev/null +++ b/rest/api/v3/mc_designs/docs/ApiErrors.md @@ -0,0 +1,11 @@ +# ApiErrors + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ApiError**](ApiError.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_designs/docs/CreateDesign.md b/rest/api/v3/mc_designs/docs/CreateDesign.md new file mode 100644 index 00000000..87211de3 --- /dev/null +++ b/rest/api/v3/mc_designs/docs/CreateDesign.md @@ -0,0 +1,48 @@ +# CreateDesign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateDesign**](CreateDesign.md#CreateDesign) | **Post** /v3/designs | Create Design + + + +## CreateDesign + +> DesignOutput CreateDesign(ctx, optional) + +Create Design + +**This endpoint allows you to create a new design**. You can add a new design by passing data, including a string of HTML email content, to `/designs`. When creating designs from scratch, be aware of the styling constraints inherent to many email clients. For a list of best practices, see our guide to [Cross-Platform Email Design](https://sendgrid.com/docs/ui/sending-email/cross-platform-html-design/). The Design Library can also convert your design’s HTML elements into drag and drop modules that are editable in the Designs Library user interface. For more, visit the [Design and Code Editor documentation](https://sendgrid.com/docs/ui/sending-email/editor/#drag--drop-markup). Because the `/designs` endpoint makes it easy to add designs, you can create a design with your preferred tooling or migrate designs you already own without relying on the Design Library UI. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateDesignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**DesignInput** | [**DesignInput**](DesignInput.md) | + +### Return type + +[**DesignOutput**](DesignOutput.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_designs/docs/DeleteDesign.md b/rest/api/v3/mc_designs/docs/DeleteDesign.md new file mode 100644 index 00000000..8b46426a --- /dev/null +++ b/rest/api/v3/mc_designs/docs/DeleteDesign.md @@ -0,0 +1,51 @@ +# DeleteDesign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteDesign**](DeleteDesign.md#DeleteDesign) | **Delete** /v3/designs/{Id} | Delete Design + + + +## DeleteDesign + +> map[string]interface{} DeleteDesign(ctx, Id) + +Delete Design + +**This endpoint allows you to delete a single design**. Be sure to check the ID of the design you intend to delete before making this request; deleting a design is a permanent action. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the Design you want to duplicate. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteDesignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_designs/docs/DesignCommonProperties.md b/rest/api/v3/mc_designs/docs/DesignCommonProperties.md new file mode 100644 index 00000000..70dfa399 --- /dev/null +++ b/rest/api/v3/mc_designs/docs/DesignCommonProperties.md @@ -0,0 +1,15 @@ +# DesignCommonProperties + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the new design. |[optional] [default to "Duplicate: "] +**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] +**GeneratePlainContent** | **bool** | If true, plain_content is always generated from html_content. If false, plain_content is not altered. |[optional] [default to true] +**Subject** | **string** | Subject of the Design. |[optional] +**Categories** | **[]string** | The list of categories applied to the design |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_designs/docs/DesignDuplicateInput.md b/rest/api/v3/mc_designs/docs/DesignDuplicateInput.md new file mode 100644 index 00000000..db86680e --- /dev/null +++ b/rest/api/v3/mc_designs/docs/DesignDuplicateInput.md @@ -0,0 +1,12 @@ +# DesignDuplicateInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the new design. |[optional] [default to "Duplicate: "] +**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_designs/docs/DesignInput.md b/rest/api/v3/mc_designs/docs/DesignInput.md new file mode 100644 index 00000000..3413ae98 --- /dev/null +++ b/rest/api/v3/mc_designs/docs/DesignInput.md @@ -0,0 +1,14 @@ +# DesignInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the new design. |[optional] [default to "Duplicate: "] +**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] +**HtmlContent** | **string** | The HTML content of the Design. | +**PlainContent** | **string** | Plain text content of the Design. |[optional] [default to ""] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_designs/docs/DesignOutput.md b/rest/api/v3/mc_designs/docs/DesignOutput.md new file mode 100644 index 00000000..f80ba304 --- /dev/null +++ b/rest/api/v3/mc_designs/docs/DesignOutput.md @@ -0,0 +1,14 @@ +# DesignOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the new design. |[optional] [default to "Duplicate: "] +**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] +**HtmlContent** | **string** | The HTML content of the Design. | +**PlainContent** | **string** | Plain text content of the Design. |[optional] [default to ""] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_designs/docs/DesignOutputSummary.md b/rest/api/v3/mc_designs/docs/DesignOutputSummary.md new file mode 100644 index 00000000..5a0c0a76 --- /dev/null +++ b/rest/api/v3/mc_designs/docs/DesignOutputSummary.md @@ -0,0 +1,16 @@ +# DesignOutputSummary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | ID of the Design. |[optional] +**UpdatedAt** | **string** | Datetime that Design was last updated. |[optional] +**CreatedAt** | **string** | Datetime that Design was created. |[optional] +**ThumbnailUrl** | **string** | A Thumbnail preview of the template's html content. |[optional] +**Name** | **string** | The name of the new design. |[optional] [default to "Duplicate: "] +**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_designs/docs/DuplicateDesign.md b/rest/api/v3/mc_designs/docs/DuplicateDesign.md new file mode 100644 index 00000000..2496e786 --- /dev/null +++ b/rest/api/v3/mc_designs/docs/DuplicateDesign.md @@ -0,0 +1,52 @@ +# DuplicateDesign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DuplicateDesign**](DuplicateDesign.md#DuplicateDesign) | **Post** /v3/designs/{Id} | Duplicate Design + + + +## DuplicateDesign + +> DesignOutput DuplicateDesign(ctx, Idoptional) + +Duplicate Design + +**This endpoint allows you to duplicate one of your existing designs**. Modifying an existing design is often the easiest way to create something new. You are not required to pass any data in the body of a request to this endpoint. If you choose to leave the `name` field blank, your duplicate will be assigned the name of the design it was copied from with the text \"Duplicate: \" prepended to it. This name change is only a convenience, as the duplicate will be assigned a unique ID that differentiates it from your other designs. You can modify your duplicate’s name at the time of creation by passing an updated value to the `name` field when making the initial request. More on retrieving design IDs can be found below. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the Design you want to duplicate. + +### Other Parameters + +Other parameters are passed through a pointer to a DuplicateDesignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**DesignDuplicateInput** | [**DesignDuplicateInput**](DesignDuplicateInput.md) | + +### Return type + +[**DesignOutput**](DesignOutput.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_designs/docs/DuplicatePreBuiltDesign.md b/rest/api/v3/mc_designs/docs/DuplicatePreBuiltDesign.md new file mode 100644 index 00000000..9d8e805f --- /dev/null +++ b/rest/api/v3/mc_designs/docs/DuplicatePreBuiltDesign.md @@ -0,0 +1,52 @@ +# DuplicatePreBuiltDesign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DuplicatePreBuiltDesign**](DuplicatePreBuiltDesign.md#DuplicatePreBuiltDesign) | **Post** /v3/designs/pre-builts/{Id} | Duplicate SendGrid Pre-built Design + + + +## DuplicatePreBuiltDesign + +> DesignOutput DuplicatePreBuiltDesign(ctx, Idoptional) + +Duplicate SendGrid Pre-built Design + +**This endpoint allows you to duplicate one of the pre-built Twilio SendGrid designs**. Like duplicating one of your existing designs, you are not required to pass any data in the body of a request to this endpoint. If you choose to leave the `name` field blank, your duplicate will be assigned the name of the design it was copied from with the text \"Duplicate: \" prepended to it. This name change is only a convenience, as the duplicate design will be assigned a unique ID that differentiates it from your other designs. You can retrieve the IDs for Twilio SendGrid pre-built designs using the \"List SendGrid Pre-built Designs\" endpoint. You can modify your duplicate’s name at the time of creation by passing an updated value to the `name` field when making the initial request. More on retrieving design IDs can be found above. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the pre-built Design you want to duplicate. + +### Other Parameters + +Other parameters are passed through a pointer to a DuplicatePreBuiltDesignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**DesignDuplicateInput** | [**DesignDuplicateInput**](DesignDuplicateInput.md) | + +### Return type + +[**DesignOutput**](DesignOutput.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_designs/docs/Editor.md b/rest/api/v3/mc_designs/docs/Editor.md new file mode 100644 index 00000000..9d170841 --- /dev/null +++ b/rest/api/v3/mc_designs/docs/Editor.md @@ -0,0 +1,13 @@ +# Editor + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**CODE** | string | (value: `"code"`) +**DESIGN** | string | (value: `"design"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_designs/docs/GetDesign.md b/rest/api/v3/mc_designs/docs/GetDesign.md new file mode 100644 index 00000000..8bd1d16c --- /dev/null +++ b/rest/api/v3/mc_designs/docs/GetDesign.md @@ -0,0 +1,51 @@ +# GetDesign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetDesign**](GetDesign.md#GetDesign) | **Get** /v3/designs/{Id} | Get Design + + + +## GetDesign + +> DesignOutput GetDesign(ctx, Id) + +Get Design + +**This endpoint allows you to retrieve a single design**. A GET request to `/designs/{id}` will retrieve details about a specific design in your Design Library. This endpoint is valuable when retrieving information stored in a field that you wish to update using a PATCH request. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the Design you want to duplicate. + +### Other Parameters + +Other parameters are passed through a pointer to a GetDesignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**DesignOutput**](DesignOutput.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_designs/docs/GetPreBuiltDesign.md b/rest/api/v3/mc_designs/docs/GetPreBuiltDesign.md new file mode 100644 index 00000000..e49acc07 --- /dev/null +++ b/rest/api/v3/mc_designs/docs/GetPreBuiltDesign.md @@ -0,0 +1,51 @@ +# GetPreBuiltDesign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetPreBuiltDesign**](GetPreBuiltDesign.md#GetPreBuiltDesign) | **Get** /v3/designs/pre-builts/{Id} | Get SendGrid Pre-built Design + + + +## GetPreBuiltDesign + +> DesignOutput GetPreBuiltDesign(ctx, Id) + +Get SendGrid Pre-built Design + +**This endpoint allows you to retrieve a single pre-built design**. A GET request to `/designs/pre-builts/{id}` will retrieve details about a specific pre-built design. This endpoint is valuable when retrieving details about a pre-built design that you wish to duplicate and modify. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the pre-built Design you want to duplicate. + +### Other Parameters + +Other parameters are passed through a pointer to a GetPreBuiltDesignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**DesignOutput**](DesignOutput.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_designs/docs/ListDesign.md b/rest/api/v3/mc_designs/docs/ListDesign.md new file mode 100644 index 00000000..f1677008 --- /dev/null +++ b/rest/api/v3/mc_designs/docs/ListDesign.md @@ -0,0 +1,50 @@ +# ListDesign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListDesign**](ListDesign.md#ListDesign) | **Get** /v3/designs | List Designs + + + +## ListDesign + +> ListDesign200Response ListDesign(ctx, optional) + +List Designs + +**This endpoint allows you to retrieve a list of designs already stored in your Design Library**. A GET request to `/designs` will return a list of your existing designs. This endpoint will not return the pre-built Twilio SendGrid designs. Pre-built designs can be retrieved using the `/designs/pre-builts` endpoint, which is detailed below. By default, you will receive 100 results per request; however, you can modify the number of results returned by passing an integer to the `page_size` query parameter. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListDesignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**PageSize** | **int32** | number of results to return +**PageToken** | **string** | token corresponding to a specific page of results, as provided by metadata +**Summary** | **bool** | set to false to return all fields + +### Return type + +[**ListDesign200Response**](ListDesign200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_designs/docs/ListDesign200Response.md b/rest/api/v3/mc_designs/docs/ListDesign200Response.md new file mode 100644 index 00000000..32f31512 --- /dev/null +++ b/rest/api/v3/mc_designs/docs/ListDesign200Response.md @@ -0,0 +1,12 @@ +# ListDesign200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]DesignOutputSummary**](DesignOutputSummary.md) | |[optional] +**Metadata** | [**Metadata**](Metadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_designs/docs/ListPreBuiltDesign.md b/rest/api/v3/mc_designs/docs/ListPreBuiltDesign.md new file mode 100644 index 00000000..0b635daa --- /dev/null +++ b/rest/api/v3/mc_designs/docs/ListPreBuiltDesign.md @@ -0,0 +1,50 @@ +# ListPreBuiltDesign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListPreBuiltDesign**](ListPreBuiltDesign.md#ListPreBuiltDesign) | **Get** /v3/designs/pre-builts | List SendGrid Pre-built Designs + + + +## ListPreBuiltDesign + +> ListDesign200Response ListPreBuiltDesign(ctx, optional) + +List SendGrid Pre-built Designs + +**This endpoint allows you to retrieve a list of pre-built designs provided by Twilio SendGrid**. Unlike the `/designs` endpoint where *your* designs are stored, a GET request made to `designs/pre-builts` will retrieve a list of the pre-built Twilio SendGrid designs. This endpoint will not return the designs stored in your Design Library. By default, you will receive 100 results per request; however, you can modify the number of results returned by passing an integer to the `page_size` query parameter. This endpoint is useful for retrieving the IDs of Twilio SendGrid designs that you want to duplicate and modify. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListPreBuiltDesignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**PageSize** | **int32** | number of results to return +**PageToken** | **string** | token corresponding to a specific page of results, as provided by metadata +**Summary** | **bool** | set to false to return all fields + +### Return type + +[**ListDesign200Response**](ListDesign200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_designs/docs/Metadata.md b/rest/api/v3/mc_designs/docs/Metadata.md new file mode 100644 index 00000000..6121300c --- /dev/null +++ b/rest/api/v3/mc_designs/docs/Metadata.md @@ -0,0 +1,14 @@ +# Metadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prev** | **string** | |[optional] +**Self** | **string** | |[optional] +**Next** | **string** | |[optional] +**Count** | **int32** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_designs/docs/UpdateDesign.md b/rest/api/v3/mc_designs/docs/UpdateDesign.md new file mode 100644 index 00000000..e7385735 --- /dev/null +++ b/rest/api/v3/mc_designs/docs/UpdateDesign.md @@ -0,0 +1,52 @@ +# UpdateDesign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateDesign**](UpdateDesign.md#UpdateDesign) | **Patch** /v3/designs/{Id} | Update Design + + + +## UpdateDesign + +> DesignOutput UpdateDesign(ctx, Idoptional) + +Update Design + +**This endpoint allows you to edit a design**. The Design API supports PATCH requests, which allow you to make partial updates to a single design. Passing data to a specific field will update only the data stored in that field; all other fields will be unaltered. For example, updating a design's name requires that you make a PATCH request to this endpoint with data specified for the `name` field only. ``` { \"name\": \"\" } ``` + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the Design you want to duplicate. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateDesignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**UpdateDesignRequest** | [**UpdateDesignRequest**](UpdateDesignRequest.md) | + +### Return type + +[**DesignOutput**](DesignOutput.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_designs/docs/UpdateDesignRequest.md b/rest/api/v3/mc_designs/docs/UpdateDesignRequest.md new file mode 100644 index 00000000..2187c51b --- /dev/null +++ b/rest/api/v3/mc_designs/docs/UpdateDesignRequest.md @@ -0,0 +1,16 @@ +# UpdateDesignRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the Design. |[optional] [default to "My Design"] +**HtmlContent** | **string** | The HTML content of the Design. |[optional] +**PlainContent** | **string** | Plain text content of the Design. |[optional] [default to ""] +**GeneratePlainContent** | **bool** | If true, plain_content is always generated from html_content. If false, plain_content is not altered. |[optional] [default to true] +**Subject** | **string** | Subject of the Design. |[optional] +**Categories** | **[]string** | The list of categories applied to the design |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_designs/model_api_error.go b/rest/api/v3/mc_designs/model_api_error.go new file mode 100644 index 00000000..9dbc10bb --- /dev/null +++ b/rest/api/v3/mc_designs/model_api_error.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ApiError struct for ApiError +type ApiError struct { + Message string `json:"message"` + Field string `json:"field"` + ErrorId string `json:"error_id"` +} diff --git a/rest/api/v3/mc_designs/model_api_errors.go b/rest/api/v3/mc_designs/model_api_errors.go new file mode 100644 index 00000000..eedccc2a --- /dev/null +++ b/rest/api/v3/mc_designs/model_api_errors.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ApiErrors struct for ApiErrors +type ApiErrors struct { + Errors *[]ApiError `json:"errors,omitempty"` +} diff --git a/rest/api/v3/mc_designs/model_design_common_properties.go b/rest/api/v3/mc_designs/model_design_common_properties.go new file mode 100644 index 00000000..fc498689 --- /dev/null +++ b/rest/api/v3/mc_designs/model_design_common_properties.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DesignCommonProperties struct for DesignCommonProperties +type DesignCommonProperties struct { + // The name of the new design. + Name *string `json:"name,omitempty"` + // The editor used in the UI. + Editor *Editor `json:"editor,omitempty"` + // If true, plain_content is always generated from html_content. If false, plain_content is not altered. + GeneratePlainContent *bool `json:"generate_plain_content,omitempty"` + // Subject of the Design. + Subject *string `json:"subject,omitempty"` + // The list of categories applied to the design + Categories *[]string `json:"categories,omitempty"` +} diff --git a/rest/api/v3/mc_designs/model_design_duplicate_input.go b/rest/api/v3/mc_designs/model_design_duplicate_input.go new file mode 100644 index 00000000..19eac8f3 --- /dev/null +++ b/rest/api/v3/mc_designs/model_design_duplicate_input.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DesignDuplicateInput struct for DesignDuplicateInput +type DesignDuplicateInput struct { + // The name of the new design. + Name *string `json:"name,omitempty"` + // The editor used in the UI. + Editor *Editor `json:"editor,omitempty"` +} diff --git a/rest/api/v3/mc_designs/model_design_input.go b/rest/api/v3/mc_designs/model_design_input.go new file mode 100644 index 00000000..a64b5bf3 --- /dev/null +++ b/rest/api/v3/mc_designs/model_design_input.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DesignInput struct for DesignInput +type DesignInput struct { + // The name of the new design. + Name *string `json:"name,omitempty"` + // The editor used in the UI. + Editor *Editor `json:"editor,omitempty"` + // The HTML content of the Design. + HtmlContent string `json:"html_content"` + // Plain text content of the Design. + PlainContent *string `json:"plain_content,omitempty"` +} diff --git a/rest/api/v3/mc_designs/model_design_output.go b/rest/api/v3/mc_designs/model_design_output.go new file mode 100644 index 00000000..3cb19435 --- /dev/null +++ b/rest/api/v3/mc_designs/model_design_output.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DesignOutput struct for DesignOutput +type DesignOutput struct { + // The name of the new design. + Name *string `json:"name,omitempty"` + // The editor used in the UI. + Editor *Editor `json:"editor,omitempty"` + // The HTML content of the Design. + HtmlContent string `json:"html_content"` + // Plain text content of the Design. + PlainContent *string `json:"plain_content,omitempty"` +} diff --git a/rest/api/v3/mc_designs/model_design_output_summary.go b/rest/api/v3/mc_designs/model_design_output_summary.go new file mode 100644 index 00000000..00b619d3 --- /dev/null +++ b/rest/api/v3/mc_designs/model_design_output_summary.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DesignOutputSummary struct for DesignOutputSummary +type DesignOutputSummary struct { + // ID of the Design. + Id *string `json:"id,omitempty"` + // Datetime that Design was last updated. + UpdatedAt *string `json:"updated_at,omitempty"` + // Datetime that Design was created. + CreatedAt *string `json:"created_at,omitempty"` + // A Thumbnail preview of the template's html content. + ThumbnailUrl *string `json:"thumbnail_url,omitempty"` + // The name of the new design. + Name *string `json:"name,omitempty"` + // The editor used in the UI. + Editor *Editor `json:"editor,omitempty"` +} diff --git a/rest/api/v3/mc_designs/model_editor.go b/rest/api/v3/mc_designs/model_editor.go new file mode 100644 index 00000000..b5fba7d6 --- /dev/null +++ b/rest/api/v3/mc_designs/model_editor.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Editor the model 'Editor' +type Editor string + +// List of Editor +const ( + EDITOR_CODE Editor = "code" + EDITOR_DESIGN Editor = "design" +) diff --git a/rest/api/v3/mc_designs/model_list_design_200_response.go b/rest/api/v3/mc_designs/model_list_design_200_response.go new file mode 100644 index 00000000..e2c23197 --- /dev/null +++ b/rest/api/v3/mc_designs/model_list_design_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListDesign200Response struct for ListDesign200Response +type ListDesign200Response struct { + Result *[]DesignOutputSummary `json:"result,omitempty"` + Metadata *Metadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/mc_designs/model_metadata.go b/rest/api/v3/mc_designs/model_metadata.go new file mode 100644 index 00000000..3d1281ea --- /dev/null +++ b/rest/api/v3/mc_designs/model_metadata.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Metadata struct for Metadata +type Metadata struct { + Prev *string `json:"prev,omitempty"` + Self *string `json:"self,omitempty"` + Next *string `json:"next,omitempty"` + Count *int32 `json:"count,omitempty"` +} diff --git a/rest/api/v3/mc_designs/model_update_design_request.go b/rest/api/v3/mc_designs/model_update_design_request.go new file mode 100644 index 00000000..b25a0cbe --- /dev/null +++ b/rest/api/v3/mc_designs/model_update_design_request.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateDesignRequest struct for UpdateDesignRequest +type UpdateDesignRequest struct { + // Name of the Design. + Name *string `json:"name,omitempty"` + // The HTML content of the Design. + HtmlContent *string `json:"html_content,omitempty"` + // Plain text content of the Design. + PlainContent *string `json:"plain_content,omitempty"` + // If true, plain_content is always generated from html_content. If false, plain_content is not altered. + GeneratePlainContent *bool `json:"generate_plain_content,omitempty"` + // Subject of the Design. + Subject *string `json:"subject,omitempty"` + // The list of categories applied to the design + Categories *[]string `json:"categories,omitempty"` +} diff --git a/rest/api/v3/mc_lists/.openapi-generator b/rest/api/v3/mc_lists/.openapi-generator new file mode 100644 index 00000000..8033448a --- /dev/null +++ b/rest/api/v3/mc_lists/.openapi-generator @@ -0,0 +1,45 @@ +.openapi-generator +README.md +api_create_marketing_list.go +api_delete_contact.go +api_delete_marketing_list.go +api_get_marketing_list.go +api_list_contact_count.go +api_list_marketing_list.go +api_service.go +api_update_marketing_list.go +docs/ContactDetails.md +docs/CreateMarketingList.md +docs/CreateMarketingList400Response.md +docs/CreateMarketingListRequest.md +docs/DeleteContact.md +docs/DeleteContact202Response.md +docs/DeleteMarketingList.md +docs/DeleteMarketingList200Response.md +docs/DeleteMarketingList404Response.md +docs/Error.md +docs/GetMarketingList.md +docs/GetMarketingList200Response.md +docs/List.md +docs/ListContactCount.md +docs/ListContactCount200Response.md +docs/ListMarketingList.md +docs/ListMarketingList200Response.md +docs/Metadata.md +docs/SelfMetadata.md +docs/UpdateMarketingList.md +docs/UpdateMarketingListRequest.md +model_contact_details.go +model_create_marketing_list_400_response.go +model_create_marketing_list_request.go +model_delete_contact_202_response.go +model_delete_marketing_list_200_response.go +model_delete_marketing_list_404_response.go +model_error.go +model_get_marketing_list_200_response.go +model_list.go +model_list_contact_count_200_response.go +model_list_marketing_list_200_response.go +model_metadata.go +model_self_metadata.go +model_update_marketing_list_request.go diff --git a/rest/api/v3/mc_lists/.openapi-generator-ignore b/rest/api/v3/mc_lists/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/mc_lists/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/mc_lists/README.md b/rest/api/v3/mc_lists/README.md new file mode 100644 index 00000000..f4ddc383 --- /dev/null +++ b/rest/api/v3/mc_lists/README.md @@ -0,0 +1,81 @@ +# Go API client for + +The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). + +You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:44.026235+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateMarketingList* | [**CreateMarketingList**](docs/CreateMarketingList.md#createmarketinglist) | **Post** /v3/marketing/lists | Create List +*DeleteContact* | [**DeleteContact**](docs/DeleteContact.md#deletecontact) | **Delete** /v3/marketing/lists/{Id}/contacts | Remove Contacts from a List +*DeleteMarketingList* | [**DeleteMarketingList**](docs/DeleteMarketingList.md#deletemarketinglist) | **Delete** /v3/marketing/lists/{Id} | Delete a list +*GetMarketingList* | [**GetMarketingList**](docs/GetMarketingList.md#getmarketinglist) | **Get** /v3/marketing/lists/{Id} | Get a List by ID +*ListContactCount* | [**ListContactCount**](docs/ListContactCount.md#listcontactcount) | **Get** /v3/marketing/lists/{Id}/contacts/count | Get List Contact Count +*ListMarketingList* | [**ListMarketingList**](docs/ListMarketingList.md#listmarketinglist) | **Get** /v3/marketing/lists | Get All Lists +*UpdateMarketingList* | [**UpdateMarketingList**](docs/UpdateMarketingList.md#updatemarketinglist) | **Patch** /v3/marketing/lists/{Id} | Update List + + +## Documentation For Models + + - [ContactDetails](ContactDetails.md) + - [CreateMarketingList400Response](CreateMarketingList400Response.md) + - [CreateMarketingListRequest](CreateMarketingListRequest.md) + - [DeleteContact202Response](DeleteContact202Response.md) + - [DeleteMarketingList200Response](DeleteMarketingList200Response.md) + - [DeleteMarketingList404Response](DeleteMarketingList404Response.md) + - [Error](Error.md) + - [GetMarketingList200Response](GetMarketingList200Response.md) + - [List](List.md) + - [ListContactCount200Response](ListContactCount200Response.md) + - [ListMarketingList200Response](ListMarketingList200Response.md) + - [Metadata](Metadata.md) + - [SelfMetadata](SelfMetadata.md) + - [UpdateMarketingListRequest](UpdateMarketingListRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/mc_lists/api_create_marketing_list.go b/rest/api/v3/mc_lists/api_create_marketing_list.go new file mode 100644 index 00000000..2b37a5b9 --- /dev/null +++ b/rest/api/v3/mc_lists/api_create_marketing_list.go @@ -0,0 +1,72 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type CreateMarketingListParam struct { + // + CreateMarketingListRequest *CreateMarketingListRequest `json:"CreateMarketingListRequest,omitempty"` +} + +func (params *CreateMarketingListParam) SetCreateMarketingListRequest(CreateMarketingListRequest CreateMarketingListRequest) *CreateMarketingListParam { + params.CreateMarketingListRequest = &CreateMarketingListRequest + return params +} + +// **This endpoint creates a new contacts list.** Once you create a list, you can use the UI to [trigger an automation](https://sendgrid.com/docs/ui/sending-email/getting-started-with-automation/#create-an-automation) every time you add a new contact to the list. A link to the newly created object is in `_metadata`. +func (c *ApiService) CreateMarketingList(params *CreateMarketingListParam) (interface{}, error) { + path := "/v3/marketing/lists" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateMarketingListRequest != nil { + b, err := json.Marshal(*params.CreateMarketingListRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &List{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &CreateMarketingList400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_lists/api_delete_contact.go b/rest/api/v3/mc_lists/api_delete_contact.go new file mode 100644 index 00000000..70a82f48 --- /dev/null +++ b/rest/api/v3/mc_lists/api_delete_contact.go @@ -0,0 +1,78 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DeleteContactParam struct { + // Comma separated list of contact IDs that you want to remove from the specified contacts list. + ContactIds *string `json:"contact_ids"` + // The ID of the list on which you want to perform the operation. + Id *string `json:"id"` +} + +func (params *DeleteContactParam) SetContactIds(ContactIds string) *DeleteContactParam { + params.ContactIds = &ContactIds + return params +} +func (params *DeleteContactParam) SetId(Id string) *DeleteContactParam { + params.Id = &Id + return params +} + +// **This endpoint allows you to remove contacts from a given list.** The contacts will not be deleted. Only their list membership will be changed. +func (c *ApiService) DeleteContact(params *DeleteContactParam) (interface{}, error) { + path := "/v3/marketing/lists/{Id}/contacts" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.ContactIds != nil { + data.Set("contact_ids", *params.ContactIds) + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 202 { + ps := &DeleteContact202Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &Error{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_lists/api_delete_marketing_list.go b/rest/api/v3/mc_lists/api_delete_marketing_list.go new file mode 100644 index 00000000..dacef8dd --- /dev/null +++ b/rest/api/v3/mc_lists/api_delete_marketing_list.go @@ -0,0 +1,88 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type DeleteMarketingListParam struct { + // The ID of the list on which you want to perform the operation. + Id *string `json:"id"` + // Flag indicates that all contacts on the list are also to be deleted. + DeleteContacts *bool `json:"delete_contacts,omitempty"` +} + +func (params *DeleteMarketingListParam) SetId(Id string) *DeleteMarketingListParam { + params.Id = &Id + return params +} +func (params *DeleteMarketingListParam) SetDeleteContacts(DeleteContacts bool) *DeleteMarketingListParam { + params.DeleteContacts = &DeleteContacts + return params +} + +// **This endpoint allows you to deletes a specific list.** Optionally, you can also delete contacts associated to the list. The query parameter, `delete_contacts=true`, will delete the list and start an asynchronous job to delete associated contacts. +func (c *ApiService) DeleteMarketingList(params *DeleteMarketingListParam) (interface{}, error) { + path := "/v3/marketing/lists/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.DeleteContacts != nil { + data.Set("delete_contacts", fmt.Sprint(*params.DeleteContacts)) + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &DeleteMarketingList200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 204 { + s := "" + ps := &s + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &DeleteMarketingList404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_lists/api_get_marketing_list.go b/rest/api/v3/mc_lists/api_get_marketing_list.go new file mode 100644 index 00000000..ed2b8b7c --- /dev/null +++ b/rest/api/v3/mc_lists/api_get_marketing_list.go @@ -0,0 +1,79 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type GetMarketingListParam struct { + // The ID of the list on which you want to perform the operation. + Id *string `json:"id"` + // Setting this parameter to the true will cause the contact_sample to be returned + ContactSample *bool `json:"contact_sample,omitempty"` +} + +func (params *GetMarketingListParam) SetId(Id string) *GetMarketingListParam { + params.Id = &Id + return params +} +func (params *GetMarketingListParam) SetContactSample(ContactSample bool) *GetMarketingListParam { + params.ContactSample = &ContactSample + return params +} + +// **This endpoint returns data about a specific list.** Setting the optional parameter `contact_sample=true` returns the `contact_sample` in the response body. Up to 50 of the most recent contacts uploaded or attached to a list will be returned. The full contact count is also returned. +func (c *ApiService) GetMarketingList(params *GetMarketingListParam) (interface{}, error) { + path := "/v3/marketing/lists/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.ContactSample != nil { + data.Set("contact_sample", fmt.Sprint(*params.ContactSample)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetMarketingList200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &[]Error{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_lists/api_list_contact_count.go b/rest/api/v3/mc_lists/api_list_contact_count.go new file mode 100644 index 00000000..7d014e37 --- /dev/null +++ b/rest/api/v3/mc_lists/api_list_contact_count.go @@ -0,0 +1,68 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type ListContactCountParam struct { + // + Id *string `json:"id"` +} + +func (params *ListContactCountParam) SetId(Id string) *ListContactCountParam { + params.Id = &Id + return params +} + +// **This endpoint returns the number of contacts on a specific list.** +func (c *ApiService) ListContactCount(params *ListContactCountParam) (interface{}, error) { + path := "/v3/marketing/lists/{Id}/contacts/count" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListContactCount200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_lists/api_list_marketing_list.go b/rest/api/v3/mc_lists/api_list_marketing_list.go new file mode 100644 index 00000000..05140272 --- /dev/null +++ b/rest/api/v3/mc_lists/api_list_marketing_list.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListMarketingListParam struct { + // Maximum number of elements to return. Defaults to 100, returns 1000 max + PageSize *float32 `json:"page_size,omitempty"` + // + PageToken *string `json:"page_token,omitempty"` +} + +func (params *ListMarketingListParam) SetPageSize(PageSize float32) *ListMarketingListParam { + params.PageSize = &PageSize + return params +} +func (params *ListMarketingListParam) SetPageToken(PageToken string) *ListMarketingListParam { + params.PageToken = &PageToken + return params +} + +// **This endpoint returns an array of all of your contact lists.** +func (c *ApiService) ListMarketingList(params *ListMarketingListParam) (interface{}, error) { + path := "/v3/marketing/lists" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + if params != nil && params.PageToken != nil { + data.Set("page_token", *params.PageToken) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListMarketingList200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_lists/api_service.go b/rest/api/v3/mc_lists/api_service.go new file mode 100644 index 00000000..f7079e91 --- /dev/null +++ b/rest/api/v3/mc_lists/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/mc_lists/api_update_marketing_list.go b/rest/api/v3/mc_lists/api_update_marketing_list.go new file mode 100644 index 00000000..9002a687 --- /dev/null +++ b/rest/api/v3/mc_lists/api_update_marketing_list.go @@ -0,0 +1,91 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type UpdateMarketingListParam struct { + // The ID of the list on which you want to perform the operation. + Id *string `json:"id"` + // + UpdateMarketingListRequest *UpdateMarketingListRequest `json:"UpdateMarketingListRequest,omitempty"` +} + +func (params *UpdateMarketingListParam) SetId(Id string) *UpdateMarketingListParam { + params.Id = &Id + return params +} +func (params *UpdateMarketingListParam) SetUpdateMarketingListRequest(UpdateMarketingListRequest UpdateMarketingListRequest) *UpdateMarketingListParam { + params.UpdateMarketingListRequest = &UpdateMarketingListRequest + return params +} + +// **This endpoint updates the name of a list.** +func (c *ApiService) UpdateMarketingList(params *UpdateMarketingListParam) (interface{}, error) { + path := "/v3/marketing/lists/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateMarketingListRequest != nil { + b, err := json.Marshal(*params.UpdateMarketingListRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &List{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &CreateMarketingList400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_lists/docs/ContactDetails.md b/rest/api/v3/mc_lists/docs/ContactDetails.md new file mode 100644 index 00000000..0e6d5277 --- /dev/null +++ b/rest/api/v3/mc_lists/docs/ContactDetails.md @@ -0,0 +1,35 @@ +# ContactDetails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**FirstName** | **string** | |[optional] +**LastName** | **string** | |[optional] +**UniqueName** | **string** | |[optional] +**Email** | **string** | |[optional] +**PhoneNumberId** | **string** | |[optional] +**ExternalId** | **string** | |[optional] +**AnonymousId** | **string** | |[optional] +**AlternateEmails** | **[]string** | |[optional] +**AddressLine1** | **string** | |[optional] +**AddressLine2** | **string** | |[optional] +**City** | **string** | |[optional] +**StateProvinceRegion** | **string** | |[optional] +**Country** | **string** | |[optional] +**PostalCode** | **string** | |[optional] +**PhoneNumber** | **string** | |[optional] +**Whatsapp** | **string** | |[optional] +**Line** | **string** | |[optional] +**Facebook** | **string** | |[optional] +**ListIds** | **[]string** | | +**SegmentIds** | **[]string** | |[optional] +**CustomFields** | **map[string]interface{}** | |[optional] +**CreatedAt** | [**time.Time**](time.Time.md) | | +**UpdatedAt** | [**time.Time**](time.Time.md) | | +**Metadata** | [**SelfMetadata**](SelfMetadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_lists/docs/CreateMarketingList.md b/rest/api/v3/mc_lists/docs/CreateMarketingList.md new file mode 100644 index 00000000..e842327c --- /dev/null +++ b/rest/api/v3/mc_lists/docs/CreateMarketingList.md @@ -0,0 +1,48 @@ +# CreateMarketingList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateMarketingList**](CreateMarketingList.md#CreateMarketingList) | **Post** /v3/marketing/lists | Create List + + + +## CreateMarketingList + +> List CreateMarketingList(ctx, optional) + +Create List + +**This endpoint creates a new contacts list.** Once you create a list, you can use the UI to [trigger an automation](https://sendgrid.com/docs/ui/sending-email/getting-started-with-automation/#create-an-automation) every time you add a new contact to the list. A link to the newly created object is in `_metadata`. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateMarketingListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**CreateMarketingListRequest** | [**CreateMarketingListRequest**](CreateMarketingListRequest.md) | + +### Return type + +[**List**](List.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_lists/docs/CreateMarketingList400Response.md b/rest/api/v3/mc_lists/docs/CreateMarketingList400Response.md new file mode 100644 index 00000000..2e203967 --- /dev/null +++ b/rest/api/v3/mc_lists/docs/CreateMarketingList400Response.md @@ -0,0 +1,11 @@ +# CreateMarketingList400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]Error**](Error.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_lists/docs/CreateMarketingListRequest.md b/rest/api/v3/mc_lists/docs/CreateMarketingListRequest.md new file mode 100644 index 00000000..6774aa99 --- /dev/null +++ b/rest/api/v3/mc_lists/docs/CreateMarketingListRequest.md @@ -0,0 +1,11 @@ +# CreateMarketingListRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Your name for your list | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_lists/docs/DeleteContact.md b/rest/api/v3/mc_lists/docs/DeleteContact.md new file mode 100644 index 00000000..63c22e6c --- /dev/null +++ b/rest/api/v3/mc_lists/docs/DeleteContact.md @@ -0,0 +1,51 @@ +# DeleteContact + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteContact**](DeleteContact.md#DeleteContact) | **Delete** /v3/marketing/lists/{Id}/contacts | Remove Contacts from a List + + + +## DeleteContact + +> DeleteContact202Response DeleteContact(ctx, ContactIdsId) + +Remove Contacts from a List + +**This endpoint allows you to remove contacts from a given list.** The contacts will not be deleted. Only their list membership will be changed. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the list on which you want to perform the operation. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteContactParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**DeleteContact202Response**](DeleteContact202Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_lists/docs/DeleteContact202Response.md b/rest/api/v3/mc_lists/docs/DeleteContact202Response.md new file mode 100644 index 00000000..5d30a105 --- /dev/null +++ b/rest/api/v3/mc_lists/docs/DeleteContact202Response.md @@ -0,0 +1,11 @@ +# DeleteContact202Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**JobId** | **string** | job_id of the async job |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_lists/docs/DeleteMarketingList.md b/rest/api/v3/mc_lists/docs/DeleteMarketingList.md new file mode 100644 index 00000000..cc154218 --- /dev/null +++ b/rest/api/v3/mc_lists/docs/DeleteMarketingList.md @@ -0,0 +1,52 @@ +# DeleteMarketingList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteMarketingList**](DeleteMarketingList.md#DeleteMarketingList) | **Delete** /v3/marketing/lists/{Id} | Delete a list + + + +## DeleteMarketingList + +> DeleteMarketingList200Response DeleteMarketingList(ctx, Idoptional) + +Delete a list + +**This endpoint allows you to deletes a specific list.** Optionally, you can also delete contacts associated to the list. The query parameter, `delete_contacts=true`, will delete the list and start an asynchronous job to delete associated contacts. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the list on which you want to perform the operation. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteMarketingListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**DeleteContacts** | **bool** | Flag indicates that all contacts on the list are also to be deleted. + +### Return type + +[**DeleteMarketingList200Response**](DeleteMarketingList200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_lists/docs/DeleteMarketingList200Response.md b/rest/api/v3/mc_lists/docs/DeleteMarketingList200Response.md new file mode 100644 index 00000000..522ea6c4 --- /dev/null +++ b/rest/api/v3/mc_lists/docs/DeleteMarketingList200Response.md @@ -0,0 +1,11 @@ +# DeleteMarketingList200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**JobId** | **string** | job_id of the async job |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_lists/docs/DeleteMarketingList404Response.md b/rest/api/v3/mc_lists/docs/DeleteMarketingList404Response.md new file mode 100644 index 00000000..a4ca0ac5 --- /dev/null +++ b/rest/api/v3/mc_lists/docs/DeleteMarketingList404Response.md @@ -0,0 +1,11 @@ +# DeleteMarketingList404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | **[]map[string]interface{}** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_lists/docs/Error.md b/rest/api/v3/mc_lists/docs/Error.md new file mode 100644 index 00000000..e8d3a6f9 --- /dev/null +++ b/rest/api/v3/mc_lists/docs/Error.md @@ -0,0 +1,14 @@ +# Error + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | | +**Field** | **string** | |[optional] +**ErrorId** | **string** | |[optional] +**Parameter** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_lists/docs/GetMarketingList.md b/rest/api/v3/mc_lists/docs/GetMarketingList.md new file mode 100644 index 00000000..31285c58 --- /dev/null +++ b/rest/api/v3/mc_lists/docs/GetMarketingList.md @@ -0,0 +1,52 @@ +# GetMarketingList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetMarketingList**](GetMarketingList.md#GetMarketingList) | **Get** /v3/marketing/lists/{Id} | Get a List by ID + + + +## GetMarketingList + +> GetMarketingList200Response GetMarketingList(ctx, Idoptional) + +Get a List by ID + +**This endpoint returns data about a specific list.** Setting the optional parameter `contact_sample=true` returns the `contact_sample` in the response body. Up to 50 of the most recent contacts uploaded or attached to a list will be returned. The full contact count is also returned. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the list on which you want to perform the operation. + +### Other Parameters + +Other parameters are passed through a pointer to a GetMarketingListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**ContactSample** | **bool** | Setting this parameter to the true will cause the contact_sample to be returned + +### Return type + +[**GetMarketingList200Response**](GetMarketingList200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_lists/docs/GetMarketingList200Response.md b/rest/api/v3/mc_lists/docs/GetMarketingList200Response.md new file mode 100644 index 00000000..c3f85dc0 --- /dev/null +++ b/rest/api/v3/mc_lists/docs/GetMarketingList200Response.md @@ -0,0 +1,15 @@ +# GetMarketingList200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The generated ID for your list. |[optional] +**Name** | **string** | The name you gave your list. |[optional] +**ContactCount** | **int32** | The number of contacts currently stored on the list. |[optional] +**Metadata** | [**SelfMetadata**](SelfMetadata.md) | |[optional] +**ContactSample** | [**ContactDetails**](ContactDetails.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_lists/docs/List.md b/rest/api/v3/mc_lists/docs/List.md new file mode 100644 index 00000000..7941f244 --- /dev/null +++ b/rest/api/v3/mc_lists/docs/List.md @@ -0,0 +1,14 @@ +# List + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The generated ID for your list. |[optional] +**Name** | **string** | The name you gave your list. |[optional] +**ContactCount** | **int32** | The number of contacts currently stored on the list. |[optional] +**Metadata** | [**SelfMetadata**](SelfMetadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_lists/docs/ListContactCount.md b/rest/api/v3/mc_lists/docs/ListContactCount.md new file mode 100644 index 00000000..2e65fc61 --- /dev/null +++ b/rest/api/v3/mc_lists/docs/ListContactCount.md @@ -0,0 +1,51 @@ +# ListContactCount + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListContactCount**](ListContactCount.md#ListContactCount) | **Get** /v3/marketing/lists/{Id}/contacts/count | Get List Contact Count + + + +## ListContactCount + +> ListContactCount200Response ListContactCount(ctx, Id) + +Get List Contact Count + +**This endpoint returns the number of contacts on a specific list.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a ListContactCountParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**ListContactCount200Response**](ListContactCount200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_lists/docs/ListContactCount200Response.md b/rest/api/v3/mc_lists/docs/ListContactCount200Response.md new file mode 100644 index 00000000..aebf7d3e --- /dev/null +++ b/rest/api/v3/mc_lists/docs/ListContactCount200Response.md @@ -0,0 +1,12 @@ +# ListContactCount200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ContactCount** | **int32** | |[optional] +**BillableCount** | **int32** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_lists/docs/ListMarketingList.md b/rest/api/v3/mc_lists/docs/ListMarketingList.md new file mode 100644 index 00000000..87a1ce7b --- /dev/null +++ b/rest/api/v3/mc_lists/docs/ListMarketingList.md @@ -0,0 +1,49 @@ +# ListMarketingList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListMarketingList**](ListMarketingList.md#ListMarketingList) | **Get** /v3/marketing/lists | Get All Lists + + + +## ListMarketingList + +> ListMarketingList200Response ListMarketingList(ctx, optional) + +Get All Lists + +**This endpoint returns an array of all of your contact lists.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListMarketingListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**PageSize** | **float32** | Maximum number of elements to return. Defaults to 100, returns 1000 max +**PageToken** | **string** | + +### Return type + +[**ListMarketingList200Response**](ListMarketingList200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_lists/docs/ListMarketingList200Response.md b/rest/api/v3/mc_lists/docs/ListMarketingList200Response.md new file mode 100644 index 00000000..cfe95bb0 --- /dev/null +++ b/rest/api/v3/mc_lists/docs/ListMarketingList200Response.md @@ -0,0 +1,12 @@ +# ListMarketingList200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]List**](List.md) | |[optional] +**Metadata** | [**Metadata**](Metadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_lists/docs/Metadata.md b/rest/api/v3/mc_lists/docs/Metadata.md new file mode 100644 index 00000000..79ca153c --- /dev/null +++ b/rest/api/v3/mc_lists/docs/Metadata.md @@ -0,0 +1,14 @@ +# Metadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prev** | **string** | The URL of the previous page of results. If this field isn't present, you're at the start of the list. |[optional] +**Self** | **string** | The URL of the current page of results. |[optional] +**Next** | **string** | The URL of the next page of results. If this field isn't present, you're at the end of the list. |[optional] +**Count** | **float32** | The number of items in the entire list, i.e., across all pages. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_lists/docs/SelfMetadata.md b/rest/api/v3/mc_lists/docs/SelfMetadata.md new file mode 100644 index 00000000..f5efa07a --- /dev/null +++ b/rest/api/v3/mc_lists/docs/SelfMetadata.md @@ -0,0 +1,11 @@ +# SelfMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Self** | **string** | A link to this object. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_lists/docs/UpdateMarketingList.md b/rest/api/v3/mc_lists/docs/UpdateMarketingList.md new file mode 100644 index 00000000..ed8e57ef --- /dev/null +++ b/rest/api/v3/mc_lists/docs/UpdateMarketingList.md @@ -0,0 +1,52 @@ +# UpdateMarketingList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateMarketingList**](UpdateMarketingList.md#UpdateMarketingList) | **Patch** /v3/marketing/lists/{Id} | Update List + + + +## UpdateMarketingList + +> List UpdateMarketingList(ctx, Idoptional) + +Update List + +**This endpoint updates the name of a list.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the list on which you want to perform the operation. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateMarketingListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**UpdateMarketingListRequest** | [**UpdateMarketingListRequest**](UpdateMarketingListRequest.md) | + +### Return type + +[**List**](List.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_lists/docs/UpdateMarketingListRequest.md b/rest/api/v3/mc_lists/docs/UpdateMarketingListRequest.md new file mode 100644 index 00000000..2d0bda0c --- /dev/null +++ b/rest/api/v3/mc_lists/docs/UpdateMarketingListRequest.md @@ -0,0 +1,11 @@ +# UpdateMarketingListRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Your name for your list. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_lists/model_contact_details.go b/rest/api/v3/mc_lists/model_contact_details.go new file mode 100644 index 00000000..960045e4 --- /dev/null +++ b/rest/api/v3/mc_lists/model_contact_details.go @@ -0,0 +1,47 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "time" +) + +// ContactDetails struct for ContactDetails +type ContactDetails struct { + Id string `json:"id"` + FirstName *string `json:"first_name,omitempty"` + LastName *string `json:"last_name,omitempty"` + UniqueName *string `json:"unique_name,omitempty"` + Email *string `json:"email,omitempty"` + PhoneNumberId *string `json:"phone_number_id,omitempty"` + ExternalId *string `json:"external_id,omitempty"` + AnonymousId *string `json:"anonymous_id,omitempty"` + AlternateEmails *[]string `json:"alternate_emails,omitempty"` + AddressLine1 *string `json:"address_line_1,omitempty"` + AddressLine2 *string `json:"address_line_2,omitempty"` + City *string `json:"city,omitempty"` + StateProvinceRegion *string `json:"state_province_region,omitempty"` + Country *string `json:"country,omitempty"` + PostalCode *string `json:"postal_code,omitempty"` + PhoneNumber *string `json:"phone_number,omitempty"` + Whatsapp *string `json:"whatsapp,omitempty"` + Line *string `json:"line,omitempty"` + Facebook *string `json:"facebook,omitempty"` + ListIds []string `json:"list_ids"` + SegmentIds *[]string `json:"segment_ids,omitempty"` + CustomFields *map[string]interface{} `json:"custom_fields,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + Metadata *SelfMetadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/mc_lists/model_create_marketing_list_400_response.go b/rest/api/v3/mc_lists/model_create_marketing_list_400_response.go new file mode 100644 index 00000000..f202e4ce --- /dev/null +++ b/rest/api/v3/mc_lists/model_create_marketing_list_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateMarketingList400Response struct for CreateMarketingList400Response +type CreateMarketingList400Response struct { + Errors *[]Error `json:"errors,omitempty"` +} diff --git a/rest/api/v3/mc_lists/model_create_marketing_list_request.go b/rest/api/v3/mc_lists/model_create_marketing_list_request.go new file mode 100644 index 00000000..45f22ed6 --- /dev/null +++ b/rest/api/v3/mc_lists/model_create_marketing_list_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateMarketingListRequest struct for CreateMarketingListRequest +type CreateMarketingListRequest struct { + // Your name for your list + Name string `json:"name"` +} diff --git a/rest/api/v3/mc_lists/model_delete_contact_202_response.go b/rest/api/v3/mc_lists/model_delete_contact_202_response.go new file mode 100644 index 00000000..079254f3 --- /dev/null +++ b/rest/api/v3/mc_lists/model_delete_contact_202_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteContact202Response The removal is accepted and processing. +type DeleteContact202Response struct { + // job_id of the async job + JobId *string `json:"job_id,omitempty"` +} diff --git a/rest/api/v3/mc_lists/model_delete_marketing_list_200_response.go b/rest/api/v3/mc_lists/model_delete_marketing_list_200_response.go new file mode 100644 index 00000000..9a1800d8 --- /dev/null +++ b/rest/api/v3/mc_lists/model_delete_marketing_list_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteMarketingList200Response The delete has been accepted and is processing. +type DeleteMarketingList200Response struct { + // job_id of the async job + JobId *string `json:"job_id,omitempty"` +} diff --git a/rest/api/v3/mc_lists/model_delete_marketing_list_404_response.go b/rest/api/v3/mc_lists/model_delete_marketing_list_404_response.go new file mode 100644 index 00000000..14fa0c4c --- /dev/null +++ b/rest/api/v3/mc_lists/model_delete_marketing_list_404_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteMarketingList404Response struct for DeleteMarketingList404Response +type DeleteMarketingList404Response struct { + Errors []map[string]interface{} `json:"errors"` +} diff --git a/rest/api/v3/mc_lists/model_error.go b/rest/api/v3/mc_lists/model_error.go new file mode 100644 index 00000000..60b82046 --- /dev/null +++ b/rest/api/v3/mc_lists/model_error.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Error struct for Error +type Error struct { + Message string `json:"message"` + Field *string `json:"field,omitempty"` + ErrorId *string `json:"error_id,omitempty"` + Parameter *string `json:"parameter,omitempty"` +} diff --git a/rest/api/v3/mc_lists/model_get_marketing_list_200_response.go b/rest/api/v3/mc_lists/model_get_marketing_list_200_response.go new file mode 100644 index 00000000..927ac41b --- /dev/null +++ b/rest/api/v3/mc_lists/model_get_marketing_list_200_response.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetMarketingList200Response struct for GetMarketingList200Response +type GetMarketingList200Response struct { + // The generated ID for your list. + Id *string `json:"id,omitempty"` + // The name you gave your list. + Name *string `json:"name,omitempty"` + // The number of contacts currently stored on the list. + ContactCount *int32 `json:"contact_count,omitempty"` + Metadata *SelfMetadata `json:"_metadata,omitempty"` + ContactSample *ContactDetails `json:"contact_sample,omitempty"` +} diff --git a/rest/api/v3/mc_lists/model_list.go b/rest/api/v3/mc_lists/model_list.go new file mode 100644 index 00000000..2e9d382a --- /dev/null +++ b/rest/api/v3/mc_lists/model_list.go @@ -0,0 +1,25 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// List struct for List +type List struct { + // The generated ID for your list. + Id *string `json:"id,omitempty"` + // The name you gave your list. + Name *string `json:"name,omitempty"` + // The number of contacts currently stored on the list. + ContactCount *int32 `json:"contact_count,omitempty"` + Metadata *SelfMetadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/mc_lists/model_list_contact_count_200_response.go b/rest/api/v3/mc_lists/model_list_contact_count_200_response.go new file mode 100644 index 00000000..bfb78493 --- /dev/null +++ b/rest/api/v3/mc_lists/model_list_contact_count_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListContactCount200Response struct for ListContactCount200Response +type ListContactCount200Response struct { + ContactCount *int32 `json:"contact_count,omitempty"` + BillableCount *int32 `json:"billable_count,omitempty"` +} diff --git a/rest/api/v3/mc_lists/model_list_marketing_list_200_response.go b/rest/api/v3/mc_lists/model_list_marketing_list_200_response.go new file mode 100644 index 00000000..6b652a9e --- /dev/null +++ b/rest/api/v3/mc_lists/model_list_marketing_list_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListMarketingList200Response struct for ListMarketingList200Response +type ListMarketingList200Response struct { + Result *[]List `json:"result,omitempty"` + Metadata *Metadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/mc_lists/model_metadata.go b/rest/api/v3/mc_lists/model_metadata.go new file mode 100644 index 00000000..f0c64e60 --- /dev/null +++ b/rest/api/v3/mc_lists/model_metadata.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Metadata struct for Metadata +type Metadata struct { + // The URL of the previous page of results. If this field isn't present, you're at the start of the list. + Prev *string `json:"prev,omitempty"` + // The URL of the current page of results. + Self *string `json:"self,omitempty"` + // The URL of the next page of results. If this field isn't present, you're at the end of the list. + Next *string `json:"next,omitempty"` + // The number of items in the entire list, i.e., across all pages. + Count *float32 `json:"count,omitempty"` +} diff --git a/rest/api/v3/mc_lists/model_self_metadata.go b/rest/api/v3/mc_lists/model_self_metadata.go new file mode 100644 index 00000000..9ae3c90b --- /dev/null +++ b/rest/api/v3/mc_lists/model_self_metadata.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SelfMetadata struct for SelfMetadata +type SelfMetadata struct { + // A link to this object. + Self *string `json:"self,omitempty"` +} diff --git a/rest/api/v3/mc_lists/model_update_marketing_list_request.go b/rest/api/v3/mc_lists/model_update_marketing_list_request.go new file mode 100644 index 00000000..773e8ba3 --- /dev/null +++ b/rest/api/v3/mc_lists/model_update_marketing_list_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateMarketingListRequest struct for UpdateMarketingListRequest +type UpdateMarketingListRequest struct { + // Your name for your list. + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/mc_segments/.openapi-generator b/rest/api/v3/mc_segments/.openapi-generator new file mode 100644 index 00000000..f2a5bdb3 --- /dev/null +++ b/rest/api/v3/mc_segments/.openapi-generator @@ -0,0 +1,34 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_delete_segment.go +api_get_segment.go +api_list_segment.go +api_service.go +docs/ContactResponse.md +docs/ContactResponseCustomFields.md +docs/DeleteSegment.md +docs/ErrorResponse.md +docs/ErrorResponseErrorsInner.md +docs/FullSegment.md +docs/GetSegment.md +docs/GetSegment404Response.md +docs/GetSegment404ResponseErrorsInner.md +docs/ListSegment.md +docs/ListSegment200Response.md +docs/ListSegment500Response.md +docs/ListSegment500ResponseErrorsInner.md +docs/SegmentSummary.md +docs/SegmentWriteV2.md +model_contact_response.go +model_contact_response_custom_fields.go +model_error_response.go +model_error_response_errors_inner.go +model_full_segment.go +model_get_segment_404_response.go +model_get_segment_404_response_errors_inner.go +model_list_segment_200_response.go +model_list_segment_500_response.go +model_list_segment_500_response_errors_inner.go +model_segment_summary.go +model_segment_write_v2.go diff --git a/rest/api/v3/mc_segments/.openapi-generator-ignore b/rest/api/v3/mc_segments/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/mc_segments/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/mc_segments/README.md b/rest/api/v3/mc_segments/README.md new file mode 100644 index 00000000..cbb26e0c --- /dev/null +++ b/rest/api/v3/mc_segments/README.md @@ -0,0 +1,75 @@ +# Go API client for + +This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). + +To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:44.125031+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DeleteSegment* | [**DeleteSegment**](docs/DeleteSegment.md#deletesegment) | **Delete** /v3/marketing/segments/{SegmentId} | Delete Segment +*GetSegment* | [**GetSegment**](docs/GetSegment.md#getsegment) | **Get** /v3/marketing/segments/{SegmentId} | Get Segment by ID +*ListSegment* | [**ListSegment**](docs/ListSegment.md#listsegment) | **Get** /v3/marketing/segments | Get List of Segments + + +## Documentation For Models + + - [ContactResponse](ContactResponse.md) + - [ContactResponseCustomFields](ContactResponseCustomFields.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [FullSegment](FullSegment.md) + - [GetSegment404Response](GetSegment404Response.md) + - [GetSegment404ResponseErrorsInner](GetSegment404ResponseErrorsInner.md) + - [ListSegment200Response](ListSegment200Response.md) + - [ListSegment500Response](ListSegment500Response.md) + - [ListSegment500ResponseErrorsInner](ListSegment500ResponseErrorsInner.md) + - [SegmentSummary](SegmentSummary.md) + - [SegmentWriteV2](SegmentWriteV2.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/mc_segments/api_delete_segment.go b/rest/api/v3/mc_segments/api_delete_segment.go new file mode 100644 index 00000000..1d43ee1d --- /dev/null +++ b/rest/api/v3/mc_segments/api_delete_segment.go @@ -0,0 +1,100 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DeleteSegmentParam struct { + // + SegmentId *string `json:"segment_id"` +} + +func (params *DeleteSegmentParam) SetSegmentId(SegmentId string) *DeleteSegmentParam { + params.SegmentId = &SegmentId + return params +} + +// **This endpoint allows you to delete a segment by `segment_id`.** Note that deleting a segment does not delete the contacts associated with the segment by default. Contacts associated with a deleted segment will remain in your list of all contacts and any other segments they belong to. +func (c *ApiService) DeleteSegment(params *DeleteSegmentParam) (interface{}, error) { + path := "/v3/marketing/segments/{SegmentId}" + if params != nil && params.SegmentId != nil { + path = strings.Replace(path, "{"+"SegmentId"+"}", *params.SegmentId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 202 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &GetSegment404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListSegment500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_segments/api_get_segment.go b/rest/api/v3/mc_segments/api_get_segment.go new file mode 100644 index 00000000..d63c67b9 --- /dev/null +++ b/rest/api/v3/mc_segments/api_get_segment.go @@ -0,0 +1,103 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type GetSegmentParam struct { + // + SegmentId *string `json:"segment_id"` + // Defaults to `false`. Set to `true` to return the parsed SQL AST as a JSON object in the field `query_json` + QueryJson *bool `json:"query_json,omitempty"` +} + +func (params *GetSegmentParam) SetSegmentId(SegmentId string) *GetSegmentParam { + params.SegmentId = &SegmentId + return params +} +func (params *GetSegmentParam) SetQueryJson(QueryJson bool) *GetSegmentParam { + params.QueryJson = &QueryJson + return params +} + +// **This endpoint allows you to retrieve a single segment by ID.** +func (c *ApiService) GetSegment(params *GetSegmentParam) (interface{}, error) { + path := "/v3/marketing/segments/{SegmentId}" + if params != nil && params.SegmentId != nil { + path = strings.Replace(path, "{"+"SegmentId"+"}", *params.SegmentId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.QueryJson != nil { + data.Set("query_json", fmt.Sprint(*params.QueryJson)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &FullSegment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &GetSegment404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListSegment500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_segments/api_list_segment.go b/rest/api/v3/mc_segments/api_list_segment.go new file mode 100644 index 00000000..f026f989 --- /dev/null +++ b/rest/api/v3/mc_segments/api_list_segment.go @@ -0,0 +1,119 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListSegmentParam struct { + // A list of segment IDs to retrieve. When this parameter is included, the `no_parent_list_ids` and `parent_list_ids` parameters are ignored and only segments with given IDs are returned. + Ids *[]string `json:"ids,omitempty"` + // A comma separated list of list ids to be used when searching for segments with the specified parent_list_id, no more than 50 is allowed + ParentListIds *string `json:"parent_list_ids,omitempty"` + // If set to `true` segments with an empty value of `parent_list_id` will be returned in the filter. If the value is not present it defaults to 'false'. + NoParentListId *bool `json:"no_parent_list_id,omitempty"` +} + +func (params *ListSegmentParam) SetIds(Ids []string) *ListSegmentParam { + params.Ids = &Ids + return params +} +func (params *ListSegmentParam) SetParentListIds(ParentListIds string) *ListSegmentParam { + params.ParentListIds = &ParentListIds + return params +} +func (params *ListSegmentParam) SetNoParentListId(NoParentListId bool) *ListSegmentParam { + params.NoParentListId = &NoParentListId + return params +} + +// **This endpoint allows you to retrieve a list of segments.** The query param `parent_list_ids` is treated as a filter. Any match will be returned. Zero matches will return a response code of 200 with an empty `results` array. `parent_list_ids` | `no_parent_list_id` | `ids` | `result` -----------------:|:--------------------:|:-------------:|:-------------: empty | false | empty | all segments values list_ids | false | empty | segments filtered by list_ids values list_ids |true | empty | segments filtered by list_ids and segments with no parent list_ids empty empty | true | empty | segments with no parent list_ids anything | anything | ids | segments with matching segment ids | +func (c *ApiService) ListSegment(params *ListSegmentParam) (interface{}, error) { + path := "/v3/marketing/segments" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Ids != nil { + for _, item := range *params.Ids { + v, err := json.Marshal(item) + + if err != nil { + return nil, err + } + + data.Add("ids", string(v)) + + } + } + if params != nil && params.ParentListIds != nil { + data.Set("parent_list_ids", *params.ParentListIds) + } + if params != nil && params.NoParentListId != nil { + data.Set("no_parent_list_id", fmt.Sprint(*params.NoParentListId)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListSegment200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListSegment500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_segments/api_service.go b/rest/api/v3/mc_segments/api_service.go new file mode 100644 index 00000000..b3304ebe --- /dev/null +++ b/rest/api/v3/mc_segments/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/mc_segments/docs/ContactResponse.md b/rest/api/v3/mc_segments/docs/ContactResponse.md new file mode 100644 index 00000000..0041ba2e --- /dev/null +++ b/rest/api/v3/mc_segments/docs/ContactResponse.md @@ -0,0 +1,27 @@ +# ContactResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | ID assigned to a contact when added to the system. | +**Email** | **string** | Email of the contact. This is a reserved field. |[optional] +**PhoneNumberId** | **string** | The contact's Phone Number ID. This must be a valid phone number. |[optional] +**ExternalId** | **string** | The contact's External ID. |[optional] +**AnonymousId** | **string** | The contact's Anonymous ID. |[optional] +**AlternateEmails** | **[]string** | Alternate emails of the contact. This is a reserved field. | +**FirstName** | **string** | First name of the contact. This is a reserved field. | +**LastName** | **string** | Last name of the contact. This is a reserved field. | +**AddressLine1** | **string** | First line of address of the contact. This is a reserved field. | +**AddressLine2** | **string** | Second line of address of the contact. This is a reserved field. | +**City** | **string** | City associated with the contact. This is a reserved field. | +**StateProvinceRegion** | **string** | State associated with the contact. This is a reserved field. | +**PostalCode** | **int32** | Zipcode associated with the address of the contact. This is a reserved field. | +**Country** | **string** | Country associated with the address of the contact. This is a reserved field. | +**ListIds** | **[]string** | IDs of all lists the contact is part of |[optional] +**CustomFields** | [**ContactResponseCustomFields**](ContactResponseCustomFields.md) | | +**SegmentIds** | **[]string** | IDs of all segments the contact is part of |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments/docs/ContactResponseCustomFields.md b/rest/api/v3/mc_segments/docs/ContactResponseCustomFields.md new file mode 100644 index 00000000..0fc838a2 --- /dev/null +++ b/rest/api/v3/mc_segments/docs/ContactResponseCustomFields.md @@ -0,0 +1,12 @@ +# ContactResponseCustomFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomFieldName1** | **string** | |[optional] +**CustomFieldName2** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments/docs/DeleteSegment.md b/rest/api/v3/mc_segments/docs/DeleteSegment.md new file mode 100644 index 00000000..786d0f08 --- /dev/null +++ b/rest/api/v3/mc_segments/docs/DeleteSegment.md @@ -0,0 +1,51 @@ +# DeleteSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSegment**](DeleteSegment.md#DeleteSegment) | **Delete** /v3/marketing/segments/{SegmentId} | Delete Segment + + + +## DeleteSegment + +> map[string]interface{} DeleteSegment(ctx, SegmentId) + +Delete Segment + +**This endpoint allows you to delete a segment by `segment_id`.** Note that deleting a segment does not delete the contacts associated with the segment by default. Contacts associated with a deleted segment will remain in your list of all contacts and any other segments they belong to. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SegmentId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_segments/docs/ErrorResponse.md b/rest/api/v3/mc_segments/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/mc_segments/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments/docs/ErrorResponseErrorsInner.md b/rest/api/v3/mc_segments/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/mc_segments/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments/docs/FullSegment.md b/rest/api/v3/mc_segments/docs/FullSegment.md new file mode 100644 index 00000000..f0eb54e4 --- /dev/null +++ b/rest/api/v3/mc_segments/docs/FullSegment.md @@ -0,0 +1,22 @@ +# FullSegment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**ContactsCount** | **int32** | | +**CreatedAt** | [**time.Time**](time.Time.md) | ISO8601 of created timestamp | +**Name** | **string** | Name of the segment. | +**ParentListId** | **string** | The id of the list if this segment is a child of a list. This implies the query `AND CONTAINS(list_ids, ${parent_list_id})` |[optional] +**SampleUpdatedAt** | [**time.Time**](time.Time.md) | ISO8601 timestamp the sample was last updated | +**UpdatedAt** | [**time.Time**](time.Time.md) | ISO8601 timestamp the object was last updated | +**NextSampleUpdate** | **string** | ISO8601 string that is equal to `sample_updated_at` plus an internally calculated offset that depends on how often contacts enter or exit segments as the scheduled pipeline updates the samples. |[optional] +**ContactsSample** | [**[]ContactResponse**](ContactResponse.md) | | +**QueryJson** | **map[string]interface{}** | AST representation of the query DSL |[optional] +**ParentListIds** | **[]string** | The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future |[optional] +**QueryDsl** | **string** | SQL query which will filter contacts based on the conditions provided | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments/docs/GetSegment.md b/rest/api/v3/mc_segments/docs/GetSegment.md new file mode 100644 index 00000000..c735c438 --- /dev/null +++ b/rest/api/v3/mc_segments/docs/GetSegment.md @@ -0,0 +1,52 @@ +# GetSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetSegment**](GetSegment.md#GetSegment) | **Get** /v3/marketing/segments/{SegmentId} | Get Segment by ID + + + +## GetSegment + +> FullSegment GetSegment(ctx, SegmentIdoptional) + +Get Segment by ID + +**This endpoint allows you to retrieve a single segment by ID.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SegmentId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a GetSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**QueryJson** | **bool** | Defaults to `false`. Set to `true` to return the parsed SQL AST as a JSON object in the field `query_json` + +### Return type + +[**FullSegment**](FullSegment.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_segments/docs/GetSegment404Response.md b/rest/api/v3/mc_segments/docs/GetSegment404Response.md new file mode 100644 index 00000000..1f7701d9 --- /dev/null +++ b/rest/api/v3/mc_segments/docs/GetSegment404Response.md @@ -0,0 +1,11 @@ +# GetSegment404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]GetSegment404ResponseErrorsInner**](GetSegment404ResponseErrorsInner.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments/docs/GetSegment404ResponseErrorsInner.md b/rest/api/v3/mc_segments/docs/GetSegment404ResponseErrorsInner.md new file mode 100644 index 00000000..77220d8b --- /dev/null +++ b/rest/api/v3/mc_segments/docs/GetSegment404ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# GetSegment404ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | | +**Field** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments/docs/ListSegment.md b/rest/api/v3/mc_segments/docs/ListSegment.md new file mode 100644 index 00000000..21a8bd88 --- /dev/null +++ b/rest/api/v3/mc_segments/docs/ListSegment.md @@ -0,0 +1,50 @@ +# ListSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSegment**](ListSegment.md#ListSegment) | **Get** /v3/marketing/segments | Get List of Segments + + + +## ListSegment + +> ListSegment200Response ListSegment(ctx, optional) + +Get List of Segments + +**This endpoint allows you to retrieve a list of segments.** The query param `parent_list_ids` is treated as a filter. Any match will be returned. Zero matches will return a response code of 200 with an empty `results` array. `parent_list_ids` | `no_parent_list_id` | `ids` | `result` -----------------:|:--------------------:|:-------------:|:-------------: empty | false | empty | all segments values list_ids | false | empty | segments filtered by list_ids values list_ids |true | empty | segments filtered by list_ids and segments with no parent list_ids empty empty | true | empty | segments with no parent list_ids anything | anything | ids | segments with matching segment ids | + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Ids** | **[]string** | A list of segment IDs to retrieve. When this parameter is included, the `no_parent_list_ids` and `parent_list_ids` parameters are ignored and only segments with given IDs are returned. +**ParentListIds** | **string** | A comma separated list of list ids to be used when searching for segments with the specified parent_list_id, no more than 50 is allowed +**NoParentListId** | **bool** | If set to `true` segments with an empty value of `parent_list_id` will be returned in the filter. If the value is not present it defaults to 'false'. + +### Return type + +[**ListSegment200Response**](ListSegment200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_segments/docs/ListSegment200Response.md b/rest/api/v3/mc_segments/docs/ListSegment200Response.md new file mode 100644 index 00000000..a943da3b --- /dev/null +++ b/rest/api/v3/mc_segments/docs/ListSegment200Response.md @@ -0,0 +1,11 @@ +# ListSegment200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | [**[]SegmentSummary**](SegmentSummary.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments/docs/ListSegment500Response.md b/rest/api/v3/mc_segments/docs/ListSegment500Response.md new file mode 100644 index 00000000..169e9d8c --- /dev/null +++ b/rest/api/v3/mc_segments/docs/ListSegment500Response.md @@ -0,0 +1,11 @@ +# ListSegment500Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ListSegment500ResponseErrorsInner**](ListSegment500ResponseErrorsInner.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments/docs/ListSegment500ResponseErrorsInner.md b/rest/api/v3/mc_segments/docs/ListSegment500ResponseErrorsInner.md new file mode 100644 index 00000000..ecd184d9 --- /dev/null +++ b/rest/api/v3/mc_segments/docs/ListSegment500ResponseErrorsInner.md @@ -0,0 +1,11 @@ +# ListSegment500ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments/docs/SegmentSummary.md b/rest/api/v3/mc_segments/docs/SegmentSummary.md new file mode 100644 index 00000000..64484678 --- /dev/null +++ b/rest/api/v3/mc_segments/docs/SegmentSummary.md @@ -0,0 +1,18 @@ +# SegmentSummary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**ContactsCount** | **int32** | | +**CreatedAt** | [**time.Time**](time.Time.md) | ISO8601 of created timestamp | +**Name** | **string** | |[optional] +**ParentListId** | **string** | The id of the list if this segment is a child of a list. This implies the query `AND CONTAINS(list_ids, ${parent_list_id})` |[optional] +**SampleUpdatedAt** | [**time.Time**](time.Time.md) | ISO8601 timestamp the sample was last updated | +**UpdatedAt** | [**time.Time**](time.Time.md) | ISO8601 timestamp the object was last updated | +**NextSampleUpdate** | **string** | ISO8601 string that is equal to `sample_updated_at` plus an internally calculated offset that depends on how often contacts enter or exit segments as the scheduled pipeline updates the samples. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments/docs/SegmentWriteV2.md b/rest/api/v3/mc_segments/docs/SegmentWriteV2.md new file mode 100644 index 00000000..25cdc2d6 --- /dev/null +++ b/rest/api/v3/mc_segments/docs/SegmentWriteV2.md @@ -0,0 +1,13 @@ +# SegmentWriteV2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the segment. | +**ParentListIds** | **[]string** | The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future |[optional] +**QueryDsl** | **string** | SQL query which will filter contacts based on the conditions provided | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments/model_contact_response.go b/rest/api/v3/mc_segments/model_contact_response.go new file mode 100644 index 00000000..6977993a --- /dev/null +++ b/rest/api/v3/mc_segments/model_contact_response.go @@ -0,0 +1,51 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactResponse struct for ContactResponse +type ContactResponse struct { + // ID assigned to a contact when added to the system. + Id string `json:"id"` + // Email of the contact. This is a reserved field. + Email *string `json:"email,omitempty"` + // The contact's Phone Number ID. This must be a valid phone number. + PhoneNumberId *string `json:"phone_number_id,omitempty"` + // The contact's External ID. + ExternalId *string `json:"external_id,omitempty"` + // The contact's Anonymous ID. + AnonymousId *string `json:"anonymous_id,omitempty"` + // Alternate emails of the contact. This is a reserved field. + AlternateEmails []string `json:"alternate_emails"` + // First name of the contact. This is a reserved field. + FirstName string `json:"first_name"` + // Last name of the contact. This is a reserved field. + LastName string `json:"last_name"` + // First line of address of the contact. This is a reserved field. + AddressLine1 string `json:"address_line_1"` + // Second line of address of the contact. This is a reserved field. + AddressLine2 string `json:"address_line_2"` + // City associated with the contact. This is a reserved field. + City string `json:"city"` + // State associated with the contact. This is a reserved field. + StateProvinceRegion string `json:"state_province_region"` + // Zipcode associated with the address of the contact. This is a reserved field. + PostalCode int32 `json:"postal_code"` + // Country associated with the address of the contact. This is a reserved field. + Country string `json:"country"` + // IDs of all lists the contact is part of + ListIds *[]string `json:"list_ids,omitempty"` + CustomFields ContactResponseCustomFields `json:"custom_fields"` + // IDs of all segments the contact is part of + SegmentIds *[]string `json:"segment_ids,omitempty"` +} diff --git a/rest/api/v3/mc_segments/model_contact_response_custom_fields.go b/rest/api/v3/mc_segments/model_contact_response_custom_fields.go new file mode 100644 index 00000000..2a736fc7 --- /dev/null +++ b/rest/api/v3/mc_segments/model_contact_response_custom_fields.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactResponseCustomFields The user may choose to create up to 120 custom fields or none at all. This is not a reserved field. +type ContactResponseCustomFields struct { + CustomFieldName1 *string `json:"custom_field_name1,omitempty"` + CustomFieldName2 *string `json:"custom_field_name2,omitempty"` +} diff --git a/rest/api/v3/mc_segments/model_error_response.go b/rest/api/v3/mc_segments/model_error_response.go new file mode 100644 index 00000000..e178f466 --- /dev/null +++ b/rest/api/v3/mc_segments/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/mc_segments/model_error_response_errors_inner.go b/rest/api/v3/mc_segments/model_error_response_errors_inner.go new file mode 100644 index 00000000..b41f116b --- /dev/null +++ b/rest/api/v3/mc_segments/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/mc_segments/model_full_segment.go b/rest/api/v3/mc_segments/model_full_segment.go new file mode 100644 index 00000000..f365e55c --- /dev/null +++ b/rest/api/v3/mc_segments/model_full_segment.go @@ -0,0 +1,43 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "time" +) + +// FullSegment struct for FullSegment +type FullSegment struct { + Id string `json:"id"` + ContactsCount int32 `json:"contacts_count"` + // ISO8601 of created timestamp + CreatedAt time.Time `json:"created_at"` + // Name of the segment. + Name string `json:"name"` + // The id of the list if this segment is a child of a list. This implies the query `AND CONTAINS(list_ids, ${parent_list_id})` + ParentListId *string `json:"parent_list_id,omitempty"` + // ISO8601 timestamp the sample was last updated + SampleUpdatedAt time.Time `json:"sample_updated_at"` + // ISO8601 timestamp the object was last updated + UpdatedAt time.Time `json:"updated_at"` + // ISO8601 string that is equal to `sample_updated_at` plus an internally calculated offset that depends on how often contacts enter or exit segments as the scheduled pipeline updates the samples. + NextSampleUpdate *string `json:"next_sample_update,omitempty"` + ContactsSample []ContactResponse `json:"contacts_sample"` + // AST representation of the query DSL + QueryJson *map[string]interface{} `json:"query_json,omitempty"` + // The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future + ParentListIds *[]string `json:"parent_list_ids,omitempty"` + // SQL query which will filter contacts based on the conditions provided + QueryDsl string `json:"query_dsl"` +} diff --git a/rest/api/v3/mc_segments/model_get_segment_404_response.go b/rest/api/v3/mc_segments/model_get_segment_404_response.go new file mode 100644 index 00000000..b6987ee5 --- /dev/null +++ b/rest/api/v3/mc_segments/model_get_segment_404_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetSegment404Response struct for GetSegment404Response +type GetSegment404Response struct { + Errors []GetSegment404ResponseErrorsInner `json:"errors"` +} diff --git a/rest/api/v3/mc_segments/model_get_segment_404_response_errors_inner.go b/rest/api/v3/mc_segments/model_get_segment_404_response_errors_inner.go new file mode 100644 index 00000000..97445b5f --- /dev/null +++ b/rest/api/v3/mc_segments/model_get_segment_404_response_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetSegment404ResponseErrorsInner struct for GetSegment404ResponseErrorsInner +type GetSegment404ResponseErrorsInner struct { + Message string `json:"message"` + Field string `json:"field"` +} diff --git a/rest/api/v3/mc_segments/model_list_segment_200_response.go b/rest/api/v3/mc_segments/model_list_segment_200_response.go new file mode 100644 index 00000000..44c6533a --- /dev/null +++ b/rest/api/v3/mc_segments/model_list_segment_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSegment200Response struct for ListSegment200Response +type ListSegment200Response struct { + Results []SegmentSummary `json:"results"` +} diff --git a/rest/api/v3/mc_segments/model_list_segment_500_response.go b/rest/api/v3/mc_segments/model_list_segment_500_response.go new file mode 100644 index 00000000..38b58e34 --- /dev/null +++ b/rest/api/v3/mc_segments/model_list_segment_500_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSegment500Response struct for ListSegment500Response +type ListSegment500Response struct { + Errors []ListSegment500ResponseErrorsInner `json:"errors"` +} diff --git a/rest/api/v3/mc_segments/model_list_segment_500_response_errors_inner.go b/rest/api/v3/mc_segments/model_list_segment_500_response_errors_inner.go new file mode 100644 index 00000000..37a40fb1 --- /dev/null +++ b/rest/api/v3/mc_segments/model_list_segment_500_response_errors_inner.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSegment500ResponseErrorsInner struct for ListSegment500ResponseErrorsInner +type ListSegment500ResponseErrorsInner struct { + Message string `json:"message"` +} diff --git a/rest/api/v3/mc_segments/model_segment_summary.go b/rest/api/v3/mc_segments/model_segment_summary.go new file mode 100644 index 00000000..c54aa9da --- /dev/null +++ b/rest/api/v3/mc_segments/model_segment_summary.go @@ -0,0 +1,35 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "time" +) + +// SegmentSummary struct for SegmentSummary +type SegmentSummary struct { + Id string `json:"id"` + ContactsCount int32 `json:"contacts_count"` + // ISO8601 of created timestamp + CreatedAt time.Time `json:"created_at"` + Name *string `json:"name,omitempty"` + // The id of the list if this segment is a child of a list. This implies the query `AND CONTAINS(list_ids, ${parent_list_id})` + ParentListId *string `json:"parent_list_id,omitempty"` + // ISO8601 timestamp the sample was last updated + SampleUpdatedAt time.Time `json:"sample_updated_at"` + // ISO8601 timestamp the object was last updated + UpdatedAt time.Time `json:"updated_at"` + // ISO8601 string that is equal to `sample_updated_at` plus an internally calculated offset that depends on how often contacts enter or exit segments as the scheduled pipeline updates the samples. + NextSampleUpdate *string `json:"next_sample_update,omitempty"` +} diff --git a/rest/api/v3/mc_segments/model_segment_write_v2.go b/rest/api/v3/mc_segments/model_segment_write_v2.go new file mode 100644 index 00000000..04aa8f81 --- /dev/null +++ b/rest/api/v3/mc_segments/model_segment_write_v2.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SegmentWriteV2 struct for SegmentWriteV2 +type SegmentWriteV2 struct { + // Name of the segment. + Name string `json:"name"` + // The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future + ParentListIds *[]string `json:"parent_list_ids,omitempty"` + // SQL query which will filter contacts based on the conditions provided + QueryDsl string `json:"query_dsl"` +} diff --git a/rest/api/v3/mc_segments_2/.openapi-generator b/rest/api/v3/mc_segments_2/.openapi-generator new file mode 100644 index 00000000..b68d3c0b --- /dev/null +++ b/rest/api/v3/mc_segments_2/.openapi-generator @@ -0,0 +1,42 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_create_segment.go +api_delete_segment.go +api_get_segment.go +api_list_segment.go +api_refresh_segment.go +api_service.go +api_update_segment.go +docs/AllSegments200.md +docs/ContactResponse.md +docs/ContactResponseCustomFields.md +docs/CreateSegment.md +docs/DeleteSegment.md +docs/ErrorsSegmentV2.md +docs/ErrorsSegmentV2ErrorsInner.md +docs/GetSegment.md +docs/ListSegment.md +docs/Metadata.md +docs/RefreshSegment.md +docs/Segment2xx.md +docs/SegmentError.md +docs/SegmentRefresh202.md +docs/SegmentRefreshRequest.md +docs/SegmentStatusResponse.md +docs/SegmentUpdate.md +docs/SegmentWriteV2.md +docs/UpdateSegment.md +model_all_segments200.go +model_contact_response.go +model_contact_response_custom_fields.go +model_errors_segment_v2.go +model_errors_segment_v2_errors_inner.go +model_metadata.go +model_segment2xx.go +model_segment_error.go +model_segment_refresh202.go +model_segment_refresh_request.go +model_segment_status_response.go +model_segment_update.go +model_segment_write_v2.go diff --git a/rest/api/v3/mc_segments_2/.openapi-generator-ignore b/rest/api/v3/mc_segments_2/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/mc_segments_2/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/mc_segments_2/README.md b/rest/api/v3/mc_segments_2/README.md new file mode 100644 index 00000000..5bd42753 --- /dev/null +++ b/rest/api/v3/mc_segments_2/README.md @@ -0,0 +1,87 @@ +# Go API client for + +The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. + +Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. + +Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. + +Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. + +Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. + +You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:44.093333+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateSegment* | [**CreateSegment**](docs/CreateSegment.md#createsegment) | **Post** /v3/marketing/segments/2.0 | Create Segment +*DeleteSegment* | [**DeleteSegment**](docs/DeleteSegment.md#deletesegment) | **Delete** /v3/marketing/segments/2.0/{SegmentId} | Delete segment +*GetSegment* | [**GetSegment**](docs/GetSegment.md#getsegment) | **Get** /v3/marketing/segments/2.0/{SegmentId} | Get Segment by ID +*ListSegment* | [**ListSegment**](docs/ListSegment.md#listsegment) | **Get** /v3/marketing/segments/2.0 | Get List of Segments +*RefreshSegment* | [**RefreshSegment**](docs/RefreshSegment.md#refreshsegment) | **Post** /v3/marketing/segments/2.0/refresh/{SegmentId} | Manually refresh a segment +*UpdateSegment* | [**UpdateSegment**](docs/UpdateSegment.md#updatesegment) | **Patch** /v3/marketing/segments/2.0/{SegmentId} | Update Segment + + +## Documentation For Models + + - [AllSegments200](AllSegments200.md) + - [ContactResponse](ContactResponse.md) + - [ContactResponseCustomFields](ContactResponseCustomFields.md) + - [ErrorsSegmentV2](ErrorsSegmentV2.md) + - [ErrorsSegmentV2ErrorsInner](ErrorsSegmentV2ErrorsInner.md) + - [Metadata](Metadata.md) + - [Segment2xx](Segment2xx.md) + - [SegmentError](SegmentError.md) + - [SegmentRefresh202](SegmentRefresh202.md) + - [SegmentRefreshRequest](SegmentRefreshRequest.md) + - [SegmentStatusResponse](SegmentStatusResponse.md) + - [SegmentUpdate](SegmentUpdate.md) + - [SegmentWriteV2](SegmentWriteV2.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/mc_segments_2/api_create_segment.go b/rest/api/v3/mc_segments_2/api_create_segment.go new file mode 100644 index 00000000..670a03bc --- /dev/null +++ b/rest/api/v3/mc_segments_2/api_create_segment.go @@ -0,0 +1,80 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type CreateSegmentParam struct { + // + SegmentWriteV2 *SegmentWriteV2 `json:"SegmentWriteV2,omitempty"` +} + +func (params *CreateSegmentParam) SetSegmentWriteV2(SegmentWriteV2 SegmentWriteV2) *CreateSegmentParam { + params.SegmentWriteV2 = &SegmentWriteV2 + return params +} + +// Segment `name` has to be unique. A user can not create a new segment with an existing segment name. +func (c *ApiService) CreateSegment(params *CreateSegmentParam) (interface{}, error) { + path := "/v3/marketing/segments/2.0" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SegmentWriteV2 != nil { + b, err := json.Marshal(*params.SegmentWriteV2) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &Segment2xx{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorsSegmentV2{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ErrorsSegmentV2{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_segments_2/api_delete_segment.go b/rest/api/v3/mc_segments_2/api_delete_segment.go new file mode 100644 index 00000000..086aab52 --- /dev/null +++ b/rest/api/v3/mc_segments_2/api_delete_segment.go @@ -0,0 +1,68 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DeleteSegmentParam struct { + // + SegmentId *string `json:"segment_id"` +} + +func (params *DeleteSegmentParam) SetSegmentId(SegmentId string) *DeleteSegmentParam { + params.SegmentId = &SegmentId + return params +} + +// **This endpoint allows you to delete a segment by ID.** +func (c *ApiService) DeleteSegment(params *DeleteSegmentParam) (interface{}, error) { + path := "/v3/marketing/segments/2.0/{SegmentId}" + if params != nil && params.SegmentId != nil { + path = strings.Replace(path, "{"+"SegmentId"+"}", *params.SegmentId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &ErrorsSegmentV2{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ErrorsSegmentV2{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_segments_2/api_get_segment.go b/rest/api/v3/mc_segments_2/api_get_segment.go new file mode 100644 index 00000000..dbab96c3 --- /dev/null +++ b/rest/api/v3/mc_segments_2/api_get_segment.go @@ -0,0 +1,87 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type GetSegmentParam struct { + // + SegmentId *string `json:"segment_id"` + // Defaults to `true`. Set to `false` to exclude the contacts_sample in the response. + ContactsSample *bool `json:"contacts_sample,omitempty"` +} + +func (params *GetSegmentParam) SetSegmentId(SegmentId string) *GetSegmentParam { + params.SegmentId = &SegmentId + return params +} +func (params *GetSegmentParam) SetContactsSample(ContactsSample bool) *GetSegmentParam { + params.ContactsSample = &ContactsSample + return params +} + +// Get Marketing Campaigns Segment by ID +func (c *ApiService) GetSegment(params *GetSegmentParam) (interface{}, error) { + path := "/v3/marketing/segments/2.0/{SegmentId}" + if params != nil && params.SegmentId != nil { + path = strings.Replace(path, "{"+"SegmentId"+"}", *params.SegmentId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.ContactsSample != nil { + data.Set("contacts_sample", fmt.Sprint(*params.ContactsSample)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &Segment2xx{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorsSegmentV2{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ErrorsSegmentV2{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_segments_2/api_list_segment.go b/rest/api/v3/mc_segments_2/api_list_segment.go new file mode 100644 index 00000000..dcd34e83 --- /dev/null +++ b/rest/api/v3/mc_segments_2/api_list_segment.go @@ -0,0 +1,103 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListSegmentParam struct { + // A list of segment IDs to retrieve. When this parameter is included, the `no_parent_list_ids` and `parent_list_ids` parameters are ignored and only segments with given IDs are returned. + Ids *[]string `json:"ids,omitempty"` + // A comma separated list up to 50 in size, to filter segments on. Only segments that have any of these list ids as the parent list will be retrieved. This is different from the parameter of the same name used when creating a segment. + ParentListIds *string `json:"parent_list_ids,omitempty"` + // If set to `true`, segments with an empty value of `parent_list_id` will be returned in the filter. If the value is not present, it defaults to 'false'. + NoParentListId *bool `json:"no_parent_list_id,omitempty"` +} + +func (params *ListSegmentParam) SetIds(Ids []string) *ListSegmentParam { + params.Ids = &Ids + return params +} +func (params *ListSegmentParam) SetParentListIds(ParentListIds string) *ListSegmentParam { + params.ParentListIds = &ParentListIds + return params +} +func (params *ListSegmentParam) SetNoParentListId(NoParentListId bool) *ListSegmentParam { + params.NoParentListId = &NoParentListId + return params +} + +// **This endpoint allows you to retrieve a list of segments.** The query param `parent_list_ids` is treated as a filter. Any match will be returned. Zero matches will return a response code of 200 with an empty `results` array. `parent_list_ids` | `no_parent_list_id` | `ids` | `result` -----------------:|:--------------------:|:-------------:|:-------------: empty | false | empty | all segments values list_ids | false | empty | segments filtered by list_ids values list_ids |true | empty | segments filtered by list_ids and segments with no parent list_ids empty empty | true | empty | segments with no parent list_ids anything | anything | ids | segments with matching segment ids | +func (c *ApiService) ListSegment(params *ListSegmentParam) (interface{}, error) { + path := "/v3/marketing/segments/2.0" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Ids != nil { + for _, item := range *params.Ids { + v, err := json.Marshal(item) + + if err != nil { + return nil, err + } + + data.Add("ids", string(v)) + + } + } + if params != nil && params.ParentListIds != nil { + data.Set("parent_list_ids", *params.ParentListIds) + } + if params != nil && params.NoParentListId != nil { + data.Set("no_parent_list_id", fmt.Sprint(*params.NoParentListId)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AllSegments200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorsSegmentV2{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ErrorsSegmentV2{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_segments_2/api_refresh_segment.go b/rest/api/v3/mc_segments_2/api_refresh_segment.go new file mode 100644 index 00000000..cadfe784 --- /dev/null +++ b/rest/api/v3/mc_segments_2/api_refresh_segment.go @@ -0,0 +1,91 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type RefreshSegmentParam struct { + // + SegmentId *string `json:"segment_id"` + // + SegmentRefreshRequest *SegmentRefreshRequest `json:"SegmentRefreshRequest"` +} + +func (params *RefreshSegmentParam) SetSegmentId(SegmentId string) *RefreshSegmentParam { + params.SegmentId = &SegmentId + return params +} +func (params *RefreshSegmentParam) SetSegmentRefreshRequest(SegmentRefreshRequest SegmentRefreshRequest) *RefreshSegmentParam { + params.SegmentRefreshRequest = &SegmentRefreshRequest + return params +} + +// Manually refresh a segment by segment ID. +func (c *ApiService) RefreshSegment(params *RefreshSegmentParam) (interface{}, error) { + path := "/v3/marketing/segments/2.0/refresh/{SegmentId}" + if params != nil && params.SegmentId != nil { + path = strings.Replace(path, "{"+"SegmentId"+"}", *params.SegmentId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SegmentRefreshRequest != nil { + b, err := json.Marshal(*params.SegmentRefreshRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 202 { + ps := &SegmentRefresh202{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &SegmentError{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &SegmentError{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_segments_2/api_service.go b/rest/api/v3/mc_segments_2/api_service.go new file mode 100644 index 00000000..6eb18a06 --- /dev/null +++ b/rest/api/v3/mc_segments_2/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/mc_segments_2/api_update_segment.go b/rest/api/v3/mc_segments_2/api_update_segment.go new file mode 100644 index 00000000..91072810 --- /dev/null +++ b/rest/api/v3/mc_segments_2/api_update_segment.go @@ -0,0 +1,91 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type UpdateSegmentParam struct { + // + SegmentId *string `json:"segment_id"` + // + SegmentUpdate *SegmentUpdate `json:"SegmentUpdate,omitempty"` +} + +func (params *UpdateSegmentParam) SetSegmentId(SegmentId string) *UpdateSegmentParam { + params.SegmentId = &SegmentId + return params +} +func (params *UpdateSegmentParam) SetSegmentUpdate(SegmentUpdate SegmentUpdate) *UpdateSegmentParam { + params.SegmentUpdate = &SegmentUpdate + return params +} + +// Segment `name` has to be unique. A user can not create a new segment with an existing segment name. +func (c *ApiService) UpdateSegment(params *UpdateSegmentParam) (interface{}, error) { + path := "/v3/marketing/segments/2.0/{SegmentId}" + if params != nil && params.SegmentId != nil { + path = strings.Replace(path, "{"+"SegmentId"+"}", *params.SegmentId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SegmentUpdate != nil { + b, err := json.Marshal(*params.SegmentUpdate) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &Segment2xx{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorsSegmentV2{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ErrorsSegmentV2{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_segments_2/docs/AllSegments200.md b/rest/api/v3/mc_segments_2/docs/AllSegments200.md new file mode 100644 index 00000000..c0aa6fd7 --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/AllSegments200.md @@ -0,0 +1,21 @@ +# AllSegments200 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | ID assigned to the segment when created. | +**Name** | **string** | Name of the segment. | +**ContactsCount** | **int32** | Total number of contacts present in the segment | +**CreatedAt** | **string** | ISO8601 timestamp of when the object was created | +**UpdatedAt** | **string** | ISO8601 timestamp of when the object was last updated | +**SampleUpdatedAt** | **string** | ISO8601 timestamp of when the samples were last updated | +**NextSampleUpdate** | **string** | ISO8601 timestamp of when the samples will be next updated | +**ParentListIds** | **[]string** | The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future | +**QueryVersion** | **string** | If not set, segment contains a query for use with Segment v1 APIs. If set to '2', segment contains a SQL query for use in v2. | +**Metadata** | [**Metadata**](Metadata.md) | |[optional] +**Status** | [**SegmentStatusResponse**](SegmentStatusResponse.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments_2/docs/ContactResponse.md b/rest/api/v3/mc_segments_2/docs/ContactResponse.md new file mode 100644 index 00000000..0041ba2e --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/ContactResponse.md @@ -0,0 +1,27 @@ +# ContactResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | ID assigned to a contact when added to the system. | +**Email** | **string** | Email of the contact. This is a reserved field. |[optional] +**PhoneNumberId** | **string** | The contact's Phone Number ID. This must be a valid phone number. |[optional] +**ExternalId** | **string** | The contact's External ID. |[optional] +**AnonymousId** | **string** | The contact's Anonymous ID. |[optional] +**AlternateEmails** | **[]string** | Alternate emails of the contact. This is a reserved field. | +**FirstName** | **string** | First name of the contact. This is a reserved field. | +**LastName** | **string** | Last name of the contact. This is a reserved field. | +**AddressLine1** | **string** | First line of address of the contact. This is a reserved field. | +**AddressLine2** | **string** | Second line of address of the contact. This is a reserved field. | +**City** | **string** | City associated with the contact. This is a reserved field. | +**StateProvinceRegion** | **string** | State associated with the contact. This is a reserved field. | +**PostalCode** | **int32** | Zipcode associated with the address of the contact. This is a reserved field. | +**Country** | **string** | Country associated with the address of the contact. This is a reserved field. | +**ListIds** | **[]string** | IDs of all lists the contact is part of |[optional] +**CustomFields** | [**ContactResponseCustomFields**](ContactResponseCustomFields.md) | | +**SegmentIds** | **[]string** | IDs of all segments the contact is part of |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments_2/docs/ContactResponseCustomFields.md b/rest/api/v3/mc_segments_2/docs/ContactResponseCustomFields.md new file mode 100644 index 00000000..0fc838a2 --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/ContactResponseCustomFields.md @@ -0,0 +1,12 @@ +# ContactResponseCustomFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomFieldName1** | **string** | |[optional] +**CustomFieldName2** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments_2/docs/CreateSegment.md b/rest/api/v3/mc_segments_2/docs/CreateSegment.md new file mode 100644 index 00000000..171e9d2d --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/CreateSegment.md @@ -0,0 +1,48 @@ +# CreateSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateSegment**](CreateSegment.md#CreateSegment) | **Post** /v3/marketing/segments/2.0 | Create Segment + + + +## CreateSegment + +> Segment2xx CreateSegment(ctx, optional) + +Create Segment + +Segment `name` has to be unique. A user can not create a new segment with an existing segment name. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**SegmentWriteV2** | [**SegmentWriteV2**](SegmentWriteV2.md) | + +### Return type + +[**Segment2xx**](Segment2xx.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_segments_2/docs/DeleteSegment.md b/rest/api/v3/mc_segments_2/docs/DeleteSegment.md new file mode 100644 index 00000000..b91fd466 --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/DeleteSegment.md @@ -0,0 +1,51 @@ +# DeleteSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSegment**](DeleteSegment.md#DeleteSegment) | **Delete** /v3/marketing/segments/2.0/{SegmentId} | Delete segment + + + +## DeleteSegment + +> DeleteSegment(ctx, SegmentId) + +Delete segment + +**This endpoint allows you to delete a segment by ID.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SegmentId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_segments_2/docs/ErrorsSegmentV2.md b/rest/api/v3/mc_segments_2/docs/ErrorsSegmentV2.md new file mode 100644 index 00000000..07d67bc7 --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/ErrorsSegmentV2.md @@ -0,0 +1,11 @@ +# ErrorsSegmentV2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorsSegmentV2ErrorsInner**](ErrorsSegmentV2ErrorsInner.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments_2/docs/ErrorsSegmentV2ErrorsInner.md b/rest/api/v3/mc_segments_2/docs/ErrorsSegmentV2ErrorsInner.md new file mode 100644 index 00000000..ec18b439 --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/ErrorsSegmentV2ErrorsInner.md @@ -0,0 +1,12 @@ +# ErrorsSegmentV2ErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | the field in the request body that is incorrect | +**Message** | **string** | a description of what is specifically wrong with the field passed in the request | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments_2/docs/GetSegment.md b/rest/api/v3/mc_segments_2/docs/GetSegment.md new file mode 100644 index 00000000..57cbe39a --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/GetSegment.md @@ -0,0 +1,52 @@ +# GetSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetSegment**](GetSegment.md#GetSegment) | **Get** /v3/marketing/segments/2.0/{SegmentId} | Get Segment by ID + + + +## GetSegment + +> Segment2xx GetSegment(ctx, SegmentIdoptional) + +Get Segment by ID + +Get Marketing Campaigns Segment by ID + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SegmentId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a GetSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**ContactsSample** | **bool** | Defaults to `true`. Set to `false` to exclude the contacts_sample in the response. + +### Return type + +[**Segment2xx**](Segment2xx.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_segments_2/docs/ListSegment.md b/rest/api/v3/mc_segments_2/docs/ListSegment.md new file mode 100644 index 00000000..4ea5db66 --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/ListSegment.md @@ -0,0 +1,50 @@ +# ListSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSegment**](ListSegment.md#ListSegment) | **Get** /v3/marketing/segments/2.0 | Get List of Segments + + + +## ListSegment + +> AllSegments200 ListSegment(ctx, optional) + +Get List of Segments + +**This endpoint allows you to retrieve a list of segments.** The query param `parent_list_ids` is treated as a filter. Any match will be returned. Zero matches will return a response code of 200 with an empty `results` array. `parent_list_ids` | `no_parent_list_id` | `ids` | `result` -----------------:|:--------------------:|:-------------:|:-------------: empty | false | empty | all segments values list_ids | false | empty | segments filtered by list_ids values list_ids |true | empty | segments filtered by list_ids and segments with no parent list_ids empty empty | true | empty | segments with no parent list_ids anything | anything | ids | segments with matching segment ids | + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Ids** | **[]string** | A list of segment IDs to retrieve. When this parameter is included, the `no_parent_list_ids` and `parent_list_ids` parameters are ignored and only segments with given IDs are returned. +**ParentListIds** | **string** | A comma separated list up to 50 in size, to filter segments on. Only segments that have any of these list ids as the parent list will be retrieved. This is different from the parameter of the same name used when creating a segment. +**NoParentListId** | **bool** | If set to `true`, segments with an empty value of `parent_list_id` will be returned in the filter. If the value is not present, it defaults to 'false'. + +### Return type + +[**AllSegments200**](AllSegments200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_segments_2/docs/Metadata.md b/rest/api/v3/mc_segments_2/docs/Metadata.md new file mode 100644 index 00000000..6121300c --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/Metadata.md @@ -0,0 +1,14 @@ +# Metadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prev** | **string** | |[optional] +**Self** | **string** | |[optional] +**Next** | **string** | |[optional] +**Count** | **int32** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments_2/docs/RefreshSegment.md b/rest/api/v3/mc_segments_2/docs/RefreshSegment.md new file mode 100644 index 00000000..d02196d2 --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/RefreshSegment.md @@ -0,0 +1,51 @@ +# RefreshSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**RefreshSegment**](RefreshSegment.md#RefreshSegment) | **Post** /v3/marketing/segments/2.0/refresh/{SegmentId} | Manually refresh a segment + + + +## RefreshSegment + +> SegmentRefresh202 RefreshSegment(ctx, SegmentIdSegmentRefreshRequest) + +Manually refresh a segment + +Manually refresh a segment by segment ID. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SegmentId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a RefreshSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**SegmentRefresh202**](SegmentRefresh202.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_segments_2/docs/Segment2xx.md b/rest/api/v3/mc_segments_2/docs/Segment2xx.md new file mode 100644 index 00000000..7a16f7f4 --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/Segment2xx.md @@ -0,0 +1,25 @@ +# Segment2xx + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | ID assigned to the segment when created. | +**Name** | **string** | Name of the segment. | +**QueryDsl** | **string** | SQL query which will filter contacts based on the conditions provided | +**ContactsCount** | **int32** | Total number of contacts present in the segment | +**ContactsSample** | [**[]ContactResponse**](ContactResponse.md) | A subset of all contacts that are in this segment | +**CreatedAt** | **string** | ISO8601 timestamp of when the object was created | +**UpdatedAt** | **string** | ISO8601 timestamp of when the object was last updated | +**SampleUpdatedAt** | **string** | ISO8601 timestamp of when the samples were last updated | +**NextSampleUpdate** | **string** | ISO8601 timestamp of when the samples will be next updated | +**ParentListIds** | **[]string** | The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future | +**QueryVersion** | **string** | If not set, segment contains a Query for use with Segment v1 APIs. If set to '2', segment contains a SQL query for use in v2. | +**Status** | [**SegmentStatusResponse**](SegmentStatusResponse.md) | | +**RefreshesUsed** | **int32** | The number of times a segment has been manually refreshed since start of today in the user's timezone. |[optional] +**MaxRefreshes** | **int32** | The maximum number of manual refreshes allowed per day for this segment. Currently, only 2 are allowed. |[optional] +**LastRefreshedAt** | **string** | The ISO8601 timestamp when the segment was last refreshed in UTC time. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments_2/docs/SegmentError.md b/rest/api/v3/mc_segments_2/docs/SegmentError.md new file mode 100644 index 00000000..f58e9427 --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/SegmentError.md @@ -0,0 +1,11 @@ +# SegmentError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | **string** | A description of the error. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments_2/docs/SegmentRefresh202.md b/rest/api/v3/mc_segments_2/docs/SegmentRefresh202.md new file mode 100644 index 00000000..d930c1d1 --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/SegmentRefresh202.md @@ -0,0 +1,11 @@ +# SegmentRefresh202 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**JobId** | **string** | The ID of the manual refresh job. Used only for internal purposes. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments_2/docs/SegmentRefreshRequest.md b/rest/api/v3/mc_segments_2/docs/SegmentRefreshRequest.md new file mode 100644 index 00000000..fb12c37b --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/SegmentRefreshRequest.md @@ -0,0 +1,11 @@ +# SegmentRefreshRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UserTimeZone** | **string** | The user's timezone. The timezone is used to reset the refresh count at midnight in the user's local time. Only [IANA time zone format](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) is accepted. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments_2/docs/SegmentStatusResponse.md b/rest/api/v3/mc_segments_2/docs/SegmentStatusResponse.md new file mode 100644 index 00000000..efc40275 --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/SegmentStatusResponse.md @@ -0,0 +1,12 @@ +# SegmentStatusResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**QueryValidation** | **string** | Status of query validation. PENDING, VALID, or INVALID | +**ErrorMessage** | **string** | Describes any errors that were encountered during query validation |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments_2/docs/SegmentUpdate.md b/rest/api/v3/mc_segments_2/docs/SegmentUpdate.md new file mode 100644 index 00000000..9ddb7bfa --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/SegmentUpdate.md @@ -0,0 +1,12 @@ +# SegmentUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the segment. |[optional] +**QueryDsl** | **string** | SQL query which will filter contacts based on the conditions provided |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments_2/docs/SegmentWriteV2.md b/rest/api/v3/mc_segments_2/docs/SegmentWriteV2.md new file mode 100644 index 00000000..25cdc2d6 --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/SegmentWriteV2.md @@ -0,0 +1,13 @@ +# SegmentWriteV2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the segment. | +**ParentListIds** | **[]string** | The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future |[optional] +**QueryDsl** | **string** | SQL query which will filter contacts based on the conditions provided | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments_2/docs/UpdateSegment.md b/rest/api/v3/mc_segments_2/docs/UpdateSegment.md new file mode 100644 index 00000000..87669084 --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/UpdateSegment.md @@ -0,0 +1,52 @@ +# UpdateSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSegment**](UpdateSegment.md#UpdateSegment) | **Patch** /v3/marketing/segments/2.0/{SegmentId} | Update Segment + + + +## UpdateSegment + +> Segment2xx UpdateSegment(ctx, SegmentIdoptional) + +Update Segment + +Segment `name` has to be unique. A user can not create a new segment with an existing segment name. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SegmentId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**SegmentUpdate** | [**SegmentUpdate**](SegmentUpdate.md) | + +### Return type + +[**Segment2xx**](Segment2xx.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_segments_2/model_all_segments200.go b/rest/api/v3/mc_segments_2/model_all_segments200.go new file mode 100644 index 00000000..497ac8b7 --- /dev/null +++ b/rest/api/v3/mc_segments_2/model_all_segments200.go @@ -0,0 +1,38 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AllSegments200 struct for AllSegments200 +type AllSegments200 struct { + // ID assigned to the segment when created. + Id string `json:"id"` + // Name of the segment. + Name string `json:"name"` + // Total number of contacts present in the segment + ContactsCount int32 `json:"contacts_count"` + // ISO8601 timestamp of when the object was created + CreatedAt string `json:"created_at"` + // ISO8601 timestamp of when the object was last updated + UpdatedAt string `json:"updated_at"` + // ISO8601 timestamp of when the samples were last updated + SampleUpdatedAt string `json:"sample_updated_at"` + // ISO8601 timestamp of when the samples will be next updated + NextSampleUpdate string `json:"next_sample_update"` + // The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future + ParentListIds []string `json:"parent_list_ids"` + // If not set, segment contains a query for use with Segment v1 APIs. If set to '2', segment contains a SQL query for use in v2. + QueryVersion string `json:"query_version"` + Metadata *Metadata `json:"_metadata,omitempty"` + Status SegmentStatusResponse `json:"status"` +} diff --git a/rest/api/v3/mc_segments_2/model_contact_response.go b/rest/api/v3/mc_segments_2/model_contact_response.go new file mode 100644 index 00000000..5a91c038 --- /dev/null +++ b/rest/api/v3/mc_segments_2/model_contact_response.go @@ -0,0 +1,51 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactResponse struct for ContactResponse +type ContactResponse struct { + // ID assigned to a contact when added to the system. + Id string `json:"id"` + // Email of the contact. This is a reserved field. + Email *string `json:"email,omitempty"` + // The contact's Phone Number ID. This must be a valid phone number. + PhoneNumberId *string `json:"phone_number_id,omitempty"` + // The contact's External ID. + ExternalId *string `json:"external_id,omitempty"` + // The contact's Anonymous ID. + AnonymousId *string `json:"anonymous_id,omitempty"` + // Alternate emails of the contact. This is a reserved field. + AlternateEmails []string `json:"alternate_emails"` + // First name of the contact. This is a reserved field. + FirstName string `json:"first_name"` + // Last name of the contact. This is a reserved field. + LastName string `json:"last_name"` + // First line of address of the contact. This is a reserved field. + AddressLine1 string `json:"address_line_1"` + // Second line of address of the contact. This is a reserved field. + AddressLine2 string `json:"address_line_2"` + // City associated with the contact. This is a reserved field. + City string `json:"city"` + // State associated with the contact. This is a reserved field. + StateProvinceRegion string `json:"state_province_region"` + // Zipcode associated with the address of the contact. This is a reserved field. + PostalCode int32 `json:"postal_code"` + // Country associated with the address of the contact. This is a reserved field. + Country string `json:"country"` + // IDs of all lists the contact is part of + ListIds *[]string `json:"list_ids,omitempty"` + CustomFields ContactResponseCustomFields `json:"custom_fields"` + // IDs of all segments the contact is part of + SegmentIds *[]string `json:"segment_ids,omitempty"` +} diff --git a/rest/api/v3/mc_segments_2/model_contact_response_custom_fields.go b/rest/api/v3/mc_segments_2/model_contact_response_custom_fields.go new file mode 100644 index 00000000..754537d5 --- /dev/null +++ b/rest/api/v3/mc_segments_2/model_contact_response_custom_fields.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactResponseCustomFields The user may choose to create up to 120 custom fields or none at all. This is not a reserved field. +type ContactResponseCustomFields struct { + CustomFieldName1 *string `json:"custom_field_name1,omitempty"` + CustomFieldName2 *string `json:"custom_field_name2,omitempty"` +} diff --git a/rest/api/v3/mc_segments_2/model_errors_segment_v2.go b/rest/api/v3/mc_segments_2/model_errors_segment_v2.go new file mode 100644 index 00000000..85afe100 --- /dev/null +++ b/rest/api/v3/mc_segments_2/model_errors_segment_v2.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorsSegmentV2 If the request is incorrect, an array of errors will be returned. +type ErrorsSegmentV2 struct { + Errors []ErrorsSegmentV2ErrorsInner `json:"errors"` +} diff --git a/rest/api/v3/mc_segments_2/model_errors_segment_v2_errors_inner.go b/rest/api/v3/mc_segments_2/model_errors_segment_v2_errors_inner.go new file mode 100644 index 00000000..26eeca07 --- /dev/null +++ b/rest/api/v3/mc_segments_2/model_errors_segment_v2_errors_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorsSegmentV2ErrorsInner struct for ErrorsSegmentV2ErrorsInner +type ErrorsSegmentV2ErrorsInner struct { + // the field in the request body that is incorrect + Field string `json:"field"` + // a description of what is specifically wrong with the field passed in the request + Message string `json:"message"` +} diff --git a/rest/api/v3/mc_segments_2/model_metadata.go b/rest/api/v3/mc_segments_2/model_metadata.go new file mode 100644 index 00000000..465ac16a --- /dev/null +++ b/rest/api/v3/mc_segments_2/model_metadata.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Metadata struct for Metadata +type Metadata struct { + Prev *string `json:"prev,omitempty"` + Self *string `json:"self,omitempty"` + Next *string `json:"next,omitempty"` + Count *int32 `json:"count,omitempty"` +} diff --git a/rest/api/v3/mc_segments_2/model_segment2xx.go b/rest/api/v3/mc_segments_2/model_segment2xx.go new file mode 100644 index 00000000..0ce62a86 --- /dev/null +++ b/rest/api/v3/mc_segments_2/model_segment2xx.go @@ -0,0 +1,47 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Segment2xx struct for Segment2xx +type Segment2xx struct { + // ID assigned to the segment when created. + Id string `json:"id"` + // Name of the segment. + Name string `json:"name"` + // SQL query which will filter contacts based on the conditions provided + QueryDsl string `json:"query_dsl"` + // Total number of contacts present in the segment + ContactsCount int32 `json:"contacts_count"` + // A subset of all contacts that are in this segment + ContactsSample []ContactResponse `json:"contacts_sample"` + // ISO8601 timestamp of when the object was created + CreatedAt string `json:"created_at"` + // ISO8601 timestamp of when the object was last updated + UpdatedAt string `json:"updated_at"` + // ISO8601 timestamp of when the samples were last updated + SampleUpdatedAt string `json:"sample_updated_at"` + // ISO8601 timestamp of when the samples will be next updated + NextSampleUpdate string `json:"next_sample_update"` + // The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future + ParentListIds []string `json:"parent_list_ids"` + // If not set, segment contains a Query for use with Segment v1 APIs. If set to '2', segment contains a SQL query for use in v2. + QueryVersion string `json:"query_version"` + Status SegmentStatusResponse `json:"status"` + // The number of times a segment has been manually refreshed since start of today in the user's timezone. + RefreshesUsed *int32 `json:"refreshes_used,omitempty"` + // The maximum number of manual refreshes allowed per day for this segment. Currently, only 2 are allowed. + MaxRefreshes *int32 `json:"max_refreshes,omitempty"` + // The ISO8601 timestamp when the segment was last refreshed in UTC time. + LastRefreshedAt *string `json:"last_refreshed_at,omitempty"` +} diff --git a/rest/api/v3/mc_segments_2/model_segment_error.go b/rest/api/v3/mc_segments_2/model_segment_error.go new file mode 100644 index 00000000..f08b583f --- /dev/null +++ b/rest/api/v3/mc_segments_2/model_segment_error.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SegmentError struct for SegmentError +type SegmentError struct { + // A description of the error. + Error string `json:"error"` +} diff --git a/rest/api/v3/mc_segments_2/model_segment_refresh202.go b/rest/api/v3/mc_segments_2/model_segment_refresh202.go new file mode 100644 index 00000000..5c3e00b0 --- /dev/null +++ b/rest/api/v3/mc_segments_2/model_segment_refresh202.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SegmentRefresh202 struct for SegmentRefresh202 +type SegmentRefresh202 struct { + // The ID of the manual refresh job. Used only for internal purposes. + JobId *string `json:"job_id,omitempty"` +} diff --git a/rest/api/v3/mc_segments_2/model_segment_refresh_request.go b/rest/api/v3/mc_segments_2/model_segment_refresh_request.go new file mode 100644 index 00000000..4b509e53 --- /dev/null +++ b/rest/api/v3/mc_segments_2/model_segment_refresh_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SegmentRefreshRequest struct for SegmentRefreshRequest +type SegmentRefreshRequest struct { + // The user's timezone. The timezone is used to reset the refresh count at midnight in the user's local time. Only [IANA time zone format](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) is accepted. + UserTimeZone string `json:"user_time_zone"` +} diff --git a/rest/api/v3/mc_segments_2/model_segment_status_response.go b/rest/api/v3/mc_segments_2/model_segment_status_response.go new file mode 100644 index 00000000..2bf1bf83 --- /dev/null +++ b/rest/api/v3/mc_segments_2/model_segment_status_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SegmentStatusResponse Segment status indicates whether the segment's contacts will be updated periodically +type SegmentStatusResponse struct { + // Status of query validation. PENDING, VALID, or INVALID + QueryValidation string `json:"query_validation"` + // Describes any errors that were encountered during query validation + ErrorMessage *string `json:"error_message,omitempty"` +} diff --git a/rest/api/v3/mc_segments_2/model_segment_update.go b/rest/api/v3/mc_segments_2/model_segment_update.go new file mode 100644 index 00000000..ebfede4c --- /dev/null +++ b/rest/api/v3/mc_segments_2/model_segment_update.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SegmentUpdate struct for SegmentUpdate +type SegmentUpdate struct { + // Name of the segment. + Name *string `json:"name,omitempty"` + // SQL query which will filter contacts based on the conditions provided + QueryDsl *string `json:"query_dsl,omitempty"` +} diff --git a/rest/api/v3/mc_segments_2/model_segment_write_v2.go b/rest/api/v3/mc_segments_2/model_segment_write_v2.go new file mode 100644 index 00000000..f0acdd74 --- /dev/null +++ b/rest/api/v3/mc_segments_2/model_segment_write_v2.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SegmentWriteV2 struct for SegmentWriteV2 +type SegmentWriteV2 struct { + // Name of the segment. + Name string `json:"name"` + // The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future + ParentListIds *[]string `json:"parent_list_ids,omitempty"` + // SQL query which will filter contacts based on the conditions provided + QueryDsl string `json:"query_dsl"` +} diff --git a/rest/api/v3/mc_senders/.openapi-generator b/rest/api/v3/mc_senders/.openapi-generator new file mode 100644 index 00000000..e2d6ff1c --- /dev/null +++ b/rest/api/v3/mc_senders/.openapi-generator @@ -0,0 +1,35 @@ +.openapi-generator +README.md +api_create_sender.go +api_delete_sender.go +api_get_sender.go +api_list_sender.go +api_reset_sender_verification.go +api_service.go +api_update_sender.go +docs/CreateSender.md +docs/CreateSenderRequest.md +docs/CreateSenderRequestFrom.md +docs/CreateSenderRequestReplyTo.md +docs/DeleteSender.md +docs/ErrorResponse.md +docs/ErrorResponseErrorsInner.md +docs/GetSender.md +docs/ListSender.md +docs/ListSender200Response.md +docs/ResetSenderVerification.md +docs/Sender.md +docs/SenderRequest.md +docs/SenderRequestFrom.md +docs/SenderRequestReplyTo.md +docs/UpdateSender.md +model_create_sender_request.go +model_create_sender_request_from.go +model_create_sender_request_reply_to.go +model_error_response.go +model_error_response_errors_inner.go +model_list_sender_200_response.go +model_sender.go +model_sender_request.go +model_sender_request_from.go +model_sender_request_reply_to.go diff --git a/rest/api/v3/mc_senders/.openapi-generator-ignore b/rest/api/v3/mc_senders/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/mc_senders/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/mc_senders/README.md b/rest/api/v3/mc_senders/README.md new file mode 100644 index 00000000..ab35271c --- /dev/null +++ b/rest/api/v3/mc_senders/README.md @@ -0,0 +1,74 @@ +# Go API client for + +The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:44.255671+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateSender* | [**CreateSender**](docs/CreateSender.md#createsender) | **Post** /v3/marketing/senders | Create a Sender +*DeleteSender* | [**DeleteSender**](docs/DeleteSender.md#deletesender) | **Delete** /v3/marketing/senders/{Id} | Delete a Sender +*GetSender* | [**GetSender**](docs/GetSender.md#getsender) | **Get** /v3/marketing/senders/{Id} | Get a specific Sender +*ListSender* | [**ListSender**](docs/ListSender.md#listsender) | **Get** /v3/marketing/senders | Get a list of all Senders +*ResetSenderVerification* | [**ResetSenderVerification**](docs/ResetSenderVerification.md#resetsenderverification) | **Post** /v3/marketing/senders/{Id}/resend_verification | Resend a Sender verification +*UpdateSender* | [**UpdateSender**](docs/UpdateSender.md#updatesender) | **Patch** /v3/marketing/senders/{Id} | Update a Sender + + +## Documentation For Models + + - [CreateSenderRequest](CreateSenderRequest.md) + - [CreateSenderRequestFrom](CreateSenderRequestFrom.md) + - [CreateSenderRequestReplyTo](CreateSenderRequestReplyTo.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [ListSender200Response](ListSender200Response.md) + - [Sender](Sender.md) + - [SenderRequest](SenderRequest.md) + - [SenderRequestFrom](SenderRequestFrom.md) + - [SenderRequestReplyTo](SenderRequestReplyTo.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/mc_senders/api_create_sender.go b/rest/api/v3/mc_senders/api_create_sender.go new file mode 100644 index 00000000..4c1ed8f8 --- /dev/null +++ b/rest/api/v3/mc_senders/api_create_sender.go @@ -0,0 +1,97 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type CreateSenderParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + CreateSenderRequest *CreateSenderRequest `json:"CreateSenderRequest,omitempty"` +} + +func (params *CreateSenderParam) SetOnbehalfof(Onbehalfof string) *CreateSenderParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateSenderParam) SetCreateSenderRequest(CreateSenderRequest CreateSenderRequest) *CreateSenderParam { + params.CreateSenderRequest = &CreateSenderRequest + return params +} + +// **This endpoint allows you to create a new Sender.** *You may create up to 100 unique Senders.* Senders are required to be verified before use. If your domain has been authenticated, a new Sender will auto verify on creation. Otherwise an email will be sent to the `from.email`. +func (c *ApiService) CreateSender(params *CreateSenderParam) (interface{}, error) { + path := "/v3/marketing/senders" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateSenderRequest != nil { + b, err := json.Marshal(*params.CreateSenderRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &Sender{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_senders/api_delete_sender.go b/rest/api/v3/mc_senders/api_delete_sender.go new file mode 100644 index 00000000..d6ad6699 --- /dev/null +++ b/rest/api/v3/mc_senders/api_delete_sender.go @@ -0,0 +1,78 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type DeleteSenderParam struct { + // The unique identifier of the Sender. + Id *int32 `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteSenderParam) SetId(Id int32) *DeleteSenderParam { + params.Id = &Id + return params +} +func (params *DeleteSenderParam) SetOnbehalfof(Onbehalfof string) *DeleteSenderParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete an existing Sender.** +func (c *ApiService) DeleteSender(params *DeleteSenderParam) (interface{}, error) { + path := "/v3/marketing/senders/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_senders/api_get_sender.go b/rest/api/v3/mc_senders/api_get_sender.go new file mode 100644 index 00000000..2f8820f9 --- /dev/null +++ b/rest/api/v3/mc_senders/api_get_sender.go @@ -0,0 +1,78 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type GetSenderParam struct { + // The unique identifier of the Sender. + Id *int32 `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetSenderParam) SetId(Id int32) *GetSenderParam { + params.Id = &Id + return params +} +func (params *GetSenderParam) SetOnbehalfof(Onbehalfof string) *GetSenderParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to get the details for a specific Sender by `id`.** +func (c *ApiService) GetSender(params *GetSenderParam) (interface{}, error) { + path := "/v3/marketing/senders/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &Sender{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_senders/api_list_sender.go b/rest/api/v3/mc_senders/api_list_sender.go new file mode 100644 index 00000000..93d74b0c --- /dev/null +++ b/rest/api/v3/mc_senders/api_list_sender.go @@ -0,0 +1,66 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListSenderParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListSenderParam) SetOnbehalfof(Onbehalfof string) *ListSenderParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to get a list of all your Senders.** +func (c *ApiService) ListSender(params *ListSenderParam) (interface{}, error) { + path := "/v3/marketing/senders" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListSender200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_senders/api_reset_sender_verification.go b/rest/api/v3/mc_senders/api_reset_sender_verification.go new file mode 100644 index 00000000..f1476bd0 --- /dev/null +++ b/rest/api/v3/mc_senders/api_reset_sender_verification.go @@ -0,0 +1,78 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type ResetSenderVerificationParam struct { + // The unique identifier of the Sender. + Id *int32 `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ResetSenderVerificationParam) SetId(Id int32) *ResetSenderVerificationParam { + params.Id = &Id + return params +} +func (params *ResetSenderVerificationParam) SetOnbehalfof(Onbehalfof string) *ResetSenderVerificationParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to resend the verification request for a specific Sender.** +func (c *ApiService) ResetSenderVerification(params *ResetSenderVerificationParam) (interface{}, error) { + path := "/v3/marketing/senders/{Id}/resend_verification" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_senders/api_service.go b/rest/api/v3/mc_senders/api_service.go new file mode 100644 index 00000000..d8fd91ab --- /dev/null +++ b/rest/api/v3/mc_senders/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/mc_senders/api_update_sender.go b/rest/api/v3/mc_senders/api_update_sender.go new file mode 100644 index 00000000..4677f7fa --- /dev/null +++ b/rest/api/v3/mc_senders/api_update_sender.go @@ -0,0 +1,109 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type UpdateSenderParam struct { + // The unique identifier of the Sender. + Id *int32 `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + SenderRequest *SenderRequest `json:"SenderRequest,omitempty"` +} + +func (params *UpdateSenderParam) SetId(Id int32) *UpdateSenderParam { + params.Id = &Id + return params +} +func (params *UpdateSenderParam) SetOnbehalfof(Onbehalfof string) *UpdateSenderParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateSenderParam) SetSenderRequest(SenderRequest SenderRequest) *UpdateSenderParam { + params.SenderRequest = &SenderRequest + return params +} + +// **This endpoint allows you to update an existing Sender.** Updates to `from.email` require re-verification. If your domain has been authenticated, a new Sender will auto verify on creation. Otherwise, an email will be sent to the `from.email`. Partial updates are allowed, but fields that are marked as \"required\" in the `POST` (create) endpoint must not be nil if that field is included in the `PATCH` request. +func (c *ApiService) UpdateSender(params *UpdateSenderParam) (interface{}, error) { + path := "/v3/marketing/senders/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SenderRequest != nil { + b, err := json.Marshal(*params.SenderRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &Sender{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_senders/docs/CreateSender.md b/rest/api/v3/mc_senders/docs/CreateSender.md new file mode 100644 index 00000000..c1f21b0e --- /dev/null +++ b/rest/api/v3/mc_senders/docs/CreateSender.md @@ -0,0 +1,49 @@ +# CreateSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateSender**](CreateSender.md#CreateSender) | **Post** /v3/marketing/senders | Create a Sender + + + +## CreateSender + +> Sender CreateSender(ctx, optional) + +Create a Sender + +**This endpoint allows you to create a new Sender.** *You may create up to 100 unique Senders.* Senders are required to be verified before use. If your domain has been authenticated, a new Sender will auto verify on creation. Otherwise an email will be sent to the `from.email`. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**CreateSenderRequest** | [**CreateSenderRequest**](CreateSenderRequest.md) | + +### Return type + +[**Sender**](Sender.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_senders/docs/CreateSenderRequest.md b/rest/api/v3/mc_senders/docs/CreateSenderRequest.md new file mode 100644 index 00000000..1848e991 --- /dev/null +++ b/rest/api/v3/mc_senders/docs/CreateSenderRequest.md @@ -0,0 +1,19 @@ +# CreateSenderRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Nickname** | **string** | A nickname for the Sender. Not used for sending. | +**From** | [**CreateSenderRequestFrom**](CreateSenderRequestFrom.md) | | +**ReplyTo** | [**CreateSenderRequestReplyTo**](CreateSenderRequestReplyTo.md) | | +**Address** | **string** | The physical address of the Sender. | +**Address2** | **string** | Additional Sender address information. |[optional] +**City** | **string** | The city of the Sender. | +**State** | **string** | The state of the Sender. |[optional] +**Zip** | **string** | The zipcode of the Sender. |[optional] +**Country** | **string** | The country of the Sender. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_senders/docs/CreateSenderRequestFrom.md b/rest/api/v3/mc_senders/docs/CreateSenderRequestFrom.md new file mode 100644 index 00000000..14b6faa0 --- /dev/null +++ b/rest/api/v3/mc_senders/docs/CreateSenderRequestFrom.md @@ -0,0 +1,12 @@ +# CreateSenderRequestFrom + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address from which your recipient will receive emails. | +**Name** | **string** | The name appended to the from email field. Typically your name or company name. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_senders/docs/CreateSenderRequestReplyTo.md b/rest/api/v3/mc_senders/docs/CreateSenderRequestReplyTo.md new file mode 100644 index 00000000..8f4f6e5e --- /dev/null +++ b/rest/api/v3/mc_senders/docs/CreateSenderRequestReplyTo.md @@ -0,0 +1,12 @@ +# CreateSenderRequestReplyTo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address to which your recipient will reply. | +**Name** | **string** | The name appended to the reply to email field. Typically your name or company name. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_senders/docs/DeleteSender.md b/rest/api/v3/mc_senders/docs/DeleteSender.md new file mode 100644 index 00000000..90499cef --- /dev/null +++ b/rest/api/v3/mc_senders/docs/DeleteSender.md @@ -0,0 +1,52 @@ +# DeleteSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSender**](DeleteSender.md#DeleteSender) | **Delete** /v3/marketing/senders/{Id} | Delete a Sender + + + +## DeleteSender + +> DeleteSender(ctx, Idoptional) + +Delete a Sender + +**This endpoint allows you to delete an existing Sender.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **int32** | The unique identifier of the Sender. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_senders/docs/ErrorResponse.md b/rest/api/v3/mc_senders/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/mc_senders/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_senders/docs/ErrorResponseErrorsInner.md b/rest/api/v3/mc_senders/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/mc_senders/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_senders/docs/GetSender.md b/rest/api/v3/mc_senders/docs/GetSender.md new file mode 100644 index 00000000..27544663 --- /dev/null +++ b/rest/api/v3/mc_senders/docs/GetSender.md @@ -0,0 +1,52 @@ +# GetSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetSender**](GetSender.md#GetSender) | **Get** /v3/marketing/senders/{Id} | Get a specific Sender + + + +## GetSender + +> Sender GetSender(ctx, Idoptional) + +Get a specific Sender + +**This endpoint allows you to get the details for a specific Sender by `id`.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **int32** | The unique identifier of the Sender. + +### Other Parameters + +Other parameters are passed through a pointer to a GetSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**Sender**](Sender.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_senders/docs/ListSender.md b/rest/api/v3/mc_senders/docs/ListSender.md new file mode 100644 index 00000000..0490f053 --- /dev/null +++ b/rest/api/v3/mc_senders/docs/ListSender.md @@ -0,0 +1,48 @@ +# ListSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSender**](ListSender.md#ListSender) | **Get** /v3/marketing/senders | Get a list of all Senders + + + +## ListSender + +> ListSender200Response ListSender(ctx, optional) + +Get a list of all Senders + +**This endpoint allows you to get a list of all your Senders.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListSender200Response**](ListSender200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_senders/docs/ListSender200Response.md b/rest/api/v3/mc_senders/docs/ListSender200Response.md new file mode 100644 index 00000000..d12cf53e --- /dev/null +++ b/rest/api/v3/mc_senders/docs/ListSender200Response.md @@ -0,0 +1,11 @@ +# ListSender200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | [**[]Sender**](Sender.md) | An array of Sender objects. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_senders/docs/ResetSenderVerification.md b/rest/api/v3/mc_senders/docs/ResetSenderVerification.md new file mode 100644 index 00000000..2351b423 --- /dev/null +++ b/rest/api/v3/mc_senders/docs/ResetSenderVerification.md @@ -0,0 +1,52 @@ +# ResetSenderVerification + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ResetSenderVerification**](ResetSenderVerification.md#ResetSenderVerification) | **Post** /v3/marketing/senders/{Id}/resend_verification | Resend a Sender verification + + + +## ResetSenderVerification + +> ResetSenderVerification(ctx, Idoptional) + +Resend a Sender verification + +**This endpoint allows you to resend the verification request for a specific Sender.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **int32** | The unique identifier of the Sender. + +### Other Parameters + +Other parameters are passed through a pointer to a ResetSenderVerificationParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_senders/docs/Sender.md b/rest/api/v3/mc_senders/docs/Sender.md new file mode 100644 index 00000000..13276770 --- /dev/null +++ b/rest/api/v3/mc_senders/docs/Sender.md @@ -0,0 +1,24 @@ +# Sender + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The unique identifier of the Sender. | +**Nickname** | **string** | A nickname for the Sender. Not used for sending. | +**From** | [**CreateSenderRequestFrom**](CreateSenderRequestFrom.md) | | +**ReplyTo** | [**CreateSenderRequestReplyTo**](CreateSenderRequestReplyTo.md) | | +**Address** | **string** | The physical address of the Sender. | +**Address2** | **string** | Additional Sender address information. |[optional] +**City** | **string** | The city of the Sender. | +**State** | **string** | The state of the Sender. |[optional] +**Zip** | **string** | The zipcode of the Sender. |[optional] +**Country** | **string** | The country of the Sender. | +**Verified** | **bool** | A boolean flag indicating whether the Sender is verified or not. Only verified Senders can be used to send email. | +**Locked** | **bool** | A boolean flag that is `true` when the Sender is associated with a campaign in Draft, Scheduled, or In Progress status. You cannot update or delete a locked Sender. | +**UpdatedAt** | **int32** | The time the Sender was last updated. | +**CreatedAt** | **int32** | The time the Sender was created. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_senders/docs/SenderRequest.md b/rest/api/v3/mc_senders/docs/SenderRequest.md new file mode 100644 index 00000000..8ca97438 --- /dev/null +++ b/rest/api/v3/mc_senders/docs/SenderRequest.md @@ -0,0 +1,19 @@ +# SenderRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Nickname** | **string** | A nickname for the Sender. Not used for sending. |[optional] +**From** | [**SenderRequestFrom**](SenderRequestFrom.md) | |[optional] +**ReplyTo** | [**SenderRequestReplyTo**](SenderRequestReplyTo.md) | |[optional] +**Address** | **string** | The physical address of the Sender. |[optional] +**Address2** | **string** | Additional Sender address information. |[optional] +**City** | **string** | The city of the Sender. |[optional] +**State** | **string** | The state of the Sender. |[optional] +**Zip** | **string** | The zipcode of the Sender. |[optional] +**Country** | **string** | The country of the Sender. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_senders/docs/SenderRequestFrom.md b/rest/api/v3/mc_senders/docs/SenderRequestFrom.md new file mode 100644 index 00000000..8db8be81 --- /dev/null +++ b/rest/api/v3/mc_senders/docs/SenderRequestFrom.md @@ -0,0 +1,12 @@ +# SenderRequestFrom + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address from which your recipient will receive emails. |[optional] +**Name** | **string** | The name appended to the from email field. Typically your name or company name. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_senders/docs/SenderRequestReplyTo.md b/rest/api/v3/mc_senders/docs/SenderRequestReplyTo.md new file mode 100644 index 00000000..cfebfa3c --- /dev/null +++ b/rest/api/v3/mc_senders/docs/SenderRequestReplyTo.md @@ -0,0 +1,12 @@ +# SenderRequestReplyTo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address to which your recipient will reply. |[optional] +**Name** | **string** | The name appended to the reply to email field. Typically your name or company name. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_senders/docs/UpdateSender.md b/rest/api/v3/mc_senders/docs/UpdateSender.md new file mode 100644 index 00000000..2d71e4e0 --- /dev/null +++ b/rest/api/v3/mc_senders/docs/UpdateSender.md @@ -0,0 +1,53 @@ +# UpdateSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSender**](UpdateSender.md#UpdateSender) | **Patch** /v3/marketing/senders/{Id} | Update a Sender + + + +## UpdateSender + +> Sender UpdateSender(ctx, Idoptional) + +Update a Sender + +**This endpoint allows you to update an existing Sender.** Updates to `from.email` require re-verification. If your domain has been authenticated, a new Sender will auto verify on creation. Otherwise, an email will be sent to the `from.email`. Partial updates are allowed, but fields that are marked as \"required\" in the `POST` (create) endpoint must not be nil if that field is included in the `PATCH` request. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **int32** | The unique identifier of the Sender. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**SenderRequest** | [**SenderRequest**](SenderRequest.md) | + +### Return type + +[**Sender**](Sender.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_senders/model_create_sender_request.go b/rest/api/v3/mc_senders/model_create_sender_request.go new file mode 100644 index 00000000..5b037483 --- /dev/null +++ b/rest/api/v3/mc_senders/model_create_sender_request.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateSenderRequest struct for CreateSenderRequest +type CreateSenderRequest struct { + // A nickname for the Sender. Not used for sending. + Nickname string `json:"nickname"` + From CreateSenderRequestFrom `json:"from"` + ReplyTo CreateSenderRequestReplyTo `json:"reply_to"` + // The physical address of the Sender. + Address string `json:"address"` + // Additional Sender address information. + Address2 *string `json:"address_2,omitempty"` + // The city of the Sender. + City string `json:"city"` + // The state of the Sender. + State *string `json:"state,omitempty"` + // The zipcode of the Sender. + Zip *string `json:"zip,omitempty"` + // The country of the Sender. + Country string `json:"country"` +} diff --git a/rest/api/v3/mc_senders/model_create_sender_request_from.go b/rest/api/v3/mc_senders/model_create_sender_request_from.go new file mode 100644 index 00000000..63bdb64e --- /dev/null +++ b/rest/api/v3/mc_senders/model_create_sender_request_from.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateSenderRequestFrom struct for CreateSenderRequestFrom +type CreateSenderRequestFrom struct { + // The email address from which your recipient will receive emails. + Email string `json:"email"` + // The name appended to the from email field. Typically your name or company name. + Name string `json:"name"` +} diff --git a/rest/api/v3/mc_senders/model_create_sender_request_reply_to.go b/rest/api/v3/mc_senders/model_create_sender_request_reply_to.go new file mode 100644 index 00000000..82a5abef --- /dev/null +++ b/rest/api/v3/mc_senders/model_create_sender_request_reply_to.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateSenderRequestReplyTo struct for CreateSenderRequestReplyTo +type CreateSenderRequestReplyTo struct { + // The email address to which your recipient will reply. + Email string `json:"email"` + // The name appended to the reply to email field. Typically your name or company name. + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/mc_senders/model_error_response.go b/rest/api/v3/mc_senders/model_error_response.go new file mode 100644 index 00000000..3513d637 --- /dev/null +++ b/rest/api/v3/mc_senders/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/mc_senders/model_error_response_errors_inner.go b/rest/api/v3/mc_senders/model_error_response_errors_inner.go new file mode 100644 index 00000000..43267f83 --- /dev/null +++ b/rest/api/v3/mc_senders/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/mc_senders/model_list_sender_200_response.go b/rest/api/v3/mc_senders/model_list_sender_200_response.go new file mode 100644 index 00000000..970767db --- /dev/null +++ b/rest/api/v3/mc_senders/model_list_sender_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSender200Response struct for ListSender200Response +type ListSender200Response struct { + // An array of Sender objects. + Results *[]Sender `json:"results,omitempty"` +} diff --git a/rest/api/v3/mc_senders/model_sender.go b/rest/api/v3/mc_senders/model_sender.go new file mode 100644 index 00000000..b204c704 --- /dev/null +++ b/rest/api/v3/mc_senders/model_sender.go @@ -0,0 +1,44 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Sender struct for Sender +type Sender struct { + // The unique identifier of the Sender. + Id int32 `json:"id"` + // A nickname for the Sender. Not used for sending. + Nickname string `json:"nickname"` + From CreateSenderRequestFrom `json:"from"` + ReplyTo CreateSenderRequestReplyTo `json:"reply_to"` + // The physical address of the Sender. + Address string `json:"address"` + // Additional Sender address information. + Address2 *string `json:"address_2,omitempty"` + // The city of the Sender. + City string `json:"city"` + // The state of the Sender. + State *string `json:"state,omitempty"` + // The zipcode of the Sender. + Zip *string `json:"zip,omitempty"` + // The country of the Sender. + Country string `json:"country"` + // A boolean flag indicating whether the Sender is verified or not. Only verified Senders can be used to send email. + Verified bool `json:"verified"` + // A boolean flag that is `true` when the Sender is associated with a campaign in Draft, Scheduled, or In Progress status. You cannot update or delete a locked Sender. + Locked bool `json:"locked"` + // The time the Sender was last updated. + UpdatedAt int32 `json:"updated_at"` + // The time the Sender was created. + CreatedAt int32 `json:"created_at"` +} diff --git a/rest/api/v3/mc_senders/model_sender_request.go b/rest/api/v3/mc_senders/model_sender_request.go new file mode 100644 index 00000000..88d80f3b --- /dev/null +++ b/rest/api/v3/mc_senders/model_sender_request.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SenderRequest struct for SenderRequest +type SenderRequest struct { + // A nickname for the Sender. Not used for sending. + Nickname *string `json:"nickname,omitempty"` + From *SenderRequestFrom `json:"from,omitempty"` + ReplyTo *SenderRequestReplyTo `json:"reply_to,omitempty"` + // The physical address of the Sender. + Address *string `json:"address,omitempty"` + // Additional Sender address information. + Address2 *string `json:"address_2,omitempty"` + // The city of the Sender. + City *string `json:"city,omitempty"` + // The state of the Sender. + State *string `json:"state,omitempty"` + // The zipcode of the Sender. + Zip *string `json:"zip,omitempty"` + // The country of the Sender. + Country *string `json:"country,omitempty"` +} diff --git a/rest/api/v3/mc_senders/model_sender_request_from.go b/rest/api/v3/mc_senders/model_sender_request_from.go new file mode 100644 index 00000000..618487c8 --- /dev/null +++ b/rest/api/v3/mc_senders/model_sender_request_from.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SenderRequestFrom struct for SenderRequestFrom +type SenderRequestFrom struct { + // The email address from which your recipient will receive emails. + Email *string `json:"email,omitempty"` + // The name appended to the from email field. Typically your name or company name. + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/mc_senders/model_sender_request_reply_to.go b/rest/api/v3/mc_senders/model_sender_request_reply_to.go new file mode 100644 index 00000000..4b79fc3b --- /dev/null +++ b/rest/api/v3/mc_senders/model_sender_request_reply_to.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SenderRequestReplyTo struct for SenderRequestReplyTo +type SenderRequestReplyTo struct { + // The email address to which your recipient will reply. + Email *string `json:"email,omitempty"` + // The name appended to the reply to email field. Typically your name or company name. + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/.openapi-generator b/rest/api/v3/mc_singlesends/.openapi-generator new file mode 100644 index 00000000..a516b78b --- /dev/null +++ b/rest/api/v3/mc_singlesends/.openapi-generator @@ -0,0 +1,82 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_create_single_send.go +api_delete_scheduled_single_send.go +api_delete_single_send.go +api_delete_single_sends.go +api_duplicate_single_send.go +api_get_single_send.go +api_list_category.go +api_list_single_send.go +api_schedule_single_send.go +api_search_single_send.go +api_service.go +api_update_single_send.go +docs/AbTestSummary.md +docs/CreateSingleSend.md +docs/DeleteScheduledSingleSend.md +docs/DeleteSingleSend.md +docs/DeleteSingleSends.md +docs/DuplicateSingleSend.md +docs/DuplicateSingleSendRequest.md +docs/Editor.md +docs/Editor1.md +docs/GetSingleSend.md +docs/Items.md +docs/ListCategory.md +docs/ListCategory200Response.md +docs/ListSingleSend.md +docs/ListSingleSend200Response.md +docs/ListSingleSend500Response.md +docs/ListSingleSend500ResponseErrorsInner.md +docs/Metadata.md +docs/ScheduleSingleSend.md +docs/ScheduleSingleSend201Response.md +docs/ScheduleSingleSendRequest.md +docs/SearchSingleSend.md +docs/SinglesendRequest.md +docs/SinglesendRequestEmailConfig.md +docs/SinglesendRequestSendTo.md +docs/SinglesendResponse.md +docs/SinglesendResponseEmailConfig.md +docs/SinglesendResponseSendTo.md +docs/SinglesendResponseShort.md +docs/SinglesendResponseWarningsInner.md +docs/SinglesendSchedule.md +docs/SinglesendSearch.md +docs/Status.md +docs/Status1.md +docs/Status2.md +docs/Status3.md +docs/Type.md +docs/UpdateSingleSend.md +docs/WinnerCriteria.md +model_ab_test_summary.go +model_duplicate_single_send_request.go +model_editor.go +model_editor1.go +model_items.go +model_list_category_200_response.go +model_list_single_send_200_response.go +model_list_single_send_500_response.go +model_list_single_send_500_response_errors_inner.go +model_metadata.go +model_schedule_single_send_201_response.go +model_schedule_single_send_request.go +model_singlesend_request.go +model_singlesend_request_email_config.go +model_singlesend_request_send_to.go +model_singlesend_response.go +model_singlesend_response_email_config.go +model_singlesend_response_send_to.go +model_singlesend_response_short.go +model_singlesend_response_warnings_inner.go +model_singlesend_schedule.go +model_singlesend_search.go +model_status.go +model_status1.go +model_status2.go +model_status3.go +model_type.go +model_winner_criteria.go diff --git a/rest/api/v3/mc_singlesends/.openapi-generator-ignore b/rest/api/v3/mc_singlesends/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/mc_singlesends/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/mc_singlesends/README.md b/rest/api/v3/mc_singlesends/README.md new file mode 100644 index 00000000..d3315aa0 --- /dev/null +++ b/rest/api/v3/mc_singlesends/README.md @@ -0,0 +1,103 @@ +# Go API client for + +The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. + +A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. + +Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). + +The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:44.267371+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateSingleSend* | [**CreateSingleSend**](docs/CreateSingleSend.md#createsinglesend) | **Post** /v3/marketing/singlesends | Create Single Send +*DeleteScheduledSingleSend* | [**DeleteScheduledSingleSend**](docs/DeleteScheduledSingleSend.md#deletescheduledsinglesend) | **Delete** /v3/marketing/singlesends/{Id}/schedule | Delete Single Send Schedule +*DeleteSingleSend* | [**DeleteSingleSend**](docs/DeleteSingleSend.md#deletesinglesend) | **Delete** /v3/marketing/singlesends/{Id} | Delete Single Send by ID +*DeleteSingleSends* | [**DeleteSingleSends**](docs/DeleteSingleSends.md#deletesinglesends) | **Delete** /v3/marketing/singlesends | Bulk Delete Single Sends +*DuplicateSingleSend* | [**DuplicateSingleSend**](docs/DuplicateSingleSend.md#duplicatesinglesend) | **Post** /v3/marketing/singlesends/{Id} | Duplicate Single Send +*GetSingleSend* | [**GetSingleSend**](docs/GetSingleSend.md#getsinglesend) | **Get** /v3/marketing/singlesends/{Id} | Get Single Send by ID +*ListCategory* | [**ListCategory**](docs/ListCategory.md#listcategory) | **Get** /v3/marketing/singlesends/categories | Get All Categories +*ListSingleSend* | [**ListSingleSend**](docs/ListSingleSend.md#listsinglesend) | **Get** /v3/marketing/singlesends | Get All Single Sends +*ScheduleSingleSend* | [**ScheduleSingleSend**](docs/ScheduleSingleSend.md#schedulesinglesend) | **Put** /v3/marketing/singlesends/{Id}/schedule | Schedule Single Send +*SearchSingleSend* | [**SearchSingleSend**](docs/SearchSingleSend.md#searchsinglesend) | **Post** /v3/marketing/singlesends/search | Get Single Sends Search +*UpdateSingleSend* | [**UpdateSingleSend**](docs/UpdateSingleSend.md#updatesinglesend) | **Patch** /v3/marketing/singlesends/{Id} | Update Single Send + + +## Documentation For Models + + - [AbTestSummary](AbTestSummary.md) + - [DuplicateSingleSendRequest](DuplicateSingleSendRequest.md) + - [Editor](Editor.md) + - [Editor1](Editor1.md) + - [Items](Items.md) + - [ListCategory200Response](ListCategory200Response.md) + - [ListSingleSend200Response](ListSingleSend200Response.md) + - [ListSingleSend500Response](ListSingleSend500Response.md) + - [ListSingleSend500ResponseErrorsInner](ListSingleSend500ResponseErrorsInner.md) + - [Metadata](Metadata.md) + - [ScheduleSingleSend201Response](ScheduleSingleSend201Response.md) + - [ScheduleSingleSendRequest](ScheduleSingleSendRequest.md) + - [SinglesendRequest](SinglesendRequest.md) + - [SinglesendRequestEmailConfig](SinglesendRequestEmailConfig.md) + - [SinglesendRequestSendTo](SinglesendRequestSendTo.md) + - [SinglesendResponse](SinglesendResponse.md) + - [SinglesendResponseEmailConfig](SinglesendResponseEmailConfig.md) + - [SinglesendResponseSendTo](SinglesendResponseSendTo.md) + - [SinglesendResponseShort](SinglesendResponseShort.md) + - [SinglesendResponseWarningsInner](SinglesendResponseWarningsInner.md) + - [SinglesendSchedule](SinglesendSchedule.md) + - [SinglesendSearch](SinglesendSearch.md) + - [Status](Status.md) + - [Status1](Status1.md) + - [Status2](Status2.md) + - [Status3](Status3.md) + - [Type](Type.md) + - [WinnerCriteria](WinnerCriteria.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/mc_singlesends/api_create_single_send.go b/rest/api/v3/mc_singlesends/api_create_single_send.go new file mode 100644 index 00000000..287fa77c --- /dev/null +++ b/rest/api/v3/mc_singlesends/api_create_single_send.go @@ -0,0 +1,80 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type CreateSingleSendParam struct { + // + SinglesendRequest *SinglesendRequest `json:"SinglesendRequest,omitempty"` +} + +func (params *CreateSingleSendParam) SetSinglesendRequest(SinglesendRequest SinglesendRequest) *CreateSingleSendParam { + params.SinglesendRequest = &SinglesendRequest + return params +} + +// **This endpoint allows you to create a new Single Send.** Please note that if you are migrating from the previous version of Single Sends, you no longer need to pass a template ID with your request to this endpoint. Instead, you will pass all template data in the `email_config` object. This endpoint will create a draft of the Single Send but will not send it or schedule it to be sent. Any `send_at` property value set with this endpoint will prepopulate the Single Send's send date. However, the Single Send will remain an unscheduled draft until it's updated with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI. +func (c *ApiService) CreateSingleSend(params *CreateSingleSendParam) (interface{}, error) { + path := "/v3/marketing/singlesends" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SinglesendRequest != nil { + b, err := json.Marshal(*params.SinglesendRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &SinglesendResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_singlesends/api_delete_scheduled_single_send.go b/rest/api/v3/mc_singlesends/api_delete_scheduled_single_send.go new file mode 100644 index 00000000..fc1cb6a3 --- /dev/null +++ b/rest/api/v3/mc_singlesends/api_delete_scheduled_single_send.go @@ -0,0 +1,76 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DeleteScheduledSingleSendParam struct { + // + Id *string `json:"id"` +} + +func (params *DeleteScheduledSingleSendParam) SetId(Id string) *DeleteScheduledSingleSendParam { + params.Id = &Id + return params +} + +// **This endpoint allows you to cancel a scheduled Single Send using a Single Send ID.** Making a DELETE request to this endpoint will cancel the scheduled sending of a Single Send. The request will not delete the Single Send itself. Deleting a Single Send can be done by passing a DELETE request to `/marketing/singlesends/{id}`. +func (c *ApiService) DeleteScheduledSingleSend(params *DeleteScheduledSingleSendParam) (interface{}, error) { + path := "/v3/marketing/singlesends/{Id}/schedule" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SinglesendSchedule{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_singlesends/api_delete_single_send.go b/rest/api/v3/mc_singlesends/api_delete_single_send.go new file mode 100644 index 00000000..ebe93580 --- /dev/null +++ b/rest/api/v3/mc_singlesends/api_delete_single_send.go @@ -0,0 +1,68 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DeleteSingleSendParam struct { + // + Id *string `json:"id"` +} + +func (params *DeleteSingleSendParam) SetId(Id string) *DeleteSingleSendParam { + params.Id = &Id + return params +} + +// **This endpoint allows you to delete one Single Send using a Single Send ID.** To first retrieve all your Single Sends' IDs, you can make a GET request to the `/marketing/singlensends` endpoint. Please note that a `DELETE` request is permanent, and your Single Send will not be recoverable after deletion. +func (c *ApiService) DeleteSingleSend(params *DeleteSingleSendParam) (interface{}, error) { + path := "/v3/marketing/singlesends/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 404 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_singlesends/api_delete_single_sends.go b/rest/api/v3/mc_singlesends/api_delete_single_sends.go new file mode 100644 index 00000000..8dfd6ddf --- /dev/null +++ b/rest/api/v3/mc_singlesends/api_delete_single_sends.go @@ -0,0 +1,76 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type DeleteSingleSendsParam struct { + // Single Send IDs to delete + Ids *[]string `json:"ids,omitempty"` +} + +func (params *DeleteSingleSendsParam) SetIds(Ids []string) *DeleteSingleSendsParam { + params.Ids = &Ids + return params +} + +// **This endpoint allows you to delete multiple Single Sends using an array of Single Sends IDs.** To first retrieve all your Single Sends' IDs, you can make a GET request to the `/marketing/singlensends` endpoint. Please note that a DELETE request is permanent, and your Single Sends will not be recoverable after deletion. +func (c *ApiService) DeleteSingleSends(params *DeleteSingleSendsParam) (interface{}, error) { + path := "/v3/marketing/singlesends" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Ids != nil { + for _, item := range *params.Ids { + v, err := json.Marshal(item) + + if err != nil { + return nil, err + } + + data.Add("ids", string(v)) + + } + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 404 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_singlesends/api_duplicate_single_send.go b/rest/api/v3/mc_singlesends/api_duplicate_single_send.go new file mode 100644 index 00000000..a794b6d0 --- /dev/null +++ b/rest/api/v3/mc_singlesends/api_duplicate_single_send.go @@ -0,0 +1,91 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DuplicateSingleSendParam struct { + // + Id *string `json:"id"` + // + DuplicateSingleSendRequest *DuplicateSingleSendRequest `json:"DuplicateSingleSendRequest,omitempty"` +} + +func (params *DuplicateSingleSendParam) SetId(Id string) *DuplicateSingleSendParam { + params.Id = &Id + return params +} +func (params *DuplicateSingleSendParam) SetDuplicateSingleSendRequest(DuplicateSingleSendRequest DuplicateSingleSendRequest) *DuplicateSingleSendParam { + params.DuplicateSingleSendRequest = &DuplicateSingleSendRequest + return params +} + +// **This endpoint allows you to duplicate an existing Single Send using its Single Send ID.** Duplicating a Single Send is useful when you want to create a Single Send but don't want to start from scratch. Once duplicated, you can update or edit the Single Send by making a PATCH request to the `/marketing/singlesends/{id}` endpoint. If you leave the `name` field blank, your duplicate will be assigned the name of the Single Send it was copied from with the text “Copy of ” prepended to it. The `name` field length is limited to 100 characters, so the end of the new Single Send name, including “Copy of ”, will be trimmed if the name exceeds this limit. +func (c *ApiService) DuplicateSingleSend(params *DuplicateSingleSendParam) (interface{}, error) { + path := "/v3/marketing/singlesends/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.DuplicateSingleSendRequest != nil { + b, err := json.Marshal(*params.DuplicateSingleSendRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &SinglesendResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_singlesends/api_get_single_send.go b/rest/api/v3/mc_singlesends/api_get_single_send.go new file mode 100644 index 00000000..92da9755 --- /dev/null +++ b/rest/api/v3/mc_singlesends/api_get_single_send.go @@ -0,0 +1,76 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type GetSingleSendParam struct { + // + Id *string `json:"id"` +} + +func (params *GetSingleSendParam) SetId(Id string) *GetSingleSendParam { + params.Id = &Id + return params +} + +// **This endpoint allows you to retrieve details about one Single Send using a Single Send ID.** You can retrieve all of your Single Sends by making a GET request to the `/marketing/singlesends` endpoint. +func (c *ApiService) GetSingleSend(params *GetSingleSendParam) (interface{}, error) { + path := "/v3/marketing/singlesends/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SinglesendResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_singlesends/api_list_category.go b/rest/api/v3/mc_singlesends/api_list_category.go new file mode 100644 index 00000000..944060d8 --- /dev/null +++ b/rest/api/v3/mc_singlesends/api_list_category.go @@ -0,0 +1,56 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListCategoryParam struct { +} + +// **This endpoint allows you to retrieve all the categories associated with your Single Sends.** This endpoint will return your latest 1,000 categories. +func (c *ApiService) ListCategory() (interface{}, error) { + path := "/v3/marketing/singlesends/categories" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListCategory200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_singlesends/api_list_single_send.go b/rest/api/v3/mc_singlesends/api_list_single_send.go new file mode 100644 index 00000000..11925ac1 --- /dev/null +++ b/rest/api/v3/mc_singlesends/api_list_single_send.go @@ -0,0 +1,77 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListSingleSendParam struct { + // + PageSize *int32 `json:"page_size,omitempty"` + // + PageToken *string `json:"page_token,omitempty"` +} + +func (params *ListSingleSendParam) SetPageSize(PageSize int32) *ListSingleSendParam { + params.PageSize = &PageSize + return params +} +func (params *ListSingleSendParam) SetPageToken(PageToken string) *ListSingleSendParam { + params.PageToken = &PageToken + return params +} + +// **This endpoint allows you to retrieve all your Single Sends.** Returns all of your Single Sends with condensed details about each, including the Single Sends' IDs. For more details about an individual Single Send, pass the Single Send's ID to the `/marketing/singlesends/{id}` endpoint. +func (c *ApiService) ListSingleSend(params *ListSingleSendParam) (interface{}, error) { + path := "/v3/marketing/singlesends" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + if params != nil && params.PageToken != nil { + data.Set("page_token", *params.PageToken) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListSingleSend200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_singlesends/api_schedule_single_send.go b/rest/api/v3/mc_singlesends/api_schedule_single_send.go new file mode 100644 index 00000000..95d6382b --- /dev/null +++ b/rest/api/v3/mc_singlesends/api_schedule_single_send.go @@ -0,0 +1,91 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type ScheduleSingleSendParam struct { + // + Id *string `json:"id"` + // + ScheduleSingleSendRequest *ScheduleSingleSendRequest `json:"ScheduleSingleSendRequest,omitempty"` +} + +func (params *ScheduleSingleSendParam) SetId(Id string) *ScheduleSingleSendParam { + params.Id = &Id + return params +} +func (params *ScheduleSingleSendParam) SetScheduleSingleSendRequest(ScheduleSingleSendRequest ScheduleSingleSendRequest) *ScheduleSingleSendParam { + params.ScheduleSingleSendRequest = &ScheduleSingleSendRequest + return params +} + +// **This endpoint allows you to send a Single Send immediately or schedule it to be sent at a later time.** To send your message immediately, set the `send_at` property value to the string `now`. To schedule the Single Send for future delivery, set the `send_at` value to your desired send time in [ISO 8601 date time format](https://www.iso.org/iso-8601-date-and-time-format.html) (`yyyy-MM-ddTHH:mm:ssZ`). +func (c *ApiService) ScheduleSingleSend(params *ScheduleSingleSendParam) (interface{}, error) { + path := "/v3/marketing/singlesends/{Id}/schedule" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.ScheduleSingleSendRequest != nil { + b, err := json.Marshal(*params.ScheduleSingleSendRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &ScheduleSingleSend201Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_singlesends/api_search_single_send.go b/rest/api/v3/mc_singlesends/api_search_single_send.go new file mode 100644 index 00000000..998bb10d --- /dev/null +++ b/rest/api/v3/mc_singlesends/api_search_single_send.go @@ -0,0 +1,91 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type SearchSingleSendParam struct { + // + PageSize *int32 `json:"page_size,omitempty"` + // + PageToken *string `json:"page_token,omitempty"` + // + SinglesendSearch *SinglesendSearch `json:"SinglesendSearch,omitempty"` +} + +func (params *SearchSingleSendParam) SetPageSize(PageSize int32) *SearchSingleSendParam { + params.PageSize = &PageSize + return params +} +func (params *SearchSingleSendParam) SetPageToken(PageToken string) *SearchSingleSendParam { + params.PageToken = &PageToken + return params +} +func (params *SearchSingleSendParam) SetSinglesendSearch(SinglesendSearch SinglesendSearch) *SearchSingleSendParam { + params.SinglesendSearch = &SinglesendSearch + return params +} + +// **This endpoint allows you to search for Single Sends based on specified criteria.** You can search for Single Sends by passing a combination of values using the `name`, `status`, and `categories` request body fields. For example, if you want to search for all Single Sends that are \"drafts\" or \"scheduled\" and also associated with the category \"shoes,\" your request body may look like the example below. ```javascript { \"status\": [ \"draft\", \"scheduled\" ], \"categories\": [ \"shoes\" ], } ``` +func (c *ApiService) SearchSingleSend(params *SearchSingleSendParam) (interface{}, error) { + path := "/v3/marketing/singlesends/search" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + if params != nil && params.PageToken != nil { + data.Set("page_token", *params.PageToken) + } + body := []byte{} + if params != nil && params.SinglesendSearch != nil { + b, err := json.Marshal(*params.SinglesendSearch) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListSingleSend200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_singlesends/api_service.go b/rest/api/v3/mc_singlesends/api_service.go new file mode 100644 index 00000000..dbf3b326 --- /dev/null +++ b/rest/api/v3/mc_singlesends/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/mc_singlesends/api_update_single_send.go b/rest/api/v3/mc_singlesends/api_update_single_send.go new file mode 100644 index 00000000..d345e078 --- /dev/null +++ b/rest/api/v3/mc_singlesends/api_update_single_send.go @@ -0,0 +1,99 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type UpdateSingleSendParam struct { + // + Id *string `json:"id"` + // + SinglesendRequest *SinglesendRequest `json:"SinglesendRequest,omitempty"` +} + +func (params *UpdateSingleSendParam) SetId(Id string) *UpdateSingleSendParam { + params.Id = &Id + return params +} +func (params *UpdateSingleSendParam) SetSinglesendRequest(SinglesendRequest SinglesendRequest) *UpdateSingleSendParam { + params.SinglesendRequest = &SinglesendRequest + return params +} + +// **This endpoint allows you to update a Single Send using a Single Send ID.** You only need to pass the properties you want to update. Any blank or missing properties will remain unaltered. This endpoint will update a draft of the Single Send but will not send it or schedule it to be sent. Any `send_at` property value set with this endpoint will prepopulate the Single Send's send date. However, the Single Send will remain an unscheduled draft until it's updated with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI. +func (c *ApiService) UpdateSingleSend(params *UpdateSingleSendParam) (interface{}, error) { + path := "/v3/marketing/singlesends/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SinglesendRequest != nil { + b, err := json.Marshal(*params.SinglesendRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 202 { + ps := &SinglesendResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_singlesends/docs/AbTestSummary.md b/rest/api/v3/mc_singlesends/docs/AbTestSummary.md new file mode 100644 index 00000000..c0c3c316 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/AbTestSummary.md @@ -0,0 +1,17 @@ +# AbTestSummary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | [**Type**](Type.md) | What differs between the A/B tests | +**WinnerCriteria** | [**WinnerCriteria**](WinnerCriteria.md) | How the winner will be decided | +**TestPercentage** | **int32** | What percentage of your recipient will be included in your A/B testing | +**Duration** | **string** | How long the A/B Testing will last | +**WinningTemplateId** | **string** | Winner of the A/B Test | +**WinnerSelectedAt** | **string** | When the winner was selected | +**ExpirationDate** | **string** | Last day to select an A/B Test Winner | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/CreateSingleSend.md b/rest/api/v3/mc_singlesends/docs/CreateSingleSend.md new file mode 100644 index 00000000..41b0107b --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/CreateSingleSend.md @@ -0,0 +1,48 @@ +# CreateSingleSend + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateSingleSend**](CreateSingleSend.md#CreateSingleSend) | **Post** /v3/marketing/singlesends | Create Single Send + + + +## CreateSingleSend + +> SinglesendResponse CreateSingleSend(ctx, optional) + +Create Single Send + +**This endpoint allows you to create a new Single Send.** Please note that if you are migrating from the previous version of Single Sends, you no longer need to pass a template ID with your request to this endpoint. Instead, you will pass all template data in the `email_config` object. This endpoint will create a draft of the Single Send but will not send it or schedule it to be sent. Any `send_at` property value set with this endpoint will prepopulate the Single Send's send date. However, the Single Send will remain an unscheduled draft until it's updated with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateSingleSendParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**SinglesendRequest** | [**SinglesendRequest**](SinglesendRequest.md) | + +### Return type + +[**SinglesendResponse**](SinglesendResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_singlesends/docs/DeleteScheduledSingleSend.md b/rest/api/v3/mc_singlesends/docs/DeleteScheduledSingleSend.md new file mode 100644 index 00000000..e9d4fd0a --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/DeleteScheduledSingleSend.md @@ -0,0 +1,51 @@ +# DeleteScheduledSingleSend + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteScheduledSingleSend**](DeleteScheduledSingleSend.md#DeleteScheduledSingleSend) | **Delete** /v3/marketing/singlesends/{Id}/schedule | Delete Single Send Schedule + + + +## DeleteScheduledSingleSend + +> SinglesendSchedule DeleteScheduledSingleSend(ctx, Id) + +Delete Single Send Schedule + +**This endpoint allows you to cancel a scheduled Single Send using a Single Send ID.** Making a DELETE request to this endpoint will cancel the scheduled sending of a Single Send. The request will not delete the Single Send itself. Deleting a Single Send can be done by passing a DELETE request to `/marketing/singlesends/{id}`. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteScheduledSingleSendParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**SinglesendSchedule**](SinglesendSchedule.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_singlesends/docs/DeleteSingleSend.md b/rest/api/v3/mc_singlesends/docs/DeleteSingleSend.md new file mode 100644 index 00000000..9d987dcb --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/DeleteSingleSend.md @@ -0,0 +1,51 @@ +# DeleteSingleSend + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSingleSend**](DeleteSingleSend.md#DeleteSingleSend) | **Delete** /v3/marketing/singlesends/{Id} | Delete Single Send by ID + + + +## DeleteSingleSend + +> DeleteSingleSend(ctx, Id) + +Delete Single Send by ID + +**This endpoint allows you to delete one Single Send using a Single Send ID.** To first retrieve all your Single Sends' IDs, you can make a GET request to the `/marketing/singlensends` endpoint. Please note that a `DELETE` request is permanent, and your Single Send will not be recoverable after deletion. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSingleSendParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_singlesends/docs/DeleteSingleSends.md b/rest/api/v3/mc_singlesends/docs/DeleteSingleSends.md new file mode 100644 index 00000000..80c58b83 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/DeleteSingleSends.md @@ -0,0 +1,48 @@ +# DeleteSingleSends + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSingleSends**](DeleteSingleSends.md#DeleteSingleSends) | **Delete** /v3/marketing/singlesends | Bulk Delete Single Sends + + + +## DeleteSingleSends + +> DeleteSingleSends(ctx, optional) + +Bulk Delete Single Sends + +**This endpoint allows you to delete multiple Single Sends using an array of Single Sends IDs.** To first retrieve all your Single Sends' IDs, you can make a GET request to the `/marketing/singlensends` endpoint. Please note that a DELETE request is permanent, and your Single Sends will not be recoverable after deletion. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSingleSendsParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Ids** | **[]string** | Single Send IDs to delete + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_singlesends/docs/DuplicateSingleSend.md b/rest/api/v3/mc_singlesends/docs/DuplicateSingleSend.md new file mode 100644 index 00000000..6a0272f3 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/DuplicateSingleSend.md @@ -0,0 +1,52 @@ +# DuplicateSingleSend + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DuplicateSingleSend**](DuplicateSingleSend.md#DuplicateSingleSend) | **Post** /v3/marketing/singlesends/{Id} | Duplicate Single Send + + + +## DuplicateSingleSend + +> SinglesendResponse DuplicateSingleSend(ctx, Idoptional) + +Duplicate Single Send + +**This endpoint allows you to duplicate an existing Single Send using its Single Send ID.** Duplicating a Single Send is useful when you want to create a Single Send but don't want to start from scratch. Once duplicated, you can update or edit the Single Send by making a PATCH request to the `/marketing/singlesends/{id}` endpoint. If you leave the `name` field blank, your duplicate will be assigned the name of the Single Send it was copied from with the text “Copy of ” prepended to it. The `name` field length is limited to 100 characters, so the end of the new Single Send name, including “Copy of ”, will be trimmed if the name exceeds this limit. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a DuplicateSingleSendParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**DuplicateSingleSendRequest** | [**DuplicateSingleSendRequest**](DuplicateSingleSendRequest.md) | + +### Return type + +[**SinglesendResponse**](SinglesendResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_singlesends/docs/DuplicateSingleSendRequest.md b/rest/api/v3/mc_singlesends/docs/DuplicateSingleSendRequest.md new file mode 100644 index 00000000..9b9c44e6 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/DuplicateSingleSendRequest.md @@ -0,0 +1,11 @@ +# DuplicateSingleSendRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the duplicate Single Send. If you choose to leave the name field blank, your duplicate will be assigned the name of the Single Send it was copied from with the text 'Copy of ' prepended to it. The end of the new Single Send name, including 'Copy of ', will be trimmed if the name exceeds the character limit. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/Editor.md b/rest/api/v3/mc_singlesends/docs/Editor.md new file mode 100644 index 00000000..9d170841 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/Editor.md @@ -0,0 +1,13 @@ +# Editor + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**CODE** | string | (value: `"code"`) +**DESIGN** | string | (value: `"design"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/Editor1.md b/rest/api/v3/mc_singlesends/docs/Editor1.md new file mode 100644 index 00000000..2ddc5d89 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/Editor1.md @@ -0,0 +1,13 @@ +# Editor1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**CODE** | string | (value: `"code"`) +**DESIGN** | string | (value: `"design"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/GetSingleSend.md b/rest/api/v3/mc_singlesends/docs/GetSingleSend.md new file mode 100644 index 00000000..0c7434bb --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/GetSingleSend.md @@ -0,0 +1,51 @@ +# GetSingleSend + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetSingleSend**](GetSingleSend.md#GetSingleSend) | **Get** /v3/marketing/singlesends/{Id} | Get Single Send by ID + + + +## GetSingleSend + +> SinglesendResponse GetSingleSend(ctx, Id) + +Get Single Send by ID + +**This endpoint allows you to retrieve details about one Single Send using a Single Send ID.** You can retrieve all of your Single Sends by making a GET request to the `/marketing/singlesends` endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a GetSingleSendParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**SinglesendResponse**](SinglesendResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_singlesends/docs/Items.md b/rest/api/v3/mc_singlesends/docs/Items.md new file mode 100644 index 00000000..781c4ec7 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/Items.md @@ -0,0 +1,14 @@ +# Items + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DRAFT** | string | (value: `"draft"`) +**SCHEDULED** | string | (value: `"scheduled"`) +**TRIGGERED** | string | (value: `"triggered"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/ListCategory.md b/rest/api/v3/mc_singlesends/docs/ListCategory.md new file mode 100644 index 00000000..4f7a81be --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/ListCategory.md @@ -0,0 +1,44 @@ +# ListCategory + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListCategory**](ListCategory.md#ListCategory) | **Get** /v3/marketing/singlesends/categories | Get All Categories + + + +## ListCategory + +> ListCategory200Response ListCategory(ctx, ) + +Get All Categories + +**This endpoint allows you to retrieve all the categories associated with your Single Sends.** This endpoint will return your latest 1,000 categories. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListCategoryParams struct + + +### Return type + +[**ListCategory200Response**](ListCategory200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_singlesends/docs/ListCategory200Response.md b/rest/api/v3/mc_singlesends/docs/ListCategory200Response.md new file mode 100644 index 00000000..27af5839 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/ListCategory200Response.md @@ -0,0 +1,11 @@ +# ListCategory200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Categories** | **[]string** | list of latest one thousand unique categories associated with all Single Sends in ascending order |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/ListSingleSend.md b/rest/api/v3/mc_singlesends/docs/ListSingleSend.md new file mode 100644 index 00000000..fee8c3fb --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/ListSingleSend.md @@ -0,0 +1,49 @@ +# ListSingleSend + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSingleSend**](ListSingleSend.md#ListSingleSend) | **Get** /v3/marketing/singlesends | Get All Single Sends + + + +## ListSingleSend + +> ListSingleSend200Response ListSingleSend(ctx, optional) + +Get All Single Sends + +**This endpoint allows you to retrieve all your Single Sends.** Returns all of your Single Sends with condensed details about each, including the Single Sends' IDs. For more details about an individual Single Send, pass the Single Send's ID to the `/marketing/singlesends/{id}` endpoint. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSingleSendParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**PageSize** | **int32** | +**PageToken** | **string** | + +### Return type + +[**ListSingleSend200Response**](ListSingleSend200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_singlesends/docs/ListSingleSend200Response.md b/rest/api/v3/mc_singlesends/docs/ListSingleSend200Response.md new file mode 100644 index 00000000..8ad91d0e --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/ListSingleSend200Response.md @@ -0,0 +1,12 @@ +# ListSingleSend200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]SinglesendResponseShort**](SinglesendResponseShort.md) | |[optional] +**Metadata** | [**Metadata**](Metadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/ListSingleSend500Response.md b/rest/api/v3/mc_singlesends/docs/ListSingleSend500Response.md new file mode 100644 index 00000000..a07c4f3a --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/ListSingleSend500Response.md @@ -0,0 +1,11 @@ +# ListSingleSend500Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ListSingleSend500ResponseErrorsInner**](ListSingleSend500ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/ListSingleSend500ResponseErrorsInner.md b/rest/api/v3/mc_singlesends/docs/ListSingleSend500ResponseErrorsInner.md new file mode 100644 index 00000000..24c6f3f9 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/ListSingleSend500ResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ListSingleSend500ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | |[optional] +**Message** | **string** | |[optional] +**ErrorId** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/Metadata.md b/rest/api/v3/mc_singlesends/docs/Metadata.md new file mode 100644 index 00000000..6121300c --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/Metadata.md @@ -0,0 +1,14 @@ +# Metadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prev** | **string** | |[optional] +**Self** | **string** | |[optional] +**Next** | **string** | |[optional] +**Count** | **int32** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/ScheduleSingleSend.md b/rest/api/v3/mc_singlesends/docs/ScheduleSingleSend.md new file mode 100644 index 00000000..738548c6 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/ScheduleSingleSend.md @@ -0,0 +1,52 @@ +# ScheduleSingleSend + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ScheduleSingleSend**](ScheduleSingleSend.md#ScheduleSingleSend) | **Put** /v3/marketing/singlesends/{Id}/schedule | Schedule Single Send + + + +## ScheduleSingleSend + +> ScheduleSingleSend201Response ScheduleSingleSend(ctx, Idoptional) + +Schedule Single Send + +**This endpoint allows you to send a Single Send immediately or schedule it to be sent at a later time.** To send your message immediately, set the `send_at` property value to the string `now`. To schedule the Single Send for future delivery, set the `send_at` value to your desired send time in [ISO 8601 date time format](https://www.iso.org/iso-8601-date-and-time-format.html) (`yyyy-MM-ddTHH:mm:ssZ`). + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a ScheduleSingleSendParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**ScheduleSingleSendRequest** | [**ScheduleSingleSendRequest**](ScheduleSingleSendRequest.md) | + +### Return type + +[**ScheduleSingleSend201Response**](ScheduleSingleSend201Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_singlesends/docs/ScheduleSingleSend201Response.md b/rest/api/v3/mc_singlesends/docs/ScheduleSingleSend201Response.md new file mode 100644 index 00000000..565341af --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/ScheduleSingleSend201Response.md @@ -0,0 +1,12 @@ +# ScheduleSingleSend201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SendAt** | [**time.Time**](time.Time.md) | The ISO 8601 time at which to send the Single Send. This must be in future or the string `now`. SendGrid [Mail Send](https://docs.sendgrid.com/api-reference/mail-send/mail-send) emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via [Marketing Campaigns](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns/). |[optional] +**Status** | [**Status**](Status.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/ScheduleSingleSendRequest.md b/rest/api/v3/mc_singlesends/docs/ScheduleSingleSendRequest.md new file mode 100644 index 00000000..02842731 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/ScheduleSingleSendRequest.md @@ -0,0 +1,11 @@ +# ScheduleSingleSendRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SendAt** | [**time.Time**](time.Time.md) | The ISO 8601 time at which to send the Single Send. This must be in future or the string `now`. SendGrid [Mail Send](https://docs.sendgrid.com/api-reference/mail-send/mail-send) emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via [Marketing Campaigns](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns/). | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/SearchSingleSend.md b/rest/api/v3/mc_singlesends/docs/SearchSingleSend.md new file mode 100644 index 00000000..cf141ace --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/SearchSingleSend.md @@ -0,0 +1,50 @@ +# SearchSingleSend + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SearchSingleSend**](SearchSingleSend.md#SearchSingleSend) | **Post** /v3/marketing/singlesends/search | Get Single Sends Search + + + +## SearchSingleSend + +> ListSingleSend200Response SearchSingleSend(ctx, optional) + +Get Single Sends Search + +**This endpoint allows you to search for Single Sends based on specified criteria.** You can search for Single Sends by passing a combination of values using the `name`, `status`, and `categories` request body fields. For example, if you want to search for all Single Sends that are \"drafts\" or \"scheduled\" and also associated with the category \"shoes,\" your request body may look like the example below. ```javascript { \"status\": [ \"draft\", \"scheduled\" ], \"categories\": [ \"shoes\" ], } ``` + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a SearchSingleSendParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**PageSize** | **int32** | +**PageToken** | **string** | +**SinglesendSearch** | [**SinglesendSearch**](SinglesendSearch.md) | + +### Return type + +[**ListSingleSend200Response**](ListSingleSend200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendRequest.md b/rest/api/v3/mc_singlesends/docs/SinglesendRequest.md new file mode 100644 index 00000000..b84a5487 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/SinglesendRequest.md @@ -0,0 +1,15 @@ +# SinglesendRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the Single Send. | +**Categories** | **[]string** | The categories to associate with this Single Send. |[optional] +**SendAt** | [**time.Time**](time.Time.md) | Set this property to an ISO 8601 formatted date-time when you would like to send the Single Send. Please note that any `send_at` property value set with this endpoint will prepopulate the send date in the SendGrid user interface (UI). However, the Single Send will remain an unscheduled draft until it's updated with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI. Additionally, the `now` keyword is a valid `send_at` value only when using the Schedule Single Send endpoint. Setting this property to `now` with this endpoint will cause an error. |[optional] +**SendTo** | [**SinglesendRequestSendTo**](SinglesendRequestSendTo.md) | |[optional] +**EmailConfig** | [**SinglesendRequestEmailConfig**](SinglesendRequestEmailConfig.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendRequestEmailConfig.md b/rest/api/v3/mc_singlesends/docs/SinglesendRequestEmailConfig.md new file mode 100644 index 00000000..633bd086 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/SinglesendRequestEmailConfig.md @@ -0,0 +1,20 @@ +# SinglesendRequestEmailConfig + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Subject** | **string** | The subject line of the Single Send. Do not include this field when using a `design_id`. |[optional] +**HtmlContent** | **string** | The HTML content of the Single Send. Do not include this field when using a `design_id`. |[optional] +**PlainContent** | **string** | The plain text content of the Single Send. Do not include this field when using a `design_id`. |[optional] +**GeneratePlainContent** | **bool** | If set to `true`, `plain_content` is always generated from `html_content`. If set to false, `plain_content` is not altered. |[optional] [default to true] +**DesignId** | **string** | A `design_id` can be used in place of `html_content`, `plain_content`, and/or `subject`. You can retrieve a design's ID from the [\"List Designs\" endpoint](https://docs.sendgrid.com/api-reference/designs-api/list-designs) or by pulling it from the design's detail page URL in the Marketing Campaigns App. |[optional] +**Editor** | [**Editor**](Editor.md) | The editor — `\"design\"` or `\"code\"` — used to modify the Single Send's design in the Marketing Campaigns App. |[optional] +**SuppressionGroupId** | **int32** | The ID of the Suppression Group to allow recipients to unsubscribe — you must provide this or the `custom_unsubscribe_url`. |[optional] +**CustomUnsubscribeUrl** | **string** | The URL allowing recipients to unsubscribe — you must provide this or the `suppression_group_id`. |[optional] +**SenderId** | **int32** | The ID of the verified Sender. You can retrieve a verified Sender's ID from the [\"Get Verified Senders\" endpoint](https://www.twilio.com/docs/sendgrid/api-reference/sender-verification/get-all-verified-senders) or by pulling it from the Sender's detail page URL in the SendGrid App. |[optional] +**IpPool** | **string** | The name of the IP Pool from which the Single Send emails are sent. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendRequestSendTo.md b/rest/api/v3/mc_singlesends/docs/SinglesendRequestSendTo.md new file mode 100644 index 00000000..f1f2d523 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/SinglesendRequestSendTo.md @@ -0,0 +1,13 @@ +# SinglesendRequestSendTo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ListIds** | **[]string** | The recipient List IDs that will receive the Single Send. |[optional] +**SegmentIds** | **[]string** | The recipient Segment IDs that will receive the Single Send. |[optional] +**All** | **bool** | Set to `true` to send to All Contacts. If set to `false`, at least one `list_ids` or `segment_ids` value must be provided before the Single Send is scheduled to be sent to recipients. |[optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendResponse.md b/rest/api/v3/mc_singlesends/docs/SinglesendResponse.md new file mode 100644 index 00000000..95d0cbcf --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/SinglesendResponse.md @@ -0,0 +1,20 @@ +# SinglesendResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The unique ID for the Single Send. |[optional] +**Name** | **string** | The name of the Single Send. |[optional] +**Status** | [**Status2**](Status2.md) | The current status of the Single Send. The status may be `draft`, `scheduled`, or `triggered`. |[optional] +**Categories** | **[]string** | The categories associated with this Single Send. |[optional] +**SendAt** | [**time.Time**](time.Time.md) | An ISO 8601 formatted date-time when the Single Send is set to be sent. Please note that any `send_at` property value will have no effect while the Single Send `status` is `draft`. You must update the Single Send with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI to schedule it. |[optional] +**SendTo** | [**SinglesendResponseSendTo**](SinglesendResponseSendTo.md) | |[optional] +**UpdatedAt** | [**time.Time**](time.Time.md) | the ISO 8601 time at which the Single Send was last updated. |[optional] +**CreatedAt** | [**time.Time**](time.Time.md) | the ISO 8601 time at which the Single Send was created. |[optional] +**EmailConfig** | [**SinglesendResponseEmailConfig**](SinglesendResponseEmailConfig.md) | |[optional] +**Warnings** | [**[]SinglesendResponseWarningsInner**](SinglesendResponseWarningsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendResponseEmailConfig.md b/rest/api/v3/mc_singlesends/docs/SinglesendResponseEmailConfig.md new file mode 100644 index 00000000..e9faf1fb --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/SinglesendResponseEmailConfig.md @@ -0,0 +1,20 @@ +# SinglesendResponseEmailConfig + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Subject** | **string** | The subject line of the Single Send. This property is not used when a `design_id` value is set. |[optional] +**HtmlContent** | **string** | The HTML content of the Single Send. This property is not used when a `design_id` value is set. |[optional] +**PlainContent** | **string** | The plain text content of the Single Send. This property is not used when a `design_id` value is set. |[optional] +**GeneratePlainContent** | **bool** | If this property is set to `true`, `plain_content` is always generated from `html_content`. If it's set to false, `plain_content` is not altered. |[optional] [default to true] +**DesignId** | **string** | A `design_id` can be used in place of `html_content`, `plain_content`, and/or `subject`. You can retrieve a design's ID from the [**List Designs** endpoint](https://docs.sendgrid.com/api-reference/designs-api/list-designs) or by pulling it from the design's detail page URL in the Marketing Campaigns App. |[optional] +**Editor** | [**Editor1**](Editor1.md) | The editor, `design` or `code`, used to modify the Single Send's design in the Marketing Campaigns application user interface. |[optional] +**SuppressionGroupId** | **int32** | The ID of the Suppression Group to allow recipients to unsubscribe. You must provide a `suppression_group_id` or the `custom_unsubscribe_url` with your Single Send. |[optional] +**CustomUnsubscribeUrl** | **string** | The URL allowing recipients to unsubscribe. You must provide a `custom_unsubscribe_url` or a `suppression_group_id` with your Single Send. |[optional] +**SenderId** | **int32** | The ID of the verified sender from whom the Single Send will be sent. You can retrieve a verified sender's ID from the [**Get Verified Senders** endpoint](https://www.twilio.com/docs/sendgrid/api-reference/sender-verification/get-all-verified-senders) or by pulling it from the sender's detail page URL in the SendGrid App. |[optional] +**IpPool** | **string** | The name of the IP Pool from which the Single Send emails are sent. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendResponseSendTo.md b/rest/api/v3/mc_singlesends/docs/SinglesendResponseSendTo.md new file mode 100644 index 00000000..d7e33ea8 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/SinglesendResponseSendTo.md @@ -0,0 +1,13 @@ +# SinglesendResponseSendTo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ListIds** | **[]string** | The IDs of each contact list to which the Single Send will be sent. |[optional] +**SegmentIds** | **[]string** | The IDs of each segment to which the Single Send will be sent. |[optional] +**All** | **bool** | If this property is set to `true`, the Single Send will be sent to all of your contacts. If it's set to `false`, at least one `list_ids` or `segment_ids` value must be provided before the Single Send is scheduled to be sent. |[optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendResponseShort.md b/rest/api/v3/mc_singlesends/docs/SinglesendResponseShort.md new file mode 100644 index 00000000..bfe6a053 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/SinglesendResponseShort.md @@ -0,0 +1,19 @@ +# SinglesendResponseShort + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**Name** | **string** | name of the Single Send | +**Abtest** | [**AbTestSummary**](AbTestSummary.md) | | +**Status** | [**Status3**](Status3.md) | current status of the Single Send | +**Categories** | **[]string** | categories to associate with this Single Send | +**SendAt** | [**time.Time**](time.Time.md) | The ISO 8601 time at which to send the Single Send. This must be in future or the string `now`. SendGrid [Mail Send](https://docs.sendgrid.com/api-reference/mail-send/mail-send) emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via [Marketing Campaigns](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns/). |[optional] +**IsAbtest** | **bool** | true if the Single Send's AB Test functionality has been toggled on | +**UpdatedAt** | [**time.Time**](time.Time.md) | the ISO 8601 time at which the Single Send was last updated | +**CreatedAt** | [**time.Time**](time.Time.md) | the ISO 8601 time at which the Single Send was created | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendResponseWarningsInner.md b/rest/api/v3/mc_singlesends/docs/SinglesendResponseWarningsInner.md new file mode 100644 index 00000000..15c969c3 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/SinglesendResponseWarningsInner.md @@ -0,0 +1,13 @@ +# SinglesendResponseWarningsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | |[optional] +**Field** | **string** | |[optional] +**WarningId** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendSchedule.md b/rest/api/v3/mc_singlesends/docs/SinglesendSchedule.md new file mode 100644 index 00000000..df6d4402 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/SinglesendSchedule.md @@ -0,0 +1,12 @@ +# SinglesendSchedule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SendAt** | [**time.Time**](time.Time.md) | The ISO 8601 time at which to send the Single Send. This must be in future or the string `now`. SendGrid [Mail Send](https://docs.sendgrid.com/api-reference/mail-send/mail-send) emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via [Marketing Campaigns](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns/). | +**Status** | [**Status1**](Status1.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendSearch.md b/rest/api/v3/mc_singlesends/docs/SinglesendSearch.md new file mode 100644 index 00000000..79589188 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/SinglesendSearch.md @@ -0,0 +1,13 @@ +# SinglesendSearch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | leading and trailing wildcard search on name of the Single Send |[optional] +**Status** | [**[]Items**](Items.md) | current status of the Single Send |[optional] +**Categories** | **[]string** | categories to associate with this Single Send, match any single send that has at least one of the categories |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/Status.md b/rest/api/v3/mc_singlesends/docs/Status.md new file mode 100644 index 00000000..533fff83 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/Status.md @@ -0,0 +1,12 @@ +# Status + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**SCHEDULED** | string | (value: `"scheduled"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/Status1.md b/rest/api/v3/mc_singlesends/docs/Status1.md new file mode 100644 index 00000000..b19ad21b --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/Status1.md @@ -0,0 +1,14 @@ +# Status1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DRAFT** | string | (value: `"draft"`) +**SCHEDULED** | string | (value: `"scheduled"`) +**TRIGGERED** | string | (value: `"triggered"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/Status2.md b/rest/api/v3/mc_singlesends/docs/Status2.md new file mode 100644 index 00000000..eb4cca4d --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/Status2.md @@ -0,0 +1,14 @@ +# Status2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DRAFT** | string | (value: `"draft"`) +**SCHEDULED** | string | (value: `"scheduled"`) +**TRIGGERED** | string | (value: `"triggered"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/Status3.md b/rest/api/v3/mc_singlesends/docs/Status3.md new file mode 100644 index 00000000..1b7a0104 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/Status3.md @@ -0,0 +1,14 @@ +# Status3 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DRAFT** | string | (value: `"draft"`) +**SCHEDULED** | string | (value: `"scheduled"`) +**TRIGGERED** | string | (value: `"triggered"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/Type.md b/rest/api/v3/mc_singlesends/docs/Type.md new file mode 100644 index 00000000..1ea1cee4 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/Type.md @@ -0,0 +1,13 @@ +# Type + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**SUBJECT** | string | (value: `"subject"`) +**CONTENT** | string | (value: `"content"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/UpdateSingleSend.md b/rest/api/v3/mc_singlesends/docs/UpdateSingleSend.md new file mode 100644 index 00000000..9614a701 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/UpdateSingleSend.md @@ -0,0 +1,52 @@ +# UpdateSingleSend + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSingleSend**](UpdateSingleSend.md#UpdateSingleSend) | **Patch** /v3/marketing/singlesends/{Id} | Update Single Send + + + +## UpdateSingleSend + +> SinglesendResponse UpdateSingleSend(ctx, Idoptional) + +Update Single Send + +**This endpoint allows you to update a Single Send using a Single Send ID.** You only need to pass the properties you want to update. Any blank or missing properties will remain unaltered. This endpoint will update a draft of the Single Send but will not send it or schedule it to be sent. Any `send_at` property value set with this endpoint will prepopulate the Single Send's send date. However, the Single Send will remain an unscheduled draft until it's updated with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSingleSendParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**SinglesendRequest** | [**SinglesendRequest**](SinglesendRequest.md) | + +### Return type + +[**SinglesendResponse**](SinglesendResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_singlesends/docs/WinnerCriteria.md b/rest/api/v3/mc_singlesends/docs/WinnerCriteria.md new file mode 100644 index 00000000..d35ce1e3 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/WinnerCriteria.md @@ -0,0 +1,14 @@ +# WinnerCriteria + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**OPEN** | string | (value: `"open"`) +**CLICK** | string | (value: `"click"`) +**MANUAL** | string | (value: `"manual"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/model_ab_test_summary.go b/rest/api/v3/mc_singlesends/model_ab_test_summary.go new file mode 100644 index 00000000..c7a67236 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_ab_test_summary.go @@ -0,0 +1,32 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AbTestSummary struct for AbTestSummary +type AbTestSummary struct { + // What differs between the A/B tests + Type Type `json:"type"` + // How the winner will be decided + WinnerCriteria WinnerCriteria `json:"winner_criteria"` + // What percentage of your recipient will be included in your A/B testing + TestPercentage int32 `json:"test_percentage"` + // How long the A/B Testing will last + Duration string `json:"duration"` + // Winner of the A/B Test + WinningTemplateId string `json:"winning_template_id"` + // When the winner was selected + WinnerSelectedAt string `json:"winner_selected_at"` + // Last day to select an A/B Test Winner + ExpirationDate string `json:"expiration_date"` +} diff --git a/rest/api/v3/mc_singlesends/model_duplicate_single_send_request.go b/rest/api/v3/mc_singlesends/model_duplicate_single_send_request.go new file mode 100644 index 00000000..48f96a53 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_duplicate_single_send_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DuplicateSingleSendRequest struct for DuplicateSingleSendRequest +type DuplicateSingleSendRequest struct { + // The name of the duplicate Single Send. If you choose to leave the name field blank, your duplicate will be assigned the name of the Single Send it was copied from with the text 'Copy of ' prepended to it. The end of the new Single Send name, including 'Copy of ', will be trimmed if the name exceeds the character limit. + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_editor.go b/rest/api/v3/mc_singlesends/model_editor.go new file mode 100644 index 00000000..d498173d --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_editor.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Editor the model 'Editor' +type Editor string + +// List of Editor +const ( + EDITOR_CODE Editor = "code" + EDITOR_DESIGN Editor = "design" +) diff --git a/rest/api/v3/mc_singlesends/model_editor1.go b/rest/api/v3/mc_singlesends/model_editor1.go new file mode 100644 index 00000000..b5e0aff7 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_editor1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Editor1 the model 'Editor1' +type Editor1 string + +// List of Editor1 +const ( + EDITOR1_CODE Editor1 = "code" + EDITOR1_DESIGN Editor1 = "design" +) diff --git a/rest/api/v3/mc_singlesends/model_items.go b/rest/api/v3/mc_singlesends/model_items.go new file mode 100644 index 00000000..cb49393e --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_items.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Items the model 'Items' +type Items string + +// List of Items +const ( + ITEMS_DRAFT Items = "draft" + ITEMS_SCHEDULED Items = "scheduled" + ITEMS_TRIGGERED Items = "triggered" +) diff --git a/rest/api/v3/mc_singlesends/model_list_category_200_response.go b/rest/api/v3/mc_singlesends/model_list_category_200_response.go new file mode 100644 index 00000000..53e5017a --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_list_category_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListCategory200Response struct for ListCategory200Response +type ListCategory200Response struct { + // list of latest one thousand unique categories associated with all Single Sends in ascending order + Categories *[]string `json:"categories,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_list_single_send_200_response.go b/rest/api/v3/mc_singlesends/model_list_single_send_200_response.go new file mode 100644 index 00000000..655bd91e --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_list_single_send_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSingleSend200Response struct for ListSingleSend200Response +type ListSingleSend200Response struct { + Result *[]SinglesendResponseShort `json:"result,omitempty"` + Metadata *Metadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_list_single_send_500_response.go b/rest/api/v3/mc_singlesends/model_list_single_send_500_response.go new file mode 100644 index 00000000..4475e149 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_list_single_send_500_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSingleSend500Response struct for ListSingleSend500Response +type ListSingleSend500Response struct { + Errors *[]ListSingleSend500ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_list_single_send_500_response_errors_inner.go b/rest/api/v3/mc_singlesends/model_list_single_send_500_response_errors_inner.go new file mode 100644 index 00000000..00fae477 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_list_single_send_500_response_errors_inner.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSingleSend500ResponseErrorsInner struct for ListSingleSend500ResponseErrorsInner +type ListSingleSend500ResponseErrorsInner struct { + Field *string `json:"field,omitempty"` + Message *string `json:"message,omitempty"` + ErrorId *string `json:"error_id,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_metadata.go b/rest/api/v3/mc_singlesends/model_metadata.go new file mode 100644 index 00000000..56fb60e7 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_metadata.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Metadata struct for Metadata +type Metadata struct { + Prev *string `json:"prev,omitempty"` + Self *string `json:"self,omitempty"` + Next *string `json:"next,omitempty"` + Count *int32 `json:"count,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_schedule_single_send_201_response.go b/rest/api/v3/mc_singlesends/model_schedule_single_send_201_response.go new file mode 100644 index 00000000..01d2c672 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_schedule_single_send_201_response.go @@ -0,0 +1,25 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "time" +) + +// ScheduleSingleSend201Response struct for ScheduleSingleSend201Response +type ScheduleSingleSend201Response struct { + // The ISO 8601 time at which to send the Single Send. This must be in future or the string `now`. SendGrid [Mail Send](https://docs.sendgrid.com/api-reference/mail-send/mail-send) emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via [Marketing Campaigns](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns/). + SendAt *time.Time `json:"send_at,omitempty"` + Status *Status `json:"status,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_schedule_single_send_request.go b/rest/api/v3/mc_singlesends/model_schedule_single_send_request.go new file mode 100644 index 00000000..cf2c6448 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_schedule_single_send_request.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "time" +) + +// ScheduleSingleSendRequest struct for ScheduleSingleSendRequest +type ScheduleSingleSendRequest struct { + // The ISO 8601 time at which to send the Single Send. This must be in future or the string `now`. SendGrid [Mail Send](https://docs.sendgrid.com/api-reference/mail-send/mail-send) emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via [Marketing Campaigns](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns/). + SendAt time.Time `json:"send_at"` +} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_request.go b/rest/api/v3/mc_singlesends/model_singlesend_request.go new file mode 100644 index 00000000..790d1be9 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_singlesend_request.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "time" +) + +// SinglesendRequest struct for SinglesendRequest +type SinglesendRequest struct { + // The name of the Single Send. + Name string `json:"name"` + // The categories to associate with this Single Send. + Categories *[]string `json:"categories,omitempty"` + // Set this property to an ISO 8601 formatted date-time when you would like to send the Single Send. Please note that any `send_at` property value set with this endpoint will prepopulate the send date in the SendGrid user interface (UI). However, the Single Send will remain an unscheduled draft until it's updated with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI. Additionally, the `now` keyword is a valid `send_at` value only when using the Schedule Single Send endpoint. Setting this property to `now` with this endpoint will cause an error. + SendAt *time.Time `json:"send_at,omitempty"` + SendTo *SinglesendRequestSendTo `json:"send_to,omitempty"` + EmailConfig *SinglesendRequestEmailConfig `json:"email_config,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_request_email_config.go b/rest/api/v3/mc_singlesends/model_singlesend_request_email_config.go new file mode 100644 index 00000000..666324db --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_singlesend_request_email_config.go @@ -0,0 +1,38 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SinglesendRequestEmailConfig struct for SinglesendRequestEmailConfig +type SinglesendRequestEmailConfig struct { + // The subject line of the Single Send. Do not include this field when using a `design_id`. + Subject *string `json:"subject,omitempty"` + // The HTML content of the Single Send. Do not include this field when using a `design_id`. + HtmlContent *string `json:"html_content,omitempty"` + // The plain text content of the Single Send. Do not include this field when using a `design_id`. + PlainContent *string `json:"plain_content,omitempty"` + // If set to `true`, `plain_content` is always generated from `html_content`. If set to false, `plain_content` is not altered. + GeneratePlainContent *bool `json:"generate_plain_content,omitempty"` + // A `design_id` can be used in place of `html_content`, `plain_content`, and/or `subject`. You can retrieve a design's ID from the [\"List Designs\" endpoint](https://docs.sendgrid.com/api-reference/designs-api/list-designs) or by pulling it from the design's detail page URL in the Marketing Campaigns App. + DesignId *string `json:"design_id,omitempty"` + // The editor — `\"design\"` or `\"code\"` — used to modify the Single Send's design in the Marketing Campaigns App. + Editor *Editor `json:"editor,omitempty"` + // The ID of the Suppression Group to allow recipients to unsubscribe — you must provide this or the `custom_unsubscribe_url`. + SuppressionGroupId *int32 `json:"suppression_group_id,omitempty"` + // The URL allowing recipients to unsubscribe — you must provide this or the `suppression_group_id`. + CustomUnsubscribeUrl *string `json:"custom_unsubscribe_url,omitempty"` + // The ID of the verified Sender. You can retrieve a verified Sender's ID from the [\"Get Verified Senders\" endpoint](https://www.twilio.com/docs/sendgrid/api-reference/sender-verification/get-all-verified-senders) or by pulling it from the Sender's detail page URL in the SendGrid App. + SenderId *int32 `json:"sender_id,omitempty"` + // The name of the IP Pool from which the Single Send emails are sent. + IpPool *string `json:"ip_pool,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_request_send_to.go b/rest/api/v3/mc_singlesends/model_singlesend_request_send_to.go new file mode 100644 index 00000000..5de4bf4b --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_singlesend_request_send_to.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SinglesendRequestSendTo struct for SinglesendRequestSendTo +type SinglesendRequestSendTo struct { + // The recipient List IDs that will receive the Single Send. + ListIds *[]string `json:"list_ids,omitempty"` + // The recipient Segment IDs that will receive the Single Send. + SegmentIds *[]string `json:"segment_ids,omitempty"` + // Set to `true` to send to All Contacts. If set to `false`, at least one `list_ids` or `segment_ids` value must be provided before the Single Send is scheduled to be sent to recipients. + All *bool `json:"all,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_response.go b/rest/api/v3/mc_singlesends/model_singlesend_response.go new file mode 100644 index 00000000..580d2fe2 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_singlesend_response.go @@ -0,0 +1,39 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "time" +) + +// SinglesendResponse struct for SinglesendResponse +type SinglesendResponse struct { + // The unique ID for the Single Send. + Id *string `json:"id,omitempty"` + // The name of the Single Send. + Name *string `json:"name,omitempty"` + // The current status of the Single Send. The status may be `draft`, `scheduled`, or `triggered`. + Status *Status2 `json:"status,omitempty"` + // The categories associated with this Single Send. + Categories *[]string `json:"categories,omitempty"` + // An ISO 8601 formatted date-time when the Single Send is set to be sent. Please note that any `send_at` property value will have no effect while the Single Send `status` is `draft`. You must update the Single Send with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI to schedule it. + SendAt *time.Time `json:"send_at,omitempty"` + SendTo *SinglesendResponseSendTo `json:"send_to,omitempty"` + // the ISO 8601 time at which the Single Send was last updated. + UpdatedAt *time.Time `json:"updated_at,omitempty"` + // the ISO 8601 time at which the Single Send was created. + CreatedAt *time.Time `json:"created_at,omitempty"` + EmailConfig *SinglesendResponseEmailConfig `json:"email_config,omitempty"` + Warnings *[]SinglesendResponseWarningsInner `json:"warnings,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_response_email_config.go b/rest/api/v3/mc_singlesends/model_singlesend_response_email_config.go new file mode 100644 index 00000000..678c3ac1 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_singlesend_response_email_config.go @@ -0,0 +1,38 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SinglesendResponseEmailConfig struct for SinglesendResponseEmailConfig +type SinglesendResponseEmailConfig struct { + // The subject line of the Single Send. This property is not used when a `design_id` value is set. + Subject *string `json:"subject,omitempty"` + // The HTML content of the Single Send. This property is not used when a `design_id` value is set. + HtmlContent *string `json:"html_content,omitempty"` + // The plain text content of the Single Send. This property is not used when a `design_id` value is set. + PlainContent *string `json:"plain_content,omitempty"` + // If this property is set to `true`, `plain_content` is always generated from `html_content`. If it's set to false, `plain_content` is not altered. + GeneratePlainContent *bool `json:"generate_plain_content,omitempty"` + // A `design_id` can be used in place of `html_content`, `plain_content`, and/or `subject`. You can retrieve a design's ID from the [**List Designs** endpoint](https://docs.sendgrid.com/api-reference/designs-api/list-designs) or by pulling it from the design's detail page URL in the Marketing Campaigns App. + DesignId *string `json:"design_id,omitempty"` + // The editor, `design` or `code`, used to modify the Single Send's design in the Marketing Campaigns application user interface. + Editor *Editor1 `json:"editor,omitempty"` + // The ID of the Suppression Group to allow recipients to unsubscribe. You must provide a `suppression_group_id` or the `custom_unsubscribe_url` with your Single Send. + SuppressionGroupId *int32 `json:"suppression_group_id,omitempty"` + // The URL allowing recipients to unsubscribe. You must provide a `custom_unsubscribe_url` or a `suppression_group_id` with your Single Send. + CustomUnsubscribeUrl *string `json:"custom_unsubscribe_url,omitempty"` + // The ID of the verified sender from whom the Single Send will be sent. You can retrieve a verified sender's ID from the [**Get Verified Senders** endpoint](https://www.twilio.com/docs/sendgrid/api-reference/sender-verification/get-all-verified-senders) or by pulling it from the sender's detail page URL in the SendGrid App. + SenderId *int32 `json:"sender_id,omitempty"` + // The name of the IP Pool from which the Single Send emails are sent. + IpPool *string `json:"ip_pool,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_response_send_to.go b/rest/api/v3/mc_singlesends/model_singlesend_response_send_to.go new file mode 100644 index 00000000..fee100a5 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_singlesend_response_send_to.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SinglesendResponseSendTo struct for SinglesendResponseSendTo +type SinglesendResponseSendTo struct { + // The IDs of each contact list to which the Single Send will be sent. + ListIds *[]string `json:"list_ids,omitempty"` + // The IDs of each segment to which the Single Send will be sent. + SegmentIds *[]string `json:"segment_ids,omitempty"` + // If this property is set to `true`, the Single Send will be sent to all of your contacts. If it's set to `false`, at least one `list_ids` or `segment_ids` value must be provided before the Single Send is scheduled to be sent. + All *bool `json:"all,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_response_short.go b/rest/api/v3/mc_singlesends/model_singlesend_response_short.go new file mode 100644 index 00000000..dcf0ed8f --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_singlesend_response_short.go @@ -0,0 +1,38 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "time" +) + +// SinglesendResponseShort struct for SinglesendResponseShort +type SinglesendResponseShort struct { + Id string `json:"id"` + // name of the Single Send + Name string `json:"name"` + Abtest AbTestSummary `json:"abtest"` + // current status of the Single Send + Status Status3 `json:"status"` + // categories to associate with this Single Send + Categories []string `json:"categories"` + // The ISO 8601 time at which to send the Single Send. This must be in future or the string `now`. SendGrid [Mail Send](https://docs.sendgrid.com/api-reference/mail-send/mail-send) emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via [Marketing Campaigns](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns/). + SendAt *time.Time `json:"send_at,omitempty"` + // true if the Single Send's AB Test functionality has been toggled on + IsAbtest bool `json:"is_abtest"` + // the ISO 8601 time at which the Single Send was last updated + UpdatedAt time.Time `json:"updated_at"` + // the ISO 8601 time at which the Single Send was created + CreatedAt time.Time `json:"created_at"` +} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_response_warnings_inner.go b/rest/api/v3/mc_singlesends/model_singlesend_response_warnings_inner.go new file mode 100644 index 00000000..7a9ce910 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_singlesend_response_warnings_inner.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SinglesendResponseWarningsInner struct for SinglesendResponseWarningsInner +type SinglesendResponseWarningsInner struct { + Message *string `json:"message,omitempty"` + Field *string `json:"field,omitempty"` + WarningId *string `json:"warning_id,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_schedule.go b/rest/api/v3/mc_singlesends/model_singlesend_schedule.go new file mode 100644 index 00000000..b0902355 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_singlesend_schedule.go @@ -0,0 +1,25 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "time" +) + +// SinglesendSchedule struct for SinglesendSchedule +type SinglesendSchedule struct { + // The ISO 8601 time at which to send the Single Send. This must be in future or the string `now`. SendGrid [Mail Send](https://docs.sendgrid.com/api-reference/mail-send/mail-send) emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via [Marketing Campaigns](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns/). + SendAt time.Time `json:"send_at"` + Status *Status1 `json:"status,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_search.go b/rest/api/v3/mc_singlesends/model_singlesend_search.go new file mode 100644 index 00000000..c4576308 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_singlesend_search.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SinglesendSearch struct for SinglesendSearch +type SinglesendSearch struct { + // leading and trailing wildcard search on name of the Single Send + Name *string `json:"name,omitempty"` + // current status of the Single Send + Status *[]Items `json:"status,omitempty"` + // categories to associate with this Single Send, match any single send that has at least one of the categories + Categories *[]string `json:"categories,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_status.go b/rest/api/v3/mc_singlesends/model_status.go new file mode 100644 index 00000000..7e88d91f --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_status.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status the model 'Status' +type Status string + +// List of Status +const ( + STATUS_SCHEDULED Status = "scheduled" +) diff --git a/rest/api/v3/mc_singlesends/model_status1.go b/rest/api/v3/mc_singlesends/model_status1.go new file mode 100644 index 00000000..90636c6e --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_status1.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status1 the model 'Status1' +type Status1 string + +// List of Status1 +const ( + STATUS1_DRAFT Status1 = "draft" + STATUS1_SCHEDULED Status1 = "scheduled" + STATUS1_TRIGGERED Status1 = "triggered" +) diff --git a/rest/api/v3/mc_singlesends/model_status2.go b/rest/api/v3/mc_singlesends/model_status2.go new file mode 100644 index 00000000..42c16a05 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_status2.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status2 the model 'Status2' +type Status2 string + +// List of Status2 +const ( + STATUS2_DRAFT Status2 = "draft" + STATUS2_SCHEDULED Status2 = "scheduled" + STATUS2_TRIGGERED Status2 = "triggered" +) diff --git a/rest/api/v3/mc_singlesends/model_status3.go b/rest/api/v3/mc_singlesends/model_status3.go new file mode 100644 index 00000000..7caa1f9d --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_status3.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status3 the model 'Status3' +type Status3 string + +// List of Status3 +const ( + STATUS3_DRAFT Status3 = "draft" + STATUS3_SCHEDULED Status3 = "scheduled" + STATUS3_TRIGGERED Status3 = "triggered" +) diff --git a/rest/api/v3/mc_singlesends/model_type.go b/rest/api/v3/mc_singlesends/model_type.go new file mode 100644 index 00000000..a2fc86e3 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_type.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Type the model 'Type' +type Type string + +// List of Type +const ( + TYPE_SUBJECT Type = "subject" + TYPE_CONTENT Type = "content" +) diff --git a/rest/api/v3/mc_singlesends/model_winner_criteria.go b/rest/api/v3/mc_singlesends/model_winner_criteria.go new file mode 100644 index 00000000..069e7c0f --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_winner_criteria.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// WinnerCriteria the model 'WinnerCriteria' +type WinnerCriteria string + +// List of WinnerCriteria +const ( + WINNERCRITERIA_OPEN WinnerCriteria = "open" + WINNERCRITERIA_CLICK WinnerCriteria = "click" + WINNERCRITERIA_MANUAL WinnerCriteria = "manual" +) diff --git a/rest/api/v3/mc_test/.openapi-generator b/rest/api/v3/mc_test/.openapi-generator new file mode 100644 index 00000000..183fa1b4 --- /dev/null +++ b/rest/api/v3/mc_test/.openapi-generator @@ -0,0 +1,12 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_send_test_marketing_email.go +api_service.go +docs/ErrorResponse.md +docs/ErrorResponseErrorsInner.md +docs/SendTestMarketingEmail.md +docs/SendTestMarketingEmailRequest.md +model_error_response.go +model_error_response_errors_inner.go +model_send_test_marketing_email_request.go diff --git a/rest/api/v3/mc_test/.openapi-generator-ignore b/rest/api/v3/mc_test/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/mc_test/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/mc_test/README.md b/rest/api/v3/mc_test/README.md new file mode 100644 index 00000000..057ea8ba --- /dev/null +++ b/rest/api/v3/mc_test/README.md @@ -0,0 +1,62 @@ +# Go API client for + +The Twilio SendGrid Test Email API allows you to test a marketing email by first sending it to a list of up to 10 email addresses before pushing to a contact list or segment. With this feature, you can test the layout and content of your message in multiple email clients and with multiple recipients to see how it will function in a real-world scenario. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:44.250515+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*SendTestMarketingEmail* | [**SendTestMarketingEmail**](docs/SendTestMarketingEmail.md#sendtestmarketingemail) | **Post** /v3/marketing/test/send_email | Send a Test Marketing Email + + +## Documentation For Models + + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [SendTestMarketingEmailRequest](SendTestMarketingEmailRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/mc_test/api_send_test_marketing_email.go b/rest/api/v3/mc_test/api_send_test_marketing_email.go new file mode 100644 index 00000000..13462d79 --- /dev/null +++ b/rest/api/v3/mc_test/api_send_test_marketing_email.go @@ -0,0 +1,72 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Send Test Email API +* The Twilio SendGrid Test Email API allows you to test a marketing email by first sending it to a list of up to 10 email addresses before pushing to a contact list or segment. With this feature, you can test the layout and content of your message in multiple email clients and with multiple recipients to see how it will function in a real-world scenario. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type SendTestMarketingEmailParam struct { + // + SendTestMarketingEmailRequest *SendTestMarketingEmailRequest `json:"SendTestMarketingEmailRequest,omitempty"` +} + +func (params *SendTestMarketingEmailParam) SetSendTestMarketingEmailRequest(SendTestMarketingEmailRequest SendTestMarketingEmailRequest) *SendTestMarketingEmailParam { + params.SendTestMarketingEmailRequest = &SendTestMarketingEmailRequest + return params +} + +// **This endpoint allows you to send a test marketing email to a list of email addresses**. Before sending a marketing message, you can test it using this endpoint. You may specify up to **10 contacts** in the `emails` request body field. You must also specify a `template_id` and include either a `from_address` or `sender_id`. You can manage your templates with the [Twilio SendGrid App](https://mc.sendgrid.com/dynamic-templates) or the [Transactional Templates API](https://docs.sendgrid.com/api-reference/transactional-templates). > Please note that this endpoint works with Dynamic Transactional Templates only. Legacy Transactional Templates will not be delivered. For more information about managing Dynamic Transactional Templates, see [How to Send Email with Dynamic Transactional Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/). You can also test your Single Sends in the [Twilio SendGrid Marketing Campaigns UI](https://mc.sendgrid.com/single-sends). +func (c *ApiService) SendTestMarketingEmail(params *SendTestMarketingEmailParam) (interface{}, error) { + path := "/v3/marketing/test/send_email" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SendTestMarketingEmailRequest != nil { + b, err := json.Marshal(*params.SendTestMarketingEmailRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 202 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/mc_test/api_service.go b/rest/api/v3/mc_test/api_service.go new file mode 100644 index 00000000..352104a5 --- /dev/null +++ b/rest/api/v3/mc_test/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Send Test Email API +* The Twilio SendGrid Test Email API allows you to test a marketing email by first sending it to a list of up to 10 email addresses before pushing to a contact list or segment. With this feature, you can test the layout and content of your message in multiple email clients and with multiple recipients to see how it will function in a real-world scenario. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/mc_test/docs/ErrorResponse.md b/rest/api/v3/mc_test/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/mc_test/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_test/docs/ErrorResponseErrorsInner.md b/rest/api/v3/mc_test/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/mc_test/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_test/docs/SendTestMarketingEmail.md b/rest/api/v3/mc_test/docs/SendTestMarketingEmail.md new file mode 100644 index 00000000..11a3daf9 --- /dev/null +++ b/rest/api/v3/mc_test/docs/SendTestMarketingEmail.md @@ -0,0 +1,48 @@ +# SendTestMarketingEmail + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SendTestMarketingEmail**](SendTestMarketingEmail.md#SendTestMarketingEmail) | **Post** /v3/marketing/test/send_email | Send a Test Marketing Email + + + +## SendTestMarketingEmail + +> map[string]interface{} SendTestMarketingEmail(ctx, optional) + +Send a Test Marketing Email + +**This endpoint allows you to send a test marketing email to a list of email addresses**. Before sending a marketing message, you can test it using this endpoint. You may specify up to **10 contacts** in the `emails` request body field. You must also specify a `template_id` and include either a `from_address` or `sender_id`. You can manage your templates with the [Twilio SendGrid App](https://mc.sendgrid.com/dynamic-templates) or the [Transactional Templates API](https://docs.sendgrid.com/api-reference/transactional-templates). > Please note that this endpoint works with Dynamic Transactional Templates only. Legacy Transactional Templates will not be delivered. For more information about managing Dynamic Transactional Templates, see [How to Send Email with Dynamic Transactional Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/). You can also test your Single Sends in the [Twilio SendGrid Marketing Campaigns UI](https://mc.sendgrid.com/single-sends). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a SendTestMarketingEmailParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**SendTestMarketingEmailRequest** | [**SendTestMarketingEmailRequest**](SendTestMarketingEmailRequest.md) | + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_test/docs/SendTestMarketingEmailRequest.md b/rest/api/v3/mc_test/docs/SendTestMarketingEmailRequest.md new file mode 100644 index 00000000..930d86ba --- /dev/null +++ b/rest/api/v3/mc_test/docs/SendTestMarketingEmailRequest.md @@ -0,0 +1,17 @@ +# SendTestMarketingEmailRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TemplateId** | **string** | The ID of the template that you would like to use. If you use a template that contains a subject and content (either text or HTML), then those values specified at the personalizations or message level will not be used. | +**VersionIdOverride** | **string** | You can override the active template with an alternative template version by passing the version ID in this field. If this field is blank, the active template version will be used. |[optional] +**SenderId** | **int32** | This ID must belong to a verified sender. Alternatively, you may supply a `from_address` email. |[optional] +**CustomUnsubscribeUrl** | **string** | A custom unsubscribe URL. |[optional] +**SuppressionGroupId** | **int32** | |[optional] +**Emails** | **[]string** | An array of email addresses you want to send the test message to. | +**FromAddress** | **string** | You can either specify this address or specify a verified sender ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_test/model_error_response.go b/rest/api/v3/mc_test/model_error_response.go new file mode 100644 index 00000000..db9a301c --- /dev/null +++ b/rest/api/v3/mc_test/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Send Test Email API +* The Twilio SendGrid Test Email API allows you to test a marketing email by first sending it to a list of up to 10 email addresses before pushing to a contact list or segment. With this feature, you can test the layout and content of your message in multiple email clients and with multiple recipients to see how it will function in a real-world scenario. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/mc_test/model_error_response_errors_inner.go b/rest/api/v3/mc_test/model_error_response_errors_inner.go new file mode 100644 index 00000000..9c7eb834 --- /dev/null +++ b/rest/api/v3/mc_test/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Send Test Email API +* The Twilio SendGrid Test Email API allows you to test a marketing email by first sending it to a list of up to 10 email addresses before pushing to a contact list or segment. With this feature, you can test the layout and content of your message in multiple email clients and with multiple recipients to see how it will function in a real-world scenario. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/mc_test/model_send_test_marketing_email_request.go b/rest/api/v3/mc_test/model_send_test_marketing_email_request.go new file mode 100644 index 00000000..79bf2781 --- /dev/null +++ b/rest/api/v3/mc_test/model_send_test_marketing_email_request.go @@ -0,0 +1,31 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Send Test Email API +* The Twilio SendGrid Test Email API allows you to test a marketing email by first sending it to a list of up to 10 email addresses before pushing to a contact list or segment. With this feature, you can test the layout and content of your message in multiple email clients and with multiple recipients to see how it will function in a real-world scenario. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendTestMarketingEmailRequest struct for SendTestMarketingEmailRequest +type SendTestMarketingEmailRequest struct { + // The ID of the template that you would like to use. If you use a template that contains a subject and content (either text or HTML), then those values specified at the personalizations or message level will not be used. + TemplateId string `json:"template_id"` + // You can override the active template with an alternative template version by passing the version ID in this field. If this field is blank, the active template version will be used. + VersionIdOverride *string `json:"version_id_override,omitempty"` + // This ID must belong to a verified sender. Alternatively, you may supply a `from_address` email. + SenderId *int32 `json:"sender_id,omitempty"` + // A custom unsubscribe URL. + CustomUnsubscribeUrl *string `json:"custom_unsubscribe_url,omitempty"` + SuppressionGroupId *int32 `json:"suppression_group_id,omitempty"` + // An array of email addresses you want to send the test message to. + Emails []string `json:"emails"` + // You can either specify this address or specify a verified sender ID. + FromAddress *string `json:"from_address,omitempty"` +} diff --git a/rest/api/v3/partner/.openapi-generator b/rest/api/v3/partner/.openapi-generator new file mode 100644 index 00000000..c8d64e7c --- /dev/null +++ b/rest/api/v3/partner/.openapi-generator @@ -0,0 +1,10 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_list_partner_setting.go +api_service.go +docs/ListPartnerSetting.md +docs/ListPartnerSetting200Response.md +docs/ListPartnerSetting200ResponseResultInner.md +model_list_partner_setting_200_response.go +model_list_partner_setting_200_response_result_inner.go diff --git a/rest/api/v3/partner/.openapi-generator-ignore b/rest/api/v3/partner/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/partner/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/partner/README.md b/rest/api/v3/partner/README.md new file mode 100644 index 00000000..a7b0173a --- /dev/null +++ b/rest/api/v3/partner/README.md @@ -0,0 +1,61 @@ +# Go API client for + +The Twilio SendGrid Partner Settings API allows you to integrate your SendGrid account with our partners to increase your SendGrid experience and functionality. For more information about our partners and how you can begin integrating with them, please visit our [Partners page](https://sendgrid.com/partners/marketplace/). + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:44.287184+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ListPartnerSetting* | [**ListPartnerSetting**](docs/ListPartnerSetting.md#listpartnersetting) | **Get** /v3/partner_settings | Returns a list of all partner settings. + + +## Documentation For Models + + - [ListPartnerSetting200Response](ListPartnerSetting200Response.md) + - [ListPartnerSetting200ResponseResultInner](ListPartnerSetting200ResponseResultInner.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/partner/api_list_partner_setting.go b/rest/api/v3/partner/api_list_partner_setting.go new file mode 100644 index 00000000..6eb0e351 --- /dev/null +++ b/rest/api/v3/partner/api_list_partner_setting.go @@ -0,0 +1,78 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Partner API +* The Twilio SendGrid Partner Settings API allows you to integrate your SendGrid account with our partners to increase your SendGrid experience and functionality. For more information about our partners and how you can begin integrating with them, please visit our [Partners page](https://sendgrid.com/partners/marketplace/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListPartnerSettingParam struct { + // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. + Limit *int32 `json:"limit,omitempty"` + // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + Offset *int32 `json:"offset,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListPartnerSettingParam) SetLimit(Limit int32) *ListPartnerSettingParam { + params.Limit = &Limit + return params +} +func (params *ListPartnerSettingParam) SetOffset(Offset int32) *ListPartnerSettingParam { + params.Offset = &Offset + return params +} +func (params *ListPartnerSettingParam) SetOnbehalfof(Onbehalfof string) *ListPartnerSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a paginated list of all partner settings that you can enable.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items.' +func (c *ApiService) ListPartnerSetting(params *ListPartnerSettingParam) (interface{}, error) { + path := "/v3/partner_settings" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListPartnerSetting200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/partner/api_service.go b/rest/api/v3/partner/api_service.go new file mode 100644 index 00000000..f4bf0ab0 --- /dev/null +++ b/rest/api/v3/partner/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Partner API +* The Twilio SendGrid Partner Settings API allows you to integrate your SendGrid account with our partners to increase your SendGrid experience and functionality. For more information about our partners and how you can begin integrating with them, please visit our [Partners page](https://sendgrid.com/partners/marketplace/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/partner/docs/ListPartnerSetting.md b/rest/api/v3/partner/docs/ListPartnerSetting.md new file mode 100644 index 00000000..c8a2675b --- /dev/null +++ b/rest/api/v3/partner/docs/ListPartnerSetting.md @@ -0,0 +1,50 @@ +# ListPartnerSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListPartnerSetting**](ListPartnerSetting.md#ListPartnerSetting) | **Get** /v3/partner_settings | Returns a list of all partner settings. + + + +## ListPartnerSetting + +> ListPartnerSetting200Response ListPartnerSetting(ctx, optional) + +Returns a list of all partner settings. + +**This endpoint allows you to retrieve a paginated list of all partner settings that you can enable.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items.' + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListPartnerSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. +**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListPartnerSetting200Response**](ListPartnerSetting200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/partner/docs/ListPartnerSetting200Response.md b/rest/api/v3/partner/docs/ListPartnerSetting200Response.md new file mode 100644 index 00000000..ab110ce2 --- /dev/null +++ b/rest/api/v3/partner/docs/ListPartnerSetting200Response.md @@ -0,0 +1,11 @@ +# ListPartnerSetting200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ListPartnerSetting200ResponseResultInner**](ListPartnerSetting200ResponseResultInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/partner/docs/ListPartnerSetting200ResponseResultInner.md b/rest/api/v3/partner/docs/ListPartnerSetting200ResponseResultInner.md new file mode 100644 index 00000000..92854890 --- /dev/null +++ b/rest/api/v3/partner/docs/ListPartnerSetting200ResponseResultInner.md @@ -0,0 +1,14 @@ +# ListPartnerSetting200ResponseResultInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | **string** | The title of the partner. | +**Enabled** | **bool** | Indicates if this partner setting has been enabled. | +**Name** | **string** | The name of the partner setting. | +**Description** | **string** | A description of this partner setting. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/partner/model_list_partner_setting_200_response.go b/rest/api/v3/partner/model_list_partner_setting_200_response.go new file mode 100644 index 00000000..f4ad199e --- /dev/null +++ b/rest/api/v3/partner/model_list_partner_setting_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Partner API +* The Twilio SendGrid Partner Settings API allows you to integrate your SendGrid account with our partners to increase your SendGrid experience and functionality. For more information about our partners and how you can begin integrating with them, please visit our [Partners page](https://sendgrid.com/partners/marketplace/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListPartnerSetting200Response struct for ListPartnerSetting200Response +type ListPartnerSetting200Response struct { + Result *[]ListPartnerSetting200ResponseResultInner `json:"result,omitempty"` +} diff --git a/rest/api/v3/partner/model_list_partner_setting_200_response_result_inner.go b/rest/api/v3/partner/model_list_partner_setting_200_response_result_inner.go new file mode 100644 index 00000000..7aa81206 --- /dev/null +++ b/rest/api/v3/partner/model_list_partner_setting_200_response_result_inner.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Partner API +* The Twilio SendGrid Partner Settings API allows you to integrate your SendGrid account with our partners to increase your SendGrid experience and functionality. For more information about our partners and how you can begin integrating with them, please visit our [Partners page](https://sendgrid.com/partners/marketplace/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListPartnerSetting200ResponseResultInner struct for ListPartnerSetting200ResponseResultInner +type ListPartnerSetting200ResponseResultInner struct { + // The title of the partner. + Title string `json:"title"` + // Indicates if this partner setting has been enabled. + Enabled bool `json:"enabled"` + // The name of the partner setting. + Name string `json:"name"` + // A description of this partner setting. + Description string `json:"description"` +} diff --git a/rest/api/v3/recipients_data_erasure/.openapi-generator b/rest/api/v3/recipients_data_erasure/.openapi-generator new file mode 100644 index 00000000..8b7eb0f8 --- /dev/null +++ b/rest/api/v3/recipients_data_erasure/.openapi-generator @@ -0,0 +1,12 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_erase_recipient_email_data.go +api_service.go +docs/EraseRecipientEmailData.md +docs/RecipientsDataErasureEraseRecipientsRequest.md +docs/RecipientsDataErasureErrorV1.md +docs/RecipientsDataErasureJobId.md +model_recipients_data_erasure_erase_recipients_request.go +model_recipients_data_erasure_error_v1.go +model_recipients_data_erasure_job_id.go diff --git a/rest/api/v3/recipients_data_erasure/.openapi-generator-ignore b/rest/api/v3/recipients_data_erasure/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/recipients_data_erasure/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/recipients_data_erasure/README.md b/rest/api/v3/recipients_data_erasure/README.md new file mode 100644 index 00000000..e92003dc --- /dev/null +++ b/rest/api/v3/recipients_data_erasure/README.md @@ -0,0 +1,62 @@ +# Go API client for + +The Recipients' Data Erasure API allows Twilio SendGrid customers to delete their own customers' personal data from the Twilio SendGrid Platform. The use of this API facilitates the self-service removal of email personal data from the Twilio SendGrid platform and will enable customers to comply with various obligatory data privacy regulations. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:44.386169+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*EraseRecipientEmailData* | [**EraseRecipientEmailData**](docs/EraseRecipientEmailData.md#eraserecipientemaildata) | **Post** /v3/recipients/erasejob | Erase recipients' email data + + +## Documentation For Models + + - [RecipientsDataErasureEraseRecipientsRequest](RecipientsDataErasureEraseRecipientsRequest.md) + - [RecipientsDataErasureErrorV1](RecipientsDataErasureErrorV1.md) + - [RecipientsDataErasureJobId](RecipientsDataErasureJobId.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/recipients_data_erasure/api_erase_recipient_email_data.go b/rest/api/v3/recipients_data_erasure/api_erase_recipient_email_data.go new file mode 100644 index 00000000..babd37d9 --- /dev/null +++ b/rest/api/v3/recipients_data_erasure/api_erase_recipient_email_data.go @@ -0,0 +1,73 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Recipients' Data Erasure API +* The Recipients' Data Erasure API allows Twilio SendGrid customers to delete their own customers' personal data from the Twilio SendGrid Platform. The use of this API facilitates the self-service removal of email personal data from the Twilio SendGrid platform and will enable customers to comply with various obligatory data privacy regulations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type EraseRecipientEmailDataParam struct { + // + RecipientsDataErasureEraseRecipientsRequest *RecipientsDataErasureEraseRecipientsRequest `json:"RecipientsDataErasureEraseRecipientsRequest"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *EraseRecipientEmailDataParam) SetRecipientsDataErasureEraseRecipientsRequest(RecipientsDataErasureEraseRecipientsRequest RecipientsDataErasureEraseRecipientsRequest) *EraseRecipientEmailDataParam { + params.RecipientsDataErasureEraseRecipientsRequest = &RecipientsDataErasureEraseRecipientsRequest + return params +} +func (params *EraseRecipientEmailDataParam) SetOnbehalfof(Onbehalfof string) *EraseRecipientEmailDataParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This operation allows you to delete your recipients' personal email data** The Delete Recipients' Email Data operation accepts a list of 5,000 `email_addresses` or a total payload size of 256Kb per request, whichever comes first. Upon a successful request with this operation, SendGrid will run a search on the email addresses provided against the SendGrid system to identify matches. SendGrid will then delete all personal data associated with the matched users such as the recipients' names, email addresses, subject lines, categories, and IP addresses. All email addresses are filtered for uniqueness and tested for structural validity—any invalid addresses will be returned in an error response. Please note that recipient data is deleted for the account making the request only—deletions do not cascade from a parent account to its Subusers' recipients. To delete a Subuser's recipients' data, you can use the `on-behalf-of` header. +func (c *ApiService) EraseRecipientEmailData(params *EraseRecipientEmailDataParam) (interface{}, error) { + path := "/v3/recipients/erasejob" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.RecipientsDataErasureEraseRecipientsRequest != nil { + b, err := json.Marshal(*params.RecipientsDataErasureEraseRecipientsRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 202 { + ps := &RecipientsDataErasureJobId{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/recipients_data_erasure/api_service.go b/rest/api/v3/recipients_data_erasure/api_service.go new file mode 100644 index 00000000..b823caa4 --- /dev/null +++ b/rest/api/v3/recipients_data_erasure/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Recipients' Data Erasure API +* The Recipients' Data Erasure API allows Twilio SendGrid customers to delete their own customers' personal data from the Twilio SendGrid Platform. The use of this API facilitates the self-service removal of email personal data from the Twilio SendGrid platform and will enable customers to comply with various obligatory data privacy regulations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/recipients_data_erasure/docs/EraseRecipientEmailData.md b/rest/api/v3/recipients_data_erasure/docs/EraseRecipientEmailData.md new file mode 100644 index 00000000..ef961a3d --- /dev/null +++ b/rest/api/v3/recipients_data_erasure/docs/EraseRecipientEmailData.md @@ -0,0 +1,48 @@ +# EraseRecipientEmailData + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**EraseRecipientEmailData**](EraseRecipientEmailData.md#EraseRecipientEmailData) | **Post** /v3/recipients/erasejob | Erase recipients' email data + + + +## EraseRecipientEmailData + +> RecipientsDataErasureJobId EraseRecipientEmailData(ctx, RecipientsDataErasureEraseRecipientsRequestoptional) + +Erase recipients' email data + +**This operation allows you to delete your recipients' personal email data** The Delete Recipients' Email Data operation accepts a list of 5,000 `email_addresses` or a total payload size of 256Kb per request, whichever comes first. Upon a successful request with this operation, SendGrid will run a search on the email addresses provided against the SendGrid system to identify matches. SendGrid will then delete all personal data associated with the matched users such as the recipients' names, email addresses, subject lines, categories, and IP addresses. All email addresses are filtered for uniqueness and tested for structural validity—any invalid addresses will be returned in an error response. Please note that recipient data is deleted for the account making the request only—deletions do not cascade from a parent account to its Subusers' recipients. To delete a Subuser's recipients' data, you can use the `on-behalf-of` header. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a EraseRecipientEmailDataParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**RecipientsDataErasureJobId**](RecipientsDataErasureJobId.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureEraseRecipientsRequest.md b/rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureEraseRecipientsRequest.md new file mode 100644 index 00000000..fed050d6 --- /dev/null +++ b/rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureEraseRecipientsRequest.md @@ -0,0 +1,11 @@ +# RecipientsDataErasureEraseRecipientsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EmailAddresses** | **[]string** | List of unique recipient email addresses whose PII will be erased. You may include a maximum of 5,000 addresses or a maximum payload size of 256Kb, whichever comes first. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureErrorV1.md b/rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureErrorV1.md new file mode 100644 index 00000000..2f32e4f2 --- /dev/null +++ b/rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureErrorV1.md @@ -0,0 +1,12 @@ +# RecipientsDataErasureErrorV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | The message representing the error from the API | +**Field** | **string** | The field associated with the error | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureJobId.md b/rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureJobId.md new file mode 100644 index 00000000..6e21073b --- /dev/null +++ b/rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureJobId.md @@ -0,0 +1,11 @@ +# RecipientsDataErasureJobId + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**JobId** | **string** | The job ID associated with the data erasure request. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_erase_recipients_request.go b/rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_erase_recipients_request.go new file mode 100644 index 00000000..d2ce724b --- /dev/null +++ b/rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_erase_recipients_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Recipients' Data Erasure API +* The Recipients' Data Erasure API allows Twilio SendGrid customers to delete their own customers' personal data from the Twilio SendGrid Platform. The use of this API facilitates the self-service removal of email personal data from the Twilio SendGrid platform and will enable customers to comply with various obligatory data privacy regulations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// RecipientsDataErasureEraseRecipientsRequest struct for RecipientsDataErasureEraseRecipientsRequest +type RecipientsDataErasureEraseRecipientsRequest struct { + // List of unique recipient email addresses whose PII will be erased. You may include a maximum of 5,000 addresses or a maximum payload size of 256Kb, whichever comes first. + EmailAddresses []string `json:"email_addresses"` +} diff --git a/rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_error_v1.go b/rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_error_v1.go new file mode 100644 index 00000000..80864193 --- /dev/null +++ b/rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_error_v1.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Recipients' Data Erasure API +* The Recipients' Data Erasure API allows Twilio SendGrid customers to delete their own customers' personal data from the Twilio SendGrid Platform. The use of this API facilitates the self-service removal of email personal data from the Twilio SendGrid platform and will enable customers to comply with various obligatory data privacy regulations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// RecipientsDataErasureErrorV1 struct for RecipientsDataErasureErrorV1 +type RecipientsDataErasureErrorV1 struct { + // The message representing the error from the API + Message string `json:"message"` + // The field associated with the error + Field string `json:"field"` +} diff --git a/rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_job_id.go b/rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_job_id.go new file mode 100644 index 00000000..c8a68be1 --- /dev/null +++ b/rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_job_id.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Recipients' Data Erasure API +* The Recipients' Data Erasure API allows Twilio SendGrid customers to delete their own customers' personal data from the Twilio SendGrid Platform. The use of this API facilitates the self-service removal of email personal data from the Twilio SendGrid platform and will enable customers to comply with various obligatory data privacy regulations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// RecipientsDataErasureJobId struct for RecipientsDataErasureJobId +type RecipientsDataErasureJobId struct { + // The job ID associated with the data erasure request. + JobId string `json:"job_id"` +} diff --git a/rest/api/v3/reverse_dns/.openapi-generator b/rest/api/v3/reverse_dns/.openapi-generator new file mode 100644 index 00000000..f0d48023 --- /dev/null +++ b/rest/api/v3/reverse_dns/.openapi-generator @@ -0,0 +1,40 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_delete_reverse_dns.go +api_get_reverse_dns.go +api_list_reverse_dns.go +api_service.go +api_set_up_reverse_dns.go +api_validate_reverse_dns.go +docs/DeleteReverseDns.md +docs/GetReverseDns.md +docs/ListReverseDns.md +docs/ReverseDns.md +docs/ReverseDnsARecord.md +docs/ReverseDnsUsersInner.md +docs/SetUpReverseDns.md +docs/SetUpReverseDnsRequest.md +docs/Valid.md +docs/Valid1.md +docs/ValidateReverseDns.md +docs/ValidateReverseDns200Response.md +docs/ValidateReverseDns200ResponseValidationResults.md +docs/ValidateReverseDns200ResponseValidationResultsARecord.md +docs/ValidateReverseDns404Response.md +docs/ValidateReverseDns404ResponseErrorsInner.md +docs/ValidateReverseDns500Response.md +docs/ValidateReverseDns500ResponseErrorsInner.md +model_reverse_dns.go +model_reverse_dns_a_record.go +model_reverse_dns_users_inner.go +model_set_up_reverse_dns_request.go +model_valid.go +model_valid1.go +model_validate_reverse_dns_200_response.go +model_validate_reverse_dns_200_response_validation_results.go +model_validate_reverse_dns_200_response_validation_results_a_record.go +model_validate_reverse_dns_404_response.go +model_validate_reverse_dns_404_response_errors_inner.go +model_validate_reverse_dns_500_response.go +model_validate_reverse_dns_500_response_errors_inner.go diff --git a/rest/api/v3/reverse_dns/.openapi-generator-ignore b/rest/api/v3/reverse_dns/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/reverse_dns/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/reverse_dns/README.md b/rest/api/v3/reverse_dns/README.md new file mode 100644 index 00000000..827356d4 --- /dev/null +++ b/rest/api/v3/reverse_dns/README.md @@ -0,0 +1,84 @@ +# Go API client for + +The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. + +When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. + +Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. + +You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). + +See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:44.401219+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DeleteReverseDns* | [**DeleteReverseDns**](docs/DeleteReverseDns.md#deletereversedns) | **Delete** /v3/whitelabel/ips/{Id} | Delete a reverse DNS record +*GetReverseDns* | [**GetReverseDns**](docs/GetReverseDns.md#getreversedns) | **Get** /v3/whitelabel/ips/{Id} | Retrieve a reverse DNS record +*ListReverseDns* | [**ListReverseDns**](docs/ListReverseDns.md#listreversedns) | **Get** /v3/whitelabel/ips | Retrieve all reverse DNS records +*SetUpReverseDns* | [**SetUpReverseDns**](docs/SetUpReverseDns.md#setupreversedns) | **Post** /v3/whitelabel/ips | Set up reverse DNS +*ValidateReverseDns* | [**ValidateReverseDns**](docs/ValidateReverseDns.md#validatereversedns) | **Post** /v3/whitelabel/ips/{Id}/validate | Validate a reverse DNS record + + +## Documentation For Models + + - [ReverseDns](ReverseDns.md) + - [ReverseDnsARecord](ReverseDnsARecord.md) + - [ReverseDnsUsersInner](ReverseDnsUsersInner.md) + - [SetUpReverseDnsRequest](SetUpReverseDnsRequest.md) + - [Valid](Valid.md) + - [Valid1](Valid1.md) + - [ValidateReverseDns200Response](ValidateReverseDns200Response.md) + - [ValidateReverseDns200ResponseValidationResults](ValidateReverseDns200ResponseValidationResults.md) + - [ValidateReverseDns200ResponseValidationResultsARecord](ValidateReverseDns200ResponseValidationResultsARecord.md) + - [ValidateReverseDns404Response](ValidateReverseDns404Response.md) + - [ValidateReverseDns404ResponseErrorsInner](ValidateReverseDns404ResponseErrorsInner.md) + - [ValidateReverseDns500Response](ValidateReverseDns500Response.md) + - [ValidateReverseDns500ResponseErrorsInner](ValidateReverseDns500ResponseErrorsInner.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/reverse_dns/api_delete_reverse_dns.go b/rest/api/v3/reverse_dns/api_delete_reverse_dns.go new file mode 100644 index 00000000..09005e21 --- /dev/null +++ b/rest/api/v3/reverse_dns/api_delete_reverse_dns.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DeleteReverseDnsParam struct { + // The ID of the reverse DNS record that you would like to retrieve. + Id *string `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteReverseDnsParam) SetId(Id string) *DeleteReverseDnsParam { + params.Id = &Id + return params +} +func (params *DeleteReverseDnsParam) SetOnbehalfof(Onbehalfof string) *DeleteReverseDnsParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete a reverse DNS record.** A call to this endpoint will respond with a 204 status code if the deletion was successful. You can retrieve the IDs associated with all your reverse DNS records using the \"Retrieve all reverse DNS records\" endpoint. +func (c *ApiService) DeleteReverseDns(params *DeleteReverseDnsParam) (interface{}, error) { + path := "/v3/whitelabel/ips/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/reverse_dns/api_get_reverse_dns.go b/rest/api/v3/reverse_dns/api_get_reverse_dns.go new file mode 100644 index 00000000..c2ee8788 --- /dev/null +++ b/rest/api/v3/reverse_dns/api_get_reverse_dns.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type GetReverseDnsParam struct { + // The ID of the reverse DNS record that you would like to retrieve. + Id *string `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetReverseDnsParam) SetId(Id string) *GetReverseDnsParam { + params.Id = &Id + return params +} +func (params *GetReverseDnsParam) SetOnbehalfof(Onbehalfof string) *GetReverseDnsParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a reverse DNS record.** You can retrieve the IDs associated with all your reverse DNS records using the \"Retrieve all reverse DNS records\" endpoint. +func (c *ApiService) GetReverseDns(params *GetReverseDnsParam) (interface{}, error) { + path := "/v3/whitelabel/ips/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ReverseDns{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/reverse_dns/api_list_reverse_dns.go b/rest/api/v3/reverse_dns/api_list_reverse_dns.go new file mode 100644 index 00000000..58d5a494 --- /dev/null +++ b/rest/api/v3/reverse_dns/api_list_reverse_dns.go @@ -0,0 +1,87 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListReverseDnsParam struct { + // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. + Limit *int32 `json:"limit,omitempty"` + // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + Offset *int32 `json:"offset,omitempty"` + // The IP address segment that you'd like to use in a prefix search. + Ip *string `json:"ip,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListReverseDnsParam) SetLimit(Limit int32) *ListReverseDnsParam { + params.Limit = &Limit + return params +} +func (params *ListReverseDnsParam) SetOffset(Offset int32) *ListReverseDnsParam { + params.Offset = &Offset + return params +} +func (params *ListReverseDnsParam) SetIp(Ip string) *ListReverseDnsParam { + params.Ip = &Ip + return params +} +func (params *ListReverseDnsParam) SetOnbehalfof(Onbehalfof string) *ListReverseDnsParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a paginated list of all the Reverse DNS records created by this account.** You may include a search key by using the `ip` query string parameter. This enables you to perform a prefix search for a given IP segment (e.g., `?ip=\"192.\"`). You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. +func (c *ApiService) ListReverseDns(params *ListReverseDnsParam) (interface{}, error) { + path := "/v3/whitelabel/ips" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + if params != nil && params.Ip != nil { + data.Set("ip", *params.Ip) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ReverseDns{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/reverse_dns/api_service.go b/rest/api/v3/reverse_dns/api_service.go new file mode 100644 index 00000000..6e1bfe2b --- /dev/null +++ b/rest/api/v3/reverse_dns/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/reverse_dns/api_set_up_reverse_dns.go b/rest/api/v3/reverse_dns/api_set_up_reverse_dns.go new file mode 100644 index 00000000..d2815304 --- /dev/null +++ b/rest/api/v3/reverse_dns/api_set_up_reverse_dns.go @@ -0,0 +1,73 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type SetUpReverseDnsParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + SetUpReverseDnsRequest *SetUpReverseDnsRequest `json:"SetUpReverseDnsRequest,omitempty"` +} + +func (params *SetUpReverseDnsParam) SetOnbehalfof(Onbehalfof string) *SetUpReverseDnsParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *SetUpReverseDnsParam) SetSetUpReverseDnsRequest(SetUpReverseDnsRequest SetUpReverseDnsRequest) *SetUpReverseDnsParam { + params.SetUpReverseDnsRequest = &SetUpReverseDnsRequest + return params +} + +// **This endpoint allows you to set up reverse DNS.** +func (c *ApiService) SetUpReverseDns(params *SetUpReverseDnsParam) (interface{}, error) { + path := "/v3/whitelabel/ips" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SetUpReverseDnsRequest != nil { + b, err := json.Marshal(*params.SetUpReverseDnsRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &ReverseDns{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/reverse_dns/api_validate_reverse_dns.go b/rest/api/v3/reverse_dns/api_validate_reverse_dns.go new file mode 100644 index 00000000..5c35b817 --- /dev/null +++ b/rest/api/v3/reverse_dns/api_validate_reverse_dns.go @@ -0,0 +1,85 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type ValidateReverseDnsParam struct { + // The ID of the reverse DNS record that you would like to validate. + Id *string `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ValidateReverseDnsParam) SetId(Id string) *ValidateReverseDnsParam { + params.Id = &Id + return params +} +func (params *ValidateReverseDnsParam) SetOnbehalfof(Onbehalfof string) *ValidateReverseDnsParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to validate a reverse DNS record.** Always check the `valid` property of the response’s `validation_results.a_record` object. This field will indicate whether it was possible to validate the reverse DNS record. If the `validation_results.a_record.valid` is `false`, this indicates only that Twilio SendGrid could not determine the validity your reverse DNS record — it may still be valid. If validity couldn’t be determined, you can check the value of `validation_results.a_record.reason` to find out why. You can retrieve the IDs associated with all your reverse DNS records using the \"Retrieve all reverse DNS records\" endpoint. +func (c *ApiService) ValidateReverseDns(params *ValidateReverseDnsParam) (interface{}, error) { + path := "/v3/whitelabel/ips/{Id}/validate" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ValidateReverseDns200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ValidateReverseDns404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ValidateReverseDns500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/reverse_dns/docs/DeleteReverseDns.md b/rest/api/v3/reverse_dns/docs/DeleteReverseDns.md new file mode 100644 index 00000000..13f51043 --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/DeleteReverseDns.md @@ -0,0 +1,52 @@ +# DeleteReverseDns + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteReverseDns**](DeleteReverseDns.md#DeleteReverseDns) | **Delete** /v3/whitelabel/ips/{Id} | Delete a reverse DNS record + + + +## DeleteReverseDns + +> map[string]interface{} DeleteReverseDns(ctx, Idoptional) + +Delete a reverse DNS record + +**This endpoint allows you to delete a reverse DNS record.** A call to this endpoint will respond with a 204 status code if the deletion was successful. You can retrieve the IDs associated with all your reverse DNS records using the \"Retrieve all reverse DNS records\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the reverse DNS record that you would like to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteReverseDnsParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/reverse_dns/docs/GetReverseDns.md b/rest/api/v3/reverse_dns/docs/GetReverseDns.md new file mode 100644 index 00000000..c54a9054 --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/GetReverseDns.md @@ -0,0 +1,52 @@ +# GetReverseDns + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetReverseDns**](GetReverseDns.md#GetReverseDns) | **Get** /v3/whitelabel/ips/{Id} | Retrieve a reverse DNS record + + + +## GetReverseDns + +> ReverseDns GetReverseDns(ctx, Idoptional) + +Retrieve a reverse DNS record + +**This endpoint allows you to retrieve a reverse DNS record.** You can retrieve the IDs associated with all your reverse DNS records using the \"Retrieve all reverse DNS records\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the reverse DNS record that you would like to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetReverseDnsParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ReverseDns**](ReverseDns.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/reverse_dns/docs/ListReverseDns.md b/rest/api/v3/reverse_dns/docs/ListReverseDns.md new file mode 100644 index 00000000..28c28b73 --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/ListReverseDns.md @@ -0,0 +1,51 @@ +# ListReverseDns + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListReverseDns**](ListReverseDns.md#ListReverseDns) | **Get** /v3/whitelabel/ips | Retrieve all reverse DNS records + + + +## ListReverseDns + +> []ReverseDns ListReverseDns(ctx, optional) + +Retrieve all reverse DNS records + +**This endpoint allows you to retrieve a paginated list of all the Reverse DNS records created by this account.** You may include a search key by using the `ip` query string parameter. This enables you to perform a prefix search for a given IP segment (e.g., `?ip=\"192.\"`). You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListReverseDnsParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. +**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. +**Ip** | **string** | The IP address segment that you'd like to use in a prefix search. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**[]ReverseDns**](ReverseDns.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/reverse_dns/docs/ReverseDns.md b/rest/api/v3/reverse_dns/docs/ReverseDns.md new file mode 100644 index 00000000..0e3e4d96 --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/ReverseDns.md @@ -0,0 +1,20 @@ +# ReverseDns + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The ID of the Reverse DNS. | +**Ip** | **string** | The IP address that this Reverse DNS was created for. | +**Rdns** | **string** | The reverse DNS record for the IP address. This points to the Reverse DNS subdomain. | +**Users** | [**[]ReverseDnsUsersInner**](ReverseDnsUsersInner.md) | The users who are able to send mail from the IP address. | +**Subdomain** | **string** | The subdomain created for this reverse DNS. This is where the rDNS record points. |[optional] +**Domain** | **string** | The root, or sending, domain. | +**Valid** | **bool** | Indicates if this is a valid Reverse DNS. | +**Legacy** | **bool** | Indicates if this Reverse DNS was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new Reverse DNS if you need to update it. | +**LastValidationAttemptAt** | **int32** | A Unix epoch timestamp representing the last time of a validation attempt. |[optional] +**ARecord** | [**ReverseDnsARecord**](ReverseDnsARecord.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/reverse_dns/docs/ReverseDnsARecord.md b/rest/api/v3/reverse_dns/docs/ReverseDnsARecord.md new file mode 100644 index 00000000..e0c2fb73 --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/ReverseDnsARecord.md @@ -0,0 +1,14 @@ +# ReverseDnsARecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Valid** | **bool** | Indicates if the a_record is valid. | +**Type** | **string** | The type of DNS record. | +**Host** | **string** | This is the web address that will be mapped to the IP address. | +**Data** | **string** | The IP address being set up with Reverse DNS. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/reverse_dns/docs/ReverseDnsUsersInner.md b/rest/api/v3/reverse_dns/docs/ReverseDnsUsersInner.md new file mode 100644 index 00000000..f28c8202 --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/ReverseDnsUsersInner.md @@ -0,0 +1,12 @@ +# ReverseDnsUsersInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | The username of a user who can send mail from the IP address. | +**UserId** | **int32** | The ID of a user who can send mail from the IP address. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/reverse_dns/docs/SetUpReverseDns.md b/rest/api/v3/reverse_dns/docs/SetUpReverseDns.md new file mode 100644 index 00000000..dbf9cdd7 --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/SetUpReverseDns.md @@ -0,0 +1,49 @@ +# SetUpReverseDns + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SetUpReverseDns**](SetUpReverseDns.md#SetUpReverseDns) | **Post** /v3/whitelabel/ips | Set up reverse DNS + + + +## SetUpReverseDns + +> ReverseDns SetUpReverseDns(ctx, optional) + +Set up reverse DNS + +**This endpoint allows you to set up reverse DNS.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a SetUpReverseDnsParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**SetUpReverseDnsRequest** | [**SetUpReverseDnsRequest**](SetUpReverseDnsRequest.md) | + +### Return type + +[**ReverseDns**](ReverseDns.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/reverse_dns/docs/SetUpReverseDnsRequest.md b/rest/api/v3/reverse_dns/docs/SetUpReverseDnsRequest.md new file mode 100644 index 00000000..c0e04d6b --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/SetUpReverseDnsRequest.md @@ -0,0 +1,13 @@ +# SetUpReverseDnsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | The IP address for which you want to set up reverse DNS. | +**Subdomain** | **string** | The subdomain that will be used to send emails from the IP address. This should be the same as the subdomain used to set up an authenticated domain. |[optional] +**Domain** | **string** | The root, or sending, domain that will be used to send message from the IP address. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/reverse_dns/docs/Valid.md b/rest/api/v3/reverse_dns/docs/Valid.md new file mode 100644 index 00000000..2addd0e7 --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/Valid.md @@ -0,0 +1,13 @@ +# Valid + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TRUE** | bool | (value: `true`) +**FALSE** | bool | (value: `false`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/reverse_dns/docs/Valid1.md b/rest/api/v3/reverse_dns/docs/Valid1.md new file mode 100644 index 00000000..bca4d56b --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/Valid1.md @@ -0,0 +1,13 @@ +# Valid1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TRUE** | bool | (value: `true`) +**FALSE** | bool | (value: `false`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/reverse_dns/docs/ValidateReverseDns.md b/rest/api/v3/reverse_dns/docs/ValidateReverseDns.md new file mode 100644 index 00000000..fa170b18 --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/ValidateReverseDns.md @@ -0,0 +1,52 @@ +# ValidateReverseDns + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ValidateReverseDns**](ValidateReverseDns.md#ValidateReverseDns) | **Post** /v3/whitelabel/ips/{Id}/validate | Validate a reverse DNS record + + + +## ValidateReverseDns + +> ValidateReverseDns200Response ValidateReverseDns(ctx, Idoptional) + +Validate a reverse DNS record + +**This endpoint allows you to validate a reverse DNS record.** Always check the `valid` property of the response’s `validation_results.a_record` object. This field will indicate whether it was possible to validate the reverse DNS record. If the `validation_results.a_record.valid` is `false`, this indicates only that Twilio SendGrid could not determine the validity your reverse DNS record — it may still be valid. If validity couldn’t be determined, you can check the value of `validation_results.a_record.reason` to find out why. You can retrieve the IDs associated with all your reverse DNS records using the \"Retrieve all reverse DNS records\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the reverse DNS record that you would like to validate. + +### Other Parameters + +Other parameters are passed through a pointer to a ValidateReverseDnsParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ValidateReverseDns200Response**](ValidateReverseDns200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/reverse_dns/docs/ValidateReverseDns200Response.md b/rest/api/v3/reverse_dns/docs/ValidateReverseDns200Response.md new file mode 100644 index 00000000..5ca8da4c --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/ValidateReverseDns200Response.md @@ -0,0 +1,13 @@ +# ValidateReverseDns200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The ID of the reverse DNS record. | +**Valid** | [**Valid**](Valid.md) | Indicates if the reverse DNS record is valid. | +**ValidationResults** | [**ValidateReverseDns200ResponseValidationResults**](ValidateReverseDns200ResponseValidationResults.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/reverse_dns/docs/ValidateReverseDns200ResponseValidationResults.md b/rest/api/v3/reverse_dns/docs/ValidateReverseDns200ResponseValidationResults.md new file mode 100644 index 00000000..4cb2f1ed --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/ValidateReverseDns200ResponseValidationResults.md @@ -0,0 +1,11 @@ +# ValidateReverseDns200ResponseValidationResults + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ARecord** | [**ValidateReverseDns200ResponseValidationResultsARecord**](ValidateReverseDns200ResponseValidationResultsARecord.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/reverse_dns/docs/ValidateReverseDns200ResponseValidationResultsARecord.md b/rest/api/v3/reverse_dns/docs/ValidateReverseDns200ResponseValidationResultsARecord.md new file mode 100644 index 00000000..4ed45863 --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/ValidateReverseDns200ResponseValidationResultsARecord.md @@ -0,0 +1,12 @@ +# ValidateReverseDns200ResponseValidationResultsARecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Valid** | [**Valid1**](Valid1.md) | Indicates if the reverse DNS record could be validated. | +**Reason** | **string** | The reason the reverse DNS record could not be validated. Is `null` if the reverse DNS record was validated. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/reverse_dns/docs/ValidateReverseDns404Response.md b/rest/api/v3/reverse_dns/docs/ValidateReverseDns404Response.md new file mode 100644 index 00000000..18de5e6c --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/ValidateReverseDns404Response.md @@ -0,0 +1,11 @@ +# ValidateReverseDns404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ValidateReverseDns404ResponseErrorsInner**](ValidateReverseDns404ResponseErrorsInner.md) | The error messages for the failed validation. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/reverse_dns/docs/ValidateReverseDns404ResponseErrorsInner.md b/rest/api/v3/reverse_dns/docs/ValidateReverseDns404ResponseErrorsInner.md new file mode 100644 index 00000000..ec8b260a --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/ValidateReverseDns404ResponseErrorsInner.md @@ -0,0 +1,11 @@ +# ValidateReverseDns404ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | A message describing why the reverse DNS could not be validated. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/reverse_dns/docs/ValidateReverseDns500Response.md b/rest/api/v3/reverse_dns/docs/ValidateReverseDns500Response.md new file mode 100644 index 00000000..62f027dc --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/ValidateReverseDns500Response.md @@ -0,0 +1,11 @@ +# ValidateReverseDns500Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ValidateReverseDns500ResponseErrorsInner**](ValidateReverseDns500ResponseErrorsInner.md) | The error messages for the failed validation. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/reverse_dns/docs/ValidateReverseDns500ResponseErrorsInner.md b/rest/api/v3/reverse_dns/docs/ValidateReverseDns500ResponseErrorsInner.md new file mode 100644 index 00000000..214fa0ca --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/ValidateReverseDns500ResponseErrorsInner.md @@ -0,0 +1,11 @@ +# ValidateReverseDns500ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | A message describing why the IP whitelabel could not be validated. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/reverse_dns/model_reverse_dns.go b/rest/api/v3/reverse_dns/model_reverse_dns.go new file mode 100644 index 00000000..7c91cd7f --- /dev/null +++ b/rest/api/v3/reverse_dns/model_reverse_dns.go @@ -0,0 +1,37 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ReverseDns struct for ReverseDns +type ReverseDns struct { + // The ID of the Reverse DNS. + Id int32 `json:"id"` + // The IP address that this Reverse DNS was created for. + Ip string `json:"ip"` + // The reverse DNS record for the IP address. This points to the Reverse DNS subdomain. + Rdns string `json:"rdns"` + // The users who are able to send mail from the IP address. + Users []ReverseDnsUsersInner `json:"users"` + // The subdomain created for this reverse DNS. This is where the rDNS record points. + Subdomain *string `json:"subdomain,omitempty"` + // The root, or sending, domain. + Domain string `json:"domain"` + // Indicates if this is a valid Reverse DNS. + Valid bool `json:"valid"` + // Indicates if this Reverse DNS was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new Reverse DNS if you need to update it. + Legacy bool `json:"legacy"` + // A Unix epoch timestamp representing the last time of a validation attempt. + LastValidationAttemptAt *int32 `json:"last_validation_attempt_at,omitempty"` + ARecord ReverseDnsARecord `json:"a_record"` +} diff --git a/rest/api/v3/reverse_dns/model_reverse_dns_a_record.go b/rest/api/v3/reverse_dns/model_reverse_dns_a_record.go new file mode 100644 index 00000000..646a9624 --- /dev/null +++ b/rest/api/v3/reverse_dns/model_reverse_dns_a_record.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ReverseDnsARecord struct for ReverseDnsARecord +type ReverseDnsARecord struct { + // Indicates if the a_record is valid. + Valid bool `json:"valid"` + // The type of DNS record. + Type string `json:"type"` + // This is the web address that will be mapped to the IP address. + Host string `json:"host"` + // The IP address being set up with Reverse DNS. + Data string `json:"data"` +} diff --git a/rest/api/v3/reverse_dns/model_reverse_dns_users_inner.go b/rest/api/v3/reverse_dns/model_reverse_dns_users_inner.go new file mode 100644 index 00000000..6b6ee09c --- /dev/null +++ b/rest/api/v3/reverse_dns/model_reverse_dns_users_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ReverseDnsUsersInner struct for ReverseDnsUsersInner +type ReverseDnsUsersInner struct { + // The username of a user who can send mail from the IP address. + Username string `json:"username"` + // The ID of a user who can send mail from the IP address. + UserId int32 `json:"user_id"` +} diff --git a/rest/api/v3/reverse_dns/model_set_up_reverse_dns_request.go b/rest/api/v3/reverse_dns/model_set_up_reverse_dns_request.go new file mode 100644 index 00000000..9cdc1c22 --- /dev/null +++ b/rest/api/v3/reverse_dns/model_set_up_reverse_dns_request.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SetUpReverseDnsRequest struct for SetUpReverseDnsRequest +type SetUpReverseDnsRequest struct { + // The IP address for which you want to set up reverse DNS. + Ip string `json:"ip"` + // The subdomain that will be used to send emails from the IP address. This should be the same as the subdomain used to set up an authenticated domain. + Subdomain *string `json:"subdomain,omitempty"` + // The root, or sending, domain that will be used to send message from the IP address. + Domain string `json:"domain"` +} diff --git a/rest/api/v3/reverse_dns/model_valid.go b/rest/api/v3/reverse_dns/model_valid.go new file mode 100644 index 00000000..5a8ea14f --- /dev/null +++ b/rest/api/v3/reverse_dns/model_valid.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Valid the model 'Valid' +type Valid bool + +// List of Valid +const ( + VALID_TRUE Valid = true + VALID_FALSE Valid = false +) diff --git a/rest/api/v3/reverse_dns/model_valid1.go b/rest/api/v3/reverse_dns/model_valid1.go new file mode 100644 index 00000000..b4e28b4a --- /dev/null +++ b/rest/api/v3/reverse_dns/model_valid1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Valid1 the model 'Valid1' +type Valid1 bool + +// List of Valid1 +const ( + VALID1_TRUE Valid1 = true + VALID1_FALSE Valid1 = false +) diff --git a/rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response.go b/rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response.go new file mode 100644 index 00000000..f44812f5 --- /dev/null +++ b/rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateReverseDns200Response struct for ValidateReverseDns200Response +type ValidateReverseDns200Response struct { + // The ID of the reverse DNS record. + Id int32 `json:"id"` + // Indicates if the reverse DNS record is valid. + Valid Valid `json:"valid"` + ValidationResults ValidateReverseDns200ResponseValidationResults `json:"validation_results"` +} diff --git a/rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response_validation_results.go b/rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response_validation_results.go new file mode 100644 index 00000000..9859bcfc --- /dev/null +++ b/rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response_validation_results.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateReverseDns200ResponseValidationResults The specific results of the validation. +type ValidateReverseDns200ResponseValidationResults struct { + ARecord *ValidateReverseDns200ResponseValidationResultsARecord `json:"a_record,omitempty"` +} diff --git a/rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response_validation_results_a_record.go b/rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response_validation_results_a_record.go new file mode 100644 index 00000000..30a88911 --- /dev/null +++ b/rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response_validation_results_a_record.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateReverseDns200ResponseValidationResultsARecord struct for ValidateReverseDns200ResponseValidationResultsARecord +type ValidateReverseDns200ResponseValidationResultsARecord struct { + // Indicates if the reverse DNS record could be validated. + Valid Valid1 `json:"valid"` + // The reason the reverse DNS record could not be validated. Is `null` if the reverse DNS record was validated. + Reason string `json:"reason"` +} diff --git a/rest/api/v3/reverse_dns/model_validate_reverse_dns_404_response.go b/rest/api/v3/reverse_dns/model_validate_reverse_dns_404_response.go new file mode 100644 index 00000000..f1d7b077 --- /dev/null +++ b/rest/api/v3/reverse_dns/model_validate_reverse_dns_404_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateReverseDns404Response struct for ValidateReverseDns404Response +type ValidateReverseDns404Response struct { + // The error messages for the failed validation. + Errors []ValidateReverseDns404ResponseErrorsInner `json:"errors"` +} diff --git a/rest/api/v3/reverse_dns/model_validate_reverse_dns_404_response_errors_inner.go b/rest/api/v3/reverse_dns/model_validate_reverse_dns_404_response_errors_inner.go new file mode 100644 index 00000000..c214310b --- /dev/null +++ b/rest/api/v3/reverse_dns/model_validate_reverse_dns_404_response_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateReverseDns404ResponseErrorsInner struct for ValidateReverseDns404ResponseErrorsInner +type ValidateReverseDns404ResponseErrorsInner struct { + // A message describing why the reverse DNS could not be validated. + Message string `json:"message"` +} diff --git a/rest/api/v3/reverse_dns/model_validate_reverse_dns_500_response.go b/rest/api/v3/reverse_dns/model_validate_reverse_dns_500_response.go new file mode 100644 index 00000000..61e3fc40 --- /dev/null +++ b/rest/api/v3/reverse_dns/model_validate_reverse_dns_500_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateReverseDns500Response struct for ValidateReverseDns500Response +type ValidateReverseDns500Response struct { + // The error messages for the failed validation. + Errors []ValidateReverseDns500ResponseErrorsInner `json:"errors"` +} diff --git a/rest/api/v3/reverse_dns/model_validate_reverse_dns_500_response_errors_inner.go b/rest/api/v3/reverse_dns/model_validate_reverse_dns_500_response_errors_inner.go new file mode 100644 index 00000000..0e85cc78 --- /dev/null +++ b/rest/api/v3/reverse_dns/model_validate_reverse_dns_500_response_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateReverseDns500ResponseErrorsInner struct for ValidateReverseDns500ResponseErrorsInner +type ValidateReverseDns500ResponseErrorsInner struct { + // A message describing why the IP whitelabel could not be validated. + Message string `json:"message"` +} diff --git a/rest/api/v3/scheduled_sends/.openapi-generator b/rest/api/v3/scheduled_sends/.openapi-generator new file mode 100644 index 00000000..513dff8e --- /dev/null +++ b/rest/api/v3/scheduled_sends/.openapi-generator @@ -0,0 +1,31 @@ +.openapi-generator +README.md +api_create_scheduled_send.go +api_delete_scheduled_send.go +api_get_scheduled_send.go +api_list_scheduled_send.go +api_service.go +api_update_scheduled_send.go +docs/CancelOrPauseAScheduledSendRequest.md +docs/CreateScheduledSend.md +docs/DeleteScheduledSend.md +docs/ErrorResponse.md +docs/ErrorResponseErrorsInner.md +docs/GetScheduledSend.md +docs/ListScheduledSend.md +docs/MailBatchId.md +docs/ScheduledSendStatus.md +docs/Status.md +docs/Status1.md +docs/Status2.md +docs/UpdateScheduledSend.md +docs/UpdateScheduledSendRequest.md +model_cancel_or_pause_a_scheduled_send_request.go +model_error_response.go +model_error_response_errors_inner.go +model_mail_batch_id.go +model_scheduled_send_status.go +model_status.go +model_status1.go +model_status2.go +model_update_scheduled_send_request.go diff --git a/rest/api/v3/scheduled_sends/.openapi-generator-ignore b/rest/api/v3/scheduled_sends/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/scheduled_sends/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/scheduled_sends/README.md b/rest/api/v3/scheduled_sends/README.md new file mode 100644 index 00000000..b6b7629b --- /dev/null +++ b/rest/api/v3/scheduled_sends/README.md @@ -0,0 +1,82 @@ +# Go API client for + +The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. + +A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. + +See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. + +See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. + +When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. + +When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:44.388354+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateScheduledSend* | [**CreateScheduledSend**](docs/CreateScheduledSend.md#createscheduledsend) | **Post** /v3/user/scheduled_sends | Cancel or pause a scheduled send +*DeleteScheduledSend* | [**DeleteScheduledSend**](docs/DeleteScheduledSend.md#deletescheduledsend) | **Delete** /v3/user/scheduled_sends/{BatchId} | Delete a cancellation or pause from a scheduled send +*GetScheduledSend* | [**GetScheduledSend**](docs/GetScheduledSend.md#getscheduledsend) | **Get** /v3/user/scheduled_sends/{BatchId} | Retrieve scheduled send +*ListScheduledSend* | [**ListScheduledSend**](docs/ListScheduledSend.md#listscheduledsend) | **Get** /v3/user/scheduled_sends | Retrieve all scheduled sends +*UpdateScheduledSend* | [**UpdateScheduledSend**](docs/UpdateScheduledSend.md#updatescheduledsend) | **Patch** /v3/user/scheduled_sends/{BatchId} | Update a scheduled send + + +## Documentation For Models + + - [CancelOrPauseAScheduledSendRequest](CancelOrPauseAScheduledSendRequest.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [MailBatchId](MailBatchId.md) + - [ScheduledSendStatus](ScheduledSendStatus.md) + - [Status](Status.md) + - [Status1](Status1.md) + - [Status2](Status2.md) + - [UpdateScheduledSendRequest](UpdateScheduledSendRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/scheduled_sends/api_create_scheduled_send.go b/rest/api/v3/scheduled_sends/api_create_scheduled_send.go new file mode 100644 index 00000000..a1762600 --- /dev/null +++ b/rest/api/v3/scheduled_sends/api_create_scheduled_send.go @@ -0,0 +1,105 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type CreateScheduledSendParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + CancelOrPauseAScheduledSendRequest *CancelOrPauseAScheduledSendRequest `json:"CancelOrPauseAScheduledSendRequest,omitempty"` +} + +func (params *CreateScheduledSendParam) SetOnbehalfof(Onbehalfof string) *CreateScheduledSendParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateScheduledSendParam) SetCancelOrPauseAScheduledSendRequest(CancelOrPauseAScheduledSendRequest CancelOrPauseAScheduledSendRequest) *CreateScheduledSendParam { + params.CancelOrPauseAScheduledSendRequest = &CancelOrPauseAScheduledSendRequest + return params +} + +// **This endpoint allows you to cancel or pause a scheduled send associated with a `batch_id`.** Passing this endpoint a `batch_id` and status will cancel or pause the scheduled send. Once a scheduled send is set to `pause` or `cancel` you must use the \"Update a scheduled send\" endpoint to change its status or the \"Delete a cancellation or pause from a scheduled send\" endpoint to remove the status. Passing a status change to a scheduled send that has already been paused or cancelled will result in a `400` level status code. If the maximum number of cancellations/pauses are added to a send, a `400` level status code will be returned. +func (c *ApiService) CreateScheduledSend(params *CreateScheduledSendParam) (interface{}, error) { + path := "/v3/user/scheduled_sends" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CancelOrPauseAScheduledSendRequest != nil { + b, err := json.Marshal(*params.CancelOrPauseAScheduledSendRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &ScheduledSendStatus{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/scheduled_sends/api_delete_scheduled_send.go b/rest/api/v3/scheduled_sends/api_delete_scheduled_send.go new file mode 100644 index 00000000..cfd11d55 --- /dev/null +++ b/rest/api/v3/scheduled_sends/api_delete_scheduled_send.go @@ -0,0 +1,93 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DeleteScheduledSendParam struct { + // + BatchId *string `json:"batch_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteScheduledSendParam) SetBatchId(BatchId string) *DeleteScheduledSendParam { + params.BatchId = &BatchId + return params +} +func (params *DeleteScheduledSendParam) SetOnbehalfof(Onbehalfof string) *DeleteScheduledSendParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete the cancellation/pause of a scheduled send.** Scheduled sends cancelled less than 10 minutes before the scheduled time are not guaranteed to be cancelled. +func (c *ApiService) DeleteScheduledSend(params *DeleteScheduledSendParam) (interface{}, error) { + path := "/v3/user/scheduled_sends/{BatchId}" + if params != nil && params.BatchId != nil { + path = strings.Replace(path, "{"+"BatchId"+"}", *params.BatchId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/scheduled_sends/api_get_scheduled_send.go b/rest/api/v3/scheduled_sends/api_get_scheduled_send.go new file mode 100644 index 00000000..aafae9ca --- /dev/null +++ b/rest/api/v3/scheduled_sends/api_get_scheduled_send.go @@ -0,0 +1,101 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type GetScheduledSendParam struct { + // + BatchId *string `json:"batch_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetScheduledSendParam) SetBatchId(BatchId string) *GetScheduledSendParam { + params.BatchId = &BatchId + return params +} +func (params *GetScheduledSendParam) SetOnbehalfof(Onbehalfof string) *GetScheduledSendParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve the cancel/paused scheduled send information for a specific `batch_id`.** +func (c *ApiService) GetScheduledSend(params *GetScheduledSendParam) (interface{}, error) { + path := "/v3/user/scheduled_sends/{BatchId}" + if params != nil && params.BatchId != nil { + path = strings.Replace(path, "{"+"BatchId"+"}", *params.BatchId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ScheduledSendStatus{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/scheduled_sends/api_list_scheduled_send.go b/rest/api/v3/scheduled_sends/api_list_scheduled_send.go new file mode 100644 index 00000000..a1c25889 --- /dev/null +++ b/rest/api/v3/scheduled_sends/api_list_scheduled_send.go @@ -0,0 +1,90 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListScheduledSendParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListScheduledSendParam) SetOnbehalfof(Onbehalfof string) *ListScheduledSendParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve all cancelled and paused scheduled send information.** This endpoint will return only the scheduled sends that are associated with a `batch_id`. If you have scheduled a send using the `/mail/send` endpoint and the `send_at` field but no `batch_id`, the send will be scheduled for delivery; however, it will not be returned by this endpoint. For this reason, you should assign a `batch_id` to any scheduled send you may need to pause or cancel in the future. +func (c *ApiService) ListScheduledSend(params *ListScheduledSendParam) (interface{}, error) { + path := "/v3/user/scheduled_sends" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ScheduledSendStatus{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/scheduled_sends/api_service.go b/rest/api/v3/scheduled_sends/api_service.go new file mode 100644 index 00000000..e86bc8be --- /dev/null +++ b/rest/api/v3/scheduled_sends/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/scheduled_sends/api_update_scheduled_send.go b/rest/api/v3/scheduled_sends/api_update_scheduled_send.go new file mode 100644 index 00000000..3d296889 --- /dev/null +++ b/rest/api/v3/scheduled_sends/api_update_scheduled_send.go @@ -0,0 +1,108 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type UpdateScheduledSendParam struct { + // + BatchId *string `json:"batch_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateScheduledSendRequest *UpdateScheduledSendRequest `json:"UpdateScheduledSendRequest,omitempty"` +} + +func (params *UpdateScheduledSendParam) SetBatchId(BatchId string) *UpdateScheduledSendParam { + params.BatchId = &BatchId + return params +} +func (params *UpdateScheduledSendParam) SetOnbehalfof(Onbehalfof string) *UpdateScheduledSendParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateScheduledSendParam) SetUpdateScheduledSendRequest(UpdateScheduledSendRequest UpdateScheduledSendRequest) *UpdateScheduledSendParam { + params.UpdateScheduledSendRequest = &UpdateScheduledSendRequest + return params +} + +// **This endpoint allows you to update the status of a scheduled send for the given `batch_id`.** If you have already set a `cancel` or `pause` status on a scheduled send using the \"Cancel or pause a scheduled send\" endpoint, you can update it's status using this endpoint. Attempting to update a status once it has been set with the \"Cancel or pause a scheduled send\" endpoint will result in a `400` error. +func (c *ApiService) UpdateScheduledSend(params *UpdateScheduledSendParam) (interface{}, error) { + path := "/v3/user/scheduled_sends/{BatchId}" + if params != nil && params.BatchId != nil { + path = strings.Replace(path, "{"+"BatchId"+"}", *params.BatchId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateScheduledSendRequest != nil { + b, err := json.Marshal(*params.UpdateScheduledSendRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/scheduled_sends/docs/CancelOrPauseAScheduledSendRequest.md b/rest/api/v3/scheduled_sends/docs/CancelOrPauseAScheduledSendRequest.md new file mode 100644 index 00000000..1c192628 --- /dev/null +++ b/rest/api/v3/scheduled_sends/docs/CancelOrPauseAScheduledSendRequest.md @@ -0,0 +1,12 @@ +# CancelOrPauseAScheduledSendRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BatchId** | **string** | The batch ID is the identifier that your scheduled mail sends share. | +**Status** | [**Status**](Status.md) | The status of the send you would like to implement. This can be pause or cancel. To delete a pause or cancel status see DELETE /v3/user/scheduled_sends/{batch_id} | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scheduled_sends/docs/CreateScheduledSend.md b/rest/api/v3/scheduled_sends/docs/CreateScheduledSend.md new file mode 100644 index 00000000..e72ddd5b --- /dev/null +++ b/rest/api/v3/scheduled_sends/docs/CreateScheduledSend.md @@ -0,0 +1,49 @@ +# CreateScheduledSend + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateScheduledSend**](CreateScheduledSend.md#CreateScheduledSend) | **Post** /v3/user/scheduled_sends | Cancel or pause a scheduled send + + + +## CreateScheduledSend + +> ScheduledSendStatus CreateScheduledSend(ctx, optional) + +Cancel or pause a scheduled send + +**This endpoint allows you to cancel or pause a scheduled send associated with a `batch_id`.** Passing this endpoint a `batch_id` and status will cancel or pause the scheduled send. Once a scheduled send is set to `pause` or `cancel` you must use the \"Update a scheduled send\" endpoint to change its status or the \"Delete a cancellation or pause from a scheduled send\" endpoint to remove the status. Passing a status change to a scheduled send that has already been paused or cancelled will result in a `400` level status code. If the maximum number of cancellations/pauses are added to a send, a `400` level status code will be returned. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateScheduledSendParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**CancelOrPauseAScheduledSendRequest** | [**CancelOrPauseAScheduledSendRequest**](CancelOrPauseAScheduledSendRequest.md) | + +### Return type + +[**ScheduledSendStatus**](ScheduledSendStatus.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/scheduled_sends/docs/DeleteScheduledSend.md b/rest/api/v3/scheduled_sends/docs/DeleteScheduledSend.md new file mode 100644 index 00000000..1d198b9d --- /dev/null +++ b/rest/api/v3/scheduled_sends/docs/DeleteScheduledSend.md @@ -0,0 +1,52 @@ +# DeleteScheduledSend + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteScheduledSend**](DeleteScheduledSend.md#DeleteScheduledSend) | **Delete** /v3/user/scheduled_sends/{BatchId} | Delete a cancellation or pause from a scheduled send + + + +## DeleteScheduledSend + +> DeleteScheduledSend(ctx, BatchIdoptional) + +Delete a cancellation or pause from a scheduled send + +**This endpoint allows you to delete the cancellation/pause of a scheduled send.** Scheduled sends cancelled less than 10 minutes before the scheduled time are not guaranteed to be cancelled. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**BatchId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteScheduledSendParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/scheduled_sends/docs/ErrorResponse.md b/rest/api/v3/scheduled_sends/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/scheduled_sends/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scheduled_sends/docs/ErrorResponseErrorsInner.md b/rest/api/v3/scheduled_sends/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/scheduled_sends/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scheduled_sends/docs/GetScheduledSend.md b/rest/api/v3/scheduled_sends/docs/GetScheduledSend.md new file mode 100644 index 00000000..1f9e8925 --- /dev/null +++ b/rest/api/v3/scheduled_sends/docs/GetScheduledSend.md @@ -0,0 +1,52 @@ +# GetScheduledSend + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetScheduledSend**](GetScheduledSend.md#GetScheduledSend) | **Get** /v3/user/scheduled_sends/{BatchId} | Retrieve scheduled send + + + +## GetScheduledSend + +> []ScheduledSendStatus GetScheduledSend(ctx, BatchIdoptional) + +Retrieve scheduled send + +**This endpoint allows you to retrieve the cancel/paused scheduled send information for a specific `batch_id`.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**BatchId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a GetScheduledSendParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**[]ScheduledSendStatus**](ScheduledSendStatus.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/scheduled_sends/docs/ListScheduledSend.md b/rest/api/v3/scheduled_sends/docs/ListScheduledSend.md new file mode 100644 index 00000000..e6fbb8fe --- /dev/null +++ b/rest/api/v3/scheduled_sends/docs/ListScheduledSend.md @@ -0,0 +1,48 @@ +# ListScheduledSend + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListScheduledSend**](ListScheduledSend.md#ListScheduledSend) | **Get** /v3/user/scheduled_sends | Retrieve all scheduled sends + + + +## ListScheduledSend + +> []ScheduledSendStatus ListScheduledSend(ctx, optional) + +Retrieve all scheduled sends + +**This endpoint allows you to retrieve all cancelled and paused scheduled send information.** This endpoint will return only the scheduled sends that are associated with a `batch_id`. If you have scheduled a send using the `/mail/send` endpoint and the `send_at` field but no `batch_id`, the send will be scheduled for delivery; however, it will not be returned by this endpoint. For this reason, you should assign a `batch_id` to any scheduled send you may need to pause or cancel in the future. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListScheduledSendParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**[]ScheduledSendStatus**](ScheduledSendStatus.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/scheduled_sends/docs/MailBatchId.md b/rest/api/v3/scheduled_sends/docs/MailBatchId.md new file mode 100644 index 00000000..9537317a --- /dev/null +++ b/rest/api/v3/scheduled_sends/docs/MailBatchId.md @@ -0,0 +1,11 @@ +# MailBatchId + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BatchId** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scheduled_sends/docs/ScheduledSendStatus.md b/rest/api/v3/scheduled_sends/docs/ScheduledSendStatus.md new file mode 100644 index 00000000..c5498cc4 --- /dev/null +++ b/rest/api/v3/scheduled_sends/docs/ScheduledSendStatus.md @@ -0,0 +1,12 @@ +# ScheduledSendStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BatchId** | **string** | | +**Status** | [**Status2**](Status2.md) | The status of the scheduled send. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scheduled_sends/docs/Status.md b/rest/api/v3/scheduled_sends/docs/Status.md new file mode 100644 index 00000000..8a3e53e1 --- /dev/null +++ b/rest/api/v3/scheduled_sends/docs/Status.md @@ -0,0 +1,13 @@ +# Status + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**PAUSE** | string | (value: `"pause"`) +**CANCEL** | string | (value: `"cancel"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scheduled_sends/docs/Status1.md b/rest/api/v3/scheduled_sends/docs/Status1.md new file mode 100644 index 00000000..0dcc9ff0 --- /dev/null +++ b/rest/api/v3/scheduled_sends/docs/Status1.md @@ -0,0 +1,13 @@ +# Status1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**CANCEL** | string | (value: `"cancel"`) +**PAUSE** | string | (value: `"pause"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scheduled_sends/docs/Status2.md b/rest/api/v3/scheduled_sends/docs/Status2.md new file mode 100644 index 00000000..5c7d4c92 --- /dev/null +++ b/rest/api/v3/scheduled_sends/docs/Status2.md @@ -0,0 +1,13 @@ +# Status2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**CANCEL** | string | (value: `"cancel"`) +**PAUSE** | string | (value: `"pause"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scheduled_sends/docs/UpdateScheduledSend.md b/rest/api/v3/scheduled_sends/docs/UpdateScheduledSend.md new file mode 100644 index 00000000..7b28ab5a --- /dev/null +++ b/rest/api/v3/scheduled_sends/docs/UpdateScheduledSend.md @@ -0,0 +1,53 @@ +# UpdateScheduledSend + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateScheduledSend**](UpdateScheduledSend.md#UpdateScheduledSend) | **Patch** /v3/user/scheduled_sends/{BatchId} | Update a scheduled send + + + +## UpdateScheduledSend + +> UpdateScheduledSend(ctx, BatchIdoptional) + +Update a scheduled send + +**This endpoint allows you to update the status of a scheduled send for the given `batch_id`.** If you have already set a `cancel` or `pause` status on a scheduled send using the \"Cancel or pause a scheduled send\" endpoint, you can update it's status using this endpoint. Attempting to update a status once it has been set with the \"Cancel or pause a scheduled send\" endpoint will result in a `400` error. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**BatchId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateScheduledSendParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateScheduledSendRequest** | [**UpdateScheduledSendRequest**](UpdateScheduledSendRequest.md) | + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/scheduled_sends/docs/UpdateScheduledSendRequest.md b/rest/api/v3/scheduled_sends/docs/UpdateScheduledSendRequest.md new file mode 100644 index 00000000..a01e9aa8 --- /dev/null +++ b/rest/api/v3/scheduled_sends/docs/UpdateScheduledSendRequest.md @@ -0,0 +1,11 @@ +# UpdateScheduledSendRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | [**Status1**](Status1.md) | The status you would like the scheduled send to have. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scheduled_sends/model_cancel_or_pause_a_scheduled_send_request.go b/rest/api/v3/scheduled_sends/model_cancel_or_pause_a_scheduled_send_request.go new file mode 100644 index 00000000..6e635983 --- /dev/null +++ b/rest/api/v3/scheduled_sends/model_cancel_or_pause_a_scheduled_send_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CancelOrPauseAScheduledSendRequest struct for CancelOrPauseAScheduledSendRequest +type CancelOrPauseAScheduledSendRequest struct { + // The batch ID is the identifier that your scheduled mail sends share. + BatchId string `json:"batch_id"` + // The status of the send you would like to implement. This can be pause or cancel. To delete a pause or cancel status see DELETE /v3/user/scheduled_sends/{batch_id} + Status Status `json:"status"` +} diff --git a/rest/api/v3/scheduled_sends/model_error_response.go b/rest/api/v3/scheduled_sends/model_error_response.go new file mode 100644 index 00000000..894e8251 --- /dev/null +++ b/rest/api/v3/scheduled_sends/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/scheduled_sends/model_error_response_errors_inner.go b/rest/api/v3/scheduled_sends/model_error_response_errors_inner.go new file mode 100644 index 00000000..341c7d99 --- /dev/null +++ b/rest/api/v3/scheduled_sends/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/scheduled_sends/model_mail_batch_id.go b/rest/api/v3/scheduled_sends/model_mail_batch_id.go new file mode 100644 index 00000000..dbd323c8 --- /dev/null +++ b/rest/api/v3/scheduled_sends/model_mail_batch_id.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// MailBatchId struct for MailBatchId +type MailBatchId struct { + BatchId string `json:"batch_id"` +} diff --git a/rest/api/v3/scheduled_sends/model_scheduled_send_status.go b/rest/api/v3/scheduled_sends/model_scheduled_send_status.go new file mode 100644 index 00000000..d6fe3d8f --- /dev/null +++ b/rest/api/v3/scheduled_sends/model_scheduled_send_status.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ScheduledSendStatus struct for ScheduledSendStatus +type ScheduledSendStatus struct { + BatchId string `json:"batch_id"` + // The status of the scheduled send. + Status Status2 `json:"status"` +} diff --git a/rest/api/v3/scheduled_sends/model_status.go b/rest/api/v3/scheduled_sends/model_status.go new file mode 100644 index 00000000..d31bbe05 --- /dev/null +++ b/rest/api/v3/scheduled_sends/model_status.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status the model 'Status' +type Status string + +// List of Status +const ( + STATUS_PAUSE Status = "pause" + STATUS_CANCEL Status = "cancel" +) diff --git a/rest/api/v3/scheduled_sends/model_status1.go b/rest/api/v3/scheduled_sends/model_status1.go new file mode 100644 index 00000000..c43f388d --- /dev/null +++ b/rest/api/v3/scheduled_sends/model_status1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status1 the model 'Status1' +type Status1 string + +// List of Status1 +const ( + STATUS1_CANCEL Status1 = "cancel" + STATUS1_PAUSE Status1 = "pause" +) diff --git a/rest/api/v3/scheduled_sends/model_status2.go b/rest/api/v3/scheduled_sends/model_status2.go new file mode 100644 index 00000000..96ac6a91 --- /dev/null +++ b/rest/api/v3/scheduled_sends/model_status2.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status2 the model 'Status2' +type Status2 string + +// List of Status2 +const ( + STATUS2_CANCEL Status2 = "cancel" + STATUS2_PAUSE Status2 = "pause" +) diff --git a/rest/api/v3/scheduled_sends/model_update_scheduled_send_request.go b/rest/api/v3/scheduled_sends/model_update_scheduled_send_request.go new file mode 100644 index 00000000..fb8b4ac2 --- /dev/null +++ b/rest/api/v3/scheduled_sends/model_update_scheduled_send_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateScheduledSendRequest struct for UpdateScheduledSendRequest +type UpdateScheduledSendRequest struct { + // The status you would like the scheduled send to have. + Status Status1 `json:"status"` +} diff --git a/rest/api/v3/seq/.openapi-generator b/rest/api/v3/seq/.openapi-generator new file mode 100644 index 00000000..1351e965 --- /dev/null +++ b/rest/api/v3/seq/.openapi-generator @@ -0,0 +1,18 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_list_engagement_quality_score.go +api_list_subuser_engagement_quality_score.go +api_service.go +docs/ListEngagementQualityScore.md +docs/ListSubuserEngagementQualityScore.md +docs/SeqError.md +docs/SeqMetadata.md +docs/SeqMetadataNextParams.md +docs/SeqMetrics.md +docs/SeqScore.md +model_seq_error.go +model_seq_metadata.go +model_seq_metadata_next_params.go +model_seq_metrics.go +model_seq_score.go diff --git a/rest/api/v3/seq/.openapi-generator-ignore b/rest/api/v3/seq/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/seq/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/seq/README.md b/rest/api/v3/seq/README.md new file mode 100644 index 00000000..ad2ee0c2 --- /dev/null +++ b/rest/api/v3/seq/README.md @@ -0,0 +1,71 @@ +# Go API client for + +The SendGrid Engagement Quality (SEQ) API allows you to retrieve metrics that define the quality of your email program. + +An SEQ score is correlated with: +- The quality of the data in a sender’s program. +- How “wanted” the sender's email is by their recipients. + +Because “wanted” email and deliverability are closely related, a higher SEQ metric is correlated with greater deliverability. This means the higher your SEQ score, the more likely you are to land in your recipients' inboxes. See the SEQ Overview page to understand SEQ, how it's calculated, and how you can address your score. The SEQ endpoints allow you to retrieve your scores and scores for your Subusers. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:44.403984+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ListEngagementQualityScore* | [**ListEngagementQualityScore**](docs/ListEngagementQualityScore.md#listengagementqualityscore) | **Get** /v3/engagementquality/scores | Get Engagement Quality Scores +*ListSubuserEngagementQualityScore* | [**ListSubuserEngagementQualityScore**](docs/ListSubuserEngagementQualityScore.md#listsubuserengagementqualityscore) | **Get** /v3/engagementquality/subusers/scores | Get Subusers' Engagement Quality Scores + + +## Documentation For Models + + - [SeqError](SeqError.md) + - [SeqMetadata](SeqMetadata.md) + - [SeqMetadataNextParams](SeqMetadataNextParams.md) + - [SeqMetrics](SeqMetrics.md) + - [SeqScore](SeqScore.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/seq/api_list_engagement_quality_score.go b/rest/api/v3/seq/api_list_engagement_quality_score.go new file mode 100644 index 00000000..14d03178 --- /dev/null +++ b/rest/api/v3/seq/api_list_engagement_quality_score.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Engagement Quality API +* The SendGrid Engagement Quality (SEQ) API allows you to retrieve metrics that define the quality of your email program. An SEQ score is correlated with: - The quality of the data in a sender’s program. - How “wanted” the sender's email is by their recipients. Because “wanted” email and deliverability are closely related, a higher SEQ metric is correlated with greater deliverability. This means the higher your SEQ score, the more likely you are to land in your recipients' inboxes. See the SEQ Overview page to understand SEQ, how it's calculated, and how you can address your score. The SEQ endpoints allow you to retrieve your scores and scores for your Subusers. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "fmt" + "net/url" +) + +type ListEngagementQualityScoreParam struct { + // The starting date in YYYY-MM-DD format (UTC) for which you want to retrieve scores. + From *string `json:"from"` + // The ending date in YYYY-MM-DD format (UTC) for which you want to retrieve scores. + To *string `json:"to"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListEngagementQualityScoreParam) SetFrom(From string) *ListEngagementQualityScoreParam { + params.From = &From + return params +} +func (params *ListEngagementQualityScoreParam) SetTo(To string) *ListEngagementQualityScoreParam { + params.To = &To + return params +} +func (params *ListEngagementQualityScoreParam) SetOnbehalfof(Onbehalfof string) *ListEngagementQualityScoreParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This operation allows you to retrieve your SendGrid Engagement Quality (SEQ) scores for a specified date range**. A successful request with this API operation will return either a `200` or `202` response. ### 202 This operation returns a `202` response when SendGrid does not yet have scores available for the specified date range. Scores are calculated asynchronously from requests to this endpoint. This means a score may be available for the specified date at a later time, but a score is not available at the time of your API request. ### 200 A 200 response will include all available scores beginning on the `from` and ending on the `to` dates specified. The `score` and `metrics` properties will be omitted from the response for any days in which the user is not eligible to receive a score. The `score` property represents a user's overall engagement quality. The `metrics` property provides additional scores for the input categories that contribute to that overall score. All scores range from `1` to `5` with a higher number representing better engagement quality. See [**SendGrid Engagement Quality Overview**](https://docs.sendgrid.com/api-reference/sendgrid-engagement-quality-api/overview) for more information +func (c *ApiService) ListEngagementQualityScore(params *ListEngagementQualityScoreParam) (interface{}, error) { + path := "/v3/engagementquality/scores" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.From != nil { + data.Set("from", fmt.Sprint(*params.From)) + } + if params != nil && params.To != nil { + data.Set("to", fmt.Sprint(*params.To)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + return nil, nil +} diff --git a/rest/api/v3/seq/api_list_subuser_engagement_quality_score.go b/rest/api/v3/seq/api_list_subuser_engagement_quality_score.go new file mode 100644 index 00000000..41a85f79 --- /dev/null +++ b/rest/api/v3/seq/api_list_subuser_engagement_quality_score.go @@ -0,0 +1,78 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Engagement Quality API +* The SendGrid Engagement Quality (SEQ) API allows you to retrieve metrics that define the quality of your email program. An SEQ score is correlated with: - The quality of the data in a sender’s program. - How “wanted” the sender's email is by their recipients. Because “wanted” email and deliverability are closely related, a higher SEQ metric is correlated with greater deliverability. This means the higher your SEQ score, the more likely you are to land in your recipients' inboxes. See the SEQ Overview page to understand SEQ, how it's calculated, and how you can address your score. The SEQ endpoints allow you to retrieve your scores and scores for your Subusers. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "fmt" + "net/url" +) + +type ListSubuserEngagementQualityScoreParam struct { + // The date in YYYY-MM-DD format (UTC) for which you want to retrieve a SendGrid Engagement Quality score. + Date *string `json:"date"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // Specifies the number of results to be returned by the API. This parameter can be used to limit the results returned or in combination with the `after_key` parameter to iterate through paginated results. + Limit *int32 `json:"limit,omitempty"` + // Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. + AfterKey *int32 `json:"after_key,omitempty"` +} + +func (params *ListSubuserEngagementQualityScoreParam) SetDate(Date string) *ListSubuserEngagementQualityScoreParam { + params.Date = &Date + return params +} +func (params *ListSubuserEngagementQualityScoreParam) SetOnbehalfof(Onbehalfof string) *ListSubuserEngagementQualityScoreParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *ListSubuserEngagementQualityScoreParam) SetLimit(Limit int32) *ListSubuserEngagementQualityScoreParam { + params.Limit = &Limit + return params +} +func (params *ListSubuserEngagementQualityScoreParam) SetAfterKey(AfterKey int32) *ListSubuserEngagementQualityScoreParam { + params.AfterKey = &AfterKey + return params +} + +// **This operation allows you to retrieve SendGrid Engagement Quality (SEQ) scores for your Subusers or customer accounts for a specific date.** A successful request with this API operation will return either a `200` or `202` response. ### 202 This operation returns a `202` response when SendGrid does not yet have scores available for the specified date range. Scores are calculated asynchronously from requests to this endpoint. This means a score may be available for the specified date at a later time, but a score is not available at the time of your API request. ### 200 A `200` response will include scores for all Subusers or customer accounts belonging to the requesting parent or reseller account. The `score` and `metrics` properties will be omitted from the response if a Subuser or customer account is not eligible to receive a score for the specified date. The `score` property represents a Subuser or customer account's overall engagement quality. The `metrics` property provides additional scores for the input categories that contribute to that overall score. All scores range from `1` to `5` with a higher number representing better engagement quality. See [**SendGrid Engagement Quality Overview**](https://docs.sendgrid.com/api-reference/sendgrid-engagement-quality-api/overview) for more information +func (c *ApiService) ListSubuserEngagementQualityScore(params *ListSubuserEngagementQualityScoreParam) (interface{}, error) { + path := "/v3/engagementquality/subusers/scores" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Date != nil { + data.Set("date", fmt.Sprint(*params.Date)) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.AfterKey != nil { + data.Set("after_key", fmt.Sprint(*params.AfterKey)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + return nil, nil +} diff --git a/rest/api/v3/seq/api_service.go b/rest/api/v3/seq/api_service.go new file mode 100644 index 00000000..5a7df229 --- /dev/null +++ b/rest/api/v3/seq/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Engagement Quality API +* The SendGrid Engagement Quality (SEQ) API allows you to retrieve metrics that define the quality of your email program. An SEQ score is correlated with: - The quality of the data in a sender’s program. - How “wanted” the sender's email is by their recipients. Because “wanted” email and deliverability are closely related, a higher SEQ metric is correlated with greater deliverability. This means the higher your SEQ score, the more likely you are to land in your recipients' inboxes. See the SEQ Overview page to understand SEQ, how it's calculated, and how you can address your score. The SEQ endpoints allow you to retrieve your scores and scores for your Subusers. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/seq/docs/ListEngagementQualityScore.md b/rest/api/v3/seq/docs/ListEngagementQualityScore.md new file mode 100644 index 00000000..468dac7f --- /dev/null +++ b/rest/api/v3/seq/docs/ListEngagementQualityScore.md @@ -0,0 +1,48 @@ +# ListEngagementQualityScore + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListEngagementQualityScore**](ListEngagementQualityScore.md#ListEngagementQualityScore) | **Get** /v3/engagementquality/scores | Get Engagement Quality Scores + + + +## ListEngagementQualityScore + +> interface{} ListEngagementQualityScore(ctx, FromTooptional) + +Get Engagement Quality Scores + +**This operation allows you to retrieve your SendGrid Engagement Quality (SEQ) scores for a specified date range**. A successful request with this API operation will return either a `200` or `202` response. ### 202 This operation returns a `202` response when SendGrid does not yet have scores available for the specified date range. Scores are calculated asynchronously from requests to this endpoint. This means a score may be available for the specified date at a later time, but a score is not available at the time of your API request. ### 200 A 200 response will include all available scores beginning on the `from` and ending on the `to` dates specified. The `score` and `metrics` properties will be omitted from the response for any days in which the user is not eligible to receive a score. The `score` property represents a user's overall engagement quality. The `metrics` property provides additional scores for the input categories that contribute to that overall score. All scores range from `1` to `5` with a higher number representing better engagement quality. See [**SendGrid Engagement Quality Overview**](https://docs.sendgrid.com/api-reference/sendgrid-engagement-quality-api/overview) for more information + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListEngagementQualityScoreParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/seq/docs/ListSubuserEngagementQualityScore.md b/rest/api/v3/seq/docs/ListSubuserEngagementQualityScore.md new file mode 100644 index 00000000..7f22b452 --- /dev/null +++ b/rest/api/v3/seq/docs/ListSubuserEngagementQualityScore.md @@ -0,0 +1,50 @@ +# ListSubuserEngagementQualityScore + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSubuserEngagementQualityScore**](ListSubuserEngagementQualityScore.md#ListSubuserEngagementQualityScore) | **Get** /v3/engagementquality/subusers/scores | Get Subusers' Engagement Quality Scores + + + +## ListSubuserEngagementQualityScore + +> interface{} ListSubuserEngagementQualityScore(ctx, Dateoptional) + +Get Subusers' Engagement Quality Scores + +**This operation allows you to retrieve SendGrid Engagement Quality (SEQ) scores for your Subusers or customer accounts for a specific date.** A successful request with this API operation will return either a `200` or `202` response. ### 202 This operation returns a `202` response when SendGrid does not yet have scores available for the specified date range. Scores are calculated asynchronously from requests to this endpoint. This means a score may be available for the specified date at a later time, but a score is not available at the time of your API request. ### 200 A `200` response will include scores for all Subusers or customer accounts belonging to the requesting parent or reseller account. The `score` and `metrics` properties will be omitted from the response if a Subuser or customer account is not eligible to receive a score for the specified date. The `score` property represents a Subuser or customer account's overall engagement quality. The `metrics` property provides additional scores for the input categories that contribute to that overall score. All scores range from `1` to `5` with a higher number representing better engagement quality. See [**SendGrid Engagement Quality Overview**](https://docs.sendgrid.com/api-reference/sendgrid-engagement-quality-api/overview) for more information + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSubuserEngagementQualityScoreParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**Limit** | **int32** | Specifies the number of results to be returned by the API. This parameter can be used to limit the results returned or in combination with the `after_key` parameter to iterate through paginated results. +**AfterKey** | **int32** | Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. + +### Return type + +**interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/seq/docs/SeqError.md b/rest/api/v3/seq/docs/SeqError.md new file mode 100644 index 00000000..a36145cf --- /dev/null +++ b/rest/api/v3/seq/docs/SeqError.md @@ -0,0 +1,12 @@ +# SeqError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Message** | **string** | An error message. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/seq/docs/SeqMetadata.md b/rest/api/v3/seq/docs/SeqMetadata.md new file mode 100644 index 00000000..f13d51d3 --- /dev/null +++ b/rest/api/v3/seq/docs/SeqMetadata.md @@ -0,0 +1,11 @@ +# SeqMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NextParams** | [**SeqMetadataNextParams**](SeqMetadataNextParams.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/seq/docs/SeqMetadataNextParams.md b/rest/api/v3/seq/docs/SeqMetadataNextParams.md new file mode 100644 index 00000000..a361a0e5 --- /dev/null +++ b/rest/api/v3/seq/docs/SeqMetadataNextParams.md @@ -0,0 +1,11 @@ +# SeqMetadataNextParams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AfterKey** | **string** | The `after_key` property represents the last processed key. If the `after_key` property is `null`, there are no more entries available. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/seq/docs/SeqMetrics.md b/rest/api/v3/seq/docs/SeqMetrics.md new file mode 100644 index 00000000..13404179 --- /dev/null +++ b/rest/api/v3/seq/docs/SeqMetrics.md @@ -0,0 +1,15 @@ +# SeqMetrics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EngagementRecency** | **float32** | Indicates whether or not you are sending to an engaged audience. Engagement recency is determined by factors such as how regularly your messages are being opened and clicked. Your score will range from `1` to `5` with a higher score representing better engagement quality. | +**OpenRate** | **float32** | Indicates the degree to which your audience is opening your messages. Your score will range from `1` to `5` with a higher score representing a better open rate and better engagement quality. | +**BounceClassification** | **float32** | Indicates the degree to which mailbox providers are rejecting your mail due to reputation issues or content that looks like spam. Your score is calculated based on a ratio of these specific types of bounces to your total processed email. Your score will range from `1` to `5` with a higher score representing a lower percentage of bounces and better engagement quality. | +**BounceRate** | **float32** | Indicates if you are attempting to send too many messages to addresses that don't exist. This score is determined by calculating your permanent bounces (bounces to invalid mailboxes). Your score will range from `1` to `5` with a higher score representing fewer bounces and better engagement quality. | +**SpamRate** | **float32** | Indicates if your messages are generating excessive spam complaints from recipients. This score is determined by calculating the number of recipients who open your mail and then mark it as spam. Your score will range from `1` to `5` with a higher score representing fewer spam reports and better engagement quality. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/seq/docs/SeqScore.md b/rest/api/v3/seq/docs/SeqScore.md new file mode 100644 index 00000000..84b13574 --- /dev/null +++ b/rest/api/v3/seq/docs/SeqScore.md @@ -0,0 +1,15 @@ +# SeqScore + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UserId** | **string** | The user identifier associated with this score. | +**Username** | **string** | The username associated with this score. |[optional] +**Date** | **string** | The date (UTC) for which this score was calculated. |[optional] +**Score** | **float32** | Your SendGrid Engagement Quality Score. The `score` property will be omitted when a score is unknown. A score may be unknown if you have not turned on [open tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking) and/or your account or Subuser has not sent at least 1,000 messages during the previous 30 days. |[optional] +**Metrics** | [**SeqMetrics**](SeqMetrics.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/seq/model_seq_error.go b/rest/api/v3/seq/model_seq_error.go new file mode 100644 index 00000000..1494de42 --- /dev/null +++ b/rest/api/v3/seq/model_seq_error.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Engagement Quality API +* The SendGrid Engagement Quality (SEQ) API allows you to retrieve metrics that define the quality of your email program. An SEQ score is correlated with: - The quality of the data in a sender’s program. - How “wanted” the sender's email is by their recipients. Because “wanted” email and deliverability are closely related, a higher SEQ metric is correlated with greater deliverability. This means the higher your SEQ score, the more likely you are to land in your recipients' inboxes. See the SEQ Overview page to understand SEQ, how it's calculated, and how you can address your score. The SEQ endpoints allow you to retrieve your scores and scores for your Subusers. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SeqError This object contains error details +type SeqError struct { + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // An error message. + Message string `json:"message"` +} diff --git a/rest/api/v3/seq/model_seq_metadata.go b/rest/api/v3/seq/model_seq_metadata.go new file mode 100644 index 00000000..91510ac6 --- /dev/null +++ b/rest/api/v3/seq/model_seq_metadata.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Engagement Quality API +* The SendGrid Engagement Quality (SEQ) API allows you to retrieve metrics that define the quality of your email program. An SEQ score is correlated with: - The quality of the data in a sender’s program. - How “wanted” the sender's email is by their recipients. Because “wanted” email and deliverability are closely related, a higher SEQ metric is correlated with greater deliverability. This means the higher your SEQ score, the more likely you are to land in your recipients' inboxes. See the SEQ Overview page to understand SEQ, how it's calculated, and how you can address your score. The SEQ endpoints allow you to retrieve your scores and scores for your Subusers. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SeqMetadata This object contains response metadata. The presence of the `after_key` property in the metadata indicates that some items are still outstanding and have not been retrieved. You can use the `after_key` value to retrieve additional items with another request. +type SeqMetadata struct { + NextParams *SeqMetadataNextParams `json:"next_params,omitempty"` +} diff --git a/rest/api/v3/seq/model_seq_metadata_next_params.go b/rest/api/v3/seq/model_seq_metadata_next_params.go new file mode 100644 index 00000000..0016951c --- /dev/null +++ b/rest/api/v3/seq/model_seq_metadata_next_params.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Engagement Quality API +* The SendGrid Engagement Quality (SEQ) API allows you to retrieve metrics that define the quality of your email program. An SEQ score is correlated with: - The quality of the data in a sender’s program. - How “wanted” the sender's email is by their recipients. Because “wanted” email and deliverability are closely related, a higher SEQ metric is correlated with greater deliverability. This means the higher your SEQ score, the more likely you are to land in your recipients' inboxes. See the SEQ Overview page to understand SEQ, how it's calculated, and how you can address your score. The SEQ endpoints allow you to retrieve your scores and scores for your Subusers. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SeqMetadataNextParams struct for SeqMetadataNextParams +type SeqMetadataNextParams struct { + // The `after_key` property represents the last processed key. If the `after_key` property is `null`, there are no more entries available. + AfterKey *string `json:"after_key,omitempty"` +} diff --git a/rest/api/v3/seq/model_seq_metrics.go b/rest/api/v3/seq/model_seq_metrics.go new file mode 100644 index 00000000..21ef4bb5 --- /dev/null +++ b/rest/api/v3/seq/model_seq_metrics.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Engagement Quality API +* The SendGrid Engagement Quality (SEQ) API allows you to retrieve metrics that define the quality of your email program. An SEQ score is correlated with: - The quality of the data in a sender’s program. - How “wanted” the sender's email is by their recipients. Because “wanted” email and deliverability are closely related, a higher SEQ metric is correlated with greater deliverability. This means the higher your SEQ score, the more likely you are to land in your recipients' inboxes. See the SEQ Overview page to understand SEQ, how it's calculated, and how you can address your score. The SEQ endpoints allow you to retrieve your scores and scores for your Subusers. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SeqMetrics A collection of metrics representing your engagement score across multiple indicators such as your open rate, spam rate, and bounce rate. Each metric is assigned a score from `1` to `5` with a higher score representing better engagement quality for that particular metric. The `metrics` property will be omitted when a score is unknown. A score may be unknown if you have not turned on [open tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking) and/or your account or Subuser has not sent at least 1,000 messages during the previous 30 days. +type SeqMetrics struct { + // Indicates whether or not you are sending to an engaged audience. Engagement recency is determined by factors such as how regularly your messages are being opened and clicked. Your score will range from `1` to `5` with a higher score representing better engagement quality. + EngagementRecency float32 `json:"engagement_recency"` + // Indicates the degree to which your audience is opening your messages. Your score will range from `1` to `5` with a higher score representing a better open rate and better engagement quality. + OpenRate float32 `json:"open_rate"` + // Indicates the degree to which mailbox providers are rejecting your mail due to reputation issues or content that looks like spam. Your score is calculated based on a ratio of these specific types of bounces to your total processed email. Your score will range from `1` to `5` with a higher score representing a lower percentage of bounces and better engagement quality. + BounceClassification float32 `json:"bounce_classification"` + // Indicates if you are attempting to send too many messages to addresses that don't exist. This score is determined by calculating your permanent bounces (bounces to invalid mailboxes). Your score will range from `1` to `5` with a higher score representing fewer bounces and better engagement quality. + BounceRate float32 `json:"bounce_rate"` + // Indicates if your messages are generating excessive spam complaints from recipients. This score is determined by calculating the number of recipients who open your mail and then mark it as spam. Your score will range from `1` to `5` with a higher score representing fewer spam reports and better engagement quality. + SpamRate float32 `json:"spam_rate"` +} diff --git a/rest/api/v3/seq/model_seq_score.go b/rest/api/v3/seq/model_seq_score.go new file mode 100644 index 00000000..04818407 --- /dev/null +++ b/rest/api/v3/seq/model_seq_score.go @@ -0,0 +1,27 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Engagement Quality API +* The SendGrid Engagement Quality (SEQ) API allows you to retrieve metrics that define the quality of your email program. An SEQ score is correlated with: - The quality of the data in a sender’s program. - How “wanted” the sender's email is by their recipients. Because “wanted” email and deliverability are closely related, a higher SEQ metric is correlated with greater deliverability. This means the higher your SEQ score, the more likely you are to land in your recipients' inboxes. See the SEQ Overview page to understand SEQ, how it's calculated, and how you can address your score. The SEQ endpoints allow you to retrieve your scores and scores for your Subusers. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SeqScore A user's SendGrid Engagement Quality (SEQ) score for a specified date. Your SEQ score is determined by measuring several key metrics including your open rate, spam rate, and engagement recency. Your overall score allows you to quickly assess how your email program is performing at a high level. You will receive a score from `1` to `5` with a higher number representing better engagement quality. See the `metrics` property to understand how your program is performing across the input categories that determine your overall score. +type SeqScore struct { + // The user identifier associated with this score. + UserId string `json:"user_id"` + // The username associated with this score. + Username *string `json:"username,omitempty"` + // The date (UTC) for which this score was calculated. + Date *string `json:"date,omitempty"` + // Your SendGrid Engagement Quality Score. The `score` property will be omitted when a score is unknown. A score may be unknown if you have not turned on [open tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking) and/or your account or Subuser has not sent at least 1,000 messages during the previous 30 days. + Score *float32 `json:"score,omitempty"` + Metrics *SeqMetrics `json:"metrics,omitempty"` +} diff --git a/rest/api/v3/sso/.openapi-generator b/rest/api/v3/sso/.openapi-generator new file mode 100644 index 00000000..9f986e00 --- /dev/null +++ b/rest/api/v3/sso/.openapi-generator @@ -0,0 +1,64 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_create_sso_certificate.go +api_create_sso_integration.go +api_create_sso_teammate.go +api_delete_sso_certificate.go +api_delete_sso_integration.go +api_get_sso_certificate.go +api_get_sso_integration.go +api_list_sso_integration.go +api_list_sso_integration_certificate.go +api_service.go +api_update_sso_certificate.go +api_update_sso_integration.go +api_update_sso_teammate.go +docs/CreateSsoCertificate.md +docs/CreateSsoCertificateRequest.md +docs/CreateSsoIntegration.md +docs/CreateSsoTeammate.md +docs/DeleteSsoCertificate.md +docs/DeleteSsoIntegration.md +docs/GetSsoCertificate.md +docs/GetSsoIntegration.md +docs/ListSsoIntegration.md +docs/ListSsoIntegrationCertificate.md +docs/PatchSsoTeammates200.md +docs/PermissionType.md +docs/PermissionType1.md +docs/Persona.md +docs/PostPatchIntegrationRequest.md +docs/PostSsoTeammates201.md +docs/PostSsoTeammatesRequest.md +docs/SsoCertificateBody.md +docs/SsoErrorResponseInner.md +docs/SsoIntegration.md +docs/SsoTeammatesBaseRequestProps.md +docs/SsoTeammatesBaseRequestPropsSubuserAccessInner.md +docs/SsoTeammatesBaseResponseProps.md +docs/SsoTeammatesRestrictedSubuserResponseProps.md +docs/SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md +docs/UpdateSsoCertificate.md +docs/UpdateSsoCertificateRequest.md +docs/UpdateSsoIntegration.md +docs/UpdateSsoTeammate.md +docs/UserType.md +model_create_sso_certificate_request.go +model_patch_sso_teammates200.go +model_permission_type.go +model_permission_type1.go +model_persona.go +model_post_patch_integration_request.go +model_post_sso_teammates201.go +model_post_sso_teammates_request.go +model_sso_certificate_body.go +model_sso_error_response_inner.go +model_sso_integration.go +model_sso_teammates_base_request_props.go +model_sso_teammates_base_request_props_subuser_access_inner.go +model_sso_teammates_base_response_props.go +model_sso_teammates_restricted_subuser_response_props.go +model_sso_teammates_restricted_subuser_response_props_subuser_access_inner.go +model_update_sso_certificate_request.go +model_user_type.go diff --git a/rest/api/v3/sso/.openapi-generator-ignore b/rest/api/v3/sso/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/sso/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/sso/README.md b/rest/api/v3/sso/README.md new file mode 100644 index 00000000..731a302f --- /dev/null +++ b/rest/api/v3/sso/README.md @@ -0,0 +1,94 @@ +# Go API client for + +The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). + +The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. + +The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. + +The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:44.437973+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateSsoCertificate* | [**CreateSsoCertificate**](docs/CreateSsoCertificate.md#createssocertificate) | **Post** /v3/sso/certificates | Create an SSO Certificate +*CreateSsoIntegration* | [**CreateSsoIntegration**](docs/CreateSsoIntegration.md#createssointegration) | **Post** /v3/sso/integrations | Create an SSO Integration +*CreateSsoTeammate* | [**CreateSsoTeammate**](docs/CreateSsoTeammate.md#createssoteammate) | **Post** /v3/sso/teammates | Create an SSO Teammate. +*DeleteSsoCertificate* | [**DeleteSsoCertificate**](docs/DeleteSsoCertificate.md#deletessocertificate) | **Delete** /v3/sso/certificates/{CertId} | Delete an SSO Certificate +*DeleteSsoIntegration* | [**DeleteSsoIntegration**](docs/DeleteSsoIntegration.md#deletessointegration) | **Delete** /v3/sso/integrations/{Id} | Delete an SSO Integration +*GetSsoCertificate* | [**GetSsoCertificate**](docs/GetSsoCertificate.md#getssocertificate) | **Get** /v3/sso/certificates/{CertId} | Get an SSO Certificate +*GetSsoIntegration* | [**GetSsoIntegration**](docs/GetSsoIntegration.md#getssointegration) | **Get** /v3/sso/integrations/{Id} | Get an SSO Integration +*ListSsoIntegration* | [**ListSsoIntegration**](docs/ListSsoIntegration.md#listssointegration) | **Get** /v3/sso/integrations | Get All SSO Integrations +*ListSsoIntegrationCertificate* | [**ListSsoIntegrationCertificate**](docs/ListSsoIntegrationCertificate.md#listssointegrationcertificate) | **Get** /v3/sso/integrations/{IntegrationId}/certificates | Get All SSO Certificates by Integration +*UpdateSsoCertificate* | [**UpdateSsoCertificate**](docs/UpdateSsoCertificate.md#updatessocertificate) | **Patch** /v3/sso/certificates/{CertId} | Update SSO Certificate +*UpdateSsoIntegration* | [**UpdateSsoIntegration**](docs/UpdateSsoIntegration.md#updatessointegration) | **Patch** /v3/sso/integrations/{Id} | Update an SSO Integration +*UpdateSsoTeammate* | [**UpdateSsoTeammate**](docs/UpdateSsoTeammate.md#updatessoteammate) | **Patch** /v3/sso/teammates/{Username} | Edit an SSO Teammate + + +## Documentation For Models + + - [CreateSsoCertificateRequest](CreateSsoCertificateRequest.md) + - [PatchSsoTeammates200](PatchSsoTeammates200.md) + - [PermissionType](PermissionType.md) + - [PermissionType1](PermissionType1.md) + - [Persona](Persona.md) + - [PostPatchIntegrationRequest](PostPatchIntegrationRequest.md) + - [PostSsoTeammates201](PostSsoTeammates201.md) + - [PostSsoTeammatesRequest](PostSsoTeammatesRequest.md) + - [SsoCertificateBody](SsoCertificateBody.md) + - [SsoErrorResponseInner](SsoErrorResponseInner.md) + - [SsoIntegration](SsoIntegration.md) + - [SsoTeammatesBaseRequestProps](SsoTeammatesBaseRequestProps.md) + - [SsoTeammatesBaseRequestPropsSubuserAccessInner](SsoTeammatesBaseRequestPropsSubuserAccessInner.md) + - [SsoTeammatesBaseResponseProps](SsoTeammatesBaseResponseProps.md) + - [SsoTeammatesRestrictedSubuserResponseProps](SsoTeammatesRestrictedSubuserResponseProps.md) + - [SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner](SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md) + - [UpdateSsoCertificateRequest](UpdateSsoCertificateRequest.md) + - [UserType](UserType.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/sso/api_create_sso_certificate.go b/rest/api/v3/sso/api_create_sso_certificate.go new file mode 100644 index 00000000..f23bc4dd --- /dev/null +++ b/rest/api/v3/sso/api_create_sso_certificate.go @@ -0,0 +1,104 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type CreateSsoCertificateParam struct { + // + CreateSsoCertificateRequest *CreateSsoCertificateRequest `json:"CreateSsoCertificateRequest,omitempty"` +} + +func (params *CreateSsoCertificateParam) SetCreateSsoCertificateRequest(CreateSsoCertificateRequest CreateSsoCertificateRequest) *CreateSsoCertificateParam { + params.CreateSsoCertificateRequest = &CreateSsoCertificateRequest + return params +} + +// **This endpoint allows you to create an SSO certificate.** +func (c *ApiService) CreateSsoCertificate(params *CreateSsoCertificateParam) (interface{}, error) { + path := "/v3/sso/certificates" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateSsoCertificateRequest != nil { + b, err := json.Marshal(*params.CreateSsoCertificateRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SsoCertificateBody{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/sso/api_create_sso_integration.go b/rest/api/v3/sso/api_create_sso_integration.go new file mode 100644 index 00000000..2113b4f5 --- /dev/null +++ b/rest/api/v3/sso/api_create_sso_integration.go @@ -0,0 +1,104 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type CreateSsoIntegrationParam struct { + // + PostPatchIntegrationRequest *PostPatchIntegrationRequest `json:"PostPatchIntegrationRequest,omitempty"` +} + +func (params *CreateSsoIntegrationParam) SetPostPatchIntegrationRequest(PostPatchIntegrationRequest PostPatchIntegrationRequest) *CreateSsoIntegrationParam { + params.PostPatchIntegrationRequest = &PostPatchIntegrationRequest + return params +} + +// **This endpoint allows you to create an SSO integration.** +func (c *ApiService) CreateSsoIntegration(params *CreateSsoIntegrationParam) (interface{}, error) { + path := "/v3/sso/integrations" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.PostPatchIntegrationRequest != nil { + b, err := json.Marshal(*params.PostPatchIntegrationRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SsoIntegration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/sso/api_create_sso_teammate.go b/rest/api/v3/sso/api_create_sso_teammate.go new file mode 100644 index 00000000..ac3f8c9b --- /dev/null +++ b/rest/api/v3/sso/api_create_sso_teammate.go @@ -0,0 +1,104 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type CreateSsoTeammateParam struct { + // + PostSsoTeammatesRequest *PostSsoTeammatesRequest `json:"PostSsoTeammatesRequest,omitempty"` +} + +func (params *CreateSsoTeammateParam) SetPostSsoTeammatesRequest(PostSsoTeammatesRequest PostSsoTeammatesRequest) *CreateSsoTeammateParam { + params.PostSsoTeammatesRequest = &PostSsoTeammatesRequest + return params +} + +// **This endpoint allows you to create an SSO Teammate.** The email address provided for the Teammate will also function as the Teammate's username. Once created, the Teammate's email address cannot be changed. ### Scopes When creating a Teammate, you will assign it permissions or scopes. These scopes determine which actions the Teammate can perform and which features they can access. Scopes are provided with one of three properties passed to this endpoint: `is_admin`, `scopes`, and `persona`. You can make a Teammate an administrator by setting `is_admin` to `true`. Administrators will have all scopes assigned to them. Alternatively, you can assign a `persona` to the teammate, which will assign them a block of permissions commonly required for that type of user. See the \"Persona scopes\" section of [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions#persona-scopes) for a list of permsissions granted by persona. Lastly, you can assign individual permissions with the `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of scopes that can be assigned to a Teammate. ### Subuser access SendGrid Teammates may be assigned access to one or more Subusers. Subusers function like SendGrid sub-accounts with their own resources. See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. When assigning Subuser access to a Teammate, you may set the `has_restricted_subuser_access` property to `true` to constrain the Teammate so that they can operate only on behalf of the Subusers to which they are assigned. You may further set the level of access the Teammate has to each Subuser with the `subuser_access` property. +func (c *ApiService) CreateSsoTeammate(params *CreateSsoTeammateParam) (interface{}, error) { + path := "/v3/sso/teammates" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.PostSsoTeammatesRequest != nil { + b, err := json.Marshal(*params.PostSsoTeammatesRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &PostSsoTeammates201{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/sso/api_delete_sso_certificate.go b/rest/api/v3/sso/api_delete_sso_certificate.go new file mode 100644 index 00000000..4deeb0a5 --- /dev/null +++ b/rest/api/v3/sso/api_delete_sso_certificate.go @@ -0,0 +1,100 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DeleteSsoCertificateParam struct { + // + CertId *string `json:"cert_id"` +} + +func (params *DeleteSsoCertificateParam) SetCertId(CertId string) *DeleteSsoCertificateParam { + params.CertId = &CertId + return params +} + +// **This endpoint allows you to delete an SSO certificate.** You can retrieve a certificate's ID from the response provided by the \"Get All SSO Integrations\" endpoint. +func (c *ApiService) DeleteSsoCertificate(params *DeleteSsoCertificateParam) (interface{}, error) { + path := "/v3/sso/certificates/{CertId}" + if params != nil && params.CertId != nil { + path = strings.Replace(path, "{"+"CertId"+"}", *params.CertId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SsoCertificateBody{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/sso/api_delete_sso_integration.go b/rest/api/v3/sso/api_delete_sso_integration.go new file mode 100644 index 00000000..fd63f994 --- /dev/null +++ b/rest/api/v3/sso/api_delete_sso_integration.go @@ -0,0 +1,92 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DeleteSsoIntegrationParam struct { + // + Id *string `json:"id"` +} + +func (params *DeleteSsoIntegrationParam) SetId(Id string) *DeleteSsoIntegrationParam { + params.Id = &Id + return params +} + +// **This endpoint allows you to delete an IdP configuration by ID.** You can retrieve the IDs for your configurations from the response provided by the \"Get All SSO Integrations\" endpoint. +func (c *ApiService) DeleteSsoIntegration(params *DeleteSsoIntegrationParam) (interface{}, error) { + path := "/v3/sso/integrations/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/sso/api_get_sso_certificate.go b/rest/api/v3/sso/api_get_sso_certificate.go new file mode 100644 index 00000000..81234a78 --- /dev/null +++ b/rest/api/v3/sso/api_get_sso_certificate.go @@ -0,0 +1,100 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type GetSsoCertificateParam struct { + // + CertId *string `json:"cert_id"` +} + +func (params *GetSsoCertificateParam) SetCertId(CertId string) *GetSsoCertificateParam { + params.CertId = &CertId + return params +} + +// **This endpoint allows you to retrieve an individual SSO certificate.** +func (c *ApiService) GetSsoCertificate(params *GetSsoCertificateParam) (interface{}, error) { + path := "/v3/sso/certificates/{CertId}" + if params != nil && params.CertId != nil { + path = strings.Replace(path, "{"+"CertId"+"}", *params.CertId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SsoCertificateBody{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/sso/api_get_sso_integration.go b/rest/api/v3/sso/api_get_sso_integration.go new file mode 100644 index 00000000..4ada401b --- /dev/null +++ b/rest/api/v3/sso/api_get_sso_integration.go @@ -0,0 +1,111 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type GetSsoIntegrationParam struct { + // + Id *string `json:"id"` + // If this parameter is set to `true`, the response will include the `completed_integration` field. + Si *bool `json:"si,omitempty"` +} + +func (params *GetSsoIntegrationParam) SetId(Id string) *GetSsoIntegrationParam { + params.Id = &Id + return params +} +func (params *GetSsoIntegrationParam) SetSi(Si bool) *GetSsoIntegrationParam { + params.Si = &Si + return params +} + +// **This endpoint allows you to retrieve an SSO integration by ID.** You can retrieve the IDs for your configurations from the response provided by the \"Get All SSO Integrations\" endpoint. +func (c *ApiService) GetSsoIntegration(params *GetSsoIntegrationParam) (interface{}, error) { + path := "/v3/sso/integrations/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Si != nil { + data.Set("si", fmt.Sprint(*params.Si)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SsoIntegration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/sso/api_list_sso_integration.go b/rest/api/v3/sso/api_list_sso_integration.go new file mode 100644 index 00000000..9e89db77 --- /dev/null +++ b/rest/api/v3/sso/api_list_sso_integration.go @@ -0,0 +1,100 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListSsoIntegrationParam struct { + // If this parameter is set to `true`, the response will include the `completed_integration` field. + Si *bool `json:"si,omitempty"` +} + +func (params *ListSsoIntegrationParam) SetSi(Si bool) *ListSsoIntegrationParam { + params.Si = &Si + return params +} + +// **This endpoint allows you to retrieve all SSO integrations tied to your Twilio SendGrid account.** The IDs returned by this endpoint can be used by the APIs additional endpoints to modify your SSO integrations. +func (c *ApiService) ListSsoIntegration(params *ListSsoIntegrationParam) (interface{}, error) { + path := "/v3/sso/integrations" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Si != nil { + data.Set("si", fmt.Sprint(*params.Si)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]SsoIntegration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/sso/api_list_sso_integration_certificate.go b/rest/api/v3/sso/api_list_sso_integration_certificate.go new file mode 100644 index 00000000..4086e929 --- /dev/null +++ b/rest/api/v3/sso/api_list_sso_integration_certificate.go @@ -0,0 +1,100 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type ListSsoIntegrationCertificateParam struct { + // An ID that matches a certificate to a specific IdP integration. + IntegrationId *string `json:"integration_id"` +} + +func (params *ListSsoIntegrationCertificateParam) SetIntegrationId(IntegrationId string) *ListSsoIntegrationCertificateParam { + params.IntegrationId = &IntegrationId + return params +} + +// **This endpoint allows you to retrieve all your IdP configurations by configuration ID.** The `integration_id` expected by this endpoint is the `id` returned in the response by the \"Get All SSO Integrations\" endpoint. +func (c *ApiService) ListSsoIntegrationCertificate(params *ListSsoIntegrationCertificateParam) (interface{}, error) { + path := "/v3/sso/integrations/{IntegrationId}/certificates" + if params != nil && params.IntegrationId != nil { + path = strings.Replace(path, "{"+"IntegrationId"+"}", *params.IntegrationId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]SsoCertificateBody{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/sso/api_service.go b/rest/api/v3/sso/api_service.go new file mode 100644 index 00000000..1564dab4 --- /dev/null +++ b/rest/api/v3/sso/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/sso/api_update_sso_certificate.go b/rest/api/v3/sso/api_update_sso_certificate.go new file mode 100644 index 00000000..58803890 --- /dev/null +++ b/rest/api/v3/sso/api_update_sso_certificate.go @@ -0,0 +1,115 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type UpdateSsoCertificateParam struct { + // + CertId *string `json:"cert_id"` + // + UpdateSsoCertificateRequest *UpdateSsoCertificateRequest `json:"UpdateSsoCertificateRequest,omitempty"` +} + +func (params *UpdateSsoCertificateParam) SetCertId(CertId string) *UpdateSsoCertificateParam { + params.CertId = &CertId + return params +} +func (params *UpdateSsoCertificateParam) SetUpdateSsoCertificateRequest(UpdateSsoCertificateRequest UpdateSsoCertificateRequest) *UpdateSsoCertificateParam { + params.UpdateSsoCertificateRequest = &UpdateSsoCertificateRequest + return params +} + +// **This endpoint allows you to update an existing certificate by ID.** You can retrieve a certificate's ID from the response provided by the \"Get All SSO Integrations\" endpoint. +func (c *ApiService) UpdateSsoCertificate(params *UpdateSsoCertificateParam) (interface{}, error) { + path := "/v3/sso/certificates/{CertId}" + if params != nil && params.CertId != nil { + path = strings.Replace(path, "{"+"CertId"+"}", *params.CertId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateSsoCertificateRequest != nil { + b, err := json.Marshal(*params.UpdateSsoCertificateRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SsoCertificateBody{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/sso/api_update_sso_integration.go b/rest/api/v3/sso/api_update_sso_integration.go new file mode 100644 index 00000000..5a8f9639 --- /dev/null +++ b/rest/api/v3/sso/api_update_sso_integration.go @@ -0,0 +1,125 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type UpdateSsoIntegrationParam struct { + // + Id *string `json:"id"` + // If this parameter is set to `true`, the response will include the `completed_integration` field. + Si *bool `json:"si,omitempty"` + // + PostPatchIntegrationRequest *PostPatchIntegrationRequest `json:"PostPatchIntegrationRequest,omitempty"` +} + +func (params *UpdateSsoIntegrationParam) SetId(Id string) *UpdateSsoIntegrationParam { + params.Id = &Id + return params +} +func (params *UpdateSsoIntegrationParam) SetSi(Si bool) *UpdateSsoIntegrationParam { + params.Si = &Si + return params +} +func (params *UpdateSsoIntegrationParam) SetPostPatchIntegrationRequest(PostPatchIntegrationRequest PostPatchIntegrationRequest) *UpdateSsoIntegrationParam { + params.PostPatchIntegrationRequest = &PostPatchIntegrationRequest + return params +} + +// **This endpoint allows you to modify an exisiting SSO integration.** You can retrieve the IDs for your configurations from the response provided by the \"Get All SSO Integrations\" endpoint. +func (c *ApiService) UpdateSsoIntegration(params *UpdateSsoIntegrationParam) (interface{}, error) { + path := "/v3/sso/integrations/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + if params != nil && params.Si != nil { + data.Set("si", fmt.Sprint(*params.Si)) + } + body := []byte{} + if params != nil && params.PostPatchIntegrationRequest != nil { + b, err := json.Marshal(*params.PostPatchIntegrationRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SsoIntegration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/sso/api_update_sso_teammate.go b/rest/api/v3/sso/api_update_sso_teammate.go new file mode 100644 index 00000000..af816bea --- /dev/null +++ b/rest/api/v3/sso/api_update_sso_teammate.go @@ -0,0 +1,115 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type UpdateSsoTeammateParam struct { + // Set this parameter to the Teammate's email address. This address must be the same address assigned to the Teammate in your IdP. + Username *string `json:"username"` + // + Body *SsoTeammatesBaseRequestProps `json:"body,omitempty"` +} + +func (params *UpdateSsoTeammateParam) SetUsername(Username string) *UpdateSsoTeammateParam { + params.Username = &Username + return params +} +func (params *UpdateSsoTeammateParam) SetBody(Body SsoTeammatesBaseRequestProps) *UpdateSsoTeammateParam { + params.Body = &Body + return params +} + +// **This endpoint allows you to modify an existing SSO Teammate.** Only the parent user and Teammates with admin permissions can update another Teammate's permissions. ### Scopes When updating a Teammate, you will assign it permissions or scopes. These scopes determine which actions the Teammate can perform and which features they can access. Scopes are provided with one of three properties passed to this endpoint: `is_admin`, `scopes`, and `persona`. You can make a Teammate an administrator by setting `is_admin` to `true`. Administrators will have all scopes assigned to them. Alternatively, you can assign a `persona` to the teammate, which will assign them a block of permissions commonly required for that type of user. See the \"Persona scopes\" section of [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions#persona-scopes) for a list of permsissions granted by persona. Lastly, you can assign individual permissions with the `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of scopes that can be assigned to a Teammate. ### Subuser access SendGrid Teammates may be assigned access to one or more Subusers. Subusers function like SendGrid sub-accounts with their own resources. See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. When assigning Subuser access to a Teammate, you may set the `has_restricted_subuser_access` property to `true` to constrain the Teammate so that they can operate only on behalf of the Subusers to which they are assigned. You may further set the level of access the Teammate has to each Subuser with the `subuser_access` property. +func (c *ApiService) UpdateSsoTeammate(params *UpdateSsoTeammateParam) (interface{}, error) { + path := "/v3/sso/teammates/{Username}" + if params != nil && params.Username != nil { + path = strings.Replace(path, "{"+"Username"+"}", *params.Username, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.Body != nil { + b, err := json.Marshal(*params.Body) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &PatchSsoTeammates200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/sso/docs/CreateSsoCertificate.md b/rest/api/v3/sso/docs/CreateSsoCertificate.md new file mode 100644 index 00000000..0f1b57e1 --- /dev/null +++ b/rest/api/v3/sso/docs/CreateSsoCertificate.md @@ -0,0 +1,48 @@ +# CreateSsoCertificate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateSsoCertificate**](CreateSsoCertificate.md#CreateSsoCertificate) | **Post** /v3/sso/certificates | Create an SSO Certificate + + + +## CreateSsoCertificate + +> SsoCertificateBody CreateSsoCertificate(ctx, optional) + +Create an SSO Certificate + +**This endpoint allows you to create an SSO certificate.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateSsoCertificateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**CreateSsoCertificateRequest** | [**CreateSsoCertificateRequest**](CreateSsoCertificateRequest.md) | + +### Return type + +[**SsoCertificateBody**](SsoCertificateBody.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/sso/docs/CreateSsoCertificateRequest.md b/rest/api/v3/sso/docs/CreateSsoCertificateRequest.md new file mode 100644 index 00000000..ff047454 --- /dev/null +++ b/rest/api/v3/sso/docs/CreateSsoCertificateRequest.md @@ -0,0 +1,13 @@ +# CreateSsoCertificateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PublicCertificate** | **string** | This public certificate allows SendGrid to verify that SAML requests it receives are signed by an IdP that it recognizes. | +**Enabled** | **bool** | Indicates if the certificate is enabled. |[optional] +**IntegrationId** | **string** | An ID that matches a certificate to a specific IdP integration. This is the `id` returned by the \"Get All SSO Integrations\" endpoint. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/CreateSsoIntegration.md b/rest/api/v3/sso/docs/CreateSsoIntegration.md new file mode 100644 index 00000000..cc6926e3 --- /dev/null +++ b/rest/api/v3/sso/docs/CreateSsoIntegration.md @@ -0,0 +1,48 @@ +# CreateSsoIntegration + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateSsoIntegration**](CreateSsoIntegration.md#CreateSsoIntegration) | **Post** /v3/sso/integrations | Create an SSO Integration + + + +## CreateSsoIntegration + +> SsoIntegration CreateSsoIntegration(ctx, optional) + +Create an SSO Integration + +**This endpoint allows you to create an SSO integration.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateSsoIntegrationParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**PostPatchIntegrationRequest** | [**PostPatchIntegrationRequest**](PostPatchIntegrationRequest.md) | + +### Return type + +[**SsoIntegration**](SsoIntegration.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/sso/docs/CreateSsoTeammate.md b/rest/api/v3/sso/docs/CreateSsoTeammate.md new file mode 100644 index 00000000..98907b69 --- /dev/null +++ b/rest/api/v3/sso/docs/CreateSsoTeammate.md @@ -0,0 +1,48 @@ +# CreateSsoTeammate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateSsoTeammate**](CreateSsoTeammate.md#CreateSsoTeammate) | **Post** /v3/sso/teammates | Create an SSO Teammate. + + + +## CreateSsoTeammate + +> PostSsoTeammates201 CreateSsoTeammate(ctx, optional) + +Create an SSO Teammate. + +**This endpoint allows you to create an SSO Teammate.** The email address provided for the Teammate will also function as the Teammate's username. Once created, the Teammate's email address cannot be changed. ### Scopes When creating a Teammate, you will assign it permissions or scopes. These scopes determine which actions the Teammate can perform and which features they can access. Scopes are provided with one of three properties passed to this endpoint: `is_admin`, `scopes`, and `persona`. You can make a Teammate an administrator by setting `is_admin` to `true`. Administrators will have all scopes assigned to them. Alternatively, you can assign a `persona` to the teammate, which will assign them a block of permissions commonly required for that type of user. See the \"Persona scopes\" section of [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions#persona-scopes) for a list of permsissions granted by persona. Lastly, you can assign individual permissions with the `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of scopes that can be assigned to a Teammate. ### Subuser access SendGrid Teammates may be assigned access to one or more Subusers. Subusers function like SendGrid sub-accounts with their own resources. See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. When assigning Subuser access to a Teammate, you may set the `has_restricted_subuser_access` property to `true` to constrain the Teammate so that they can operate only on behalf of the Subusers to which they are assigned. You may further set the level of access the Teammate has to each Subuser with the `subuser_access` property. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateSsoTeammateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**PostSsoTeammatesRequest** | [**PostSsoTeammatesRequest**](PostSsoTeammatesRequest.md) | + +### Return type + +[**PostSsoTeammates201**](PostSsoTeammates201.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/sso/docs/DeleteSsoCertificate.md b/rest/api/v3/sso/docs/DeleteSsoCertificate.md new file mode 100644 index 00000000..27eba6d0 --- /dev/null +++ b/rest/api/v3/sso/docs/DeleteSsoCertificate.md @@ -0,0 +1,51 @@ +# DeleteSsoCertificate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSsoCertificate**](DeleteSsoCertificate.md#DeleteSsoCertificate) | **Delete** /v3/sso/certificates/{CertId} | Delete an SSO Certificate + + + +## DeleteSsoCertificate + +> SsoCertificateBody DeleteSsoCertificate(ctx, CertId) + +Delete an SSO Certificate + +**This endpoint allows you to delete an SSO certificate.** You can retrieve a certificate's ID from the response provided by the \"Get All SSO Integrations\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CertId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSsoCertificateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**SsoCertificateBody**](SsoCertificateBody.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/sso/docs/DeleteSsoIntegration.md b/rest/api/v3/sso/docs/DeleteSsoIntegration.md new file mode 100644 index 00000000..d9961b65 --- /dev/null +++ b/rest/api/v3/sso/docs/DeleteSsoIntegration.md @@ -0,0 +1,51 @@ +# DeleteSsoIntegration + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSsoIntegration**](DeleteSsoIntegration.md#DeleteSsoIntegration) | **Delete** /v3/sso/integrations/{Id} | Delete an SSO Integration + + + +## DeleteSsoIntegration + +> DeleteSsoIntegration(ctx, Id) + +Delete an SSO Integration + +**This endpoint allows you to delete an IdP configuration by ID.** You can retrieve the IDs for your configurations from the response provided by the \"Get All SSO Integrations\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSsoIntegrationParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/sso/docs/GetSsoCertificate.md b/rest/api/v3/sso/docs/GetSsoCertificate.md new file mode 100644 index 00000000..e6ecfde7 --- /dev/null +++ b/rest/api/v3/sso/docs/GetSsoCertificate.md @@ -0,0 +1,51 @@ +# GetSsoCertificate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetSsoCertificate**](GetSsoCertificate.md#GetSsoCertificate) | **Get** /v3/sso/certificates/{CertId} | Get an SSO Certificate + + + +## GetSsoCertificate + +> SsoCertificateBody GetSsoCertificate(ctx, CertId) + +Get an SSO Certificate + +**This endpoint allows you to retrieve an individual SSO certificate.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CertId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a GetSsoCertificateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**SsoCertificateBody**](SsoCertificateBody.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/sso/docs/GetSsoIntegration.md b/rest/api/v3/sso/docs/GetSsoIntegration.md new file mode 100644 index 00000000..ea49cd71 --- /dev/null +++ b/rest/api/v3/sso/docs/GetSsoIntegration.md @@ -0,0 +1,52 @@ +# GetSsoIntegration + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetSsoIntegration**](GetSsoIntegration.md#GetSsoIntegration) | **Get** /v3/sso/integrations/{Id} | Get an SSO Integration + + + +## GetSsoIntegration + +> SsoIntegration GetSsoIntegration(ctx, Idoptional) + +Get an SSO Integration + +**This endpoint allows you to retrieve an SSO integration by ID.** You can retrieve the IDs for your configurations from the response provided by the \"Get All SSO Integrations\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a GetSsoIntegrationParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Si** | **bool** | If this parameter is set to `true`, the response will include the `completed_integration` field. + +### Return type + +[**SsoIntegration**](SsoIntegration.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/sso/docs/ListSsoIntegration.md b/rest/api/v3/sso/docs/ListSsoIntegration.md new file mode 100644 index 00000000..8082cbe7 --- /dev/null +++ b/rest/api/v3/sso/docs/ListSsoIntegration.md @@ -0,0 +1,48 @@ +# ListSsoIntegration + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSsoIntegration**](ListSsoIntegration.md#ListSsoIntegration) | **Get** /v3/sso/integrations | Get All SSO Integrations + + + +## ListSsoIntegration + +> []SsoIntegration ListSsoIntegration(ctx, optional) + +Get All SSO Integrations + +**This endpoint allows you to retrieve all SSO integrations tied to your Twilio SendGrid account.** The IDs returned by this endpoint can be used by the APIs additional endpoints to modify your SSO integrations. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSsoIntegrationParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Si** | **bool** | If this parameter is set to `true`, the response will include the `completed_integration` field. + +### Return type + +[**[]SsoIntegration**](SsoIntegration.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/sso/docs/ListSsoIntegrationCertificate.md b/rest/api/v3/sso/docs/ListSsoIntegrationCertificate.md new file mode 100644 index 00000000..526ad85d --- /dev/null +++ b/rest/api/v3/sso/docs/ListSsoIntegrationCertificate.md @@ -0,0 +1,51 @@ +# ListSsoIntegrationCertificate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSsoIntegrationCertificate**](ListSsoIntegrationCertificate.md#ListSsoIntegrationCertificate) | **Get** /v3/sso/integrations/{IntegrationId}/certificates | Get All SSO Certificates by Integration + + + +## ListSsoIntegrationCertificate + +> []SsoCertificateBody ListSsoIntegrationCertificate(ctx, IntegrationId) + +Get All SSO Certificates by Integration + +**This endpoint allows you to retrieve all your IdP configurations by configuration ID.** The `integration_id` expected by this endpoint is the `id` returned in the response by the \"Get All SSO Integrations\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**IntegrationId** | **string** | An ID that matches a certificate to a specific IdP integration. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSsoIntegrationCertificateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**[]SsoCertificateBody**](SsoCertificateBody.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/sso/docs/PatchSsoTeammates200.md b/rest/api/v3/sso/docs/PatchSsoTeammates200.md new file mode 100644 index 00000000..b1b277d5 --- /dev/null +++ b/rest/api/v3/sso/docs/PatchSsoTeammates200.md @@ -0,0 +1,29 @@ +# PatchSsoTeammates200 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Address** | **string** | The Teammate's street address. |[optional] +**Address2** | **string** | The Teammate's apartment number, suite number, or other secondary address information that is not part of the physical street address. |[optional] +**City** | **string** | The Teammate's city. |[optional] +**Company** | **string** | The Teammate's company name. |[optional] +**Country** | **string** | The Teammate's country of residence. |[optional] +**Username** | **string** | The Teammate's username. This property is set to the Teammate's email address. |[optional] +**Phone** | **string** | The Teammate's phone number. |[optional] +**State** | **string** | The Teammate's state or province. |[optional] +**UserType** | [**UserType**](UserType.md) | A Teammate can be an `admin`, `owner`, or `teammate`. Each role is associated with the scope of the Teammate's permissions. |[optional] +**Website** | **string** | A website associated with the Teammate. |[optional] +**Zip** | **string** | The Teammate's zip code. |[optional] +**FirstName** | **string** | The Teammate's first name. |[optional] +**LastName** | **string** | The Teammate's last name. |[optional] +**Email** | **string** | Teammate's email address. This email address also functions as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. |[optional] +**IsAdmin** | **bool** | Indicates if the Teammate has administrator permissions. When set to `true`, the Teammate is an admin. |[optional] +**IsSso** | **bool** | Indicates how the Teammate authenticates with SendGrid. When set to `true`, the Teammate will access SendGrid via SSO and their IdP. When set to `false`, the Teammate will authenticate directly with SendGrid via a username and password. |[optional] +**Scopes** | **[]string** | The permissions or scopes currently assigned to the Teammate. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. |[optional] +**HasRestrictedSubuserAccess** | **bool** | When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. |[optional] +**SubuserAccess** | [**[]SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner**](SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md) | Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/PermissionType.md b/rest/api/v3/sso/docs/PermissionType.md new file mode 100644 index 00000000..da44f853 --- /dev/null +++ b/rest/api/v3/sso/docs/PermissionType.md @@ -0,0 +1,13 @@ +# PermissionType + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**ADMIN** | string | (value: `"admin"`) +**RESTRICTED** | string | (value: `"restricted"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/PermissionType1.md b/rest/api/v3/sso/docs/PermissionType1.md new file mode 100644 index 00000000..5fa3bbb8 --- /dev/null +++ b/rest/api/v3/sso/docs/PermissionType1.md @@ -0,0 +1,13 @@ +# PermissionType1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**ADMIN** | string | (value: `"admin"`) +**RESTRICTED** | string | (value: `"restricted"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/Persona.md b/rest/api/v3/sso/docs/Persona.md new file mode 100644 index 00000000..a422b3d2 --- /dev/null +++ b/rest/api/v3/sso/docs/Persona.md @@ -0,0 +1,15 @@ +# Persona + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**ACCOUNTANT** | string | (value: `"accountant"`) +**DEVELOPER** | string | (value: `"developer"`) +**MARKETER** | string | (value: `"marketer"`) +**OBSERVER** | string | (value: `"observer"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/PostPatchIntegrationRequest.md b/rest/api/v3/sso/docs/PostPatchIntegrationRequest.md new file mode 100644 index 00000000..813db37b --- /dev/null +++ b/rest/api/v3/sso/docs/PostPatchIntegrationRequest.md @@ -0,0 +1,16 @@ +# PostPatchIntegrationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of your integration. This name can be anything that makes sense for your organization (eg. Twilio SendGrid) | +**Enabled** | **bool** | Indicates if the integration is enabled. | +**SigninUrl** | **string** | The IdP's SAML POST endpoint. This endpoint should receive requests and initiate an SSO login flow. This is called the \"Embed Link\" in the Twilio SendGrid UI. | +**SignoutUrl** | **string** | This URL is relevant only for an IdP-initiated authentication flow. If a user authenticates from their IdP, this URL will return them to their IdP when logging out. | +**EntityId** | **string** | An identifier provided by your IdP to identify Twilio SendGrid in the SAML interaction. This is called the \"SAML Issuer ID\" in the Twilio SendGrid UI. | +**CompletedIntegration** | **bool** | Indicates if the integration is complete. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/PostSsoTeammates201.md b/rest/api/v3/sso/docs/PostSsoTeammates201.md new file mode 100644 index 00000000..90d13d83 --- /dev/null +++ b/rest/api/v3/sso/docs/PostSsoTeammates201.md @@ -0,0 +1,18 @@ +# PostSsoTeammates201 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstName** | **string** | The Teammate's first name. |[optional] +**LastName** | **string** | The Teammate's last name. |[optional] +**Email** | **string** | Teammate's email address. This email address also functions as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. |[optional] +**IsAdmin** | **bool** | Indicates if the Teammate has administrator permissions. When set to `true`, the Teammate is an admin. |[optional] +**IsSso** | **bool** | Indicates how the Teammate authenticates with SendGrid. When set to `true`, the Teammate will access SendGrid via SSO and their IdP. When set to `false`, the Teammate will authenticate directly with SendGrid via a username and password. |[optional] +**Scopes** | **[]string** | The permissions or scopes currently assigned to the Teammate. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. |[optional] +**HasRestrictedSubuserAccess** | **bool** | When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. |[optional] +**SubuserAccess** | [**[]SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner**](SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md) | Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/PostSsoTeammatesRequest.md b/rest/api/v3/sso/docs/PostSsoTeammatesRequest.md new file mode 100644 index 00000000..ef110ee3 --- /dev/null +++ b/rest/api/v3/sso/docs/PostSsoTeammatesRequest.md @@ -0,0 +1,18 @@ +# PostSsoTeammatesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | Set this property to the Teammate's email address. This email address will also function as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. | +**FirstName** | **string** | Set this property to the Teammate's first name. | +**LastName** | **string** | Set this property to the Teammate's last name. | +**IsAdmin** | **bool** | Set this property to `true` if the Teammate has admin permissions. You should not include the `scopes` or `persona` properties when setting the `is_admin` property to `true`—an admin will be allocated all scopes. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of scopes. |[optional] +**Persona** | [**Persona**](Persona.md) | A persona represents a group of permissions often required by a type of Teammate such as a developer or marketer. Assigning a persona allows you to allocate a group of pre-defined permissions rather than assigning each scope individually. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of the scopes assigned to each persona. |[optional] +**Scopes** | **[]string** | Add or remove permissions from a Teammate using this `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this propety in the request when using the `persona` property or when setting the `is_admin` property to `true`—assigning a `persona` or setting `is_admin` to `true` will allocate a group of permissions to the Teammate. |[optional] +**HasRestrictedSubuserAccess** | **bool** | Set this property to `true` to give the Teammate permissions to operate only on behalf of a Subuser. This property value must be `true` if the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. If this property is set to `true`, you cannot specify individual `scopes`, assign a `persona`, or set `is_admin` to `true`—a Teammate cannot specify scopes for the parent account and have restricted Subuser access. |[optional] +**SubuserAccess** | [**[]SsoTeammatesBaseRequestPropsSubuserAccessInner**](SsoTeammatesBaseRequestPropsSubuserAccessInner.md) | Specify which Subusers the Teammate may access and act on behalf of with this property. If this property is populated, you must set the `has_restricted_subuser_access` property to `true`. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/SsoCertificateBody.md b/rest/api/v3/sso/docs/SsoCertificateBody.md new file mode 100644 index 00000000..68cb6289 --- /dev/null +++ b/rest/api/v3/sso/docs/SsoCertificateBody.md @@ -0,0 +1,15 @@ +# SsoCertificateBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PublicCertificate** | **string** | This certificate is used by Twilio SendGrid to verify that SAML requests are coming from Okta. This is called the X509 certificate in the Twilio SendGrid UI. |[optional] +**Id** | **float32** | A unique ID assigned to the certificate by SendGrid. |[optional] +**NotBefore** | **float32** | A unix timestamp (e.g., 1603915954) that indicates the time before which the certificate is not valid. |[optional] +**NotAfter** | **float32** | A unix timestamp (e.g., 1603915954) that indicates the time after which the certificate is no longer valid. |[optional] +**IntergrationId** | **string** | An ID that matches a certificate to a specific IdP integration. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/SsoErrorResponseInner.md b/rest/api/v3/sso/docs/SsoErrorResponseInner.md new file mode 100644 index 00000000..df959452 --- /dev/null +++ b/rest/api/v3/sso/docs/SsoErrorResponseInner.md @@ -0,0 +1,13 @@ +# SsoErrorResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | |[optional] +**Field** | **string** | |[optional] +**ErrorId** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/SsoIntegration.md b/rest/api/v3/sso/docs/SsoIntegration.md new file mode 100644 index 00000000..aa5f45f8 --- /dev/null +++ b/rest/api/v3/sso/docs/SsoIntegration.md @@ -0,0 +1,20 @@ +# SsoIntegration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of your integration. This name can be anything that makes sense for your organization (eg. Twilio SendGrid) | +**Enabled** | **bool** | Indicates if the integration is enabled. | +**SigninUrl** | **string** | The IdP's SAML POST endpoint. This endpoint should receive requests and initiate an SSO login flow. This is called the \"Embed Link\" in the Twilio SendGrid UI. | +**SignoutUrl** | **string** | This URL is relevant only for an IdP-initiated authentication flow. If a user authenticates from their IdP, this URL will return them to their IdP when logging out. | +**EntityId** | **string** | An identifier provided by your IdP to identify Twilio SendGrid in the SAML interaction. This is called the \"SAML Issuer ID\" in the Twilio SendGrid UI. | +**CompletedIntegration** | **bool** | Indicates if the integration is complete. |[optional] +**LastUpdated** | **float32** | A timestamp representing the last time the configuration was modified. | +**Id** | **string** | A unique ID assigned to the configuration by SendGrid. |[optional] +**SingleSignonUrl** | **string** | The URL where your IdP should POST its SAML response. This is the Twilio SendGrid URL that is responsible for receiving and parsing a SAML assertion. This is the same URL as the Audience URL when using SendGrid. |[optional] +**AudienceUrl** | **string** | The URL where your IdP should POST its SAML response. This is the Twilio SendGrid URL that is responsible for receiving and parsing a SAML assertion. This is the same URL as the Single Sign-On URL when using SendGrid. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/SsoTeammatesBaseRequestProps.md b/rest/api/v3/sso/docs/SsoTeammatesBaseRequestProps.md new file mode 100644 index 00000000..fcededd9 --- /dev/null +++ b/rest/api/v3/sso/docs/SsoTeammatesBaseRequestProps.md @@ -0,0 +1,17 @@ +# SsoTeammatesBaseRequestProps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstName** | **string** | Set this property to the Teammate's first name. | +**LastName** | **string** | Set this property to the Teammate's last name. | +**IsAdmin** | **bool** | Set this property to `true` if the Teammate has admin permissions. You should not include the `scopes` or `persona` properties when setting the `is_admin` property to `true`—an admin will be allocated all scopes. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of scopes. |[optional] +**Persona** | [**Persona**](Persona.md) | A persona represents a group of permissions often required by a type of Teammate such as a developer or marketer. Assigning a persona allows you to allocate a group of pre-defined permissions rather than assigning each scope individually. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of the scopes assigned to each persona. |[optional] +**Scopes** | **[]string** | Add or remove permissions from a Teammate using this `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this propety in the request when using the `persona` property or when setting the `is_admin` property to `true`—assigning a `persona` or setting `is_admin` to `true` will allocate a group of permissions to the Teammate. |[optional] +**HasRestrictedSubuserAccess** | **bool** | Set this property to `true` to give the Teammate permissions to operate only on behalf of a Subuser. This property value must be `true` if the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. If this property is set to `true`, you cannot specify individual `scopes`, assign a `persona`, or set `is_admin` to `true`—a Teammate cannot specify scopes for the parent account and have restricted Subuser access. |[optional] +**SubuserAccess** | [**[]SsoTeammatesBaseRequestPropsSubuserAccessInner**](SsoTeammatesBaseRequestPropsSubuserAccessInner.md) | Specify which Subusers the Teammate may access and act on behalf of with this property. If this property is populated, you must set the `has_restricted_subuser_access` property to `true`. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/SsoTeammatesBaseRequestPropsSubuserAccessInner.md b/rest/api/v3/sso/docs/SsoTeammatesBaseRequestPropsSubuserAccessInner.md new file mode 100644 index 00000000..80c452b4 --- /dev/null +++ b/rest/api/v3/sso/docs/SsoTeammatesBaseRequestPropsSubuserAccessInner.md @@ -0,0 +1,13 @@ +# SsoTeammatesBaseRequestPropsSubuserAccessInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | Set this property to the ID of a Subuser to which the Teammate should have access. You can retrieve Subuser IDs from the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/). | +**PermissionType** | [**PermissionType**](PermissionType.md) | Grant the level of access the Teammate should have to the specified Subuser with this property. This property value may be either `admin` or `restricted`. When set to `restricted`, the Teammate has only the permissions assigned in the `scopes` property. | +**Scopes** | **[]string** | Add or remove permissions that the Teammate can access on behalf of the Subuser. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this property in the request when the `permission_type` property is set to `admin`—administrators have full access to the specified Subuser. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/SsoTeammatesBaseResponseProps.md b/rest/api/v3/sso/docs/SsoTeammatesBaseResponseProps.md new file mode 100644 index 00000000..a2de9c35 --- /dev/null +++ b/rest/api/v3/sso/docs/SsoTeammatesBaseResponseProps.md @@ -0,0 +1,16 @@ +# SsoTeammatesBaseResponseProps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstName** | **string** | The Teammate's first name. |[optional] +**LastName** | **string** | The Teammate's last name. |[optional] +**Email** | **string** | Teammate's email address. This email address also functions as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. |[optional] +**IsAdmin** | **bool** | Indicates if the Teammate has administrator permissions. When set to `true`, the Teammate is an admin. |[optional] +**IsSso** | **bool** | Indicates how the Teammate authenticates with SendGrid. When set to `true`, the Teammate will access SendGrid via SSO and their IdP. When set to `false`, the Teammate will authenticate directly with SendGrid via a username and password. |[optional] +**Scopes** | **[]string** | The permissions or scopes currently assigned to the Teammate. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponseProps.md b/rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponseProps.md new file mode 100644 index 00000000..a22ffc8f --- /dev/null +++ b/rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponseProps.md @@ -0,0 +1,12 @@ +# SsoTeammatesRestrictedSubuserResponseProps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**HasRestrictedSubuserAccess** | **bool** | When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. |[optional] +**SubuserAccess** | [**[]SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner**](SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md) | Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md b/rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md new file mode 100644 index 00000000..c7c93940 --- /dev/null +++ b/rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md @@ -0,0 +1,16 @@ +# SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The ID of a Subuser to which the Teammate has access. You can retrieve Subuser IDs from the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/). |[optional] +**Username** | **string** | The username of a Subuser to which the Teammate has access. |[optional] +**Email** | **string** | The email address of a Subuser to which the Teammate has access. |[optional] +**Disabled** | **bool** | Indicates if the Subuser is active for the SendGrid account. |[optional] +**PermissionType** | [**PermissionType1**](PermissionType1.md) | The level of access the Teammate has to the specified Subuser. This property value may be either `admin` or `restricted`. When is property is set to `restricted`, the Teammate has only the permissions assigned in the `scopes` property. |[optional] +**Scopes** | **[]string** | The permissions or scopes that the Teammate can access on behalf of the Subuser. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/UpdateSsoCertificate.md b/rest/api/v3/sso/docs/UpdateSsoCertificate.md new file mode 100644 index 00000000..0873a139 --- /dev/null +++ b/rest/api/v3/sso/docs/UpdateSsoCertificate.md @@ -0,0 +1,52 @@ +# UpdateSsoCertificate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSsoCertificate**](UpdateSsoCertificate.md#UpdateSsoCertificate) | **Patch** /v3/sso/certificates/{CertId} | Update SSO Certificate + + + +## UpdateSsoCertificate + +> SsoCertificateBody UpdateSsoCertificate(ctx, CertIdoptional) + +Update SSO Certificate + +**This endpoint allows you to update an existing certificate by ID.** You can retrieve a certificate's ID from the response provided by the \"Get All SSO Integrations\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CertId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSsoCertificateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**UpdateSsoCertificateRequest** | [**UpdateSsoCertificateRequest**](UpdateSsoCertificateRequest.md) | + +### Return type + +[**SsoCertificateBody**](SsoCertificateBody.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/sso/docs/UpdateSsoCertificateRequest.md b/rest/api/v3/sso/docs/UpdateSsoCertificateRequest.md new file mode 100644 index 00000000..6155b47c --- /dev/null +++ b/rest/api/v3/sso/docs/UpdateSsoCertificateRequest.md @@ -0,0 +1,13 @@ +# UpdateSsoCertificateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PublicCertificate** | **string** | This public certificate allows SendGrid to verify that SAML requests it receives are signed by an IdP that it recognizes. |[optional] +**Enabled** | **bool** | Indicates whether or not the certificate is enabled. |[optional] +**IntegrationId** | **string** | An ID that matches a certificate to a specific IdP integration. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/UpdateSsoIntegration.md b/rest/api/v3/sso/docs/UpdateSsoIntegration.md new file mode 100644 index 00000000..c6e31fe7 --- /dev/null +++ b/rest/api/v3/sso/docs/UpdateSsoIntegration.md @@ -0,0 +1,53 @@ +# UpdateSsoIntegration + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSsoIntegration**](UpdateSsoIntegration.md#UpdateSsoIntegration) | **Patch** /v3/sso/integrations/{Id} | Update an SSO Integration + + + +## UpdateSsoIntegration + +> SsoIntegration UpdateSsoIntegration(ctx, Idoptional) + +Update an SSO Integration + +**This endpoint allows you to modify an exisiting SSO integration.** You can retrieve the IDs for your configurations from the response provided by the \"Get All SSO Integrations\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSsoIntegrationParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Si** | **bool** | If this parameter is set to `true`, the response will include the `completed_integration` field. +**PostPatchIntegrationRequest** | [**PostPatchIntegrationRequest**](PostPatchIntegrationRequest.md) | + +### Return type + +[**SsoIntegration**](SsoIntegration.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/sso/docs/UpdateSsoTeammate.md b/rest/api/v3/sso/docs/UpdateSsoTeammate.md new file mode 100644 index 00000000..cc802214 --- /dev/null +++ b/rest/api/v3/sso/docs/UpdateSsoTeammate.md @@ -0,0 +1,52 @@ +# UpdateSsoTeammate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSsoTeammate**](UpdateSsoTeammate.md#UpdateSsoTeammate) | **Patch** /v3/sso/teammates/{Username} | Edit an SSO Teammate + + + +## UpdateSsoTeammate + +> PatchSsoTeammates200 UpdateSsoTeammate(ctx, Usernameoptional) + +Edit an SSO Teammate + +**This endpoint allows you to modify an existing SSO Teammate.** Only the parent user and Teammates with admin permissions can update another Teammate's permissions. ### Scopes When updating a Teammate, you will assign it permissions or scopes. These scopes determine which actions the Teammate can perform and which features they can access. Scopes are provided with one of three properties passed to this endpoint: `is_admin`, `scopes`, and `persona`. You can make a Teammate an administrator by setting `is_admin` to `true`. Administrators will have all scopes assigned to them. Alternatively, you can assign a `persona` to the teammate, which will assign them a block of permissions commonly required for that type of user. See the \"Persona scopes\" section of [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions#persona-scopes) for a list of permsissions granted by persona. Lastly, you can assign individual permissions with the `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of scopes that can be assigned to a Teammate. ### Subuser access SendGrid Teammates may be assigned access to one or more Subusers. Subusers function like SendGrid sub-accounts with their own resources. See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. When assigning Subuser access to a Teammate, you may set the `has_restricted_subuser_access` property to `true` to constrain the Teammate so that they can operate only on behalf of the Subusers to which they are assigned. You may further set the level of access the Teammate has to each Subuser with the `subuser_access` property. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Username** | **string** | Set this parameter to the Teammate's email address. This address must be the same address assigned to the Teammate in your IdP. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSsoTeammateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Body** | **SsoTeammatesBaseRequestProps** | + +### Return type + +[**PatchSsoTeammates200**](PatchSsoTeammates200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/sso/docs/UserType.md b/rest/api/v3/sso/docs/UserType.md new file mode 100644 index 00000000..f9f8db1d --- /dev/null +++ b/rest/api/v3/sso/docs/UserType.md @@ -0,0 +1,14 @@ +# UserType + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**ADMIN** | string | (value: `"admin"`) +**OWNER** | string | (value: `"owner"`) +**TEAMMATE** | string | (value: `"teammate"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/model_create_sso_certificate_request.go b/rest/api/v3/sso/model_create_sso_certificate_request.go new file mode 100644 index 00000000..da1fc7ba --- /dev/null +++ b/rest/api/v3/sso/model_create_sso_certificate_request.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateSsoCertificateRequest +type CreateSsoCertificateRequest struct { + // This public certificate allows SendGrid to verify that SAML requests it receives are signed by an IdP that it recognizes. + PublicCertificate string `json:"public_certificate"` + // Indicates if the certificate is enabled. + Enabled *bool `json:"enabled,omitempty"` + // An ID that matches a certificate to a specific IdP integration. This is the `id` returned by the \"Get All SSO Integrations\" endpoint. + IntegrationId string `json:"integration_id"` +} diff --git a/rest/api/v3/sso/model_patch_sso_teammates200.go b/rest/api/v3/sso/model_patch_sso_teammates200.go new file mode 100644 index 00000000..0031305b --- /dev/null +++ b/rest/api/v3/sso/model_patch_sso_teammates200.go @@ -0,0 +1,56 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// PatchSsoTeammates200 Successful SSO Teammates PATCH response. +type PatchSsoTeammates200 struct { + // The Teammate's street address. + Address *string `json:"address,omitempty"` + // The Teammate's apartment number, suite number, or other secondary address information that is not part of the physical street address. + Address2 *string `json:"address2,omitempty"` + // The Teammate's city. + City *string `json:"city,omitempty"` + // The Teammate's company name. + Company *string `json:"company,omitempty"` + // The Teammate's country of residence. + Country *string `json:"country,omitempty"` + // The Teammate's username. This property is set to the Teammate's email address. + Username *string `json:"username,omitempty"` + // The Teammate's phone number. + Phone *string `json:"phone,omitempty"` + // The Teammate's state or province. + State *string `json:"state,omitempty"` + // A Teammate can be an `admin`, `owner`, or `teammate`. Each role is associated with the scope of the Teammate's permissions. + UserType *UserType `json:"user_type,omitempty"` + // A website associated with the Teammate. + Website *string `json:"website,omitempty"` + // The Teammate's zip code. + Zip *string `json:"zip,omitempty"` + // The Teammate's first name. + FirstName *string `json:"first_name,omitempty"` + // The Teammate's last name. + LastName *string `json:"last_name,omitempty"` + // Teammate's email address. This email address also functions as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. + Email *string `json:"email,omitempty"` + // Indicates if the Teammate has administrator permissions. When set to `true`, the Teammate is an admin. + IsAdmin *bool `json:"is_admin,omitempty"` + // Indicates how the Teammate authenticates with SendGrid. When set to `true`, the Teammate will access SendGrid via SSO and their IdP. When set to `false`, the Teammate will authenticate directly with SendGrid via a username and password. + IsSso *bool `json:"is_sso,omitempty"` + // The permissions or scopes currently assigned to the Teammate. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. + Scopes *[]string `json:"scopes,omitempty"` + // When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. + HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"` + // Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. + SubuserAccess *[]SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner `json:"subuser_access,omitempty"` +} diff --git a/rest/api/v3/sso/model_permission_type.go b/rest/api/v3/sso/model_permission_type.go new file mode 100644 index 00000000..c496f95f --- /dev/null +++ b/rest/api/v3/sso/model_permission_type.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// PermissionType the model 'PermissionType' +type PermissionType string + +// List of PermissionType +const ( + PERMISSIONTYPE_ADMIN PermissionType = "admin" + PERMISSIONTYPE_RESTRICTED PermissionType = "restricted" +) diff --git a/rest/api/v3/sso/model_permission_type1.go b/rest/api/v3/sso/model_permission_type1.go new file mode 100644 index 00000000..03271a27 --- /dev/null +++ b/rest/api/v3/sso/model_permission_type1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// PermissionType1 the model 'PermissionType1' +type PermissionType1 string + +// List of PermissionType1 +const ( + PERMISSIONTYPE1_ADMIN PermissionType1 = "admin" + PERMISSIONTYPE1_RESTRICTED PermissionType1 = "restricted" +) diff --git a/rest/api/v3/sso/model_persona.go b/rest/api/v3/sso/model_persona.go new file mode 100644 index 00000000..bbd9d832 --- /dev/null +++ b/rest/api/v3/sso/model_persona.go @@ -0,0 +1,25 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Persona the model 'Persona' +type Persona string + +// List of Persona +const ( + PERSONA_ACCOUNTANT Persona = "accountant" + PERSONA_DEVELOPER Persona = "developer" + PERSONA_MARKETER Persona = "marketer" + PERSONA_OBSERVER Persona = "observer" +) diff --git a/rest/api/v3/sso/model_post_patch_integration_request.go b/rest/api/v3/sso/model_post_patch_integration_request.go new file mode 100644 index 00000000..6cdedd95 --- /dev/null +++ b/rest/api/v3/sso/model_post_patch_integration_request.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// PostPatchIntegrationRequest struct for PostPatchIntegrationRequest +type PostPatchIntegrationRequest struct { + // The name of your integration. This name can be anything that makes sense for your organization (eg. Twilio SendGrid) + Name string `json:"name"` + // Indicates if the integration is enabled. + Enabled bool `json:"enabled"` + // The IdP's SAML POST endpoint. This endpoint should receive requests and initiate an SSO login flow. This is called the \"Embed Link\" in the Twilio SendGrid UI. + SigninUrl string `json:"signin_url"` + // This URL is relevant only for an IdP-initiated authentication flow. If a user authenticates from their IdP, this URL will return them to their IdP when logging out. + SignoutUrl string `json:"signout_url"` + // An identifier provided by your IdP to identify Twilio SendGrid in the SAML interaction. This is called the \"SAML Issuer ID\" in the Twilio SendGrid UI. + EntityId string `json:"entity_id"` + // Indicates if the integration is complete. + CompletedIntegration *bool `json:"completed_integration,omitempty"` +} diff --git a/rest/api/v3/sso/model_post_sso_teammates201.go b/rest/api/v3/sso/model_post_sso_teammates201.go new file mode 100644 index 00000000..5863ff95 --- /dev/null +++ b/rest/api/v3/sso/model_post_sso_teammates201.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// PostSsoTeammates201 Successful SSO Teammates POST Response. +type PostSsoTeammates201 struct { + // The Teammate's first name. + FirstName *string `json:"first_name,omitempty"` + // The Teammate's last name. + LastName *string `json:"last_name,omitempty"` + // Teammate's email address. This email address also functions as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. + Email *string `json:"email,omitempty"` + // Indicates if the Teammate has administrator permissions. When set to `true`, the Teammate is an admin. + IsAdmin *bool `json:"is_admin,omitempty"` + // Indicates how the Teammate authenticates with SendGrid. When set to `true`, the Teammate will access SendGrid via SSO and their IdP. When set to `false`, the Teammate will authenticate directly with SendGrid via a username and password. + IsSso *bool `json:"is_sso,omitempty"` + // The permissions or scopes currently assigned to the Teammate. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. + Scopes *[]string `json:"scopes,omitempty"` + // When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. + HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"` + // Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. + SubuserAccess *[]SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner `json:"subuser_access,omitempty"` +} diff --git a/rest/api/v3/sso/model_post_sso_teammates_request.go b/rest/api/v3/sso/model_post_sso_teammates_request.go new file mode 100644 index 00000000..5f4e5543 --- /dev/null +++ b/rest/api/v3/sso/model_post_sso_teammates_request.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// PostSsoTeammatesRequest struct for PostSsoTeammatesRequest +type PostSsoTeammatesRequest struct { + // Set this property to the Teammate's email address. This email address will also function as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. + Email string `json:"email"` + // Set this property to the Teammate's first name. + FirstName string `json:"first_name"` + // Set this property to the Teammate's last name. + LastName string `json:"last_name"` + // Set this property to `true` if the Teammate has admin permissions. You should not include the `scopes` or `persona` properties when setting the `is_admin` property to `true`—an admin will be allocated all scopes. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of scopes. + IsAdmin *bool `json:"is_admin,omitempty"` + // A persona represents a group of permissions often required by a type of Teammate such as a developer or marketer. Assigning a persona allows you to allocate a group of pre-defined permissions rather than assigning each scope individually. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of the scopes assigned to each persona. + Persona *Persona `json:"persona,omitempty"` + // Add or remove permissions from a Teammate using this `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this propety in the request when using the `persona` property or when setting the `is_admin` property to `true`—assigning a `persona` or setting `is_admin` to `true` will allocate a group of permissions to the Teammate. + Scopes *[]string `json:"scopes,omitempty"` + // Set this property to `true` to give the Teammate permissions to operate only on behalf of a Subuser. This property value must be `true` if the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. If this property is set to `true`, you cannot specify individual `scopes`, assign a `persona`, or set `is_admin` to `true`—a Teammate cannot specify scopes for the parent account and have restricted Subuser access. + HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"` + // Specify which Subusers the Teammate may access and act on behalf of with this property. If this property is populated, you must set the `has_restricted_subuser_access` property to `true`. + SubuserAccess *[]SsoTeammatesBaseRequestPropsSubuserAccessInner `json:"subuser_access,omitempty"` +} diff --git a/rest/api/v3/sso/model_sso_certificate_body.go b/rest/api/v3/sso/model_sso_certificate_body.go new file mode 100644 index 00000000..1a001b81 --- /dev/null +++ b/rest/api/v3/sso/model_sso_certificate_body.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SsoCertificateBody struct for SsoCertificateBody +type SsoCertificateBody struct { + // This certificate is used by Twilio SendGrid to verify that SAML requests are coming from Okta. This is called the X509 certificate in the Twilio SendGrid UI. + PublicCertificate *string `json:"public_certificate,omitempty"` + // A unique ID assigned to the certificate by SendGrid. + Id *float32 `json:"id,omitempty"` + // A unix timestamp (e.g., 1603915954) that indicates the time before which the certificate is not valid. + NotBefore *float32 `json:"not_before,omitempty"` + // A unix timestamp (e.g., 1603915954) that indicates the time after which the certificate is no longer valid. + NotAfter *float32 `json:"not_after,omitempty"` + // An ID that matches a certificate to a specific IdP integration. + IntergrationId *string `json:"intergration_id,omitempty"` +} diff --git a/rest/api/v3/sso/model_sso_error_response_inner.go b/rest/api/v3/sso/model_sso_error_response_inner.go new file mode 100644 index 00000000..17711b3d --- /dev/null +++ b/rest/api/v3/sso/model_sso_error_response_inner.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SsoErrorResponseInner struct for SsoErrorResponseInner +type SsoErrorResponseInner struct { + Message *string `json:"message,omitempty"` + Field *string `json:"field,omitempty"` + ErrorId *string `json:"error_id,omitempty"` +} diff --git a/rest/api/v3/sso/model_sso_integration.go b/rest/api/v3/sso/model_sso_integration.go new file mode 100644 index 00000000..888e08da --- /dev/null +++ b/rest/api/v3/sso/model_sso_integration.go @@ -0,0 +1,38 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SsoIntegration struct for SsoIntegration +type SsoIntegration struct { + // The name of your integration. This name can be anything that makes sense for your organization (eg. Twilio SendGrid) + Name string `json:"name"` + // Indicates if the integration is enabled. + Enabled bool `json:"enabled"` + // The IdP's SAML POST endpoint. This endpoint should receive requests and initiate an SSO login flow. This is called the \"Embed Link\" in the Twilio SendGrid UI. + SigninUrl string `json:"signin_url"` + // This URL is relevant only for an IdP-initiated authentication flow. If a user authenticates from their IdP, this URL will return them to their IdP when logging out. + SignoutUrl string `json:"signout_url"` + // An identifier provided by your IdP to identify Twilio SendGrid in the SAML interaction. This is called the \"SAML Issuer ID\" in the Twilio SendGrid UI. + EntityId string `json:"entity_id"` + // Indicates if the integration is complete. + CompletedIntegration *bool `json:"completed_integration,omitempty"` + // A timestamp representing the last time the configuration was modified. + LastUpdated float32 `json:"last_updated"` + // A unique ID assigned to the configuration by SendGrid. + Id *string `json:"id,omitempty"` + // The URL where your IdP should POST its SAML response. This is the Twilio SendGrid URL that is responsible for receiving and parsing a SAML assertion. This is the same URL as the Audience URL when using SendGrid. + SingleSignonUrl *string `json:"single_signon_url,omitempty"` + // The URL where your IdP should POST its SAML response. This is the Twilio SendGrid URL that is responsible for receiving and parsing a SAML assertion. This is the same URL as the Single Sign-On URL when using SendGrid. + AudienceUrl *string `json:"audience_url,omitempty"` +} diff --git a/rest/api/v3/sso/model_sso_teammates_base_request_props.go b/rest/api/v3/sso/model_sso_teammates_base_request_props.go new file mode 100644 index 00000000..8fd3ef6d --- /dev/null +++ b/rest/api/v3/sso/model_sso_teammates_base_request_props.go @@ -0,0 +1,32 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SsoTeammatesBaseRequestProps struct for SsoTeammatesBaseRequestProps +type SsoTeammatesBaseRequestProps struct { + // Set this property to the Teammate's first name. + FirstName string `json:"first_name"` + // Set this property to the Teammate's last name. + LastName string `json:"last_name"` + // Set this property to `true` if the Teammate has admin permissions. You should not include the `scopes` or `persona` properties when setting the `is_admin` property to `true`—an admin will be allocated all scopes. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of scopes. + IsAdmin *bool `json:"is_admin,omitempty"` + // A persona represents a group of permissions often required by a type of Teammate such as a developer or marketer. Assigning a persona allows you to allocate a group of pre-defined permissions rather than assigning each scope individually. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of the scopes assigned to each persona. + Persona *Persona `json:"persona,omitempty"` + // Add or remove permissions from a Teammate using this `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this propety in the request when using the `persona` property or when setting the `is_admin` property to `true`—assigning a `persona` or setting `is_admin` to `true` will allocate a group of permissions to the Teammate. + Scopes *[]string `json:"scopes,omitempty"` + // Set this property to `true` to give the Teammate permissions to operate only on behalf of a Subuser. This property value must be `true` if the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. If this property is set to `true`, you cannot specify individual `scopes`, assign a `persona`, or set `is_admin` to `true`—a Teammate cannot specify scopes for the parent account and have restricted Subuser access. + HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"` + // Specify which Subusers the Teammate may access and act on behalf of with this property. If this property is populated, you must set the `has_restricted_subuser_access` property to `true`. + SubuserAccess *[]SsoTeammatesBaseRequestPropsSubuserAccessInner `json:"subuser_access,omitempty"` +} diff --git a/rest/api/v3/sso/model_sso_teammates_base_request_props_subuser_access_inner.go b/rest/api/v3/sso/model_sso_teammates_base_request_props_subuser_access_inner.go new file mode 100644 index 00000000..6a9499bd --- /dev/null +++ b/rest/api/v3/sso/model_sso_teammates_base_request_props_subuser_access_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SsoTeammatesBaseRequestPropsSubuserAccessInner An array of Subusers to which the Teammate should have access. +type SsoTeammatesBaseRequestPropsSubuserAccessInner struct { + // Set this property to the ID of a Subuser to which the Teammate should have access. You can retrieve Subuser IDs from the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/). + Id int32 `json:"id"` + // Grant the level of access the Teammate should have to the specified Subuser with this property. This property value may be either `admin` or `restricted`. When set to `restricted`, the Teammate has only the permissions assigned in the `scopes` property. + PermissionType PermissionType `json:"permission_type"` + // Add or remove permissions that the Teammate can access on behalf of the Subuser. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this property in the request when the `permission_type` property is set to `admin`—administrators have full access to the specified Subuser. + Scopes *[]string `json:"scopes,omitempty"` +} diff --git a/rest/api/v3/sso/model_sso_teammates_base_response_props.go b/rest/api/v3/sso/model_sso_teammates_base_response_props.go new file mode 100644 index 00000000..ca10b302 --- /dev/null +++ b/rest/api/v3/sso/model_sso_teammates_base_response_props.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SsoTeammatesBaseResponseProps struct for SsoTeammatesBaseResponseProps +type SsoTeammatesBaseResponseProps struct { + // The Teammate's first name. + FirstName *string `json:"first_name,omitempty"` + // The Teammate's last name. + LastName *string `json:"last_name,omitempty"` + // Teammate's email address. This email address also functions as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. + Email *string `json:"email,omitempty"` + // Indicates if the Teammate has administrator permissions. When set to `true`, the Teammate is an admin. + IsAdmin *bool `json:"is_admin,omitempty"` + // Indicates how the Teammate authenticates with SendGrid. When set to `true`, the Teammate will access SendGrid via SSO and their IdP. When set to `false`, the Teammate will authenticate directly with SendGrid via a username and password. + IsSso *bool `json:"is_sso,omitempty"` + // The permissions or scopes currently assigned to the Teammate. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. + Scopes *[]string `json:"scopes,omitempty"` +} diff --git a/rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props.go b/rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props.go new file mode 100644 index 00000000..4570072d --- /dev/null +++ b/rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SsoTeammatesRestrictedSubuserResponseProps struct for SsoTeammatesRestrictedSubuserResponseProps +type SsoTeammatesRestrictedSubuserResponseProps struct { + // When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. + HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"` + // Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. + SubuserAccess *[]SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner `json:"subuser_access,omitempty"` +} diff --git a/rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props_subuser_access_inner.go b/rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props_subuser_access_inner.go new file mode 100644 index 00000000..9d151365 --- /dev/null +++ b/rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props_subuser_access_inner.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner An array of Subusers to which the Teammate has access. +type SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner struct { + // The ID of a Subuser to which the Teammate has access. You can retrieve Subuser IDs from the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/). + Id *int32 `json:"id,omitempty"` + // The username of a Subuser to which the Teammate has access. + Username *string `json:"username,omitempty"` + // The email address of a Subuser to which the Teammate has access. + Email *string `json:"email,omitempty"` + // Indicates if the Subuser is active for the SendGrid account. + Disabled *bool `json:"disabled,omitempty"` + // The level of access the Teammate has to the specified Subuser. This property value may be either `admin` or `restricted`. When is property is set to `restricted`, the Teammate has only the permissions assigned in the `scopes` property. + PermissionType *PermissionType1 `json:"permission_type,omitempty"` + // The permissions or scopes that the Teammate can access on behalf of the Subuser. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. + Scopes *[]string `json:"scopes,omitempty"` +} diff --git a/rest/api/v3/sso/model_update_sso_certificate_request.go b/rest/api/v3/sso/model_update_sso_certificate_request.go new file mode 100644 index 00000000..fd83330d --- /dev/null +++ b/rest/api/v3/sso/model_update_sso_certificate_request.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateSsoCertificateRequest struct for UpdateSsoCertificateRequest +type UpdateSsoCertificateRequest struct { + // This public certificate allows SendGrid to verify that SAML requests it receives are signed by an IdP that it recognizes. + PublicCertificate *string `json:"public_certificate,omitempty"` + // Indicates whether or not the certificate is enabled. + Enabled *bool `json:"enabled,omitempty"` + // An ID that matches a certificate to a specific IdP integration. + IntegrationId *string `json:"integration_id,omitempty"` +} diff --git a/rest/api/v3/sso/model_user_type.go b/rest/api/v3/sso/model_user_type.go new file mode 100644 index 00000000..3042c84a --- /dev/null +++ b/rest/api/v3/sso/model_user_type.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UserType the model 'UserType' +type UserType string + +// List of UserType +const ( + USERTYPE_ADMIN UserType = "admin" + USERTYPE_OWNER UserType = "owner" + USERTYPE_TEAMMATE UserType = "teammate" +) diff --git a/rest/api/v3/stats/.openapi-generator b/rest/api/v3/stats/.openapi-generator new file mode 100644 index 00000000..4e237e34 --- /dev/null +++ b/rest/api/v3/stats/.openapi-generator @@ -0,0 +1,80 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_get_client_stat.go +api_list_browser_stat.go +api_list_category.go +api_list_category_stat.go +api_list_category_stat_sum.go +api_list_client_stat.go +api_list_device_stat.go +api_list_geo_stat.go +api_list_mailbox_provider_stat.go +api_list_stat.go +api_service.go +docs/AdvancedStatsClicks.md +docs/AdvancedStatsClicksOpens.md +docs/AdvancedStatsMailboxProvider.md +docs/AdvancedStatsOpens.md +docs/AggregatedBy.md +docs/AggregatedBy1.md +docs/AggregatedBy2.md +docs/AggregatedBy3.md +docs/CategoryStats.md +docs/CategoryStatsStatsInner.md +docs/CategoryStatsStatsInnerMetrics.md +docs/ClientType.md +docs/Country.md +docs/GetClientStat.md +docs/ListBrowserStat.md +docs/ListBrowserStat200ResponseInner.md +docs/ListBrowserStat200ResponseInnerStatsInner.md +docs/ListCategory.md +docs/ListCategory200ResponseInner.md +docs/ListCategory400Response.md +docs/ListCategory400ResponseErrorsInner.md +docs/ListCategoryStat.md +docs/ListCategoryStatSum.md +docs/ListClientStat.md +docs/ListClientStat200ResponseInner.md +docs/ListClientStat200ResponseInnerStatsInner.md +docs/ListDeviceStat.md +docs/ListGeoStat.md +docs/ListGeoStat200ResponseInner.md +docs/ListGeoStat200ResponseInnerStatsInner.md +docs/ListMailboxProviderStat.md +docs/ListMailboxProviderStat200ResponseInner.md +docs/ListMailboxProviderStat200ResponseInnerStatsInner.md +docs/ListStat.md +docs/ListStat200ResponseInner.md +docs/ListStat200ResponseInnerStatsInner.md +docs/SortByDirection.md +docs/StatsAdvancedGlobalStats.md +model_advanced_stats_clicks.go +model_advanced_stats_clicks_opens.go +model_advanced_stats_mailbox_provider.go +model_advanced_stats_opens.go +model_aggregated_by.go +model_aggregated_by1.go +model_aggregated_by2.go +model_aggregated_by3.go +model_category_stats.go +model_category_stats_stats_inner.go +model_category_stats_stats_inner_metrics.go +model_client_type.go +model_country.go +model_list_browser_stat_200_response_inner.go +model_list_browser_stat_200_response_inner_stats_inner.go +model_list_category_200_response_inner.go +model_list_category_400_response.go +model_list_category_400_response_errors_inner.go +model_list_client_stat_200_response_inner.go +model_list_client_stat_200_response_inner_stats_inner.go +model_list_geo_stat_200_response_inner.go +model_list_geo_stat_200_response_inner_stats_inner.go +model_list_mailbox_provider_stat_200_response_inner.go +model_list_mailbox_provider_stat_200_response_inner_stats_inner.go +model_list_stat_200_response_inner.go +model_list_stat_200_response_inner_stats_inner.go +model_sort_by_direction.go +model_stats_advanced_global_stats.go diff --git a/rest/api/v3/stats/.openapi-generator-ignore b/rest/api/v3/stats/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/stats/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/stats/README.md b/rest/api/v3/stats/README.md new file mode 100644 index 00000000..dd7596bf --- /dev/null +++ b/rest/api/v3/stats/README.md @@ -0,0 +1,104 @@ +# Go API client for + +The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. + +Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. + +SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. + +Category statistics are available for the previous thirteen months only. + +See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:44.471509+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*GetClientStat* | [**GetClientStat**](docs/GetClientStat.md#getclientstat) | **Get** /v3/clients/{ClientType}/stats | Retrieve stats by a specific client type. +*ListBrowserStat* | [**ListBrowserStat**](docs/ListBrowserStat.md#listbrowserstat) | **Get** /v3/browsers/stats | Retrieve email statistics by browser. +*ListCategory* | [**ListCategory**](docs/ListCategory.md#listcategory) | **Get** /v3/categories | Retrieve all categories +*ListCategoryStat* | [**ListCategoryStat**](docs/ListCategoryStat.md#listcategorystat) | **Get** /v3/categories/stats | Retrieve Email Statistics for Categories +*ListCategoryStatSum* | [**ListCategoryStatSum**](docs/ListCategoryStatSum.md#listcategorystatsum) | **Get** /v3/categories/stats/sums | Retrieve sums of email stats for each category. +*ListClientStat* | [**ListClientStat**](docs/ListClientStat.md#listclientstat) | **Get** /v3/clients/stats | Retrieve email statistics by client type. +*ListDeviceStat* | [**ListDeviceStat**](docs/ListDeviceStat.md#listdevicestat) | **Get** /v3/devices/stats | Retrieve email statistics by device type. +*ListGeoStat* | [**ListGeoStat**](docs/ListGeoStat.md#listgeostat) | **Get** /v3/geo/stats | Retrieve email statistics by country and state/province. +*ListMailboxProviderStat* | [**ListMailboxProviderStat**](docs/ListMailboxProviderStat.md#listmailboxproviderstat) | **Get** /v3/mailbox_providers/stats | Retrieve email statistics by mailbox provider. +*ListStat* | [**ListStat**](docs/ListStat.md#liststat) | **Get** /v3/stats | Retrieve global email statistics + + +## Documentation For Models + + - [AdvancedStatsClicks](AdvancedStatsClicks.md) + - [AdvancedStatsClicksOpens](AdvancedStatsClicksOpens.md) + - [AdvancedStatsMailboxProvider](AdvancedStatsMailboxProvider.md) + - [AdvancedStatsOpens](AdvancedStatsOpens.md) + - [AggregatedBy](AggregatedBy.md) + - [AggregatedBy1](AggregatedBy1.md) + - [AggregatedBy2](AggregatedBy2.md) + - [AggregatedBy3](AggregatedBy3.md) + - [CategoryStats](CategoryStats.md) + - [CategoryStatsStatsInner](CategoryStatsStatsInner.md) + - [CategoryStatsStatsInnerMetrics](CategoryStatsStatsInnerMetrics.md) + - [ClientType](ClientType.md) + - [Country](Country.md) + - [ListBrowserStat200ResponseInner](ListBrowserStat200ResponseInner.md) + - [ListBrowserStat200ResponseInnerStatsInner](ListBrowserStat200ResponseInnerStatsInner.md) + - [ListCategory200ResponseInner](ListCategory200ResponseInner.md) + - [ListCategory400Response](ListCategory400Response.md) + - [ListCategory400ResponseErrorsInner](ListCategory400ResponseErrorsInner.md) + - [ListClientStat200ResponseInner](ListClientStat200ResponseInner.md) + - [ListClientStat200ResponseInnerStatsInner](ListClientStat200ResponseInnerStatsInner.md) + - [ListGeoStat200ResponseInner](ListGeoStat200ResponseInner.md) + - [ListGeoStat200ResponseInnerStatsInner](ListGeoStat200ResponseInnerStatsInner.md) + - [ListMailboxProviderStat200ResponseInner](ListMailboxProviderStat200ResponseInner.md) + - [ListMailboxProviderStat200ResponseInnerStatsInner](ListMailboxProviderStat200ResponseInnerStatsInner.md) + - [ListStat200ResponseInner](ListStat200ResponseInner.md) + - [ListStat200ResponseInnerStatsInner](ListStat200ResponseInnerStatsInner.md) + - [SortByDirection](SortByDirection.md) + - [StatsAdvancedGlobalStats](StatsAdvancedGlobalStats.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/stats/api_get_client_stat.go b/rest/api/v3/stats/api_get_client_stat.go new file mode 100644 index 00000000..8289a1c3 --- /dev/null +++ b/rest/api/v3/stats/api_get_client_stat.go @@ -0,0 +1,98 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type GetClientStatParam struct { + // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. + StartDate *string `json:"start_date"` + // Specifies the type of client to retrieve stats for. Must be either \"phone\", \"tablet\", \"webmail\", or \"desktop\". + ClientType *ClientType `json:"client_type"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + EndDate *string `json:"end_date,omitempty"` + // How to group the statistics. Must be either \"day\", \"week\", or \"month\". + AggregatedBy *AggregatedBy2 `json:"aggregated_by,omitempty"` +} + +func (params *GetClientStatParam) SetStartDate(StartDate string) *GetClientStatParam { + params.StartDate = &StartDate + return params +} +func (params *GetClientStatParam) SetClientType(ClientType ClientType) *GetClientStatParam { + params.ClientType = &ClientType + return params +} +func (params *GetClientStatParam) SetOnbehalfof(Onbehalfof string) *GetClientStatParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *GetClientStatParam) SetEndDate(EndDate string) *GetClientStatParam { + params.EndDate = &EndDate + return params +} +func (params *GetClientStatParam) SetAggregatedBy(AggregatedBy AggregatedBy2) *GetClientStatParam { + params.AggregatedBy = &AggregatedBy + return params +} + +// **This endpoint allows you to retrieve your email statistics segmented by a specific client type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. ### Available Client Types - phone - tablet - webmail - desktop Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). +func (c *ApiService) GetClientStat(params *GetClientStatParam) (interface{}, error) { + path := "/v3/clients/{ClientType}/stats" + if params != nil && params.ClientType != nil { + path = strings.Replace(path, "{"+"ClientType"+"}", fmt.Sprint(*params.ClientType), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartDate != nil { + data.Set("start_date", *params.StartDate) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", *params.EndDate) + } + if params != nil && params.AggregatedBy != nil { + data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListClientStat200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/stats/api_list_browser_stat.go b/rest/api/v3/stats/api_list_browser_stat.go new file mode 100644 index 00000000..3e84d689 --- /dev/null +++ b/rest/api/v3/stats/api_list_browser_stat.go @@ -0,0 +1,114 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListBrowserStatParam struct { + // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. + StartDate *string `json:"start_date"` + // The browsers to get statistics for. You can include up to 10 different browsers by including this parameter multiple times. + Browsers *string `json:"browsers,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // The number of results to return. + Limit *int32 `json:"limit,omitempty"` + // The point in the list to begin retrieving results. + Offset *int32 `json:"offset,omitempty"` + // How to group the statistics. Must be either \"day\", \"week\", or \"month\". + AggregatedBy *AggregatedBy3 `json:"aggregated_by,omitempty"` + // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + EndDate *string `json:"end_date,omitempty"` +} + +func (params *ListBrowserStatParam) SetStartDate(StartDate string) *ListBrowserStatParam { + params.StartDate = &StartDate + return params +} +func (params *ListBrowserStatParam) SetBrowsers(Browsers string) *ListBrowserStatParam { + params.Browsers = &Browsers + return params +} +func (params *ListBrowserStatParam) SetOnbehalfof(Onbehalfof string) *ListBrowserStatParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *ListBrowserStatParam) SetLimit(Limit int32) *ListBrowserStatParam { + params.Limit = &Limit + return params +} +func (params *ListBrowserStatParam) SetOffset(Offset int32) *ListBrowserStatParam { + params.Offset = &Offset + return params +} +func (params *ListBrowserStatParam) SetAggregatedBy(AggregatedBy AggregatedBy3) *ListBrowserStatParam { + params.AggregatedBy = &AggregatedBy + return params +} +func (params *ListBrowserStatParam) SetEndDate(EndDate string) *ListBrowserStatParam { + params.EndDate = &EndDate + return params +} + +// **This endpoint allows you to retrieve your email statistics segmented by browser type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). +func (c *ApiService) ListBrowserStat(params *ListBrowserStatParam) (interface{}, error) { + path := "/v3/browsers/stats" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartDate != nil { + data.Set("start_date", *params.StartDate) + } + if params != nil && params.Browsers != nil { + data.Set("browsers", *params.Browsers) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + if params != nil && params.AggregatedBy != nil { + data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", *params.EndDate) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListBrowserStat200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/stats/api_list_category.go b/rest/api/v3/stats/api_list_category.go new file mode 100644 index 00000000..9805977a --- /dev/null +++ b/rest/api/v3/stats/api_list_category.go @@ -0,0 +1,95 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListCategoryParam struct { + // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. + Limit *int32 `json:"limit,omitempty"` + // Allows you to perform a prefix search on this particular category. + Category *string `json:"category,omitempty"` + // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + Offset *int32 `json:"offset,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListCategoryParam) SetLimit(Limit int32) *ListCategoryParam { + params.Limit = &Limit + return params +} +func (params *ListCategoryParam) SetCategory(Category string) *ListCategoryParam { + params.Category = &Category + return params +} +func (params *ListCategoryParam) SetOffset(Offset int32) *ListCategoryParam { + params.Offset = &Offset + return params +} +func (params *ListCategoryParam) SetOnbehalfof(Onbehalfof string) *ListCategoryParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a paginated list of all of your categories.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. +func (c *ApiService) ListCategory(params *ListCategoryParam) (interface{}, error) { + path := "/v3/categories" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Category != nil { + data.Set("category", *params.Category) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListCategory200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ListCategory400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/stats/api_list_category_stat.go b/rest/api/v3/stats/api_list_category_stat.go new file mode 100644 index 00000000..442d45f9 --- /dev/null +++ b/rest/api/v3/stats/api_list_category_stat.go @@ -0,0 +1,96 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListCategoryStatParam struct { + // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD + StartDate *string `json:"start_date"` + // The individual categories that you want to retrieve statistics for. You may include up to 10 different categories. + Categories *string `json:"categories"` + // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + EndDate *string `json:"end_date,omitempty"` + // How to group the statistics. Must be either \"day\", \"week\", or \"month\". + AggregatedBy *AggregatedBy `json:"aggregated_by,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListCategoryStatParam) SetStartDate(StartDate string) *ListCategoryStatParam { + params.StartDate = &StartDate + return params +} +func (params *ListCategoryStatParam) SetCategories(Categories string) *ListCategoryStatParam { + params.Categories = &Categories + return params +} +func (params *ListCategoryStatParam) SetEndDate(EndDate string) *ListCategoryStatParam { + params.EndDate = &EndDate + return params +} +func (params *ListCategoryStatParam) SetAggregatedBy(AggregatedBy AggregatedBy) *ListCategoryStatParam { + params.AggregatedBy = &AggregatedBy + return params +} +func (params *ListCategoryStatParam) SetOnbehalfof(Onbehalfof string) *ListCategoryStatParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve all of your email statistics for each of your categories.** If you do not define any query parameters, this endpoint will return a sum for each category in groups of 10. +func (c *ApiService) ListCategoryStat(params *ListCategoryStatParam) (interface{}, error) { + path := "/v3/categories/stats" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartDate != nil { + data.Set("start_date", *params.StartDate) + } + if params != nil && params.Categories != nil { + data.Set("categories", *params.Categories) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", *params.EndDate) + } + if params != nil && params.AggregatedBy != nil { + data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]CategoryStats{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/stats/api_list_category_stat_sum.go b/rest/api/v3/stats/api_list_category_stat_sum.go new file mode 100644 index 00000000..02c40c28 --- /dev/null +++ b/rest/api/v3/stats/api_list_category_stat_sum.go @@ -0,0 +1,123 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListCategoryStatSumParam struct { + // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. + StartDate *string `json:"start_date"` + // The metric that you want to sort by. Must be a single metric. + SortByMetric *string `json:"sort_by_metric,omitempty"` + // The direction you want to sort. + SortByDirection *SortByDirection `json:"sort_by_direction,omitempty"` + // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + EndDate *string `json:"end_date,omitempty"` + // Limits the number of results returned. + Limit *int32 `json:"limit,omitempty"` + // The point in the list to begin retrieving results. + Offset *int32 `json:"offset,omitempty"` + // How to group the statistics. Must be either \"day\", \"week\", or \"month\". + AggregatedBy *AggregatedBy1 `json:"aggregated_by,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListCategoryStatSumParam) SetStartDate(StartDate string) *ListCategoryStatSumParam { + params.StartDate = &StartDate + return params +} +func (params *ListCategoryStatSumParam) SetSortByMetric(SortByMetric string) *ListCategoryStatSumParam { + params.SortByMetric = &SortByMetric + return params +} +func (params *ListCategoryStatSumParam) SetSortByDirection(SortByDirection SortByDirection) *ListCategoryStatSumParam { + params.SortByDirection = &SortByDirection + return params +} +func (params *ListCategoryStatSumParam) SetEndDate(EndDate string) *ListCategoryStatSumParam { + params.EndDate = &EndDate + return params +} +func (params *ListCategoryStatSumParam) SetLimit(Limit int32) *ListCategoryStatSumParam { + params.Limit = &Limit + return params +} +func (params *ListCategoryStatSumParam) SetOffset(Offset int32) *ListCategoryStatSumParam { + params.Offset = &Offset + return params +} +func (params *ListCategoryStatSumParam) SetAggregatedBy(AggregatedBy AggregatedBy1) *ListCategoryStatSumParam { + params.AggregatedBy = &AggregatedBy + return params +} +func (params *ListCategoryStatSumParam) SetOnbehalfof(Onbehalfof string) *ListCategoryStatSumParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve the total sum of each email statistic for every category over the given date range.** If you do not define any query parameters, this endpoint will return a sum for each category in groups of 10. +func (c *ApiService) ListCategoryStatSum(params *ListCategoryStatSumParam) (interface{}, error) { + path := "/v3/categories/stats/sums" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartDate != nil { + data.Set("start_date", *params.StartDate) + } + if params != nil && params.SortByMetric != nil { + data.Set("sort_by_metric", *params.SortByMetric) + } + if params != nil && params.SortByDirection != nil { + data.Set("sort_by_direction", fmt.Sprint(*params.SortByDirection)) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", *params.EndDate) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + if params != nil && params.AggregatedBy != nil { + data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &CategoryStats{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/stats/api_list_client_stat.go b/rest/api/v3/stats/api_list_client_stat.go new file mode 100644 index 00000000..f663bac0 --- /dev/null +++ b/rest/api/v3/stats/api_list_client_stat.go @@ -0,0 +1,87 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListClientStatParam struct { + // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. + StartDate *string `json:"start_date"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + EndDate *string `json:"end_date,omitempty"` + // How to group the statistics. Must be either \"day\", \"week\", or \"month\". + AggregatedBy *AggregatedBy2 `json:"aggregated_by,omitempty"` +} + +func (params *ListClientStatParam) SetStartDate(StartDate string) *ListClientStatParam { + params.StartDate = &StartDate + return params +} +func (params *ListClientStatParam) SetOnbehalfof(Onbehalfof string) *ListClientStatParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *ListClientStatParam) SetEndDate(EndDate string) *ListClientStatParam { + params.EndDate = &EndDate + return params +} +func (params *ListClientStatParam) SetAggregatedBy(AggregatedBy AggregatedBy2) *ListClientStatParam { + params.AggregatedBy = &AggregatedBy + return params +} + +// **This endpoint allows you to retrieve your email statistics segmented by client type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). +func (c *ApiService) ListClientStat(params *ListClientStatParam) (interface{}, error) { + path := "/v3/clients/stats" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartDate != nil { + data.Set("start_date", *params.StartDate) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", *params.EndDate) + } + if params != nil && params.AggregatedBy != nil { + data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListClientStat200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/stats/api_list_device_stat.go b/rest/api/v3/stats/api_list_device_stat.go new file mode 100644 index 00000000..24bc46a2 --- /dev/null +++ b/rest/api/v3/stats/api_list_device_stat.go @@ -0,0 +1,105 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListDeviceStatParam struct { + // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. + StartDate *string `json:"start_date"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // The number of results to return. + Limit *int32 `json:"limit,omitempty"` + // The point in the list to begin retrieving results. + Offset *int32 `json:"offset,omitempty"` + // How to group the statistics. Must be either \"day\", \"week\", or \"month\". + AggregatedBy *AggregatedBy3 `json:"aggregated_by,omitempty"` + // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + EndDate *string `json:"end_date,omitempty"` +} + +func (params *ListDeviceStatParam) SetStartDate(StartDate string) *ListDeviceStatParam { + params.StartDate = &StartDate + return params +} +func (params *ListDeviceStatParam) SetOnbehalfof(Onbehalfof string) *ListDeviceStatParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *ListDeviceStatParam) SetLimit(Limit int32) *ListDeviceStatParam { + params.Limit = &Limit + return params +} +func (params *ListDeviceStatParam) SetOffset(Offset int32) *ListDeviceStatParam { + params.Offset = &Offset + return params +} +func (params *ListDeviceStatParam) SetAggregatedBy(AggregatedBy AggregatedBy3) *ListDeviceStatParam { + params.AggregatedBy = &AggregatedBy + return params +} +func (params *ListDeviceStatParam) SetEndDate(EndDate string) *ListDeviceStatParam { + params.EndDate = &EndDate + return params +} + +// **This endpoint allows you to retrieve your email statistics segmented by the device type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. ## Available Device Types | **Device** | **Description** | **Example** | |---|---|---| | Desktop | Email software on desktop computer. | I.E., Outlook, Sparrow, or Apple Mail. | | Webmail | A web-based email client. | I.E., Yahoo, Google, AOL, or Outlook.com. | | Phone | A smart phone. | iPhone, Android, Blackberry, etc. | Tablet | A tablet computer. | iPad, android based tablet, etc. | | Other | An unrecognized device. | Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). +func (c *ApiService) ListDeviceStat(params *ListDeviceStatParam) (interface{}, error) { + path := "/v3/devices/stats" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartDate != nil { + data.Set("start_date", *params.StartDate) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + if params != nil && params.AggregatedBy != nil { + data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", *params.EndDate) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListClientStat200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/stats/api_list_geo_stat.go b/rest/api/v3/stats/api_list_geo_stat.go new file mode 100644 index 00000000..083560d2 --- /dev/null +++ b/rest/api/v3/stats/api_list_geo_stat.go @@ -0,0 +1,114 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListGeoStatParam struct { + // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. + StartDate *string `json:"start_date"` + // The country you would like to see statistics for. Currently only supported for US and CA. + Country *Country `json:"country,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // The number of results to return. + Limit *int32 `json:"limit,omitempty"` + // The point in the list to begin retrieving results. + Offset *int32 `json:"offset,omitempty"` + // How to group the statistics. Must be either \"day\", \"week\", or \"month\". + AggregatedBy *AggregatedBy3 `json:"aggregated_by,omitempty"` + // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + EndDate *string `json:"end_date,omitempty"` +} + +func (params *ListGeoStatParam) SetStartDate(StartDate string) *ListGeoStatParam { + params.StartDate = &StartDate + return params +} +func (params *ListGeoStatParam) SetCountry(Country Country) *ListGeoStatParam { + params.Country = &Country + return params +} +func (params *ListGeoStatParam) SetOnbehalfof(Onbehalfof string) *ListGeoStatParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *ListGeoStatParam) SetLimit(Limit int32) *ListGeoStatParam { + params.Limit = &Limit + return params +} +func (params *ListGeoStatParam) SetOffset(Offset int32) *ListGeoStatParam { + params.Offset = &Offset + return params +} +func (params *ListGeoStatParam) SetAggregatedBy(AggregatedBy AggregatedBy3) *ListGeoStatParam { + params.AggregatedBy = &AggregatedBy + return params +} +func (params *ListGeoStatParam) SetEndDate(EndDate string) *ListGeoStatParam { + params.EndDate = &EndDate + return params +} + +// **This endpoint allows you to retrieve your email statistics segmented by country and state/province.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [User Guide](https://wwww.twilio.com/docs/sendgrid/ui/analytics-and-reporting/stats-overview). +func (c *ApiService) ListGeoStat(params *ListGeoStatParam) (interface{}, error) { + path := "/v3/geo/stats" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartDate != nil { + data.Set("start_date", *params.StartDate) + } + if params != nil && params.Country != nil { + data.Set("country", fmt.Sprint(*params.Country)) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + if params != nil && params.AggregatedBy != nil { + data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", *params.EndDate) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListGeoStat200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/stats/api_list_mailbox_provider_stat.go b/rest/api/v3/stats/api_list_mailbox_provider_stat.go new file mode 100644 index 00000000..98436deb --- /dev/null +++ b/rest/api/v3/stats/api_list_mailbox_provider_stat.go @@ -0,0 +1,114 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListMailboxProviderStatParam struct { + // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. + StartDate *string `json:"start_date"` + // The mail box providers to get statistics for. You can include up to 10 by including this parameter multiple times. + MailboxProviders *string `json:"mailbox_providers,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // The number of results to return. + Limit *int32 `json:"limit,omitempty"` + // The point in the list to begin retrieving results. + Offset *int32 `json:"offset,omitempty"` + // How to group the statistics. Must be either \"day\", \"week\", or \"month\". + AggregatedBy *AggregatedBy3 `json:"aggregated_by,omitempty"` + // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + EndDate *string `json:"end_date,omitempty"` +} + +func (params *ListMailboxProviderStatParam) SetStartDate(StartDate string) *ListMailboxProviderStatParam { + params.StartDate = &StartDate + return params +} +func (params *ListMailboxProviderStatParam) SetMailboxProviders(MailboxProviders string) *ListMailboxProviderStatParam { + params.MailboxProviders = &MailboxProviders + return params +} +func (params *ListMailboxProviderStatParam) SetOnbehalfof(Onbehalfof string) *ListMailboxProviderStatParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *ListMailboxProviderStatParam) SetLimit(Limit int32) *ListMailboxProviderStatParam { + params.Limit = &Limit + return params +} +func (params *ListMailboxProviderStatParam) SetOffset(Offset int32) *ListMailboxProviderStatParam { + params.Offset = &Offset + return params +} +func (params *ListMailboxProviderStatParam) SetAggregatedBy(AggregatedBy AggregatedBy3) *ListMailboxProviderStatParam { + params.AggregatedBy = &AggregatedBy + return params +} +func (params *ListMailboxProviderStatParam) SetEndDate(EndDate string) *ListMailboxProviderStatParam { + params.EndDate = &EndDate + return params +} + +// **This endpoint allows you to retrieve your email statistics segmented by recipient mailbox provider.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). +func (c *ApiService) ListMailboxProviderStat(params *ListMailboxProviderStatParam) (interface{}, error) { + path := "/v3/mailbox_providers/stats" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartDate != nil { + data.Set("start_date", *params.StartDate) + } + if params != nil && params.MailboxProviders != nil { + data.Set("mailbox_providers", *params.MailboxProviders) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + if params != nil && params.AggregatedBy != nil { + data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", *params.EndDate) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListMailboxProviderStat200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/stats/api_list_stat.go b/rest/api/v3/stats/api_list_stat.go new file mode 100644 index 00000000..9b0f05e8 --- /dev/null +++ b/rest/api/v3/stats/api_list_stat.go @@ -0,0 +1,105 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListStatParam struct { + // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. + StartDate *string `json:"start_date"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // The number of results to return. + Limit *int32 `json:"limit,omitempty"` + // The point in the list to begin retrieving results. + Offset *int32 `json:"offset,omitempty"` + // How to group the statistics. Must be either \"day\", \"week\", or \"month\". + AggregatedBy *AggregatedBy3 `json:"aggregated_by,omitempty"` + // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + EndDate *string `json:"end_date,omitempty"` +} + +func (params *ListStatParam) SetStartDate(StartDate string) *ListStatParam { + params.StartDate = &StartDate + return params +} +func (params *ListStatParam) SetOnbehalfof(Onbehalfof string) *ListStatParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *ListStatParam) SetLimit(Limit int32) *ListStatParam { + params.Limit = &Limit + return params +} +func (params *ListStatParam) SetOffset(Offset int32) *ListStatParam { + params.Offset = &Offset + return params +} +func (params *ListStatParam) SetAggregatedBy(AggregatedBy AggregatedBy3) *ListStatParam { + params.AggregatedBy = &AggregatedBy + return params +} +func (params *ListStatParam) SetEndDate(EndDate string) *ListStatParam { + params.EndDate = &EndDate + return params +} + +// **This endpoint allows you to retrieve all of your global email statistics between a given date range.** Parent accounts can see either aggregated stats for the parent account or aggregated stats for a subuser specified in the `on-behalf-of` header. Subuser accounts will see only their own stats. +func (c *ApiService) ListStat(params *ListStatParam) (interface{}, error) { + path := "/v3/stats" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartDate != nil { + data.Set("start_date", *params.StartDate) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + if params != nil && params.AggregatedBy != nil { + data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", *params.EndDate) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListStat200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/stats/api_service.go b/rest/api/v3/stats/api_service.go new file mode 100644 index 00000000..29d8f9f5 --- /dev/null +++ b/rest/api/v3/stats/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/stats/docs/AdvancedStatsClicks.md b/rest/api/v3/stats/docs/AdvancedStatsClicks.md new file mode 100644 index 00000000..3f2f87ae --- /dev/null +++ b/rest/api/v3/stats/docs/AdvancedStatsClicks.md @@ -0,0 +1,12 @@ +# AdvancedStatsClicks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Clicks** | **int32** | The number of links that were clicked in your emails. |[optional] +**UniqueClicks** | **int32** | The number of unique recipients who clicked links in your emails. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/AdvancedStatsClicksOpens.md b/rest/api/v3/stats/docs/AdvancedStatsClicksOpens.md new file mode 100644 index 00000000..38d8c2e1 --- /dev/null +++ b/rest/api/v3/stats/docs/AdvancedStatsClicksOpens.md @@ -0,0 +1,14 @@ +# AdvancedStatsClicksOpens + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Clicks** | **int32** | The number of links that were clicked in your emails. |[optional] +**UniqueClicks** | **int32** | The number of unique recipients who clicked links in your emails. |[optional] +**Opens** | **int32** | The total number of times your emails were opened by recipients. |[optional] +**UniqueOpens** | **int32** | The number of unique recipients who opened your emails. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/AdvancedStatsMailboxProvider.md b/rest/api/v3/stats/docs/AdvancedStatsMailboxProvider.md new file mode 100644 index 00000000..403c4943 --- /dev/null +++ b/rest/api/v3/stats/docs/AdvancedStatsMailboxProvider.md @@ -0,0 +1,18 @@ +# AdvancedStatsMailboxProvider + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Blocks** | **int32** | The number of emails that were not allowed to be delivered by ISPs. |[optional] +**Bounces** | **int32** | The number of emails that bounced instead of being delivered. |[optional] +**Deferred** | **int32** | The number of emails that temporarily could not be delivered. |[optional] +**Delivered** | **int32** | The number of emails SendGrid was able to confirm were actually delivered to a recipient. |[optional] +**Drops** | **int32** | The number of emails that were not delivered due to the recipient email address being on a suppression list. |[optional] +**Requests** | **int32** | The number of emails that were requested to be delivered. |[optional] +**Processed** | **int32** | Requests from your website, application, or mail client via SMTP Relay or the Web API that SendGrid processed. |[optional] +**SpamReports** | **int32** | The number of recipients who marked your email as spam. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/AdvancedStatsOpens.md b/rest/api/v3/stats/docs/AdvancedStatsOpens.md new file mode 100644 index 00000000..ebab3e99 --- /dev/null +++ b/rest/api/v3/stats/docs/AdvancedStatsOpens.md @@ -0,0 +1,12 @@ +# AdvancedStatsOpens + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Opens** | **int32** | The total number of times your emails were opened by recipients. |[optional] +**UniqueOpens** | **int32** | The number of unique recipients who opened your emails. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/AggregatedBy.md b/rest/api/v3/stats/docs/AggregatedBy.md new file mode 100644 index 00000000..96f02c9f --- /dev/null +++ b/rest/api/v3/stats/docs/AggregatedBy.md @@ -0,0 +1,14 @@ +# AggregatedBy + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DAY** | string | (value: `"day"`) +**WEEK** | string | (value: `"week"`) +**MONTH** | string | (value: `"month"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/AggregatedBy1.md b/rest/api/v3/stats/docs/AggregatedBy1.md new file mode 100644 index 00000000..b34f829d --- /dev/null +++ b/rest/api/v3/stats/docs/AggregatedBy1.md @@ -0,0 +1,14 @@ +# AggregatedBy1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DAY** | string | (value: `"day"`) +**WEEK** | string | (value: `"week"`) +**MONTH** | string | (value: `"month"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/AggregatedBy2.md b/rest/api/v3/stats/docs/AggregatedBy2.md new file mode 100644 index 00000000..9bf04eed --- /dev/null +++ b/rest/api/v3/stats/docs/AggregatedBy2.md @@ -0,0 +1,14 @@ +# AggregatedBy2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DAY** | string | (value: `"day"`) +**WEEK** | string | (value: `"week"`) +**MONTH** | string | (value: `"month"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/AggregatedBy3.md b/rest/api/v3/stats/docs/AggregatedBy3.md new file mode 100644 index 00000000..7504b230 --- /dev/null +++ b/rest/api/v3/stats/docs/AggregatedBy3.md @@ -0,0 +1,14 @@ +# AggregatedBy3 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DAY** | string | (value: `"day"`) +**WEEK** | string | (value: `"week"`) +**MONTH** | string | (value: `"month"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/CategoryStats.md b/rest/api/v3/stats/docs/CategoryStats.md new file mode 100644 index 00000000..2b136fe2 --- /dev/null +++ b/rest/api/v3/stats/docs/CategoryStats.md @@ -0,0 +1,12 @@ +# CategoryStats + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | **string** | The date the statistics were gathered. | +**Stats** | [**[]CategoryStatsStatsInner**](CategoryStatsStatsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/CategoryStatsStatsInner.md b/rest/api/v3/stats/docs/CategoryStatsStatsInner.md new file mode 100644 index 00000000..9c188e0c --- /dev/null +++ b/rest/api/v3/stats/docs/CategoryStatsStatsInner.md @@ -0,0 +1,13 @@ +# CategoryStatsStatsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Metrics** | [**CategoryStatsStatsInnerMetrics**](CategoryStatsStatsInnerMetrics.md) | |[optional] +**Name** | **string** | The name of the category. |[optional] +**Type** | **string** | How you are segmenting your statistics. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/CategoryStatsStatsInnerMetrics.md b/rest/api/v3/stats/docs/CategoryStatsStatsInnerMetrics.md new file mode 100644 index 00000000..8129c1f4 --- /dev/null +++ b/rest/api/v3/stats/docs/CategoryStatsStatsInnerMetrics.md @@ -0,0 +1,26 @@ +# CategoryStatsStatsInnerMetrics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Blocks** | **int32** | The number of emails that were not allowed to be delivered by ISPs. | +**BounceDrops** | **int32** | The number of emails that were dropped because of a bounce. | +**Bounces** | **int32** | The number of emails that bounced instead of being delivered. | +**Clicks** | **int32** | The number of links that were clicked. | +**Deferred** | **int32** | The number of emails that temporarily could not be delivered. | +**Delivered** | **int32** | The number of emails SendGrid was able to confirm were actually delivered to a recipient. | +**InvalidEmails** | **int32** | The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. | +**Opens** | **int32** | The total number of times your emails were opened by recipients. | +**Processed** | **int32** | Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. | +**Requests** | **int32** | The number of emails that were requested to be delivered. | +**SpamReportDrops** | **int32** | The number of emails that were dropped due to a recipient previously marking your emails as spam. | +**SpamReports** | **int32** | The number of recipients who marked your email as spam. | +**UniqueClicks** | **int32** | The number of unique recipients who clicked links in your emails. | +**UniqueOpens** | **int32** | The number of unique recipients who opened your emails. | +**UnsubscribeDrops** | **int32** | The number of emails dropped due to a recipient unsubscribing from your emails. | +**Unsubscribes** | **int32** | The number of recipients who unsubscribed from your emails. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ClientType.md b/rest/api/v3/stats/docs/ClientType.md new file mode 100644 index 00000000..8a7f8487 --- /dev/null +++ b/rest/api/v3/stats/docs/ClientType.md @@ -0,0 +1,15 @@ +# ClientType + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**PHONE** | string | (value: `"phone"`) +**TABLET** | string | (value: `"tablet"`) +**WEBMAIL** | string | (value: `"webmail"`) +**DESKTOP** | string | (value: `"desktop"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/Country.md b/rest/api/v3/stats/docs/Country.md new file mode 100644 index 00000000..00c5f179 --- /dev/null +++ b/rest/api/v3/stats/docs/Country.md @@ -0,0 +1,13 @@ +# Country + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**US** | string | (value: `"US"`) +**CA** | string | (value: `"CA"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/GetClientStat.md b/rest/api/v3/stats/docs/GetClientStat.md new file mode 100644 index 00000000..bdd7639d --- /dev/null +++ b/rest/api/v3/stats/docs/GetClientStat.md @@ -0,0 +1,54 @@ +# GetClientStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetClientStat**](GetClientStat.md#GetClientStat) | **Get** /v3/clients/{ClientType}/stats | Retrieve stats by a specific client type. + + + +## GetClientStat + +> []ListClientStat200ResponseInner GetClientStat(ctx, StartDateClientTypeoptional) + +Retrieve stats by a specific client type. + +**This endpoint allows you to retrieve your email statistics segmented by a specific client type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. ### Available Client Types - phone - tablet - webmail - desktop Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ClientType** | [**ClientType**](ClientType.md) | Specifies the type of client to retrieve stats for. Must be either \"phone\", \"tablet\", \"webmail\", or \"desktop\". + +### Other Parameters + +Other parameters are passed through a pointer to a GetClientStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. +**AggregatedBy** | [**AggregatedBy2**](AggregatedBy2AggregatedBy2.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". + +### Return type + +[**[]ListClientStat200ResponseInner**](ListClientStat200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/stats/docs/ListBrowserStat.md b/rest/api/v3/stats/docs/ListBrowserStat.md new file mode 100644 index 00000000..00b5d584 --- /dev/null +++ b/rest/api/v3/stats/docs/ListBrowserStat.md @@ -0,0 +1,53 @@ +# ListBrowserStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListBrowserStat**](ListBrowserStat.md#ListBrowserStat) | **Get** /v3/browsers/stats | Retrieve email statistics by browser. + + + +## ListBrowserStat + +> []ListBrowserStat200ResponseInner ListBrowserStat(ctx, StartDateoptional) + +Retrieve email statistics by browser. + +**This endpoint allows you to retrieve your email statistics segmented by browser type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListBrowserStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Browsers** | **string** | The browsers to get statistics for. You can include up to 10 different browsers by including this parameter multiple times. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**Limit** | **int32** | The number of results to return. +**Offset** | **int32** | The point in the list to begin retrieving results. +**AggregatedBy** | [**AggregatedBy3**](AggregatedBy3AggregatedBy3.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". +**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + +### Return type + +[**[]ListBrowserStat200ResponseInner**](ListBrowserStat200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/stats/docs/ListBrowserStat200ResponseInner.md b/rest/api/v3/stats/docs/ListBrowserStat200ResponseInner.md new file mode 100644 index 00000000..b4f98ab1 --- /dev/null +++ b/rest/api/v3/stats/docs/ListBrowserStat200ResponseInner.md @@ -0,0 +1,12 @@ +# ListBrowserStat200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | **string** | The date that the statistics were gathered. |[optional] +**Stats** | [**[]ListBrowserStat200ResponseInnerStatsInner**](ListBrowserStat200ResponseInnerStatsInner.md) | The list of statistics. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ListBrowserStat200ResponseInnerStatsInner.md b/rest/api/v3/stats/docs/ListBrowserStat200ResponseInnerStatsInner.md new file mode 100644 index 00000000..42ea5d07 --- /dev/null +++ b/rest/api/v3/stats/docs/ListBrowserStat200ResponseInnerStatsInner.md @@ -0,0 +1,13 @@ +# ListBrowserStat200ResponseInnerStatsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | The type of segmentation. |[optional] +**Name** | **string** | The name of the specific segmentation. |[optional] +**Metrics** | [**AdvancedStatsClicks**](AdvancedStatsClicks.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ListCategory.md b/rest/api/v3/stats/docs/ListCategory.md new file mode 100644 index 00000000..02a75cbb --- /dev/null +++ b/rest/api/v3/stats/docs/ListCategory.md @@ -0,0 +1,51 @@ +# ListCategory + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListCategory**](ListCategory.md#ListCategory) | **Get** /v3/categories | Retrieve all categories + + + +## ListCategory + +> []ListCategory200ResponseInner ListCategory(ctx, optional) + +Retrieve all categories + +**This endpoint allows you to retrieve a paginated list of all of your categories.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListCategoryParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. +**Category** | **string** | Allows you to perform a prefix search on this particular category. +**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**[]ListCategory200ResponseInner**](ListCategory200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/stats/docs/ListCategory200ResponseInner.md b/rest/api/v3/stats/docs/ListCategory200ResponseInner.md new file mode 100644 index 00000000..528bed33 --- /dev/null +++ b/rest/api/v3/stats/docs/ListCategory200ResponseInner.md @@ -0,0 +1,11 @@ +# ListCategory200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Category** | **string** | A category used to group emails by broad topic. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ListCategory400Response.md b/rest/api/v3/stats/docs/ListCategory400Response.md new file mode 100644 index 00000000..1163a96f --- /dev/null +++ b/rest/api/v3/stats/docs/ListCategory400Response.md @@ -0,0 +1,11 @@ +# ListCategory400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ListCategory400ResponseErrorsInner**](ListCategory400ResponseErrorsInner.md) | The error returned. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ListCategory400ResponseErrorsInner.md b/rest/api/v3/stats/docs/ListCategory400ResponseErrorsInner.md new file mode 100644 index 00000000..413c97ee --- /dev/null +++ b/rest/api/v3/stats/docs/ListCategory400ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# ListCategory400ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | | +**Message** | **string** | A message explaining why your categories could not be retrieved. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ListCategoryStat.md b/rest/api/v3/stats/docs/ListCategoryStat.md new file mode 100644 index 00000000..715c2215 --- /dev/null +++ b/rest/api/v3/stats/docs/ListCategoryStat.md @@ -0,0 +1,50 @@ +# ListCategoryStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListCategoryStat**](ListCategoryStat.md#ListCategoryStat) | **Get** /v3/categories/stats | Retrieve Email Statistics for Categories + + + +## ListCategoryStat + +> []CategoryStats ListCategoryStat(ctx, StartDateCategoriesoptional) + +Retrieve Email Statistics for Categories + +**This endpoint allows you to retrieve all of your email statistics for each of your categories.** If you do not define any query parameters, this endpoint will return a sum for each category in groups of 10. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListCategoryStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. +**AggregatedBy** | [**AggregatedBy**](AggregatedByAggregatedBy.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**[]CategoryStats**](CategoryStats.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/stats/docs/ListCategoryStatSum.md b/rest/api/v3/stats/docs/ListCategoryStatSum.md new file mode 100644 index 00000000..18067fc6 --- /dev/null +++ b/rest/api/v3/stats/docs/ListCategoryStatSum.md @@ -0,0 +1,54 @@ +# ListCategoryStatSum + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListCategoryStatSum**](ListCategoryStatSum.md#ListCategoryStatSum) | **Get** /v3/categories/stats/sums | Retrieve sums of email stats for each category. + + + +## ListCategoryStatSum + +> CategoryStats ListCategoryStatSum(ctx, StartDateoptional) + +Retrieve sums of email stats for each category. + +**This endpoint allows you to retrieve the total sum of each email statistic for every category over the given date range.** If you do not define any query parameters, this endpoint will return a sum for each category in groups of 10. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListCategoryStatSumParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**SortByMetric** | **string** | The metric that you want to sort by. Must be a single metric. +**SortByDirection** | [**SortByDirection**](SortByDirectionSortByDirection.md) | The direction you want to sort. +**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. +**Limit** | **int32** | Limits the number of results returned. +**Offset** | **int32** | The point in the list to begin retrieving results. +**AggregatedBy** | [**AggregatedBy1**](AggregatedBy1AggregatedBy1.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**CategoryStats**](CategoryStats.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/stats/docs/ListClientStat.md b/rest/api/v3/stats/docs/ListClientStat.md new file mode 100644 index 00000000..12cd3294 --- /dev/null +++ b/rest/api/v3/stats/docs/ListClientStat.md @@ -0,0 +1,50 @@ +# ListClientStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListClientStat**](ListClientStat.md#ListClientStat) | **Get** /v3/clients/stats | Retrieve email statistics by client type. + + + +## ListClientStat + +> []ListClientStat200ResponseInner ListClientStat(ctx, StartDateoptional) + +Retrieve email statistics by client type. + +**This endpoint allows you to retrieve your email statistics segmented by client type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListClientStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. +**AggregatedBy** | [**AggregatedBy2**](AggregatedBy2AggregatedBy2.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". + +### Return type + +[**[]ListClientStat200ResponseInner**](ListClientStat200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/stats/docs/ListClientStat200ResponseInner.md b/rest/api/v3/stats/docs/ListClientStat200ResponseInner.md new file mode 100644 index 00000000..dfc7e624 --- /dev/null +++ b/rest/api/v3/stats/docs/ListClientStat200ResponseInner.md @@ -0,0 +1,12 @@ +# ListClientStat200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | **string** | The date that the statistics were gathered. |[optional] +**Stats** | [**[]ListClientStat200ResponseInnerStatsInner**](ListClientStat200ResponseInnerStatsInner.md) | The list of statistics. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ListClientStat200ResponseInnerStatsInner.md b/rest/api/v3/stats/docs/ListClientStat200ResponseInnerStatsInner.md new file mode 100644 index 00000000..c065ab77 --- /dev/null +++ b/rest/api/v3/stats/docs/ListClientStat200ResponseInnerStatsInner.md @@ -0,0 +1,13 @@ +# ListClientStat200ResponseInnerStatsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | The type of segmentation. |[optional] +**Name** | **string** | The name of the specific segmentation. |[optional] +**Metrics** | [**AdvancedStatsOpens**](AdvancedStatsOpens.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ListDeviceStat.md b/rest/api/v3/stats/docs/ListDeviceStat.md new file mode 100644 index 00000000..e3f910f4 --- /dev/null +++ b/rest/api/v3/stats/docs/ListDeviceStat.md @@ -0,0 +1,52 @@ +# ListDeviceStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListDeviceStat**](ListDeviceStat.md#ListDeviceStat) | **Get** /v3/devices/stats | Retrieve email statistics by device type. + + + +## ListDeviceStat + +> []ListClientStat200ResponseInner ListDeviceStat(ctx, StartDateoptional) + +Retrieve email statistics by device type. + +**This endpoint allows you to retrieve your email statistics segmented by the device type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. ## Available Device Types | **Device** | **Description** | **Example** | |---|---|---| | Desktop | Email software on desktop computer. | I.E., Outlook, Sparrow, or Apple Mail. | | Webmail | A web-based email client. | I.E., Yahoo, Google, AOL, or Outlook.com. | | Phone | A smart phone. | iPhone, Android, Blackberry, etc. | Tablet | A tablet computer. | iPad, android based tablet, etc. | | Other | An unrecognized device. | Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListDeviceStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**Limit** | **int32** | The number of results to return. +**Offset** | **int32** | The point in the list to begin retrieving results. +**AggregatedBy** | [**AggregatedBy3**](AggregatedBy3AggregatedBy3.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". +**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + +### Return type + +[**[]ListClientStat200ResponseInner**](ListClientStat200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/stats/docs/ListGeoStat.md b/rest/api/v3/stats/docs/ListGeoStat.md new file mode 100644 index 00000000..3c66f64e --- /dev/null +++ b/rest/api/v3/stats/docs/ListGeoStat.md @@ -0,0 +1,53 @@ +# ListGeoStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListGeoStat**](ListGeoStat.md#ListGeoStat) | **Get** /v3/geo/stats | Retrieve email statistics by country and state/province. + + + +## ListGeoStat + +> []ListGeoStat200ResponseInner ListGeoStat(ctx, StartDateoptional) + +Retrieve email statistics by country and state/province. + +**This endpoint allows you to retrieve your email statistics segmented by country and state/province.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [User Guide](https://wwww.twilio.com/docs/sendgrid/ui/analytics-and-reporting/stats-overview). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListGeoStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Country** | [**Country**](CountryCountry.md) | The country you would like to see statistics for. Currently only supported for US and CA. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**Limit** | **int32** | The number of results to return. +**Offset** | **int32** | The point in the list to begin retrieving results. +**AggregatedBy** | [**AggregatedBy3**](AggregatedBy3AggregatedBy3.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". +**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + +### Return type + +[**[]ListGeoStat200ResponseInner**](ListGeoStat200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/stats/docs/ListGeoStat200ResponseInner.md b/rest/api/v3/stats/docs/ListGeoStat200ResponseInner.md new file mode 100644 index 00000000..b8b712fe --- /dev/null +++ b/rest/api/v3/stats/docs/ListGeoStat200ResponseInner.md @@ -0,0 +1,12 @@ +# ListGeoStat200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | **string** | The date that the statistics were gathered. |[optional] +**Stats** | [**[]ListGeoStat200ResponseInnerStatsInner**](ListGeoStat200ResponseInnerStatsInner.md) | The list of statistics. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ListGeoStat200ResponseInnerStatsInner.md b/rest/api/v3/stats/docs/ListGeoStat200ResponseInnerStatsInner.md new file mode 100644 index 00000000..059cb893 --- /dev/null +++ b/rest/api/v3/stats/docs/ListGeoStat200ResponseInnerStatsInner.md @@ -0,0 +1,13 @@ +# ListGeoStat200ResponseInnerStatsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | The type of segmentation. |[optional] +**Name** | **string** | The name of the specific segmentation. |[optional] +**Metrics** | [**AdvancedStatsClicksOpens**](AdvancedStatsClicksOpens.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ListMailboxProviderStat.md b/rest/api/v3/stats/docs/ListMailboxProviderStat.md new file mode 100644 index 00000000..6500d3a7 --- /dev/null +++ b/rest/api/v3/stats/docs/ListMailboxProviderStat.md @@ -0,0 +1,53 @@ +# ListMailboxProviderStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListMailboxProviderStat**](ListMailboxProviderStat.md#ListMailboxProviderStat) | **Get** /v3/mailbox_providers/stats | Retrieve email statistics by mailbox provider. + + + +## ListMailboxProviderStat + +> []ListMailboxProviderStat200ResponseInner ListMailboxProviderStat(ctx, StartDateoptional) + +Retrieve email statistics by mailbox provider. + +**This endpoint allows you to retrieve your email statistics segmented by recipient mailbox provider.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListMailboxProviderStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**MailboxProviders** | **string** | The mail box providers to get statistics for. You can include up to 10 by including this parameter multiple times. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**Limit** | **int32** | The number of results to return. +**Offset** | **int32** | The point in the list to begin retrieving results. +**AggregatedBy** | [**AggregatedBy3**](AggregatedBy3AggregatedBy3.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". +**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + +### Return type + +[**[]ListMailboxProviderStat200ResponseInner**](ListMailboxProviderStat200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInner.md b/rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInner.md new file mode 100644 index 00000000..0e9cf740 --- /dev/null +++ b/rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInner.md @@ -0,0 +1,12 @@ +# ListMailboxProviderStat200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | **string** | The date that the statistics were gathered. |[optional] +**Stats** | [**[]ListMailboxProviderStat200ResponseInnerStatsInner**](ListMailboxProviderStat200ResponseInnerStatsInner.md) | The list of statistics. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInnerStatsInner.md b/rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInnerStatsInner.md new file mode 100644 index 00000000..73748c49 --- /dev/null +++ b/rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInnerStatsInner.md @@ -0,0 +1,13 @@ +# ListMailboxProviderStat200ResponseInnerStatsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | The type of segmentation. |[optional] +**Name** | **string** | The name of the specific segmentation. |[optional] +**Metrics** | [**AdvancedStatsMailboxProvider**](AdvancedStatsMailboxProvider.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ListStat.md b/rest/api/v3/stats/docs/ListStat.md new file mode 100644 index 00000000..b0afdd99 --- /dev/null +++ b/rest/api/v3/stats/docs/ListStat.md @@ -0,0 +1,52 @@ +# ListStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListStat**](ListStat.md#ListStat) | **Get** /v3/stats | Retrieve global email statistics + + + +## ListStat + +> []ListStat200ResponseInner ListStat(ctx, StartDateoptional) + +Retrieve global email statistics + +**This endpoint allows you to retrieve all of your global email statistics between a given date range.** Parent accounts can see either aggregated stats for the parent account or aggregated stats for a subuser specified in the `on-behalf-of` header. Subuser accounts will see only their own stats. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**Limit** | **int32** | The number of results to return. +**Offset** | **int32** | The point in the list to begin retrieving results. +**AggregatedBy** | [**AggregatedBy3**](AggregatedBy3AggregatedBy3.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". +**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + +### Return type + +[**[]ListStat200ResponseInner**](ListStat200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/stats/docs/ListStat200ResponseInner.md b/rest/api/v3/stats/docs/ListStat200ResponseInner.md new file mode 100644 index 00000000..e510d3d0 --- /dev/null +++ b/rest/api/v3/stats/docs/ListStat200ResponseInner.md @@ -0,0 +1,12 @@ +# ListStat200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | **string** | The date the stats were gathered. | +**Stats** | [**[]ListStat200ResponseInnerStatsInner**](ListStat200ResponseInnerStatsInner.md) | The individual email activity stats. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ListStat200ResponseInnerStatsInner.md b/rest/api/v3/stats/docs/ListStat200ResponseInnerStatsInner.md new file mode 100644 index 00000000..7cfd11e2 --- /dev/null +++ b/rest/api/v3/stats/docs/ListStat200ResponseInnerStatsInner.md @@ -0,0 +1,11 @@ +# ListStat200ResponseInnerStatsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Metrics** | [**StatsAdvancedGlobalStats**](StatsAdvancedGlobalStats.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/SortByDirection.md b/rest/api/v3/stats/docs/SortByDirection.md new file mode 100644 index 00000000..0431e9a0 --- /dev/null +++ b/rest/api/v3/stats/docs/SortByDirection.md @@ -0,0 +1,13 @@ +# SortByDirection + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DESC** | string | (value: `"desc"`) +**ASC** | string | (value: `"asc"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/StatsAdvancedGlobalStats.md b/rest/api/v3/stats/docs/StatsAdvancedGlobalStats.md new file mode 100644 index 00000000..cf8ff1d7 --- /dev/null +++ b/rest/api/v3/stats/docs/StatsAdvancedGlobalStats.md @@ -0,0 +1,26 @@ +# StatsAdvancedGlobalStats + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Clicks** | **int32** | The number of links that were clicked in your emails. |[optional] +**UniqueClicks** | **int32** | The number of unique recipients who clicked links in your emails. |[optional] +**Opens** | **int32** | The total number of times your emails were opened by recipients. |[optional] +**UniqueOpens** | **int32** | The number of unique recipients who opened your emails. |[optional] +**Blocks** | **int32** | The number of emails that were not allowed to be delivered by ISPs. |[optional] +**BounceDrops** | **int32** | The number of emails that were dropped because of a bounce. |[optional] +**Bounces** | **int32** | The number of emails that bounced instead of being delivered. |[optional] +**Deferred** | **int32** | The number of emails that temporarily could not be delivered. |[optional] +**Delivered** | **int32** | The number of emails SendGrid was able to confirm were actually delivered to a recipient. |[optional] +**InvalidEmails** | **int32** | The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. |[optional] +**Processed** | **int32** | Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. |[optional] +**Requests** | **int32** | The number of emails that were requested to be delivered. |[optional] +**SpamReportDrops** | **int32** | The number of emails that were dropped due to a recipient previously marking your emails as spam. |[optional] +**SpamReports** | **int32** | The number of recipients who marked your email as spam. |[optional] +**UnsubscribeDrops** | **int32** | The number of emails dropped due to a recipient unsubscribing from your emails. |[optional] +**Unsubscribes** | **int32** | The number of recipients who unsubscribed from your emails. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/model_advanced_stats_clicks.go b/rest/api/v3/stats/model_advanced_stats_clicks.go new file mode 100644 index 00000000..e26aca54 --- /dev/null +++ b/rest/api/v3/stats/model_advanced_stats_clicks.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AdvancedStatsClicks The individual events and their stats. +type AdvancedStatsClicks struct { + // The number of links that were clicked in your emails. + Clicks *int32 `json:"clicks,omitempty"` + // The number of unique recipients who clicked links in your emails. + UniqueClicks *int32 `json:"unique_clicks,omitempty"` +} diff --git a/rest/api/v3/stats/model_advanced_stats_clicks_opens.go b/rest/api/v3/stats/model_advanced_stats_clicks_opens.go new file mode 100644 index 00000000..a8a339f8 --- /dev/null +++ b/rest/api/v3/stats/model_advanced_stats_clicks_opens.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AdvancedStatsClicksOpens The individual events and their stats. +type AdvancedStatsClicksOpens struct { + // The number of links that were clicked in your emails. + Clicks *int32 `json:"clicks,omitempty"` + // The number of unique recipients who clicked links in your emails. + UniqueClicks *int32 `json:"unique_clicks,omitempty"` + // The total number of times your emails were opened by recipients. + Opens *int32 `json:"opens,omitempty"` + // The number of unique recipients who opened your emails. + UniqueOpens *int32 `json:"unique_opens,omitempty"` +} diff --git a/rest/api/v3/stats/model_advanced_stats_mailbox_provider.go b/rest/api/v3/stats/model_advanced_stats_mailbox_provider.go new file mode 100644 index 00000000..ee75f598 --- /dev/null +++ b/rest/api/v3/stats/model_advanced_stats_mailbox_provider.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AdvancedStatsMailboxProvider The individual events and their stats. +type AdvancedStatsMailboxProvider struct { + // The number of emails that were not allowed to be delivered by ISPs. + Blocks *int32 `json:"blocks,omitempty"` + // The number of emails that bounced instead of being delivered. + Bounces *int32 `json:"bounces,omitempty"` + // The number of emails that temporarily could not be delivered. + Deferred *int32 `json:"deferred,omitempty"` + // The number of emails SendGrid was able to confirm were actually delivered to a recipient. + Delivered *int32 `json:"delivered,omitempty"` + // The number of emails that were not delivered due to the recipient email address being on a suppression list. + Drops *int32 `json:"drops,omitempty"` + // The number of emails that were requested to be delivered. + Requests *int32 `json:"requests,omitempty"` + // Requests from your website, application, or mail client via SMTP Relay or the Web API that SendGrid processed. + Processed *int32 `json:"processed,omitempty"` + // The number of recipients who marked your email as spam. + SpamReports *int32 `json:"spam_reports,omitempty"` +} diff --git a/rest/api/v3/stats/model_advanced_stats_opens.go b/rest/api/v3/stats/model_advanced_stats_opens.go new file mode 100644 index 00000000..8af689e0 --- /dev/null +++ b/rest/api/v3/stats/model_advanced_stats_opens.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AdvancedStatsOpens The individual events and their stats. +type AdvancedStatsOpens struct { + // The total number of times your emails were opened by recipients. + Opens *int32 `json:"opens,omitempty"` + // The number of unique recipients who opened your emails. + UniqueOpens *int32 `json:"unique_opens,omitempty"` +} diff --git a/rest/api/v3/stats/model_aggregated_by.go b/rest/api/v3/stats/model_aggregated_by.go new file mode 100644 index 00000000..7030e628 --- /dev/null +++ b/rest/api/v3/stats/model_aggregated_by.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AggregatedBy the model 'AggregatedBy' +type AggregatedBy string + +// List of AggregatedBy +const ( + AGGREGATEDBY_DAY AggregatedBy = "day" + AGGREGATEDBY_WEEK AggregatedBy = "week" + AGGREGATEDBY_MONTH AggregatedBy = "month" +) diff --git a/rest/api/v3/stats/model_aggregated_by1.go b/rest/api/v3/stats/model_aggregated_by1.go new file mode 100644 index 00000000..1d03db31 --- /dev/null +++ b/rest/api/v3/stats/model_aggregated_by1.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AggregatedBy1 the model 'AggregatedBy1' +type AggregatedBy1 string + +// List of AggregatedBy1 +const ( + AGGREGATEDBY1_DAY AggregatedBy1 = "day" + AGGREGATEDBY1_WEEK AggregatedBy1 = "week" + AGGREGATEDBY1_MONTH AggregatedBy1 = "month" +) diff --git a/rest/api/v3/stats/model_aggregated_by2.go b/rest/api/v3/stats/model_aggregated_by2.go new file mode 100644 index 00000000..d9a0ac73 --- /dev/null +++ b/rest/api/v3/stats/model_aggregated_by2.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AggregatedBy2 the model 'AggregatedBy2' +type AggregatedBy2 string + +// List of AggregatedBy2 +const ( + AGGREGATEDBY2_DAY AggregatedBy2 = "day" + AGGREGATEDBY2_WEEK AggregatedBy2 = "week" + AGGREGATEDBY2_MONTH AggregatedBy2 = "month" +) diff --git a/rest/api/v3/stats/model_aggregated_by3.go b/rest/api/v3/stats/model_aggregated_by3.go new file mode 100644 index 00000000..f5d4b9e4 --- /dev/null +++ b/rest/api/v3/stats/model_aggregated_by3.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AggregatedBy3 the model 'AggregatedBy3' +type AggregatedBy3 string + +// List of AggregatedBy3 +const ( + AGGREGATEDBY3_DAY AggregatedBy3 = "day" + AGGREGATEDBY3_WEEK AggregatedBy3 = "week" + AGGREGATEDBY3_MONTH AggregatedBy3 = "month" +) diff --git a/rest/api/v3/stats/model_category_stats.go b/rest/api/v3/stats/model_category_stats.go new file mode 100644 index 00000000..67f280ca --- /dev/null +++ b/rest/api/v3/stats/model_category_stats.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CategoryStats struct for CategoryStats +type CategoryStats struct { + // The date the statistics were gathered. + Date string `json:"date"` + Stats *[]CategoryStatsStatsInner `json:"stats,omitempty"` +} diff --git a/rest/api/v3/stats/model_category_stats_stats_inner.go b/rest/api/v3/stats/model_category_stats_stats_inner.go new file mode 100644 index 00000000..9484fa58 --- /dev/null +++ b/rest/api/v3/stats/model_category_stats_stats_inner.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CategoryStatsStatsInner struct for CategoryStatsStatsInner +type CategoryStatsStatsInner struct { + Metrics *CategoryStatsStatsInnerMetrics `json:"metrics,omitempty"` + // The name of the category. + Name *string `json:"name,omitempty"` + // How you are segmenting your statistics. + Type string `json:"type"` +} diff --git a/rest/api/v3/stats/model_category_stats_stats_inner_metrics.go b/rest/api/v3/stats/model_category_stats_stats_inner_metrics.go new file mode 100644 index 00000000..99765698 --- /dev/null +++ b/rest/api/v3/stats/model_category_stats_stats_inner_metrics.go @@ -0,0 +1,50 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CategoryStatsStatsInnerMetrics struct for CategoryStatsStatsInnerMetrics +type CategoryStatsStatsInnerMetrics struct { + // The number of emails that were not allowed to be delivered by ISPs. + Blocks int32 `json:"blocks"` + // The number of emails that were dropped because of a bounce. + BounceDrops int32 `json:"bounce_drops"` + // The number of emails that bounced instead of being delivered. + Bounces int32 `json:"bounces"` + // The number of links that were clicked. + Clicks int32 `json:"clicks"` + // The number of emails that temporarily could not be delivered. + Deferred int32 `json:"deferred"` + // The number of emails SendGrid was able to confirm were actually delivered to a recipient. + Delivered int32 `json:"delivered"` + // The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. + InvalidEmails int32 `json:"invalid_emails"` + // The total number of times your emails were opened by recipients. + Opens int32 `json:"opens"` + // Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. + Processed int32 `json:"processed"` + // The number of emails that were requested to be delivered. + Requests int32 `json:"requests"` + // The number of emails that were dropped due to a recipient previously marking your emails as spam. + SpamReportDrops int32 `json:"spam_report_drops"` + // The number of recipients who marked your email as spam. + SpamReports int32 `json:"spam_reports"` + // The number of unique recipients who clicked links in your emails. + UniqueClicks int32 `json:"unique_clicks"` + // The number of unique recipients who opened your emails. + UniqueOpens int32 `json:"unique_opens"` + // The number of emails dropped due to a recipient unsubscribing from your emails. + UnsubscribeDrops int32 `json:"unsubscribe_drops"` + // The number of recipients who unsubscribed from your emails. + Unsubscribes int32 `json:"unsubscribes"` +} diff --git a/rest/api/v3/stats/model_client_type.go b/rest/api/v3/stats/model_client_type.go new file mode 100644 index 00000000..3c36ab04 --- /dev/null +++ b/rest/api/v3/stats/model_client_type.go @@ -0,0 +1,25 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ClientType the model 'ClientType' +type ClientType string + +// List of ClientType +const ( + CLIENTTYPE_PHONE ClientType = "phone" + CLIENTTYPE_TABLET ClientType = "tablet" + CLIENTTYPE_WEBMAIL ClientType = "webmail" + CLIENTTYPE_DESKTOP ClientType = "desktop" +) diff --git a/rest/api/v3/stats/model_country.go b/rest/api/v3/stats/model_country.go new file mode 100644 index 00000000..867da48a --- /dev/null +++ b/rest/api/v3/stats/model_country.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Country the model 'Country' +type Country string + +// List of Country +const ( + COUNTRY_US Country = "US" + COUNTRY_CA Country = "CA" +) diff --git a/rest/api/v3/stats/model_list_browser_stat_200_response_inner.go b/rest/api/v3/stats/model_list_browser_stat_200_response_inner.go new file mode 100644 index 00000000..6abdbd78 --- /dev/null +++ b/rest/api/v3/stats/model_list_browser_stat_200_response_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListBrowserStat200ResponseInner struct for ListBrowserStat200ResponseInner +type ListBrowserStat200ResponseInner struct { + // The date that the statistics were gathered. + Date *string `json:"date,omitempty"` + // The list of statistics. + Stats *[]ListBrowserStat200ResponseInnerStatsInner `json:"stats,omitempty"` +} diff --git a/rest/api/v3/stats/model_list_browser_stat_200_response_inner_stats_inner.go b/rest/api/v3/stats/model_list_browser_stat_200_response_inner_stats_inner.go new file mode 100644 index 00000000..b33842eb --- /dev/null +++ b/rest/api/v3/stats/model_list_browser_stat_200_response_inner_stats_inner.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListBrowserStat200ResponseInnerStatsInner struct for ListBrowserStat200ResponseInnerStatsInner +type ListBrowserStat200ResponseInnerStatsInner struct { + // The type of segmentation. + Type *string `json:"type,omitempty"` + // The name of the specific segmentation. + Name *string `json:"name,omitempty"` + Metrics *AdvancedStatsClicks `json:"metrics,omitempty"` +} diff --git a/rest/api/v3/stats/model_list_category_200_response_inner.go b/rest/api/v3/stats/model_list_category_200_response_inner.go new file mode 100644 index 00000000..8b6aa73d --- /dev/null +++ b/rest/api/v3/stats/model_list_category_200_response_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListCategory200ResponseInner struct for ListCategory200ResponseInner +type ListCategory200ResponseInner struct { + // A category used to group emails by broad topic. + Category string `json:"category"` +} diff --git a/rest/api/v3/stats/model_list_category_400_response.go b/rest/api/v3/stats/model_list_category_400_response.go new file mode 100644 index 00000000..1ddd6eb7 --- /dev/null +++ b/rest/api/v3/stats/model_list_category_400_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListCategory400Response struct for ListCategory400Response +type ListCategory400Response struct { + // The error returned. + Errors *[]ListCategory400ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/stats/model_list_category_400_response_errors_inner.go b/rest/api/v3/stats/model_list_category_400_response_errors_inner.go new file mode 100644 index 00000000..33dbbfe5 --- /dev/null +++ b/rest/api/v3/stats/model_list_category_400_response_errors_inner.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListCategory400ResponseErrorsInner struct for ListCategory400ResponseErrorsInner +type ListCategory400ResponseErrorsInner struct { + Field string `json:"field"` + // A message explaining why your categories could not be retrieved. + Message string `json:"message"` +} diff --git a/rest/api/v3/stats/model_list_client_stat_200_response_inner.go b/rest/api/v3/stats/model_list_client_stat_200_response_inner.go new file mode 100644 index 00000000..f7f802fd --- /dev/null +++ b/rest/api/v3/stats/model_list_client_stat_200_response_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListClientStat200ResponseInner struct for ListClientStat200ResponseInner +type ListClientStat200ResponseInner struct { + // The date that the statistics were gathered. + Date *string `json:"date,omitempty"` + // The list of statistics. + Stats *[]ListClientStat200ResponseInnerStatsInner `json:"stats,omitempty"` +} diff --git a/rest/api/v3/stats/model_list_client_stat_200_response_inner_stats_inner.go b/rest/api/v3/stats/model_list_client_stat_200_response_inner_stats_inner.go new file mode 100644 index 00000000..fc6e6ec6 --- /dev/null +++ b/rest/api/v3/stats/model_list_client_stat_200_response_inner_stats_inner.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListClientStat200ResponseInnerStatsInner struct for ListClientStat200ResponseInnerStatsInner +type ListClientStat200ResponseInnerStatsInner struct { + // The type of segmentation. + Type *string `json:"type,omitempty"` + // The name of the specific segmentation. + Name *string `json:"name,omitempty"` + Metrics *AdvancedStatsOpens `json:"metrics,omitempty"` +} diff --git a/rest/api/v3/stats/model_list_geo_stat_200_response_inner.go b/rest/api/v3/stats/model_list_geo_stat_200_response_inner.go new file mode 100644 index 00000000..2c097da9 --- /dev/null +++ b/rest/api/v3/stats/model_list_geo_stat_200_response_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListGeoStat200ResponseInner struct for ListGeoStat200ResponseInner +type ListGeoStat200ResponseInner struct { + // The date that the statistics were gathered. + Date *string `json:"date,omitempty"` + // The list of statistics. + Stats *[]ListGeoStat200ResponseInnerStatsInner `json:"stats,omitempty"` +} diff --git a/rest/api/v3/stats/model_list_geo_stat_200_response_inner_stats_inner.go b/rest/api/v3/stats/model_list_geo_stat_200_response_inner_stats_inner.go new file mode 100644 index 00000000..0b755f7e --- /dev/null +++ b/rest/api/v3/stats/model_list_geo_stat_200_response_inner_stats_inner.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListGeoStat200ResponseInnerStatsInner struct for ListGeoStat200ResponseInnerStatsInner +type ListGeoStat200ResponseInnerStatsInner struct { + // The type of segmentation. + Type *string `json:"type,omitempty"` + // The name of the specific segmentation. + Name *string `json:"name,omitempty"` + Metrics *AdvancedStatsClicksOpens `json:"metrics,omitempty"` +} diff --git a/rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner.go b/rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner.go new file mode 100644 index 00000000..94550611 --- /dev/null +++ b/rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListMailboxProviderStat200ResponseInner struct for ListMailboxProviderStat200ResponseInner +type ListMailboxProviderStat200ResponseInner struct { + // The date that the statistics were gathered. + Date *string `json:"date,omitempty"` + // The list of statistics. + Stats *[]ListMailboxProviderStat200ResponseInnerStatsInner `json:"stats,omitempty"` +} diff --git a/rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner_stats_inner.go b/rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner_stats_inner.go new file mode 100644 index 00000000..049a1771 --- /dev/null +++ b/rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner_stats_inner.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListMailboxProviderStat200ResponseInnerStatsInner struct for ListMailboxProviderStat200ResponseInnerStatsInner +type ListMailboxProviderStat200ResponseInnerStatsInner struct { + // The type of segmentation. + Type *string `json:"type,omitempty"` + // The name of the specific segmentation. + Name *string `json:"name,omitempty"` + Metrics *AdvancedStatsMailboxProvider `json:"metrics,omitempty"` +} diff --git a/rest/api/v3/stats/model_list_stat_200_response_inner.go b/rest/api/v3/stats/model_list_stat_200_response_inner.go new file mode 100644 index 00000000..ff32341b --- /dev/null +++ b/rest/api/v3/stats/model_list_stat_200_response_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListStat200ResponseInner struct for ListStat200ResponseInner +type ListStat200ResponseInner struct { + // The date the stats were gathered. + Date string `json:"date"` + // The individual email activity stats. + Stats []ListStat200ResponseInnerStatsInner `json:"stats"` +} diff --git a/rest/api/v3/stats/model_list_stat_200_response_inner_stats_inner.go b/rest/api/v3/stats/model_list_stat_200_response_inner_stats_inner.go new file mode 100644 index 00000000..5ff7e17f --- /dev/null +++ b/rest/api/v3/stats/model_list_stat_200_response_inner_stats_inner.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListStat200ResponseInnerStatsInner struct for ListStat200ResponseInnerStatsInner +type ListStat200ResponseInnerStatsInner struct { + Metrics *StatsAdvancedGlobalStats `json:"metrics,omitempty"` +} diff --git a/rest/api/v3/stats/model_sort_by_direction.go b/rest/api/v3/stats/model_sort_by_direction.go new file mode 100644 index 00000000..83900dd5 --- /dev/null +++ b/rest/api/v3/stats/model_sort_by_direction.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SortByDirection the model 'SortByDirection' +type SortByDirection string + +// List of SortByDirection +const ( + SORTBYDIRECTION_DESC SortByDirection = "desc" + SORTBYDIRECTION_ASC SortByDirection = "asc" +) diff --git a/rest/api/v3/stats/model_stats_advanced_global_stats.go b/rest/api/v3/stats/model_stats_advanced_global_stats.go new file mode 100644 index 00000000..1a7151de --- /dev/null +++ b/rest/api/v3/stats/model_stats_advanced_global_stats.go @@ -0,0 +1,50 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// StatsAdvancedGlobalStats struct for StatsAdvancedGlobalStats +type StatsAdvancedGlobalStats struct { + // The number of links that were clicked in your emails. + Clicks *int32 `json:"clicks,omitempty"` + // The number of unique recipients who clicked links in your emails. + UniqueClicks *int32 `json:"unique_clicks,omitempty"` + // The total number of times your emails were opened by recipients. + Opens *int32 `json:"opens,omitempty"` + // The number of unique recipients who opened your emails. + UniqueOpens *int32 `json:"unique_opens,omitempty"` + // The number of emails that were not allowed to be delivered by ISPs. + Blocks *int32 `json:"blocks,omitempty"` + // The number of emails that were dropped because of a bounce. + BounceDrops *int32 `json:"bounce_drops,omitempty"` + // The number of emails that bounced instead of being delivered. + Bounces *int32 `json:"bounces,omitempty"` + // The number of emails that temporarily could not be delivered. + Deferred *int32 `json:"deferred,omitempty"` + // The number of emails SendGrid was able to confirm were actually delivered to a recipient. + Delivered *int32 `json:"delivered,omitempty"` + // The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. + InvalidEmails *int32 `json:"invalid_emails,omitempty"` + // Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. + Processed *int32 `json:"processed,omitempty"` + // The number of emails that were requested to be delivered. + Requests *int32 `json:"requests,omitempty"` + // The number of emails that were dropped due to a recipient previously marking your emails as spam. + SpamReportDrops *int32 `json:"spam_report_drops,omitempty"` + // The number of recipients who marked your email as spam. + SpamReports *int32 `json:"spam_reports,omitempty"` + // The number of emails dropped due to a recipient unsubscribing from your emails. + UnsubscribeDrops *int32 `json:"unsubscribe_drops,omitempty"` + // The number of recipients who unsubscribed from your emails. + Unsubscribes *int32 `json:"unsubscribes,omitempty"` +} diff --git a/rest/api/v3/subusers/.openapi-generator b/rest/api/v3/subusers/.openapi-generator new file mode 100644 index 00000000..da3cd51b --- /dev/null +++ b/rest/api/v3/subusers/.openapi-generator @@ -0,0 +1,95 @@ +.openapi-generator +README.md +api_create_subuser.go +api_delete_subuser.go +api_get_subuser_credit.go +api_list_monthly_stat.go +api_list_reputation.go +api_list_stat.go +api_list_stat_sum.go +api_list_subuser.go +api_list_subuser_monthly_stat.go +api_service.go +api_update_subuser.go +api_update_subuser_credit.go +api_update_subuser_ip.go +api_update_subuser_remaining_credit.go +api_update_subuser_website_access.go +docs/AggregatedBy.md +docs/CategoryStats.md +docs/CategoryStatsStatsInner.md +docs/CategoryStatsStatsInnerMetrics.md +docs/CreateSubuser.md +docs/CreateSubuserRequest.md +docs/DeleteSubuser.md +docs/ErrorResponse.md +docs/ErrorResponseErrorsInner.md +docs/GetSubuserCredit.md +docs/ListMonthlyStat.md +docs/ListReputation.md +docs/ListReputation200ResponseInner.md +docs/ListStat.md +docs/ListStatSum.md +docs/ListSubuser.md +docs/ListSubuserMonthlyStat.md +docs/Region.md +docs/Region1.md +docs/Region2.md +docs/Region3.md +docs/ResetFrequency.md +docs/ResetFrequency1.md +docs/SortByDirection.md +docs/SortByDirection1.md +docs/SortByDirection2.md +docs/SortByMetric.md +docs/Subuser.md +docs/SubuserCredits.md +docs/SubuserCreditsRequest.md +docs/SubuserPost.md +docs/SubuserPostCreditAllocation.md +docs/SubuserStats.md +docs/SubuserStatsStatsInner.md +docs/SubuserStatsStatsInnerMetrics.md +docs/Type.md +docs/Type1.md +docs/UpdateSubuser.md +docs/UpdateSubuserCredit.md +docs/UpdateSubuserIp.md +docs/UpdateSubuserIp200Response.md +docs/UpdateSubuserRemainingCredit.md +docs/UpdateSubuserRemainingCreditRequest.md +docs/UpdateSubuserRequest.md +docs/UpdateSubuserWebsiteAccess.md +docs/UpdateSubuserWebsiteAccessRequest.md +model_aggregated_by.go +model_category_stats.go +model_category_stats_stats_inner.go +model_category_stats_stats_inner_metrics.go +model_create_subuser_request.go +model_error_response.go +model_error_response_errors_inner.go +model_list_reputation_200_response_inner.go +model_region.go +model_region1.go +model_region2.go +model_region3.go +model_reset_frequency.go +model_reset_frequency1.go +model_sort_by_direction.go +model_sort_by_direction1.go +model_sort_by_direction2.go +model_sort_by_metric.go +model_subuser.go +model_subuser_credits.go +model_subuser_credits_request.go +model_subuser_post.go +model_subuser_post_credit_allocation.go +model_subuser_stats.go +model_subuser_stats_stats_inner.go +model_subuser_stats_stats_inner_metrics.go +model_type.go +model_type1.go +model_update_subuser_ip_200_response.go +model_update_subuser_remaining_credit_request.go +model_update_subuser_request.go +model_update_subuser_website_access_request.go diff --git a/rest/api/v3/subusers/.openapi-generator-ignore b/rest/api/v3/subusers/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/subusers/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/subusers/README.md b/rest/api/v3/subusers/README.md new file mode 100644 index 00000000..fc71698f --- /dev/null +++ b/rest/api/v3/subusers/README.md @@ -0,0 +1,106 @@ +# Go API client for + +The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. + +You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:44.524189+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateSubuser* | [**CreateSubuser**](docs/CreateSubuser.md#createsubuser) | **Post** /v3/subusers | Create Subuser +*DeleteSubuser* | [**DeleteSubuser**](docs/DeleteSubuser.md#deletesubuser) | **Delete** /v3/subusers/{SubuserName} | Delete a subuser +*GetSubuserCredit* | [**GetSubuserCredit**](docs/GetSubuserCredit.md#getsubusercredit) | **Get** /v3/subusers/{SubuserName}/credits | Get the Credits for a Subuser +*ListMonthlyStat* | [**ListMonthlyStat**](docs/ListMonthlyStat.md#listmonthlystat) | **Get** /v3/subusers/stats/monthly | Retrieve monthly stats for all subusers +*ListReputation* | [**ListReputation**](docs/ListReputation.md#listreputation) | **Get** /v3/subusers/reputations | Retrieve Subuser Reputations +*ListStat* | [**ListStat**](docs/ListStat.md#liststat) | **Get** /v3/subusers/stats | Retrieve email statistics for your subusers. +*ListStatSum* | [**ListStatSum**](docs/ListStatSum.md#liststatsum) | **Get** /v3/subusers/stats/sums | Retrieve the totals for each email statistic metric for all subusers. +*ListSubuser* | [**ListSubuser**](docs/ListSubuser.md#listsubuser) | **Get** /v3/subusers | List all Subusers +*ListSubuserMonthlyStat* | [**ListSubuserMonthlyStat**](docs/ListSubuserMonthlyStat.md#listsubusermonthlystat) | **Get** /v3/subusers/{SubuserName}/stats/monthly | Retrieve the monthly email statistics for a single subuser +*UpdateSubuser* | [**UpdateSubuser**](docs/UpdateSubuser.md#updatesubuser) | **Patch** /v3/subusers/{SubuserName} | Enable/disable a subuser +*UpdateSubuserCredit* | [**UpdateSubuserCredit**](docs/UpdateSubuserCredit.md#updatesubusercredit) | **Put** /v3/subusers/{SubuserName}/credits | Update the Credits for a Subuser +*UpdateSubuserIp* | [**UpdateSubuserIp**](docs/UpdateSubuserIp.md#updatesubuserip) | **Put** /v3/subusers/{SubuserName}/ips | Update IPs assigned to a subuser +*UpdateSubuserRemainingCredit* | [**UpdateSubuserRemainingCredit**](docs/UpdateSubuserRemainingCredit.md#updatesubuserremainingcredit) | **Patch** /v3/subusers/{SubuserName}/credits/remaining | Update the remaining credits for a Subuser +*UpdateSubuserWebsiteAccess* | [**UpdateSubuserWebsiteAccess**](docs/UpdateSubuserWebsiteAccess.md#updatesubuserwebsiteaccess) | **Patch** /v3/subusers/{SubuserName}/website_access | Enable/Disable website access for a Subuser + + +## Documentation For Models + + - [AggregatedBy](AggregatedBy.md) + - [CategoryStats](CategoryStats.md) + - [CategoryStatsStatsInner](CategoryStatsStatsInner.md) + - [CategoryStatsStatsInnerMetrics](CategoryStatsStatsInnerMetrics.md) + - [CreateSubuserRequest](CreateSubuserRequest.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [ListReputation200ResponseInner](ListReputation200ResponseInner.md) + - [Region](Region.md) + - [Region1](Region1.md) + - [Region2](Region2.md) + - [Region3](Region3.md) + - [ResetFrequency](ResetFrequency.md) + - [ResetFrequency1](ResetFrequency1.md) + - [SortByDirection](SortByDirection.md) + - [SortByDirection1](SortByDirection1.md) + - [SortByDirection2](SortByDirection2.md) + - [SortByMetric](SortByMetric.md) + - [Subuser](Subuser.md) + - [SubuserCredits](SubuserCredits.md) + - [SubuserCreditsRequest](SubuserCreditsRequest.md) + - [SubuserPost](SubuserPost.md) + - [SubuserPostCreditAllocation](SubuserPostCreditAllocation.md) + - [SubuserStats](SubuserStats.md) + - [SubuserStatsStatsInner](SubuserStatsStatsInner.md) + - [SubuserStatsStatsInnerMetrics](SubuserStatsStatsInnerMetrics.md) + - [Type](Type.md) + - [Type1](Type1.md) + - [UpdateSubuserIp200Response](UpdateSubuserIp200Response.md) + - [UpdateSubuserRemainingCreditRequest](UpdateSubuserRemainingCreditRequest.md) + - [UpdateSubuserRequest](UpdateSubuserRequest.md) + - [UpdateSubuserWebsiteAccessRequest](UpdateSubuserWebsiteAccessRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/subusers/api_create_subuser.go b/rest/api/v3/subusers/api_create_subuser.go new file mode 100644 index 00000000..c57cabea --- /dev/null +++ b/rest/api/v3/subusers/api_create_subuser.go @@ -0,0 +1,96 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type CreateSubuserParam struct { + // + CreateSubuserRequest *CreateSubuserRequest `json:"CreateSubuserRequest,omitempty"` +} + +func (params *CreateSubuserParam) SetCreateSubuserRequest(CreateSubuserRequest CreateSubuserRequest) *CreateSubuserParam { + params.CreateSubuserRequest = &CreateSubuserRequest + return params +} + +// **This endpoint allows you to create a new subuser.** +func (c *ApiService) CreateSubuser(params *CreateSubuserParam) (interface{}, error) { + path := "/v3/subusers" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateSubuserRequest != nil { + b, err := json.Marshal(*params.CreateSubuserRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SubuserPost{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/subusers/api_delete_subuser.go b/rest/api/v3/subusers/api_delete_subuser.go new file mode 100644 index 00000000..9449f73e --- /dev/null +++ b/rest/api/v3/subusers/api_delete_subuser.go @@ -0,0 +1,68 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DeleteSubuserParam struct { + // The username of the Subuser. + SubuserName *string `json:"subuser_name"` +} + +func (params *DeleteSubuserParam) SetSubuserName(SubuserName string) *DeleteSubuserParam { + params.SubuserName = &SubuserName + return params +} + +// **This endpoint allows you to delete a subuser.** This is a permanent action. Once deleted, a subuser cannot be retrieved. +func (c *ApiService) DeleteSubuser(params *DeleteSubuserParam) (interface{}, error) { + path := "/v3/subusers/{SubuserName}" + if params != nil && params.SubuserName != nil { + path = strings.Replace(path, "{"+"SubuserName"+"}", *params.SubuserName, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/subusers/api_get_subuser_credit.go b/rest/api/v3/subusers/api_get_subuser_credit.go new file mode 100644 index 00000000..6e4e3998 --- /dev/null +++ b/rest/api/v3/subusers/api_get_subuser_credit.go @@ -0,0 +1,68 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type GetSubuserCreditParam struct { + // The username of the Subuser. + SubuserName *string `json:"subuser_name"` +} + +func (params *GetSubuserCreditParam) SetSubuserName(SubuserName string) *GetSubuserCreditParam { + params.SubuserName = &SubuserName + return params +} + +// **This endpoint allows you to retrieve a Credits overview for a Subuser.** +func (c *ApiService) GetSubuserCredit(params *GetSubuserCreditParam) (interface{}, error) { + path := "/v3/subusers/{SubuserName}/credits" + if params != nil && params.SubuserName != nil { + path = strings.Replace(path, "{"+"SubuserName"+"}", *params.SubuserName, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SubuserCredits{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/subusers/api_list_monthly_stat.go b/rest/api/v3/subusers/api_list_monthly_stat.go new file mode 100644 index 00000000..afe7d8dc --- /dev/null +++ b/rest/api/v3/subusers/api_list_monthly_stat.go @@ -0,0 +1,105 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListMonthlyStatParam struct { + // The date of the month to retrieve statistics for. Must be formatted YYYY-MM-DD + Date *string `json:"date"` + // A substring search of your subusers. + Subuser *string `json:"subuser,omitempty"` + // The metric that you want to sort by. Metrics that you can sort by are: `blocks`, `bounces`, `clicks`, `delivered`, `opens`, `requests`, `unique_clicks`, `unique_opens`, and `unsubscribes`.' + SortByMetric *SortByMetric `json:"sort_by_metric,omitempty"` + // The direction you want to sort. + SortByDirection *SortByDirection1 `json:"sort_by_direction,omitempty"` + // Optional field to limit the number of results returned. + Limit *int32 `json:"limit,omitempty"` + // Optional beginning point in the list to retrieve from. + Offset *int32 `json:"offset,omitempty"` +} + +func (params *ListMonthlyStatParam) SetDate(Date string) *ListMonthlyStatParam { + params.Date = &Date + return params +} +func (params *ListMonthlyStatParam) SetSubuser(Subuser string) *ListMonthlyStatParam { + params.Subuser = &Subuser + return params +} +func (params *ListMonthlyStatParam) SetSortByMetric(SortByMetric SortByMetric) *ListMonthlyStatParam { + params.SortByMetric = &SortByMetric + return params +} +func (params *ListMonthlyStatParam) SetSortByDirection(SortByDirection SortByDirection1) *ListMonthlyStatParam { + params.SortByDirection = &SortByDirection + return params +} +func (params *ListMonthlyStatParam) SetLimit(Limit int32) *ListMonthlyStatParam { + params.Limit = &Limit + return params +} +func (params *ListMonthlyStatParam) SetOffset(Offset int32) *ListMonthlyStatParam { + params.Offset = &Offset + return params +} + +// **This endpoint allows you to retrieve the monthly email statistics for all subusers over the given date range.** When using the `sort_by_metric` to sort your stats by a specific metric, you can not sort by the following metrics: `bounce_drops`, `deferred`, `invalid_emails`, `processed`, `spam_report_drops`, `spam_reports`, or `unsubscribe_drops`. +func (c *ApiService) ListMonthlyStat(params *ListMonthlyStatParam) (interface{}, error) { + path := "/v3/subusers/stats/monthly" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Date != nil { + data.Set("date", *params.Date) + } + if params != nil && params.Subuser != nil { + data.Set("subuser", *params.Subuser) + } + if params != nil && params.SortByMetric != nil { + data.Set("sort_by_metric", fmt.Sprint(*params.SortByMetric)) + } + if params != nil && params.SortByDirection != nil { + data.Set("sort_by_direction", fmt.Sprint(*params.SortByDirection)) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SubuserStats{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/subusers/api_list_reputation.go b/rest/api/v3/subusers/api_list_reputation.go new file mode 100644 index 00000000..8b6bba0e --- /dev/null +++ b/rest/api/v3/subusers/api_list_reputation.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListReputationParam struct { + // + Usernames *string `json:"usernames,omitempty"` +} + +func (params *ListReputationParam) SetUsernames(Usernames string) *ListReputationParam { + params.Usernames = &Usernames + return params +} + +// **This endpoint allows you to request the reputations for your subusers.** Subuser sender reputations give a good idea how well a sender is doing with regards to how recipients and recipient servers react to the mail that is being received. When a bounce, spam report, or other negative action happens on a sent email, it will affect your sender rating. +func (c *ApiService) ListReputation(params *ListReputationParam) (interface{}, error) { + path := "/v3/subusers/reputations" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Usernames != nil { + data.Set("usernames", *params.Usernames) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListReputation200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/subusers/api_list_stat.go b/rest/api/v3/subusers/api_list_stat.go new file mode 100644 index 00000000..9896d1d2 --- /dev/null +++ b/rest/api/v3/subusers/api_list_stat.go @@ -0,0 +1,105 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListStatParam struct { + // The subuser you want to retrieve statistics for. You may include this parameter up to 10 times to retrieve statistics for multiple subusers. + Subusers *string `json:"subusers"` + // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. + StartDate *string `json:"start_date"` + // Limits the number of results returned per page. + Limit *int32 `json:"limit,omitempty"` + // The point in the list to begin retrieving results from. + Offset *int32 `json:"offset,omitempty"` + // How to group the statistics. Must be either \"day\", \"week\", or \"month\". + AggregatedBy *AggregatedBy `json:"aggregated_by,omitempty"` + // The end date of the statistics to retrieve. Defaults to today. + EndDate *string `json:"end_date,omitempty"` +} + +func (params *ListStatParam) SetSubusers(Subusers string) *ListStatParam { + params.Subusers = &Subusers + return params +} +func (params *ListStatParam) SetStartDate(StartDate string) *ListStatParam { + params.StartDate = &StartDate + return params +} +func (params *ListStatParam) SetLimit(Limit int32) *ListStatParam { + params.Limit = &Limit + return params +} +func (params *ListStatParam) SetOffset(Offset int32) *ListStatParam { + params.Offset = &Offset + return params +} +func (params *ListStatParam) SetAggregatedBy(AggregatedBy AggregatedBy) *ListStatParam { + params.AggregatedBy = &AggregatedBy + return params +} +func (params *ListStatParam) SetEndDate(EndDate string) *ListStatParam { + params.EndDate = &EndDate + return params +} + +// **This endpoint allows you to retrieve the email statistics for the given subusers.** You may retrieve statistics for up to 10 different subusers by including an additional _subusers_ parameter for each additional subuser. +func (c *ApiService) ListStat(params *ListStatParam) (interface{}, error) { + path := "/v3/subusers/stats" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Subusers != nil { + data.Set("subusers", *params.Subusers) + } + if params != nil && params.StartDate != nil { + data.Set("start_date", *params.StartDate) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + if params != nil && params.AggregatedBy != nil { + data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", *params.EndDate) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]CategoryStats{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/subusers/api_list_stat_sum.go b/rest/api/v3/subusers/api_list_stat_sum.go new file mode 100644 index 00000000..0f220c27 --- /dev/null +++ b/rest/api/v3/subusers/api_list_stat_sum.go @@ -0,0 +1,114 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListStatSumParam struct { + // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. + StartDate *string `json:"start_date"` + // The direction you want to sort. + SortByDirection *SortByDirection2 `json:"sort_by_direction,omitempty"` + // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + EndDate *string `json:"end_date,omitempty"` + // Limits the number of results returned per page. + Limit *int32 `json:"limit,omitempty"` + // The point in the list to begin retrieving results from. + Offset *int32 `json:"offset,omitempty"` + // How to group the statistics. Defaults to today. Must follow format YYYY-MM-DD. + AggregatedBy *string `json:"aggregated_by,omitempty"` + // The metric that you want to sort by. Must be a single metric. + SortByMetric *string `json:"sort_by_metric,omitempty"` +} + +func (params *ListStatSumParam) SetStartDate(StartDate string) *ListStatSumParam { + params.StartDate = &StartDate + return params +} +func (params *ListStatSumParam) SetSortByDirection(SortByDirection SortByDirection2) *ListStatSumParam { + params.SortByDirection = &SortByDirection + return params +} +func (params *ListStatSumParam) SetEndDate(EndDate string) *ListStatSumParam { + params.EndDate = &EndDate + return params +} +func (params *ListStatSumParam) SetLimit(Limit int32) *ListStatSumParam { + params.Limit = &Limit + return params +} +func (params *ListStatSumParam) SetOffset(Offset int32) *ListStatSumParam { + params.Offset = &Offset + return params +} +func (params *ListStatSumParam) SetAggregatedBy(AggregatedBy string) *ListStatSumParam { + params.AggregatedBy = &AggregatedBy + return params +} +func (params *ListStatSumParam) SetSortByMetric(SortByMetric string) *ListStatSumParam { + params.SortByMetric = &SortByMetric + return params +} + +// **This endpoint allows you to retrieve the total sums of each email statistic metric for all subusers over the given date range.** +func (c *ApiService) ListStatSum(params *ListStatSumParam) (interface{}, error) { + path := "/v3/subusers/stats/sums" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartDate != nil { + data.Set("start_date", *params.StartDate) + } + if params != nil && params.SortByDirection != nil { + data.Set("sort_by_direction", fmt.Sprint(*params.SortByDirection)) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", *params.EndDate) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + if params != nil && params.AggregatedBy != nil { + data.Set("aggregated_by", *params.AggregatedBy) + } + if params != nil && params.SortByMetric != nil { + data.Set("sort_by_metric", *params.SortByMetric) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &CategoryStats{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/subusers/api_list_subuser.go b/rest/api/v3/subusers/api_list_subuser.go new file mode 100644 index 00000000..1c7a281a --- /dev/null +++ b/rest/api/v3/subusers/api_list_subuser.go @@ -0,0 +1,104 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListSubuserParam struct { + // The username of this subuser. + Username *string `json:"username,omitempty"` + // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. + Limit *int32 `json:"limit,omitempty"` + // Filter for Subusers in this region. If not provided, all Subusers will be returned. All users can also be explicitly requested by using the filter `all`. Users who are not pinned to a region will be displayed as `global`. + Region *Region `json:"region,omitempty"` + // Optional flag to include the regions of the Subusers in the response. If not provided, the region will be omitted from the response. + IncludeRegion *bool `json:"include_region,omitempty"` + // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + Offset *int32 `json:"offset,omitempty"` +} + +func (params *ListSubuserParam) SetUsername(Username string) *ListSubuserParam { + params.Username = &Username + return params +} +func (params *ListSubuserParam) SetLimit(Limit int32) *ListSubuserParam { + params.Limit = &Limit + return params +} +func (params *ListSubuserParam) SetRegion(Region Region) *ListSubuserParam { + params.Region = &Region + return params +} +func (params *ListSubuserParam) SetIncludeRegion(IncludeRegion bool) *ListSubuserParam { + params.IncludeRegion = &IncludeRegion + return params +} +func (params *ListSubuserParam) SetOffset(Offset int32) *ListSubuserParam { + params.Offset = &Offset + return params +} + +// **This endpoint allows you to retrieve a paginated list of all your subusers.** You can use the `username` query parameter to filter the list for specific subusers. You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. +func (c *ApiService) ListSubuser(params *ListSubuserParam) (interface{}, error) { + path := "/v3/subusers" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Username != nil { + data.Set("username", *params.Username) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Region != nil { + data.Set("region", fmt.Sprint(*params.Region)) + } + if params != nil && params.IncludeRegion != nil { + data.Set("include_region", fmt.Sprint(*params.IncludeRegion)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]Subuser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/subusers/api_list_subuser_monthly_stat.go b/rest/api/v3/subusers/api_list_subuser_monthly_stat.go new file mode 100644 index 00000000..a0b694a0 --- /dev/null +++ b/rest/api/v3/subusers/api_list_subuser_monthly_stat.go @@ -0,0 +1,107 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type ListSubuserMonthlyStatParam struct { + // The date of the month to retrieve statistics for. Must be formatted YYYY-MM-DD + Date *string `json:"date"` + // The username of the Subuser. + SubuserName *string `json:"subuser_name"` + // The metric that you want to sort by. Metrics that you can sort by are: `blocks`, `bounces`, `clicks`, `delivered`, `opens`, `requests`, `unique_clicks`, `unique_opens`, and `unsubscribes`.' + SortByMetric *string `json:"sort_by_metric,omitempty"` + // The direction you want to sort. + SortByDirection *SortByDirection `json:"sort_by_direction,omitempty"` + // Optional field to limit the number of results returned. + Limit *int32 `json:"limit,omitempty"` + // Optional beginning point in the list to retrieve from. + Offset *int32 `json:"offset,omitempty"` +} + +func (params *ListSubuserMonthlyStatParam) SetDate(Date string) *ListSubuserMonthlyStatParam { + params.Date = &Date + return params +} +func (params *ListSubuserMonthlyStatParam) SetSubuserName(SubuserName string) *ListSubuserMonthlyStatParam { + params.SubuserName = &SubuserName + return params +} +func (params *ListSubuserMonthlyStatParam) SetSortByMetric(SortByMetric string) *ListSubuserMonthlyStatParam { + params.SortByMetric = &SortByMetric + return params +} +func (params *ListSubuserMonthlyStatParam) SetSortByDirection(SortByDirection SortByDirection) *ListSubuserMonthlyStatParam { + params.SortByDirection = &SortByDirection + return params +} +func (params *ListSubuserMonthlyStatParam) SetLimit(Limit int32) *ListSubuserMonthlyStatParam { + params.Limit = &Limit + return params +} +func (params *ListSubuserMonthlyStatParam) SetOffset(Offset int32) *ListSubuserMonthlyStatParam { + params.Offset = &Offset + return params +} + +// **This endpoint allows you to retrive the monthly email statistics for a specific subuser.** When using the `sort_by_metric` to sort your stats by a specific metric, you can not sort by the following metrics: `bounce_drops`, `deferred`, `invalid_emails`, `processed`, `spam_report_drops`, `spam_reports`, or `unsubscribe_drops`. +func (c *ApiService) ListSubuserMonthlyStat(params *ListSubuserMonthlyStatParam) (interface{}, error) { + path := "/v3/subusers/{SubuserName}/stats/monthly" + if params != nil && params.SubuserName != nil { + path = strings.Replace(path, "{"+"SubuserName"+"}", *params.SubuserName, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Date != nil { + data.Set("date", *params.Date) + } + if params != nil && params.SortByMetric != nil { + data.Set("sort_by_metric", *params.SortByMetric) + } + if params != nil && params.SortByDirection != nil { + data.Set("sort_by_direction", fmt.Sprint(*params.SortByDirection)) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SubuserStats{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/subusers/api_service.go b/rest/api/v3/subusers/api_service.go new file mode 100644 index 00000000..7169b7eb --- /dev/null +++ b/rest/api/v3/subusers/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/subusers/api_update_subuser.go b/rest/api/v3/subusers/api_update_subuser.go new file mode 100644 index 00000000..2985531a --- /dev/null +++ b/rest/api/v3/subusers/api_update_subuser.go @@ -0,0 +1,99 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type UpdateSubuserParam struct { + // The username of the Subuser. + SubuserName *string `json:"subuser_name"` + // + UpdateSubuserRequest *UpdateSubuserRequest `json:"UpdateSubuserRequest,omitempty"` +} + +func (params *UpdateSubuserParam) SetSubuserName(SubuserName string) *UpdateSubuserParam { + params.SubuserName = &SubuserName + return params +} +func (params *UpdateSubuserParam) SetUpdateSubuserRequest(UpdateSubuserRequest UpdateSubuserRequest) *UpdateSubuserParam { + params.UpdateSubuserRequest = &UpdateSubuserRequest + return params +} + +// **This endpoint allows you to enable or disable a subuser.** +func (c *ApiService) UpdateSubuser(params *UpdateSubuserParam) (interface{}, error) { + path := "/v3/subusers/{SubuserName}" + if params != nil && params.SubuserName != nil { + path = strings.Replace(path, "{"+"SubuserName"+"}", *params.SubuserName, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateSubuserRequest != nil { + b, err := json.Marshal(*params.UpdateSubuserRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/subusers/api_update_subuser_credit.go b/rest/api/v3/subusers/api_update_subuser_credit.go new file mode 100644 index 00000000..11a0bfe2 --- /dev/null +++ b/rest/api/v3/subusers/api_update_subuser_credit.go @@ -0,0 +1,83 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type UpdateSubuserCreditParam struct { + // The username of the Subuser. + SubuserName *string `json:"subuser_name"` + // + SubuserCreditsRequest *SubuserCreditsRequest `json:"SubuserCreditsRequest"` +} + +func (params *UpdateSubuserCreditParam) SetSubuserName(SubuserName string) *UpdateSubuserCreditParam { + params.SubuserName = &SubuserName + return params +} +func (params *UpdateSubuserCreditParam) SetSubuserCreditsRequest(SubuserCreditsRequest SubuserCreditsRequest) *UpdateSubuserCreditParam { + params.SubuserCreditsRequest = &SubuserCreditsRequest + return params +} + +// **This endpoint allows you to update the Credits for a Subuser.** +func (c *ApiService) UpdateSubuserCredit(params *UpdateSubuserCreditParam) (interface{}, error) { + path := "/v3/subusers/{SubuserName}/credits" + if params != nil && params.SubuserName != nil { + path = strings.Replace(path, "{"+"SubuserName"+"}", *params.SubuserName, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SubuserCreditsRequest != nil { + b, err := json.Marshal(*params.SubuserCreditsRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SubuserCredits{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/subusers/api_update_subuser_ip.go b/rest/api/v3/subusers/api_update_subuser_ip.go new file mode 100644 index 00000000..57320ccc --- /dev/null +++ b/rest/api/v3/subusers/api_update_subuser_ip.go @@ -0,0 +1,83 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type UpdateSubuserIpParam struct { + // The username of the Subuser. + SubuserName *string `json:"subuser_name"` + // + RequestBody *[]string `json:"request_body,omitempty"` +} + +func (params *UpdateSubuserIpParam) SetSubuserName(SubuserName string) *UpdateSubuserIpParam { + params.SubuserName = &SubuserName + return params +} +func (params *UpdateSubuserIpParam) SetRequestBody(RequestBody []string) *UpdateSubuserIpParam { + params.RequestBody = &RequestBody + return params +} + +// **This endpoint allows you update your subusers' assigned IP.** Each subuser should be assigned to an IP address from which all of this subuser's mail will be sent. Often, this is the same IP as the parent account, but each subuser can have one or more of their own IP addresses as well. More information: * [How to request more IPs](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) * [Setup Reverse DNS](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) +func (c *ApiService) UpdateSubuserIp(params *UpdateSubuserIpParam) (interface{}, error) { + path := "/v3/subusers/{SubuserName}/ips" + if params != nil && params.SubuserName != nil { + path = strings.Replace(path, "{"+"SubuserName"+"}", *params.SubuserName, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.RequestBody != nil { + b, err := json.Marshal(*params.RequestBody) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &UpdateSubuserIp200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/subusers/api_update_subuser_remaining_credit.go b/rest/api/v3/subusers/api_update_subuser_remaining_credit.go new file mode 100644 index 00000000..1b17febb --- /dev/null +++ b/rest/api/v3/subusers/api_update_subuser_remaining_credit.go @@ -0,0 +1,83 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type UpdateSubuserRemainingCreditParam struct { + // The username of the Subuser. + SubuserName *string `json:"subuser_name"` + // + UpdateSubuserRemainingCreditRequest *UpdateSubuserRemainingCreditRequest `json:"UpdateSubuserRemainingCreditRequest"` +} + +func (params *UpdateSubuserRemainingCreditParam) SetSubuserName(SubuserName string) *UpdateSubuserRemainingCreditParam { + params.SubuserName = &SubuserName + return params +} +func (params *UpdateSubuserRemainingCreditParam) SetUpdateSubuserRemainingCreditRequest(UpdateSubuserRemainingCreditRequest UpdateSubuserRemainingCreditRequest) *UpdateSubuserRemainingCreditParam { + params.UpdateSubuserRemainingCreditRequest = &UpdateSubuserRemainingCreditRequest + return params +} + +// **This endpoint allows you to update the remaining credits for a Subuser.** +func (c *ApiService) UpdateSubuserRemainingCredit(params *UpdateSubuserRemainingCreditParam) (interface{}, error) { + path := "/v3/subusers/{SubuserName}/credits/remaining" + if params != nil && params.SubuserName != nil { + path = strings.Replace(path, "{"+"SubuserName"+"}", *params.SubuserName, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateSubuserRemainingCreditRequest != nil { + b, err := json.Marshal(*params.UpdateSubuserRemainingCreditRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SubuserCredits{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/subusers/api_update_subuser_website_access.go b/rest/api/v3/subusers/api_update_subuser_website_access.go new file mode 100644 index 00000000..38384cd9 --- /dev/null +++ b/rest/api/v3/subusers/api_update_subuser_website_access.go @@ -0,0 +1,75 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type UpdateSubuserWebsiteAccessParam struct { + // + SubuserName *string `json:"subuser_name"` + // + UpdateSubuserWebsiteAccessRequest *UpdateSubuserWebsiteAccessRequest `json:"UpdateSubuserWebsiteAccessRequest,omitempty"` +} + +func (params *UpdateSubuserWebsiteAccessParam) SetSubuserName(SubuserName string) *UpdateSubuserWebsiteAccessParam { + params.SubuserName = &SubuserName + return params +} +func (params *UpdateSubuserWebsiteAccessParam) SetUpdateSubuserWebsiteAccessRequest(UpdateSubuserWebsiteAccessRequest UpdateSubuserWebsiteAccessRequest) *UpdateSubuserWebsiteAccessParam { + params.UpdateSubuserWebsiteAccessRequest = &UpdateSubuserWebsiteAccessRequest + return params +} + +// Enable/Disable website access for a Subuser, while still preserving email send functionality. +func (c *ApiService) UpdateSubuserWebsiteAccess(params *UpdateSubuserWebsiteAccessParam) (interface{}, error) { + path := "/v3/subusers/{SubuserName}/website_access" + if params != nil && params.SubuserName != nil { + path = strings.Replace(path, "{"+"SubuserName"+"}", *params.SubuserName, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateSubuserWebsiteAccessRequest != nil { + b, err := json.Marshal(*params.UpdateSubuserWebsiteAccessRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/subusers/docs/AggregatedBy.md b/rest/api/v3/subusers/docs/AggregatedBy.md new file mode 100644 index 00000000..96f02c9f --- /dev/null +++ b/rest/api/v3/subusers/docs/AggregatedBy.md @@ -0,0 +1,14 @@ +# AggregatedBy + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DAY** | string | (value: `"day"`) +**WEEK** | string | (value: `"week"`) +**MONTH** | string | (value: `"month"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/CategoryStats.md b/rest/api/v3/subusers/docs/CategoryStats.md new file mode 100644 index 00000000..2b136fe2 --- /dev/null +++ b/rest/api/v3/subusers/docs/CategoryStats.md @@ -0,0 +1,12 @@ +# CategoryStats + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | **string** | The date the statistics were gathered. | +**Stats** | [**[]CategoryStatsStatsInner**](CategoryStatsStatsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/CategoryStatsStatsInner.md b/rest/api/v3/subusers/docs/CategoryStatsStatsInner.md new file mode 100644 index 00000000..9c188e0c --- /dev/null +++ b/rest/api/v3/subusers/docs/CategoryStatsStatsInner.md @@ -0,0 +1,13 @@ +# CategoryStatsStatsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Metrics** | [**CategoryStatsStatsInnerMetrics**](CategoryStatsStatsInnerMetrics.md) | |[optional] +**Name** | **string** | The name of the category. |[optional] +**Type** | **string** | How you are segmenting your statistics. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/CategoryStatsStatsInnerMetrics.md b/rest/api/v3/subusers/docs/CategoryStatsStatsInnerMetrics.md new file mode 100644 index 00000000..8129c1f4 --- /dev/null +++ b/rest/api/v3/subusers/docs/CategoryStatsStatsInnerMetrics.md @@ -0,0 +1,26 @@ +# CategoryStatsStatsInnerMetrics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Blocks** | **int32** | The number of emails that were not allowed to be delivered by ISPs. | +**BounceDrops** | **int32** | The number of emails that were dropped because of a bounce. | +**Bounces** | **int32** | The number of emails that bounced instead of being delivered. | +**Clicks** | **int32** | The number of links that were clicked. | +**Deferred** | **int32** | The number of emails that temporarily could not be delivered. | +**Delivered** | **int32** | The number of emails SendGrid was able to confirm were actually delivered to a recipient. | +**InvalidEmails** | **int32** | The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. | +**Opens** | **int32** | The total number of times your emails were opened by recipients. | +**Processed** | **int32** | Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. | +**Requests** | **int32** | The number of emails that were requested to be delivered. | +**SpamReportDrops** | **int32** | The number of emails that were dropped due to a recipient previously marking your emails as spam. | +**SpamReports** | **int32** | The number of recipients who marked your email as spam. | +**UniqueClicks** | **int32** | The number of unique recipients who clicked links in your emails. | +**UniqueOpens** | **int32** | The number of unique recipients who opened your emails. | +**UnsubscribeDrops** | **int32** | The number of emails dropped due to a recipient unsubscribing from your emails. | +**Unsubscribes** | **int32** | The number of recipients who unsubscribed from your emails. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/CreateSubuser.md b/rest/api/v3/subusers/docs/CreateSubuser.md new file mode 100644 index 00000000..9c47f779 --- /dev/null +++ b/rest/api/v3/subusers/docs/CreateSubuser.md @@ -0,0 +1,48 @@ +# CreateSubuser + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateSubuser**](CreateSubuser.md#CreateSubuser) | **Post** /v3/subusers | Create Subuser + + + +## CreateSubuser + +> SubuserPost CreateSubuser(ctx, optional) + +Create Subuser + +**This endpoint allows you to create a new subuser.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateSubuserParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**CreateSubuserRequest** | [**CreateSubuserRequest**](CreateSubuserRequest.md) | + +### Return type + +[**SubuserPost**](SubuserPost.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/subusers/docs/CreateSubuserRequest.md b/rest/api/v3/subusers/docs/CreateSubuserRequest.md new file mode 100644 index 00000000..c8f80d78 --- /dev/null +++ b/rest/api/v3/subusers/docs/CreateSubuserRequest.md @@ -0,0 +1,16 @@ +# CreateSubuserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | The username for this subuser. | +**Email** | **string** | The email address of the subuser. | +**Password** | **string** | The password this subuser will use when logging into SendGrid. | +**Ips** | **[]string** | The IP addresses that should be assigned to this subuser. | +**Region** | [**Region1**](Region1.md) | The region this Subuser should be assigned to. Can be `global` or `eu`. (Regional email is in Public Beta and requires SendGrid Pro plan or above.). |[optional] +**IncludeRegion** | **bool** | A flag that determines if the Subuser's region should be returned in the response. (Regional email is in Public Beta and requires SendGrid Pro plan or above.) |[optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/DeleteSubuser.md b/rest/api/v3/subusers/docs/DeleteSubuser.md new file mode 100644 index 00000000..5be2931f --- /dev/null +++ b/rest/api/v3/subusers/docs/DeleteSubuser.md @@ -0,0 +1,51 @@ +# DeleteSubuser + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSubuser**](DeleteSubuser.md#DeleteSubuser) | **Delete** /v3/subusers/{SubuserName} | Delete a subuser + + + +## DeleteSubuser + +> map[string]interface{} DeleteSubuser(ctx, SubuserName) + +Delete a subuser + +**This endpoint allows you to delete a subuser.** This is a permanent action. Once deleted, a subuser cannot be retrieved. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SubuserName** | **string** | The username of the Subuser. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSubuserParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/subusers/docs/ErrorResponse.md b/rest/api/v3/subusers/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/subusers/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/ErrorResponseErrorsInner.md b/rest/api/v3/subusers/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/subusers/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/GetSubuserCredit.md b/rest/api/v3/subusers/docs/GetSubuserCredit.md new file mode 100644 index 00000000..8690a1fc --- /dev/null +++ b/rest/api/v3/subusers/docs/GetSubuserCredit.md @@ -0,0 +1,51 @@ +# GetSubuserCredit + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetSubuserCredit**](GetSubuserCredit.md#GetSubuserCredit) | **Get** /v3/subusers/{SubuserName}/credits | Get the Credits for a Subuser + + + +## GetSubuserCredit + +> SubuserCredits GetSubuserCredit(ctx, SubuserName) + +Get the Credits for a Subuser + +**This endpoint allows you to retrieve a Credits overview for a Subuser.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SubuserName** | **string** | The username of the Subuser. + +### Other Parameters + +Other parameters are passed through a pointer to a GetSubuserCreditParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**SubuserCredits**](SubuserCredits.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/subusers/docs/ListMonthlyStat.md b/rest/api/v3/subusers/docs/ListMonthlyStat.md new file mode 100644 index 00000000..ae4d42d6 --- /dev/null +++ b/rest/api/v3/subusers/docs/ListMonthlyStat.md @@ -0,0 +1,52 @@ +# ListMonthlyStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListMonthlyStat**](ListMonthlyStat.md#ListMonthlyStat) | **Get** /v3/subusers/stats/monthly | Retrieve monthly stats for all subusers + + + +## ListMonthlyStat + +> SubuserStats ListMonthlyStat(ctx, Dateoptional) + +Retrieve monthly stats for all subusers + +**This endpoint allows you to retrieve the monthly email statistics for all subusers over the given date range.** When using the `sort_by_metric` to sort your stats by a specific metric, you can not sort by the following metrics: `bounce_drops`, `deferred`, `invalid_emails`, `processed`, `spam_report_drops`, `spam_reports`, or `unsubscribe_drops`. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListMonthlyStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Subuser** | **string** | A substring search of your subusers. +**SortByMetric** | [**SortByMetric**](SortByMetricSortByMetric.md) | The metric that you want to sort by. Metrics that you can sort by are: `blocks`, `bounces`, `clicks`, `delivered`, `opens`, `requests`, `unique_clicks`, `unique_opens`, and `unsubscribes`.' +**SortByDirection** | [**SortByDirection1**](SortByDirection1SortByDirection1.md) | The direction you want to sort. +**Limit** | **int32** | Optional field to limit the number of results returned. +**Offset** | **int32** | Optional beginning point in the list to retrieve from. + +### Return type + +[**SubuserStats**](SubuserStats.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/subusers/docs/ListReputation.md b/rest/api/v3/subusers/docs/ListReputation.md new file mode 100644 index 00000000..1142829c --- /dev/null +++ b/rest/api/v3/subusers/docs/ListReputation.md @@ -0,0 +1,48 @@ +# ListReputation + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListReputation**](ListReputation.md#ListReputation) | **Get** /v3/subusers/reputations | Retrieve Subuser Reputations + + + +## ListReputation + +> []ListReputation200ResponseInner ListReputation(ctx, optional) + +Retrieve Subuser Reputations + +**This endpoint allows you to request the reputations for your subusers.** Subuser sender reputations give a good idea how well a sender is doing with regards to how recipients and recipient servers react to the mail that is being received. When a bounce, spam report, or other negative action happens on a sent email, it will affect your sender rating. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListReputationParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Usernames** | **string** | + +### Return type + +[**[]ListReputation200ResponseInner**](ListReputation200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/subusers/docs/ListReputation200ResponseInner.md b/rest/api/v3/subusers/docs/ListReputation200ResponseInner.md new file mode 100644 index 00000000..c2d0ef07 --- /dev/null +++ b/rest/api/v3/subusers/docs/ListReputation200ResponseInner.md @@ -0,0 +1,12 @@ +# ListReputation200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Reputation** | **float32** | The sender reputation this subuser has attained. | +**Username** | **string** | The subuser that has this reputation. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/ListStat.md b/rest/api/v3/subusers/docs/ListStat.md new file mode 100644 index 00000000..16c65e17 --- /dev/null +++ b/rest/api/v3/subusers/docs/ListStat.md @@ -0,0 +1,51 @@ +# ListStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListStat**](ListStat.md#ListStat) | **Get** /v3/subusers/stats | Retrieve email statistics for your subusers. + + + +## ListStat + +> []CategoryStats ListStat(ctx, SubusersStartDateoptional) + +Retrieve email statistics for your subusers. + +**This endpoint allows you to retrieve the email statistics for the given subusers.** You may retrieve statistics for up to 10 different subusers by including an additional _subusers_ parameter for each additional subuser. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **int32** | Limits the number of results returned per page. +**Offset** | **int32** | The point in the list to begin retrieving results from. +**AggregatedBy** | [**AggregatedBy**](AggregatedByAggregatedBy.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". +**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. + +### Return type + +[**[]CategoryStats**](CategoryStats.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/subusers/docs/ListStatSum.md b/rest/api/v3/subusers/docs/ListStatSum.md new file mode 100644 index 00000000..8d801458 --- /dev/null +++ b/rest/api/v3/subusers/docs/ListStatSum.md @@ -0,0 +1,53 @@ +# ListStatSum + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListStatSum**](ListStatSum.md#ListStatSum) | **Get** /v3/subusers/stats/sums | Retrieve the totals for each email statistic metric for all subusers. + + + +## ListStatSum + +> CategoryStats ListStatSum(ctx, StartDateoptional) + +Retrieve the totals for each email statistic metric for all subusers. + +**This endpoint allows you to retrieve the total sums of each email statistic metric for all subusers over the given date range.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListStatSumParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**SortByDirection** | [**SortByDirection2**](SortByDirection2SortByDirection2.md) | The direction you want to sort. +**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. +**Limit** | **int32** | Limits the number of results returned per page. +**Offset** | **int32** | The point in the list to begin retrieving results from. +**AggregatedBy** | **string** | How to group the statistics. Defaults to today. Must follow format YYYY-MM-DD. +**SortByMetric** | **string** | The metric that you want to sort by. Must be a single metric. + +### Return type + +[**CategoryStats**](CategoryStats.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/subusers/docs/ListSubuser.md b/rest/api/v3/subusers/docs/ListSubuser.md new file mode 100644 index 00000000..679e08de --- /dev/null +++ b/rest/api/v3/subusers/docs/ListSubuser.md @@ -0,0 +1,52 @@ +# ListSubuser + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSubuser**](ListSubuser.md#ListSubuser) | **Get** /v3/subusers | List all Subusers + + + +## ListSubuser + +> []Subuser ListSubuser(ctx, optional) + +List all Subusers + +**This endpoint allows you to retrieve a paginated list of all your subusers.** You can use the `username` query parameter to filter the list for specific subusers. You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSubuserParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Username** | **string** | The username of this subuser. +**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. +**Region** | [**Region**](RegionRegion.md) | Filter for Subusers in this region. If not provided, all Subusers will be returned. All users can also be explicitly requested by using the filter `all`. Users who are not pinned to a region will be displayed as `global`. +**IncludeRegion** | **bool** | Optional flag to include the regions of the Subusers in the response. If not provided, the region will be omitted from the response. +**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + +### Return type + +[**[]Subuser**](Subuser.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/subusers/docs/ListSubuserMonthlyStat.md b/rest/api/v3/subusers/docs/ListSubuserMonthlyStat.md new file mode 100644 index 00000000..039a19c5 --- /dev/null +++ b/rest/api/v3/subusers/docs/ListSubuserMonthlyStat.md @@ -0,0 +1,55 @@ +# ListSubuserMonthlyStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSubuserMonthlyStat**](ListSubuserMonthlyStat.md#ListSubuserMonthlyStat) | **Get** /v3/subusers/{SubuserName}/stats/monthly | Retrieve the monthly email statistics for a single subuser + + + +## ListSubuserMonthlyStat + +> SubuserStats ListSubuserMonthlyStat(ctx, DateSubuserNameoptional) + +Retrieve the monthly email statistics for a single subuser + +**This endpoint allows you to retrive the monthly email statistics for a specific subuser.** When using the `sort_by_metric` to sort your stats by a specific metric, you can not sort by the following metrics: `bounce_drops`, `deferred`, `invalid_emails`, `processed`, `spam_report_drops`, `spam_reports`, or `unsubscribe_drops`. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SubuserName** | **string** | The username of the Subuser. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSubuserMonthlyStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**SortByMetric** | **string** | The metric that you want to sort by. Metrics that you can sort by are: `blocks`, `bounces`, `clicks`, `delivered`, `opens`, `requests`, `unique_clicks`, `unique_opens`, and `unsubscribes`.' +**SortByDirection** | [**SortByDirection**](SortByDirectionSortByDirection.md) | The direction you want to sort. +**Limit** | **int32** | Optional field to limit the number of results returned. +**Offset** | **int32** | Optional beginning point in the list to retrieve from. + +### Return type + +[**SubuserStats**](SubuserStats.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/subusers/docs/Region.md b/rest/api/v3/subusers/docs/Region.md new file mode 100644 index 00000000..5c815839 --- /dev/null +++ b/rest/api/v3/subusers/docs/Region.md @@ -0,0 +1,14 @@ +# Region + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**ALL** | string | (value: `"all"`) +**GLOBAL** | string | (value: `"global"`) +**EU** | string | (value: `"eu"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/Region1.md b/rest/api/v3/subusers/docs/Region1.md new file mode 100644 index 00000000..53994edc --- /dev/null +++ b/rest/api/v3/subusers/docs/Region1.md @@ -0,0 +1,13 @@ +# Region1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**GLOBAL** | string | (value: `"global"`) +**EU** | string | (value: `"eu"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/Region2.md b/rest/api/v3/subusers/docs/Region2.md new file mode 100644 index 00000000..d5a099ad --- /dev/null +++ b/rest/api/v3/subusers/docs/Region2.md @@ -0,0 +1,13 @@ +# Region2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**GLOBAL** | string | (value: `"global"`) +**EU** | string | (value: `"eu"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/Region3.md b/rest/api/v3/subusers/docs/Region3.md new file mode 100644 index 00000000..32404c8e --- /dev/null +++ b/rest/api/v3/subusers/docs/Region3.md @@ -0,0 +1,13 @@ +# Region3 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**GLOBAL** | string | (value: `"global"`) +**EU** | string | (value: `"eu"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/ResetFrequency.md b/rest/api/v3/subusers/docs/ResetFrequency.md new file mode 100644 index 00000000..9b705ddc --- /dev/null +++ b/rest/api/v3/subusers/docs/ResetFrequency.md @@ -0,0 +1,14 @@ +# ResetFrequency + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**MONTHLY** | string | (value: `"monthly"`) +**WEEKLY** | string | (value: `"weekly"`) +**DAILY** | string | (value: `"daily"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/ResetFrequency1.md b/rest/api/v3/subusers/docs/ResetFrequency1.md new file mode 100644 index 00000000..1b6e357e --- /dev/null +++ b/rest/api/v3/subusers/docs/ResetFrequency1.md @@ -0,0 +1,14 @@ +# ResetFrequency1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**MONTHLY** | string | (value: `"monthly"`) +**WEEKLY** | string | (value: `"weekly"`) +**DAILY** | string | (value: `"daily"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/SortByDirection.md b/rest/api/v3/subusers/docs/SortByDirection.md new file mode 100644 index 00000000..0431e9a0 --- /dev/null +++ b/rest/api/v3/subusers/docs/SortByDirection.md @@ -0,0 +1,13 @@ +# SortByDirection + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DESC** | string | (value: `"desc"`) +**ASC** | string | (value: `"asc"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/SortByDirection1.md b/rest/api/v3/subusers/docs/SortByDirection1.md new file mode 100644 index 00000000..aa9dabea --- /dev/null +++ b/rest/api/v3/subusers/docs/SortByDirection1.md @@ -0,0 +1,13 @@ +# SortByDirection1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DESC** | string | (value: `"desc"`) +**ASC** | string | (value: `"asc"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/SortByDirection2.md b/rest/api/v3/subusers/docs/SortByDirection2.md new file mode 100644 index 00000000..a25d133f --- /dev/null +++ b/rest/api/v3/subusers/docs/SortByDirection2.md @@ -0,0 +1,13 @@ +# SortByDirection2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DESC** | string | (value: `"desc"`) +**ASC** | string | (value: `"asc"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/SortByMetric.md b/rest/api/v3/subusers/docs/SortByMetric.md new file mode 100644 index 00000000..d58e068d --- /dev/null +++ b/rest/api/v3/subusers/docs/SortByMetric.md @@ -0,0 +1,20 @@ +# SortByMetric + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**BLOCKS** | string | (value: `"blocks"`) +**BOUNCES** | string | (value: `"bounces"`) +**CLICKS** | string | (value: `"clicks"`) +**DELIVERED** | string | (value: `"delivered"`) +**OPENS** | string | (value: `"opens"`) +**REQUESTS** | string | (value: `"requests"`) +**UNIQUE_CLICKS** | string | (value: `"unique_clicks"`) +**UNIQUE_OPENS** | string | (value: `"unique_opens"`) +**UNSUBSCRIBES** | string | (value: `"unsubscribes"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/Subuser.md b/rest/api/v3/subusers/docs/Subuser.md new file mode 100644 index 00000000..5730bdb1 --- /dev/null +++ b/rest/api/v3/subusers/docs/Subuser.md @@ -0,0 +1,15 @@ +# Subuser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Disabled** | **bool** | Whether or not the user is enabled or disabled. | +**Id** | **float32** | The ID of this subuser. | +**Username** | **string** | The name by which this subuser will be referred. | +**Email** | **string** | The email address to contact this subuser. | +**Region** | [**Region2**](Region2.md) | The region this Subuser is assigned to. This property is returned only if the `include_region` parameter was included and set to `true` in the API request. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/SubuserCredits.md b/rest/api/v3/subusers/docs/SubuserCredits.md new file mode 100644 index 00000000..5d6b18a9 --- /dev/null +++ b/rest/api/v3/subusers/docs/SubuserCredits.md @@ -0,0 +1,15 @@ +# SubuserCredits + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | [**Type**](Type.md) | Type determines how credits are reset for a Subuser. `unlimited` indicates that there is no limit to the Subuser's credits. `recurring` indicates that the credits for the Subuser are reset according to the frequency determined by `reset_frequency`. `nonrecurring` indicates that there is no recurring schedule to reset credits and resets must be done on an ad hoc basis. | +**ResetFrequency** | [**ResetFrequency**](ResetFrequency.md) | The frequency with which a Subuser's credits are reset if `type` is set to `recurring`, otherwise `null`. | +**Remain** | **int32** | Total number of remaining credits. `remain` is `null` if the reset `type` for the Subuser's credits is set to `unlimited`. | +**Total** | **int32** | Total number of allowable credits. `total` is `null` if the reset `type` for the Subuser's credits is set to `unlimited` or `nonrecurring`. | +**Used** | **int32** | Total number of used credits. `used` is `null` if the reset `type` for the Subuser's credits is set to `unlimited` or `nonrecurring`. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/SubuserCreditsRequest.md b/rest/api/v3/subusers/docs/SubuserCreditsRequest.md new file mode 100644 index 00000000..0ab5910a --- /dev/null +++ b/rest/api/v3/subusers/docs/SubuserCreditsRequest.md @@ -0,0 +1,13 @@ +# SubuserCreditsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | [**Type1**](Type1.md) | Type determines how credits are reset for a Subuser. `unlimited` indicates that there is no limit to the Subuser's credits. `recurring` indicates that the credits for the Subuser are reset according to the frequency determined by `reset_frequency`. `nonrecurring` indicates that there is no recurring schedule to reset credits and resets must be done on an ad hoc basis. | +**ResetFrequency** | [**ResetFrequency1**](ResetFrequency1.md) | The frequency with which a Subuser's credits are reset if `type` is set to `recurring`. Do _not_ include `reset_frequency` if you choose a reset `type` value of `unlimited` or `nonrecurring`. |[optional] +**Total** | **int32** | Total number of credits to which the Subuser is to be reset. If `type` is `nonrecurring` then the Subuser's credits will be reset to `total` on a one-time basis. If `type` is `recurring` then the Subuser's credits will be reset to `total` every time a reset is scheduled in accordance with the `reset_frequency`. Do _not_ include `total` if you choose a reset `type` value of `unlimited`. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/SubuserPost.md b/rest/api/v3/subusers/docs/SubuserPost.md new file mode 100644 index 00000000..8abc4df3 --- /dev/null +++ b/rest/api/v3/subusers/docs/SubuserPost.md @@ -0,0 +1,15 @@ +# SubuserPost + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | The username of the subuser. | +**UserId** | **float32** | The user ID for this subuser. | +**Email** | **string** | The email address for this subuser. | +**CreditAllocation** | [**SubuserPostCreditAllocation**](SubuserPostCreditAllocation.md) | |[optional] +**Region** | [**Region3**](Region3.md) | The region this Subuser is assigned to. The property is returned only if the `include_region` parameter is included and set to `true` in the API request. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/SubuserPostCreditAllocation.md b/rest/api/v3/subusers/docs/SubuserPostCreditAllocation.md new file mode 100644 index 00000000..fa1e529e --- /dev/null +++ b/rest/api/v3/subusers/docs/SubuserPostCreditAllocation.md @@ -0,0 +1,11 @@ +# SubuserPostCreditAllocation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/SubuserStats.md b/rest/api/v3/subusers/docs/SubuserStats.md new file mode 100644 index 00000000..5ca5f9fb --- /dev/null +++ b/rest/api/v3/subusers/docs/SubuserStats.md @@ -0,0 +1,12 @@ +# SubuserStats + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | **string** | The date the statistics were gathered. |[optional] +**Stats** | [**[]SubuserStatsStatsInner**](SubuserStatsStatsInner.md) | The list of statistics. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/SubuserStatsStatsInner.md b/rest/api/v3/subusers/docs/SubuserStatsStatsInner.md new file mode 100644 index 00000000..55735232 --- /dev/null +++ b/rest/api/v3/subusers/docs/SubuserStatsStatsInner.md @@ -0,0 +1,15 @@ +# SubuserStatsStatsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstName** | **string** | The first name of the subuser. |[optional] +**LastName** | **string** | The last name of the subuser. |[optional] +**Metrics** | [**SubuserStatsStatsInnerMetrics**](SubuserStatsStatsInnerMetrics.md) | |[optional] +**Name** | **string** | The username of the subuser. |[optional] +**Type** | **string** | The type of account. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/SubuserStatsStatsInnerMetrics.md b/rest/api/v3/subusers/docs/SubuserStatsStatsInnerMetrics.md new file mode 100644 index 00000000..1c7f2071 --- /dev/null +++ b/rest/api/v3/subusers/docs/SubuserStatsStatsInnerMetrics.md @@ -0,0 +1,26 @@ +# SubuserStatsStatsInnerMetrics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Blocks** | **int32** | The number of emails that were not allowed to be delivered by ISPs. |[optional] +**BounceDrops** | **int32** | The number of emails that were dropped because of a bounce. |[optional] +**Bounces** | **int32** | The number of emails that bounced instead of being delivered. |[optional] +**Clicks** | **int32** | The number of links that were clicked in your emails. |[optional] +**Deferred** | **int32** | The number of emails that temporarily could not be delivered. |[optional] +**Delivered** | **int32** | The number of emails SendGrid was able to confirm were actually delivered to a recipient. |[optional] +**InvalidEmails** | **int32** | The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. |[optional] +**Opens** | **int32** | The total number of times your emails were opened by recipients. |[optional] +**Processed** | **int32** | Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. |[optional] +**Requests** | **int32** | The number of emails that were requested to be delivered. |[optional] +**SpamReportDrops** | **int32** | The number of emails that were dropped due to a recipient previously marking your emails as spam. |[optional] +**SpamReports** | **int32** | The number of recipients who marked your email as spam. |[optional] +**UniqueClicks** | **int32** | The number of unique recipients who clicked links in your emails. |[optional] +**UniqueOpens** | **int32** | The number of unique recipients who opened your emails. |[optional] +**UnsubscribeDrops** | **int32** | The number of emails dropped due to a recipient unsubscribing from your emails. |[optional] +**Unsubscribes** | **int32** | The number of recipients who unsubscribed from your emails. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/Type.md b/rest/api/v3/subusers/docs/Type.md new file mode 100644 index 00000000..0a33c4cf --- /dev/null +++ b/rest/api/v3/subusers/docs/Type.md @@ -0,0 +1,14 @@ +# Type + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**UNLIMITED** | string | (value: `"unlimited"`) +**RECURRING** | string | (value: `"recurring"`) +**NONRECURRING** | string | (value: `"nonrecurring"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/Type1.md b/rest/api/v3/subusers/docs/Type1.md new file mode 100644 index 00000000..929d624f --- /dev/null +++ b/rest/api/v3/subusers/docs/Type1.md @@ -0,0 +1,14 @@ +# Type1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**UNLIMITED** | string | (value: `"unlimited"`) +**RECURRING** | string | (value: `"recurring"`) +**NONRECURRING** | string | (value: `"nonrecurring"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/UpdateSubuser.md b/rest/api/v3/subusers/docs/UpdateSubuser.md new file mode 100644 index 00000000..37171280 --- /dev/null +++ b/rest/api/v3/subusers/docs/UpdateSubuser.md @@ -0,0 +1,52 @@ +# UpdateSubuser + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSubuser**](UpdateSubuser.md#UpdateSubuser) | **Patch** /v3/subusers/{SubuserName} | Enable/disable a subuser + + + +## UpdateSubuser + +> map[string]interface{} UpdateSubuser(ctx, SubuserNameoptional) + +Enable/disable a subuser + +**This endpoint allows you to enable or disable a subuser.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SubuserName** | **string** | The username of the Subuser. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSubuserParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**UpdateSubuserRequest** | [**UpdateSubuserRequest**](UpdateSubuserRequest.md) | + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/subusers/docs/UpdateSubuserCredit.md b/rest/api/v3/subusers/docs/UpdateSubuserCredit.md new file mode 100644 index 00000000..7c5088c3 --- /dev/null +++ b/rest/api/v3/subusers/docs/UpdateSubuserCredit.md @@ -0,0 +1,51 @@ +# UpdateSubuserCredit + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSubuserCredit**](UpdateSubuserCredit.md#UpdateSubuserCredit) | **Put** /v3/subusers/{SubuserName}/credits | Update the Credits for a Subuser + + + +## UpdateSubuserCredit + +> SubuserCredits UpdateSubuserCredit(ctx, SubuserNameSubuserCreditsRequest) + +Update the Credits for a Subuser + +**This endpoint allows you to update the Credits for a Subuser.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SubuserName** | **string** | The username of the Subuser. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSubuserCreditParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**SubuserCredits**](SubuserCredits.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/subusers/docs/UpdateSubuserIp.md b/rest/api/v3/subusers/docs/UpdateSubuserIp.md new file mode 100644 index 00000000..402e272e --- /dev/null +++ b/rest/api/v3/subusers/docs/UpdateSubuserIp.md @@ -0,0 +1,52 @@ +# UpdateSubuserIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSubuserIp**](UpdateSubuserIp.md#UpdateSubuserIp) | **Put** /v3/subusers/{SubuserName}/ips | Update IPs assigned to a subuser + + + +## UpdateSubuserIp + +> UpdateSubuserIp200Response UpdateSubuserIp(ctx, SubuserNameoptional) + +Update IPs assigned to a subuser + +**This endpoint allows you update your subusers' assigned IP.** Each subuser should be assigned to an IP address from which all of this subuser's mail will be sent. Often, this is the same IP as the parent account, but each subuser can have one or more of their own IP addresses as well. More information: * [How to request more IPs](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) * [Setup Reverse DNS](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SubuserName** | **string** | The username of the Subuser. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSubuserIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**RequestBody** | **[]string** | + +### Return type + +[**UpdateSubuserIp200Response**](UpdateSubuserIp200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/subusers/docs/UpdateSubuserIp200Response.md b/rest/api/v3/subusers/docs/UpdateSubuserIp200Response.md new file mode 100644 index 00000000..fe663d5f --- /dev/null +++ b/rest/api/v3/subusers/docs/UpdateSubuserIp200Response.md @@ -0,0 +1,11 @@ +# UpdateSubuserIp200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ips** | **[]string** | The IP addresses that are assigned to the subuser. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/UpdateSubuserRemainingCredit.md b/rest/api/v3/subusers/docs/UpdateSubuserRemainingCredit.md new file mode 100644 index 00000000..a1a8923d --- /dev/null +++ b/rest/api/v3/subusers/docs/UpdateSubuserRemainingCredit.md @@ -0,0 +1,51 @@ +# UpdateSubuserRemainingCredit + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSubuserRemainingCredit**](UpdateSubuserRemainingCredit.md#UpdateSubuserRemainingCredit) | **Patch** /v3/subusers/{SubuserName}/credits/remaining | Update the remaining credits for a Subuser + + + +## UpdateSubuserRemainingCredit + +> SubuserCredits UpdateSubuserRemainingCredit(ctx, SubuserNameUpdateSubuserRemainingCreditRequest) + +Update the remaining credits for a Subuser + +**This endpoint allows you to update the remaining credits for a Subuser.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SubuserName** | **string** | The username of the Subuser. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSubuserRemainingCreditParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**SubuserCredits**](SubuserCredits.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/subusers/docs/UpdateSubuserRemainingCreditRequest.md b/rest/api/v3/subusers/docs/UpdateSubuserRemainingCreditRequest.md new file mode 100644 index 00000000..4431ec58 --- /dev/null +++ b/rest/api/v3/subusers/docs/UpdateSubuserRemainingCreditRequest.md @@ -0,0 +1,11 @@ +# UpdateSubuserRemainingCreditRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AllocationUpdate** | **int32** | The number of credits to add to or subtract from the current remaining credits for the Subuser. Use a positive number to increase the remaining credits or a negative number to reduce the remaining credits. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/UpdateSubuserRequest.md b/rest/api/v3/subusers/docs/UpdateSubuserRequest.md new file mode 100644 index 00000000..2a1081ef --- /dev/null +++ b/rest/api/v3/subusers/docs/UpdateSubuserRequest.md @@ -0,0 +1,11 @@ +# UpdateSubuserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Disabled** | **bool** | Whether or not this subuser is disabled. `true` means disabled, `false` means enabled. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/UpdateSubuserWebsiteAccess.md b/rest/api/v3/subusers/docs/UpdateSubuserWebsiteAccess.md new file mode 100644 index 00000000..fdbf5ff8 --- /dev/null +++ b/rest/api/v3/subusers/docs/UpdateSubuserWebsiteAccess.md @@ -0,0 +1,52 @@ +# UpdateSubuserWebsiteAccess + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSubuserWebsiteAccess**](UpdateSubuserWebsiteAccess.md#UpdateSubuserWebsiteAccess) | **Patch** /v3/subusers/{SubuserName}/website_access | Enable/Disable website access for a Subuser + + + +## UpdateSubuserWebsiteAccess + +> map[string]interface{} UpdateSubuserWebsiteAccess(ctx, SubuserNameoptional) + +Enable/Disable website access for a Subuser + +Enable/Disable website access for a Subuser, while still preserving email send functionality. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SubuserName** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSubuserWebsiteAccessParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**UpdateSubuserWebsiteAccessRequest** | [**UpdateSubuserWebsiteAccessRequest**](UpdateSubuserWebsiteAccessRequest.md) | + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/subusers/docs/UpdateSubuserWebsiteAccessRequest.md b/rest/api/v3/subusers/docs/UpdateSubuserWebsiteAccessRequest.md new file mode 100644 index 00000000..a187eb06 --- /dev/null +++ b/rest/api/v3/subusers/docs/UpdateSubuserWebsiteAccessRequest.md @@ -0,0 +1,11 @@ +# UpdateSubuserWebsiteAccessRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Disabled** | **bool** | Whether or not to disable website access to the Subuser. `true` means disabled, `false` means enabled. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/model_aggregated_by.go b/rest/api/v3/subusers/model_aggregated_by.go new file mode 100644 index 00000000..5542cabd --- /dev/null +++ b/rest/api/v3/subusers/model_aggregated_by.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AggregatedBy the model 'AggregatedBy' +type AggregatedBy string + +// List of AggregatedBy +const ( + AGGREGATEDBY_DAY AggregatedBy = "day" + AGGREGATEDBY_WEEK AggregatedBy = "week" + AGGREGATEDBY_MONTH AggregatedBy = "month" +) diff --git a/rest/api/v3/subusers/model_category_stats.go b/rest/api/v3/subusers/model_category_stats.go new file mode 100644 index 00000000..1d14ce55 --- /dev/null +++ b/rest/api/v3/subusers/model_category_stats.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CategoryStats struct for CategoryStats +type CategoryStats struct { + // The date the statistics were gathered. + Date string `json:"date"` + Stats *[]CategoryStatsStatsInner `json:"stats,omitempty"` +} diff --git a/rest/api/v3/subusers/model_category_stats_stats_inner.go b/rest/api/v3/subusers/model_category_stats_stats_inner.go new file mode 100644 index 00000000..00fba759 --- /dev/null +++ b/rest/api/v3/subusers/model_category_stats_stats_inner.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CategoryStatsStatsInner struct for CategoryStatsStatsInner +type CategoryStatsStatsInner struct { + Metrics *CategoryStatsStatsInnerMetrics `json:"metrics,omitempty"` + // The name of the category. + Name *string `json:"name,omitempty"` + // How you are segmenting your statistics. + Type string `json:"type"` +} diff --git a/rest/api/v3/subusers/model_category_stats_stats_inner_metrics.go b/rest/api/v3/subusers/model_category_stats_stats_inner_metrics.go new file mode 100644 index 00000000..a7d50efe --- /dev/null +++ b/rest/api/v3/subusers/model_category_stats_stats_inner_metrics.go @@ -0,0 +1,50 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CategoryStatsStatsInnerMetrics struct for CategoryStatsStatsInnerMetrics +type CategoryStatsStatsInnerMetrics struct { + // The number of emails that were not allowed to be delivered by ISPs. + Blocks int32 `json:"blocks"` + // The number of emails that were dropped because of a bounce. + BounceDrops int32 `json:"bounce_drops"` + // The number of emails that bounced instead of being delivered. + Bounces int32 `json:"bounces"` + // The number of links that were clicked. + Clicks int32 `json:"clicks"` + // The number of emails that temporarily could not be delivered. + Deferred int32 `json:"deferred"` + // The number of emails SendGrid was able to confirm were actually delivered to a recipient. + Delivered int32 `json:"delivered"` + // The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. + InvalidEmails int32 `json:"invalid_emails"` + // The total number of times your emails were opened by recipients. + Opens int32 `json:"opens"` + // Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. + Processed int32 `json:"processed"` + // The number of emails that were requested to be delivered. + Requests int32 `json:"requests"` + // The number of emails that were dropped due to a recipient previously marking your emails as spam. + SpamReportDrops int32 `json:"spam_report_drops"` + // The number of recipients who marked your email as spam. + SpamReports int32 `json:"spam_reports"` + // The number of unique recipients who clicked links in your emails. + UniqueClicks int32 `json:"unique_clicks"` + // The number of unique recipients who opened your emails. + UniqueOpens int32 `json:"unique_opens"` + // The number of emails dropped due to a recipient unsubscribing from your emails. + UnsubscribeDrops int32 `json:"unsubscribe_drops"` + // The number of recipients who unsubscribed from your emails. + Unsubscribes int32 `json:"unsubscribes"` +} diff --git a/rest/api/v3/subusers/model_create_subuser_request.go b/rest/api/v3/subusers/model_create_subuser_request.go new file mode 100644 index 00000000..5839b599 --- /dev/null +++ b/rest/api/v3/subusers/model_create_subuser_request.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateSubuserRequest struct for CreateSubuserRequest +type CreateSubuserRequest struct { + // The username for this subuser. + Username string `json:"username"` + // The email address of the subuser. + Email string `json:"email"` + // The password this subuser will use when logging into SendGrid. + Password string `json:"password"` + // The IP addresses that should be assigned to this subuser. + Ips []string `json:"ips"` + // The region this Subuser should be assigned to. Can be `global` or `eu`. (Regional email is in Public Beta and requires SendGrid Pro plan or above.). + Region *Region1 `json:"region,omitempty"` + // A flag that determines if the Subuser's region should be returned in the response. (Regional email is in Public Beta and requires SendGrid Pro plan or above.) + IncludeRegion *bool `json:"include_region,omitempty"` +} diff --git a/rest/api/v3/subusers/model_error_response.go b/rest/api/v3/subusers/model_error_response.go new file mode 100644 index 00000000..c2d757e4 --- /dev/null +++ b/rest/api/v3/subusers/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/subusers/model_error_response_errors_inner.go b/rest/api/v3/subusers/model_error_response_errors_inner.go new file mode 100644 index 00000000..2d3ef35d --- /dev/null +++ b/rest/api/v3/subusers/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/subusers/model_list_reputation_200_response_inner.go b/rest/api/v3/subusers/model_list_reputation_200_response_inner.go new file mode 100644 index 00000000..1f50f157 --- /dev/null +++ b/rest/api/v3/subusers/model_list_reputation_200_response_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListReputation200ResponseInner struct for ListReputation200ResponseInner +type ListReputation200ResponseInner struct { + // The sender reputation this subuser has attained. + Reputation float32 `json:"reputation"` + // The subuser that has this reputation. + Username string `json:"username"` +} diff --git a/rest/api/v3/subusers/model_region.go b/rest/api/v3/subusers/model_region.go new file mode 100644 index 00000000..b7956176 --- /dev/null +++ b/rest/api/v3/subusers/model_region.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Region the model 'Region' +type Region string + +// List of Region +const ( + REGION_ALL Region = "all" + REGION_GLOBAL Region = "global" + REGION_EU Region = "eu" +) diff --git a/rest/api/v3/subusers/model_region1.go b/rest/api/v3/subusers/model_region1.go new file mode 100644 index 00000000..4bd4d938 --- /dev/null +++ b/rest/api/v3/subusers/model_region1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Region1 the model 'Region1' +type Region1 string + +// List of Region1 +const ( + REGION1_GLOBAL Region1 = "global" + REGION1_EU Region1 = "eu" +) diff --git a/rest/api/v3/subusers/model_region2.go b/rest/api/v3/subusers/model_region2.go new file mode 100644 index 00000000..5ae5093e --- /dev/null +++ b/rest/api/v3/subusers/model_region2.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Region2 the model 'Region2' +type Region2 string + +// List of Region2 +const ( + REGION2_GLOBAL Region2 = "global" + REGION2_EU Region2 = "eu" +) diff --git a/rest/api/v3/subusers/model_region3.go b/rest/api/v3/subusers/model_region3.go new file mode 100644 index 00000000..8a827cdc --- /dev/null +++ b/rest/api/v3/subusers/model_region3.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Region3 the model 'Region3' +type Region3 string + +// List of Region3 +const ( + REGION3_GLOBAL Region3 = "global" + REGION3_EU Region3 = "eu" +) diff --git a/rest/api/v3/subusers/model_reset_frequency.go b/rest/api/v3/subusers/model_reset_frequency.go new file mode 100644 index 00000000..e5725d07 --- /dev/null +++ b/rest/api/v3/subusers/model_reset_frequency.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ResetFrequency the model 'ResetFrequency' +type ResetFrequency string + +// List of ResetFrequency +const ( + RESETFREQUENCY_MONTHLY ResetFrequency = "monthly" + RESETFREQUENCY_WEEKLY ResetFrequency = "weekly" + RESETFREQUENCY_DAILY ResetFrequency = "daily" +) diff --git a/rest/api/v3/subusers/model_reset_frequency1.go b/rest/api/v3/subusers/model_reset_frequency1.go new file mode 100644 index 00000000..2f9b7e5d --- /dev/null +++ b/rest/api/v3/subusers/model_reset_frequency1.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ResetFrequency1 the model 'ResetFrequency1' +type ResetFrequency1 string + +// List of ResetFrequency1 +const ( + RESETFREQUENCY1_MONTHLY ResetFrequency1 = "monthly" + RESETFREQUENCY1_WEEKLY ResetFrequency1 = "weekly" + RESETFREQUENCY1_DAILY ResetFrequency1 = "daily" +) diff --git a/rest/api/v3/subusers/model_sort_by_direction.go b/rest/api/v3/subusers/model_sort_by_direction.go new file mode 100644 index 00000000..f0372919 --- /dev/null +++ b/rest/api/v3/subusers/model_sort_by_direction.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SortByDirection the model 'SortByDirection' +type SortByDirection string + +// List of SortByDirection +const ( + SORTBYDIRECTION_DESC SortByDirection = "desc" + SORTBYDIRECTION_ASC SortByDirection = "asc" +) diff --git a/rest/api/v3/subusers/model_sort_by_direction1.go b/rest/api/v3/subusers/model_sort_by_direction1.go new file mode 100644 index 00000000..3eb12c50 --- /dev/null +++ b/rest/api/v3/subusers/model_sort_by_direction1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SortByDirection1 the model 'SortByDirection1' +type SortByDirection1 string + +// List of SortByDirection1 +const ( + SORTBYDIRECTION1_DESC SortByDirection1 = "desc" + SORTBYDIRECTION1_ASC SortByDirection1 = "asc" +) diff --git a/rest/api/v3/subusers/model_sort_by_direction2.go b/rest/api/v3/subusers/model_sort_by_direction2.go new file mode 100644 index 00000000..cb54d9bf --- /dev/null +++ b/rest/api/v3/subusers/model_sort_by_direction2.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SortByDirection2 the model 'SortByDirection2' +type SortByDirection2 string + +// List of SortByDirection2 +const ( + SORTBYDIRECTION2_DESC SortByDirection2 = "desc" + SORTBYDIRECTION2_ASC SortByDirection2 = "asc" +) diff --git a/rest/api/v3/subusers/model_sort_by_metric.go b/rest/api/v3/subusers/model_sort_by_metric.go new file mode 100644 index 00000000..9a400ccb --- /dev/null +++ b/rest/api/v3/subusers/model_sort_by_metric.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SortByMetric the model 'SortByMetric' +type SortByMetric string + +// List of SortByMetric +const ( + SORTBYMETRIC_BLOCKS SortByMetric = "blocks" + SORTBYMETRIC_BOUNCES SortByMetric = "bounces" + SORTBYMETRIC_CLICKS SortByMetric = "clicks" + SORTBYMETRIC_DELIVERED SortByMetric = "delivered" + SORTBYMETRIC_OPENS SortByMetric = "opens" + SORTBYMETRIC_REQUESTS SortByMetric = "requests" + SORTBYMETRIC_UNIQUE_CLICKS SortByMetric = "unique_clicks" + SORTBYMETRIC_UNIQUE_OPENS SortByMetric = "unique_opens" + SORTBYMETRIC_UNSUBSCRIBES SortByMetric = "unsubscribes" +) diff --git a/rest/api/v3/subusers/model_subuser.go b/rest/api/v3/subusers/model_subuser.go new file mode 100644 index 00000000..a5128a1a --- /dev/null +++ b/rest/api/v3/subusers/model_subuser.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Subuser struct for Subuser +type Subuser struct { + // Whether or not the user is enabled or disabled. + Disabled bool `json:"disabled"` + // The ID of this subuser. + Id float32 `json:"id"` + // The name by which this subuser will be referred. + Username string `json:"username"` + // The email address to contact this subuser. + Email string `json:"email"` + // The region this Subuser is assigned to. This property is returned only if the `include_region` parameter was included and set to `true` in the API request. + Region *Region2 `json:"region,omitempty"` +} diff --git a/rest/api/v3/subusers/model_subuser_credits.go b/rest/api/v3/subusers/model_subuser_credits.go new file mode 100644 index 00000000..e3b6597d --- /dev/null +++ b/rest/api/v3/subusers/model_subuser_credits.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SubuserCredits struct for SubuserCredits +type SubuserCredits struct { + // Type determines how credits are reset for a Subuser. `unlimited` indicates that there is no limit to the Subuser's credits. `recurring` indicates that the credits for the Subuser are reset according to the frequency determined by `reset_frequency`. `nonrecurring` indicates that there is no recurring schedule to reset credits and resets must be done on an ad hoc basis. + Type Type `json:"type"` + // The frequency with which a Subuser's credits are reset if `type` is set to `recurring`, otherwise `null`. + ResetFrequency ResetFrequency `json:"reset_frequency"` + // Total number of remaining credits. `remain` is `null` if the reset `type` for the Subuser's credits is set to `unlimited`. + Remain int32 `json:"remain"` + // Total number of allowable credits. `total` is `null` if the reset `type` for the Subuser's credits is set to `unlimited` or `nonrecurring`. + Total int32 `json:"total"` + // Total number of used credits. `used` is `null` if the reset `type` for the Subuser's credits is set to `unlimited` or `nonrecurring`. + Used int32 `json:"used"` +} diff --git a/rest/api/v3/subusers/model_subuser_credits_request.go b/rest/api/v3/subusers/model_subuser_credits_request.go new file mode 100644 index 00000000..4eadc773 --- /dev/null +++ b/rest/api/v3/subusers/model_subuser_credits_request.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SubuserCreditsRequest struct for SubuserCreditsRequest +type SubuserCreditsRequest struct { + // Type determines how credits are reset for a Subuser. `unlimited` indicates that there is no limit to the Subuser's credits. `recurring` indicates that the credits for the Subuser are reset according to the frequency determined by `reset_frequency`. `nonrecurring` indicates that there is no recurring schedule to reset credits and resets must be done on an ad hoc basis. + Type Type1 `json:"type"` + // The frequency with which a Subuser's credits are reset if `type` is set to `recurring`. Do _not_ include `reset_frequency` if you choose a reset `type` value of `unlimited` or `nonrecurring`. + ResetFrequency *ResetFrequency1 `json:"reset_frequency,omitempty"` + // Total number of credits to which the Subuser is to be reset. If `type` is `nonrecurring` then the Subuser's credits will be reset to `total` on a one-time basis. If `type` is `recurring` then the Subuser's credits will be reset to `total` every time a reset is scheduled in accordance with the `reset_frequency`. Do _not_ include `total` if you choose a reset `type` value of `unlimited`. + Total *int32 `json:"total,omitempty"` +} diff --git a/rest/api/v3/subusers/model_subuser_post.go b/rest/api/v3/subusers/model_subuser_post.go new file mode 100644 index 00000000..f1a55390 --- /dev/null +++ b/rest/api/v3/subusers/model_subuser_post.go @@ -0,0 +1,27 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SubuserPost struct for SubuserPost +type SubuserPost struct { + // The username of the subuser. + Username string `json:"username"` + // The user ID for this subuser. + UserId float32 `json:"user_id"` + // The email address for this subuser. + Email string `json:"email"` + CreditAllocation *SubuserPostCreditAllocation `json:"credit_allocation,omitempty"` + // The region this Subuser is assigned to. The property is returned only if the `include_region` parameter is included and set to `true` in the API request. + Region *Region3 `json:"region,omitempty"` +} diff --git a/rest/api/v3/subusers/model_subuser_post_credit_allocation.go b/rest/api/v3/subusers/model_subuser_post_credit_allocation.go new file mode 100644 index 00000000..6f6fb157 --- /dev/null +++ b/rest/api/v3/subusers/model_subuser_post_credit_allocation.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SubuserPostCreditAllocation struct for SubuserPostCreditAllocation +type SubuserPostCreditAllocation struct { + Type *string `json:"type,omitempty"` +} diff --git a/rest/api/v3/subusers/model_subuser_stats.go b/rest/api/v3/subusers/model_subuser_stats.go new file mode 100644 index 00000000..3d1b6cd6 --- /dev/null +++ b/rest/api/v3/subusers/model_subuser_stats.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SubuserStats struct for SubuserStats +type SubuserStats struct { + // The date the statistics were gathered. + Date *string `json:"date,omitempty"` + // The list of statistics. + Stats *[]SubuserStatsStatsInner `json:"stats,omitempty"` +} diff --git a/rest/api/v3/subusers/model_subuser_stats_stats_inner.go b/rest/api/v3/subusers/model_subuser_stats_stats_inner.go new file mode 100644 index 00000000..19e47dfd --- /dev/null +++ b/rest/api/v3/subusers/model_subuser_stats_stats_inner.go @@ -0,0 +1,27 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SubuserStatsStatsInner struct for SubuserStatsStatsInner +type SubuserStatsStatsInner struct { + // The first name of the subuser. + FirstName *string `json:"first_name,omitempty"` + // The last name of the subuser. + LastName *string `json:"last_name,omitempty"` + Metrics *SubuserStatsStatsInnerMetrics `json:"metrics,omitempty"` + // The username of the subuser. + Name *string `json:"name,omitempty"` + // The type of account. + Type *string `json:"type,omitempty"` +} diff --git a/rest/api/v3/subusers/model_subuser_stats_stats_inner_metrics.go b/rest/api/v3/subusers/model_subuser_stats_stats_inner_metrics.go new file mode 100644 index 00000000..cd7afbe9 --- /dev/null +++ b/rest/api/v3/subusers/model_subuser_stats_stats_inner_metrics.go @@ -0,0 +1,50 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SubuserStatsStatsInnerMetrics struct for SubuserStatsStatsInnerMetrics +type SubuserStatsStatsInnerMetrics struct { + // The number of emails that were not allowed to be delivered by ISPs. + Blocks *int32 `json:"blocks,omitempty"` + // The number of emails that were dropped because of a bounce. + BounceDrops *int32 `json:"bounce_drops,omitempty"` + // The number of emails that bounced instead of being delivered. + Bounces *int32 `json:"bounces,omitempty"` + // The number of links that were clicked in your emails. + Clicks *int32 `json:"clicks,omitempty"` + // The number of emails that temporarily could not be delivered. + Deferred *int32 `json:"deferred,omitempty"` + // The number of emails SendGrid was able to confirm were actually delivered to a recipient. + Delivered *int32 `json:"delivered,omitempty"` + // The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. + InvalidEmails *int32 `json:"invalid_emails,omitempty"` + // The total number of times your emails were opened by recipients. + Opens *int32 `json:"opens,omitempty"` + // Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. + Processed *int32 `json:"processed,omitempty"` + // The number of emails that were requested to be delivered. + Requests *int32 `json:"requests,omitempty"` + // The number of emails that were dropped due to a recipient previously marking your emails as spam. + SpamReportDrops *int32 `json:"spam_report_drops,omitempty"` + // The number of recipients who marked your email as spam. + SpamReports *int32 `json:"spam_reports,omitempty"` + // The number of unique recipients who clicked links in your emails. + UniqueClicks *int32 `json:"unique_clicks,omitempty"` + // The number of unique recipients who opened your emails. + UniqueOpens *int32 `json:"unique_opens,omitempty"` + // The number of emails dropped due to a recipient unsubscribing from your emails. + UnsubscribeDrops *int32 `json:"unsubscribe_drops,omitempty"` + // The number of recipients who unsubscribed from your emails. + Unsubscribes *int32 `json:"unsubscribes,omitempty"` +} diff --git a/rest/api/v3/subusers/model_type.go b/rest/api/v3/subusers/model_type.go new file mode 100644 index 00000000..c7460304 --- /dev/null +++ b/rest/api/v3/subusers/model_type.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Type the model 'Type' +type Type string + +// List of Type +const ( + TYPE_UNLIMITED Type = "unlimited" + TYPE_RECURRING Type = "recurring" + TYPE_NONRECURRING Type = "nonrecurring" +) diff --git a/rest/api/v3/subusers/model_type1.go b/rest/api/v3/subusers/model_type1.go new file mode 100644 index 00000000..0cdf19ad --- /dev/null +++ b/rest/api/v3/subusers/model_type1.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Type1 the model 'Type1' +type Type1 string + +// List of Type1 +const ( + TYPE1_UNLIMITED Type1 = "unlimited" + TYPE1_RECURRING Type1 = "recurring" + TYPE1_NONRECURRING Type1 = "nonrecurring" +) diff --git a/rest/api/v3/subusers/model_update_subuser_ip_200_response.go b/rest/api/v3/subusers/model_update_subuser_ip_200_response.go new file mode 100644 index 00000000..6f8d30ae --- /dev/null +++ b/rest/api/v3/subusers/model_update_subuser_ip_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateSubuserIp200Response struct for UpdateSubuserIp200Response +type UpdateSubuserIp200Response struct { + // The IP addresses that are assigned to the subuser. + Ips *[]string `json:"ips,omitempty"` +} diff --git a/rest/api/v3/subusers/model_update_subuser_remaining_credit_request.go b/rest/api/v3/subusers/model_update_subuser_remaining_credit_request.go new file mode 100644 index 00000000..68f81f3c --- /dev/null +++ b/rest/api/v3/subusers/model_update_subuser_remaining_credit_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateSubuserRemainingCreditRequest struct for UpdateSubuserRemainingCreditRequest +type UpdateSubuserRemainingCreditRequest struct { + // The number of credits to add to or subtract from the current remaining credits for the Subuser. Use a positive number to increase the remaining credits or a negative number to reduce the remaining credits. + AllocationUpdate int32 `json:"allocation_update"` +} diff --git a/rest/api/v3/subusers/model_update_subuser_request.go b/rest/api/v3/subusers/model_update_subuser_request.go new file mode 100644 index 00000000..c4bbc99a --- /dev/null +++ b/rest/api/v3/subusers/model_update_subuser_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateSubuserRequest struct for UpdateSubuserRequest +type UpdateSubuserRequest struct { + // Whether or not this subuser is disabled. `true` means disabled, `false` means enabled. + Disabled *bool `json:"disabled,omitempty"` +} diff --git a/rest/api/v3/subusers/model_update_subuser_website_access_request.go b/rest/api/v3/subusers/model_update_subuser_website_access_request.go new file mode 100644 index 00000000..7af0aac6 --- /dev/null +++ b/rest/api/v3/subusers/model_update_subuser_website_access_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateSubuserWebsiteAccessRequest struct for UpdateSubuserWebsiteAccessRequest +type UpdateSubuserWebsiteAccessRequest struct { + // Whether or not to disable website access to the Subuser. `true` means disabled, `false` means enabled. + Disabled *bool `json:"disabled,omitempty"` +} diff --git a/rest/api/v3/teammates/.openapi-generator b/rest/api/v3/teammates/.openapi-generator new file mode 100644 index 00000000..3d306f1a --- /dev/null +++ b/rest/api/v3/teammates/.openapi-generator @@ -0,0 +1,65 @@ +.openapi-generator +README.md +api_delete_pending_teammate.go +api_delete_teammate.go +api_get_teammate.go +api_invite_teammate.go +api_list_pending_teammate.go +api_list_subuser_by_template.go +api_list_teammate.go +api_resend_teammate_invite.go +api_service.go +api_update_teammate.go +docs/DeletePendingTeammate.md +docs/DeleteTeammate.md +docs/GetTeammate.md +docs/GetTeammate200Response.md +docs/InviteTeammate.md +docs/InviteTeammate201Response.md +docs/InviteTeammate400Response.md +docs/InviteTeammate400ResponseErrorsInner.md +docs/InviteTeammateRequest.md +docs/ListPendingTeammate.md +docs/ListPendingTeammate200Response.md +docs/ListPendingTeammate200ResponseResultInner.md +docs/ListSubuserByTemplate.md +docs/ListSubuserByTemplate200Response.md +docs/ListSubuserByTemplate200ResponseMetadata.md +docs/ListSubuserByTemplate200ResponseMetadataNextParams.md +docs/ListSubuserByTemplate200ResponseSubuserAccessInner.md +docs/ListSubuserByTemplate400Response.md +docs/ListSubuserByTemplate400ResponseErrorsInner.md +docs/ListTeammate.md +docs/ListTeammate200Response.md +docs/ListTeammate200ResponseResultInner.md +docs/PermissionType.md +docs/ResendTeammateInvite.md +docs/ResendTeammateInvite200Response.md +docs/UpdateTeammate.md +docs/UpdateTeammate200Response.md +docs/UpdateTeammateRequest.md +docs/UserType.md +docs/UserType1.md +docs/UserType2.md +model_get_teammate_200_response.go +model_invite_teammate_201_response.go +model_invite_teammate_400_response.go +model_invite_teammate_400_response_errors_inner.go +model_invite_teammate_request.go +model_list_pending_teammate_200_response.go +model_list_pending_teammate_200_response_result_inner.go +model_list_subuser_by_template_200_response.go +model_list_subuser_by_template_200_response__metadata.go +model_list_subuser_by_template_200_response__metadata_next_params.go +model_list_subuser_by_template_200_response_subuser_access_inner.go +model_list_subuser_by_template_400_response.go +model_list_subuser_by_template_400_response_errors_inner.go +model_list_teammate_200_response.go +model_list_teammate_200_response_result_inner.go +model_permission_type.go +model_resend_teammate_invite_200_response.go +model_update_teammate_200_response.go +model_update_teammate_request.go +model_user_type.go +model_user_type1.go +model_user_type2.go diff --git a/rest/api/v3/teammates/.openapi-generator-ignore b/rest/api/v3/teammates/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/teammates/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/teammates/README.md b/rest/api/v3/teammates/README.md new file mode 100644 index 00000000..b737841f --- /dev/null +++ b/rest/api/v3/teammates/README.md @@ -0,0 +1,89 @@ +# Go API client for + +The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:44.531869+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DeletePendingTeammate* | [**DeletePendingTeammate**](docs/DeletePendingTeammate.md#deletependingteammate) | **Delete** /v3/teammates/pending/{Token} | Delete pending teammate +*DeleteTeammate* | [**DeleteTeammate**](docs/DeleteTeammate.md#deleteteammate) | **Delete** /v3/teammates/{Username} | Delete teammate +*GetTeammate* | [**GetTeammate**](docs/GetTeammate.md#getteammate) | **Get** /v3/teammates/{Username} | Retrieve specific teammate +*InviteTeammate* | [**InviteTeammate**](docs/InviteTeammate.md#inviteteammate) | **Post** /v3/teammates | Invite teammate +*ListPendingTeammate* | [**ListPendingTeammate**](docs/ListPendingTeammate.md#listpendingteammate) | **Get** /v3/teammates/pending | Retrieve all pending teammates +*ListSubuserByTemplate* | [**ListSubuserByTemplate**](docs/ListSubuserByTemplate.md#listsubuserbytemplate) | **Get** /v3/teammates/{TeammateName}/subuser_access | Get Teammate Subuser Access +*ListTeammate* | [**ListTeammate**](docs/ListTeammate.md#listteammate) | **Get** /v3/teammates | Retrieve all teammates +*ResendTeammateInvite* | [**ResendTeammateInvite**](docs/ResendTeammateInvite.md#resendteammateinvite) | **Post** /v3/teammates/pending/{Token}/resend | Resend teammate invite +*UpdateTeammate* | [**UpdateTeammate**](docs/UpdateTeammate.md#updateteammate) | **Patch** /v3/teammates/{Username} | Update teammate's permissions + + +## Documentation For Models + + - [GetTeammate200Response](GetTeammate200Response.md) + - [InviteTeammate201Response](InviteTeammate201Response.md) + - [InviteTeammate400Response](InviteTeammate400Response.md) + - [InviteTeammate400ResponseErrorsInner](InviteTeammate400ResponseErrorsInner.md) + - [InviteTeammateRequest](InviteTeammateRequest.md) + - [ListPendingTeammate200Response](ListPendingTeammate200Response.md) + - [ListPendingTeammate200ResponseResultInner](ListPendingTeammate200ResponseResultInner.md) + - [ListSubuserByTemplate200Response](ListSubuserByTemplate200Response.md) + - [ListSubuserByTemplate200ResponseMetadata](ListSubuserByTemplate200ResponseMetadata.md) + - [ListSubuserByTemplate200ResponseMetadataNextParams](ListSubuserByTemplate200ResponseMetadataNextParams.md) + - [ListSubuserByTemplate200ResponseSubuserAccessInner](ListSubuserByTemplate200ResponseSubuserAccessInner.md) + - [ListSubuserByTemplate400Response](ListSubuserByTemplate400Response.md) + - [ListSubuserByTemplate400ResponseErrorsInner](ListSubuserByTemplate400ResponseErrorsInner.md) + - [ListTeammate200Response](ListTeammate200Response.md) + - [ListTeammate200ResponseResultInner](ListTeammate200ResponseResultInner.md) + - [PermissionType](PermissionType.md) + - [ResendTeammateInvite200Response](ResendTeammateInvite200Response.md) + - [UpdateTeammate200Response](UpdateTeammate200Response.md) + - [UpdateTeammateRequest](UpdateTeammateRequest.md) + - [UserType](UserType.md) + - [UserType1](UserType1.md) + - [UserType2](UserType2.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/teammates/api_delete_pending_teammate.go b/rest/api/v3/teammates/api_delete_pending_teammate.go new file mode 100644 index 00000000..8bbc5450 --- /dev/null +++ b/rest/api/v3/teammates/api_delete_pending_teammate.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DeletePendingTeammateParam struct { + // The token for the invite you want to delete. + Token *string `json:"token"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeletePendingTeammateParam) SetToken(Token string) *DeletePendingTeammateParam { + params.Token = &Token + return params +} +func (params *DeletePendingTeammateParam) SetOnbehalfof(Onbehalfof string) *DeletePendingTeammateParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete a pending teammate invite.** +func (c *ApiService) DeletePendingTeammate(params *DeletePendingTeammateParam) (interface{}, error) { + path := "/v3/teammates/pending/{Token}" + if params != nil && params.Token != nil { + path = strings.Replace(path, "{"+"Token"+"}", *params.Token, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 404 { + ps := &InviteTeammate400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/teammates/api_delete_teammate.go b/rest/api/v3/teammates/api_delete_teammate.go new file mode 100644 index 00000000..e7a451b1 --- /dev/null +++ b/rest/api/v3/teammates/api_delete_teammate.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DeleteTeammateParam struct { + // The username of the teammate that you want to retrieve. + Username *string `json:"username"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteTeammateParam) SetUsername(Username string) *DeleteTeammateParam { + params.Username = &Username + return params +} +func (params *DeleteTeammateParam) SetOnbehalfof(Onbehalfof string) *DeleteTeammateParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete a teammate.** **Only the parent user or an admin teammate can delete another teammate.** +func (c *ApiService) DeleteTeammate(params *DeleteTeammateParam) (interface{}, error) { + path := "/v3/teammates/{Username}" + if params != nil && params.Username != nil { + path = strings.Replace(path, "{"+"Username"+"}", *params.Username, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 404 { + ps := &InviteTeammate400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/teammates/api_get_teammate.go b/rest/api/v3/teammates/api_get_teammate.go new file mode 100644 index 00000000..45f2a7bb --- /dev/null +++ b/rest/api/v3/teammates/api_get_teammate.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type GetTeammateParam struct { + // The username of the teammate that you want to retrieve. + Username *string `json:"username"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetTeammateParam) SetUsername(Username string) *GetTeammateParam { + params.Username = &Username + return params +} +func (params *GetTeammateParam) SetOnbehalfof(Onbehalfof string) *GetTeammateParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a specific Teammate by username.** You can retrieve the username's for each of your Teammates using the \"Retrieve all Teammates\" endpoint. +func (c *ApiService) GetTeammate(params *GetTeammateParam) (interface{}, error) { + path := "/v3/teammates/{Username}" + if params != nil && params.Username != nil { + path = strings.Replace(path, "{"+"Username"+"}", *params.Username, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetTeammate200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/teammates/api_invite_teammate.go b/rest/api/v3/teammates/api_invite_teammate.go new file mode 100644 index 00000000..a41dca17 --- /dev/null +++ b/rest/api/v3/teammates/api_invite_teammate.go @@ -0,0 +1,81 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type InviteTeammateParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + InviteTeammateRequest *InviteTeammateRequest `json:"InviteTeammateRequest,omitempty"` +} + +func (params *InviteTeammateParam) SetOnbehalfof(Onbehalfof string) *InviteTeammateParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *InviteTeammateParam) SetInviteTeammateRequest(InviteTeammateRequest InviteTeammateRequest) *InviteTeammateParam { + params.InviteTeammateRequest = &InviteTeammateRequest + return params +} + +// **This endpoint allows you to invite a Teammate to your account via email.** You can set a Teammate's initial permissions using the `scopes` array in the request body. Teammate's will receive a minimum set of scopes from Twilio SendGrid that are necessary for the Teammate to function. **Note:** A teammate invite will expire after 7 days, but you may resend the invitation at any time to reset the expiration date. +func (c *ApiService) InviteTeammate(params *InviteTeammateParam) (interface{}, error) { + path := "/v3/teammates" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.InviteTeammateRequest != nil { + b, err := json.Marshal(*params.InviteTeammateRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &InviteTeammate201Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &InviteTeammate400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/teammates/api_list_pending_teammate.go b/rest/api/v3/teammates/api_list_pending_teammate.go new file mode 100644 index 00000000..6331225a --- /dev/null +++ b/rest/api/v3/teammates/api_list_pending_teammate.go @@ -0,0 +1,58 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListPendingTeammateParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListPendingTeammateParam) SetOnbehalfof(Onbehalfof string) *ListPendingTeammateParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a list of all pending Teammate invitations.** Each teammate invitation is valid for 7 days. Users may resend the invitation to refresh the expiration date. +func (c *ApiService) ListPendingTeammate(params *ListPendingTeammateParam) (interface{}, error) { + path := "/v3/teammates/pending" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListPendingTeammate200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/teammates/api_list_subuser_by_template.go b/rest/api/v3/teammates/api_list_subuser_by_template.go new file mode 100644 index 00000000..f52e7d1a --- /dev/null +++ b/rest/api/v3/teammates/api_list_subuser_by_template.go @@ -0,0 +1,121 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" + + "strings" +) + +type ListSubuserByTemplateParam struct { + // The username of the Teammate for whom you want to retrieve Subuser access information. + TeammateName *string `json:"teammate_name"` + // The Subuser ID from which the API request will begin retrieving Subusers. This query parameter can be used in successive API calls to retrieve additional Subusers. + AfterSubuserId *int32 `json:"after_subuser_id,omitempty"` + // Limit the number of Subusers to be returned. The default `limit` is `100` per request. + Limit *int32 `json:"limit,omitempty"` + // A Subuser's username that will be used to filter the returned result. + Username *string `json:"username,omitempty"` +} + +func (params *ListSubuserByTemplateParam) SetTeammateName(TeammateName string) *ListSubuserByTemplateParam { + params.TeammateName = &TeammateName + return params +} +func (params *ListSubuserByTemplateParam) SetAfterSubuserId(AfterSubuserId int32) *ListSubuserByTemplateParam { + params.AfterSubuserId = &AfterSubuserId + return params +} +func (params *ListSubuserByTemplateParam) SetLimit(Limit int32) *ListSubuserByTemplateParam { + params.Limit = &Limit + return params +} +func (params *ListSubuserByTemplateParam) SetUsername(Username string) *ListSubuserByTemplateParam { + params.Username = &Username + return params +} + +// **This operation allows you to retrieve the Subusers that can be accessed by a specified Teammate.** This operation will return the Subusers available to a Teammate, including the scopes available. If the Teammate is an administrator, all Subusers will be returned. +func (c *ApiService) ListSubuserByTemplate(params *ListSubuserByTemplateParam) (interface{}, error) { + path := "/v3/teammates/{TeammateName}/subuser_access" + if params != nil && params.TeammateName != nil { + path = strings.Replace(path, "{"+"TeammateName"+"}", *params.TeammateName, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.AfterSubuserId != nil { + data.Set("after_subuser_id", fmt.Sprint(*params.AfterSubuserId)) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Username != nil { + data.Set("username", *params.Username) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListSubuserByTemplate200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ListSubuserByTemplate400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ListSubuserByTemplate400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ListSubuserByTemplate400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListSubuserByTemplate400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/teammates/api_list_teammate.go b/rest/api/v3/teammates/api_list_teammate.go new file mode 100644 index 00000000..2e703563 --- /dev/null +++ b/rest/api/v3/teammates/api_list_teammate.go @@ -0,0 +1,78 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListTeammateParam struct { + // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. The maximum page size for this endpoint is 500 items per page. + Limit *int32 `json:"limit,omitempty"` + // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + Offset *int32 `json:"offset,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListTeammateParam) SetLimit(Limit int32) *ListTeammateParam { + params.Limit = &Limit + return params +} +func (params *ListTeammateParam) SetOffset(Offset int32) *ListTeammateParam { + params.Offset = &Offset + return params +} +func (params *ListTeammateParam) SetOnbehalfof(Onbehalfof string) *ListTeammateParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a paginated list of all current Teammates.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. +func (c *ApiService) ListTeammate(params *ListTeammateParam) (interface{}, error) { + path := "/v3/teammates" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListTeammate200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/teammates/api_resend_teammate_invite.go b/rest/api/v3/teammates/api_resend_teammate_invite.go new file mode 100644 index 00000000..585f60ca --- /dev/null +++ b/rest/api/v3/teammates/api_resend_teammate_invite.go @@ -0,0 +1,77 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type ResendTeammateInviteParam struct { + // The token for the invite that you want to resend. + Token *string `json:"token"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ResendTeammateInviteParam) SetToken(Token string) *ResendTeammateInviteParam { + params.Token = &Token + return params +} +func (params *ResendTeammateInviteParam) SetOnbehalfof(Onbehalfof string) *ResendTeammateInviteParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to resend a Teammate invitation.** Teammate invitations will expire after 7 days. Resending an invitation will reset the expiration date. +func (c *ApiService) ResendTeammateInvite(params *ResendTeammateInviteParam) (interface{}, error) { + path := "/v3/teammates/pending/{Token}/resend" + if params != nil && params.Token != nil { + path = strings.Replace(path, "{"+"Token"+"}", *params.Token, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ResendTeammateInvite200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &InviteTeammate400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/teammates/api_service.go b/rest/api/v3/teammates/api_service.go new file mode 100644 index 00000000..9ffc80f5 --- /dev/null +++ b/rest/api/v3/teammates/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/teammates/api_update_teammate.go b/rest/api/v3/teammates/api_update_teammate.go new file mode 100644 index 00000000..83c1d5d4 --- /dev/null +++ b/rest/api/v3/teammates/api_update_teammate.go @@ -0,0 +1,100 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type UpdateTeammateParam struct { + // The username of the teammate that you want to retrieve. + Username *string `json:"username"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateTeammateRequest *UpdateTeammateRequest `json:"UpdateTeammateRequest,omitempty"` +} + +func (params *UpdateTeammateParam) SetUsername(Username string) *UpdateTeammateParam { + params.Username = &Username + return params +} +func (params *UpdateTeammateParam) SetOnbehalfof(Onbehalfof string) *UpdateTeammateParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateTeammateParam) SetUpdateTeammateRequest(UpdateTeammateRequest UpdateTeammateRequest) *UpdateTeammateParam { + params.UpdateTeammateRequest = &UpdateTeammateRequest + return params +} + +// **This endpoint allows you to update a teammate’s permissions.** To turn a teammate into an admin, the request body should contain an `is_admin` set to `true`. Otherwise, set `is_admin` to `false` and pass in all the scopes that a teammate should have. **Only the parent user or other admin teammates can update another teammate’s permissions.** **Admin users can only update permissions.** +func (c *ApiService) UpdateTeammate(params *UpdateTeammateParam) (interface{}, error) { + path := "/v3/teammates/{Username}" + if params != nil && params.Username != nil { + path = strings.Replace(path, "{"+"Username"+"}", *params.Username, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateTeammateRequest != nil { + b, err := json.Marshal(*params.UpdateTeammateRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &UpdateTeammate200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &InviteTeammate400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &InviteTeammate400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/teammates/docs/DeletePendingTeammate.md b/rest/api/v3/teammates/docs/DeletePendingTeammate.md new file mode 100644 index 00000000..c2dfe25e --- /dev/null +++ b/rest/api/v3/teammates/docs/DeletePendingTeammate.md @@ -0,0 +1,52 @@ +# DeletePendingTeammate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeletePendingTeammate**](DeletePendingTeammate.md#DeletePendingTeammate) | **Delete** /v3/teammates/pending/{Token} | Delete pending teammate + + + +## DeletePendingTeammate + +> DeletePendingTeammate(ctx, Tokenoptional) + +Delete pending teammate + +**This endpoint allows you to delete a pending teammate invite.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Token** | **string** | The token for the invite you want to delete. + +### Other Parameters + +Other parameters are passed through a pointer to a DeletePendingTeammateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/teammates/docs/DeleteTeammate.md b/rest/api/v3/teammates/docs/DeleteTeammate.md new file mode 100644 index 00000000..49d1d4d4 --- /dev/null +++ b/rest/api/v3/teammates/docs/DeleteTeammate.md @@ -0,0 +1,52 @@ +# DeleteTeammate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteTeammate**](DeleteTeammate.md#DeleteTeammate) | **Delete** /v3/teammates/{Username} | Delete teammate + + + +## DeleteTeammate + +> DeleteTeammate(ctx, Usernameoptional) + +Delete teammate + +**This endpoint allows you to delete a teammate.** **Only the parent user or an admin teammate can delete another teammate.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Username** | **string** | The username of the teammate that you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteTeammateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/teammates/docs/GetTeammate.md b/rest/api/v3/teammates/docs/GetTeammate.md new file mode 100644 index 00000000..9a3c21dd --- /dev/null +++ b/rest/api/v3/teammates/docs/GetTeammate.md @@ -0,0 +1,52 @@ +# GetTeammate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetTeammate**](GetTeammate.md#GetTeammate) | **Get** /v3/teammates/{Username} | Retrieve specific teammate + + + +## GetTeammate + +> GetTeammate200Response GetTeammate(ctx, Usernameoptional) + +Retrieve specific teammate + +**This endpoint allows you to retrieve a specific Teammate by username.** You can retrieve the username's for each of your Teammates using the \"Retrieve all Teammates\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Username** | **string** | The username of the teammate that you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetTeammateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**GetTeammate200Response**](GetTeammate200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/teammates/docs/GetTeammate200Response.md b/rest/api/v3/teammates/docs/GetTeammate200Response.md new file mode 100644 index 00000000..96209510 --- /dev/null +++ b/rest/api/v3/teammates/docs/GetTeammate200Response.md @@ -0,0 +1,25 @@ +# GetTeammate200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | Teammate's username |[optional] +**FirstName** | **string** | Teammate's first name |[optional] +**LastName** | **string** | Teammate's last name |[optional] +**Email** | **string** | Teammate's email |[optional] +**Scopes** | **[]interface{}** | Scopes associated to teammate |[optional] +**UserType** | [**UserType1**](UserType1.md) | Indicate the type of user: account owner, teammate admin user, or normal teammate |[optional] +**IsAdmin** | **bool** | Set to true if teammate has admin privileges |[optional] +**Phone** | **string** | (optional) Teammate's phone number |[optional] +**Website** | **string** | (optional) Teammate's website |[optional] +**Address** | **string** | (optional) Teammate's address |[optional] +**Address2** | **string** | (optional) Teammate's address |[optional] +**City** | **string** | (optional) Teammate's city |[optional] +**State** | **string** | (optional) Teammate's state |[optional] +**Zip** | **string** | (optional) Teammate's zip |[optional] +**Country** | **string** | (optional) Teammate's country |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/InviteTeammate.md b/rest/api/v3/teammates/docs/InviteTeammate.md new file mode 100644 index 00000000..c4041719 --- /dev/null +++ b/rest/api/v3/teammates/docs/InviteTeammate.md @@ -0,0 +1,49 @@ +# InviteTeammate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**InviteTeammate**](InviteTeammate.md#InviteTeammate) | **Post** /v3/teammates | Invite teammate + + + +## InviteTeammate + +> InviteTeammate201Response InviteTeammate(ctx, optional) + +Invite teammate + +**This endpoint allows you to invite a Teammate to your account via email.** You can set a Teammate's initial permissions using the `scopes` array in the request body. Teammate's will receive a minimum set of scopes from Twilio SendGrid that are necessary for the Teammate to function. **Note:** A teammate invite will expire after 7 days, but you may resend the invitation at any time to reset the expiration date. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a InviteTeammateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**InviteTeammateRequest** | [**InviteTeammateRequest**](InviteTeammateRequest.md) | + +### Return type + +[**InviteTeammate201Response**](InviteTeammate201Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/teammates/docs/InviteTeammate201Response.md b/rest/api/v3/teammates/docs/InviteTeammate201Response.md new file mode 100644 index 00000000..63648c38 --- /dev/null +++ b/rest/api/v3/teammates/docs/InviteTeammate201Response.md @@ -0,0 +1,14 @@ +# InviteTeammate201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Token** | **string** | Token to identify invite |[optional] +**Email** | **string** | Teammate's email address |[optional] +**Scopes** | **[]interface{}** | Initial set of permissions to give to teammate if they accept the invite |[optional] +**IsAdmin** | **bool** | Set to true if teammate should have admin privileges |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/InviteTeammate400Response.md b/rest/api/v3/teammates/docs/InviteTeammate400Response.md new file mode 100644 index 00000000..7d0f0c73 --- /dev/null +++ b/rest/api/v3/teammates/docs/InviteTeammate400Response.md @@ -0,0 +1,11 @@ +# InviteTeammate400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]InviteTeammate400ResponseErrorsInner**](InviteTeammate400ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/InviteTeammate400ResponseErrorsInner.md b/rest/api/v3/teammates/docs/InviteTeammate400ResponseErrorsInner.md new file mode 100644 index 00000000..6bf97048 --- /dev/null +++ b/rest/api/v3/teammates/docs/InviteTeammate400ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# InviteTeammate400ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | |[optional] +**Field** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/InviteTeammateRequest.md b/rest/api/v3/teammates/docs/InviteTeammateRequest.md new file mode 100644 index 00000000..5d3912fd --- /dev/null +++ b/rest/api/v3/teammates/docs/InviteTeammateRequest.md @@ -0,0 +1,13 @@ +# InviteTeammateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | New teammate's email | +**Scopes** | **[]string** | Set to specify list of scopes that teammate should have. Should be empty if teammate is an admin. | +**IsAdmin** | **bool** | Set to true if teammate should be an admin user |[default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/ListPendingTeammate.md b/rest/api/v3/teammates/docs/ListPendingTeammate.md new file mode 100644 index 00000000..84312df6 --- /dev/null +++ b/rest/api/v3/teammates/docs/ListPendingTeammate.md @@ -0,0 +1,48 @@ +# ListPendingTeammate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListPendingTeammate**](ListPendingTeammate.md#ListPendingTeammate) | **Get** /v3/teammates/pending | Retrieve all pending teammates + + + +## ListPendingTeammate + +> ListPendingTeammate200Response ListPendingTeammate(ctx, optional) + +Retrieve all pending teammates + +**This endpoint allows you to retrieve a list of all pending Teammate invitations.** Each teammate invitation is valid for 7 days. Users may resend the invitation to refresh the expiration date. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListPendingTeammateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListPendingTeammate200Response**](ListPendingTeammate200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/teammates/docs/ListPendingTeammate200Response.md b/rest/api/v3/teammates/docs/ListPendingTeammate200Response.md new file mode 100644 index 00000000..acaf8ee6 --- /dev/null +++ b/rest/api/v3/teammates/docs/ListPendingTeammate200Response.md @@ -0,0 +1,11 @@ +# ListPendingTeammate200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ListPendingTeammate200ResponseResultInner**](ListPendingTeammate200ResponseResultInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/ListPendingTeammate200ResponseResultInner.md b/rest/api/v3/teammates/docs/ListPendingTeammate200ResponseResultInner.md new file mode 100644 index 00000000..e5ea2c9c --- /dev/null +++ b/rest/api/v3/teammates/docs/ListPendingTeammate200ResponseResultInner.md @@ -0,0 +1,15 @@ +# ListPendingTeammate200ResponseResultInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | Email address teammate invite will be sent to |[optional] +**Scopes** | **[]string** | List of permissions to give teammate if they accept |[optional] +**IsAdmin** | **bool** | Set to true to indicate teammate should have the same set of permissions as parent user |[optional] +**Token** | **string** | Invitation token used to identify user |[optional] +**ExpirationDate** | **int32** | timestamp indicates when invite will expire. Expiration is 7 days after invite creation |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/ListSubuserByTemplate.md b/rest/api/v3/teammates/docs/ListSubuserByTemplate.md new file mode 100644 index 00000000..828e71ce --- /dev/null +++ b/rest/api/v3/teammates/docs/ListSubuserByTemplate.md @@ -0,0 +1,54 @@ +# ListSubuserByTemplate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSubuserByTemplate**](ListSubuserByTemplate.md#ListSubuserByTemplate) | **Get** /v3/teammates/{TeammateName}/subuser_access | Get Teammate Subuser Access + + + +## ListSubuserByTemplate + +> ListSubuserByTemplate200Response ListSubuserByTemplate(ctx, TeammateNameoptional) + +Get Teammate Subuser Access + +**This operation allows you to retrieve the Subusers that can be accessed by a specified Teammate.** This operation will return the Subusers available to a Teammate, including the scopes available. If the Teammate is an administrator, all Subusers will be returned. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TeammateName** | **string** | The username of the Teammate for whom you want to retrieve Subuser access information. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSubuserByTemplateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**AfterSubuserId** | **int32** | The Subuser ID from which the API request will begin retrieving Subusers. This query parameter can be used in successive API calls to retrieve additional Subusers. +**Limit** | **int32** | Limit the number of Subusers to be returned. The default `limit` is `100` per request. +**Username** | **string** | A Subuser's username that will be used to filter the returned result. + +### Return type + +[**ListSubuserByTemplate200Response**](ListSubuserByTemplate200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/teammates/docs/ListSubuserByTemplate200Response.md b/rest/api/v3/teammates/docs/ListSubuserByTemplate200Response.md new file mode 100644 index 00000000..491b1817 --- /dev/null +++ b/rest/api/v3/teammates/docs/ListSubuserByTemplate200Response.md @@ -0,0 +1,13 @@ +# ListSubuserByTemplate200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**HasRestrictedSubuserAccess** | **bool** | When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. |[optional] +**SubuserAccess** | [**[]ListSubuserByTemplate200ResponseSubuserAccessInner**](ListSubuserByTemplate200ResponseSubuserAccessInner.md) | Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. |[optional] +**Metadata** | [**ListSubuserByTemplate200ResponseMetadata**](ListSubuserByTemplate200ResponseMetadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadata.md b/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadata.md new file mode 100644 index 00000000..ed90d06a --- /dev/null +++ b/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadata.md @@ -0,0 +1,11 @@ +# ListSubuserByTemplate200ResponseMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NextParams** | [**ListSubuserByTemplate200ResponseMetadataNextParams**](ListSubuserByTemplate200ResponseMetadataNextParams.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadataNextParams.md b/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadataNextParams.md new file mode 100644 index 00000000..66b7c05d --- /dev/null +++ b/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadataNextParams.md @@ -0,0 +1,13 @@ +# ListSubuserByTemplate200ResponseMetadataNextParams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Limit** | **int32** | The limit specified in the `limit` query parameter to constrain the number of Subusers returned. |[optional] +**AfterSubuserId** | **int32** | The `after_subuser_id` property represents the last processed Subuser. If the `after_subuser_id` property is `null`, there are no more entries available. |[optional] +**Username** | **string** | The username of a Subuser passed in the `name` query parameter to filter results by username. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseSubuserAccessInner.md b/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseSubuserAccessInner.md new file mode 100644 index 00000000..2264a516 --- /dev/null +++ b/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseSubuserAccessInner.md @@ -0,0 +1,16 @@ +# ListSubuserByTemplate200ResponseSubuserAccessInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The ID of a Subuser to which the Teammate has access. You can retrieve Subuser IDs from the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/). |[optional] +**Username** | **string** | The username of a Subuser to which the Teammate has access. |[optional] +**Email** | **string** | The email address of a Subuser to which the Teammate has access. |[optional] +**Disabled** | **bool** | Indicates if the Subuser is active for the SendGrid account. |[optional] +**PermissionType** | [**PermissionType**](PermissionType.md) | The level of access the Teammate has to the specified Subuser. This property value may be either `admin` or `restricted`. When is property is set to `restricted`, the Teammate has only the permissions assigned in the `scopes` property. |[optional] +**Scopes** | **[]string** | The permissions or scopes that the Teammate can access on behalf of the Subuser. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/ListSubuserByTemplate400Response.md b/rest/api/v3/teammates/docs/ListSubuserByTemplate400Response.md new file mode 100644 index 00000000..cce6bfd0 --- /dev/null +++ b/rest/api/v3/teammates/docs/ListSubuserByTemplate400Response.md @@ -0,0 +1,11 @@ +# ListSubuserByTemplate400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ListSubuserByTemplate400ResponseErrorsInner**](ListSubuserByTemplate400ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/ListSubuserByTemplate400ResponseErrorsInner.md b/rest/api/v3/teammates/docs/ListSubuserByTemplate400ResponseErrorsInner.md new file mode 100644 index 00000000..e82f043b --- /dev/null +++ b/rest/api/v3/teammates/docs/ListSubuserByTemplate400ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# ListSubuserByTemplate400ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | The message representing the error from the API. |[optional] +**Field** | **string** | The field associated with the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/ListTeammate.md b/rest/api/v3/teammates/docs/ListTeammate.md new file mode 100644 index 00000000..b2747274 --- /dev/null +++ b/rest/api/v3/teammates/docs/ListTeammate.md @@ -0,0 +1,50 @@ +# ListTeammate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListTeammate**](ListTeammate.md#ListTeammate) | **Get** /v3/teammates | Retrieve all teammates + + + +## ListTeammate + +> ListTeammate200Response ListTeammate(ctx, optional) + +Retrieve all teammates + +**This endpoint allows you to retrieve a paginated list of all current Teammates.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListTeammateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. The maximum page size for this endpoint is 500 items per page. +**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListTeammate200Response**](ListTeammate200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/teammates/docs/ListTeammate200Response.md b/rest/api/v3/teammates/docs/ListTeammate200Response.md new file mode 100644 index 00000000..8bbca76d --- /dev/null +++ b/rest/api/v3/teammates/docs/ListTeammate200Response.md @@ -0,0 +1,11 @@ +# ListTeammate200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ListTeammate200ResponseResultInner**](ListTeammate200ResponseResultInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/ListTeammate200ResponseResultInner.md b/rest/api/v3/teammates/docs/ListTeammate200ResponseResultInner.md new file mode 100644 index 00000000..d7a2c068 --- /dev/null +++ b/rest/api/v3/teammates/docs/ListTeammate200ResponseResultInner.md @@ -0,0 +1,24 @@ +# ListTeammate200ResponseResultInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | Teammate's username |[optional] +**Email** | **string** | Teammate's email |[optional] +**FirstName** | **string** | Teammate's first name |[optional] +**LastName** | **string** | Teammate's last name |[optional] +**UserType** | [**UserType**](UserType.md) | Indicate the type of user: owner user, teammate admin user, or normal teammate |[optional] +**IsAdmin** | **bool** | Set to true if teammate has admin privileges |[optional] +**Phone** | **string** | (optional) Teammate's phone number |[optional] +**Website** | **string** | (optional) Teammate's website |[optional] +**Address** | **string** | (optional) Teammate's address |[optional] +**Address2** | **string** | (optional) Teammate's address |[optional] +**City** | **string** | (optional) Teammate's city |[optional] +**State** | **string** | (optional) Teammate's state |[optional] +**Zip** | **string** | (optional) Teammate's zip |[optional] +**Country** | **string** | (optional) Teammate's country |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/PermissionType.md b/rest/api/v3/teammates/docs/PermissionType.md new file mode 100644 index 00000000..da44f853 --- /dev/null +++ b/rest/api/v3/teammates/docs/PermissionType.md @@ -0,0 +1,13 @@ +# PermissionType + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**ADMIN** | string | (value: `"admin"`) +**RESTRICTED** | string | (value: `"restricted"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/ResendTeammateInvite.md b/rest/api/v3/teammates/docs/ResendTeammateInvite.md new file mode 100644 index 00000000..24f8e42d --- /dev/null +++ b/rest/api/v3/teammates/docs/ResendTeammateInvite.md @@ -0,0 +1,52 @@ +# ResendTeammateInvite + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ResendTeammateInvite**](ResendTeammateInvite.md#ResendTeammateInvite) | **Post** /v3/teammates/pending/{Token}/resend | Resend teammate invite + + + +## ResendTeammateInvite + +> ResendTeammateInvite200Response ResendTeammateInvite(ctx, Tokenoptional) + +Resend teammate invite + +**This endpoint allows you to resend a Teammate invitation.** Teammate invitations will expire after 7 days. Resending an invitation will reset the expiration date. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Token** | **string** | The token for the invite that you want to resend. + +### Other Parameters + +Other parameters are passed through a pointer to a ResendTeammateInviteParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ResendTeammateInvite200Response**](ResendTeammateInvite200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/teammates/docs/ResendTeammateInvite200Response.md b/rest/api/v3/teammates/docs/ResendTeammateInvite200Response.md new file mode 100644 index 00000000..c203789a --- /dev/null +++ b/rest/api/v3/teammates/docs/ResendTeammateInvite200Response.md @@ -0,0 +1,14 @@ +# ResendTeammateInvite200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Token** | **string** | ID to identify invite |[optional] +**Email** | **string** | Teammate's email address |[optional] +**Scopes** | **[]string** | Initial set of permissions to give to teammate if they accept the invite |[optional] +**IsAdmin** | **bool** | Set to true if teammate should have admin privileges |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/UpdateTeammate.md b/rest/api/v3/teammates/docs/UpdateTeammate.md new file mode 100644 index 00000000..593e02cd --- /dev/null +++ b/rest/api/v3/teammates/docs/UpdateTeammate.md @@ -0,0 +1,53 @@ +# UpdateTeammate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateTeammate**](UpdateTeammate.md#UpdateTeammate) | **Patch** /v3/teammates/{Username} | Update teammate's permissions + + + +## UpdateTeammate + +> UpdateTeammate200Response UpdateTeammate(ctx, Usernameoptional) + +Update teammate's permissions + +**This endpoint allows you to update a teammate’s permissions.** To turn a teammate into an admin, the request body should contain an `is_admin` set to `true`. Otherwise, set `is_admin` to `false` and pass in all the scopes that a teammate should have. **Only the parent user or other admin teammates can update another teammate’s permissions.** **Admin users can only update permissions.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Username** | **string** | The username of the teammate that you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateTeammateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateTeammateRequest** | [**UpdateTeammateRequest**](UpdateTeammateRequest.md) | + +### Return type + +[**UpdateTeammate200Response**](UpdateTeammate200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/teammates/docs/UpdateTeammate200Response.md b/rest/api/v3/teammates/docs/UpdateTeammate200Response.md new file mode 100644 index 00000000..65414c2e --- /dev/null +++ b/rest/api/v3/teammates/docs/UpdateTeammate200Response.md @@ -0,0 +1,25 @@ +# UpdateTeammate200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | Teammate's username |[optional] +**FirstName** | **string** | Teammate's first name |[optional] +**LastName** | **string** | Teammate's last name |[optional] +**Email** | **string** | Teammate's email address |[optional] +**Scopes** | **[]string** | Scopes given to teammate |[optional] +**UserType** | [**UserType2**](UserType2.md) | Indicate the type of user: owner user, teammate admin user, or normal teammate |[optional] +**IsAdmin** | **bool** | Set to true if teammate has admin priveleges |[optional] +**Phone** | **string** | (optional) Teammate's phone number |[optional] +**Website** | **string** | (optional) Teammate's website |[optional] +**Address** | **string** | (optional) Teammate's address |[optional] +**Address2** | **string** | (optional) Teammate's address |[optional] +**City** | **string** | (optional) Teammate's city |[optional] +**State** | **string** | (optional) Teammate's state |[optional] +**Zip** | **string** | (optional) Teammate's zip |[optional] +**Country** | **string** | (optional) Teammate's country |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/UpdateTeammateRequest.md b/rest/api/v3/teammates/docs/UpdateTeammateRequest.md new file mode 100644 index 00000000..ca9956e0 --- /dev/null +++ b/rest/api/v3/teammates/docs/UpdateTeammateRequest.md @@ -0,0 +1,12 @@ +# UpdateTeammateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Scopes** | **[]string** | Provide list of scopes that should be given to teammate. If specifying list of scopes, is_admin should be set to False. | +**IsAdmin** | **bool** | Set to True if this teammate should be promoted to an admin user. If True, scopes should be an empty array. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/UserType.md b/rest/api/v3/teammates/docs/UserType.md new file mode 100644 index 00000000..f9f8db1d --- /dev/null +++ b/rest/api/v3/teammates/docs/UserType.md @@ -0,0 +1,14 @@ +# UserType + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**ADMIN** | string | (value: `"admin"`) +**OWNER** | string | (value: `"owner"`) +**TEAMMATE** | string | (value: `"teammate"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/UserType1.md b/rest/api/v3/teammates/docs/UserType1.md new file mode 100644 index 00000000..008e09e1 --- /dev/null +++ b/rest/api/v3/teammates/docs/UserType1.md @@ -0,0 +1,14 @@ +# UserType1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**ADMIN** | string | (value: `"admin"`) +**OWNER** | string | (value: `"owner"`) +**TEAMMATE** | string | (value: `"teammate"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/UserType2.md b/rest/api/v3/teammates/docs/UserType2.md new file mode 100644 index 00000000..59679096 --- /dev/null +++ b/rest/api/v3/teammates/docs/UserType2.md @@ -0,0 +1,14 @@ +# UserType2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**ADMIN** | string | (value: `"admin"`) +**OWNER** | string | (value: `"owner"`) +**TEAMMATE** | string | (value: `"teammate"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/model_get_teammate_200_response.go b/rest/api/v3/teammates/model_get_teammate_200_response.go new file mode 100644 index 00000000..a1c30f71 --- /dev/null +++ b/rest/api/v3/teammates/model_get_teammate_200_response.go @@ -0,0 +1,48 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetTeammate200Response struct for GetTeammate200Response +type GetTeammate200Response struct { + // Teammate's username + Username *string `json:"username,omitempty"` + // Teammate's first name + FirstName *string `json:"first_name,omitempty"` + // Teammate's last name + LastName *string `json:"last_name,omitempty"` + // Teammate's email + Email *string `json:"email,omitempty"` + // Scopes associated to teammate + Scopes *[]interface{} `json:"scopes,omitempty"` + // Indicate the type of user: account owner, teammate admin user, or normal teammate + UserType *UserType1 `json:"user_type,omitempty"` + // Set to true if teammate has admin privileges + IsAdmin *bool `json:"is_admin,omitempty"` + // (optional) Teammate's phone number + Phone *string `json:"phone,omitempty"` + // (optional) Teammate's website + Website *string `json:"website,omitempty"` + // (optional) Teammate's address + Address *string `json:"address,omitempty"` + // (optional) Teammate's address + Address2 *string `json:"address2,omitempty"` + // (optional) Teammate's city + City *string `json:"city,omitempty"` + // (optional) Teammate's state + State *string `json:"state,omitempty"` + // (optional) Teammate's zip + Zip *string `json:"zip,omitempty"` + // (optional) Teammate's country + Country *string `json:"country,omitempty"` +} diff --git a/rest/api/v3/teammates/model_invite_teammate_201_response.go b/rest/api/v3/teammates/model_invite_teammate_201_response.go new file mode 100644 index 00000000..ae183bf4 --- /dev/null +++ b/rest/api/v3/teammates/model_invite_teammate_201_response.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// InviteTeammate201Response struct for InviteTeammate201Response +type InviteTeammate201Response struct { + // Token to identify invite + Token *string `json:"token,omitempty"` + // Teammate's email address + Email *string `json:"email,omitempty"` + // Initial set of permissions to give to teammate if they accept the invite + Scopes *[]interface{} `json:"scopes,omitempty"` + // Set to true if teammate should have admin privileges + IsAdmin *bool `json:"is_admin,omitempty"` +} diff --git a/rest/api/v3/teammates/model_invite_teammate_400_response.go b/rest/api/v3/teammates/model_invite_teammate_400_response.go new file mode 100644 index 00000000..f3bd0fd1 --- /dev/null +++ b/rest/api/v3/teammates/model_invite_teammate_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// InviteTeammate400Response struct for InviteTeammate400Response +type InviteTeammate400Response struct { + Errors *[]InviteTeammate400ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/teammates/model_invite_teammate_400_response_errors_inner.go b/rest/api/v3/teammates/model_invite_teammate_400_response_errors_inner.go new file mode 100644 index 00000000..e21587e5 --- /dev/null +++ b/rest/api/v3/teammates/model_invite_teammate_400_response_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// InviteTeammate400ResponseErrorsInner struct for InviteTeammate400ResponseErrorsInner +type InviteTeammate400ResponseErrorsInner struct { + Message *string `json:"message,omitempty"` + Field *string `json:"field,omitempty"` +} diff --git a/rest/api/v3/teammates/model_invite_teammate_request.go b/rest/api/v3/teammates/model_invite_teammate_request.go new file mode 100644 index 00000000..ee0342cd --- /dev/null +++ b/rest/api/v3/teammates/model_invite_teammate_request.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// InviteTeammateRequest struct for InviteTeammateRequest +type InviteTeammateRequest struct { + // New teammate's email + Email string `json:"email"` + // Set to specify list of scopes that teammate should have. Should be empty if teammate is an admin. + Scopes []string `json:"scopes"` + // Set to true if teammate should be an admin user + IsAdmin bool `json:"is_admin"` +} diff --git a/rest/api/v3/teammates/model_list_pending_teammate_200_response.go b/rest/api/v3/teammates/model_list_pending_teammate_200_response.go new file mode 100644 index 00000000..e23aa0d5 --- /dev/null +++ b/rest/api/v3/teammates/model_list_pending_teammate_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListPendingTeammate200Response struct for ListPendingTeammate200Response +type ListPendingTeammate200Response struct { + Result *[]ListPendingTeammate200ResponseResultInner `json:"result,omitempty"` +} diff --git a/rest/api/v3/teammates/model_list_pending_teammate_200_response_result_inner.go b/rest/api/v3/teammates/model_list_pending_teammate_200_response_result_inner.go new file mode 100644 index 00000000..2ec83181 --- /dev/null +++ b/rest/api/v3/teammates/model_list_pending_teammate_200_response_result_inner.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListPendingTeammate200ResponseResultInner struct for ListPendingTeammate200ResponseResultInner +type ListPendingTeammate200ResponseResultInner struct { + // Email address teammate invite will be sent to + Email *string `json:"email,omitempty"` + // List of permissions to give teammate if they accept + Scopes *[]string `json:"scopes,omitempty"` + // Set to true to indicate teammate should have the same set of permissions as parent user + IsAdmin *bool `json:"is_admin,omitempty"` + // Invitation token used to identify user + Token *string `json:"token,omitempty"` + // timestamp indicates when invite will expire. Expiration is 7 days after invite creation + ExpirationDate *int32 `json:"expiration_date,omitempty"` +} diff --git a/rest/api/v3/teammates/model_list_subuser_by_template_200_response.go b/rest/api/v3/teammates/model_list_subuser_by_template_200_response.go new file mode 100644 index 00000000..6b55158e --- /dev/null +++ b/rest/api/v3/teammates/model_list_subuser_by_template_200_response.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSubuserByTemplate200Response struct for ListSubuserByTemplate200Response +type ListSubuserByTemplate200Response struct { + // When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. + HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"` + // Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. + SubuserAccess *[]ListSubuserByTemplate200ResponseSubuserAccessInner `json:"subuser_access,omitempty"` + Metadata *ListSubuserByTemplate200ResponseMetadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata.go b/rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata.go new file mode 100644 index 00000000..4c207d5e --- /dev/null +++ b/rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSubuserByTemplate200ResponseMetadata This object contains response metadata. The presence of the `after_subuser_id` property in the metadata indicates that some items are still outstanding and have not been retrieved. You can use the `after_subuser_id` value to retrieve additional items with another request. +type ListSubuserByTemplate200ResponseMetadata struct { + NextParams *ListSubuserByTemplate200ResponseMetadataNextParams `json:"next_params,omitempty"` +} diff --git a/rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata_next_params.go b/rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata_next_params.go new file mode 100644 index 00000000..c28bf633 --- /dev/null +++ b/rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata_next_params.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSubuserByTemplate200ResponseMetadataNextParams struct for ListSubuserByTemplate200ResponseMetadataNextParams +type ListSubuserByTemplate200ResponseMetadataNextParams struct { + // The limit specified in the `limit` query parameter to constrain the number of Subusers returned. + Limit *int32 `json:"limit,omitempty"` + // The `after_subuser_id` property represents the last processed Subuser. If the `after_subuser_id` property is `null`, there are no more entries available. + AfterSubuserId *int32 `json:"after_subuser_id,omitempty"` + // The username of a Subuser passed in the `name` query parameter to filter results by username. + Username *string `json:"username,omitempty"` +} diff --git a/rest/api/v3/teammates/model_list_subuser_by_template_200_response_subuser_access_inner.go b/rest/api/v3/teammates/model_list_subuser_by_template_200_response_subuser_access_inner.go new file mode 100644 index 00000000..100906bb --- /dev/null +++ b/rest/api/v3/teammates/model_list_subuser_by_template_200_response_subuser_access_inner.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSubuserByTemplate200ResponseSubuserAccessInner An array of Subusers to which the Teammate has access. +type ListSubuserByTemplate200ResponseSubuserAccessInner struct { + // The ID of a Subuser to which the Teammate has access. You can retrieve Subuser IDs from the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/). + Id *int32 `json:"id,omitempty"` + // The username of a Subuser to which the Teammate has access. + Username *string `json:"username,omitempty"` + // The email address of a Subuser to which the Teammate has access. + Email *string `json:"email,omitempty"` + // Indicates if the Subuser is active for the SendGrid account. + Disabled *bool `json:"disabled,omitempty"` + // The level of access the Teammate has to the specified Subuser. This property value may be either `admin` or `restricted`. When is property is set to `restricted`, the Teammate has only the permissions assigned in the `scopes` property. + PermissionType *PermissionType `json:"permission_type,omitempty"` + // The permissions or scopes that the Teammate can access on behalf of the Subuser. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. + Scopes *[]string `json:"scopes,omitempty"` +} diff --git a/rest/api/v3/teammates/model_list_subuser_by_template_400_response.go b/rest/api/v3/teammates/model_list_subuser_by_template_400_response.go new file mode 100644 index 00000000..a404698d --- /dev/null +++ b/rest/api/v3/teammates/model_list_subuser_by_template_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSubuserByTemplate400Response An object containing an array of errors objects. +type ListSubuserByTemplate400Response struct { + Errors *[]ListSubuserByTemplate400ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/teammates/model_list_subuser_by_template_400_response_errors_inner.go b/rest/api/v3/teammates/model_list_subuser_by_template_400_response_errors_inner.go new file mode 100644 index 00000000..8a442ec9 --- /dev/null +++ b/rest/api/v3/teammates/model_list_subuser_by_template_400_response_errors_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSubuserByTemplate400ResponseErrorsInner struct for ListSubuserByTemplate400ResponseErrorsInner +type ListSubuserByTemplate400ResponseErrorsInner struct { + // The message representing the error from the API. + Message *string `json:"message,omitempty"` + // The field associated with the error. + Field *string `json:"field,omitempty"` +} diff --git a/rest/api/v3/teammates/model_list_teammate_200_response.go b/rest/api/v3/teammates/model_list_teammate_200_response.go new file mode 100644 index 00000000..09609911 --- /dev/null +++ b/rest/api/v3/teammates/model_list_teammate_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListTeammate200Response struct for ListTeammate200Response +type ListTeammate200Response struct { + Result *[]ListTeammate200ResponseResultInner `json:"result,omitempty"` +} diff --git a/rest/api/v3/teammates/model_list_teammate_200_response_result_inner.go b/rest/api/v3/teammates/model_list_teammate_200_response_result_inner.go new file mode 100644 index 00000000..c0a8d40c --- /dev/null +++ b/rest/api/v3/teammates/model_list_teammate_200_response_result_inner.go @@ -0,0 +1,46 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListTeammate200ResponseResultInner struct for ListTeammate200ResponseResultInner +type ListTeammate200ResponseResultInner struct { + // Teammate's username + Username *string `json:"username,omitempty"` + // Teammate's email + Email *string `json:"email,omitempty"` + // Teammate's first name + FirstName *string `json:"first_name,omitempty"` + // Teammate's last name + LastName *string `json:"last_name,omitempty"` + // Indicate the type of user: owner user, teammate admin user, or normal teammate + UserType *UserType `json:"user_type,omitempty"` + // Set to true if teammate has admin privileges + IsAdmin *bool `json:"is_admin,omitempty"` + // (optional) Teammate's phone number + Phone *string `json:"phone,omitempty"` + // (optional) Teammate's website + Website *string `json:"website,omitempty"` + // (optional) Teammate's address + Address *string `json:"address,omitempty"` + // (optional) Teammate's address + Address2 *string `json:"address2,omitempty"` + // (optional) Teammate's city + City *string `json:"city,omitempty"` + // (optional) Teammate's state + State *string `json:"state,omitempty"` + // (optional) Teammate's zip + Zip *string `json:"zip,omitempty"` + // (optional) Teammate's country + Country *string `json:"country,omitempty"` +} diff --git a/rest/api/v3/teammates/model_permission_type.go b/rest/api/v3/teammates/model_permission_type.go new file mode 100644 index 00000000..b581984f --- /dev/null +++ b/rest/api/v3/teammates/model_permission_type.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// PermissionType the model 'PermissionType' +type PermissionType string + +// List of PermissionType +const ( + PERMISSIONTYPE_ADMIN PermissionType = "admin" + PERMISSIONTYPE_RESTRICTED PermissionType = "restricted" +) diff --git a/rest/api/v3/teammates/model_resend_teammate_invite_200_response.go b/rest/api/v3/teammates/model_resend_teammate_invite_200_response.go new file mode 100644 index 00000000..a229bfa2 --- /dev/null +++ b/rest/api/v3/teammates/model_resend_teammate_invite_200_response.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ResendTeammateInvite200Response struct for ResendTeammateInvite200Response +type ResendTeammateInvite200Response struct { + // ID to identify invite + Token *string `json:"token,omitempty"` + // Teammate's email address + Email *string `json:"email,omitempty"` + // Initial set of permissions to give to teammate if they accept the invite + Scopes *[]string `json:"scopes,omitempty"` + // Set to true if teammate should have admin privileges + IsAdmin *bool `json:"is_admin,omitempty"` +} diff --git a/rest/api/v3/teammates/model_update_teammate_200_response.go b/rest/api/v3/teammates/model_update_teammate_200_response.go new file mode 100644 index 00000000..37332bfe --- /dev/null +++ b/rest/api/v3/teammates/model_update_teammate_200_response.go @@ -0,0 +1,48 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateTeammate200Response struct for UpdateTeammate200Response +type UpdateTeammate200Response struct { + // Teammate's username + Username *string `json:"username,omitempty"` + // Teammate's first name + FirstName *string `json:"first_name,omitempty"` + // Teammate's last name + LastName *string `json:"last_name,omitempty"` + // Teammate's email address + Email *string `json:"email,omitempty"` + // Scopes given to teammate + Scopes *[]string `json:"scopes,omitempty"` + // Indicate the type of user: owner user, teammate admin user, or normal teammate + UserType *UserType2 `json:"user_type,omitempty"` + // Set to true if teammate has admin priveleges + IsAdmin *bool `json:"is_admin,omitempty"` + // (optional) Teammate's phone number + Phone *string `json:"phone,omitempty"` + // (optional) Teammate's website + Website *string `json:"website,omitempty"` + // (optional) Teammate's address + Address *string `json:"address,omitempty"` + // (optional) Teammate's address + Address2 *string `json:"address2,omitempty"` + // (optional) Teammate's city + City *string `json:"city,omitempty"` + // (optional) Teammate's state + State *string `json:"state,omitempty"` + // (optional) Teammate's zip + Zip *string `json:"zip,omitempty"` + // (optional) Teammate's country + Country *string `json:"country,omitempty"` +} diff --git a/rest/api/v3/teammates/model_update_teammate_request.go b/rest/api/v3/teammates/model_update_teammate_request.go new file mode 100644 index 00000000..a7869ed0 --- /dev/null +++ b/rest/api/v3/teammates/model_update_teammate_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateTeammateRequest struct for UpdateTeammateRequest +type UpdateTeammateRequest struct { + // Provide list of scopes that should be given to teammate. If specifying list of scopes, is_admin should be set to False. + Scopes []string `json:"scopes"` + // Set to True if this teammate should be promoted to an admin user. If True, scopes should be an empty array. + IsAdmin bool `json:"is_admin"` +} diff --git a/rest/api/v3/teammates/model_user_type.go b/rest/api/v3/teammates/model_user_type.go new file mode 100644 index 00000000..ca06b801 --- /dev/null +++ b/rest/api/v3/teammates/model_user_type.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UserType the model 'UserType' +type UserType string + +// List of UserType +const ( + USERTYPE_ADMIN UserType = "admin" + USERTYPE_OWNER UserType = "owner" + USERTYPE_TEAMMATE UserType = "teammate" +) diff --git a/rest/api/v3/teammates/model_user_type1.go b/rest/api/v3/teammates/model_user_type1.go new file mode 100644 index 00000000..133a3591 --- /dev/null +++ b/rest/api/v3/teammates/model_user_type1.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UserType1 the model 'UserType1' +type UserType1 string + +// List of UserType1 +const ( + USERTYPE1_ADMIN UserType1 = "admin" + USERTYPE1_OWNER UserType1 = "owner" + USERTYPE1_TEAMMATE UserType1 = "teammate" +) diff --git a/rest/api/v3/teammates/model_user_type2.go b/rest/api/v3/teammates/model_user_type2.go new file mode 100644 index 00000000..4dcb15df --- /dev/null +++ b/rest/api/v3/teammates/model_user_type2.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UserType2 the model 'UserType2' +type UserType2 string + +// List of UserType2 +const ( + USERTYPE2_ADMIN UserType2 = "admin" + USERTYPE2_OWNER UserType2 = "owner" + USERTYPE2_TEAMMATE UserType2 = "teammate" +) diff --git a/rest/api/v3/templates/.openapi-generator b/rest/api/v3/templates/.openapi-generator new file mode 100644 index 00000000..15d4d7d4 --- /dev/null +++ b/rest/api/v3/templates/.openapi-generator @@ -0,0 +1,65 @@ +.openapi-generator +README.md +api_activate_template_version.go +api_create_template.go +api_create_template_version.go +api_delete_template.go +api_delete_template_version.go +api_duplicate_template.go +api_get_template.go +api_get_template_version.go +api_list_template.go +api_service.go +api_update_template.go +api_update_template_version.go +docs/ActivateTemplateVersion.md +docs/Active.md +docs/Active1.md +docs/CreateTemplate.md +docs/CreateTemplateRequest.md +docs/CreateTemplateVersion.md +docs/DeleteTemplate.md +docs/DeleteTemplateVersion.md +docs/DuplicateTemplate.md +docs/DuplicateTemplateRequest.md +docs/Editor.md +docs/Editor1.md +docs/Generation.md +docs/Generation1.md +docs/Generations.md +docs/GetTemplate.md +docs/GetTemplateVersion.md +docs/ListTemplate.md +docs/ListTemplate200Response.md +docs/ListTemplate400Response.md +docs/ListTemplate400ResponseErrorsInner.md +docs/Metadata.md +docs/TransactionalTemplate.md +docs/TransactionalTemplateVersionCreate.md +docs/TransactionalTemplateVersionOutput.md +docs/TransactionalTemplateWarning.md +docs/TransactionalTemplatesTemplateLean.md +docs/TransactionalTemplatesVersionOutputLean.md +docs/UpdateTemplate.md +docs/UpdateTemplateRequest.md +docs/UpdateTemplateVersion.md +model_active.go +model_active1.go +model_create_template_request.go +model_duplicate_template_request.go +model_editor.go +model_editor1.go +model_generation.go +model_generation1.go +model_generations.go +model_list_template_200_response.go +model_list_template_400_response.go +model_list_template_400_response_errors_inner.go +model_metadata.go +model_transactional_template.go +model_transactional_template_version_create.go +model_transactional_template_version_output.go +model_transactional_template_warning.go +model_transactional_templates_template_lean.go +model_transactional_templates_version_output_lean.go +model_update_template_request.go diff --git a/rest/api/v3/templates/.openapi-generator-ignore b/rest/api/v3/templates/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/templates/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/templates/README.md b/rest/api/v3/templates/README.md new file mode 100644 index 00000000..d37cb730 --- /dev/null +++ b/rest/api/v3/templates/README.md @@ -0,0 +1,93 @@ +# Go API client for + +The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. + +This API provides operations to create and manage your templates as well as their versions. + +Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:44.535845+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ActivateTemplateVersion* | [**ActivateTemplateVersion**](docs/ActivateTemplateVersion.md#activatetemplateversion) | **Post** /v3/templates/{TemplateId}/versions/{VersionId}/activate | Activate a transactional template version. +*CreateTemplate* | [**CreateTemplate**](docs/CreateTemplate.md#createtemplate) | **Post** /v3/templates | Create a transactional template. +*CreateTemplateVersion* | [**CreateTemplateVersion**](docs/CreateTemplateVersion.md#createtemplateversion) | **Post** /v3/templates/{TemplateId}/versions | Create a new transactional template version. +*DeleteTemplate* | [**DeleteTemplate**](docs/DeleteTemplate.md#deletetemplate) | **Delete** /v3/templates/{TemplateId} | Delete a template. +*DeleteTemplateVersion* | [**DeleteTemplateVersion**](docs/DeleteTemplateVersion.md#deletetemplateversion) | **Delete** /v3/templates/{TemplateId}/versions/{VersionId} | Delete a transactional template version. +*DuplicateTemplate* | [**DuplicateTemplate**](docs/DuplicateTemplate.md#duplicatetemplate) | **Post** /v3/templates/{TemplateId} | Duplicate a transactional template. +*GetTemplate* | [**GetTemplate**](docs/GetTemplate.md#gettemplate) | **Get** /v3/templates/{TemplateId} | Retrieve a single transactional template. +*GetTemplateVersion* | [**GetTemplateVersion**](docs/GetTemplateVersion.md#gettemplateversion) | **Get** /v3/templates/{TemplateId}/versions/{VersionId} | Retrieve a specific transactional template version. +*ListTemplate* | [**ListTemplate**](docs/ListTemplate.md#listtemplate) | **Get** /v3/templates | Retrieve paged transactional templates. +*UpdateTemplate* | [**UpdateTemplate**](docs/UpdateTemplate.md#updatetemplate) | **Patch** /v3/templates/{TemplateId} | Edit a transactional template. +*UpdateTemplateVersion* | [**UpdateTemplateVersion**](docs/UpdateTemplateVersion.md#updatetemplateversion) | **Patch** /v3/templates/{TemplateId}/versions/{VersionId} | Edit a transactional template version. + + +## Documentation For Models + + - [Active](Active.md) + - [Active1](Active1.md) + - [CreateTemplateRequest](CreateTemplateRequest.md) + - [DuplicateTemplateRequest](DuplicateTemplateRequest.md) + - [Editor](Editor.md) + - [Editor1](Editor1.md) + - [Generation](Generation.md) + - [Generation1](Generation1.md) + - [Generations](Generations.md) + - [ListTemplate200Response](ListTemplate200Response.md) + - [ListTemplate400Response](ListTemplate400Response.md) + - [ListTemplate400ResponseErrorsInner](ListTemplate400ResponseErrorsInner.md) + - [Metadata](Metadata.md) + - [TransactionalTemplate](TransactionalTemplate.md) + - [TransactionalTemplateVersionCreate](TransactionalTemplateVersionCreate.md) + - [TransactionalTemplateVersionOutput](TransactionalTemplateVersionOutput.md) + - [TransactionalTemplateWarning](TransactionalTemplateWarning.md) + - [TransactionalTemplatesTemplateLean](TransactionalTemplatesTemplateLean.md) + - [TransactionalTemplatesVersionOutputLean](TransactionalTemplatesVersionOutputLean.md) + - [UpdateTemplateRequest](UpdateTemplateRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/templates/api_activate_template_version.go b/rest/api/v3/templates/api_activate_template_version.go new file mode 100644 index 00000000..defc3076 --- /dev/null +++ b/rest/api/v3/templates/api_activate_template_version.go @@ -0,0 +1,78 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type ActivateTemplateVersionParam struct { + // The ID of the original template + TemplateId *string `json:"template_id"` + // The ID of the template version + VersionId *string `json:"version_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ActivateTemplateVersionParam) SetTemplateId(TemplateId string) *ActivateTemplateVersionParam { + params.TemplateId = &TemplateId + return params +} +func (params *ActivateTemplateVersionParam) SetVersionId(VersionId string) *ActivateTemplateVersionParam { + params.VersionId = &VersionId + return params +} +func (params *ActivateTemplateVersionParam) SetOnbehalfof(Onbehalfof string) *ActivateTemplateVersionParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to activate a version of one of your templates.** +func (c *ApiService) ActivateTemplateVersion(params *ActivateTemplateVersionParam) (interface{}, error) { + path := "/v3/templates/{TemplateId}/versions/{VersionId}/activate" + if params != nil && params.TemplateId != nil { + path = strings.Replace(path, "{"+"TemplateId"+"}", *params.TemplateId, -1) + } + if params != nil && params.VersionId != nil { + path = strings.Replace(path, "{"+"VersionId"+"}", *params.VersionId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &TransactionalTemplateVersionOutput{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/templates/api_create_template.go b/rest/api/v3/templates/api_create_template.go new file mode 100644 index 00000000..783d94aa --- /dev/null +++ b/rest/api/v3/templates/api_create_template.go @@ -0,0 +1,73 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type CreateTemplateParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + CreateTemplateRequest *CreateTemplateRequest `json:"CreateTemplateRequest,omitempty"` +} + +func (params *CreateTemplateParam) SetOnbehalfof(Onbehalfof string) *CreateTemplateParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateTemplateParam) SetCreateTemplateRequest(CreateTemplateRequest CreateTemplateRequest) *CreateTemplateParam { + params.CreateTemplateRequest = &CreateTemplateRequest + return params +} + +// **This endpoint allows you to create a transactional template.** +func (c *ApiService) CreateTemplate(params *CreateTemplateParam) (interface{}, error) { + path := "/v3/templates" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateTemplateRequest != nil { + b, err := json.Marshal(*params.CreateTemplateRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &TransactionalTemplate{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/templates/api_create_template_version.go b/rest/api/v3/templates/api_create_template_version.go new file mode 100644 index 00000000..ca08ddff --- /dev/null +++ b/rest/api/v3/templates/api_create_template_version.go @@ -0,0 +1,84 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type CreateTemplateVersionParam struct { + // + TemplateId *string `json:"template_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + TransactionalTemplateVersionCreate *TransactionalTemplateVersionCreate `json:"TransactionalTemplateVersionCreate,omitempty"` +} + +func (params *CreateTemplateVersionParam) SetTemplateId(TemplateId string) *CreateTemplateVersionParam { + params.TemplateId = &TemplateId + return params +} +func (params *CreateTemplateVersionParam) SetOnbehalfof(Onbehalfof string) *CreateTemplateVersionParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateTemplateVersionParam) SetTransactionalTemplateVersionCreate(TransactionalTemplateVersionCreate TransactionalTemplateVersionCreate) *CreateTemplateVersionParam { + params.TransactionalTemplateVersionCreate = &TransactionalTemplateVersionCreate + return params +} + +// **This endpoint allows you to create a new version of a template.** +func (c *ApiService) CreateTemplateVersion(params *CreateTemplateVersionParam) (interface{}, error) { + path := "/v3/templates/{TemplateId}/versions" + if params != nil && params.TemplateId != nil { + path = strings.Replace(path, "{"+"TemplateId"+"}", *params.TemplateId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.TransactionalTemplateVersionCreate != nil { + b, err := json.Marshal(*params.TransactionalTemplateVersionCreate) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &TransactionalTemplateVersionOutput{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/templates/api_delete_template.go b/rest/api/v3/templates/api_delete_template.go new file mode 100644 index 00000000..01d3f63d --- /dev/null +++ b/rest/api/v3/templates/api_delete_template.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DeleteTemplateParam struct { + // + TemplateId *string `json:"template_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteTemplateParam) SetTemplateId(TemplateId string) *DeleteTemplateParam { + params.TemplateId = &TemplateId + return params +} +func (params *DeleteTemplateParam) SetOnbehalfof(Onbehalfof string) *DeleteTemplateParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete a transactional template.** +func (c *ApiService) DeleteTemplate(params *DeleteTemplateParam) (interface{}, error) { + path := "/v3/templates/{TemplateId}" + if params != nil && params.TemplateId != nil { + path = strings.Replace(path, "{"+"TemplateId"+"}", *params.TemplateId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/templates/api_delete_template_version.go b/rest/api/v3/templates/api_delete_template_version.go new file mode 100644 index 00000000..b80da19b --- /dev/null +++ b/rest/api/v3/templates/api_delete_template_version.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "net/url" + + "strings" +) + +type DeleteTemplateVersionParam struct { + // The ID of the original template + TemplateId *string `json:"template_id"` + // The ID of the template version + VersionId *string `json:"version_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteTemplateVersionParam) SetTemplateId(TemplateId string) *DeleteTemplateVersionParam { + params.TemplateId = &TemplateId + return params +} +func (params *DeleteTemplateVersionParam) SetVersionId(VersionId string) *DeleteTemplateVersionParam { + params.VersionId = &VersionId + return params +} +func (params *DeleteTemplateVersionParam) SetOnbehalfof(Onbehalfof string) *DeleteTemplateVersionParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete a transactional template version.** +func (c *ApiService) DeleteTemplateVersion(params *DeleteTemplateVersionParam) (interface{}, error) { + path := "/v3/templates/{TemplateId}/versions/{VersionId}" + if params != nil && params.TemplateId != nil { + path = strings.Replace(path, "{"+"TemplateId"+"}", *params.TemplateId, -1) + } + if params != nil && params.VersionId != nil { + path = strings.Replace(path, "{"+"VersionId"+"}", *params.VersionId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + return nil, nil +} diff --git a/rest/api/v3/templates/api_duplicate_template.go b/rest/api/v3/templates/api_duplicate_template.go new file mode 100644 index 00000000..a17e9178 --- /dev/null +++ b/rest/api/v3/templates/api_duplicate_template.go @@ -0,0 +1,84 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DuplicateTemplateParam struct { + // + TemplateId *string `json:"template_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + DuplicateTemplateRequest *DuplicateTemplateRequest `json:"DuplicateTemplateRequest,omitempty"` +} + +func (params *DuplicateTemplateParam) SetTemplateId(TemplateId string) *DuplicateTemplateParam { + params.TemplateId = &TemplateId + return params +} +func (params *DuplicateTemplateParam) SetOnbehalfof(Onbehalfof string) *DuplicateTemplateParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *DuplicateTemplateParam) SetDuplicateTemplateRequest(DuplicateTemplateRequest DuplicateTemplateRequest) *DuplicateTemplateParam { + params.DuplicateTemplateRequest = &DuplicateTemplateRequest + return params +} + +// **This endpoint allows you to duplicate a transactional template.** +func (c *ApiService) DuplicateTemplate(params *DuplicateTemplateParam) (interface{}, error) { + path := "/v3/templates/{TemplateId}" + if params != nil && params.TemplateId != nil { + path = strings.Replace(path, "{"+"TemplateId"+"}", *params.TemplateId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.DuplicateTemplateRequest != nil { + b, err := json.Marshal(*params.DuplicateTemplateRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &TransactionalTemplate{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/templates/api_get_template.go b/rest/api/v3/templates/api_get_template.go new file mode 100644 index 00000000..85c005b9 --- /dev/null +++ b/rest/api/v3/templates/api_get_template.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type GetTemplateParam struct { + // + TemplateId *string `json:"template_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetTemplateParam) SetTemplateId(TemplateId string) *GetTemplateParam { + params.TemplateId = &TemplateId + return params +} +func (params *GetTemplateParam) SetOnbehalfof(Onbehalfof string) *GetTemplateParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a single transactional template.** +func (c *ApiService) GetTemplate(params *GetTemplateParam) (interface{}, error) { + path := "/v3/templates/{TemplateId}" + if params != nil && params.TemplateId != nil { + path = strings.Replace(path, "{"+"TemplateId"+"}", *params.TemplateId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &TransactionalTemplate{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/templates/api_get_template_version.go b/rest/api/v3/templates/api_get_template_version.go new file mode 100644 index 00000000..13d44a21 --- /dev/null +++ b/rest/api/v3/templates/api_get_template_version.go @@ -0,0 +1,78 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type GetTemplateVersionParam struct { + // The ID of the original template + TemplateId *string `json:"template_id"` + // The ID of the template version + VersionId *string `json:"version_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetTemplateVersionParam) SetTemplateId(TemplateId string) *GetTemplateVersionParam { + params.TemplateId = &TemplateId + return params +} +func (params *GetTemplateVersionParam) SetVersionId(VersionId string) *GetTemplateVersionParam { + params.VersionId = &VersionId + return params +} +func (params *GetTemplateVersionParam) SetOnbehalfof(Onbehalfof string) *GetTemplateVersionParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a specific version of a template.** +func (c *ApiService) GetTemplateVersion(params *GetTemplateVersionParam) (interface{}, error) { + path := "/v3/templates/{TemplateId}/versions/{VersionId}" + if params != nil && params.TemplateId != nil { + path = strings.Replace(path, "{"+"TemplateId"+"}", *params.TemplateId, -1) + } + if params != nil && params.VersionId != nil { + path = strings.Replace(path, "{"+"VersionId"+"}", *params.VersionId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &TransactionalTemplateVersionOutput{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/templates/api_list_template.go b/rest/api/v3/templates/api_list_template.go new file mode 100644 index 00000000..2f66317f --- /dev/null +++ b/rest/api/v3/templates/api_list_template.go @@ -0,0 +1,95 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListTemplateParam struct { + // The number of templates to be returned in each page of results + PageSize *float32 `json:"page_size"` + // Comma-delimited list specifying which generations of templates to return. Options are `legacy`, `dynamic` or `legacy,dynamic`. + Generations *Generations `json:"generations,omitempty"` + // A token corresponding to a specific page of results, as provided by metadata + PageToken *string `json:"page_token,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListTemplateParam) SetPageSize(PageSize float32) *ListTemplateParam { + params.PageSize = &PageSize + return params +} +func (params *ListTemplateParam) SetGenerations(Generations Generations) *ListTemplateParam { + params.Generations = &Generations + return params +} +func (params *ListTemplateParam) SetPageToken(PageToken string) *ListTemplateParam { + params.PageToken = &PageToken + return params +} +func (params *ListTemplateParam) SetOnbehalfof(Onbehalfof string) *ListTemplateParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve all transactional templates.** +func (c *ApiService) ListTemplate(params *ListTemplateParam) (interface{}, error) { + path := "/v3/templates" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + if params != nil && params.Generations != nil { + data.Set("generations", fmt.Sprint(*params.Generations)) + } + if params != nil && params.PageToken != nil { + data.Set("page_token", *params.PageToken) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListTemplate200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ListTemplate400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/templates/api_service.go b/rest/api/v3/templates/api_service.go new file mode 100644 index 00000000..3716cd28 --- /dev/null +++ b/rest/api/v3/templates/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/templates/api_update_template.go b/rest/api/v3/templates/api_update_template.go new file mode 100644 index 00000000..cc483ed9 --- /dev/null +++ b/rest/api/v3/templates/api_update_template.go @@ -0,0 +1,84 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type UpdateTemplateParam struct { + // + TemplateId *string `json:"template_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateTemplateRequest *UpdateTemplateRequest `json:"UpdateTemplateRequest,omitempty"` +} + +func (params *UpdateTemplateParam) SetTemplateId(TemplateId string) *UpdateTemplateParam { + params.TemplateId = &TemplateId + return params +} +func (params *UpdateTemplateParam) SetOnbehalfof(Onbehalfof string) *UpdateTemplateParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateTemplateParam) SetUpdateTemplateRequest(UpdateTemplateRequest UpdateTemplateRequest) *UpdateTemplateParam { + params.UpdateTemplateRequest = &UpdateTemplateRequest + return params +} + +// **This endpoint allows you to edit the name of a transactional template.** To edit the template itself, [create a new transactional template version](https://docs.sendgrid.com/api-reference/transactional-templates-versions/create-a-new-transactional-template-version). +func (c *ApiService) UpdateTemplate(params *UpdateTemplateParam) (interface{}, error) { + path := "/v3/templates/{TemplateId}" + if params != nil && params.TemplateId != nil { + path = strings.Replace(path, "{"+"TemplateId"+"}", *params.TemplateId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateTemplateRequest != nil { + b, err := json.Marshal(*params.UpdateTemplateRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &TransactionalTemplate{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/templates/api_update_template_version.go b/rest/api/v3/templates/api_update_template_version.go new file mode 100644 index 00000000..358bc618 --- /dev/null +++ b/rest/api/v3/templates/api_update_template_version.go @@ -0,0 +1,93 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type UpdateTemplateVersionParam struct { + // The ID of the original template + TemplateId *string `json:"template_id"` + // The ID of the template version + VersionId *string `json:"version_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + TransactionalTemplateVersionCreate *TransactionalTemplateVersionCreate `json:"TransactionalTemplateVersionCreate,omitempty"` +} + +func (params *UpdateTemplateVersionParam) SetTemplateId(TemplateId string) *UpdateTemplateVersionParam { + params.TemplateId = &TemplateId + return params +} +func (params *UpdateTemplateVersionParam) SetVersionId(VersionId string) *UpdateTemplateVersionParam { + params.VersionId = &VersionId + return params +} +func (params *UpdateTemplateVersionParam) SetOnbehalfof(Onbehalfof string) *UpdateTemplateVersionParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateTemplateVersionParam) SetTransactionalTemplateVersionCreate(TransactionalTemplateVersionCreate TransactionalTemplateVersionCreate) *UpdateTemplateVersionParam { + params.TransactionalTemplateVersionCreate = &TransactionalTemplateVersionCreate + return params +} + +// **This endpoint allows you to edit the content of your template version.** +func (c *ApiService) UpdateTemplateVersion(params *UpdateTemplateVersionParam) (interface{}, error) { + path := "/v3/templates/{TemplateId}/versions/{VersionId}" + if params != nil && params.TemplateId != nil { + path = strings.Replace(path, "{"+"TemplateId"+"}", *params.TemplateId, -1) + } + if params != nil && params.VersionId != nil { + path = strings.Replace(path, "{"+"VersionId"+"}", *params.VersionId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.TransactionalTemplateVersionCreate != nil { + b, err := json.Marshal(*params.TransactionalTemplateVersionCreate) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &TransactionalTemplateVersionOutput{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/templates/docs/ActivateTemplateVersion.md b/rest/api/v3/templates/docs/ActivateTemplateVersion.md new file mode 100644 index 00000000..501c4c70 --- /dev/null +++ b/rest/api/v3/templates/docs/ActivateTemplateVersion.md @@ -0,0 +1,53 @@ +# ActivateTemplateVersion + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ActivateTemplateVersion**](ActivateTemplateVersion.md#ActivateTemplateVersion) | **Post** /v3/templates/{TemplateId}/versions/{VersionId}/activate | Activate a transactional template version. + + + +## ActivateTemplateVersion + +> TransactionalTemplateVersionOutput ActivateTemplateVersion(ctx, TemplateIdVersionIdoptional) + +Activate a transactional template version. + +**This endpoint allows you to activate a version of one of your templates.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TemplateId** | **string** | The ID of the original template +**VersionId** | **string** | The ID of the template version + +### Other Parameters + +Other parameters are passed through a pointer to a ActivateTemplateVersionParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**TransactionalTemplateVersionOutput**](TransactionalTemplateVersionOutput.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/templates/docs/Active.md b/rest/api/v3/templates/docs/Active.md new file mode 100644 index 00000000..d69716ca --- /dev/null +++ b/rest/api/v3/templates/docs/Active.md @@ -0,0 +1,13 @@ +# Active + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**_0** | int32 | (value: `0`) +**_1** | int32 | (value: `1`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/Active1.md b/rest/api/v3/templates/docs/Active1.md new file mode 100644 index 00000000..4b05d8e0 --- /dev/null +++ b/rest/api/v3/templates/docs/Active1.md @@ -0,0 +1,13 @@ +# Active1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**_0** | int32 | (value: `0`) +**_1** | int32 | (value: `1`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/CreateTemplate.md b/rest/api/v3/templates/docs/CreateTemplate.md new file mode 100644 index 00000000..ae22f59f --- /dev/null +++ b/rest/api/v3/templates/docs/CreateTemplate.md @@ -0,0 +1,49 @@ +# CreateTemplate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateTemplate**](CreateTemplate.md#CreateTemplate) | **Post** /v3/templates | Create a transactional template. + + + +## CreateTemplate + +> TransactionalTemplate CreateTemplate(ctx, optional) + +Create a transactional template. + +**This endpoint allows you to create a transactional template.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateTemplateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**CreateTemplateRequest** | [**CreateTemplateRequest**](CreateTemplateRequest.md) | + +### Return type + +[**TransactionalTemplate**](TransactionalTemplate.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/templates/docs/CreateTemplateRequest.md b/rest/api/v3/templates/docs/CreateTemplateRequest.md new file mode 100644 index 00000000..3257102d --- /dev/null +++ b/rest/api/v3/templates/docs/CreateTemplateRequest.md @@ -0,0 +1,12 @@ +# CreateTemplateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name for the new transactional template. | +**Generation** | [**Generation**](Generation.md) | Defines whether the template supports dynamic replacement. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/CreateTemplateVersion.md b/rest/api/v3/templates/docs/CreateTemplateVersion.md new file mode 100644 index 00000000..e5ba2395 --- /dev/null +++ b/rest/api/v3/templates/docs/CreateTemplateVersion.md @@ -0,0 +1,53 @@ +# CreateTemplateVersion + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateTemplateVersion**](CreateTemplateVersion.md#CreateTemplateVersion) | **Post** /v3/templates/{TemplateId}/versions | Create a new transactional template version. + + + +## CreateTemplateVersion + +> TransactionalTemplateVersionOutput CreateTemplateVersion(ctx, TemplateIdoptional) + +Create a new transactional template version. + +**This endpoint allows you to create a new version of a template.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TemplateId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a CreateTemplateVersionParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**TransactionalTemplateVersionCreate** | [**TransactionalTemplateVersionCreate**](TransactionalTemplateVersionCreate.md) | + +### Return type + +[**TransactionalTemplateVersionOutput**](TransactionalTemplateVersionOutput.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/templates/docs/DeleteTemplate.md b/rest/api/v3/templates/docs/DeleteTemplate.md new file mode 100644 index 00000000..fa5ca8f0 --- /dev/null +++ b/rest/api/v3/templates/docs/DeleteTemplate.md @@ -0,0 +1,52 @@ +# DeleteTemplate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteTemplate**](DeleteTemplate.md#DeleteTemplate) | **Delete** /v3/templates/{TemplateId} | Delete a template. + + + +## DeleteTemplate + +> map[string]interface{} DeleteTemplate(ctx, TemplateIdoptional) + +Delete a template. + +**This endpoint allows you to delete a transactional template.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TemplateId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteTemplateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/templates/docs/DeleteTemplateVersion.md b/rest/api/v3/templates/docs/DeleteTemplateVersion.md new file mode 100644 index 00000000..a0a2bf5c --- /dev/null +++ b/rest/api/v3/templates/docs/DeleteTemplateVersion.md @@ -0,0 +1,53 @@ +# DeleteTemplateVersion + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteTemplateVersion**](DeleteTemplateVersion.md#DeleteTemplateVersion) | **Delete** /v3/templates/{TemplateId}/versions/{VersionId} | Delete a transactional template version. + + + +## DeleteTemplateVersion + +> DeleteTemplateVersion(ctx, TemplateIdVersionIdoptional) + +Delete a transactional template version. + +**This endpoint allows you to delete a transactional template version.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TemplateId** | **string** | The ID of the original template +**VersionId** | **string** | The ID of the template version + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteTemplateVersionParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/templates/docs/DuplicateTemplate.md b/rest/api/v3/templates/docs/DuplicateTemplate.md new file mode 100644 index 00000000..b1ff510b --- /dev/null +++ b/rest/api/v3/templates/docs/DuplicateTemplate.md @@ -0,0 +1,53 @@ +# DuplicateTemplate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DuplicateTemplate**](DuplicateTemplate.md#DuplicateTemplate) | **Post** /v3/templates/{TemplateId} | Duplicate a transactional template. + + + +## DuplicateTemplate + +> TransactionalTemplate DuplicateTemplate(ctx, TemplateIdoptional) + +Duplicate a transactional template. + +**This endpoint allows you to duplicate a transactional template.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TemplateId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a DuplicateTemplateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**DuplicateTemplateRequest** | [**DuplicateTemplateRequest**](DuplicateTemplateRequest.md) | + +### Return type + +[**TransactionalTemplate**](TransactionalTemplate.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/templates/docs/DuplicateTemplateRequest.md b/rest/api/v3/templates/docs/DuplicateTemplateRequest.md new file mode 100644 index 00000000..02a361b6 --- /dev/null +++ b/rest/api/v3/templates/docs/DuplicateTemplateRequest.md @@ -0,0 +1,11 @@ +# DuplicateTemplateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name for the new transactional template. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/Editor.md b/rest/api/v3/templates/docs/Editor.md new file mode 100644 index 00000000..9d170841 --- /dev/null +++ b/rest/api/v3/templates/docs/Editor.md @@ -0,0 +1,13 @@ +# Editor + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**CODE** | string | (value: `"code"`) +**DESIGN** | string | (value: `"design"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/Editor1.md b/rest/api/v3/templates/docs/Editor1.md new file mode 100644 index 00000000..2ddc5d89 --- /dev/null +++ b/rest/api/v3/templates/docs/Editor1.md @@ -0,0 +1,13 @@ +# Editor1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**CODE** | string | (value: `"code"`) +**DESIGN** | string | (value: `"design"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/Generation.md b/rest/api/v3/templates/docs/Generation.md new file mode 100644 index 00000000..04e09451 --- /dev/null +++ b/rest/api/v3/templates/docs/Generation.md @@ -0,0 +1,13 @@ +# Generation + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**LEGACY** | string | (value: `"legacy"`) +**DYNAMIC** | string | (value: `"dynamic"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/Generation1.md b/rest/api/v3/templates/docs/Generation1.md new file mode 100644 index 00000000..7b1f26b0 --- /dev/null +++ b/rest/api/v3/templates/docs/Generation1.md @@ -0,0 +1,13 @@ +# Generation1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**LEGACY** | string | (value: `"legacy"`) +**DYNAMIC** | string | (value: `"dynamic"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/Generations.md b/rest/api/v3/templates/docs/Generations.md new file mode 100644 index 00000000..61e985f0 --- /dev/null +++ b/rest/api/v3/templates/docs/Generations.md @@ -0,0 +1,14 @@ +# Generations + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**LEGACY** | string | (value: `"legacy"`) +**DYNAMIC** | string | (value: `"dynamic"`) +**LEGACYDYNAMIC** | string | (value: `"legacy,dynamic"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/GetTemplate.md b/rest/api/v3/templates/docs/GetTemplate.md new file mode 100644 index 00000000..6deed867 --- /dev/null +++ b/rest/api/v3/templates/docs/GetTemplate.md @@ -0,0 +1,52 @@ +# GetTemplate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetTemplate**](GetTemplate.md#GetTemplate) | **Get** /v3/templates/{TemplateId} | Retrieve a single transactional template. + + + +## GetTemplate + +> TransactionalTemplate GetTemplate(ctx, TemplateIdoptional) + +Retrieve a single transactional template. + +**This endpoint allows you to retrieve a single transactional template.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TemplateId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a GetTemplateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**TransactionalTemplate**](TransactionalTemplate.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/templates/docs/GetTemplateVersion.md b/rest/api/v3/templates/docs/GetTemplateVersion.md new file mode 100644 index 00000000..8beed210 --- /dev/null +++ b/rest/api/v3/templates/docs/GetTemplateVersion.md @@ -0,0 +1,53 @@ +# GetTemplateVersion + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetTemplateVersion**](GetTemplateVersion.md#GetTemplateVersion) | **Get** /v3/templates/{TemplateId}/versions/{VersionId} | Retrieve a specific transactional template version. + + + +## GetTemplateVersion + +> TransactionalTemplateVersionOutput GetTemplateVersion(ctx, TemplateIdVersionIdoptional) + +Retrieve a specific transactional template version. + +**This endpoint allows you to retrieve a specific version of a template.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TemplateId** | **string** | The ID of the original template +**VersionId** | **string** | The ID of the template version + +### Other Parameters + +Other parameters are passed through a pointer to a GetTemplateVersionParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**TransactionalTemplateVersionOutput**](TransactionalTemplateVersionOutput.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/templates/docs/ListTemplate.md b/rest/api/v3/templates/docs/ListTemplate.md new file mode 100644 index 00000000..f6af7acd --- /dev/null +++ b/rest/api/v3/templates/docs/ListTemplate.md @@ -0,0 +1,50 @@ +# ListTemplate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListTemplate**](ListTemplate.md#ListTemplate) | **Get** /v3/templates | Retrieve paged transactional templates. + + + +## ListTemplate + +> ListTemplate200Response ListTemplate(ctx, PageSizeoptional) + +Retrieve paged transactional templates. + +**This endpoint allows you to retrieve all transactional templates.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListTemplateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Generations** | [**Generations**](GenerationsGenerations.md) | Comma-delimited list specifying which generations of templates to return. Options are `legacy`, `dynamic` or `legacy,dynamic`. +**PageToken** | **string** | A token corresponding to a specific page of results, as provided by metadata +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListTemplate200Response**](ListTemplate200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/templates/docs/ListTemplate200Response.md b/rest/api/v3/templates/docs/ListTemplate200Response.md new file mode 100644 index 00000000..5ec1a162 --- /dev/null +++ b/rest/api/v3/templates/docs/ListTemplate200Response.md @@ -0,0 +1,12 @@ +# ListTemplate200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]TransactionalTemplatesTemplateLean**](TransactionalTemplatesTemplateLean.md) | |[optional] +**Metadata** | [**Metadata**](Metadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/ListTemplate400Response.md b/rest/api/v3/templates/docs/ListTemplate400Response.md new file mode 100644 index 00000000..006916af --- /dev/null +++ b/rest/api/v3/templates/docs/ListTemplate400Response.md @@ -0,0 +1,11 @@ +# ListTemplate400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ListTemplate400ResponseErrorsInner**](ListTemplate400ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/ListTemplate400ResponseErrorsInner.md b/rest/api/v3/templates/docs/ListTemplate400ResponseErrorsInner.md new file mode 100644 index 00000000..a1aaa499 --- /dev/null +++ b/rest/api/v3/templates/docs/ListTemplate400ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# ListTemplate400ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | |[optional] +**ErrorId** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/Metadata.md b/rest/api/v3/templates/docs/Metadata.md new file mode 100644 index 00000000..6121300c --- /dev/null +++ b/rest/api/v3/templates/docs/Metadata.md @@ -0,0 +1,14 @@ +# Metadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prev** | **string** | |[optional] +**Self** | **string** | |[optional] +**Next** | **string** | |[optional] +**Count** | **int32** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/TransactionalTemplate.md b/rest/api/v3/templates/docs/TransactionalTemplate.md new file mode 100644 index 00000000..9d4b55ca --- /dev/null +++ b/rest/api/v3/templates/docs/TransactionalTemplate.md @@ -0,0 +1,16 @@ +# TransactionalTemplate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The ID of the transactional template. | +**Name** | **string** | The name for the transactional template. | +**Generation** | [**Generation1**](Generation1.md) | Defines the generation of the template. | +**UpdatedAt** | **string** | The date and time that this transactional template version was updated. | +**Versions** | [**[]TransactionalTemplatesVersionOutputLean**](TransactionalTemplatesVersionOutputLean.md) | The different versions of this transactional template. |[optional] +**Warning** | [**TransactionalTemplateWarning**](TransactionalTemplateWarning.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/TransactionalTemplateVersionCreate.md b/rest/api/v3/templates/docs/TransactionalTemplateVersionCreate.md new file mode 100644 index 00000000..958d7c58 --- /dev/null +++ b/rest/api/v3/templates/docs/TransactionalTemplateVersionCreate.md @@ -0,0 +1,18 @@ +# TransactionalTemplateVersionCreate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Active** | [**Active**](Active.md) | Set the version as the active version associated with the template (0 is inactive, 1 is active). Only one version of a template can be active. The first version created for a template will automatically be set to Active. |[optional] +**Name** | **string** | Name of the transactional template version. | +**HtmlContent** | **string** | The HTML content of the version. Maximum of 1048576 bytes allowed. |[optional] +**PlainContent** | **string** | Text/plain content of the transactional template version. Maximum of 1048576 bytes allowed. |[optional] [default to ""] +**GeneratePlainContent** | **bool** | If true, plain_content is always generated from html_content. If false, plain_content is not altered. |[optional] [default to true] +**Subject** | **string** | Subject of the new transactional template version. | +**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] +**TestData** | **string** | For dynamic templates only, the mock json data that will be used for template preview and test sends. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/TransactionalTemplateVersionOutput.md b/rest/api/v3/templates/docs/TransactionalTemplateVersionOutput.md new file mode 100644 index 00000000..b2b0e299 --- /dev/null +++ b/rest/api/v3/templates/docs/TransactionalTemplateVersionOutput.md @@ -0,0 +1,23 @@ +# TransactionalTemplateVersionOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Warnings** | [**[]TransactionalTemplateWarning**](TransactionalTemplateWarning.md) | |[optional] +**Active** | [**Active1**](Active1.md) | Set the version as the active version associated with the template. Only one version of a template can be active. The first version created for a template will automatically be set to Active. |[optional] +**Name** | **string** | Name of the transactional template version. | +**HtmlContent** | **string** | The HTML content of the Design. |[optional] +**PlainContent** | **string** | Plain text content of the Design. |[optional] +**GeneratePlainContent** | **bool** | If true, plain_content is always generated from html_content. If false, plain_content is not altered. |[optional] [default to true] +**Subject** | **string** | Subject of the new transactional template version. | +**Editor** | [**Editor1**](Editor1.md) | The editor used in the UI. |[optional] +**TestData** | **string** | For dynamic templates only, the mock json data that will be used for template preview and test sends. |[optional] +**Id** | **string** | ID of the transactional template version. |[optional] +**TemplateId** | **string** | ID of the transactional template. |[optional] +**UpdatedAt** | **string** | The date and time that this transactional template version was updated. |[optional] +**ThumbnailUrl** | **string** | A Thumbnail preview of the template's html content. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/TransactionalTemplateWarning.md b/rest/api/v3/templates/docs/TransactionalTemplateWarning.md new file mode 100644 index 00000000..0b22b1bd --- /dev/null +++ b/rest/api/v3/templates/docs/TransactionalTemplateWarning.md @@ -0,0 +1,11 @@ +# TransactionalTemplateWarning + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | Warning message for the user |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/TransactionalTemplatesTemplateLean.md b/rest/api/v3/templates/docs/TransactionalTemplatesTemplateLean.md new file mode 100644 index 00000000..631f5def --- /dev/null +++ b/rest/api/v3/templates/docs/TransactionalTemplatesTemplateLean.md @@ -0,0 +1,15 @@ +# TransactionalTemplatesTemplateLean + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The ID of the transactional template. | +**Name** | **string** | The name for the transactional template. | +**Generation** | [**Generation1**](Generation1.md) | Defines the generation of the template. | +**UpdatedAt** | **string** | The date and time that this transactional template version was updated. | +**Versions** | [**[]TransactionalTemplatesVersionOutputLean**](TransactionalTemplatesVersionOutputLean.md) | The different versions of this transactional template. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/TransactionalTemplatesVersionOutputLean.md b/rest/api/v3/templates/docs/TransactionalTemplatesVersionOutputLean.md new file mode 100644 index 00000000..0462c525 --- /dev/null +++ b/rest/api/v3/templates/docs/TransactionalTemplatesVersionOutputLean.md @@ -0,0 +1,21 @@ +# TransactionalTemplatesVersionOutputLean + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | ID of the transactional template version. |[optional] +**TemplateId** | **string** | ID of the transactional template. |[optional] +**Active** | [**Active1**](Active1.md) | Set the version as the active version associated with the template. Only one version of a template can be active. The first version created for a template will automatically be set to Active. |[optional] +**Name** | **string** | Name of the transactional template version. |[optional] +**Subject** | **string** | Subject of the new transactional template version. |[optional] +**UpdatedAt** | **string** | The date and time that this transactional template version was updated. |[optional] +**GeneratePlainContent** | **bool** | If true, plain_content is always generated from html_content. If false, plain_content is not altered. |[optional] [default to true] +**HtmlContent** | **string** | The HTML content of the Design. |[optional] +**PlainContent** | **string** | Plain text content of the Design. |[optional] +**Editor** | [**Editor1**](Editor1.md) | The editor used in the UI. |[optional] +**ThumbnailUrl** | **string** | A Thumbnail preview of the template's html content. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/UpdateTemplate.md b/rest/api/v3/templates/docs/UpdateTemplate.md new file mode 100644 index 00000000..ca71abfb --- /dev/null +++ b/rest/api/v3/templates/docs/UpdateTemplate.md @@ -0,0 +1,53 @@ +# UpdateTemplate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateTemplate**](UpdateTemplate.md#UpdateTemplate) | **Patch** /v3/templates/{TemplateId} | Edit a transactional template. + + + +## UpdateTemplate + +> TransactionalTemplate UpdateTemplate(ctx, TemplateIdoptional) + +Edit a transactional template. + +**This endpoint allows you to edit the name of a transactional template.** To edit the template itself, [create a new transactional template version](https://docs.sendgrid.com/api-reference/transactional-templates-versions/create-a-new-transactional-template-version). + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TemplateId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateTemplateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateTemplateRequest** | [**UpdateTemplateRequest**](UpdateTemplateRequest.md) | + +### Return type + +[**TransactionalTemplate**](TransactionalTemplate.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/templates/docs/UpdateTemplateRequest.md b/rest/api/v3/templates/docs/UpdateTemplateRequest.md new file mode 100644 index 00000000..beb9d891 --- /dev/null +++ b/rest/api/v3/templates/docs/UpdateTemplateRequest.md @@ -0,0 +1,11 @@ +# UpdateTemplateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the transactional template. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/UpdateTemplateVersion.md b/rest/api/v3/templates/docs/UpdateTemplateVersion.md new file mode 100644 index 00000000..79ab9221 --- /dev/null +++ b/rest/api/v3/templates/docs/UpdateTemplateVersion.md @@ -0,0 +1,54 @@ +# UpdateTemplateVersion + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateTemplateVersion**](UpdateTemplateVersion.md#UpdateTemplateVersion) | **Patch** /v3/templates/{TemplateId}/versions/{VersionId} | Edit a transactional template version. + + + +## UpdateTemplateVersion + +> TransactionalTemplateVersionOutput UpdateTemplateVersion(ctx, TemplateIdVersionIdoptional) + +Edit a transactional template version. + +**This endpoint allows you to edit the content of your template version.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TemplateId** | **string** | The ID of the original template +**VersionId** | **string** | The ID of the template version + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateTemplateVersionParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**TransactionalTemplateVersionCreate** | [**TransactionalTemplateVersionCreate**](TransactionalTemplateVersionCreate.md) | + +### Return type + +[**TransactionalTemplateVersionOutput**](TransactionalTemplateVersionOutput.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/templates/model_active.go b/rest/api/v3/templates/model_active.go new file mode 100644 index 00000000..f2cf3f4c --- /dev/null +++ b/rest/api/v3/templates/model_active.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Active the model 'Active' +type Active int32 + +// List of Active +const ( + ACTIVE__0 Active = 0 + ACTIVE__1 Active = 1 +) diff --git a/rest/api/v3/templates/model_active1.go b/rest/api/v3/templates/model_active1.go new file mode 100644 index 00000000..063d82be --- /dev/null +++ b/rest/api/v3/templates/model_active1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Active1 the model 'Active1' +type Active1 int32 + +// List of Active1 +const ( + ACTIVE1__0 Active1 = 0 + ACTIVE1__1 Active1 = 1 +) diff --git a/rest/api/v3/templates/model_create_template_request.go b/rest/api/v3/templates/model_create_template_request.go new file mode 100644 index 00000000..d2dcd300 --- /dev/null +++ b/rest/api/v3/templates/model_create_template_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateTemplateRequest struct for CreateTemplateRequest +type CreateTemplateRequest struct { + // The name for the new transactional template. + Name string `json:"name"` + // Defines whether the template supports dynamic replacement. + Generation *Generation `json:"generation,omitempty"` +} diff --git a/rest/api/v3/templates/model_duplicate_template_request.go b/rest/api/v3/templates/model_duplicate_template_request.go new file mode 100644 index 00000000..7b69dd8e --- /dev/null +++ b/rest/api/v3/templates/model_duplicate_template_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DuplicateTemplateRequest struct for DuplicateTemplateRequest +type DuplicateTemplateRequest struct { + // The name for the new transactional template. + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/templates/model_editor.go b/rest/api/v3/templates/model_editor.go new file mode 100644 index 00000000..e4bfb1be --- /dev/null +++ b/rest/api/v3/templates/model_editor.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Editor the model 'Editor' +type Editor string + +// List of Editor +const ( + EDITOR_CODE Editor = "code" + EDITOR_DESIGN Editor = "design" +) diff --git a/rest/api/v3/templates/model_editor1.go b/rest/api/v3/templates/model_editor1.go new file mode 100644 index 00000000..6fabeaf4 --- /dev/null +++ b/rest/api/v3/templates/model_editor1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Editor1 the model 'Editor1' +type Editor1 string + +// List of Editor1 +const ( + EDITOR1_CODE Editor1 = "code" + EDITOR1_DESIGN Editor1 = "design" +) diff --git a/rest/api/v3/templates/model_generation.go b/rest/api/v3/templates/model_generation.go new file mode 100644 index 00000000..7056829d --- /dev/null +++ b/rest/api/v3/templates/model_generation.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Generation the model 'Generation' +type Generation string + +// List of Generation +const ( + GENERATION_LEGACY Generation = "legacy" + GENERATION_DYNAMIC Generation = "dynamic" +) diff --git a/rest/api/v3/templates/model_generation1.go b/rest/api/v3/templates/model_generation1.go new file mode 100644 index 00000000..49ece636 --- /dev/null +++ b/rest/api/v3/templates/model_generation1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Generation1 the model 'Generation1' +type Generation1 string + +// List of Generation1 +const ( + GENERATION1_LEGACY Generation1 = "legacy" + GENERATION1_DYNAMIC Generation1 = "dynamic" +) diff --git a/rest/api/v3/templates/model_generations.go b/rest/api/v3/templates/model_generations.go new file mode 100644 index 00000000..1c57da46 --- /dev/null +++ b/rest/api/v3/templates/model_generations.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Generations the model 'Generations' +type Generations string + +// List of Generations +const ( + GENERATIONS_LEGACY Generations = "legacy" + GENERATIONS_DYNAMIC Generations = "dynamic" + GENERATIONS_LEGACYDYNAMIC Generations = "legacy,dynamic" +) diff --git a/rest/api/v3/templates/model_list_template_200_response.go b/rest/api/v3/templates/model_list_template_200_response.go new file mode 100644 index 00000000..6cb5f0a0 --- /dev/null +++ b/rest/api/v3/templates/model_list_template_200_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListTemplate200Response struct for ListTemplate200Response +type ListTemplate200Response struct { + // + Result *[]TransactionalTemplatesTemplateLean `json:"result,omitempty"` + Metadata *Metadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/templates/model_list_template_400_response.go b/rest/api/v3/templates/model_list_template_400_response.go new file mode 100644 index 00000000..b2834d68 --- /dev/null +++ b/rest/api/v3/templates/model_list_template_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListTemplate400Response struct for ListTemplate400Response +type ListTemplate400Response struct { + Errors *[]ListTemplate400ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/templates/model_list_template_400_response_errors_inner.go b/rest/api/v3/templates/model_list_template_400_response_errors_inner.go new file mode 100644 index 00000000..dd133220 --- /dev/null +++ b/rest/api/v3/templates/model_list_template_400_response_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListTemplate400ResponseErrorsInner struct for ListTemplate400ResponseErrorsInner +type ListTemplate400ResponseErrorsInner struct { + Message *string `json:"message,omitempty"` + ErrorId *string `json:"error_id,omitempty"` +} diff --git a/rest/api/v3/templates/model_metadata.go b/rest/api/v3/templates/model_metadata.go new file mode 100644 index 00000000..20681118 --- /dev/null +++ b/rest/api/v3/templates/model_metadata.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Metadata struct for Metadata +type Metadata struct { + Prev *string `json:"prev,omitempty"` + Self *string `json:"self,omitempty"` + Next *string `json:"next,omitempty"` + Count *int32 `json:"count,omitempty"` +} diff --git a/rest/api/v3/templates/model_transactional_template.go b/rest/api/v3/templates/model_transactional_template.go new file mode 100644 index 00000000..2298d217 --- /dev/null +++ b/rest/api/v3/templates/model_transactional_template.go @@ -0,0 +1,29 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// TransactionalTemplate struct for TransactionalTemplate +type TransactionalTemplate struct { + // The ID of the transactional template. + Id string `json:"id"` + // The name for the transactional template. + Name string `json:"name"` + // Defines the generation of the template. + Generation Generation1 `json:"generation"` + // The date and time that this transactional template version was updated. + UpdatedAt string `json:"updated_at"` + // The different versions of this transactional template. + Versions *[]TransactionalTemplatesVersionOutputLean `json:"versions,omitempty"` + Warning *TransactionalTemplateWarning `json:"warning,omitempty"` +} diff --git a/rest/api/v3/templates/model_transactional_template_version_create.go b/rest/api/v3/templates/model_transactional_template_version_create.go new file mode 100644 index 00000000..876459d7 --- /dev/null +++ b/rest/api/v3/templates/model_transactional_template_version_create.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// TransactionalTemplateVersionCreate struct for TransactionalTemplateVersionCreate +type TransactionalTemplateVersionCreate struct { + // Set the version as the active version associated with the template (0 is inactive, 1 is active). Only one version of a template can be active. The first version created for a template will automatically be set to Active. + Active *Active `json:"active,omitempty"` + // Name of the transactional template version. + Name string `json:"name"` + // The HTML content of the version. Maximum of 1048576 bytes allowed. + HtmlContent *string `json:"html_content,omitempty"` + // Text/plain content of the transactional template version. Maximum of 1048576 bytes allowed. + PlainContent *string `json:"plain_content,omitempty"` + // If true, plain_content is always generated from html_content. If false, plain_content is not altered. + GeneratePlainContent *bool `json:"generate_plain_content,omitempty"` + // Subject of the new transactional template version. + Subject string `json:"subject"` + // The editor used in the UI. + Editor *Editor `json:"editor,omitempty"` + // For dynamic templates only, the mock json data that will be used for template preview and test sends. + TestData *string `json:"test_data,omitempty"` +} diff --git a/rest/api/v3/templates/model_transactional_template_version_output.go b/rest/api/v3/templates/model_transactional_template_version_output.go new file mode 100644 index 00000000..5874ebbe --- /dev/null +++ b/rest/api/v3/templates/model_transactional_template_version_output.go @@ -0,0 +1,43 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// TransactionalTemplateVersionOutput struct for TransactionalTemplateVersionOutput +type TransactionalTemplateVersionOutput struct { + Warnings *[]TransactionalTemplateWarning `json:"warnings,omitempty"` + // Set the version as the active version associated with the template. Only one version of a template can be active. The first version created for a template will automatically be set to Active. + Active *Active1 `json:"active,omitempty"` + // Name of the transactional template version. + Name string `json:"name"` + // The HTML content of the Design. + HtmlContent *string `json:"html_content,omitempty"` + // Plain text content of the Design. + PlainContent *string `json:"plain_content,omitempty"` + // If true, plain_content is always generated from html_content. If false, plain_content is not altered. + GeneratePlainContent *bool `json:"generate_plain_content,omitempty"` + // Subject of the new transactional template version. + Subject string `json:"subject"` + // The editor used in the UI. + Editor *Editor1 `json:"editor,omitempty"` + // For dynamic templates only, the mock json data that will be used for template preview and test sends. + TestData *string `json:"test_data,omitempty"` + // ID of the transactional template version. + Id *string `json:"id,omitempty"` + // ID of the transactional template. + TemplateId *string `json:"template_id,omitempty"` + // The date and time that this transactional template version was updated. + UpdatedAt *string `json:"updated_at,omitempty"` + // A Thumbnail preview of the template's html content. + ThumbnailUrl *string `json:"thumbnail_url,omitempty"` +} diff --git a/rest/api/v3/templates/model_transactional_template_warning.go b/rest/api/v3/templates/model_transactional_template_warning.go new file mode 100644 index 00000000..3d110410 --- /dev/null +++ b/rest/api/v3/templates/model_transactional_template_warning.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// TransactionalTemplateWarning struct for TransactionalTemplateWarning +type TransactionalTemplateWarning struct { + // Warning message for the user + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/templates/model_transactional_templates_template_lean.go b/rest/api/v3/templates/model_transactional_templates_template_lean.go new file mode 100644 index 00000000..eb295990 --- /dev/null +++ b/rest/api/v3/templates/model_transactional_templates_template_lean.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// TransactionalTemplatesTemplateLean struct for TransactionalTemplatesTemplateLean +type TransactionalTemplatesTemplateLean struct { + // The ID of the transactional template. + Id string `json:"id"` + // The name for the transactional template. + Name string `json:"name"` + // Defines the generation of the template. + Generation Generation1 `json:"generation"` + // The date and time that this transactional template version was updated. + UpdatedAt string `json:"updated_at"` + // The different versions of this transactional template. + Versions *[]TransactionalTemplatesVersionOutputLean `json:"versions,omitempty"` +} diff --git a/rest/api/v3/templates/model_transactional_templates_version_output_lean.go b/rest/api/v3/templates/model_transactional_templates_version_output_lean.go new file mode 100644 index 00000000..47f42a36 --- /dev/null +++ b/rest/api/v3/templates/model_transactional_templates_version_output_lean.go @@ -0,0 +1,40 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// TransactionalTemplatesVersionOutputLean struct for TransactionalTemplatesVersionOutputLean +type TransactionalTemplatesVersionOutputLean struct { + // ID of the transactional template version. + Id *string `json:"id,omitempty"` + // ID of the transactional template. + TemplateId *string `json:"template_id,omitempty"` + // Set the version as the active version associated with the template. Only one version of a template can be active. The first version created for a template will automatically be set to Active. + Active *Active1 `json:"active,omitempty"` + // Name of the transactional template version. + Name *string `json:"name,omitempty"` + // Subject of the new transactional template version. + Subject *string `json:"subject,omitempty"` + // The date and time that this transactional template version was updated. + UpdatedAt *string `json:"updated_at,omitempty"` + // If true, plain_content is always generated from html_content. If false, plain_content is not altered. + GeneratePlainContent *bool `json:"generate_plain_content,omitempty"` + // The HTML content of the Design. + HtmlContent *string `json:"html_content,omitempty"` + // Plain text content of the Design. + PlainContent *string `json:"plain_content,omitempty"` + // The editor used in the UI. + Editor *Editor1 `json:"editor,omitempty"` + // A Thumbnail preview of the template's html content. + ThumbnailUrl *string `json:"thumbnail_url,omitempty"` +} diff --git a/rest/api/v3/templates/model_update_template_request.go b/rest/api/v3/templates/model_update_template_request.go new file mode 100644 index 00000000..bb110304 --- /dev/null +++ b/rest/api/v3/templates/model_update_template_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateTemplateRequest struct for UpdateTemplateRequest +type UpdateTemplateRequest struct { + // The name of the transactional template. + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/tracking_settings/.openapi-generator b/rest/api/v3/tracking_settings/.openapi-generator new file mode 100644 index 00000000..dcc5aa65 --- /dev/null +++ b/rest/api/v3/tracking_settings/.openapi-generator @@ -0,0 +1,38 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_list_click_tracking_setting.go +api_list_google_analytics_tracking_setting.go +api_list_open_tracking_setting.go +api_list_subscription_tracking_setting.go +api_list_tracking_setting.go +api_service.go +api_update_click_tracking_setting.go +api_update_google_analytics_tracking_setting.go +api_update_open_tracking_setting.go +api_update_subscription_tracking_setting.go +docs/ClickTracking.md +docs/GoogleAnalyticsSettings.md +docs/ListClickTrackingSetting.md +docs/ListGoogleAnalyticsTrackingSetting.md +docs/ListOpenTrackingSetting.md +docs/ListOpenTrackingSetting200Response.md +docs/ListSubscriptionTrackingSetting.md +docs/ListTrackingSetting.md +docs/ListTrackingSetting200Response.md +docs/ListTrackingSetting200ResponseResultInner.md +docs/SubscriptionTrackingSettings.md +docs/UpdateClickTrackingSetting.md +docs/UpdateClickTrackingSettingRequest.md +docs/UpdateGoogleAnalyticsTrackingSetting.md +docs/UpdateOpenTrackingSetting.md +docs/UpdateOpenTrackingSettingRequest.md +docs/UpdateSubscriptionTrackingSetting.md +model_click_tracking.go +model_google_analytics_settings.go +model_list_open_tracking_setting_200_response.go +model_list_tracking_setting_200_response.go +model_list_tracking_setting_200_response_result_inner.go +model_subscription_tracking_settings.go +model_update_click_tracking_setting_request.go +model_update_open_tracking_setting_request.go diff --git a/rest/api/v3/tracking_settings/.openapi-generator-ignore b/rest/api/v3/tracking_settings/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/tracking_settings/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/tracking_settings/README.md b/rest/api/v3/tracking_settings/README.md new file mode 100644 index 00000000..5359dddf --- /dev/null +++ b/rest/api/v3/tracking_settings/README.md @@ -0,0 +1,75 @@ +# Go API client for + +The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:44.521559+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ListClickTrackingSetting* | [**ListClickTrackingSetting**](docs/ListClickTrackingSetting.md#listclicktrackingsetting) | **Get** /v3/tracking_settings/click | Retrieve Click Track Settings +*ListGoogleAnalyticsTrackingSetting* | [**ListGoogleAnalyticsTrackingSetting**](docs/ListGoogleAnalyticsTrackingSetting.md#listgoogleanalyticstrackingsetting) | **Get** /v3/tracking_settings/google_analytics | Retrieve Google Analytics Settings +*ListOpenTrackingSetting* | [**ListOpenTrackingSetting**](docs/ListOpenTrackingSetting.md#listopentrackingsetting) | **Get** /v3/tracking_settings/open | Get Open Tracking Settings +*ListSubscriptionTrackingSetting* | [**ListSubscriptionTrackingSetting**](docs/ListSubscriptionTrackingSetting.md#listsubscriptiontrackingsetting) | **Get** /v3/tracking_settings/subscription | Retrieve Subscription Tracking Settings +*ListTrackingSetting* | [**ListTrackingSetting**](docs/ListTrackingSetting.md#listtrackingsetting) | **Get** /v3/tracking_settings | Retrieve Tracking Settings +*UpdateClickTrackingSetting* | [**UpdateClickTrackingSetting**](docs/UpdateClickTrackingSetting.md#updateclicktrackingsetting) | **Patch** /v3/tracking_settings/click | Update Click Tracking Settings +*UpdateGoogleAnalyticsTrackingSetting* | [**UpdateGoogleAnalyticsTrackingSetting**](docs/UpdateGoogleAnalyticsTrackingSetting.md#updategoogleanalyticstrackingsetting) | **Patch** /v3/tracking_settings/google_analytics | Update Google Analytics Settings +*UpdateOpenTrackingSetting* | [**UpdateOpenTrackingSetting**](docs/UpdateOpenTrackingSetting.md#updateopentrackingsetting) | **Patch** /v3/tracking_settings/open | Update Open Tracking Settings +*UpdateSubscriptionTrackingSetting* | [**UpdateSubscriptionTrackingSetting**](docs/UpdateSubscriptionTrackingSetting.md#updatesubscriptiontrackingsetting) | **Patch** /v3/tracking_settings/subscription | Update Subscription Tracking Settings + + +## Documentation For Models + + - [ClickTracking](ClickTracking.md) + - [GoogleAnalyticsSettings](GoogleAnalyticsSettings.md) + - [ListOpenTrackingSetting200Response](ListOpenTrackingSetting200Response.md) + - [ListTrackingSetting200Response](ListTrackingSetting200Response.md) + - [ListTrackingSetting200ResponseResultInner](ListTrackingSetting200ResponseResultInner.md) + - [SubscriptionTrackingSettings](SubscriptionTrackingSettings.md) + - [UpdateClickTrackingSettingRequest](UpdateClickTrackingSettingRequest.md) + - [UpdateOpenTrackingSettingRequest](UpdateOpenTrackingSettingRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/tracking_settings/api_list_click_tracking_setting.go b/rest/api/v3/tracking_settings/api_list_click_tracking_setting.go new file mode 100644 index 00000000..277e8b37 --- /dev/null +++ b/rest/api/v3/tracking_settings/api_list_click_tracking_setting.go @@ -0,0 +1,58 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListClickTrackingSettingParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListClickTrackingSettingParam) SetOnbehalfof(Onbehalfof string) *ListClickTrackingSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve your current click tracking setting.** Click Tracking overrides all the links and URLs in your emails and points them to either SendGrid’s servers or the domain with which you branded your link. When a customer clicks a link, SendGrid tracks those [clicks](https://sendgrid.com/docs/glossary/clicks/). Click tracking helps you understand how users are engaging with your communications. SendGrid can track up to 1000 links per email +func (c *ApiService) ListClickTrackingSetting(params *ListClickTrackingSettingParam) (interface{}, error) { + path := "/v3/tracking_settings/click" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ClickTracking{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/tracking_settings/api_list_google_analytics_tracking_setting.go b/rest/api/v3/tracking_settings/api_list_google_analytics_tracking_setting.go new file mode 100644 index 00000000..eb245ccd --- /dev/null +++ b/rest/api/v3/tracking_settings/api_list_google_analytics_tracking_setting.go @@ -0,0 +1,58 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListGoogleAnalyticsTrackingSettingParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListGoogleAnalyticsTrackingSettingParam) SetOnbehalfof(Onbehalfof string) *ListGoogleAnalyticsTrackingSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve your current setting for Google Analytics.** Google Analytics helps you understand how users got to your site and what they're doing there. For more information about using Google Analytics, please refer to [Google’s URL Builder](https://support.google.com/analytics/answer/1033867?hl=en) and their article on [\"Best Practices for Campaign Building\"](https://support.google.com/analytics/answer/1037445). We default the settings to Google’s recommendations. For more information, see [Google Analytics Demystified](https://sendgrid.com/docs/ui/analytics-and-reporting/google-analytics/). +func (c *ApiService) ListGoogleAnalyticsTrackingSetting(params *ListGoogleAnalyticsTrackingSettingParam) (interface{}, error) { + path := "/v3/tracking_settings/google_analytics" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GoogleAnalyticsSettings{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/tracking_settings/api_list_open_tracking_setting.go b/rest/api/v3/tracking_settings/api_list_open_tracking_setting.go new file mode 100644 index 00000000..fea7e0bf --- /dev/null +++ b/rest/api/v3/tracking_settings/api_list_open_tracking_setting.go @@ -0,0 +1,58 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListOpenTrackingSettingParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListOpenTrackingSettingParam) SetOnbehalfof(Onbehalfof string) *ListOpenTrackingSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve your current settings for open tracking.** Open Tracking adds an invisible image at the end of the email which can track email opens. If the email recipient has images enabled on their email client, a request to SendGrid’s server for the invisible image is executed and an open event is logged. These events are logged in the Statistics portal, Email Activity interface, and are reported by the Event Webhook. +func (c *ApiService) ListOpenTrackingSetting(params *ListOpenTrackingSettingParam) (interface{}, error) { + path := "/v3/tracking_settings/open" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListOpenTrackingSetting200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/tracking_settings/api_list_subscription_tracking_setting.go b/rest/api/v3/tracking_settings/api_list_subscription_tracking_setting.go new file mode 100644 index 00000000..0b1c1897 --- /dev/null +++ b/rest/api/v3/tracking_settings/api_list_subscription_tracking_setting.go @@ -0,0 +1,58 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListSubscriptionTrackingSettingParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListSubscriptionTrackingSettingParam) SetOnbehalfof(Onbehalfof string) *ListSubscriptionTrackingSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve your current settings for subscription tracking.** Subscription tracking adds links to the bottom of your emails that allows your recipients to subscribe to, or unsubscribe from, your emails. +func (c *ApiService) ListSubscriptionTrackingSetting(params *ListSubscriptionTrackingSettingParam) (interface{}, error) { + path := "/v3/tracking_settings/subscription" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SubscriptionTrackingSettings{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/tracking_settings/api_list_tracking_setting.go b/rest/api/v3/tracking_settings/api_list_tracking_setting.go new file mode 100644 index 00000000..03bd6d65 --- /dev/null +++ b/rest/api/v3/tracking_settings/api_list_tracking_setting.go @@ -0,0 +1,58 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListTrackingSettingParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListTrackingSettingParam) SetOnbehalfof(Onbehalfof string) *ListTrackingSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a list of all tracking settings on your account.** +func (c *ApiService) ListTrackingSetting(params *ListTrackingSettingParam) (interface{}, error) { + path := "/v3/tracking_settings" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListTrackingSetting200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/tracking_settings/api_service.go b/rest/api/v3/tracking_settings/api_service.go new file mode 100644 index 00000000..66f5e1d2 --- /dev/null +++ b/rest/api/v3/tracking_settings/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/tracking_settings/api_update_click_tracking_setting.go b/rest/api/v3/tracking_settings/api_update_click_tracking_setting.go new file mode 100644 index 00000000..2a728ec4 --- /dev/null +++ b/rest/api/v3/tracking_settings/api_update_click_tracking_setting.go @@ -0,0 +1,73 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type UpdateClickTrackingSettingParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateClickTrackingSettingRequest *UpdateClickTrackingSettingRequest `json:"UpdateClickTrackingSettingRequest,omitempty"` +} + +func (params *UpdateClickTrackingSettingParam) SetOnbehalfof(Onbehalfof string) *UpdateClickTrackingSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateClickTrackingSettingParam) SetUpdateClickTrackingSettingRequest(UpdateClickTrackingSettingRequest UpdateClickTrackingSettingRequest) *UpdateClickTrackingSettingParam { + params.UpdateClickTrackingSettingRequest = &UpdateClickTrackingSettingRequest + return params +} + +// **This endpoint allows you to enable or disable your current click tracking setting.** Click Tracking overrides all the links and URLs in your emails and points them to either SendGrid’s servers or the domain with which you branded your link. When a customer clicks a link, SendGrid tracks those [clicks](https://sendgrid.com/docs/glossary/clicks/). Click tracking helps you understand how users are engaging with your communications. SendGrid can track up to 1000 links per email +func (c *ApiService) UpdateClickTrackingSetting(params *UpdateClickTrackingSettingParam) (interface{}, error) { + path := "/v3/tracking_settings/click" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateClickTrackingSettingRequest != nil { + b, err := json.Marshal(*params.UpdateClickTrackingSettingRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ClickTracking{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/tracking_settings/api_update_google_analytics_tracking_setting.go b/rest/api/v3/tracking_settings/api_update_google_analytics_tracking_setting.go new file mode 100644 index 00000000..5de9af69 --- /dev/null +++ b/rest/api/v3/tracking_settings/api_update_google_analytics_tracking_setting.go @@ -0,0 +1,73 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type UpdateGoogleAnalyticsTrackingSettingParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + GoogleAnalyticsSettings *GoogleAnalyticsSettings `json:"GoogleAnalyticsSettings,omitempty"` +} + +func (params *UpdateGoogleAnalyticsTrackingSettingParam) SetOnbehalfof(Onbehalfof string) *UpdateGoogleAnalyticsTrackingSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateGoogleAnalyticsTrackingSettingParam) SetGoogleAnalyticsSettings(GoogleAnalyticsSettings GoogleAnalyticsSettings) *UpdateGoogleAnalyticsTrackingSettingParam { + params.GoogleAnalyticsSettings = &GoogleAnalyticsSettings + return params +} + +// **This endpoint allows you to update your current setting for Google Analytics.** Google Analytics helps you understand how users got to your site and what they're doing there. For more information about using Google Analytics, please refer to [Google’s URL Builder](https://support.google.com/analytics/answer/1033867?hl=en) and their article on [\"Best Practices for Campaign Building\"](https://support.google.com/analytics/answer/1037445). We default the settings to Google’s recommendations. For more information, see [Google Analytics Demystified](https://sendgrid.com/docs/ui/analytics-and-reporting/google-analytics/). +func (c *ApiService) UpdateGoogleAnalyticsTrackingSetting(params *UpdateGoogleAnalyticsTrackingSettingParam) (interface{}, error) { + path := "/v3/tracking_settings/google_analytics" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.GoogleAnalyticsSettings != nil { + b, err := json.Marshal(*params.GoogleAnalyticsSettings) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GoogleAnalyticsSettings{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/tracking_settings/api_update_open_tracking_setting.go b/rest/api/v3/tracking_settings/api_update_open_tracking_setting.go new file mode 100644 index 00000000..3f8feb68 --- /dev/null +++ b/rest/api/v3/tracking_settings/api_update_open_tracking_setting.go @@ -0,0 +1,73 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type UpdateOpenTrackingSettingParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateOpenTrackingSettingRequest *UpdateOpenTrackingSettingRequest `json:"UpdateOpenTrackingSettingRequest,omitempty"` +} + +func (params *UpdateOpenTrackingSettingParam) SetOnbehalfof(Onbehalfof string) *UpdateOpenTrackingSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateOpenTrackingSettingParam) SetUpdateOpenTrackingSettingRequest(UpdateOpenTrackingSettingRequest UpdateOpenTrackingSettingRequest) *UpdateOpenTrackingSettingParam { + params.UpdateOpenTrackingSettingRequest = &UpdateOpenTrackingSettingRequest + return params +} + +// **This endpoint allows you to update your current settings for open tracking.** Open Tracking adds an invisible image at the end of the email which can track email opens. If the email recipient has images enabled on their email client, a request to SendGrid’s server for the invisible image is executed and an open event is logged. These events are logged in the Statistics portal, Email Activity interface, and are reported by the Event Webhook. +func (c *ApiService) UpdateOpenTrackingSetting(params *UpdateOpenTrackingSettingParam) (interface{}, error) { + path := "/v3/tracking_settings/open" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateOpenTrackingSettingRequest != nil { + b, err := json.Marshal(*params.UpdateOpenTrackingSettingRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListOpenTrackingSetting200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/tracking_settings/api_update_subscription_tracking_setting.go b/rest/api/v3/tracking_settings/api_update_subscription_tracking_setting.go new file mode 100644 index 00000000..94359c04 --- /dev/null +++ b/rest/api/v3/tracking_settings/api_update_subscription_tracking_setting.go @@ -0,0 +1,73 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type UpdateSubscriptionTrackingSettingParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + SubscriptionTrackingSettings *SubscriptionTrackingSettings `json:"SubscriptionTrackingSettings,omitempty"` +} + +func (params *UpdateSubscriptionTrackingSettingParam) SetOnbehalfof(Onbehalfof string) *UpdateSubscriptionTrackingSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateSubscriptionTrackingSettingParam) SetSubscriptionTrackingSettings(SubscriptionTrackingSettings SubscriptionTrackingSettings) *UpdateSubscriptionTrackingSettingParam { + params.SubscriptionTrackingSettings = &SubscriptionTrackingSettings + return params +} + +// **This endpoint allows you to update your current settings for subscription tracking.** Subscription tracking adds links to the bottom of your emails that allows your recipients to subscribe to, or unsubscribe from, your emails. +func (c *ApiService) UpdateSubscriptionTrackingSetting(params *UpdateSubscriptionTrackingSettingParam) (interface{}, error) { + path := "/v3/tracking_settings/subscription" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SubscriptionTrackingSettings != nil { + b, err := json.Marshal(*params.SubscriptionTrackingSettings) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SubscriptionTrackingSettings{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/tracking_settings/docs/ClickTracking.md b/rest/api/v3/tracking_settings/docs/ClickTracking.md new file mode 100644 index 00000000..1ed22ee2 --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/ClickTracking.md @@ -0,0 +1,12 @@ +# ClickTracking + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EnableText** | **bool** | Indicates if click tracking is enabled for plain text emails. | +**Enabled** | **bool** | Indicates if click tracking is enabled or disabled. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/tracking_settings/docs/GoogleAnalyticsSettings.md b/rest/api/v3/tracking_settings/docs/GoogleAnalyticsSettings.md new file mode 100644 index 00000000..e55f7b45 --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/GoogleAnalyticsSettings.md @@ -0,0 +1,16 @@ +# GoogleAnalyticsSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates if Google Analytics is enabled. |[optional] +**UtmCampaign** | **string** | The name of the campaign. |[optional] +**UtmContent** | **string** | Used to differentiate ads |[optional] +**UtmMedium** | **string** | Name of the marketing medium (e.g. \"Email\"). |[optional] +**UtmSource** | **string** | Name of the referrer source. |[optional] +**UtmTerm** | **string** | Any paid keywords. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/tracking_settings/docs/ListClickTrackingSetting.md b/rest/api/v3/tracking_settings/docs/ListClickTrackingSetting.md new file mode 100644 index 00000000..2437d770 --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/ListClickTrackingSetting.md @@ -0,0 +1,48 @@ +# ListClickTrackingSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListClickTrackingSetting**](ListClickTrackingSetting.md#ListClickTrackingSetting) | **Get** /v3/tracking_settings/click | Retrieve Click Track Settings + + + +## ListClickTrackingSetting + +> ClickTracking ListClickTrackingSetting(ctx, optional) + +Retrieve Click Track Settings + +**This endpoint allows you to retrieve your current click tracking setting.** Click Tracking overrides all the links and URLs in your emails and points them to either SendGrid’s servers or the domain with which you branded your link. When a customer clicks a link, SendGrid tracks those [clicks](https://sendgrid.com/docs/glossary/clicks/). Click tracking helps you understand how users are engaging with your communications. SendGrid can track up to 1000 links per email + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListClickTrackingSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ClickTracking**](ClickTracking.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/tracking_settings/docs/ListGoogleAnalyticsTrackingSetting.md b/rest/api/v3/tracking_settings/docs/ListGoogleAnalyticsTrackingSetting.md new file mode 100644 index 00000000..fdb71673 --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/ListGoogleAnalyticsTrackingSetting.md @@ -0,0 +1,48 @@ +# ListGoogleAnalyticsTrackingSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListGoogleAnalyticsTrackingSetting**](ListGoogleAnalyticsTrackingSetting.md#ListGoogleAnalyticsTrackingSetting) | **Get** /v3/tracking_settings/google_analytics | Retrieve Google Analytics Settings + + + +## ListGoogleAnalyticsTrackingSetting + +> GoogleAnalyticsSettings ListGoogleAnalyticsTrackingSetting(ctx, optional) + +Retrieve Google Analytics Settings + +**This endpoint allows you to retrieve your current setting for Google Analytics.** Google Analytics helps you understand how users got to your site and what they're doing there. For more information about using Google Analytics, please refer to [Google’s URL Builder](https://support.google.com/analytics/answer/1033867?hl=en) and their article on [\"Best Practices for Campaign Building\"](https://support.google.com/analytics/answer/1037445). We default the settings to Google’s recommendations. For more information, see [Google Analytics Demystified](https://sendgrid.com/docs/ui/analytics-and-reporting/google-analytics/). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListGoogleAnalyticsTrackingSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**GoogleAnalyticsSettings**](GoogleAnalyticsSettings.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/tracking_settings/docs/ListOpenTrackingSetting.md b/rest/api/v3/tracking_settings/docs/ListOpenTrackingSetting.md new file mode 100644 index 00000000..958867f9 --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/ListOpenTrackingSetting.md @@ -0,0 +1,48 @@ +# ListOpenTrackingSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListOpenTrackingSetting**](ListOpenTrackingSetting.md#ListOpenTrackingSetting) | **Get** /v3/tracking_settings/open | Get Open Tracking Settings + + + +## ListOpenTrackingSetting + +> ListOpenTrackingSetting200Response ListOpenTrackingSetting(ctx, optional) + +Get Open Tracking Settings + +**This endpoint allows you to retrieve your current settings for open tracking.** Open Tracking adds an invisible image at the end of the email which can track email opens. If the email recipient has images enabled on their email client, a request to SendGrid’s server for the invisible image is executed and an open event is logged. These events are logged in the Statistics portal, Email Activity interface, and are reported by the Event Webhook. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListOpenTrackingSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListOpenTrackingSetting200Response**](ListOpenTrackingSetting200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/tracking_settings/docs/ListOpenTrackingSetting200Response.md b/rest/api/v3/tracking_settings/docs/ListOpenTrackingSetting200Response.md new file mode 100644 index 00000000..3a4a7db5 --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/ListOpenTrackingSetting200Response.md @@ -0,0 +1,11 @@ +# ListOpenTrackingSetting200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates if open tracking is enabled. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/tracking_settings/docs/ListSubscriptionTrackingSetting.md b/rest/api/v3/tracking_settings/docs/ListSubscriptionTrackingSetting.md new file mode 100644 index 00000000..12d9be73 --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/ListSubscriptionTrackingSetting.md @@ -0,0 +1,48 @@ +# ListSubscriptionTrackingSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSubscriptionTrackingSetting**](ListSubscriptionTrackingSetting.md#ListSubscriptionTrackingSetting) | **Get** /v3/tracking_settings/subscription | Retrieve Subscription Tracking Settings + + + +## ListSubscriptionTrackingSetting + +> SubscriptionTrackingSettings ListSubscriptionTrackingSetting(ctx, optional) + +Retrieve Subscription Tracking Settings + +**This endpoint allows you to retrieve your current settings for subscription tracking.** Subscription tracking adds links to the bottom of your emails that allows your recipients to subscribe to, or unsubscribe from, your emails. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSubscriptionTrackingSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**SubscriptionTrackingSettings**](SubscriptionTrackingSettings.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/tracking_settings/docs/ListTrackingSetting.md b/rest/api/v3/tracking_settings/docs/ListTrackingSetting.md new file mode 100644 index 00000000..24b3b155 --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/ListTrackingSetting.md @@ -0,0 +1,48 @@ +# ListTrackingSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListTrackingSetting**](ListTrackingSetting.md#ListTrackingSetting) | **Get** /v3/tracking_settings | Retrieve Tracking Settings + + + +## ListTrackingSetting + +> ListTrackingSetting200Response ListTrackingSetting(ctx, optional) + +Retrieve Tracking Settings + +**This endpoint allows you to retrieve a list of all tracking settings on your account.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListTrackingSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListTrackingSetting200Response**](ListTrackingSetting200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/tracking_settings/docs/ListTrackingSetting200Response.md b/rest/api/v3/tracking_settings/docs/ListTrackingSetting200Response.md new file mode 100644 index 00000000..9e49cf92 --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/ListTrackingSetting200Response.md @@ -0,0 +1,11 @@ +# ListTrackingSetting200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ListTrackingSetting200ResponseResultInner**](ListTrackingSetting200ResponseResultInner.md) | The list of all tracking settings. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/tracking_settings/docs/ListTrackingSetting200ResponseResultInner.md b/rest/api/v3/tracking_settings/docs/ListTrackingSetting200ResponseResultInner.md new file mode 100644 index 00000000..de2cbab9 --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/ListTrackingSetting200ResponseResultInner.md @@ -0,0 +1,14 @@ +# ListTrackingSetting200ResponseResultInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the event being tracked. |[optional] +**Title** | **string** | The title of the tracking setting. |[optional] +**Description** | **string** | A description about the event that is being tracked. |[optional] +**Enabled** | **bool** | Indicates if this tracking setting is currently enabled. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/tracking_settings/docs/SubscriptionTrackingSettings.md b/rest/api/v3/tracking_settings/docs/SubscriptionTrackingSettings.md new file mode 100644 index 00000000..2d7ac4bb --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/SubscriptionTrackingSettings.md @@ -0,0 +1,16 @@ +# SubscriptionTrackingSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates if subscription tracking is enabled. |[optional] +**HtmlContent** | **string** | The information and HTML for your unsubscribe link. |[optional] +**Landing** | **string** | The HTML that will be displayed on the page that your customers will see after clicking unsubscribe, hosted on SendGrid’s server. |[optional] +**PlainContent** | **string** | The information in plain text for your unsubscribe link. You should have the “<% %>” tag in your content, otherwise the user will have no URL for unsubscribing. |[optional] +**Replace** | **string** | Your custom defined replacement tag for your templates. Use this tag to place your unsubscribe content anywhere in your emailtemplate. |[optional] +**Url** | **string** | The URL where you would like your users sent to unsubscribe. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/tracking_settings/docs/UpdateClickTrackingSetting.md b/rest/api/v3/tracking_settings/docs/UpdateClickTrackingSetting.md new file mode 100644 index 00000000..78a5a4e5 --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/UpdateClickTrackingSetting.md @@ -0,0 +1,49 @@ +# UpdateClickTrackingSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateClickTrackingSetting**](UpdateClickTrackingSetting.md#UpdateClickTrackingSetting) | **Patch** /v3/tracking_settings/click | Update Click Tracking Settings + + + +## UpdateClickTrackingSetting + +> ClickTracking UpdateClickTrackingSetting(ctx, optional) + +Update Click Tracking Settings + +**This endpoint allows you to enable or disable your current click tracking setting.** Click Tracking overrides all the links and URLs in your emails and points them to either SendGrid’s servers or the domain with which you branded your link. When a customer clicks a link, SendGrid tracks those [clicks](https://sendgrid.com/docs/glossary/clicks/). Click tracking helps you understand how users are engaging with your communications. SendGrid can track up to 1000 links per email + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateClickTrackingSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateClickTrackingSettingRequest** | [**UpdateClickTrackingSettingRequest**](UpdateClickTrackingSettingRequest.md) | + +### Return type + +[**ClickTracking**](ClickTracking.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/tracking_settings/docs/UpdateClickTrackingSettingRequest.md b/rest/api/v3/tracking_settings/docs/UpdateClickTrackingSettingRequest.md new file mode 100644 index 00000000..61b2c708 --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/UpdateClickTrackingSettingRequest.md @@ -0,0 +1,11 @@ +# UpdateClickTrackingSettingRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | The setting you want to use for click tracking. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/tracking_settings/docs/UpdateGoogleAnalyticsTrackingSetting.md b/rest/api/v3/tracking_settings/docs/UpdateGoogleAnalyticsTrackingSetting.md new file mode 100644 index 00000000..d3310250 --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/UpdateGoogleAnalyticsTrackingSetting.md @@ -0,0 +1,49 @@ +# UpdateGoogleAnalyticsTrackingSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateGoogleAnalyticsTrackingSetting**](UpdateGoogleAnalyticsTrackingSetting.md#UpdateGoogleAnalyticsTrackingSetting) | **Patch** /v3/tracking_settings/google_analytics | Update Google Analytics Settings + + + +## UpdateGoogleAnalyticsTrackingSetting + +> GoogleAnalyticsSettings UpdateGoogleAnalyticsTrackingSetting(ctx, optional) + +Update Google Analytics Settings + +**This endpoint allows you to update your current setting for Google Analytics.** Google Analytics helps you understand how users got to your site and what they're doing there. For more information about using Google Analytics, please refer to [Google’s URL Builder](https://support.google.com/analytics/answer/1033867?hl=en) and their article on [\"Best Practices for Campaign Building\"](https://support.google.com/analytics/answer/1037445). We default the settings to Google’s recommendations. For more information, see [Google Analytics Demystified](https://sendgrid.com/docs/ui/analytics-and-reporting/google-analytics/). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateGoogleAnalyticsTrackingSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**GoogleAnalyticsSettings** | [**GoogleAnalyticsSettings**](GoogleAnalyticsSettings.md) | + +### Return type + +[**GoogleAnalyticsSettings**](GoogleAnalyticsSettings.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/tracking_settings/docs/UpdateOpenTrackingSetting.md b/rest/api/v3/tracking_settings/docs/UpdateOpenTrackingSetting.md new file mode 100644 index 00000000..8e05d80f --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/UpdateOpenTrackingSetting.md @@ -0,0 +1,49 @@ +# UpdateOpenTrackingSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateOpenTrackingSetting**](UpdateOpenTrackingSetting.md#UpdateOpenTrackingSetting) | **Patch** /v3/tracking_settings/open | Update Open Tracking Settings + + + +## UpdateOpenTrackingSetting + +> ListOpenTrackingSetting200Response UpdateOpenTrackingSetting(ctx, optional) + +Update Open Tracking Settings + +**This endpoint allows you to update your current settings for open tracking.** Open Tracking adds an invisible image at the end of the email which can track email opens. If the email recipient has images enabled on their email client, a request to SendGrid’s server for the invisible image is executed and an open event is logged. These events are logged in the Statistics portal, Email Activity interface, and are reported by the Event Webhook. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateOpenTrackingSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateOpenTrackingSettingRequest** | [**UpdateOpenTrackingSettingRequest**](UpdateOpenTrackingSettingRequest.md) | + +### Return type + +[**ListOpenTrackingSetting200Response**](ListOpenTrackingSetting200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/tracking_settings/docs/UpdateOpenTrackingSettingRequest.md b/rest/api/v3/tracking_settings/docs/UpdateOpenTrackingSettingRequest.md new file mode 100644 index 00000000..0b5d7d38 --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/UpdateOpenTrackingSettingRequest.md @@ -0,0 +1,11 @@ +# UpdateOpenTrackingSettingRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | The new status that you want to set for open tracking. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/tracking_settings/docs/UpdateSubscriptionTrackingSetting.md b/rest/api/v3/tracking_settings/docs/UpdateSubscriptionTrackingSetting.md new file mode 100644 index 00000000..627a0d9f --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/UpdateSubscriptionTrackingSetting.md @@ -0,0 +1,49 @@ +# UpdateSubscriptionTrackingSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSubscriptionTrackingSetting**](UpdateSubscriptionTrackingSetting.md#UpdateSubscriptionTrackingSetting) | **Patch** /v3/tracking_settings/subscription | Update Subscription Tracking Settings + + + +## UpdateSubscriptionTrackingSetting + +> SubscriptionTrackingSettings UpdateSubscriptionTrackingSetting(ctx, optional) + +Update Subscription Tracking Settings + +**This endpoint allows you to update your current settings for subscription tracking.** Subscription tracking adds links to the bottom of your emails that allows your recipients to subscribe to, or unsubscribe from, your emails. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSubscriptionTrackingSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**SubscriptionTrackingSettings** | [**SubscriptionTrackingSettings**](SubscriptionTrackingSettings.md) | + +### Return type + +[**SubscriptionTrackingSettings**](SubscriptionTrackingSettings.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/tracking_settings/model_click_tracking.go b/rest/api/v3/tracking_settings/model_click_tracking.go new file mode 100644 index 00000000..6f9e6da9 --- /dev/null +++ b/rest/api/v3/tracking_settings/model_click_tracking.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ClickTracking struct for ClickTracking +type ClickTracking struct { + // Indicates if click tracking is enabled for plain text emails. + EnableText bool `json:"enable_text"` + // Indicates if click tracking is enabled or disabled. + Enabled bool `json:"enabled"` +} diff --git a/rest/api/v3/tracking_settings/model_google_analytics_settings.go b/rest/api/v3/tracking_settings/model_google_analytics_settings.go new file mode 100644 index 00000000..26e187e8 --- /dev/null +++ b/rest/api/v3/tracking_settings/model_google_analytics_settings.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GoogleAnalyticsSettings struct for GoogleAnalyticsSettings +type GoogleAnalyticsSettings struct { + // Indicates if Google Analytics is enabled. + Enabled *bool `json:"enabled,omitempty"` + // The name of the campaign. + UtmCampaign *string `json:"utm_campaign,omitempty"` + // Used to differentiate ads + UtmContent *string `json:"utm_content,omitempty"` + // Name of the marketing medium (e.g. \"Email\"). + UtmMedium *string `json:"utm_medium,omitempty"` + // Name of the referrer source. + UtmSource *string `json:"utm_source,omitempty"` + // Any paid keywords. + UtmTerm *string `json:"utm_term,omitempty"` +} diff --git a/rest/api/v3/tracking_settings/model_list_open_tracking_setting_200_response.go b/rest/api/v3/tracking_settings/model_list_open_tracking_setting_200_response.go new file mode 100644 index 00000000..84973abc --- /dev/null +++ b/rest/api/v3/tracking_settings/model_list_open_tracking_setting_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListOpenTrackingSetting200Response struct for ListOpenTrackingSetting200Response +type ListOpenTrackingSetting200Response struct { + // Indicates if open tracking is enabled. + Enabled bool `json:"enabled"` +} diff --git a/rest/api/v3/tracking_settings/model_list_tracking_setting_200_response.go b/rest/api/v3/tracking_settings/model_list_tracking_setting_200_response.go new file mode 100644 index 00000000..92bad2b6 --- /dev/null +++ b/rest/api/v3/tracking_settings/model_list_tracking_setting_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListTrackingSetting200Response struct for ListTrackingSetting200Response +type ListTrackingSetting200Response struct { + // The list of all tracking settings. + Result *[]ListTrackingSetting200ResponseResultInner `json:"result,omitempty"` +} diff --git a/rest/api/v3/tracking_settings/model_list_tracking_setting_200_response_result_inner.go b/rest/api/v3/tracking_settings/model_list_tracking_setting_200_response_result_inner.go new file mode 100644 index 00000000..849d497a --- /dev/null +++ b/rest/api/v3/tracking_settings/model_list_tracking_setting_200_response_result_inner.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListTrackingSetting200ResponseResultInner struct for ListTrackingSetting200ResponseResultInner +type ListTrackingSetting200ResponseResultInner struct { + // The name of the event being tracked. + Name *string `json:"name,omitempty"` + // The title of the tracking setting. + Title *string `json:"title,omitempty"` + // A description about the event that is being tracked. + Description *string `json:"description,omitempty"` + // Indicates if this tracking setting is currently enabled. + Enabled *bool `json:"enabled,omitempty"` +} diff --git a/rest/api/v3/tracking_settings/model_subscription_tracking_settings.go b/rest/api/v3/tracking_settings/model_subscription_tracking_settings.go new file mode 100644 index 00000000..ba674b35 --- /dev/null +++ b/rest/api/v3/tracking_settings/model_subscription_tracking_settings.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SubscriptionTrackingSettings struct for SubscriptionTrackingSettings +type SubscriptionTrackingSettings struct { + // Indicates if subscription tracking is enabled. + Enabled *bool `json:"enabled,omitempty"` + // The information and HTML for your unsubscribe link. + HtmlContent *string `json:"html_content,omitempty"` + // The HTML that will be displayed on the page that your customers will see after clicking unsubscribe, hosted on SendGrid’s server. + Landing *string `json:"landing,omitempty"` + // The information in plain text for your unsubscribe link. You should have the “<% %>” tag in your content, otherwise the user will have no URL for unsubscribing. + PlainContent *string `json:"plain_content,omitempty"` + // Your custom defined replacement tag for your templates. Use this tag to place your unsubscribe content anywhere in your emailtemplate. + Replace *string `json:"replace,omitempty"` + // The URL where you would like your users sent to unsubscribe. + Url *string `json:"url,omitempty"` +} diff --git a/rest/api/v3/tracking_settings/model_update_click_tracking_setting_request.go b/rest/api/v3/tracking_settings/model_update_click_tracking_setting_request.go new file mode 100644 index 00000000..b94df6e7 --- /dev/null +++ b/rest/api/v3/tracking_settings/model_update_click_tracking_setting_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateClickTrackingSettingRequest struct for UpdateClickTrackingSettingRequest +type UpdateClickTrackingSettingRequest struct { + // The setting you want to use for click tracking. + Enabled *bool `json:"enabled,omitempty"` +} diff --git a/rest/api/v3/tracking_settings/model_update_open_tracking_setting_request.go b/rest/api/v3/tracking_settings/model_update_open_tracking_setting_request.go new file mode 100644 index 00000000..b1c1b301 --- /dev/null +++ b/rest/api/v3/tracking_settings/model_update_open_tracking_setting_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateOpenTrackingSettingRequest struct for UpdateOpenTrackingSettingRequest +type UpdateOpenTrackingSettingRequest struct { + // The new status that you want to set for open tracking. + Enabled *bool `json:"enabled,omitempty"` +} diff --git a/rest/api/v3/webhooks/.openapi-generator b/rest/api/v3/webhooks/.openapi-generator new file mode 100644 index 00000000..f4bbd6a5 --- /dev/null +++ b/rest/api/v3/webhooks/.openapi-generator @@ -0,0 +1,80 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_create_event_webhook.go +api_create_parse_setting.go +api_delete_event_webhook.go +api_delete_parse_setting.go +api_get_event_webhook.go +api_get_parse_setting.go +api_get_signed_event_webhook.go +api_list_event_webhook.go +api_list_parse_setting.go +api_list_parse_static.go +api_service.go +api_test_event_webhook.go +api_update_event_webhook.go +api_update_parse_setting.go +api_update_signed_event_webhook.go +docs/AggregatedBy.md +docs/CreateEventWebhook.md +docs/CreateEventWebhook400Response.md +docs/CreateEventWebhook400ResponseErrorsInner.md +docs/CreateParseSetting.md +docs/DeleteEventWebhook.md +docs/DeleteParseSetting.md +docs/ErrorResponse.md +docs/ErrorResponseErrorsInner.md +docs/EventWebhookAllResponse.md +docs/EventWebhookBaseResponseProps.md +docs/EventWebhookDateResponseProps.md +docs/EventWebhookNoDatesResponse.md +docs/EventWebhookOauthResponseProps.md +docs/EventWebhookRequest.md +docs/EventWebhookSignedResponse.md +docs/EventWebhookSignedResponseProp.md +docs/EventWebhookTestRequest.md +docs/EventWebhookUnsignedResponse.md +docs/GetEventWebhook.md +docs/GetParseSetting.md +docs/GetSignedEventWebhook.md +docs/GetSignedEventWebhook200Response.md +docs/GetSignedEventWebhook404Response.md +docs/GetSignedEventWebhook404ResponseErrorsInner.md +docs/ListEventWebhook.md +docs/ListParseSetting.md +docs/ListParseSetting200Response.md +docs/ListParseStatic.md +docs/ListParseStatic200ResponseInner.md +docs/ListParseStatic200ResponseInnerStatsInner.md +docs/ListParseStatic200ResponseInnerStatsInnerMetrics.md +docs/ParseSetting.md +docs/TestEventWebhook.md +docs/UpdateEventWebhook.md +docs/UpdateParseSetting.md +docs/UpdateSignedEventWebhook.md +docs/UpdateSignedEventWebhookRequest.md +model_aggregated_by.go +model_create_event_webhook_400_response.go +model_create_event_webhook_400_response_errors_inner.go +model_error_response.go +model_error_response_errors_inner.go +model_event_webhook_all_response.go +model_event_webhook_base_response_props.go +model_event_webhook_date_response_props.go +model_event_webhook_no_dates_response.go +model_event_webhook_oauth_response_props.go +model_event_webhook_request.go +model_event_webhook_signed_response.go +model_event_webhook_signed_response_prop.go +model_event_webhook_test_request.go +model_event_webhook_unsigned_response.go +model_get_signed_event_webhook_200_response.go +model_get_signed_event_webhook_404_response.go +model_get_signed_event_webhook_404_response_errors_inner.go +model_list_parse_setting_200_response.go +model_list_parse_static_200_response_inner.go +model_list_parse_static_200_response_inner_stats_inner.go +model_list_parse_static_200_response_inner_stats_inner_metrics.go +model_parse_setting.go +model_update_signed_event_webhook_request.go diff --git a/rest/api/v3/webhooks/.openapi-generator-ignore b/rest/api/v3/webhooks/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/webhooks/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/webhooks/README.md b/rest/api/v3/webhooks/README.md new file mode 100644 index 00000000..e5f26d25 --- /dev/null +++ b/rest/api/v3/webhooks/README.md @@ -0,0 +1,100 @@ +# Go API client for + +The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. + +Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. + +The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T13:25:44.562782+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateEventWebhook* | [**CreateEventWebhook**](docs/CreateEventWebhook.md#createeventwebhook) | **Post** /v3/user/webhooks/event/settings | Create a new Event Webhook +*CreateParseSetting* | [**CreateParseSetting**](docs/CreateParseSetting.md#createparsesetting) | **Post** /v3/user/webhooks/parse/settings | Create a parse setting +*DeleteEventWebhook* | [**DeleteEventWebhook**](docs/DeleteEventWebhook.md#deleteeventwebhook) | **Delete** /v3/user/webhooks/event/settings/{Id} | Delete a single Event Webhook by ID. +*DeleteParseSetting* | [**DeleteParseSetting**](docs/DeleteParseSetting.md#deleteparsesetting) | **Delete** /v3/user/webhooks/parse/settings/{Hostname} | Delete a parse setting +*GetEventWebhook* | [**GetEventWebhook**](docs/GetEventWebhook.md#geteventwebhook) | **Get** /v3/user/webhooks/event/settings/{Id} | Get the settings for a single Event Webhook. +*GetParseSetting* | [**GetParseSetting**](docs/GetParseSetting.md#getparsesetting) | **Get** /v3/user/webhooks/parse/settings/{Hostname} | Retrieve a specific parse setting +*GetSignedEventWebhook* | [**GetSignedEventWebhook**](docs/GetSignedEventWebhook.md#getsignedeventwebhook) | **Get** /v3/user/webhooks/event/settings/signed/{Id} | Get Signed Event Webhook's Public Key +*ListEventWebhook* | [**ListEventWebhook**](docs/ListEventWebhook.md#listeventwebhook) | **Get** /v3/user/webhooks/event/settings/all | Retrieve all of your Event Webhooks. +*ListParseSetting* | [**ListParseSetting**](docs/ListParseSetting.md#listparsesetting) | **Get** /v3/user/webhooks/parse/settings | Retrieve all parse settings +*ListParseStatic* | [**ListParseStatic**](docs/ListParseStatic.md#listparsestatic) | **Get** /v3/user/webhooks/parse/stats | Retrieves Inbound Parse Webhook statistics. +*TestEventWebhook* | [**TestEventWebhook**](docs/TestEventWebhook.md#testeventwebhook) | **Post** /v3/user/webhooks/event/test | Test an Event Webhook's settings +*UpdateEventWebhook* | [**UpdateEventWebhook**](docs/UpdateEventWebhook.md#updateeventwebhook) | **Patch** /v3/user/webhooks/event/settings/{Id} | Update a single Event Webhook by ID. +*UpdateParseSetting* | [**UpdateParseSetting**](docs/UpdateParseSetting.md#updateparsesetting) | **Patch** /v3/user/webhooks/parse/settings/{Hostname} | Update a parse setting +*UpdateSignedEventWebhook* | [**UpdateSignedEventWebhook**](docs/UpdateSignedEventWebhook.md#updatesignedeventwebhook) | **Patch** /v3/user/webhooks/event/settings/signed/{Id} | Toggle signature verification for a single Event Webhook by ID + + +## Documentation For Models + + - [AggregatedBy](AggregatedBy.md) + - [CreateEventWebhook400Response](CreateEventWebhook400Response.md) + - [CreateEventWebhook400ResponseErrorsInner](CreateEventWebhook400ResponseErrorsInner.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [EventWebhookAllResponse](EventWebhookAllResponse.md) + - [EventWebhookBaseResponseProps](EventWebhookBaseResponseProps.md) + - [EventWebhookDateResponseProps](EventWebhookDateResponseProps.md) + - [EventWebhookNoDatesResponse](EventWebhookNoDatesResponse.md) + - [EventWebhookOauthResponseProps](EventWebhookOauthResponseProps.md) + - [EventWebhookRequest](EventWebhookRequest.md) + - [EventWebhookSignedResponse](EventWebhookSignedResponse.md) + - [EventWebhookSignedResponseProp](EventWebhookSignedResponseProp.md) + - [EventWebhookTestRequest](EventWebhookTestRequest.md) + - [EventWebhookUnsignedResponse](EventWebhookUnsignedResponse.md) + - [GetSignedEventWebhook200Response](GetSignedEventWebhook200Response.md) + - [GetSignedEventWebhook404Response](GetSignedEventWebhook404Response.md) + - [GetSignedEventWebhook404ResponseErrorsInner](GetSignedEventWebhook404ResponseErrorsInner.md) + - [ListParseSetting200Response](ListParseSetting200Response.md) + - [ListParseStatic200ResponseInner](ListParseStatic200ResponseInner.md) + - [ListParseStatic200ResponseInnerStatsInner](ListParseStatic200ResponseInnerStatsInner.md) + - [ListParseStatic200ResponseInnerStatsInnerMetrics](ListParseStatic200ResponseInnerStatsInnerMetrics.md) + - [ParseSetting](ParseSetting.md) + - [UpdateSignedEventWebhookRequest](UpdateSignedEventWebhookRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/webhooks/api_create_event_webhook.go b/rest/api/v3/webhooks/api_create_event_webhook.go new file mode 100644 index 00000000..0dd3432d --- /dev/null +++ b/rest/api/v3/webhooks/api_create_event_webhook.go @@ -0,0 +1,81 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type CreateEventWebhookParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + EventWebhookRequest *EventWebhookRequest `json:"EventWebhookRequest,omitempty"` +} + +func (params *CreateEventWebhookParam) SetOnbehalfof(Onbehalfof string) *CreateEventWebhookParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateEventWebhookParam) SetEventWebhookRequest(EventWebhookRequest EventWebhookRequest) *CreateEventWebhookParam { + params.EventWebhookRequest = &EventWebhookRequest + return params +} + +// **This endpoint allows you to create a new Event Webhook.** When creating a webhook, you will provide a URL where you want the webhook to send POST requests, and you will select which events you want to receive in those request. See the [**Event Webhook Reference**](https://docs.sendgrid.com/for-developers/tracking-events/event#delivery-events) for details about each event type. ### Webhook identifiers When your webhook is succesfully created, you will receive a webhook `id` in the response returned by this endpoint. You can use that ID to [update the webhook's settings](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook), [delete the webhook](https://docs.sendgrid.com/api-reference/webhooks/delete-an-event-webhook), [enable or disable signature verification for the webhook](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook), and, if signature verification is enabled, [retrieve the webhook's public key](https://docs.sendgrid.com/api-reference/webhooks/get-signed-event-webhooks-public-key). You may also assign an optional friendly name to each of your webhooks. The friendly name is for convenience only and should not be used to programmatically differentiate your webhooks because it does not need to be unique. Use the webhook ID to reliably differentiate among your webhooks. ### OAuth You can optionally configure OAuth verification for your webhook at the time of creation by passing the appropriate values in the `oauth_client_id`, `oauth_client_secret`, and `oauth_token_url` properties. You can enable or disable OAuth for the webhook after creation with the [**Update an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) operation. You may share one OAuth configuration across all your webhooks or create unique credentials for each. See our [webhook security documentation](https://docs.sendgrid.com/for-developers/tracking-events/getting-started-event-webhook-security-features#oauth-20) for details about OAuth and the Event Webhook. ### Signature verification Enabling signature verification for your webhook is a separate process and cannot be done at the time of creation with this endpoint. You can use the webhook ID to [enable or disable signature verification with the endpoint dedicated for that operation](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook). +func (c *ApiService) CreateEventWebhook(params *CreateEventWebhookParam) (interface{}, error) { + path := "/v3/user/webhooks/event/settings" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.EventWebhookRequest != nil { + b, err := json.Marshal(*params.EventWebhookRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &EventWebhookUnsignedResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &CreateEventWebhook400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/webhooks/api_create_parse_setting.go b/rest/api/v3/webhooks/api_create_parse_setting.go new file mode 100644 index 00000000..cc7a8562 --- /dev/null +++ b/rest/api/v3/webhooks/api_create_parse_setting.go @@ -0,0 +1,97 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type CreateParseSettingParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + ParseSetting *ParseSetting `json:"ParseSetting,omitempty"` +} + +func (params *CreateParseSettingParam) SetOnbehalfof(Onbehalfof string) *CreateParseSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateParseSettingParam) SetParseSetting(ParseSetting ParseSetting) *CreateParseSettingParam { + params.ParseSetting = &ParseSetting + return params +} + +// **This endpoint allows you to create a new inbound parse setting.** Creating an Inbound Parse setting requires two pieces of information: a `url` and a `hostname`. The `hostname` must correspond to a domain authenticated by Twilio SendGrid on your account. If you need to complete domain authentication, you can use the [Twilio SendGrid App](https://app.sendgrid.com/settings/sender_auth) or the **Authenticate a Domain** endpoint. See [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/) for instructions. Any email received by the `hostname` will be parsed when you complete this setup. You must also add a Twilio SendGrid MX record to this domain's DNS records. See [**Setting up the Inbound Parse Webhook**](https://sendgrid.com/docs/for-developers/parsing-email/setting-up-the-inbound-parse-webhook/) for full instructions. The `url` represents a location where the parsed message data will be delivered. Twilio SendGrid will make an HTTP POST request to this `url` with the message data. The `url` must be publicly reachable, and your application must return a `200` status code to signal that the message data has been received. +func (c *ApiService) CreateParseSetting(params *CreateParseSettingParam) (interface{}, error) { + path := "/v3/user/webhooks/parse/settings" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.ParseSetting != nil { + b, err := json.Marshal(*params.ParseSetting) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &ParseSetting{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/webhooks/api_delete_event_webhook.go b/rest/api/v3/webhooks/api_delete_event_webhook.go new file mode 100644 index 00000000..df797e9e --- /dev/null +++ b/rest/api/v3/webhooks/api_delete_event_webhook.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DeleteEventWebhookParam struct { + // The ID of the Event Webhook you want to retrieve. + Id *string `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteEventWebhookParam) SetId(Id string) *DeleteEventWebhookParam { + params.Id = &Id + return params +} +func (params *DeleteEventWebhookParam) SetOnbehalfof(Onbehalfof string) *DeleteEventWebhookParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete a single Event Webhook by ID.** Unlike the [**Get an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/get-an-event-webhook) and [**Update an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) endpoints, which will operate on your oldest webhook by `created_date` when you don't provide an ID, this endpoint will return an error if you do not pass it an ID. This behavior prevents customers from unintentionally deleting a webhook. You can retrieve your webhooks' IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. ### Enable or disable the webhook This endpoint will permanently delete the webhook specified. If you instead want to disable a webhook, you can set the `enabled` property to `false` with the [**Update an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) endpoint. +func (c *ApiService) DeleteEventWebhook(params *DeleteEventWebhookParam) (interface{}, error) { + path := "/v3/user/webhooks/event/settings/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 404 { + ps := &GetSignedEventWebhook404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/webhooks/api_delete_parse_setting.go b/rest/api/v3/webhooks/api_delete_parse_setting.go new file mode 100644 index 00000000..e4332ebc --- /dev/null +++ b/rest/api/v3/webhooks/api_delete_parse_setting.go @@ -0,0 +1,93 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type DeleteParseSettingParam struct { + // The hostname associated with the inbound parse setting that you would like to retrieve. + Hostname *string `json:"hostname"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteParseSettingParam) SetHostname(Hostname string) *DeleteParseSettingParam { + params.Hostname = &Hostname + return params +} +func (params *DeleteParseSettingParam) SetOnbehalfof(Onbehalfof string) *DeleteParseSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete a specific inbound parse setting by hostname.** You can retrieve all your Inbound Parse settings and their associated host names with the \"Retrieve all parse settings\" endpoint. +func (c *ApiService) DeleteParseSetting(params *DeleteParseSettingParam) (interface{}, error) { + path := "/v3/user/webhooks/parse/settings/{Hostname}" + if params != nil && params.Hostname != nil { + path = strings.Replace(path, "{"+"Hostname"+"}", *params.Hostname, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/webhooks/api_get_event_webhook.go b/rest/api/v3/webhooks/api_get_event_webhook.go new file mode 100644 index 00000000..89484ed5 --- /dev/null +++ b/rest/api/v3/webhooks/api_get_event_webhook.go @@ -0,0 +1,87 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type GetEventWebhookParam struct { + // The ID of the Event Webhook you want to retrieve. + Id *string `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // Use this to include optional fields in the response payload. When this is set to `include=account_status_change`, the `account_status_change` field will be part of the response payload and set to `false` by default. See [Update an event webhook](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) for enabling this webhook notification which lets you subscribe to account status change events related to compliance action taken by SendGrid. + Include *string `json:"include,omitempty"` +} + +func (params *GetEventWebhookParam) SetId(Id string) *GetEventWebhookParam { + params.Id = &Id + return params +} +func (params *GetEventWebhookParam) SetOnbehalfof(Onbehalfof string) *GetEventWebhookParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *GetEventWebhookParam) SetInclude(Include string) *GetEventWebhookParam { + params.Include = &Include + return params +} + +// **This endpoint allows you to retrieve a single Event Webhook by ID.** If you do not pass a webhook ID to this endpoint, it will return your oldest webhook by `created_date`. This means the default webhook returned by this endpoint when no ID is provided will be the first one you created. This functionality allows customers who do not have multiple webhooks to use this endpoint to retrieve their only webhook, even if they do not supply an ID. If you have multiple webhooks, you can retrieve their IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. ### Event settings Your webhook will be returned with all of its settings, which include the events that will be included in the POST request by the webhook and the URL where they will be sent. If an event type is marked as `true`, the event webhook will send information about that event type. See the [**Event Webhook Reference**](https://docs.sendgrid.com/for-developers/tracking-events/event#delivery-events) for details about each event type. ### Signature verification The `public_key` property will be returned only for webhooks with signature verification enabled. ### OAuth You may share one OAuth configuration across all your webhooks or create unique credentials for each. The OAuth properties will be returned only for webhooks with OAuth configured. +func (c *ApiService) GetEventWebhook(params *GetEventWebhookParam) (interface{}, error) { + path := "/v3/user/webhooks/event/settings/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Include != nil { + data.Set("include", *params.Include) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &EventWebhookNoDatesResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &GetSignedEventWebhook404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/webhooks/api_get_parse_setting.go b/rest/api/v3/webhooks/api_get_parse_setting.go new file mode 100644 index 00000000..3efb389a --- /dev/null +++ b/rest/api/v3/webhooks/api_get_parse_setting.go @@ -0,0 +1,93 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type GetParseSettingParam struct { + // The hostname associated with the inbound parse setting that you would like to retrieve. + Hostname *string `json:"hostname"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetParseSettingParam) SetHostname(Hostname string) *GetParseSettingParam { + params.Hostname = &Hostname + return params +} +func (params *GetParseSettingParam) SetOnbehalfof(Onbehalfof string) *GetParseSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a specific inbound parse setting by hostname.** You can retrieve all your Inbound Parse settings and their associated host names with the \"Retrieve all parse settings\" endpoint. +func (c *ApiService) GetParseSetting(params *GetParseSettingParam) (interface{}, error) { + path := "/v3/user/webhooks/parse/settings/{Hostname}" + if params != nil && params.Hostname != nil { + path = strings.Replace(path, "{"+"Hostname"+"}", *params.Hostname, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ParseSetting{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/webhooks/api_get_signed_event_webhook.go b/rest/api/v3/webhooks/api_get_signed_event_webhook.go new file mode 100644 index 00000000..3ee37388 --- /dev/null +++ b/rest/api/v3/webhooks/api_get_signed_event_webhook.go @@ -0,0 +1,77 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type GetSignedEventWebhookParam struct { + // The ID of the Event Webhook you want to retrieve. + Id *string `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetSignedEventWebhookParam) SetId(Id string) *GetSignedEventWebhookParam { + params.Id = &Id + return params +} +func (params *GetSignedEventWebhookParam) SetOnbehalfof(Onbehalfof string) *GetSignedEventWebhookParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve the public key for a single Event Webhook by ID.** If you do not pass a webhook ID to this endpoint, it will return the public key for your oldest webhook by `created_date`. This means the default key returned by this endpoint when no ID is provided will be for the first webhook you created. This functionality allows customers who do not have multiple webhooks to use this endpoint to retrieve their only webhook's public key, even if they do not supply an ID. If you have multiple webhooks, you can retrieve their IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. Once you have enabled signature verification for a webhook, you will need the public key provided to verify the signatures on requests coming from Twilio SendGrid. You can use the webhook ID to [enable or disable signature verification with the endpoint dedicated for that operation](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook). For more information about cryptographically signing the Event Webhook, see [**Getting Started with the Event Webhook Security Features**](https://sendgrid.com/docs/for-developers/tracking-events/getting-started-event-webhook-security-features). +func (c *ApiService) GetSignedEventWebhook(params *GetSignedEventWebhookParam) (interface{}, error) { + path := "/v3/user/webhooks/event/settings/signed/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetSignedEventWebhook200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &GetSignedEventWebhook404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/webhooks/api_list_event_webhook.go b/rest/api/v3/webhooks/api_list_event_webhook.go new file mode 100644 index 00000000..e1b4bb6b --- /dev/null +++ b/rest/api/v3/webhooks/api_list_event_webhook.go @@ -0,0 +1,68 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListEventWebhookParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // Use this to include optional fields in the response payload. When this is set to `include=account_status_change`, the `account_status_change` field will be part of the response payload and set to `false` by default. See [Update an event webhook](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) for enabling this webhook notification which lets you subscribe to account status change events related to compliance action taken by SendGrid. + Include *string `json:"include,omitempty"` +} + +func (params *ListEventWebhookParam) SetOnbehalfof(Onbehalfof string) *ListEventWebhookParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *ListEventWebhookParam) SetInclude(Include string) *ListEventWebhookParam { + params.Include = &Include + return params +} + +// **This endpoint allows you to retrieve all of your Event Webhooks.** Each webhook will be returned as an object in the `webhooks` array with the webhook's configuration details and ID. You can use a webhook's ID to [update the webhook's settings](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook), [delete the webhook](https://docs.sendgrid.com/api-reference/webhooks/delete-an-event-webhook), [enable or disable signature verification for the webhook](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook), and, if signature verification is enabled, [retrieve the webhook's public key](https://docs.sendgrid.com/api-reference/webhooks/get-signed-event-webhooks-public-key) when signature verification is enabled. ### Event settings Each webhook's settings determine which events will be included in the POST request by the webhook and the URL where the request will be sent. See the [**Event Webhook Reference**](https://docs.sendgrid.com/for-developers/tracking-events/event#delivery-events) for details about each event type. ### Signature verification The `public_key` property will be returned only for webhooks with signature verification enabled. ### OAuth You may share one OAuth configuration across all your webhooks or create unique credentials for each. The OAuth properties will be returned only for webhooks with OAuth configured. +func (c *ApiService) ListEventWebhook(params *ListEventWebhookParam) (interface{}, error) { + path := "/v3/user/webhooks/event/settings/all" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Include != nil { + data.Set("include", *params.Include) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &EventWebhookAllResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/webhooks/api_list_parse_setting.go b/rest/api/v3/webhooks/api_list_parse_setting.go new file mode 100644 index 00000000..cb0cd5e4 --- /dev/null +++ b/rest/api/v3/webhooks/api_list_parse_setting.go @@ -0,0 +1,82 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type ListParseSettingParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListParseSettingParam) SetOnbehalfof(Onbehalfof string) *ListParseSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve all of your current inbound parse settings.** +func (c *ApiService) ListParseSetting(params *ListParseSettingParam) (interface{}, error) { + path := "/v3/user/webhooks/parse/settings" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListParseSetting200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/webhooks/api_list_parse_static.go b/rest/api/v3/webhooks/api_list_parse_static.go new file mode 100644 index 00000000..5d7129ae --- /dev/null +++ b/rest/api/v3/webhooks/api_list_parse_static.go @@ -0,0 +1,105 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/url" +) + +type ListParseStaticParam struct { + // The starting date of the statistics you want to retrieve. Must be in the format YYYY-MM-DD + StartDate *string `json:"start_date"` + // The number of statistics to return on each page. + Limit *string `json:"limit,omitempty"` + // The number of statistics to skip. + Offset *string `json:"offset,omitempty"` + // How you would like the statistics to by grouped. + AggregatedBy *AggregatedBy `json:"aggregated_by,omitempty"` + // The end date of the statistics you want to retrieve. Must be in the format YYYY-MM-DD + EndDate *string `json:"end_date,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListParseStaticParam) SetStartDate(StartDate string) *ListParseStaticParam { + params.StartDate = &StartDate + return params +} +func (params *ListParseStaticParam) SetLimit(Limit string) *ListParseStaticParam { + params.Limit = &Limit + return params +} +func (params *ListParseStaticParam) SetOffset(Offset string) *ListParseStaticParam { + params.Offset = &Offset + return params +} +func (params *ListParseStaticParam) SetAggregatedBy(AggregatedBy AggregatedBy) *ListParseStaticParam { + params.AggregatedBy = &AggregatedBy + return params +} +func (params *ListParseStaticParam) SetEndDate(EndDate string) *ListParseStaticParam { + params.EndDate = &EndDate + return params +} +func (params *ListParseStaticParam) SetOnbehalfof(Onbehalfof string) *ListParseStaticParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve the statistics for your Parse Webhook usage.** SendGrid's Inbound Parse Webhook allows you to parse the contents and attachments of incoming emails. The Parse API can then POST the parsed emails to a URL that you specify. The Inbound Parse Webhook cannot parse messages greater than 30MB in size, including all attachments. There are a number of pre-made integrations for the SendGrid Parse Webhook which make processing events easy. You can find these integrations in the [Library Index](https://docs.sendgrid.com/for-developers/sending-email/libraries#webhook-libraries). +func (c *ApiService) ListParseStatic(params *ListParseStaticParam) (interface{}, error) { + path := "/v3/user/webhooks/parse/stats" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartDate != nil { + data.Set("start_date", *params.StartDate) + } + if params != nil && params.Limit != nil { + data.Set("limit", *params.Limit) + } + if params != nil && params.Offset != nil { + data.Set("offset", *params.Offset) + } + if params != nil && params.AggregatedBy != nil { + data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", *params.EndDate) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListParseStatic200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/webhooks/api_service.go b/rest/api/v3/webhooks/api_service.go new file mode 100644 index 00000000..a92477c0 --- /dev/null +++ b/rest/api/v3/webhooks/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/webhooks/api_test_event_webhook.go b/rest/api/v3/webhooks/api_test_event_webhook.go new file mode 100644 index 00000000..b183cd8e --- /dev/null +++ b/rest/api/v3/webhooks/api_test_event_webhook.go @@ -0,0 +1,65 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" +) + +type TestEventWebhookParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + EventWebhookTestRequest *EventWebhookTestRequest `json:"EventWebhookTestRequest,omitempty"` +} + +func (params *TestEventWebhookParam) SetOnbehalfof(Onbehalfof string) *TestEventWebhookParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *TestEventWebhookParam) SetEventWebhookTestRequest(EventWebhookTestRequest EventWebhookTestRequest) *TestEventWebhookParam { + params.EventWebhookTestRequest = &EventWebhookTestRequest + return params +} + +// **This endpoint allows you to test an Event Webhook.** Retry logic for this endpoint differs from other endpoints, which use a rolling 24-hour retry. This endpoint will make a POST request with a fake event notification to a URL you provide. This allows you to verify that you have properly configured the webhook before sending real data to your URL. ### Test OAuth configuration To test your OAuth configuration, you must include the necessary OAuth properties: `oauth_client_id`, `oauth_client_secret`, and `oauth_token_url`. If the webhook you are testing already has OAuth credentials saved, you will provide only the `oauth_client_id` and `oauth_token_url`—we will pull the secret for you. If you are testing a new set of OAuth credentials that have not been saved with SendGrid, you must provide all three property values. You can retrieve a previously saved `oauth_client_id` and `oauth_token_url` from the [**Get an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/get-an-event-webhook) endpoint; however, for security reasons, SendGrid will not provide your `oauth_client_secret`. +func (c *ApiService) TestEventWebhook(params *TestEventWebhookParam) (interface{}, error) { + path := "/v3/user/webhooks/event/test" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.EventWebhookTestRequest != nil { + b, err := json.Marshal(*params.EventWebhookTestRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + return nil, nil +} diff --git a/rest/api/v3/webhooks/api_update_event_webhook.go b/rest/api/v3/webhooks/api_update_event_webhook.go new file mode 100644 index 00000000..eb308063 --- /dev/null +++ b/rest/api/v3/webhooks/api_update_event_webhook.go @@ -0,0 +1,109 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type UpdateEventWebhookParam struct { + // The ID of the Event Webhook you want to retrieve. + Id *string `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // Use this to include optional fields in the response payload. When this is set to `include=account_status_change`, the `account_status_change` field will be part of the response payload and set to `false` by default. See [Update an event webhook](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) for enabling this webhook notification which lets you subscribe to account status change events related to compliance action taken by SendGrid. + Include *string `json:"include,omitempty"` + // + EventWebhookRequest *EventWebhookRequest `json:"EventWebhookRequest,omitempty"` +} + +func (params *UpdateEventWebhookParam) SetId(Id string) *UpdateEventWebhookParam { + params.Id = &Id + return params +} +func (params *UpdateEventWebhookParam) SetOnbehalfof(Onbehalfof string) *UpdateEventWebhookParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateEventWebhookParam) SetInclude(Include string) *UpdateEventWebhookParam { + params.Include = &Include + return params +} +func (params *UpdateEventWebhookParam) SetEventWebhookRequest(EventWebhookRequest EventWebhookRequest) *UpdateEventWebhookParam { + params.EventWebhookRequest = &EventWebhookRequest + return params +} + +// **This endpoint allows you to update a single Event Webhook by ID.** If you do not pass a webhook ID to this endpoint, it will update and return your oldest webhook by `created_date`. This means the default webhook updated by this endpoint when no ID is provided will be the first one you created. This functionality allows customers who do not have multiple webhooks to use this endpoint to update their only webhook, even if they do not supply an ID. If you have multiple webhooks, you can retrieve their IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. ### Enable or disable the webhook You can set the `enabled` property to `true` to enable the webhook or `false` to disable it. Disabling a webhook will not delete it from your account, but it will prevent the webhook from sending events to your designated URL. ### URL A webhook's URL is the endpoint where you want the webhook to send POST requests containing event data. No more than one webhook may be configured to send to the same URL. SendGrid will return an error if you attempt to set a URL for a webhook that is already in use by the user on another webhook. ### Event settings If an event type is marked as `true`, the event webhook will send information about that event type. See the [**Event Webhook Reference**](https://docs.sendgrid.com/for-developers/tracking-events/event#delivery-events) for details about each event type. ### Webhook identifiers You may assign an optional friendly name to each of your webhooks. The friendly name is for convenience only and should not be used to programmatically differentiate your webhooks because it does not need to be unique. ### OAuth You can configure OAuth for your webhook by passing the required values to this endpoint in the `oauth_client_id`, `oauth_client_secret`, and `oauth_token_url` properties. To disable OAuth, pass an empty string to this endpoint for each of the OAuth properties. You may share one OAuth configuration across all your webhooks or create unique credentials for each. See our [webhook security documentation](https://docs.sendgrid.com/for-developers/tracking-events/getting-started-event-webhook-security-features#oauth-20) for more detailed information about OAuth and the Event Webhook. ### Signature verification Enabling signature verification for your webhook is a separate process and cannot be done with this endpoint. You can use the webhook ID to [enable or disable signature verification with the endpoint dedicated for that operation](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook). +func (c *ApiService) UpdateEventWebhook(params *UpdateEventWebhookParam) (interface{}, error) { + path := "/v3/user/webhooks/event/settings/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + if params != nil && params.Include != nil { + data.Set("include", *params.Include) + } + body := []byte{} + if params != nil && params.EventWebhookRequest != nil { + b, err := json.Marshal(*params.EventWebhookRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &EventWebhookUnsignedResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &CreateEventWebhook400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &GetSignedEventWebhook404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/webhooks/api_update_parse_setting.go b/rest/api/v3/webhooks/api_update_parse_setting.go new file mode 100644 index 00000000..19db3589 --- /dev/null +++ b/rest/api/v3/webhooks/api_update_parse_setting.go @@ -0,0 +1,108 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type UpdateParseSettingParam struct { + // The hostname associated with the inbound parse setting that you would like to retrieve. + Hostname *string `json:"hostname"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + ParseSetting *ParseSetting `json:"ParseSetting,omitempty"` +} + +func (params *UpdateParseSettingParam) SetHostname(Hostname string) *UpdateParseSettingParam { + params.Hostname = &Hostname + return params +} +func (params *UpdateParseSettingParam) SetOnbehalfof(Onbehalfof string) *UpdateParseSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateParseSettingParam) SetParseSetting(ParseSetting ParseSetting) *UpdateParseSettingParam { + params.ParseSetting = &ParseSetting + return params +} + +// **This endpoint allows you to update a specific inbound parse setting by hostname.** You can retrieve all your Inbound Parse settings and their associated host names with the \"Retrieve all parse settings\" endpoint. +func (c *ApiService) UpdateParseSetting(params *UpdateParseSettingParam) (interface{}, error) { + path := "/v3/user/webhooks/parse/settings/{Hostname}" + if params != nil && params.Hostname != nil { + path = strings.Replace(path, "{"+"Hostname"+"}", *params.Hostname, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.ParseSetting != nil { + b, err := json.Marshal(*params.ParseSetting) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ParseSetting{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/webhooks/api_update_signed_event_webhook.go b/rest/api/v3/webhooks/api_update_signed_event_webhook.go new file mode 100644 index 00000000..403effeb --- /dev/null +++ b/rest/api/v3/webhooks/api_update_signed_event_webhook.go @@ -0,0 +1,92 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/url" + + "strings" +) + +type UpdateSignedEventWebhookParam struct { + // The ID of the Event Webhook you want to retrieve. + Id *string `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateSignedEventWebhookRequest *UpdateSignedEventWebhookRequest `json:"UpdateSignedEventWebhookRequest,omitempty"` +} + +func (params *UpdateSignedEventWebhookParam) SetId(Id string) *UpdateSignedEventWebhookParam { + params.Id = &Id + return params +} +func (params *UpdateSignedEventWebhookParam) SetOnbehalfof(Onbehalfof string) *UpdateSignedEventWebhookParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateSignedEventWebhookParam) SetUpdateSignedEventWebhookRequest(UpdateSignedEventWebhookRequest UpdateSignedEventWebhookRequest) *UpdateSignedEventWebhookParam { + params.UpdateSignedEventWebhookRequest = &UpdateSignedEventWebhookRequest + return params +} + +// **This endpoint allows you to enable or disable signature verification for a single Event Webhook by ID.** If you do not pass a webhook ID to this endpoint, it will enable signature verification for your oldest webhook by `created_date`. This means the default webhook operated on by this endpoint when no ID is provided will be the first one you created. This functionality allows customers who do not have multiple webhooks to enable or disable signature verifiction for their only webhook, even if they do not supply an ID. If you have multiple webhooks, you can retrieve their IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. This endpoint accepts a single boolean request property, `enabled`, that can be set `true` or `false` to enable or disable signature verification. This endpoint will return the public key required to verify Twilio SendGrid signatures if it is enabled or an empty string if signing is disabled. You can also retrieve your public key using the [**Get an Event Webhook's Public Key**](https://docs.sendgrid.com/api-reference/webhooks/get-signed-event-webhooks-public-key) endpoint. For more information about cryptographically signing the Event Webhook, see [**Getting Started with the Event Webhook Security Features**](https://sendgrid.com/docs/for-developers/tracking-events/getting-started-event-webhook-security-features). +func (c *ApiService) UpdateSignedEventWebhook(params *UpdateSignedEventWebhookParam) (interface{}, error) { + path := "/v3/user/webhooks/event/settings/signed/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateSignedEventWebhookRequest != nil { + b, err := json.Marshal(*params.UpdateSignedEventWebhookRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetSignedEventWebhook200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &GetSignedEventWebhook404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return nil, nil +} diff --git a/rest/api/v3/webhooks/docs/AggregatedBy.md b/rest/api/v3/webhooks/docs/AggregatedBy.md new file mode 100644 index 00000000..96f02c9f --- /dev/null +++ b/rest/api/v3/webhooks/docs/AggregatedBy.md @@ -0,0 +1,14 @@ +# AggregatedBy + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DAY** | string | (value: `"day"`) +**WEEK** | string | (value: `"week"`) +**MONTH** | string | (value: `"month"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/CreateEventWebhook.md b/rest/api/v3/webhooks/docs/CreateEventWebhook.md new file mode 100644 index 00000000..b14e0354 --- /dev/null +++ b/rest/api/v3/webhooks/docs/CreateEventWebhook.md @@ -0,0 +1,49 @@ +# CreateEventWebhook + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateEventWebhook**](CreateEventWebhook.md#CreateEventWebhook) | **Post** /v3/user/webhooks/event/settings | Create a new Event Webhook + + + +## CreateEventWebhook + +> EventWebhookUnsignedResponse CreateEventWebhook(ctx, optional) + +Create a new Event Webhook + +**This endpoint allows you to create a new Event Webhook.** When creating a webhook, you will provide a URL where you want the webhook to send POST requests, and you will select which events you want to receive in those request. See the [**Event Webhook Reference**](https://docs.sendgrid.com/for-developers/tracking-events/event#delivery-events) for details about each event type. ### Webhook identifiers When your webhook is succesfully created, you will receive a webhook `id` in the response returned by this endpoint. You can use that ID to [update the webhook's settings](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook), [delete the webhook](https://docs.sendgrid.com/api-reference/webhooks/delete-an-event-webhook), [enable or disable signature verification for the webhook](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook), and, if signature verification is enabled, [retrieve the webhook's public key](https://docs.sendgrid.com/api-reference/webhooks/get-signed-event-webhooks-public-key). You may also assign an optional friendly name to each of your webhooks. The friendly name is for convenience only and should not be used to programmatically differentiate your webhooks because it does not need to be unique. Use the webhook ID to reliably differentiate among your webhooks. ### OAuth You can optionally configure OAuth verification for your webhook at the time of creation by passing the appropriate values in the `oauth_client_id`, `oauth_client_secret`, and `oauth_token_url` properties. You can enable or disable OAuth for the webhook after creation with the [**Update an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) operation. You may share one OAuth configuration across all your webhooks or create unique credentials for each. See our [webhook security documentation](https://docs.sendgrid.com/for-developers/tracking-events/getting-started-event-webhook-security-features#oauth-20) for details about OAuth and the Event Webhook. ### Signature verification Enabling signature verification for your webhook is a separate process and cannot be done at the time of creation with this endpoint. You can use the webhook ID to [enable or disable signature verification with the endpoint dedicated for that operation](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateEventWebhookParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**EventWebhookRequest** | [**EventWebhookRequest**](EventWebhookRequest.md) | + +### Return type + +[**EventWebhookUnsignedResponse**](EventWebhookUnsignedResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/webhooks/docs/CreateEventWebhook400Response.md b/rest/api/v3/webhooks/docs/CreateEventWebhook400Response.md new file mode 100644 index 00000000..36edd9c5 --- /dev/null +++ b/rest/api/v3/webhooks/docs/CreateEventWebhook400Response.md @@ -0,0 +1,11 @@ +# CreateEventWebhook400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]CreateEventWebhook400ResponseErrorsInner**](CreateEventWebhook400ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/CreateEventWebhook400ResponseErrorsInner.md b/rest/api/v3/webhooks/docs/CreateEventWebhook400ResponseErrorsInner.md new file mode 100644 index 00000000..d41fff3d --- /dev/null +++ b/rest/api/v3/webhooks/docs/CreateEventWebhook400ResponseErrorsInner.md @@ -0,0 +1,13 @@ +# CreateEventWebhook400ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The ID of a Webhook that exists on your account that is already configured to send events to the endpoint URL you provided. |[optional] +**Message** | **string** | Error message. |[optional] +**Url** | **string** | The URL that is already configured as a Webhook endpoint for one of your existing Webhooks. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/CreateParseSetting.md b/rest/api/v3/webhooks/docs/CreateParseSetting.md new file mode 100644 index 00000000..75e24a9f --- /dev/null +++ b/rest/api/v3/webhooks/docs/CreateParseSetting.md @@ -0,0 +1,49 @@ +# CreateParseSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateParseSetting**](CreateParseSetting.md#CreateParseSetting) | **Post** /v3/user/webhooks/parse/settings | Create a parse setting + + + +## CreateParseSetting + +> ParseSetting CreateParseSetting(ctx, optional) + +Create a parse setting + +**This endpoint allows you to create a new inbound parse setting.** Creating an Inbound Parse setting requires two pieces of information: a `url` and a `hostname`. The `hostname` must correspond to a domain authenticated by Twilio SendGrid on your account. If you need to complete domain authentication, you can use the [Twilio SendGrid App](https://app.sendgrid.com/settings/sender_auth) or the **Authenticate a Domain** endpoint. See [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/) for instructions. Any email received by the `hostname` will be parsed when you complete this setup. You must also add a Twilio SendGrid MX record to this domain's DNS records. See [**Setting up the Inbound Parse Webhook**](https://sendgrid.com/docs/for-developers/parsing-email/setting-up-the-inbound-parse-webhook/) for full instructions. The `url` represents a location where the parsed message data will be delivered. Twilio SendGrid will make an HTTP POST request to this `url` with the message data. The `url` must be publicly reachable, and your application must return a `200` status code to signal that the message data has been received. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateParseSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**ParseSetting** | [**ParseSetting**](ParseSetting.md) | + +### Return type + +[**ParseSetting**](ParseSetting.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/webhooks/docs/DeleteEventWebhook.md b/rest/api/v3/webhooks/docs/DeleteEventWebhook.md new file mode 100644 index 00000000..135249c7 --- /dev/null +++ b/rest/api/v3/webhooks/docs/DeleteEventWebhook.md @@ -0,0 +1,52 @@ +# DeleteEventWebhook + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteEventWebhook**](DeleteEventWebhook.md#DeleteEventWebhook) | **Delete** /v3/user/webhooks/event/settings/{Id} | Delete a single Event Webhook by ID. + + + +## DeleteEventWebhook + +> DeleteEventWebhook(ctx, Idoptional) + +Delete a single Event Webhook by ID. + +**This endpoint allows you to delete a single Event Webhook by ID.** Unlike the [**Get an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/get-an-event-webhook) and [**Update an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) endpoints, which will operate on your oldest webhook by `created_date` when you don't provide an ID, this endpoint will return an error if you do not pass it an ID. This behavior prevents customers from unintentionally deleting a webhook. You can retrieve your webhooks' IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. ### Enable or disable the webhook This endpoint will permanently delete the webhook specified. If you instead want to disable a webhook, you can set the `enabled` property to `false` with the [**Update an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the Event Webhook you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteEventWebhookParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/webhooks/docs/DeleteParseSetting.md b/rest/api/v3/webhooks/docs/DeleteParseSetting.md new file mode 100644 index 00000000..5bdf1dc3 --- /dev/null +++ b/rest/api/v3/webhooks/docs/DeleteParseSetting.md @@ -0,0 +1,52 @@ +# DeleteParseSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteParseSetting**](DeleteParseSetting.md#DeleteParseSetting) | **Delete** /v3/user/webhooks/parse/settings/{Hostname} | Delete a parse setting + + + +## DeleteParseSetting + +> map[string]interface{} DeleteParseSetting(ctx, Hostnameoptional) + +Delete a parse setting + +**This endpoint allows you to delete a specific inbound parse setting by hostname.** You can retrieve all your Inbound Parse settings and their associated host names with the \"Retrieve all parse settings\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Hostname** | **string** | The hostname associated with the inbound parse setting that you would like to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteParseSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/webhooks/docs/ErrorResponse.md b/rest/api/v3/webhooks/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/webhooks/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/ErrorResponseErrorsInner.md b/rest/api/v3/webhooks/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/webhooks/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/EventWebhookAllResponse.md b/rest/api/v3/webhooks/docs/EventWebhookAllResponse.md new file mode 100644 index 00000000..fd85723d --- /dev/null +++ b/rest/api/v3/webhooks/docs/EventWebhookAllResponse.md @@ -0,0 +1,12 @@ +# EventWebhookAllResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MaxAllowed** | **float32** | The maximum number of Event Webhooks you can have enabled under your current Twilio SendGrid plan. See the [Twilio SendGrid pricing page](https://sendgrid.com/pricing) for more information about the features available with each plan. |[optional] +**Webhooks** | [**[]EventWebhookSignedResponse**](EventWebhookSignedResponse.md) | An array of Event Webhook objects. Each object represents one of your webhooks and contains its configuration settings, including which events it is set to send in the POST request, the URL where it will send those events, and the webhook's ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/EventWebhookBaseResponseProps.md b/rest/api/v3/webhooks/docs/EventWebhookBaseResponseProps.md new file mode 100644 index 00000000..31b021d3 --- /dev/null +++ b/rest/api/v3/webhooks/docs/EventWebhookBaseResponseProps.md @@ -0,0 +1,26 @@ +# EventWebhookBaseResponseProps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates if the Event Webhook is enabled. |[optional] +**Url** | **string** | The URL where SendGrid will send event data. |[optional] +**AccountStatusChange** | **bool** | Indicates if the webhook is configured to send account status change events related to compliance action taken by SendGrid. |[optional] +**GroupResubscribe** | **bool** | Indicates if the webhook is configured to send group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**Delivered** | **bool** | Indicates if the webhook is configured to send delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. |[optional] +**GroupUnsubscribe** | **bool** | Indicates if the webhook is configured to send group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**SpamReport** | **bool** | Indicates if the webhook is configured to send spam report events. Spam reports occur when recipients mark a message as spam. |[optional] +**Bounce** | **bool** | Indicates if the webhook is configured to send bounce events. A bounce occurs when a receiving server could not or would not accept a message. |[optional] +**Deferred** | **bool** | Indicates if the webhook is configured to send deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. |[optional] +**Unsubscribe** | **bool** | Indicates if the webhook is configured to send unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**Processed** | **bool** | Indicates if the webhook is configured to send processed events. Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered. |[optional] +**Open** | **bool** | Indicates if the webhook is configured to send open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. |[optional] +**Click** | **bool** | Indicates if the webhook is configured to send click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. |[optional] +**Dropped** | **bool** | Indicates if the webhook is configured to send dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. |[optional] +**FriendlyName** | **string** | An optional friendly name assigned to the Event Webhook to help you differentiate it. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. |[optional] +**Id** | **string** | A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/EventWebhookDateResponseProps.md b/rest/api/v3/webhooks/docs/EventWebhookDateResponseProps.md new file mode 100644 index 00000000..e6c48f23 --- /dev/null +++ b/rest/api/v3/webhooks/docs/EventWebhookDateResponseProps.md @@ -0,0 +1,12 @@ +# EventWebhookDateResponseProps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedDate** | [**time.Time**](time.Time.md) | An ISO 8601 timestamp in UTC timezone when the Event Webhook was created. If a Webhook's `created_date` is `null`, it is a [legacy Event Webook](https://www.twilio.com/en-us/changelog/event-webhooks), which means it is your oldest Webhook. |[optional] +**UpdatedDate** | [**time.Time**](time.Time.md) | An ISO 8601 timestamp in UTC timezone when the Event Webhook was last modified. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/EventWebhookNoDatesResponse.md b/rest/api/v3/webhooks/docs/EventWebhookNoDatesResponse.md new file mode 100644 index 00000000..3da1ae81 --- /dev/null +++ b/rest/api/v3/webhooks/docs/EventWebhookNoDatesResponse.md @@ -0,0 +1,29 @@ +# EventWebhookNoDatesResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates if the Event Webhook is enabled. |[optional] +**Url** | **string** | The URL where SendGrid will send event data. |[optional] +**AccountStatusChange** | **bool** | Indicates if the webhook is configured to send account status change events related to compliance action taken by SendGrid. |[optional] +**GroupResubscribe** | **bool** | Indicates if the webhook is configured to send group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**Delivered** | **bool** | Indicates if the webhook is configured to send delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. |[optional] +**GroupUnsubscribe** | **bool** | Indicates if the webhook is configured to send group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**SpamReport** | **bool** | Indicates if the webhook is configured to send spam report events. Spam reports occur when recipients mark a message as spam. |[optional] +**Bounce** | **bool** | Indicates if the webhook is configured to send bounce events. A bounce occurs when a receiving server could not or would not accept a message. |[optional] +**Deferred** | **bool** | Indicates if the webhook is configured to send deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. |[optional] +**Unsubscribe** | **bool** | Indicates if the webhook is configured to send unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**Processed** | **bool** | Indicates if the webhook is configured to send processed events. Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered. |[optional] +**Open** | **bool** | Indicates if the webhook is configured to send open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. |[optional] +**Click** | **bool** | Indicates if the webhook is configured to send click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. |[optional] +**Dropped** | **bool** | Indicates if the webhook is configured to send dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. |[optional] +**FriendlyName** | **string** | An optional friendly name assigned to the Event Webhook to help you differentiate it. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. |[optional] +**Id** | **string** | A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. |[optional] +**OauthClientId** | **string** | The OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token. |[optional] +**OauthTokenUrl** | **string** | The URL where SendGrid sends the OAuth client ID and client secret to generate an access token. This should be your OAuth server or service provider. |[optional] +**PublicKey** | **string** | The public key you can use to verify the SendGrid signature. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/EventWebhookOauthResponseProps.md b/rest/api/v3/webhooks/docs/EventWebhookOauthResponseProps.md new file mode 100644 index 00000000..fc98cdca --- /dev/null +++ b/rest/api/v3/webhooks/docs/EventWebhookOauthResponseProps.md @@ -0,0 +1,12 @@ +# EventWebhookOauthResponseProps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**OauthClientId** | **string** | The OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token. |[optional] +**OauthTokenUrl** | **string** | The URL where SendGrid sends the OAuth client ID and client secret to generate an access token. This should be your OAuth server or service provider. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/EventWebhookRequest.md b/rest/api/v3/webhooks/docs/EventWebhookRequest.md new file mode 100644 index 00000000..26906ee3 --- /dev/null +++ b/rest/api/v3/webhooks/docs/EventWebhookRequest.md @@ -0,0 +1,27 @@ +# EventWebhookRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Set this property to `true` to enable the Event Webhook or `false` to disable it. |[optional] +**Url** | **string** | Set this property to the URL where you want the Event Webhook to send event data. | +**GroupResubscribe** | **bool** | Set this property to `true` to receive group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**Delivered** | **bool** | Set this property to `true` to receive delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. |[optional] +**GroupUnsubscribe** | **bool** | Set this property to `true` to receive group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**SpamReport** | **bool** | Set this property to `true` to receive spam report events. Spam reports occur when recipients mark a message as spam. |[optional] +**Bounce** | **bool** | Set this property to `true` to receive bounce events. A bounce occurs when a receiving server could not or would not accept a message. |[optional] +**Deferred** | **bool** | Set this property to `true` to receive deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. |[optional] +**Unsubscribe** | **bool** | Set this property to `true` to receive unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**Processed** | **bool** | Set this property to `true` to receive processed events. Processed events occur when a message has been received by Twilio SendGrid and the message is ready to be delivered. |[optional] +**Open** | **bool** | Set this property to `true` to receive open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. |[optional] +**Click** | **bool** | Set this property to `true` to receive click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. |[optional] +**Dropped** | **bool** | Set this property to `true` to receive dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. |[optional] +**FriendlyName** | **string** | Optionally set this property to a friendly name for the Event Webhook. A friendly name may be assigned to each of your webhooks to help you differentiate them. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. |[optional] +**OauthClientId** | **string** | Set this property to the OAuth client ID that SendGrid will pass to your OAuth server or service provider to generate an OAuth access token. When passing data in this property, you must also include the `oauth_token_url` property. |[optional] +**OauthClientSecret** | **string** | Set this property to the OAuth client secret that SendGrid will pass to your OAuth server or service provider to generate an OAuth access token. This secret is needed only once to create an access token. SendGrid will store the secret, allowing you to update your client ID and Token URL without passing the secret to SendGrid again. When passing data in this field, you must also include the `oauth_client_id` and `oauth_token_url` properties. |[optional] +**OauthTokenUrl** | **string** | Set this property to the URL where SendGrid will send the OAuth client ID and client secret to generate an OAuth access token. This should be your OAuth server or service provider. When passing data in this field, you must also include the `oauth_client_id` property. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/EventWebhookSignedResponse.md b/rest/api/v3/webhooks/docs/EventWebhookSignedResponse.md new file mode 100644 index 00000000..089b485e --- /dev/null +++ b/rest/api/v3/webhooks/docs/EventWebhookSignedResponse.md @@ -0,0 +1,31 @@ +# EventWebhookSignedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates if the Event Webhook is enabled. |[optional] +**Url** | **string** | The URL where SendGrid will send event data. |[optional] +**AccountStatusChange** | **bool** | Indicates if the webhook is configured to send account status change events related to compliance action taken by SendGrid. |[optional] +**GroupResubscribe** | **bool** | Indicates if the webhook is configured to send group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**Delivered** | **bool** | Indicates if the webhook is configured to send delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. |[optional] +**GroupUnsubscribe** | **bool** | Indicates if the webhook is configured to send group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**SpamReport** | **bool** | Indicates if the webhook is configured to send spam report events. Spam reports occur when recipients mark a message as spam. |[optional] +**Bounce** | **bool** | Indicates if the webhook is configured to send bounce events. A bounce occurs when a receiving server could not or would not accept a message. |[optional] +**Deferred** | **bool** | Indicates if the webhook is configured to send deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. |[optional] +**Unsubscribe** | **bool** | Indicates if the webhook is configured to send unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**Processed** | **bool** | Indicates if the webhook is configured to send processed events. Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered. |[optional] +**Open** | **bool** | Indicates if the webhook is configured to send open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. |[optional] +**Click** | **bool** | Indicates if the webhook is configured to send click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. |[optional] +**Dropped** | **bool** | Indicates if the webhook is configured to send dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. |[optional] +**FriendlyName** | **string** | An optional friendly name assigned to the Event Webhook to help you differentiate it. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. |[optional] +**Id** | **string** | A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. |[optional] +**CreatedDate** | [**time.Time**](time.Time.md) | An ISO 8601 timestamp in UTC timezone when the Event Webhook was created. If a Webhook's `created_date` is `null`, it is a [legacy Event Webook](https://www.twilio.com/en-us/changelog/event-webhooks), which means it is your oldest Webhook. |[optional] +**UpdatedDate** | [**time.Time**](time.Time.md) | An ISO 8601 timestamp in UTC timezone when the Event Webhook was last modified. |[optional] +**OauthClientId** | **string** | The OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token. |[optional] +**OauthTokenUrl** | **string** | The URL where SendGrid sends the OAuth client ID and client secret to generate an access token. This should be your OAuth server or service provider. |[optional] +**PublicKey** | **string** | The public key you can use to verify the SendGrid signature. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/EventWebhookSignedResponseProp.md b/rest/api/v3/webhooks/docs/EventWebhookSignedResponseProp.md new file mode 100644 index 00000000..dfdae0d7 --- /dev/null +++ b/rest/api/v3/webhooks/docs/EventWebhookSignedResponseProp.md @@ -0,0 +1,11 @@ +# EventWebhookSignedResponseProp + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PublicKey** | **string** | The public key you can use to verify the SendGrid signature. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/EventWebhookTestRequest.md b/rest/api/v3/webhooks/docs/EventWebhookTestRequest.md new file mode 100644 index 00000000..f09ac2de --- /dev/null +++ b/rest/api/v3/webhooks/docs/EventWebhookTestRequest.md @@ -0,0 +1,15 @@ +# EventWebhookTestRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The ID of the Event Webhook you want to retrieve. |[optional] +**Url** | **string** | The URL where you would like the test notification to be sent. | +**OauthClientId** | **string** | The client ID Twilio SendGrid sends to your OAuth server or service provider to generate an OAuth access token. When passing data in this property, you must also include the `oauth_token_url` property. |[optional] +**OauthClientSecret** | **string** | The `oauth_client_secret` is needed only once to create an access token. SendGrid will store this secret, allowing you to update your Client ID and Token URL without passing the secret to SendGrid again. When passing data in this field, you must also include the `oauth_client_id` and `oauth_token_url` properties. |[optional] +**OauthTokenUrl** | **string** | The URL where Twilio SendGrid sends the Client ID and Client Secret to generate an access token. This should be your OAuth server or service provider. When passing data in this field, you must also include the `oauth_client_id` property. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/EventWebhookUnsignedResponse.md b/rest/api/v3/webhooks/docs/EventWebhookUnsignedResponse.md new file mode 100644 index 00000000..e2e3a0d8 --- /dev/null +++ b/rest/api/v3/webhooks/docs/EventWebhookUnsignedResponse.md @@ -0,0 +1,30 @@ +# EventWebhookUnsignedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates if the Event Webhook is enabled. |[optional] +**Url** | **string** | The URL where SendGrid will send event data. |[optional] +**AccountStatusChange** | **bool** | Indicates if the webhook is configured to send account status change events related to compliance action taken by SendGrid. |[optional] +**GroupResubscribe** | **bool** | Indicates if the webhook is configured to send group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**Delivered** | **bool** | Indicates if the webhook is configured to send delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. |[optional] +**GroupUnsubscribe** | **bool** | Indicates if the webhook is configured to send group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**SpamReport** | **bool** | Indicates if the webhook is configured to send spam report events. Spam reports occur when recipients mark a message as spam. |[optional] +**Bounce** | **bool** | Indicates if the webhook is configured to send bounce events. A bounce occurs when a receiving server could not or would not accept a message. |[optional] +**Deferred** | **bool** | Indicates if the webhook is configured to send deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. |[optional] +**Unsubscribe** | **bool** | Indicates if the webhook is configured to send unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**Processed** | **bool** | Indicates if the webhook is configured to send processed events. Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered. |[optional] +**Open** | **bool** | Indicates if the webhook is configured to send open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. |[optional] +**Click** | **bool** | Indicates if the webhook is configured to send click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. |[optional] +**Dropped** | **bool** | Indicates if the webhook is configured to send dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. |[optional] +**FriendlyName** | **string** | An optional friendly name assigned to the Event Webhook to help you differentiate it. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. |[optional] +**Id** | **string** | A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. |[optional] +**CreatedDate** | [**time.Time**](time.Time.md) | An ISO 8601 timestamp in UTC timezone when the Event Webhook was created. If a Webhook's `created_date` is `null`, it is a [legacy Event Webook](https://www.twilio.com/en-us/changelog/event-webhooks), which means it is your oldest Webhook. |[optional] +**UpdatedDate** | [**time.Time**](time.Time.md) | An ISO 8601 timestamp in UTC timezone when the Event Webhook was last modified. |[optional] +**OauthClientId** | **string** | The OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token. |[optional] +**OauthTokenUrl** | **string** | The URL where SendGrid sends the OAuth client ID and client secret to generate an access token. This should be your OAuth server or service provider. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/GetEventWebhook.md b/rest/api/v3/webhooks/docs/GetEventWebhook.md new file mode 100644 index 00000000..db760440 --- /dev/null +++ b/rest/api/v3/webhooks/docs/GetEventWebhook.md @@ -0,0 +1,53 @@ +# GetEventWebhook + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetEventWebhook**](GetEventWebhook.md#GetEventWebhook) | **Get** /v3/user/webhooks/event/settings/{Id} | Get the settings for a single Event Webhook. + + + +## GetEventWebhook + +> EventWebhookNoDatesResponse GetEventWebhook(ctx, Idoptional) + +Get the settings for a single Event Webhook. + +**This endpoint allows you to retrieve a single Event Webhook by ID.** If you do not pass a webhook ID to this endpoint, it will return your oldest webhook by `created_date`. This means the default webhook returned by this endpoint when no ID is provided will be the first one you created. This functionality allows customers who do not have multiple webhooks to use this endpoint to retrieve their only webhook, even if they do not supply an ID. If you have multiple webhooks, you can retrieve their IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. ### Event settings Your webhook will be returned with all of its settings, which include the events that will be included in the POST request by the webhook and the URL where they will be sent. If an event type is marked as `true`, the event webhook will send information about that event type. See the [**Event Webhook Reference**](https://docs.sendgrid.com/for-developers/tracking-events/event#delivery-events) for details about each event type. ### Signature verification The `public_key` property will be returned only for webhooks with signature verification enabled. ### OAuth You may share one OAuth configuration across all your webhooks or create unique credentials for each. The OAuth properties will be returned only for webhooks with OAuth configured. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the Event Webhook you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetEventWebhookParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**Include** | **string** | Use this to include optional fields in the response payload. When this is set to `include=account_status_change`, the `account_status_change` field will be part of the response payload and set to `false` by default. See [Update an event webhook](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) for enabling this webhook notification which lets you subscribe to account status change events related to compliance action taken by SendGrid. + +### Return type + +[**EventWebhookNoDatesResponse**](EventWebhookNoDatesResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/webhooks/docs/GetParseSetting.md b/rest/api/v3/webhooks/docs/GetParseSetting.md new file mode 100644 index 00000000..7350f622 --- /dev/null +++ b/rest/api/v3/webhooks/docs/GetParseSetting.md @@ -0,0 +1,52 @@ +# GetParseSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetParseSetting**](GetParseSetting.md#GetParseSetting) | **Get** /v3/user/webhooks/parse/settings/{Hostname} | Retrieve a specific parse setting + + + +## GetParseSetting + +> ParseSetting GetParseSetting(ctx, Hostnameoptional) + +Retrieve a specific parse setting + +**This endpoint allows you to retrieve a specific inbound parse setting by hostname.** You can retrieve all your Inbound Parse settings and their associated host names with the \"Retrieve all parse settings\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Hostname** | **string** | The hostname associated with the inbound parse setting that you would like to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetParseSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ParseSetting**](ParseSetting.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/webhooks/docs/GetSignedEventWebhook.md b/rest/api/v3/webhooks/docs/GetSignedEventWebhook.md new file mode 100644 index 00000000..bef22a2c --- /dev/null +++ b/rest/api/v3/webhooks/docs/GetSignedEventWebhook.md @@ -0,0 +1,52 @@ +# GetSignedEventWebhook + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetSignedEventWebhook**](GetSignedEventWebhook.md#GetSignedEventWebhook) | **Get** /v3/user/webhooks/event/settings/signed/{Id} | Get Signed Event Webhook's Public Key + + + +## GetSignedEventWebhook + +> GetSignedEventWebhook200Response GetSignedEventWebhook(ctx, Idoptional) + +Get Signed Event Webhook's Public Key + +**This endpoint allows you to retrieve the public key for a single Event Webhook by ID.** If you do not pass a webhook ID to this endpoint, it will return the public key for your oldest webhook by `created_date`. This means the default key returned by this endpoint when no ID is provided will be for the first webhook you created. This functionality allows customers who do not have multiple webhooks to use this endpoint to retrieve their only webhook's public key, even if they do not supply an ID. If you have multiple webhooks, you can retrieve their IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. Once you have enabled signature verification for a webhook, you will need the public key provided to verify the signatures on requests coming from Twilio SendGrid. You can use the webhook ID to [enable or disable signature verification with the endpoint dedicated for that operation](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook). For more information about cryptographically signing the Event Webhook, see [**Getting Started with the Event Webhook Security Features**](https://sendgrid.com/docs/for-developers/tracking-events/getting-started-event-webhook-security-features). + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the Event Webhook you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetSignedEventWebhookParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**GetSignedEventWebhook200Response**](GetSignedEventWebhook200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/webhooks/docs/GetSignedEventWebhook200Response.md b/rest/api/v3/webhooks/docs/GetSignedEventWebhook200Response.md new file mode 100644 index 00000000..d6c88517 --- /dev/null +++ b/rest/api/v3/webhooks/docs/GetSignedEventWebhook200Response.md @@ -0,0 +1,12 @@ +# GetSignedEventWebhook200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. |[optional] +**PublicKey** | **string** | The public key you can use to verify the Twilio SendGrid signature. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/GetSignedEventWebhook404Response.md b/rest/api/v3/webhooks/docs/GetSignedEventWebhook404Response.md new file mode 100644 index 00000000..61619203 --- /dev/null +++ b/rest/api/v3/webhooks/docs/GetSignedEventWebhook404Response.md @@ -0,0 +1,11 @@ +# GetSignedEventWebhook404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]GetSignedEventWebhook404ResponseErrorsInner**](GetSignedEventWebhook404ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/GetSignedEventWebhook404ResponseErrorsInner.md b/rest/api/v3/webhooks/docs/GetSignedEventWebhook404ResponseErrorsInner.md new file mode 100644 index 00000000..4dc38426 --- /dev/null +++ b/rest/api/v3/webhooks/docs/GetSignedEventWebhook404ResponseErrorsInner.md @@ -0,0 +1,11 @@ +# GetSignedEventWebhook404ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | Error message. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/ListEventWebhook.md b/rest/api/v3/webhooks/docs/ListEventWebhook.md new file mode 100644 index 00000000..d6193762 --- /dev/null +++ b/rest/api/v3/webhooks/docs/ListEventWebhook.md @@ -0,0 +1,49 @@ +# ListEventWebhook + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListEventWebhook**](ListEventWebhook.md#ListEventWebhook) | **Get** /v3/user/webhooks/event/settings/all | Retrieve all of your Event Webhooks. + + + +## ListEventWebhook + +> EventWebhookAllResponse ListEventWebhook(ctx, optional) + +Retrieve all of your Event Webhooks. + +**This endpoint allows you to retrieve all of your Event Webhooks.** Each webhook will be returned as an object in the `webhooks` array with the webhook's configuration details and ID. You can use a webhook's ID to [update the webhook's settings](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook), [delete the webhook](https://docs.sendgrid.com/api-reference/webhooks/delete-an-event-webhook), [enable or disable signature verification for the webhook](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook), and, if signature verification is enabled, [retrieve the webhook's public key](https://docs.sendgrid.com/api-reference/webhooks/get-signed-event-webhooks-public-key) when signature verification is enabled. ### Event settings Each webhook's settings determine which events will be included in the POST request by the webhook and the URL where the request will be sent. See the [**Event Webhook Reference**](https://docs.sendgrid.com/for-developers/tracking-events/event#delivery-events) for details about each event type. ### Signature verification The `public_key` property will be returned only for webhooks with signature verification enabled. ### OAuth You may share one OAuth configuration across all your webhooks or create unique credentials for each. The OAuth properties will be returned only for webhooks with OAuth configured. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListEventWebhookParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**Include** | **string** | Use this to include optional fields in the response payload. When this is set to `include=account_status_change`, the `account_status_change` field will be part of the response payload and set to `false` by default. See [Update an event webhook](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) for enabling this webhook notification which lets you subscribe to account status change events related to compliance action taken by SendGrid. + +### Return type + +[**EventWebhookAllResponse**](EventWebhookAllResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/webhooks/docs/ListParseSetting.md b/rest/api/v3/webhooks/docs/ListParseSetting.md new file mode 100644 index 00000000..919d1c50 --- /dev/null +++ b/rest/api/v3/webhooks/docs/ListParseSetting.md @@ -0,0 +1,48 @@ +# ListParseSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListParseSetting**](ListParseSetting.md#ListParseSetting) | **Get** /v3/user/webhooks/parse/settings | Retrieve all parse settings + + + +## ListParseSetting + +> ListParseSetting200Response ListParseSetting(ctx, optional) + +Retrieve all parse settings + +**This endpoint allows you to retrieve all of your current inbound parse settings.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListParseSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListParseSetting200Response**](ListParseSetting200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/webhooks/docs/ListParseSetting200Response.md b/rest/api/v3/webhooks/docs/ListParseSetting200Response.md new file mode 100644 index 00000000..b6777bb0 --- /dev/null +++ b/rest/api/v3/webhooks/docs/ListParseSetting200Response.md @@ -0,0 +1,11 @@ +# ListParseSetting200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ParseSetting**](ParseSetting.md) | The list of your current inbound parse settings. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/ListParseStatic.md b/rest/api/v3/webhooks/docs/ListParseStatic.md new file mode 100644 index 00000000..7da90539 --- /dev/null +++ b/rest/api/v3/webhooks/docs/ListParseStatic.md @@ -0,0 +1,52 @@ +# ListParseStatic + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListParseStatic**](ListParseStatic.md#ListParseStatic) | **Get** /v3/user/webhooks/parse/stats | Retrieves Inbound Parse Webhook statistics. + + + +## ListParseStatic + +> []ListParseStatic200ResponseInner ListParseStatic(ctx, StartDateoptional) + +Retrieves Inbound Parse Webhook statistics. + +**This endpoint allows you to retrieve the statistics for your Parse Webhook usage.** SendGrid's Inbound Parse Webhook allows you to parse the contents and attachments of incoming emails. The Parse API can then POST the parsed emails to a URL that you specify. The Inbound Parse Webhook cannot parse messages greater than 30MB in size, including all attachments. There are a number of pre-made integrations for the SendGrid Parse Webhook which make processing events easy. You can find these integrations in the [Library Index](https://docs.sendgrid.com/for-developers/sending-email/libraries#webhook-libraries). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListParseStaticParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **string** | The number of statistics to return on each page. +**Offset** | **string** | The number of statistics to skip. +**AggregatedBy** | [**AggregatedBy**](AggregatedByAggregatedBy.md) | How you would like the statistics to by grouped. +**EndDate** | **string** | The end date of the statistics you want to retrieve. Must be in the format YYYY-MM-DD +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**[]ListParseStatic200ResponseInner**](ListParseStatic200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/webhooks/docs/ListParseStatic200ResponseInner.md b/rest/api/v3/webhooks/docs/ListParseStatic200ResponseInner.md new file mode 100644 index 00000000..71c9d470 --- /dev/null +++ b/rest/api/v3/webhooks/docs/ListParseStatic200ResponseInner.md @@ -0,0 +1,12 @@ +# ListParseStatic200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | **string** | The date that the stats were collected. | +**Stats** | [**[]ListParseStatic200ResponseInnerStatsInner**](ListParseStatic200ResponseInnerStatsInner.md) | The Parse Webhook usage statistics. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/ListParseStatic200ResponseInnerStatsInner.md b/rest/api/v3/webhooks/docs/ListParseStatic200ResponseInnerStatsInner.md new file mode 100644 index 00000000..31d9441c --- /dev/null +++ b/rest/api/v3/webhooks/docs/ListParseStatic200ResponseInnerStatsInner.md @@ -0,0 +1,11 @@ +# ListParseStatic200ResponseInnerStatsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Metrics** | [**ListParseStatic200ResponseInnerStatsInnerMetrics**](ListParseStatic200ResponseInnerStatsInnerMetrics.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/ListParseStatic200ResponseInnerStatsInnerMetrics.md b/rest/api/v3/webhooks/docs/ListParseStatic200ResponseInnerStatsInnerMetrics.md new file mode 100644 index 00000000..a0648924 --- /dev/null +++ b/rest/api/v3/webhooks/docs/ListParseStatic200ResponseInnerStatsInnerMetrics.md @@ -0,0 +1,11 @@ +# ListParseStatic200ResponseInnerStatsInnerMetrics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Received** | **float32** | The number of emails received and parsed by the Parse Webhook. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/ParseSetting.md b/rest/api/v3/webhooks/docs/ParseSetting.md new file mode 100644 index 00000000..344e4bf8 --- /dev/null +++ b/rest/api/v3/webhooks/docs/ParseSetting.md @@ -0,0 +1,14 @@ +# ParseSetting + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | The public URL where you would like SendGrid to POST the data parsed from your email. Any emails sent with the given hostname provided (whose MX records have been updated to point to SendGrid) will be parsed and POSTed to this URL. |[optional] +**Hostname** | **string** | A specific and unique domain or subdomain that you have created to use exclusively to parse your incoming email. For example, `parse.yourdomain.com`. |[optional] +**SpamCheck** | **bool** | Indicates if you would like SendGrid to check the content parsed from your emails for spam before POSTing them to your domain. |[optional] +**SendRaw** | **bool** | Indicates if you would like SendGrid to post the original MIME-type content of your parsed email. When this parameter is set to `true`, SendGrid will send a JSON payload of the content of your email. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/TestEventWebhook.md b/rest/api/v3/webhooks/docs/TestEventWebhook.md new file mode 100644 index 00000000..86581df0 --- /dev/null +++ b/rest/api/v3/webhooks/docs/TestEventWebhook.md @@ -0,0 +1,49 @@ +# TestEventWebhook + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**TestEventWebhook**](TestEventWebhook.md#TestEventWebhook) | **Post** /v3/user/webhooks/event/test | Test an Event Webhook's settings + + + +## TestEventWebhook + +> TestEventWebhook(ctx, optional) + +Test an Event Webhook's settings + +**This endpoint allows you to test an Event Webhook.** Retry logic for this endpoint differs from other endpoints, which use a rolling 24-hour retry. This endpoint will make a POST request with a fake event notification to a URL you provide. This allows you to verify that you have properly configured the webhook before sending real data to your URL. ### Test OAuth configuration To test your OAuth configuration, you must include the necessary OAuth properties: `oauth_client_id`, `oauth_client_secret`, and `oauth_token_url`. If the webhook you are testing already has OAuth credentials saved, you will provide only the `oauth_client_id` and `oauth_token_url`—we will pull the secret for you. If you are testing a new set of OAuth credentials that have not been saved with SendGrid, you must provide all three property values. You can retrieve a previously saved `oauth_client_id` and `oauth_token_url` from the [**Get an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/get-an-event-webhook) endpoint; however, for security reasons, SendGrid will not provide your `oauth_client_secret`. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a TestEventWebhookParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**EventWebhookTestRequest** | [**EventWebhookTestRequest**](EventWebhookTestRequest.md) | + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/webhooks/docs/UpdateEventWebhook.md b/rest/api/v3/webhooks/docs/UpdateEventWebhook.md new file mode 100644 index 00000000..005976c1 --- /dev/null +++ b/rest/api/v3/webhooks/docs/UpdateEventWebhook.md @@ -0,0 +1,54 @@ +# UpdateEventWebhook + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateEventWebhook**](UpdateEventWebhook.md#UpdateEventWebhook) | **Patch** /v3/user/webhooks/event/settings/{Id} | Update a single Event Webhook by ID. + + + +## UpdateEventWebhook + +> EventWebhookUnsignedResponse UpdateEventWebhook(ctx, Idoptional) + +Update a single Event Webhook by ID. + +**This endpoint allows you to update a single Event Webhook by ID.** If you do not pass a webhook ID to this endpoint, it will update and return your oldest webhook by `created_date`. This means the default webhook updated by this endpoint when no ID is provided will be the first one you created. This functionality allows customers who do not have multiple webhooks to use this endpoint to update their only webhook, even if they do not supply an ID. If you have multiple webhooks, you can retrieve their IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. ### Enable or disable the webhook You can set the `enabled` property to `true` to enable the webhook or `false` to disable it. Disabling a webhook will not delete it from your account, but it will prevent the webhook from sending events to your designated URL. ### URL A webhook's URL is the endpoint where you want the webhook to send POST requests containing event data. No more than one webhook may be configured to send to the same URL. SendGrid will return an error if you attempt to set a URL for a webhook that is already in use by the user on another webhook. ### Event settings If an event type is marked as `true`, the event webhook will send information about that event type. See the [**Event Webhook Reference**](https://docs.sendgrid.com/for-developers/tracking-events/event#delivery-events) for details about each event type. ### Webhook identifiers You may assign an optional friendly name to each of your webhooks. The friendly name is for convenience only and should not be used to programmatically differentiate your webhooks because it does not need to be unique. ### OAuth You can configure OAuth for your webhook by passing the required values to this endpoint in the `oauth_client_id`, `oauth_client_secret`, and `oauth_token_url` properties. To disable OAuth, pass an empty string to this endpoint for each of the OAuth properties. You may share one OAuth configuration across all your webhooks or create unique credentials for each. See our [webhook security documentation](https://docs.sendgrid.com/for-developers/tracking-events/getting-started-event-webhook-security-features#oauth-20) for more detailed information about OAuth and the Event Webhook. ### Signature verification Enabling signature verification for your webhook is a separate process and cannot be done with this endpoint. You can use the webhook ID to [enable or disable signature verification with the endpoint dedicated for that operation](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook). + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the Event Webhook you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateEventWebhookParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**Include** | **string** | Use this to include optional fields in the response payload. When this is set to `include=account_status_change`, the `account_status_change` field will be part of the response payload and set to `false` by default. See [Update an event webhook](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) for enabling this webhook notification which lets you subscribe to account status change events related to compliance action taken by SendGrid. +**EventWebhookRequest** | [**EventWebhookRequest**](EventWebhookRequest.md) | + +### Return type + +[**EventWebhookUnsignedResponse**](EventWebhookUnsignedResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/webhooks/docs/UpdateParseSetting.md b/rest/api/v3/webhooks/docs/UpdateParseSetting.md new file mode 100644 index 00000000..ae9e970e --- /dev/null +++ b/rest/api/v3/webhooks/docs/UpdateParseSetting.md @@ -0,0 +1,53 @@ +# UpdateParseSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateParseSetting**](UpdateParseSetting.md#UpdateParseSetting) | **Patch** /v3/user/webhooks/parse/settings/{Hostname} | Update a parse setting + + + +## UpdateParseSetting + +> ParseSetting UpdateParseSetting(ctx, Hostnameoptional) + +Update a parse setting + +**This endpoint allows you to update a specific inbound parse setting by hostname.** You can retrieve all your Inbound Parse settings and their associated host names with the \"Retrieve all parse settings\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Hostname** | **string** | The hostname associated with the inbound parse setting that you would like to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateParseSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**ParseSetting** | [**ParseSetting**](ParseSetting.md) | + +### Return type + +[**ParseSetting**](ParseSetting.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/webhooks/docs/UpdateSignedEventWebhook.md b/rest/api/v3/webhooks/docs/UpdateSignedEventWebhook.md new file mode 100644 index 00000000..8fa6e5d7 --- /dev/null +++ b/rest/api/v3/webhooks/docs/UpdateSignedEventWebhook.md @@ -0,0 +1,53 @@ +# UpdateSignedEventWebhook + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSignedEventWebhook**](UpdateSignedEventWebhook.md#UpdateSignedEventWebhook) | **Patch** /v3/user/webhooks/event/settings/signed/{Id} | Toggle signature verification for a single Event Webhook by ID + + + +## UpdateSignedEventWebhook + +> GetSignedEventWebhook200Response UpdateSignedEventWebhook(ctx, Idoptional) + +Toggle signature verification for a single Event Webhook by ID + +**This endpoint allows you to enable or disable signature verification for a single Event Webhook by ID.** If you do not pass a webhook ID to this endpoint, it will enable signature verification for your oldest webhook by `created_date`. This means the default webhook operated on by this endpoint when no ID is provided will be the first one you created. This functionality allows customers who do not have multiple webhooks to enable or disable signature verifiction for their only webhook, even if they do not supply an ID. If you have multiple webhooks, you can retrieve their IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. This endpoint accepts a single boolean request property, `enabled`, that can be set `true` or `false` to enable or disable signature verification. This endpoint will return the public key required to verify Twilio SendGrid signatures if it is enabled or an empty string if signing is disabled. You can also retrieve your public key using the [**Get an Event Webhook's Public Key**](https://docs.sendgrid.com/api-reference/webhooks/get-signed-event-webhooks-public-key) endpoint. For more information about cryptographically signing the Event Webhook, see [**Getting Started with the Event Webhook Security Features**](https://sendgrid.com/docs/for-developers/tracking-events/getting-started-event-webhook-security-features). + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the Event Webhook you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSignedEventWebhookParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateSignedEventWebhookRequest** | [**UpdateSignedEventWebhookRequest**](UpdateSignedEventWebhookRequest.md) | + +### Return type + +[**GetSignedEventWebhook200Response**](GetSignedEventWebhook200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/webhooks/docs/UpdateSignedEventWebhookRequest.md b/rest/api/v3/webhooks/docs/UpdateSignedEventWebhookRequest.md new file mode 100644 index 00000000..d2364a21 --- /dev/null +++ b/rest/api/v3/webhooks/docs/UpdateSignedEventWebhookRequest.md @@ -0,0 +1,11 @@ +# UpdateSignedEventWebhookRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Enable or disable the webhook by setting this property to `true` or `false`, respectively. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/model_aggregated_by.go b/rest/api/v3/webhooks/model_aggregated_by.go new file mode 100644 index 00000000..32a394b9 --- /dev/null +++ b/rest/api/v3/webhooks/model_aggregated_by.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AggregatedBy the model 'AggregatedBy' +type AggregatedBy string + +// List of AggregatedBy +const ( + AGGREGATEDBY_DAY AggregatedBy = "day" + AGGREGATEDBY_WEEK AggregatedBy = "week" + AGGREGATEDBY_MONTH AggregatedBy = "month" +) diff --git a/rest/api/v3/webhooks/model_create_event_webhook_400_response.go b/rest/api/v3/webhooks/model_create_event_webhook_400_response.go new file mode 100644 index 00000000..d6e50ac2 --- /dev/null +++ b/rest/api/v3/webhooks/model_create_event_webhook_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateEventWebhook400Response struct for CreateEventWebhook400Response +type CreateEventWebhook400Response struct { + Errors *[]CreateEventWebhook400ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_create_event_webhook_400_response_errors_inner.go b/rest/api/v3/webhooks/model_create_event_webhook_400_response_errors_inner.go new file mode 100644 index 00000000..74a5296f --- /dev/null +++ b/rest/api/v3/webhooks/model_create_event_webhook_400_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateEventWebhook400ResponseErrorsInner struct for CreateEventWebhook400ResponseErrorsInner +type CreateEventWebhook400ResponseErrorsInner struct { + // The ID of a Webhook that exists on your account that is already configured to send events to the endpoint URL you provided. + Id *string `json:"id,omitempty"` + // Error message. + Message *string `json:"message,omitempty"` + // The URL that is already configured as a Webhook endpoint for one of your existing Webhooks. + Url *string `json:"url,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_error_response.go b/rest/api/v3/webhooks/model_error_response.go new file mode 100644 index 00000000..ee43ea98 --- /dev/null +++ b/rest/api/v3/webhooks/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_error_response_errors_inner.go b/rest/api/v3/webhooks/model_error_response_errors_inner.go new file mode 100644 index 00000000..a946dccd --- /dev/null +++ b/rest/api/v3/webhooks/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_event_webhook_all_response.go b/rest/api/v3/webhooks/model_event_webhook_all_response.go new file mode 100644 index 00000000..88a98136 --- /dev/null +++ b/rest/api/v3/webhooks/model_event_webhook_all_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// EventWebhookAllResponse struct for EventWebhookAllResponse +type EventWebhookAllResponse struct { + // The maximum number of Event Webhooks you can have enabled under your current Twilio SendGrid plan. See the [Twilio SendGrid pricing page](https://sendgrid.com/pricing) for more information about the features available with each plan. + MaxAllowed *float32 `json:"max_allowed,omitempty"` + // An array of Event Webhook objects. Each object represents one of your webhooks and contains its configuration settings, including which events it is set to send in the POST request, the URL where it will send those events, and the webhook's ID. + Webhooks *[]EventWebhookSignedResponse `json:"webhooks,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_event_webhook_base_response_props.go b/rest/api/v3/webhooks/model_event_webhook_base_response_props.go new file mode 100644 index 00000000..54cc937e --- /dev/null +++ b/rest/api/v3/webhooks/model_event_webhook_base_response_props.go @@ -0,0 +1,50 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// EventWebhookBaseResponseProps struct for EventWebhookBaseResponseProps +type EventWebhookBaseResponseProps struct { + // Indicates if the Event Webhook is enabled. + Enabled *bool `json:"enabled,omitempty"` + // The URL where SendGrid will send event data. + Url *string `json:"url,omitempty"` + // Indicates if the webhook is configured to send account status change events related to compliance action taken by SendGrid. + AccountStatusChange *bool `json:"account_status_change,omitempty"` + // Indicates if the webhook is configured to send group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + GroupResubscribe *bool `json:"group_resubscribe,omitempty"` + // Indicates if the webhook is configured to send delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. + Delivered *bool `json:"delivered,omitempty"` + // Indicates if the webhook is configured to send group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + GroupUnsubscribe *bool `json:"group_unsubscribe,omitempty"` + // Indicates if the webhook is configured to send spam report events. Spam reports occur when recipients mark a message as spam. + SpamReport *bool `json:"spam_report,omitempty"` + // Indicates if the webhook is configured to send bounce events. A bounce occurs when a receiving server could not or would not accept a message. + Bounce *bool `json:"bounce,omitempty"` + // Indicates if the webhook is configured to send deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. + Deferred *bool `json:"deferred,omitempty"` + // Indicates if the webhook is configured to send unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + Unsubscribe *bool `json:"unsubscribe,omitempty"` + // Indicates if the webhook is configured to send processed events. Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered. + Processed *bool `json:"processed,omitempty"` + // Indicates if the webhook is configured to send open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. + Open *bool `json:"open,omitempty"` + // Indicates if the webhook is configured to send click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. + Click *bool `json:"click,omitempty"` + // Indicates if the webhook is configured to send dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. + Dropped *bool `json:"dropped,omitempty"` + // An optional friendly name assigned to the Event Webhook to help you differentiate it. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. + FriendlyName *string `json:"friendly_name,omitempty"` + // A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_event_webhook_date_response_props.go b/rest/api/v3/webhooks/model_event_webhook_date_response_props.go new file mode 100644 index 00000000..b848c4ae --- /dev/null +++ b/rest/api/v3/webhooks/model_event_webhook_date_response_props.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "time" +) + +// EventWebhookDateResponseProps struct for EventWebhookDateResponseProps +type EventWebhookDateResponseProps struct { + // An ISO 8601 timestamp in UTC timezone when the Event Webhook was created. If a Webhook's `created_date` is `null`, it is a [legacy Event Webook](https://www.twilio.com/en-us/changelog/event-webhooks), which means it is your oldest Webhook. + CreatedDate *time.Time `json:"created_date,omitempty"` + // An ISO 8601 timestamp in UTC timezone when the Event Webhook was last modified. + UpdatedDate *time.Time `json:"updated_date,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_event_webhook_no_dates_response.go b/rest/api/v3/webhooks/model_event_webhook_no_dates_response.go new file mode 100644 index 00000000..1b91692a --- /dev/null +++ b/rest/api/v3/webhooks/model_event_webhook_no_dates_response.go @@ -0,0 +1,56 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// EventWebhookNoDatesResponse struct for EventWebhookNoDatesResponse +type EventWebhookNoDatesResponse struct { + // Indicates if the Event Webhook is enabled. + Enabled *bool `json:"enabled,omitempty"` + // The URL where SendGrid will send event data. + Url *string `json:"url,omitempty"` + // Indicates if the webhook is configured to send account status change events related to compliance action taken by SendGrid. + AccountStatusChange *bool `json:"account_status_change,omitempty"` + // Indicates if the webhook is configured to send group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + GroupResubscribe *bool `json:"group_resubscribe,omitempty"` + // Indicates if the webhook is configured to send delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. + Delivered *bool `json:"delivered,omitempty"` + // Indicates if the webhook is configured to send group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + GroupUnsubscribe *bool `json:"group_unsubscribe,omitempty"` + // Indicates if the webhook is configured to send spam report events. Spam reports occur when recipients mark a message as spam. + SpamReport *bool `json:"spam_report,omitempty"` + // Indicates if the webhook is configured to send bounce events. A bounce occurs when a receiving server could not or would not accept a message. + Bounce *bool `json:"bounce,omitempty"` + // Indicates if the webhook is configured to send deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. + Deferred *bool `json:"deferred,omitempty"` + // Indicates if the webhook is configured to send unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + Unsubscribe *bool `json:"unsubscribe,omitempty"` + // Indicates if the webhook is configured to send processed events. Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered. + Processed *bool `json:"processed,omitempty"` + // Indicates if the webhook is configured to send open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. + Open *bool `json:"open,omitempty"` + // Indicates if the webhook is configured to send click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. + Click *bool `json:"click,omitempty"` + // Indicates if the webhook is configured to send dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. + Dropped *bool `json:"dropped,omitempty"` + // An optional friendly name assigned to the Event Webhook to help you differentiate it. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. + FriendlyName *string `json:"friendly_name,omitempty"` + // A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. + Id *string `json:"id,omitempty"` + // The OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token. + OauthClientId *string `json:"oauth_client_id,omitempty"` + // The URL where SendGrid sends the OAuth client ID and client secret to generate an access token. This should be your OAuth server or service provider. + OauthTokenUrl *string `json:"oauth_token_url,omitempty"` + // The public key you can use to verify the SendGrid signature. + PublicKey *string `json:"public_key,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_event_webhook_oauth_response_props.go b/rest/api/v3/webhooks/model_event_webhook_oauth_response_props.go new file mode 100644 index 00000000..b57aa7d3 --- /dev/null +++ b/rest/api/v3/webhooks/model_event_webhook_oauth_response_props.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// EventWebhookOauthResponseProps struct for EventWebhookOauthResponseProps +type EventWebhookOauthResponseProps struct { + // The OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token. + OauthClientId *string `json:"oauth_client_id,omitempty"` + // The URL where SendGrid sends the OAuth client ID and client secret to generate an access token. This should be your OAuth server or service provider. + OauthTokenUrl *string `json:"oauth_token_url,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_event_webhook_request.go b/rest/api/v3/webhooks/model_event_webhook_request.go new file mode 100644 index 00000000..352f8866 --- /dev/null +++ b/rest/api/v3/webhooks/model_event_webhook_request.go @@ -0,0 +1,52 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// EventWebhookRequest struct for EventWebhookRequest +type EventWebhookRequest struct { + // Set this property to `true` to enable the Event Webhook or `false` to disable it. + Enabled *bool `json:"enabled,omitempty"` + // Set this property to the URL where you want the Event Webhook to send event data. + Url string `json:"url"` + // Set this property to `true` to receive group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + GroupResubscribe *bool `json:"group_resubscribe,omitempty"` + // Set this property to `true` to receive delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. + Delivered *bool `json:"delivered,omitempty"` + // Set this property to `true` to receive group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + GroupUnsubscribe *bool `json:"group_unsubscribe,omitempty"` + // Set this property to `true` to receive spam report events. Spam reports occur when recipients mark a message as spam. + SpamReport *bool `json:"spam_report,omitempty"` + // Set this property to `true` to receive bounce events. A bounce occurs when a receiving server could not or would not accept a message. + Bounce *bool `json:"bounce,omitempty"` + // Set this property to `true` to receive deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. + Deferred *bool `json:"deferred,omitempty"` + // Set this property to `true` to receive unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + Unsubscribe *bool `json:"unsubscribe,omitempty"` + // Set this property to `true` to receive processed events. Processed events occur when a message has been received by Twilio SendGrid and the message is ready to be delivered. + Processed *bool `json:"processed,omitempty"` + // Set this property to `true` to receive open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. + Open *bool `json:"open,omitempty"` + // Set this property to `true` to receive click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. + Click *bool `json:"click,omitempty"` + // Set this property to `true` to receive dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. + Dropped *bool `json:"dropped,omitempty"` + // Optionally set this property to a friendly name for the Event Webhook. A friendly name may be assigned to each of your webhooks to help you differentiate them. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. + FriendlyName *string `json:"friendly_name,omitempty"` + // Set this property to the OAuth client ID that SendGrid will pass to your OAuth server or service provider to generate an OAuth access token. When passing data in this property, you must also include the `oauth_token_url` property. + OauthClientId *string `json:"oauth_client_id,omitempty"` + // Set this property to the OAuth client secret that SendGrid will pass to your OAuth server or service provider to generate an OAuth access token. This secret is needed only once to create an access token. SendGrid will store the secret, allowing you to update your client ID and Token URL without passing the secret to SendGrid again. When passing data in this field, you must also include the `oauth_client_id` and `oauth_token_url` properties. + OauthClientSecret *string `json:"oauth_client_secret,omitempty"` + // Set this property to the URL where SendGrid will send the OAuth client ID and client secret to generate an OAuth access token. This should be your OAuth server or service provider. When passing data in this field, you must also include the `oauth_client_id` property. + OauthTokenUrl *string `json:"oauth_token_url,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_event_webhook_signed_response.go b/rest/api/v3/webhooks/model_event_webhook_signed_response.go new file mode 100644 index 00000000..b867cfff --- /dev/null +++ b/rest/api/v3/webhooks/model_event_webhook_signed_response.go @@ -0,0 +1,64 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "time" +) + +// EventWebhookSignedResponse struct for EventWebhookSignedResponse +type EventWebhookSignedResponse struct { + // Indicates if the Event Webhook is enabled. + Enabled *bool `json:"enabled,omitempty"` + // The URL where SendGrid will send event data. + Url *string `json:"url,omitempty"` + // Indicates if the webhook is configured to send account status change events related to compliance action taken by SendGrid. + AccountStatusChange *bool `json:"account_status_change,omitempty"` + // Indicates if the webhook is configured to send group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + GroupResubscribe *bool `json:"group_resubscribe,omitempty"` + // Indicates if the webhook is configured to send delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. + Delivered *bool `json:"delivered,omitempty"` + // Indicates if the webhook is configured to send group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + GroupUnsubscribe *bool `json:"group_unsubscribe,omitempty"` + // Indicates if the webhook is configured to send spam report events. Spam reports occur when recipients mark a message as spam. + SpamReport *bool `json:"spam_report,omitempty"` + // Indicates if the webhook is configured to send bounce events. A bounce occurs when a receiving server could not or would not accept a message. + Bounce *bool `json:"bounce,omitempty"` + // Indicates if the webhook is configured to send deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. + Deferred *bool `json:"deferred,omitempty"` + // Indicates if the webhook is configured to send unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + Unsubscribe *bool `json:"unsubscribe,omitempty"` + // Indicates if the webhook is configured to send processed events. Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered. + Processed *bool `json:"processed,omitempty"` + // Indicates if the webhook is configured to send open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. + Open *bool `json:"open,omitempty"` + // Indicates if the webhook is configured to send click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. + Click *bool `json:"click,omitempty"` + // Indicates if the webhook is configured to send dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. + Dropped *bool `json:"dropped,omitempty"` + // An optional friendly name assigned to the Event Webhook to help you differentiate it. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. + FriendlyName *string `json:"friendly_name,omitempty"` + // A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. + Id *string `json:"id,omitempty"` + // An ISO 8601 timestamp in UTC timezone when the Event Webhook was created. If a Webhook's `created_date` is `null`, it is a [legacy Event Webook](https://www.twilio.com/en-us/changelog/event-webhooks), which means it is your oldest Webhook. + CreatedDate *time.Time `json:"created_date,omitempty"` + // An ISO 8601 timestamp in UTC timezone when the Event Webhook was last modified. + UpdatedDate *time.Time `json:"updated_date,omitempty"` + // The OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token. + OauthClientId *string `json:"oauth_client_id,omitempty"` + // The URL where SendGrid sends the OAuth client ID and client secret to generate an access token. This should be your OAuth server or service provider. + OauthTokenUrl *string `json:"oauth_token_url,omitempty"` + // The public key you can use to verify the SendGrid signature. + PublicKey *string `json:"public_key,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_event_webhook_signed_response_prop.go b/rest/api/v3/webhooks/model_event_webhook_signed_response_prop.go new file mode 100644 index 00000000..6751471b --- /dev/null +++ b/rest/api/v3/webhooks/model_event_webhook_signed_response_prop.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// EventWebhookSignedResponseProp struct for EventWebhookSignedResponseProp +type EventWebhookSignedResponseProp struct { + // The public key you can use to verify the SendGrid signature. + PublicKey *string `json:"public_key,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_event_webhook_test_request.go b/rest/api/v3/webhooks/model_event_webhook_test_request.go new file mode 100644 index 00000000..402bed8c --- /dev/null +++ b/rest/api/v3/webhooks/model_event_webhook_test_request.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// EventWebhookTestRequest struct for EventWebhookTestRequest +type EventWebhookTestRequest struct { + // The ID of the Event Webhook you want to retrieve. + Id *string `json:"id,omitempty"` + // The URL where you would like the test notification to be sent. + Url string `json:"url"` + // The client ID Twilio SendGrid sends to your OAuth server or service provider to generate an OAuth access token. When passing data in this property, you must also include the `oauth_token_url` property. + OauthClientId *string `json:"oauth_client_id,omitempty"` + // The `oauth_client_secret` is needed only once to create an access token. SendGrid will store this secret, allowing you to update your Client ID and Token URL without passing the secret to SendGrid again. When passing data in this field, you must also include the `oauth_client_id` and `oauth_token_url` properties. + OauthClientSecret *string `json:"oauth_client_secret,omitempty"` + // The URL where Twilio SendGrid sends the Client ID and Client Secret to generate an access token. This should be your OAuth server or service provider. When passing data in this field, you must also include the `oauth_client_id` property. + OauthTokenUrl *string `json:"oauth_token_url,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_event_webhook_unsigned_response.go b/rest/api/v3/webhooks/model_event_webhook_unsigned_response.go new file mode 100644 index 00000000..9739fa46 --- /dev/null +++ b/rest/api/v3/webhooks/model_event_webhook_unsigned_response.go @@ -0,0 +1,62 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "time" +) + +// EventWebhookUnsignedResponse struct for EventWebhookUnsignedResponse +type EventWebhookUnsignedResponse struct { + // Indicates if the Event Webhook is enabled. + Enabled *bool `json:"enabled,omitempty"` + // The URL where SendGrid will send event data. + Url *string `json:"url,omitempty"` + // Indicates if the webhook is configured to send account status change events related to compliance action taken by SendGrid. + AccountStatusChange *bool `json:"account_status_change,omitempty"` + // Indicates if the webhook is configured to send group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + GroupResubscribe *bool `json:"group_resubscribe,omitempty"` + // Indicates if the webhook is configured to send delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. + Delivered *bool `json:"delivered,omitempty"` + // Indicates if the webhook is configured to send group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + GroupUnsubscribe *bool `json:"group_unsubscribe,omitempty"` + // Indicates if the webhook is configured to send spam report events. Spam reports occur when recipients mark a message as spam. + SpamReport *bool `json:"spam_report,omitempty"` + // Indicates if the webhook is configured to send bounce events. A bounce occurs when a receiving server could not or would not accept a message. + Bounce *bool `json:"bounce,omitempty"` + // Indicates if the webhook is configured to send deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. + Deferred *bool `json:"deferred,omitempty"` + // Indicates if the webhook is configured to send unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + Unsubscribe *bool `json:"unsubscribe,omitempty"` + // Indicates if the webhook is configured to send processed events. Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered. + Processed *bool `json:"processed,omitempty"` + // Indicates if the webhook is configured to send open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. + Open *bool `json:"open,omitempty"` + // Indicates if the webhook is configured to send click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. + Click *bool `json:"click,omitempty"` + // Indicates if the webhook is configured to send dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. + Dropped *bool `json:"dropped,omitempty"` + // An optional friendly name assigned to the Event Webhook to help you differentiate it. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. + FriendlyName *string `json:"friendly_name,omitempty"` + // A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. + Id *string `json:"id,omitempty"` + // An ISO 8601 timestamp in UTC timezone when the Event Webhook was created. If a Webhook's `created_date` is `null`, it is a [legacy Event Webook](https://www.twilio.com/en-us/changelog/event-webhooks), which means it is your oldest Webhook. + CreatedDate *time.Time `json:"created_date,omitempty"` + // An ISO 8601 timestamp in UTC timezone when the Event Webhook was last modified. + UpdatedDate *time.Time `json:"updated_date,omitempty"` + // The OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token. + OauthClientId *string `json:"oauth_client_id,omitempty"` + // The URL where SendGrid sends the OAuth client ID and client secret to generate an access token. This should be your OAuth server or service provider. + OauthTokenUrl *string `json:"oauth_token_url,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_get_signed_event_webhook_200_response.go b/rest/api/v3/webhooks/model_get_signed_event_webhook_200_response.go new file mode 100644 index 00000000..0282f0ed --- /dev/null +++ b/rest/api/v3/webhooks/model_get_signed_event_webhook_200_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetSignedEventWebhook200Response struct for GetSignedEventWebhook200Response +type GetSignedEventWebhook200Response struct { + // A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. + Id *string `json:"id,omitempty"` + // The public key you can use to verify the Twilio SendGrid signature. + PublicKey *string `json:"public_key,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_get_signed_event_webhook_404_response.go b/rest/api/v3/webhooks/model_get_signed_event_webhook_404_response.go new file mode 100644 index 00000000..162dcb9b --- /dev/null +++ b/rest/api/v3/webhooks/model_get_signed_event_webhook_404_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetSignedEventWebhook404Response struct for GetSignedEventWebhook404Response +type GetSignedEventWebhook404Response struct { + Errors *[]GetSignedEventWebhook404ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_get_signed_event_webhook_404_response_errors_inner.go b/rest/api/v3/webhooks/model_get_signed_event_webhook_404_response_errors_inner.go new file mode 100644 index 00000000..9c83f2aa --- /dev/null +++ b/rest/api/v3/webhooks/model_get_signed_event_webhook_404_response_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetSignedEventWebhook404ResponseErrorsInner struct for GetSignedEventWebhook404ResponseErrorsInner +type GetSignedEventWebhook404ResponseErrorsInner struct { + // Error message. + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_list_parse_setting_200_response.go b/rest/api/v3/webhooks/model_list_parse_setting_200_response.go new file mode 100644 index 00000000..29e79746 --- /dev/null +++ b/rest/api/v3/webhooks/model_list_parse_setting_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListParseSetting200Response struct for ListParseSetting200Response +type ListParseSetting200Response struct { + // The list of your current inbound parse settings. + Result *[]ParseSetting `json:"result,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_list_parse_static_200_response_inner.go b/rest/api/v3/webhooks/model_list_parse_static_200_response_inner.go new file mode 100644 index 00000000..2ed8fae6 --- /dev/null +++ b/rest/api/v3/webhooks/model_list_parse_static_200_response_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListParseStatic200ResponseInner struct for ListParseStatic200ResponseInner +type ListParseStatic200ResponseInner struct { + // The date that the stats were collected. + Date string `json:"date"` + // The Parse Webhook usage statistics. + Stats []ListParseStatic200ResponseInnerStatsInner `json:"stats"` +} diff --git a/rest/api/v3/webhooks/model_list_parse_static_200_response_inner_stats_inner.go b/rest/api/v3/webhooks/model_list_parse_static_200_response_inner_stats_inner.go new file mode 100644 index 00000000..5a2cc1ad --- /dev/null +++ b/rest/api/v3/webhooks/model_list_parse_static_200_response_inner_stats_inner.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListParseStatic200ResponseInnerStatsInner struct for ListParseStatic200ResponseInnerStatsInner +type ListParseStatic200ResponseInnerStatsInner struct { + Metrics *ListParseStatic200ResponseInnerStatsInnerMetrics `json:"metrics,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_list_parse_static_200_response_inner_stats_inner_metrics.go b/rest/api/v3/webhooks/model_list_parse_static_200_response_inner_stats_inner_metrics.go new file mode 100644 index 00000000..929a73b4 --- /dev/null +++ b/rest/api/v3/webhooks/model_list_parse_static_200_response_inner_stats_inner_metrics.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListParseStatic200ResponseInnerStatsInnerMetrics struct for ListParseStatic200ResponseInnerStatsInnerMetrics +type ListParseStatic200ResponseInnerStatsInnerMetrics struct { + // The number of emails received and parsed by the Parse Webhook. + Received float32 `json:"received"` +} diff --git a/rest/api/v3/webhooks/model_parse_setting.go b/rest/api/v3/webhooks/model_parse_setting.go new file mode 100644 index 00000000..44d9eddf --- /dev/null +++ b/rest/api/v3/webhooks/model_parse_setting.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ParseSetting struct for ParseSetting +type ParseSetting struct { + // The public URL where you would like SendGrid to POST the data parsed from your email. Any emails sent with the given hostname provided (whose MX records have been updated to point to SendGrid) will be parsed and POSTed to this URL. + Url *string `json:"url,omitempty"` + // A specific and unique domain or subdomain that you have created to use exclusively to parse your incoming email. For example, `parse.yourdomain.com`. + Hostname *string `json:"hostname,omitempty"` + // Indicates if you would like SendGrid to check the content parsed from your emails for spam before POSTing them to your domain. + SpamCheck *bool `json:"spam_check,omitempty"` + // Indicates if you would like SendGrid to post the original MIME-type content of your parsed email. When this parameter is set to `true`, SendGrid will send a JSON payload of the content of your email. + SendRaw *bool `json:"send_raw,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_update_signed_event_webhook_request.go b/rest/api/v3/webhooks/model_update_signed_event_webhook_request.go new file mode 100644 index 00000000..c3d5ecaa --- /dev/null +++ b/rest/api/v3/webhooks/model_update_signed_event_webhook_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateSignedEventWebhookRequest struct for UpdateSignedEventWebhookRequest +type UpdateSignedEventWebhookRequest struct { + // Enable or disable the webhook by setting this property to `true` or `false`, respectively. + Enabled bool `json:"enabled"` +} From f4bcb2e6352833bdf201733ef7b51ffd50b08fa4 Mon Sep 17 00:00:00 2001 From: Shubham Tiwari Date: Fri, 4 Oct 2024 14:58:48 +0530 Subject: [PATCH 12/16] chore: correcting sendgrid-go references --- client/request_handler.go | 6 +++--- client/version.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/request_handler.go b/client/request_handler.go index 37ae12b4..4c4e70d1 100644 --- a/client/request_handler.go +++ b/client/request_handler.go @@ -1,4 +1,4 @@ -// Package client provides internal utilities for the twilio-go client library. +// Package client provides internal utilities for the sendgrid-go client library. package client import ( @@ -54,10 +54,10 @@ func (c *RequestHandler) BuildUrl(rawURL string) (string, error) { } if len(pieces) == 4 { - // product.region.twilio.com + // api.region.sendgrid.com region = pieces[1] } else if len(pieces) == 5 { - // product.edge.region.twilio.com + // api.edge.region.sendgrid.com - currently not supported in sendgrid edge = pieces[1] region = pieces[2] } diff --git a/client/version.go b/client/version.go index a563c3bb..c508830f 100644 --- a/client/version.go +++ b/client/version.go @@ -1,5 +1,5 @@ // Package config for config files. package client -// LibraryVersion specifies the current version of twilio-go. +// LibraryVersion specifies the current version of sendgrid-go. const LibraryVersion = "1.22.3" From c4de9e03f77dbb5db3944b5773cd529ec570f738 Mon Sep 17 00:00:00 2001 From: Shubham Tiwari Date: Fri, 4 Oct 2024 17:41:04 +0530 Subject: [PATCH 13/16] chore: update rest folder --- rest/api/v3/account_provisioning/README.md | 2 +- .../api_authenticate_account.go | 3 +- .../api_create_account.go | 3 +- .../api_delete_account.go | 3 +- .../api_get_account_state.go | 3 +- .../account_provisioning/api_list_account.go | 3 +- .../api_list_account_offering.go | 3 +- .../account_provisioning/api_list_offering.go | 3 +- .../api_update_account_offering.go | 3 +- .../api_update_account_state.go | 3 +- rest/api/v3/alerts/README.md | 2 +- rest/api/v3/alerts/api_create_alert.go | 3 +- rest/api/v3/alerts/api_delete_alert.go | 3 +- rest/api/v3/alerts/api_get_alert.go | 3 +- rest/api/v3/alerts/api_list_alert.go | 3 +- rest/api/v3/alerts/api_update_alert.go | 3 +- rest/api/v3/api_keys/README.md | 2 +- rest/api/v3/api_keys/api_create_api_key.go | 3 +- rest/api/v3/api_keys/api_delete_api_key.go | 3 +- rest/api/v3/api_keys/api_get_api_key.go | 3 +- rest/api/v3/api_keys/api_list_api_key.go | 3 +- rest/api/v3/api_keys/api_update_api_key.go | 3 +- .../v3/api_keys/api_update_api_key_name.go | 3 +- rest/api/v3/domain_authentication/README.md | 2 +- .../api_add_ip_to_authenticated_domain.go | 3 +- .../api_associate_subuser_with_domain.go | 3 +- ..._associate_subuser_with_domain_multiple.go | 3 +- .../api_authenticate_domain.go | 3 +- .../api_delete_authenticated_domain.go | 3 +- ...api_delete_ip_from_authenticated_domain.go | 3 +- ...ssociate_authenticated_domain_from_user.go | 3 +- .../api_disassociate_subuser_from_domain.go | 3 +- .../api_email_dns_record.go | 3 +- .../api_get_authenticated_domain.go | 3 +- ...list_all_authenticated_domain_with_user.go | 3 +- .../api_list_authenticated_domain.go | 3 +- ...api_list_authenticated_domain_with_user.go | 3 +- .../api_list_default_authenticated_domain.go | 3 +- .../api_update_authenticated_domain.go | 3 +- .../api_validate_authenticated_domain.go | 3 +- rest/api/v3/email_activity/README.md | 2 +- .../api/v3/email_activity/api_download_csv.go | 3 +- rest/api/v3/email_activity/api_get_message.go | 3 +- .../api/v3/email_activity/api_list_message.go | 3 +- rest/api/v3/email_activity/api_request_csv.go | 3 +- rest/api/v3/email_validation/README.md | 2 +- .../api_get_email_job_for_verification.go | 3 +- .../api_get_validations_email_jobs.go | 3 +- .../api_list_email_job_for_verification.go | 3 +- .../v3/email_validation/api_validate_email.go | 3 +- rest/api/v3/enforced_tls/README.md | 2 +- .../api_list_enforced_tls_setting.go | 3 +- .../api_update_enforced_tls_setting.go | 3 +- rest/api/v3/integrations/README.md | 2 +- .../v3/integrations/api_add_integration.go | 3 +- .../v3/integrations/api_delete_integration.go | 3 +- .../api_find_integration_by_id.go | 3 +- .../api_get_integrations_by_user.go | 3 +- .../v3/integrations/api_update_integration.go | 3 +- rest/api/v3/ip_access_management/README.md | 2 +- .../api_add_ip_to_allow_list.go | 3 +- .../api_delete_allowed_ip.go | 3 +- .../api_delete_allowed_ips.go | 3 +- .../api_get_allowed_ip.go | 3 +- .../api_list_access_activity.go | 3 +- .../api_list_allowed_ip.go | 3 +- rest/api/v3/ip_address_management/README.md | 2 +- .../v3/ip_address_management/api_add_ip.go | 3 +- .../api_add_ips_to_ip_pool.go | 3 +- .../api_add_sub_users_to_ip.go | 3 +- .../api_create_ip_pool.go | 3 +- .../api_delete_ip_pool.go | 3 +- .../api_delete_ips_from_ip_pool.go | 3 +- .../api_delete_sub_users_from_ip.go | 3 +- .../v3/ip_address_management/api_get_ip.go | 3 +- .../ip_address_management/api_get_ip_pool.go | 3 +- .../v3/ip_address_management/api_list_ip.go | 3 +- .../api_list_ip_assigned_to_ip_pool.go | 3 +- .../ip_address_management/api_list_ip_pool.go | 3 +- .../api_list_sub_user_assigned_to_ip.go | 3 +- .../v3/ip_address_management/api_update_ip.go | 3 +- .../api_update_ip_pool.go | 3 +- rest/api/v3/ip_warmup/README.md | 2 +- rest/api/v3/ip_warmup/api_get_warm_up_ip.go | 3 +- rest/api/v3/ip_warmup/api_list_warm_up_ip.go | 3 +- rest/api/v3/ip_warmup/api_stop_ip_warm_up.go | 3 +- rest/api/v3/ip_warmup/api_warm_up_ip.go | 3 +- rest/api/v3/ips/README.md | 2 +- rest/api/v3/ips/api_add_ip.go | 3 +- rest/api/v3/ips/api_add_ip_to_ip_pool.go | 3 +- rest/api/v3/ips/api_create_ip_pool.go | 3 +- rest/api/v3/ips/api_delete_ip_from_ip_pool.go | 3 +- rest/api/v3/ips/api_delete_ip_pool.go | 3 +- rest/api/v3/ips/api_get_ip.go | 3 +- rest/api/v3/ips/api_get_ip_pool.go | 3 +- rest/api/v3/ips/api_list_assigned_ip.go | 3 +- rest/api/v3/ips/api_list_ip.go | 3 +- rest/api/v3/ips/api_list_ip_pool.go | 3 +- .../api/v3/ips/api_list_remaining_ip_count.go | 3 +- rest/api/v3/ips/api_update_ip_pool.go | 3 +- rest/api/v3/link_branding/README.md | 2 +- ...api_associate_branded_link_with_subuser.go | 3 +- .../link_branding/api_create_branded_link.go | 3 +- .../link_branding/api_delete_branded_link.go | 3 +- ..._disassociate_branded_link_from_subuser.go | 3 +- .../v3/link_branding/api_get_branded_link.go | 3 +- .../v3/link_branding/api_list_branded_link.go | 3 +- .../api_list_default_branded_link.go | 3 +- .../api_list_subuser_branded_link.go | 3 +- .../link_branding/api_update_branded_link.go | 3 +- .../api_validate_branded_link.go | 3 +- rest/api/v3/lmc_campaigns/README.md | 2 +- .../v3/lmc_campaigns/api_create_campaign.go | 3 +- .../v3/lmc_campaigns/api_delete_campaign.go | 3 +- rest/api/v3/lmc_campaigns/api_get_campaign.go | 3 +- .../api_get_scheduled_campaign.go | 3 +- .../api/v3/lmc_campaigns/api_list_campaign.go | 3 +- .../v3/lmc_campaigns/api_schedule_campaign.go | 3 +- .../api/v3/lmc_campaigns/api_send_campaign.go | 3 +- .../lmc_campaigns/api_send_test_campaign.go | 3 +- .../lmc_campaigns/api_un_schedule_campaign.go | 3 +- .../v3/lmc_campaigns/api_update_campaign.go | 3 +- .../api_update_scheduled_campaign.go | 3 +- rest/api/v3/lmc_contactdb/README.md | 2 +- .../api/v3/lmc_contactdb/api_add_recipient.go | 3 +- .../api_add_recipient_to_contact_db_list.go | 3 +- .../api_add_recipients_to_contact_db_list.go | 3 +- .../api_create_contact_db_list.go | 3 +- .../lmc_contactdb/api_create_custom_field.go | 3 +- .../v3/lmc_contactdb/api_create_segment.go | 3 +- .../api_delete_contact_db_list.go | 3 +- .../api_delete_contact_db_lists.go | 3 +- .../lmc_contactdb/api_delete_custom_field.go | 3 +- .../v3/lmc_contactdb/api_delete_recipient.go | 3 +- ...i_delete_recipient_from_contact_db_list.go | 3 +- .../v3/lmc_contactdb/api_delete_recipients.go | 3 +- .../v3/lmc_contactdb/api_delete_segment.go | 3 +- rest/api/v3/lmc_contactdb/api_get_billable.go | 3 +- .../lmc_contactdb/api_get_contact_db_list.go | 3 +- .../v3/lmc_contactdb/api_get_custom_field.go | 3 +- .../api/v3/lmc_contactdb/api_get_recipient.go | 3 +- .../lmc_contactdb/api_get_recipient_list.go | 3 +- rest/api/v3/lmc_contactdb/api_get_segment.go | 3 +- .../lmc_contactdb/api_list_contact_db_list.go | 3 +- .../v3/lmc_contactdb/api_list_custom_field.go | 3 +- .../v3/lmc_contactdb/api_list_recipient.go | 3 +- .../lmc_contactdb/api_list_recipient_count.go | 3 +- .../api_list_recipient_for_segment.go | 3 +- ...pi_list_recipients_from_contact_db_list.go | 3 +- .../lmc_contactdb/api_list_reserved_field.go | 3 +- .../api_list_search_recipient.go | 3 +- rest/api/v3/lmc_contactdb/api_list_segment.go | 3 +- rest/api/v3/lmc_contactdb/api_list_status.go | 3 +- .../v3/lmc_contactdb/api_search_recipient.go | 3 +- .../api_update_contact_db_list.go | 3 +- .../v3/lmc_contactdb/api_update_recipient.go | 3 +- .../v3/lmc_contactdb/api_update_segment.go | 3 +- rest/api/v3/lmc_senders/README.md | 2 +- rest/api/v3/lmc_senders/api_create_sender.go | 3 +- rest/api/v3/lmc_senders/api_delete_sender.go | 3 +- rest/api/v3/lmc_senders/api_get_sender.go | 3 +- rest/api/v3/lmc_senders/api_list_sender.go | 3 +- .../api_reset_sender_verification.go | 3 +- rest/api/v3/lmc_senders/api_update_sender.go | 3 +- rest/api/v3/mail/README.md | 2 +- rest/api/v3/mail/api_create_mail_batch.go | 3 +- rest/api/v3/mail/api_get_mail_batch.go | 3 +- rest/api/v3/mail/api_send_mail.go | 3 +- rest/api/v3/mail_settings/README.md | 2 +- .../api_list_address_whitelist.go | 3 +- .../v3/mail_settings/api_list_bounce_purge.go | 3 +- rest/api/v3/mail_settings/api_list_footer.go | 3 +- .../mail_settings/api_list_forward_bounce.go | 3 +- .../v3/mail_settings/api_list_forward_spam.go | 3 +- .../v3/mail_settings/api_list_mail_setting.go | 3 +- .../api/v3/mail_settings/api_list_template.go | 3 +- .../api_update_address_whitelist.go | 3 +- .../mail_settings/api_update_bounce_purge.go | 3 +- .../api/v3/mail_settings/api_update_footer.go | 3 +- .../api_update_forward_bounce.go | 3 +- .../mail_settings/api_update_forward_spam.go | 3 +- .../v3/mail_settings/api_update_template.go | 3 +- rest/api/v3/mc_contacts/.openapi-generator | 145 ++++++++++++++++ .../.openapi-generator-ignore | 0 rest/api/v3/mc_contacts/README.md | 131 ++++++++++++++ rest/api/v3/mc_contacts/api_delete_contact.go | 109 ++++++++++++ .../api_delete_contact_identifier.go | 116 +++++++++++++ rest/api/v3/mc_contacts/api_export_contact.go | 105 ++++++++++++ rest/api/v3/mc_contacts/api_get_contact.go | 85 +++++++++ .../api_get_contact_by_identifiers.go | 117 +++++++++++++ .../v3/mc_contacts/api_get_export_contact.go | 101 +++++++++++ .../v3/mc_contacts/api_get_import_contact.go | 101 +++++++++++ rest/api/v3/mc_contacts/api_import_contact.go | 105 ++++++++++++ .../mc_contacts/api_list_batched_contact.go | 97 +++++++++++ rest/api/v3/mc_contacts/api_list_contact.go | 89 ++++++++++ .../mc_contacts/api_list_contact_by_email.go | 105 ++++++++++++ .../v3/mc_contacts/api_list_contact_count.go | 81 +++++++++ .../v3/mc_contacts/api_list_export_contact.go | 89 ++++++++++ rest/api/v3/mc_contacts/api_search_contact.go | 105 ++++++++++++ rest/api/v3/mc_contacts/api_service.go | 34 ++++ rest/api/v3/mc_contacts/api_update_contact.go | 105 ++++++++++++ .../v3/mc_contacts/docs/ContactDetails3.md | 35 ++++ rest/api/v3/mc_contacts/docs/ContactExport.md | 20 +++ rest/api/v3/mc_contacts/docs/ContactImport.md | 16 ++ .../mc_contacts/docs/ContactImportResults.md | 16 ++ .../api/v3/mc_contacts/docs/ContactRequest.md | 24 +++ .../docs/ContactRequestCustomFields.md | 11 ++ rest/api/v3/mc_contacts/docs/ContactsError.md | 14 ++ rest/api/v3/mc_contacts/docs/DeleteContact.md | 49 ++++++ .../docs/DeleteContact202Response.md} | 4 +- .../docs/DeleteContact400Response.md} | 4 +- .../docs/DeleteContactIdentifier.md | 52 ++++++ .../DeleteContactIdentifier202Response.md | 11 ++ .../docs/DeleteContactIdentifierRequest.md | 12 ++ rest/api/v3/mc_contacts/docs/ErrorResponse.md | 12 ++ .../docs/ErrorResponseErrorsInner.md | 13 ++ rest/api/v3/mc_contacts/docs/ExportContact.md | 48 ++++++ .../docs/ExportContact202Response.md | 12 ++ .../mc_contacts/docs/ExportContactRequest.md | 15 ++ .../docs/ExportContactRequestNotifications.md | 11 ++ .../docs/FileType.md} | 6 +- .../docs/FileType1.md} | 5 +- .../docs/GetContact.md} | 18 +- .../docs/GetContactByIdentifiers.md | 52 ++++++ .../GetContactByIdentifiers200Response.md | 11 ++ ...tactByIdentifiers200ResponseResultValue.md | 12 ++ .../docs/GetContactByIdentifiersRequest.md | 11 ++ ...actByIdentifiersRequestIdentifiersInner.md | 14 ++ .../v3/mc_contacts/docs/GetExportContact.md | 51 ++++++ .../v3/mc_contacts/docs/GetImportContact.md | 51 ++++++ .../docs/GetImportContact400Response.md | 11 ++ .../docs/IdentifierType.md} | 10 +- .../v3/mc_contacts/docs/IdentifierType1.md | 15 ++ rest/api/v3/mc_contacts/docs/ImportContact.md | 48 ++++++ .../docs/ImportContact200Response.md | 13 ++ ...ortContact200ResponseUploadHeadersInner.md | 12 ++ .../docs/ImportContact400Response.md | 11 ++ .../docs/ImportContact404Response.md | 11 ++ .../mc_contacts/docs/ImportContactRequest.md | 13 ++ .../v3/mc_contacts/docs/ListBatchedContact.md | 48 ++++++ .../docs/ListBatchedContact200Response.md | 11 ++ .../docs/ListBatchedContactRequest.md} | 4 +- rest/api/v3/mc_contacts/docs/ListContact.md | 44 +++++ .../docs/ListContact200Response.md | 13 ++ .../docs/ListContact400Response.md | 11 ++ .../v3/mc_contacts/docs/ListContactByEmail.md | 48 ++++++ .../docs/ListContactByEmail200Response.md | 11 ++ .../docs/ListContactByEmailRequest.md | 14 ++ .../v3/mc_contacts/docs/ListContactCount.md | 44 +++++ .../docs/ListContactCount200Response.md | 13 ++ ...ontactCount200ResponseBillableBreakdown.md | 12 ++ .../v3/mc_contacts/docs/ListExportContact.md | 44 +++++ .../docs/ListExportContact200Response.md | 12 ++ .../ListExportContact200ResponseMetadata.md | 13 ++ ...ListExportContact200ResponseResultInner.md | 21 +++ ...rtContact200ResponseResultInnerMetadata.md | 13 ++ ...tact200ResponseResultInnerSegmentsInner.md | 12 ++ .../docs/ListExportContact400Response.md | 11 ++ ...ListExportContact400ResponseErrorsInner.md | 12 ++ rest/api/v3/mc_contacts/docs/Metadata.md | 14 ++ rest/api/v3/mc_contacts/docs/SearchContact.md | 48 ++++++ .../docs/SearchContact200Response.md | 13 ++ .../docs/SearchContact400Response.md | 11 ++ .../SearchContact400ResponseErrorsInner.md} | 5 +- .../docs/SearchContact500Response.md | 11 ++ .../SearchContact500ResponseErrorsInner.md | 11 ++ .../mc_contacts/docs/SearchContactRequest.md | 11 ++ rest/api/v3/mc_contacts/docs/SelfMetadata.md | 11 ++ .../docs/Status.md} | 8 +- rest/api/v3/mc_contacts/docs/UpdateContact.md | 48 ++++++ .../docs/UpdateContact202Response.md | 11 ++ .../mc_contacts/docs/UpdateContactRequest.md | 12 ++ .../v3/mc_contacts/model_contact_details3.go | 43 +++++ .../v3/mc_contacts/model_contact_export.go | 36 ++++ .../v3/mc_contacts/model_contact_import.go | 29 ++++ .../model_contact_import_results.go | 30 ++++ .../v3/mc_contacts/model_contact_request.go | 45 +++++ .../model_contact_request_custom_fields.go | 20 +++ .../v3/mc_contacts/model_contacts_error.go | 22 +++ .../model_delete_contact_202_response.go | 20 +++ .../model_delete_contact_400_response.go | 19 +++ ..._delete_contact_identifier_202_response.go | 20 +++ ...model_delete_contact_identifier_request.go | 22 +++ .../v3/mc_contacts/model_error_response.go | 21 +++ .../model_error_response_errors_inner.go | 24 +++ .../model_export_contact_202_response.go | 21 +++ .../model_export_contact_request.go | 27 +++ ...el_export_contact_request_notifications.go | 19 +++ rest/api/v3/mc_contacts/model_file_type.go | 23 +++ rest/api/v3/mc_contacts/model_file_type1.go | 22 +++ ...get_contact_by_identifiers_200_response.go | 19 +++ ...y_identifiers_200_response_result_value.go | 20 +++ ...odel_get_contact_by_identifiers_request.go | 20 +++ ...y_identifiers_request_identifiers_inner.go | 25 +++ .../model_get_import_contact_400_response.go | 19 +++ .../v3/mc_contacts/model_identifier_type.go | 25 +++ .../v3/mc_contacts/model_identifier_type1.go | 25 +++ .../model_import_contact_200_response.go | 24 +++ ...ntact_200_response_upload_headers_inner.go | 20 +++ .../model_import_contact_400_response.go | 19 +++ .../model_import_contact_404_response.go | 19 +++ .../model_import_contact_request.go | 24 +++ ...model_list_batched_contact_200_response.go | 19 +++ .../model_list_batched_contact_request.go | 19 +++ .../model_list_contact_200_response.go | 21 +++ .../model_list_contact_400_response.go | 19 +++ ...odel_list_contact_by_email_200_response.go | 19 +++ .../model_list_contact_by_email_request.go | 26 +++ .../model_list_contact_count_200_response.go | 23 +++ ...t_count_200_response_billable_breakdown.go | 22 +++ .../model_list_export_contact_200_response.go | 20 +++ ...t_export_contact_200_response__metadata.go | 23 +++ ...xport_contact_200_response_result_inner.go | 37 ++++ ...act_200_response_result_inner__metadata.go | 21 +++ ...00_response_result_inner_segments_inner.go | 20 +++ .../model_list_export_contact_400_response.go | 19 +++ ...xport_contact_400_response_errors_inner.go | 20 +++ rest/api/v3/mc_contacts/model_metadata.go | 26 +++ .../model_search_contact_200_response.go | 22 +++ .../model_search_contact_400_response.go | 19 +++ ...earch_contact_400_response_errors_inner.go | 20 +++ .../model_search_contact_500_response.go | 19 +++ ...earch_contact_500_response_errors_inner.go | 19 +++ .../model_search_contact_request.go | 20 +++ .../api/v3/mc_contacts/model_self_metadata.go | 20 +++ rest/api/v3/mc_contacts/model_status.go | 24 +++ .../model_update_contact_202_response.go | 20 +++ .../model_update_contact_request.go | 22 +++ .../v3/mc_custom_fields/.openapi-generator | 36 ++++ .../.openapi-generator-ignore | 0 rest/api/v3/mc_custom_fields/README.md | 78 +++++++++ .../api_create_field_definition.go | 73 ++++++++ .../api_delete_field_definition.go | 61 +++++++ .../api_list_field_definition.go | 49 ++++++ rest/api/v3/mc_custom_fields/api_service.go | 34 ++++ .../api_update_field_definition.go | 92 ++++++++++ .../docs/CreateFieldDefinition.md | 48 ++++++ .../docs/CreateFieldDefinition200Response.md | 14 ++ .../docs/CreateFieldDefinition400Response.md | 11 ++ .../docs/CreateFieldDefinitionRequest.md | 12 ++ .../docs/CustomFieldDefinitionsResponse.md | 13 ++ .../docs/CustomFieldsError.md | 14 ++ .../docs/DeleteFieldDefinition.md} | 16 +- .../docs/FieldType.md} | 8 +- .../v3/mc_custom_fields/docs/FieldType1.md | 14 ++ .../v3/mc_custom_fields/docs/FieldType2.md | 14 ++ .../docs/ListFieldDefinition.md | 44 +++++ .../docs/ListFieldDefinition200Response.md | 13 ++ .../docs/Metadata.md | 0 .../ReservedFieldDefinitionsResponseInner.md | 13 ++ .../docs/UpdateFieldDefinition.md} | 20 +-- .../docs/UpdateFieldDefinitionRequest.md | 11 ++ ...el_create_field_definition_200_response.go | 22 +++ ...el_create_field_definition_400_response.go | 19 +++ .../model_create_field_definition_request.go | 20 +++ ...model_custom_field_definitions_response.go | 21 +++ .../model_custom_fields_error.go | 22 +++ .../v3/mc_custom_fields/model_field_type.go | 24 +++ .../v3/mc_custom_fields/model_field_type1.go | 24 +++ .../v3/mc_custom_fields/model_field_type2.go | 24 +++ ...odel_list_field_definition_200_response.go | 21 +++ .../api/v3/mc_custom_fields/model_metadata.go | 22 +++ ...served_field_definitions_response_inner.go | 22 +++ .../model_update_field_definition_request.go | 19 +++ rest/api/v3/mc_designs/.openapi-generator | 43 ----- rest/api/v3/mc_designs/README.md | 84 --------- rest/api/v3/mc_designs/api_create_design.go | 72 -------- rest/api/v3/mc_designs/api_delete_design.go | 76 --------- .../api/v3/mc_designs/api_duplicate_design.go | 91 ---------- .../api_duplicate_pre_built_design.go | 91 ---------- rest/api/v3/mc_designs/api_get_design.go | 76 --------- .../v3/mc_designs/api_get_pre_built_design.go | 76 --------- rest/api/v3/mc_designs/api_list_design.go | 78 --------- .../mc_designs/api_list_pre_built_design.go | 78 --------- rest/api/v3/mc_designs/api_service.go | 34 ---- rest/api/v3/mc_designs/api_update_design.go | 91 ---------- rest/api/v3/mc_designs/docs/CreateDesign.md | 48 ------ .../mc_designs/docs/DesignCommonProperties.md | 15 -- rest/api/v3/mc_designs/docs/DesignInput.md | 14 -- rest/api/v3/mc_designs/docs/DesignOutput.md | 14 -- .../v3/mc_designs/docs/DesignOutputSummary.md | 16 -- .../api/v3/mc_designs/docs/DuplicateDesign.md | 52 ------ .../docs/DuplicatePreBuiltDesign.md | 52 ------ .../v3/mc_designs/docs/GetPreBuiltDesign.md | 51 ------ rest/api/v3/mc_designs/docs/ListDesign.md | 50 ------ .../v3/mc_designs/docs/ListPreBuiltDesign.md | 50 ------ rest/api/v3/mc_designs/docs/UpdateDesign.md | 52 ------ .../v3/mc_designs/docs/UpdateDesignRequest.md | 16 -- rest/api/v3/mc_designs/model_api_error.go | 21 --- rest/api/v3/mc_designs/model_api_errors.go | 19 --- .../model_design_common_properties.go | 28 --- .../model_design_duplicate_input.go | 22 --- rest/api/v3/mc_designs/model_design_input.go | 26 --- rest/api/v3/mc_designs/model_design_output.go | 26 --- .../mc_designs/model_design_output_summary.go | 30 ---- rest/api/v3/mc_designs/model_editor.go | 23 --- .../model_list_design_200_response.go | 20 --- rest/api/v3/mc_designs/model_metadata.go | 22 --- .../mc_designs/model_update_design_request.go | 30 ---- rest/api/v3/mc_lists/.openapi-generator | 1 + rest/api/v3/mc_lists/README.md | 2 +- .../v3/mc_lists/api_create_marketing_list.go | 3 +- rest/api/v3/mc_lists/api_delete_contact.go | 3 +- .../v3/mc_lists/api_delete_marketing_list.go | 3 +- .../api/v3/mc_lists/api_get_marketing_list.go | 3 +- .../api/v3/mc_lists/api_list_contact_count.go | 3 +- .../v3/mc_lists/api_list_marketing_list.go | 3 +- .../v3/mc_lists/api_update_marketing_list.go | 3 +- rest/api/v3/mc_segments/README.md | 2 +- rest/api/v3/mc_segments/api_delete_segment.go | 3 +- rest/api/v3/mc_segments/api_get_segment.go | 3 +- rest/api/v3/mc_segments/api_list_segment.go | 3 +- rest/api/v3/mc_segments_2/README.md | 2 +- .../v3/mc_segments_2/api_create_segment.go | 3 +- .../v3/mc_segments_2/api_delete_segment.go | 3 +- rest/api/v3/mc_segments_2/api_get_segment.go | 3 +- rest/api/v3/mc_segments_2/api_list_segment.go | 3 +- .../v3/mc_segments_2/api_refresh_segment.go | 3 +- .../v3/mc_segments_2/api_update_segment.go | 3 +- rest/api/v3/mc_senders/.openapi-generator | 1 + rest/api/v3/mc_senders/README.md | 2 +- rest/api/v3/mc_senders/api_create_sender.go | 3 +- rest/api/v3/mc_senders/api_delete_sender.go | 3 +- rest/api/v3/mc_senders/api_get_sender.go | 3 +- rest/api/v3/mc_senders/api_list_sender.go | 3 +- .../api_reset_sender_verification.go | 3 +- rest/api/v3/mc_senders/api_update_sender.go | 3 +- rest/api/v3/mc_singlesends/README.md | 2 +- .../mc_singlesends/api_create_single_send.go | 3 +- .../api_delete_scheduled_single_send.go | 3 +- .../mc_singlesends/api_delete_single_send.go | 3 +- .../mc_singlesends/api_delete_single_sends.go | 3 +- .../api_duplicate_single_send.go | 3 +- .../v3/mc_singlesends/api_get_single_send.go | 3 +- .../v3/mc_singlesends/api_list_category.go | 3 +- .../v3/mc_singlesends/api_list_single_send.go | 3 +- .../api_schedule_single_send.go | 3 +- .../mc_singlesends/api_search_single_send.go | 3 +- .../mc_singlesends/api_update_single_send.go | 3 +- rest/api/v3/mc_stats/.openapi-generator | 60 +++++++ .../.openapi-generator-ignore | 0 rest/api/v3/mc_stats/README.md | 88 ++++++++++ .../v3/mc_stats/api_export_automation_stat.go | 79 +++++++++ .../mc_stats/api_export_single_send_stat.go | 79 +++++++++ .../v3/mc_stats/api_get_automation_stat.go | 161 ++++++++++++++++++ .../v3/mc_stats/api_get_single_send_stat.go | 143 ++++++++++++++++ .../v3/mc_stats/api_list_automation_stat.go | 96 +++++++++++ .../mc_stats/api_list_click_tracking_stat.go | 133 +++++++++++++++ .../v3/mc_stats/api_list_single_send_stat.go | 96 +++++++++++ .../api_list_single_send_tracking_stat.go | 133 +++++++++++++++ rest/api/v3/mc_stats/api_service.go | 34 ++++ rest/api/v3/mc_stats/docs/AbPhase.md | 14 ++ rest/api/v3/mc_stats/docs/AbPhase1.md | 14 ++ .../docs/AbPhaseId.md} | 6 +- .../{stats => mc_stats}/docs/AggregatedBy.md | 3 +- .../docs/AutmoationsLinkStatsResponse.md | 13 ++ ...utmoationsLinkStatsResponseResultsInner.md | 14 ++ .../docs/AutomationsResponse.md} | 4 +- .../docs/AutomationsResponseResultsInner.md | 14 ++ rest/api/v3/mc_stats/docs/ErrorResponse.md | 12 ++ .../mc_stats/docs/ErrorResponseErrorsInner.md | 13 ++ .../v3/mc_stats/docs/ExportAutomationStat.md | 49 ++++++ .../v3/mc_stats/docs/ExportSingleSendStat.md | 49 ++++++ .../api/v3/mc_stats/docs/GetAutomationStat.md | 59 +++++++ .../api/v3/mc_stats/docs/GetSingleSendStat.md | 58 +++++++ .../docs/Items.md} | 5 +- rest/api/v3/mc_stats/docs/Items1.md | 13 ++ rest/api/v3/mc_stats/docs/Items2.md | 13 ++ .../v3/mc_stats/docs/LinkTrackingMetadata.md | 14 ++ .../v3/mc_stats/docs/ListAutomationStat.md | 50 ++++++ .../v3/mc_stats/docs/ListClickTrackingStat.md | 55 ++++++ .../v3/mc_stats/docs/ListSingleSendStat.md | 50 ++++++ .../docs/ListSingleSendTrackingStat.md | 56 ++++++ rest/api/v3/mc_stats/docs/Metadata.md | 14 ++ rest/api/v3/mc_stats/docs/Metrics.md | 22 +++ .../docs/SinglesendsLinkStatsResponse.md | 13 ++ ...inglesendsLinkStatsResponseResultsInner.md | 15 ++ .../v3/mc_stats/docs/SinglesendsResponse.md | 12 ++ .../docs/SinglesendsResponseResultsInner.md | 15 ++ rest/api/v3/mc_stats/model_ab_phase.go | 24 +++ rest/api/v3/mc_stats/model_ab_phase1.go | 24 +++ rest/api/v3/mc_stats/model_ab_phase_id.go | 23 +++ rest/api/v3/mc_stats/model_aggregated_by.go | 23 +++ .../model_autmoations_link_stats_response.go | 22 +++ ...tions_link_stats_response_results_inner.go | 26 +++ .../v3/mc_stats/model_automations_response.go | 20 +++ ...odel_automations_response_results_inner.go | 25 +++ rest/api/v3/mc_stats/model_error_response.go | 21 +++ .../model_error_response_errors_inner.go | 24 +++ rest/api/v3/mc_stats/model_items.go | 22 +++ rest/api/v3/mc_stats/model_items1.go | 23 +++ rest/api/v3/mc_stats/model_items2.go | 23 +++ .../mc_stats/model_link_tracking_metadata.go | 26 +++ rest/api/v3/mc_stats/model_metadata.go | 26 +++ rest/api/v3/mc_stats/model_metrics.go | 30 ++++ .../model_singlesends_link_stats_response.go | 22 +++ ...sends_link_stats_response_results_inner.go | 28 +++ .../v3/mc_stats/model_singlesends_response.go | 20 +++ ...odel_singlesends_response_results_inner.go | 27 +++ rest/api/v3/mc_test/README.md | 2 +- .../mc_test/api_send_test_marketing_email.go | 3 +- rest/api/v3/partner/README.md | 2 +- .../v3/partner/api_list_partner_setting.go | 3 +- rest/api/v3/recipients_data_erasure/README.md | 2 +- .../api_erase_recipient_email_data.go | 3 +- rest/api/v3/reverse_dns/README.md | 2 +- .../v3/reverse_dns/api_delete_reverse_dns.go | 3 +- .../api/v3/reverse_dns/api_get_reverse_dns.go | 3 +- .../v3/reverse_dns/api_list_reverse_dns.go | 3 +- .../v3/reverse_dns/api_set_up_reverse_dns.go | 3 +- .../reverse_dns/api_validate_reverse_dns.go | 3 +- .../api/v3/scheduled_sends/.openapi-generator | 1 + rest/api/v3/scheduled_sends/README.md | 2 +- .../api_create_scheduled_send.go | 3 +- .../api_delete_scheduled_send.go | 3 +- .../scheduled_sends/api_get_scheduled_send.go | 3 +- .../api_list_scheduled_send.go | 3 +- .../api_update_scheduled_send.go | 3 +- rest/api/v3/scopes/.openapi-generator | 29 ++++ rest/api/v3/scopes/.openapi-generator-ignore | 23 +++ rest/api/v3/scopes/README.md | 71 ++++++++ .../v3/scopes/api_approve_scope_request.go | 77 +++++++++ rest/api/v3/scopes/api_deny_scope_request.go | 61 +++++++ rest/api/v3/scopes/api_list_scope.go | 91 ++++++++++ rest/api/v3/scopes/api_list_scope_request.go | 70 ++++++++ rest/api/v3/scopes/api_service.go | 34 ++++ .../docs/ApproveScopeRequest.md} | 18 +- .../docs/ApproveScopeRequest200Response.md | 11 ++ .../docs/DenyScopeRequest.md} | 18 +- .../docs/DenyScopeRequest404Response.md | 11 ++ .../DenyScopeRequest404ResponseErrorsInner.md | 12 ++ rest/api/v3/scopes/docs/ErrorResponse.md | 12 ++ .../scopes/docs/ErrorResponseErrorsInner.md | 13 ++ .../docs/ListScope.md} | 22 +-- .../v3/scopes/docs/ListScope200Response.md | 11 ++ .../v3/scopes/docs/ListScope401Response.md | 11 ++ .../docs/ListScope401ResponseErrorsInner.md | 12 ++ rest/api/v3/scopes/docs/ListScopeRequest.md | 49 ++++++ .../docs/ListScopeRequest200ResponseInner.md | 16 ++ ...odel_approve_scope_request_200_response.go | 20 +++ .../model_deny_scope_request_404_response.go | 19 +++ ...scope_request_404_response_errors_inner.go | 20 +++ rest/api/v3/scopes/model_error_response.go | 21 +++ .../model_error_response_errors_inner.go | 24 +++ .../scopes/model_list_scope_200_response.go | 20 +++ .../scopes/model_list_scope_401_response.go | 20 +++ ...el_list_scope_401_response_errors_inner.go | 22 +++ ...l_list_scope_request_200_response_inner.go | 30 ++++ rest/api/v3/seq/.openapi-generator | 1 - rest/api/v3/seq/README.md | 2 +- .../seq/api_list_engagement_quality_score.go | 3 +- ...i_list_subuser_engagement_quality_score.go | 3 +- rest/api/v3/sso/.openapi-generator | 64 ------- rest/api/v3/sso/README.md | 94 ---------- rest/api/v3/sso/api_create_sso_certificate.go | 104 ----------- rest/api/v3/sso/api_create_sso_integration.go | 104 ----------- rest/api/v3/sso/api_create_sso_teammate.go | 104 ----------- rest/api/v3/sso/api_delete_sso_certificate.go | 100 ----------- rest/api/v3/sso/api_delete_sso_integration.go | 92 ---------- rest/api/v3/sso/api_get_sso_certificate.go | 100 ----------- rest/api/v3/sso/api_get_sso_integration.go | 111 ------------ rest/api/v3/sso/api_list_sso_integration.go | 100 ----------- .../api_list_sso_integration_certificate.go | 100 ----------- rest/api/v3/sso/api_service.go | 34 ---- rest/api/v3/sso/api_update_sso_certificate.go | 115 ------------- rest/api/v3/sso/api_update_sso_integration.go | 125 -------------- rest/api/v3/sso/api_update_sso_teammate.go | 115 ------------- rest/api/v3/sso/docs/CreateSsoCertificate.md | 48 ------ .../sso/docs/CreateSsoCertificateRequest.md | 13 -- rest/api/v3/sso/docs/CreateSsoIntegration.md | 48 ------ rest/api/v3/sso/docs/CreateSsoTeammate.md | 48 ------ rest/api/v3/sso/docs/ListSsoIntegration.md | 48 ------ .../sso/docs/ListSsoIntegrationCertificate.md | 51 ------ rest/api/v3/sso/docs/PatchSsoTeammates200.md | 29 ---- .../sso/docs/PostPatchIntegrationRequest.md | 16 -- rest/api/v3/sso/docs/PostSsoTeammates201.md | 18 -- .../v3/sso/docs/PostSsoTeammatesRequest.md | 18 -- rest/api/v3/sso/docs/SsoCertificateBody.md | 15 -- rest/api/v3/sso/docs/SsoIntegration.md | 20 --- .../sso/docs/SsoTeammatesBaseRequestProps.md | 17 -- ...matesBaseRequestPropsSubuserAccessInner.md | 13 -- .../sso/docs/SsoTeammatesBaseResponseProps.md | 16 -- ...TeammatesRestrictedSubuserResponseProps.md | 12 -- ...dSubuserResponsePropsSubuserAccessInner.md | 16 -- .../sso/docs/UpdateSsoCertificateRequest.md | 13 -- rest/api/v3/sso/docs/UpdateSsoIntegration.md | 53 ------ rest/api/v3/sso/docs/UpdateSsoTeammate.md | 52 ------ .../model_create_sso_certificate_request.go | 24 --- .../v3/sso/model_patch_sso_teammates200.go | 56 ------ rest/api/v3/sso/model_permission_type.go | 23 --- rest/api/v3/sso/model_permission_type1.go | 23 --- rest/api/v3/sso/model_persona.go | 25 --- .../model_post_patch_integration_request.go | 30 ---- .../api/v3/sso/model_post_sso_teammates201.go | 34 ---- .../sso/model_post_sso_teammates_request.go | 34 ---- rest/api/v3/sso/model_sso_certificate_body.go | 28 --- .../v3/sso/model_sso_error_response_inner.go | 21 --- rest/api/v3/sso/model_sso_integration.go | 38 ----- .../model_sso_teammates_base_request_props.go | 32 ---- ...base_request_props_subuser_access_inner.go | 24 --- ...model_sso_teammates_base_response_props.go | 30 ---- ...mates_restricted_subuser_response_props.go | 22 --- ...ser_response_props_subuser_access_inner.go | 30 ---- .../model_update_sso_certificate_request.go | 24 --- rest/api/v3/sso/model_user_type.go | 24 --- rest/api/v3/stats/.openapi-generator | 80 --------- rest/api/v3/stats/README.md | 104 ----------- rest/api/v3/stats/api_get_client_stat.go | 98 ----------- rest/api/v3/stats/api_list_browser_stat.go | 114 ------------- rest/api/v3/stats/api_list_category.go | 95 ----------- rest/api/v3/stats/api_list_category_stat.go | 96 ----------- .../v3/stats/api_list_category_stat_sum.go | 123 ------------- rest/api/v3/stats/api_list_client_stat.go | 87 ---------- rest/api/v3/stats/api_list_device_stat.go | 105 ------------ rest/api/v3/stats/api_list_geo_stat.go | 114 ------------- .../stats/api_list_mailbox_provider_stat.go | 114 ------------- rest/api/v3/stats/api_list_stat.go | 105 ------------ rest/api/v3/stats/api_service.go | 34 ---- rest/api/v3/stats/docs/AdvancedStatsClicks.md | 12 -- .../v3/stats/docs/AdvancedStatsClicksOpens.md | 14 -- .../docs/AdvancedStatsMailboxProvider.md | 18 -- rest/api/v3/stats/docs/AdvancedStatsOpens.md | 12 -- rest/api/v3/stats/docs/AggregatedBy2.md | 14 -- rest/api/v3/stats/docs/AggregatedBy3.md | 14 -- rest/api/v3/stats/docs/CategoryStats.md | 12 -- .../v3/stats/docs/CategoryStatsStatsInner.md | 13 -- .../docs/CategoryStatsStatsInnerMetrics.md | 26 --- rest/api/v3/stats/docs/ClientType.md | 15 -- rest/api/v3/stats/docs/GetClientStat.md | 54 ------ rest/api/v3/stats/docs/ListBrowserStat.md | 53 ------ .../docs/ListBrowserStat200ResponseInner.md | 12 -- ...stBrowserStat200ResponseInnerStatsInner.md | 13 -- .../v3/stats/docs/ListCategory400Response.md | 11 -- .../ListCategory400ResponseErrorsInner.md | 12 -- .../docs/ListClientStat200ResponseInner.md | 12 -- ...istClientStat200ResponseInnerStatsInner.md | 13 -- rest/api/v3/stats/docs/ListDeviceStat.md | 52 ------ rest/api/v3/stats/docs/ListGeoStat.md | 53 ------ .../stats/docs/ListGeoStat200ResponseInner.md | 12 -- .../ListGeoStat200ResponseInnerStatsInner.md | 13 -- .../v3/stats/docs/ListMailboxProviderStat.md | 53 ------ ...ListMailboxProviderStat200ResponseInner.md | 12 -- ...xProviderStat200ResponseInnerStatsInner.md | 13 -- .../v3/stats/docs/ListStat200ResponseInner.md | 12 -- .../v3/stats/docs/StatsAdvancedGlobalStats.md | 26 --- .../v3/stats/model_advanced_stats_clicks.go | 22 --- .../model_advanced_stats_clicks_opens.go | 26 --- .../model_advanced_stats_mailbox_provider.go | 34 ---- .../v3/stats/model_advanced_stats_opens.go | 22 --- rest/api/v3/stats/model_aggregated_by.go | 24 --- rest/api/v3/stats/model_aggregated_by1.go | 24 --- rest/api/v3/stats/model_aggregated_by2.go | 24 --- rest/api/v3/stats/model_aggregated_by3.go | 24 --- rest/api/v3/stats/model_category_stats.go | 21 --- .../stats/model_category_stats_stats_inner.go | 23 --- ...odel_category_stats_stats_inner_metrics.go | 50 ------ rest/api/v3/stats/model_client_type.go | 25 --- rest/api/v3/stats/model_country.go | 23 --- ...el_list_browser_stat_200_response_inner.go | 22 --- ...ser_stat_200_response_inner_stats_inner.go | 23 --- .../model_list_category_200_response_inner.go | 20 --- .../stats/model_list_category_400_response.go | 20 --- ...list_category_400_response_errors_inner.go | 21 --- ...del_list_client_stat_200_response_inner.go | 22 --- ...ent_stat_200_response_inner_stats_inner.go | 23 --- .../model_list_geo_stat_200_response_inner.go | 22 --- ...geo_stat_200_response_inner_stats_inner.go | 23 --- ...ailbox_provider_stat_200_response_inner.go | 22 --- ...der_stat_200_response_inner_stats_inner.go | 23 --- .../model_list_stat_200_response_inner.go | 22 --- ...ist_stat_200_response_inner_stats_inner.go | 19 --- rest/api/v3/stats/model_sort_by_direction.go | 23 --- .../model_stats_advanced_global_stats.go | 50 ------ rest/api/v3/subusers/.openapi-generator | 1 + rest/api/v3/subusers/README.md | 2 +- rest/api/v3/subusers/api_create_subuser.go | 3 +- rest/api/v3/subusers/api_delete_subuser.go | 3 +- .../api/v3/subusers/api_get_subuser_credit.go | 3 +- rest/api/v3/subusers/api_list_monthly_stat.go | 3 +- rest/api/v3/subusers/api_list_reputation.go | 3 +- rest/api/v3/subusers/api_list_stat.go | 3 +- rest/api/v3/subusers/api_list_stat_sum.go | 3 +- rest/api/v3/subusers/api_list_subuser.go | 3 +- .../subusers/api_list_subuser_monthly_stat.go | 3 +- rest/api/v3/subusers/api_update_subuser.go | 3 +- .../v3/subusers/api_update_subuser_credit.go | 3 +- rest/api/v3/subusers/api_update_subuser_ip.go | 3 +- .../api_update_subuser_remaining_credit.go | 3 +- .../api_update_subuser_website_access.go | 3 +- rest/api/v3/suppressions/.openapi-generator | 136 +++++++++++++++ .../v3/suppressions/.openapi-generator-ignore | 23 +++ rest/api/v3/suppressions/README.md | 130 ++++++++++++++ .../api_add_suppression_to_asm_group.go | 85 +++++++++ .../v3/suppressions/api_creat_asm_group.go | 74 ++++++++ .../api_create_global_suppression.go | 74 ++++++++ .../v3/suppressions/api_delete_asm_group.go | 70 ++++++++ .../api_delete_global_suppression.go | 70 ++++++++ .../suppressions/api_delete_invalid_email.go | 70 ++++++++ .../suppressions/api_delete_invalid_emails.go | 74 ++++++++ .../v3/suppressions/api_delete_spam_report.go | 70 ++++++++ .../suppressions/api_delete_spam_reports.go | 74 ++++++++ .../api_delete_suppression_block.go | 70 ++++++++ .../api_delete_suppression_blocks.go | 74 ++++++++ .../api_delete_suppression_bounce.go | 78 +++++++++ .../api_delete_suppression_bounces.go | 74 ++++++++ .../api_delete_suppression_from_asm_group.go | 70 ++++++++ rest/api/v3/suppressions/api_get_asm_group.go | 70 ++++++++ .../suppressions/api_get_asm_suppression.go | 70 ++++++++ .../api_get_global_suppression.go | 70 ++++++++ .../v3/suppressions/api_get_invalid_email.go | 70 ++++++++ .../v3/suppressions/api_get_spam_report.go | 70 ++++++++ .../suppressions/api_get_suppression_block.go | 70 ++++++++ .../api_get_suppression_bounces.go | 70 ++++++++ ...get_suppression_bounces_classifications.go | 99 +++++++++++ .../api/v3/suppressions/api_list_asm_group.go | 70 ++++++++ .../suppressions/api_list_asm_suppression.go | 59 +++++++ .../api_list_global_suppression.go | 106 ++++++++++++ .../v3/suppressions/api_list_invalid_email.go | 106 ++++++++++++ .../v3/suppressions/api_list_spam_report.go | 106 ++++++++++++ .../api_list_suppression_block.go | 106 ++++++++++++ .../api_list_suppression_bounces.go | 123 +++++++++++++ ...ist_suppression_bounces_classifications.go | 95 +++++++++++ .../api_list_suppression_from_asm_group.go | 70 ++++++++ .../api_search_suppression_from_asm_group.go | 85 +++++++++ rest/api/v3/suppressions/api_service.go | 34 ++++ .../v3/suppressions/api_update_asm_group.go | 85 +++++++++ .../docs/Accept.md} | 6 +- rest/api/v3/suppressions/docs/Accept1.md | 13 ++ .../docs/AddSuppressionToAsmGroup.md | 53 ++++++ .../AddSuppressionToAsmGroup201Response.md | 11 ++ .../suppressions/docs/BlocksResponseInner.md | 14 ++ .../v3/suppressions/docs/BounceResponse.md | 14 ++ .../v3/suppressions/docs/Classification.md | 18 ++ .../v3/suppressions/docs/Classification1.md | 18 ++ .../api/v3/suppressions/docs/CreatAsmGroup.md | 49 ++++++ .../docs/CreatAsmGroup201Response.md | 14 ++ .../docs/CreateGlobalSuppression.md | 49 ++++++ .../CreateGlobalSuppression201Response.md | 11 ++ .../v3/suppressions/docs/DeleteAsmGroup.md | 52 ++++++ .../docs/DeleteGlobalSuppression.md | 52 ++++++ .../suppressions/docs/DeleteInvalidEmail.md | 52 ++++++ .../suppressions/docs/DeleteInvalidEmails.md | 49 ++++++ .../docs/DeleteInvalidEmailsRequest.md | 12 ++ .../v3/suppressions/docs/DeleteSpamReport.md | 52 ++++++ .../v3/suppressions/docs/DeleteSpamReports.md | 49 ++++++ .../docs/DeleteSpamReportsRequest.md | 12 ++ .../docs/DeleteSuppressionBlock.md | 52 ++++++ .../docs/DeleteSuppressionBlocks.md | 49 ++++++ .../docs/DeleteSuppressionBlocksRequest.md | 12 ++ .../docs/DeleteSuppressionBounce.md | 52 ++++++ .../docs/DeleteSuppressionBounces.md | 49 ++++++ .../docs/DeleteSuppressionBouncesRequest.md | 12 ++ .../docs/DeleteSuppressionFromAsmGroup.md | 53 ++++++ .../api/v3/suppressions/docs/ErrorResponse.md | 12 ++ .../docs/ErrorResponseErrorsInner.md | 13 ++ rest/api/v3/suppressions/docs/GetAsmGroup.md | 52 ++++++ .../docs/GetAsmGroup200Response.md | 16 ++ .../v3/suppressions/docs/GetAsmSuppression.md | 52 ++++++ .../docs/GetAsmSuppression200Response.md | 11 ++ ...Suppression200ResponseSuppressionsInner.md | 15 ++ .../suppressions/docs/GetGlobalSuppression.md | 52 ++++++ .../v3/suppressions/docs/GetInvalidEmail.md | 52 ++++++ .../api/v3/suppressions/docs/GetSpamReport.md | 52 ++++++ .../suppressions/docs/GetSuppressionBlock.md | 52 ++++++ .../docs/GetSuppressionBounces.md | 52 ++++++ .../GetSuppressionBouncesClassifications.md | 54 ++++++ ...essionBouncesClassifications200Response.md | 11 ++ ...esClassifications200ResponseResultInner.md | 12 ++ ...cations200ResponseResultInnerStatsInner.md | 12 ++ rest/api/v3/suppressions/docs/InvalidEmail.md | 13 ++ .../docs/ListAsmGroup.md} | 19 +-- .../docs/ListAsmSuppression.md} | 20 +-- .../ListAsmSuppression200ResponseInner.md | 14 ++ .../docs/ListGlobalSuppression.md | 53 ++++++ .../ListGlobalSuppression200ResponseInner.md | 12 ++ .../docs/ListInvalidEmail.md} | 22 +-- .../v3/suppressions/docs/ListSpamReport.md | 53 ++++++ .../suppressions/docs/ListSuppressionBlock.md | 53 ++++++ .../docs/ListSuppressionBounces.md | 53 ++++++ .../ListSuppressionBouncesClassifications.md} | 20 +-- ...essionBouncesClassifications200Response.md | 11 ++ ...esClassifications200ResponseResultInner.md | 12 ++ ...cations200ResponseResultInnerStatsInner.md | 12 ++ .../docs/ListSuppressionFromAsmGroup.md | 52 ++++++ .../RetrieveAGlobalSuppressionResponse.md} | 5 +- .../docs/SearchSuppressionFromAsmGroup.md | 53 ++++++ .../docs/SpamReportsResponseInner.md | 13 ++ .../v3/suppressions/docs/SuppressionGroup.md | 16 ++ .../docs/SuppressionGroupRequestBaseProps.md | 13 ++ .../suppressions/docs/SuppressionsRequest.md | 11 ++ .../v3/suppressions/docs/UpdateAsmGroup.md | 53 ++++++ .../docs/UpdateAsmGroupRequest.md | 13 ++ rest/api/v3/suppressions/model_accept.go | 23 +++ rest/api/v3/suppressions/model_accept1.go | 23 +++ ...d_suppression_to_asm_group_201_response.go | 20 +++ .../model_blocks_response_inner.go | 26 +++ .../v3/suppressions/model_bounce_response.go | 26 +++ .../v3/suppressions/model_classification.go | 28 +++ .../v3/suppressions/model_classification1.go | 28 +++ .../model_creat_asm_group_201_response.go | 26 +++ ..._create_global_suppression_201_response.go | 20 +++ .../model_delete_invalid_emails_request.go | 22 +++ .../model_delete_spam_reports_request.go | 22 +++ ...model_delete_suppression_blocks_request.go | 22 +++ ...odel_delete_suppression_bounces_request.go | 22 +++ .../v3/suppressions/model_error_response.go | 21 +++ .../model_error_response_errors_inner.go | 24 +++ .../model_get_asm_group_200_response.go | 29 ++++ .../model_get_asm_suppression_200_response.go | 20 +++ ...ression_200_response_suppressions_inner.go | 28 +++ ...on_bounces_classifications_200_response.go | 19 +++ ...assifications_200_response_result_inner.go | 20 +++ ...s_200_response_result_inner_stats_inner.go | 20 +++ .../v3/suppressions/model_invalid_email.go | 24 +++ ...list_asm_suppression_200_response_inner.go | 26 +++ ...t_global_suppression_200_response_inner.go | 22 +++ ...on_bounces_classifications_200_response.go | 19 +++ ...assifications_200_response_result_inner.go | 20 +++ ...s_200_response_result_inner_stats_inner.go | 20 +++ ..._retrieve_a_global_suppression_response.go | 20 +++ .../model_spam_reports_response_inner.go | 24 +++ .../suppressions/model_suppression_group.go | 29 ++++ ...el_suppression_group_request_base_props.go | 24 +++ .../model_suppressions_request.go | 20 +++ .../model_update_asm_group_request.go | 24 +++ rest/api/v3/teammates/.openapi-generator | 1 + rest/api/v3/teammates/README.md | 2 +- .../teammates/api_delete_pending_teammate.go | 3 +- rest/api/v3/teammates/api_delete_teammate.go | 3 +- rest/api/v3/teammates/api_get_teammate.go | 3 +- rest/api/v3/teammates/api_invite_teammate.go | 3 +- .../v3/teammates/api_list_pending_teammate.go | 3 +- .../teammates/api_list_subuser_by_template.go | 3 +- rest/api/v3/teammates/api_list_teammate.go | 3 +- .../teammates/api_resend_teammate_invite.go | 3 +- rest/api/v3/teammates/api_update_teammate.go | 3 +- rest/api/v3/templates/.openapi-generator | 1 + rest/api/v3/templates/README.md | 2 +- .../api_activate_template_version.go | 3 +- rest/api/v3/templates/api_create_template.go | 3 +- .../templates/api_create_template_version.go | 3 +- rest/api/v3/templates/api_delete_template.go | 3 +- .../templates/api_delete_template_version.go | 3 +- .../v3/templates/api_duplicate_template.go | 3 +- rest/api/v3/templates/api_get_template.go | 3 +- .../v3/templates/api_get_template_version.go | 3 +- rest/api/v3/templates/api_list_template.go | 3 +- rest/api/v3/templates/api_update_template.go | 3 +- .../templates/api_update_template_version.go | 3 +- rest/api/v3/tracking_settings/README.md | 2 +- .../api_list_click_tracking_setting.go | 3 +- ..._list_google_analytics_tracking_setting.go | 3 +- .../api_list_open_tracking_setting.go | 3 +- .../api_list_subscription_tracking_setting.go | 3 +- .../api_list_tracking_setting.go | 3 +- .../api_update_click_tracking_setting.go | 3 +- ...pdate_google_analytics_tracking_setting.go | 3 +- .../api_update_open_tracking_setting.go | 3 +- ...pi_update_subscription_tracking_setting.go | 3 +- rest/api/v3/user/.openapi-generator | 50 ++++++ rest/api/v3/user/.openapi-generator-ignore | 23 +++ rest/api/v3/user/README.md | 83 +++++++++ rest/api/v3/user/api_list_account.go | 59 +++++++ rest/api/v3/user/api_list_credit.go | 59 +++++++ rest/api/v3/user/api_list_email.go | 59 +++++++ rest/api/v3/user/api_list_profile.go | 59 +++++++ rest/api/v3/user/api_list_username.go | 59 +++++++ rest/api/v3/user/api_service.go | 34 ++++ rest/api/v3/user/api_update_email.go | 74 ++++++++ rest/api/v3/user/api_update_password.go | 74 ++++++++ rest/api/v3/user/api_update_profile.go | 82 +++++++++ rest/api/v3/user/api_update_username.go | 74 ++++++++ rest/api/v3/user/docs/ErrorResponse.md | 12 ++ .../v3/user/docs/ErrorResponseErrorsInner.md | 13 ++ .../v3/user/docs/GETUserAccountResponse.md | 12 ++ .../v3/user/docs/GETUserProfileResponse.md | 21 +++ rest/api/v3/user/docs/ListAccount.md | 48 ++++++ rest/api/v3/user/docs/ListCredit.md | 48 ++++++ .../api/v3/user/docs/ListCredit200Response.md | 17 ++ rest/api/v3/user/docs/ListEmail.md | 48 ++++++ rest/api/v3/user/docs/ListEmail200Response.md | 11 ++ rest/api/v3/user/docs/ListProfile.md | 48 ++++++ rest/api/v3/user/docs/ListUsername.md | 48 ++++++ .../v3/user/docs/ListUsername200Response.md | 12 ++ rest/api/v3/user/docs/Type.md | 13 ++ rest/api/v3/user/docs/UpdateEmail.md | 49 ++++++ .../v3/user/docs/UpdateEmail200Response.md | 11 ++ rest/api/v3/user/docs/UpdateEmailRequest.md | 11 ++ rest/api/v3/user/docs/UpdatePassword.md | 49 ++++++ .../api/v3/user/docs/UpdatePasswordRequest.md | 12 ++ rest/api/v3/user/docs/UpdateProfile.md | 49 ++++++ rest/api/v3/user/docs/UpdateUsername.md | 49 ++++++ .../v3/user/docs/UpdateUsername200Response.md | 11 ++ .../api/v3/user/docs/UpdateUsernameRequest.md | 11 ++ rest/api/v3/user/docs/UserProfile.md | 21 +++ rest/api/v3/user/model_error_response.go | 21 +++ .../user/model_error_response_errors_inner.go | 24 +++ .../user/model_get_user_account_response.go | 22 +++ .../user/model_get_user_profile_response.go | 40 +++++ .../v3/user/model_list_credit_200_response.go | 32 ++++ .../v3/user/model_list_email_200_response.go | 20 +++ .../user/model_list_username_200_response.go | 22 +++ rest/api/v3/user/model_type.go | 23 +++ .../user/model_update_email_200_response.go | 20 +++ .../api/v3/user/model_update_email_request.go | 20 +++ .../v3/user/model_update_password_request.go | 22 +++ .../model_update_username_200_response.go | 20 +++ .../v3/user/model_update_username_request.go | 20 +++ rest/api/v3/user/model_user_profile.go | 40 +++++ .../v3/verified_senders/.openapi-generator | 48 ++++++ .../.openapi-generator-ignore | 23 +++ rest/api/v3/verified_senders/README.md | 84 +++++++++ .../api_create_verified_sender.go | 97 +++++++++++ .../api_delete_verified_sender.go | 85 +++++++++ .../api_list_verified_sender.go | 103 +++++++++++ .../api_list_verified_sender_domain.go | 73 ++++++++ ...pi_list_verified_sender_steps_completed.go | 73 ++++++++ .../api_resend_verified_sender.go | 93 ++++++++++ rest/api/v3/verified_senders/api_service.go | 34 ++++ .../api_update_verified_sender.go | 108 ++++++++++++ .../api_verify_sender_token.go | 77 +++++++++ .../docs/CreateVerifiedSender.md | 48 ++++++ .../docs/CreateVerifiedSender400Response.md | 11 ++ ...ateVerifiedSender400ResponseErrorsInner.md | 13 ++ .../docs/DeleteVerifiedSender.md} | 17 +- .../docs/DeleteVerifiedSender403Response.md | 11 ++ ...teVerifiedSender403ResponseErrorsInner.md} | 3 +- .../docs/DeleteVerifiedSender404Response.md | 11 ++ .../v3/verified_senders/docs/ErrorResponse.md | 12 ++ .../docs/ErrorResponseErrorsInner.md | 13 ++ .../docs/ListVerifiedSender.md | 50 ++++++ .../docs/ListVerifiedSender200Response.md | 11 ++ .../docs/ListVerifiedSenderDomain.md | 44 +++++ .../ListVerifiedSenderDomain200Response.md | 11 ++ ...tVerifiedSenderDomain200ResponseResults.md | 12 ++ .../docs/ListVerifiedSenderStepsCompleted.md | 44 +++++ ...VerifiedSenderStepsCompleted200Response.md | 11 ++ ...dSenderStepsCompleted200ResponseResults.md | 12 ++ .../docs/ResendVerifiedSender.md | 51 ++++++ .../docs/UpdateVerifiedSender.md | 52 ++++++ .../docs/VerifiedSenderRequest.md | 21 +++ .../docs/VerifiedSenderResponse.md | 24 +++ .../docs/VerifySenderToken.md} | 18 +- ...del_create_verified_sender_400_response.go | 19 +++ ...rified_sender_400_response_errors_inner.go | 21 +++ ...del_delete_verified_sender_403_response.go | 19 +++ ...rified_sender_403_response_errors_inner.go | 20 +++ ...del_delete_verified_sender_404_response.go | 19 +++ .../verified_senders/model_error_response.go | 21 +++ .../model_error_response_errors_inner.go | 24 +++ ...model_list_verified_sender_200_response.go | 19 +++ ...ist_verified_sender_domain_200_response.go | 19 +++ ...fied_sender_domain_200_response_results.go | 20 +++ ...ied_sender_steps_completed_200_response.go | 19 +++ ...er_steps_completed_200_response_results.go | 20 +++ .../model_verified_sender_request.go | 29 ++++ .../model_verified_sender_response.go | 32 ++++ rest/api/v3/webhooks/README.md | 2 +- .../v3/webhooks/api_create_event_webhook.go | 3 +- .../v3/webhooks/api_create_parse_setting.go | 3 +- .../v3/webhooks/api_delete_event_webhook.go | 3 +- .../v3/webhooks/api_delete_parse_setting.go | 3 +- rest/api/v3/webhooks/api_get_event_webhook.go | 3 +- rest/api/v3/webhooks/api_get_parse_setting.go | 3 +- .../webhooks/api_get_signed_event_webhook.go | 3 +- .../api/v3/webhooks/api_list_event_webhook.go | 3 +- .../api/v3/webhooks/api_list_parse_setting.go | 3 +- rest/api/v3/webhooks/api_list_parse_static.go | 3 +- .../api/v3/webhooks/api_test_event_webhook.go | 3 +- .../v3/webhooks/api_update_event_webhook.go | 3 +- .../v3/webhooks/api_update_parse_setting.go | 3 +- .../api_update_signed_event_webhook.go | 3 +- sendgrid.go | 30 +++- 973 files changed, 18144 insertions(+), 7155 deletions(-) create mode 100644 rest/api/v3/mc_contacts/.openapi-generator rename rest/api/v3/{mc_designs => mc_contacts}/.openapi-generator-ignore (100%) create mode 100644 rest/api/v3/mc_contacts/README.md create mode 100644 rest/api/v3/mc_contacts/api_delete_contact.go create mode 100644 rest/api/v3/mc_contacts/api_delete_contact_identifier.go create mode 100644 rest/api/v3/mc_contacts/api_export_contact.go create mode 100644 rest/api/v3/mc_contacts/api_get_contact.go create mode 100644 rest/api/v3/mc_contacts/api_get_contact_by_identifiers.go create mode 100644 rest/api/v3/mc_contacts/api_get_export_contact.go create mode 100644 rest/api/v3/mc_contacts/api_get_import_contact.go create mode 100644 rest/api/v3/mc_contacts/api_import_contact.go create mode 100644 rest/api/v3/mc_contacts/api_list_batched_contact.go create mode 100644 rest/api/v3/mc_contacts/api_list_contact.go create mode 100644 rest/api/v3/mc_contacts/api_list_contact_by_email.go create mode 100644 rest/api/v3/mc_contacts/api_list_contact_count.go create mode 100644 rest/api/v3/mc_contacts/api_list_export_contact.go create mode 100644 rest/api/v3/mc_contacts/api_search_contact.go create mode 100644 rest/api/v3/mc_contacts/api_service.go create mode 100644 rest/api/v3/mc_contacts/api_update_contact.go create mode 100644 rest/api/v3/mc_contacts/docs/ContactDetails3.md create mode 100644 rest/api/v3/mc_contacts/docs/ContactExport.md create mode 100644 rest/api/v3/mc_contacts/docs/ContactImport.md create mode 100644 rest/api/v3/mc_contacts/docs/ContactImportResults.md create mode 100644 rest/api/v3/mc_contacts/docs/ContactRequest.md create mode 100644 rest/api/v3/mc_contacts/docs/ContactRequestCustomFields.md create mode 100644 rest/api/v3/mc_contacts/docs/ContactsError.md create mode 100644 rest/api/v3/mc_contacts/docs/DeleteContact.md rename rest/api/v3/{stats/docs/ListCategory200ResponseInner.md => mc_contacts/docs/DeleteContact202Response.md} (71%) rename rest/api/v3/{stats/docs/ListStat200ResponseInnerStatsInner.md => mc_contacts/docs/DeleteContact400Response.md} (68%) create mode 100644 rest/api/v3/mc_contacts/docs/DeleteContactIdentifier.md create mode 100644 rest/api/v3/mc_contacts/docs/DeleteContactIdentifier202Response.md create mode 100644 rest/api/v3/mc_contacts/docs/DeleteContactIdentifierRequest.md create mode 100644 rest/api/v3/mc_contacts/docs/ErrorResponse.md create mode 100644 rest/api/v3/mc_contacts/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/mc_contacts/docs/ExportContact.md create mode 100644 rest/api/v3/mc_contacts/docs/ExportContact202Response.md create mode 100644 rest/api/v3/mc_contacts/docs/ExportContactRequest.md create mode 100644 rest/api/v3/mc_contacts/docs/ExportContactRequestNotifications.md rename rest/api/v3/{mc_designs/docs/Editor.md => mc_contacts/docs/FileType.md} (73%) rename rest/api/v3/{stats/docs/Country.md => mc_contacts/docs/FileType1.md} (75%) rename rest/api/v3/{sso/docs/GetSsoCertificate.md => mc_contacts/docs/GetContact.md} (61%) create mode 100644 rest/api/v3/mc_contacts/docs/GetContactByIdentifiers.md create mode 100644 rest/api/v3/mc_contacts/docs/GetContactByIdentifiers200Response.md create mode 100644 rest/api/v3/mc_contacts/docs/GetContactByIdentifiers200ResponseResultValue.md create mode 100644 rest/api/v3/mc_contacts/docs/GetContactByIdentifiersRequest.md create mode 100644 rest/api/v3/mc_contacts/docs/GetContactByIdentifiersRequestIdentifiersInner.md create mode 100644 rest/api/v3/mc_contacts/docs/GetExportContact.md create mode 100644 rest/api/v3/mc_contacts/docs/GetImportContact.md create mode 100644 rest/api/v3/mc_contacts/docs/GetImportContact400Response.md rename rest/api/v3/{sso/docs/Persona.md => mc_contacts/docs/IdentifierType.md} (52%) create mode 100644 rest/api/v3/mc_contacts/docs/IdentifierType1.md create mode 100644 rest/api/v3/mc_contacts/docs/ImportContact.md create mode 100644 rest/api/v3/mc_contacts/docs/ImportContact200Response.md create mode 100644 rest/api/v3/mc_contacts/docs/ImportContact200ResponseUploadHeadersInner.md create mode 100644 rest/api/v3/mc_contacts/docs/ImportContact400Response.md create mode 100644 rest/api/v3/mc_contacts/docs/ImportContact404Response.md create mode 100644 rest/api/v3/mc_contacts/docs/ImportContactRequest.md create mode 100644 rest/api/v3/mc_contacts/docs/ListBatchedContact.md create mode 100644 rest/api/v3/mc_contacts/docs/ListBatchedContact200Response.md rename rest/api/v3/{mc_designs/docs/ApiErrors.md => mc_contacts/docs/ListBatchedContactRequest.md} (79%) create mode 100644 rest/api/v3/mc_contacts/docs/ListContact.md create mode 100644 rest/api/v3/mc_contacts/docs/ListContact200Response.md create mode 100644 rest/api/v3/mc_contacts/docs/ListContact400Response.md create mode 100644 rest/api/v3/mc_contacts/docs/ListContactByEmail.md create mode 100644 rest/api/v3/mc_contacts/docs/ListContactByEmail200Response.md create mode 100644 rest/api/v3/mc_contacts/docs/ListContactByEmailRequest.md create mode 100644 rest/api/v3/mc_contacts/docs/ListContactCount.md create mode 100644 rest/api/v3/mc_contacts/docs/ListContactCount200Response.md create mode 100644 rest/api/v3/mc_contacts/docs/ListContactCount200ResponseBillableBreakdown.md create mode 100644 rest/api/v3/mc_contacts/docs/ListExportContact.md create mode 100644 rest/api/v3/mc_contacts/docs/ListExportContact200Response.md create mode 100644 rest/api/v3/mc_contacts/docs/ListExportContact200ResponseMetadata.md create mode 100644 rest/api/v3/mc_contacts/docs/ListExportContact200ResponseResultInner.md create mode 100644 rest/api/v3/mc_contacts/docs/ListExportContact200ResponseResultInnerMetadata.md create mode 100644 rest/api/v3/mc_contacts/docs/ListExportContact200ResponseResultInnerSegmentsInner.md create mode 100644 rest/api/v3/mc_contacts/docs/ListExportContact400Response.md create mode 100644 rest/api/v3/mc_contacts/docs/ListExportContact400ResponseErrorsInner.md create mode 100644 rest/api/v3/mc_contacts/docs/Metadata.md create mode 100644 rest/api/v3/mc_contacts/docs/SearchContact.md create mode 100644 rest/api/v3/mc_contacts/docs/SearchContact200Response.md create mode 100644 rest/api/v3/mc_contacts/docs/SearchContact400Response.md rename rest/api/v3/{sso/docs/SsoErrorResponseInner.md => mc_contacts/docs/SearchContact400ResponseErrorsInner.md} (84%) create mode 100644 rest/api/v3/mc_contacts/docs/SearchContact500Response.md create mode 100644 rest/api/v3/mc_contacts/docs/SearchContact500ResponseErrorsInner.md create mode 100644 rest/api/v3/mc_contacts/docs/SearchContactRequest.md create mode 100644 rest/api/v3/mc_contacts/docs/SelfMetadata.md rename rest/api/v3/{sso/docs/UserType.md => mc_contacts/docs/Status.md} (63%) create mode 100644 rest/api/v3/mc_contacts/docs/UpdateContact.md create mode 100644 rest/api/v3/mc_contacts/docs/UpdateContact202Response.md create mode 100644 rest/api/v3/mc_contacts/docs/UpdateContactRequest.md create mode 100644 rest/api/v3/mc_contacts/model_contact_details3.go create mode 100644 rest/api/v3/mc_contacts/model_contact_export.go create mode 100644 rest/api/v3/mc_contacts/model_contact_import.go create mode 100644 rest/api/v3/mc_contacts/model_contact_import_results.go create mode 100644 rest/api/v3/mc_contacts/model_contact_request.go create mode 100644 rest/api/v3/mc_contacts/model_contact_request_custom_fields.go create mode 100644 rest/api/v3/mc_contacts/model_contacts_error.go create mode 100644 rest/api/v3/mc_contacts/model_delete_contact_202_response.go create mode 100644 rest/api/v3/mc_contacts/model_delete_contact_400_response.go create mode 100644 rest/api/v3/mc_contacts/model_delete_contact_identifier_202_response.go create mode 100644 rest/api/v3/mc_contacts/model_delete_contact_identifier_request.go create mode 100644 rest/api/v3/mc_contacts/model_error_response.go create mode 100644 rest/api/v3/mc_contacts/model_error_response_errors_inner.go create mode 100644 rest/api/v3/mc_contacts/model_export_contact_202_response.go create mode 100644 rest/api/v3/mc_contacts/model_export_contact_request.go create mode 100644 rest/api/v3/mc_contacts/model_export_contact_request_notifications.go create mode 100644 rest/api/v3/mc_contacts/model_file_type.go create mode 100644 rest/api/v3/mc_contacts/model_file_type1.go create mode 100644 rest/api/v3/mc_contacts/model_get_contact_by_identifiers_200_response.go create mode 100644 rest/api/v3/mc_contacts/model_get_contact_by_identifiers_200_response_result_value.go create mode 100644 rest/api/v3/mc_contacts/model_get_contact_by_identifiers_request.go create mode 100644 rest/api/v3/mc_contacts/model_get_contact_by_identifiers_request_identifiers_inner.go create mode 100644 rest/api/v3/mc_contacts/model_get_import_contact_400_response.go create mode 100644 rest/api/v3/mc_contacts/model_identifier_type.go create mode 100644 rest/api/v3/mc_contacts/model_identifier_type1.go create mode 100644 rest/api/v3/mc_contacts/model_import_contact_200_response.go create mode 100644 rest/api/v3/mc_contacts/model_import_contact_200_response_upload_headers_inner.go create mode 100644 rest/api/v3/mc_contacts/model_import_contact_400_response.go create mode 100644 rest/api/v3/mc_contacts/model_import_contact_404_response.go create mode 100644 rest/api/v3/mc_contacts/model_import_contact_request.go create mode 100644 rest/api/v3/mc_contacts/model_list_batched_contact_200_response.go create mode 100644 rest/api/v3/mc_contacts/model_list_batched_contact_request.go create mode 100644 rest/api/v3/mc_contacts/model_list_contact_200_response.go create mode 100644 rest/api/v3/mc_contacts/model_list_contact_400_response.go create mode 100644 rest/api/v3/mc_contacts/model_list_contact_by_email_200_response.go create mode 100644 rest/api/v3/mc_contacts/model_list_contact_by_email_request.go create mode 100644 rest/api/v3/mc_contacts/model_list_contact_count_200_response.go create mode 100644 rest/api/v3/mc_contacts/model_list_contact_count_200_response_billable_breakdown.go create mode 100644 rest/api/v3/mc_contacts/model_list_export_contact_200_response.go create mode 100644 rest/api/v3/mc_contacts/model_list_export_contact_200_response__metadata.go create mode 100644 rest/api/v3/mc_contacts/model_list_export_contact_200_response_result_inner.go create mode 100644 rest/api/v3/mc_contacts/model_list_export_contact_200_response_result_inner__metadata.go create mode 100644 rest/api/v3/mc_contacts/model_list_export_contact_200_response_result_inner_segments_inner.go create mode 100644 rest/api/v3/mc_contacts/model_list_export_contact_400_response.go create mode 100644 rest/api/v3/mc_contacts/model_list_export_contact_400_response_errors_inner.go create mode 100644 rest/api/v3/mc_contacts/model_metadata.go create mode 100644 rest/api/v3/mc_contacts/model_search_contact_200_response.go create mode 100644 rest/api/v3/mc_contacts/model_search_contact_400_response.go create mode 100644 rest/api/v3/mc_contacts/model_search_contact_400_response_errors_inner.go create mode 100644 rest/api/v3/mc_contacts/model_search_contact_500_response.go create mode 100644 rest/api/v3/mc_contacts/model_search_contact_500_response_errors_inner.go create mode 100644 rest/api/v3/mc_contacts/model_search_contact_request.go create mode 100644 rest/api/v3/mc_contacts/model_self_metadata.go create mode 100644 rest/api/v3/mc_contacts/model_status.go create mode 100644 rest/api/v3/mc_contacts/model_update_contact_202_response.go create mode 100644 rest/api/v3/mc_contacts/model_update_contact_request.go create mode 100644 rest/api/v3/mc_custom_fields/.openapi-generator rename rest/api/v3/{sso => mc_custom_fields}/.openapi-generator-ignore (100%) create mode 100644 rest/api/v3/mc_custom_fields/README.md create mode 100644 rest/api/v3/mc_custom_fields/api_create_field_definition.go create mode 100644 rest/api/v3/mc_custom_fields/api_delete_field_definition.go create mode 100644 rest/api/v3/mc_custom_fields/api_list_field_definition.go create mode 100644 rest/api/v3/mc_custom_fields/api_service.go create mode 100644 rest/api/v3/mc_custom_fields/api_update_field_definition.go create mode 100644 rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition.md create mode 100644 rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition200Response.md create mode 100644 rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition400Response.md create mode 100644 rest/api/v3/mc_custom_fields/docs/CreateFieldDefinitionRequest.md create mode 100644 rest/api/v3/mc_custom_fields/docs/CustomFieldDefinitionsResponse.md create mode 100644 rest/api/v3/mc_custom_fields/docs/CustomFieldsError.md rename rest/api/v3/{sso/docs/DeleteSsoIntegration.md => mc_custom_fields/docs/DeleteFieldDefinition.md} (59%) rename rest/api/v3/{stats/docs/AggregatedBy1.md => mc_custom_fields/docs/FieldType.md} (64%) create mode 100644 rest/api/v3/mc_custom_fields/docs/FieldType1.md create mode 100644 rest/api/v3/mc_custom_fields/docs/FieldType2.md create mode 100644 rest/api/v3/mc_custom_fields/docs/ListFieldDefinition.md create mode 100644 rest/api/v3/mc_custom_fields/docs/ListFieldDefinition200Response.md rename rest/api/v3/{mc_designs => mc_custom_fields}/docs/Metadata.md (100%) create mode 100644 rest/api/v3/mc_custom_fields/docs/ReservedFieldDefinitionsResponseInner.md rename rest/api/v3/{sso/docs/UpdateSsoCertificate.md => mc_custom_fields/docs/UpdateFieldDefinition.md} (50%) create mode 100644 rest/api/v3/mc_custom_fields/docs/UpdateFieldDefinitionRequest.md create mode 100644 rest/api/v3/mc_custom_fields/model_create_field_definition_200_response.go create mode 100644 rest/api/v3/mc_custom_fields/model_create_field_definition_400_response.go create mode 100644 rest/api/v3/mc_custom_fields/model_create_field_definition_request.go create mode 100644 rest/api/v3/mc_custom_fields/model_custom_field_definitions_response.go create mode 100644 rest/api/v3/mc_custom_fields/model_custom_fields_error.go create mode 100644 rest/api/v3/mc_custom_fields/model_field_type.go create mode 100644 rest/api/v3/mc_custom_fields/model_field_type1.go create mode 100644 rest/api/v3/mc_custom_fields/model_field_type2.go create mode 100644 rest/api/v3/mc_custom_fields/model_list_field_definition_200_response.go create mode 100644 rest/api/v3/mc_custom_fields/model_metadata.go create mode 100644 rest/api/v3/mc_custom_fields/model_reserved_field_definitions_response_inner.go create mode 100644 rest/api/v3/mc_custom_fields/model_update_field_definition_request.go delete mode 100644 rest/api/v3/mc_designs/.openapi-generator delete mode 100644 rest/api/v3/mc_designs/README.md delete mode 100644 rest/api/v3/mc_designs/api_create_design.go delete mode 100644 rest/api/v3/mc_designs/api_delete_design.go delete mode 100644 rest/api/v3/mc_designs/api_duplicate_design.go delete mode 100644 rest/api/v3/mc_designs/api_duplicate_pre_built_design.go delete mode 100644 rest/api/v3/mc_designs/api_get_design.go delete mode 100644 rest/api/v3/mc_designs/api_get_pre_built_design.go delete mode 100644 rest/api/v3/mc_designs/api_list_design.go delete mode 100644 rest/api/v3/mc_designs/api_list_pre_built_design.go delete mode 100644 rest/api/v3/mc_designs/api_service.go delete mode 100644 rest/api/v3/mc_designs/api_update_design.go delete mode 100644 rest/api/v3/mc_designs/docs/CreateDesign.md delete mode 100644 rest/api/v3/mc_designs/docs/DesignCommonProperties.md delete mode 100644 rest/api/v3/mc_designs/docs/DesignInput.md delete mode 100644 rest/api/v3/mc_designs/docs/DesignOutput.md delete mode 100644 rest/api/v3/mc_designs/docs/DesignOutputSummary.md delete mode 100644 rest/api/v3/mc_designs/docs/DuplicateDesign.md delete mode 100644 rest/api/v3/mc_designs/docs/DuplicatePreBuiltDesign.md delete mode 100644 rest/api/v3/mc_designs/docs/GetPreBuiltDesign.md delete mode 100644 rest/api/v3/mc_designs/docs/ListDesign.md delete mode 100644 rest/api/v3/mc_designs/docs/ListPreBuiltDesign.md delete mode 100644 rest/api/v3/mc_designs/docs/UpdateDesign.md delete mode 100644 rest/api/v3/mc_designs/docs/UpdateDesignRequest.md delete mode 100644 rest/api/v3/mc_designs/model_api_error.go delete mode 100644 rest/api/v3/mc_designs/model_api_errors.go delete mode 100644 rest/api/v3/mc_designs/model_design_common_properties.go delete mode 100644 rest/api/v3/mc_designs/model_design_duplicate_input.go delete mode 100644 rest/api/v3/mc_designs/model_design_input.go delete mode 100644 rest/api/v3/mc_designs/model_design_output.go delete mode 100644 rest/api/v3/mc_designs/model_design_output_summary.go delete mode 100644 rest/api/v3/mc_designs/model_editor.go delete mode 100644 rest/api/v3/mc_designs/model_list_design_200_response.go delete mode 100644 rest/api/v3/mc_designs/model_metadata.go delete mode 100644 rest/api/v3/mc_designs/model_update_design_request.go create mode 100644 rest/api/v3/mc_stats/.openapi-generator rename rest/api/v3/{stats => mc_stats}/.openapi-generator-ignore (100%) create mode 100644 rest/api/v3/mc_stats/README.md create mode 100644 rest/api/v3/mc_stats/api_export_automation_stat.go create mode 100644 rest/api/v3/mc_stats/api_export_single_send_stat.go create mode 100644 rest/api/v3/mc_stats/api_get_automation_stat.go create mode 100644 rest/api/v3/mc_stats/api_get_single_send_stat.go create mode 100644 rest/api/v3/mc_stats/api_list_automation_stat.go create mode 100644 rest/api/v3/mc_stats/api_list_click_tracking_stat.go create mode 100644 rest/api/v3/mc_stats/api_list_single_send_stat.go create mode 100644 rest/api/v3/mc_stats/api_list_single_send_tracking_stat.go create mode 100644 rest/api/v3/mc_stats/api_service.go create mode 100644 rest/api/v3/mc_stats/docs/AbPhase.md create mode 100644 rest/api/v3/mc_stats/docs/AbPhase1.md rename rest/api/v3/{stats/docs/SortByDirection.md => mc_stats/docs/AbPhaseId.md} (72%) rename rest/api/v3/{stats => mc_stats}/docs/AggregatedBy.md (78%) create mode 100644 rest/api/v3/mc_stats/docs/AutmoationsLinkStatsResponse.md create mode 100644 rest/api/v3/mc_stats/docs/AutmoationsLinkStatsResponseResultsInner.md rename rest/api/v3/{mc_designs/docs/ListDesign200Response.md => mc_stats/docs/AutomationsResponse.md} (74%) create mode 100644 rest/api/v3/mc_stats/docs/AutomationsResponseResultsInner.md create mode 100644 rest/api/v3/mc_stats/docs/ErrorResponse.md create mode 100644 rest/api/v3/mc_stats/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/mc_stats/docs/ExportAutomationStat.md create mode 100644 rest/api/v3/mc_stats/docs/ExportSingleSendStat.md create mode 100644 rest/api/v3/mc_stats/docs/GetAutomationStat.md create mode 100644 rest/api/v3/mc_stats/docs/GetSingleSendStat.md rename rest/api/v3/{sso/docs/PermissionType.md => mc_stats/docs/Items.md} (69%) create mode 100644 rest/api/v3/mc_stats/docs/Items1.md create mode 100644 rest/api/v3/mc_stats/docs/Items2.md create mode 100644 rest/api/v3/mc_stats/docs/LinkTrackingMetadata.md create mode 100644 rest/api/v3/mc_stats/docs/ListAutomationStat.md create mode 100644 rest/api/v3/mc_stats/docs/ListClickTrackingStat.md create mode 100644 rest/api/v3/mc_stats/docs/ListSingleSendStat.md create mode 100644 rest/api/v3/mc_stats/docs/ListSingleSendTrackingStat.md create mode 100644 rest/api/v3/mc_stats/docs/Metadata.md create mode 100644 rest/api/v3/mc_stats/docs/Metrics.md create mode 100644 rest/api/v3/mc_stats/docs/SinglesendsLinkStatsResponse.md create mode 100644 rest/api/v3/mc_stats/docs/SinglesendsLinkStatsResponseResultsInner.md create mode 100644 rest/api/v3/mc_stats/docs/SinglesendsResponse.md create mode 100644 rest/api/v3/mc_stats/docs/SinglesendsResponseResultsInner.md create mode 100644 rest/api/v3/mc_stats/model_ab_phase.go create mode 100644 rest/api/v3/mc_stats/model_ab_phase1.go create mode 100644 rest/api/v3/mc_stats/model_ab_phase_id.go create mode 100644 rest/api/v3/mc_stats/model_aggregated_by.go create mode 100644 rest/api/v3/mc_stats/model_autmoations_link_stats_response.go create mode 100644 rest/api/v3/mc_stats/model_autmoations_link_stats_response_results_inner.go create mode 100644 rest/api/v3/mc_stats/model_automations_response.go create mode 100644 rest/api/v3/mc_stats/model_automations_response_results_inner.go create mode 100644 rest/api/v3/mc_stats/model_error_response.go create mode 100644 rest/api/v3/mc_stats/model_error_response_errors_inner.go create mode 100644 rest/api/v3/mc_stats/model_items.go create mode 100644 rest/api/v3/mc_stats/model_items1.go create mode 100644 rest/api/v3/mc_stats/model_items2.go create mode 100644 rest/api/v3/mc_stats/model_link_tracking_metadata.go create mode 100644 rest/api/v3/mc_stats/model_metadata.go create mode 100644 rest/api/v3/mc_stats/model_metrics.go create mode 100644 rest/api/v3/mc_stats/model_singlesends_link_stats_response.go create mode 100644 rest/api/v3/mc_stats/model_singlesends_link_stats_response_results_inner.go create mode 100644 rest/api/v3/mc_stats/model_singlesends_response.go create mode 100644 rest/api/v3/mc_stats/model_singlesends_response_results_inner.go create mode 100644 rest/api/v3/scopes/.openapi-generator create mode 100644 rest/api/v3/scopes/.openapi-generator-ignore create mode 100644 rest/api/v3/scopes/README.md create mode 100644 rest/api/v3/scopes/api_approve_scope_request.go create mode 100644 rest/api/v3/scopes/api_deny_scope_request.go create mode 100644 rest/api/v3/scopes/api_list_scope.go create mode 100644 rest/api/v3/scopes/api_list_scope_request.go create mode 100644 rest/api/v3/scopes/api_service.go rename rest/api/v3/{mc_designs/docs/GetDesign.md => scopes/docs/ApproveScopeRequest.md} (54%) create mode 100644 rest/api/v3/scopes/docs/ApproveScopeRequest200Response.md rename rest/api/v3/{mc_designs/docs/DeleteDesign.md => scopes/docs/DenyScopeRequest.md} (59%) create mode 100644 rest/api/v3/scopes/docs/DenyScopeRequest404Response.md create mode 100644 rest/api/v3/scopes/docs/DenyScopeRequest404ResponseErrorsInner.md create mode 100644 rest/api/v3/scopes/docs/ErrorResponse.md create mode 100644 rest/api/v3/scopes/docs/ErrorResponseErrorsInner.md rename rest/api/v3/{stats/docs/ListCategoryStatSum.md => scopes/docs/ListScope.md} (51%) create mode 100644 rest/api/v3/scopes/docs/ListScope200Response.md create mode 100644 rest/api/v3/scopes/docs/ListScope401Response.md create mode 100644 rest/api/v3/scopes/docs/ListScope401ResponseErrorsInner.md create mode 100644 rest/api/v3/scopes/docs/ListScopeRequest.md create mode 100644 rest/api/v3/scopes/docs/ListScopeRequest200ResponseInner.md create mode 100644 rest/api/v3/scopes/model_approve_scope_request_200_response.go create mode 100644 rest/api/v3/scopes/model_deny_scope_request_404_response.go create mode 100644 rest/api/v3/scopes/model_deny_scope_request_404_response_errors_inner.go create mode 100644 rest/api/v3/scopes/model_error_response.go create mode 100644 rest/api/v3/scopes/model_error_response_errors_inner.go create mode 100644 rest/api/v3/scopes/model_list_scope_200_response.go create mode 100644 rest/api/v3/scopes/model_list_scope_401_response.go create mode 100644 rest/api/v3/scopes/model_list_scope_401_response_errors_inner.go create mode 100644 rest/api/v3/scopes/model_list_scope_request_200_response_inner.go delete mode 100644 rest/api/v3/sso/.openapi-generator delete mode 100644 rest/api/v3/sso/README.md delete mode 100644 rest/api/v3/sso/api_create_sso_certificate.go delete mode 100644 rest/api/v3/sso/api_create_sso_integration.go delete mode 100644 rest/api/v3/sso/api_create_sso_teammate.go delete mode 100644 rest/api/v3/sso/api_delete_sso_certificate.go delete mode 100644 rest/api/v3/sso/api_delete_sso_integration.go delete mode 100644 rest/api/v3/sso/api_get_sso_certificate.go delete mode 100644 rest/api/v3/sso/api_get_sso_integration.go delete mode 100644 rest/api/v3/sso/api_list_sso_integration.go delete mode 100644 rest/api/v3/sso/api_list_sso_integration_certificate.go delete mode 100644 rest/api/v3/sso/api_service.go delete mode 100644 rest/api/v3/sso/api_update_sso_certificate.go delete mode 100644 rest/api/v3/sso/api_update_sso_integration.go delete mode 100644 rest/api/v3/sso/api_update_sso_teammate.go delete mode 100644 rest/api/v3/sso/docs/CreateSsoCertificate.md delete mode 100644 rest/api/v3/sso/docs/CreateSsoCertificateRequest.md delete mode 100644 rest/api/v3/sso/docs/CreateSsoIntegration.md delete mode 100644 rest/api/v3/sso/docs/CreateSsoTeammate.md delete mode 100644 rest/api/v3/sso/docs/ListSsoIntegration.md delete mode 100644 rest/api/v3/sso/docs/ListSsoIntegrationCertificate.md delete mode 100644 rest/api/v3/sso/docs/PatchSsoTeammates200.md delete mode 100644 rest/api/v3/sso/docs/PostPatchIntegrationRequest.md delete mode 100644 rest/api/v3/sso/docs/PostSsoTeammates201.md delete mode 100644 rest/api/v3/sso/docs/PostSsoTeammatesRequest.md delete mode 100644 rest/api/v3/sso/docs/SsoCertificateBody.md delete mode 100644 rest/api/v3/sso/docs/SsoIntegration.md delete mode 100644 rest/api/v3/sso/docs/SsoTeammatesBaseRequestProps.md delete mode 100644 rest/api/v3/sso/docs/SsoTeammatesBaseRequestPropsSubuserAccessInner.md delete mode 100644 rest/api/v3/sso/docs/SsoTeammatesBaseResponseProps.md delete mode 100644 rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponseProps.md delete mode 100644 rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md delete mode 100644 rest/api/v3/sso/docs/UpdateSsoCertificateRequest.md delete mode 100644 rest/api/v3/sso/docs/UpdateSsoIntegration.md delete mode 100644 rest/api/v3/sso/docs/UpdateSsoTeammate.md delete mode 100644 rest/api/v3/sso/model_create_sso_certificate_request.go delete mode 100644 rest/api/v3/sso/model_patch_sso_teammates200.go delete mode 100644 rest/api/v3/sso/model_permission_type.go delete mode 100644 rest/api/v3/sso/model_permission_type1.go delete mode 100644 rest/api/v3/sso/model_persona.go delete mode 100644 rest/api/v3/sso/model_post_patch_integration_request.go delete mode 100644 rest/api/v3/sso/model_post_sso_teammates201.go delete mode 100644 rest/api/v3/sso/model_post_sso_teammates_request.go delete mode 100644 rest/api/v3/sso/model_sso_certificate_body.go delete mode 100644 rest/api/v3/sso/model_sso_error_response_inner.go delete mode 100644 rest/api/v3/sso/model_sso_integration.go delete mode 100644 rest/api/v3/sso/model_sso_teammates_base_request_props.go delete mode 100644 rest/api/v3/sso/model_sso_teammates_base_request_props_subuser_access_inner.go delete mode 100644 rest/api/v3/sso/model_sso_teammates_base_response_props.go delete mode 100644 rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props.go delete mode 100644 rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props_subuser_access_inner.go delete mode 100644 rest/api/v3/sso/model_update_sso_certificate_request.go delete mode 100644 rest/api/v3/sso/model_user_type.go delete mode 100644 rest/api/v3/stats/.openapi-generator delete mode 100644 rest/api/v3/stats/README.md delete mode 100644 rest/api/v3/stats/api_get_client_stat.go delete mode 100644 rest/api/v3/stats/api_list_browser_stat.go delete mode 100644 rest/api/v3/stats/api_list_category.go delete mode 100644 rest/api/v3/stats/api_list_category_stat.go delete mode 100644 rest/api/v3/stats/api_list_category_stat_sum.go delete mode 100644 rest/api/v3/stats/api_list_client_stat.go delete mode 100644 rest/api/v3/stats/api_list_device_stat.go delete mode 100644 rest/api/v3/stats/api_list_geo_stat.go delete mode 100644 rest/api/v3/stats/api_list_mailbox_provider_stat.go delete mode 100644 rest/api/v3/stats/api_list_stat.go delete mode 100644 rest/api/v3/stats/api_service.go delete mode 100644 rest/api/v3/stats/docs/AdvancedStatsClicks.md delete mode 100644 rest/api/v3/stats/docs/AdvancedStatsClicksOpens.md delete mode 100644 rest/api/v3/stats/docs/AdvancedStatsMailboxProvider.md delete mode 100644 rest/api/v3/stats/docs/AdvancedStatsOpens.md delete mode 100644 rest/api/v3/stats/docs/AggregatedBy2.md delete mode 100644 rest/api/v3/stats/docs/AggregatedBy3.md delete mode 100644 rest/api/v3/stats/docs/CategoryStats.md delete mode 100644 rest/api/v3/stats/docs/CategoryStatsStatsInner.md delete mode 100644 rest/api/v3/stats/docs/CategoryStatsStatsInnerMetrics.md delete mode 100644 rest/api/v3/stats/docs/ClientType.md delete mode 100644 rest/api/v3/stats/docs/GetClientStat.md delete mode 100644 rest/api/v3/stats/docs/ListBrowserStat.md delete mode 100644 rest/api/v3/stats/docs/ListBrowserStat200ResponseInner.md delete mode 100644 rest/api/v3/stats/docs/ListBrowserStat200ResponseInnerStatsInner.md delete mode 100644 rest/api/v3/stats/docs/ListCategory400Response.md delete mode 100644 rest/api/v3/stats/docs/ListCategory400ResponseErrorsInner.md delete mode 100644 rest/api/v3/stats/docs/ListClientStat200ResponseInner.md delete mode 100644 rest/api/v3/stats/docs/ListClientStat200ResponseInnerStatsInner.md delete mode 100644 rest/api/v3/stats/docs/ListDeviceStat.md delete mode 100644 rest/api/v3/stats/docs/ListGeoStat.md delete mode 100644 rest/api/v3/stats/docs/ListGeoStat200ResponseInner.md delete mode 100644 rest/api/v3/stats/docs/ListGeoStat200ResponseInnerStatsInner.md delete mode 100644 rest/api/v3/stats/docs/ListMailboxProviderStat.md delete mode 100644 rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInner.md delete mode 100644 rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInnerStatsInner.md delete mode 100644 rest/api/v3/stats/docs/ListStat200ResponseInner.md delete mode 100644 rest/api/v3/stats/docs/StatsAdvancedGlobalStats.md delete mode 100644 rest/api/v3/stats/model_advanced_stats_clicks.go delete mode 100644 rest/api/v3/stats/model_advanced_stats_clicks_opens.go delete mode 100644 rest/api/v3/stats/model_advanced_stats_mailbox_provider.go delete mode 100644 rest/api/v3/stats/model_advanced_stats_opens.go delete mode 100644 rest/api/v3/stats/model_aggregated_by.go delete mode 100644 rest/api/v3/stats/model_aggregated_by1.go delete mode 100644 rest/api/v3/stats/model_aggregated_by2.go delete mode 100644 rest/api/v3/stats/model_aggregated_by3.go delete mode 100644 rest/api/v3/stats/model_category_stats.go delete mode 100644 rest/api/v3/stats/model_category_stats_stats_inner.go delete mode 100644 rest/api/v3/stats/model_category_stats_stats_inner_metrics.go delete mode 100644 rest/api/v3/stats/model_client_type.go delete mode 100644 rest/api/v3/stats/model_country.go delete mode 100644 rest/api/v3/stats/model_list_browser_stat_200_response_inner.go delete mode 100644 rest/api/v3/stats/model_list_browser_stat_200_response_inner_stats_inner.go delete mode 100644 rest/api/v3/stats/model_list_category_200_response_inner.go delete mode 100644 rest/api/v3/stats/model_list_category_400_response.go delete mode 100644 rest/api/v3/stats/model_list_category_400_response_errors_inner.go delete mode 100644 rest/api/v3/stats/model_list_client_stat_200_response_inner.go delete mode 100644 rest/api/v3/stats/model_list_client_stat_200_response_inner_stats_inner.go delete mode 100644 rest/api/v3/stats/model_list_geo_stat_200_response_inner.go delete mode 100644 rest/api/v3/stats/model_list_geo_stat_200_response_inner_stats_inner.go delete mode 100644 rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner.go delete mode 100644 rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner_stats_inner.go delete mode 100644 rest/api/v3/stats/model_list_stat_200_response_inner.go delete mode 100644 rest/api/v3/stats/model_list_stat_200_response_inner_stats_inner.go delete mode 100644 rest/api/v3/stats/model_sort_by_direction.go delete mode 100644 rest/api/v3/stats/model_stats_advanced_global_stats.go create mode 100644 rest/api/v3/suppressions/.openapi-generator create mode 100644 rest/api/v3/suppressions/.openapi-generator-ignore create mode 100644 rest/api/v3/suppressions/README.md create mode 100644 rest/api/v3/suppressions/api_add_suppression_to_asm_group.go create mode 100644 rest/api/v3/suppressions/api_creat_asm_group.go create mode 100644 rest/api/v3/suppressions/api_create_global_suppression.go create mode 100644 rest/api/v3/suppressions/api_delete_asm_group.go create mode 100644 rest/api/v3/suppressions/api_delete_global_suppression.go create mode 100644 rest/api/v3/suppressions/api_delete_invalid_email.go create mode 100644 rest/api/v3/suppressions/api_delete_invalid_emails.go create mode 100644 rest/api/v3/suppressions/api_delete_spam_report.go create mode 100644 rest/api/v3/suppressions/api_delete_spam_reports.go create mode 100644 rest/api/v3/suppressions/api_delete_suppression_block.go create mode 100644 rest/api/v3/suppressions/api_delete_suppression_blocks.go create mode 100644 rest/api/v3/suppressions/api_delete_suppression_bounce.go create mode 100644 rest/api/v3/suppressions/api_delete_suppression_bounces.go create mode 100644 rest/api/v3/suppressions/api_delete_suppression_from_asm_group.go create mode 100644 rest/api/v3/suppressions/api_get_asm_group.go create mode 100644 rest/api/v3/suppressions/api_get_asm_suppression.go create mode 100644 rest/api/v3/suppressions/api_get_global_suppression.go create mode 100644 rest/api/v3/suppressions/api_get_invalid_email.go create mode 100644 rest/api/v3/suppressions/api_get_spam_report.go create mode 100644 rest/api/v3/suppressions/api_get_suppression_block.go create mode 100644 rest/api/v3/suppressions/api_get_suppression_bounces.go create mode 100644 rest/api/v3/suppressions/api_get_suppression_bounces_classifications.go create mode 100644 rest/api/v3/suppressions/api_list_asm_group.go create mode 100644 rest/api/v3/suppressions/api_list_asm_suppression.go create mode 100644 rest/api/v3/suppressions/api_list_global_suppression.go create mode 100644 rest/api/v3/suppressions/api_list_invalid_email.go create mode 100644 rest/api/v3/suppressions/api_list_spam_report.go create mode 100644 rest/api/v3/suppressions/api_list_suppression_block.go create mode 100644 rest/api/v3/suppressions/api_list_suppression_bounces.go create mode 100644 rest/api/v3/suppressions/api_list_suppression_bounces_classifications.go create mode 100644 rest/api/v3/suppressions/api_list_suppression_from_asm_group.go create mode 100644 rest/api/v3/suppressions/api_search_suppression_from_asm_group.go create mode 100644 rest/api/v3/suppressions/api_service.go create mode 100644 rest/api/v3/suppressions/api_update_asm_group.go rename rest/api/v3/{sso/docs/PermissionType1.md => suppressions/docs/Accept.md} (67%) create mode 100644 rest/api/v3/suppressions/docs/Accept1.md create mode 100644 rest/api/v3/suppressions/docs/AddSuppressionToAsmGroup.md create mode 100644 rest/api/v3/suppressions/docs/AddSuppressionToAsmGroup201Response.md create mode 100644 rest/api/v3/suppressions/docs/BlocksResponseInner.md create mode 100644 rest/api/v3/suppressions/docs/BounceResponse.md create mode 100644 rest/api/v3/suppressions/docs/Classification.md create mode 100644 rest/api/v3/suppressions/docs/Classification1.md create mode 100644 rest/api/v3/suppressions/docs/CreatAsmGroup.md create mode 100644 rest/api/v3/suppressions/docs/CreatAsmGroup201Response.md create mode 100644 rest/api/v3/suppressions/docs/CreateGlobalSuppression.md create mode 100644 rest/api/v3/suppressions/docs/CreateGlobalSuppression201Response.md create mode 100644 rest/api/v3/suppressions/docs/DeleteAsmGroup.md create mode 100644 rest/api/v3/suppressions/docs/DeleteGlobalSuppression.md create mode 100644 rest/api/v3/suppressions/docs/DeleteInvalidEmail.md create mode 100644 rest/api/v3/suppressions/docs/DeleteInvalidEmails.md create mode 100644 rest/api/v3/suppressions/docs/DeleteInvalidEmailsRequest.md create mode 100644 rest/api/v3/suppressions/docs/DeleteSpamReport.md create mode 100644 rest/api/v3/suppressions/docs/DeleteSpamReports.md create mode 100644 rest/api/v3/suppressions/docs/DeleteSpamReportsRequest.md create mode 100644 rest/api/v3/suppressions/docs/DeleteSuppressionBlock.md create mode 100644 rest/api/v3/suppressions/docs/DeleteSuppressionBlocks.md create mode 100644 rest/api/v3/suppressions/docs/DeleteSuppressionBlocksRequest.md create mode 100644 rest/api/v3/suppressions/docs/DeleteSuppressionBounce.md create mode 100644 rest/api/v3/suppressions/docs/DeleteSuppressionBounces.md create mode 100644 rest/api/v3/suppressions/docs/DeleteSuppressionBouncesRequest.md create mode 100644 rest/api/v3/suppressions/docs/DeleteSuppressionFromAsmGroup.md create mode 100644 rest/api/v3/suppressions/docs/ErrorResponse.md create mode 100644 rest/api/v3/suppressions/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/suppressions/docs/GetAsmGroup.md create mode 100644 rest/api/v3/suppressions/docs/GetAsmGroup200Response.md create mode 100644 rest/api/v3/suppressions/docs/GetAsmSuppression.md create mode 100644 rest/api/v3/suppressions/docs/GetAsmSuppression200Response.md create mode 100644 rest/api/v3/suppressions/docs/GetAsmSuppression200ResponseSuppressionsInner.md create mode 100644 rest/api/v3/suppressions/docs/GetGlobalSuppression.md create mode 100644 rest/api/v3/suppressions/docs/GetInvalidEmail.md create mode 100644 rest/api/v3/suppressions/docs/GetSpamReport.md create mode 100644 rest/api/v3/suppressions/docs/GetSuppressionBlock.md create mode 100644 rest/api/v3/suppressions/docs/GetSuppressionBounces.md create mode 100644 rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications.md create mode 100644 rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications200Response.md create mode 100644 rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications200ResponseResultInner.md create mode 100644 rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications200ResponseResultInnerStatsInner.md create mode 100644 rest/api/v3/suppressions/docs/InvalidEmail.md rename rest/api/v3/{stats/docs/ListCategoryStat.md => suppressions/docs/ListAsmGroup.md} (60%) rename rest/api/v3/{stats/docs/ListStat.md => suppressions/docs/ListAsmSuppression.md} (56%) create mode 100644 rest/api/v3/suppressions/docs/ListAsmSuppression200ResponseInner.md create mode 100644 rest/api/v3/suppressions/docs/ListGlobalSuppression.md create mode 100644 rest/api/v3/suppressions/docs/ListGlobalSuppression200ResponseInner.md rename rest/api/v3/{stats/docs/ListCategory.md => suppressions/docs/ListInvalidEmail.md} (62%) create mode 100644 rest/api/v3/suppressions/docs/ListSpamReport.md create mode 100644 rest/api/v3/suppressions/docs/ListSuppressionBlock.md create mode 100644 rest/api/v3/suppressions/docs/ListSuppressionBounces.md rename rest/api/v3/{stats/docs/ListClientStat.md => suppressions/docs/ListSuppressionBouncesClassifications.md} (50%) create mode 100644 rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications200Response.md create mode 100644 rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications200ResponseResultInner.md create mode 100644 rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications200ResponseResultInnerStatsInner.md create mode 100644 rest/api/v3/suppressions/docs/ListSuppressionFromAsmGroup.md rename rest/api/v3/{mc_designs/docs/DesignDuplicateInput.md => suppressions/docs/RetrieveAGlobalSuppressionResponse.md} (55%) create mode 100644 rest/api/v3/suppressions/docs/SearchSuppressionFromAsmGroup.md create mode 100644 rest/api/v3/suppressions/docs/SpamReportsResponseInner.md create mode 100644 rest/api/v3/suppressions/docs/SuppressionGroup.md create mode 100644 rest/api/v3/suppressions/docs/SuppressionGroupRequestBaseProps.md create mode 100644 rest/api/v3/suppressions/docs/SuppressionsRequest.md create mode 100644 rest/api/v3/suppressions/docs/UpdateAsmGroup.md create mode 100644 rest/api/v3/suppressions/docs/UpdateAsmGroupRequest.md create mode 100644 rest/api/v3/suppressions/model_accept.go create mode 100644 rest/api/v3/suppressions/model_accept1.go create mode 100644 rest/api/v3/suppressions/model_add_suppression_to_asm_group_201_response.go create mode 100644 rest/api/v3/suppressions/model_blocks_response_inner.go create mode 100644 rest/api/v3/suppressions/model_bounce_response.go create mode 100644 rest/api/v3/suppressions/model_classification.go create mode 100644 rest/api/v3/suppressions/model_classification1.go create mode 100644 rest/api/v3/suppressions/model_creat_asm_group_201_response.go create mode 100644 rest/api/v3/suppressions/model_create_global_suppression_201_response.go create mode 100644 rest/api/v3/suppressions/model_delete_invalid_emails_request.go create mode 100644 rest/api/v3/suppressions/model_delete_spam_reports_request.go create mode 100644 rest/api/v3/suppressions/model_delete_suppression_blocks_request.go create mode 100644 rest/api/v3/suppressions/model_delete_suppression_bounces_request.go create mode 100644 rest/api/v3/suppressions/model_error_response.go create mode 100644 rest/api/v3/suppressions/model_error_response_errors_inner.go create mode 100644 rest/api/v3/suppressions/model_get_asm_group_200_response.go create mode 100644 rest/api/v3/suppressions/model_get_asm_suppression_200_response.go create mode 100644 rest/api/v3/suppressions/model_get_asm_suppression_200_response_suppressions_inner.go create mode 100644 rest/api/v3/suppressions/model_get_suppression_bounces_classifications_200_response.go create mode 100644 rest/api/v3/suppressions/model_get_suppression_bounces_classifications_200_response_result_inner.go create mode 100644 rest/api/v3/suppressions/model_get_suppression_bounces_classifications_200_response_result_inner_stats_inner.go create mode 100644 rest/api/v3/suppressions/model_invalid_email.go create mode 100644 rest/api/v3/suppressions/model_list_asm_suppression_200_response_inner.go create mode 100644 rest/api/v3/suppressions/model_list_global_suppression_200_response_inner.go create mode 100644 rest/api/v3/suppressions/model_list_suppression_bounces_classifications_200_response.go create mode 100644 rest/api/v3/suppressions/model_list_suppression_bounces_classifications_200_response_result_inner.go create mode 100644 rest/api/v3/suppressions/model_list_suppression_bounces_classifications_200_response_result_inner_stats_inner.go create mode 100644 rest/api/v3/suppressions/model_retrieve_a_global_suppression_response.go create mode 100644 rest/api/v3/suppressions/model_spam_reports_response_inner.go create mode 100644 rest/api/v3/suppressions/model_suppression_group.go create mode 100644 rest/api/v3/suppressions/model_suppression_group_request_base_props.go create mode 100644 rest/api/v3/suppressions/model_suppressions_request.go create mode 100644 rest/api/v3/suppressions/model_update_asm_group_request.go create mode 100644 rest/api/v3/user/.openapi-generator create mode 100644 rest/api/v3/user/.openapi-generator-ignore create mode 100644 rest/api/v3/user/README.md create mode 100644 rest/api/v3/user/api_list_account.go create mode 100644 rest/api/v3/user/api_list_credit.go create mode 100644 rest/api/v3/user/api_list_email.go create mode 100644 rest/api/v3/user/api_list_profile.go create mode 100644 rest/api/v3/user/api_list_username.go create mode 100644 rest/api/v3/user/api_service.go create mode 100644 rest/api/v3/user/api_update_email.go create mode 100644 rest/api/v3/user/api_update_password.go create mode 100644 rest/api/v3/user/api_update_profile.go create mode 100644 rest/api/v3/user/api_update_username.go create mode 100644 rest/api/v3/user/docs/ErrorResponse.md create mode 100644 rest/api/v3/user/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/user/docs/GETUserAccountResponse.md create mode 100644 rest/api/v3/user/docs/GETUserProfileResponse.md create mode 100644 rest/api/v3/user/docs/ListAccount.md create mode 100644 rest/api/v3/user/docs/ListCredit.md create mode 100644 rest/api/v3/user/docs/ListCredit200Response.md create mode 100644 rest/api/v3/user/docs/ListEmail.md create mode 100644 rest/api/v3/user/docs/ListEmail200Response.md create mode 100644 rest/api/v3/user/docs/ListProfile.md create mode 100644 rest/api/v3/user/docs/ListUsername.md create mode 100644 rest/api/v3/user/docs/ListUsername200Response.md create mode 100644 rest/api/v3/user/docs/Type.md create mode 100644 rest/api/v3/user/docs/UpdateEmail.md create mode 100644 rest/api/v3/user/docs/UpdateEmail200Response.md create mode 100644 rest/api/v3/user/docs/UpdateEmailRequest.md create mode 100644 rest/api/v3/user/docs/UpdatePassword.md create mode 100644 rest/api/v3/user/docs/UpdatePasswordRequest.md create mode 100644 rest/api/v3/user/docs/UpdateProfile.md create mode 100644 rest/api/v3/user/docs/UpdateUsername.md create mode 100644 rest/api/v3/user/docs/UpdateUsername200Response.md create mode 100644 rest/api/v3/user/docs/UpdateUsernameRequest.md create mode 100644 rest/api/v3/user/docs/UserProfile.md create mode 100644 rest/api/v3/user/model_error_response.go create mode 100644 rest/api/v3/user/model_error_response_errors_inner.go create mode 100644 rest/api/v3/user/model_get_user_account_response.go create mode 100644 rest/api/v3/user/model_get_user_profile_response.go create mode 100644 rest/api/v3/user/model_list_credit_200_response.go create mode 100644 rest/api/v3/user/model_list_email_200_response.go create mode 100644 rest/api/v3/user/model_list_username_200_response.go create mode 100644 rest/api/v3/user/model_type.go create mode 100644 rest/api/v3/user/model_update_email_200_response.go create mode 100644 rest/api/v3/user/model_update_email_request.go create mode 100644 rest/api/v3/user/model_update_password_request.go create mode 100644 rest/api/v3/user/model_update_username_200_response.go create mode 100644 rest/api/v3/user/model_update_username_request.go create mode 100644 rest/api/v3/user/model_user_profile.go create mode 100644 rest/api/v3/verified_senders/.openapi-generator create mode 100644 rest/api/v3/verified_senders/.openapi-generator-ignore create mode 100644 rest/api/v3/verified_senders/README.md create mode 100644 rest/api/v3/verified_senders/api_create_verified_sender.go create mode 100644 rest/api/v3/verified_senders/api_delete_verified_sender.go create mode 100644 rest/api/v3/verified_senders/api_list_verified_sender.go create mode 100644 rest/api/v3/verified_senders/api_list_verified_sender_domain.go create mode 100644 rest/api/v3/verified_senders/api_list_verified_sender_steps_completed.go create mode 100644 rest/api/v3/verified_senders/api_resend_verified_sender.go create mode 100644 rest/api/v3/verified_senders/api_service.go create mode 100644 rest/api/v3/verified_senders/api_update_verified_sender.go create mode 100644 rest/api/v3/verified_senders/api_verify_sender_token.go create mode 100644 rest/api/v3/verified_senders/docs/CreateVerifiedSender.md create mode 100644 rest/api/v3/verified_senders/docs/CreateVerifiedSender400Response.md create mode 100644 rest/api/v3/verified_senders/docs/CreateVerifiedSender400ResponseErrorsInner.md rename rest/api/v3/{sso/docs/GetSsoIntegration.md => verified_senders/docs/DeleteVerifiedSender.md} (54%) create mode 100644 rest/api/v3/verified_senders/docs/DeleteVerifiedSender403Response.md rename rest/api/v3/{mc_designs/docs/ApiError.md => verified_senders/docs/DeleteVerifiedSender403ResponseErrorsInner.md} (88%) create mode 100644 rest/api/v3/verified_senders/docs/DeleteVerifiedSender404Response.md create mode 100644 rest/api/v3/verified_senders/docs/ErrorResponse.md create mode 100644 rest/api/v3/verified_senders/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/verified_senders/docs/ListVerifiedSender.md create mode 100644 rest/api/v3/verified_senders/docs/ListVerifiedSender200Response.md create mode 100644 rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain.md create mode 100644 rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain200Response.md create mode 100644 rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain200ResponseResults.md create mode 100644 rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted.md create mode 100644 rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted200Response.md create mode 100644 rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted200ResponseResults.md create mode 100644 rest/api/v3/verified_senders/docs/ResendVerifiedSender.md create mode 100644 rest/api/v3/verified_senders/docs/UpdateVerifiedSender.md create mode 100644 rest/api/v3/verified_senders/docs/VerifiedSenderRequest.md create mode 100644 rest/api/v3/verified_senders/docs/VerifiedSenderResponse.md rename rest/api/v3/{sso/docs/DeleteSsoCertificate.md => verified_senders/docs/VerifySenderToken.md} (56%) create mode 100644 rest/api/v3/verified_senders/model_create_verified_sender_400_response.go create mode 100644 rest/api/v3/verified_senders/model_create_verified_sender_400_response_errors_inner.go create mode 100644 rest/api/v3/verified_senders/model_delete_verified_sender_403_response.go create mode 100644 rest/api/v3/verified_senders/model_delete_verified_sender_403_response_errors_inner.go create mode 100644 rest/api/v3/verified_senders/model_delete_verified_sender_404_response.go create mode 100644 rest/api/v3/verified_senders/model_error_response.go create mode 100644 rest/api/v3/verified_senders/model_error_response_errors_inner.go create mode 100644 rest/api/v3/verified_senders/model_list_verified_sender_200_response.go create mode 100644 rest/api/v3/verified_senders/model_list_verified_sender_domain_200_response.go create mode 100644 rest/api/v3/verified_senders/model_list_verified_sender_domain_200_response_results.go create mode 100644 rest/api/v3/verified_senders/model_list_verified_sender_steps_completed_200_response.go create mode 100644 rest/api/v3/verified_senders/model_list_verified_sender_steps_completed_200_response_results.go create mode 100644 rest/api/v3/verified_senders/model_verified_sender_request.go create mode 100644 rest/api/v3/verified_senders/model_verified_sender_response.go diff --git a/rest/api/v3/account_provisioning/README.md b/rest/api/v3/account_provisioning/README.md index 8ef85c0a..78c647b4 100644 --- a/rest/api/v3/account_provisioning/README.md +++ b/rest/api/v3/account_provisioning/README.md @@ -9,7 +9,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:43.514185+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:37.555407+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/account_provisioning/api_authenticate_account.go b/rest/api/v3/account_provisioning/api_authenticate_account.go index e5383bab..d131c10e 100644 --- a/rest/api/v3/account_provisioning/api_authenticate_account.go +++ b/rest/api/v3/account_provisioning/api_authenticate_account.go @@ -14,6 +14,7 @@ package openapi import ( + "net/http" "net/url" "strings" @@ -47,5 +48,5 @@ func (c *ApiService) AuthenticateAccount(params *AuthenticateAccountParam) (inte } defer resp.Body.Close() - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/account_provisioning/api_create_account.go b/rest/api/v3/account_provisioning/api_create_account.go index 86290d88..963dd62a 100644 --- a/rest/api/v3/account_provisioning/api_create_account.go +++ b/rest/api/v3/account_provisioning/api_create_account.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -69,5 +70,5 @@ func (c *ApiService) CreateAccount(params *CreateAccountParam) (interface{}, err return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/account_provisioning/api_delete_account.go b/rest/api/v3/account_provisioning/api_delete_account.go index cacc4b80..e01ac89e 100644 --- a/rest/api/v3/account_provisioning/api_delete_account.go +++ b/rest/api/v3/account_provisioning/api_delete_account.go @@ -14,6 +14,7 @@ package openapi import ( + "net/http" "net/url" "strings" @@ -47,5 +48,5 @@ func (c *ApiService) DeleteAccount(params *DeleteAccountParam) (interface{}, err } defer resp.Body.Close() - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/account_provisioning/api_get_account_state.go b/rest/api/v3/account_provisioning/api_get_account_state.go index 621e565a..8f723008 100644 --- a/rest/api/v3/account_provisioning/api_get_account_state.go +++ b/rest/api/v3/account_provisioning/api_get_account_state.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -56,5 +57,5 @@ func (c *ApiService) GetAccountState(params *GetAccountStateParam) (interface{}, return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/account_provisioning/api_list_account.go b/rest/api/v3/account_provisioning/api_list_account.go index 2cb085c6..71dba184 100644 --- a/rest/api/v3/account_provisioning/api_list_account.go +++ b/rest/api/v3/account_provisioning/api_list_account.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -65,5 +66,5 @@ func (c *ApiService) ListAccount(params *ListAccountParam) (interface{}, error) return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/account_provisioning/api_list_account_offering.go b/rest/api/v3/account_provisioning/api_list_account_offering.go index c594e8f3..916500b8 100644 --- a/rest/api/v3/account_provisioning/api_list_account_offering.go +++ b/rest/api/v3/account_provisioning/api_list_account_offering.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -56,5 +57,5 @@ func (c *ApiService) ListAccountOffering(params *ListAccountOfferingParam) (inte return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/account_provisioning/api_list_offering.go b/rest/api/v3/account_provisioning/api_list_offering.go index 07e96bc6..48e4553e 100644 --- a/rest/api/v3/account_provisioning/api_list_offering.go +++ b/rest/api/v3/account_provisioning/api_list_offering.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -44,5 +45,5 @@ func (c *ApiService) ListOffering() (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/account_provisioning/api_update_account_offering.go b/rest/api/v3/account_provisioning/api_update_account_offering.go index c825d25d..1fd7e402 100644 --- a/rest/api/v3/account_provisioning/api_update_account_offering.go +++ b/rest/api/v3/account_provisioning/api_update_account_offering.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -71,5 +72,5 @@ func (c *ApiService) UpdateAccountOffering(params *UpdateAccountOfferingParam) ( return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/account_provisioning/api_update_account_state.go b/rest/api/v3/account_provisioning/api_update_account_state.go index 300491b2..c87093d9 100644 --- a/rest/api/v3/account_provisioning/api_update_account_state.go +++ b/rest/api/v3/account_provisioning/api_update_account_state.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -63,5 +64,5 @@ func (c *ApiService) UpdateAccountState(params *UpdateAccountStateParam) (interf } defer resp.Body.Close() - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/alerts/README.md b/rest/api/v3/alerts/README.md index 2b2b690f..4a3643b5 100644 --- a/rest/api/v3/alerts/README.md +++ b/rest/api/v3/alerts/README.md @@ -9,7 +9,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:43.514404+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:37.549840+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/alerts/api_create_alert.go b/rest/api/v3/alerts/api_create_alert.go index 840688d3..955be858 100644 --- a/rest/api/v3/alerts/api_create_alert.go +++ b/rest/api/v3/alerts/api_create_alert.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -77,5 +78,5 @@ func (c *ApiService) CreateAlert(params *CreateAlertParam) (interface{}, error) return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/alerts/api_delete_alert.go b/rest/api/v3/alerts/api_delete_alert.go index c3b11758..1592a253 100644 --- a/rest/api/v3/alerts/api_delete_alert.go +++ b/rest/api/v3/alerts/api_delete_alert.go @@ -15,6 +15,7 @@ package openapi import ( "fmt" + "net/http" "net/url" "strings" @@ -57,5 +58,5 @@ func (c *ApiService) DeleteAlert(params *DeleteAlertParam) (interface{}, error) } defer resp.Body.Close() - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/alerts/api_get_alert.go b/rest/api/v3/alerts/api_get_alert.go index 90a60725..0d99f947 100644 --- a/rest/api/v3/alerts/api_get_alert.go +++ b/rest/api/v3/alerts/api_get_alert.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -66,5 +67,5 @@ func (c *ApiService) GetAlert(params *GetAlertParam) (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/alerts/api_list_alert.go b/rest/api/v3/alerts/api_list_alert.go index df938ee4..184c07aa 100644 --- a/rest/api/v3/alerts/api_list_alert.go +++ b/rest/api/v3/alerts/api_list_alert.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -54,5 +55,5 @@ func (c *ApiService) ListAlert(params *ListAlertParam) (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/alerts/api_update_alert.go b/rest/api/v3/alerts/api_update_alert.go index f99d96d3..aa0a59fd 100644 --- a/rest/api/v3/alerts/api_update_alert.go +++ b/rest/api/v3/alerts/api_update_alert.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -81,5 +82,5 @@ func (c *ApiService) UpdateAlert(params *UpdateAlertParam) (interface{}, error) return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/api_keys/README.md b/rest/api/v3/api_keys/README.md index f903de6f..8ff06985 100644 --- a/rest/api/v3/api_keys/README.md +++ b/rest/api/v3/api_keys/README.md @@ -9,7 +9,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:43.513429+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:37.552328+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/api_keys/api_create_api_key.go b/rest/api/v3/api_keys/api_create_api_key.go index 4007a9d4..b73e3188 100644 --- a/rest/api/v3/api_keys/api_create_api_key.go +++ b/rest/api/v3/api_keys/api_create_api_key.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -101,5 +102,5 @@ func (c *ApiService) CreateApiKey(params *CreateApiKeyParam) (interface{}, error return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/api_keys/api_delete_api_key.go b/rest/api/v3/api_keys/api_delete_api_key.go index e7870f10..49208d6b 100644 --- a/rest/api/v3/api_keys/api_delete_api_key.go +++ b/rest/api/v3/api_keys/api_delete_api_key.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -89,5 +90,5 @@ func (c *ApiService) DeleteApiKey(params *DeleteApiKeyParam) (interface{}, error return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/api_keys/api_get_api_key.go b/rest/api/v3/api_keys/api_get_api_key.go index fddef224..25b4cfcc 100644 --- a/rest/api/v3/api_keys/api_get_api_key.go +++ b/rest/api/v3/api_keys/api_get_api_key.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -97,5 +98,5 @@ func (c *ApiService) GetApiKey(params *GetApiKeyParam) (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/api_keys/api_list_api_key.go b/rest/api/v3/api_keys/api_list_api_key.go index f6e17fc8..0866765d 100644 --- a/rest/api/v3/api_keys/api_list_api_key.go +++ b/rest/api/v3/api_keys/api_list_api_key.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -89,5 +90,5 @@ func (c *ApiService) ListApiKey(params *ListApiKeyParam) (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/api_keys/api_update_api_key.go b/rest/api/v3/api_keys/api_update_api_key.go index 449310cd..76ea4783 100644 --- a/rest/api/v3/api_keys/api_update_api_key.go +++ b/rest/api/v3/api_keys/api_update_api_key.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -112,5 +113,5 @@ func (c *ApiService) UpdateApiKey(params *UpdateApiKeyParam) (interface{}, error return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/api_keys/api_update_api_key_name.go b/rest/api/v3/api_keys/api_update_api_key_name.go index cb3f5574..c7adf840 100644 --- a/rest/api/v3/api_keys/api_update_api_key_name.go +++ b/rest/api/v3/api_keys/api_update_api_key_name.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -112,5 +113,5 @@ func (c *ApiService) UpdateApiKeyName(params *UpdateApiKeyNameParam) (interface{ return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/domain_authentication/README.md b/rest/api/v3/domain_authentication/README.md index 464525b5..1162490f 100644 --- a/rest/api/v3/domain_authentication/README.md +++ b/rest/api/v3/domain_authentication/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:43.542993+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:37.561320+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/domain_authentication/api_add_ip_to_authenticated_domain.go b/rest/api/v3/domain_authentication/api_add_ip_to_authenticated_domain.go index ed9f553c..460dd3b4 100644 --- a/rest/api/v3/domain_authentication/api_add_ip_to_authenticated_domain.go +++ b/rest/api/v3/domain_authentication/api_add_ip_to_authenticated_domain.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -81,5 +82,5 @@ func (c *ApiService) AddIpToAuthenticatedDomain(params *AddIpToAuthenticatedDoma return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/domain_authentication/api_associate_subuser_with_domain.go b/rest/api/v3/domain_authentication/api_associate_subuser_with_domain.go index 4ad4d29e..fa41be68 100644 --- a/rest/api/v3/domain_authentication/api_associate_subuser_with_domain.go +++ b/rest/api/v3/domain_authentication/api_associate_subuser_with_domain.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -72,5 +73,5 @@ func (c *ApiService) AssociateSubuserWithDomain(params *AssociateSubuserWithDoma return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/domain_authentication/api_associate_subuser_with_domain_multiple.go b/rest/api/v3/domain_authentication/api_associate_subuser_with_domain_multiple.go index a2c7706f..65a24153 100644 --- a/rest/api/v3/domain_authentication/api_associate_subuser_with_domain_multiple.go +++ b/rest/api/v3/domain_authentication/api_associate_subuser_with_domain_multiple.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -72,5 +73,5 @@ func (c *ApiService) AssociateSubuserWithDomainMultiple(params *AssociateSubuser return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/domain_authentication/api_authenticate_domain.go b/rest/api/v3/domain_authentication/api_authenticate_domain.go index 394ef926..2f926205 100644 --- a/rest/api/v3/domain_authentication/api_authenticate_domain.go +++ b/rest/api/v3/domain_authentication/api_authenticate_domain.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -69,5 +70,5 @@ func (c *ApiService) AuthenticateDomain(params *AuthenticateDomainParam) (interf return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/domain_authentication/api_delete_authenticated_domain.go b/rest/api/v3/domain_authentication/api_delete_authenticated_domain.go index 9c22693b..31ef3a69 100644 --- a/rest/api/v3/domain_authentication/api_delete_authenticated_domain.go +++ b/rest/api/v3/domain_authentication/api_delete_authenticated_domain.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -65,5 +66,5 @@ func (c *ApiService) DeleteAuthenticatedDomain(params *DeleteAuthenticatedDomain return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/domain_authentication/api_delete_ip_from_authenticated_domain.go b/rest/api/v3/domain_authentication/api_delete_ip_from_authenticated_domain.go index 6ae7453f..ba8a7f9b 100644 --- a/rest/api/v3/domain_authentication/api_delete_ip_from_authenticated_domain.go +++ b/rest/api/v3/domain_authentication/api_delete_ip_from_authenticated_domain.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -75,5 +76,5 @@ func (c *ApiService) DeleteIpFromAuthenticatedDomain(params *DeleteIpFromAuthent return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/domain_authentication/api_disassociate_authenticated_domain_from_user.go b/rest/api/v3/domain_authentication/api_disassociate_authenticated_domain_from_user.go index 8b814581..6ba51ea1 100644 --- a/rest/api/v3/domain_authentication/api_disassociate_authenticated_domain_from_user.go +++ b/rest/api/v3/domain_authentication/api_disassociate_authenticated_domain_from_user.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -55,5 +56,5 @@ func (c *ApiService) DisassociateAuthenticatedDomainFromUser(params *Disassociat return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/domain_authentication/api_disassociate_subuser_from_domain.go b/rest/api/v3/domain_authentication/api_disassociate_subuser_from_domain.go index 706777aa..8d017f29 100644 --- a/rest/api/v3/domain_authentication/api_disassociate_subuser_from_domain.go +++ b/rest/api/v3/domain_authentication/api_disassociate_subuser_from_domain.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -67,5 +68,5 @@ func (c *ApiService) DisassociateSubuserFromDomain(params *DisassociateSubuserFr return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/domain_authentication/api_email_dns_record.go b/rest/api/v3/domain_authentication/api_email_dns_record.go index 044f297a..b3511b52 100644 --- a/rest/api/v3/domain_authentication/api_email_dns_record.go +++ b/rest/api/v3/domain_authentication/api_email_dns_record.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -60,5 +61,5 @@ func (c *ApiService) EmailDnsRecord(params *EmailDnsRecordParam) (interface{}, e return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/domain_authentication/api_get_authenticated_domain.go b/rest/api/v3/domain_authentication/api_get_authenticated_domain.go index c2c0d5f1..ae5c5900 100644 --- a/rest/api/v3/domain_authentication/api_get_authenticated_domain.go +++ b/rest/api/v3/domain_authentication/api_get_authenticated_domain.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -65,5 +66,5 @@ func (c *ApiService) GetAuthenticatedDomain(params *GetAuthenticatedDomainParam) return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/domain_authentication/api_list_all_authenticated_domain_with_user.go b/rest/api/v3/domain_authentication/api_list_all_authenticated_domain_with_user.go index 9a54f824..b2f225e9 100644 --- a/rest/api/v3/domain_authentication/api_list_all_authenticated_domain_with_user.go +++ b/rest/api/v3/domain_authentication/api_list_all_authenticated_domain_with_user.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -55,5 +56,5 @@ func (c *ApiService) ListAllAuthenticatedDomainWithUser(params *ListAllAuthentic return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/domain_authentication/api_list_authenticated_domain.go b/rest/api/v3/domain_authentication/api_list_authenticated_domain.go index 58604ba7..7296ba61 100644 --- a/rest/api/v3/domain_authentication/api_list_authenticated_domain.go +++ b/rest/api/v3/domain_authentication/api_list_authenticated_domain.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -101,5 +102,5 @@ func (c *ApiService) ListAuthenticatedDomain(params *ListAuthenticatedDomainPara return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/domain_authentication/api_list_authenticated_domain_with_user.go b/rest/api/v3/domain_authentication/api_list_authenticated_domain_with_user.go index 03476a2f..3bfbb0c4 100644 --- a/rest/api/v3/domain_authentication/api_list_authenticated_domain_with_user.go +++ b/rest/api/v3/domain_authentication/api_list_authenticated_domain_with_user.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -55,5 +56,5 @@ func (c *ApiService) ListAuthenticatedDomainWithUser(params *ListAuthenticatedDo return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/domain_authentication/api_list_default_authenticated_domain.go b/rest/api/v3/domain_authentication/api_list_default_authenticated_domain.go index 4f2cfef6..62cd4ae0 100644 --- a/rest/api/v3/domain_authentication/api_list_default_authenticated_domain.go +++ b/rest/api/v3/domain_authentication/api_list_default_authenticated_domain.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -64,5 +65,5 @@ func (c *ApiService) ListDefaultAuthenticatedDomain(params *ListDefaultAuthentic return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/domain_authentication/api_update_authenticated_domain.go b/rest/api/v3/domain_authentication/api_update_authenticated_domain.go index 2f4483f9..5b048bce 100644 --- a/rest/api/v3/domain_authentication/api_update_authenticated_domain.go +++ b/rest/api/v3/domain_authentication/api_update_authenticated_domain.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -80,5 +81,5 @@ func (c *ApiService) UpdateAuthenticatedDomain(params *UpdateAuthenticatedDomain return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/domain_authentication/api_validate_authenticated_domain.go b/rest/api/v3/domain_authentication/api_validate_authenticated_domain.go index 7317b99c..de42d935 100644 --- a/rest/api/v3/domain_authentication/api_validate_authenticated_domain.go +++ b/rest/api/v3/domain_authentication/api_validate_authenticated_domain.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -74,5 +75,5 @@ func (c *ApiService) ValidateAuthenticatedDomain(params *ValidateAuthenticatedDo return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/email_activity/README.md b/rest/api/v3/email_activity/README.md index da29d146..55a23799 100644 --- a/rest/api/v3/email_activity/README.md +++ b/rest/api/v3/email_activity/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:43.522151+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:37.552250+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/email_activity/api_download_csv.go b/rest/api/v3/email_activity/api_download_csv.go index 8ca4e14c..4099749d 100644 --- a/rest/api/v3/email_activity/api_download_csv.go +++ b/rest/api/v3/email_activity/api_download_csv.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -72,5 +73,5 @@ func (c *ApiService) DownloadCsv(params *DownloadCsvParam) (interface{}, error) return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/email_activity/api_get_message.go b/rest/api/v3/email_activity/api_get_message.go index 9466caef..117173dd 100644 --- a/rest/api/v3/email_activity/api_get_message.go +++ b/rest/api/v3/email_activity/api_get_message.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -80,5 +81,5 @@ func (c *ApiService) GetMessage(params *GetMessageParam) (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/email_activity/api_list_message.go b/rest/api/v3/email_activity/api_list_message.go index 9788cb21..50a736d0 100644 --- a/rest/api/v3/email_activity/api_list_message.go +++ b/rest/api/v3/email_activity/api_list_message.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -81,5 +82,5 @@ func (c *ApiService) ListMessage(params *ListMessageParam) (interface{}, error) return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/email_activity/api_request_csv.go b/rest/api/v3/email_activity/api_request_csv.go index 6c195154..7e77789b 100644 --- a/rest/api/v3/email_activity/api_request_csv.go +++ b/rest/api/v3/email_activity/api_request_csv.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -79,5 +80,5 @@ func (c *ApiService) RequestCsv(params *RequestCsvParam) (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/email_validation/README.md b/rest/api/v3/email_validation/README.md index f12c5d19..987b30fc 100644 --- a/rest/api/v3/email_validation/README.md +++ b/rest/api/v3/email_validation/README.md @@ -18,7 +18,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:43.518805+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:37.555281+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/email_validation/api_get_email_job_for_verification.go b/rest/api/v3/email_validation/api_get_email_job_for_verification.go index d1299b7f..7bbbb4ed 100644 --- a/rest/api/v3/email_validation/api_get_email_job_for_verification.go +++ b/rest/api/v3/email_validation/api_get_email_job_for_verification.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -72,5 +73,5 @@ func (c *ApiService) GetEmailJobForVerification(params *GetEmailJobForVerificati return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/email_validation/api_get_validations_email_jobs.go b/rest/api/v3/email_validation/api_get_validations_email_jobs.go index 689f190d..c4f18da2 100644 --- a/rest/api/v3/email_validation/api_get_validations_email_jobs.go +++ b/rest/api/v3/email_validation/api_get_validations_email_jobs.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -60,5 +61,5 @@ func (c *ApiService) GetValidationsEmailJobs() (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/email_validation/api_list_email_job_for_verification.go b/rest/api/v3/email_validation/api_list_email_job_for_verification.go index 1461af35..cc8083ba 100644 --- a/rest/api/v3/email_validation/api_list_email_job_for_verification.go +++ b/rest/api/v3/email_validation/api_list_email_job_for_verification.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -76,5 +77,5 @@ func (c *ApiService) ListEmailJobForVerification(params *ListEmailJobForVerifica return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/email_validation/api_validate_email.go b/rest/api/v3/email_validation/api_validate_email.go index bc117d8c..fe9804ce 100644 --- a/rest/api/v3/email_validation/api_validate_email.go +++ b/rest/api/v3/email_validation/api_validate_email.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -60,5 +61,5 @@ func (c *ApiService) ValidateEmail(params *ValidateEmailParam) (interface{}, err return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/enforced_tls/README.md b/rest/api/v3/enforced_tls/README.md index 5a6ee8a6..1af7b22c 100644 --- a/rest/api/v3/enforced_tls/README.md +++ b/rest/api/v3/enforced_tls/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:43.510881+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:37.544012+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/enforced_tls/api_list_enforced_tls_setting.go b/rest/api/v3/enforced_tls/api_list_enforced_tls_setting.go index 07044502..9f2bb1ab 100644 --- a/rest/api/v3/enforced_tls/api_list_enforced_tls_setting.go +++ b/rest/api/v3/enforced_tls/api_list_enforced_tls_setting.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -78,5 +79,5 @@ func (c *ApiService) ListEnforcedTlsSetting(params *ListEnforcedTlsSettingParam) return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/enforced_tls/api_update_enforced_tls_setting.go b/rest/api/v3/enforced_tls/api_update_enforced_tls_setting.go index 8736c394..aa1a2ad6 100644 --- a/rest/api/v3/enforced_tls/api_update_enforced_tls_setting.go +++ b/rest/api/v3/enforced_tls/api_update_enforced_tls_setting.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -93,5 +94,5 @@ func (c *ApiService) UpdateEnforcedTlsSetting(params *UpdateEnforcedTlsSettingPa return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/integrations/README.md b/rest/api/v3/integrations/README.md index 788587b1..7400f9c8 100644 --- a/rest/api/v3/integrations/README.md +++ b/rest/api/v3/integrations/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:43.514382+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:37.549545+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/integrations/api_add_integration.go b/rest/api/v3/integrations/api_add_integration.go index ecf7f465..92004e55 100644 --- a/rest/api/v3/integrations/api_add_integration.go +++ b/rest/api/v3/integrations/api_add_integration.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -84,5 +85,5 @@ func (c *ApiService) AddIntegration(params *AddIntegrationParam) (interface{}, e return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/integrations/api_delete_integration.go b/rest/api/v3/integrations/api_delete_integration.go index 18cba8d4..40e4c4ae 100644 --- a/rest/api/v3/integrations/api_delete_integration.go +++ b/rest/api/v3/integrations/api_delete_integration.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -88,5 +89,5 @@ func (c *ApiService) DeleteIntegration(params *DeleteIntegrationParam) (interfac return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/integrations/api_find_integration_by_id.go b/rest/api/v3/integrations/api_find_integration_by_id.go index 44a96ac6..b0594610 100644 --- a/rest/api/v3/integrations/api_find_integration_by_id.go +++ b/rest/api/v3/integrations/api_find_integration_by_id.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -80,5 +81,5 @@ func (c *ApiService) FindIntegrationById(params *FindIntegrationByIdParam) (inte return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/integrations/api_get_integrations_by_user.go b/rest/api/v3/integrations/api_get_integrations_by_user.go index 10cf76a9..3c4d1908 100644 --- a/rest/api/v3/integrations/api_get_integrations_by_user.go +++ b/rest/api/v3/integrations/api_get_integrations_by_user.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -60,5 +61,5 @@ func (c *ApiService) GetIntegrationsByUser() (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/integrations/api_update_integration.go b/rest/api/v3/integrations/api_update_integration.go index ef197361..b62b01c5 100644 --- a/rest/api/v3/integrations/api_update_integration.go +++ b/rest/api/v3/integrations/api_update_integration.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -103,5 +104,5 @@ func (c *ApiService) UpdateIntegration(params *UpdateIntegrationParam) (interfac return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ip_access_management/README.md b/rest/api/v3/ip_access_management/README.md index ad618659..26a4be45 100644 --- a/rest/api/v3/ip_access_management/README.md +++ b/rest/api/v3/ip_access_management/README.md @@ -13,7 +13,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:43.514160+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:37.545896+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/ip_access_management/api_add_ip_to_allow_list.go b/rest/api/v3/ip_access_management/api_add_ip_to_allow_list.go index 9cdb8ae4..cff469da 100644 --- a/rest/api/v3/ip_access_management/api_add_ip_to_allow_list.go +++ b/rest/api/v3/ip_access_management/api_add_ip_to_allow_list.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -93,5 +94,5 @@ func (c *ApiService) AddIpToAllowList(params *AddIpToAllowListParam) (interface{ return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ip_access_management/api_delete_allowed_ip.go b/rest/api/v3/ip_access_management/api_delete_allowed_ip.go index 6a4b052b..c411f9a0 100644 --- a/rest/api/v3/ip_access_management/api_delete_allowed_ip.go +++ b/rest/api/v3/ip_access_management/api_delete_allowed_ip.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -65,5 +66,5 @@ func (c *ApiService) DeleteAllowedIp(params *DeleteAllowedIpParam) (interface{}, return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ip_access_management/api_delete_allowed_ips.go b/rest/api/v3/ip_access_management/api_delete_allowed_ips.go index f3762e71..4e25500a 100644 --- a/rest/api/v3/ip_access_management/api_delete_allowed_ips.go +++ b/rest/api/v3/ip_access_management/api_delete_allowed_ips.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -93,5 +94,5 @@ func (c *ApiService) DeleteAllowedIps(params *DeleteAllowedIpsParam) (interface{ return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ip_access_management/api_get_allowed_ip.go b/rest/api/v3/ip_access_management/api_get_allowed_ip.go index d4cafeb4..c11e9af9 100644 --- a/rest/api/v3/ip_access_management/api_get_allowed_ip.go +++ b/rest/api/v3/ip_access_management/api_get_allowed_ip.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -65,5 +66,5 @@ func (c *ApiService) GetAllowedIp(params *GetAllowedIpParam) (interface{}, error return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ip_access_management/api_list_access_activity.go b/rest/api/v3/ip_access_management/api_list_access_activity.go index 831b257a..8c9869a5 100644 --- a/rest/api/v3/ip_access_management/api_list_access_activity.go +++ b/rest/api/v3/ip_access_management/api_list_access_activity.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -89,5 +90,5 @@ func (c *ApiService) ListAccessActivity(params *ListAccessActivityParam) (interf return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ip_access_management/api_list_allowed_ip.go b/rest/api/v3/ip_access_management/api_list_allowed_ip.go index 9c988c12..2274b2b4 100644 --- a/rest/api/v3/ip_access_management/api_list_allowed_ip.go +++ b/rest/api/v3/ip_access_management/api_list_allowed_ip.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -78,5 +79,5 @@ func (c *ApiService) ListAllowedIp(params *ListAllowedIpParam) (interface{}, err return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ip_address_management/README.md b/rest/api/v3/ip_address_management/README.md index ed077e30..eb8a9ce3 100644 --- a/rest/api/v3/ip_address_management/README.md +++ b/rest/api/v3/ip_address_management/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:43.593659+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:37.587585+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/ip_address_management/api_add_ip.go b/rest/api/v3/ip_address_management/api_add_ip.go index d1f65162..95a077bf 100644 --- a/rest/api/v3/ip_address_management/api_add_ip.go +++ b/rest/api/v3/ip_address_management/api_add_ip.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -84,5 +85,5 @@ func (c *ApiService) AddIp(params *AddIpParam) (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ip_address_management/api_add_ips_to_ip_pool.go b/rest/api/v3/ip_address_management/api_add_ips_to_ip_pool.go index 87c4bc6a..b76d00b5 100644 --- a/rest/api/v3/ip_address_management/api_add_ips_to_ip_pool.go +++ b/rest/api/v3/ip_address_management/api_add_ips_to_ip_pool.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -95,5 +96,5 @@ func (c *ApiService) AddIpsToIpPool(params *AddIpsToIpPoolParam) (interface{}, e return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ip_address_management/api_add_sub_users_to_ip.go b/rest/api/v3/ip_address_management/api_add_sub_users_to_ip.go index e1c90a7d..a816b730 100644 --- a/rest/api/v3/ip_address_management/api_add_sub_users_to_ip.go +++ b/rest/api/v3/ip_address_management/api_add_sub_users_to_ip.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -95,5 +96,5 @@ func (c *ApiService) AddSubUsersToIp(params *AddSubUsersToIpParam) (interface{}, return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ip_address_management/api_create_ip_pool.go b/rest/api/v3/ip_address_management/api_create_ip_pool.go index 534e9e15..0bbc040a 100644 --- a/rest/api/v3/ip_address_management/api_create_ip_pool.go +++ b/rest/api/v3/ip_address_management/api_create_ip_pool.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -84,5 +85,5 @@ func (c *ApiService) CreateIpPool(params *CreateIpPoolParam) (interface{}, error return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ip_address_management/api_delete_ip_pool.go b/rest/api/v3/ip_address_management/api_delete_ip_pool.go index d4c18090..b63d0cd0 100644 --- a/rest/api/v3/ip_address_management/api_delete_ip_pool.go +++ b/rest/api/v3/ip_address_management/api_delete_ip_pool.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -72,5 +73,5 @@ func (c *ApiService) DeleteIpPool(params *DeleteIpPoolParam) (interface{}, error return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ip_address_management/api_delete_ips_from_ip_pool.go b/rest/api/v3/ip_address_management/api_delete_ips_from_ip_pool.go index 5fe7b538..a3016366 100644 --- a/rest/api/v3/ip_address_management/api_delete_ips_from_ip_pool.go +++ b/rest/api/v3/ip_address_management/api_delete_ips_from_ip_pool.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -87,5 +88,5 @@ func (c *ApiService) DeleteIpsFromIpPool(params *DeleteIpsFromIpPoolParam) (inte return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ip_address_management/api_delete_sub_users_from_ip.go b/rest/api/v3/ip_address_management/api_delete_sub_users_from_ip.go index 3a769dc3..87f8cafa 100644 --- a/rest/api/v3/ip_address_management/api_delete_sub_users_from_ip.go +++ b/rest/api/v3/ip_address_management/api_delete_sub_users_from_ip.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -87,5 +88,5 @@ func (c *ApiService) DeleteSubUsersFromIp(params *DeleteSubUsersFromIpParam) (in return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ip_address_management/api_get_ip.go b/rest/api/v3/ip_address_management/api_get_ip.go index 5f957bed..ac3e99c1 100644 --- a/rest/api/v3/ip_address_management/api_get_ip.go +++ b/rest/api/v3/ip_address_management/api_get_ip.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -80,5 +81,5 @@ func (c *ApiService) GetIp(params *GetIpParam) (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ip_address_management/api_get_ip_pool.go b/rest/api/v3/ip_address_management/api_get_ip_pool.go index 364e3f40..3b948455 100644 --- a/rest/api/v3/ip_address_management/api_get_ip_pool.go +++ b/rest/api/v3/ip_address_management/api_get_ip_pool.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -80,5 +81,5 @@ func (c *ApiService) GetIpPool(params *GetIpPoolParam) (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ip_address_management/api_list_ip.go b/rest/api/v3/ip_address_management/api_list_ip.go index f0f31220..2094c04f 100644 --- a/rest/api/v3/ip_address_management/api_list_ip.go +++ b/rest/api/v3/ip_address_management/api_list_ip.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -179,5 +180,5 @@ func (c *ApiService) ListIp(params *ListIpParam) (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ip_address_management/api_list_ip_assigned_to_ip_pool.go b/rest/api/v3/ip_address_management/api_list_ip_assigned_to_ip_pool.go index 028ca395..9c0dbe4f 100644 --- a/rest/api/v3/ip_address_management/api_list_ip_assigned_to_ip_pool.go +++ b/rest/api/v3/ip_address_management/api_list_ip_assigned_to_ip_pool.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -98,5 +99,5 @@ func (c *ApiService) ListIpAssignedToIpPool(params *ListIpAssignedToIpPoolParam) return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ip_address_management/api_list_ip_pool.go b/rest/api/v3/ip_address_management/api_list_ip_pool.go index ab8a4dca..97b97dee 100644 --- a/rest/api/v3/ip_address_management/api_list_ip_pool.go +++ b/rest/api/v3/ip_address_management/api_list_ip_pool.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -116,5 +117,5 @@ func (c *ApiService) ListIpPool(params *ListIpPoolParam) (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ip_address_management/api_list_sub_user_assigned_to_ip.go b/rest/api/v3/ip_address_management/api_list_sub_user_assigned_to_ip.go index 83a88d5a..42451d39 100644 --- a/rest/api/v3/ip_address_management/api_list_sub_user_assigned_to_ip.go +++ b/rest/api/v3/ip_address_management/api_list_sub_user_assigned_to_ip.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -89,5 +90,5 @@ func (c *ApiService) ListSubUserAssignedToIp(params *ListSubUserAssignedToIpPara return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ip_address_management/api_update_ip.go b/rest/api/v3/ip_address_management/api_update_ip.go index 3e638417..4eb4e3f7 100644 --- a/rest/api/v3/ip_address_management/api_update_ip.go +++ b/rest/api/v3/ip_address_management/api_update_ip.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -95,5 +96,5 @@ func (c *ApiService) UpdateIp(params *UpdateIpParam) (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ip_address_management/api_update_ip_pool.go b/rest/api/v3/ip_address_management/api_update_ip_pool.go index 05ac6c6f..e047f450 100644 --- a/rest/api/v3/ip_address_management/api_update_ip_pool.go +++ b/rest/api/v3/ip_address_management/api_update_ip_pool.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -95,5 +96,5 @@ func (c *ApiService) UpdateIpPool(params *UpdateIpPoolParam) (interface{}, error return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ip_warmup/README.md b/rest/api/v3/ip_warmup/README.md index 879bf54d..a043457a 100644 --- a/rest/api/v3/ip_warmup/README.md +++ b/rest/api/v3/ip_warmup/README.md @@ -13,7 +13,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:43.513778+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:37.552368+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/ip_warmup/api_get_warm_up_ip.go b/rest/api/v3/ip_warmup/api_get_warm_up_ip.go index a8a66b37..7a702bcb 100644 --- a/rest/api/v3/ip_warmup/api_get_warm_up_ip.go +++ b/rest/api/v3/ip_warmup/api_get_warm_up_ip.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -64,5 +65,5 @@ func (c *ApiService) GetWarmUpIp(params *GetWarmUpIpParam) (interface{}, error) return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ip_warmup/api_list_warm_up_ip.go b/rest/api/v3/ip_warmup/api_list_warm_up_ip.go index 43a096d9..625dac82 100644 --- a/rest/api/v3/ip_warmup/api_list_warm_up_ip.go +++ b/rest/api/v3/ip_warmup/api_list_warm_up_ip.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -44,5 +45,5 @@ func (c *ApiService) ListWarmUpIp() (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ip_warmup/api_stop_ip_warm_up.go b/rest/api/v3/ip_warmup/api_stop_ip_warm_up.go index dc086167..bcc5a0d8 100644 --- a/rest/api/v3/ip_warmup/api_stop_ip_warm_up.go +++ b/rest/api/v3/ip_warmup/api_stop_ip_warm_up.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -64,5 +65,5 @@ func (c *ApiService) StopIpWarmUp(params *StopIpWarmUpParam) (interface{}, error return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ip_warmup/api_warm_up_ip.go b/rest/api/v3/ip_warmup/api_warm_up_ip.go index 5348c525..a9e295a1 100644 --- a/rest/api/v3/ip_warmup/api_warm_up_ip.go +++ b/rest/api/v3/ip_warmup/api_warm_up_ip.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -68,5 +69,5 @@ func (c *ApiService) WarmUpIp(params *WarmUpIpParam) (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ips/README.md b/rest/api/v3/ips/README.md index 6d950aac..4096f68a 100644 --- a/rest/api/v3/ips/README.md +++ b/rest/api/v3/ips/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:43.525925+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:37.554882+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/ips/api_add_ip.go b/rest/api/v3/ips/api_add_ip.go index b9da2f59..bedc6238 100644 --- a/rest/api/v3/ips/api_add_ip.go +++ b/rest/api/v3/ips/api_add_ip.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -68,5 +69,5 @@ func (c *ApiService) AddIp(params *AddIpParam) (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ips/api_add_ip_to_ip_pool.go b/rest/api/v3/ips/api_add_ip_to_ip_pool.go index 80609038..7ee18eeb 100644 --- a/rest/api/v3/ips/api_add_ip_to_ip_pool.go +++ b/rest/api/v3/ips/api_add_ip_to_ip_pool.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -79,5 +80,5 @@ func (c *ApiService) AddIpToIpPool(params *AddIpToIpPoolParam) (interface{}, err return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ips/api_create_ip_pool.go b/rest/api/v3/ips/api_create_ip_pool.go index 527612c4..b225ff48 100644 --- a/rest/api/v3/ips/api_create_ip_pool.go +++ b/rest/api/v3/ips/api_create_ip_pool.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -60,5 +61,5 @@ func (c *ApiService) CreateIpPool(params *CreateIpPoolParam) (interface{}, error return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ips/api_delete_ip_from_ip_pool.go b/rest/api/v3/ips/api_delete_ip_from_ip_pool.go index 87376334..d2251ede 100644 --- a/rest/api/v3/ips/api_delete_ip_from_ip_pool.go +++ b/rest/api/v3/ips/api_delete_ip_from_ip_pool.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -73,5 +74,5 @@ func (c *ApiService) DeleteIpFromIpPool(params *DeleteIpFromIpPoolParam) (interf return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ips/api_delete_ip_pool.go b/rest/api/v3/ips/api_delete_ip_pool.go index d72c63be..925a6a62 100644 --- a/rest/api/v3/ips/api_delete_ip_pool.go +++ b/rest/api/v3/ips/api_delete_ip_pool.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -64,5 +65,5 @@ func (c *ApiService) DeleteIpPool(params *DeleteIpPoolParam) (interface{}, error return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ips/api_get_ip.go b/rest/api/v3/ips/api_get_ip.go index 91adac52..a8518213 100644 --- a/rest/api/v3/ips/api_get_ip.go +++ b/rest/api/v3/ips/api_get_ip.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -56,5 +57,5 @@ func (c *ApiService) GetIp(params *GetIpParam) (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ips/api_get_ip_pool.go b/rest/api/v3/ips/api_get_ip_pool.go index 75806195..e7b74f02 100644 --- a/rest/api/v3/ips/api_get_ip_pool.go +++ b/rest/api/v3/ips/api_get_ip_pool.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -64,5 +65,5 @@ func (c *ApiService) GetIpPool(params *GetIpPoolParam) (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ips/api_list_assigned_ip.go b/rest/api/v3/ips/api_list_assigned_ip.go index 1d031d00..1f3c0e7a 100644 --- a/rest/api/v3/ips/api_list_assigned_ip.go +++ b/rest/api/v3/ips/api_list_assigned_ip.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -44,5 +45,5 @@ func (c *ApiService) ListAssignedIp() (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ips/api_list_ip.go b/rest/api/v3/ips/api_list_ip.go index 28ba0487..83531941 100644 --- a/rest/api/v3/ips/api_list_ip.go +++ b/rest/api/v3/ips/api_list_ip.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -101,5 +102,5 @@ func (c *ApiService) ListIp(params *ListIpParam) (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ips/api_list_ip_pool.go b/rest/api/v3/ips/api_list_ip_pool.go index 5afcda48..8174f419 100644 --- a/rest/api/v3/ips/api_list_ip_pool.go +++ b/rest/api/v3/ips/api_list_ip_pool.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -44,5 +45,5 @@ func (c *ApiService) ListIpPool() (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ips/api_list_remaining_ip_count.go b/rest/api/v3/ips/api_list_remaining_ip_count.go index 1a63697e..6edacb31 100644 --- a/rest/api/v3/ips/api_list_remaining_ip_count.go +++ b/rest/api/v3/ips/api_list_remaining_ip_count.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -44,5 +45,5 @@ func (c *ApiService) ListRemainingIpCount() (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/ips/api_update_ip_pool.go b/rest/api/v3/ips/api_update_ip_pool.go index 619c53b4..b7bfc30d 100644 --- a/rest/api/v3/ips/api_update_ip_pool.go +++ b/rest/api/v3/ips/api_update_ip_pool.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -79,5 +80,5 @@ func (c *ApiService) UpdateIpPool(params *UpdateIpPoolParam) (interface{}, error return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/link_branding/README.md b/rest/api/v3/link_branding/README.md index 01cfe61b..00f6eb72 100644 --- a/rest/api/v3/link_branding/README.md +++ b/rest/api/v3/link_branding/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:43.518185+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:37.551339+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/link_branding/api_associate_branded_link_with_subuser.go b/rest/api/v3/link_branding/api_associate_branded_link_with_subuser.go index 244537f5..7b5595bb 100644 --- a/rest/api/v3/link_branding/api_associate_branded_link_with_subuser.go +++ b/rest/api/v3/link_branding/api_associate_branded_link_with_subuser.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -72,5 +73,5 @@ func (c *ApiService) AssociateBrandedLinkWithSubuser(params *AssociateBrandedLin return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/link_branding/api_create_branded_link.go b/rest/api/v3/link_branding/api_create_branded_link.go index fef3f166..6f0308c9 100644 --- a/rest/api/v3/link_branding/api_create_branded_link.go +++ b/rest/api/v3/link_branding/api_create_branded_link.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -69,5 +70,5 @@ func (c *ApiService) CreateBrandedLink(params *CreateBrandedLinkParam) (interfac return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/link_branding/api_delete_branded_link.go b/rest/api/v3/link_branding/api_delete_branded_link.go index 781d2c8b..dd3d17b0 100644 --- a/rest/api/v3/link_branding/api_delete_branded_link.go +++ b/rest/api/v3/link_branding/api_delete_branded_link.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -66,5 +67,5 @@ func (c *ApiService) DeleteBrandedLink(params *DeleteBrandedLinkParam) (interfac return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/link_branding/api_disassociate_branded_link_from_subuser.go b/rest/api/v3/link_branding/api_disassociate_branded_link_from_subuser.go index 4b36641b..2c8322b4 100644 --- a/rest/api/v3/link_branding/api_disassociate_branded_link_from_subuser.go +++ b/rest/api/v3/link_branding/api_disassociate_branded_link_from_subuser.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -55,5 +56,5 @@ func (c *ApiService) DisassociateBrandedLinkFromSubuser(params *DisassociateBran return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/link_branding/api_get_branded_link.go b/rest/api/v3/link_branding/api_get_branded_link.go index 3957575e..8de7aa53 100644 --- a/rest/api/v3/link_branding/api_get_branded_link.go +++ b/rest/api/v3/link_branding/api_get_branded_link.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -66,5 +67,5 @@ func (c *ApiService) GetBrandedLink(params *GetBrandedLinkParam) (interface{}, e return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/link_branding/api_list_branded_link.go b/rest/api/v3/link_branding/api_list_branded_link.go index 6aafbeaa..1adf06e0 100644 --- a/rest/api/v3/link_branding/api_list_branded_link.go +++ b/rest/api/v3/link_branding/api_list_branded_link.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -65,5 +66,5 @@ func (c *ApiService) ListBrandedLink(params *ListBrandedLinkParam) (interface{}, return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/link_branding/api_list_default_branded_link.go b/rest/api/v3/link_branding/api_list_default_branded_link.go index 3a00bd17..b198243a 100644 --- a/rest/api/v3/link_branding/api_list_default_branded_link.go +++ b/rest/api/v3/link_branding/api_list_default_branded_link.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -64,5 +65,5 @@ func (c *ApiService) ListDefaultBrandedLink(params *ListDefaultBrandedLinkParam) return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/link_branding/api_list_subuser_branded_link.go b/rest/api/v3/link_branding/api_list_subuser_branded_link.go index fdfda6cd..1c2595c2 100644 --- a/rest/api/v3/link_branding/api_list_subuser_branded_link.go +++ b/rest/api/v3/link_branding/api_list_subuser_branded_link.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -55,5 +56,5 @@ func (c *ApiService) ListSubuserBrandedLink(params *ListSubuserBrandedLinkParam) return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/link_branding/api_update_branded_link.go b/rest/api/v3/link_branding/api_update_branded_link.go index e9c52c10..57fd9f1e 100644 --- a/rest/api/v3/link_branding/api_update_branded_link.go +++ b/rest/api/v3/link_branding/api_update_branded_link.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -81,5 +82,5 @@ func (c *ApiService) UpdateBrandedLink(params *UpdateBrandedLinkParam) (interfac return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/link_branding/api_validate_branded_link.go b/rest/api/v3/link_branding/api_validate_branded_link.go index c3501327..350b12cb 100644 --- a/rest/api/v3/link_branding/api_validate_branded_link.go +++ b/rest/api/v3/link_branding/api_validate_branded_link.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -74,5 +75,5 @@ func (c *ApiService) ValidateBrandedLink(params *ValidateBrandedLinkParam) (inte return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_campaigns/README.md b/rest/api/v3/lmc_campaigns/README.md index b368143a..f5b444ef 100644 --- a/rest/api/v3/lmc_campaigns/README.md +++ b/rest/api/v3/lmc_campaigns/README.md @@ -9,7 +9,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:43.516245+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:37.556712+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/lmc_campaigns/api_create_campaign.go b/rest/api/v3/lmc_campaigns/api_create_campaign.go index 39caf532..3aae6310 100644 --- a/rest/api/v3/lmc_campaigns/api_create_campaign.go +++ b/rest/api/v3/lmc_campaigns/api_create_campaign.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -85,5 +86,5 @@ func (c *ApiService) CreateCampaign(params *CreateCampaignParam) (interface{}, e return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_campaigns/api_delete_campaign.go b/rest/api/v3/lmc_campaigns/api_delete_campaign.go index da543aa7..7aa3d483 100644 --- a/rest/api/v3/lmc_campaigns/api_delete_campaign.go +++ b/rest/api/v3/lmc_campaigns/api_delete_campaign.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -74,5 +75,5 @@ func (c *ApiService) DeleteCampaign(params *DeleteCampaignParam) (interface{}, e return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_campaigns/api_get_campaign.go b/rest/api/v3/lmc_campaigns/api_get_campaign.go index d337ce94..ce3623a0 100644 --- a/rest/api/v3/lmc_campaigns/api_get_campaign.go +++ b/rest/api/v3/lmc_campaigns/api_get_campaign.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -82,5 +83,5 @@ func (c *ApiService) GetCampaign(params *GetCampaignParam) (interface{}, error) return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_campaigns/api_get_scheduled_campaign.go b/rest/api/v3/lmc_campaigns/api_get_scheduled_campaign.go index 15941fd4..6f75dc54 100644 --- a/rest/api/v3/lmc_campaigns/api_get_scheduled_campaign.go +++ b/rest/api/v3/lmc_campaigns/api_get_scheduled_campaign.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -74,5 +75,5 @@ func (c *ApiService) GetScheduledCampaign(params *GetScheduledCampaignParam) (in return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_campaigns/api_list_campaign.go b/rest/api/v3/lmc_campaigns/api_list_campaign.go index 326e4536..590a724a 100644 --- a/rest/api/v3/lmc_campaigns/api_list_campaign.go +++ b/rest/api/v3/lmc_campaigns/api_list_campaign.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -74,5 +75,5 @@ func (c *ApiService) ListCampaign(params *ListCampaignParam) (interface{}, error return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_campaigns/api_schedule_campaign.go b/rest/api/v3/lmc_campaigns/api_schedule_campaign.go index 69a51eb2..9a79ea55 100644 --- a/rest/api/v3/lmc_campaigns/api_schedule_campaign.go +++ b/rest/api/v3/lmc_campaigns/api_schedule_campaign.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -113,5 +114,5 @@ func (c *ApiService) ScheduleCampaign(params *ScheduleCampaignParam) (interface{ return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_campaigns/api_send_campaign.go b/rest/api/v3/lmc_campaigns/api_send_campaign.go index c9415c27..085410cd 100644 --- a/rest/api/v3/lmc_campaigns/api_send_campaign.go +++ b/rest/api/v3/lmc_campaigns/api_send_campaign.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -98,5 +99,5 @@ func (c *ApiService) SendCampaign(params *SendCampaignParam) (interface{}, error return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_campaigns/api_send_test_campaign.go b/rest/api/v3/lmc_campaigns/api_send_test_campaign.go index b27be894..d29a0129 100644 --- a/rest/api/v3/lmc_campaigns/api_send_test_campaign.go +++ b/rest/api/v3/lmc_campaigns/api_send_test_campaign.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -97,5 +98,5 @@ func (c *ApiService) SendTestCampaign(params *SendTestCampaignParam) (interface{ return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_campaigns/api_un_schedule_campaign.go b/rest/api/v3/lmc_campaigns/api_un_schedule_campaign.go index 5f5b5d31..85ac977f 100644 --- a/rest/api/v3/lmc_campaigns/api_un_schedule_campaign.go +++ b/rest/api/v3/lmc_campaigns/api_un_schedule_campaign.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -74,5 +75,5 @@ func (c *ApiService) UnScheduleCampaign(params *UnScheduleCampaignParam) (interf return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_campaigns/api_update_campaign.go b/rest/api/v3/lmc_campaigns/api_update_campaign.go index 98d6f597..735592ad 100644 --- a/rest/api/v3/lmc_campaigns/api_update_campaign.go +++ b/rest/api/v3/lmc_campaigns/api_update_campaign.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -113,5 +114,5 @@ func (c *ApiService) UpdateCampaign(params *UpdateCampaignParam) (interface{}, e return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_campaigns/api_update_scheduled_campaign.go b/rest/api/v3/lmc_campaigns/api_update_scheduled_campaign.go index ebb4da29..f65d89f2 100644 --- a/rest/api/v3/lmc_campaigns/api_update_scheduled_campaign.go +++ b/rest/api/v3/lmc_campaigns/api_update_scheduled_campaign.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -105,5 +106,5 @@ func (c *ApiService) UpdateScheduledCampaign(params *UpdateScheduledCampaignPara return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/README.md b/rest/api/v3/lmc_contactdb/README.md index 26c0cbfd..dec47a73 100644 --- a/rest/api/v3/lmc_contactdb/README.md +++ b/rest/api/v3/lmc_contactdb/README.md @@ -9,7 +9,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:43.558402+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:37.593437+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/lmc_contactdb/api_add_recipient.go b/rest/api/v3/lmc_contactdb/api_add_recipient.go index acc797b0..9c30bb60 100644 --- a/rest/api/v3/lmc_contactdb/api_add_recipient.go +++ b/rest/api/v3/lmc_contactdb/api_add_recipient.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -85,5 +86,5 @@ func (c *ApiService) AddRecipient(params *AddRecipientParam) (interface{}, error return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_add_recipient_to_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_add_recipient_to_contact_db_list.go index 537230e9..3c477977 100644 --- a/rest/api/v3/lmc_contactdb/api_add_recipient_to_contact_db_list.go +++ b/rest/api/v3/lmc_contactdb/api_add_recipient_to_contact_db_list.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -91,5 +92,5 @@ func (c *ApiService) AddRecipientToContactDbList(params *AddRecipientToContactDb return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_add_recipients_to_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_add_recipients_to_contact_db_list.go index 28277d7b..b9093241 100644 --- a/rest/api/v3/lmc_contactdb/api_add_recipients_to_contact_db_list.go +++ b/rest/api/v3/lmc_contactdb/api_add_recipients_to_contact_db_list.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -97,5 +98,5 @@ func (c *ApiService) AddRecipientsToContactDbList(params *AddRecipientsToContact return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_create_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_create_contact_db_list.go index d9fde69b..5616623b 100644 --- a/rest/api/v3/lmc_contactdb/api_create_contact_db_list.go +++ b/rest/api/v3/lmc_contactdb/api_create_contact_db_list.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -85,5 +86,5 @@ func (c *ApiService) CreateContactDbList(params *CreateContactDbListParam) (inte return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_create_custom_field.go b/rest/api/v3/lmc_contactdb/api_create_custom_field.go index 6e6a8d32..0afd7372 100644 --- a/rest/api/v3/lmc_contactdb/api_create_custom_field.go +++ b/rest/api/v3/lmc_contactdb/api_create_custom_field.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -77,5 +78,5 @@ func (c *ApiService) CreateCustomField(params *CreateCustomFieldParam) (interfac return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_create_segment.go b/rest/api/v3/lmc_contactdb/api_create_segment.go index 5ba66b40..c5c0786d 100644 --- a/rest/api/v3/lmc_contactdb/api_create_segment.go +++ b/rest/api/v3/lmc_contactdb/api_create_segment.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -85,5 +86,5 @@ func (c *ApiService) CreateSegment(params *CreateSegmentParam) (interface{}, err return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_delete_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_delete_contact_db_list.go index 5300fcdc..51a8f0f7 100644 --- a/rest/api/v3/lmc_contactdb/api_delete_contact_db_list.go +++ b/rest/api/v3/lmc_contactdb/api_delete_contact_db_list.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -106,5 +107,5 @@ func (c *ApiService) DeleteContactDbList(params *DeleteContactDbListParam) (inte return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_delete_contact_db_lists.go b/rest/api/v3/lmc_contactdb/api_delete_contact_db_lists.go index 9698ecdf..9135bcb7 100644 --- a/rest/api/v3/lmc_contactdb/api_delete_contact_db_lists.go +++ b/rest/api/v3/lmc_contactdb/api_delete_contact_db_lists.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -77,5 +78,5 @@ func (c *ApiService) DeleteContactDbLists(params *DeleteContactDbListsParam) (in return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_delete_custom_field.go b/rest/api/v3/lmc_contactdb/api_delete_custom_field.go index 132d5593..759d208f 100644 --- a/rest/api/v3/lmc_contactdb/api_delete_custom_field.go +++ b/rest/api/v3/lmc_contactdb/api_delete_custom_field.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -90,5 +91,5 @@ func (c *ApiService) DeleteCustomField(params *DeleteCustomFieldParam) (interfac return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_delete_recipient.go b/rest/api/v3/lmc_contactdb/api_delete_recipient.go index f6b2d8d3..d018f459 100644 --- a/rest/api/v3/lmc_contactdb/api_delete_recipient.go +++ b/rest/api/v3/lmc_contactdb/api_delete_recipient.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -89,5 +90,5 @@ func (c *ApiService) DeleteRecipient(params *DeleteRecipientParam) (interface{}, return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_delete_recipient_from_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_delete_recipient_from_contact_db_list.go index 8a2c129e..9a24b5f0 100644 --- a/rest/api/v3/lmc_contactdb/api_delete_recipient_from_contact_db_list.go +++ b/rest/api/v3/lmc_contactdb/api_delete_recipient_from_contact_db_list.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -106,5 +107,5 @@ func (c *ApiService) DeleteRecipientFromContactDbList(params *DeleteRecipientFro return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_delete_recipients.go b/rest/api/v3/lmc_contactdb/api_delete_recipients.go index db2072e4..aab5d577 100644 --- a/rest/api/v3/lmc_contactdb/api_delete_recipients.go +++ b/rest/api/v3/lmc_contactdb/api_delete_recipients.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -85,5 +86,5 @@ func (c *ApiService) DeleteRecipients(params *DeleteRecipientsParam) (interface{ return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_delete_segment.go b/rest/api/v3/lmc_contactdb/api_delete_segment.go index bf6607cd..741655e1 100644 --- a/rest/api/v3/lmc_contactdb/api_delete_segment.go +++ b/rest/api/v3/lmc_contactdb/api_delete_segment.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -106,5 +107,5 @@ func (c *ApiService) DeleteSegment(params *DeleteSegmentParam) (interface{}, err return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_get_billable.go b/rest/api/v3/lmc_contactdb/api_get_billable.go index 78a99ca0..67af047f 100644 --- a/rest/api/v3/lmc_contactdb/api_get_billable.go +++ b/rest/api/v3/lmc_contactdb/api_get_billable.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -62,5 +63,5 @@ func (c *ApiService) GetBillable(params *GetBillableParam) (interface{}, error) return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_get_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_get_contact_db_list.go index 9fa22f4f..5caec2f1 100644 --- a/rest/api/v3/lmc_contactdb/api_get_contact_db_list.go +++ b/rest/api/v3/lmc_contactdb/api_get_contact_db_list.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -90,5 +91,5 @@ func (c *ApiService) GetContactDbList(params *GetContactDbListParam) (interface{ return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_get_custom_field.go b/rest/api/v3/lmc_contactdb/api_get_custom_field.go index 4bccbaa4..de6dc76b 100644 --- a/rest/api/v3/lmc_contactdb/api_get_custom_field.go +++ b/rest/api/v3/lmc_contactdb/api_get_custom_field.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -90,5 +91,5 @@ func (c *ApiService) GetCustomField(params *GetCustomFieldParam) (interface{}, e return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_get_recipient.go b/rest/api/v3/lmc_contactdb/api_get_recipient.go index 8368814a..27ccf5c5 100644 --- a/rest/api/v3/lmc_contactdb/api_get_recipient.go +++ b/rest/api/v3/lmc_contactdb/api_get_recipient.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -89,5 +90,5 @@ func (c *ApiService) GetRecipient(params *GetRecipientParam) (interface{}, error return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_get_recipient_list.go b/rest/api/v3/lmc_contactdb/api_get_recipient_list.go index 4307012a..90f94199 100644 --- a/rest/api/v3/lmc_contactdb/api_get_recipient_list.go +++ b/rest/api/v3/lmc_contactdb/api_get_recipient_list.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -89,5 +90,5 @@ func (c *ApiService) GetRecipientList(params *GetRecipientListParam) (interface{ return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_get_segment.go b/rest/api/v3/lmc_contactdb/api_get_segment.go index 668df630..a7598d9d 100644 --- a/rest/api/v3/lmc_contactdb/api_get_segment.go +++ b/rest/api/v3/lmc_contactdb/api_get_segment.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -90,5 +91,5 @@ func (c *ApiService) GetSegment(params *GetSegmentParam) (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_list_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_list_contact_db_list.go index fc1bb3af..ba280d54 100644 --- a/rest/api/v3/lmc_contactdb/api_list_contact_db_list.go +++ b/rest/api/v3/lmc_contactdb/api_list_contact_db_list.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -54,5 +55,5 @@ func (c *ApiService) ListContactDbList(params *ListContactDbListParam) (interfac return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_list_custom_field.go b/rest/api/v3/lmc_contactdb/api_list_custom_field.go index 90c3c9bd..41457f8c 100644 --- a/rest/api/v3/lmc_contactdb/api_list_custom_field.go +++ b/rest/api/v3/lmc_contactdb/api_list_custom_field.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -62,5 +63,5 @@ func (c *ApiService) ListCustomField(params *ListCustomFieldParam) (interface{}, return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_list_recipient.go b/rest/api/v3/lmc_contactdb/api_list_recipient.go index db2700e1..6cfe15d2 100644 --- a/rest/api/v3/lmc_contactdb/api_list_recipient.go +++ b/rest/api/v3/lmc_contactdb/api_list_recipient.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -90,5 +91,5 @@ func (c *ApiService) ListRecipient(params *ListRecipientParam) (interface{}, err return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_list_recipient_count.go b/rest/api/v3/lmc_contactdb/api_list_recipient_count.go index 68baf731..8e95f626 100644 --- a/rest/api/v3/lmc_contactdb/api_list_recipient_count.go +++ b/rest/api/v3/lmc_contactdb/api_list_recipient_count.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -62,5 +63,5 @@ func (c *ApiService) ListRecipientCount(params *ListRecipientCountParam) (interf return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_list_recipient_for_segment.go b/rest/api/v3/lmc_contactdb/api_list_recipient_for_segment.go index 3d7a5857..98350a33 100644 --- a/rest/api/v3/lmc_contactdb/api_list_recipient_for_segment.go +++ b/rest/api/v3/lmc_contactdb/api_list_recipient_for_segment.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -109,5 +110,5 @@ func (c *ApiService) ListRecipientForSegment(params *ListRecipientForSegmentPara return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_list_recipients_from_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_list_recipients_from_contact_db_list.go index b4d2bdf8..b0154e82 100644 --- a/rest/api/v3/lmc_contactdb/api_list_recipients_from_contact_db_list.go +++ b/rest/api/v3/lmc_contactdb/api_list_recipients_from_contact_db_list.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -101,5 +102,5 @@ func (c *ApiService) ListRecipientsFromContactDbList(params *ListRecipientsFromC return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_list_reserved_field.go b/rest/api/v3/lmc_contactdb/api_list_reserved_field.go index 52c27544..542cc371 100644 --- a/rest/api/v3/lmc_contactdb/api_list_reserved_field.go +++ b/rest/api/v3/lmc_contactdb/api_list_reserved_field.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -62,5 +63,5 @@ func (c *ApiService) ListReservedField(params *ListReservedFieldParam) (interfac return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_list_search_recipient.go b/rest/api/v3/lmc_contactdb/api_list_search_recipient.go index 1818c824..b0f1d9de 100644 --- a/rest/api/v3/lmc_contactdb/api_list_search_recipient.go +++ b/rest/api/v3/lmc_contactdb/api_list_search_recipient.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -80,5 +81,5 @@ func (c *ApiService) ListSearchRecipient(params *ListSearchRecipientParam) (inte return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_list_segment.go b/rest/api/v3/lmc_contactdb/api_list_segment.go index 5f969fda..f200060f 100644 --- a/rest/api/v3/lmc_contactdb/api_list_segment.go +++ b/rest/api/v3/lmc_contactdb/api_list_segment.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -62,5 +63,5 @@ func (c *ApiService) ListSegment(params *ListSegmentParam) (interface{}, error) return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_list_status.go b/rest/api/v3/lmc_contactdb/api_list_status.go index 4ea4c9da..612c9419 100644 --- a/rest/api/v3/lmc_contactdb/api_list_status.go +++ b/rest/api/v3/lmc_contactdb/api_list_status.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -54,5 +55,5 @@ func (c *ApiService) ListStatus(params *ListStatusParam) (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_search_recipient.go b/rest/api/v3/lmc_contactdb/api_search_recipient.go index a63395e1..28727db1 100644 --- a/rest/api/v3/lmc_contactdb/api_search_recipient.go +++ b/rest/api/v3/lmc_contactdb/api_search_recipient.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -60,5 +61,5 @@ func (c *ApiService) SearchRecipient(params *SearchRecipientParam) (interface{}, return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_update_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_update_contact_db_list.go index fea0cc3a..d75d2327 100644 --- a/rest/api/v3/lmc_contactdb/api_update_contact_db_list.go +++ b/rest/api/v3/lmc_contactdb/api_update_contact_db_list.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -97,5 +98,5 @@ func (c *ApiService) UpdateContactDbList(params *UpdateContactDbListParam) (inte return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_update_recipient.go b/rest/api/v3/lmc_contactdb/api_update_recipient.go index 7399c4ef..3d69b3be 100644 --- a/rest/api/v3/lmc_contactdb/api_update_recipient.go +++ b/rest/api/v3/lmc_contactdb/api_update_recipient.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -85,5 +86,5 @@ func (c *ApiService) UpdateRecipient(params *UpdateRecipientParam) (interface{}, return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_contactdb/api_update_segment.go b/rest/api/v3/lmc_contactdb/api_update_segment.go index 10340563..7e8c754a 100644 --- a/rest/api/v3/lmc_contactdb/api_update_segment.go +++ b/rest/api/v3/lmc_contactdb/api_update_segment.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -97,5 +98,5 @@ func (c *ApiService) UpdateSegment(params *UpdateSegmentParam) (interface{}, err return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_senders/README.md b/rest/api/v3/lmc_senders/README.md index ef51bf59..c185bc2a 100644 --- a/rest/api/v3/lmc_senders/README.md +++ b/rest/api/v3/lmc_senders/README.md @@ -9,7 +9,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:43.517039+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:37.552401+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/lmc_senders/api_create_sender.go b/rest/api/v3/lmc_senders/api_create_sender.go index 02c7bd06..942e6c56 100644 --- a/rest/api/v3/lmc_senders/api_create_sender.go +++ b/rest/api/v3/lmc_senders/api_create_sender.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -77,5 +78,5 @@ func (c *ApiService) CreateSender(params *CreateSenderParam) (interface{}, error return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_senders/api_delete_sender.go b/rest/api/v3/lmc_senders/api_delete_sender.go index 0324940b..b072b7f6 100644 --- a/rest/api/v3/lmc_senders/api_delete_sender.go +++ b/rest/api/v3/lmc_senders/api_delete_sender.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -82,5 +83,5 @@ func (c *ApiService) DeleteSender(params *DeleteSenderParam) (interface{}, error return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_senders/api_get_sender.go b/rest/api/v3/lmc_senders/api_get_sender.go index 3f95a9ba..5d2ae68b 100644 --- a/rest/api/v3/lmc_senders/api_get_sender.go +++ b/rest/api/v3/lmc_senders/api_get_sender.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -74,5 +75,5 @@ func (c *ApiService) GetSender(params *GetSenderParam) (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_senders/api_list_sender.go b/rest/api/v3/lmc_senders/api_list_sender.go index 6c4ca9cd..2b81f7bd 100644 --- a/rest/api/v3/lmc_senders/api_list_sender.go +++ b/rest/api/v3/lmc_senders/api_list_sender.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -54,5 +55,5 @@ func (c *ApiService) ListSender(params *ListSenderParam) (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_senders/api_reset_sender_verification.go b/rest/api/v3/lmc_senders/api_reset_sender_verification.go index 13aaa1bd..e3d3ece3 100644 --- a/rest/api/v3/lmc_senders/api_reset_sender_verification.go +++ b/rest/api/v3/lmc_senders/api_reset_sender_verification.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -82,5 +83,5 @@ func (c *ApiService) ResetSenderVerification(params *ResetSenderVerificationPara return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/lmc_senders/api_update_sender.go b/rest/api/v3/lmc_senders/api_update_sender.go index 5c954105..68789162 100644 --- a/rest/api/v3/lmc_senders/api_update_sender.go +++ b/rest/api/v3/lmc_senders/api_update_sender.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -105,5 +106,5 @@ func (c *ApiService) UpdateSender(params *UpdateSenderParam) (interface{}, error return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mail/README.md b/rest/api/v3/mail/README.md index d368a329..0f785950 100644 --- a/rest/api/v3/mail/README.md +++ b/rest/api/v3/mail/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:44.024951+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:37.974449+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/mail/api_create_mail_batch.go b/rest/api/v3/mail/api_create_mail_batch.go index 8b28bd2f..d18fdc47 100644 --- a/rest/api/v3/mail/api_create_mail_batch.go +++ b/rest/api/v3/mail/api_create_mail_batch.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -102,5 +103,5 @@ func (c *ApiService) CreateMailBatch(params *CreateMailBatchParam) (interface{}, return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mail/api_get_mail_batch.go b/rest/api/v3/mail/api_get_mail_batch.go index 30c4ca73..ef16d225 100644 --- a/rest/api/v3/mail/api_get_mail_batch.go +++ b/rest/api/v3/mail/api_get_mail_batch.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -94,5 +95,5 @@ func (c *ApiService) GetMailBatch(params *GetMailBatchParam) (interface{}, error return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mail/api_send_mail.go b/rest/api/v3/mail/api_send_mail.go index 94051265..e697d176 100644 --- a/rest/api/v3/mail/api_send_mail.go +++ b/rest/api/v3/mail/api_send_mail.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -117,5 +118,5 @@ func (c *ApiService) SendMail(params *SendMailParam) (interface{}, error) { return ps, err } - return nil, nil + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil } diff --git a/rest/api/v3/mail_settings/README.md b/rest/api/v3/mail_settings/README.md index 3bb27e29..25ab6357 100644 --- a/rest/api/v3/mail_settings/README.md +++ b/rest/api/v3/mail_settings/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:44.028733+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:37.970102+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/mail_settings/api_list_address_whitelist.go b/rest/api/v3/mail_settings/api_list_address_whitelist.go index 13dade03..6929ed4f 100644 --- a/rest/api/v3/mail_settings/api_list_address_whitelist.go +++ b/rest/api/v3/mail_settings/api_list_address_whitelist.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -54,5 +55,5 @@ func (c *ApiService) ListAddressWhitelist(params *ListAddressWhitelistParam) (in return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mail_settings/api_list_bounce_purge.go b/rest/api/v3/mail_settings/api_list_bounce_purge.go index c1611625..0bea59cb 100644 --- a/rest/api/v3/mail_settings/api_list_bounce_purge.go +++ b/rest/api/v3/mail_settings/api_list_bounce_purge.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -54,5 +55,5 @@ func (c *ApiService) ListBouncePurge(params *ListBouncePurgeParam) (interface{}, return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mail_settings/api_list_footer.go b/rest/api/v3/mail_settings/api_list_footer.go index d1c8cab0..d4b4fa9b 100644 --- a/rest/api/v3/mail_settings/api_list_footer.go +++ b/rest/api/v3/mail_settings/api_list_footer.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -54,5 +55,5 @@ func (c *ApiService) ListFooter(params *ListFooterParam) (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mail_settings/api_list_forward_bounce.go b/rest/api/v3/mail_settings/api_list_forward_bounce.go index b6113625..0174fbe2 100644 --- a/rest/api/v3/mail_settings/api_list_forward_bounce.go +++ b/rest/api/v3/mail_settings/api_list_forward_bounce.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -54,5 +55,5 @@ func (c *ApiService) ListForwardBounce(params *ListForwardBounceParam) (interfac return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mail_settings/api_list_forward_spam.go b/rest/api/v3/mail_settings/api_list_forward_spam.go index c8fb14ac..da7a0f15 100644 --- a/rest/api/v3/mail_settings/api_list_forward_spam.go +++ b/rest/api/v3/mail_settings/api_list_forward_spam.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -54,5 +55,5 @@ func (c *ApiService) ListForwardSpam(params *ListForwardSpamParam) (interface{}, return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mail_settings/api_list_mail_setting.go b/rest/api/v3/mail_settings/api_list_mail_setting.go index 25a5b6e1..926c57c4 100644 --- a/rest/api/v3/mail_settings/api_list_mail_setting.go +++ b/rest/api/v3/mail_settings/api_list_mail_setting.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -74,5 +75,5 @@ func (c *ApiService) ListMailSetting(params *ListMailSettingParam) (interface{}, return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mail_settings/api_list_template.go b/rest/api/v3/mail_settings/api_list_template.go index 76783e88..a0634b10 100644 --- a/rest/api/v3/mail_settings/api_list_template.go +++ b/rest/api/v3/mail_settings/api_list_template.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -54,5 +55,5 @@ func (c *ApiService) ListTemplate(params *ListTemplateParam) (interface{}, error return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mail_settings/api_update_address_whitelist.go b/rest/api/v3/mail_settings/api_update_address_whitelist.go index 9c9381f7..b57d5b2d 100644 --- a/rest/api/v3/mail_settings/api_update_address_whitelist.go +++ b/rest/api/v3/mail_settings/api_update_address_whitelist.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -69,5 +70,5 @@ func (c *ApiService) UpdateAddressWhitelist(params *UpdateAddressWhitelistParam) return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mail_settings/api_update_bounce_purge.go b/rest/api/v3/mail_settings/api_update_bounce_purge.go index 8f99dbe9..73420cd1 100644 --- a/rest/api/v3/mail_settings/api_update_bounce_purge.go +++ b/rest/api/v3/mail_settings/api_update_bounce_purge.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -69,5 +70,5 @@ func (c *ApiService) UpdateBouncePurge(params *UpdateBouncePurgeParam) (interfac return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mail_settings/api_update_footer.go b/rest/api/v3/mail_settings/api_update_footer.go index 32551254..0a10a4c5 100644 --- a/rest/api/v3/mail_settings/api_update_footer.go +++ b/rest/api/v3/mail_settings/api_update_footer.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -69,5 +70,5 @@ func (c *ApiService) UpdateFooter(params *UpdateFooterParam) (interface{}, error return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mail_settings/api_update_forward_bounce.go b/rest/api/v3/mail_settings/api_update_forward_bounce.go index 797b2a04..1d9950cc 100644 --- a/rest/api/v3/mail_settings/api_update_forward_bounce.go +++ b/rest/api/v3/mail_settings/api_update_forward_bounce.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -69,5 +70,5 @@ func (c *ApiService) UpdateForwardBounce(params *UpdateForwardBounceParam) (inte return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mail_settings/api_update_forward_spam.go b/rest/api/v3/mail_settings/api_update_forward_spam.go index dbc04c1b..2a5ea1d6 100644 --- a/rest/api/v3/mail_settings/api_update_forward_spam.go +++ b/rest/api/v3/mail_settings/api_update_forward_spam.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -69,5 +70,5 @@ func (c *ApiService) UpdateForwardSpam(params *UpdateForwardSpamParam) (interfac return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mail_settings/api_update_template.go b/rest/api/v3/mail_settings/api_update_template.go index 72091647..56a5d2f0 100644 --- a/rest/api/v3/mail_settings/api_update_template.go +++ b/rest/api/v3/mail_settings/api_update_template.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -69,5 +70,5 @@ func (c *ApiService) UpdateTemplate(params *UpdateTemplateParam) (interface{}, e return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_contacts/.openapi-generator b/rest/api/v3/mc_contacts/.openapi-generator new file mode 100644 index 00000000..657d7e47 --- /dev/null +++ b/rest/api/v3/mc_contacts/.openapi-generator @@ -0,0 +1,145 @@ +.openapi-generator +README.md +api_delete_contact.go +api_delete_contact_identifier.go +api_export_contact.go +api_get_contact.go +api_get_contact_by_identifiers.go +api_get_export_contact.go +api_get_import_contact.go +api_import_contact.go +api_list_batched_contact.go +api_list_contact.go +api_list_contact_by_email.go +api_list_contact_count.go +api_list_export_contact.go +api_search_contact.go +api_service.go +api_update_contact.go +docs/ContactDetails3.md +docs/ContactExport.md +docs/ContactImport.md +docs/ContactImportResults.md +docs/ContactRequest.md +docs/ContactRequestCustomFields.md +docs/ContactsError.md +docs/DeleteContact.md +docs/DeleteContact202Response.md +docs/DeleteContact400Response.md +docs/DeleteContactIdentifier.md +docs/DeleteContactIdentifier202Response.md +docs/DeleteContactIdentifierRequest.md +docs/ErrorResponse.md +docs/ErrorResponseErrorsInner.md +docs/ExportContact.md +docs/ExportContact202Response.md +docs/ExportContactRequest.md +docs/ExportContactRequestNotifications.md +docs/FileType.md +docs/FileType1.md +docs/GetContact.md +docs/GetContactByIdentifiers.md +docs/GetContactByIdentifiers200Response.md +docs/GetContactByIdentifiers200ResponseResultValue.md +docs/GetContactByIdentifiersRequest.md +docs/GetContactByIdentifiersRequestIdentifiersInner.md +docs/GetExportContact.md +docs/GetImportContact.md +docs/GetImportContact400Response.md +docs/IdentifierType.md +docs/IdentifierType1.md +docs/ImportContact.md +docs/ImportContact200Response.md +docs/ImportContact200ResponseUploadHeadersInner.md +docs/ImportContact400Response.md +docs/ImportContact404Response.md +docs/ImportContactRequest.md +docs/ListBatchedContact.md +docs/ListBatchedContact200Response.md +docs/ListBatchedContactRequest.md +docs/ListContact.md +docs/ListContact200Response.md +docs/ListContact400Response.md +docs/ListContactByEmail.md +docs/ListContactByEmail200Response.md +docs/ListContactByEmailRequest.md +docs/ListContactCount.md +docs/ListContactCount200Response.md +docs/ListContactCount200ResponseBillableBreakdown.md +docs/ListExportContact.md +docs/ListExportContact200Response.md +docs/ListExportContact200ResponseMetadata.md +docs/ListExportContact200ResponseResultInner.md +docs/ListExportContact200ResponseResultInnerMetadata.md +docs/ListExportContact200ResponseResultInnerSegmentsInner.md +docs/ListExportContact400Response.md +docs/ListExportContact400ResponseErrorsInner.md +docs/Metadata.md +docs/SearchContact.md +docs/SearchContact200Response.md +docs/SearchContact400Response.md +docs/SearchContact400ResponseErrorsInner.md +docs/SearchContact500Response.md +docs/SearchContact500ResponseErrorsInner.md +docs/SearchContactRequest.md +docs/SelfMetadata.md +docs/Status.md +docs/UpdateContact.md +docs/UpdateContact202Response.md +docs/UpdateContactRequest.md +model_contact_details3.go +model_contact_export.go +model_contact_import.go +model_contact_import_results.go +model_contact_request.go +model_contact_request_custom_fields.go +model_contacts_error.go +model_delete_contact_202_response.go +model_delete_contact_400_response.go +model_delete_contact_identifier_202_response.go +model_delete_contact_identifier_request.go +model_error_response.go +model_error_response_errors_inner.go +model_export_contact_202_response.go +model_export_contact_request.go +model_export_contact_request_notifications.go +model_file_type.go +model_file_type1.go +model_get_contact_by_identifiers_200_response.go +model_get_contact_by_identifiers_200_response_result_value.go +model_get_contact_by_identifiers_request.go +model_get_contact_by_identifiers_request_identifiers_inner.go +model_get_import_contact_400_response.go +model_identifier_type.go +model_identifier_type1.go +model_import_contact_200_response.go +model_import_contact_200_response_upload_headers_inner.go +model_import_contact_400_response.go +model_import_contact_404_response.go +model_import_contact_request.go +model_list_batched_contact_200_response.go +model_list_batched_contact_request.go +model_list_contact_200_response.go +model_list_contact_400_response.go +model_list_contact_by_email_200_response.go +model_list_contact_by_email_request.go +model_list_contact_count_200_response.go +model_list_contact_count_200_response_billable_breakdown.go +model_list_export_contact_200_response.go +model_list_export_contact_200_response__metadata.go +model_list_export_contact_200_response_result_inner.go +model_list_export_contact_200_response_result_inner__metadata.go +model_list_export_contact_200_response_result_inner_segments_inner.go +model_list_export_contact_400_response.go +model_list_export_contact_400_response_errors_inner.go +model_metadata.go +model_search_contact_200_response.go +model_search_contact_400_response.go +model_search_contact_400_response_errors_inner.go +model_search_contact_500_response.go +model_search_contact_500_response_errors_inner.go +model_search_contact_request.go +model_self_metadata.go +model_status.go +model_update_contact_202_response.go +model_update_contact_request.go diff --git a/rest/api/v3/mc_designs/.openapi-generator-ignore b/rest/api/v3/mc_contacts/.openapi-generator-ignore similarity index 100% rename from rest/api/v3/mc_designs/.openapi-generator-ignore rename to rest/api/v3/mc_contacts/.openapi-generator-ignore diff --git a/rest/api/v3/mc_contacts/README.md b/rest/api/v3/mc_contacts/README.md new file mode 100644 index 00000000..36cb7f44 --- /dev/null +++ b/rest/api/v3/mc_contacts/README.md @@ -0,0 +1,131 @@ +# Go API client for + +The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). + +You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T16:57:38.063963+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DeleteContact* | [**DeleteContact**](docs/DeleteContact.md#deletecontact) | **Delete** /v3/marketing/contacts | Delete Contacts +*DeleteContactIdentifier* | [**DeleteContactIdentifier**](docs/DeleteContactIdentifier.md#deletecontactidentifier) | **Delete** /v3/marketing/contacts/{ContactId}/identifiers | Delete a Contact Identifier +*ExportContact* | [**ExportContact**](docs/ExportContact.md#exportcontact) | **Post** /v3/marketing/contacts/exports | Export Contacts +*GetContact* | [**GetContact**](docs/GetContact.md#getcontact) | **Get** /v3/marketing/contacts/{Id} | Get a Contact by ID +*GetContactByIdentifiers* | [**GetContactByIdentifiers**](docs/GetContactByIdentifiers.md#getcontactbyidentifiers) | **Post** /v3/marketing/contacts/search/identifiers/{IdentifierType} | Get Contacts by Identifiers +*GetExportContact* | [**GetExportContact**](docs/GetExportContact.md#getexportcontact) | **Get** /v3/marketing/contacts/exports/{Id} | Export Contacts Status +*GetImportContact* | [**GetImportContact**](docs/GetImportContact.md#getimportcontact) | **Get** /v3/marketing/contacts/imports/{Id} | Import Contacts Status +*ImportContact* | [**ImportContact**](docs/ImportContact.md#importcontact) | **Put** /v3/marketing/contacts/imports | Import Contacts +*ListBatchedContact* | [**ListBatchedContact**](docs/ListBatchedContact.md#listbatchedcontact) | **Post** /v3/marketing/contacts/batch | Get Batched Contacts by IDs +*ListContact* | [**ListContact**](docs/ListContact.md#listcontact) | **Get** /v3/marketing/contacts | Get Sample Contacts +*ListContactByEmail* | [**ListContactByEmail**](docs/ListContactByEmail.md#listcontactbyemail) | **Post** /v3/marketing/contacts/search/emails | Get Contacts by Emails +*ListContactCount* | [**ListContactCount**](docs/ListContactCount.md#listcontactcount) | **Get** /v3/marketing/contacts/count | Get Total Contact Count +*ListExportContact* | [**ListExportContact**](docs/ListExportContact.md#listexportcontact) | **Get** /v3/marketing/contacts/exports | Get All Existing Exports +*SearchContact* | [**SearchContact**](docs/SearchContact.md#searchcontact) | **Post** /v3/marketing/contacts/search | Search Contacts +*UpdateContact* | [**UpdateContact**](docs/UpdateContact.md#updatecontact) | **Put** /v3/marketing/contacts | Add or Update a Contact + + +## Documentation For Models + + - [ContactDetails3](ContactDetails3.md) + - [ContactExport](ContactExport.md) + - [ContactImport](ContactImport.md) + - [ContactImportResults](ContactImportResults.md) + - [ContactRequest](ContactRequest.md) + - [ContactRequestCustomFields](ContactRequestCustomFields.md) + - [ContactsError](ContactsError.md) + - [DeleteContact202Response](DeleteContact202Response.md) + - [DeleteContact400Response](DeleteContact400Response.md) + - [DeleteContactIdentifier202Response](DeleteContactIdentifier202Response.md) + - [DeleteContactIdentifierRequest](DeleteContactIdentifierRequest.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [ExportContact202Response](ExportContact202Response.md) + - [ExportContactRequest](ExportContactRequest.md) + - [ExportContactRequestNotifications](ExportContactRequestNotifications.md) + - [FileType](FileType.md) + - [FileType1](FileType1.md) + - [GetContactByIdentifiers200Response](GetContactByIdentifiers200Response.md) + - [GetContactByIdentifiers200ResponseResultValue](GetContactByIdentifiers200ResponseResultValue.md) + - [GetContactByIdentifiersRequest](GetContactByIdentifiersRequest.md) + - [GetContactByIdentifiersRequestIdentifiersInner](GetContactByIdentifiersRequestIdentifiersInner.md) + - [GetImportContact400Response](GetImportContact400Response.md) + - [IdentifierType](IdentifierType.md) + - [IdentifierType1](IdentifierType1.md) + - [ImportContact200Response](ImportContact200Response.md) + - [ImportContact200ResponseUploadHeadersInner](ImportContact200ResponseUploadHeadersInner.md) + - [ImportContact400Response](ImportContact400Response.md) + - [ImportContact404Response](ImportContact404Response.md) + - [ImportContactRequest](ImportContactRequest.md) + - [ListBatchedContact200Response](ListBatchedContact200Response.md) + - [ListBatchedContactRequest](ListBatchedContactRequest.md) + - [ListContact200Response](ListContact200Response.md) + - [ListContact400Response](ListContact400Response.md) + - [ListContactByEmail200Response](ListContactByEmail200Response.md) + - [ListContactByEmailRequest](ListContactByEmailRequest.md) + - [ListContactCount200Response](ListContactCount200Response.md) + - [ListContactCount200ResponseBillableBreakdown](ListContactCount200ResponseBillableBreakdown.md) + - [ListExportContact200Response](ListExportContact200Response.md) + - [ListExportContact200ResponseMetadata](ListExportContact200ResponseMetadata.md) + - [ListExportContact200ResponseResultInner](ListExportContact200ResponseResultInner.md) + - [ListExportContact200ResponseResultInnerMetadata](ListExportContact200ResponseResultInnerMetadata.md) + - [ListExportContact200ResponseResultInnerSegmentsInner](ListExportContact200ResponseResultInnerSegmentsInner.md) + - [ListExportContact400Response](ListExportContact400Response.md) + - [ListExportContact400ResponseErrorsInner](ListExportContact400ResponseErrorsInner.md) + - [Metadata](Metadata.md) + - [SearchContact200Response](SearchContact200Response.md) + - [SearchContact400Response](SearchContact400Response.md) + - [SearchContact400ResponseErrorsInner](SearchContact400ResponseErrorsInner.md) + - [SearchContact500Response](SearchContact500Response.md) + - [SearchContact500ResponseErrorsInner](SearchContact500ResponseErrorsInner.md) + - [SearchContactRequest](SearchContactRequest.md) + - [SelfMetadata](SelfMetadata.md) + - [Status](Status.md) + - [UpdateContact202Response](UpdateContact202Response.md) + - [UpdateContactRequest](UpdateContactRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/mc_contacts/api_delete_contact.go b/rest/api/v3/mc_contacts/api_delete_contact.go new file mode 100644 index 00000000..d75f1583 --- /dev/null +++ b/rest/api/v3/mc_contacts/api_delete_contact.go @@ -0,0 +1,109 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type DeleteContactParam struct { + // Must be set to `\"true\"` to delete all contacts. + DeleteAllContacts *string `json:"delete_all_contacts,omitempty"` + // A comma-separated list of contact IDs. + Ids *string `json:"ids,omitempty"` +} + +func (params *DeleteContactParam) SetDeleteAllContacts(DeleteAllContacts string) *DeleteContactParam { + params.DeleteAllContacts = &DeleteAllContacts + return params +} +func (params *DeleteContactParam) SetIds(Ids string) *DeleteContactParam { + params.Ids = &Ids + return params +} + +// **This endpoint can be used to delete one or more contacts**. The query parameter `ids` must set to a comma-separated list of contact IDs for bulk contact deletion. The query parameter `delete_all_contacts` must be set to `\"true\"` to delete **all** contacts. You must set either `ids` or `delete_all_contacts`. Deletion jobs are processed asynchronously. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. +func (c *ApiService) DeleteContact(params *DeleteContactParam) (interface{}, error) { + path := "/v3/marketing/contacts" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.DeleteAllContacts != nil { + data.Set("delete_all_contacts", *params.DeleteAllContacts) + } + if params != nil && params.Ids != nil { + data.Set("ids", *params.Ids) + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 202 { + ps := &DeleteContact202Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &DeleteContact400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &SearchContact500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/mc_contacts/api_delete_contact_identifier.go b/rest/api/v3/mc_contacts/api_delete_contact_identifier.go new file mode 100644 index 00000000..ab90f0a0 --- /dev/null +++ b/rest/api/v3/mc_contacts/api_delete_contact_identifier.go @@ -0,0 +1,116 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteContactIdentifierParam struct { + // Must be set to the `contact_id` of the contact you want to remove the identifier from. + ContactId *string `json:"contact_id"` + // + DeleteContactIdentifierRequest *DeleteContactIdentifierRequest `json:"DeleteContactIdentifierRequest,omitempty"` +} + +func (params *DeleteContactIdentifierParam) SetContactId(ContactId string) *DeleteContactIdentifierParam { + params.ContactId = &ContactId + return params +} +func (params *DeleteContactIdentifierParam) SetDeleteContactIdentifierRequest(DeleteContactIdentifierRequest DeleteContactIdentifierRequest) *DeleteContactIdentifierParam { + params.DeleteContactIdentifierRequest = &DeleteContactIdentifierRequest + return params +} + +// **This endpoint can be used to delete one identifier from a contact.** Deletion jobs are processed asynchronously. Note this is different from deleting a contact. If the contact has only one identifier, the asynchronous request will fail. All contacts are required to have at least one identifier. The request body field `identifier_type` must have a valid value of \"EMAIL\", \"PHONENUMBERID\", \"EXTERNALID\", or \"ANONYMOUSID\". +func (c *ApiService) DeleteContactIdentifier(params *DeleteContactIdentifierParam) (interface{}, error) { + path := "/v3/marketing/contacts/{ContactId}/identifiers" + if params != nil && params.ContactId != nil { + path = strings.Replace(path, "{"+"ContactId"+"}", *params.ContactId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.DeleteContactIdentifierRequest != nil { + b, err := json.Marshal(*params.DeleteContactIdentifierRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 202 { + ps := &DeleteContactIdentifier202Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &DeleteContact400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &SearchContact500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/mc_contacts/api_export_contact.go b/rest/api/v3/mc_contacts/api_export_contact.go new file mode 100644 index 00000000..45745506 --- /dev/null +++ b/rest/api/v3/mc_contacts/api_export_contact.go @@ -0,0 +1,105 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ExportContactParam struct { + // + ExportContactRequest *ExportContactRequest `json:"ExportContactRequest,omitempty"` +} + +func (params *ExportContactParam) SetExportContactRequest(ExportContactRequest ExportContactRequest) *ExportContactParam { + params.ExportContactRequest = &ExportContactRequest + return params +} + +// **Use this endpoint to export lists or segments of contacts**. If you would just like to have a link to the exported list sent to your email set the `notifications.email` option to `true` in the `POST` payload. If you would like to download the list, take the `id` that is returned and use the \"Export Contacts Status\" endpoint to get the `urls`. Once you have the list of URLs, make a `GET` request to each URL provided to download your CSV file(s). You specify the segments and or/contact lists you wish to export by providing the relevant IDs in, respectively, the `segment_ids` and `list_ids` fields in the request body. The lists will be provided in either JSON or CSV files. To specify which of these you would required, set the request body `file_type` field to `json` or `csv`. You can also specify a maximum file size (in MB). If the export file is larger than this, it will be split into multiple files. +func (c *ApiService) ExportContact(params *ExportContactParam) (interface{}, error) { + path := "/v3/marketing/contacts/exports" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.ExportContactRequest != nil { + b, err := json.Marshal(*params.ExportContactRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 202 { + ps := &ExportContact202Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ListContact400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &SearchContact500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/mc_contacts/api_get_contact.go b/rest/api/v3/mc_contacts/api_get_contact.go new file mode 100644 index 00000000..5d0fd75f --- /dev/null +++ b/rest/api/v3/mc_contacts/api_get_contact.go @@ -0,0 +1,85 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetContactParam struct { + // + Id *string `json:"id"` +} + +func (params *GetContactParam) SetId(Id string) *GetContactParam { + params.Id = &Id + return params +} + +// **This endpoint returns the full details and all fields for the specified contact**. The \"Get Contacts by Identifier\" endpoint can be used to get the ID of a contact. +func (c *ApiService) GetContact(params *GetContactParam) (interface{}, error) { + path := "/v3/marketing/contacts/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ContactDetails3{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &SearchContact500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/mc_contacts/api_get_contact_by_identifiers.go b/rest/api/v3/mc_contacts/api_get_contact_by_identifiers.go new file mode 100644 index 00000000..0dfe0069 --- /dev/null +++ b/rest/api/v3/mc_contacts/api_get_contact_by_identifiers.go @@ -0,0 +1,117 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type GetContactByIdentifiersParam struct { + // The type of identifier to search for. + IdentifierType *IdentifierType1 `json:"identifier_type"` + // + GetContactByIdentifiersRequest *GetContactByIdentifiersRequest `json:"GetContactByIdentifiersRequest,omitempty"` +} + +func (params *GetContactByIdentifiersParam) SetIdentifierType(IdentifierType IdentifierType1) *GetContactByIdentifiersParam { + params.IdentifierType = &IdentifierType + return params +} +func (params *GetContactByIdentifiersParam) SetGetContactByIdentifiersRequest(GetContactByIdentifiersRequest GetContactByIdentifiersRequest) *GetContactByIdentifiersParam { + params.GetContactByIdentifiersRequest = &GetContactByIdentifiersRequest + return params +} + +// **This endpoint allows you to retrieve up to 100 contacts matching the searched identifier values for one type of specified identifier.** `identifier_type` must be a valid identifier type: `email`, `phone_number_id`, `external_id`, or `anonymous_id`. This endpoint should be used in place of the [Search Contacts endpoint](https://www.twilio.com/docs/sendgrid/api-reference/contacts/search-contacts) when you can provide exact identifiers and do not need to include other [Segmentation Query Language (SGQL)](https://www.twilio.com/docs/sendgrid/for-developers/sending-email/segmentation-query-language/) filters when searching. This endpoint returns a `200` status code when any contacts match the identifiers you supplied. When searching multiple identifiers in a single request, it is possible that some will match a contact while others will not. When a partially successful search like this is made, the matching contacts are returned in an object and an error message is returned for the identifiers that are not found. This endpoint returns a `404` status code when no contacts are found for the provided identifiers. A `400` status code is returned if any searched addresses are invalid. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. +func (c *ApiService) GetContactByIdentifiers(params *GetContactByIdentifiersParam) (interface{}, error) { + path := "/v3/marketing/contacts/search/identifiers/{IdentifierType}" + if params != nil && params.IdentifierType != nil { + path = strings.Replace(path, "{"+"IdentifierType"+"}", fmt.Sprint(*params.IdentifierType), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.GetContactByIdentifiersRequest != nil { + b, err := json.Marshal(*params.GetContactByIdentifiersRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetContactByIdentifiers200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ContactsError{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ContactsError{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &SearchContact500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/mc_contacts/api_get_export_contact.go b/rest/api/v3/mc_contacts/api_get_export_contact.go new file mode 100644 index 00000000..81b27c4e --- /dev/null +++ b/rest/api/v3/mc_contacts/api_get_export_contact.go @@ -0,0 +1,101 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetExportContactParam struct { + // + Id *string `json:"id"` +} + +func (params *GetExportContactParam) SetId(Id string) *GetExportContactParam { + params.Id = &Id + return params +} + +// **This endpoint can be used to check the status of a contact export job**. To use this call, you will need the `id` from the \"Export Contacts\" call. If you would like to download a list, take the `id` that is returned from the \"Export Contacts\" endpoint and make an API request here to get the `urls`. Once you have the list of URLs, make a `GET` request on each URL to download your CSV file(s). Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. +func (c *ApiService) GetExportContact(params *GetExportContactParam) (interface{}, error) { + path := "/v3/marketing/contacts/exports/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ContactExport{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ListContact400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &SearchContact500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/mc_contacts/api_get_import_contact.go b/rest/api/v3/mc_contacts/api_get_import_contact.go new file mode 100644 index 00000000..75b1ada5 --- /dev/null +++ b/rest/api/v3/mc_contacts/api_get_import_contact.go @@ -0,0 +1,101 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetImportContactParam struct { + // + Id *string `json:"id"` +} + +func (params *GetImportContactParam) SetId(Id string) *GetImportContactParam { + params.Id = &Id + return params +} + +// **This endpoint can be used to check the status of a contact import job**. Use the `job_id` from the \"Import Contacts,\" \"Add or Update a Contact,\" or \"Delete Contacts\" endpoints as the `id` in the path parameter. If there is an error with your `PUT` request, download the `errors_url` file and open it to view more details. The job `status` field indicates whether the job is `pending`, `completed`, `errored`, or `failed`. Pending means not started. Completed means finished without any errors. Errored means finished with some errors. Failed means finished with all errors, or the job was entirely unprocessable: for example, if you attempt to import file format we do not support. The `results` object will have fields depending on the job type. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. +func (c *ApiService) GetImportContact(params *GetImportContactParam) (interface{}, error) { + path := "/v3/marketing/contacts/imports/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ContactImport{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &GetImportContact400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &SearchContact500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/mc_contacts/api_import_contact.go b/rest/api/v3/mc_contacts/api_import_contact.go new file mode 100644 index 00000000..b1ca987b --- /dev/null +++ b/rest/api/v3/mc_contacts/api_import_contact.go @@ -0,0 +1,105 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ImportContactParam struct { + // + ImportContactRequest *ImportContactRequest `json:"ImportContactRequest,omitempty"` +} + +func (params *ImportContactParam) SetImportContactRequest(ImportContactRequest ImportContactRequest) *ImportContactParam { + params.ImportContactRequest = &ImportContactRequest + return params +} + +// **This endpoint allows a CSV upload containing up to one million contacts or 5GB of data, whichever is smaller. At least one identifier is required for a successful import.** Imports take place asynchronously: the endpoint returns a URL (`upload_uri`) and HTTP headers (`upload_headers`) which can subsequently be used to `PUT` a file of contacts to be imported into our system. Uploaded CSV files may also be [gzip-compressed](https://en.wikipedia.org/wiki/Gzip). In either case, you must include the field `file_type` with the value `csv` in your request body. The `field_mappings` parameter is a respective list of field definition IDs to map the uploaded CSV columns to. It allows you to use CSVs where one or more columns are skipped (`null`) or remapped to the contact field. For example, if `field_mappings` is set to `[null, \"w1\", \"_rf1\"]`, this means skip column 0, map column 1 to the custom field with the ID `w1`, and map column 2 to the reserved field with the ID `_rf1`. See the \"Get All Field Definitions\" endpoint to fetch your custom and reserved field IDs to use with `field_mappings`. Once you receive the response body you can then initiate a **second** API call where you use the supplied URL and HTTP header to upload your file. For example: `curl --upload-file \"file/path.csv\" \"URL_GIVEN\" -H \"HEADER_GIVEN\"` If you would like to monitor the status of your import job, use the `job_id` and the \"Import Contacts Status\" endpoint. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. +func (c *ApiService) ImportContact(params *ImportContactParam) (interface{}, error) { + path := "/v3/marketing/contacts/imports" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.ImportContactRequest != nil { + b, err := json.Marshal(*params.ImportContactRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ImportContact200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ImportContact400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ImportContact404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &SearchContact500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/mc_contacts/api_list_batched_contact.go b/rest/api/v3/mc_contacts/api_list_batched_contact.go new file mode 100644 index 00000000..881c20b6 --- /dev/null +++ b/rest/api/v3/mc_contacts/api_list_batched_contact.go @@ -0,0 +1,97 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListBatchedContactParam struct { + // + ListBatchedContactRequest *ListBatchedContactRequest `json:"ListBatchedContactRequest,omitempty"` +} + +func (params *ListBatchedContactParam) SetListBatchedContactRequest(ListBatchedContactRequest ListBatchedContactRequest) *ListBatchedContactParam { + params.ListBatchedContactRequest = &ListBatchedContactRequest + return params +} + +// **This endpoint is used to retrieve a set of contacts identified by their IDs.** This can be more efficient endpoint to get contacts than making a series of individual `GET` requests to the \"Get a Contact by ID\" endpoint. You can supply up to 100 IDs. Pass them into the `ids` field in your request body as an array or one or more strings. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. +func (c *ApiService) ListBatchedContact(params *ListBatchedContactParam) (interface{}, error) { + path := "/v3/marketing/contacts/batch" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.ListBatchedContactRequest != nil { + b, err := json.Marshal(*params.ListBatchedContactRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListBatchedContact200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &SearchContact500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/mc_contacts/api_list_contact.go b/rest/api/v3/mc_contacts/api_list_contact.go new file mode 100644 index 00000000..404901b3 --- /dev/null +++ b/rest/api/v3/mc_contacts/api_list_contact.go @@ -0,0 +1,89 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListContactParam struct { +} + +// **This endpoint will return up to 50 of the most recent contacts uploaded or attached to a list**. This list will then be sorted by email address. The full contact count is also returned. Please note that pagination of the contacts has been deprecated. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. +func (c *ApiService) ListContact() (interface{}, error) { + path := "/v3/marketing/contacts" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListContact200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ListContact400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &SearchContact500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/mc_contacts/api_list_contact_by_email.go b/rest/api/v3/mc_contacts/api_list_contact_by_email.go new file mode 100644 index 00000000..c2a1913c --- /dev/null +++ b/rest/api/v3/mc_contacts/api_list_contact_by_email.go @@ -0,0 +1,105 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListContactByEmailParam struct { + // + ListContactByEmailRequest *ListContactByEmailRequest `json:"ListContactByEmailRequest,omitempty"` +} + +func (params *ListContactByEmailParam) SetListContactByEmailRequest(ListContactByEmailRequest ListContactByEmailRequest) *ListContactByEmailParam { + params.ListContactByEmailRequest = &ListContactByEmailRequest + return params +} + +// **This endpoint allows you to retrieve up to 100 contacts matching the searched `email` address(es), including any `alternate_emails`.** Email addresses are unique to a contact, meaning this endpoint can treat an email address as a primary key to search by. The contact object associated with the address, whether it is their `email` or one of their `alternate_emails` will be returned if matched. Email addresses in the search request do not need to match the case in which they're stored, but the email addresses in the result will be all lower case. Empty strings are excluded from the search and will not be returned. This endpoint should be used in place of the \"Search Contacts\" endpoint when you can provide exact email addresses and do not need to include other [Segmentation Query Language (SGQL)](https://sendgrid.com/docs/for-developers/sending-email/segmentation-query-language/) filters when searching. If you need to access a large percentage of your contacts, we recommend exporting your contacts with the \"Export Contacts\" endpoint and filtering the client side results. This endpoint returns a `200` status code when any contacts match the address(es) you supplied. When searching multiple addresses in a single request, it is possible that some addresses will match a contact while others will not. When a partially successful search like this is made, the matching contacts are returned in an object and an error message is returned for the email address(es) that are not found. This endpoint returns a `404` status code when no contacts are found for the provided email address(es). A `400` status code is returned if any searched addresses are invalid. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. +func (c *ApiService) ListContactByEmail(params *ListContactByEmailParam) (interface{}, error) { + path := "/v3/marketing/contacts/search/emails" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.ListContactByEmailRequest != nil { + b, err := json.Marshal(*params.ListContactByEmailRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListContactByEmail200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &SearchContact500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/mc_contacts/api_list_contact_count.go b/rest/api/v3/mc_contacts/api_list_contact_count.go new file mode 100644 index 00000000..12643f45 --- /dev/null +++ b/rest/api/v3/mc_contacts/api_list_contact_count.go @@ -0,0 +1,81 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListContactCountParam struct { +} + +// **This endpoint returns the total number of contacts you have stored.** Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. +func (c *ApiService) ListContactCount() (interface{}, error) { + path := "/v3/marketing/contacts/count" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListContactCount200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &SearchContact500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/mc_contacts/api_list_export_contact.go b/rest/api/v3/mc_contacts/api_list_export_contact.go new file mode 100644 index 00000000..848febfa --- /dev/null +++ b/rest/api/v3/mc_contacts/api_list_export_contact.go @@ -0,0 +1,89 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListExportContactParam struct { +} + +// **Use this endpoint to retrieve details of all current exported jobs**. It will return an array of objects, each of which records an export job in flight or recently completed. Each object's `export_type` field will tell you which kind of export it is and its `status` field will indicate what stage of processing it has reached. Exports which are `ready` will be accompanied by a `urls` field which lists the URLs of the export's downloadable files — there will be more than one if you specified a maximum file size in your initial export request. Use this endpoint if you have exports in flight but do not know their IDs, which are required for the \"Export Contacts Status\" endpoint. +func (c *ApiService) ListExportContact() (interface{}, error) { + path := "/v3/marketing/contacts/exports" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListExportContact200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ListExportContact400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &SearchContact500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/mc_contacts/api_search_contact.go b/rest/api/v3/mc_contacts/api_search_contact.go new file mode 100644 index 00000000..bda12805 --- /dev/null +++ b/rest/api/v3/mc_contacts/api_search_contact.go @@ -0,0 +1,105 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type SearchContactParam struct { + // + SearchContactRequest *SearchContactRequest `json:"SearchContactRequest,omitempty"` +} + +func (params *SearchContactParam) SetSearchContactRequest(SearchContactRequest SearchContactRequest) *SearchContactParam { + params.SearchContactRequest = &SearchContactRequest + return params +} + +// **Use this endpoint to locate contacts**. The request body's `query` field accepts valid [SGQL](https://sendgrid.com/docs/for-developers/sending-email/segmentation-query-language/) for searching for a contact. Because contact emails are stored in lower case, using SGQL to search by email address requires the provided email address to be in lower case. The SGQL `lower()` function can be used for this. Only the first 50 contacts that meet the search criteria will be returned. If the query takes longer than 20 seconds, a `408 Request Timeout` status will be returned. Formatting the `created_at` and `updated_at` values as Unix timestamps is deprecated. Instead, they are returned as ISO format as string. +func (c *ApiService) SearchContact(params *SearchContactParam) (interface{}, error) { + path := "/v3/marketing/contacts/search" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SearchContactRequest != nil { + b, err := json.Marshal(*params.SearchContactRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SearchContact200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &SearchContact400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &SearchContact500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/mc_contacts/api_service.go b/rest/api/v3/mc_contacts/api_service.go new file mode 100644 index 00000000..e6fd6d1f --- /dev/null +++ b/rest/api/v3/mc_contacts/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/mc_contacts/api_update_contact.go b/rest/api/v3/mc_contacts/api_update_contact.go new file mode 100644 index 00000000..9990676f --- /dev/null +++ b/rest/api/v3/mc_contacts/api_update_contact.go @@ -0,0 +1,105 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type UpdateContactParam struct { + // + UpdateContactRequest *UpdateContactRequest `json:"UpdateContactRequest,omitempty"` +} + +func (params *UpdateContactParam) SetUpdateContactRequest(UpdateContactRequest UpdateContactRequest) *UpdateContactParam { + params.UpdateContactRequest = &UpdateContactRequest + return params +} + +// **This endpoint allows the [upsert](https://en.wiktionary.org/wiki/upsert) (insert or update) of up to 30,000 contacts, or 6MB of data, whichever is lower**. Because the creation and update of contacts is an asynchronous process, the response will not contain immediate feedback on the processing of your upserted contacts. Rather, it will contain an HTTP 202 response indicating the contacts are queued for processing or an HTTP 4XX error containing validation errors. Should you wish to get the resulting contact's ID or confirm that your contacts have been updated or added, you can use the [Get Contacts by Identifiers operation](https://www.twilio.com/docs/sendgrid/api-reference/contacts/get-contacts-by-identifiers). Please note that custom fields need to have been already created if you wish to set their values for the contacts being upserted. To do this, please use the [Create Custom Field Definition endpoint](https://www.twilio.com/docs/sendgrid/api-reference/custom-fields/create-custom-field-definition). You will see a `job_id` in the response to your request. This can be used to check the status of your upsert job. To do so, please use the [Import Contacts Status endpoint](https://www.twilio.com/docs/sendgrid/api-reference/contacts/import-contacts-status). If the contact already exists in the system, any entries submitted via this endpoint will update the existing contact. In order to update a contact, all of its existing identifiers must be present. Any fields omitted from the request will remain as they were. A contact's ID cannot be used to update the contact. The email field will be changed to all lower-case. If a contact is added with an email that exists but contains capital letters, the existing contact with the all lower-case email will be updated. +func (c *ApiService) UpdateContact(params *UpdateContactParam) (interface{}, error) { + path := "/v3/marketing/contacts" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateContactRequest != nil { + b, err := json.Marshal(*params.UpdateContactRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 202 { + ps := &UpdateContact202Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ListContact400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &SearchContact500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/mc_contacts/docs/ContactDetails3.md b/rest/api/v3/mc_contacts/docs/ContactDetails3.md new file mode 100644 index 00000000..fb1addc0 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ContactDetails3.md @@ -0,0 +1,35 @@ +# ContactDetails3 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**FirstName** | **string** | |[optional] +**LastName** | **string** | |[optional] +**UniqueName** | **string** | |[optional] +**Email** | **string** | |[optional] +**PhoneNumberId** | **string** | |[optional] +**ExternalId** | **string** | |[optional] +**AnonymousId** | **string** | |[optional] +**AlternateEmails** | **[]string** | |[optional] +**AddressLine1** | **string** | |[optional] +**AddressLine2** | **string** | |[optional] +**City** | **string** | |[optional] +**StateProvinceRegion** | **string** | |[optional] +**Country** | **string** | |[optional] +**PostalCode** | **string** | |[optional] +**PhoneNumber** | **string** | |[optional] +**Whatsapp** | **string** | |[optional] +**Line** | **string** | |[optional] +**Facebook** | **string** | |[optional] +**ListIds** | **[]string** | | +**SegmentIds** | **[]string** | | +**CustomFields** | **map[string]interface{}** | |[optional] +**CreatedAt** | **string** | | +**UpdatedAt** | **string** | | +**Metadata** | [**SelfMetadata**](SelfMetadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ContactExport.md b/rest/api/v3/mc_contacts/docs/ContactExport.md new file mode 100644 index 00000000..d0570ae9 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ContactExport.md @@ -0,0 +1,20 @@ +# ContactExport + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**Status** | [**Status**](Status.md) | The export job's status. Allowed values: `pending`, `ready`, or `failure`. | +**CreatedAt** | **string** | The ISO8601 timestamp when the export was begun. | +**UpdatedAt** | **string** | The ISO8601 timestamp when the export was updated. | +**CompletedAt** | **string** | The ISO8601 timestamp when the export was completed. |[optional] +**ExpiresAt** | **string** | The ISO8601 timestamp when the exported file on S3 will expire. | +**Urls** | **[]string** | One or more download URLs for the contact file if the status is `ready`. |[optional] +**Message** | **string** | A human readable message if the status is `failure`. |[optional] +**Metadata** | [**Metadata**](Metadata.md) | |[optional] +**ContactCount** | **int32** | The total number of exported contacts. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ContactImport.md b/rest/api/v3/mc_contacts/docs/ContactImport.md new file mode 100644 index 00000000..c74de5b6 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ContactImport.md @@ -0,0 +1,16 @@ +# ContactImport + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The job ID. |[optional] +**Status** | **string** | The job state. Allowed values: `pending`, `completed`, `errored`, or `failed`. |[optional] +**JobType** | **string** | The job type. Allowed values: `upsert`, or `delete`. |[optional] +**Results** | [**ContactImportResults**](ContactImportResults.md) | |[optional] +**StartedAt** | **string** | The ISO8601 timestamp when the job was created. |[optional] +**FinishedAt** | **string** | The ISO8601 timestamp when the job was finished. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ContactImportResults.md b/rest/api/v3/mc_contacts/docs/ContactImportResults.md new file mode 100644 index 00000000..09691c7e --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ContactImportResults.md @@ -0,0 +1,16 @@ +# ContactImportResults + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RequestedCount** | **float32** | Requested contact count from the import. |[optional] +**CreatedCount** | **float32** | Created contact count from the import. |[optional] +**UpdatedCount** | **float32** | Updated contact count from the import. |[optional] +**DeletedCount** | **float32** | Count of deleted contacts that resulted in error. |[optional] +**ErroredCount** | **float32** | Count of imported contacts that resulted in error. |[optional] +**ErrorsUrl** | **string** | The download URL of the file which provides information about any errors. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ContactRequest.md b/rest/api/v3/mc_contacts/docs/ContactRequest.md new file mode 100644 index 00000000..29d8492f --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ContactRequest.md @@ -0,0 +1,24 @@ +# ContactRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AddressLine1** | **string** | The first line of the address. |[optional] +**AddressLine2** | **string** | An optional second line for the address. |[optional] +**AlternateEmails** | **[]string** | Additional emails associated with the contact. |[optional] +**City** | **string** | The contact's city. |[optional] +**Country** | **string** | The contact's country. Can be a full name or an abbreviation. |[optional] +**Email** | **string** | The contact's primary email. This is required to be a valid email. |[optional] +**PhoneNumberId** | **string** | The contact's Phone Number ID. This must be a valid phone number. |[optional] +**ExternalId** | **string** | The contact's External ID. |[optional] +**AnonymousId** | **string** | The contact's Anonymous ID. |[optional] +**FirstName** | **string** | The contact's personal name. |[optional] +**LastName** | **string** | The contact's family name. |[optional] +**PostalCode** | **string** | The contact's ZIP code or other postal code. |[optional] +**StateProvinceRegion** | **string** | The contact's state, province, or region. |[optional] +**CustomFields** | [**ContactRequestCustomFields**](ContactRequestCustomFields.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ContactRequestCustomFields.md b/rest/api/v3/mc_contacts/docs/ContactRequestCustomFields.md new file mode 100644 index 00000000..509644d6 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ContactRequestCustomFields.md @@ -0,0 +1,11 @@ +# ContactRequestCustomFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**W1** | **string** | The properties in this object are made up of a key (the custom field ID) and value you want associated with that custom field. For example `{\"w1\": \"coffee\"}`. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ContactsError.md b/rest/api/v3/mc_contacts/docs/ContactsError.md new file mode 100644 index 00000000..4f398c3d --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ContactsError.md @@ -0,0 +1,14 @@ +# ContactsError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | | +**Field** | **string** | |[optional] +**ErrorId** | **string** | |[optional] +**Parameter** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/DeleteContact.md b/rest/api/v3/mc_contacts/docs/DeleteContact.md new file mode 100644 index 00000000..35fbb0d0 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/DeleteContact.md @@ -0,0 +1,49 @@ +# DeleteContact + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteContact**](DeleteContact.md#DeleteContact) | **Delete** /v3/marketing/contacts | Delete Contacts + + + +## DeleteContact + +> DeleteContact202Response DeleteContact(ctx, optional) + +Delete Contacts + +**This endpoint can be used to delete one or more contacts**. The query parameter `ids` must set to a comma-separated list of contact IDs for bulk contact deletion. The query parameter `delete_all_contacts` must be set to `\"true\"` to delete **all** contacts. You must set either `ids` or `delete_all_contacts`. Deletion jobs are processed asynchronously. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteContactParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**DeleteAllContacts** | **string** | Must be set to `\"true\"` to delete all contacts. +**Ids** | **string** | A comma-separated list of contact IDs. + +### Return type + +[**DeleteContact202Response**](DeleteContact202Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/stats/docs/ListCategory200ResponseInner.md b/rest/api/v3/mc_contacts/docs/DeleteContact202Response.md similarity index 71% rename from rest/api/v3/stats/docs/ListCategory200ResponseInner.md rename to rest/api/v3/mc_contacts/docs/DeleteContact202Response.md index 528bed33..61dab669 100644 --- a/rest/api/v3/stats/docs/ListCategory200ResponseInner.md +++ b/rest/api/v3/mc_contacts/docs/DeleteContact202Response.md @@ -1,10 +1,10 @@ -# ListCategory200ResponseInner +# DeleteContact202Response ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Category** | **string** | A category used to group emails by broad topic. | +**JobId** | **map[string]interface{}** | The deletion job ID. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rest/api/v3/stats/docs/ListStat200ResponseInnerStatsInner.md b/rest/api/v3/mc_contacts/docs/DeleteContact400Response.md similarity index 68% rename from rest/api/v3/stats/docs/ListStat200ResponseInnerStatsInner.md rename to rest/api/v3/mc_contacts/docs/DeleteContact400Response.md index 7cfd11e2..6280dfdb 100644 --- a/rest/api/v3/stats/docs/ListStat200ResponseInnerStatsInner.md +++ b/rest/api/v3/mc_contacts/docs/DeleteContact400Response.md @@ -1,10 +1,10 @@ -# ListStat200ResponseInnerStatsInner +# DeleteContact400Response ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Metrics** | [**StatsAdvancedGlobalStats**](StatsAdvancedGlobalStats.md) | |[optional] +**Errors** | **[]map[string]interface{}** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rest/api/v3/mc_contacts/docs/DeleteContactIdentifier.md b/rest/api/v3/mc_contacts/docs/DeleteContactIdentifier.md new file mode 100644 index 00000000..e7b37272 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/DeleteContactIdentifier.md @@ -0,0 +1,52 @@ +# DeleteContactIdentifier + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteContactIdentifier**](DeleteContactIdentifier.md#DeleteContactIdentifier) | **Delete** /v3/marketing/contacts/{ContactId}/identifiers | Delete a Contact Identifier + + + +## DeleteContactIdentifier + +> DeleteContactIdentifier202Response DeleteContactIdentifier(ctx, ContactIdoptional) + +Delete a Contact Identifier + +**This endpoint can be used to delete one identifier from a contact.** Deletion jobs are processed asynchronously. Note this is different from deleting a contact. If the contact has only one identifier, the asynchronous request will fail. All contacts are required to have at least one identifier. The request body field `identifier_type` must have a valid value of \"EMAIL\", \"PHONENUMBERID\", \"EXTERNALID\", or \"ANONYMOUSID\". + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ContactId** | **string** | Must be set to the `contact_id` of the contact you want to remove the identifier from. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteContactIdentifierParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**DeleteContactIdentifierRequest** | [**DeleteContactIdentifierRequest**](DeleteContactIdentifierRequest.md) | + +### Return type + +[**DeleteContactIdentifier202Response**](DeleteContactIdentifier202Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_contacts/docs/DeleteContactIdentifier202Response.md b/rest/api/v3/mc_contacts/docs/DeleteContactIdentifier202Response.md new file mode 100644 index 00000000..99b15007 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/DeleteContactIdentifier202Response.md @@ -0,0 +1,11 @@ +# DeleteContactIdentifier202Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**JobId** | **map[string]interface{}** | The deletion job ID. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/DeleteContactIdentifierRequest.md b/rest/api/v3/mc_contacts/docs/DeleteContactIdentifierRequest.md new file mode 100644 index 00000000..b8a5701a --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/DeleteContactIdentifierRequest.md @@ -0,0 +1,12 @@ +# DeleteContactIdentifierRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IdentifierType** | [**IdentifierType**](IdentifierType.md) | The type of identifier you are removing from the contact. | +**IdentifierValue** | **string** | The value of the identifier you want to remove from the contact. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ErrorResponse.md b/rest/api/v3/mc_contacts/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ErrorResponseErrorsInner.md b/rest/api/v3/mc_contacts/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ExportContact.md b/rest/api/v3/mc_contacts/docs/ExportContact.md new file mode 100644 index 00000000..1e6807e0 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ExportContact.md @@ -0,0 +1,48 @@ +# ExportContact + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ExportContact**](ExportContact.md#ExportContact) | **Post** /v3/marketing/contacts/exports | Export Contacts + + + +## ExportContact + +> ExportContact202Response ExportContact(ctx, optional) + +Export Contacts + +**Use this endpoint to export lists or segments of contacts**. If you would just like to have a link to the exported list sent to your email set the `notifications.email` option to `true` in the `POST` payload. If you would like to download the list, take the `id` that is returned and use the \"Export Contacts Status\" endpoint to get the `urls`. Once you have the list of URLs, make a `GET` request to each URL provided to download your CSV file(s). You specify the segments and or/contact lists you wish to export by providing the relevant IDs in, respectively, the `segment_ids` and `list_ids` fields in the request body. The lists will be provided in either JSON or CSV files. To specify which of these you would required, set the request body `file_type` field to `json` or `csv`. You can also specify a maximum file size (in MB). If the export file is larger than this, it will be split into multiple files. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ExportContactParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**ExportContactRequest** | [**ExportContactRequest**](ExportContactRequest.md) | + +### Return type + +[**ExportContact202Response**](ExportContact202Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_contacts/docs/ExportContact202Response.md b/rest/api/v3/mc_contacts/docs/ExportContact202Response.md new file mode 100644 index 00000000..a1fa2d83 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ExportContact202Response.md @@ -0,0 +1,12 @@ +# ExportContact202Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Metadata** | [**Metadata**](Metadata.md) | | +**Id** | **string** | The ID of the export job. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ExportContactRequest.md b/rest/api/v3/mc_contacts/docs/ExportContactRequest.md new file mode 100644 index 00000000..0dc71918 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ExportContactRequest.md @@ -0,0 +1,15 @@ +# ExportContactRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ListIds** | **[]string** | IDs of the contact lists you want to export. |[optional] +**SegmentIds** | **[]string** | IDs of the contact segments you want to export. |[optional] +**Notifications** | [**ExportContactRequestNotifications**](ExportContactRequestNotifications.md) | |[optional] +**FileType** | [**FileType**](FileType.md) | File type for export file. Choose from `json` or `csv`. |[optional] +**MaxFileSize** | **int32** | The maximum size of an export file in MB. Note that when this option is specified, multiple output files may be returned from the export. |[optional] [default to 5000] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ExportContactRequestNotifications.md b/rest/api/v3/mc_contacts/docs/ExportContactRequestNotifications.md new file mode 100644 index 00000000..970bb936 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ExportContactRequestNotifications.md @@ -0,0 +1,11 @@ +# ExportContactRequestNotifications + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **bool** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_designs/docs/Editor.md b/rest/api/v3/mc_contacts/docs/FileType.md similarity index 73% rename from rest/api/v3/mc_designs/docs/Editor.md rename to rest/api/v3/mc_contacts/docs/FileType.md index 9d170841..c725a871 100644 --- a/rest/api/v3/mc_designs/docs/Editor.md +++ b/rest/api/v3/mc_contacts/docs/FileType.md @@ -1,11 +1,11 @@ -# Editor +# FileType ## Enum Name | Type | Notes ------------ | ------------- | ------------- -**CODE** | string | (value: `"code"`) -**DESIGN** | string | (value: `"design"`) +**CSV** | string | (value: `"csv"`) +**JSON** | string | (value: `"json"`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rest/api/v3/stats/docs/Country.md b/rest/api/v3/mc_contacts/docs/FileType1.md similarity index 75% rename from rest/api/v3/stats/docs/Country.md rename to rest/api/v3/mc_contacts/docs/FileType1.md index 00c5f179..bfcef1f9 100644 --- a/rest/api/v3/stats/docs/Country.md +++ b/rest/api/v3/mc_contacts/docs/FileType1.md @@ -1,11 +1,10 @@ -# Country +# FileType1 ## Enum Name | Type | Notes ------------ | ------------- | ------------- -**US** | string | (value: `"US"`) -**CA** | string | (value: `"CA"`) +**CSV** | string | (value: `"csv"`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rest/api/v3/sso/docs/GetSsoCertificate.md b/rest/api/v3/mc_contacts/docs/GetContact.md similarity index 61% rename from rest/api/v3/sso/docs/GetSsoCertificate.md rename to rest/api/v3/mc_contacts/docs/GetContact.md index e6ecfde7..f5c5a397 100644 --- a/rest/api/v3/sso/docs/GetSsoCertificate.md +++ b/rest/api/v3/mc_contacts/docs/GetContact.md @@ -1,20 +1,20 @@ -# GetSsoCertificate +# GetContact All URIs are relative to *https://api.sendgrid.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**GetSsoCertificate**](GetSsoCertificate.md#GetSsoCertificate) | **Get** /v3/sso/certificates/{CertId} | Get an SSO Certificate +[**GetContact**](GetContact.md#GetContact) | **Get** /v3/marketing/contacts/{Id} | Get a Contact by ID -## GetSsoCertificate +## GetContact -> SsoCertificateBody GetSsoCertificate(ctx, CertId) +> ContactDetails3 GetContact(ctx, Id) -Get an SSO Certificate +Get a Contact by ID -**This endpoint allows you to retrieve an individual SSO certificate.** +**This endpoint returns the full details and all fields for the specified contact**. The \"Get Contacts by Identifier\" endpoint can be used to get the ID of a contact. ### Path Parameters @@ -22,11 +22,11 @@ Get an SSO Certificate Name | Type | Description ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**CertId** | **string** | +**Id** | **string** | ### Other Parameters -Other parameters are passed through a pointer to a GetSsoCertificateParams struct +Other parameters are passed through a pointer to a GetContactParams struct Name | Type | Description @@ -34,7 +34,7 @@ Name | Type | Description ### Return type -[**SsoCertificateBody**](SsoCertificateBody.md) +[**ContactDetails3**](ContactDetails3.md) ### Authorization diff --git a/rest/api/v3/mc_contacts/docs/GetContactByIdentifiers.md b/rest/api/v3/mc_contacts/docs/GetContactByIdentifiers.md new file mode 100644 index 00000000..0085b184 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/GetContactByIdentifiers.md @@ -0,0 +1,52 @@ +# GetContactByIdentifiers + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetContactByIdentifiers**](GetContactByIdentifiers.md#GetContactByIdentifiers) | **Post** /v3/marketing/contacts/search/identifiers/{IdentifierType} | Get Contacts by Identifiers + + + +## GetContactByIdentifiers + +> GetContactByIdentifiers200Response GetContactByIdentifiers(ctx, IdentifierTypeoptional) + +Get Contacts by Identifiers + +**This endpoint allows you to retrieve up to 100 contacts matching the searched identifier values for one type of specified identifier.** `identifier_type` must be a valid identifier type: `email`, `phone_number_id`, `external_id`, or `anonymous_id`. This endpoint should be used in place of the [Search Contacts endpoint](https://www.twilio.com/docs/sendgrid/api-reference/contacts/search-contacts) when you can provide exact identifiers and do not need to include other [Segmentation Query Language (SGQL)](https://www.twilio.com/docs/sendgrid/for-developers/sending-email/segmentation-query-language/) filters when searching. This endpoint returns a `200` status code when any contacts match the identifiers you supplied. When searching multiple identifiers in a single request, it is possible that some will match a contact while others will not. When a partially successful search like this is made, the matching contacts are returned in an object and an error message is returned for the identifiers that are not found. This endpoint returns a `404` status code when no contacts are found for the provided identifiers. A `400` status code is returned if any searched addresses are invalid. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**IdentifierType** | [**IdentifierType1**](IdentifierType1.md) | The type of identifier to search for. + +### Other Parameters + +Other parameters are passed through a pointer to a GetContactByIdentifiersParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**GetContactByIdentifiersRequest** | [**GetContactByIdentifiersRequest**](GetContactByIdentifiersRequest.md) | + +### Return type + +[**GetContactByIdentifiers200Response**](GetContactByIdentifiers200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_contacts/docs/GetContactByIdentifiers200Response.md b/rest/api/v3/mc_contacts/docs/GetContactByIdentifiers200Response.md new file mode 100644 index 00000000..214673b6 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/GetContactByIdentifiers200Response.md @@ -0,0 +1,11 @@ +# GetContactByIdentifiers200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | **interface{}** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/GetContactByIdentifiers200ResponseResultValue.md b/rest/api/v3/mc_contacts/docs/GetContactByIdentifiers200ResponseResultValue.md new file mode 100644 index 00000000..6652c7b4 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/GetContactByIdentifiers200ResponseResultValue.md @@ -0,0 +1,12 @@ +# GetContactByIdentifiers200ResponseResultValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Contact** | [**ContactDetails3**](ContactDetails3.md) | |[optional] +**Error** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/GetContactByIdentifiersRequest.md b/rest/api/v3/mc_contacts/docs/GetContactByIdentifiersRequest.md new file mode 100644 index 00000000..92323249 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/GetContactByIdentifiersRequest.md @@ -0,0 +1,11 @@ +# GetContactByIdentifiersRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Identifiers** | [**[]GetContactByIdentifiersRequestIdentifiersInner**](GetContactByIdentifiersRequestIdentifiersInner.md) | One or more more identifier values to search for in your Marketing Campaigns contacts. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/GetContactByIdentifiersRequestIdentifiersInner.md b/rest/api/v3/mc_contacts/docs/GetContactByIdentifiersRequestIdentifiersInner.md new file mode 100644 index 00000000..7d2bdec4 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/GetContactByIdentifiersRequestIdentifiersInner.md @@ -0,0 +1,14 @@ +# GetContactByIdentifiersRequestIdentifiersInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | |[optional] +**PhoneNumberId** | **string** | The contact's Phone Number ID. This is required to be a valid phone number. |[optional] +**ExternalId** | **string** | The contact's External ID. |[optional] +**AnonymousId** | **string** | The contact's Anonymous ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/GetExportContact.md b/rest/api/v3/mc_contacts/docs/GetExportContact.md new file mode 100644 index 00000000..d705c7a9 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/GetExportContact.md @@ -0,0 +1,51 @@ +# GetExportContact + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetExportContact**](GetExportContact.md#GetExportContact) | **Get** /v3/marketing/contacts/exports/{Id} | Export Contacts Status + + + +## GetExportContact + +> ContactExport GetExportContact(ctx, Id) + +Export Contacts Status + +**This endpoint can be used to check the status of a contact export job**. To use this call, you will need the `id` from the \"Export Contacts\" call. If you would like to download a list, take the `id` that is returned from the \"Export Contacts\" endpoint and make an API request here to get the `urls`. Once you have the list of URLs, make a `GET` request on each URL to download your CSV file(s). Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a GetExportContactParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**ContactExport**](ContactExport.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_contacts/docs/GetImportContact.md b/rest/api/v3/mc_contacts/docs/GetImportContact.md new file mode 100644 index 00000000..5e1ab06c --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/GetImportContact.md @@ -0,0 +1,51 @@ +# GetImportContact + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetImportContact**](GetImportContact.md#GetImportContact) | **Get** /v3/marketing/contacts/imports/{Id} | Import Contacts Status + + + +## GetImportContact + +> ContactImport GetImportContact(ctx, Id) + +Import Contacts Status + +**This endpoint can be used to check the status of a contact import job**. Use the `job_id` from the \"Import Contacts,\" \"Add or Update a Contact,\" or \"Delete Contacts\" endpoints as the `id` in the path parameter. If there is an error with your `PUT` request, download the `errors_url` file and open it to view more details. The job `status` field indicates whether the job is `pending`, `completed`, `errored`, or `failed`. Pending means not started. Completed means finished without any errors. Errored means finished with some errors. Failed means finished with all errors, or the job was entirely unprocessable: for example, if you attempt to import file format we do not support. The `results` object will have fields depending on the job type. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a GetImportContactParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**ContactImport**](ContactImport.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_contacts/docs/GetImportContact400Response.md b/rest/api/v3/mc_contacts/docs/GetImportContact400Response.md new file mode 100644 index 00000000..b59d81f4 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/GetImportContact400Response.md @@ -0,0 +1,11 @@ +# GetImportContact400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**ContactsError**](ContactsError.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/Persona.md b/rest/api/v3/mc_contacts/docs/IdentifierType.md similarity index 52% rename from rest/api/v3/sso/docs/Persona.md rename to rest/api/v3/mc_contacts/docs/IdentifierType.md index a422b3d2..d5cb9fc6 100644 --- a/rest/api/v3/sso/docs/Persona.md +++ b/rest/api/v3/mc_contacts/docs/IdentifierType.md @@ -1,13 +1,13 @@ -# Persona +# IdentifierType ## Enum Name | Type | Notes ------------ | ------------- | ------------- -**ACCOUNTANT** | string | (value: `"accountant"`) -**DEVELOPER** | string | (value: `"developer"`) -**MARKETER** | string | (value: `"marketer"`) -**OBSERVER** | string | (value: `"observer"`) +**EMAIL** | string | (value: `"EMAIL"`) +**PHONENUMBERID** | string | (value: `"PHONENUMBERID"`) +**EXTERNALID** | string | (value: `"EXTERNALID"`) +**ANONYMOUSID** | string | (value: `"ANONYMOUSID"`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rest/api/v3/mc_contacts/docs/IdentifierType1.md b/rest/api/v3/mc_contacts/docs/IdentifierType1.md new file mode 100644 index 00000000..87129625 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/IdentifierType1.md @@ -0,0 +1,15 @@ +# IdentifierType1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**EMAIL** | string | (value: `"email"`) +**PHONE_NUMBER_ID** | string | (value: `"phone_number_id"`) +**EXTERNAL_ID** | string | (value: `"external_id"`) +**ANONYMOUS_ID** | string | (value: `"anonymous_id"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ImportContact.md b/rest/api/v3/mc_contacts/docs/ImportContact.md new file mode 100644 index 00000000..9d5d80a3 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ImportContact.md @@ -0,0 +1,48 @@ +# ImportContact + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ImportContact**](ImportContact.md#ImportContact) | **Put** /v3/marketing/contacts/imports | Import Contacts + + + +## ImportContact + +> ImportContact200Response ImportContact(ctx, optional) + +Import Contacts + +**This endpoint allows a CSV upload containing up to one million contacts or 5GB of data, whichever is smaller. At least one identifier is required for a successful import.** Imports take place asynchronously: the endpoint returns a URL (`upload_uri`) and HTTP headers (`upload_headers`) which can subsequently be used to `PUT` a file of contacts to be imported into our system. Uploaded CSV files may also be [gzip-compressed](https://en.wikipedia.org/wiki/Gzip). In either case, you must include the field `file_type` with the value `csv` in your request body. The `field_mappings` parameter is a respective list of field definition IDs to map the uploaded CSV columns to. It allows you to use CSVs where one or more columns are skipped (`null`) or remapped to the contact field. For example, if `field_mappings` is set to `[null, \"w1\", \"_rf1\"]`, this means skip column 0, map column 1 to the custom field with the ID `w1`, and map column 2 to the reserved field with the ID `_rf1`. See the \"Get All Field Definitions\" endpoint to fetch your custom and reserved field IDs to use with `field_mappings`. Once you receive the response body you can then initiate a **second** API call where you use the supplied URL and HTTP header to upload your file. For example: `curl --upload-file \"file/path.csv\" \"URL_GIVEN\" -H \"HEADER_GIVEN\"` If you would like to monitor the status of your import job, use the `job_id` and the \"Import Contacts Status\" endpoint. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ImportContactParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**ImportContactRequest** | [**ImportContactRequest**](ImportContactRequest.md) | + +### Return type + +[**ImportContact200Response**](ImportContact200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_contacts/docs/ImportContact200Response.md b/rest/api/v3/mc_contacts/docs/ImportContact200Response.md new file mode 100644 index 00000000..872a6469 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ImportContact200Response.md @@ -0,0 +1,13 @@ +# ImportContact200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**JobId** | **string** | The ID of the import job. |[optional] +**UploadUri** | **string** | The URI to PUT the upload file to. |[optional] +**UploadHeaders** | [**[]ImportContact200ResponseUploadHeadersInner**](ImportContact200ResponseUploadHeadersInner.md) | A list of headers that must be included in PUT request. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ImportContact200ResponseUploadHeadersInner.md b/rest/api/v3/mc_contacts/docs/ImportContact200ResponseUploadHeadersInner.md new file mode 100644 index 00000000..1f57c2c5 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ImportContact200ResponseUploadHeadersInner.md @@ -0,0 +1,12 @@ +# ImportContact200ResponseUploadHeadersInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Header** | **string** | | +**Value** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ImportContact400Response.md b/rest/api/v3/mc_contacts/docs/ImportContact400Response.md new file mode 100644 index 00000000..f6218120 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ImportContact400Response.md @@ -0,0 +1,11 @@ +# ImportContact400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ContactsError**](ContactsError.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ImportContact404Response.md b/rest/api/v3/mc_contacts/docs/ImportContact404Response.md new file mode 100644 index 00000000..10ad90e9 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ImportContact404Response.md @@ -0,0 +1,11 @@ +# ImportContact404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ContactsError**](ContactsError.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ImportContactRequest.md b/rest/api/v3/mc_contacts/docs/ImportContactRequest.md new file mode 100644 index 00000000..a45dbe8a --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ImportContactRequest.md @@ -0,0 +1,13 @@ +# ImportContactRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ListIds** | **[]string** | All contacts will be added to each of the specified lists. |[optional] +**FileType** | [**FileType1**](FileType1.md) | Upload file type. | +**FieldMappings** | **[]string** | Import file header to reserved/custom field mapping. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ListBatchedContact.md b/rest/api/v3/mc_contacts/docs/ListBatchedContact.md new file mode 100644 index 00000000..0420d571 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ListBatchedContact.md @@ -0,0 +1,48 @@ +# ListBatchedContact + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListBatchedContact**](ListBatchedContact.md#ListBatchedContact) | **Post** /v3/marketing/contacts/batch | Get Batched Contacts by IDs + + + +## ListBatchedContact + +> ListBatchedContact200Response ListBatchedContact(ctx, optional) + +Get Batched Contacts by IDs + +**This endpoint is used to retrieve a set of contacts identified by their IDs.** This can be more efficient endpoint to get contacts than making a series of individual `GET` requests to the \"Get a Contact by ID\" endpoint. You can supply up to 100 IDs. Pass them into the `ids` field in your request body as an array or one or more strings. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListBatchedContactParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**ListBatchedContactRequest** | [**ListBatchedContactRequest**](ListBatchedContactRequest.md) | + +### Return type + +[**ListBatchedContact200Response**](ListBatchedContact200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_contacts/docs/ListBatchedContact200Response.md b/rest/api/v3/mc_contacts/docs/ListBatchedContact200Response.md new file mode 100644 index 00000000..4d6a53f1 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ListBatchedContact200Response.md @@ -0,0 +1,11 @@ +# ListBatchedContact200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ContactDetails3**](ContactDetails3.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_designs/docs/ApiErrors.md b/rest/api/v3/mc_contacts/docs/ListBatchedContactRequest.md similarity index 79% rename from rest/api/v3/mc_designs/docs/ApiErrors.md rename to rest/api/v3/mc_contacts/docs/ListBatchedContactRequest.md index 9228c171..b738da1c 100644 --- a/rest/api/v3/mc_designs/docs/ApiErrors.md +++ b/rest/api/v3/mc_contacts/docs/ListBatchedContactRequest.md @@ -1,10 +1,10 @@ -# ApiErrors +# ListBatchedContactRequest ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Errors** | [**[]ApiError**](ApiError.md) | |[optional] +**Ids** | **[]string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rest/api/v3/mc_contacts/docs/ListContact.md b/rest/api/v3/mc_contacts/docs/ListContact.md new file mode 100644 index 00000000..e7a76be0 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ListContact.md @@ -0,0 +1,44 @@ +# ListContact + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListContact**](ListContact.md#ListContact) | **Get** /v3/marketing/contacts | Get Sample Contacts + + + +## ListContact + +> ListContact200Response ListContact(ctx, ) + +Get Sample Contacts + +**This endpoint will return up to 50 of the most recent contacts uploaded or attached to a list**. This list will then be sorted by email address. The full contact count is also returned. Please note that pagination of the contacts has been deprecated. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListContactParams struct + + +### Return type + +[**ListContact200Response**](ListContact200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_contacts/docs/ListContact200Response.md b/rest/api/v3/mc_contacts/docs/ListContact200Response.md new file mode 100644 index 00000000..1a87d2a9 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ListContact200Response.md @@ -0,0 +1,13 @@ +# ListContact200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ContactDetails3**](ContactDetails3.md) | |[optional] +**Metadata** | [**SelfMetadata**](SelfMetadata.md) | |[optional] +**ContactCount** | **int32** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ListContact400Response.md b/rest/api/v3/mc_contacts/docs/ListContact400Response.md new file mode 100644 index 00000000..6bf4b674 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ListContact400Response.md @@ -0,0 +1,11 @@ +# ListContact400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ContactsError**](ContactsError.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ListContactByEmail.md b/rest/api/v3/mc_contacts/docs/ListContactByEmail.md new file mode 100644 index 00000000..3e411256 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ListContactByEmail.md @@ -0,0 +1,48 @@ +# ListContactByEmail + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListContactByEmail**](ListContactByEmail.md#ListContactByEmail) | **Post** /v3/marketing/contacts/search/emails | Get Contacts by Emails + + + +## ListContactByEmail + +> ListContactByEmail200Response ListContactByEmail(ctx, optional) + +Get Contacts by Emails + +**This endpoint allows you to retrieve up to 100 contacts matching the searched `email` address(es), including any `alternate_emails`.** Email addresses are unique to a contact, meaning this endpoint can treat an email address as a primary key to search by. The contact object associated with the address, whether it is their `email` or one of their `alternate_emails` will be returned if matched. Email addresses in the search request do not need to match the case in which they're stored, but the email addresses in the result will be all lower case. Empty strings are excluded from the search and will not be returned. This endpoint should be used in place of the \"Search Contacts\" endpoint when you can provide exact email addresses and do not need to include other [Segmentation Query Language (SGQL)](https://sendgrid.com/docs/for-developers/sending-email/segmentation-query-language/) filters when searching. If you need to access a large percentage of your contacts, we recommend exporting your contacts with the \"Export Contacts\" endpoint and filtering the client side results. This endpoint returns a `200` status code when any contacts match the address(es) you supplied. When searching multiple addresses in a single request, it is possible that some addresses will match a contact while others will not. When a partially successful search like this is made, the matching contacts are returned in an object and an error message is returned for the email address(es) that are not found. This endpoint returns a `404` status code when no contacts are found for the provided email address(es). A `400` status code is returned if any searched addresses are invalid. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListContactByEmailParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**ListContactByEmailRequest** | [**ListContactByEmailRequest**](ListContactByEmailRequest.md) | + +### Return type + +[**ListContactByEmail200Response**](ListContactByEmail200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_contacts/docs/ListContactByEmail200Response.md b/rest/api/v3/mc_contacts/docs/ListContactByEmail200Response.md new file mode 100644 index 00000000..76177b92 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ListContactByEmail200Response.md @@ -0,0 +1,11 @@ +# ListContactByEmail200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | **map[string]interface{}** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ListContactByEmailRequest.md b/rest/api/v3/mc_contacts/docs/ListContactByEmailRequest.md new file mode 100644 index 00000000..8ed62ff6 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ListContactByEmailRequest.md @@ -0,0 +1,14 @@ +# ListContactByEmailRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Emails** | **[]string** | One or more primary and/or alternate email addresses to search for in your Marketing Campaigns contacts. | +**PhoneNumberId** | **string** | The contact's Phone Number ID. This is required to be a valid phone number. |[optional] +**ExternalId** | **string** | The contact's External ID. |[optional] +**AnonymousId** | **string** | The contact's Anonymous ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ListContactCount.md b/rest/api/v3/mc_contacts/docs/ListContactCount.md new file mode 100644 index 00000000..effcc099 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ListContactCount.md @@ -0,0 +1,44 @@ +# ListContactCount + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListContactCount**](ListContactCount.md#ListContactCount) | **Get** /v3/marketing/contacts/count | Get Total Contact Count + + + +## ListContactCount + +> ListContactCount200Response ListContactCount(ctx, ) + +Get Total Contact Count + +**This endpoint returns the total number of contacts you have stored.** Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListContactCountParams struct + + +### Return type + +[**ListContactCount200Response**](ListContactCount200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_contacts/docs/ListContactCount200Response.md b/rest/api/v3/mc_contacts/docs/ListContactCount200Response.md new file mode 100644 index 00000000..8dd466ee --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ListContactCount200Response.md @@ -0,0 +1,13 @@ +# ListContactCount200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ContactCount** | **int32** | The total number of contacts. | +**BillableCount** | **int32** | The count of contacts this month for billing purposes. |[optional] [default to 0] +**BillableBreakdown** | [**ListContactCount200ResponseBillableBreakdown**](ListContactCount200ResponseBillableBreakdown.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ListContactCount200ResponseBillableBreakdown.md b/rest/api/v3/mc_contacts/docs/ListContactCount200ResponseBillableBreakdown.md new file mode 100644 index 00000000..7082d450 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ListContactCount200ResponseBillableBreakdown.md @@ -0,0 +1,12 @@ +# ListContactCount200ResponseBillableBreakdown + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Total** | **int32** | The sum of all the subuser's billable contacts |[optional] +**Breakdown** | **map[string]interface{}** | A map of each subuser's billable contact usage. Each key is the subuser's ID and each value is the usage thus far this month. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ListExportContact.md b/rest/api/v3/mc_contacts/docs/ListExportContact.md new file mode 100644 index 00000000..26661c9d --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ListExportContact.md @@ -0,0 +1,44 @@ +# ListExportContact + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListExportContact**](ListExportContact.md#ListExportContact) | **Get** /v3/marketing/contacts/exports | Get All Existing Exports + + + +## ListExportContact + +> ListExportContact200Response ListExportContact(ctx, ) + +Get All Existing Exports + +**Use this endpoint to retrieve details of all current exported jobs**. It will return an array of objects, each of which records an export job in flight or recently completed. Each object's `export_type` field will tell you which kind of export it is and its `status` field will indicate what stage of processing it has reached. Exports which are `ready` will be accompanied by a `urls` field which lists the URLs of the export's downloadable files — there will be more than one if you specified a maximum file size in your initial export request. Use this endpoint if you have exports in flight but do not know their IDs, which are required for the \"Export Contacts Status\" endpoint. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListExportContactParams struct + + +### Return type + +[**ListExportContact200Response**](ListExportContact200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_contacts/docs/ListExportContact200Response.md b/rest/api/v3/mc_contacts/docs/ListExportContact200Response.md new file mode 100644 index 00000000..b2905af7 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ListExportContact200Response.md @@ -0,0 +1,12 @@ +# ListExportContact200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ListExportContact200ResponseResultInner**](ListExportContact200ResponseResultInner.md) | |[optional] +**Metadata** | [**ListExportContact200ResponseMetadata**](ListExportContact200ResponseMetadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ListExportContact200ResponseMetadata.md b/rest/api/v3/mc_contacts/docs/ListExportContact200ResponseMetadata.md new file mode 100644 index 00000000..a2e08656 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ListExportContact200ResponseMetadata.md @@ -0,0 +1,13 @@ +# ListExportContact200ResponseMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prev** | **string** | |[optional] +**Self** | **string** | Link to this page. |[optional] +**Next** | **string** | Link to next page. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ListExportContact200ResponseResultInner.md b/rest/api/v3/mc_contacts/docs/ListExportContact200ResponseResultInner.md new file mode 100644 index 00000000..1fc9949b --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ListExportContact200ResponseResultInner.md @@ -0,0 +1,21 @@ +# ListExportContact200ResponseResultInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | Export jobs ID. |[optional] +**Status** | **string** | Allowed values: `pending`, `ready`, or `failure`. |[optional] +**CreatedAt** | **string** | This ISO8601 timestamp when the export was created. |[optional] +**CompletedAt** | **string** | This ISO8601 timestamp when the export was completed. |[optional] +**ExpiresAt** | **string** | This ISO8601 timestamp when the export expires. |[optional] +**Urls** | **[]string** | One or more download URLs for the contact file(s) if the status is `ready`. |[optional] +**UserId** | **string** | User ID. |[optional] +**ExportType** | **string** | Allowed types: `contacts_export`, `list_export`, or `segment_export`. |[optional] +**Segments** | [**[]ListExportContact200ResponseResultInnerSegmentsInner**](ListExportContact200ResponseResultInnerSegmentsInner.md) | |[optional] +**Lists** | [**[]ListExportContact200ResponseResultInnerSegmentsInner**](ListExportContact200ResponseResultInnerSegmentsInner.md) | |[optional] +**Metadata** | [**ListExportContact200ResponseResultInnerMetadata**](ListExportContact200ResponseResultInnerMetadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ListExportContact200ResponseResultInnerMetadata.md b/rest/api/v3/mc_contacts/docs/ListExportContact200ResponseResultInnerMetadata.md new file mode 100644 index 00000000..b779a41d --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ListExportContact200ResponseResultInnerMetadata.md @@ -0,0 +1,13 @@ +# ListExportContact200ResponseResultInnerMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prev** | **string** | |[optional] +**Self** | **string** | |[optional] +**Next** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ListExportContact200ResponseResultInnerSegmentsInner.md b/rest/api/v3/mc_contacts/docs/ListExportContact200ResponseResultInnerSegmentsInner.md new file mode 100644 index 00000000..d4724362 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ListExportContact200ResponseResultInnerSegmentsInner.md @@ -0,0 +1,12 @@ +# ListExportContact200ResponseResultInnerSegmentsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ID** | **string** | |[optional] +**Name** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ListExportContact400Response.md b/rest/api/v3/mc_contacts/docs/ListExportContact400Response.md new file mode 100644 index 00000000..8aae0130 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ListExportContact400Response.md @@ -0,0 +1,11 @@ +# ListExportContact400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ListExportContact400ResponseErrorsInner**](ListExportContact400ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/ListExportContact400ResponseErrorsInner.md b/rest/api/v3/mc_contacts/docs/ListExportContact400ResponseErrorsInner.md new file mode 100644 index 00000000..fbfc8b66 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/ListExportContact400ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# ListExportContact400ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | | +**ErrorId** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/Metadata.md b/rest/api/v3/mc_contacts/docs/Metadata.md new file mode 100644 index 00000000..79ca153c --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/Metadata.md @@ -0,0 +1,14 @@ +# Metadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prev** | **string** | The URL of the previous page of results. If this field isn't present, you're at the start of the list. |[optional] +**Self** | **string** | The URL of the current page of results. |[optional] +**Next** | **string** | The URL of the next page of results. If this field isn't present, you're at the end of the list. |[optional] +**Count** | **float32** | The number of items in the entire list, i.e., across all pages. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/SearchContact.md b/rest/api/v3/mc_contacts/docs/SearchContact.md new file mode 100644 index 00000000..4f83b037 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/SearchContact.md @@ -0,0 +1,48 @@ +# SearchContact + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SearchContact**](SearchContact.md#SearchContact) | **Post** /v3/marketing/contacts/search | Search Contacts + + + +## SearchContact + +> SearchContact200Response SearchContact(ctx, optional) + +Search Contacts + +**Use this endpoint to locate contacts**. The request body's `query` field accepts valid [SGQL](https://sendgrid.com/docs/for-developers/sending-email/segmentation-query-language/) for searching for a contact. Because contact emails are stored in lower case, using SGQL to search by email address requires the provided email address to be in lower case. The SGQL `lower()` function can be used for this. Only the first 50 contacts that meet the search criteria will be returned. If the query takes longer than 20 seconds, a `408 Request Timeout` status will be returned. Formatting the `created_at` and `updated_at` values as Unix timestamps is deprecated. Instead, they are returned as ISO format as string. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a SearchContactParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**SearchContactRequest** | [**SearchContactRequest**](SearchContactRequest.md) | + +### Return type + +[**SearchContact200Response**](SearchContact200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_contacts/docs/SearchContact200Response.md b/rest/api/v3/mc_contacts/docs/SearchContact200Response.md new file mode 100644 index 00000000..734bda8a --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/SearchContact200Response.md @@ -0,0 +1,13 @@ +# SearchContact200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ContactDetails3**](ContactDetails3.md) | |[optional] +**Metadata** | [**SelfMetadata**](SelfMetadata.md) | |[optional] +**ContactCount** | **float32** | The total number of contacts matched. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/SearchContact400Response.md b/rest/api/v3/mc_contacts/docs/SearchContact400Response.md new file mode 100644 index 00000000..2109e73e --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/SearchContact400Response.md @@ -0,0 +1,11 @@ +# SearchContact400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]SearchContact400ResponseErrorsInner**](SearchContact400ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/SsoErrorResponseInner.md b/rest/api/v3/mc_contacts/docs/SearchContact400ResponseErrorsInner.md similarity index 84% rename from rest/api/v3/sso/docs/SsoErrorResponseInner.md rename to rest/api/v3/mc_contacts/docs/SearchContact400ResponseErrorsInner.md index df959452..144d5427 100644 --- a/rest/api/v3/sso/docs/SsoErrorResponseInner.md +++ b/rest/api/v3/mc_contacts/docs/SearchContact400ResponseErrorsInner.md @@ -1,12 +1,11 @@ -# SsoErrorResponseInner +# SearchContact400ResponseErrorsInner ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Message** | **string** | |[optional] **Field** | **string** | |[optional] -**ErrorId** | **string** | |[optional] +**Message** | **string** | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rest/api/v3/mc_contacts/docs/SearchContact500Response.md b/rest/api/v3/mc_contacts/docs/SearchContact500Response.md new file mode 100644 index 00000000..6e80df27 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/SearchContact500Response.md @@ -0,0 +1,11 @@ +# SearchContact500Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]SearchContact500ResponseErrorsInner**](SearchContact500ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/SearchContact500ResponseErrorsInner.md b/rest/api/v3/mc_contacts/docs/SearchContact500ResponseErrorsInner.md new file mode 100644 index 00000000..abe4d9c7 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/SearchContact500ResponseErrorsInner.md @@ -0,0 +1,11 @@ +# SearchContact500ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/SearchContactRequest.md b/rest/api/v3/mc_contacts/docs/SearchContactRequest.md new file mode 100644 index 00000000..326fca7c --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/SearchContactRequest.md @@ -0,0 +1,11 @@ +# SearchContactRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Query** | **string** | An SGQL search string or other pattern. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/SelfMetadata.md b/rest/api/v3/mc_contacts/docs/SelfMetadata.md new file mode 100644 index 00000000..f5efa07a --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/SelfMetadata.md @@ -0,0 +1,11 @@ +# SelfMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Self** | **string** | A link to this object. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/UserType.md b/rest/api/v3/mc_contacts/docs/Status.md similarity index 63% rename from rest/api/v3/sso/docs/UserType.md rename to rest/api/v3/mc_contacts/docs/Status.md index f9f8db1d..28ba61b2 100644 --- a/rest/api/v3/sso/docs/UserType.md +++ b/rest/api/v3/mc_contacts/docs/Status.md @@ -1,12 +1,12 @@ -# UserType +# Status ## Enum Name | Type | Notes ------------ | ------------- | ------------- -**ADMIN** | string | (value: `"admin"`) -**OWNER** | string | (value: `"owner"`) -**TEAMMATE** | string | (value: `"teammate"`) +**PENDING** | string | (value: `"pending"`) +**READY** | string | (value: `"ready"`) +**FAILURE** | string | (value: `"failure"`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rest/api/v3/mc_contacts/docs/UpdateContact.md b/rest/api/v3/mc_contacts/docs/UpdateContact.md new file mode 100644 index 00000000..7a857f90 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/UpdateContact.md @@ -0,0 +1,48 @@ +# UpdateContact + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateContact**](UpdateContact.md#UpdateContact) | **Put** /v3/marketing/contacts | Add or Update a Contact + + + +## UpdateContact + +> UpdateContact202Response UpdateContact(ctx, optional) + +Add or Update a Contact + +**This endpoint allows the [upsert](https://en.wiktionary.org/wiki/upsert) (insert or update) of up to 30,000 contacts, or 6MB of data, whichever is lower**. Because the creation and update of contacts is an asynchronous process, the response will not contain immediate feedback on the processing of your upserted contacts. Rather, it will contain an HTTP 202 response indicating the contacts are queued for processing or an HTTP 4XX error containing validation errors. Should you wish to get the resulting contact's ID or confirm that your contacts have been updated or added, you can use the [Get Contacts by Identifiers operation](https://www.twilio.com/docs/sendgrid/api-reference/contacts/get-contacts-by-identifiers). Please note that custom fields need to have been already created if you wish to set their values for the contacts being upserted. To do this, please use the [Create Custom Field Definition endpoint](https://www.twilio.com/docs/sendgrid/api-reference/custom-fields/create-custom-field-definition). You will see a `job_id` in the response to your request. This can be used to check the status of your upsert job. To do so, please use the [Import Contacts Status endpoint](https://www.twilio.com/docs/sendgrid/api-reference/contacts/import-contacts-status). If the contact already exists in the system, any entries submitted via this endpoint will update the existing contact. In order to update a contact, all of its existing identifiers must be present. Any fields omitted from the request will remain as they were. A contact's ID cannot be used to update the contact. The email field will be changed to all lower-case. If a contact is added with an email that exists but contains capital letters, the existing contact with the all lower-case email will be updated. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateContactParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**UpdateContactRequest** | [**UpdateContactRequest**](UpdateContactRequest.md) | + +### Return type + +[**UpdateContact202Response**](UpdateContact202Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_contacts/docs/UpdateContact202Response.md b/rest/api/v3/mc_contacts/docs/UpdateContact202Response.md new file mode 100644 index 00000000..463a2ace --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/UpdateContact202Response.md @@ -0,0 +1,11 @@ +# UpdateContact202Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**JobId** | **string** | Indicates that the contacts are queued for processing. Check the job status with the \"Import Contacts Status\" endpoint. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/docs/UpdateContactRequest.md b/rest/api/v3/mc_contacts/docs/UpdateContactRequest.md new file mode 100644 index 00000000..03666fa3 --- /dev/null +++ b/rest/api/v3/mc_contacts/docs/UpdateContactRequest.md @@ -0,0 +1,12 @@ +# UpdateContactRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ListIds** | **[]string** | An array of List ID strings that this contact will be added to. |[optional] +**Contacts** | [**[]ContactRequest**](ContactRequest.md) | One or more contacts objects that you intend to upsert. Each contact needs to include at least one of `email`, `phone_number_id`, `external_id`, or `anonymous_id` as an identifier. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_contacts/model_contact_details3.go b/rest/api/v3/mc_contacts/model_contact_details3.go new file mode 100644 index 00000000..097a6c00 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_contact_details3.go @@ -0,0 +1,43 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactDetails3 struct for ContactDetails3 +type ContactDetails3 struct { + Id string `json:"id"` + FirstName *string `json:"first_name,omitempty"` + LastName *string `json:"last_name,omitempty"` + UniqueName *string `json:"unique_name,omitempty"` + Email *string `json:"email,omitempty"` + PhoneNumberId *string `json:"phone_number_id,omitempty"` + ExternalId *string `json:"external_id,omitempty"` + AnonymousId *string `json:"anonymous_id,omitempty"` + AlternateEmails *[]string `json:"alternate_emails,omitempty"` + AddressLine1 *string `json:"address_line_1,omitempty"` + AddressLine2 *string `json:"address_line_2,omitempty"` + City *string `json:"city,omitempty"` + StateProvinceRegion *string `json:"state_province_region,omitempty"` + Country *string `json:"country,omitempty"` + PostalCode *string `json:"postal_code,omitempty"` + PhoneNumber *string `json:"phone_number,omitempty"` + Whatsapp *string `json:"whatsapp,omitempty"` + Line *string `json:"line,omitempty"` + Facebook *string `json:"facebook,omitempty"` + ListIds []string `json:"list_ids"` + SegmentIds []string `json:"segment_ids"` + CustomFields *map[string]interface{} `json:"custom_fields,omitempty"` + CreatedAt string `json:"created_at"` + UpdatedAt string `json:"updated_at"` + Metadata *SelfMetadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_contact_export.go b/rest/api/v3/mc_contacts/model_contact_export.go new file mode 100644 index 00000000..2d089580 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_contact_export.go @@ -0,0 +1,36 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactExport struct for ContactExport +type ContactExport struct { + Id string `json:"id"` + // The export job's status. Allowed values: `pending`, `ready`, or `failure`. + Status Status `json:"status"` + // The ISO8601 timestamp when the export was begun. + CreatedAt string `json:"created_at"` + // The ISO8601 timestamp when the export was updated. + UpdatedAt string `json:"updated_at"` + // The ISO8601 timestamp when the export was completed. + CompletedAt *string `json:"completed_at,omitempty"` + // The ISO8601 timestamp when the exported file on S3 will expire. + ExpiresAt string `json:"expires_at"` + // One or more download URLs for the contact file if the status is `ready`. + Urls *[]string `json:"urls,omitempty"` + // A human readable message if the status is `failure`. + Message *string `json:"message,omitempty"` + Metadata *Metadata `json:"_metadata,omitempty"` + // The total number of exported contacts. + ContactCount *int32 `json:"contact_count,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_contact_import.go b/rest/api/v3/mc_contacts/model_contact_import.go new file mode 100644 index 00000000..5c17fcf0 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_contact_import.go @@ -0,0 +1,29 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactImport struct for ContactImport +type ContactImport struct { + // The job ID. + Id *string `json:"id,omitempty"` + // The job state. Allowed values: `pending`, `completed`, `errored`, or `failed`. + Status *string `json:"status,omitempty"` + // The job type. Allowed values: `upsert`, or `delete`. + JobType *string `json:"job_type,omitempty"` + Results *ContactImportResults `json:"results,omitempty"` + // The ISO8601 timestamp when the job was created. + StartedAt *string `json:"started_at,omitempty"` + // The ISO8601 timestamp when the job was finished. + FinishedAt *string `json:"finished_at,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_contact_import_results.go b/rest/api/v3/mc_contacts/model_contact_import_results.go new file mode 100644 index 00000000..784e1b4d --- /dev/null +++ b/rest/api/v3/mc_contacts/model_contact_import_results.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactImportResults Result map of the import job. +type ContactImportResults struct { + // Requested contact count from the import. + RequestedCount *float32 `json:"requested_count,omitempty"` + // Created contact count from the import. + CreatedCount *float32 `json:"created_count,omitempty"` + // Updated contact count from the import. + UpdatedCount *float32 `json:"updated_count,omitempty"` + // Count of deleted contacts that resulted in error. + DeletedCount *float32 `json:"deleted_count,omitempty"` + // Count of imported contacts that resulted in error. + ErroredCount *float32 `json:"errored_count,omitempty"` + // The download URL of the file which provides information about any errors. + ErrorsUrl *string `json:"errors_url,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_contact_request.go b/rest/api/v3/mc_contacts/model_contact_request.go new file mode 100644 index 00000000..eaabe77c --- /dev/null +++ b/rest/api/v3/mc_contacts/model_contact_request.go @@ -0,0 +1,45 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactRequest struct for ContactRequest +type ContactRequest struct { + // The first line of the address. + AddressLine1 *string `json:"address_line_1,omitempty"` + // An optional second line for the address. + AddressLine2 *string `json:"address_line_2,omitempty"` + // Additional emails associated with the contact. + AlternateEmails *[]string `json:"alternate_emails,omitempty"` + // The contact's city. + City *string `json:"city,omitempty"` + // The contact's country. Can be a full name or an abbreviation. + Country *string `json:"country,omitempty"` + // The contact's primary email. This is required to be a valid email. + Email *string `json:"email,omitempty"` + // The contact's Phone Number ID. This must be a valid phone number. + PhoneNumberId *string `json:"phone_number_id,omitempty"` + // The contact's External ID. + ExternalId *string `json:"external_id,omitempty"` + // The contact's Anonymous ID. + AnonymousId *string `json:"anonymous_id,omitempty"` + // The contact's personal name. + FirstName *string `json:"first_name,omitempty"` + // The contact's family name. + LastName *string `json:"last_name,omitempty"` + // The contact's ZIP code or other postal code. + PostalCode *string `json:"postal_code,omitempty"` + // The contact's state, province, or region. + StateProvinceRegion *string `json:"state_province_region,omitempty"` + CustomFields *ContactRequestCustomFields `json:"custom_fields,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_contact_request_custom_fields.go b/rest/api/v3/mc_contacts/model_contact_request_custom_fields.go new file mode 100644 index 00000000..cda6297c --- /dev/null +++ b/rest/api/v3/mc_contacts/model_contact_request_custom_fields.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactRequestCustomFields An object of custom field IDs and the values you want to associate with those custom fields. You can retrieve the IDs of your custom fields from the [Get All Field Definitions endpoint](https://docs.sendgrid.com/api-reference/custom-fields/get-all-field-definitions). +type ContactRequestCustomFields struct { + // The properties in this object are made up of a key (the custom field ID) and value you want associated with that custom field. For example `{\"w1\": \"coffee\"}`. + W1 *string `json:"w1,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_contacts_error.go b/rest/api/v3/mc_contacts/model_contacts_error.go new file mode 100644 index 00000000..67328dc7 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_contacts_error.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactsError struct for ContactsError +type ContactsError struct { + Message string `json:"message"` + Field *string `json:"field,omitempty"` + ErrorId *string `json:"error_id,omitempty"` + Parameter *string `json:"parameter,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_delete_contact_202_response.go b/rest/api/v3/mc_contacts/model_delete_contact_202_response.go new file mode 100644 index 00000000..9a6ae433 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_delete_contact_202_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteContact202Response The deletion job has been accepted and is being processed. +type DeleteContact202Response struct { + // The deletion job ID. + JobId map[string]interface{} `json:"job_id"` +} diff --git a/rest/api/v3/mc_contacts/model_delete_contact_400_response.go b/rest/api/v3/mc_contacts/model_delete_contact_400_response.go new file mode 100644 index 00000000..574ca904 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_delete_contact_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteContact400Response struct for DeleteContact400Response +type DeleteContact400Response struct { + Errors []map[string]interface{} `json:"errors"` +} diff --git a/rest/api/v3/mc_contacts/model_delete_contact_identifier_202_response.go b/rest/api/v3/mc_contacts/model_delete_contact_identifier_202_response.go new file mode 100644 index 00000000..db027420 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_delete_contact_identifier_202_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteContactIdentifier202Response Indicates that the deletion is queued for processing. Check the job status with the Import Contacts Status endpoint. +type DeleteContactIdentifier202Response struct { + // The deletion job ID. + JobId map[string]interface{} `json:"job_id"` +} diff --git a/rest/api/v3/mc_contacts/model_delete_contact_identifier_request.go b/rest/api/v3/mc_contacts/model_delete_contact_identifier_request.go new file mode 100644 index 00000000..5a79733a --- /dev/null +++ b/rest/api/v3/mc_contacts/model_delete_contact_identifier_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteContactIdentifierRequest struct for DeleteContactIdentifierRequest +type DeleteContactIdentifierRequest struct { + // The type of identifier you are removing from the contact. + IdentifierType IdentifierType `json:"identifier_type"` + // The value of the identifier you want to remove from the contact. + IdentifierValue string `json:"identifier_value"` +} diff --git a/rest/api/v3/mc_contacts/model_error_response.go b/rest/api/v3/mc_contacts/model_error_response.go new file mode 100644 index 00000000..6623fe83 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_error_response_errors_inner.go b/rest/api/v3/mc_contacts/model_error_response_errors_inner.go new file mode 100644 index 00000000..71ae3883 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_export_contact_202_response.go b/rest/api/v3/mc_contacts/model_export_contact_202_response.go new file mode 100644 index 00000000..adf95b39 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_export_contact_202_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ExportContact202Response struct for ExportContact202Response +type ExportContact202Response struct { + Metadata Metadata `json:"_metadata"` + // The ID of the export job. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_export_contact_request.go b/rest/api/v3/mc_contacts/model_export_contact_request.go new file mode 100644 index 00000000..a8cf34fd --- /dev/null +++ b/rest/api/v3/mc_contacts/model_export_contact_request.go @@ -0,0 +1,27 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ExportContactRequest struct for ExportContactRequest +type ExportContactRequest struct { + // IDs of the contact lists you want to export. + ListIds *[]string `json:"list_ids,omitempty"` + // IDs of the contact segments you want to export. + SegmentIds *[]string `json:"segment_ids,omitempty"` + Notifications *ExportContactRequestNotifications `json:"notifications,omitempty"` + // File type for export file. Choose from `json` or `csv`. + FileType *FileType `json:"file_type,omitempty"` + // The maximum size of an export file in MB. Note that when this option is specified, multiple output files may be returned from the export. + MaxFileSize *int32 `json:"max_file_size,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_export_contact_request_notifications.go b/rest/api/v3/mc_contacts/model_export_contact_request_notifications.go new file mode 100644 index 00000000..75c8a811 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_export_contact_request_notifications.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ExportContactRequestNotifications struct for ExportContactRequestNotifications +type ExportContactRequestNotifications struct { + Email *bool `json:"email,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_file_type.go b/rest/api/v3/mc_contacts/model_file_type.go new file mode 100644 index 00000000..a0d80406 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_file_type.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// FileType the model 'FileType' +type FileType string + +// List of FileType +const ( + FILETYPE_CSV FileType = "csv" + FILETYPE_JSON FileType = "json" +) diff --git a/rest/api/v3/mc_contacts/model_file_type1.go b/rest/api/v3/mc_contacts/model_file_type1.go new file mode 100644 index 00000000..2089bfb8 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_file_type1.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// FileType1 the model 'FileType1' +type FileType1 string + +// List of FileType1 +const ( + FILETYPE1_CSV FileType1 = "csv" +) diff --git a/rest/api/v3/mc_contacts/model_get_contact_by_identifiers_200_response.go b/rest/api/v3/mc_contacts/model_get_contact_by_identifiers_200_response.go new file mode 100644 index 00000000..3b44b617 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_get_contact_by_identifiers_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetContactByIdentifiers200Response An object containing one or more of the identifiers matching the searched identifiers in your contacts. +type GetContactByIdentifiers200Response struct { + Result *interface{} `json:"result,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_get_contact_by_identifiers_200_response_result_value.go b/rest/api/v3/mc_contacts/model_get_contact_by_identifiers_200_response_result_value.go new file mode 100644 index 00000000..b6d8d8fe --- /dev/null +++ b/rest/api/v3/mc_contacts/model_get_contact_by_identifiers_200_response_result_value.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetContactByIdentifiers200ResponseResultValue An identifiers value matching a searched identifier in your contacts. For example, if you use the email identifier type, the email address will be returned. +type GetContactByIdentifiers200ResponseResultValue struct { + Contact *ContactDetails3 `json:"contact,omitempty"` + Error *string `json:"error,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_get_contact_by_identifiers_request.go b/rest/api/v3/mc_contacts/model_get_contact_by_identifiers_request.go new file mode 100644 index 00000000..4557fa96 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_get_contact_by_identifiers_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetContactByIdentifiersRequest +type GetContactByIdentifiersRequest struct { + // One or more more identifier values to search for in your Marketing Campaigns contacts. + Identifiers []GetContactByIdentifiersRequestIdentifiersInner `json:"identifiers"` +} diff --git a/rest/api/v3/mc_contacts/model_get_contact_by_identifiers_request_identifiers_inner.go b/rest/api/v3/mc_contacts/model_get_contact_by_identifiers_request_identifiers_inner.go new file mode 100644 index 00000000..9211d285 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_get_contact_by_identifiers_request_identifiers_inner.go @@ -0,0 +1,25 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetContactByIdentifiersRequestIdentifiersInner struct for GetContactByIdentifiersRequestIdentifiersInner +type GetContactByIdentifiersRequestIdentifiersInner struct { + Email *string `json:"email,omitempty"` + // The contact's Phone Number ID. This is required to be a valid phone number. + PhoneNumberId *string `json:"phone_number_id,omitempty"` + // The contact's External ID. + ExternalId *string `json:"external_id,omitempty"` + // The contact's Anonymous ID. + AnonymousId *string `json:"anonymous_id,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_get_import_contact_400_response.go b/rest/api/v3/mc_contacts/model_get_import_contact_400_response.go new file mode 100644 index 00000000..b4aa0490 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_get_import_contact_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetImportContact400Response struct for GetImportContact400Response +type GetImportContact400Response struct { + Errors *ContactsError `json:"errors,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_identifier_type.go b/rest/api/v3/mc_contacts/model_identifier_type.go new file mode 100644 index 00000000..36ef1471 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_identifier_type.go @@ -0,0 +1,25 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IdentifierType the model 'IdentifierType' +type IdentifierType string + +// List of IdentifierType +const ( + IDENTIFIERTYPE_EMAIL IdentifierType = "EMAIL" + IDENTIFIERTYPE_PHONENUMBERID IdentifierType = "PHONENUMBERID" + IDENTIFIERTYPE_EXTERNALID IdentifierType = "EXTERNALID" + IDENTIFIERTYPE_ANONYMOUSID IdentifierType = "ANONYMOUSID" +) diff --git a/rest/api/v3/mc_contacts/model_identifier_type1.go b/rest/api/v3/mc_contacts/model_identifier_type1.go new file mode 100644 index 00000000..677f0158 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_identifier_type1.go @@ -0,0 +1,25 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IdentifierType1 the model 'IdentifierType1' +type IdentifierType1 string + +// List of IdentifierType1 +const ( + IDENTIFIERTYPE1_EMAIL IdentifierType1 = "email" + IDENTIFIERTYPE1_PHONE_NUMBER_ID IdentifierType1 = "phone_number_id" + IDENTIFIERTYPE1_EXTERNAL_ID IdentifierType1 = "external_id" + IDENTIFIERTYPE1_ANONYMOUS_ID IdentifierType1 = "anonymous_id" +) diff --git a/rest/api/v3/mc_contacts/model_import_contact_200_response.go b/rest/api/v3/mc_contacts/model_import_contact_200_response.go new file mode 100644 index 00000000..b4966a07 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_import_contact_200_response.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ImportContact200Response struct for ImportContact200Response +type ImportContact200Response struct { + // The ID of the import job. + JobId *string `json:"job_id,omitempty"` + // The URI to PUT the upload file to. + UploadUri *string `json:"upload_uri,omitempty"` + // A list of headers that must be included in PUT request. + UploadHeaders *[]ImportContact200ResponseUploadHeadersInner `json:"upload_headers,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_import_contact_200_response_upload_headers_inner.go b/rest/api/v3/mc_contacts/model_import_contact_200_response_upload_headers_inner.go new file mode 100644 index 00000000..983e49ef --- /dev/null +++ b/rest/api/v3/mc_contacts/model_import_contact_200_response_upload_headers_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ImportContact200ResponseUploadHeadersInner struct for ImportContact200ResponseUploadHeadersInner +type ImportContact200ResponseUploadHeadersInner struct { + Header string `json:"header"` + Value string `json:"value"` +} diff --git a/rest/api/v3/mc_contacts/model_import_contact_400_response.go b/rest/api/v3/mc_contacts/model_import_contact_400_response.go new file mode 100644 index 00000000..39873f4d --- /dev/null +++ b/rest/api/v3/mc_contacts/model_import_contact_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ImportContact400Response struct for ImportContact400Response +type ImportContact400Response struct { + Errors []ContactsError `json:"errors"` +} diff --git a/rest/api/v3/mc_contacts/model_import_contact_404_response.go b/rest/api/v3/mc_contacts/model_import_contact_404_response.go new file mode 100644 index 00000000..a7d6502b --- /dev/null +++ b/rest/api/v3/mc_contacts/model_import_contact_404_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ImportContact404Response If any of the specified lists do not exist. +type ImportContact404Response struct { + Errors []ContactsError `json:"errors"` +} diff --git a/rest/api/v3/mc_contacts/model_import_contact_request.go b/rest/api/v3/mc_contacts/model_import_contact_request.go new file mode 100644 index 00000000..7684ed27 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_import_contact_request.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ImportContactRequest struct for ImportContactRequest +type ImportContactRequest struct { + // All contacts will be added to each of the specified lists. + ListIds *[]string `json:"list_ids,omitempty"` + // Upload file type. + FileType FileType1 `json:"file_type"` + // Import file header to reserved/custom field mapping. + FieldMappings []string `json:"field_mappings"` +} diff --git a/rest/api/v3/mc_contacts/model_list_batched_contact_200_response.go b/rest/api/v3/mc_contacts/model_list_batched_contact_200_response.go new file mode 100644 index 00000000..245779a6 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_list_batched_contact_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListBatchedContact200Response struct for ListBatchedContact200Response +type ListBatchedContact200Response struct { + Result *[]ContactDetails3 `json:"result,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_list_batched_contact_request.go b/rest/api/v3/mc_contacts/model_list_batched_contact_request.go new file mode 100644 index 00000000..88a83022 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_list_batched_contact_request.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListBatchedContactRequest Array of IDs +type ListBatchedContactRequest struct { + Ids []string `json:"ids"` +} diff --git a/rest/api/v3/mc_contacts/model_list_contact_200_response.go b/rest/api/v3/mc_contacts/model_list_contact_200_response.go new file mode 100644 index 00000000..2b7b3a2e --- /dev/null +++ b/rest/api/v3/mc_contacts/model_list_contact_200_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListContact200Response struct for ListContact200Response +type ListContact200Response struct { + Result *[]ContactDetails3 `json:"result,omitempty"` + Metadata *SelfMetadata `json:"_metadata,omitempty"` + ContactCount *int32 `json:"contact_count,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_list_contact_400_response.go b/rest/api/v3/mc_contacts/model_list_contact_400_response.go new file mode 100644 index 00000000..328110dc --- /dev/null +++ b/rest/api/v3/mc_contacts/model_list_contact_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListContact400Response struct for ListContact400Response +type ListContact400Response struct { + Errors *[]ContactsError `json:"errors,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_list_contact_by_email_200_response.go b/rest/api/v3/mc_contacts/model_list_contact_by_email_200_response.go new file mode 100644 index 00000000..61afac23 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_list_contact_by_email_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListContactByEmail200Response An object containing one or more of the email addresses matching the searched addresses in your contacts. +type ListContactByEmail200Response struct { + Result *map[string]interface{} `json:"result,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_list_contact_by_email_request.go b/rest/api/v3/mc_contacts/model_list_contact_by_email_request.go new file mode 100644 index 00000000..4d6d7a36 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_list_contact_by_email_request.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListContactByEmailRequest +type ListContactByEmailRequest struct { + // One or more primary and/or alternate email addresses to search for in your Marketing Campaigns contacts. + Emails []string `json:"emails"` + // The contact's Phone Number ID. This is required to be a valid phone number. + PhoneNumberId *string `json:"phone_number_id,omitempty"` + // The contact's External ID. + ExternalId *string `json:"external_id,omitempty"` + // The contact's Anonymous ID. + AnonymousId *string `json:"anonymous_id,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_list_contact_count_200_response.go b/rest/api/v3/mc_contacts/model_list_contact_count_200_response.go new file mode 100644 index 00000000..8c0c4be5 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_list_contact_count_200_response.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListContactCount200Response struct for ListContactCount200Response +type ListContactCount200Response struct { + // The total number of contacts. + ContactCount int32 `json:"contact_count"` + // The count of contacts this month for billing purposes. + BillableCount *int32 `json:"billable_count,omitempty"` + BillableBreakdown *ListContactCount200ResponseBillableBreakdown `json:"billable_breakdown,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_list_contact_count_200_response_billable_breakdown.go b/rest/api/v3/mc_contacts/model_list_contact_count_200_response_billable_breakdown.go new file mode 100644 index 00000000..dbb6ff00 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_list_contact_count_200_response_billable_breakdown.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListContactCount200ResponseBillableBreakdown `billable_breakdown` will only appear to the parent user in an account with subusers. +type ListContactCount200ResponseBillableBreakdown struct { + // The sum of all the subuser's billable contacts + Total *int32 `json:"total,omitempty"` + // A map of each subuser's billable contact usage. Each key is the subuser's ID and each value is the usage thus far this month. + Breakdown *map[string]interface{} `json:"breakdown,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_list_export_contact_200_response.go b/rest/api/v3/mc_contacts/model_list_export_contact_200_response.go new file mode 100644 index 00000000..dea2a3fd --- /dev/null +++ b/rest/api/v3/mc_contacts/model_list_export_contact_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListExportContact200Response struct for ListExportContact200Response +type ListExportContact200Response struct { + Result *[]ListExportContact200ResponseResultInner `json:"result,omitempty"` + Metadata *ListExportContact200ResponseMetadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_list_export_contact_200_response__metadata.go b/rest/api/v3/mc_contacts/model_list_export_contact_200_response__metadata.go new file mode 100644 index 00000000..dc11ec2e --- /dev/null +++ b/rest/api/v3/mc_contacts/model_list_export_contact_200_response__metadata.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListExportContact200ResponseMetadata struct for ListExportContact200ResponseMetadata +type ListExportContact200ResponseMetadata struct { + Prev *string `json:"prev,omitempty"` + // Link to this page. + Self *string `json:"self,omitempty"` + // Link to next page. + Next *string `json:"next,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_list_export_contact_200_response_result_inner.go b/rest/api/v3/mc_contacts/model_list_export_contact_200_response_result_inner.go new file mode 100644 index 00000000..e4b39ec9 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_list_export_contact_200_response_result_inner.go @@ -0,0 +1,37 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListExportContact200ResponseResultInner struct for ListExportContact200ResponseResultInner +type ListExportContact200ResponseResultInner struct { + // Export jobs ID. + Id *string `json:"id,omitempty"` + // Allowed values: `pending`, `ready`, or `failure`. + Status *string `json:"status,omitempty"` + // This ISO8601 timestamp when the export was created. + CreatedAt *string `json:"created_at,omitempty"` + // This ISO8601 timestamp when the export was completed. + CompletedAt *string `json:"completed_at,omitempty"` + // This ISO8601 timestamp when the export expires. + ExpiresAt *string `json:"expires_at,omitempty"` + // One or more download URLs for the contact file(s) if the status is `ready`. + Urls *[]string `json:"urls,omitempty"` + // User ID. + UserId *string `json:"user_id,omitempty"` + // Allowed types: `contacts_export`, `list_export`, or `segment_export`. + ExportType *string `json:"export_type,omitempty"` + Segments *[]ListExportContact200ResponseResultInnerSegmentsInner `json:"segments,omitempty"` + Lists *[]ListExportContact200ResponseResultInnerSegmentsInner `json:"lists,omitempty"` + Metadata *ListExportContact200ResponseResultInnerMetadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_list_export_contact_200_response_result_inner__metadata.go b/rest/api/v3/mc_contacts/model_list_export_contact_200_response_result_inner__metadata.go new file mode 100644 index 00000000..bceb2e28 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_list_export_contact_200_response_result_inner__metadata.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListExportContact200ResponseResultInnerMetadata struct for ListExportContact200ResponseResultInnerMetadata +type ListExportContact200ResponseResultInnerMetadata struct { + Prev *string `json:"prev,omitempty"` + Self *string `json:"self,omitempty"` + Next *string `json:"next,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_list_export_contact_200_response_result_inner_segments_inner.go b/rest/api/v3/mc_contacts/model_list_export_contact_200_response_result_inner_segments_inner.go new file mode 100644 index 00000000..b63c388d --- /dev/null +++ b/rest/api/v3/mc_contacts/model_list_export_contact_200_response_result_inner_segments_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListExportContact200ResponseResultInnerSegmentsInner struct for ListExportContact200ResponseResultInnerSegmentsInner +type ListExportContact200ResponseResultInnerSegmentsInner struct { + ID *string `json:"ID,omitempty"` + Name *string `json:"Name,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_list_export_contact_400_response.go b/rest/api/v3/mc_contacts/model_list_export_contact_400_response.go new file mode 100644 index 00000000..2e115747 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_list_export_contact_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListExportContact400Response struct for ListExportContact400Response +type ListExportContact400Response struct { + Errors *[]ListExportContact400ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_list_export_contact_400_response_errors_inner.go b/rest/api/v3/mc_contacts/model_list_export_contact_400_response_errors_inner.go new file mode 100644 index 00000000..46b47022 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_list_export_contact_400_response_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListExportContact400ResponseErrorsInner struct for ListExportContact400ResponseErrorsInner +type ListExportContact400ResponseErrorsInner struct { + Message string `json:"message"` + ErrorId *string `json:"error_id,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_metadata.go b/rest/api/v3/mc_contacts/model_metadata.go new file mode 100644 index 00000000..09a296e8 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_metadata.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Metadata struct for Metadata +type Metadata struct { + // The URL of the previous page of results. If this field isn't present, you're at the start of the list. + Prev *string `json:"prev,omitempty"` + // The URL of the current page of results. + Self *string `json:"self,omitempty"` + // The URL of the next page of results. If this field isn't present, you're at the end of the list. + Next *string `json:"next,omitempty"` + // The number of items in the entire list, i.e., across all pages. + Count *float32 `json:"count,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_search_contact_200_response.go b/rest/api/v3/mc_contacts/model_search_contact_200_response.go new file mode 100644 index 00000000..6f4407d6 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_search_contact_200_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SearchContact200Response struct for SearchContact200Response +type SearchContact200Response struct { + Result *[]ContactDetails3 `json:"result,omitempty"` + Metadata *SelfMetadata `json:"_metadata,omitempty"` + // The total number of contacts matched. + ContactCount float32 `json:"contact_count"` +} diff --git a/rest/api/v3/mc_contacts/model_search_contact_400_response.go b/rest/api/v3/mc_contacts/model_search_contact_400_response.go new file mode 100644 index 00000000..6832d06a --- /dev/null +++ b/rest/api/v3/mc_contacts/model_search_contact_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SearchContact400Response struct for SearchContact400Response +type SearchContact400Response struct { + Errors *[]SearchContact400ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_search_contact_400_response_errors_inner.go b/rest/api/v3/mc_contacts/model_search_contact_400_response_errors_inner.go new file mode 100644 index 00000000..91e81750 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_search_contact_400_response_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SearchContact400ResponseErrorsInner struct for SearchContact400ResponseErrorsInner +type SearchContact400ResponseErrorsInner struct { + Field *string `json:"field,omitempty"` + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_search_contact_500_response.go b/rest/api/v3/mc_contacts/model_search_contact_500_response.go new file mode 100644 index 00000000..d2120801 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_search_contact_500_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SearchContact500Response struct for SearchContact500Response +type SearchContact500Response struct { + Errors *[]SearchContact500ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_search_contact_500_response_errors_inner.go b/rest/api/v3/mc_contacts/model_search_contact_500_response_errors_inner.go new file mode 100644 index 00000000..04686de3 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_search_contact_500_response_errors_inner.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SearchContact500ResponseErrorsInner struct for SearchContact500ResponseErrorsInner +type SearchContact500ResponseErrorsInner struct { + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_search_contact_request.go b/rest/api/v3/mc_contacts/model_search_contact_request.go new file mode 100644 index 00000000..18ff1943 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_search_contact_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SearchContactRequest struct for SearchContactRequest +type SearchContactRequest struct { + // An SGQL search string or other pattern. + Query string `json:"query"` +} diff --git a/rest/api/v3/mc_contacts/model_self_metadata.go b/rest/api/v3/mc_contacts/model_self_metadata.go new file mode 100644 index 00000000..ba8fd9db --- /dev/null +++ b/rest/api/v3/mc_contacts/model_self_metadata.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SelfMetadata struct for SelfMetadata +type SelfMetadata struct { + // A link to this object. + Self *string `json:"self,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_status.go b/rest/api/v3/mc_contacts/model_status.go new file mode 100644 index 00000000..4bcf7e60 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_status.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status the model 'Status' +type Status string + +// List of Status +const ( + STATUS_PENDING Status = "pending" + STATUS_READY Status = "ready" + STATUS_FAILURE Status = "failure" +) diff --git a/rest/api/v3/mc_contacts/model_update_contact_202_response.go b/rest/api/v3/mc_contacts/model_update_contact_202_response.go new file mode 100644 index 00000000..13da7b97 --- /dev/null +++ b/rest/api/v3/mc_contacts/model_update_contact_202_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateContact202Response struct for UpdateContact202Response +type UpdateContact202Response struct { + // Indicates that the contacts are queued for processing. Check the job status with the \"Import Contacts Status\" endpoint. + JobId *string `json:"job_id,omitempty"` +} diff --git a/rest/api/v3/mc_contacts/model_update_contact_request.go b/rest/api/v3/mc_contacts/model_update_contact_request.go new file mode 100644 index 00000000..042670ac --- /dev/null +++ b/rest/api/v3/mc_contacts/model_update_contact_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Contacts API +* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateContactRequest struct for UpdateContactRequest +type UpdateContactRequest struct { + // An array of List ID strings that this contact will be added to. + ListIds *[]string `json:"list_ids,omitempty"` + // One or more contacts objects that you intend to upsert. Each contact needs to include at least one of `email`, `phone_number_id`, `external_id`, or `anonymous_id` as an identifier. + Contacts []ContactRequest `json:"contacts"` +} diff --git a/rest/api/v3/mc_custom_fields/.openapi-generator b/rest/api/v3/mc_custom_fields/.openapi-generator new file mode 100644 index 00000000..0831e24f --- /dev/null +++ b/rest/api/v3/mc_custom_fields/.openapi-generator @@ -0,0 +1,36 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_create_field_definition.go +api_delete_field_definition.go +api_list_field_definition.go +api_service.go +api_update_field_definition.go +docs/CreateFieldDefinition.md +docs/CreateFieldDefinition200Response.md +docs/CreateFieldDefinition400Response.md +docs/CreateFieldDefinitionRequest.md +docs/CustomFieldDefinitionsResponse.md +docs/CustomFieldsError.md +docs/DeleteFieldDefinition.md +docs/FieldType.md +docs/FieldType1.md +docs/FieldType2.md +docs/ListFieldDefinition.md +docs/ListFieldDefinition200Response.md +docs/Metadata.md +docs/ReservedFieldDefinitionsResponseInner.md +docs/UpdateFieldDefinition.md +docs/UpdateFieldDefinitionRequest.md +model_create_field_definition_200_response.go +model_create_field_definition_400_response.go +model_create_field_definition_request.go +model_custom_field_definitions_response.go +model_custom_fields_error.go +model_field_type.go +model_field_type1.go +model_field_type2.go +model_list_field_definition_200_response.go +model_metadata.go +model_reserved_field_definitions_response_inner.go +model_update_field_definition_request.go diff --git a/rest/api/v3/sso/.openapi-generator-ignore b/rest/api/v3/mc_custom_fields/.openapi-generator-ignore similarity index 100% rename from rest/api/v3/sso/.openapi-generator-ignore rename to rest/api/v3/mc_custom_fields/.openapi-generator-ignore diff --git a/rest/api/v3/mc_custom_fields/README.md b/rest/api/v3/mc_custom_fields/README.md new file mode 100644 index 00000000..5b20ee47 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/README.md @@ -0,0 +1,78 @@ +# Go API client for + +The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. + +With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. + +You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T16:57:38.023442+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateFieldDefinition* | [**CreateFieldDefinition**](docs/CreateFieldDefinition.md#createfielddefinition) | **Post** /v3/marketing/field_definitions | Create Custom Field Definition +*DeleteFieldDefinition* | [**DeleteFieldDefinition**](docs/DeleteFieldDefinition.md#deletefielddefinition) | **Delete** /v3/marketing/field_definitions/{CustomFieldId} | Delete Custom Field Definition +*ListFieldDefinition* | [**ListFieldDefinition**](docs/ListFieldDefinition.md#listfielddefinition) | **Get** /v3/marketing/field_definitions | Get All Field Definitions +*UpdateFieldDefinition* | [**UpdateFieldDefinition**](docs/UpdateFieldDefinition.md#updatefielddefinition) | **Patch** /v3/marketing/field_definitions/{CustomFieldId} | Update Custom Field Definition + + +## Documentation For Models + + - [CreateFieldDefinition200Response](CreateFieldDefinition200Response.md) + - [CreateFieldDefinition400Response](CreateFieldDefinition400Response.md) + - [CreateFieldDefinitionRequest](CreateFieldDefinitionRequest.md) + - [CustomFieldDefinitionsResponse](CustomFieldDefinitionsResponse.md) + - [CustomFieldsError](CustomFieldsError.md) + - [FieldType](FieldType.md) + - [FieldType1](FieldType1.md) + - [FieldType2](FieldType2.md) + - [ListFieldDefinition200Response](ListFieldDefinition200Response.md) + - [Metadata](Metadata.md) + - [ReservedFieldDefinitionsResponseInner](ReservedFieldDefinitionsResponseInner.md) + - [UpdateFieldDefinitionRequest](UpdateFieldDefinitionRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/mc_custom_fields/api_create_field_definition.go b/rest/api/v3/mc_custom_fields/api_create_field_definition.go new file mode 100644 index 00000000..e93771ca --- /dev/null +++ b/rest/api/v3/mc_custom_fields/api_create_field_definition.go @@ -0,0 +1,73 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateFieldDefinitionParam struct { + // + CreateFieldDefinitionRequest *CreateFieldDefinitionRequest `json:"CreateFieldDefinitionRequest,omitempty"` +} + +func (params *CreateFieldDefinitionParam) SetCreateFieldDefinitionRequest(CreateFieldDefinitionRequest CreateFieldDefinitionRequest) *CreateFieldDefinitionParam { + params.CreateFieldDefinitionRequest = &CreateFieldDefinitionRequest + return params +} + +// **This endpoint creates a new custom field definition.** Custom field definitions are created with the given `name` and `field_type`. Although field names are stored in a case-sensitive manner, all field names must be case-insensitively unique. This means you may create a field named `CamelCase` or `camelcase`, but not both. Additionally, a Custom Field name cannot collide with any Reserved Field names. You should save the returned `id` value in order to update or delete the field at a later date. You can have up to 500 custom fields. The custom field name should be created using only alphanumeric characters (A-Z and 0-9) and underscores (\\_). Custom fields can only begin with letters A-Z or underscores (_). The field type can be date, text, or number fields. The field type is important for creating segments from your contact database. **Note: Creating a custom field that begins with a number will cause issues with sending in Marketing Campaigns.** +func (c *ApiService) CreateFieldDefinition(params *CreateFieldDefinitionParam) (interface{}, error) { + path := "/v3/marketing/field_definitions" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateFieldDefinitionRequest != nil { + b, err := json.Marshal(*params.CreateFieldDefinitionRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &CreateFieldDefinition200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &CreateFieldDefinition400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/mc_custom_fields/api_delete_field_definition.go b/rest/api/v3/mc_custom_fields/api_delete_field_definition.go new file mode 100644 index 00000000..ba38a496 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/api_delete_field_definition.go @@ -0,0 +1,61 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteFieldDefinitionParam struct { + // + CustomFieldId *string `json:"custom_field_id"` +} + +func (params *DeleteFieldDefinitionParam) SetCustomFieldId(CustomFieldId string) *DeleteFieldDefinitionParam { + params.CustomFieldId = &CustomFieldId + return params +} + +// **This endpoint deletes a defined Custom Field.** You can delete only Custom Fields; Reserved Fields cannot be deleted. +func (c *ApiService) DeleteFieldDefinition(params *DeleteFieldDefinitionParam) (interface{}, error) { + path := "/v3/marketing/field_definitions/{CustomFieldId}" + if params != nil && params.CustomFieldId != nil { + path = strings.Replace(path, "{"+"CustomFieldId"+"}", *params.CustomFieldId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 404 { + ps := &CreateFieldDefinition400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/mc_custom_fields/api_list_field_definition.go b/rest/api/v3/mc_custom_fields/api_list_field_definition.go new file mode 100644 index 00000000..6dbfba3d --- /dev/null +++ b/rest/api/v3/mc_custom_fields/api_list_field_definition.go @@ -0,0 +1,49 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListFieldDefinitionParam struct { +} + +// **This endpoint retrieves all defined Custom Fields and Reserved Fields.** +func (c *ApiService) ListFieldDefinition() (interface{}, error) { + path := "/v3/marketing/field_definitions" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListFieldDefinition200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/mc_custom_fields/api_service.go b/rest/api/v3/mc_custom_fields/api_service.go new file mode 100644 index 00000000..c8f8f2a4 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/mc_custom_fields/api_update_field_definition.go b/rest/api/v3/mc_custom_fields/api_update_field_definition.go new file mode 100644 index 00000000..4081afd0 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/api_update_field_definition.go @@ -0,0 +1,92 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateFieldDefinitionParam struct { + // + CustomFieldId *string `json:"custom_field_id"` + // + UpdateFieldDefinitionRequest *UpdateFieldDefinitionRequest `json:"UpdateFieldDefinitionRequest,omitempty"` +} + +func (params *UpdateFieldDefinitionParam) SetCustomFieldId(CustomFieldId string) *UpdateFieldDefinitionParam { + params.CustomFieldId = &CustomFieldId + return params +} +func (params *UpdateFieldDefinitionParam) SetUpdateFieldDefinitionRequest(UpdateFieldDefinitionRequest UpdateFieldDefinitionRequest) *UpdateFieldDefinitionParam { + params.UpdateFieldDefinitionRequest = &UpdateFieldDefinitionRequest + return params +} + +// **This endpoint allows you to update a defined Custom Field.** Only your Custom fields can be modified; Reserved Fields cannot be updated. +func (c *ApiService) UpdateFieldDefinition(params *UpdateFieldDefinitionParam) (interface{}, error) { + path := "/v3/marketing/field_definitions/{CustomFieldId}" + if params != nil && params.CustomFieldId != nil { + path = strings.Replace(path, "{"+"CustomFieldId"+"}", *params.CustomFieldId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateFieldDefinitionRequest != nil { + b, err := json.Marshal(*params.UpdateFieldDefinitionRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &CreateFieldDefinition200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &CreateFieldDefinition400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &CreateFieldDefinition400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition.md b/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition.md new file mode 100644 index 00000000..08bd9259 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition.md @@ -0,0 +1,48 @@ +# CreateFieldDefinition + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateFieldDefinition**](CreateFieldDefinition.md#CreateFieldDefinition) | **Post** /v3/marketing/field_definitions | Create Custom Field Definition + + + +## CreateFieldDefinition + +> CreateFieldDefinition200Response CreateFieldDefinition(ctx, optional) + +Create Custom Field Definition + +**This endpoint creates a new custom field definition.** Custom field definitions are created with the given `name` and `field_type`. Although field names are stored in a case-sensitive manner, all field names must be case-insensitively unique. This means you may create a field named `CamelCase` or `camelcase`, but not both. Additionally, a Custom Field name cannot collide with any Reserved Field names. You should save the returned `id` value in order to update or delete the field at a later date. You can have up to 500 custom fields. The custom field name should be created using only alphanumeric characters (A-Z and 0-9) and underscores (\\_). Custom fields can only begin with letters A-Z or underscores (_). The field type can be date, text, or number fields. The field type is important for creating segments from your contact database. **Note: Creating a custom field that begins with a number will cause issues with sending in Marketing Campaigns.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateFieldDefinitionParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**CreateFieldDefinitionRequest** | [**CreateFieldDefinitionRequest**](CreateFieldDefinitionRequest.md) | + +### Return type + +[**CreateFieldDefinition200Response**](CreateFieldDefinition200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition200Response.md b/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition200Response.md new file mode 100644 index 00000000..a68cd18e --- /dev/null +++ b/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition200Response.md @@ -0,0 +1,14 @@ +# CreateFieldDefinition200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**Name** | **string** | | +**FieldType** | [**FieldType2**](FieldType2.md) | | +**Metadata** | [**Metadata**](Metadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition400Response.md b/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition400Response.md new file mode 100644 index 00000000..94eaa0b9 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition400Response.md @@ -0,0 +1,11 @@ +# CreateFieldDefinition400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]CustomFieldsError**](CustomFieldsError.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinitionRequest.md b/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinitionRequest.md new file mode 100644 index 00000000..c1198cfc --- /dev/null +++ b/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinitionRequest.md @@ -0,0 +1,12 @@ +# CreateFieldDefinitionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**FieldType** | [**FieldType**](FieldType.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_custom_fields/docs/CustomFieldDefinitionsResponse.md b/rest/api/v3/mc_custom_fields/docs/CustomFieldDefinitionsResponse.md new file mode 100644 index 00000000..c899e1bd --- /dev/null +++ b/rest/api/v3/mc_custom_fields/docs/CustomFieldDefinitionsResponse.md @@ -0,0 +1,13 @@ +# CustomFieldDefinitionsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**Name** | **string** | | +**FieldType** | [**FieldType2**](FieldType2.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_custom_fields/docs/CustomFieldsError.md b/rest/api/v3/mc_custom_fields/docs/CustomFieldsError.md new file mode 100644 index 00000000..efda7914 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/docs/CustomFieldsError.md @@ -0,0 +1,14 @@ +# CustomFieldsError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | | +**Field** | **string** | |[optional] +**ErrorId** | **string** | |[optional] +**Parameter** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/DeleteSsoIntegration.md b/rest/api/v3/mc_custom_fields/docs/DeleteFieldDefinition.md similarity index 59% rename from rest/api/v3/sso/docs/DeleteSsoIntegration.md rename to rest/api/v3/mc_custom_fields/docs/DeleteFieldDefinition.md index d9961b65..4d760132 100644 --- a/rest/api/v3/sso/docs/DeleteSsoIntegration.md +++ b/rest/api/v3/mc_custom_fields/docs/DeleteFieldDefinition.md @@ -1,20 +1,20 @@ -# DeleteSsoIntegration +# DeleteFieldDefinition All URIs are relative to *https://api.sendgrid.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**DeleteSsoIntegration**](DeleteSsoIntegration.md#DeleteSsoIntegration) | **Delete** /v3/sso/integrations/{Id} | Delete an SSO Integration +[**DeleteFieldDefinition**](DeleteFieldDefinition.md#DeleteFieldDefinition) | **Delete** /v3/marketing/field_definitions/{CustomFieldId} | Delete Custom Field Definition -## DeleteSsoIntegration +## DeleteFieldDefinition -> DeleteSsoIntegration(ctx, Id) +> DeleteFieldDefinition(ctx, CustomFieldId) -Delete an SSO Integration +Delete Custom Field Definition -**This endpoint allows you to delete an IdP configuration by ID.** You can retrieve the IDs for your configurations from the response provided by the \"Get All SSO Integrations\" endpoint. +**This endpoint deletes a defined Custom Field.** You can delete only Custom Fields; Reserved Fields cannot be deleted. ### Path Parameters @@ -22,11 +22,11 @@ Delete an SSO Integration Name | Type | Description ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | +**CustomFieldId** | **string** | ### Other Parameters -Other parameters are passed through a pointer to a DeleteSsoIntegrationParams struct +Other parameters are passed through a pointer to a DeleteFieldDefinitionParams struct Name | Type | Description diff --git a/rest/api/v3/stats/docs/AggregatedBy1.md b/rest/api/v3/mc_custom_fields/docs/FieldType.md similarity index 64% rename from rest/api/v3/stats/docs/AggregatedBy1.md rename to rest/api/v3/mc_custom_fields/docs/FieldType.md index b34f829d..39cade55 100644 --- a/rest/api/v3/stats/docs/AggregatedBy1.md +++ b/rest/api/v3/mc_custom_fields/docs/FieldType.md @@ -1,12 +1,12 @@ -# AggregatedBy1 +# FieldType ## Enum Name | Type | Notes ------------ | ------------- | ------------- -**DAY** | string | (value: `"day"`) -**WEEK** | string | (value: `"week"`) -**MONTH** | string | (value: `"month"`) +**TEXT** | string | (value: `"Text"`) +**NUMBER** | string | (value: `"Number"`) +**DATE** | string | (value: `"Date"`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rest/api/v3/mc_custom_fields/docs/FieldType1.md b/rest/api/v3/mc_custom_fields/docs/FieldType1.md new file mode 100644 index 00000000..0d96119b --- /dev/null +++ b/rest/api/v3/mc_custom_fields/docs/FieldType1.md @@ -0,0 +1,14 @@ +# FieldType1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TEXT** | string | (value: `"Text"`) +**NUMBER** | string | (value: `"Number"`) +**DATE** | string | (value: `"Date"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_custom_fields/docs/FieldType2.md b/rest/api/v3/mc_custom_fields/docs/FieldType2.md new file mode 100644 index 00000000..df80145c --- /dev/null +++ b/rest/api/v3/mc_custom_fields/docs/FieldType2.md @@ -0,0 +1,14 @@ +# FieldType2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TEXT** | string | (value: `"Text"`) +**NUMBER** | string | (value: `"Number"`) +**DATE** | string | (value: `"Date"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_custom_fields/docs/ListFieldDefinition.md b/rest/api/v3/mc_custom_fields/docs/ListFieldDefinition.md new file mode 100644 index 00000000..19ca33a6 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/docs/ListFieldDefinition.md @@ -0,0 +1,44 @@ +# ListFieldDefinition + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListFieldDefinition**](ListFieldDefinition.md#ListFieldDefinition) | **Get** /v3/marketing/field_definitions | Get All Field Definitions + + + +## ListFieldDefinition + +> ListFieldDefinition200Response ListFieldDefinition(ctx, ) + +Get All Field Definitions + +**This endpoint retrieves all defined Custom Fields and Reserved Fields.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListFieldDefinitionParams struct + + +### Return type + +[**ListFieldDefinition200Response**](ListFieldDefinition200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_custom_fields/docs/ListFieldDefinition200Response.md b/rest/api/v3/mc_custom_fields/docs/ListFieldDefinition200Response.md new file mode 100644 index 00000000..a3b477f4 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/docs/ListFieldDefinition200Response.md @@ -0,0 +1,13 @@ +# ListFieldDefinition200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomFields** | [**[]CustomFieldDefinitionsResponse**](CustomFieldDefinitionsResponse.md) | | +**ReservedFields** | [**[]ReservedFieldDefinitionsResponseInner**](ReservedFieldDefinitionsResponseInner.md) | | +**Metadata** | [**Metadata**](Metadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_designs/docs/Metadata.md b/rest/api/v3/mc_custom_fields/docs/Metadata.md similarity index 100% rename from rest/api/v3/mc_designs/docs/Metadata.md rename to rest/api/v3/mc_custom_fields/docs/Metadata.md diff --git a/rest/api/v3/mc_custom_fields/docs/ReservedFieldDefinitionsResponseInner.md b/rest/api/v3/mc_custom_fields/docs/ReservedFieldDefinitionsResponseInner.md new file mode 100644 index 00000000..35e65741 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/docs/ReservedFieldDefinitionsResponseInner.md @@ -0,0 +1,13 @@ +# ReservedFieldDefinitionsResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | |[optional] +**FieldType** | [**FieldType1**](FieldType1.md) | |[optional] +**ReadOnly** | **bool** | When `true` this means API consumers are unable to set the value of this field on contacts. |[optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/UpdateSsoCertificate.md b/rest/api/v3/mc_custom_fields/docs/UpdateFieldDefinition.md similarity index 50% rename from rest/api/v3/sso/docs/UpdateSsoCertificate.md rename to rest/api/v3/mc_custom_fields/docs/UpdateFieldDefinition.md index 0873a139..98914789 100644 --- a/rest/api/v3/sso/docs/UpdateSsoCertificate.md +++ b/rest/api/v3/mc_custom_fields/docs/UpdateFieldDefinition.md @@ -1,20 +1,20 @@ -# UpdateSsoCertificate +# UpdateFieldDefinition All URIs are relative to *https://api.sendgrid.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**UpdateSsoCertificate**](UpdateSsoCertificate.md#UpdateSsoCertificate) | **Patch** /v3/sso/certificates/{CertId} | Update SSO Certificate +[**UpdateFieldDefinition**](UpdateFieldDefinition.md#UpdateFieldDefinition) | **Patch** /v3/marketing/field_definitions/{CustomFieldId} | Update Custom Field Definition -## UpdateSsoCertificate +## UpdateFieldDefinition -> SsoCertificateBody UpdateSsoCertificate(ctx, CertIdoptional) +> CreateFieldDefinition200Response UpdateFieldDefinition(ctx, CustomFieldIdoptional) -Update SSO Certificate +Update Custom Field Definition -**This endpoint allows you to update an existing certificate by ID.** You can retrieve a certificate's ID from the response provided by the \"Get All SSO Integrations\" endpoint. +**This endpoint allows you to update a defined Custom Field.** Only your Custom fields can be modified; Reserved Fields cannot be updated. ### Path Parameters @@ -22,20 +22,20 @@ Update SSO Certificate Name | Type | Description ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**CertId** | **string** | +**CustomFieldId** | **string** | ### Other Parameters -Other parameters are passed through a pointer to a UpdateSsoCertificateParams struct +Other parameters are passed through a pointer to a UpdateFieldDefinitionParams struct Name | Type | Description ------------- | ------------- | ------------- -**UpdateSsoCertificateRequest** | [**UpdateSsoCertificateRequest**](UpdateSsoCertificateRequest.md) | +**UpdateFieldDefinitionRequest** | [**UpdateFieldDefinitionRequest**](UpdateFieldDefinitionRequest.md) | ### Return type -[**SsoCertificateBody**](SsoCertificateBody.md) +[**CreateFieldDefinition200Response**](CreateFieldDefinition200Response.md) ### Authorization diff --git a/rest/api/v3/mc_custom_fields/docs/UpdateFieldDefinitionRequest.md b/rest/api/v3/mc_custom_fields/docs/UpdateFieldDefinitionRequest.md new file mode 100644 index 00000000..f386d9b3 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/docs/UpdateFieldDefinitionRequest.md @@ -0,0 +1,11 @@ +# UpdateFieldDefinitionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_custom_fields/model_create_field_definition_200_response.go b/rest/api/v3/mc_custom_fields/model_create_field_definition_200_response.go new file mode 100644 index 00000000..214fb310 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/model_create_field_definition_200_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateFieldDefinition200Response struct for CreateFieldDefinition200Response +type CreateFieldDefinition200Response struct { + Id string `json:"id"` + Name string `json:"name"` + FieldType FieldType2 `json:"field_type"` + Metadata *Metadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/mc_custom_fields/model_create_field_definition_400_response.go b/rest/api/v3/mc_custom_fields/model_create_field_definition_400_response.go new file mode 100644 index 00000000..1ef18211 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/model_create_field_definition_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateFieldDefinition400Response struct for CreateFieldDefinition400Response +type CreateFieldDefinition400Response struct { + Errors []CustomFieldsError `json:"errors"` +} diff --git a/rest/api/v3/mc_custom_fields/model_create_field_definition_request.go b/rest/api/v3/mc_custom_fields/model_create_field_definition_request.go new file mode 100644 index 00000000..599343f6 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/model_create_field_definition_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateFieldDefinitionRequest struct for CreateFieldDefinitionRequest +type CreateFieldDefinitionRequest struct { + Name string `json:"name"` + FieldType FieldType `json:"field_type"` +} diff --git a/rest/api/v3/mc_custom_fields/model_custom_field_definitions_response.go b/rest/api/v3/mc_custom_fields/model_custom_field_definitions_response.go new file mode 100644 index 00000000..029a2c84 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/model_custom_field_definitions_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CustomFieldDefinitionsResponse struct for CustomFieldDefinitionsResponse +type CustomFieldDefinitionsResponse struct { + Id string `json:"id"` + Name string `json:"name"` + FieldType FieldType2 `json:"field_type"` +} diff --git a/rest/api/v3/mc_custom_fields/model_custom_fields_error.go b/rest/api/v3/mc_custom_fields/model_custom_fields_error.go new file mode 100644 index 00000000..c763d2ec --- /dev/null +++ b/rest/api/v3/mc_custom_fields/model_custom_fields_error.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CustomFieldsError struct for CustomFieldsError +type CustomFieldsError struct { + Message string `json:"message"` + Field *string `json:"field,omitempty"` + ErrorId *string `json:"error_id,omitempty"` + Parameter *string `json:"parameter,omitempty"` +} diff --git a/rest/api/v3/mc_custom_fields/model_field_type.go b/rest/api/v3/mc_custom_fields/model_field_type.go new file mode 100644 index 00000000..d667c56f --- /dev/null +++ b/rest/api/v3/mc_custom_fields/model_field_type.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// FieldType the model 'FieldType' +type FieldType string + +// List of FieldType +const ( + FIELDTYPE_TEXT FieldType = "Text" + FIELDTYPE_NUMBER FieldType = "Number" + FIELDTYPE_DATE FieldType = "Date" +) diff --git a/rest/api/v3/mc_custom_fields/model_field_type1.go b/rest/api/v3/mc_custom_fields/model_field_type1.go new file mode 100644 index 00000000..fb7ad5b7 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/model_field_type1.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// FieldType1 the model 'FieldType1' +type FieldType1 string + +// List of FieldType1 +const ( + FIELDTYPE1_TEXT FieldType1 = "Text" + FIELDTYPE1_NUMBER FieldType1 = "Number" + FIELDTYPE1_DATE FieldType1 = "Date" +) diff --git a/rest/api/v3/mc_custom_fields/model_field_type2.go b/rest/api/v3/mc_custom_fields/model_field_type2.go new file mode 100644 index 00000000..93faa534 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/model_field_type2.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// FieldType2 the model 'FieldType2' +type FieldType2 string + +// List of FieldType2 +const ( + FIELDTYPE2_TEXT FieldType2 = "Text" + FIELDTYPE2_NUMBER FieldType2 = "Number" + FIELDTYPE2_DATE FieldType2 = "Date" +) diff --git a/rest/api/v3/mc_custom_fields/model_list_field_definition_200_response.go b/rest/api/v3/mc_custom_fields/model_list_field_definition_200_response.go new file mode 100644 index 00000000..11dd5c80 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/model_list_field_definition_200_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListFieldDefinition200Response struct for ListFieldDefinition200Response +type ListFieldDefinition200Response struct { + CustomFields []CustomFieldDefinitionsResponse `json:"custom_fields"` + ReservedFields []ReservedFieldDefinitionsResponseInner `json:"reserved_fields"` + Metadata *Metadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/mc_custom_fields/model_metadata.go b/rest/api/v3/mc_custom_fields/model_metadata.go new file mode 100644 index 00000000..99bc91cc --- /dev/null +++ b/rest/api/v3/mc_custom_fields/model_metadata.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Metadata struct for Metadata +type Metadata struct { + Prev *string `json:"prev,omitempty"` + Self *string `json:"self,omitempty"` + Next *string `json:"next,omitempty"` + Count *int32 `json:"count,omitempty"` +} diff --git a/rest/api/v3/mc_custom_fields/model_reserved_field_definitions_response_inner.go b/rest/api/v3/mc_custom_fields/model_reserved_field_definitions_response_inner.go new file mode 100644 index 00000000..ef81cb82 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/model_reserved_field_definitions_response_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ReservedFieldDefinitionsResponseInner struct for ReservedFieldDefinitionsResponseInner +type ReservedFieldDefinitionsResponseInner struct { + Name *string `json:"name,omitempty"` + FieldType *FieldType1 `json:"field_type,omitempty"` + // When `true` this means API consumers are unable to set the value of this field on contacts. + ReadOnly *bool `json:"read_only,omitempty"` +} diff --git a/rest/api/v3/mc_custom_fields/model_update_field_definition_request.go b/rest/api/v3/mc_custom_fields/model_update_field_definition_request.go new file mode 100644 index 00000000..1172b9ce --- /dev/null +++ b/rest/api/v3/mc_custom_fields/model_update_field_definition_request.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateFieldDefinitionRequest struct for UpdateFieldDefinitionRequest +type UpdateFieldDefinitionRequest struct { + Name string `json:"name"` +} diff --git a/rest/api/v3/mc_designs/.openapi-generator b/rest/api/v3/mc_designs/.openapi-generator deleted file mode 100644 index 6f44dcb1..00000000 --- a/rest/api/v3/mc_designs/.openapi-generator +++ /dev/null @@ -1,43 +0,0 @@ -.openapi-generator -README.md -api_create_design.go -api_delete_design.go -api_duplicate_design.go -api_duplicate_pre_built_design.go -api_get_design.go -api_get_pre_built_design.go -api_list_design.go -api_list_pre_built_design.go -api_service.go -api_update_design.go -docs/ApiError.md -docs/ApiErrors.md -docs/CreateDesign.md -docs/DeleteDesign.md -docs/DesignCommonProperties.md -docs/DesignDuplicateInput.md -docs/DesignInput.md -docs/DesignOutput.md -docs/DesignOutputSummary.md -docs/DuplicateDesign.md -docs/DuplicatePreBuiltDesign.md -docs/Editor.md -docs/GetDesign.md -docs/GetPreBuiltDesign.md -docs/ListDesign.md -docs/ListDesign200Response.md -docs/ListPreBuiltDesign.md -docs/Metadata.md -docs/UpdateDesign.md -docs/UpdateDesignRequest.md -model_api_error.go -model_api_errors.go -model_design_common_properties.go -model_design_duplicate_input.go -model_design_input.go -model_design_output.go -model_design_output_summary.go -model_editor.go -model_list_design_200_response.go -model_metadata.go -model_update_design_request.go diff --git a/rest/api/v3/mc_designs/README.md b/rest/api/v3/mc_designs/README.md deleted file mode 100644 index 3de167f1..00000000 --- a/rest/api/v3/mc_designs/README.md +++ /dev/null @@ -1,84 +0,0 @@ -# Go API client for - -The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). - -The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. - -You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. - -The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T13:25:44.066640+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*CreateDesign* | [**CreateDesign**](docs/CreateDesign.md#createdesign) | **Post** /v3/designs | Create Design -*DeleteDesign* | [**DeleteDesign**](docs/DeleteDesign.md#deletedesign) | **Delete** /v3/designs/{Id} | Delete Design -*DuplicateDesign* | [**DuplicateDesign**](docs/DuplicateDesign.md#duplicatedesign) | **Post** /v3/designs/{Id} | Duplicate Design -*DuplicatePreBuiltDesign* | [**DuplicatePreBuiltDesign**](docs/DuplicatePreBuiltDesign.md#duplicateprebuiltdesign) | **Post** /v3/designs/pre-builts/{Id} | Duplicate SendGrid Pre-built Design -*GetDesign* | [**GetDesign**](docs/GetDesign.md#getdesign) | **Get** /v3/designs/{Id} | Get Design -*GetPreBuiltDesign* | [**GetPreBuiltDesign**](docs/GetPreBuiltDesign.md#getprebuiltdesign) | **Get** /v3/designs/pre-builts/{Id} | Get SendGrid Pre-built Design -*ListDesign* | [**ListDesign**](docs/ListDesign.md#listdesign) | **Get** /v3/designs | List Designs -*ListPreBuiltDesign* | [**ListPreBuiltDesign**](docs/ListPreBuiltDesign.md#listprebuiltdesign) | **Get** /v3/designs/pre-builts | List SendGrid Pre-built Designs -*UpdateDesign* | [**UpdateDesign**](docs/UpdateDesign.md#updatedesign) | **Patch** /v3/designs/{Id} | Update Design - - -## Documentation For Models - - - [ApiError](ApiError.md) - - [ApiErrors](ApiErrors.md) - - [DesignCommonProperties](DesignCommonProperties.md) - - [DesignDuplicateInput](DesignDuplicateInput.md) - - [DesignInput](DesignInput.md) - - [DesignOutput](DesignOutput.md) - - [DesignOutputSummary](DesignOutputSummary.md) - - [Editor](Editor.md) - - [ListDesign200Response](ListDesign200Response.md) - - [Metadata](Metadata.md) - - [UpdateDesignRequest](UpdateDesignRequest.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/mc_designs/api_create_design.go b/rest/api/v3/mc_designs/api_create_design.go deleted file mode 100644 index c8b41d3c..00000000 --- a/rest/api/v3/mc_designs/api_create_design.go +++ /dev/null @@ -1,72 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" -) - -type CreateDesignParam struct { - // - DesignInput *DesignInput `json:"DesignInput,omitempty"` -} - -func (params *CreateDesignParam) SetDesignInput(DesignInput DesignInput) *CreateDesignParam { - params.DesignInput = &DesignInput - return params -} - -// **This endpoint allows you to create a new design**. You can add a new design by passing data, including a string of HTML email content, to `/designs`. When creating designs from scratch, be aware of the styling constraints inherent to many email clients. For a list of best practices, see our guide to [Cross-Platform Email Design](https://sendgrid.com/docs/ui/sending-email/cross-platform-html-design/). The Design Library can also convert your design’s HTML elements into drag and drop modules that are editable in the Designs Library user interface. For more, visit the [Design and Code Editor documentation](https://sendgrid.com/docs/ui/sending-email/editor/#drag--drop-markup). Because the `/designs` endpoint makes it easy to add designs, you can create a design with your preferred tooling or migrate designs you already own without relying on the Design Library UI. -func (c *ApiService) CreateDesign(params *CreateDesignParam) (interface{}, error) { - path := "/v3/designs" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.DesignInput != nil { - b, err := json.Marshal(*params.DesignInput) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &DesignOutput{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ApiErrors{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/mc_designs/api_delete_design.go b/rest/api/v3/mc_designs/api_delete_design.go deleted file mode 100644 index eec2321c..00000000 --- a/rest/api/v3/mc_designs/api_delete_design.go +++ /dev/null @@ -1,76 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" - - "strings" -) - -type DeleteDesignParam struct { - // The ID of the Design you want to duplicate. - Id *string `json:"id"` -} - -func (params *DeleteDesignParam) SetId(Id string) *DeleteDesignParam { - params.Id = &Id - return params -} - -// **This endpoint allows you to delete a single design**. Be sure to check the ID of the design you intend to delete before making this request; deleting a design is a permanent action. -func (c *ApiService) DeleteDesign(params *DeleteDesignParam) (interface{}, error) { - path := "/v3/designs/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ApiErrors{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ApiErrors{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/mc_designs/api_duplicate_design.go b/rest/api/v3/mc_designs/api_duplicate_design.go deleted file mode 100644 index 823d9a41..00000000 --- a/rest/api/v3/mc_designs/api_duplicate_design.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" - - "strings" -) - -type DuplicateDesignParam struct { - // The ID of the Design you want to duplicate. - Id *string `json:"id"` - // - DesignDuplicateInput *DesignDuplicateInput `json:"DesignDuplicateInput,omitempty"` -} - -func (params *DuplicateDesignParam) SetId(Id string) *DuplicateDesignParam { - params.Id = &Id - return params -} -func (params *DuplicateDesignParam) SetDesignDuplicateInput(DesignDuplicateInput DesignDuplicateInput) *DuplicateDesignParam { - params.DesignDuplicateInput = &DesignDuplicateInput - return params -} - -// **This endpoint allows you to duplicate one of your existing designs**. Modifying an existing design is often the easiest way to create something new. You are not required to pass any data in the body of a request to this endpoint. If you choose to leave the `name` field blank, your duplicate will be assigned the name of the design it was copied from with the text \"Duplicate: \" prepended to it. This name change is only a convenience, as the duplicate will be assigned a unique ID that differentiates it from your other designs. You can modify your duplicate’s name at the time of creation by passing an updated value to the `name` field when making the initial request. More on retrieving design IDs can be found below. -func (c *ApiService) DuplicateDesign(params *DuplicateDesignParam) (interface{}, error) { - path := "/v3/designs/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.DesignDuplicateInput != nil { - b, err := json.Marshal(*params.DesignDuplicateInput) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &DesignOutput{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ApiError{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ApiErrors{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/mc_designs/api_duplicate_pre_built_design.go b/rest/api/v3/mc_designs/api_duplicate_pre_built_design.go deleted file mode 100644 index f8965925..00000000 --- a/rest/api/v3/mc_designs/api_duplicate_pre_built_design.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" - - "strings" -) - -type DuplicatePreBuiltDesignParam struct { - // The ID of the pre-built Design you want to duplicate. - Id *string `json:"id"` - // - DesignDuplicateInput *DesignDuplicateInput `json:"DesignDuplicateInput,omitempty"` -} - -func (params *DuplicatePreBuiltDesignParam) SetId(Id string) *DuplicatePreBuiltDesignParam { - params.Id = &Id - return params -} -func (params *DuplicatePreBuiltDesignParam) SetDesignDuplicateInput(DesignDuplicateInput DesignDuplicateInput) *DuplicatePreBuiltDesignParam { - params.DesignDuplicateInput = &DesignDuplicateInput - return params -} - -// **This endpoint allows you to duplicate one of the pre-built Twilio SendGrid designs**. Like duplicating one of your existing designs, you are not required to pass any data in the body of a request to this endpoint. If you choose to leave the `name` field blank, your duplicate will be assigned the name of the design it was copied from with the text \"Duplicate: \" prepended to it. This name change is only a convenience, as the duplicate design will be assigned a unique ID that differentiates it from your other designs. You can retrieve the IDs for Twilio SendGrid pre-built designs using the \"List SendGrid Pre-built Designs\" endpoint. You can modify your duplicate’s name at the time of creation by passing an updated value to the `name` field when making the initial request. More on retrieving design IDs can be found above. -func (c *ApiService) DuplicatePreBuiltDesign(params *DuplicatePreBuiltDesignParam) (interface{}, error) { - path := "/v3/designs/pre-builts/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.DesignDuplicateInput != nil { - b, err := json.Marshal(*params.DesignDuplicateInput) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &DesignOutput{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ApiErrors{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ApiErrors{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/mc_designs/api_get_design.go b/rest/api/v3/mc_designs/api_get_design.go deleted file mode 100644 index 39708536..00000000 --- a/rest/api/v3/mc_designs/api_get_design.go +++ /dev/null @@ -1,76 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" - - "strings" -) - -type GetDesignParam struct { - // The ID of the Design you want to duplicate. - Id *string `json:"id"` -} - -func (params *GetDesignParam) SetId(Id string) *GetDesignParam { - params.Id = &Id - return params -} - -// **This endpoint allows you to retrieve a single design**. A GET request to `/designs/{id}` will retrieve details about a specific design in your Design Library. This endpoint is valuable when retrieving information stored in a field that you wish to update using a PATCH request. -func (c *ApiService) GetDesign(params *GetDesignParam) (interface{}, error) { - path := "/v3/designs/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &DesignOutput{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ApiErrors{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ApiErrors{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/mc_designs/api_get_pre_built_design.go b/rest/api/v3/mc_designs/api_get_pre_built_design.go deleted file mode 100644 index 026869c5..00000000 --- a/rest/api/v3/mc_designs/api_get_pre_built_design.go +++ /dev/null @@ -1,76 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" - - "strings" -) - -type GetPreBuiltDesignParam struct { - // The ID of the pre-built Design you want to duplicate. - Id *string `json:"id"` -} - -func (params *GetPreBuiltDesignParam) SetId(Id string) *GetPreBuiltDesignParam { - params.Id = &Id - return params -} - -// **This endpoint allows you to retrieve a single pre-built design**. A GET request to `/designs/pre-builts/{id}` will retrieve details about a specific pre-built design. This endpoint is valuable when retrieving details about a pre-built design that you wish to duplicate and modify. -func (c *ApiService) GetPreBuiltDesign(params *GetPreBuiltDesignParam) (interface{}, error) { - path := "/v3/designs/pre-builts/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &DesignOutput{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ApiErrors{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ApiErrors{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/mc_designs/api_list_design.go b/rest/api/v3/mc_designs/api_list_design.go deleted file mode 100644 index 246480bf..00000000 --- a/rest/api/v3/mc_designs/api_list_design.go +++ /dev/null @@ -1,78 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" -) - -type ListDesignParam struct { - // number of results to return - PageSize *int32 `json:"page_size,omitempty"` - // token corresponding to a specific page of results, as provided by metadata - PageToken *string `json:"page_token,omitempty"` - // set to false to return all fields - Summary *bool `json:"summary,omitempty"` -} - -func (params *ListDesignParam) SetPageSize(PageSize int32) *ListDesignParam { - params.PageSize = &PageSize - return params -} -func (params *ListDesignParam) SetPageToken(PageToken string) *ListDesignParam { - params.PageToken = &PageToken - return params -} -func (params *ListDesignParam) SetSummary(Summary bool) *ListDesignParam { - params.Summary = &Summary - return params -} - -// **This endpoint allows you to retrieve a list of designs already stored in your Design Library**. A GET request to `/designs` will return a list of your existing designs. This endpoint will not return the pre-built Twilio SendGrid designs. Pre-built designs can be retrieved using the `/designs/pre-builts` endpoint, which is detailed below. By default, you will receive 100 results per request; however, you can modify the number of results returned by passing an integer to the `page_size` query parameter. -func (c *ApiService) ListDesign(params *ListDesignParam) (interface{}, error) { - path := "/v3/designs" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.PageSize != nil { - data.Set("page_size", fmt.Sprint(*params.PageSize)) - } - if params != nil && params.PageToken != nil { - data.Set("page_token", *params.PageToken) - } - if params != nil && params.Summary != nil { - data.Set("summary", fmt.Sprint(*params.Summary)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListDesign200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/mc_designs/api_list_pre_built_design.go b/rest/api/v3/mc_designs/api_list_pre_built_design.go deleted file mode 100644 index 2416565f..00000000 --- a/rest/api/v3/mc_designs/api_list_pre_built_design.go +++ /dev/null @@ -1,78 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" -) - -type ListPreBuiltDesignParam struct { - // number of results to return - PageSize *int32 `json:"page_size,omitempty"` - // token corresponding to a specific page of results, as provided by metadata - PageToken *string `json:"page_token,omitempty"` - // set to false to return all fields - Summary *bool `json:"summary,omitempty"` -} - -func (params *ListPreBuiltDesignParam) SetPageSize(PageSize int32) *ListPreBuiltDesignParam { - params.PageSize = &PageSize - return params -} -func (params *ListPreBuiltDesignParam) SetPageToken(PageToken string) *ListPreBuiltDesignParam { - params.PageToken = &PageToken - return params -} -func (params *ListPreBuiltDesignParam) SetSummary(Summary bool) *ListPreBuiltDesignParam { - params.Summary = &Summary - return params -} - -// **This endpoint allows you to retrieve a list of pre-built designs provided by Twilio SendGrid**. Unlike the `/designs` endpoint where *your* designs are stored, a GET request made to `designs/pre-builts` will retrieve a list of the pre-built Twilio SendGrid designs. This endpoint will not return the designs stored in your Design Library. By default, you will receive 100 results per request; however, you can modify the number of results returned by passing an integer to the `page_size` query parameter. This endpoint is useful for retrieving the IDs of Twilio SendGrid designs that you want to duplicate and modify. -func (c *ApiService) ListPreBuiltDesign(params *ListPreBuiltDesignParam) (interface{}, error) { - path := "/v3/designs/pre-builts" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.PageSize != nil { - data.Set("page_size", fmt.Sprint(*params.PageSize)) - } - if params != nil && params.PageToken != nil { - data.Set("page_token", *params.PageToken) - } - if params != nil && params.Summary != nil { - data.Set("summary", fmt.Sprint(*params.Summary)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListDesign200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/mc_designs/api_service.go b/rest/api/v3/mc_designs/api_service.go deleted file mode 100644 index d0bf8bbe..00000000 --- a/rest/api/v3/mc_designs/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/mc_designs/api_update_design.go b/rest/api/v3/mc_designs/api_update_design.go deleted file mode 100644 index 3b1122bc..00000000 --- a/rest/api/v3/mc_designs/api_update_design.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" - - "strings" -) - -type UpdateDesignParam struct { - // The ID of the Design you want to duplicate. - Id *string `json:"id"` - // - UpdateDesignRequest *UpdateDesignRequest `json:"UpdateDesignRequest,omitempty"` -} - -func (params *UpdateDesignParam) SetId(Id string) *UpdateDesignParam { - params.Id = &Id - return params -} -func (params *UpdateDesignParam) SetUpdateDesignRequest(UpdateDesignRequest UpdateDesignRequest) *UpdateDesignParam { - params.UpdateDesignRequest = &UpdateDesignRequest - return params -} - -// **This endpoint allows you to edit a design**. The Design API supports PATCH requests, which allow you to make partial updates to a single design. Passing data to a specific field will update only the data stored in that field; all other fields will be unaltered. For example, updating a design's name requires that you make a PATCH request to this endpoint with data specified for the `name` field only. ``` { \"name\": \"\" } ``` -func (c *ApiService) UpdateDesign(params *UpdateDesignParam) (interface{}, error) { - path := "/v3/designs/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateDesignRequest != nil { - b, err := json.Marshal(*params.UpdateDesignRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &DesignOutput{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ApiErrors{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ApiErrors{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/mc_designs/docs/CreateDesign.md b/rest/api/v3/mc_designs/docs/CreateDesign.md deleted file mode 100644 index 87211de3..00000000 --- a/rest/api/v3/mc_designs/docs/CreateDesign.md +++ /dev/null @@ -1,48 +0,0 @@ -# CreateDesign - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateDesign**](CreateDesign.md#CreateDesign) | **Post** /v3/designs | Create Design - - - -## CreateDesign - -> DesignOutput CreateDesign(ctx, optional) - -Create Design - -**This endpoint allows you to create a new design**. You can add a new design by passing data, including a string of HTML email content, to `/designs`. When creating designs from scratch, be aware of the styling constraints inherent to many email clients. For a list of best practices, see our guide to [Cross-Platform Email Design](https://sendgrid.com/docs/ui/sending-email/cross-platform-html-design/). The Design Library can also convert your design’s HTML elements into drag and drop modules that are editable in the Designs Library user interface. For more, visit the [Design and Code Editor documentation](https://sendgrid.com/docs/ui/sending-email/editor/#drag--drop-markup). Because the `/designs` endpoint makes it easy to add designs, you can create a design with your preferred tooling or migrate designs you already own without relying on the Design Library UI. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateDesignParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**DesignInput** | [**DesignInput**](DesignInput.md) | - -### Return type - -[**DesignOutput**](DesignOutput.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_designs/docs/DesignCommonProperties.md b/rest/api/v3/mc_designs/docs/DesignCommonProperties.md deleted file mode 100644 index 70dfa399..00000000 --- a/rest/api/v3/mc_designs/docs/DesignCommonProperties.md +++ /dev/null @@ -1,15 +0,0 @@ -# DesignCommonProperties - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of the new design. |[optional] [default to "Duplicate: "] -**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] -**GeneratePlainContent** | **bool** | If true, plain_content is always generated from html_content. If false, plain_content is not altered. |[optional] [default to true] -**Subject** | **string** | Subject of the Design. |[optional] -**Categories** | **[]string** | The list of categories applied to the design |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_designs/docs/DesignInput.md b/rest/api/v3/mc_designs/docs/DesignInput.md deleted file mode 100644 index 3413ae98..00000000 --- a/rest/api/v3/mc_designs/docs/DesignInput.md +++ /dev/null @@ -1,14 +0,0 @@ -# DesignInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of the new design. |[optional] [default to "Duplicate: "] -**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] -**HtmlContent** | **string** | The HTML content of the Design. | -**PlainContent** | **string** | Plain text content of the Design. |[optional] [default to ""] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_designs/docs/DesignOutput.md b/rest/api/v3/mc_designs/docs/DesignOutput.md deleted file mode 100644 index f80ba304..00000000 --- a/rest/api/v3/mc_designs/docs/DesignOutput.md +++ /dev/null @@ -1,14 +0,0 @@ -# DesignOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of the new design. |[optional] [default to "Duplicate: "] -**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] -**HtmlContent** | **string** | The HTML content of the Design. | -**PlainContent** | **string** | Plain text content of the Design. |[optional] [default to ""] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_designs/docs/DesignOutputSummary.md b/rest/api/v3/mc_designs/docs/DesignOutputSummary.md deleted file mode 100644 index 5a0c0a76..00000000 --- a/rest/api/v3/mc_designs/docs/DesignOutputSummary.md +++ /dev/null @@ -1,16 +0,0 @@ -# DesignOutputSummary - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | ID of the Design. |[optional] -**UpdatedAt** | **string** | Datetime that Design was last updated. |[optional] -**CreatedAt** | **string** | Datetime that Design was created. |[optional] -**ThumbnailUrl** | **string** | A Thumbnail preview of the template's html content. |[optional] -**Name** | **string** | The name of the new design. |[optional] [default to "Duplicate: "] -**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_designs/docs/DuplicateDesign.md b/rest/api/v3/mc_designs/docs/DuplicateDesign.md deleted file mode 100644 index 2496e786..00000000 --- a/rest/api/v3/mc_designs/docs/DuplicateDesign.md +++ /dev/null @@ -1,52 +0,0 @@ -# DuplicateDesign - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DuplicateDesign**](DuplicateDesign.md#DuplicateDesign) | **Post** /v3/designs/{Id} | Duplicate Design - - - -## DuplicateDesign - -> DesignOutput DuplicateDesign(ctx, Idoptional) - -Duplicate Design - -**This endpoint allows you to duplicate one of your existing designs**. Modifying an existing design is often the easiest way to create something new. You are not required to pass any data in the body of a request to this endpoint. If you choose to leave the `name` field blank, your duplicate will be assigned the name of the design it was copied from with the text \"Duplicate: \" prepended to it. This name change is only a convenience, as the duplicate will be assigned a unique ID that differentiates it from your other designs. You can modify your duplicate’s name at the time of creation by passing an updated value to the `name` field when making the initial request. More on retrieving design IDs can be found below. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of the Design you want to duplicate. - -### Other Parameters - -Other parameters are passed through a pointer to a DuplicateDesignParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**DesignDuplicateInput** | [**DesignDuplicateInput**](DesignDuplicateInput.md) | - -### Return type - -[**DesignOutput**](DesignOutput.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_designs/docs/DuplicatePreBuiltDesign.md b/rest/api/v3/mc_designs/docs/DuplicatePreBuiltDesign.md deleted file mode 100644 index 9d8e805f..00000000 --- a/rest/api/v3/mc_designs/docs/DuplicatePreBuiltDesign.md +++ /dev/null @@ -1,52 +0,0 @@ -# DuplicatePreBuiltDesign - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DuplicatePreBuiltDesign**](DuplicatePreBuiltDesign.md#DuplicatePreBuiltDesign) | **Post** /v3/designs/pre-builts/{Id} | Duplicate SendGrid Pre-built Design - - - -## DuplicatePreBuiltDesign - -> DesignOutput DuplicatePreBuiltDesign(ctx, Idoptional) - -Duplicate SendGrid Pre-built Design - -**This endpoint allows you to duplicate one of the pre-built Twilio SendGrid designs**. Like duplicating one of your existing designs, you are not required to pass any data in the body of a request to this endpoint. If you choose to leave the `name` field blank, your duplicate will be assigned the name of the design it was copied from with the text \"Duplicate: \" prepended to it. This name change is only a convenience, as the duplicate design will be assigned a unique ID that differentiates it from your other designs. You can retrieve the IDs for Twilio SendGrid pre-built designs using the \"List SendGrid Pre-built Designs\" endpoint. You can modify your duplicate’s name at the time of creation by passing an updated value to the `name` field when making the initial request. More on retrieving design IDs can be found above. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of the pre-built Design you want to duplicate. - -### Other Parameters - -Other parameters are passed through a pointer to a DuplicatePreBuiltDesignParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**DesignDuplicateInput** | [**DesignDuplicateInput**](DesignDuplicateInput.md) | - -### Return type - -[**DesignOutput**](DesignOutput.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_designs/docs/GetPreBuiltDesign.md b/rest/api/v3/mc_designs/docs/GetPreBuiltDesign.md deleted file mode 100644 index e49acc07..00000000 --- a/rest/api/v3/mc_designs/docs/GetPreBuiltDesign.md +++ /dev/null @@ -1,51 +0,0 @@ -# GetPreBuiltDesign - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetPreBuiltDesign**](GetPreBuiltDesign.md#GetPreBuiltDesign) | **Get** /v3/designs/pre-builts/{Id} | Get SendGrid Pre-built Design - - - -## GetPreBuiltDesign - -> DesignOutput GetPreBuiltDesign(ctx, Id) - -Get SendGrid Pre-built Design - -**This endpoint allows you to retrieve a single pre-built design**. A GET request to `/designs/pre-builts/{id}` will retrieve details about a specific pre-built design. This endpoint is valuable when retrieving details about a pre-built design that you wish to duplicate and modify. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of the pre-built Design you want to duplicate. - -### Other Parameters - -Other parameters are passed through a pointer to a GetPreBuiltDesignParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**DesignOutput**](DesignOutput.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_designs/docs/ListDesign.md b/rest/api/v3/mc_designs/docs/ListDesign.md deleted file mode 100644 index f1677008..00000000 --- a/rest/api/v3/mc_designs/docs/ListDesign.md +++ /dev/null @@ -1,50 +0,0 @@ -# ListDesign - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListDesign**](ListDesign.md#ListDesign) | **Get** /v3/designs | List Designs - - - -## ListDesign - -> ListDesign200Response ListDesign(ctx, optional) - -List Designs - -**This endpoint allows you to retrieve a list of designs already stored in your Design Library**. A GET request to `/designs` will return a list of your existing designs. This endpoint will not return the pre-built Twilio SendGrid designs. Pre-built designs can be retrieved using the `/designs/pre-builts` endpoint, which is detailed below. By default, you will receive 100 results per request; however, you can modify the number of results returned by passing an integer to the `page_size` query parameter. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListDesignParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**PageSize** | **int32** | number of results to return -**PageToken** | **string** | token corresponding to a specific page of results, as provided by metadata -**Summary** | **bool** | set to false to return all fields - -### Return type - -[**ListDesign200Response**](ListDesign200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_designs/docs/ListPreBuiltDesign.md b/rest/api/v3/mc_designs/docs/ListPreBuiltDesign.md deleted file mode 100644 index 0b635daa..00000000 --- a/rest/api/v3/mc_designs/docs/ListPreBuiltDesign.md +++ /dev/null @@ -1,50 +0,0 @@ -# ListPreBuiltDesign - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListPreBuiltDesign**](ListPreBuiltDesign.md#ListPreBuiltDesign) | **Get** /v3/designs/pre-builts | List SendGrid Pre-built Designs - - - -## ListPreBuiltDesign - -> ListDesign200Response ListPreBuiltDesign(ctx, optional) - -List SendGrid Pre-built Designs - -**This endpoint allows you to retrieve a list of pre-built designs provided by Twilio SendGrid**. Unlike the `/designs` endpoint where *your* designs are stored, a GET request made to `designs/pre-builts` will retrieve a list of the pre-built Twilio SendGrid designs. This endpoint will not return the designs stored in your Design Library. By default, you will receive 100 results per request; however, you can modify the number of results returned by passing an integer to the `page_size` query parameter. This endpoint is useful for retrieving the IDs of Twilio SendGrid designs that you want to duplicate and modify. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListPreBuiltDesignParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**PageSize** | **int32** | number of results to return -**PageToken** | **string** | token corresponding to a specific page of results, as provided by metadata -**Summary** | **bool** | set to false to return all fields - -### Return type - -[**ListDesign200Response**](ListDesign200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_designs/docs/UpdateDesign.md b/rest/api/v3/mc_designs/docs/UpdateDesign.md deleted file mode 100644 index e7385735..00000000 --- a/rest/api/v3/mc_designs/docs/UpdateDesign.md +++ /dev/null @@ -1,52 +0,0 @@ -# UpdateDesign - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateDesign**](UpdateDesign.md#UpdateDesign) | **Patch** /v3/designs/{Id} | Update Design - - - -## UpdateDesign - -> DesignOutput UpdateDesign(ctx, Idoptional) - -Update Design - -**This endpoint allows you to edit a design**. The Design API supports PATCH requests, which allow you to make partial updates to a single design. Passing data to a specific field will update only the data stored in that field; all other fields will be unaltered. For example, updating a design's name requires that you make a PATCH request to this endpoint with data specified for the `name` field only. ``` { \"name\": \"\" } ``` - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of the Design you want to duplicate. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateDesignParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**UpdateDesignRequest** | [**UpdateDesignRequest**](UpdateDesignRequest.md) | - -### Return type - -[**DesignOutput**](DesignOutput.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_designs/docs/UpdateDesignRequest.md b/rest/api/v3/mc_designs/docs/UpdateDesignRequest.md deleted file mode 100644 index 2187c51b..00000000 --- a/rest/api/v3/mc_designs/docs/UpdateDesignRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# UpdateDesignRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Name of the Design. |[optional] [default to "My Design"] -**HtmlContent** | **string** | The HTML content of the Design. |[optional] -**PlainContent** | **string** | Plain text content of the Design. |[optional] [default to ""] -**GeneratePlainContent** | **bool** | If true, plain_content is always generated from html_content. If false, plain_content is not altered. |[optional] [default to true] -**Subject** | **string** | Subject of the Design. |[optional] -**Categories** | **[]string** | The list of categories applied to the design |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_designs/model_api_error.go b/rest/api/v3/mc_designs/model_api_error.go deleted file mode 100644 index 9dbc10bb..00000000 --- a/rest/api/v3/mc_designs/model_api_error.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ApiError struct for ApiError -type ApiError struct { - Message string `json:"message"` - Field string `json:"field"` - ErrorId string `json:"error_id"` -} diff --git a/rest/api/v3/mc_designs/model_api_errors.go b/rest/api/v3/mc_designs/model_api_errors.go deleted file mode 100644 index eedccc2a..00000000 --- a/rest/api/v3/mc_designs/model_api_errors.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ApiErrors struct for ApiErrors -type ApiErrors struct { - Errors *[]ApiError `json:"errors,omitempty"` -} diff --git a/rest/api/v3/mc_designs/model_design_common_properties.go b/rest/api/v3/mc_designs/model_design_common_properties.go deleted file mode 100644 index fc498689..00000000 --- a/rest/api/v3/mc_designs/model_design_common_properties.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DesignCommonProperties struct for DesignCommonProperties -type DesignCommonProperties struct { - // The name of the new design. - Name *string `json:"name,omitempty"` - // The editor used in the UI. - Editor *Editor `json:"editor,omitempty"` - // If true, plain_content is always generated from html_content. If false, plain_content is not altered. - GeneratePlainContent *bool `json:"generate_plain_content,omitempty"` - // Subject of the Design. - Subject *string `json:"subject,omitempty"` - // The list of categories applied to the design - Categories *[]string `json:"categories,omitempty"` -} diff --git a/rest/api/v3/mc_designs/model_design_duplicate_input.go b/rest/api/v3/mc_designs/model_design_duplicate_input.go deleted file mode 100644 index 19eac8f3..00000000 --- a/rest/api/v3/mc_designs/model_design_duplicate_input.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DesignDuplicateInput struct for DesignDuplicateInput -type DesignDuplicateInput struct { - // The name of the new design. - Name *string `json:"name,omitempty"` - // The editor used in the UI. - Editor *Editor `json:"editor,omitempty"` -} diff --git a/rest/api/v3/mc_designs/model_design_input.go b/rest/api/v3/mc_designs/model_design_input.go deleted file mode 100644 index a64b5bf3..00000000 --- a/rest/api/v3/mc_designs/model_design_input.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DesignInput struct for DesignInput -type DesignInput struct { - // The name of the new design. - Name *string `json:"name,omitempty"` - // The editor used in the UI. - Editor *Editor `json:"editor,omitempty"` - // The HTML content of the Design. - HtmlContent string `json:"html_content"` - // Plain text content of the Design. - PlainContent *string `json:"plain_content,omitempty"` -} diff --git a/rest/api/v3/mc_designs/model_design_output.go b/rest/api/v3/mc_designs/model_design_output.go deleted file mode 100644 index 3cb19435..00000000 --- a/rest/api/v3/mc_designs/model_design_output.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DesignOutput struct for DesignOutput -type DesignOutput struct { - // The name of the new design. - Name *string `json:"name,omitempty"` - // The editor used in the UI. - Editor *Editor `json:"editor,omitempty"` - // The HTML content of the Design. - HtmlContent string `json:"html_content"` - // Plain text content of the Design. - PlainContent *string `json:"plain_content,omitempty"` -} diff --git a/rest/api/v3/mc_designs/model_design_output_summary.go b/rest/api/v3/mc_designs/model_design_output_summary.go deleted file mode 100644 index 00b619d3..00000000 --- a/rest/api/v3/mc_designs/model_design_output_summary.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DesignOutputSummary struct for DesignOutputSummary -type DesignOutputSummary struct { - // ID of the Design. - Id *string `json:"id,omitempty"` - // Datetime that Design was last updated. - UpdatedAt *string `json:"updated_at,omitempty"` - // Datetime that Design was created. - CreatedAt *string `json:"created_at,omitempty"` - // A Thumbnail preview of the template's html content. - ThumbnailUrl *string `json:"thumbnail_url,omitempty"` - // The name of the new design. - Name *string `json:"name,omitempty"` - // The editor used in the UI. - Editor *Editor `json:"editor,omitempty"` -} diff --git a/rest/api/v3/mc_designs/model_editor.go b/rest/api/v3/mc_designs/model_editor.go deleted file mode 100644 index b5fba7d6..00000000 --- a/rest/api/v3/mc_designs/model_editor.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Editor the model 'Editor' -type Editor string - -// List of Editor -const ( - EDITOR_CODE Editor = "code" - EDITOR_DESIGN Editor = "design" -) diff --git a/rest/api/v3/mc_designs/model_list_design_200_response.go b/rest/api/v3/mc_designs/model_list_design_200_response.go deleted file mode 100644 index e2c23197..00000000 --- a/rest/api/v3/mc_designs/model_list_design_200_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListDesign200Response struct for ListDesign200Response -type ListDesign200Response struct { - Result *[]DesignOutputSummary `json:"result,omitempty"` - Metadata *Metadata `json:"_metadata,omitempty"` -} diff --git a/rest/api/v3/mc_designs/model_metadata.go b/rest/api/v3/mc_designs/model_metadata.go deleted file mode 100644 index 3d1281ea..00000000 --- a/rest/api/v3/mc_designs/model_metadata.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Metadata struct for Metadata -type Metadata struct { - Prev *string `json:"prev,omitempty"` - Self *string `json:"self,omitempty"` - Next *string `json:"next,omitempty"` - Count *int32 `json:"count,omitempty"` -} diff --git a/rest/api/v3/mc_designs/model_update_design_request.go b/rest/api/v3/mc_designs/model_update_design_request.go deleted file mode 100644 index b25a0cbe..00000000 --- a/rest/api/v3/mc_designs/model_update_design_request.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateDesignRequest struct for UpdateDesignRequest -type UpdateDesignRequest struct { - // Name of the Design. - Name *string `json:"name,omitempty"` - // The HTML content of the Design. - HtmlContent *string `json:"html_content,omitempty"` - // Plain text content of the Design. - PlainContent *string `json:"plain_content,omitempty"` - // If true, plain_content is always generated from html_content. If false, plain_content is not altered. - GeneratePlainContent *bool `json:"generate_plain_content,omitempty"` - // Subject of the Design. - Subject *string `json:"subject,omitempty"` - // The list of categories applied to the design - Categories *[]string `json:"categories,omitempty"` -} diff --git a/rest/api/v3/mc_lists/.openapi-generator b/rest/api/v3/mc_lists/.openapi-generator index 8033448a..2a2e02f1 100644 --- a/rest/api/v3/mc_lists/.openapi-generator +++ b/rest/api/v3/mc_lists/.openapi-generator @@ -1,4 +1,5 @@ .openapi-generator +.openapi-generator-ignore README.md api_create_marketing_list.go api_delete_contact.go diff --git a/rest/api/v3/mc_lists/README.md b/rest/api/v3/mc_lists/README.md index f4ddc383..5a04f200 100644 --- a/rest/api/v3/mc_lists/README.md +++ b/rest/api/v3/mc_lists/README.md @@ -9,7 +9,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:44.026235+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:38.062168+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/mc_lists/api_create_marketing_list.go b/rest/api/v3/mc_lists/api_create_marketing_list.go index 2b37a5b9..eab90b77 100644 --- a/rest/api/v3/mc_lists/api_create_marketing_list.go +++ b/rest/api/v3/mc_lists/api_create_marketing_list.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -68,5 +69,5 @@ func (c *ApiService) CreateMarketingList(params *CreateMarketingListParam) (inte return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_lists/api_delete_contact.go b/rest/api/v3/mc_lists/api_delete_contact.go index 70a82f48..ea5bf496 100644 --- a/rest/api/v3/mc_lists/api_delete_contact.go +++ b/rest/api/v3/mc_lists/api_delete_contact.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -74,5 +75,5 @@ func (c *ApiService) DeleteContact(params *DeleteContactParam) (interface{}, err return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_lists/api_delete_marketing_list.go b/rest/api/v3/mc_lists/api_delete_marketing_list.go index dacef8dd..e879aff0 100644 --- a/rest/api/v3/mc_lists/api_delete_marketing_list.go +++ b/rest/api/v3/mc_lists/api_delete_marketing_list.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -84,5 +85,5 @@ func (c *ApiService) DeleteMarketingList(params *DeleteMarketingListParam) (inte return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_lists/api_get_marketing_list.go b/rest/api/v3/mc_lists/api_get_marketing_list.go index ed2b8b7c..48d2e726 100644 --- a/rest/api/v3/mc_lists/api_get_marketing_list.go +++ b/rest/api/v3/mc_lists/api_get_marketing_list.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -75,5 +76,5 @@ func (c *ApiService) GetMarketingList(params *GetMarketingListParam) (interface{ return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_lists/api_list_contact_count.go b/rest/api/v3/mc_lists/api_list_contact_count.go index 7d014e37..fed144f5 100644 --- a/rest/api/v3/mc_lists/api_list_contact_count.go +++ b/rest/api/v3/mc_lists/api_list_contact_count.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -64,5 +65,5 @@ func (c *ApiService) ListContactCount(params *ListContactCountParam) (interface{ return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_lists/api_list_marketing_list.go b/rest/api/v3/mc_lists/api_list_marketing_list.go index 05140272..d572910b 100644 --- a/rest/api/v3/mc_lists/api_list_marketing_list.go +++ b/rest/api/v3/mc_lists/api_list_marketing_list.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -65,5 +66,5 @@ func (c *ApiService) ListMarketingList(params *ListMarketingListParam) (interfac return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_lists/api_update_marketing_list.go b/rest/api/v3/mc_lists/api_update_marketing_list.go index 9002a687..f28f345a 100644 --- a/rest/api/v3/mc_lists/api_update_marketing_list.go +++ b/rest/api/v3/mc_lists/api_update_marketing_list.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -87,5 +88,5 @@ func (c *ApiService) UpdateMarketingList(params *UpdateMarketingListParam) (inte return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_segments/README.md b/rest/api/v3/mc_segments/README.md index cbb26e0c..acfd2411 100644 --- a/rest/api/v3/mc_segments/README.md +++ b/rest/api/v3/mc_segments/README.md @@ -9,7 +9,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:44.125031+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:38.181591+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/mc_segments/api_delete_segment.go b/rest/api/v3/mc_segments/api_delete_segment.go index 1d43ee1d..b911b1d1 100644 --- a/rest/api/v3/mc_segments/api_delete_segment.go +++ b/rest/api/v3/mc_segments/api_delete_segment.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -96,5 +97,5 @@ func (c *ApiService) DeleteSegment(params *DeleteSegmentParam) (interface{}, err return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_segments/api_get_segment.go b/rest/api/v3/mc_segments/api_get_segment.go index d63c67b9..f341bca0 100644 --- a/rest/api/v3/mc_segments/api_get_segment.go +++ b/rest/api/v3/mc_segments/api_get_segment.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -99,5 +100,5 @@ func (c *ApiService) GetSegment(params *GetSegmentParam) (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_segments/api_list_segment.go b/rest/api/v3/mc_segments/api_list_segment.go index f026f989..236fbe92 100644 --- a/rest/api/v3/mc_segments/api_list_segment.go +++ b/rest/api/v3/mc_segments/api_list_segment.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -115,5 +116,5 @@ func (c *ApiService) ListSegment(params *ListSegmentParam) (interface{}, error) return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_segments_2/README.md b/rest/api/v3/mc_segments_2/README.md index 5bd42753..b2ab804c 100644 --- a/rest/api/v3/mc_segments_2/README.md +++ b/rest/api/v3/mc_segments_2/README.md @@ -17,7 +17,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:44.093333+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:38.102381+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/mc_segments_2/api_create_segment.go b/rest/api/v3/mc_segments_2/api_create_segment.go index 670a03bc..a9c6d799 100644 --- a/rest/api/v3/mc_segments_2/api_create_segment.go +++ b/rest/api/v3/mc_segments_2/api_create_segment.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -76,5 +77,5 @@ func (c *ApiService) CreateSegment(params *CreateSegmentParam) (interface{}, err return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_segments_2/api_delete_segment.go b/rest/api/v3/mc_segments_2/api_delete_segment.go index 086aab52..f16951c1 100644 --- a/rest/api/v3/mc_segments_2/api_delete_segment.go +++ b/rest/api/v3/mc_segments_2/api_delete_segment.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -64,5 +65,5 @@ func (c *ApiService) DeleteSegment(params *DeleteSegmentParam) (interface{}, err return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_segments_2/api_get_segment.go b/rest/api/v3/mc_segments_2/api_get_segment.go index dbab96c3..a5169d97 100644 --- a/rest/api/v3/mc_segments_2/api_get_segment.go +++ b/rest/api/v3/mc_segments_2/api_get_segment.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -83,5 +84,5 @@ func (c *ApiService) GetSegment(params *GetSegmentParam) (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_segments_2/api_list_segment.go b/rest/api/v3/mc_segments_2/api_list_segment.go index dcd34e83..bf717e92 100644 --- a/rest/api/v3/mc_segments_2/api_list_segment.go +++ b/rest/api/v3/mc_segments_2/api_list_segment.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -99,5 +100,5 @@ func (c *ApiService) ListSegment(params *ListSegmentParam) (interface{}, error) return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_segments_2/api_refresh_segment.go b/rest/api/v3/mc_segments_2/api_refresh_segment.go index cadfe784..535bff29 100644 --- a/rest/api/v3/mc_segments_2/api_refresh_segment.go +++ b/rest/api/v3/mc_segments_2/api_refresh_segment.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -87,5 +88,5 @@ func (c *ApiService) RefreshSegment(params *RefreshSegmentParam) (interface{}, e return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_segments_2/api_update_segment.go b/rest/api/v3/mc_segments_2/api_update_segment.go index 91072810..62911b6a 100644 --- a/rest/api/v3/mc_segments_2/api_update_segment.go +++ b/rest/api/v3/mc_segments_2/api_update_segment.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -87,5 +88,5 @@ func (c *ApiService) UpdateSegment(params *UpdateSegmentParam) (interface{}, err return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_senders/.openapi-generator b/rest/api/v3/mc_senders/.openapi-generator index e2d6ff1c..5d97710f 100644 --- a/rest/api/v3/mc_senders/.openapi-generator +++ b/rest/api/v3/mc_senders/.openapi-generator @@ -1,4 +1,5 @@ .openapi-generator +.openapi-generator-ignore README.md api_create_sender.go api_delete_sender.go diff --git a/rest/api/v3/mc_senders/README.md b/rest/api/v3/mc_senders/README.md index ab35271c..185e2864 100644 --- a/rest/api/v3/mc_senders/README.md +++ b/rest/api/v3/mc_senders/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:44.255671+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:38.192647+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/mc_senders/api_create_sender.go b/rest/api/v3/mc_senders/api_create_sender.go index 4c1ed8f8..1cd1e5e0 100644 --- a/rest/api/v3/mc_senders/api_create_sender.go +++ b/rest/api/v3/mc_senders/api_create_sender.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -93,5 +94,5 @@ func (c *ApiService) CreateSender(params *CreateSenderParam) (interface{}, error return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_senders/api_delete_sender.go b/rest/api/v3/mc_senders/api_delete_sender.go index d6ad6699..698276fe 100644 --- a/rest/api/v3/mc_senders/api_delete_sender.go +++ b/rest/api/v3/mc_senders/api_delete_sender.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -74,5 +75,5 @@ func (c *ApiService) DeleteSender(params *DeleteSenderParam) (interface{}, error return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_senders/api_get_sender.go b/rest/api/v3/mc_senders/api_get_sender.go index 2f8820f9..8991f124 100644 --- a/rest/api/v3/mc_senders/api_get_sender.go +++ b/rest/api/v3/mc_senders/api_get_sender.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -74,5 +75,5 @@ func (c *ApiService) GetSender(params *GetSenderParam) (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_senders/api_list_sender.go b/rest/api/v3/mc_senders/api_list_sender.go index 93d74b0c..d960867c 100644 --- a/rest/api/v3/mc_senders/api_list_sender.go +++ b/rest/api/v3/mc_senders/api_list_sender.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -62,5 +63,5 @@ func (c *ApiService) ListSender(params *ListSenderParam) (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_senders/api_reset_sender_verification.go b/rest/api/v3/mc_senders/api_reset_sender_verification.go index f1476bd0..850ccdd2 100644 --- a/rest/api/v3/mc_senders/api_reset_sender_verification.go +++ b/rest/api/v3/mc_senders/api_reset_sender_verification.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -74,5 +75,5 @@ func (c *ApiService) ResetSenderVerification(params *ResetSenderVerificationPara return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_senders/api_update_sender.go b/rest/api/v3/mc_senders/api_update_sender.go index 4677f7fa..438f70d5 100644 --- a/rest/api/v3/mc_senders/api_update_sender.go +++ b/rest/api/v3/mc_senders/api_update_sender.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -105,5 +106,5 @@ func (c *ApiService) UpdateSender(params *UpdateSenderParam) (interface{}, error return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_singlesends/README.md b/rest/api/v3/mc_singlesends/README.md index d3315aa0..86cef7dc 100644 --- a/rest/api/v3/mc_singlesends/README.md +++ b/rest/api/v3/mc_singlesends/README.md @@ -13,7 +13,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:44.267371+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:38.227927+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/mc_singlesends/api_create_single_send.go b/rest/api/v3/mc_singlesends/api_create_single_send.go index 287fa77c..9a5be671 100644 --- a/rest/api/v3/mc_singlesends/api_create_single_send.go +++ b/rest/api/v3/mc_singlesends/api_create_single_send.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -76,5 +77,5 @@ func (c *ApiService) CreateSingleSend(params *CreateSingleSendParam) (interface{ return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_singlesends/api_delete_scheduled_single_send.go b/rest/api/v3/mc_singlesends/api_delete_scheduled_single_send.go index fc1cb6a3..ddfdc500 100644 --- a/rest/api/v3/mc_singlesends/api_delete_scheduled_single_send.go +++ b/rest/api/v3/mc_singlesends/api_delete_scheduled_single_send.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -72,5 +73,5 @@ func (c *ApiService) DeleteScheduledSingleSend(params *DeleteScheduledSingleSend return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_singlesends/api_delete_single_send.go b/rest/api/v3/mc_singlesends/api_delete_single_send.go index ebe93580..edbfa155 100644 --- a/rest/api/v3/mc_singlesends/api_delete_single_send.go +++ b/rest/api/v3/mc_singlesends/api_delete_single_send.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -64,5 +65,5 @@ func (c *ApiService) DeleteSingleSend(params *DeleteSingleSendParam) (interface{ return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_singlesends/api_delete_single_sends.go b/rest/api/v3/mc_singlesends/api_delete_single_sends.go index 8dfd6ddf..93da71a2 100644 --- a/rest/api/v3/mc_singlesends/api_delete_single_sends.go +++ b/rest/api/v3/mc_singlesends/api_delete_single_sends.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -72,5 +73,5 @@ func (c *ApiService) DeleteSingleSends(params *DeleteSingleSendsParam) (interfac return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_singlesends/api_duplicate_single_send.go b/rest/api/v3/mc_singlesends/api_duplicate_single_send.go index a794b6d0..69f9b94c 100644 --- a/rest/api/v3/mc_singlesends/api_duplicate_single_send.go +++ b/rest/api/v3/mc_singlesends/api_duplicate_single_send.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -87,5 +88,5 @@ func (c *ApiService) DuplicateSingleSend(params *DuplicateSingleSendParam) (inte return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_singlesends/api_get_single_send.go b/rest/api/v3/mc_singlesends/api_get_single_send.go index 92da9755..b1ca735e 100644 --- a/rest/api/v3/mc_singlesends/api_get_single_send.go +++ b/rest/api/v3/mc_singlesends/api_get_single_send.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -72,5 +73,5 @@ func (c *ApiService) GetSingleSend(params *GetSingleSendParam) (interface{}, err return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_singlesends/api_list_category.go b/rest/api/v3/mc_singlesends/api_list_category.go index 944060d8..ab3b5169 100644 --- a/rest/api/v3/mc_singlesends/api_list_category.go +++ b/rest/api/v3/mc_singlesends/api_list_category.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -52,5 +53,5 @@ func (c *ApiService) ListCategory() (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_singlesends/api_list_single_send.go b/rest/api/v3/mc_singlesends/api_list_single_send.go index 11925ac1..816a5ecc 100644 --- a/rest/api/v3/mc_singlesends/api_list_single_send.go +++ b/rest/api/v3/mc_singlesends/api_list_single_send.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -73,5 +74,5 @@ func (c *ApiService) ListSingleSend(params *ListSingleSendParam) (interface{}, e return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_singlesends/api_schedule_single_send.go b/rest/api/v3/mc_singlesends/api_schedule_single_send.go index 95d6382b..93697983 100644 --- a/rest/api/v3/mc_singlesends/api_schedule_single_send.go +++ b/rest/api/v3/mc_singlesends/api_schedule_single_send.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -87,5 +88,5 @@ func (c *ApiService) ScheduleSingleSend(params *ScheduleSingleSendParam) (interf return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_singlesends/api_search_single_send.go b/rest/api/v3/mc_singlesends/api_search_single_send.go index 998bb10d..a90ea71e 100644 --- a/rest/api/v3/mc_singlesends/api_search_single_send.go +++ b/rest/api/v3/mc_singlesends/api_search_single_send.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -87,5 +88,5 @@ func (c *ApiService) SearchSingleSend(params *SearchSingleSendParam) (interface{ return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_singlesends/api_update_single_send.go b/rest/api/v3/mc_singlesends/api_update_single_send.go index d345e078..eac06395 100644 --- a/rest/api/v3/mc_singlesends/api_update_single_send.go +++ b/rest/api/v3/mc_singlesends/api_update_single_send.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -95,5 +96,5 @@ func (c *ApiService) UpdateSingleSend(params *UpdateSingleSendParam) (interface{ return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/mc_stats/.openapi-generator b/rest/api/v3/mc_stats/.openapi-generator new file mode 100644 index 00000000..206bfd5c --- /dev/null +++ b/rest/api/v3/mc_stats/.openapi-generator @@ -0,0 +1,60 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_export_automation_stat.go +api_export_single_send_stat.go +api_get_automation_stat.go +api_get_single_send_stat.go +api_list_automation_stat.go +api_list_click_tracking_stat.go +api_list_single_send_stat.go +api_list_single_send_tracking_stat.go +api_service.go +docs/AbPhase.md +docs/AbPhase1.md +docs/AbPhaseId.md +docs/AggregatedBy.md +docs/AutmoationsLinkStatsResponse.md +docs/AutmoationsLinkStatsResponseResultsInner.md +docs/AutomationsResponse.md +docs/AutomationsResponseResultsInner.md +docs/ErrorResponse.md +docs/ErrorResponseErrorsInner.md +docs/ExportAutomationStat.md +docs/ExportSingleSendStat.md +docs/GetAutomationStat.md +docs/GetSingleSendStat.md +docs/Items.md +docs/Items1.md +docs/Items2.md +docs/LinkTrackingMetadata.md +docs/ListAutomationStat.md +docs/ListClickTrackingStat.md +docs/ListSingleSendStat.md +docs/ListSingleSendTrackingStat.md +docs/Metadata.md +docs/Metrics.md +docs/SinglesendsLinkStatsResponse.md +docs/SinglesendsLinkStatsResponseResultsInner.md +docs/SinglesendsResponse.md +docs/SinglesendsResponseResultsInner.md +model_ab_phase.go +model_ab_phase1.go +model_ab_phase_id.go +model_aggregated_by.go +model_autmoations_link_stats_response.go +model_autmoations_link_stats_response_results_inner.go +model_automations_response.go +model_automations_response_results_inner.go +model_error_response.go +model_error_response_errors_inner.go +model_items.go +model_items1.go +model_items2.go +model_link_tracking_metadata.go +model_metadata.go +model_metrics.go +model_singlesends_link_stats_response.go +model_singlesends_link_stats_response_results_inner.go +model_singlesends_response.go +model_singlesends_response_results_inner.go diff --git a/rest/api/v3/stats/.openapi-generator-ignore b/rest/api/v3/mc_stats/.openapi-generator-ignore similarity index 100% rename from rest/api/v3/stats/.openapi-generator-ignore rename to rest/api/v3/mc_stats/.openapi-generator-ignore diff --git a/rest/api/v3/mc_stats/README.md b/rest/api/v3/mc_stats/README.md new file mode 100644 index 00000000..52d3873e --- /dev/null +++ b/rest/api/v3/mc_stats/README.md @@ -0,0 +1,88 @@ +# Go API client for + +The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). + +This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T16:57:38.248502+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ExportAutomationStat* | [**ExportAutomationStat**](docs/ExportAutomationStat.md#exportautomationstat) | **Get** /v3/marketing/stats/automations/export | Export Single Send Stats +*ExportSingleSendStat* | [**ExportSingleSendStat**](docs/ExportSingleSendStat.md#exportsinglesendstat) | **Get** /v3/marketing/stats/singlesends/export | Export Single Send Stats +*GetAutomationStat* | [**GetAutomationStat**](docs/GetAutomationStat.md#getautomationstat) | **Get** /v3/marketing/stats/automations/{Id} | Get Automation Stats by ID +*GetSingleSendStat* | [**GetSingleSendStat**](docs/GetSingleSendStat.md#getsinglesendstat) | **Get** /v3/marketing/stats/singlesends/{Id} | Get Single Send Stats by ID +*ListAutomationStat* | [**ListAutomationStat**](docs/ListAutomationStat.md#listautomationstat) | **Get** /v3/marketing/stats/automations | Get All Automation Stats +*ListClickTrackingStat* | [**ListClickTrackingStat**](docs/ListClickTrackingStat.md#listclicktrackingstat) | **Get** /v3/marketing/stats/automations/{Id}/links | Get Automation Click Tracking Stats by ID +*ListSingleSendStat* | [**ListSingleSendStat**](docs/ListSingleSendStat.md#listsinglesendstat) | **Get** /v3/marketing/stats/singlesends | Get All Single Sends Stats +*ListSingleSendTrackingStat* | [**ListSingleSendTrackingStat**](docs/ListSingleSendTrackingStat.md#listsinglesendtrackingstat) | **Get** /v3/marketing/stats/singlesends/{Id}/links | Get Single Send Click Tracking Stats by ID + + +## Documentation For Models + + - [AbPhase](AbPhase.md) + - [AbPhase1](AbPhase1.md) + - [AbPhaseId](AbPhaseId.md) + - [AggregatedBy](AggregatedBy.md) + - [AutmoationsLinkStatsResponse](AutmoationsLinkStatsResponse.md) + - [AutmoationsLinkStatsResponseResultsInner](AutmoationsLinkStatsResponseResultsInner.md) + - [AutomationsResponse](AutomationsResponse.md) + - [AutomationsResponseResultsInner](AutomationsResponseResultsInner.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [Items](Items.md) + - [Items1](Items1.md) + - [Items2](Items2.md) + - [LinkTrackingMetadata](LinkTrackingMetadata.md) + - [Metadata](Metadata.md) + - [Metrics](Metrics.md) + - [SinglesendsLinkStatsResponse](SinglesendsLinkStatsResponse.md) + - [SinglesendsLinkStatsResponseResultsInner](SinglesendsLinkStatsResponseResultsInner.md) + - [SinglesendsResponse](SinglesendsResponse.md) + - [SinglesendsResponseResultsInner](SinglesendsResponseResultsInner.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/mc_stats/api_export_automation_stat.go b/rest/api/v3/mc_stats/api_export_automation_stat.go new file mode 100644 index 00000000..0aa79127 --- /dev/null +++ b/rest/api/v3/mc_stats/api_export_automation_stat.go @@ -0,0 +1,79 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ExportAutomationStatParam struct { + // The IDs of Single Sends for which to export stats. + Ids *[]string `json:"ids,omitempty"` + // The [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_timezones) string representing the timezone in which the stats are to be presented; i.e. `\"America/Chicago\"`. This parameter changes the timezone format only; it does not alter which stats are returned. + Timezone *string `json:"timezone,omitempty"` +} + +func (params *ExportAutomationStatParam) SetIds(Ids []string) *ExportAutomationStatParam { + params.Ids = &Ids + return params +} +func (params *ExportAutomationStatParam) SetTimezone(Timezone string) *ExportAutomationStatParam { + params.Timezone = &Timezone + return params +} + +// **This endpoint allows you to export Single Send stats as .CSV data**. You can specify one Single Send or many: include as many Single Send IDs as you need, separating them with commas, as the value of the `ids` query string parameter. The data is returned as plain text response but in .CSV format, so your application making the call can present the information in whatever way is most appropriate, or just save the data as a .csv file. +func (c *ApiService) ExportAutomationStat(params *ExportAutomationStatParam) (interface{}, error) { + path := "/v3/marketing/stats/automations/export" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Ids != nil { + for _, item := range *params.Ids { + v, err := json.Marshal(item) + + if err != nil { + return nil, err + } + + data.Add("ids", string(v)) + + } + } + if params != nil && params.Timezone != nil { + data.Set("timezone", *params.Timezone) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + s := "" + ps := &s + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/mc_stats/api_export_single_send_stat.go b/rest/api/v3/mc_stats/api_export_single_send_stat.go new file mode 100644 index 00000000..422431a0 --- /dev/null +++ b/rest/api/v3/mc_stats/api_export_single_send_stat.go @@ -0,0 +1,79 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ExportSingleSendStatParam struct { + // The IDs of Single Sends for which to export stats. + Ids *[]string `json:"ids,omitempty"` + // The [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_timezones) string representing the timezone in which the stats are to be presented; i.e. `\"America/Chicago\"`. This parameter changes the timezone format only; it does not alter which stats are returned. + Timezone *string `json:"timezone,omitempty"` +} + +func (params *ExportSingleSendStatParam) SetIds(Ids []string) *ExportSingleSendStatParam { + params.Ids = &Ids + return params +} +func (params *ExportSingleSendStatParam) SetTimezone(Timezone string) *ExportSingleSendStatParam { + params.Timezone = &Timezone + return params +} + +// **This endpoint allows you to export Single Send stats as .CSV data**. You can specify one Single Send or many: include as many Single Send IDs as you need, separating them with commas, as the value of the `ids` query string parameter. The data is returned as plain text response but in .CSV format, so your application making the call can present the information in whatever way is most appropriate, or just save the data as a .csv file. +func (c *ApiService) ExportSingleSendStat(params *ExportSingleSendStatParam) (interface{}, error) { + path := "/v3/marketing/stats/singlesends/export" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Ids != nil { + for _, item := range *params.Ids { + v, err := json.Marshal(item) + + if err != nil { + return nil, err + } + + data.Add("ids", string(v)) + + } + } + if params != nil && params.Timezone != nil { + data.Set("timezone", *params.Timezone) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + s := "" + ps := &s + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/mc_stats/api_get_automation_stat.go b/rest/api/v3/mc_stats/api_get_automation_stat.go new file mode 100644 index 00000000..67abaff7 --- /dev/null +++ b/rest/api/v3/mc_stats/api_get_automation_stat.go @@ -0,0 +1,161 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type GetAutomationStatParam struct { + // The ID of the Automation for which you want to retrieve statistics. + Id *string `json:"id"` + // Automations can have multiple steps. Including `step_id` as a `group_by` metric allows further granularity of stats. + GroupBy *[]Items `json:"group_by,omitempty"` + // Comma-separated list of `step_ids` that you want the link stats for. + StepIds *[]string `json:"step_ids,omitempty"` + // Dictates how the stats are time-sliced. Currently, `\"total\"` and `\"day\"` are supported. + AggregatedBy *AggregatedBy `json:"aggregated_by,omitempty"` + // Format: `YYYY-MM-DD`. If this parameter is included, the stats' start date is included in the search. + StartDate *string `json:"start_date,omitempty"` + // Format: `YYYY-MM-DD`.If this parameter is included, the stats' end date is included in the search. + EndDate *string `json:"end_date,omitempty"` + // [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_timezones) string representing the timezone in which the stats are to be presented, e.g., \"America/Chicago\". + Timezone *string `json:"timezone,omitempty"` + // The number of elements you want returned on each page. + PageSize *int32 `json:"page_size,omitempty"` + // The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. + PageToken *string `json:"page_token,omitempty"` +} + +func (params *GetAutomationStatParam) SetId(Id string) *GetAutomationStatParam { + params.Id = &Id + return params +} +func (params *GetAutomationStatParam) SetGroupBy(GroupBy []Items) *GetAutomationStatParam { + params.GroupBy = &GroupBy + return params +} +func (params *GetAutomationStatParam) SetStepIds(StepIds []string) *GetAutomationStatParam { + params.StepIds = &StepIds + return params +} +func (params *GetAutomationStatParam) SetAggregatedBy(AggregatedBy AggregatedBy) *GetAutomationStatParam { + params.AggregatedBy = &AggregatedBy + return params +} +func (params *GetAutomationStatParam) SetStartDate(StartDate string) *GetAutomationStatParam { + params.StartDate = &StartDate + return params +} +func (params *GetAutomationStatParam) SetEndDate(EndDate string) *GetAutomationStatParam { + params.EndDate = &EndDate + return params +} +func (params *GetAutomationStatParam) SetTimezone(Timezone string) *GetAutomationStatParam { + params.Timezone = &Timezone + return params +} +func (params *GetAutomationStatParam) SetPageSize(PageSize int32) *GetAutomationStatParam { + params.PageSize = &PageSize + return params +} +func (params *GetAutomationStatParam) SetPageToken(PageToken string) *GetAutomationStatParam { + params.PageToken = &PageToken + return params +} + +// **This endpoint allows you to retrieve stats for a single Automation using its ID.** Multiple Automation IDs can be retrieved using the \"Get All Automation Stats\" endpoint. Once you have an ID, this endpoint will return detailed stats for the single automation specified. You may constrain the stats returned using the `start_date` and `end_date` query string parameters. You can also use the `group_by` and `aggregated_by` query string parameters to further refine the stats returned. +func (c *ApiService) GetAutomationStat(params *GetAutomationStatParam) (interface{}, error) { + path := "/v3/marketing/stats/automations/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.GroupBy != nil { + for _, item := range *params.GroupBy { + v, err := json.Marshal(item) + + if err != nil { + return nil, err + } + + data.Add("group_by", string(v)) + + } + } + if params != nil && params.StepIds != nil { + for _, item := range *params.StepIds { + v, err := json.Marshal(item) + + if err != nil { + return nil, err + } + + data.Add("step_ids", string(v)) + + } + } + if params != nil && params.AggregatedBy != nil { + data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) + } + if params != nil && params.StartDate != nil { + data.Set("start_date", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.Timezone != nil { + data.Set("timezone", *params.Timezone) + } + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + if params != nil && params.PageToken != nil { + data.Set("page_token", *params.PageToken) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AutomationsResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/mc_stats/api_get_single_send_stat.go b/rest/api/v3/mc_stats/api_get_single_send_stat.go new file mode 100644 index 00000000..f9e8a3f2 --- /dev/null +++ b/rest/api/v3/mc_stats/api_get_single_send_stat.go @@ -0,0 +1,143 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type GetSingleSendStatParam struct { + // The ID of Single Send for which you want to retrieve stats. + Id *string `json:"id"` + // Dictates how the stats are time-sliced. Currently, `\"total\"` and `\"day\"` are supported. + AggregatedBy *AggregatedBy `json:"aggregated_by,omitempty"` + // Format: `YYYY-MM-DD`. If this parameter is included, the stats' start date is included in the search. + StartDate *string `json:"start_date,omitempty"` + // Format: `YYYY-MM-DD`.If this parameter is included, the stats' end date is included in the search. + EndDate *string `json:"end_date,omitempty"` + // [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_timezones) string representing the timezone in which the stats are to be presented, e.g., \"America/Chicago\". + Timezone *string `json:"timezone,omitempty"` + // The number of elements you want returned on each page. + PageSize *int32 `json:"page_size,omitempty"` + // The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. + PageToken *string `json:"page_token,omitempty"` + // A/B Single Sends have multiple variation IDs and phase IDs. Including these additional fields allows further granularity of stats by these fields. + GroupBy *[]Items1 `json:"group_by,omitempty"` +} + +func (params *GetSingleSendStatParam) SetId(Id string) *GetSingleSendStatParam { + params.Id = &Id + return params +} +func (params *GetSingleSendStatParam) SetAggregatedBy(AggregatedBy AggregatedBy) *GetSingleSendStatParam { + params.AggregatedBy = &AggregatedBy + return params +} +func (params *GetSingleSendStatParam) SetStartDate(StartDate string) *GetSingleSendStatParam { + params.StartDate = &StartDate + return params +} +func (params *GetSingleSendStatParam) SetEndDate(EndDate string) *GetSingleSendStatParam { + params.EndDate = &EndDate + return params +} +func (params *GetSingleSendStatParam) SetTimezone(Timezone string) *GetSingleSendStatParam { + params.Timezone = &Timezone + return params +} +func (params *GetSingleSendStatParam) SetPageSize(PageSize int32) *GetSingleSendStatParam { + params.PageSize = &PageSize + return params +} +func (params *GetSingleSendStatParam) SetPageToken(PageToken string) *GetSingleSendStatParam { + params.PageToken = &PageToken + return params +} +func (params *GetSingleSendStatParam) SetGroupBy(GroupBy []Items1) *GetSingleSendStatParam { + params.GroupBy = &GroupBy + return params +} + +// **This endpoint allows you to retrieve stats for an individual Single Send using a Single Send ID.** Multiple Single Send IDs can be retrieved using the \"Get All Single Sends Stats\" endpoint. Once you have an ID, this endpoint will return detailed stats for the Single Send specified. You may constrain the stats returned using the `start_date` and `end_date` query string parameters. You can also use the `group_by` and `aggregated_by` query string parameters to further refine the stats returned. +func (c *ApiService) GetSingleSendStat(params *GetSingleSendStatParam) (interface{}, error) { + path := "/v3/marketing/stats/singlesends/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.AggregatedBy != nil { + data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) + } + if params != nil && params.StartDate != nil { + data.Set("start_date", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.Timezone != nil { + data.Set("timezone", *params.Timezone) + } + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + if params != nil && params.PageToken != nil { + data.Set("page_token", *params.PageToken) + } + if params != nil && params.GroupBy != nil { + for _, item := range *params.GroupBy { + v, err := json.Marshal(item) + + if err != nil { + return nil, err + } + + data.Add("group_by", string(v)) + + } + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SinglesendsResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/mc_stats/api_list_automation_stat.go b/rest/api/v3/mc_stats/api_list_automation_stat.go new file mode 100644 index 00000000..9b2af6a5 --- /dev/null +++ b/rest/api/v3/mc_stats/api_list_automation_stat.go @@ -0,0 +1,96 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListAutomationStatParam struct { + // This endpoint returns all automation IDs if no `automation_ids` are specified. + AutomationIds *[]string `json:"automation_ids,omitempty"` + // The number of elements you want returned on each page. + PageSize *int32 `json:"page_size,omitempty"` + // The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. + PageToken *string `json:"page_token,omitempty"` +} + +func (params *ListAutomationStatParam) SetAutomationIds(AutomationIds []string) *ListAutomationStatParam { + params.AutomationIds = &AutomationIds + return params +} +func (params *ListAutomationStatParam) SetPageSize(PageSize int32) *ListAutomationStatParam { + params.PageSize = &PageSize + return params +} +func (params *ListAutomationStatParam) SetPageToken(PageToken string) *ListAutomationStatParam { + params.PageToken = &PageToken + return params +} + +// **This endpoint allows you to retrieve stats for all your Automations.** By default, all of your Automations will be returned, but you can specify a selection by passing in a comma-separated list of Automation IDs as the value of the query string parameter `automation_ids`. Responses are paginated. You can limit the number of responses returned per batch using the `page_size` query string parameter. The default is 25, but you can specify a value between 1 and 50. You can retrieve a specific page of responses with the `page_token` query string parameter. +func (c *ApiService) ListAutomationStat(params *ListAutomationStatParam) (interface{}, error) { + path := "/v3/marketing/stats/automations" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.AutomationIds != nil { + for _, item := range *params.AutomationIds { + v, err := json.Marshal(item) + + if err != nil { + return nil, err + } + + data.Add("automation_ids", string(v)) + + } + } + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + if params != nil && params.PageToken != nil { + data.Set("page_token", *params.PageToken) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AutomationsResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/mc_stats/api_list_click_tracking_stat.go b/rest/api/v3/mc_stats/api_list_click_tracking_stat.go new file mode 100644 index 00000000..bb4436ae --- /dev/null +++ b/rest/api/v3/mc_stats/api_list_click_tracking_stat.go @@ -0,0 +1,133 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type ListClickTrackingStatParam struct { + // The ID of the Automation you want to get click tracking stats for. + Id *string `json:"id"` + // Automations can have multiple steps. Including `step_id` as a `group_by` metric allows further granularity of stats. + GroupBy *[]Items `json:"group_by,omitempty"` + // Comma-separated list of `step_ids` that you want the link stats for. + StepIds *[]string `json:"step_ids,omitempty"` + // The number of elements you want returned on each page. + PageSize *int32 `json:"page_size,omitempty"` + // The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. + PageToken *string `json:"page_token,omitempty"` +} + +func (params *ListClickTrackingStatParam) SetId(Id string) *ListClickTrackingStatParam { + params.Id = &Id + return params +} +func (params *ListClickTrackingStatParam) SetGroupBy(GroupBy []Items) *ListClickTrackingStatParam { + params.GroupBy = &GroupBy + return params +} +func (params *ListClickTrackingStatParam) SetStepIds(StepIds []string) *ListClickTrackingStatParam { + params.StepIds = &StepIds + return params +} +func (params *ListClickTrackingStatParam) SetPageSize(PageSize int32) *ListClickTrackingStatParam { + params.PageSize = &PageSize + return params +} +func (params *ListClickTrackingStatParam) SetPageToken(PageToken string) *ListClickTrackingStatParam { + params.PageToken = &PageToken + return params +} + +// **This endpoint lets you retrieve click-tracking stats for a single Automation**. The stats returned list the URLs embedded in your Automation and the number of clicks each one received. +func (c *ApiService) ListClickTrackingStat(params *ListClickTrackingStatParam) (interface{}, error) { + path := "/v3/marketing/stats/automations/{Id}/links" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.GroupBy != nil { + for _, item := range *params.GroupBy { + v, err := json.Marshal(item) + + if err != nil { + return nil, err + } + + data.Add("group_by", string(v)) + + } + } + if params != nil && params.StepIds != nil { + for _, item := range *params.StepIds { + v, err := json.Marshal(item) + + if err != nil { + return nil, err + } + + data.Add("step_ids", string(v)) + + } + } + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + if params != nil && params.PageToken != nil { + data.Set("page_token", *params.PageToken) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AutmoationsLinkStatsResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/mc_stats/api_list_single_send_stat.go b/rest/api/v3/mc_stats/api_list_single_send_stat.go new file mode 100644 index 00000000..8a0c5327 --- /dev/null +++ b/rest/api/v3/mc_stats/api_list_single_send_stat.go @@ -0,0 +1,96 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListSingleSendStatParam struct { + // This endpoint returns all Single Send IDs if no IDs are included in `singlesend_ids`. + SinglesendIds *[]string `json:"singlesend_ids,omitempty"` + // The number of elements you want returned on each page. + PageSize *int32 `json:"page_size,omitempty"` + // The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. + PageToken *string `json:"page_token,omitempty"` +} + +func (params *ListSingleSendStatParam) SetSinglesendIds(SinglesendIds []string) *ListSingleSendStatParam { + params.SinglesendIds = &SinglesendIds + return params +} +func (params *ListSingleSendStatParam) SetPageSize(PageSize int32) *ListSingleSendStatParam { + params.PageSize = &PageSize + return params +} +func (params *ListSingleSendStatParam) SetPageToken(PageToken string) *ListSingleSendStatParam { + params.PageToken = &PageToken + return params +} + +// **This endpoint allows you to retrieve stats for all your Single Sends.** By default, all of your Single Sends will be returned, but you can specify a selection by passing in a comma-separated list of Single Send IDs as the value of the query string parameter `singlesend_ids`. Responses are paginated. You can limit the number of responses returned per batch using the `page_size` query string parameter. The default is 25, but you specify a value between 1 and 50. You can retrieve a specific page of responses with the `page_token` query string parameter. +func (c *ApiService) ListSingleSendStat(params *ListSingleSendStatParam) (interface{}, error) { + path := "/v3/marketing/stats/singlesends" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.SinglesendIds != nil { + for _, item := range *params.SinglesendIds { + v, err := json.Marshal(item) + + if err != nil { + return nil, err + } + + data.Add("singlesend_ids", string(v)) + + } + } + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + if params != nil && params.PageToken != nil { + data.Set("page_token", *params.PageToken) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SinglesendsResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/mc_stats/api_list_single_send_tracking_stat.go b/rest/api/v3/mc_stats/api_list_single_send_tracking_stat.go new file mode 100644 index 00000000..72c9937a --- /dev/null +++ b/rest/api/v3/mc_stats/api_list_single_send_tracking_stat.go @@ -0,0 +1,133 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type ListSingleSendTrackingStatParam struct { + // The ID of Single Send for which you want to retrieve link stats. + Id *string `json:"id"` + // The number of elements you want returned on each page. + PageSize *int32 `json:"page_size,omitempty"` + // The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. + PageToken *string `json:"page_token,omitempty"` + // A/B Single Sends have multiple variation IDs and phase IDs. Including these additional fields allows further granularity of stats by these fields. + GroupBy *[]Items2 `json:"group_by,omitempty"` + // + AbVariationId *string `json:"ab_variation_id,omitempty"` + // + AbPhaseId *AbPhaseId `json:"ab_phase_id,omitempty"` +} + +func (params *ListSingleSendTrackingStatParam) SetId(Id string) *ListSingleSendTrackingStatParam { + params.Id = &Id + return params +} +func (params *ListSingleSendTrackingStatParam) SetPageSize(PageSize int32) *ListSingleSendTrackingStatParam { + params.PageSize = &PageSize + return params +} +func (params *ListSingleSendTrackingStatParam) SetPageToken(PageToken string) *ListSingleSendTrackingStatParam { + params.PageToken = &PageToken + return params +} +func (params *ListSingleSendTrackingStatParam) SetGroupBy(GroupBy []Items2) *ListSingleSendTrackingStatParam { + params.GroupBy = &GroupBy + return params +} +func (params *ListSingleSendTrackingStatParam) SetAbVariationId(AbVariationId string) *ListSingleSendTrackingStatParam { + params.AbVariationId = &AbVariationId + return params +} +func (params *ListSingleSendTrackingStatParam) SetAbPhaseId(AbPhaseId AbPhaseId) *ListSingleSendTrackingStatParam { + params.AbPhaseId = &AbPhaseId + return params +} + +// **This endpoint lets you retrieve click-tracking stats for one Single Send**. The stats returned list the URLs embedded in the specified Single Send and the number of clicks each one received. +func (c *ApiService) ListSingleSendTrackingStat(params *ListSingleSendTrackingStatParam) (interface{}, error) { + path := "/v3/marketing/stats/singlesends/{Id}/links" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + if params != nil && params.PageToken != nil { + data.Set("page_token", *params.PageToken) + } + if params != nil && params.GroupBy != nil { + for _, item := range *params.GroupBy { + v, err := json.Marshal(item) + + if err != nil { + return nil, err + } + + data.Add("group_by", string(v)) + + } + } + if params != nil && params.AbVariationId != nil { + data.Set("ab_variation_id", *params.AbVariationId) + } + if params != nil && params.AbPhaseId != nil { + data.Set("ab_phase_id", fmt.Sprint(*params.AbPhaseId)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SinglesendsLinkStatsResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/mc_stats/api_service.go b/rest/api/v3/mc_stats/api_service.go new file mode 100644 index 00000000..913b3580 --- /dev/null +++ b/rest/api/v3/mc_stats/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/mc_stats/docs/AbPhase.md b/rest/api/v3/mc_stats/docs/AbPhase.md new file mode 100644 index 00000000..db2402b9 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/AbPhase.md @@ -0,0 +1,14 @@ +# AbPhase + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**SEND** | string | (value: `"send"`) +**TEST** | string | (value: `"test"`) +**ALL** | string | (value: `"all"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/AbPhase1.md b/rest/api/v3/mc_stats/docs/AbPhase1.md new file mode 100644 index 00000000..2c5a9fdc --- /dev/null +++ b/rest/api/v3/mc_stats/docs/AbPhase1.md @@ -0,0 +1,14 @@ +# AbPhase1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**SEND** | string | (value: `"send"`) +**TEST** | string | (value: `"test"`) +**ALL** | string | (value: `"all"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/SortByDirection.md b/rest/api/v3/mc_stats/docs/AbPhaseId.md similarity index 72% rename from rest/api/v3/stats/docs/SortByDirection.md rename to rest/api/v3/mc_stats/docs/AbPhaseId.md index 0431e9a0..8ce3a5ed 100644 --- a/rest/api/v3/stats/docs/SortByDirection.md +++ b/rest/api/v3/mc_stats/docs/AbPhaseId.md @@ -1,11 +1,11 @@ -# SortByDirection +# AbPhaseId ## Enum Name | Type | Notes ------------ | ------------- | ------------- -**DESC** | string | (value: `"desc"`) -**ASC** | string | (value: `"asc"`) +**TEST** | string | (value: `"test"`) +**SEND** | string | (value: `"send"`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rest/api/v3/stats/docs/AggregatedBy.md b/rest/api/v3/mc_stats/docs/AggregatedBy.md similarity index 78% rename from rest/api/v3/stats/docs/AggregatedBy.md rename to rest/api/v3/mc_stats/docs/AggregatedBy.md index 96f02c9f..5de3ca2f 100644 --- a/rest/api/v3/stats/docs/AggregatedBy.md +++ b/rest/api/v3/mc_stats/docs/AggregatedBy.md @@ -5,8 +5,7 @@ Name | Type | Notes ------------ | ------------- | ------------- **DAY** | string | (value: `"day"`) -**WEEK** | string | (value: `"week"`) -**MONTH** | string | (value: `"month"`) +**TOTAL** | string | (value: `"total"`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rest/api/v3/mc_stats/docs/AutmoationsLinkStatsResponse.md b/rest/api/v3/mc_stats/docs/AutmoationsLinkStatsResponse.md new file mode 100644 index 00000000..7efaf2f3 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/AutmoationsLinkStatsResponse.md @@ -0,0 +1,13 @@ +# AutmoationsLinkStatsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | [**[]AutmoationsLinkStatsResponseResultsInner**](AutmoationsLinkStatsResponseResultsInner.md) | | +**TotalClicks** | **int32** | | +**Metadata** | [**LinkTrackingMetadata**](LinkTrackingMetadata.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/AutmoationsLinkStatsResponseResultsInner.md b/rest/api/v3/mc_stats/docs/AutmoationsLinkStatsResponseResultsInner.md new file mode 100644 index 00000000..ba1436ce --- /dev/null +++ b/rest/api/v3/mc_stats/docs/AutmoationsLinkStatsResponseResultsInner.md @@ -0,0 +1,14 @@ +# AutmoationsLinkStatsResponseResultsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | This is the URL of the link clicked. If `{{custom_fields}}` are part of the URL, they will be included. | +**UrlLocation** | **int32** | This is the location of the link clicked in each Automation step. Links are located according to their position within the message; the topmost link has index `0`. |[optional] +**StepId** | **string** | This is the ID of the step if the stats were requested to be grouped by `step_id`. | +**Clicks** | **int32** | The number of clicks on this particular link. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_designs/docs/ListDesign200Response.md b/rest/api/v3/mc_stats/docs/AutomationsResponse.md similarity index 74% rename from rest/api/v3/mc_designs/docs/ListDesign200Response.md rename to rest/api/v3/mc_stats/docs/AutomationsResponse.md index 32f31512..856db55d 100644 --- a/rest/api/v3/mc_designs/docs/ListDesign200Response.md +++ b/rest/api/v3/mc_stats/docs/AutomationsResponse.md @@ -1,10 +1,10 @@ -# ListDesign200Response +# AutomationsResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Result** | [**[]DesignOutputSummary**](DesignOutputSummary.md) | |[optional] +**Results** | [**[]AutomationsResponseResultsInner**](AutomationsResponseResultsInner.md) | | **Metadata** | [**Metadata**](Metadata.md) | |[optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rest/api/v3/mc_stats/docs/AutomationsResponseResultsInner.md b/rest/api/v3/mc_stats/docs/AutomationsResponseResultsInner.md new file mode 100644 index 00000000..204c3c2e --- /dev/null +++ b/rest/api/v3/mc_stats/docs/AutomationsResponseResultsInner.md @@ -0,0 +1,14 @@ +# AutomationsResponseResultsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | This is the ID of the Automation you are requesting stats for. | +**Aggregation** | **string** | This describes the time unit to which the stat is rolled up. It is based on the `aggregated_by` parameter included in the request. It can be \"total\" or the date (in YYYY-MM-DD format) the stats are for. |[default to "total"] +**StepId** | **string** | This is the ID of the step if the stats were requested to be grouped by `step_id`. |[default to "all"] +**Stats** | [**Metrics**](Metrics.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/ErrorResponse.md b/rest/api/v3/mc_stats/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/ErrorResponseErrorsInner.md b/rest/api/v3/mc_stats/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/ExportAutomationStat.md b/rest/api/v3/mc_stats/docs/ExportAutomationStat.md new file mode 100644 index 00000000..71980e81 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/ExportAutomationStat.md @@ -0,0 +1,49 @@ +# ExportAutomationStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ExportAutomationStat**](ExportAutomationStat.md#ExportAutomationStat) | **Get** /v3/marketing/stats/automations/export | Export Single Send Stats + + + +## ExportAutomationStat + +> string ExportAutomationStat(ctx, optional) + +Export Single Send Stats + +**This endpoint allows you to export Single Send stats as .CSV data**. You can specify one Single Send or many: include as many Single Send IDs as you need, separating them with commas, as the value of the `ids` query string parameter. The data is returned as plain text response but in .CSV format, so your application making the call can present the information in whatever way is most appropriate, or just save the data as a .csv file. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ExportAutomationStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Ids** | **[]string** | The IDs of Single Sends for which to export stats. +**Timezone** | **string** | The [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_timezones) string representing the timezone in which the stats are to be presented; i.e. `\"America/Chicago\"`. This parameter changes the timezone format only; it does not alter which stats are returned. + +### Return type + +**string** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_stats/docs/ExportSingleSendStat.md b/rest/api/v3/mc_stats/docs/ExportSingleSendStat.md new file mode 100644 index 00000000..e2a8a528 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/ExportSingleSendStat.md @@ -0,0 +1,49 @@ +# ExportSingleSendStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ExportSingleSendStat**](ExportSingleSendStat.md#ExportSingleSendStat) | **Get** /v3/marketing/stats/singlesends/export | Export Single Send Stats + + + +## ExportSingleSendStat + +> string ExportSingleSendStat(ctx, optional) + +Export Single Send Stats + +**This endpoint allows you to export Single Send stats as .CSV data**. You can specify one Single Send or many: include as many Single Send IDs as you need, separating them with commas, as the value of the `ids` query string parameter. The data is returned as plain text response but in .CSV format, so your application making the call can present the information in whatever way is most appropriate, or just save the data as a .csv file. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ExportSingleSendStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Ids** | **[]string** | The IDs of Single Sends for which to export stats. +**Timezone** | **string** | The [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_timezones) string representing the timezone in which the stats are to be presented; i.e. `\"America/Chicago\"`. This parameter changes the timezone format only; it does not alter which stats are returned. + +### Return type + +**string** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_stats/docs/GetAutomationStat.md b/rest/api/v3/mc_stats/docs/GetAutomationStat.md new file mode 100644 index 00000000..e97b64e5 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/GetAutomationStat.md @@ -0,0 +1,59 @@ +# GetAutomationStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetAutomationStat**](GetAutomationStat.md#GetAutomationStat) | **Get** /v3/marketing/stats/automations/{Id} | Get Automation Stats by ID + + + +## GetAutomationStat + +> AutomationsResponse GetAutomationStat(ctx, Idoptional) + +Get Automation Stats by ID + +**This endpoint allows you to retrieve stats for a single Automation using its ID.** Multiple Automation IDs can be retrieved using the \"Get All Automation Stats\" endpoint. Once you have an ID, this endpoint will return detailed stats for the single automation specified. You may constrain the stats returned using the `start_date` and `end_date` query string parameters. You can also use the `group_by` and `aggregated_by` query string parameters to further refine the stats returned. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the Automation for which you want to retrieve statistics. + +### Other Parameters + +Other parameters are passed through a pointer to a GetAutomationStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**GroupBy** | [**[]Items**](Items.md) | Automations can have multiple steps. Including `step_id` as a `group_by` metric allows further granularity of stats. +**StepIds** | **[]string** | Comma-separated list of `step_ids` that you want the link stats for. +**AggregatedBy** | [**AggregatedBy**](AggregatedByAggregatedBy.md) | Dictates how the stats are time-sliced. Currently, `\"total\"` and `\"day\"` are supported. +**StartDate** | **string** | Format: `YYYY-MM-DD`. If this parameter is included, the stats' start date is included in the search. +**EndDate** | **string** | Format: `YYYY-MM-DD`.If this parameter is included, the stats' end date is included in the search. +**Timezone** | **string** | [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_timezones) string representing the timezone in which the stats are to be presented, e.g., \"America/Chicago\". +**PageSize** | **int32** | The number of elements you want returned on each page. +**PageToken** | **string** | The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. + +### Return type + +[**AutomationsResponse**](AutomationsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_stats/docs/GetSingleSendStat.md b/rest/api/v3/mc_stats/docs/GetSingleSendStat.md new file mode 100644 index 00000000..59fa7e2c --- /dev/null +++ b/rest/api/v3/mc_stats/docs/GetSingleSendStat.md @@ -0,0 +1,58 @@ +# GetSingleSendStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetSingleSendStat**](GetSingleSendStat.md#GetSingleSendStat) | **Get** /v3/marketing/stats/singlesends/{Id} | Get Single Send Stats by ID + + + +## GetSingleSendStat + +> SinglesendsResponse GetSingleSendStat(ctx, Idoptional) + +Get Single Send Stats by ID + +**This endpoint allows you to retrieve stats for an individual Single Send using a Single Send ID.** Multiple Single Send IDs can be retrieved using the \"Get All Single Sends Stats\" endpoint. Once you have an ID, this endpoint will return detailed stats for the Single Send specified. You may constrain the stats returned using the `start_date` and `end_date` query string parameters. You can also use the `group_by` and `aggregated_by` query string parameters to further refine the stats returned. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of Single Send for which you want to retrieve stats. + +### Other Parameters + +Other parameters are passed through a pointer to a GetSingleSendStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**AggregatedBy** | [**AggregatedBy**](AggregatedByAggregatedBy.md) | Dictates how the stats are time-sliced. Currently, `\"total\"` and `\"day\"` are supported. +**StartDate** | **string** | Format: `YYYY-MM-DD`. If this parameter is included, the stats' start date is included in the search. +**EndDate** | **string** | Format: `YYYY-MM-DD`.If this parameter is included, the stats' end date is included in the search. +**Timezone** | **string** | [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_timezones) string representing the timezone in which the stats are to be presented, e.g., \"America/Chicago\". +**PageSize** | **int32** | The number of elements you want returned on each page. +**PageToken** | **string** | The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. +**GroupBy** | [**[]Items1**](Items1.md) | A/B Single Sends have multiple variation IDs and phase IDs. Including these additional fields allows further granularity of stats by these fields. + +### Return type + +[**SinglesendsResponse**](SinglesendsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/sso/docs/PermissionType.md b/rest/api/v3/mc_stats/docs/Items.md similarity index 69% rename from rest/api/v3/sso/docs/PermissionType.md rename to rest/api/v3/mc_stats/docs/Items.md index da44f853..a670ab6d 100644 --- a/rest/api/v3/sso/docs/PermissionType.md +++ b/rest/api/v3/mc_stats/docs/Items.md @@ -1,11 +1,10 @@ -# PermissionType +# Items ## Enum Name | Type | Notes ------------ | ------------- | ------------- -**ADMIN** | string | (value: `"admin"`) -**RESTRICTED** | string | (value: `"restricted"`) +**STEP_ID** | string | (value: `"step_id"`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rest/api/v3/mc_stats/docs/Items1.md b/rest/api/v3/mc_stats/docs/Items1.md new file mode 100644 index 00000000..b9d5f118 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/Items1.md @@ -0,0 +1,13 @@ +# Items1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**VARIATION** | string | (value: `"ab_variation"`) +**PHASE** | string | (value: `"ab_phase"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/Items2.md b/rest/api/v3/mc_stats/docs/Items2.md new file mode 100644 index 00000000..5ef14d6d --- /dev/null +++ b/rest/api/v3/mc_stats/docs/Items2.md @@ -0,0 +1,13 @@ +# Items2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**VARIATION** | string | (value: `"ab_variation"`) +**PHASE** | string | (value: `"ab_phase"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/LinkTrackingMetadata.md b/rest/api/v3/mc_stats/docs/LinkTrackingMetadata.md new file mode 100644 index 00000000..200bf168 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/LinkTrackingMetadata.md @@ -0,0 +1,14 @@ +# LinkTrackingMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prev** | **string** | The URL of the previous page of results. If this field isn't present, you're at the start of the list. |[optional] +**Self** | **string** | The URL of the current page of results. |[optional] +**Next** | **string** | The URL of the next page of results. If this field isn't present, you're at the end of the list. |[optional] +**Count** | **float32** | The number of items in the entire list, i.e., across all pages. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/ListAutomationStat.md b/rest/api/v3/mc_stats/docs/ListAutomationStat.md new file mode 100644 index 00000000..7bb19791 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/ListAutomationStat.md @@ -0,0 +1,50 @@ +# ListAutomationStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListAutomationStat**](ListAutomationStat.md#ListAutomationStat) | **Get** /v3/marketing/stats/automations | Get All Automation Stats + + + +## ListAutomationStat + +> AutomationsResponse ListAutomationStat(ctx, optional) + +Get All Automation Stats + +**This endpoint allows you to retrieve stats for all your Automations.** By default, all of your Automations will be returned, but you can specify a selection by passing in a comma-separated list of Automation IDs as the value of the query string parameter `automation_ids`. Responses are paginated. You can limit the number of responses returned per batch using the `page_size` query string parameter. The default is 25, but you can specify a value between 1 and 50. You can retrieve a specific page of responses with the `page_token` query string parameter. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListAutomationStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**AutomationIds** | **[]string** | This endpoint returns all automation IDs if no `automation_ids` are specified. +**PageSize** | **int32** | The number of elements you want returned on each page. +**PageToken** | **string** | The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. + +### Return type + +[**AutomationsResponse**](AutomationsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_stats/docs/ListClickTrackingStat.md b/rest/api/v3/mc_stats/docs/ListClickTrackingStat.md new file mode 100644 index 00000000..48466b6f --- /dev/null +++ b/rest/api/v3/mc_stats/docs/ListClickTrackingStat.md @@ -0,0 +1,55 @@ +# ListClickTrackingStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListClickTrackingStat**](ListClickTrackingStat.md#ListClickTrackingStat) | **Get** /v3/marketing/stats/automations/{Id}/links | Get Automation Click Tracking Stats by ID + + + +## ListClickTrackingStat + +> AutmoationsLinkStatsResponse ListClickTrackingStat(ctx, Idoptional) + +Get Automation Click Tracking Stats by ID + +**This endpoint lets you retrieve click-tracking stats for a single Automation**. The stats returned list the URLs embedded in your Automation and the number of clicks each one received. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the Automation you want to get click tracking stats for. + +### Other Parameters + +Other parameters are passed through a pointer to a ListClickTrackingStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**GroupBy** | [**[]Items**](Items.md) | Automations can have multiple steps. Including `step_id` as a `group_by` metric allows further granularity of stats. +**StepIds** | **[]string** | Comma-separated list of `step_ids` that you want the link stats for. +**PageSize** | **int32** | The number of elements you want returned on each page. +**PageToken** | **string** | The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. + +### Return type + +[**AutmoationsLinkStatsResponse**](AutmoationsLinkStatsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_stats/docs/ListSingleSendStat.md b/rest/api/v3/mc_stats/docs/ListSingleSendStat.md new file mode 100644 index 00000000..43d4841b --- /dev/null +++ b/rest/api/v3/mc_stats/docs/ListSingleSendStat.md @@ -0,0 +1,50 @@ +# ListSingleSendStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSingleSendStat**](ListSingleSendStat.md#ListSingleSendStat) | **Get** /v3/marketing/stats/singlesends | Get All Single Sends Stats + + + +## ListSingleSendStat + +> SinglesendsResponse ListSingleSendStat(ctx, optional) + +Get All Single Sends Stats + +**This endpoint allows you to retrieve stats for all your Single Sends.** By default, all of your Single Sends will be returned, but you can specify a selection by passing in a comma-separated list of Single Send IDs as the value of the query string parameter `singlesend_ids`. Responses are paginated. You can limit the number of responses returned per batch using the `page_size` query string parameter. The default is 25, but you specify a value between 1 and 50. You can retrieve a specific page of responses with the `page_token` query string parameter. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSingleSendStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**SinglesendIds** | **[]string** | This endpoint returns all Single Send IDs if no IDs are included in `singlesend_ids`. +**PageSize** | **int32** | The number of elements you want returned on each page. +**PageToken** | **string** | The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. + +### Return type + +[**SinglesendsResponse**](SinglesendsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_stats/docs/ListSingleSendTrackingStat.md b/rest/api/v3/mc_stats/docs/ListSingleSendTrackingStat.md new file mode 100644 index 00000000..8c831e70 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/ListSingleSendTrackingStat.md @@ -0,0 +1,56 @@ +# ListSingleSendTrackingStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSingleSendTrackingStat**](ListSingleSendTrackingStat.md#ListSingleSendTrackingStat) | **Get** /v3/marketing/stats/singlesends/{Id}/links | Get Single Send Click Tracking Stats by ID + + + +## ListSingleSendTrackingStat + +> SinglesendsLinkStatsResponse ListSingleSendTrackingStat(ctx, Idoptional) + +Get Single Send Click Tracking Stats by ID + +**This endpoint lets you retrieve click-tracking stats for one Single Send**. The stats returned list the URLs embedded in the specified Single Send and the number of clicks each one received. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of Single Send for which you want to retrieve link stats. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSingleSendTrackingStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**PageSize** | **int32** | The number of elements you want returned on each page. +**PageToken** | **string** | The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. +**GroupBy** | [**[]Items2**](Items2.md) | A/B Single Sends have multiple variation IDs and phase IDs. Including these additional fields allows further granularity of stats by these fields. +**AbVariationId** | **string** | +**AbPhaseId** | [**AbPhaseId**](AbPhaseIdAbPhaseId.md) | + +### Return type + +[**SinglesendsLinkStatsResponse**](SinglesendsLinkStatsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_stats/docs/Metadata.md b/rest/api/v3/mc_stats/docs/Metadata.md new file mode 100644 index 00000000..79ca153c --- /dev/null +++ b/rest/api/v3/mc_stats/docs/Metadata.md @@ -0,0 +1,14 @@ +# Metadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prev** | **string** | The URL of the previous page of results. If this field isn't present, you're at the start of the list. |[optional] +**Self** | **string** | The URL of the current page of results. |[optional] +**Next** | **string** | The URL of the next page of results. If this field isn't present, you're at the end of the list. |[optional] +**Count** | **float32** | The number of items in the entire list, i.e., across all pages. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/Metrics.md b/rest/api/v3/mc_stats/docs/Metrics.md new file mode 100644 index 00000000..029b2ac5 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/Metrics.md @@ -0,0 +1,22 @@ +# Metrics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BounceDrops** | **int32** | | +**Bounces** | **int32** | | +**Clicks** | **int32** | | +**Delivered** | **int32** | | +**InvalidEmails** | **int32** | | +**Opens** | **int32** | | +**Requests** | **int32** | | +**SpamReportDrops** | **int32** | | +**SpamReports** | **int32** | | +**UniqueClicks** | **int32** | | +**UniqueOpens** | **int32** | | +**Unsubscribes** | **int32** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/SinglesendsLinkStatsResponse.md b/rest/api/v3/mc_stats/docs/SinglesendsLinkStatsResponse.md new file mode 100644 index 00000000..e6d5eb4f --- /dev/null +++ b/rest/api/v3/mc_stats/docs/SinglesendsLinkStatsResponse.md @@ -0,0 +1,13 @@ +# SinglesendsLinkStatsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | [**[]SinglesendsLinkStatsResponseResultsInner**](SinglesendsLinkStatsResponseResultsInner.md) | This is the index of the link's location in the email contents. | +**Metadata** | [**LinkTrackingMetadata**](LinkTrackingMetadata.md) | | +**TotalClicks** | **int32** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/SinglesendsLinkStatsResponseResultsInner.md b/rest/api/v3/mc_stats/docs/SinglesendsLinkStatsResponseResultsInner.md new file mode 100644 index 00000000..4d8176d8 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/SinglesendsLinkStatsResponseResultsInner.md @@ -0,0 +1,15 @@ +# SinglesendsLinkStatsResponseResultsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | This is the URL of the link clicked. If `{{custom_fields}}` are part of the URL, they will be included. | +**UrlLocation** | **int32** | This is the location of the link clicked in each Single Send A/B variation, or in the Single Send itself if there are no variations. Links are numbered from the top down; the topmost link is index `0`. |[optional] +**AbVariation** | **string** | This is the A/B variation of the Single Send stat returned. It is set to `\"all\"` if the `ab_variation` query parameter was not set in the request and `group_by` doesn't contain `ab_variation`. | +**AbPhase** | [**AbPhase1**](AbPhase1.md) | This is the A/B phase of the Single Send stat returned. If the `ab_phase` query parameter was not provided, it will return `\"all\"`. | +**Clicks** | **int32** | the number of clicks on this particular link | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/SinglesendsResponse.md b/rest/api/v3/mc_stats/docs/SinglesendsResponse.md new file mode 100644 index 00000000..057df7b1 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/SinglesendsResponse.md @@ -0,0 +1,12 @@ +# SinglesendsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | [**[]SinglesendsResponseResultsInner**](SinglesendsResponseResultsInner.md) | | +**Metadata** | [**Metadata**](Metadata.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/SinglesendsResponseResultsInner.md b/rest/api/v3/mc_stats/docs/SinglesendsResponseResultsInner.md new file mode 100644 index 00000000..319301d6 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/SinglesendsResponseResultsInner.md @@ -0,0 +1,15 @@ +# SinglesendsResponseResultsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | This is the ID of the Single Send you require stats for. | +**AbVariation** | **string** | This is the A/B variation of the Single Send stat returned. If the `group_by` parameter doesn't include `ab_variation` in the request, then the value is \"all\". |[default to "a14dcc63-d651-4c57-9826-4a3705f5c78d"] +**AbPhase** | [**AbPhase**](AbPhase.md) | This is the A/B phase of the Single Send stat returned. If the `group_by` parameter doesn't include `ab_phase` in the request, then the value is \"all\". | +**Aggregation** | **string** | This describes the time unit to which the stat is rolled up. It is based on the `aggregated_by` parameter included in the request. It can be \"total\" or the date (in YYYY-MM-DD format) the stats are for. |[optional] [default to "total"] +**Stats** | [**Metrics**](Metrics.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/model_ab_phase.go b/rest/api/v3/mc_stats/model_ab_phase.go new file mode 100644 index 00000000..4b242ec7 --- /dev/null +++ b/rest/api/v3/mc_stats/model_ab_phase.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AbPhase the model 'AbPhase' +type AbPhase string + +// List of AbPhase +const ( + ABPHASE_SEND AbPhase = "send" + ABPHASE_TEST AbPhase = "test" + ABPHASE_ALL AbPhase = "all" +) diff --git a/rest/api/v3/mc_stats/model_ab_phase1.go b/rest/api/v3/mc_stats/model_ab_phase1.go new file mode 100644 index 00000000..d2ead496 --- /dev/null +++ b/rest/api/v3/mc_stats/model_ab_phase1.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AbPhase1 the model 'AbPhase1' +type AbPhase1 string + +// List of AbPhase1 +const ( + ABPHASE1_SEND AbPhase1 = "send" + ABPHASE1_TEST AbPhase1 = "test" + ABPHASE1_ALL AbPhase1 = "all" +) diff --git a/rest/api/v3/mc_stats/model_ab_phase_id.go b/rest/api/v3/mc_stats/model_ab_phase_id.go new file mode 100644 index 00000000..ef008051 --- /dev/null +++ b/rest/api/v3/mc_stats/model_ab_phase_id.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AbPhaseId the model 'AbPhaseId' +type AbPhaseId string + +// List of AbPhaseId +const ( + ABPHASEID_TEST AbPhaseId = "test" + ABPHASEID_SEND AbPhaseId = "send" +) diff --git a/rest/api/v3/mc_stats/model_aggregated_by.go b/rest/api/v3/mc_stats/model_aggregated_by.go new file mode 100644 index 00000000..9a5f47ea --- /dev/null +++ b/rest/api/v3/mc_stats/model_aggregated_by.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AggregatedBy the model 'AggregatedBy' +type AggregatedBy string + +// List of AggregatedBy +const ( + AGGREGATEDBY_DAY AggregatedBy = "day" + AGGREGATEDBY_TOTAL AggregatedBy = "total" +) diff --git a/rest/api/v3/mc_stats/model_autmoations_link_stats_response.go b/rest/api/v3/mc_stats/model_autmoations_link_stats_response.go new file mode 100644 index 00000000..eb0f0456 --- /dev/null +++ b/rest/api/v3/mc_stats/model_autmoations_link_stats_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AutmoationsLinkStatsResponse struct for AutmoationsLinkStatsResponse +type AutmoationsLinkStatsResponse struct { + // + Results []AutmoationsLinkStatsResponseResultsInner `json:"results"` + TotalClicks int32 `json:"total_clicks"` + Metadata LinkTrackingMetadata `json:"_metadata"` +} diff --git a/rest/api/v3/mc_stats/model_autmoations_link_stats_response_results_inner.go b/rest/api/v3/mc_stats/model_autmoations_link_stats_response_results_inner.go new file mode 100644 index 00000000..dd2efae5 --- /dev/null +++ b/rest/api/v3/mc_stats/model_autmoations_link_stats_response_results_inner.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AutmoationsLinkStatsResponseResultsInner struct for AutmoationsLinkStatsResponseResultsInner +type AutmoationsLinkStatsResponseResultsInner struct { + // This is the URL of the link clicked. If `{{custom_fields}}` are part of the URL, they will be included. + Url string `json:"url"` + // This is the location of the link clicked in each Automation step. Links are located according to their position within the message; the topmost link has index `0`. + UrlLocation *int32 `json:"url_location,omitempty"` + // This is the ID of the step if the stats were requested to be grouped by `step_id`. + StepId string `json:"step_id"` + // The number of clicks on this particular link. + Clicks int32 `json:"clicks"` +} diff --git a/rest/api/v3/mc_stats/model_automations_response.go b/rest/api/v3/mc_stats/model_automations_response.go new file mode 100644 index 00000000..6ac11cde --- /dev/null +++ b/rest/api/v3/mc_stats/model_automations_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AutomationsResponse struct for AutomationsResponse +type AutomationsResponse struct { + Results []AutomationsResponseResultsInner `json:"results"` + Metadata *Metadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/mc_stats/model_automations_response_results_inner.go b/rest/api/v3/mc_stats/model_automations_response_results_inner.go new file mode 100644 index 00000000..18bfe774 --- /dev/null +++ b/rest/api/v3/mc_stats/model_automations_response_results_inner.go @@ -0,0 +1,25 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AutomationsResponseResultsInner struct for AutomationsResponseResultsInner +type AutomationsResponseResultsInner struct { + // This is the ID of the Automation you are requesting stats for. + Id string `json:"id"` + // This describes the time unit to which the stat is rolled up. It is based on the `aggregated_by` parameter included in the request. It can be \"total\" or the date (in YYYY-MM-DD format) the stats are for. + Aggregation string `json:"aggregation"` + // This is the ID of the step if the stats were requested to be grouped by `step_id`. + StepId string `json:"step_id"` + Stats *Metrics `json:"stats,omitempty"` +} diff --git a/rest/api/v3/mc_stats/model_error_response.go b/rest/api/v3/mc_stats/model_error_response.go new file mode 100644 index 00000000..523ed1d3 --- /dev/null +++ b/rest/api/v3/mc_stats/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/mc_stats/model_error_response_errors_inner.go b/rest/api/v3/mc_stats/model_error_response_errors_inner.go new file mode 100644 index 00000000..7e65ce73 --- /dev/null +++ b/rest/api/v3/mc_stats/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/mc_stats/model_items.go b/rest/api/v3/mc_stats/model_items.go new file mode 100644 index 00000000..bc42ad0a --- /dev/null +++ b/rest/api/v3/mc_stats/model_items.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Items the model 'Items' +type Items string + +// List of Items +const ( + ITEMS_STEP_ID Items = "step_id" +) diff --git a/rest/api/v3/mc_stats/model_items1.go b/rest/api/v3/mc_stats/model_items1.go new file mode 100644 index 00000000..7f1fba4f --- /dev/null +++ b/rest/api/v3/mc_stats/model_items1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Items1 the model 'Items1' +type Items1 string + +// List of Items1 +const ( + ITEMS1_VARIATION Items1 = "ab_variation" + ITEMS1_PHASE Items1 = "ab_phase" +) diff --git a/rest/api/v3/mc_stats/model_items2.go b/rest/api/v3/mc_stats/model_items2.go new file mode 100644 index 00000000..686f84b8 --- /dev/null +++ b/rest/api/v3/mc_stats/model_items2.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Items2 the model 'Items2' +type Items2 string + +// List of Items2 +const ( + ITEMS2_VARIATION Items2 = "ab_variation" + ITEMS2_PHASE Items2 = "ab_phase" +) diff --git a/rest/api/v3/mc_stats/model_link_tracking_metadata.go b/rest/api/v3/mc_stats/model_link_tracking_metadata.go new file mode 100644 index 00000000..e5ba7a4e --- /dev/null +++ b/rest/api/v3/mc_stats/model_link_tracking_metadata.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// LinkTrackingMetadata struct for LinkTrackingMetadata +type LinkTrackingMetadata struct { + // The URL of the previous page of results. If this field isn't present, you're at the start of the list. + Prev *string `json:"prev,omitempty"` + // The URL of the current page of results. + Self *string `json:"self,omitempty"` + // The URL of the next page of results. If this field isn't present, you're at the end of the list. + Next *string `json:"next,omitempty"` + // The number of items in the entire list, i.e., across all pages. + Count *float32 `json:"count,omitempty"` +} diff --git a/rest/api/v3/mc_stats/model_metadata.go b/rest/api/v3/mc_stats/model_metadata.go new file mode 100644 index 00000000..25cdeaa3 --- /dev/null +++ b/rest/api/v3/mc_stats/model_metadata.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Metadata struct for Metadata +type Metadata struct { + // The URL of the previous page of results. If this field isn't present, you're at the start of the list. + Prev *string `json:"prev,omitempty"` + // The URL of the current page of results. + Self *string `json:"self,omitempty"` + // The URL of the next page of results. If this field isn't present, you're at the end of the list. + Next *string `json:"next,omitempty"` + // The number of items in the entire list, i.e., across all pages. + Count *float32 `json:"count,omitempty"` +} diff --git a/rest/api/v3/mc_stats/model_metrics.go b/rest/api/v3/mc_stats/model_metrics.go new file mode 100644 index 00000000..1242dc27 --- /dev/null +++ b/rest/api/v3/mc_stats/model_metrics.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Metrics struct for Metrics +type Metrics struct { + BounceDrops int32 `json:"bounce_drops"` + Bounces int32 `json:"bounces"` + Clicks int32 `json:"clicks"` + Delivered int32 `json:"delivered"` + InvalidEmails int32 `json:"invalid_emails"` + Opens int32 `json:"opens"` + Requests int32 `json:"requests"` + SpamReportDrops int32 `json:"spam_report_drops"` + SpamReports int32 `json:"spam_reports"` + UniqueClicks int32 `json:"unique_clicks"` + UniqueOpens int32 `json:"unique_opens"` + Unsubscribes int32 `json:"unsubscribes"` +} diff --git a/rest/api/v3/mc_stats/model_singlesends_link_stats_response.go b/rest/api/v3/mc_stats/model_singlesends_link_stats_response.go new file mode 100644 index 00000000..a5c9989d --- /dev/null +++ b/rest/api/v3/mc_stats/model_singlesends_link_stats_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SinglesendsLinkStatsResponse struct for SinglesendsLinkStatsResponse +type SinglesendsLinkStatsResponse struct { + // This is the index of the link's location in the email contents. + Results []SinglesendsLinkStatsResponseResultsInner `json:"results"` + Metadata LinkTrackingMetadata `json:"_metadata"` + TotalClicks *int32 `json:"total_clicks,omitempty"` +} diff --git a/rest/api/v3/mc_stats/model_singlesends_link_stats_response_results_inner.go b/rest/api/v3/mc_stats/model_singlesends_link_stats_response_results_inner.go new file mode 100644 index 00000000..b07590ac --- /dev/null +++ b/rest/api/v3/mc_stats/model_singlesends_link_stats_response_results_inner.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SinglesendsLinkStatsResponseResultsInner struct for SinglesendsLinkStatsResponseResultsInner +type SinglesendsLinkStatsResponseResultsInner struct { + // This is the URL of the link clicked. If `{{custom_fields}}` are part of the URL, they will be included. + Url string `json:"url"` + // This is the location of the link clicked in each Single Send A/B variation, or in the Single Send itself if there are no variations. Links are numbered from the top down; the topmost link is index `0`. + UrlLocation *int32 `json:"url_location,omitempty"` + // This is the A/B variation of the Single Send stat returned. It is set to `\"all\"` if the `ab_variation` query parameter was not set in the request and `group_by` doesn't contain `ab_variation`. + AbVariation string `json:"ab_variation"` + // This is the A/B phase of the Single Send stat returned. If the `ab_phase` query parameter was not provided, it will return `\"all\"`. + AbPhase AbPhase1 `json:"ab_phase"` + // the number of clicks on this particular link + Clicks int32 `json:"clicks"` +} diff --git a/rest/api/v3/mc_stats/model_singlesends_response.go b/rest/api/v3/mc_stats/model_singlesends_response.go new file mode 100644 index 00000000..6dcecd1e --- /dev/null +++ b/rest/api/v3/mc_stats/model_singlesends_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SinglesendsResponse struct for SinglesendsResponse +type SinglesendsResponse struct { + Results []SinglesendsResponseResultsInner `json:"results"` + Metadata Metadata `json:"_metadata"` +} diff --git a/rest/api/v3/mc_stats/model_singlesends_response_results_inner.go b/rest/api/v3/mc_stats/model_singlesends_response_results_inner.go new file mode 100644 index 00000000..98b52187 --- /dev/null +++ b/rest/api/v3/mc_stats/model_singlesends_response_results_inner.go @@ -0,0 +1,27 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SinglesendsResponseResultsInner struct for SinglesendsResponseResultsInner +type SinglesendsResponseResultsInner struct { + // This is the ID of the Single Send you require stats for. + Id string `json:"id"` + // This is the A/B variation of the Single Send stat returned. If the `group_by` parameter doesn't include `ab_variation` in the request, then the value is \"all\". + AbVariation string `json:"ab_variation"` + // This is the A/B phase of the Single Send stat returned. If the `group_by` parameter doesn't include `ab_phase` in the request, then the value is \"all\". + AbPhase AbPhase `json:"ab_phase"` + // This describes the time unit to which the stat is rolled up. It is based on the `aggregated_by` parameter included in the request. It can be \"total\" or the date (in YYYY-MM-DD format) the stats are for. + Aggregation *string `json:"aggregation,omitempty"` + Stats *Metrics `json:"stats,omitempty"` +} diff --git a/rest/api/v3/mc_test/README.md b/rest/api/v3/mc_test/README.md index 057ea8ba..144c10fe 100644 --- a/rest/api/v3/mc_test/README.md +++ b/rest/api/v3/mc_test/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:44.250515+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:38.260054+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/mc_test/api_send_test_marketing_email.go b/rest/api/v3/mc_test/api_send_test_marketing_email.go index 13462d79..75e09147 100644 --- a/rest/api/v3/mc_test/api_send_test_marketing_email.go +++ b/rest/api/v3/mc_test/api_send_test_marketing_email.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -68,5 +69,5 @@ func (c *ApiService) SendTestMarketingEmail(params *SendTestMarketingEmailParam) return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/partner/README.md b/rest/api/v3/partner/README.md index a7b0173a..ad6b3a73 100644 --- a/rest/api/v3/partner/README.md +++ b/rest/api/v3/partner/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:44.287184+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:38.278044+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/partner/api_list_partner_setting.go b/rest/api/v3/partner/api_list_partner_setting.go index 6eb0e351..77ec2a94 100644 --- a/rest/api/v3/partner/api_list_partner_setting.go +++ b/rest/api/v3/partner/api_list_partner_setting.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -74,5 +75,5 @@ func (c *ApiService) ListPartnerSetting(params *ListPartnerSettingParam) (interf return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/recipients_data_erasure/README.md b/rest/api/v3/recipients_data_erasure/README.md index e92003dc..f53e7d9c 100644 --- a/rest/api/v3/recipients_data_erasure/README.md +++ b/rest/api/v3/recipients_data_erasure/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:44.386169+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:38.290288+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/recipients_data_erasure/api_erase_recipient_email_data.go b/rest/api/v3/recipients_data_erasure/api_erase_recipient_email_data.go index babd37d9..4c9d7c8b 100644 --- a/rest/api/v3/recipients_data_erasure/api_erase_recipient_email_data.go +++ b/rest/api/v3/recipients_data_erasure/api_erase_recipient_email_data.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -69,5 +70,5 @@ func (c *ApiService) EraseRecipientEmailData(params *EraseRecipientEmailDataPara return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/reverse_dns/README.md b/rest/api/v3/reverse_dns/README.md index 827356d4..919ed684 100644 --- a/rest/api/v3/reverse_dns/README.md +++ b/rest/api/v3/reverse_dns/README.md @@ -15,7 +15,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:44.401219+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:38.355717+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/reverse_dns/api_delete_reverse_dns.go b/rest/api/v3/reverse_dns/api_delete_reverse_dns.go index 09005e21..56ffbf5f 100644 --- a/rest/api/v3/reverse_dns/api_delete_reverse_dns.go +++ b/rest/api/v3/reverse_dns/api_delete_reverse_dns.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -65,5 +66,5 @@ func (c *ApiService) DeleteReverseDns(params *DeleteReverseDnsParam) (interface{ return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/reverse_dns/api_get_reverse_dns.go b/rest/api/v3/reverse_dns/api_get_reverse_dns.go index c2ee8788..cc27c2d5 100644 --- a/rest/api/v3/reverse_dns/api_get_reverse_dns.go +++ b/rest/api/v3/reverse_dns/api_get_reverse_dns.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -65,5 +66,5 @@ func (c *ApiService) GetReverseDns(params *GetReverseDnsParam) (interface{}, err return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/reverse_dns/api_list_reverse_dns.go b/rest/api/v3/reverse_dns/api_list_reverse_dns.go index 58d5a494..d992d44f 100644 --- a/rest/api/v3/reverse_dns/api_list_reverse_dns.go +++ b/rest/api/v3/reverse_dns/api_list_reverse_dns.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -83,5 +84,5 @@ func (c *ApiService) ListReverseDns(params *ListReverseDnsParam) (interface{}, e return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/reverse_dns/api_set_up_reverse_dns.go b/rest/api/v3/reverse_dns/api_set_up_reverse_dns.go index d2815304..0750077e 100644 --- a/rest/api/v3/reverse_dns/api_set_up_reverse_dns.go +++ b/rest/api/v3/reverse_dns/api_set_up_reverse_dns.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -69,5 +70,5 @@ func (c *ApiService) SetUpReverseDns(params *SetUpReverseDnsParam) (interface{}, return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/reverse_dns/api_validate_reverse_dns.go b/rest/api/v3/reverse_dns/api_validate_reverse_dns.go index 5c35b817..0bd75a48 100644 --- a/rest/api/v3/reverse_dns/api_validate_reverse_dns.go +++ b/rest/api/v3/reverse_dns/api_validate_reverse_dns.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -81,5 +82,5 @@ func (c *ApiService) ValidateReverseDns(params *ValidateReverseDnsParam) (interf return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/scheduled_sends/.openapi-generator b/rest/api/v3/scheduled_sends/.openapi-generator index 513dff8e..093be41e 100644 --- a/rest/api/v3/scheduled_sends/.openapi-generator +++ b/rest/api/v3/scheduled_sends/.openapi-generator @@ -1,4 +1,5 @@ .openapi-generator +.openapi-generator-ignore README.md api_create_scheduled_send.go api_delete_scheduled_send.go diff --git a/rest/api/v3/scheduled_sends/README.md b/rest/api/v3/scheduled_sends/README.md index b6b7629b..8e5fda8b 100644 --- a/rest/api/v3/scheduled_sends/README.md +++ b/rest/api/v3/scheduled_sends/README.md @@ -17,7 +17,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:44.388354+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:38.398420+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/scheduled_sends/api_create_scheduled_send.go b/rest/api/v3/scheduled_sends/api_create_scheduled_send.go index a1762600..28f448e2 100644 --- a/rest/api/v3/scheduled_sends/api_create_scheduled_send.go +++ b/rest/api/v3/scheduled_sends/api_create_scheduled_send.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -101,5 +102,5 @@ func (c *ApiService) CreateScheduledSend(params *CreateScheduledSendParam) (inte return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/scheduled_sends/api_delete_scheduled_send.go b/rest/api/v3/scheduled_sends/api_delete_scheduled_send.go index cfd11d55..d0e0a053 100644 --- a/rest/api/v3/scheduled_sends/api_delete_scheduled_send.go +++ b/rest/api/v3/scheduled_sends/api_delete_scheduled_send.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -89,5 +90,5 @@ func (c *ApiService) DeleteScheduledSend(params *DeleteScheduledSendParam) (inte return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/scheduled_sends/api_get_scheduled_send.go b/rest/api/v3/scheduled_sends/api_get_scheduled_send.go index aafae9ca..50d75e8d 100644 --- a/rest/api/v3/scheduled_sends/api_get_scheduled_send.go +++ b/rest/api/v3/scheduled_sends/api_get_scheduled_send.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -97,5 +98,5 @@ func (c *ApiService) GetScheduledSend(params *GetScheduledSendParam) (interface{ return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/scheduled_sends/api_list_scheduled_send.go b/rest/api/v3/scheduled_sends/api_list_scheduled_send.go index a1c25889..0f6aad68 100644 --- a/rest/api/v3/scheduled_sends/api_list_scheduled_send.go +++ b/rest/api/v3/scheduled_sends/api_list_scheduled_send.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -86,5 +87,5 @@ func (c *ApiService) ListScheduledSend(params *ListScheduledSendParam) (interfac return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/scheduled_sends/api_update_scheduled_send.go b/rest/api/v3/scheduled_sends/api_update_scheduled_send.go index 3d296889..7ef85975 100644 --- a/rest/api/v3/scheduled_sends/api_update_scheduled_send.go +++ b/rest/api/v3/scheduled_sends/api_update_scheduled_send.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -104,5 +105,5 @@ func (c *ApiService) UpdateScheduledSend(params *UpdateScheduledSendParam) (inte return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/scopes/.openapi-generator b/rest/api/v3/scopes/.openapi-generator new file mode 100644 index 00000000..cb628b4c --- /dev/null +++ b/rest/api/v3/scopes/.openapi-generator @@ -0,0 +1,29 @@ +.openapi-generator +README.md +api_approve_scope_request.go +api_deny_scope_request.go +api_list_scope.go +api_list_scope_request.go +api_service.go +docs/ApproveScopeRequest.md +docs/ApproveScopeRequest200Response.md +docs/DenyScopeRequest.md +docs/DenyScopeRequest404Response.md +docs/DenyScopeRequest404ResponseErrorsInner.md +docs/ErrorResponse.md +docs/ErrorResponseErrorsInner.md +docs/ListScope.md +docs/ListScope200Response.md +docs/ListScope401Response.md +docs/ListScope401ResponseErrorsInner.md +docs/ListScopeRequest.md +docs/ListScopeRequest200ResponseInner.md +model_approve_scope_request_200_response.go +model_deny_scope_request_404_response.go +model_deny_scope_request_404_response_errors_inner.go +model_error_response.go +model_error_response_errors_inner.go +model_list_scope_200_response.go +model_list_scope_401_response.go +model_list_scope_401_response_errors_inner.go +model_list_scope_request_200_response_inner.go diff --git a/rest/api/v3/scopes/.openapi-generator-ignore b/rest/api/v3/scopes/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/scopes/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/scopes/README.md b/rest/api/v3/scopes/README.md new file mode 100644 index 00000000..5529b125 --- /dev/null +++ b/rest/api/v3/scopes/README.md @@ -0,0 +1,71 @@ +# Go API client for + +The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T16:57:38.426976+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ApproveScopeRequest* | [**ApproveScopeRequest**](docs/ApproveScopeRequest.md#approvescoperequest) | **Patch** /v3/scopes/requests/{RequestId}/approve | Approve access request +*DenyScopeRequest* | [**DenyScopeRequest**](docs/DenyScopeRequest.md#denyscoperequest) | **Delete** /v3/scopes/requests/{RequestId} | Deny access request +*ListScope* | [**ListScope**](docs/ListScope.md#listscope) | **Get** /v3/scopes | Retrieve a list of scopes for which this user has access. +*ListScopeRequest* | [**ListScopeRequest**](docs/ListScopeRequest.md#listscoperequest) | **Get** /v3/scopes/requests | Retrieve access requests + + +## Documentation For Models + + - [ApproveScopeRequest200Response](ApproveScopeRequest200Response.md) + - [DenyScopeRequest404Response](DenyScopeRequest404Response.md) + - [DenyScopeRequest404ResponseErrorsInner](DenyScopeRequest404ResponseErrorsInner.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [ListScope200Response](ListScope200Response.md) + - [ListScope401Response](ListScope401Response.md) + - [ListScope401ResponseErrorsInner](ListScope401ResponseErrorsInner.md) + - [ListScopeRequest200ResponseInner](ListScopeRequest200ResponseInner.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/scopes/api_approve_scope_request.go b/rest/api/v3/scopes/api_approve_scope_request.go new file mode 100644 index 00000000..936bcf6e --- /dev/null +++ b/rest/api/v3/scopes/api_approve_scope_request.go @@ -0,0 +1,77 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scopes API +* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type ApproveScopeRequestParam struct { + // The ID of the request that you want to approve. + RequestId *string `json:"request_id"` +} + +func (params *ApproveScopeRequestParam) SetRequestId(RequestId string) *ApproveScopeRequestParam { + params.RequestId = &RequestId + return params +} + +// **This endpoint allows you to approve an access attempt.** **Note:** Only teammate admins may approve another teammate’s access request. +func (c *ApiService) ApproveScopeRequest(params *ApproveScopeRequestParam) (interface{}, error) { + path := "/v3/scopes/requests/{RequestId}/approve" + if params != nil && params.RequestId != nil { + path = strings.Replace(path, "{"+"RequestId"+"}", *params.RequestId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ApproveScopeRequest200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &DenyScopeRequest404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/scopes/api_deny_scope_request.go b/rest/api/v3/scopes/api_deny_scope_request.go new file mode 100644 index 00000000..defeab0b --- /dev/null +++ b/rest/api/v3/scopes/api_deny_scope_request.go @@ -0,0 +1,61 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scopes API +* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DenyScopeRequestParam struct { + // The ID of the request that you want to deny. + RequestId *string `json:"request_id"` +} + +func (params *DenyScopeRequestParam) SetRequestId(RequestId string) *DenyScopeRequestParam { + params.RequestId = &RequestId + return params +} + +// **This endpoint allows you to deny an attempt to access your account.** **Note:** Only teammate admins may delete a teammate's access request. +func (c *ApiService) DenyScopeRequest(params *DenyScopeRequestParam) (interface{}, error) { + path := "/v3/scopes/requests/{RequestId}" + if params != nil && params.RequestId != nil { + path = strings.Replace(path, "{"+"RequestId"+"}", *params.RequestId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 404 { + ps := &DenyScopeRequest404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/scopes/api_list_scope.go b/rest/api/v3/scopes/api_list_scope.go new file mode 100644 index 00000000..a49b89f7 --- /dev/null +++ b/rest/api/v3/scopes/api_list_scope.go @@ -0,0 +1,91 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scopes API +* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListScopeParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListScopeParam) SetOnbehalfof(Onbehalfof string) *ListScopeParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint returns a list of all scopes that this user has access to.** API Keys are used to authenticate with [SendGrid's v3 API](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/authorization). API Keys may be assigned certain permissions, or scopes, that limit which API endpoints they are able to access. This endpoint returns all the scopes assigned to the key you use to authenticate with it. To retrieve the scopes assigned to another key, you can pass an API key ID to the \"Retrieve an existing API key\" endpoint. For a more detailed explanation of how you can use API Key permissions, please visit our [API Keys documentation](https://sendgrid.com/docs/ui/account-and-settings/api-keys/). +func (c *ApiService) ListScope(params *ListScopeParam) (interface{}, error) { + path := "/v3/scopes" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListScope200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ListScope401Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/scopes/api_list_scope_request.go b/rest/api/v3/scopes/api_list_scope_request.go new file mode 100644 index 00000000..41c1f4be --- /dev/null +++ b/rest/api/v3/scopes/api_list_scope_request.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scopes API +* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListScopeRequestParam struct { + // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. + Limit *int32 `json:"limit,omitempty"` + // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + Offset *int32 `json:"offset,omitempty"` +} + +func (params *ListScopeRequestParam) SetLimit(Limit int32) *ListScopeRequestParam { + params.Limit = &Limit + return params +} +func (params *ListScopeRequestParam) SetOffset(Offset int32) *ListScopeRequestParam { + params.Offset = &Offset + return params +} + +// **This endpoint allows you to retrieve a paginated list of all recent access requests.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. +func (c *ApiService) ListScopeRequest(params *ListScopeRequestParam) (interface{}, error) { + path := "/v3/scopes/requests" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListScopeRequest200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/scopes/api_service.go b/rest/api/v3/scopes/api_service.go new file mode 100644 index 00000000..bc846141 --- /dev/null +++ b/rest/api/v3/scopes/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scopes API +* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/mc_designs/docs/GetDesign.md b/rest/api/v3/scopes/docs/ApproveScopeRequest.md similarity index 54% rename from rest/api/v3/mc_designs/docs/GetDesign.md rename to rest/api/v3/scopes/docs/ApproveScopeRequest.md index 8bd1d16c..2b701325 100644 --- a/rest/api/v3/mc_designs/docs/GetDesign.md +++ b/rest/api/v3/scopes/docs/ApproveScopeRequest.md @@ -1,20 +1,20 @@ -# GetDesign +# ApproveScopeRequest All URIs are relative to *https://api.sendgrid.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**GetDesign**](GetDesign.md#GetDesign) | **Get** /v3/designs/{Id} | Get Design +[**ApproveScopeRequest**](ApproveScopeRequest.md#ApproveScopeRequest) | **Patch** /v3/scopes/requests/{RequestId}/approve | Approve access request -## GetDesign +## ApproveScopeRequest -> DesignOutput GetDesign(ctx, Id) +> ApproveScopeRequest200Response ApproveScopeRequest(ctx, RequestId) -Get Design +Approve access request -**This endpoint allows you to retrieve a single design**. A GET request to `/designs/{id}` will retrieve details about a specific design in your Design Library. This endpoint is valuable when retrieving information stored in a field that you wish to update using a PATCH request. +**This endpoint allows you to approve an access attempt.** **Note:** Only teammate admins may approve another teammate’s access request. ### Path Parameters @@ -22,11 +22,11 @@ Get Design Name | Type | Description ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of the Design you want to duplicate. +**RequestId** | **string** | The ID of the request that you want to approve. ### Other Parameters -Other parameters are passed through a pointer to a GetDesignParams struct +Other parameters are passed through a pointer to a ApproveScopeRequestParams struct Name | Type | Description @@ -34,7 +34,7 @@ Name | Type | Description ### Return type -[**DesignOutput**](DesignOutput.md) +[**ApproveScopeRequest200Response**](ApproveScopeRequest200Response.md) ### Authorization diff --git a/rest/api/v3/scopes/docs/ApproveScopeRequest200Response.md b/rest/api/v3/scopes/docs/ApproveScopeRequest200Response.md new file mode 100644 index 00000000..99c4ce7e --- /dev/null +++ b/rest/api/v3/scopes/docs/ApproveScopeRequest200Response.md @@ -0,0 +1,11 @@ +# ApproveScopeRequest200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ScopeGroupName** | **string** | name of feature teammate will be given access to |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_designs/docs/DeleteDesign.md b/rest/api/v3/scopes/docs/DenyScopeRequest.md similarity index 59% rename from rest/api/v3/mc_designs/docs/DeleteDesign.md rename to rest/api/v3/scopes/docs/DenyScopeRequest.md index 8b46426a..56947c47 100644 --- a/rest/api/v3/mc_designs/docs/DeleteDesign.md +++ b/rest/api/v3/scopes/docs/DenyScopeRequest.md @@ -1,20 +1,20 @@ -# DeleteDesign +# DenyScopeRequest All URIs are relative to *https://api.sendgrid.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**DeleteDesign**](DeleteDesign.md#DeleteDesign) | **Delete** /v3/designs/{Id} | Delete Design +[**DenyScopeRequest**](DenyScopeRequest.md#DenyScopeRequest) | **Delete** /v3/scopes/requests/{RequestId} | Deny access request -## DeleteDesign +## DenyScopeRequest -> map[string]interface{} DeleteDesign(ctx, Id) +> DenyScopeRequest(ctx, RequestId) -Delete Design +Deny access request -**This endpoint allows you to delete a single design**. Be sure to check the ID of the design you intend to delete before making this request; deleting a design is a permanent action. +**This endpoint allows you to deny an attempt to access your account.** **Note:** Only teammate admins may delete a teammate's access request. ### Path Parameters @@ -22,11 +22,11 @@ Delete Design Name | Type | Description ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of the Design you want to duplicate. +**RequestId** | **string** | The ID of the request that you want to deny. ### Other Parameters -Other parameters are passed through a pointer to a DeleteDesignParams struct +Other parameters are passed through a pointer to a DenyScopeRequestParams struct Name | Type | Description @@ -34,7 +34,7 @@ Name | Type | Description ### Return type -**map[string]interface{}** + (empty response body) ### Authorization diff --git a/rest/api/v3/scopes/docs/DenyScopeRequest404Response.md b/rest/api/v3/scopes/docs/DenyScopeRequest404Response.md new file mode 100644 index 00000000..4a41f9dd --- /dev/null +++ b/rest/api/v3/scopes/docs/DenyScopeRequest404Response.md @@ -0,0 +1,11 @@ +# DenyScopeRequest404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]DenyScopeRequest404ResponseErrorsInner**](DenyScopeRequest404ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scopes/docs/DenyScopeRequest404ResponseErrorsInner.md b/rest/api/v3/scopes/docs/DenyScopeRequest404ResponseErrorsInner.md new file mode 100644 index 00000000..6f6d4c6a --- /dev/null +++ b/rest/api/v3/scopes/docs/DenyScopeRequest404ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# DenyScopeRequest404ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | |[optional] +**Field** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scopes/docs/ErrorResponse.md b/rest/api/v3/scopes/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/scopes/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scopes/docs/ErrorResponseErrorsInner.md b/rest/api/v3/scopes/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/scopes/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ListCategoryStatSum.md b/rest/api/v3/scopes/docs/ListScope.md similarity index 51% rename from rest/api/v3/stats/docs/ListCategoryStatSum.md rename to rest/api/v3/scopes/docs/ListScope.md index 18067fc6..01d7815e 100644 --- a/rest/api/v3/stats/docs/ListCategoryStatSum.md +++ b/rest/api/v3/scopes/docs/ListScope.md @@ -1,20 +1,20 @@ -# ListCategoryStatSum +# ListScope All URIs are relative to *https://api.sendgrid.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**ListCategoryStatSum**](ListCategoryStatSum.md#ListCategoryStatSum) | **Get** /v3/categories/stats/sums | Retrieve sums of email stats for each category. +[**ListScope**](ListScope.md#ListScope) | **Get** /v3/scopes | Retrieve a list of scopes for which this user has access. -## ListCategoryStatSum +## ListScope -> CategoryStats ListCategoryStatSum(ctx, StartDateoptional) +> ListScope200Response ListScope(ctx, optional) -Retrieve sums of email stats for each category. +Retrieve a list of scopes for which this user has access. -**This endpoint allows you to retrieve the total sum of each email statistic for every category over the given date range.** If you do not define any query parameters, this endpoint will return a sum for each category in groups of 10. +**This endpoint returns a list of all scopes that this user has access to.** API Keys are used to authenticate with [SendGrid's v3 API](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/authorization). API Keys may be assigned certain permissions, or scopes, that limit which API endpoints they are able to access. This endpoint returns all the scopes assigned to the key you use to authenticate with it. To retrieve the scopes assigned to another key, you can pass an API key ID to the \"Retrieve an existing API key\" endpoint. For a more detailed explanation of how you can use API Key permissions, please visit our [API Keys documentation](https://sendgrid.com/docs/ui/account-and-settings/api-keys/). ### Path Parameters @@ -22,22 +22,16 @@ This endpoint does not need any path parameter. ### Other Parameters -Other parameters are passed through a pointer to a ListCategoryStatSumParams struct +Other parameters are passed through a pointer to a ListScopeParams struct Name | Type | Description ------------- | ------------- | ------------- -**SortByMetric** | **string** | The metric that you want to sort by. Must be a single metric. -**SortByDirection** | [**SortByDirection**](SortByDirectionSortByDirection.md) | The direction you want to sort. -**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. -**Limit** | **int32** | Limits the number of results returned. -**Offset** | **int32** | The point in the list to begin retrieving results. -**AggregatedBy** | [**AggregatedBy1**](AggregatedBy1AggregatedBy1.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". **Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. ### Return type -[**CategoryStats**](CategoryStats.md) +[**ListScope200Response**](ListScope200Response.md) ### Authorization diff --git a/rest/api/v3/scopes/docs/ListScope200Response.md b/rest/api/v3/scopes/docs/ListScope200Response.md new file mode 100644 index 00000000..d21786da --- /dev/null +++ b/rest/api/v3/scopes/docs/ListScope200Response.md @@ -0,0 +1,11 @@ +# ListScope200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Scopes** | **[]string** | The list of scopes for which this user has access. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scopes/docs/ListScope401Response.md b/rest/api/v3/scopes/docs/ListScope401Response.md new file mode 100644 index 00000000..0ee64c00 --- /dev/null +++ b/rest/api/v3/scopes/docs/ListScope401Response.md @@ -0,0 +1,11 @@ +# ListScope401Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ListScope401ResponseErrorsInner**](ListScope401ResponseErrorsInner.md) | This 401 response indicates that the user making the call doesn't have the authorization to view the list of scopes. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scopes/docs/ListScope401ResponseErrorsInner.md b/rest/api/v3/scopes/docs/ListScope401ResponseErrorsInner.md new file mode 100644 index 00000000..533dc68c --- /dev/null +++ b/rest/api/v3/scopes/docs/ListScope401ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# ListScope401ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | This empty field is returned instead of the list of scopes if the user making the call doesn't have the authorization required. |[optional] +**Message** | **string** | Explains why the scopes cannot be returned. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scopes/docs/ListScopeRequest.md b/rest/api/v3/scopes/docs/ListScopeRequest.md new file mode 100644 index 00000000..9af40e3c --- /dev/null +++ b/rest/api/v3/scopes/docs/ListScopeRequest.md @@ -0,0 +1,49 @@ +# ListScopeRequest + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListScopeRequest**](ListScopeRequest.md#ListScopeRequest) | **Get** /v3/scopes/requests | Retrieve access requests + + + +## ListScopeRequest + +> []ListScopeRequest200ResponseInner ListScopeRequest(ctx, optional) + +Retrieve access requests + +**This endpoint allows you to retrieve a paginated list of all recent access requests.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListScopeRequestParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. +**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + +### Return type + +[**[]ListScopeRequest200ResponseInner**](ListScopeRequest200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/scopes/docs/ListScopeRequest200ResponseInner.md b/rest/api/v3/scopes/docs/ListScopeRequest200ResponseInner.md new file mode 100644 index 00000000..10495fad --- /dev/null +++ b/rest/api/v3/scopes/docs/ListScopeRequest200ResponseInner.md @@ -0,0 +1,16 @@ +# ListScopeRequest200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | Request ID |[optional] +**ScopeGroupName** | **string** | Name of group of scopes associated to page teammate is requesting access to |[optional] +**Username** | **string** | Teammate's username |[optional] +**Email** | **string** | Teammate's email |[optional] +**FirstName** | **string** | Teammate's first name |[optional] +**LastName** | **string** | Teammate's last name |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scopes/model_approve_scope_request_200_response.go b/rest/api/v3/scopes/model_approve_scope_request_200_response.go new file mode 100644 index 00000000..38fd571e --- /dev/null +++ b/rest/api/v3/scopes/model_approve_scope_request_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scopes API +* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ApproveScopeRequest200Response struct for ApproveScopeRequest200Response +type ApproveScopeRequest200Response struct { + // name of feature teammate will be given access to + ScopeGroupName *string `json:"scope_group_name,omitempty"` +} diff --git a/rest/api/v3/scopes/model_deny_scope_request_404_response.go b/rest/api/v3/scopes/model_deny_scope_request_404_response.go new file mode 100644 index 00000000..0117edee --- /dev/null +++ b/rest/api/v3/scopes/model_deny_scope_request_404_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scopes API +* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DenyScopeRequest404Response struct for DenyScopeRequest404Response +type DenyScopeRequest404Response struct { + Errors *[]DenyScopeRequest404ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/scopes/model_deny_scope_request_404_response_errors_inner.go b/rest/api/v3/scopes/model_deny_scope_request_404_response_errors_inner.go new file mode 100644 index 00000000..b2801e34 --- /dev/null +++ b/rest/api/v3/scopes/model_deny_scope_request_404_response_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scopes API +* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DenyScopeRequest404ResponseErrorsInner struct for DenyScopeRequest404ResponseErrorsInner +type DenyScopeRequest404ResponseErrorsInner struct { + Message *string `json:"message,omitempty"` + Field *string `json:"field,omitempty"` +} diff --git a/rest/api/v3/scopes/model_error_response.go b/rest/api/v3/scopes/model_error_response.go new file mode 100644 index 00000000..4adefcdf --- /dev/null +++ b/rest/api/v3/scopes/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scopes API +* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/scopes/model_error_response_errors_inner.go b/rest/api/v3/scopes/model_error_response_errors_inner.go new file mode 100644 index 00000000..de2012d0 --- /dev/null +++ b/rest/api/v3/scopes/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scopes API +* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/scopes/model_list_scope_200_response.go b/rest/api/v3/scopes/model_list_scope_200_response.go new file mode 100644 index 00000000..f9c8775e --- /dev/null +++ b/rest/api/v3/scopes/model_list_scope_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scopes API +* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListScope200Response struct for ListScope200Response +type ListScope200Response struct { + // The list of scopes for which this user has access. + Scopes []string `json:"scopes"` +} diff --git a/rest/api/v3/scopes/model_list_scope_401_response.go b/rest/api/v3/scopes/model_list_scope_401_response.go new file mode 100644 index 00000000..bb9109ba --- /dev/null +++ b/rest/api/v3/scopes/model_list_scope_401_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scopes API +* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListScope401Response struct for ListScope401Response +type ListScope401Response struct { + // This 401 response indicates that the user making the call doesn't have the authorization to view the list of scopes. + Errors []ListScope401ResponseErrorsInner `json:"errors"` +} diff --git a/rest/api/v3/scopes/model_list_scope_401_response_errors_inner.go b/rest/api/v3/scopes/model_list_scope_401_response_errors_inner.go new file mode 100644 index 00000000..82cec172 --- /dev/null +++ b/rest/api/v3/scopes/model_list_scope_401_response_errors_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scopes API +* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListScope401ResponseErrorsInner struct for ListScope401ResponseErrorsInner +type ListScope401ResponseErrorsInner struct { + // This empty field is returned instead of the list of scopes if the user making the call doesn't have the authorization required. + Field *string `json:"field,omitempty"` + // Explains why the scopes cannot be returned. + Message string `json:"message"` +} diff --git a/rest/api/v3/scopes/model_list_scope_request_200_response_inner.go b/rest/api/v3/scopes/model_list_scope_request_200_response_inner.go new file mode 100644 index 00000000..5392887d --- /dev/null +++ b/rest/api/v3/scopes/model_list_scope_request_200_response_inner.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scopes API +* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListScopeRequest200ResponseInner struct for ListScopeRequest200ResponseInner +type ListScopeRequest200ResponseInner struct { + // Request ID + Id *int32 `json:"id,omitempty"` + // Name of group of scopes associated to page teammate is requesting access to + ScopeGroupName *string `json:"scope_group_name,omitempty"` + // Teammate's username + Username *string `json:"username,omitempty"` + // Teammate's email + Email *string `json:"email,omitempty"` + // Teammate's first name + FirstName *string `json:"first_name,omitempty"` + // Teammate's last name + LastName *string `json:"last_name,omitempty"` +} diff --git a/rest/api/v3/seq/.openapi-generator b/rest/api/v3/seq/.openapi-generator index 1351e965..b6d3b5df 100644 --- a/rest/api/v3/seq/.openapi-generator +++ b/rest/api/v3/seq/.openapi-generator @@ -1,5 +1,4 @@ .openapi-generator -.openapi-generator-ignore README.md api_list_engagement_quality_score.go api_list_subuser_engagement_quality_score.go diff --git a/rest/api/v3/seq/README.md b/rest/api/v3/seq/README.md index ad2ee0c2..5f881d84 100644 --- a/rest/api/v3/seq/README.md +++ b/rest/api/v3/seq/README.md @@ -13,7 +13,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:44.403984+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:38.422950+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/seq/api_list_engagement_quality_score.go b/rest/api/v3/seq/api_list_engagement_quality_score.go index 14d03178..c79118dd 100644 --- a/rest/api/v3/seq/api_list_engagement_quality_score.go +++ b/rest/api/v3/seq/api_list_engagement_quality_score.go @@ -15,6 +15,7 @@ package openapi import ( "fmt" + "net/http" "net/url" ) @@ -65,5 +66,5 @@ func (c *ApiService) ListEngagementQualityScore(params *ListEngagementQualitySco } defer resp.Body.Close() - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/seq/api_list_subuser_engagement_quality_score.go b/rest/api/v3/seq/api_list_subuser_engagement_quality_score.go index 41a85f79..82ff9ce6 100644 --- a/rest/api/v3/seq/api_list_subuser_engagement_quality_score.go +++ b/rest/api/v3/seq/api_list_subuser_engagement_quality_score.go @@ -15,6 +15,7 @@ package openapi import ( "fmt" + "net/http" "net/url" ) @@ -74,5 +75,5 @@ func (c *ApiService) ListSubuserEngagementQualityScore(params *ListSubuserEngage } defer resp.Body.Close() - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/sso/.openapi-generator b/rest/api/v3/sso/.openapi-generator deleted file mode 100644 index 9f986e00..00000000 --- a/rest/api/v3/sso/.openapi-generator +++ /dev/null @@ -1,64 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_create_sso_certificate.go -api_create_sso_integration.go -api_create_sso_teammate.go -api_delete_sso_certificate.go -api_delete_sso_integration.go -api_get_sso_certificate.go -api_get_sso_integration.go -api_list_sso_integration.go -api_list_sso_integration_certificate.go -api_service.go -api_update_sso_certificate.go -api_update_sso_integration.go -api_update_sso_teammate.go -docs/CreateSsoCertificate.md -docs/CreateSsoCertificateRequest.md -docs/CreateSsoIntegration.md -docs/CreateSsoTeammate.md -docs/DeleteSsoCertificate.md -docs/DeleteSsoIntegration.md -docs/GetSsoCertificate.md -docs/GetSsoIntegration.md -docs/ListSsoIntegration.md -docs/ListSsoIntegrationCertificate.md -docs/PatchSsoTeammates200.md -docs/PermissionType.md -docs/PermissionType1.md -docs/Persona.md -docs/PostPatchIntegrationRequest.md -docs/PostSsoTeammates201.md -docs/PostSsoTeammatesRequest.md -docs/SsoCertificateBody.md -docs/SsoErrorResponseInner.md -docs/SsoIntegration.md -docs/SsoTeammatesBaseRequestProps.md -docs/SsoTeammatesBaseRequestPropsSubuserAccessInner.md -docs/SsoTeammatesBaseResponseProps.md -docs/SsoTeammatesRestrictedSubuserResponseProps.md -docs/SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md -docs/UpdateSsoCertificate.md -docs/UpdateSsoCertificateRequest.md -docs/UpdateSsoIntegration.md -docs/UpdateSsoTeammate.md -docs/UserType.md -model_create_sso_certificate_request.go -model_patch_sso_teammates200.go -model_permission_type.go -model_permission_type1.go -model_persona.go -model_post_patch_integration_request.go -model_post_sso_teammates201.go -model_post_sso_teammates_request.go -model_sso_certificate_body.go -model_sso_error_response_inner.go -model_sso_integration.go -model_sso_teammates_base_request_props.go -model_sso_teammates_base_request_props_subuser_access_inner.go -model_sso_teammates_base_response_props.go -model_sso_teammates_restricted_subuser_response_props.go -model_sso_teammates_restricted_subuser_response_props_subuser_access_inner.go -model_update_sso_certificate_request.go -model_user_type.go diff --git a/rest/api/v3/sso/README.md b/rest/api/v3/sso/README.md deleted file mode 100644 index 731a302f..00000000 --- a/rest/api/v3/sso/README.md +++ /dev/null @@ -1,94 +0,0 @@ -# Go API client for - -The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). - -The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. - -The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. - -The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T13:25:44.437973+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*CreateSsoCertificate* | [**CreateSsoCertificate**](docs/CreateSsoCertificate.md#createssocertificate) | **Post** /v3/sso/certificates | Create an SSO Certificate -*CreateSsoIntegration* | [**CreateSsoIntegration**](docs/CreateSsoIntegration.md#createssointegration) | **Post** /v3/sso/integrations | Create an SSO Integration -*CreateSsoTeammate* | [**CreateSsoTeammate**](docs/CreateSsoTeammate.md#createssoteammate) | **Post** /v3/sso/teammates | Create an SSO Teammate. -*DeleteSsoCertificate* | [**DeleteSsoCertificate**](docs/DeleteSsoCertificate.md#deletessocertificate) | **Delete** /v3/sso/certificates/{CertId} | Delete an SSO Certificate -*DeleteSsoIntegration* | [**DeleteSsoIntegration**](docs/DeleteSsoIntegration.md#deletessointegration) | **Delete** /v3/sso/integrations/{Id} | Delete an SSO Integration -*GetSsoCertificate* | [**GetSsoCertificate**](docs/GetSsoCertificate.md#getssocertificate) | **Get** /v3/sso/certificates/{CertId} | Get an SSO Certificate -*GetSsoIntegration* | [**GetSsoIntegration**](docs/GetSsoIntegration.md#getssointegration) | **Get** /v3/sso/integrations/{Id} | Get an SSO Integration -*ListSsoIntegration* | [**ListSsoIntegration**](docs/ListSsoIntegration.md#listssointegration) | **Get** /v3/sso/integrations | Get All SSO Integrations -*ListSsoIntegrationCertificate* | [**ListSsoIntegrationCertificate**](docs/ListSsoIntegrationCertificate.md#listssointegrationcertificate) | **Get** /v3/sso/integrations/{IntegrationId}/certificates | Get All SSO Certificates by Integration -*UpdateSsoCertificate* | [**UpdateSsoCertificate**](docs/UpdateSsoCertificate.md#updatessocertificate) | **Patch** /v3/sso/certificates/{CertId} | Update SSO Certificate -*UpdateSsoIntegration* | [**UpdateSsoIntegration**](docs/UpdateSsoIntegration.md#updatessointegration) | **Patch** /v3/sso/integrations/{Id} | Update an SSO Integration -*UpdateSsoTeammate* | [**UpdateSsoTeammate**](docs/UpdateSsoTeammate.md#updatessoteammate) | **Patch** /v3/sso/teammates/{Username} | Edit an SSO Teammate - - -## Documentation For Models - - - [CreateSsoCertificateRequest](CreateSsoCertificateRequest.md) - - [PatchSsoTeammates200](PatchSsoTeammates200.md) - - [PermissionType](PermissionType.md) - - [PermissionType1](PermissionType1.md) - - [Persona](Persona.md) - - [PostPatchIntegrationRequest](PostPatchIntegrationRequest.md) - - [PostSsoTeammates201](PostSsoTeammates201.md) - - [PostSsoTeammatesRequest](PostSsoTeammatesRequest.md) - - [SsoCertificateBody](SsoCertificateBody.md) - - [SsoErrorResponseInner](SsoErrorResponseInner.md) - - [SsoIntegration](SsoIntegration.md) - - [SsoTeammatesBaseRequestProps](SsoTeammatesBaseRequestProps.md) - - [SsoTeammatesBaseRequestPropsSubuserAccessInner](SsoTeammatesBaseRequestPropsSubuserAccessInner.md) - - [SsoTeammatesBaseResponseProps](SsoTeammatesBaseResponseProps.md) - - [SsoTeammatesRestrictedSubuserResponseProps](SsoTeammatesRestrictedSubuserResponseProps.md) - - [SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner](SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md) - - [UpdateSsoCertificateRequest](UpdateSsoCertificateRequest.md) - - [UserType](UserType.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/sso/api_create_sso_certificate.go b/rest/api/v3/sso/api_create_sso_certificate.go deleted file mode 100644 index f23bc4dd..00000000 --- a/rest/api/v3/sso/api_create_sso_certificate.go +++ /dev/null @@ -1,104 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" -) - -type CreateSsoCertificateParam struct { - // - CreateSsoCertificateRequest *CreateSsoCertificateRequest `json:"CreateSsoCertificateRequest,omitempty"` -} - -func (params *CreateSsoCertificateParam) SetCreateSsoCertificateRequest(CreateSsoCertificateRequest CreateSsoCertificateRequest) *CreateSsoCertificateParam { - params.CreateSsoCertificateRequest = &CreateSsoCertificateRequest - return params -} - -// **This endpoint allows you to create an SSO certificate.** -func (c *ApiService) CreateSsoCertificate(params *CreateSsoCertificateParam) (interface{}, error) { - path := "/v3/sso/certificates" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.CreateSsoCertificateRequest != nil { - b, err := json.Marshal(*params.CreateSsoCertificateRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SsoCertificateBody{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 429 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/sso/api_create_sso_integration.go b/rest/api/v3/sso/api_create_sso_integration.go deleted file mode 100644 index 2113b4f5..00000000 --- a/rest/api/v3/sso/api_create_sso_integration.go +++ /dev/null @@ -1,104 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" -) - -type CreateSsoIntegrationParam struct { - // - PostPatchIntegrationRequest *PostPatchIntegrationRequest `json:"PostPatchIntegrationRequest,omitempty"` -} - -func (params *CreateSsoIntegrationParam) SetPostPatchIntegrationRequest(PostPatchIntegrationRequest PostPatchIntegrationRequest) *CreateSsoIntegrationParam { - params.PostPatchIntegrationRequest = &PostPatchIntegrationRequest - return params -} - -// **This endpoint allows you to create an SSO integration.** -func (c *ApiService) CreateSsoIntegration(params *CreateSsoIntegrationParam) (interface{}, error) { - path := "/v3/sso/integrations" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.PostPatchIntegrationRequest != nil { - b, err := json.Marshal(*params.PostPatchIntegrationRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SsoIntegration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 429 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/sso/api_create_sso_teammate.go b/rest/api/v3/sso/api_create_sso_teammate.go deleted file mode 100644 index ac3f8c9b..00000000 --- a/rest/api/v3/sso/api_create_sso_teammate.go +++ /dev/null @@ -1,104 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" -) - -type CreateSsoTeammateParam struct { - // - PostSsoTeammatesRequest *PostSsoTeammatesRequest `json:"PostSsoTeammatesRequest,omitempty"` -} - -func (params *CreateSsoTeammateParam) SetPostSsoTeammatesRequest(PostSsoTeammatesRequest PostSsoTeammatesRequest) *CreateSsoTeammateParam { - params.PostSsoTeammatesRequest = &PostSsoTeammatesRequest - return params -} - -// **This endpoint allows you to create an SSO Teammate.** The email address provided for the Teammate will also function as the Teammate's username. Once created, the Teammate's email address cannot be changed. ### Scopes When creating a Teammate, you will assign it permissions or scopes. These scopes determine which actions the Teammate can perform and which features they can access. Scopes are provided with one of three properties passed to this endpoint: `is_admin`, `scopes`, and `persona`. You can make a Teammate an administrator by setting `is_admin` to `true`. Administrators will have all scopes assigned to them. Alternatively, you can assign a `persona` to the teammate, which will assign them a block of permissions commonly required for that type of user. See the \"Persona scopes\" section of [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions#persona-scopes) for a list of permsissions granted by persona. Lastly, you can assign individual permissions with the `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of scopes that can be assigned to a Teammate. ### Subuser access SendGrid Teammates may be assigned access to one or more Subusers. Subusers function like SendGrid sub-accounts with their own resources. See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. When assigning Subuser access to a Teammate, you may set the `has_restricted_subuser_access` property to `true` to constrain the Teammate so that they can operate only on behalf of the Subusers to which they are assigned. You may further set the level of access the Teammate has to each Subuser with the `subuser_access` property. -func (c *ApiService) CreateSsoTeammate(params *CreateSsoTeammateParam) (interface{}, error) { - path := "/v3/sso/teammates" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.PostSsoTeammatesRequest != nil { - b, err := json.Marshal(*params.PostSsoTeammatesRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &PostSsoTeammates201{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 429 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/sso/api_delete_sso_certificate.go b/rest/api/v3/sso/api_delete_sso_certificate.go deleted file mode 100644 index 4deeb0a5..00000000 --- a/rest/api/v3/sso/api_delete_sso_certificate.go +++ /dev/null @@ -1,100 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" - - "strings" -) - -type DeleteSsoCertificateParam struct { - // - CertId *string `json:"cert_id"` -} - -func (params *DeleteSsoCertificateParam) SetCertId(CertId string) *DeleteSsoCertificateParam { - params.CertId = &CertId - return params -} - -// **This endpoint allows you to delete an SSO certificate.** You can retrieve a certificate's ID from the response provided by the \"Get All SSO Integrations\" endpoint. -func (c *ApiService) DeleteSsoCertificate(params *DeleteSsoCertificateParam) (interface{}, error) { - path := "/v3/sso/certificates/{CertId}" - if params != nil && params.CertId != nil { - path = strings.Replace(path, "{"+"CertId"+"}", *params.CertId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SsoCertificateBody{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 429 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/sso/api_delete_sso_integration.go b/rest/api/v3/sso/api_delete_sso_integration.go deleted file mode 100644 index fd63f994..00000000 --- a/rest/api/v3/sso/api_delete_sso_integration.go +++ /dev/null @@ -1,92 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" - - "strings" -) - -type DeleteSsoIntegrationParam struct { - // - Id *string `json:"id"` -} - -func (params *DeleteSsoIntegrationParam) SetId(Id string) *DeleteSsoIntegrationParam { - params.Id = &Id - return params -} - -// **This endpoint allows you to delete an IdP configuration by ID.** You can retrieve the IDs for your configurations from the response provided by the \"Get All SSO Integrations\" endpoint. -func (c *ApiService) DeleteSsoIntegration(params *DeleteSsoIntegrationParam) (interface{}, error) { - path := "/v3/sso/integrations/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 400 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 429 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/sso/api_get_sso_certificate.go b/rest/api/v3/sso/api_get_sso_certificate.go deleted file mode 100644 index 81234a78..00000000 --- a/rest/api/v3/sso/api_get_sso_certificate.go +++ /dev/null @@ -1,100 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" - - "strings" -) - -type GetSsoCertificateParam struct { - // - CertId *string `json:"cert_id"` -} - -func (params *GetSsoCertificateParam) SetCertId(CertId string) *GetSsoCertificateParam { - params.CertId = &CertId - return params -} - -// **This endpoint allows you to retrieve an individual SSO certificate.** -func (c *ApiService) GetSsoCertificate(params *GetSsoCertificateParam) (interface{}, error) { - path := "/v3/sso/certificates/{CertId}" - if params != nil && params.CertId != nil { - path = strings.Replace(path, "{"+"CertId"+"}", *params.CertId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SsoCertificateBody{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 429 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/sso/api_get_sso_integration.go b/rest/api/v3/sso/api_get_sso_integration.go deleted file mode 100644 index 4ada401b..00000000 --- a/rest/api/v3/sso/api_get_sso_integration.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" - - "strings" -) - -type GetSsoIntegrationParam struct { - // - Id *string `json:"id"` - // If this parameter is set to `true`, the response will include the `completed_integration` field. - Si *bool `json:"si,omitempty"` -} - -func (params *GetSsoIntegrationParam) SetId(Id string) *GetSsoIntegrationParam { - params.Id = &Id - return params -} -func (params *GetSsoIntegrationParam) SetSi(Si bool) *GetSsoIntegrationParam { - params.Si = &Si - return params -} - -// **This endpoint allows you to retrieve an SSO integration by ID.** You can retrieve the IDs for your configurations from the response provided by the \"Get All SSO Integrations\" endpoint. -func (c *ApiService) GetSsoIntegration(params *GetSsoIntegrationParam) (interface{}, error) { - path := "/v3/sso/integrations/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Si != nil { - data.Set("si", fmt.Sprint(*params.Si)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SsoIntegration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 429 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/sso/api_list_sso_integration.go b/rest/api/v3/sso/api_list_sso_integration.go deleted file mode 100644 index 9e89db77..00000000 --- a/rest/api/v3/sso/api_list_sso_integration.go +++ /dev/null @@ -1,100 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" -) - -type ListSsoIntegrationParam struct { - // If this parameter is set to `true`, the response will include the `completed_integration` field. - Si *bool `json:"si,omitempty"` -} - -func (params *ListSsoIntegrationParam) SetSi(Si bool) *ListSsoIntegrationParam { - params.Si = &Si - return params -} - -// **This endpoint allows you to retrieve all SSO integrations tied to your Twilio SendGrid account.** The IDs returned by this endpoint can be used by the APIs additional endpoints to modify your SSO integrations. -func (c *ApiService) ListSsoIntegration(params *ListSsoIntegrationParam) (interface{}, error) { - path := "/v3/sso/integrations" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Si != nil { - data.Set("si", fmt.Sprint(*params.Si)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]SsoIntegration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 429 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/sso/api_list_sso_integration_certificate.go b/rest/api/v3/sso/api_list_sso_integration_certificate.go deleted file mode 100644 index 4086e929..00000000 --- a/rest/api/v3/sso/api_list_sso_integration_certificate.go +++ /dev/null @@ -1,100 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" - - "strings" -) - -type ListSsoIntegrationCertificateParam struct { - // An ID that matches a certificate to a specific IdP integration. - IntegrationId *string `json:"integration_id"` -} - -func (params *ListSsoIntegrationCertificateParam) SetIntegrationId(IntegrationId string) *ListSsoIntegrationCertificateParam { - params.IntegrationId = &IntegrationId - return params -} - -// **This endpoint allows you to retrieve all your IdP configurations by configuration ID.** The `integration_id` expected by this endpoint is the `id` returned in the response by the \"Get All SSO Integrations\" endpoint. -func (c *ApiService) ListSsoIntegrationCertificate(params *ListSsoIntegrationCertificateParam) (interface{}, error) { - path := "/v3/sso/integrations/{IntegrationId}/certificates" - if params != nil && params.IntegrationId != nil { - path = strings.Replace(path, "{"+"IntegrationId"+"}", *params.IntegrationId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]SsoCertificateBody{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 429 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/sso/api_service.go b/rest/api/v3/sso/api_service.go deleted file mode 100644 index 1564dab4..00000000 --- a/rest/api/v3/sso/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/sso/api_update_sso_certificate.go b/rest/api/v3/sso/api_update_sso_certificate.go deleted file mode 100644 index 58803890..00000000 --- a/rest/api/v3/sso/api_update_sso_certificate.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" - - "strings" -) - -type UpdateSsoCertificateParam struct { - // - CertId *string `json:"cert_id"` - // - UpdateSsoCertificateRequest *UpdateSsoCertificateRequest `json:"UpdateSsoCertificateRequest,omitempty"` -} - -func (params *UpdateSsoCertificateParam) SetCertId(CertId string) *UpdateSsoCertificateParam { - params.CertId = &CertId - return params -} -func (params *UpdateSsoCertificateParam) SetUpdateSsoCertificateRequest(UpdateSsoCertificateRequest UpdateSsoCertificateRequest) *UpdateSsoCertificateParam { - params.UpdateSsoCertificateRequest = &UpdateSsoCertificateRequest - return params -} - -// **This endpoint allows you to update an existing certificate by ID.** You can retrieve a certificate's ID from the response provided by the \"Get All SSO Integrations\" endpoint. -func (c *ApiService) UpdateSsoCertificate(params *UpdateSsoCertificateParam) (interface{}, error) { - path := "/v3/sso/certificates/{CertId}" - if params != nil && params.CertId != nil { - path = strings.Replace(path, "{"+"CertId"+"}", *params.CertId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateSsoCertificateRequest != nil { - b, err := json.Marshal(*params.UpdateSsoCertificateRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SsoCertificateBody{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 429 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/sso/api_update_sso_integration.go b/rest/api/v3/sso/api_update_sso_integration.go deleted file mode 100644 index 5a8f9639..00000000 --- a/rest/api/v3/sso/api_update_sso_integration.go +++ /dev/null @@ -1,125 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" - - "strings" -) - -type UpdateSsoIntegrationParam struct { - // - Id *string `json:"id"` - // If this parameter is set to `true`, the response will include the `completed_integration` field. - Si *bool `json:"si,omitempty"` - // - PostPatchIntegrationRequest *PostPatchIntegrationRequest `json:"PostPatchIntegrationRequest,omitempty"` -} - -func (params *UpdateSsoIntegrationParam) SetId(Id string) *UpdateSsoIntegrationParam { - params.Id = &Id - return params -} -func (params *UpdateSsoIntegrationParam) SetSi(Si bool) *UpdateSsoIntegrationParam { - params.Si = &Si - return params -} -func (params *UpdateSsoIntegrationParam) SetPostPatchIntegrationRequest(PostPatchIntegrationRequest PostPatchIntegrationRequest) *UpdateSsoIntegrationParam { - params.PostPatchIntegrationRequest = &PostPatchIntegrationRequest - return params -} - -// **This endpoint allows you to modify an exisiting SSO integration.** You can retrieve the IDs for your configurations from the response provided by the \"Get All SSO Integrations\" endpoint. -func (c *ApiService) UpdateSsoIntegration(params *UpdateSsoIntegrationParam) (interface{}, error) { - path := "/v3/sso/integrations/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - if params != nil && params.Si != nil { - data.Set("si", fmt.Sprint(*params.Si)) - } - body := []byte{} - if params != nil && params.PostPatchIntegrationRequest != nil { - b, err := json.Marshal(*params.PostPatchIntegrationRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SsoIntegration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 429 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/sso/api_update_sso_teammate.go b/rest/api/v3/sso/api_update_sso_teammate.go deleted file mode 100644 index af816bea..00000000 --- a/rest/api/v3/sso/api_update_sso_teammate.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" - - "strings" -) - -type UpdateSsoTeammateParam struct { - // Set this parameter to the Teammate's email address. This address must be the same address assigned to the Teammate in your IdP. - Username *string `json:"username"` - // - Body *SsoTeammatesBaseRequestProps `json:"body,omitempty"` -} - -func (params *UpdateSsoTeammateParam) SetUsername(Username string) *UpdateSsoTeammateParam { - params.Username = &Username - return params -} -func (params *UpdateSsoTeammateParam) SetBody(Body SsoTeammatesBaseRequestProps) *UpdateSsoTeammateParam { - params.Body = &Body - return params -} - -// **This endpoint allows you to modify an existing SSO Teammate.** Only the parent user and Teammates with admin permissions can update another Teammate's permissions. ### Scopes When updating a Teammate, you will assign it permissions or scopes. These scopes determine which actions the Teammate can perform and which features they can access. Scopes are provided with one of three properties passed to this endpoint: `is_admin`, `scopes`, and `persona`. You can make a Teammate an administrator by setting `is_admin` to `true`. Administrators will have all scopes assigned to them. Alternatively, you can assign a `persona` to the teammate, which will assign them a block of permissions commonly required for that type of user. See the \"Persona scopes\" section of [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions#persona-scopes) for a list of permsissions granted by persona. Lastly, you can assign individual permissions with the `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of scopes that can be assigned to a Teammate. ### Subuser access SendGrid Teammates may be assigned access to one or more Subusers. Subusers function like SendGrid sub-accounts with their own resources. See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. When assigning Subuser access to a Teammate, you may set the `has_restricted_subuser_access` property to `true` to constrain the Teammate so that they can operate only on behalf of the Subusers to which they are assigned. You may further set the level of access the Teammate has to each Subuser with the `subuser_access` property. -func (c *ApiService) UpdateSsoTeammate(params *UpdateSsoTeammateParam) (interface{}, error) { - path := "/v3/sso/teammates/{Username}" - if params != nil && params.Username != nil { - path = strings.Replace(path, "{"+"Username"+"}", *params.Username, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.Body != nil { - b, err := json.Marshal(*params.Body) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &PatchSsoTeammates200{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 429 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/sso/docs/CreateSsoCertificate.md b/rest/api/v3/sso/docs/CreateSsoCertificate.md deleted file mode 100644 index 0f1b57e1..00000000 --- a/rest/api/v3/sso/docs/CreateSsoCertificate.md +++ /dev/null @@ -1,48 +0,0 @@ -# CreateSsoCertificate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateSsoCertificate**](CreateSsoCertificate.md#CreateSsoCertificate) | **Post** /v3/sso/certificates | Create an SSO Certificate - - - -## CreateSsoCertificate - -> SsoCertificateBody CreateSsoCertificate(ctx, optional) - -Create an SSO Certificate - -**This endpoint allows you to create an SSO certificate.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateSsoCertificateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**CreateSsoCertificateRequest** | [**CreateSsoCertificateRequest**](CreateSsoCertificateRequest.md) | - -### Return type - -[**SsoCertificateBody**](SsoCertificateBody.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/sso/docs/CreateSsoCertificateRequest.md b/rest/api/v3/sso/docs/CreateSsoCertificateRequest.md deleted file mode 100644 index ff047454..00000000 --- a/rest/api/v3/sso/docs/CreateSsoCertificateRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateSsoCertificateRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**PublicCertificate** | **string** | This public certificate allows SendGrid to verify that SAML requests it receives are signed by an IdP that it recognizes. | -**Enabled** | **bool** | Indicates if the certificate is enabled. |[optional] -**IntegrationId** | **string** | An ID that matches a certificate to a specific IdP integration. This is the `id` returned by the \"Get All SSO Integrations\" endpoint. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/CreateSsoIntegration.md b/rest/api/v3/sso/docs/CreateSsoIntegration.md deleted file mode 100644 index cc6926e3..00000000 --- a/rest/api/v3/sso/docs/CreateSsoIntegration.md +++ /dev/null @@ -1,48 +0,0 @@ -# CreateSsoIntegration - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateSsoIntegration**](CreateSsoIntegration.md#CreateSsoIntegration) | **Post** /v3/sso/integrations | Create an SSO Integration - - - -## CreateSsoIntegration - -> SsoIntegration CreateSsoIntegration(ctx, optional) - -Create an SSO Integration - -**This endpoint allows you to create an SSO integration.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateSsoIntegrationParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**PostPatchIntegrationRequest** | [**PostPatchIntegrationRequest**](PostPatchIntegrationRequest.md) | - -### Return type - -[**SsoIntegration**](SsoIntegration.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/sso/docs/CreateSsoTeammate.md b/rest/api/v3/sso/docs/CreateSsoTeammate.md deleted file mode 100644 index 98907b69..00000000 --- a/rest/api/v3/sso/docs/CreateSsoTeammate.md +++ /dev/null @@ -1,48 +0,0 @@ -# CreateSsoTeammate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateSsoTeammate**](CreateSsoTeammate.md#CreateSsoTeammate) | **Post** /v3/sso/teammates | Create an SSO Teammate. - - - -## CreateSsoTeammate - -> PostSsoTeammates201 CreateSsoTeammate(ctx, optional) - -Create an SSO Teammate. - -**This endpoint allows you to create an SSO Teammate.** The email address provided for the Teammate will also function as the Teammate's username. Once created, the Teammate's email address cannot be changed. ### Scopes When creating a Teammate, you will assign it permissions or scopes. These scopes determine which actions the Teammate can perform and which features they can access. Scopes are provided with one of three properties passed to this endpoint: `is_admin`, `scopes`, and `persona`. You can make a Teammate an administrator by setting `is_admin` to `true`. Administrators will have all scopes assigned to them. Alternatively, you can assign a `persona` to the teammate, which will assign them a block of permissions commonly required for that type of user. See the \"Persona scopes\" section of [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions#persona-scopes) for a list of permsissions granted by persona. Lastly, you can assign individual permissions with the `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of scopes that can be assigned to a Teammate. ### Subuser access SendGrid Teammates may be assigned access to one or more Subusers. Subusers function like SendGrid sub-accounts with their own resources. See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. When assigning Subuser access to a Teammate, you may set the `has_restricted_subuser_access` property to `true` to constrain the Teammate so that they can operate only on behalf of the Subusers to which they are assigned. You may further set the level of access the Teammate has to each Subuser with the `subuser_access` property. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateSsoTeammateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**PostSsoTeammatesRequest** | [**PostSsoTeammatesRequest**](PostSsoTeammatesRequest.md) | - -### Return type - -[**PostSsoTeammates201**](PostSsoTeammates201.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/sso/docs/ListSsoIntegration.md b/rest/api/v3/sso/docs/ListSsoIntegration.md deleted file mode 100644 index 8082cbe7..00000000 --- a/rest/api/v3/sso/docs/ListSsoIntegration.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListSsoIntegration - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListSsoIntegration**](ListSsoIntegration.md#ListSsoIntegration) | **Get** /v3/sso/integrations | Get All SSO Integrations - - - -## ListSsoIntegration - -> []SsoIntegration ListSsoIntegration(ctx, optional) - -Get All SSO Integrations - -**This endpoint allows you to retrieve all SSO integrations tied to your Twilio SendGrid account.** The IDs returned by this endpoint can be used by the APIs additional endpoints to modify your SSO integrations. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListSsoIntegrationParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Si** | **bool** | If this parameter is set to `true`, the response will include the `completed_integration` field. - -### Return type - -[**[]SsoIntegration**](SsoIntegration.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/sso/docs/ListSsoIntegrationCertificate.md b/rest/api/v3/sso/docs/ListSsoIntegrationCertificate.md deleted file mode 100644 index 526ad85d..00000000 --- a/rest/api/v3/sso/docs/ListSsoIntegrationCertificate.md +++ /dev/null @@ -1,51 +0,0 @@ -# ListSsoIntegrationCertificate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListSsoIntegrationCertificate**](ListSsoIntegrationCertificate.md#ListSsoIntegrationCertificate) | **Get** /v3/sso/integrations/{IntegrationId}/certificates | Get All SSO Certificates by Integration - - - -## ListSsoIntegrationCertificate - -> []SsoCertificateBody ListSsoIntegrationCertificate(ctx, IntegrationId) - -Get All SSO Certificates by Integration - -**This endpoint allows you to retrieve all your IdP configurations by configuration ID.** The `integration_id` expected by this endpoint is the `id` returned in the response by the \"Get All SSO Integrations\" endpoint. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**IntegrationId** | **string** | An ID that matches a certificate to a specific IdP integration. - -### Other Parameters - -Other parameters are passed through a pointer to a ListSsoIntegrationCertificateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**[]SsoCertificateBody**](SsoCertificateBody.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/sso/docs/PatchSsoTeammates200.md b/rest/api/v3/sso/docs/PatchSsoTeammates200.md deleted file mode 100644 index b1b277d5..00000000 --- a/rest/api/v3/sso/docs/PatchSsoTeammates200.md +++ /dev/null @@ -1,29 +0,0 @@ -# PatchSsoTeammates200 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Address** | **string** | The Teammate's street address. |[optional] -**Address2** | **string** | The Teammate's apartment number, suite number, or other secondary address information that is not part of the physical street address. |[optional] -**City** | **string** | The Teammate's city. |[optional] -**Company** | **string** | The Teammate's company name. |[optional] -**Country** | **string** | The Teammate's country of residence. |[optional] -**Username** | **string** | The Teammate's username. This property is set to the Teammate's email address. |[optional] -**Phone** | **string** | The Teammate's phone number. |[optional] -**State** | **string** | The Teammate's state or province. |[optional] -**UserType** | [**UserType**](UserType.md) | A Teammate can be an `admin`, `owner`, or `teammate`. Each role is associated with the scope of the Teammate's permissions. |[optional] -**Website** | **string** | A website associated with the Teammate. |[optional] -**Zip** | **string** | The Teammate's zip code. |[optional] -**FirstName** | **string** | The Teammate's first name. |[optional] -**LastName** | **string** | The Teammate's last name. |[optional] -**Email** | **string** | Teammate's email address. This email address also functions as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. |[optional] -**IsAdmin** | **bool** | Indicates if the Teammate has administrator permissions. When set to `true`, the Teammate is an admin. |[optional] -**IsSso** | **bool** | Indicates how the Teammate authenticates with SendGrid. When set to `true`, the Teammate will access SendGrid via SSO and their IdP. When set to `false`, the Teammate will authenticate directly with SendGrid via a username and password. |[optional] -**Scopes** | **[]string** | The permissions or scopes currently assigned to the Teammate. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. |[optional] -**HasRestrictedSubuserAccess** | **bool** | When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. |[optional] -**SubuserAccess** | [**[]SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner**](SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md) | Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/PostPatchIntegrationRequest.md b/rest/api/v3/sso/docs/PostPatchIntegrationRequest.md deleted file mode 100644 index 813db37b..00000000 --- a/rest/api/v3/sso/docs/PostPatchIntegrationRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# PostPatchIntegrationRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of your integration. This name can be anything that makes sense for your organization (eg. Twilio SendGrid) | -**Enabled** | **bool** | Indicates if the integration is enabled. | -**SigninUrl** | **string** | The IdP's SAML POST endpoint. This endpoint should receive requests and initiate an SSO login flow. This is called the \"Embed Link\" in the Twilio SendGrid UI. | -**SignoutUrl** | **string** | This URL is relevant only for an IdP-initiated authentication flow. If a user authenticates from their IdP, this URL will return them to their IdP when logging out. | -**EntityId** | **string** | An identifier provided by your IdP to identify Twilio SendGrid in the SAML interaction. This is called the \"SAML Issuer ID\" in the Twilio SendGrid UI. | -**CompletedIntegration** | **bool** | Indicates if the integration is complete. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/PostSsoTeammates201.md b/rest/api/v3/sso/docs/PostSsoTeammates201.md deleted file mode 100644 index 90d13d83..00000000 --- a/rest/api/v3/sso/docs/PostSsoTeammates201.md +++ /dev/null @@ -1,18 +0,0 @@ -# PostSsoTeammates201 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FirstName** | **string** | The Teammate's first name. |[optional] -**LastName** | **string** | The Teammate's last name. |[optional] -**Email** | **string** | Teammate's email address. This email address also functions as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. |[optional] -**IsAdmin** | **bool** | Indicates if the Teammate has administrator permissions. When set to `true`, the Teammate is an admin. |[optional] -**IsSso** | **bool** | Indicates how the Teammate authenticates with SendGrid. When set to `true`, the Teammate will access SendGrid via SSO and their IdP. When set to `false`, the Teammate will authenticate directly with SendGrid via a username and password. |[optional] -**Scopes** | **[]string** | The permissions or scopes currently assigned to the Teammate. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. |[optional] -**HasRestrictedSubuserAccess** | **bool** | When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. |[optional] -**SubuserAccess** | [**[]SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner**](SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md) | Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/PostSsoTeammatesRequest.md b/rest/api/v3/sso/docs/PostSsoTeammatesRequest.md deleted file mode 100644 index ef110ee3..00000000 --- a/rest/api/v3/sso/docs/PostSsoTeammatesRequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# PostSsoTeammatesRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | **string** | Set this property to the Teammate's email address. This email address will also function as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. | -**FirstName** | **string** | Set this property to the Teammate's first name. | -**LastName** | **string** | Set this property to the Teammate's last name. | -**IsAdmin** | **bool** | Set this property to `true` if the Teammate has admin permissions. You should not include the `scopes` or `persona` properties when setting the `is_admin` property to `true`—an admin will be allocated all scopes. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of scopes. |[optional] -**Persona** | [**Persona**](Persona.md) | A persona represents a group of permissions often required by a type of Teammate such as a developer or marketer. Assigning a persona allows you to allocate a group of pre-defined permissions rather than assigning each scope individually. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of the scopes assigned to each persona. |[optional] -**Scopes** | **[]string** | Add or remove permissions from a Teammate using this `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this propety in the request when using the `persona` property or when setting the `is_admin` property to `true`—assigning a `persona` or setting `is_admin` to `true` will allocate a group of permissions to the Teammate. |[optional] -**HasRestrictedSubuserAccess** | **bool** | Set this property to `true` to give the Teammate permissions to operate only on behalf of a Subuser. This property value must be `true` if the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. If this property is set to `true`, you cannot specify individual `scopes`, assign a `persona`, or set `is_admin` to `true`—a Teammate cannot specify scopes for the parent account and have restricted Subuser access. |[optional] -**SubuserAccess** | [**[]SsoTeammatesBaseRequestPropsSubuserAccessInner**](SsoTeammatesBaseRequestPropsSubuserAccessInner.md) | Specify which Subusers the Teammate may access and act on behalf of with this property. If this property is populated, you must set the `has_restricted_subuser_access` property to `true`. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/SsoCertificateBody.md b/rest/api/v3/sso/docs/SsoCertificateBody.md deleted file mode 100644 index 68cb6289..00000000 --- a/rest/api/v3/sso/docs/SsoCertificateBody.md +++ /dev/null @@ -1,15 +0,0 @@ -# SsoCertificateBody - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**PublicCertificate** | **string** | This certificate is used by Twilio SendGrid to verify that SAML requests are coming from Okta. This is called the X509 certificate in the Twilio SendGrid UI. |[optional] -**Id** | **float32** | A unique ID assigned to the certificate by SendGrid. |[optional] -**NotBefore** | **float32** | A unix timestamp (e.g., 1603915954) that indicates the time before which the certificate is not valid. |[optional] -**NotAfter** | **float32** | A unix timestamp (e.g., 1603915954) that indicates the time after which the certificate is no longer valid. |[optional] -**IntergrationId** | **string** | An ID that matches a certificate to a specific IdP integration. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/SsoIntegration.md b/rest/api/v3/sso/docs/SsoIntegration.md deleted file mode 100644 index aa5f45f8..00000000 --- a/rest/api/v3/sso/docs/SsoIntegration.md +++ /dev/null @@ -1,20 +0,0 @@ -# SsoIntegration - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of your integration. This name can be anything that makes sense for your organization (eg. Twilio SendGrid) | -**Enabled** | **bool** | Indicates if the integration is enabled. | -**SigninUrl** | **string** | The IdP's SAML POST endpoint. This endpoint should receive requests and initiate an SSO login flow. This is called the \"Embed Link\" in the Twilio SendGrid UI. | -**SignoutUrl** | **string** | This URL is relevant only for an IdP-initiated authentication flow. If a user authenticates from their IdP, this URL will return them to their IdP when logging out. | -**EntityId** | **string** | An identifier provided by your IdP to identify Twilio SendGrid in the SAML interaction. This is called the \"SAML Issuer ID\" in the Twilio SendGrid UI. | -**CompletedIntegration** | **bool** | Indicates if the integration is complete. |[optional] -**LastUpdated** | **float32** | A timestamp representing the last time the configuration was modified. | -**Id** | **string** | A unique ID assigned to the configuration by SendGrid. |[optional] -**SingleSignonUrl** | **string** | The URL where your IdP should POST its SAML response. This is the Twilio SendGrid URL that is responsible for receiving and parsing a SAML assertion. This is the same URL as the Audience URL when using SendGrid. |[optional] -**AudienceUrl** | **string** | The URL where your IdP should POST its SAML response. This is the Twilio SendGrid URL that is responsible for receiving and parsing a SAML assertion. This is the same URL as the Single Sign-On URL when using SendGrid. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/SsoTeammatesBaseRequestProps.md b/rest/api/v3/sso/docs/SsoTeammatesBaseRequestProps.md deleted file mode 100644 index fcededd9..00000000 --- a/rest/api/v3/sso/docs/SsoTeammatesBaseRequestProps.md +++ /dev/null @@ -1,17 +0,0 @@ -# SsoTeammatesBaseRequestProps - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FirstName** | **string** | Set this property to the Teammate's first name. | -**LastName** | **string** | Set this property to the Teammate's last name. | -**IsAdmin** | **bool** | Set this property to `true` if the Teammate has admin permissions. You should not include the `scopes` or `persona` properties when setting the `is_admin` property to `true`—an admin will be allocated all scopes. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of scopes. |[optional] -**Persona** | [**Persona**](Persona.md) | A persona represents a group of permissions often required by a type of Teammate such as a developer or marketer. Assigning a persona allows you to allocate a group of pre-defined permissions rather than assigning each scope individually. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of the scopes assigned to each persona. |[optional] -**Scopes** | **[]string** | Add or remove permissions from a Teammate using this `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this propety in the request when using the `persona` property or when setting the `is_admin` property to `true`—assigning a `persona` or setting `is_admin` to `true` will allocate a group of permissions to the Teammate. |[optional] -**HasRestrictedSubuserAccess** | **bool** | Set this property to `true` to give the Teammate permissions to operate only on behalf of a Subuser. This property value must be `true` if the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. If this property is set to `true`, you cannot specify individual `scopes`, assign a `persona`, or set `is_admin` to `true`—a Teammate cannot specify scopes for the parent account and have restricted Subuser access. |[optional] -**SubuserAccess** | [**[]SsoTeammatesBaseRequestPropsSubuserAccessInner**](SsoTeammatesBaseRequestPropsSubuserAccessInner.md) | Specify which Subusers the Teammate may access and act on behalf of with this property. If this property is populated, you must set the `has_restricted_subuser_access` property to `true`. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/SsoTeammatesBaseRequestPropsSubuserAccessInner.md b/rest/api/v3/sso/docs/SsoTeammatesBaseRequestPropsSubuserAccessInner.md deleted file mode 100644 index 80c452b4..00000000 --- a/rest/api/v3/sso/docs/SsoTeammatesBaseRequestPropsSubuserAccessInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# SsoTeammatesBaseRequestPropsSubuserAccessInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int32** | Set this property to the ID of a Subuser to which the Teammate should have access. You can retrieve Subuser IDs from the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/). | -**PermissionType** | [**PermissionType**](PermissionType.md) | Grant the level of access the Teammate should have to the specified Subuser with this property. This property value may be either `admin` or `restricted`. When set to `restricted`, the Teammate has only the permissions assigned in the `scopes` property. | -**Scopes** | **[]string** | Add or remove permissions that the Teammate can access on behalf of the Subuser. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this property in the request when the `permission_type` property is set to `admin`—administrators have full access to the specified Subuser. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/SsoTeammatesBaseResponseProps.md b/rest/api/v3/sso/docs/SsoTeammatesBaseResponseProps.md deleted file mode 100644 index a2de9c35..00000000 --- a/rest/api/v3/sso/docs/SsoTeammatesBaseResponseProps.md +++ /dev/null @@ -1,16 +0,0 @@ -# SsoTeammatesBaseResponseProps - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FirstName** | **string** | The Teammate's first name. |[optional] -**LastName** | **string** | The Teammate's last name. |[optional] -**Email** | **string** | Teammate's email address. This email address also functions as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. |[optional] -**IsAdmin** | **bool** | Indicates if the Teammate has administrator permissions. When set to `true`, the Teammate is an admin. |[optional] -**IsSso** | **bool** | Indicates how the Teammate authenticates with SendGrid. When set to `true`, the Teammate will access SendGrid via SSO and their IdP. When set to `false`, the Teammate will authenticate directly with SendGrid via a username and password. |[optional] -**Scopes** | **[]string** | The permissions or scopes currently assigned to the Teammate. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponseProps.md b/rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponseProps.md deleted file mode 100644 index a22ffc8f..00000000 --- a/rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponseProps.md +++ /dev/null @@ -1,12 +0,0 @@ -# SsoTeammatesRestrictedSubuserResponseProps - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**HasRestrictedSubuserAccess** | **bool** | When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. |[optional] -**SubuserAccess** | [**[]SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner**](SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md) | Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md b/rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md deleted file mode 100644 index c7c93940..00000000 --- a/rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md +++ /dev/null @@ -1,16 +0,0 @@ -# SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int32** | The ID of a Subuser to which the Teammate has access. You can retrieve Subuser IDs from the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/). |[optional] -**Username** | **string** | The username of a Subuser to which the Teammate has access. |[optional] -**Email** | **string** | The email address of a Subuser to which the Teammate has access. |[optional] -**Disabled** | **bool** | Indicates if the Subuser is active for the SendGrid account. |[optional] -**PermissionType** | [**PermissionType1**](PermissionType1.md) | The level of access the Teammate has to the specified Subuser. This property value may be either `admin` or `restricted`. When is property is set to `restricted`, the Teammate has only the permissions assigned in the `scopes` property. |[optional] -**Scopes** | **[]string** | The permissions or scopes that the Teammate can access on behalf of the Subuser. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/UpdateSsoCertificateRequest.md b/rest/api/v3/sso/docs/UpdateSsoCertificateRequest.md deleted file mode 100644 index 6155b47c..00000000 --- a/rest/api/v3/sso/docs/UpdateSsoCertificateRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# UpdateSsoCertificateRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**PublicCertificate** | **string** | This public certificate allows SendGrid to verify that SAML requests it receives are signed by an IdP that it recognizes. |[optional] -**Enabled** | **bool** | Indicates whether or not the certificate is enabled. |[optional] -**IntegrationId** | **string** | An ID that matches a certificate to a specific IdP integration. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/UpdateSsoIntegration.md b/rest/api/v3/sso/docs/UpdateSsoIntegration.md deleted file mode 100644 index c6e31fe7..00000000 --- a/rest/api/v3/sso/docs/UpdateSsoIntegration.md +++ /dev/null @@ -1,53 +0,0 @@ -# UpdateSsoIntegration - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateSsoIntegration**](UpdateSsoIntegration.md#UpdateSsoIntegration) | **Patch** /v3/sso/integrations/{Id} | Update an SSO Integration - - - -## UpdateSsoIntegration - -> SsoIntegration UpdateSsoIntegration(ctx, Idoptional) - -Update an SSO Integration - -**This endpoint allows you to modify an exisiting SSO integration.** You can retrieve the IDs for your configurations from the response provided by the \"Get All SSO Integrations\" endpoint. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateSsoIntegrationParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Si** | **bool** | If this parameter is set to `true`, the response will include the `completed_integration` field. -**PostPatchIntegrationRequest** | [**PostPatchIntegrationRequest**](PostPatchIntegrationRequest.md) | - -### Return type - -[**SsoIntegration**](SsoIntegration.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/sso/docs/UpdateSsoTeammate.md b/rest/api/v3/sso/docs/UpdateSsoTeammate.md deleted file mode 100644 index cc802214..00000000 --- a/rest/api/v3/sso/docs/UpdateSsoTeammate.md +++ /dev/null @@ -1,52 +0,0 @@ -# UpdateSsoTeammate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateSsoTeammate**](UpdateSsoTeammate.md#UpdateSsoTeammate) | **Patch** /v3/sso/teammates/{Username} | Edit an SSO Teammate - - - -## UpdateSsoTeammate - -> PatchSsoTeammates200 UpdateSsoTeammate(ctx, Usernameoptional) - -Edit an SSO Teammate - -**This endpoint allows you to modify an existing SSO Teammate.** Only the parent user and Teammates with admin permissions can update another Teammate's permissions. ### Scopes When updating a Teammate, you will assign it permissions or scopes. These scopes determine which actions the Teammate can perform and which features they can access. Scopes are provided with one of three properties passed to this endpoint: `is_admin`, `scopes`, and `persona`. You can make a Teammate an administrator by setting `is_admin` to `true`. Administrators will have all scopes assigned to them. Alternatively, you can assign a `persona` to the teammate, which will assign them a block of permissions commonly required for that type of user. See the \"Persona scopes\" section of [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions#persona-scopes) for a list of permsissions granted by persona. Lastly, you can assign individual permissions with the `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of scopes that can be assigned to a Teammate. ### Subuser access SendGrid Teammates may be assigned access to one or more Subusers. Subusers function like SendGrid sub-accounts with their own resources. See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. When assigning Subuser access to a Teammate, you may set the `has_restricted_subuser_access` property to `true` to constrain the Teammate so that they can operate only on behalf of the Subusers to which they are assigned. You may further set the level of access the Teammate has to each Subuser with the `subuser_access` property. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Username** | **string** | Set this parameter to the Teammate's email address. This address must be the same address assigned to the Teammate in your IdP. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateSsoTeammateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Body** | **SsoTeammatesBaseRequestProps** | - -### Return type - -[**PatchSsoTeammates200**](PatchSsoTeammates200.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/sso/model_create_sso_certificate_request.go b/rest/api/v3/sso/model_create_sso_certificate_request.go deleted file mode 100644 index da1fc7ba..00000000 --- a/rest/api/v3/sso/model_create_sso_certificate_request.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateSsoCertificateRequest -type CreateSsoCertificateRequest struct { - // This public certificate allows SendGrid to verify that SAML requests it receives are signed by an IdP that it recognizes. - PublicCertificate string `json:"public_certificate"` - // Indicates if the certificate is enabled. - Enabled *bool `json:"enabled,omitempty"` - // An ID that matches a certificate to a specific IdP integration. This is the `id` returned by the \"Get All SSO Integrations\" endpoint. - IntegrationId string `json:"integration_id"` -} diff --git a/rest/api/v3/sso/model_patch_sso_teammates200.go b/rest/api/v3/sso/model_patch_sso_teammates200.go deleted file mode 100644 index 0031305b..00000000 --- a/rest/api/v3/sso/model_patch_sso_teammates200.go +++ /dev/null @@ -1,56 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// PatchSsoTeammates200 Successful SSO Teammates PATCH response. -type PatchSsoTeammates200 struct { - // The Teammate's street address. - Address *string `json:"address,omitempty"` - // The Teammate's apartment number, suite number, or other secondary address information that is not part of the physical street address. - Address2 *string `json:"address2,omitempty"` - // The Teammate's city. - City *string `json:"city,omitempty"` - // The Teammate's company name. - Company *string `json:"company,omitempty"` - // The Teammate's country of residence. - Country *string `json:"country,omitempty"` - // The Teammate's username. This property is set to the Teammate's email address. - Username *string `json:"username,omitempty"` - // The Teammate's phone number. - Phone *string `json:"phone,omitempty"` - // The Teammate's state or province. - State *string `json:"state,omitempty"` - // A Teammate can be an `admin`, `owner`, or `teammate`. Each role is associated with the scope of the Teammate's permissions. - UserType *UserType `json:"user_type,omitempty"` - // A website associated with the Teammate. - Website *string `json:"website,omitempty"` - // The Teammate's zip code. - Zip *string `json:"zip,omitempty"` - // The Teammate's first name. - FirstName *string `json:"first_name,omitempty"` - // The Teammate's last name. - LastName *string `json:"last_name,omitempty"` - // Teammate's email address. This email address also functions as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. - Email *string `json:"email,omitempty"` - // Indicates if the Teammate has administrator permissions. When set to `true`, the Teammate is an admin. - IsAdmin *bool `json:"is_admin,omitempty"` - // Indicates how the Teammate authenticates with SendGrid. When set to `true`, the Teammate will access SendGrid via SSO and their IdP. When set to `false`, the Teammate will authenticate directly with SendGrid via a username and password. - IsSso *bool `json:"is_sso,omitempty"` - // The permissions or scopes currently assigned to the Teammate. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. - Scopes *[]string `json:"scopes,omitempty"` - // When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. - HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"` - // Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. - SubuserAccess *[]SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner `json:"subuser_access,omitempty"` -} diff --git a/rest/api/v3/sso/model_permission_type.go b/rest/api/v3/sso/model_permission_type.go deleted file mode 100644 index c496f95f..00000000 --- a/rest/api/v3/sso/model_permission_type.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// PermissionType the model 'PermissionType' -type PermissionType string - -// List of PermissionType -const ( - PERMISSIONTYPE_ADMIN PermissionType = "admin" - PERMISSIONTYPE_RESTRICTED PermissionType = "restricted" -) diff --git a/rest/api/v3/sso/model_permission_type1.go b/rest/api/v3/sso/model_permission_type1.go deleted file mode 100644 index 03271a27..00000000 --- a/rest/api/v3/sso/model_permission_type1.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// PermissionType1 the model 'PermissionType1' -type PermissionType1 string - -// List of PermissionType1 -const ( - PERMISSIONTYPE1_ADMIN PermissionType1 = "admin" - PERMISSIONTYPE1_RESTRICTED PermissionType1 = "restricted" -) diff --git a/rest/api/v3/sso/model_persona.go b/rest/api/v3/sso/model_persona.go deleted file mode 100644 index bbd9d832..00000000 --- a/rest/api/v3/sso/model_persona.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Persona the model 'Persona' -type Persona string - -// List of Persona -const ( - PERSONA_ACCOUNTANT Persona = "accountant" - PERSONA_DEVELOPER Persona = "developer" - PERSONA_MARKETER Persona = "marketer" - PERSONA_OBSERVER Persona = "observer" -) diff --git a/rest/api/v3/sso/model_post_patch_integration_request.go b/rest/api/v3/sso/model_post_patch_integration_request.go deleted file mode 100644 index 6cdedd95..00000000 --- a/rest/api/v3/sso/model_post_patch_integration_request.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// PostPatchIntegrationRequest struct for PostPatchIntegrationRequest -type PostPatchIntegrationRequest struct { - // The name of your integration. This name can be anything that makes sense for your organization (eg. Twilio SendGrid) - Name string `json:"name"` - // Indicates if the integration is enabled. - Enabled bool `json:"enabled"` - // The IdP's SAML POST endpoint. This endpoint should receive requests and initiate an SSO login flow. This is called the \"Embed Link\" in the Twilio SendGrid UI. - SigninUrl string `json:"signin_url"` - // This URL is relevant only for an IdP-initiated authentication flow. If a user authenticates from their IdP, this URL will return them to their IdP when logging out. - SignoutUrl string `json:"signout_url"` - // An identifier provided by your IdP to identify Twilio SendGrid in the SAML interaction. This is called the \"SAML Issuer ID\" in the Twilio SendGrid UI. - EntityId string `json:"entity_id"` - // Indicates if the integration is complete. - CompletedIntegration *bool `json:"completed_integration,omitempty"` -} diff --git a/rest/api/v3/sso/model_post_sso_teammates201.go b/rest/api/v3/sso/model_post_sso_teammates201.go deleted file mode 100644 index 5863ff95..00000000 --- a/rest/api/v3/sso/model_post_sso_teammates201.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// PostSsoTeammates201 Successful SSO Teammates POST Response. -type PostSsoTeammates201 struct { - // The Teammate's first name. - FirstName *string `json:"first_name,omitempty"` - // The Teammate's last name. - LastName *string `json:"last_name,omitempty"` - // Teammate's email address. This email address also functions as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. - Email *string `json:"email,omitempty"` - // Indicates if the Teammate has administrator permissions. When set to `true`, the Teammate is an admin. - IsAdmin *bool `json:"is_admin,omitempty"` - // Indicates how the Teammate authenticates with SendGrid. When set to `true`, the Teammate will access SendGrid via SSO and their IdP. When set to `false`, the Teammate will authenticate directly with SendGrid via a username and password. - IsSso *bool `json:"is_sso,omitempty"` - // The permissions or scopes currently assigned to the Teammate. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. - Scopes *[]string `json:"scopes,omitempty"` - // When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. - HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"` - // Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. - SubuserAccess *[]SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner `json:"subuser_access,omitempty"` -} diff --git a/rest/api/v3/sso/model_post_sso_teammates_request.go b/rest/api/v3/sso/model_post_sso_teammates_request.go deleted file mode 100644 index 5f4e5543..00000000 --- a/rest/api/v3/sso/model_post_sso_teammates_request.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// PostSsoTeammatesRequest struct for PostSsoTeammatesRequest -type PostSsoTeammatesRequest struct { - // Set this property to the Teammate's email address. This email address will also function as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. - Email string `json:"email"` - // Set this property to the Teammate's first name. - FirstName string `json:"first_name"` - // Set this property to the Teammate's last name. - LastName string `json:"last_name"` - // Set this property to `true` if the Teammate has admin permissions. You should not include the `scopes` or `persona` properties when setting the `is_admin` property to `true`—an admin will be allocated all scopes. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of scopes. - IsAdmin *bool `json:"is_admin,omitempty"` - // A persona represents a group of permissions often required by a type of Teammate such as a developer or marketer. Assigning a persona allows you to allocate a group of pre-defined permissions rather than assigning each scope individually. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of the scopes assigned to each persona. - Persona *Persona `json:"persona,omitempty"` - // Add or remove permissions from a Teammate using this `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this propety in the request when using the `persona` property or when setting the `is_admin` property to `true`—assigning a `persona` or setting `is_admin` to `true` will allocate a group of permissions to the Teammate. - Scopes *[]string `json:"scopes,omitempty"` - // Set this property to `true` to give the Teammate permissions to operate only on behalf of a Subuser. This property value must be `true` if the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. If this property is set to `true`, you cannot specify individual `scopes`, assign a `persona`, or set `is_admin` to `true`—a Teammate cannot specify scopes for the parent account and have restricted Subuser access. - HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"` - // Specify which Subusers the Teammate may access and act on behalf of with this property. If this property is populated, you must set the `has_restricted_subuser_access` property to `true`. - SubuserAccess *[]SsoTeammatesBaseRequestPropsSubuserAccessInner `json:"subuser_access,omitempty"` -} diff --git a/rest/api/v3/sso/model_sso_certificate_body.go b/rest/api/v3/sso/model_sso_certificate_body.go deleted file mode 100644 index 1a001b81..00000000 --- a/rest/api/v3/sso/model_sso_certificate_body.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SsoCertificateBody struct for SsoCertificateBody -type SsoCertificateBody struct { - // This certificate is used by Twilio SendGrid to verify that SAML requests are coming from Okta. This is called the X509 certificate in the Twilio SendGrid UI. - PublicCertificate *string `json:"public_certificate,omitempty"` - // A unique ID assigned to the certificate by SendGrid. - Id *float32 `json:"id,omitempty"` - // A unix timestamp (e.g., 1603915954) that indicates the time before which the certificate is not valid. - NotBefore *float32 `json:"not_before,omitempty"` - // A unix timestamp (e.g., 1603915954) that indicates the time after which the certificate is no longer valid. - NotAfter *float32 `json:"not_after,omitempty"` - // An ID that matches a certificate to a specific IdP integration. - IntergrationId *string `json:"intergration_id,omitempty"` -} diff --git a/rest/api/v3/sso/model_sso_error_response_inner.go b/rest/api/v3/sso/model_sso_error_response_inner.go deleted file mode 100644 index 17711b3d..00000000 --- a/rest/api/v3/sso/model_sso_error_response_inner.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SsoErrorResponseInner struct for SsoErrorResponseInner -type SsoErrorResponseInner struct { - Message *string `json:"message,omitempty"` - Field *string `json:"field,omitempty"` - ErrorId *string `json:"error_id,omitempty"` -} diff --git a/rest/api/v3/sso/model_sso_integration.go b/rest/api/v3/sso/model_sso_integration.go deleted file mode 100644 index 888e08da..00000000 --- a/rest/api/v3/sso/model_sso_integration.go +++ /dev/null @@ -1,38 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SsoIntegration struct for SsoIntegration -type SsoIntegration struct { - // The name of your integration. This name can be anything that makes sense for your organization (eg. Twilio SendGrid) - Name string `json:"name"` - // Indicates if the integration is enabled. - Enabled bool `json:"enabled"` - // The IdP's SAML POST endpoint. This endpoint should receive requests and initiate an SSO login flow. This is called the \"Embed Link\" in the Twilio SendGrid UI. - SigninUrl string `json:"signin_url"` - // This URL is relevant only for an IdP-initiated authentication flow. If a user authenticates from their IdP, this URL will return them to their IdP when logging out. - SignoutUrl string `json:"signout_url"` - // An identifier provided by your IdP to identify Twilio SendGrid in the SAML interaction. This is called the \"SAML Issuer ID\" in the Twilio SendGrid UI. - EntityId string `json:"entity_id"` - // Indicates if the integration is complete. - CompletedIntegration *bool `json:"completed_integration,omitempty"` - // A timestamp representing the last time the configuration was modified. - LastUpdated float32 `json:"last_updated"` - // A unique ID assigned to the configuration by SendGrid. - Id *string `json:"id,omitempty"` - // The URL where your IdP should POST its SAML response. This is the Twilio SendGrid URL that is responsible for receiving and parsing a SAML assertion. This is the same URL as the Audience URL when using SendGrid. - SingleSignonUrl *string `json:"single_signon_url,omitempty"` - // The URL where your IdP should POST its SAML response. This is the Twilio SendGrid URL that is responsible for receiving and parsing a SAML assertion. This is the same URL as the Single Sign-On URL when using SendGrid. - AudienceUrl *string `json:"audience_url,omitempty"` -} diff --git a/rest/api/v3/sso/model_sso_teammates_base_request_props.go b/rest/api/v3/sso/model_sso_teammates_base_request_props.go deleted file mode 100644 index 8fd3ef6d..00000000 --- a/rest/api/v3/sso/model_sso_teammates_base_request_props.go +++ /dev/null @@ -1,32 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SsoTeammatesBaseRequestProps struct for SsoTeammatesBaseRequestProps -type SsoTeammatesBaseRequestProps struct { - // Set this property to the Teammate's first name. - FirstName string `json:"first_name"` - // Set this property to the Teammate's last name. - LastName string `json:"last_name"` - // Set this property to `true` if the Teammate has admin permissions. You should not include the `scopes` or `persona` properties when setting the `is_admin` property to `true`—an admin will be allocated all scopes. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of scopes. - IsAdmin *bool `json:"is_admin,omitempty"` - // A persona represents a group of permissions often required by a type of Teammate such as a developer or marketer. Assigning a persona allows you to allocate a group of pre-defined permissions rather than assigning each scope individually. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of the scopes assigned to each persona. - Persona *Persona `json:"persona,omitempty"` - // Add or remove permissions from a Teammate using this `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this propety in the request when using the `persona` property or when setting the `is_admin` property to `true`—assigning a `persona` or setting `is_admin` to `true` will allocate a group of permissions to the Teammate. - Scopes *[]string `json:"scopes,omitempty"` - // Set this property to `true` to give the Teammate permissions to operate only on behalf of a Subuser. This property value must be `true` if the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. If this property is set to `true`, you cannot specify individual `scopes`, assign a `persona`, or set `is_admin` to `true`—a Teammate cannot specify scopes for the parent account and have restricted Subuser access. - HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"` - // Specify which Subusers the Teammate may access and act on behalf of with this property. If this property is populated, you must set the `has_restricted_subuser_access` property to `true`. - SubuserAccess *[]SsoTeammatesBaseRequestPropsSubuserAccessInner `json:"subuser_access,omitempty"` -} diff --git a/rest/api/v3/sso/model_sso_teammates_base_request_props_subuser_access_inner.go b/rest/api/v3/sso/model_sso_teammates_base_request_props_subuser_access_inner.go deleted file mode 100644 index 6a9499bd..00000000 --- a/rest/api/v3/sso/model_sso_teammates_base_request_props_subuser_access_inner.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SsoTeammatesBaseRequestPropsSubuserAccessInner An array of Subusers to which the Teammate should have access. -type SsoTeammatesBaseRequestPropsSubuserAccessInner struct { - // Set this property to the ID of a Subuser to which the Teammate should have access. You can retrieve Subuser IDs from the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/). - Id int32 `json:"id"` - // Grant the level of access the Teammate should have to the specified Subuser with this property. This property value may be either `admin` or `restricted`. When set to `restricted`, the Teammate has only the permissions assigned in the `scopes` property. - PermissionType PermissionType `json:"permission_type"` - // Add or remove permissions that the Teammate can access on behalf of the Subuser. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this property in the request when the `permission_type` property is set to `admin`—administrators have full access to the specified Subuser. - Scopes *[]string `json:"scopes,omitempty"` -} diff --git a/rest/api/v3/sso/model_sso_teammates_base_response_props.go b/rest/api/v3/sso/model_sso_teammates_base_response_props.go deleted file mode 100644 index ca10b302..00000000 --- a/rest/api/v3/sso/model_sso_teammates_base_response_props.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SsoTeammatesBaseResponseProps struct for SsoTeammatesBaseResponseProps -type SsoTeammatesBaseResponseProps struct { - // The Teammate's first name. - FirstName *string `json:"first_name,omitempty"` - // The Teammate's last name. - LastName *string `json:"last_name,omitempty"` - // Teammate's email address. This email address also functions as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. - Email *string `json:"email,omitempty"` - // Indicates if the Teammate has administrator permissions. When set to `true`, the Teammate is an admin. - IsAdmin *bool `json:"is_admin,omitempty"` - // Indicates how the Teammate authenticates with SendGrid. When set to `true`, the Teammate will access SendGrid via SSO and their IdP. When set to `false`, the Teammate will authenticate directly with SendGrid via a username and password. - IsSso *bool `json:"is_sso,omitempty"` - // The permissions or scopes currently assigned to the Teammate. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. - Scopes *[]string `json:"scopes,omitempty"` -} diff --git a/rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props.go b/rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props.go deleted file mode 100644 index 4570072d..00000000 --- a/rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SsoTeammatesRestrictedSubuserResponseProps struct for SsoTeammatesRestrictedSubuserResponseProps -type SsoTeammatesRestrictedSubuserResponseProps struct { - // When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. - HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"` - // Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. - SubuserAccess *[]SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner `json:"subuser_access,omitempty"` -} diff --git a/rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props_subuser_access_inner.go b/rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props_subuser_access_inner.go deleted file mode 100644 index 9d151365..00000000 --- a/rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props_subuser_access_inner.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner An array of Subusers to which the Teammate has access. -type SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner struct { - // The ID of a Subuser to which the Teammate has access. You can retrieve Subuser IDs from the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/). - Id *int32 `json:"id,omitempty"` - // The username of a Subuser to which the Teammate has access. - Username *string `json:"username,omitempty"` - // The email address of a Subuser to which the Teammate has access. - Email *string `json:"email,omitempty"` - // Indicates if the Subuser is active for the SendGrid account. - Disabled *bool `json:"disabled,omitempty"` - // The level of access the Teammate has to the specified Subuser. This property value may be either `admin` or `restricted`. When is property is set to `restricted`, the Teammate has only the permissions assigned in the `scopes` property. - PermissionType *PermissionType1 `json:"permission_type,omitempty"` - // The permissions or scopes that the Teammate can access on behalf of the Subuser. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. - Scopes *[]string `json:"scopes,omitempty"` -} diff --git a/rest/api/v3/sso/model_update_sso_certificate_request.go b/rest/api/v3/sso/model_update_sso_certificate_request.go deleted file mode 100644 index fd83330d..00000000 --- a/rest/api/v3/sso/model_update_sso_certificate_request.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateSsoCertificateRequest struct for UpdateSsoCertificateRequest -type UpdateSsoCertificateRequest struct { - // This public certificate allows SendGrid to verify that SAML requests it receives are signed by an IdP that it recognizes. - PublicCertificate *string `json:"public_certificate,omitempty"` - // Indicates whether or not the certificate is enabled. - Enabled *bool `json:"enabled,omitempty"` - // An ID that matches a certificate to a specific IdP integration. - IntegrationId *string `json:"integration_id,omitempty"` -} diff --git a/rest/api/v3/sso/model_user_type.go b/rest/api/v3/sso/model_user_type.go deleted file mode 100644 index 3042c84a..00000000 --- a/rest/api/v3/sso/model_user_type.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UserType the model 'UserType' -type UserType string - -// List of UserType -const ( - USERTYPE_ADMIN UserType = "admin" - USERTYPE_OWNER UserType = "owner" - USERTYPE_TEAMMATE UserType = "teammate" -) diff --git a/rest/api/v3/stats/.openapi-generator b/rest/api/v3/stats/.openapi-generator deleted file mode 100644 index 4e237e34..00000000 --- a/rest/api/v3/stats/.openapi-generator +++ /dev/null @@ -1,80 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_get_client_stat.go -api_list_browser_stat.go -api_list_category.go -api_list_category_stat.go -api_list_category_stat_sum.go -api_list_client_stat.go -api_list_device_stat.go -api_list_geo_stat.go -api_list_mailbox_provider_stat.go -api_list_stat.go -api_service.go -docs/AdvancedStatsClicks.md -docs/AdvancedStatsClicksOpens.md -docs/AdvancedStatsMailboxProvider.md -docs/AdvancedStatsOpens.md -docs/AggregatedBy.md -docs/AggregatedBy1.md -docs/AggregatedBy2.md -docs/AggregatedBy3.md -docs/CategoryStats.md -docs/CategoryStatsStatsInner.md -docs/CategoryStatsStatsInnerMetrics.md -docs/ClientType.md -docs/Country.md -docs/GetClientStat.md -docs/ListBrowserStat.md -docs/ListBrowserStat200ResponseInner.md -docs/ListBrowserStat200ResponseInnerStatsInner.md -docs/ListCategory.md -docs/ListCategory200ResponseInner.md -docs/ListCategory400Response.md -docs/ListCategory400ResponseErrorsInner.md -docs/ListCategoryStat.md -docs/ListCategoryStatSum.md -docs/ListClientStat.md -docs/ListClientStat200ResponseInner.md -docs/ListClientStat200ResponseInnerStatsInner.md -docs/ListDeviceStat.md -docs/ListGeoStat.md -docs/ListGeoStat200ResponseInner.md -docs/ListGeoStat200ResponseInnerStatsInner.md -docs/ListMailboxProviderStat.md -docs/ListMailboxProviderStat200ResponseInner.md -docs/ListMailboxProviderStat200ResponseInnerStatsInner.md -docs/ListStat.md -docs/ListStat200ResponseInner.md -docs/ListStat200ResponseInnerStatsInner.md -docs/SortByDirection.md -docs/StatsAdvancedGlobalStats.md -model_advanced_stats_clicks.go -model_advanced_stats_clicks_opens.go -model_advanced_stats_mailbox_provider.go -model_advanced_stats_opens.go -model_aggregated_by.go -model_aggregated_by1.go -model_aggregated_by2.go -model_aggregated_by3.go -model_category_stats.go -model_category_stats_stats_inner.go -model_category_stats_stats_inner_metrics.go -model_client_type.go -model_country.go -model_list_browser_stat_200_response_inner.go -model_list_browser_stat_200_response_inner_stats_inner.go -model_list_category_200_response_inner.go -model_list_category_400_response.go -model_list_category_400_response_errors_inner.go -model_list_client_stat_200_response_inner.go -model_list_client_stat_200_response_inner_stats_inner.go -model_list_geo_stat_200_response_inner.go -model_list_geo_stat_200_response_inner_stats_inner.go -model_list_mailbox_provider_stat_200_response_inner.go -model_list_mailbox_provider_stat_200_response_inner_stats_inner.go -model_list_stat_200_response_inner.go -model_list_stat_200_response_inner_stats_inner.go -model_sort_by_direction.go -model_stats_advanced_global_stats.go diff --git a/rest/api/v3/stats/README.md b/rest/api/v3/stats/README.md deleted file mode 100644 index dd7596bf..00000000 --- a/rest/api/v3/stats/README.md +++ /dev/null @@ -1,104 +0,0 @@ -# Go API client for - -The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. - -Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. - -SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. - -Category statistics are available for the previous thirteen months only. - -See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T13:25:44.471509+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*GetClientStat* | [**GetClientStat**](docs/GetClientStat.md#getclientstat) | **Get** /v3/clients/{ClientType}/stats | Retrieve stats by a specific client type. -*ListBrowserStat* | [**ListBrowserStat**](docs/ListBrowserStat.md#listbrowserstat) | **Get** /v3/browsers/stats | Retrieve email statistics by browser. -*ListCategory* | [**ListCategory**](docs/ListCategory.md#listcategory) | **Get** /v3/categories | Retrieve all categories -*ListCategoryStat* | [**ListCategoryStat**](docs/ListCategoryStat.md#listcategorystat) | **Get** /v3/categories/stats | Retrieve Email Statistics for Categories -*ListCategoryStatSum* | [**ListCategoryStatSum**](docs/ListCategoryStatSum.md#listcategorystatsum) | **Get** /v3/categories/stats/sums | Retrieve sums of email stats for each category. -*ListClientStat* | [**ListClientStat**](docs/ListClientStat.md#listclientstat) | **Get** /v3/clients/stats | Retrieve email statistics by client type. -*ListDeviceStat* | [**ListDeviceStat**](docs/ListDeviceStat.md#listdevicestat) | **Get** /v3/devices/stats | Retrieve email statistics by device type. -*ListGeoStat* | [**ListGeoStat**](docs/ListGeoStat.md#listgeostat) | **Get** /v3/geo/stats | Retrieve email statistics by country and state/province. -*ListMailboxProviderStat* | [**ListMailboxProviderStat**](docs/ListMailboxProviderStat.md#listmailboxproviderstat) | **Get** /v3/mailbox_providers/stats | Retrieve email statistics by mailbox provider. -*ListStat* | [**ListStat**](docs/ListStat.md#liststat) | **Get** /v3/stats | Retrieve global email statistics - - -## Documentation For Models - - - [AdvancedStatsClicks](AdvancedStatsClicks.md) - - [AdvancedStatsClicksOpens](AdvancedStatsClicksOpens.md) - - [AdvancedStatsMailboxProvider](AdvancedStatsMailboxProvider.md) - - [AdvancedStatsOpens](AdvancedStatsOpens.md) - - [AggregatedBy](AggregatedBy.md) - - [AggregatedBy1](AggregatedBy1.md) - - [AggregatedBy2](AggregatedBy2.md) - - [AggregatedBy3](AggregatedBy3.md) - - [CategoryStats](CategoryStats.md) - - [CategoryStatsStatsInner](CategoryStatsStatsInner.md) - - [CategoryStatsStatsInnerMetrics](CategoryStatsStatsInnerMetrics.md) - - [ClientType](ClientType.md) - - [Country](Country.md) - - [ListBrowserStat200ResponseInner](ListBrowserStat200ResponseInner.md) - - [ListBrowserStat200ResponseInnerStatsInner](ListBrowserStat200ResponseInnerStatsInner.md) - - [ListCategory200ResponseInner](ListCategory200ResponseInner.md) - - [ListCategory400Response](ListCategory400Response.md) - - [ListCategory400ResponseErrorsInner](ListCategory400ResponseErrorsInner.md) - - [ListClientStat200ResponseInner](ListClientStat200ResponseInner.md) - - [ListClientStat200ResponseInnerStatsInner](ListClientStat200ResponseInnerStatsInner.md) - - [ListGeoStat200ResponseInner](ListGeoStat200ResponseInner.md) - - [ListGeoStat200ResponseInnerStatsInner](ListGeoStat200ResponseInnerStatsInner.md) - - [ListMailboxProviderStat200ResponseInner](ListMailboxProviderStat200ResponseInner.md) - - [ListMailboxProviderStat200ResponseInnerStatsInner](ListMailboxProviderStat200ResponseInnerStatsInner.md) - - [ListStat200ResponseInner](ListStat200ResponseInner.md) - - [ListStat200ResponseInnerStatsInner](ListStat200ResponseInnerStatsInner.md) - - [SortByDirection](SortByDirection.md) - - [StatsAdvancedGlobalStats](StatsAdvancedGlobalStats.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/stats/api_get_client_stat.go b/rest/api/v3/stats/api_get_client_stat.go deleted file mode 100644 index 8289a1c3..00000000 --- a/rest/api/v3/stats/api_get_client_stat.go +++ /dev/null @@ -1,98 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" - - "strings" -) - -type GetClientStatParam struct { - // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. - StartDate *string `json:"start_date"` - // Specifies the type of client to retrieve stats for. Must be either \"phone\", \"tablet\", \"webmail\", or \"desktop\". - ClientType *ClientType `json:"client_type"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. - EndDate *string `json:"end_date,omitempty"` - // How to group the statistics. Must be either \"day\", \"week\", or \"month\". - AggregatedBy *AggregatedBy2 `json:"aggregated_by,omitempty"` -} - -func (params *GetClientStatParam) SetStartDate(StartDate string) *GetClientStatParam { - params.StartDate = &StartDate - return params -} -func (params *GetClientStatParam) SetClientType(ClientType ClientType) *GetClientStatParam { - params.ClientType = &ClientType - return params -} -func (params *GetClientStatParam) SetOnbehalfof(Onbehalfof string) *GetClientStatParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *GetClientStatParam) SetEndDate(EndDate string) *GetClientStatParam { - params.EndDate = &EndDate - return params -} -func (params *GetClientStatParam) SetAggregatedBy(AggregatedBy AggregatedBy2) *GetClientStatParam { - params.AggregatedBy = &AggregatedBy - return params -} - -// **This endpoint allows you to retrieve your email statistics segmented by a specific client type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. ### Available Client Types - phone - tablet - webmail - desktop Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). -func (c *ApiService) GetClientStat(params *GetClientStatParam) (interface{}, error) { - path := "/v3/clients/{ClientType}/stats" - if params != nil && params.ClientType != nil { - path = strings.Replace(path, "{"+"ClientType"+"}", fmt.Sprint(*params.ClientType), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.StartDate != nil { - data.Set("start_date", *params.StartDate) - } - if params != nil && params.EndDate != nil { - data.Set("end_date", *params.EndDate) - } - if params != nil && params.AggregatedBy != nil { - data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]ListClientStat200ResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/stats/api_list_browser_stat.go b/rest/api/v3/stats/api_list_browser_stat.go deleted file mode 100644 index 3e84d689..00000000 --- a/rest/api/v3/stats/api_list_browser_stat.go +++ /dev/null @@ -1,114 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" -) - -type ListBrowserStatParam struct { - // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. - StartDate *string `json:"start_date"` - // The browsers to get statistics for. You can include up to 10 different browsers by including this parameter multiple times. - Browsers *string `json:"browsers,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // The number of results to return. - Limit *int32 `json:"limit,omitempty"` - // The point in the list to begin retrieving results. - Offset *int32 `json:"offset,omitempty"` - // How to group the statistics. Must be either \"day\", \"week\", or \"month\". - AggregatedBy *AggregatedBy3 `json:"aggregated_by,omitempty"` - // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. - EndDate *string `json:"end_date,omitempty"` -} - -func (params *ListBrowserStatParam) SetStartDate(StartDate string) *ListBrowserStatParam { - params.StartDate = &StartDate - return params -} -func (params *ListBrowserStatParam) SetBrowsers(Browsers string) *ListBrowserStatParam { - params.Browsers = &Browsers - return params -} -func (params *ListBrowserStatParam) SetOnbehalfof(Onbehalfof string) *ListBrowserStatParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *ListBrowserStatParam) SetLimit(Limit int32) *ListBrowserStatParam { - params.Limit = &Limit - return params -} -func (params *ListBrowserStatParam) SetOffset(Offset int32) *ListBrowserStatParam { - params.Offset = &Offset - return params -} -func (params *ListBrowserStatParam) SetAggregatedBy(AggregatedBy AggregatedBy3) *ListBrowserStatParam { - params.AggregatedBy = &AggregatedBy - return params -} -func (params *ListBrowserStatParam) SetEndDate(EndDate string) *ListBrowserStatParam { - params.EndDate = &EndDate - return params -} - -// **This endpoint allows you to retrieve your email statistics segmented by browser type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). -func (c *ApiService) ListBrowserStat(params *ListBrowserStatParam) (interface{}, error) { - path := "/v3/browsers/stats" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.StartDate != nil { - data.Set("start_date", *params.StartDate) - } - if params != nil && params.Browsers != nil { - data.Set("browsers", *params.Browsers) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - if params != nil && params.AggregatedBy != nil { - data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) - } - if params != nil && params.EndDate != nil { - data.Set("end_date", *params.EndDate) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]ListBrowserStat200ResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/stats/api_list_category.go b/rest/api/v3/stats/api_list_category.go deleted file mode 100644 index 9805977a..00000000 --- a/rest/api/v3/stats/api_list_category.go +++ /dev/null @@ -1,95 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" -) - -type ListCategoryParam struct { - // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. - Limit *int32 `json:"limit,omitempty"` - // Allows you to perform a prefix search on this particular category. - Category *string `json:"category,omitempty"` - // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. - Offset *int32 `json:"offset,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListCategoryParam) SetLimit(Limit int32) *ListCategoryParam { - params.Limit = &Limit - return params -} -func (params *ListCategoryParam) SetCategory(Category string) *ListCategoryParam { - params.Category = &Category - return params -} -func (params *ListCategoryParam) SetOffset(Offset int32) *ListCategoryParam { - params.Offset = &Offset - return params -} -func (params *ListCategoryParam) SetOnbehalfof(Onbehalfof string) *ListCategoryParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a paginated list of all of your categories.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. -func (c *ApiService) ListCategory(params *ListCategoryParam) (interface{}, error) { - path := "/v3/categories" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Category != nil { - data.Set("category", *params.Category) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]ListCategory200ResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ListCategory400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/stats/api_list_category_stat.go b/rest/api/v3/stats/api_list_category_stat.go deleted file mode 100644 index 442d45f9..00000000 --- a/rest/api/v3/stats/api_list_category_stat.go +++ /dev/null @@ -1,96 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" -) - -type ListCategoryStatParam struct { - // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD - StartDate *string `json:"start_date"` - // The individual categories that you want to retrieve statistics for. You may include up to 10 different categories. - Categories *string `json:"categories"` - // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. - EndDate *string `json:"end_date,omitempty"` - // How to group the statistics. Must be either \"day\", \"week\", or \"month\". - AggregatedBy *AggregatedBy `json:"aggregated_by,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListCategoryStatParam) SetStartDate(StartDate string) *ListCategoryStatParam { - params.StartDate = &StartDate - return params -} -func (params *ListCategoryStatParam) SetCategories(Categories string) *ListCategoryStatParam { - params.Categories = &Categories - return params -} -func (params *ListCategoryStatParam) SetEndDate(EndDate string) *ListCategoryStatParam { - params.EndDate = &EndDate - return params -} -func (params *ListCategoryStatParam) SetAggregatedBy(AggregatedBy AggregatedBy) *ListCategoryStatParam { - params.AggregatedBy = &AggregatedBy - return params -} -func (params *ListCategoryStatParam) SetOnbehalfof(Onbehalfof string) *ListCategoryStatParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve all of your email statistics for each of your categories.** If you do not define any query parameters, this endpoint will return a sum for each category in groups of 10. -func (c *ApiService) ListCategoryStat(params *ListCategoryStatParam) (interface{}, error) { - path := "/v3/categories/stats" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.StartDate != nil { - data.Set("start_date", *params.StartDate) - } - if params != nil && params.Categories != nil { - data.Set("categories", *params.Categories) - } - if params != nil && params.EndDate != nil { - data.Set("end_date", *params.EndDate) - } - if params != nil && params.AggregatedBy != nil { - data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]CategoryStats{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/stats/api_list_category_stat_sum.go b/rest/api/v3/stats/api_list_category_stat_sum.go deleted file mode 100644 index 02c40c28..00000000 --- a/rest/api/v3/stats/api_list_category_stat_sum.go +++ /dev/null @@ -1,123 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" -) - -type ListCategoryStatSumParam struct { - // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. - StartDate *string `json:"start_date"` - // The metric that you want to sort by. Must be a single metric. - SortByMetric *string `json:"sort_by_metric,omitempty"` - // The direction you want to sort. - SortByDirection *SortByDirection `json:"sort_by_direction,omitempty"` - // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. - EndDate *string `json:"end_date,omitempty"` - // Limits the number of results returned. - Limit *int32 `json:"limit,omitempty"` - // The point in the list to begin retrieving results. - Offset *int32 `json:"offset,omitempty"` - // How to group the statistics. Must be either \"day\", \"week\", or \"month\". - AggregatedBy *AggregatedBy1 `json:"aggregated_by,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListCategoryStatSumParam) SetStartDate(StartDate string) *ListCategoryStatSumParam { - params.StartDate = &StartDate - return params -} -func (params *ListCategoryStatSumParam) SetSortByMetric(SortByMetric string) *ListCategoryStatSumParam { - params.SortByMetric = &SortByMetric - return params -} -func (params *ListCategoryStatSumParam) SetSortByDirection(SortByDirection SortByDirection) *ListCategoryStatSumParam { - params.SortByDirection = &SortByDirection - return params -} -func (params *ListCategoryStatSumParam) SetEndDate(EndDate string) *ListCategoryStatSumParam { - params.EndDate = &EndDate - return params -} -func (params *ListCategoryStatSumParam) SetLimit(Limit int32) *ListCategoryStatSumParam { - params.Limit = &Limit - return params -} -func (params *ListCategoryStatSumParam) SetOffset(Offset int32) *ListCategoryStatSumParam { - params.Offset = &Offset - return params -} -func (params *ListCategoryStatSumParam) SetAggregatedBy(AggregatedBy AggregatedBy1) *ListCategoryStatSumParam { - params.AggregatedBy = &AggregatedBy - return params -} -func (params *ListCategoryStatSumParam) SetOnbehalfof(Onbehalfof string) *ListCategoryStatSumParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve the total sum of each email statistic for every category over the given date range.** If you do not define any query parameters, this endpoint will return a sum for each category in groups of 10. -func (c *ApiService) ListCategoryStatSum(params *ListCategoryStatSumParam) (interface{}, error) { - path := "/v3/categories/stats/sums" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.StartDate != nil { - data.Set("start_date", *params.StartDate) - } - if params != nil && params.SortByMetric != nil { - data.Set("sort_by_metric", *params.SortByMetric) - } - if params != nil && params.SortByDirection != nil { - data.Set("sort_by_direction", fmt.Sprint(*params.SortByDirection)) - } - if params != nil && params.EndDate != nil { - data.Set("end_date", *params.EndDate) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - if params != nil && params.AggregatedBy != nil { - data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &CategoryStats{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/stats/api_list_client_stat.go b/rest/api/v3/stats/api_list_client_stat.go deleted file mode 100644 index f663bac0..00000000 --- a/rest/api/v3/stats/api_list_client_stat.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" -) - -type ListClientStatParam struct { - // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. - StartDate *string `json:"start_date"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. - EndDate *string `json:"end_date,omitempty"` - // How to group the statistics. Must be either \"day\", \"week\", or \"month\". - AggregatedBy *AggregatedBy2 `json:"aggregated_by,omitempty"` -} - -func (params *ListClientStatParam) SetStartDate(StartDate string) *ListClientStatParam { - params.StartDate = &StartDate - return params -} -func (params *ListClientStatParam) SetOnbehalfof(Onbehalfof string) *ListClientStatParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *ListClientStatParam) SetEndDate(EndDate string) *ListClientStatParam { - params.EndDate = &EndDate - return params -} -func (params *ListClientStatParam) SetAggregatedBy(AggregatedBy AggregatedBy2) *ListClientStatParam { - params.AggregatedBy = &AggregatedBy - return params -} - -// **This endpoint allows you to retrieve your email statistics segmented by client type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). -func (c *ApiService) ListClientStat(params *ListClientStatParam) (interface{}, error) { - path := "/v3/clients/stats" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.StartDate != nil { - data.Set("start_date", *params.StartDate) - } - if params != nil && params.EndDate != nil { - data.Set("end_date", *params.EndDate) - } - if params != nil && params.AggregatedBy != nil { - data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]ListClientStat200ResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/stats/api_list_device_stat.go b/rest/api/v3/stats/api_list_device_stat.go deleted file mode 100644 index 24bc46a2..00000000 --- a/rest/api/v3/stats/api_list_device_stat.go +++ /dev/null @@ -1,105 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" -) - -type ListDeviceStatParam struct { - // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. - StartDate *string `json:"start_date"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // The number of results to return. - Limit *int32 `json:"limit,omitempty"` - // The point in the list to begin retrieving results. - Offset *int32 `json:"offset,omitempty"` - // How to group the statistics. Must be either \"day\", \"week\", or \"month\". - AggregatedBy *AggregatedBy3 `json:"aggregated_by,omitempty"` - // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. - EndDate *string `json:"end_date,omitempty"` -} - -func (params *ListDeviceStatParam) SetStartDate(StartDate string) *ListDeviceStatParam { - params.StartDate = &StartDate - return params -} -func (params *ListDeviceStatParam) SetOnbehalfof(Onbehalfof string) *ListDeviceStatParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *ListDeviceStatParam) SetLimit(Limit int32) *ListDeviceStatParam { - params.Limit = &Limit - return params -} -func (params *ListDeviceStatParam) SetOffset(Offset int32) *ListDeviceStatParam { - params.Offset = &Offset - return params -} -func (params *ListDeviceStatParam) SetAggregatedBy(AggregatedBy AggregatedBy3) *ListDeviceStatParam { - params.AggregatedBy = &AggregatedBy - return params -} -func (params *ListDeviceStatParam) SetEndDate(EndDate string) *ListDeviceStatParam { - params.EndDate = &EndDate - return params -} - -// **This endpoint allows you to retrieve your email statistics segmented by the device type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. ## Available Device Types | **Device** | **Description** | **Example** | |---|---|---| | Desktop | Email software on desktop computer. | I.E., Outlook, Sparrow, or Apple Mail. | | Webmail | A web-based email client. | I.E., Yahoo, Google, AOL, or Outlook.com. | | Phone | A smart phone. | iPhone, Android, Blackberry, etc. | Tablet | A tablet computer. | iPad, android based tablet, etc. | | Other | An unrecognized device. | Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). -func (c *ApiService) ListDeviceStat(params *ListDeviceStatParam) (interface{}, error) { - path := "/v3/devices/stats" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.StartDate != nil { - data.Set("start_date", *params.StartDate) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - if params != nil && params.AggregatedBy != nil { - data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) - } - if params != nil && params.EndDate != nil { - data.Set("end_date", *params.EndDate) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]ListClientStat200ResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/stats/api_list_geo_stat.go b/rest/api/v3/stats/api_list_geo_stat.go deleted file mode 100644 index 083560d2..00000000 --- a/rest/api/v3/stats/api_list_geo_stat.go +++ /dev/null @@ -1,114 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" -) - -type ListGeoStatParam struct { - // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. - StartDate *string `json:"start_date"` - // The country you would like to see statistics for. Currently only supported for US and CA. - Country *Country `json:"country,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // The number of results to return. - Limit *int32 `json:"limit,omitempty"` - // The point in the list to begin retrieving results. - Offset *int32 `json:"offset,omitempty"` - // How to group the statistics. Must be either \"day\", \"week\", or \"month\". - AggregatedBy *AggregatedBy3 `json:"aggregated_by,omitempty"` - // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. - EndDate *string `json:"end_date,omitempty"` -} - -func (params *ListGeoStatParam) SetStartDate(StartDate string) *ListGeoStatParam { - params.StartDate = &StartDate - return params -} -func (params *ListGeoStatParam) SetCountry(Country Country) *ListGeoStatParam { - params.Country = &Country - return params -} -func (params *ListGeoStatParam) SetOnbehalfof(Onbehalfof string) *ListGeoStatParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *ListGeoStatParam) SetLimit(Limit int32) *ListGeoStatParam { - params.Limit = &Limit - return params -} -func (params *ListGeoStatParam) SetOffset(Offset int32) *ListGeoStatParam { - params.Offset = &Offset - return params -} -func (params *ListGeoStatParam) SetAggregatedBy(AggregatedBy AggregatedBy3) *ListGeoStatParam { - params.AggregatedBy = &AggregatedBy - return params -} -func (params *ListGeoStatParam) SetEndDate(EndDate string) *ListGeoStatParam { - params.EndDate = &EndDate - return params -} - -// **This endpoint allows you to retrieve your email statistics segmented by country and state/province.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [User Guide](https://wwww.twilio.com/docs/sendgrid/ui/analytics-and-reporting/stats-overview). -func (c *ApiService) ListGeoStat(params *ListGeoStatParam) (interface{}, error) { - path := "/v3/geo/stats" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.StartDate != nil { - data.Set("start_date", *params.StartDate) - } - if params != nil && params.Country != nil { - data.Set("country", fmt.Sprint(*params.Country)) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - if params != nil && params.AggregatedBy != nil { - data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) - } - if params != nil && params.EndDate != nil { - data.Set("end_date", *params.EndDate) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]ListGeoStat200ResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/stats/api_list_mailbox_provider_stat.go b/rest/api/v3/stats/api_list_mailbox_provider_stat.go deleted file mode 100644 index 98436deb..00000000 --- a/rest/api/v3/stats/api_list_mailbox_provider_stat.go +++ /dev/null @@ -1,114 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" -) - -type ListMailboxProviderStatParam struct { - // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. - StartDate *string `json:"start_date"` - // The mail box providers to get statistics for. You can include up to 10 by including this parameter multiple times. - MailboxProviders *string `json:"mailbox_providers,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // The number of results to return. - Limit *int32 `json:"limit,omitempty"` - // The point in the list to begin retrieving results. - Offset *int32 `json:"offset,omitempty"` - // How to group the statistics. Must be either \"day\", \"week\", or \"month\". - AggregatedBy *AggregatedBy3 `json:"aggregated_by,omitempty"` - // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. - EndDate *string `json:"end_date,omitempty"` -} - -func (params *ListMailboxProviderStatParam) SetStartDate(StartDate string) *ListMailboxProviderStatParam { - params.StartDate = &StartDate - return params -} -func (params *ListMailboxProviderStatParam) SetMailboxProviders(MailboxProviders string) *ListMailboxProviderStatParam { - params.MailboxProviders = &MailboxProviders - return params -} -func (params *ListMailboxProviderStatParam) SetOnbehalfof(Onbehalfof string) *ListMailboxProviderStatParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *ListMailboxProviderStatParam) SetLimit(Limit int32) *ListMailboxProviderStatParam { - params.Limit = &Limit - return params -} -func (params *ListMailboxProviderStatParam) SetOffset(Offset int32) *ListMailboxProviderStatParam { - params.Offset = &Offset - return params -} -func (params *ListMailboxProviderStatParam) SetAggregatedBy(AggregatedBy AggregatedBy3) *ListMailboxProviderStatParam { - params.AggregatedBy = &AggregatedBy - return params -} -func (params *ListMailboxProviderStatParam) SetEndDate(EndDate string) *ListMailboxProviderStatParam { - params.EndDate = &EndDate - return params -} - -// **This endpoint allows you to retrieve your email statistics segmented by recipient mailbox provider.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). -func (c *ApiService) ListMailboxProviderStat(params *ListMailboxProviderStatParam) (interface{}, error) { - path := "/v3/mailbox_providers/stats" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.StartDate != nil { - data.Set("start_date", *params.StartDate) - } - if params != nil && params.MailboxProviders != nil { - data.Set("mailbox_providers", *params.MailboxProviders) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - if params != nil && params.AggregatedBy != nil { - data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) - } - if params != nil && params.EndDate != nil { - data.Set("end_date", *params.EndDate) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]ListMailboxProviderStat200ResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/stats/api_list_stat.go b/rest/api/v3/stats/api_list_stat.go deleted file mode 100644 index 9b0f05e8..00000000 --- a/rest/api/v3/stats/api_list_stat.go +++ /dev/null @@ -1,105 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" -) - -type ListStatParam struct { - // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. - StartDate *string `json:"start_date"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // The number of results to return. - Limit *int32 `json:"limit,omitempty"` - // The point in the list to begin retrieving results. - Offset *int32 `json:"offset,omitempty"` - // How to group the statistics. Must be either \"day\", \"week\", or \"month\". - AggregatedBy *AggregatedBy3 `json:"aggregated_by,omitempty"` - // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. - EndDate *string `json:"end_date,omitempty"` -} - -func (params *ListStatParam) SetStartDate(StartDate string) *ListStatParam { - params.StartDate = &StartDate - return params -} -func (params *ListStatParam) SetOnbehalfof(Onbehalfof string) *ListStatParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *ListStatParam) SetLimit(Limit int32) *ListStatParam { - params.Limit = &Limit - return params -} -func (params *ListStatParam) SetOffset(Offset int32) *ListStatParam { - params.Offset = &Offset - return params -} -func (params *ListStatParam) SetAggregatedBy(AggregatedBy AggregatedBy3) *ListStatParam { - params.AggregatedBy = &AggregatedBy - return params -} -func (params *ListStatParam) SetEndDate(EndDate string) *ListStatParam { - params.EndDate = &EndDate - return params -} - -// **This endpoint allows you to retrieve all of your global email statistics between a given date range.** Parent accounts can see either aggregated stats for the parent account or aggregated stats for a subuser specified in the `on-behalf-of` header. Subuser accounts will see only their own stats. -func (c *ApiService) ListStat(params *ListStatParam) (interface{}, error) { - path := "/v3/stats" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.StartDate != nil { - data.Set("start_date", *params.StartDate) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - if params != nil && params.AggregatedBy != nil { - data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) - } - if params != nil && params.EndDate != nil { - data.Set("end_date", *params.EndDate) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]ListStat200ResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/stats/api_service.go b/rest/api/v3/stats/api_service.go deleted file mode 100644 index 29d8f9f5..00000000 --- a/rest/api/v3/stats/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/stats/docs/AdvancedStatsClicks.md b/rest/api/v3/stats/docs/AdvancedStatsClicks.md deleted file mode 100644 index 3f2f87ae..00000000 --- a/rest/api/v3/stats/docs/AdvancedStatsClicks.md +++ /dev/null @@ -1,12 +0,0 @@ -# AdvancedStatsClicks - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Clicks** | **int32** | The number of links that were clicked in your emails. |[optional] -**UniqueClicks** | **int32** | The number of unique recipients who clicked links in your emails. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/AdvancedStatsClicksOpens.md b/rest/api/v3/stats/docs/AdvancedStatsClicksOpens.md deleted file mode 100644 index 38d8c2e1..00000000 --- a/rest/api/v3/stats/docs/AdvancedStatsClicksOpens.md +++ /dev/null @@ -1,14 +0,0 @@ -# AdvancedStatsClicksOpens - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Clicks** | **int32** | The number of links that were clicked in your emails. |[optional] -**UniqueClicks** | **int32** | The number of unique recipients who clicked links in your emails. |[optional] -**Opens** | **int32** | The total number of times your emails were opened by recipients. |[optional] -**UniqueOpens** | **int32** | The number of unique recipients who opened your emails. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/AdvancedStatsMailboxProvider.md b/rest/api/v3/stats/docs/AdvancedStatsMailboxProvider.md deleted file mode 100644 index 403c4943..00000000 --- a/rest/api/v3/stats/docs/AdvancedStatsMailboxProvider.md +++ /dev/null @@ -1,18 +0,0 @@ -# AdvancedStatsMailboxProvider - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Blocks** | **int32** | The number of emails that were not allowed to be delivered by ISPs. |[optional] -**Bounces** | **int32** | The number of emails that bounced instead of being delivered. |[optional] -**Deferred** | **int32** | The number of emails that temporarily could not be delivered. |[optional] -**Delivered** | **int32** | The number of emails SendGrid was able to confirm were actually delivered to a recipient. |[optional] -**Drops** | **int32** | The number of emails that were not delivered due to the recipient email address being on a suppression list. |[optional] -**Requests** | **int32** | The number of emails that were requested to be delivered. |[optional] -**Processed** | **int32** | Requests from your website, application, or mail client via SMTP Relay or the Web API that SendGrid processed. |[optional] -**SpamReports** | **int32** | The number of recipients who marked your email as spam. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/AdvancedStatsOpens.md b/rest/api/v3/stats/docs/AdvancedStatsOpens.md deleted file mode 100644 index ebab3e99..00000000 --- a/rest/api/v3/stats/docs/AdvancedStatsOpens.md +++ /dev/null @@ -1,12 +0,0 @@ -# AdvancedStatsOpens - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Opens** | **int32** | The total number of times your emails were opened by recipients. |[optional] -**UniqueOpens** | **int32** | The number of unique recipients who opened your emails. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/AggregatedBy2.md b/rest/api/v3/stats/docs/AggregatedBy2.md deleted file mode 100644 index 9bf04eed..00000000 --- a/rest/api/v3/stats/docs/AggregatedBy2.md +++ /dev/null @@ -1,14 +0,0 @@ -# AggregatedBy2 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**DAY** | string | (value: `"day"`) -**WEEK** | string | (value: `"week"`) -**MONTH** | string | (value: `"month"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/AggregatedBy3.md b/rest/api/v3/stats/docs/AggregatedBy3.md deleted file mode 100644 index 7504b230..00000000 --- a/rest/api/v3/stats/docs/AggregatedBy3.md +++ /dev/null @@ -1,14 +0,0 @@ -# AggregatedBy3 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**DAY** | string | (value: `"day"`) -**WEEK** | string | (value: `"week"`) -**MONTH** | string | (value: `"month"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/CategoryStats.md b/rest/api/v3/stats/docs/CategoryStats.md deleted file mode 100644 index 2b136fe2..00000000 --- a/rest/api/v3/stats/docs/CategoryStats.md +++ /dev/null @@ -1,12 +0,0 @@ -# CategoryStats - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Date** | **string** | The date the statistics were gathered. | -**Stats** | [**[]CategoryStatsStatsInner**](CategoryStatsStatsInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/CategoryStatsStatsInner.md b/rest/api/v3/stats/docs/CategoryStatsStatsInner.md deleted file mode 100644 index 9c188e0c..00000000 --- a/rest/api/v3/stats/docs/CategoryStatsStatsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# CategoryStatsStatsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Metrics** | [**CategoryStatsStatsInnerMetrics**](CategoryStatsStatsInnerMetrics.md) | |[optional] -**Name** | **string** | The name of the category. |[optional] -**Type** | **string** | How you are segmenting your statistics. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/CategoryStatsStatsInnerMetrics.md b/rest/api/v3/stats/docs/CategoryStatsStatsInnerMetrics.md deleted file mode 100644 index 8129c1f4..00000000 --- a/rest/api/v3/stats/docs/CategoryStatsStatsInnerMetrics.md +++ /dev/null @@ -1,26 +0,0 @@ -# CategoryStatsStatsInnerMetrics - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Blocks** | **int32** | The number of emails that were not allowed to be delivered by ISPs. | -**BounceDrops** | **int32** | The number of emails that were dropped because of a bounce. | -**Bounces** | **int32** | The number of emails that bounced instead of being delivered. | -**Clicks** | **int32** | The number of links that were clicked. | -**Deferred** | **int32** | The number of emails that temporarily could not be delivered. | -**Delivered** | **int32** | The number of emails SendGrid was able to confirm were actually delivered to a recipient. | -**InvalidEmails** | **int32** | The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. | -**Opens** | **int32** | The total number of times your emails were opened by recipients. | -**Processed** | **int32** | Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. | -**Requests** | **int32** | The number of emails that were requested to be delivered. | -**SpamReportDrops** | **int32** | The number of emails that were dropped due to a recipient previously marking your emails as spam. | -**SpamReports** | **int32** | The number of recipients who marked your email as spam. | -**UniqueClicks** | **int32** | The number of unique recipients who clicked links in your emails. | -**UniqueOpens** | **int32** | The number of unique recipients who opened your emails. | -**UnsubscribeDrops** | **int32** | The number of emails dropped due to a recipient unsubscribing from your emails. | -**Unsubscribes** | **int32** | The number of recipients who unsubscribed from your emails. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/ClientType.md b/rest/api/v3/stats/docs/ClientType.md deleted file mode 100644 index 8a7f8487..00000000 --- a/rest/api/v3/stats/docs/ClientType.md +++ /dev/null @@ -1,15 +0,0 @@ -# ClientType - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**PHONE** | string | (value: `"phone"`) -**TABLET** | string | (value: `"tablet"`) -**WEBMAIL** | string | (value: `"webmail"`) -**DESKTOP** | string | (value: `"desktop"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/GetClientStat.md b/rest/api/v3/stats/docs/GetClientStat.md deleted file mode 100644 index bdd7639d..00000000 --- a/rest/api/v3/stats/docs/GetClientStat.md +++ /dev/null @@ -1,54 +0,0 @@ -# GetClientStat - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetClientStat**](GetClientStat.md#GetClientStat) | **Get** /v3/clients/{ClientType}/stats | Retrieve stats by a specific client type. - - - -## GetClientStat - -> []ListClientStat200ResponseInner GetClientStat(ctx, StartDateClientTypeoptional) - -Retrieve stats by a specific client type. - -**This endpoint allows you to retrieve your email statistics segmented by a specific client type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. ### Available Client Types - phone - tablet - webmail - desktop Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**ClientType** | [**ClientType**](ClientType.md) | Specifies the type of client to retrieve stats for. Must be either \"phone\", \"tablet\", \"webmail\", or \"desktop\". - -### Other Parameters - -Other parameters are passed through a pointer to a GetClientStatParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. -**AggregatedBy** | [**AggregatedBy2**](AggregatedBy2AggregatedBy2.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". - -### Return type - -[**[]ListClientStat200ResponseInner**](ListClientStat200ResponseInner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/stats/docs/ListBrowserStat.md b/rest/api/v3/stats/docs/ListBrowserStat.md deleted file mode 100644 index 00b5d584..00000000 --- a/rest/api/v3/stats/docs/ListBrowserStat.md +++ /dev/null @@ -1,53 +0,0 @@ -# ListBrowserStat - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListBrowserStat**](ListBrowserStat.md#ListBrowserStat) | **Get** /v3/browsers/stats | Retrieve email statistics by browser. - - - -## ListBrowserStat - -> []ListBrowserStat200ResponseInner ListBrowserStat(ctx, StartDateoptional) - -Retrieve email statistics by browser. - -**This endpoint allows you to retrieve your email statistics segmented by browser type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListBrowserStatParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Browsers** | **string** | The browsers to get statistics for. You can include up to 10 different browsers by including this parameter multiple times. -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**Limit** | **int32** | The number of results to return. -**Offset** | **int32** | The point in the list to begin retrieving results. -**AggregatedBy** | [**AggregatedBy3**](AggregatedBy3AggregatedBy3.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". -**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. - -### Return type - -[**[]ListBrowserStat200ResponseInner**](ListBrowserStat200ResponseInner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/stats/docs/ListBrowserStat200ResponseInner.md b/rest/api/v3/stats/docs/ListBrowserStat200ResponseInner.md deleted file mode 100644 index b4f98ab1..00000000 --- a/rest/api/v3/stats/docs/ListBrowserStat200ResponseInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListBrowserStat200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Date** | **string** | The date that the statistics were gathered. |[optional] -**Stats** | [**[]ListBrowserStat200ResponseInnerStatsInner**](ListBrowserStat200ResponseInnerStatsInner.md) | The list of statistics. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/ListBrowserStat200ResponseInnerStatsInner.md b/rest/api/v3/stats/docs/ListBrowserStat200ResponseInnerStatsInner.md deleted file mode 100644 index 42ea5d07..00000000 --- a/rest/api/v3/stats/docs/ListBrowserStat200ResponseInnerStatsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListBrowserStat200ResponseInnerStatsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | The type of segmentation. |[optional] -**Name** | **string** | The name of the specific segmentation. |[optional] -**Metrics** | [**AdvancedStatsClicks**](AdvancedStatsClicks.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/ListCategory400Response.md b/rest/api/v3/stats/docs/ListCategory400Response.md deleted file mode 100644 index 1163a96f..00000000 --- a/rest/api/v3/stats/docs/ListCategory400Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListCategory400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ListCategory400ResponseErrorsInner**](ListCategory400ResponseErrorsInner.md) | The error returned. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/ListCategory400ResponseErrorsInner.md b/rest/api/v3/stats/docs/ListCategory400ResponseErrorsInner.md deleted file mode 100644 index 413c97ee..00000000 --- a/rest/api/v3/stats/docs/ListCategory400ResponseErrorsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListCategory400ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Field** | **string** | | -**Message** | **string** | A message explaining why your categories could not be retrieved. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/ListClientStat200ResponseInner.md b/rest/api/v3/stats/docs/ListClientStat200ResponseInner.md deleted file mode 100644 index dfc7e624..00000000 --- a/rest/api/v3/stats/docs/ListClientStat200ResponseInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListClientStat200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Date** | **string** | The date that the statistics were gathered. |[optional] -**Stats** | [**[]ListClientStat200ResponseInnerStatsInner**](ListClientStat200ResponseInnerStatsInner.md) | The list of statistics. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/ListClientStat200ResponseInnerStatsInner.md b/rest/api/v3/stats/docs/ListClientStat200ResponseInnerStatsInner.md deleted file mode 100644 index c065ab77..00000000 --- a/rest/api/v3/stats/docs/ListClientStat200ResponseInnerStatsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListClientStat200ResponseInnerStatsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | The type of segmentation. |[optional] -**Name** | **string** | The name of the specific segmentation. |[optional] -**Metrics** | [**AdvancedStatsOpens**](AdvancedStatsOpens.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/ListDeviceStat.md b/rest/api/v3/stats/docs/ListDeviceStat.md deleted file mode 100644 index e3f910f4..00000000 --- a/rest/api/v3/stats/docs/ListDeviceStat.md +++ /dev/null @@ -1,52 +0,0 @@ -# ListDeviceStat - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListDeviceStat**](ListDeviceStat.md#ListDeviceStat) | **Get** /v3/devices/stats | Retrieve email statistics by device type. - - - -## ListDeviceStat - -> []ListClientStat200ResponseInner ListDeviceStat(ctx, StartDateoptional) - -Retrieve email statistics by device type. - -**This endpoint allows you to retrieve your email statistics segmented by the device type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. ## Available Device Types | **Device** | **Description** | **Example** | |---|---|---| | Desktop | Email software on desktop computer. | I.E., Outlook, Sparrow, or Apple Mail. | | Webmail | A web-based email client. | I.E., Yahoo, Google, AOL, or Outlook.com. | | Phone | A smart phone. | iPhone, Android, Blackberry, etc. | Tablet | A tablet computer. | iPad, android based tablet, etc. | | Other | An unrecognized device. | Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListDeviceStatParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**Limit** | **int32** | The number of results to return. -**Offset** | **int32** | The point in the list to begin retrieving results. -**AggregatedBy** | [**AggregatedBy3**](AggregatedBy3AggregatedBy3.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". -**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. - -### Return type - -[**[]ListClientStat200ResponseInner**](ListClientStat200ResponseInner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/stats/docs/ListGeoStat.md b/rest/api/v3/stats/docs/ListGeoStat.md deleted file mode 100644 index 3c66f64e..00000000 --- a/rest/api/v3/stats/docs/ListGeoStat.md +++ /dev/null @@ -1,53 +0,0 @@ -# ListGeoStat - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListGeoStat**](ListGeoStat.md#ListGeoStat) | **Get** /v3/geo/stats | Retrieve email statistics by country and state/province. - - - -## ListGeoStat - -> []ListGeoStat200ResponseInner ListGeoStat(ctx, StartDateoptional) - -Retrieve email statistics by country and state/province. - -**This endpoint allows you to retrieve your email statistics segmented by country and state/province.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [User Guide](https://wwww.twilio.com/docs/sendgrid/ui/analytics-and-reporting/stats-overview). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListGeoStatParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Country** | [**Country**](CountryCountry.md) | The country you would like to see statistics for. Currently only supported for US and CA. -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**Limit** | **int32** | The number of results to return. -**Offset** | **int32** | The point in the list to begin retrieving results. -**AggregatedBy** | [**AggregatedBy3**](AggregatedBy3AggregatedBy3.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". -**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. - -### Return type - -[**[]ListGeoStat200ResponseInner**](ListGeoStat200ResponseInner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/stats/docs/ListGeoStat200ResponseInner.md b/rest/api/v3/stats/docs/ListGeoStat200ResponseInner.md deleted file mode 100644 index b8b712fe..00000000 --- a/rest/api/v3/stats/docs/ListGeoStat200ResponseInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListGeoStat200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Date** | **string** | The date that the statistics were gathered. |[optional] -**Stats** | [**[]ListGeoStat200ResponseInnerStatsInner**](ListGeoStat200ResponseInnerStatsInner.md) | The list of statistics. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/ListGeoStat200ResponseInnerStatsInner.md b/rest/api/v3/stats/docs/ListGeoStat200ResponseInnerStatsInner.md deleted file mode 100644 index 059cb893..00000000 --- a/rest/api/v3/stats/docs/ListGeoStat200ResponseInnerStatsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListGeoStat200ResponseInnerStatsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | The type of segmentation. |[optional] -**Name** | **string** | The name of the specific segmentation. |[optional] -**Metrics** | [**AdvancedStatsClicksOpens**](AdvancedStatsClicksOpens.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/ListMailboxProviderStat.md b/rest/api/v3/stats/docs/ListMailboxProviderStat.md deleted file mode 100644 index 6500d3a7..00000000 --- a/rest/api/v3/stats/docs/ListMailboxProviderStat.md +++ /dev/null @@ -1,53 +0,0 @@ -# ListMailboxProviderStat - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListMailboxProviderStat**](ListMailboxProviderStat.md#ListMailboxProviderStat) | **Get** /v3/mailbox_providers/stats | Retrieve email statistics by mailbox provider. - - - -## ListMailboxProviderStat - -> []ListMailboxProviderStat200ResponseInner ListMailboxProviderStat(ctx, StartDateoptional) - -Retrieve email statistics by mailbox provider. - -**This endpoint allows you to retrieve your email statistics segmented by recipient mailbox provider.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListMailboxProviderStatParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**MailboxProviders** | **string** | The mail box providers to get statistics for. You can include up to 10 by including this parameter multiple times. -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**Limit** | **int32** | The number of results to return. -**Offset** | **int32** | The point in the list to begin retrieving results. -**AggregatedBy** | [**AggregatedBy3**](AggregatedBy3AggregatedBy3.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". -**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. - -### Return type - -[**[]ListMailboxProviderStat200ResponseInner**](ListMailboxProviderStat200ResponseInner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInner.md b/rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInner.md deleted file mode 100644 index 0e9cf740..00000000 --- a/rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListMailboxProviderStat200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Date** | **string** | The date that the statistics were gathered. |[optional] -**Stats** | [**[]ListMailboxProviderStat200ResponseInnerStatsInner**](ListMailboxProviderStat200ResponseInnerStatsInner.md) | The list of statistics. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInnerStatsInner.md b/rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInnerStatsInner.md deleted file mode 100644 index 73748c49..00000000 --- a/rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInnerStatsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListMailboxProviderStat200ResponseInnerStatsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | The type of segmentation. |[optional] -**Name** | **string** | The name of the specific segmentation. |[optional] -**Metrics** | [**AdvancedStatsMailboxProvider**](AdvancedStatsMailboxProvider.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/ListStat200ResponseInner.md b/rest/api/v3/stats/docs/ListStat200ResponseInner.md deleted file mode 100644 index e510d3d0..00000000 --- a/rest/api/v3/stats/docs/ListStat200ResponseInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListStat200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Date** | **string** | The date the stats were gathered. | -**Stats** | [**[]ListStat200ResponseInnerStatsInner**](ListStat200ResponseInnerStatsInner.md) | The individual email activity stats. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/StatsAdvancedGlobalStats.md b/rest/api/v3/stats/docs/StatsAdvancedGlobalStats.md deleted file mode 100644 index cf8ff1d7..00000000 --- a/rest/api/v3/stats/docs/StatsAdvancedGlobalStats.md +++ /dev/null @@ -1,26 +0,0 @@ -# StatsAdvancedGlobalStats - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Clicks** | **int32** | The number of links that were clicked in your emails. |[optional] -**UniqueClicks** | **int32** | The number of unique recipients who clicked links in your emails. |[optional] -**Opens** | **int32** | The total number of times your emails were opened by recipients. |[optional] -**UniqueOpens** | **int32** | The number of unique recipients who opened your emails. |[optional] -**Blocks** | **int32** | The number of emails that were not allowed to be delivered by ISPs. |[optional] -**BounceDrops** | **int32** | The number of emails that were dropped because of a bounce. |[optional] -**Bounces** | **int32** | The number of emails that bounced instead of being delivered. |[optional] -**Deferred** | **int32** | The number of emails that temporarily could not be delivered. |[optional] -**Delivered** | **int32** | The number of emails SendGrid was able to confirm were actually delivered to a recipient. |[optional] -**InvalidEmails** | **int32** | The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. |[optional] -**Processed** | **int32** | Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. |[optional] -**Requests** | **int32** | The number of emails that were requested to be delivered. |[optional] -**SpamReportDrops** | **int32** | The number of emails that were dropped due to a recipient previously marking your emails as spam. |[optional] -**SpamReports** | **int32** | The number of recipients who marked your email as spam. |[optional] -**UnsubscribeDrops** | **int32** | The number of emails dropped due to a recipient unsubscribing from your emails. |[optional] -**Unsubscribes** | **int32** | The number of recipients who unsubscribed from your emails. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/model_advanced_stats_clicks.go b/rest/api/v3/stats/model_advanced_stats_clicks.go deleted file mode 100644 index e26aca54..00000000 --- a/rest/api/v3/stats/model_advanced_stats_clicks.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AdvancedStatsClicks The individual events and their stats. -type AdvancedStatsClicks struct { - // The number of links that were clicked in your emails. - Clicks *int32 `json:"clicks,omitempty"` - // The number of unique recipients who clicked links in your emails. - UniqueClicks *int32 `json:"unique_clicks,omitempty"` -} diff --git a/rest/api/v3/stats/model_advanced_stats_clicks_opens.go b/rest/api/v3/stats/model_advanced_stats_clicks_opens.go deleted file mode 100644 index a8a339f8..00000000 --- a/rest/api/v3/stats/model_advanced_stats_clicks_opens.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AdvancedStatsClicksOpens The individual events and their stats. -type AdvancedStatsClicksOpens struct { - // The number of links that were clicked in your emails. - Clicks *int32 `json:"clicks,omitempty"` - // The number of unique recipients who clicked links in your emails. - UniqueClicks *int32 `json:"unique_clicks,omitempty"` - // The total number of times your emails were opened by recipients. - Opens *int32 `json:"opens,omitempty"` - // The number of unique recipients who opened your emails. - UniqueOpens *int32 `json:"unique_opens,omitempty"` -} diff --git a/rest/api/v3/stats/model_advanced_stats_mailbox_provider.go b/rest/api/v3/stats/model_advanced_stats_mailbox_provider.go deleted file mode 100644 index ee75f598..00000000 --- a/rest/api/v3/stats/model_advanced_stats_mailbox_provider.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AdvancedStatsMailboxProvider The individual events and their stats. -type AdvancedStatsMailboxProvider struct { - // The number of emails that were not allowed to be delivered by ISPs. - Blocks *int32 `json:"blocks,omitempty"` - // The number of emails that bounced instead of being delivered. - Bounces *int32 `json:"bounces,omitempty"` - // The number of emails that temporarily could not be delivered. - Deferred *int32 `json:"deferred,omitempty"` - // The number of emails SendGrid was able to confirm were actually delivered to a recipient. - Delivered *int32 `json:"delivered,omitempty"` - // The number of emails that were not delivered due to the recipient email address being on a suppression list. - Drops *int32 `json:"drops,omitempty"` - // The number of emails that were requested to be delivered. - Requests *int32 `json:"requests,omitempty"` - // Requests from your website, application, or mail client via SMTP Relay or the Web API that SendGrid processed. - Processed *int32 `json:"processed,omitempty"` - // The number of recipients who marked your email as spam. - SpamReports *int32 `json:"spam_reports,omitempty"` -} diff --git a/rest/api/v3/stats/model_advanced_stats_opens.go b/rest/api/v3/stats/model_advanced_stats_opens.go deleted file mode 100644 index 8af689e0..00000000 --- a/rest/api/v3/stats/model_advanced_stats_opens.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AdvancedStatsOpens The individual events and their stats. -type AdvancedStatsOpens struct { - // The total number of times your emails were opened by recipients. - Opens *int32 `json:"opens,omitempty"` - // The number of unique recipients who opened your emails. - UniqueOpens *int32 `json:"unique_opens,omitempty"` -} diff --git a/rest/api/v3/stats/model_aggregated_by.go b/rest/api/v3/stats/model_aggregated_by.go deleted file mode 100644 index 7030e628..00000000 --- a/rest/api/v3/stats/model_aggregated_by.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AggregatedBy the model 'AggregatedBy' -type AggregatedBy string - -// List of AggregatedBy -const ( - AGGREGATEDBY_DAY AggregatedBy = "day" - AGGREGATEDBY_WEEK AggregatedBy = "week" - AGGREGATEDBY_MONTH AggregatedBy = "month" -) diff --git a/rest/api/v3/stats/model_aggregated_by1.go b/rest/api/v3/stats/model_aggregated_by1.go deleted file mode 100644 index 1d03db31..00000000 --- a/rest/api/v3/stats/model_aggregated_by1.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AggregatedBy1 the model 'AggregatedBy1' -type AggregatedBy1 string - -// List of AggregatedBy1 -const ( - AGGREGATEDBY1_DAY AggregatedBy1 = "day" - AGGREGATEDBY1_WEEK AggregatedBy1 = "week" - AGGREGATEDBY1_MONTH AggregatedBy1 = "month" -) diff --git a/rest/api/v3/stats/model_aggregated_by2.go b/rest/api/v3/stats/model_aggregated_by2.go deleted file mode 100644 index d9a0ac73..00000000 --- a/rest/api/v3/stats/model_aggregated_by2.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AggregatedBy2 the model 'AggregatedBy2' -type AggregatedBy2 string - -// List of AggregatedBy2 -const ( - AGGREGATEDBY2_DAY AggregatedBy2 = "day" - AGGREGATEDBY2_WEEK AggregatedBy2 = "week" - AGGREGATEDBY2_MONTH AggregatedBy2 = "month" -) diff --git a/rest/api/v3/stats/model_aggregated_by3.go b/rest/api/v3/stats/model_aggregated_by3.go deleted file mode 100644 index f5d4b9e4..00000000 --- a/rest/api/v3/stats/model_aggregated_by3.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AggregatedBy3 the model 'AggregatedBy3' -type AggregatedBy3 string - -// List of AggregatedBy3 -const ( - AGGREGATEDBY3_DAY AggregatedBy3 = "day" - AGGREGATEDBY3_WEEK AggregatedBy3 = "week" - AGGREGATEDBY3_MONTH AggregatedBy3 = "month" -) diff --git a/rest/api/v3/stats/model_category_stats.go b/rest/api/v3/stats/model_category_stats.go deleted file mode 100644 index 67f280ca..00000000 --- a/rest/api/v3/stats/model_category_stats.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CategoryStats struct for CategoryStats -type CategoryStats struct { - // The date the statistics were gathered. - Date string `json:"date"` - Stats *[]CategoryStatsStatsInner `json:"stats,omitempty"` -} diff --git a/rest/api/v3/stats/model_category_stats_stats_inner.go b/rest/api/v3/stats/model_category_stats_stats_inner.go deleted file mode 100644 index 9484fa58..00000000 --- a/rest/api/v3/stats/model_category_stats_stats_inner.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CategoryStatsStatsInner struct for CategoryStatsStatsInner -type CategoryStatsStatsInner struct { - Metrics *CategoryStatsStatsInnerMetrics `json:"metrics,omitempty"` - // The name of the category. - Name *string `json:"name,omitempty"` - // How you are segmenting your statistics. - Type string `json:"type"` -} diff --git a/rest/api/v3/stats/model_category_stats_stats_inner_metrics.go b/rest/api/v3/stats/model_category_stats_stats_inner_metrics.go deleted file mode 100644 index 99765698..00000000 --- a/rest/api/v3/stats/model_category_stats_stats_inner_metrics.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CategoryStatsStatsInnerMetrics struct for CategoryStatsStatsInnerMetrics -type CategoryStatsStatsInnerMetrics struct { - // The number of emails that were not allowed to be delivered by ISPs. - Blocks int32 `json:"blocks"` - // The number of emails that were dropped because of a bounce. - BounceDrops int32 `json:"bounce_drops"` - // The number of emails that bounced instead of being delivered. - Bounces int32 `json:"bounces"` - // The number of links that were clicked. - Clicks int32 `json:"clicks"` - // The number of emails that temporarily could not be delivered. - Deferred int32 `json:"deferred"` - // The number of emails SendGrid was able to confirm were actually delivered to a recipient. - Delivered int32 `json:"delivered"` - // The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. - InvalidEmails int32 `json:"invalid_emails"` - // The total number of times your emails were opened by recipients. - Opens int32 `json:"opens"` - // Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. - Processed int32 `json:"processed"` - // The number of emails that were requested to be delivered. - Requests int32 `json:"requests"` - // The number of emails that were dropped due to a recipient previously marking your emails as spam. - SpamReportDrops int32 `json:"spam_report_drops"` - // The number of recipients who marked your email as spam. - SpamReports int32 `json:"spam_reports"` - // The number of unique recipients who clicked links in your emails. - UniqueClicks int32 `json:"unique_clicks"` - // The number of unique recipients who opened your emails. - UniqueOpens int32 `json:"unique_opens"` - // The number of emails dropped due to a recipient unsubscribing from your emails. - UnsubscribeDrops int32 `json:"unsubscribe_drops"` - // The number of recipients who unsubscribed from your emails. - Unsubscribes int32 `json:"unsubscribes"` -} diff --git a/rest/api/v3/stats/model_client_type.go b/rest/api/v3/stats/model_client_type.go deleted file mode 100644 index 3c36ab04..00000000 --- a/rest/api/v3/stats/model_client_type.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ClientType the model 'ClientType' -type ClientType string - -// List of ClientType -const ( - CLIENTTYPE_PHONE ClientType = "phone" - CLIENTTYPE_TABLET ClientType = "tablet" - CLIENTTYPE_WEBMAIL ClientType = "webmail" - CLIENTTYPE_DESKTOP ClientType = "desktop" -) diff --git a/rest/api/v3/stats/model_country.go b/rest/api/v3/stats/model_country.go deleted file mode 100644 index 867da48a..00000000 --- a/rest/api/v3/stats/model_country.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Country the model 'Country' -type Country string - -// List of Country -const ( - COUNTRY_US Country = "US" - COUNTRY_CA Country = "CA" -) diff --git a/rest/api/v3/stats/model_list_browser_stat_200_response_inner.go b/rest/api/v3/stats/model_list_browser_stat_200_response_inner.go deleted file mode 100644 index 6abdbd78..00000000 --- a/rest/api/v3/stats/model_list_browser_stat_200_response_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListBrowserStat200ResponseInner struct for ListBrowserStat200ResponseInner -type ListBrowserStat200ResponseInner struct { - // The date that the statistics were gathered. - Date *string `json:"date,omitempty"` - // The list of statistics. - Stats *[]ListBrowserStat200ResponseInnerStatsInner `json:"stats,omitempty"` -} diff --git a/rest/api/v3/stats/model_list_browser_stat_200_response_inner_stats_inner.go b/rest/api/v3/stats/model_list_browser_stat_200_response_inner_stats_inner.go deleted file mode 100644 index b33842eb..00000000 --- a/rest/api/v3/stats/model_list_browser_stat_200_response_inner_stats_inner.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListBrowserStat200ResponseInnerStatsInner struct for ListBrowserStat200ResponseInnerStatsInner -type ListBrowserStat200ResponseInnerStatsInner struct { - // The type of segmentation. - Type *string `json:"type,omitempty"` - // The name of the specific segmentation. - Name *string `json:"name,omitempty"` - Metrics *AdvancedStatsClicks `json:"metrics,omitempty"` -} diff --git a/rest/api/v3/stats/model_list_category_200_response_inner.go b/rest/api/v3/stats/model_list_category_200_response_inner.go deleted file mode 100644 index 8b6aa73d..00000000 --- a/rest/api/v3/stats/model_list_category_200_response_inner.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListCategory200ResponseInner struct for ListCategory200ResponseInner -type ListCategory200ResponseInner struct { - // A category used to group emails by broad topic. - Category string `json:"category"` -} diff --git a/rest/api/v3/stats/model_list_category_400_response.go b/rest/api/v3/stats/model_list_category_400_response.go deleted file mode 100644 index 1ddd6eb7..00000000 --- a/rest/api/v3/stats/model_list_category_400_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListCategory400Response struct for ListCategory400Response -type ListCategory400Response struct { - // The error returned. - Errors *[]ListCategory400ResponseErrorsInner `json:"errors,omitempty"` -} diff --git a/rest/api/v3/stats/model_list_category_400_response_errors_inner.go b/rest/api/v3/stats/model_list_category_400_response_errors_inner.go deleted file mode 100644 index 33dbbfe5..00000000 --- a/rest/api/v3/stats/model_list_category_400_response_errors_inner.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListCategory400ResponseErrorsInner struct for ListCategory400ResponseErrorsInner -type ListCategory400ResponseErrorsInner struct { - Field string `json:"field"` - // A message explaining why your categories could not be retrieved. - Message string `json:"message"` -} diff --git a/rest/api/v3/stats/model_list_client_stat_200_response_inner.go b/rest/api/v3/stats/model_list_client_stat_200_response_inner.go deleted file mode 100644 index f7f802fd..00000000 --- a/rest/api/v3/stats/model_list_client_stat_200_response_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListClientStat200ResponseInner struct for ListClientStat200ResponseInner -type ListClientStat200ResponseInner struct { - // The date that the statistics were gathered. - Date *string `json:"date,omitempty"` - // The list of statistics. - Stats *[]ListClientStat200ResponseInnerStatsInner `json:"stats,omitempty"` -} diff --git a/rest/api/v3/stats/model_list_client_stat_200_response_inner_stats_inner.go b/rest/api/v3/stats/model_list_client_stat_200_response_inner_stats_inner.go deleted file mode 100644 index fc6e6ec6..00000000 --- a/rest/api/v3/stats/model_list_client_stat_200_response_inner_stats_inner.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListClientStat200ResponseInnerStatsInner struct for ListClientStat200ResponseInnerStatsInner -type ListClientStat200ResponseInnerStatsInner struct { - // The type of segmentation. - Type *string `json:"type,omitempty"` - // The name of the specific segmentation. - Name *string `json:"name,omitempty"` - Metrics *AdvancedStatsOpens `json:"metrics,omitempty"` -} diff --git a/rest/api/v3/stats/model_list_geo_stat_200_response_inner.go b/rest/api/v3/stats/model_list_geo_stat_200_response_inner.go deleted file mode 100644 index 2c097da9..00000000 --- a/rest/api/v3/stats/model_list_geo_stat_200_response_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListGeoStat200ResponseInner struct for ListGeoStat200ResponseInner -type ListGeoStat200ResponseInner struct { - // The date that the statistics were gathered. - Date *string `json:"date,omitempty"` - // The list of statistics. - Stats *[]ListGeoStat200ResponseInnerStatsInner `json:"stats,omitempty"` -} diff --git a/rest/api/v3/stats/model_list_geo_stat_200_response_inner_stats_inner.go b/rest/api/v3/stats/model_list_geo_stat_200_response_inner_stats_inner.go deleted file mode 100644 index 0b755f7e..00000000 --- a/rest/api/v3/stats/model_list_geo_stat_200_response_inner_stats_inner.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListGeoStat200ResponseInnerStatsInner struct for ListGeoStat200ResponseInnerStatsInner -type ListGeoStat200ResponseInnerStatsInner struct { - // The type of segmentation. - Type *string `json:"type,omitempty"` - // The name of the specific segmentation. - Name *string `json:"name,omitempty"` - Metrics *AdvancedStatsClicksOpens `json:"metrics,omitempty"` -} diff --git a/rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner.go b/rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner.go deleted file mode 100644 index 94550611..00000000 --- a/rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListMailboxProviderStat200ResponseInner struct for ListMailboxProviderStat200ResponseInner -type ListMailboxProviderStat200ResponseInner struct { - // The date that the statistics were gathered. - Date *string `json:"date,omitempty"` - // The list of statistics. - Stats *[]ListMailboxProviderStat200ResponseInnerStatsInner `json:"stats,omitempty"` -} diff --git a/rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner_stats_inner.go b/rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner_stats_inner.go deleted file mode 100644 index 049a1771..00000000 --- a/rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner_stats_inner.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListMailboxProviderStat200ResponseInnerStatsInner struct for ListMailboxProviderStat200ResponseInnerStatsInner -type ListMailboxProviderStat200ResponseInnerStatsInner struct { - // The type of segmentation. - Type *string `json:"type,omitempty"` - // The name of the specific segmentation. - Name *string `json:"name,omitempty"` - Metrics *AdvancedStatsMailboxProvider `json:"metrics,omitempty"` -} diff --git a/rest/api/v3/stats/model_list_stat_200_response_inner.go b/rest/api/v3/stats/model_list_stat_200_response_inner.go deleted file mode 100644 index ff32341b..00000000 --- a/rest/api/v3/stats/model_list_stat_200_response_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListStat200ResponseInner struct for ListStat200ResponseInner -type ListStat200ResponseInner struct { - // The date the stats were gathered. - Date string `json:"date"` - // The individual email activity stats. - Stats []ListStat200ResponseInnerStatsInner `json:"stats"` -} diff --git a/rest/api/v3/stats/model_list_stat_200_response_inner_stats_inner.go b/rest/api/v3/stats/model_list_stat_200_response_inner_stats_inner.go deleted file mode 100644 index 5ff7e17f..00000000 --- a/rest/api/v3/stats/model_list_stat_200_response_inner_stats_inner.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListStat200ResponseInnerStatsInner struct for ListStat200ResponseInnerStatsInner -type ListStat200ResponseInnerStatsInner struct { - Metrics *StatsAdvancedGlobalStats `json:"metrics,omitempty"` -} diff --git a/rest/api/v3/stats/model_sort_by_direction.go b/rest/api/v3/stats/model_sort_by_direction.go deleted file mode 100644 index 83900dd5..00000000 --- a/rest/api/v3/stats/model_sort_by_direction.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SortByDirection the model 'SortByDirection' -type SortByDirection string - -// List of SortByDirection -const ( - SORTBYDIRECTION_DESC SortByDirection = "desc" - SORTBYDIRECTION_ASC SortByDirection = "asc" -) diff --git a/rest/api/v3/stats/model_stats_advanced_global_stats.go b/rest/api/v3/stats/model_stats_advanced_global_stats.go deleted file mode 100644 index 1a7151de..00000000 --- a/rest/api/v3/stats/model_stats_advanced_global_stats.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// StatsAdvancedGlobalStats struct for StatsAdvancedGlobalStats -type StatsAdvancedGlobalStats struct { - // The number of links that were clicked in your emails. - Clicks *int32 `json:"clicks,omitempty"` - // The number of unique recipients who clicked links in your emails. - UniqueClicks *int32 `json:"unique_clicks,omitempty"` - // The total number of times your emails were opened by recipients. - Opens *int32 `json:"opens,omitempty"` - // The number of unique recipients who opened your emails. - UniqueOpens *int32 `json:"unique_opens,omitempty"` - // The number of emails that were not allowed to be delivered by ISPs. - Blocks *int32 `json:"blocks,omitempty"` - // The number of emails that were dropped because of a bounce. - BounceDrops *int32 `json:"bounce_drops,omitempty"` - // The number of emails that bounced instead of being delivered. - Bounces *int32 `json:"bounces,omitempty"` - // The number of emails that temporarily could not be delivered. - Deferred *int32 `json:"deferred,omitempty"` - // The number of emails SendGrid was able to confirm were actually delivered to a recipient. - Delivered *int32 `json:"delivered,omitempty"` - // The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. - InvalidEmails *int32 `json:"invalid_emails,omitempty"` - // Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. - Processed *int32 `json:"processed,omitempty"` - // The number of emails that were requested to be delivered. - Requests *int32 `json:"requests,omitempty"` - // The number of emails that were dropped due to a recipient previously marking your emails as spam. - SpamReportDrops *int32 `json:"spam_report_drops,omitempty"` - // The number of recipients who marked your email as spam. - SpamReports *int32 `json:"spam_reports,omitempty"` - // The number of emails dropped due to a recipient unsubscribing from your emails. - UnsubscribeDrops *int32 `json:"unsubscribe_drops,omitempty"` - // The number of recipients who unsubscribed from your emails. - Unsubscribes *int32 `json:"unsubscribes,omitempty"` -} diff --git a/rest/api/v3/subusers/.openapi-generator b/rest/api/v3/subusers/.openapi-generator index da3cd51b..93ad55b9 100644 --- a/rest/api/v3/subusers/.openapi-generator +++ b/rest/api/v3/subusers/.openapi-generator @@ -1,4 +1,5 @@ .openapi-generator +.openapi-generator-ignore README.md api_create_subuser.go api_delete_subuser.go diff --git a/rest/api/v3/subusers/README.md b/rest/api/v3/subusers/README.md index fc71698f..43572810 100644 --- a/rest/api/v3/subusers/README.md +++ b/rest/api/v3/subusers/README.md @@ -9,7 +9,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:44.524189+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:38.481145+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/subusers/api_create_subuser.go b/rest/api/v3/subusers/api_create_subuser.go index c57cabea..af6449b6 100644 --- a/rest/api/v3/subusers/api_create_subuser.go +++ b/rest/api/v3/subusers/api_create_subuser.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -92,5 +93,5 @@ func (c *ApiService) CreateSubuser(params *CreateSubuserParam) (interface{}, err return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/subusers/api_delete_subuser.go b/rest/api/v3/subusers/api_delete_subuser.go index 9449f73e..25dd98f0 100644 --- a/rest/api/v3/subusers/api_delete_subuser.go +++ b/rest/api/v3/subusers/api_delete_subuser.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -64,5 +65,5 @@ func (c *ApiService) DeleteSubuser(params *DeleteSubuserParam) (interface{}, err return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/subusers/api_get_subuser_credit.go b/rest/api/v3/subusers/api_get_subuser_credit.go index 6e4e3998..21b2685d 100644 --- a/rest/api/v3/subusers/api_get_subuser_credit.go +++ b/rest/api/v3/subusers/api_get_subuser_credit.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -64,5 +65,5 @@ func (c *ApiService) GetSubuserCredit(params *GetSubuserCreditParam) (interface{ return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/subusers/api_list_monthly_stat.go b/rest/api/v3/subusers/api_list_monthly_stat.go index afe7d8dc..59b2be2a 100644 --- a/rest/api/v3/subusers/api_list_monthly_stat.go +++ b/rest/api/v3/subusers/api_list_monthly_stat.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -101,5 +102,5 @@ func (c *ApiService) ListMonthlyStat(params *ListMonthlyStatParam) (interface{}, return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/subusers/api_list_reputation.go b/rest/api/v3/subusers/api_list_reputation.go index 8b6bba0e..7596a15b 100644 --- a/rest/api/v3/subusers/api_list_reputation.go +++ b/rest/api/v3/subusers/api_list_reputation.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -55,5 +56,5 @@ func (c *ApiService) ListReputation(params *ListReputationParam) (interface{}, e return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/subusers/api_list_stat.go b/rest/api/v3/subusers/api_list_stat.go index 9896d1d2..b321a419 100644 --- a/rest/api/v3/subusers/api_list_stat.go +++ b/rest/api/v3/subusers/api_list_stat.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -101,5 +102,5 @@ func (c *ApiService) ListStat(params *ListStatParam) (interface{}, error) { return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/subusers/api_list_stat_sum.go b/rest/api/v3/subusers/api_list_stat_sum.go index 0f220c27..3ebaae68 100644 --- a/rest/api/v3/subusers/api_list_stat_sum.go +++ b/rest/api/v3/subusers/api_list_stat_sum.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -110,5 +111,5 @@ func (c *ApiService) ListStatSum(params *ListStatSumParam) (interface{}, error) return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/subusers/api_list_subuser.go b/rest/api/v3/subusers/api_list_subuser.go index 1c7a281a..80d7f2db 100644 --- a/rest/api/v3/subusers/api_list_subuser.go +++ b/rest/api/v3/subusers/api_list_subuser.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -100,5 +101,5 @@ func (c *ApiService) ListSubuser(params *ListSubuserParam) (interface{}, error) return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/subusers/api_list_subuser_monthly_stat.go b/rest/api/v3/subusers/api_list_subuser_monthly_stat.go index a0b694a0..77173b30 100644 --- a/rest/api/v3/subusers/api_list_subuser_monthly_stat.go +++ b/rest/api/v3/subusers/api_list_subuser_monthly_stat.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -103,5 +104,5 @@ func (c *ApiService) ListSubuserMonthlyStat(params *ListSubuserMonthlyStatParam) return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/subusers/api_update_subuser.go b/rest/api/v3/subusers/api_update_subuser.go index 2985531a..584c4b4f 100644 --- a/rest/api/v3/subusers/api_update_subuser.go +++ b/rest/api/v3/subusers/api_update_subuser.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -95,5 +96,5 @@ func (c *ApiService) UpdateSubuser(params *UpdateSubuserParam) (interface{}, err return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/subusers/api_update_subuser_credit.go b/rest/api/v3/subusers/api_update_subuser_credit.go index 11a0bfe2..147331bb 100644 --- a/rest/api/v3/subusers/api_update_subuser_credit.go +++ b/rest/api/v3/subusers/api_update_subuser_credit.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -79,5 +80,5 @@ func (c *ApiService) UpdateSubuserCredit(params *UpdateSubuserCreditParam) (inte return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/subusers/api_update_subuser_ip.go b/rest/api/v3/subusers/api_update_subuser_ip.go index 57320ccc..6ebf7a43 100644 --- a/rest/api/v3/subusers/api_update_subuser_ip.go +++ b/rest/api/v3/subusers/api_update_subuser_ip.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -79,5 +80,5 @@ func (c *ApiService) UpdateSubuserIp(params *UpdateSubuserIpParam) (interface{}, return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/subusers/api_update_subuser_remaining_credit.go b/rest/api/v3/subusers/api_update_subuser_remaining_credit.go index 1b17febb..ffdfed87 100644 --- a/rest/api/v3/subusers/api_update_subuser_remaining_credit.go +++ b/rest/api/v3/subusers/api_update_subuser_remaining_credit.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -79,5 +80,5 @@ func (c *ApiService) UpdateSubuserRemainingCredit(params *UpdateSubuserRemaining return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/subusers/api_update_subuser_website_access.go b/rest/api/v3/subusers/api_update_subuser_website_access.go index 38384cd9..621d8e7b 100644 --- a/rest/api/v3/subusers/api_update_subuser_website_access.go +++ b/rest/api/v3/subusers/api_update_subuser_website_access.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -71,5 +72,5 @@ func (c *ApiService) UpdateSubuserWebsiteAccess(params *UpdateSubuserWebsiteAcce return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/suppressions/.openapi-generator b/rest/api/v3/suppressions/.openapi-generator new file mode 100644 index 00000000..532d098b --- /dev/null +++ b/rest/api/v3/suppressions/.openapi-generator @@ -0,0 +1,136 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_add_suppression_to_asm_group.go +api_creat_asm_group.go +api_create_global_suppression.go +api_delete_asm_group.go +api_delete_global_suppression.go +api_delete_invalid_email.go +api_delete_invalid_emails.go +api_delete_spam_report.go +api_delete_spam_reports.go +api_delete_suppression_block.go +api_delete_suppression_blocks.go +api_delete_suppression_bounce.go +api_delete_suppression_bounces.go +api_delete_suppression_from_asm_group.go +api_get_asm_group.go +api_get_asm_suppression.go +api_get_global_suppression.go +api_get_invalid_email.go +api_get_spam_report.go +api_get_suppression_block.go +api_get_suppression_bounces.go +api_get_suppression_bounces_classifications.go +api_list_asm_group.go +api_list_asm_suppression.go +api_list_global_suppression.go +api_list_invalid_email.go +api_list_spam_report.go +api_list_suppression_block.go +api_list_suppression_bounces.go +api_list_suppression_bounces_classifications.go +api_list_suppression_from_asm_group.go +api_search_suppression_from_asm_group.go +api_service.go +api_update_asm_group.go +docs/Accept.md +docs/Accept1.md +docs/AddSuppressionToAsmGroup.md +docs/AddSuppressionToAsmGroup201Response.md +docs/BlocksResponseInner.md +docs/BounceResponse.md +docs/Classification.md +docs/Classification1.md +docs/CreatAsmGroup.md +docs/CreatAsmGroup201Response.md +docs/CreateGlobalSuppression.md +docs/CreateGlobalSuppression201Response.md +docs/DeleteAsmGroup.md +docs/DeleteGlobalSuppression.md +docs/DeleteInvalidEmail.md +docs/DeleteInvalidEmails.md +docs/DeleteInvalidEmailsRequest.md +docs/DeleteSpamReport.md +docs/DeleteSpamReports.md +docs/DeleteSpamReportsRequest.md +docs/DeleteSuppressionBlock.md +docs/DeleteSuppressionBlocks.md +docs/DeleteSuppressionBlocksRequest.md +docs/DeleteSuppressionBounce.md +docs/DeleteSuppressionBounces.md +docs/DeleteSuppressionBouncesRequest.md +docs/DeleteSuppressionFromAsmGroup.md +docs/ErrorResponse.md +docs/ErrorResponseErrorsInner.md +docs/GetAsmGroup.md +docs/GetAsmGroup200Response.md +docs/GetAsmSuppression.md +docs/GetAsmSuppression200Response.md +docs/GetAsmSuppression200ResponseSuppressionsInner.md +docs/GetGlobalSuppression.md +docs/GetInvalidEmail.md +docs/GetSpamReport.md +docs/GetSuppressionBlock.md +docs/GetSuppressionBounces.md +docs/GetSuppressionBouncesClassifications.md +docs/GetSuppressionBouncesClassifications200Response.md +docs/GetSuppressionBouncesClassifications200ResponseResultInner.md +docs/GetSuppressionBouncesClassifications200ResponseResultInnerStatsInner.md +docs/InvalidEmail.md +docs/ListAsmGroup.md +docs/ListAsmSuppression.md +docs/ListAsmSuppression200ResponseInner.md +docs/ListGlobalSuppression.md +docs/ListGlobalSuppression200ResponseInner.md +docs/ListInvalidEmail.md +docs/ListSpamReport.md +docs/ListSuppressionBlock.md +docs/ListSuppressionBounces.md +docs/ListSuppressionBouncesClassifications.md +docs/ListSuppressionBouncesClassifications200Response.md +docs/ListSuppressionBouncesClassifications200ResponseResultInner.md +docs/ListSuppressionBouncesClassifications200ResponseResultInnerStatsInner.md +docs/ListSuppressionFromAsmGroup.md +docs/RetrieveAGlobalSuppressionResponse.md +docs/SearchSuppressionFromAsmGroup.md +docs/SpamReportsResponseInner.md +docs/SuppressionGroup.md +docs/SuppressionGroupRequestBaseProps.md +docs/SuppressionsRequest.md +docs/UpdateAsmGroup.md +docs/UpdateAsmGroupRequest.md +model_accept.go +model_accept1.go +model_add_suppression_to_asm_group_201_response.go +model_blocks_response_inner.go +model_bounce_response.go +model_classification.go +model_classification1.go +model_creat_asm_group_201_response.go +model_create_global_suppression_201_response.go +model_delete_invalid_emails_request.go +model_delete_spam_reports_request.go +model_delete_suppression_blocks_request.go +model_delete_suppression_bounces_request.go +model_error_response.go +model_error_response_errors_inner.go +model_get_asm_group_200_response.go +model_get_asm_suppression_200_response.go +model_get_asm_suppression_200_response_suppressions_inner.go +model_get_suppression_bounces_classifications_200_response.go +model_get_suppression_bounces_classifications_200_response_result_inner.go +model_get_suppression_bounces_classifications_200_response_result_inner_stats_inner.go +model_invalid_email.go +model_list_asm_suppression_200_response_inner.go +model_list_global_suppression_200_response_inner.go +model_list_suppression_bounces_classifications_200_response.go +model_list_suppression_bounces_classifications_200_response_result_inner.go +model_list_suppression_bounces_classifications_200_response_result_inner_stats_inner.go +model_retrieve_a_global_suppression_response.go +model_spam_reports_response_inner.go +model_suppression_group.go +model_suppression_group_request_base_props.go +model_suppressions_request.go +model_update_asm_group_request.go diff --git a/rest/api/v3/suppressions/.openapi-generator-ignore b/rest/api/v3/suppressions/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/suppressions/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/suppressions/README.md b/rest/api/v3/suppressions/README.md new file mode 100644 index 00000000..20aeaa70 --- /dev/null +++ b/rest/api/v3/suppressions/README.md @@ -0,0 +1,130 @@ +# Go API client for + +The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. + +You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. + +SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. + +See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T16:57:38.487214+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AddSuppressionToAsmGroup* | [**AddSuppressionToAsmGroup**](docs/AddSuppressionToAsmGroup.md#addsuppressiontoasmgroup) | **Post** /v3/asm/groups/{GroupId}/suppressions | Add suppressions to a suppression group +*CreatAsmGroup* | [**CreatAsmGroup**](docs/CreatAsmGroup.md#creatasmgroup) | **Post** /v3/asm/groups | Create a new suppression group +*CreateGlobalSuppression* | [**CreateGlobalSuppression**](docs/CreateGlobalSuppression.md#createglobalsuppression) | **Post** /v3/asm/suppressions/global | Add recipient addresses to the global suppression group. +*DeleteAsmGroup* | [**DeleteAsmGroup**](docs/DeleteAsmGroup.md#deleteasmgroup) | **Delete** /v3/asm/groups/{GroupId} | Delete a Suppression Group +*DeleteGlobalSuppression* | [**DeleteGlobalSuppression**](docs/DeleteGlobalSuppression.md#deleteglobalsuppression) | **Delete** /v3/asm/suppressions/global/{Email} | Delete a Global Suppression +*DeleteInvalidEmail* | [**DeleteInvalidEmail**](docs/DeleteInvalidEmail.md#deleteinvalidemail) | **Delete** /v3/suppression/invalid_emails/{Email} | Delete a specific invalid email +*DeleteInvalidEmails* | [**DeleteInvalidEmails**](docs/DeleteInvalidEmails.md#deleteinvalidemails) | **Delete** /v3/suppression/invalid_emails | Delete invalid emails +*DeleteSpamReport* | [**DeleteSpamReport**](docs/DeleteSpamReport.md#deletespamreport) | **Delete** /v3/suppression/spam_reports/{Email} | Delete a specific spam report +*DeleteSpamReports* | [**DeleteSpamReports**](docs/DeleteSpamReports.md#deletespamreports) | **Delete** /v3/suppression/spam_reports | Delete spam reports +*DeleteSuppressionBlock* | [**DeleteSuppressionBlock**](docs/DeleteSuppressionBlock.md#deletesuppressionblock) | **Delete** /v3/suppression/blocks/{Email} | Delete a specific block +*DeleteSuppressionBlocks* | [**DeleteSuppressionBlocks**](docs/DeleteSuppressionBlocks.md#deletesuppressionblocks) | **Delete** /v3/suppression/blocks | Delete blocks +*DeleteSuppressionBounce* | [**DeleteSuppressionBounce**](docs/DeleteSuppressionBounce.md#deletesuppressionbounce) | **Delete** /v3/suppression/bounces/{Email} | Delete a bounce +*DeleteSuppressionBounces* | [**DeleteSuppressionBounces**](docs/DeleteSuppressionBounces.md#deletesuppressionbounces) | **Delete** /v3/suppression/bounces | Delete bounces +*DeleteSuppressionFromAsmGroup* | [**DeleteSuppressionFromAsmGroup**](docs/DeleteSuppressionFromAsmGroup.md#deletesuppressionfromasmgroup) | **Delete** /v3/asm/groups/{GroupId}/suppressions/{Email} | Delete a suppression from a suppression group +*GetAsmGroup* | [**GetAsmGroup**](docs/GetAsmGroup.md#getasmgroup) | **Get** /v3/asm/groups/{GroupId} | Get information on a single suppression group. +*GetAsmSuppression* | [**GetAsmSuppression**](docs/GetAsmSuppression.md#getasmsuppression) | **Get** /v3/asm/suppressions/{Email} | Retrieve all suppression groups for an email address +*GetGlobalSuppression* | [**GetGlobalSuppression**](docs/GetGlobalSuppression.md#getglobalsuppression) | **Get** /v3/asm/suppressions/global/{Email} | Retrieve a Global Suppression +*GetInvalidEmail* | [**GetInvalidEmail**](docs/GetInvalidEmail.md#getinvalidemail) | **Get** /v3/suppression/invalid_emails/{Email} | Retrieve a specific invalid email +*GetSpamReport* | [**GetSpamReport**](docs/GetSpamReport.md#getspamreport) | **Get** /v3/suppression/spam_reports/{Email} | Retrieve a specific spam report +*GetSuppressionBlock* | [**GetSuppressionBlock**](docs/GetSuppressionBlock.md#getsuppressionblock) | **Get** /v3/suppression/blocks/{Email} | Retrieve a specific block +*GetSuppressionBounces* | [**GetSuppressionBounces**](docs/GetSuppressionBounces.md#getsuppressionbounces) | **Get** /v3/suppression/bounces/{Email} | Retrieve a Bounce +*GetSuppressionBouncesClassifications* | [**GetSuppressionBouncesClassifications**](docs/GetSuppressionBouncesClassifications.md#getsuppressionbouncesclassifications) | **Get** /v3/suppression/bounces/classifications/{Classification} | Retrieve bounce classification over time by domain stats +*ListAsmGroup* | [**ListAsmGroup**](docs/ListAsmGroup.md#listasmgroup) | **Get** /v3/asm/groups | Retrieve all suppression groups associated with the user. +*ListAsmSuppression* | [**ListAsmSuppression**](docs/ListAsmSuppression.md#listasmsuppression) | **Get** /v3/asm/suppressions | Retrieve all suppressions +*ListGlobalSuppression* | [**ListGlobalSuppression**](docs/ListGlobalSuppression.md#listglobalsuppression) | **Get** /v3/suppression/unsubscribes | Retrieve all global suppressions +*ListInvalidEmail* | [**ListInvalidEmail**](docs/ListInvalidEmail.md#listinvalidemail) | **Get** /v3/suppression/invalid_emails | Retrieve all invalid emails +*ListSpamReport* | [**ListSpamReport**](docs/ListSpamReport.md#listspamreport) | **Get** /v3/suppression/spam_reports | Retrieve all spam reports +*ListSuppressionBlock* | [**ListSuppressionBlock**](docs/ListSuppressionBlock.md#listsuppressionblock) | **Get** /v3/suppression/blocks | Retrieve all blocks +*ListSuppressionBounces* | [**ListSuppressionBounces**](docs/ListSuppressionBounces.md#listsuppressionbounces) | **Get** /v3/suppression/bounces | Retrieve all bounces +*ListSuppressionBouncesClassifications* | [**ListSuppressionBouncesClassifications**](docs/ListSuppressionBouncesClassifications.md#listsuppressionbouncesclassifications) | **Get** /v3/suppression/bounces/classifications | Retrieve bounce classification totals +*ListSuppressionFromAsmGroup* | [**ListSuppressionFromAsmGroup**](docs/ListSuppressionFromAsmGroup.md#listsuppressionfromasmgroup) | **Get** /v3/asm/groups/{GroupId}/suppressions | Retrieve all suppressions for a suppression group +*SearchSuppressionFromAsmGroup* | [**SearchSuppressionFromAsmGroup**](docs/SearchSuppressionFromAsmGroup.md#searchsuppressionfromasmgroup) | **Post** /v3/asm/groups/{GroupId}/suppressions/search | Search for suppressions within a group +*UpdateAsmGroup* | [**UpdateAsmGroup**](docs/UpdateAsmGroup.md#updateasmgroup) | **Patch** /v3/asm/groups/{GroupId} | Update a suppression group. + + +## Documentation For Models + + - [Accept](Accept.md) + - [Accept1](Accept1.md) + - [AddSuppressionToAsmGroup201Response](AddSuppressionToAsmGroup201Response.md) + - [BlocksResponseInner](BlocksResponseInner.md) + - [BounceResponse](BounceResponse.md) + - [Classification](Classification.md) + - [Classification1](Classification1.md) + - [CreatAsmGroup201Response](CreatAsmGroup201Response.md) + - [CreateGlobalSuppression201Response](CreateGlobalSuppression201Response.md) + - [DeleteInvalidEmailsRequest](DeleteInvalidEmailsRequest.md) + - [DeleteSpamReportsRequest](DeleteSpamReportsRequest.md) + - [DeleteSuppressionBlocksRequest](DeleteSuppressionBlocksRequest.md) + - [DeleteSuppressionBouncesRequest](DeleteSuppressionBouncesRequest.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [GetAsmGroup200Response](GetAsmGroup200Response.md) + - [GetAsmSuppression200Response](GetAsmSuppression200Response.md) + - [GetAsmSuppression200ResponseSuppressionsInner](GetAsmSuppression200ResponseSuppressionsInner.md) + - [GetSuppressionBouncesClassifications200Response](GetSuppressionBouncesClassifications200Response.md) + - [GetSuppressionBouncesClassifications200ResponseResultInner](GetSuppressionBouncesClassifications200ResponseResultInner.md) + - [GetSuppressionBouncesClassifications200ResponseResultInnerStatsInner](GetSuppressionBouncesClassifications200ResponseResultInnerStatsInner.md) + - [InvalidEmail](InvalidEmail.md) + - [ListAsmSuppression200ResponseInner](ListAsmSuppression200ResponseInner.md) + - [ListGlobalSuppression200ResponseInner](ListGlobalSuppression200ResponseInner.md) + - [ListSuppressionBouncesClassifications200Response](ListSuppressionBouncesClassifications200Response.md) + - [ListSuppressionBouncesClassifications200ResponseResultInner](ListSuppressionBouncesClassifications200ResponseResultInner.md) + - [ListSuppressionBouncesClassifications200ResponseResultInnerStatsInner](ListSuppressionBouncesClassifications200ResponseResultInnerStatsInner.md) + - [RetrieveAGlobalSuppressionResponse](RetrieveAGlobalSuppressionResponse.md) + - [SpamReportsResponseInner](SpamReportsResponseInner.md) + - [SuppressionGroup](SuppressionGroup.md) + - [SuppressionGroupRequestBaseProps](SuppressionGroupRequestBaseProps.md) + - [SuppressionsRequest](SuppressionsRequest.md) + - [UpdateAsmGroupRequest](UpdateAsmGroupRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/suppressions/api_add_suppression_to_asm_group.go b/rest/api/v3/suppressions/api_add_suppression_to_asm_group.go new file mode 100644 index 00000000..f8d9279f --- /dev/null +++ b/rest/api/v3/suppressions/api_add_suppression_to_asm_group.go @@ -0,0 +1,85 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type AddSuppressionToAsmGroupParam struct { + // The id of the unsubscribe group that you are adding suppressions to. + GroupId *string `json:"group_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + SuppressionsRequest *SuppressionsRequest `json:"SuppressionsRequest,omitempty"` +} + +func (params *AddSuppressionToAsmGroupParam) SetGroupId(GroupId string) *AddSuppressionToAsmGroupParam { + params.GroupId = &GroupId + return params +} +func (params *AddSuppressionToAsmGroupParam) SetOnbehalfof(Onbehalfof string) *AddSuppressionToAsmGroupParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *AddSuppressionToAsmGroupParam) SetSuppressionsRequest(SuppressionsRequest SuppressionsRequest) *AddSuppressionToAsmGroupParam { + params.SuppressionsRequest = &SuppressionsRequest + return params +} + +// **This endpoint allows you to add email addresses to an unsubscribe group.** If you attempt to add suppressions to a group that has been deleted or does not exist, the suppressions will be added to the global suppressions list. +func (c *ApiService) AddSuppressionToAsmGroup(params *AddSuppressionToAsmGroupParam) (interface{}, error) { + path := "/v3/asm/groups/{GroupId}/suppressions" + if params != nil && params.GroupId != nil { + path = strings.Replace(path, "{"+"GroupId"+"}", *params.GroupId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SuppressionsRequest != nil { + b, err := json.Marshal(*params.SuppressionsRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &AddSuppressionToAsmGroup201Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_creat_asm_group.go b/rest/api/v3/suppressions/api_creat_asm_group.go new file mode 100644 index 00000000..10c213c7 --- /dev/null +++ b/rest/api/v3/suppressions/api_creat_asm_group.go @@ -0,0 +1,74 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreatAsmGroupParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + SuppressionGroupRequestBaseProps *SuppressionGroupRequestBaseProps `json:"SuppressionGroupRequestBaseProps,omitempty"` +} + +func (params *CreatAsmGroupParam) SetOnbehalfof(Onbehalfof string) *CreatAsmGroupParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreatAsmGroupParam) SetSuppressionGroupRequestBaseProps(SuppressionGroupRequestBaseProps SuppressionGroupRequestBaseProps) *CreatAsmGroupParam { + params.SuppressionGroupRequestBaseProps = &SuppressionGroupRequestBaseProps + return params +} + +// **This endpoint allows you to create a new suppression group.** To add an email address to the suppression group, [create a Suppression](https://docs.sendgrid.com/api-reference/suppressions-suppressions/add-suppressions-to-a-suppression-group). +func (c *ApiService) CreatAsmGroup(params *CreatAsmGroupParam) (interface{}, error) { + path := "/v3/asm/groups" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SuppressionGroupRequestBaseProps != nil { + b, err := json.Marshal(*params.SuppressionGroupRequestBaseProps) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &CreatAsmGroup201Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_create_global_suppression.go b/rest/api/v3/suppressions/api_create_global_suppression.go new file mode 100644 index 00000000..694ac461 --- /dev/null +++ b/rest/api/v3/suppressions/api_create_global_suppression.go @@ -0,0 +1,74 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateGlobalSuppressionParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + SuppressionsRequest *SuppressionsRequest `json:"SuppressionsRequest,omitempty"` +} + +func (params *CreateGlobalSuppressionParam) SetOnbehalfof(Onbehalfof string) *CreateGlobalSuppressionParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateGlobalSuppressionParam) SetSuppressionsRequest(SuppressionsRequest SuppressionsRequest) *CreateGlobalSuppressionParam { + params.SuppressionsRequest = &SuppressionsRequest + return params +} + +// **This endpoint allows you to add one or more email addresses to the global suppressions group.** +func (c *ApiService) CreateGlobalSuppression(params *CreateGlobalSuppressionParam) (interface{}, error) { + path := "/v3/asm/suppressions/global" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SuppressionsRequest != nil { + b, err := json.Marshal(*params.SuppressionsRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &CreateGlobalSuppression201Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_delete_asm_group.go b/rest/api/v3/suppressions/api_delete_asm_group.go new file mode 100644 index 00000000..21d06268 --- /dev/null +++ b/rest/api/v3/suppressions/api_delete_asm_group.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteAsmGroupParam struct { + // The ID of the suppression group you would like to retrieve. + GroupId *string `json:"group_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteAsmGroupParam) SetGroupId(GroupId string) *DeleteAsmGroupParam { + params.GroupId = &GroupId + return params +} +func (params *DeleteAsmGroupParam) SetOnbehalfof(Onbehalfof string) *DeleteAsmGroupParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete a suppression group.** If a recipient uses the \"one-click unsubscribe\" option on an email associated with a deleted group, that recipient will be added to the global suppression list. Deleting a suppression group will remove the suppression, meaning email will once again be sent to the previously suppressed addresses. This should be avoided unless a recipient indicates they wish to receive email from you again. You can use our [bypass filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) to deliver messages to otherwise suppressed addresses when exceptions are required. +func (c *ApiService) DeleteAsmGroup(params *DeleteAsmGroupParam) (interface{}, error) { + path := "/v3/asm/groups/{GroupId}" + if params != nil && params.GroupId != nil { + path = strings.Replace(path, "{"+"GroupId"+"}", *params.GroupId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_delete_global_suppression.go b/rest/api/v3/suppressions/api_delete_global_suppression.go new file mode 100644 index 00000000..466d5123 --- /dev/null +++ b/rest/api/v3/suppressions/api_delete_global_suppression.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteGlobalSuppressionParam struct { + // The email address of the global suppression you want to retrieve. Or, if you want to check if an email address is on the global suppressions list, enter that email address here. + Email *string `json:"email"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteGlobalSuppressionParam) SetEmail(Email string) *DeleteGlobalSuppressionParam { + params.Email = &Email + return params +} +func (params *DeleteGlobalSuppressionParam) SetOnbehalfof(Onbehalfof string) *DeleteGlobalSuppressionParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to remove an email address from the global suppressions group.** Deleting a suppression group will remove the suppression, meaning email will once again be sent to the previously suppressed addresses. This should be avoided unless a recipient indicates they wish to receive email from you again. You can use our [bypass filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) to deliver messages to otherwise suppressed addresses when exceptions are required. +func (c *ApiService) DeleteGlobalSuppression(params *DeleteGlobalSuppressionParam) (interface{}, error) { + path := "/v3/asm/suppressions/global/{Email}" + if params != nil && params.Email != nil { + path = strings.Replace(path, "{"+"Email"+"}", *params.Email, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_delete_invalid_email.go b/rest/api/v3/suppressions/api_delete_invalid_email.go new file mode 100644 index 00000000..ab59106b --- /dev/null +++ b/rest/api/v3/suppressions/api_delete_invalid_email.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteInvalidEmailParam struct { + // The specific email address of the invalid email entry that you want to retrieve. + Email *string `json:"email"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteInvalidEmailParam) SetEmail(Email string) *DeleteInvalidEmailParam { + params.Email = &Email + return params +} +func (params *DeleteInvalidEmailParam) SetOnbehalfof(Onbehalfof string) *DeleteInvalidEmailParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to remove a specific email address from the invalid email address list.** +func (c *ApiService) DeleteInvalidEmail(params *DeleteInvalidEmailParam) (interface{}, error) { + path := "/v3/suppression/invalid_emails/{Email}" + if params != nil && params.Email != nil { + path = strings.Replace(path, "{"+"Email"+"}", *params.Email, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_delete_invalid_emails.go b/rest/api/v3/suppressions/api_delete_invalid_emails.go new file mode 100644 index 00000000..ae87c5c9 --- /dev/null +++ b/rest/api/v3/suppressions/api_delete_invalid_emails.go @@ -0,0 +1,74 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type DeleteInvalidEmailsParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + DeleteInvalidEmailsRequest *DeleteInvalidEmailsRequest `json:"DeleteInvalidEmailsRequest,omitempty"` +} + +func (params *DeleteInvalidEmailsParam) SetOnbehalfof(Onbehalfof string) *DeleteInvalidEmailsParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *DeleteInvalidEmailsParam) SetDeleteInvalidEmailsRequest(DeleteInvalidEmailsRequest DeleteInvalidEmailsRequest) *DeleteInvalidEmailsParam { + params.DeleteInvalidEmailsRequest = &DeleteInvalidEmailsRequest + return params +} + +// **This endpoint allows you to remove email addresses from your invalid email address list.** There are two options for deleting invalid email addresses: 1) You can delete all invalid email addresses by setting `delete_all` to true in the request body. 2) You can delete some invalid email addresses by specifying certain addresses in an array in the request body. +func (c *ApiService) DeleteInvalidEmails(params *DeleteInvalidEmailsParam) (interface{}, error) { + path := "/v3/suppression/invalid_emails" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.DeleteInvalidEmailsRequest != nil { + b, err := json.Marshal(*params.DeleteInvalidEmailsRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_delete_spam_report.go b/rest/api/v3/suppressions/api_delete_spam_report.go new file mode 100644 index 00000000..683c6510 --- /dev/null +++ b/rest/api/v3/suppressions/api_delete_spam_report.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteSpamReportParam struct { + // The email address of a specific spam report that you want to retrieve. + Email *string `json:"email"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteSpamReportParam) SetEmail(Email string) *DeleteSpamReportParam { + params.Email = &Email + return params +} +func (params *DeleteSpamReportParam) SetOnbehalfof(Onbehalfof string) *DeleteSpamReportParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete a specific spam report by email address.** Deleting a spam report will remove the suppression, meaning email will once again be sent to the previously suppressed address. This should be avoided unless a recipient indicates they wish to receive email from you again. You can use our [bypass filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) to deliver messages to otherwise suppressed addresses when exceptions are required. +func (c *ApiService) DeleteSpamReport(params *DeleteSpamReportParam) (interface{}, error) { + path := "/v3/suppression/spam_reports/{Email}" + if params != nil && params.Email != nil { + path = strings.Replace(path, "{"+"Email"+"}", *params.Email, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_delete_spam_reports.go b/rest/api/v3/suppressions/api_delete_spam_reports.go new file mode 100644 index 00000000..e48b1a4b --- /dev/null +++ b/rest/api/v3/suppressions/api_delete_spam_reports.go @@ -0,0 +1,74 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type DeleteSpamReportsParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + DeleteSpamReportsRequest *DeleteSpamReportsRequest `json:"DeleteSpamReportsRequest,omitempty"` +} + +func (params *DeleteSpamReportsParam) SetOnbehalfof(Onbehalfof string) *DeleteSpamReportsParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *DeleteSpamReportsParam) SetDeleteSpamReportsRequest(DeleteSpamReportsRequest DeleteSpamReportsRequest) *DeleteSpamReportsParam { + params.DeleteSpamReportsRequest = &DeleteSpamReportsRequest + return params +} + +// **This endpoint allows you to delete your spam reports.** Deleting a spam report will remove the suppression, meaning email will once again be sent to the previously suppressed address. This should be avoided unless a recipient indicates they wish to receive email from you again. You can use our [bypass filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) to deliver messages to otherwise suppressed addresses when exceptions are required. There are two options for deleting spam reports: 1. You can delete all spam reports by setting the `delete_all` field to `true` in the request body. 2. You can delete a list of select spam reports by specifying the email addresses in the `emails` array of the request body. +func (c *ApiService) DeleteSpamReports(params *DeleteSpamReportsParam) (interface{}, error) { + path := "/v3/suppression/spam_reports" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.DeleteSpamReportsRequest != nil { + b, err := json.Marshal(*params.DeleteSpamReportsRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_delete_suppression_block.go b/rest/api/v3/suppressions/api_delete_suppression_block.go new file mode 100644 index 00000000..0f4fbe1f --- /dev/null +++ b/rest/api/v3/suppressions/api_delete_suppression_block.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteSuppressionBlockParam struct { + // The email address of the specific block. + Email *string `json:"email"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteSuppressionBlockParam) SetEmail(Email string) *DeleteSuppressionBlockParam { + params.Email = &Email + return params +} +func (params *DeleteSuppressionBlockParam) SetOnbehalfof(Onbehalfof string) *DeleteSuppressionBlockParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete a specific email address from your blocks list.** +func (c *ApiService) DeleteSuppressionBlock(params *DeleteSuppressionBlockParam) (interface{}, error) { + path := "/v3/suppression/blocks/{Email}" + if params != nil && params.Email != nil { + path = strings.Replace(path, "{"+"Email"+"}", *params.Email, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_delete_suppression_blocks.go b/rest/api/v3/suppressions/api_delete_suppression_blocks.go new file mode 100644 index 00000000..d6e57975 --- /dev/null +++ b/rest/api/v3/suppressions/api_delete_suppression_blocks.go @@ -0,0 +1,74 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type DeleteSuppressionBlocksParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + DeleteSuppressionBlocksRequest *DeleteSuppressionBlocksRequest `json:"DeleteSuppressionBlocksRequest,omitempty"` +} + +func (params *DeleteSuppressionBlocksParam) SetOnbehalfof(Onbehalfof string) *DeleteSuppressionBlocksParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *DeleteSuppressionBlocksParam) SetDeleteSuppressionBlocksRequest(DeleteSuppressionBlocksRequest DeleteSuppressionBlocksRequest) *DeleteSuppressionBlocksParam { + params.DeleteSuppressionBlocksRequest = &DeleteSuppressionBlocksRequest + return params +} + +// **This endpoint allows you to delete all email addresses on your blocks list.** There are two options for deleting blocked emails: 1. You can delete all blocked emails by setting `delete_all` to `true` in the request body. 2. You can delete a selection of blocked emails by specifying the email addresses in the `emails` array of the request body. +func (c *ApiService) DeleteSuppressionBlocks(params *DeleteSuppressionBlocksParam) (interface{}, error) { + path := "/v3/suppression/blocks" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.DeleteSuppressionBlocksRequest != nil { + b, err := json.Marshal(*params.DeleteSuppressionBlocksRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_delete_suppression_bounce.go b/rest/api/v3/suppressions/api_delete_suppression_bounce.go new file mode 100644 index 00000000..e231d827 --- /dev/null +++ b/rest/api/v3/suppressions/api_delete_suppression_bounce.go @@ -0,0 +1,78 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteSuppressionBounceParam struct { + // The email address you would like to remove from the bounce list. + Email *string `json:"email"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteSuppressionBounceParam) SetEmail(Email string) *DeleteSuppressionBounceParam { + params.Email = &Email + return params +} +func (params *DeleteSuppressionBounceParam) SetOnbehalfof(Onbehalfof string) *DeleteSuppressionBounceParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to remove an email address from your bounce list.** +func (c *ApiService) DeleteSuppressionBounce(params *DeleteSuppressionBounceParam) (interface{}, error) { + path := "/v3/suppression/bounces/{Email}" + if params != nil && params.Email != nil { + path = strings.Replace(path, "{"+"Email"+"}", *params.Email, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_delete_suppression_bounces.go b/rest/api/v3/suppressions/api_delete_suppression_bounces.go new file mode 100644 index 00000000..625a49eb --- /dev/null +++ b/rest/api/v3/suppressions/api_delete_suppression_bounces.go @@ -0,0 +1,74 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type DeleteSuppressionBouncesParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + DeleteSuppressionBouncesRequest *DeleteSuppressionBouncesRequest `json:"DeleteSuppressionBouncesRequest,omitempty"` +} + +func (params *DeleteSuppressionBouncesParam) SetOnbehalfof(Onbehalfof string) *DeleteSuppressionBouncesParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *DeleteSuppressionBouncesParam) SetDeleteSuppressionBouncesRequest(DeleteSuppressionBouncesRequest DeleteSuppressionBouncesRequest) *DeleteSuppressionBouncesParam { + params.DeleteSuppressionBouncesRequest = &DeleteSuppressionBouncesRequest + return params +} + +// **This endpoint allows you to delete all emails on your bounces list.** There are two options for deleting bounced emails: 1. You can delete all bounced emails by setting `delete_all` to `true` in the request body. 2. You can delete a selection of bounced emails by specifying the email addresses in the `emails` array of the request body. **WARNING:** You can not have both `emails` and `delete_all` set. +func (c *ApiService) DeleteSuppressionBounces(params *DeleteSuppressionBouncesParam) (interface{}, error) { + path := "/v3/suppression/bounces" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.DeleteSuppressionBouncesRequest != nil { + b, err := json.Marshal(*params.DeleteSuppressionBouncesRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_delete_suppression_from_asm_group.go b/rest/api/v3/suppressions/api_delete_suppression_from_asm_group.go new file mode 100644 index 00000000..e7616089 --- /dev/null +++ b/rest/api/v3/suppressions/api_delete_suppression_from_asm_group.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "net/http" + "net/url" + + "strings" +) + +type DeleteSuppressionFromAsmGroupParam struct { + // The id of the suppression group that you are removing an email address from. + GroupId *string `json:"group_id"` + // The email address that you want to remove from the suppression group. + Email *string `json:"email"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteSuppressionFromAsmGroupParam) SetGroupId(GroupId string) *DeleteSuppressionFromAsmGroupParam { + params.GroupId = &GroupId + return params +} +func (params *DeleteSuppressionFromAsmGroupParam) SetEmail(Email string) *DeleteSuppressionFromAsmGroupParam { + params.Email = &Email + return params +} +func (params *DeleteSuppressionFromAsmGroupParam) SetOnbehalfof(Onbehalfof string) *DeleteSuppressionFromAsmGroupParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to remove a suppressed email address from the given suppression group.** Removing an address will remove the suppression, meaning email will once again be sent to the previously suppressed addresses. This should be avoided unless a recipient indicates they wish to receive email from you again. You can use our [bypass filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) to deliver messages to otherwise suppressed addresses when exceptions are required. +func (c *ApiService) DeleteSuppressionFromAsmGroup(params *DeleteSuppressionFromAsmGroupParam) (interface{}, error) { + path := "/v3/asm/groups/{GroupId}/suppressions/{Email}" + if params != nil && params.GroupId != nil { + path = strings.Replace(path, "{"+"GroupId"+"}", *params.GroupId, -1) + } + if params != nil && params.Email != nil { + path = strings.Replace(path, "{"+"Email"+"}", *params.Email, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_get_asm_group.go b/rest/api/v3/suppressions/api_get_asm_group.go new file mode 100644 index 00000000..c6a8320a --- /dev/null +++ b/rest/api/v3/suppressions/api_get_asm_group.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetAsmGroupParam struct { + // The ID of the suppression group you would like to retrieve. + GroupId *string `json:"group_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetAsmGroupParam) SetGroupId(GroupId string) *GetAsmGroupParam { + params.GroupId = &GroupId + return params +} +func (params *GetAsmGroupParam) SetOnbehalfof(Onbehalfof string) *GetAsmGroupParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a single suppression group.** +func (c *ApiService) GetAsmGroup(params *GetAsmGroupParam) (interface{}, error) { + path := "/v3/asm/groups/{GroupId}" + if params != nil && params.GroupId != nil { + path = strings.Replace(path, "{"+"GroupId"+"}", *params.GroupId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetAsmGroup200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_get_asm_suppression.go b/rest/api/v3/suppressions/api_get_asm_suppression.go new file mode 100644 index 00000000..0ad69eb2 --- /dev/null +++ b/rest/api/v3/suppressions/api_get_asm_suppression.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetAsmSuppressionParam struct { + // The email address that you want to search suppression groups for. + Email *string `json:"email"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetAsmSuppressionParam) SetEmail(Email string) *GetAsmSuppressionParam { + params.Email = &Email + return params +} +func (params *GetAsmSuppressionParam) SetOnbehalfof(Onbehalfof string) *GetAsmSuppressionParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint returns a list of all groups from which the given email address has been unsubscribed.** +func (c *ApiService) GetAsmSuppression(params *GetAsmSuppressionParam) (interface{}, error) { + path := "/v3/asm/suppressions/{Email}" + if params != nil && params.Email != nil { + path = strings.Replace(path, "{"+"Email"+"}", *params.Email, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetAsmSuppression200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_get_global_suppression.go b/rest/api/v3/suppressions/api_get_global_suppression.go new file mode 100644 index 00000000..42864c0d --- /dev/null +++ b/rest/api/v3/suppressions/api_get_global_suppression.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetGlobalSuppressionParam struct { + // The email address of the global suppression you want to retrieve. Or, if you want to check if an email address is on the global suppressions list, enter that email address here. + Email *string `json:"email"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetGlobalSuppressionParam) SetEmail(Email string) *GetGlobalSuppressionParam { + params.Email = &Email + return params +} +func (params *GetGlobalSuppressionParam) SetOnbehalfof(Onbehalfof string) *GetGlobalSuppressionParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a global suppression. You can also use this endpoint to confirm if an email address is already globally suppresed.** If the email address you include in the URL path parameter `{email}` is already globally suppressed, the response will include that email address. If the address you enter for `{email}` is not globally suppressed, an empty JSON object `{}` will be returned. +func (c *ApiService) GetGlobalSuppression(params *GetGlobalSuppressionParam) (interface{}, error) { + path := "/v3/asm/suppressions/global/{Email}" + if params != nil && params.Email != nil { + path = strings.Replace(path, "{"+"Email"+"}", *params.Email, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &RetrieveAGlobalSuppressionResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_get_invalid_email.go b/rest/api/v3/suppressions/api_get_invalid_email.go new file mode 100644 index 00000000..912f049e --- /dev/null +++ b/rest/api/v3/suppressions/api_get_invalid_email.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetInvalidEmailParam struct { + // The specific email address of the invalid email entry that you want to retrieve. + Email *string `json:"email"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetInvalidEmailParam) SetEmail(Email string) *GetInvalidEmailParam { + params.Email = &Email + return params +} +func (params *GetInvalidEmailParam) SetOnbehalfof(Onbehalfof string) *GetInvalidEmailParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a specific invalid email addresses.** +func (c *ApiService) GetInvalidEmail(params *GetInvalidEmailParam) (interface{}, error) { + path := "/v3/suppression/invalid_emails/{Email}" + if params != nil && params.Email != nil { + path = strings.Replace(path, "{"+"Email"+"}", *params.Email, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]InvalidEmail{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_get_spam_report.go b/rest/api/v3/suppressions/api_get_spam_report.go new file mode 100644 index 00000000..d82e92f2 --- /dev/null +++ b/rest/api/v3/suppressions/api_get_spam_report.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetSpamReportParam struct { + // The email address of a specific spam report that you want to retrieve. + Email *string `json:"email"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetSpamReportParam) SetEmail(Email string) *GetSpamReportParam { + params.Email = &Email + return params +} +func (params *GetSpamReportParam) SetOnbehalfof(Onbehalfof string) *GetSpamReportParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a specific spam report by email address.** +func (c *ApiService) GetSpamReport(params *GetSpamReportParam) (interface{}, error) { + path := "/v3/suppression/spam_reports/{Email}" + if params != nil && params.Email != nil { + path = strings.Replace(path, "{"+"Email"+"}", *params.Email, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]SpamReportsResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_get_suppression_block.go b/rest/api/v3/suppressions/api_get_suppression_block.go new file mode 100644 index 00000000..54164d34 --- /dev/null +++ b/rest/api/v3/suppressions/api_get_suppression_block.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetSuppressionBlockParam struct { + // The email address of the specific block. + Email *string `json:"email"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetSuppressionBlockParam) SetEmail(Email string) *GetSuppressionBlockParam { + params.Email = &Email + return params +} +func (params *GetSuppressionBlockParam) SetOnbehalfof(Onbehalfof string) *GetSuppressionBlockParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a specific email address from your blocks list.** +func (c *ApiService) GetSuppressionBlock(params *GetSuppressionBlockParam) (interface{}, error) { + path := "/v3/suppression/blocks/{Email}" + if params != nil && params.Email != nil { + path = strings.Replace(path, "{"+"Email"+"}", *params.Email, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]BlocksResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_get_suppression_bounces.go b/rest/api/v3/suppressions/api_get_suppression_bounces.go new file mode 100644 index 00000000..4e3dcbbe --- /dev/null +++ b/rest/api/v3/suppressions/api_get_suppression_bounces.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetSuppressionBouncesParam struct { + // The email address of the specific bounce you would like to retrieve + Email *string `json:"email"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetSuppressionBouncesParam) SetEmail(Email string) *GetSuppressionBouncesParam { + params.Email = &Email + return params +} +func (params *GetSuppressionBouncesParam) SetOnbehalfof(Onbehalfof string) *GetSuppressionBouncesParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a specific bounce by email address.** +func (c *ApiService) GetSuppressionBounces(params *GetSuppressionBouncesParam) (interface{}, error) { + path := "/v3/suppression/bounces/{Email}" + if params != nil && params.Email != nil { + path = strings.Replace(path, "{"+"Email"+"}", *params.Email, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]BounceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_get_suppression_bounces_classifications.go b/rest/api/v3/suppressions/api_get_suppression_bounces_classifications.go new file mode 100644 index 00000000..83e51175 --- /dev/null +++ b/rest/api/v3/suppressions/api_get_suppression_bounces_classifications.go @@ -0,0 +1,99 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type GetSuppressionBouncesClassificationsParam struct { + // Specifies the content type to be returned by this endpoint. You can choose to receive CSV-formatted data by passing \"text/csv\" in the header. + Accept *Accept1 `json:"Accept"` + // The classification you want to filter by. Possible values are: `Content`, `Frequency or Volume Too High`, `Invalid Address`, `Mailbox Unavailable`, `Reputation`, `Technical Failure`, `Unclassified`. + Classification *Classification1 `json:"classification"` + // The start of the time range, in YYYY-MM-DD format, when a bounce was created (inclusive). + StartDate *string `json:"start_date,omitempty"` + // The end of the time range, in YYYY-MM-DD format, when a bounce was created (inclusive). + EndDate *string `json:"end_date,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetSuppressionBouncesClassificationsParam) SetAccept(Accept Accept1) *GetSuppressionBouncesClassificationsParam { + params.Accept = &Accept + return params +} +func (params *GetSuppressionBouncesClassificationsParam) SetClassification(Classification Classification1) *GetSuppressionBouncesClassificationsParam { + params.Classification = &Classification + return params +} +func (params *GetSuppressionBouncesClassificationsParam) SetStartDate(StartDate string) *GetSuppressionBouncesClassificationsParam { + params.StartDate = &StartDate + return params +} +func (params *GetSuppressionBouncesClassificationsParam) SetEndDate(EndDate string) *GetSuppressionBouncesClassificationsParam { + params.EndDate = &EndDate + return params +} +func (params *GetSuppressionBouncesClassificationsParam) SetOnbehalfof(Onbehalfof string) *GetSuppressionBouncesClassificationsParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// This endpoint will return the number of bounces for the classification specified in descending order for each day. You can retrieve the bounce classification totals in CSV format by specifying `\"text/csv\"` in the Accept header. +func (c *ApiService) GetSuppressionBouncesClassifications(params *GetSuppressionBouncesClassificationsParam) (interface{}, error) { + path := "/v3/suppression/bounces/classifications/{Classification}" + if params != nil && params.Classification != nil { + path = strings.Replace(path, "{"+"Classification"+"}", fmt.Sprint(*params.Classification), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartDate != nil { + data.Set("start_date", *params.StartDate) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", *params.EndDate) + } + + if params != nil && params.Accept != nil { + headers["Accept"] = *params.Accept + } + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetSuppressionBouncesClassifications200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_list_asm_group.go b/rest/api/v3/suppressions/api_list_asm_group.go new file mode 100644 index 00000000..c662d163 --- /dev/null +++ b/rest/api/v3/suppressions/api_list_asm_group.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListAsmGroupParam struct { + // The ID of the suppression group(s) you want to retrieve. + Id *int32 `json:"id,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListAsmGroupParam) SetId(Id int32) *ListAsmGroupParam { + params.Id = &Id + return params +} +func (params *ListAsmGroupParam) SetOnbehalfof(Onbehalfof string) *ListAsmGroupParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a list of all suppression groups created by this user.** This endpoint can also return information for multiple group IDs that you include in your request. To add a group ID to your request, simply append `?id=123456&id=123456`, with the appropriate group IDs. +func (c *ApiService) ListAsmGroup(params *ListAsmGroupParam) (interface{}, error) { + path := "/v3/asm/groups" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Id != nil { + data.Set("id", fmt.Sprint(*params.Id)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]SuppressionGroup{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_list_asm_suppression.go b/rest/api/v3/suppressions/api_list_asm_suppression.go new file mode 100644 index 00000000..ef4e42e8 --- /dev/null +++ b/rest/api/v3/suppressions/api_list_asm_suppression.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListAsmSuppressionParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListAsmSuppressionParam) SetOnbehalfof(Onbehalfof string) *ListAsmSuppressionParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a list of all suppressions.** +func (c *ApiService) ListAsmSuppression(params *ListAsmSuppressionParam) (interface{}, error) { + path := "/v3/asm/suppressions" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListAsmSuppression200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_list_global_suppression.go b/rest/api/v3/suppressions/api_list_global_suppression.go new file mode 100644 index 00000000..c80e48d8 --- /dev/null +++ b/rest/api/v3/suppressions/api_list_global_suppression.go @@ -0,0 +1,106 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListGlobalSuppressionParam struct { + // Refers start of the time range in unix timestamp when an unsubscribe email was created (inclusive). + StartTime *int32 `json:"start_time,omitempty"` + // Refers end of the time range in unix timestamp when an unsubscribe email was created (inclusive). + EndTime *int32 `json:"end_time,omitempty"` + // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. The maximum page size for this endpoint is 500 items per page. + Limit *int32 `json:"limit,omitempty"` + // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + Offset *int32 `json:"offset,omitempty"` + // Specifies which records to return based on the records' associated email addresses. For example, `sales` returns records with email addresses that start with 'sales', such as `salesdepartment@example.com` or `sales@example.com`. You can also use `%25` as a wildcard. For example, `%25market` returns records containing email addresses with the string 'market' anywhere in the email address, and `%25market%25tree` returns records containing email addresses with the string 'market' followed by the string 'tree'. Any reserved characters should be [percent-encoded](https://en.wikipedia.org/wiki/Percent-encoding#Reserved_characters), e.g., the `@` symbol should be encoded as `%40`. + Email *string `json:"email,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListGlobalSuppressionParam) SetStartTime(StartTime int32) *ListGlobalSuppressionParam { + params.StartTime = &StartTime + return params +} +func (params *ListGlobalSuppressionParam) SetEndTime(EndTime int32) *ListGlobalSuppressionParam { + params.EndTime = &EndTime + return params +} +func (params *ListGlobalSuppressionParam) SetLimit(Limit int32) *ListGlobalSuppressionParam { + params.Limit = &Limit + return params +} +func (params *ListGlobalSuppressionParam) SetOffset(Offset int32) *ListGlobalSuppressionParam { + params.Offset = &Offset + return params +} +func (params *ListGlobalSuppressionParam) SetEmail(Email string) *ListGlobalSuppressionParam { + params.Email = &Email + return params +} +func (params *ListGlobalSuppressionParam) SetOnbehalfof(Onbehalfof string) *ListGlobalSuppressionParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a paginated list of all email address that are globally suppressed.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. +func (c *ApiService) ListGlobalSuppression(params *ListGlobalSuppressionParam) (interface{}, error) { + path := "/v3/suppression/unsubscribes" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartTime != nil { + data.Set("start_time", fmt.Sprint(*params.StartTime)) + } + if params != nil && params.EndTime != nil { + data.Set("end_time", fmt.Sprint(*params.EndTime)) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + if params != nil && params.Email != nil { + data.Set("email", *params.Email) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListGlobalSuppression200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_list_invalid_email.go b/rest/api/v3/suppressions/api_list_invalid_email.go new file mode 100644 index 00000000..7a90d146 --- /dev/null +++ b/rest/api/v3/suppressions/api_list_invalid_email.go @@ -0,0 +1,106 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListInvalidEmailParam struct { + // Refers start of the time range in unix timestamp when an invalid email was created (inclusive). + StartTime *int32 `json:"start_time,omitempty"` + // Refers end of the time range in unix timestamp when an invalid email was created (inclusive). + EndTime *int32 `json:"end_time,omitempty"` + // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. The maximum page size for this endpoint is 500 items per page. + Limit *int32 `json:"limit,omitempty"` + // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + Offset *int32 `json:"offset,omitempty"` + // This parameter allows you to filter results by email address. Only invalid addresses matching an address passed in this parameter will be returned. + Email *string `json:"email,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListInvalidEmailParam) SetStartTime(StartTime int32) *ListInvalidEmailParam { + params.StartTime = &StartTime + return params +} +func (params *ListInvalidEmailParam) SetEndTime(EndTime int32) *ListInvalidEmailParam { + params.EndTime = &EndTime + return params +} +func (params *ListInvalidEmailParam) SetLimit(Limit int32) *ListInvalidEmailParam { + params.Limit = &Limit + return params +} +func (params *ListInvalidEmailParam) SetOffset(Offset int32) *ListInvalidEmailParam { + params.Offset = &Offset + return params +} +func (params *ListInvalidEmailParam) SetEmail(Email string) *ListInvalidEmailParam { + params.Email = &Email + return params +} +func (params *ListInvalidEmailParam) SetOnbehalfof(Onbehalfof string) *ListInvalidEmailParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a paginated list of all invalid email addresses.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. +func (c *ApiService) ListInvalidEmail(params *ListInvalidEmailParam) (interface{}, error) { + path := "/v3/suppression/invalid_emails" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartTime != nil { + data.Set("start_time", fmt.Sprint(*params.StartTime)) + } + if params != nil && params.EndTime != nil { + data.Set("end_time", fmt.Sprint(*params.EndTime)) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + if params != nil && params.Email != nil { + data.Set("email", *params.Email) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]InvalidEmail{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_list_spam_report.go b/rest/api/v3/suppressions/api_list_spam_report.go new file mode 100644 index 00000000..bd68b13d --- /dev/null +++ b/rest/api/v3/suppressions/api_list_spam_report.go @@ -0,0 +1,106 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListSpamReportParam struct { + // The start of the time range when a spam report was created (inclusive). This is a unix timestamp. + StartTime *int32 `json:"start_time,omitempty"` + // The end of the time range when a spam report was created (inclusive). This is a unix timestamp. + EndTime *int32 `json:"end_time,omitempty"` + // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. The maximum page size for this endpoint is 500 items per page. + Limit *int32 `json:"limit,omitempty"` + // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + Offset *int32 `json:"offset,omitempty"` + // Specifies which records to return based on the records' associated email addresses. For example, `sales` returns records with email addresses that start with 'sales', such as `salesdepartment@example.com` or `sales@example.com`. You can also use `%25` as a wildcard. For example, `%25market` returns records containing email addresses with the string 'market' anywhere in the email address, and `%25market%25tree` returns records containing email addresses with the string 'market' followed by the string 'tree'. Any reserved characters should be [percent-encoded](https://en.wikipedia.org/wiki/Percent-encoding#Reserved_characters), e.g., the `@` symbol should be encoded as `%40`. + Email *string `json:"email,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListSpamReportParam) SetStartTime(StartTime int32) *ListSpamReportParam { + params.StartTime = &StartTime + return params +} +func (params *ListSpamReportParam) SetEndTime(EndTime int32) *ListSpamReportParam { + params.EndTime = &EndTime + return params +} +func (params *ListSpamReportParam) SetLimit(Limit int32) *ListSpamReportParam { + params.Limit = &Limit + return params +} +func (params *ListSpamReportParam) SetOffset(Offset int32) *ListSpamReportParam { + params.Offset = &Offset + return params +} +func (params *ListSpamReportParam) SetEmail(Email string) *ListSpamReportParam { + params.Email = &Email + return params +} +func (params *ListSpamReportParam) SetOnbehalfof(Onbehalfof string) *ListSpamReportParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a paginated list of all spam reports.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. +func (c *ApiService) ListSpamReport(params *ListSpamReportParam) (interface{}, error) { + path := "/v3/suppression/spam_reports" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartTime != nil { + data.Set("start_time", fmt.Sprint(*params.StartTime)) + } + if params != nil && params.EndTime != nil { + data.Set("end_time", fmt.Sprint(*params.EndTime)) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + if params != nil && params.Email != nil { + data.Set("email", *params.Email) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]SpamReportsResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_list_suppression_block.go b/rest/api/v3/suppressions/api_list_suppression_block.go new file mode 100644 index 00000000..1ac6612a --- /dev/null +++ b/rest/api/v3/suppressions/api_list_suppression_block.go @@ -0,0 +1,106 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListSuppressionBlockParam struct { + // The start of the time range when a blocked email was created (inclusive). This is a unix timestamp. + StartTime *int32 `json:"start_time,omitempty"` + // The end of the time range when a blocked email was created (inclusive). This is a unix timestamp. + EndTime *int32 `json:"end_time,omitempty"` + // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. The maximum page size for this endpoint is 500 items per page. + Limit *int32 `json:"limit,omitempty"` + // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + Offset *int32 `json:"offset,omitempty"` + // Specifies which records to return based on the records' associated email addresses. For example, `sales` returns records with email addresses that start with 'sales', such as `salesdepartment@example.com` or `sales@example.com`. You can also use `%25` as a wildcard. For example, `%25market` returns records containing email addresses with the string 'market' anywhere in the email address, and `%25market%25tree` returns records containing email addresses with the string 'market' followed by the string 'tree'. Any reserved characters should be [percent-encoded](https://en.wikipedia.org/wiki/Percent-encoding#Reserved_characters), e.g., the `@` symbol should be encoded as `%40`. + Email *string `json:"email,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListSuppressionBlockParam) SetStartTime(StartTime int32) *ListSuppressionBlockParam { + params.StartTime = &StartTime + return params +} +func (params *ListSuppressionBlockParam) SetEndTime(EndTime int32) *ListSuppressionBlockParam { + params.EndTime = &EndTime + return params +} +func (params *ListSuppressionBlockParam) SetLimit(Limit int32) *ListSuppressionBlockParam { + params.Limit = &Limit + return params +} +func (params *ListSuppressionBlockParam) SetOffset(Offset int32) *ListSuppressionBlockParam { + params.Offset = &Offset + return params +} +func (params *ListSuppressionBlockParam) SetEmail(Email string) *ListSuppressionBlockParam { + params.Email = &Email + return params +} +func (params *ListSuppressionBlockParam) SetOnbehalfof(Onbehalfof string) *ListSuppressionBlockParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a paginated list of all email addresses that are currently on your blocks list.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. +func (c *ApiService) ListSuppressionBlock(params *ListSuppressionBlockParam) (interface{}, error) { + path := "/v3/suppression/blocks" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartTime != nil { + data.Set("start_time", fmt.Sprint(*params.StartTime)) + } + if params != nil && params.EndTime != nil { + data.Set("end_time", fmt.Sprint(*params.EndTime)) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + if params != nil && params.Email != nil { + data.Set("email", *params.Email) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]BlocksResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_list_suppression_bounces.go b/rest/api/v3/suppressions/api_list_suppression_bounces.go new file mode 100644 index 00000000..62aad4c5 --- /dev/null +++ b/rest/api/v3/suppressions/api_list_suppression_bounces.go @@ -0,0 +1,123 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListSuppressionBouncesParam struct { + // + Accept *string `json:"Accept"` + // Refers start of the time range in unix timestamp when a bounce was created (inclusive). + StartTime *int32 `json:"start_time,omitempty"` + // Refers end of the time range in unix timestamp when a bounce was created (inclusive). + EndTime *int32 `json:"end_time,omitempty"` + // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. The maximum page size for this endpoint is 500 items per page. + Limit *int32 `json:"limit,omitempty"` + // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + Offset *int32 `json:"offset,omitempty"` + // Specifies which records to return based on the records' associated email addresses. For example, `sales` returns records with email addresses that start with 'sales', such as `salesdepartment@example.com` or `sales@example.com`. You can also use `%25` as a wildcard. For example, `%25market` returns records containing email addresses with the string 'market' anywhere in the email address, and `%25market%25tree` returns records containing email addresses with the string 'market' followed by the string 'tree'. Any reserved characters should be [percent-encoded](https://en.wikipedia.org/wiki/Percent-encoding#Reserved_characters), e.g., the `@` symbol should be encoded as `%40`. + Email *string `json:"email,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListSuppressionBouncesParam) SetAccept(Accept string) *ListSuppressionBouncesParam { + params.Accept = &Accept + return params +} +func (params *ListSuppressionBouncesParam) SetStartTime(StartTime int32) *ListSuppressionBouncesParam { + params.StartTime = &StartTime + return params +} +func (params *ListSuppressionBouncesParam) SetEndTime(EndTime int32) *ListSuppressionBouncesParam { + params.EndTime = &EndTime + return params +} +func (params *ListSuppressionBouncesParam) SetLimit(Limit int32) *ListSuppressionBouncesParam { + params.Limit = &Limit + return params +} +func (params *ListSuppressionBouncesParam) SetOffset(Offset int32) *ListSuppressionBouncesParam { + params.Offset = &Offset + return params +} +func (params *ListSuppressionBouncesParam) SetEmail(Email string) *ListSuppressionBouncesParam { + params.Email = &Email + return params +} +func (params *ListSuppressionBouncesParam) SetOnbehalfof(Onbehalfof string) *ListSuppressionBouncesParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a paginated list of all your bounces.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. +func (c *ApiService) ListSuppressionBounces(params *ListSuppressionBouncesParam) (interface{}, error) { + path := "/v3/suppression/bounces" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartTime != nil { + data.Set("start_time", fmt.Sprint(*params.StartTime)) + } + if params != nil && params.EndTime != nil { + data.Set("end_time", fmt.Sprint(*params.EndTime)) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + if params != nil && params.Email != nil { + data.Set("email", *params.Email) + } + + if params != nil && params.Accept != nil { + headers["Accept"] = *params.Accept + } + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]BounceResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_list_suppression_bounces_classifications.go b/rest/api/v3/suppressions/api_list_suppression_bounces_classifications.go new file mode 100644 index 00000000..532ad53d --- /dev/null +++ b/rest/api/v3/suppressions/api_list_suppression_bounces_classifications.go @@ -0,0 +1,95 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListSuppressionBouncesClassificationsParam struct { + // Specifies the content type to be returned by this endpoint. You can choose to receive CSV-formatted data by passing \"text/csv\" in the header. + Accept *Accept `json:"Accept"` + // The start of the time range, in YYYY-MM-DD format, when a bounce was created (inclusive). + StartDate *string `json:"start_date,omitempty"` + // The end of the time range, in YYYY-MM-DD format, when a bounce was created (inclusive). + EndDate *string `json:"end_date,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListSuppressionBouncesClassificationsParam) SetAccept(Accept Accept) *ListSuppressionBouncesClassificationsParam { + params.Accept = &Accept + return params +} +func (params *ListSuppressionBouncesClassificationsParam) SetStartDate(StartDate string) *ListSuppressionBouncesClassificationsParam { + params.StartDate = &StartDate + return params +} +func (params *ListSuppressionBouncesClassificationsParam) SetEndDate(EndDate string) *ListSuppressionBouncesClassificationsParam { + params.EndDate = &EndDate + return params +} +func (params *ListSuppressionBouncesClassificationsParam) SetOnbehalfof(Onbehalfof string) *ListSuppressionBouncesClassificationsParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// This endpoint will return the total number of bounces by classification in descending order for each day. You can retrieve the bounce classification totals in CSV format by specifying `\"text/csv\"` in the Accept header. +func (c *ApiService) ListSuppressionBouncesClassifications(params *ListSuppressionBouncesClassificationsParam) (interface{}, error) { + path := "/v3/suppression/bounces/classifications" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartDate != nil { + data.Set("start_date", *params.StartDate) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", *params.EndDate) + } + + if params != nil && params.Accept != nil { + headers["Accept"] = *params.Accept + } + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListSuppressionBouncesClassifications200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_list_suppression_from_asm_group.go b/rest/api/v3/suppressions/api_list_suppression_from_asm_group.go new file mode 100644 index 00000000..84f461c2 --- /dev/null +++ b/rest/api/v3/suppressions/api_list_suppression_from_asm_group.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type ListSuppressionFromAsmGroupParam struct { + // The id of the unsubscribe group that you are adding suppressions to. + GroupId *string `json:"group_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListSuppressionFromAsmGroupParam) SetGroupId(GroupId string) *ListSuppressionFromAsmGroupParam { + params.GroupId = &GroupId + return params +} +func (params *ListSuppressionFromAsmGroupParam) SetOnbehalfof(Onbehalfof string) *ListSuppressionFromAsmGroupParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve all suppressed email addresses belonging to the given group.** +func (c *ApiService) ListSuppressionFromAsmGroup(params *ListSuppressionFromAsmGroupParam) (interface{}, error) { + path := "/v3/asm/groups/{GroupId}/suppressions" + if params != nil && params.GroupId != nil { + path = strings.Replace(path, "{"+"GroupId"+"}", *params.GroupId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]string{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_search_suppression_from_asm_group.go b/rest/api/v3/suppressions/api_search_suppression_from_asm_group.go new file mode 100644 index 00000000..26ec9d3b --- /dev/null +++ b/rest/api/v3/suppressions/api_search_suppression_from_asm_group.go @@ -0,0 +1,85 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type SearchSuppressionFromAsmGroupParam struct { + // The ID of the suppression group that you would like to search. + GroupId *string `json:"group_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + SuppressionsRequest *SuppressionsRequest `json:"SuppressionsRequest,omitempty"` +} + +func (params *SearchSuppressionFromAsmGroupParam) SetGroupId(GroupId string) *SearchSuppressionFromAsmGroupParam { + params.GroupId = &GroupId + return params +} +func (params *SearchSuppressionFromAsmGroupParam) SetOnbehalfof(Onbehalfof string) *SearchSuppressionFromAsmGroupParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *SearchSuppressionFromAsmGroupParam) SetSuppressionsRequest(SuppressionsRequest SuppressionsRequest) *SearchSuppressionFromAsmGroupParam { + params.SuppressionsRequest = &SuppressionsRequest + return params +} + +// **This endpoint allows you to search a suppression group for multiple suppressions.** When given a list of email addresses and a group ID, this endpoint will only return the email addresses that have been unsubscribed from the given group. +func (c *ApiService) SearchSuppressionFromAsmGroup(params *SearchSuppressionFromAsmGroupParam) (interface{}, error) { + path := "/v3/asm/groups/{GroupId}/suppressions/search" + if params != nil && params.GroupId != nil { + path = strings.Replace(path, "{"+"GroupId"+"}", *params.GroupId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SuppressionsRequest != nil { + b, err := json.Marshal(*params.SuppressionsRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]string{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/suppressions/api_service.go b/rest/api/v3/suppressions/api_service.go new file mode 100644 index 00000000..883efe71 --- /dev/null +++ b/rest/api/v3/suppressions/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/suppressions/api_update_asm_group.go b/rest/api/v3/suppressions/api_update_asm_group.go new file mode 100644 index 00000000..b3a4101d --- /dev/null +++ b/rest/api/v3/suppressions/api_update_asm_group.go @@ -0,0 +1,85 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateAsmGroupParam struct { + // The ID of the suppression group you would like to retrieve. + GroupId *string `json:"group_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateAsmGroupRequest *UpdateAsmGroupRequest `json:"UpdateAsmGroupRequest,omitempty"` +} + +func (params *UpdateAsmGroupParam) SetGroupId(GroupId string) *UpdateAsmGroupParam { + params.GroupId = &GroupId + return params +} +func (params *UpdateAsmGroupParam) SetOnbehalfof(Onbehalfof string) *UpdateAsmGroupParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateAsmGroupParam) SetUpdateAsmGroupRequest(UpdateAsmGroupRequest UpdateAsmGroupRequest) *UpdateAsmGroupParam { + params.UpdateAsmGroupRequest = &UpdateAsmGroupRequest + return params +} + +// **This endpoint allows you to update or change a suppression group.** +func (c *ApiService) UpdateAsmGroup(params *UpdateAsmGroupParam) (interface{}, error) { + path := "/v3/asm/groups/{GroupId}" + if params != nil && params.GroupId != nil { + path = strings.Replace(path, "{"+"GroupId"+"}", *params.GroupId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateAsmGroupRequest != nil { + b, err := json.Marshal(*params.UpdateAsmGroupRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &SuppressionGroup{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/sso/docs/PermissionType1.md b/rest/api/v3/suppressions/docs/Accept.md similarity index 67% rename from rest/api/v3/sso/docs/PermissionType1.md rename to rest/api/v3/suppressions/docs/Accept.md index 5fa3bbb8..06470518 100644 --- a/rest/api/v3/sso/docs/PermissionType1.md +++ b/rest/api/v3/suppressions/docs/Accept.md @@ -1,11 +1,11 @@ -# PermissionType1 +# Accept ## Enum Name | Type | Notes ------------ | ------------- | ------------- -**ADMIN** | string | (value: `"admin"`) -**RESTRICTED** | string | (value: `"restricted"`) +**APPLICATION_JSON** | string | (value: `"application/json"`) +**TEXT_CSV** | string | (value: `"text/csv"`) [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rest/api/v3/suppressions/docs/Accept1.md b/rest/api/v3/suppressions/docs/Accept1.md new file mode 100644 index 00000000..dd00f8c0 --- /dev/null +++ b/rest/api/v3/suppressions/docs/Accept1.md @@ -0,0 +1,13 @@ +# Accept1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**APPLICATION_JSON** | string | (value: `"application/json"`) +**TEXT_CSV** | string | (value: `"text/csv"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/docs/AddSuppressionToAsmGroup.md b/rest/api/v3/suppressions/docs/AddSuppressionToAsmGroup.md new file mode 100644 index 00000000..65f59631 --- /dev/null +++ b/rest/api/v3/suppressions/docs/AddSuppressionToAsmGroup.md @@ -0,0 +1,53 @@ +# AddSuppressionToAsmGroup + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddSuppressionToAsmGroup**](AddSuppressionToAsmGroup.md#AddSuppressionToAsmGroup) | **Post** /v3/asm/groups/{GroupId}/suppressions | Add suppressions to a suppression group + + + +## AddSuppressionToAsmGroup + +> AddSuppressionToAsmGroup201Response AddSuppressionToAsmGroup(ctx, GroupIdoptional) + +Add suppressions to a suppression group + +**This endpoint allows you to add email addresses to an unsubscribe group.** If you attempt to add suppressions to a group that has been deleted or does not exist, the suppressions will be added to the global suppressions list. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**GroupId** | **string** | The id of the unsubscribe group that you are adding suppressions to. + +### Other Parameters + +Other parameters are passed through a pointer to a AddSuppressionToAsmGroupParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**SuppressionsRequest** | [**SuppressionsRequest**](SuppressionsRequest.md) | + +### Return type + +[**AddSuppressionToAsmGroup201Response**](AddSuppressionToAsmGroup201Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/suppressions/docs/AddSuppressionToAsmGroup201Response.md b/rest/api/v3/suppressions/docs/AddSuppressionToAsmGroup201Response.md new file mode 100644 index 00000000..7173843a --- /dev/null +++ b/rest/api/v3/suppressions/docs/AddSuppressionToAsmGroup201Response.md @@ -0,0 +1,11 @@ +# AddSuppressionToAsmGroup201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RecipientEmails** | **[]string** | The email addresses you added to the unsubscribe group |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/docs/BlocksResponseInner.md b/rest/api/v3/suppressions/docs/BlocksResponseInner.md new file mode 100644 index 00000000..349c63e4 --- /dev/null +++ b/rest/api/v3/suppressions/docs/BlocksResponseInner.md @@ -0,0 +1,14 @@ +# BlocksResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Created** | **int32** | A Unix timestamp indicating when the email address was added to the blocks list. | +**Email** | **string** | The email address that was added to the block list. | +**Reason** | **string** | An explanation for the reason of the block. | +**Status** | **string** | The status of the block. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/docs/BounceResponse.md b/rest/api/v3/suppressions/docs/BounceResponse.md new file mode 100644 index 00000000..c280365a --- /dev/null +++ b/rest/api/v3/suppressions/docs/BounceResponse.md @@ -0,0 +1,14 @@ +# BounceResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Created** | **float32** | The unix timestamp for when the bounce record was created at SendGrid. |[optional] +**Email** | **string** | The email address that was added to the bounce list. |[optional] +**Reason** | **string** | The reason for the bounce. This typically will be a bounce code, an enhanced code, and a description. |[optional] +**Status** | **string** | Enhanced SMTP bounce response |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/docs/Classification.md b/rest/api/v3/suppressions/docs/Classification.md new file mode 100644 index 00000000..4607f8be --- /dev/null +++ b/rest/api/v3/suppressions/docs/Classification.md @@ -0,0 +1,18 @@ +# Classification + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**CONTENT** | string | (value: `"Content"`) +**FREQUENCY_OR_VOLUME_TOO_HIGH** | string | (value: `"Frequency or Volume Too High"`) +**INVALID_ADDRESS** | string | (value: `"Invalid Address"`) +**MAILBOX_UNAVAILABLE** | string | (value: `"Mailbox Unavailable"`) +**REPUTATION** | string | (value: `"Reputation"`) +**TECHNICAL_FAILURE** | string | (value: `"Technical Failure"`) +**UNCLASSIFIED** | string | (value: `"Unclassified"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/docs/Classification1.md b/rest/api/v3/suppressions/docs/Classification1.md new file mode 100644 index 00000000..4957da27 --- /dev/null +++ b/rest/api/v3/suppressions/docs/Classification1.md @@ -0,0 +1,18 @@ +# Classification1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**CONTENT** | string | (value: `"Content"`) +**FREQUENCY_OR_VOLUME_TOO_HIGH** | string | (value: `"Frequency or Volume Too High"`) +**INVALID_ADDRESS** | string | (value: `"Invalid Address"`) +**MAILBOX_UNAVAILABLE** | string | (value: `"Mailbox Unavailable"`) +**REPUTATION** | string | (value: `"Reputation"`) +**TECHNICAL_FAILURE** | string | (value: `"Technical Failure"`) +**UNCLASSIFIED** | string | (value: `"Unclassified"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/docs/CreatAsmGroup.md b/rest/api/v3/suppressions/docs/CreatAsmGroup.md new file mode 100644 index 00000000..2861b52c --- /dev/null +++ b/rest/api/v3/suppressions/docs/CreatAsmGroup.md @@ -0,0 +1,49 @@ +# CreatAsmGroup + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreatAsmGroup**](CreatAsmGroup.md#CreatAsmGroup) | **Post** /v3/asm/groups | Create a new suppression group + + + +## CreatAsmGroup + +> CreatAsmGroup201Response CreatAsmGroup(ctx, optional) + +Create a new suppression group + +**This endpoint allows you to create a new suppression group.** To add an email address to the suppression group, [create a Suppression](https://docs.sendgrid.com/api-reference/suppressions-suppressions/add-suppressions-to-a-suppression-group). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreatAsmGroupParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**SuppressionGroupRequestBaseProps** | [**SuppressionGroupRequestBaseProps**](SuppressionGroupRequestBaseProps.md) | + +### Return type + +[**CreatAsmGroup201Response**](CreatAsmGroup201Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/suppressions/docs/CreatAsmGroup201Response.md b/rest/api/v3/suppressions/docs/CreatAsmGroup201Response.md new file mode 100644 index 00000000..31c38829 --- /dev/null +++ b/rest/api/v3/suppressions/docs/CreatAsmGroup201Response.md @@ -0,0 +1,14 @@ +# CreatAsmGroup201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The ID of the suppression group. | +**Name** | **string** | The name of the suppression group. | +**Description** | **string** | A brief description of the suppression group. | +**IsDefault** | **bool** | Indicates if this is the default suppression group. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/docs/CreateGlobalSuppression.md b/rest/api/v3/suppressions/docs/CreateGlobalSuppression.md new file mode 100644 index 00000000..f69ddb90 --- /dev/null +++ b/rest/api/v3/suppressions/docs/CreateGlobalSuppression.md @@ -0,0 +1,49 @@ +# CreateGlobalSuppression + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateGlobalSuppression**](CreateGlobalSuppression.md#CreateGlobalSuppression) | **Post** /v3/asm/suppressions/global | Add recipient addresses to the global suppression group. + + + +## CreateGlobalSuppression + +> CreateGlobalSuppression201Response CreateGlobalSuppression(ctx, optional) + +Add recipient addresses to the global suppression group. + +**This endpoint allows you to add one or more email addresses to the global suppressions group.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateGlobalSuppressionParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**SuppressionsRequest** | [**SuppressionsRequest**](SuppressionsRequest.md) | + +### Return type + +[**CreateGlobalSuppression201Response**](CreateGlobalSuppression201Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/suppressions/docs/CreateGlobalSuppression201Response.md b/rest/api/v3/suppressions/docs/CreateGlobalSuppression201Response.md new file mode 100644 index 00000000..f279687c --- /dev/null +++ b/rest/api/v3/suppressions/docs/CreateGlobalSuppression201Response.md @@ -0,0 +1,11 @@ +# CreateGlobalSuppression201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RecipientEmails** | **[]string** | The email addresses that are globally suppressed | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/docs/DeleteAsmGroup.md b/rest/api/v3/suppressions/docs/DeleteAsmGroup.md new file mode 100644 index 00000000..8f25cada --- /dev/null +++ b/rest/api/v3/suppressions/docs/DeleteAsmGroup.md @@ -0,0 +1,52 @@ +# DeleteAsmGroup + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteAsmGroup**](DeleteAsmGroup.md#DeleteAsmGroup) | **Delete** /v3/asm/groups/{GroupId} | Delete a Suppression Group + + + +## DeleteAsmGroup + +> map[string]interface{} DeleteAsmGroup(ctx, GroupIdoptional) + +Delete a Suppression Group + +**This endpoint allows you to delete a suppression group.** If a recipient uses the \"one-click unsubscribe\" option on an email associated with a deleted group, that recipient will be added to the global suppression list. Deleting a suppression group will remove the suppression, meaning email will once again be sent to the previously suppressed addresses. This should be avoided unless a recipient indicates they wish to receive email from you again. You can use our [bypass filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) to deliver messages to otherwise suppressed addresses when exceptions are required. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**GroupId** | **string** | The ID of the suppression group you would like to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteAsmGroupParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/suppressions/docs/DeleteGlobalSuppression.md b/rest/api/v3/suppressions/docs/DeleteGlobalSuppression.md new file mode 100644 index 00000000..c71936c8 --- /dev/null +++ b/rest/api/v3/suppressions/docs/DeleteGlobalSuppression.md @@ -0,0 +1,52 @@ +# DeleteGlobalSuppression + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteGlobalSuppression**](DeleteGlobalSuppression.md#DeleteGlobalSuppression) | **Delete** /v3/asm/suppressions/global/{Email} | Delete a Global Suppression + + + +## DeleteGlobalSuppression + +> map[string]interface{} DeleteGlobalSuppression(ctx, Emailoptional) + +Delete a Global Suppression + +**This endpoint allows you to remove an email address from the global suppressions group.** Deleting a suppression group will remove the suppression, meaning email will once again be sent to the previously suppressed addresses. This should be avoided unless a recipient indicates they wish to receive email from you again. You can use our [bypass filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) to deliver messages to otherwise suppressed addresses when exceptions are required. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Email** | **string** | The email address of the global suppression you want to retrieve. Or, if you want to check if an email address is on the global suppressions list, enter that email address here. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteGlobalSuppressionParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/suppressions/docs/DeleteInvalidEmail.md b/rest/api/v3/suppressions/docs/DeleteInvalidEmail.md new file mode 100644 index 00000000..32607cde --- /dev/null +++ b/rest/api/v3/suppressions/docs/DeleteInvalidEmail.md @@ -0,0 +1,52 @@ +# DeleteInvalidEmail + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteInvalidEmail**](DeleteInvalidEmail.md#DeleteInvalidEmail) | **Delete** /v3/suppression/invalid_emails/{Email} | Delete a specific invalid email + + + +## DeleteInvalidEmail + +> map[string]interface{} DeleteInvalidEmail(ctx, Emailoptional) + +Delete a specific invalid email + +**This endpoint allows you to remove a specific email address from the invalid email address list.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Email** | **string** | The specific email address of the invalid email entry that you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteInvalidEmailParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/suppressions/docs/DeleteInvalidEmails.md b/rest/api/v3/suppressions/docs/DeleteInvalidEmails.md new file mode 100644 index 00000000..3bdd0c7d --- /dev/null +++ b/rest/api/v3/suppressions/docs/DeleteInvalidEmails.md @@ -0,0 +1,49 @@ +# DeleteInvalidEmails + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteInvalidEmails**](DeleteInvalidEmails.md#DeleteInvalidEmails) | **Delete** /v3/suppression/invalid_emails | Delete invalid emails + + + +## DeleteInvalidEmails + +> map[string]interface{} DeleteInvalidEmails(ctx, optional) + +Delete invalid emails + +**This endpoint allows you to remove email addresses from your invalid email address list.** There are two options for deleting invalid email addresses: 1) You can delete all invalid email addresses by setting `delete_all` to true in the request body. 2) You can delete some invalid email addresses by specifying certain addresses in an array in the request body. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteInvalidEmailsParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**DeleteInvalidEmailsRequest** | [**DeleteInvalidEmailsRequest**](DeleteInvalidEmailsRequest.md) | + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/suppressions/docs/DeleteInvalidEmailsRequest.md b/rest/api/v3/suppressions/docs/DeleteInvalidEmailsRequest.md new file mode 100644 index 00000000..d771148d --- /dev/null +++ b/rest/api/v3/suppressions/docs/DeleteInvalidEmailsRequest.md @@ -0,0 +1,12 @@ +# DeleteInvalidEmailsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeleteAll** | **bool** | Indicates if you want to remove all email address from the invalid emails list. |[optional] +**Emails** | **[]string** | The list of specific email addresses that you want to remove. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/docs/DeleteSpamReport.md b/rest/api/v3/suppressions/docs/DeleteSpamReport.md new file mode 100644 index 00000000..65e304e1 --- /dev/null +++ b/rest/api/v3/suppressions/docs/DeleteSpamReport.md @@ -0,0 +1,52 @@ +# DeleteSpamReport + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSpamReport**](DeleteSpamReport.md#DeleteSpamReport) | **Delete** /v3/suppression/spam_reports/{Email} | Delete a specific spam report + + + +## DeleteSpamReport + +> map[string]interface{} DeleteSpamReport(ctx, Emailoptional) + +Delete a specific spam report + +**This endpoint allows you to delete a specific spam report by email address.** Deleting a spam report will remove the suppression, meaning email will once again be sent to the previously suppressed address. This should be avoided unless a recipient indicates they wish to receive email from you again. You can use our [bypass filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) to deliver messages to otherwise suppressed addresses when exceptions are required. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Email** | **string** | The email address of a specific spam report that you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSpamReportParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/suppressions/docs/DeleteSpamReports.md b/rest/api/v3/suppressions/docs/DeleteSpamReports.md new file mode 100644 index 00000000..c69b9089 --- /dev/null +++ b/rest/api/v3/suppressions/docs/DeleteSpamReports.md @@ -0,0 +1,49 @@ +# DeleteSpamReports + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSpamReports**](DeleteSpamReports.md#DeleteSpamReports) | **Delete** /v3/suppression/spam_reports | Delete spam reports + + + +## DeleteSpamReports + +> map[string]interface{} DeleteSpamReports(ctx, optional) + +Delete spam reports + +**This endpoint allows you to delete your spam reports.** Deleting a spam report will remove the suppression, meaning email will once again be sent to the previously suppressed address. This should be avoided unless a recipient indicates they wish to receive email from you again. You can use our [bypass filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) to deliver messages to otherwise suppressed addresses when exceptions are required. There are two options for deleting spam reports: 1. You can delete all spam reports by setting the `delete_all` field to `true` in the request body. 2. You can delete a list of select spam reports by specifying the email addresses in the `emails` array of the request body. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSpamReportsParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**DeleteSpamReportsRequest** | [**DeleteSpamReportsRequest**](DeleteSpamReportsRequest.md) | + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/suppressions/docs/DeleteSpamReportsRequest.md b/rest/api/v3/suppressions/docs/DeleteSpamReportsRequest.md new file mode 100644 index 00000000..011e92fe --- /dev/null +++ b/rest/api/v3/suppressions/docs/DeleteSpamReportsRequest.md @@ -0,0 +1,12 @@ +# DeleteSpamReportsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeleteAll** | **bool** | Indicates if you want to delete all email addresses on the spam report list. |[optional] +**Emails** | **[]string** | A list of specific email addresses that you want to remove from the spam report list. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/docs/DeleteSuppressionBlock.md b/rest/api/v3/suppressions/docs/DeleteSuppressionBlock.md new file mode 100644 index 00000000..d4a67bd9 --- /dev/null +++ b/rest/api/v3/suppressions/docs/DeleteSuppressionBlock.md @@ -0,0 +1,52 @@ +# DeleteSuppressionBlock + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSuppressionBlock**](DeleteSuppressionBlock.md#DeleteSuppressionBlock) | **Delete** /v3/suppression/blocks/{Email} | Delete a specific block + + + +## DeleteSuppressionBlock + +> map[string]interface{} DeleteSuppressionBlock(ctx, Emailoptional) + +Delete a specific block + +**This endpoint allows you to delete a specific email address from your blocks list.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Email** | **string** | The email address of the specific block. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSuppressionBlockParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/suppressions/docs/DeleteSuppressionBlocks.md b/rest/api/v3/suppressions/docs/DeleteSuppressionBlocks.md new file mode 100644 index 00000000..928134cf --- /dev/null +++ b/rest/api/v3/suppressions/docs/DeleteSuppressionBlocks.md @@ -0,0 +1,49 @@ +# DeleteSuppressionBlocks + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSuppressionBlocks**](DeleteSuppressionBlocks.md#DeleteSuppressionBlocks) | **Delete** /v3/suppression/blocks | Delete blocks + + + +## DeleteSuppressionBlocks + +> map[string]interface{} DeleteSuppressionBlocks(ctx, optional) + +Delete blocks + +**This endpoint allows you to delete all email addresses on your blocks list.** There are two options for deleting blocked emails: 1. You can delete all blocked emails by setting `delete_all` to `true` in the request body. 2. You can delete a selection of blocked emails by specifying the email addresses in the `emails` array of the request body. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSuppressionBlocksParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**DeleteSuppressionBlocksRequest** | [**DeleteSuppressionBlocksRequest**](DeleteSuppressionBlocksRequest.md) | + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/suppressions/docs/DeleteSuppressionBlocksRequest.md b/rest/api/v3/suppressions/docs/DeleteSuppressionBlocksRequest.md new file mode 100644 index 00000000..7f4cf8a5 --- /dev/null +++ b/rest/api/v3/suppressions/docs/DeleteSuppressionBlocksRequest.md @@ -0,0 +1,12 @@ +# DeleteSuppressionBlocksRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeleteAll** | **bool** | Indicates if you want to delete all blocked email addresses. |[optional] +**Emails** | **[]string** | The specific blocked email addresses that you want to delete. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/docs/DeleteSuppressionBounce.md b/rest/api/v3/suppressions/docs/DeleteSuppressionBounce.md new file mode 100644 index 00000000..90f5ba3b --- /dev/null +++ b/rest/api/v3/suppressions/docs/DeleteSuppressionBounce.md @@ -0,0 +1,52 @@ +# DeleteSuppressionBounce + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSuppressionBounce**](DeleteSuppressionBounce.md#DeleteSuppressionBounce) | **Delete** /v3/suppression/bounces/{Email} | Delete a bounce + + + +## DeleteSuppressionBounce + +> map[string]interface{} DeleteSuppressionBounce(ctx, Emailoptional) + +Delete a bounce + +**This endpoint allows you to remove an email address from your bounce list.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Email** | **string** | The email address you would like to remove from the bounce list. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSuppressionBounceParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/suppressions/docs/DeleteSuppressionBounces.md b/rest/api/v3/suppressions/docs/DeleteSuppressionBounces.md new file mode 100644 index 00000000..85ae6f31 --- /dev/null +++ b/rest/api/v3/suppressions/docs/DeleteSuppressionBounces.md @@ -0,0 +1,49 @@ +# DeleteSuppressionBounces + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSuppressionBounces**](DeleteSuppressionBounces.md#DeleteSuppressionBounces) | **Delete** /v3/suppression/bounces | Delete bounces + + + +## DeleteSuppressionBounces + +> DeleteSuppressionBounces(ctx, optional) + +Delete bounces + +**This endpoint allows you to delete all emails on your bounces list.** There are two options for deleting bounced emails: 1. You can delete all bounced emails by setting `delete_all` to `true` in the request body. 2. You can delete a selection of bounced emails by specifying the email addresses in the `emails` array of the request body. **WARNING:** You can not have both `emails` and `delete_all` set. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSuppressionBouncesParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**DeleteSuppressionBouncesRequest** | [**DeleteSuppressionBouncesRequest**](DeleteSuppressionBouncesRequest.md) | + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/suppressions/docs/DeleteSuppressionBouncesRequest.md b/rest/api/v3/suppressions/docs/DeleteSuppressionBouncesRequest.md new file mode 100644 index 00000000..a8546713 --- /dev/null +++ b/rest/api/v3/suppressions/docs/DeleteSuppressionBouncesRequest.md @@ -0,0 +1,12 @@ +# DeleteSuppressionBouncesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DeleteAll** | **bool** | This parameter allows you to delete **every** email in your bounce list. This should not be used with the emails parameter. |[optional] +**Emails** | **[]string** | Delete multiple emails from your bounce list at the same time. This should not be used with the delete_all parameter. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/docs/DeleteSuppressionFromAsmGroup.md b/rest/api/v3/suppressions/docs/DeleteSuppressionFromAsmGroup.md new file mode 100644 index 00000000..0470a605 --- /dev/null +++ b/rest/api/v3/suppressions/docs/DeleteSuppressionFromAsmGroup.md @@ -0,0 +1,53 @@ +# DeleteSuppressionFromAsmGroup + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSuppressionFromAsmGroup**](DeleteSuppressionFromAsmGroup.md#DeleteSuppressionFromAsmGroup) | **Delete** /v3/asm/groups/{GroupId}/suppressions/{Email} | Delete a suppression from a suppression group + + + +## DeleteSuppressionFromAsmGroup + +> DeleteSuppressionFromAsmGroup(ctx, GroupIdEmailoptional) + +Delete a suppression from a suppression group + +**This endpoint allows you to remove a suppressed email address from the given suppression group.** Removing an address will remove the suppression, meaning email will once again be sent to the previously suppressed addresses. This should be avoided unless a recipient indicates they wish to receive email from you again. You can use our [bypass filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) to deliver messages to otherwise suppressed addresses when exceptions are required. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**GroupId** | **string** | The id of the suppression group that you are removing an email address from. +**Email** | **string** | The email address that you want to remove from the suppression group. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSuppressionFromAsmGroupParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/suppressions/docs/ErrorResponse.md b/rest/api/v3/suppressions/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/suppressions/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/docs/ErrorResponseErrorsInner.md b/rest/api/v3/suppressions/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/suppressions/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/docs/GetAsmGroup.md b/rest/api/v3/suppressions/docs/GetAsmGroup.md new file mode 100644 index 00000000..07fbfb13 --- /dev/null +++ b/rest/api/v3/suppressions/docs/GetAsmGroup.md @@ -0,0 +1,52 @@ +# GetAsmGroup + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetAsmGroup**](GetAsmGroup.md#GetAsmGroup) | **Get** /v3/asm/groups/{GroupId} | Get information on a single suppression group. + + + +## GetAsmGroup + +> GetAsmGroup200Response GetAsmGroup(ctx, GroupIdoptional) + +Get information on a single suppression group. + +**This endpoint allows you to retrieve a single suppression group.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**GroupId** | **string** | The ID of the suppression group you would like to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetAsmGroupParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**GetAsmGroup200Response**](GetAsmGroup200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/suppressions/docs/GetAsmGroup200Response.md b/rest/api/v3/suppressions/docs/GetAsmGroup200Response.md new file mode 100644 index 00000000..18fe7dbe --- /dev/null +++ b/rest/api/v3/suppressions/docs/GetAsmGroup200Response.md @@ -0,0 +1,16 @@ +# GetAsmGroup200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of your suppression group. Required when creating a group. |[optional] +**Description** | **string** | A brief description of your suppression group. Required when creating a group. |[optional] +**IsDefault** | **bool** | Indicates if you would like this to be your default suppression group. |[optional] +**Id** | **int32** | The ID of the suppression group. | +**Unsubscribes** | **int32** | The number of unsubscribes, or suppressions, in this group. |[optional] +**LastEmailSentAt** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/docs/GetAsmSuppression.md b/rest/api/v3/suppressions/docs/GetAsmSuppression.md new file mode 100644 index 00000000..0aba233d --- /dev/null +++ b/rest/api/v3/suppressions/docs/GetAsmSuppression.md @@ -0,0 +1,52 @@ +# GetAsmSuppression + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetAsmSuppression**](GetAsmSuppression.md#GetAsmSuppression) | **Get** /v3/asm/suppressions/{Email} | Retrieve all suppression groups for an email address + + + +## GetAsmSuppression + +> GetAsmSuppression200Response GetAsmSuppression(ctx, Emailoptional) + +Retrieve all suppression groups for an email address + +**This endpoint returns a list of all groups from which the given email address has been unsubscribed.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Email** | **string** | The email address that you want to search suppression groups for. + +### Other Parameters + +Other parameters are passed through a pointer to a GetAsmSuppressionParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**GetAsmSuppression200Response**](GetAsmSuppression200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/suppressions/docs/GetAsmSuppression200Response.md b/rest/api/v3/suppressions/docs/GetAsmSuppression200Response.md new file mode 100644 index 00000000..6b7200b6 --- /dev/null +++ b/rest/api/v3/suppressions/docs/GetAsmSuppression200Response.md @@ -0,0 +1,11 @@ +# GetAsmSuppression200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Suppressions** | [**[]GetAsmSuppression200ResponseSuppressionsInner**](GetAsmSuppression200ResponseSuppressionsInner.md) | The array of suppression groups. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/docs/GetAsmSuppression200ResponseSuppressionsInner.md b/rest/api/v3/suppressions/docs/GetAsmSuppression200ResponseSuppressionsInner.md new file mode 100644 index 00000000..c4187116 --- /dev/null +++ b/rest/api/v3/suppressions/docs/GetAsmSuppression200ResponseSuppressionsInner.md @@ -0,0 +1,15 @@ +# GetAsmSuppression200ResponseSuppressionsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Description** | **string** | The description of the suppression group. | +**Id** | **int32** | The id of the suppression group. | +**IsDefault** | **bool** | Indicates if the suppression group is set as the default. | +**Name** | **string** | The name of the suppression group. | +**Suppressed** | **bool** | Indicates if the given email address is suppressed for this group. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/docs/GetGlobalSuppression.md b/rest/api/v3/suppressions/docs/GetGlobalSuppression.md new file mode 100644 index 00000000..768fd0a5 --- /dev/null +++ b/rest/api/v3/suppressions/docs/GetGlobalSuppression.md @@ -0,0 +1,52 @@ +# GetGlobalSuppression + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetGlobalSuppression**](GetGlobalSuppression.md#GetGlobalSuppression) | **Get** /v3/asm/suppressions/global/{Email} | Retrieve a Global Suppression + + + +## GetGlobalSuppression + +> RetrieveAGlobalSuppressionResponse GetGlobalSuppression(ctx, Emailoptional) + +Retrieve a Global Suppression + +**This endpoint allows you to retrieve a global suppression. You can also use this endpoint to confirm if an email address is already globally suppresed.** If the email address you include in the URL path parameter `{email}` is already globally suppressed, the response will include that email address. If the address you enter for `{email}` is not globally suppressed, an empty JSON object `{}` will be returned. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Email** | **string** | The email address of the global suppression you want to retrieve. Or, if you want to check if an email address is on the global suppressions list, enter that email address here. + +### Other Parameters + +Other parameters are passed through a pointer to a GetGlobalSuppressionParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**RetrieveAGlobalSuppressionResponse**](RetrieveAGlobalSuppressionResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/suppressions/docs/GetInvalidEmail.md b/rest/api/v3/suppressions/docs/GetInvalidEmail.md new file mode 100644 index 00000000..37d5ad25 --- /dev/null +++ b/rest/api/v3/suppressions/docs/GetInvalidEmail.md @@ -0,0 +1,52 @@ +# GetInvalidEmail + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetInvalidEmail**](GetInvalidEmail.md#GetInvalidEmail) | **Get** /v3/suppression/invalid_emails/{Email} | Retrieve a specific invalid email + + + +## GetInvalidEmail + +> []InvalidEmail GetInvalidEmail(ctx, Emailoptional) + +Retrieve a specific invalid email + +**This endpoint allows you to retrieve a specific invalid email addresses.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Email** | **string** | The specific email address of the invalid email entry that you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetInvalidEmailParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**[]InvalidEmail**](InvalidEmail.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/suppressions/docs/GetSpamReport.md b/rest/api/v3/suppressions/docs/GetSpamReport.md new file mode 100644 index 00000000..4eafa262 --- /dev/null +++ b/rest/api/v3/suppressions/docs/GetSpamReport.md @@ -0,0 +1,52 @@ +# GetSpamReport + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetSpamReport**](GetSpamReport.md#GetSpamReport) | **Get** /v3/suppression/spam_reports/{Email} | Retrieve a specific spam report + + + +## GetSpamReport + +> []SpamReportsResponseInner GetSpamReport(ctx, Emailoptional) + +Retrieve a specific spam report + +**This endpoint allows you to retrieve a specific spam report by email address.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Email** | **string** | The email address of a specific spam report that you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetSpamReportParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**[]SpamReportsResponseInner**](SpamReportsResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/suppressions/docs/GetSuppressionBlock.md b/rest/api/v3/suppressions/docs/GetSuppressionBlock.md new file mode 100644 index 00000000..c721b827 --- /dev/null +++ b/rest/api/v3/suppressions/docs/GetSuppressionBlock.md @@ -0,0 +1,52 @@ +# GetSuppressionBlock + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetSuppressionBlock**](GetSuppressionBlock.md#GetSuppressionBlock) | **Get** /v3/suppression/blocks/{Email} | Retrieve a specific block + + + +## GetSuppressionBlock + +> []BlocksResponseInner GetSuppressionBlock(ctx, Emailoptional) + +Retrieve a specific block + +**This endpoint allows you to retrieve a specific email address from your blocks list.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Email** | **string** | The email address of the specific block. + +### Other Parameters + +Other parameters are passed through a pointer to a GetSuppressionBlockParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**[]BlocksResponseInner**](BlocksResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/suppressions/docs/GetSuppressionBounces.md b/rest/api/v3/suppressions/docs/GetSuppressionBounces.md new file mode 100644 index 00000000..a886c47e --- /dev/null +++ b/rest/api/v3/suppressions/docs/GetSuppressionBounces.md @@ -0,0 +1,52 @@ +# GetSuppressionBounces + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetSuppressionBounces**](GetSuppressionBounces.md#GetSuppressionBounces) | **Get** /v3/suppression/bounces/{Email} | Retrieve a Bounce + + + +## GetSuppressionBounces + +> []BounceResponse GetSuppressionBounces(ctx, Emailoptional) + +Retrieve a Bounce + +**This endpoint allows you to retrieve a specific bounce by email address.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Email** | **string** | The email address of the specific bounce you would like to retrieve + +### Other Parameters + +Other parameters are passed through a pointer to a GetSuppressionBouncesParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**[]BounceResponse**](BounceResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications.md b/rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications.md new file mode 100644 index 00000000..1e5c6ce4 --- /dev/null +++ b/rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications.md @@ -0,0 +1,54 @@ +# GetSuppressionBouncesClassifications + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetSuppressionBouncesClassifications**](GetSuppressionBouncesClassifications.md#GetSuppressionBouncesClassifications) | **Get** /v3/suppression/bounces/classifications/{Classification} | Retrieve bounce classification over time by domain stats + + + +## GetSuppressionBouncesClassifications + +> GetSuppressionBouncesClassifications200Response GetSuppressionBouncesClassifications(ctx, AcceptClassificationoptional) + +Retrieve bounce classification over time by domain stats + +This endpoint will return the number of bounces for the classification specified in descending order for each day. You can retrieve the bounce classification totals in CSV format by specifying `\"text/csv\"` in the Accept header. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Classification** | [**Classification1**](Classification1.md) | The classification you want to filter by. Possible values are: `Content`, `Frequency or Volume Too High`, `Invalid Address`, `Mailbox Unavailable`, `Reputation`, `Technical Failure`, `Unclassified`. + +### Other Parameters + +Other parameters are passed through a pointer to a GetSuppressionBouncesClassificationsParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**StartDate** | **string** | The start of the time range, in YYYY-MM-DD format, when a bounce was created (inclusive). +**EndDate** | **string** | The end of the time range, in YYYY-MM-DD format, when a bounce was created (inclusive). +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**GetSuppressionBouncesClassifications200Response**](GetSuppressionBouncesClassifications200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications200Response.md b/rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications200Response.md new file mode 100644 index 00000000..56413bb1 --- /dev/null +++ b/rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications200Response.md @@ -0,0 +1,11 @@ +# GetSuppressionBouncesClassifications200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]GetSuppressionBouncesClassifications200ResponseResultInner**](GetSuppressionBouncesClassifications200ResponseResultInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications200ResponseResultInner.md b/rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications200ResponseResultInner.md new file mode 100644 index 00000000..07b1614f --- /dev/null +++ b/rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications200ResponseResultInner.md @@ -0,0 +1,12 @@ +# GetSuppressionBouncesClassifications200ResponseResultInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | **string** | |[optional] +**Stats** | [**[]GetSuppressionBouncesClassifications200ResponseResultInnerStatsInner**](GetSuppressionBouncesClassifications200ResponseResultInnerStatsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications200ResponseResultInnerStatsInner.md b/rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications200ResponseResultInnerStatsInner.md new file mode 100644 index 00000000..53831fc1 --- /dev/null +++ b/rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications200ResponseResultInnerStatsInner.md @@ -0,0 +1,12 @@ +# GetSuppressionBouncesClassifications200ResponseResultInnerStatsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Domain** | **string** | |[optional] +**Count** | **int32** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/docs/InvalidEmail.md b/rest/api/v3/suppressions/docs/InvalidEmail.md new file mode 100644 index 00000000..38ad5a18 --- /dev/null +++ b/rest/api/v3/suppressions/docs/InvalidEmail.md @@ -0,0 +1,13 @@ +# InvalidEmail + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Created** | **int32** | A Unix timestamp indicating when the email address was added to the invalid emails list. |[optional] +**Email** | **string** | The email address that was marked as invalid. |[optional] +**Reason** | **string** | The reason that the email address was marked as invalid. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ListCategoryStat.md b/rest/api/v3/suppressions/docs/ListAsmGroup.md similarity index 60% rename from rest/api/v3/stats/docs/ListCategoryStat.md rename to rest/api/v3/suppressions/docs/ListAsmGroup.md index 715c2215..010f9e27 100644 --- a/rest/api/v3/stats/docs/ListCategoryStat.md +++ b/rest/api/v3/suppressions/docs/ListAsmGroup.md @@ -1,20 +1,20 @@ -# ListCategoryStat +# ListAsmGroup All URIs are relative to *https://api.sendgrid.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**ListCategoryStat**](ListCategoryStat.md#ListCategoryStat) | **Get** /v3/categories/stats | Retrieve Email Statistics for Categories +[**ListAsmGroup**](ListAsmGroup.md#ListAsmGroup) | **Get** /v3/asm/groups | Retrieve all suppression groups associated with the user. -## ListCategoryStat +## ListAsmGroup -> []CategoryStats ListCategoryStat(ctx, StartDateCategoriesoptional) +> []SuppressionGroup ListAsmGroup(ctx, optional) -Retrieve Email Statistics for Categories +Retrieve all suppression groups associated with the user. -**This endpoint allows you to retrieve all of your email statistics for each of your categories.** If you do not define any query parameters, this endpoint will return a sum for each category in groups of 10. +**This endpoint allows you to retrieve a list of all suppression groups created by this user.** This endpoint can also return information for multiple group IDs that you include in your request. To add a group ID to your request, simply append `?id=123456&id=123456`, with the appropriate group IDs. ### Path Parameters @@ -22,18 +22,17 @@ This endpoint does not need any path parameter. ### Other Parameters -Other parameters are passed through a pointer to a ListCategoryStatParams struct +Other parameters are passed through a pointer to a ListAsmGroupParams struct Name | Type | Description ------------- | ------------- | ------------- -**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. -**AggregatedBy** | [**AggregatedBy**](AggregatedByAggregatedBy.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". +**Id** | **int32** | The ID of the suppression group(s) you want to retrieve. **Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. ### Return type -[**[]CategoryStats**](CategoryStats.md) +[**[]SuppressionGroup**](SuppressionGroup.md) ### Authorization diff --git a/rest/api/v3/stats/docs/ListStat.md b/rest/api/v3/suppressions/docs/ListAsmSuppression.md similarity index 56% rename from rest/api/v3/stats/docs/ListStat.md rename to rest/api/v3/suppressions/docs/ListAsmSuppression.md index b0afdd99..44ad904e 100644 --- a/rest/api/v3/stats/docs/ListStat.md +++ b/rest/api/v3/suppressions/docs/ListAsmSuppression.md @@ -1,20 +1,20 @@ -# ListStat +# ListAsmSuppression All URIs are relative to *https://api.sendgrid.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**ListStat**](ListStat.md#ListStat) | **Get** /v3/stats | Retrieve global email statistics +[**ListAsmSuppression**](ListAsmSuppression.md#ListAsmSuppression) | **Get** /v3/asm/suppressions | Retrieve all suppressions -## ListStat +## ListAsmSuppression -> []ListStat200ResponseInner ListStat(ctx, StartDateoptional) +> []ListAsmSuppression200ResponseInner ListAsmSuppression(ctx, optional) -Retrieve global email statistics +Retrieve all suppressions -**This endpoint allows you to retrieve all of your global email statistics between a given date range.** Parent accounts can see either aggregated stats for the parent account or aggregated stats for a subuser specified in the `on-behalf-of` header. Subuser accounts will see only their own stats. +**This endpoint allows you to retrieve a list of all suppressions.** ### Path Parameters @@ -22,20 +22,16 @@ This endpoint does not need any path parameter. ### Other Parameters -Other parameters are passed through a pointer to a ListStatParams struct +Other parameters are passed through a pointer to a ListAsmSuppressionParams struct Name | Type | Description ------------- | ------------- | ------------- **Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**Limit** | **int32** | The number of results to return. -**Offset** | **int32** | The point in the list to begin retrieving results. -**AggregatedBy** | [**AggregatedBy3**](AggregatedBy3AggregatedBy3.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". -**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. ### Return type -[**[]ListStat200ResponseInner**](ListStat200ResponseInner.md) +[**[]ListAsmSuppression200ResponseInner**](ListAsmSuppression200ResponseInner.md) ### Authorization diff --git a/rest/api/v3/suppressions/docs/ListAsmSuppression200ResponseInner.md b/rest/api/v3/suppressions/docs/ListAsmSuppression200ResponseInner.md new file mode 100644 index 00000000..dbaa90e4 --- /dev/null +++ b/rest/api/v3/suppressions/docs/ListAsmSuppression200ResponseInner.md @@ -0,0 +1,14 @@ +# ListAsmSuppression200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address that was suppressed. | +**GroupId** | **int32** | The id of the suppression group that this email address belongs to. | +**GroupName** | **string** | The name of the suppression group that this email address belongs to. | +**CreatedAt** | **int32** | A UNIX timestamp indicating when the suppression was created. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/docs/ListGlobalSuppression.md b/rest/api/v3/suppressions/docs/ListGlobalSuppression.md new file mode 100644 index 00000000..0988f9e7 --- /dev/null +++ b/rest/api/v3/suppressions/docs/ListGlobalSuppression.md @@ -0,0 +1,53 @@ +# ListGlobalSuppression + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListGlobalSuppression**](ListGlobalSuppression.md#ListGlobalSuppression) | **Get** /v3/suppression/unsubscribes | Retrieve all global suppressions + + + +## ListGlobalSuppression + +> []ListGlobalSuppression200ResponseInner ListGlobalSuppression(ctx, optional) + +Retrieve all global suppressions + +**This endpoint allows you to retrieve a paginated list of all email address that are globally suppressed.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListGlobalSuppressionParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**StartTime** | **int32** | Refers start of the time range in unix timestamp when an unsubscribe email was created (inclusive). +**EndTime** | **int32** | Refers end of the time range in unix timestamp when an unsubscribe email was created (inclusive). +**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. The maximum page size for this endpoint is 500 items per page. +**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. +**Email** | **string** | Specifies which records to return based on the records' associated email addresses. For example, `sales` returns records with email addresses that start with 'sales', such as `salesdepartment@example.com` or `sales@example.com`. You can also use `%25` as a wildcard. For example, `%25market` returns records containing email addresses with the string 'market' anywhere in the email address, and `%25market%25tree` returns records containing email addresses with the string 'market' followed by the string 'tree'. Any reserved characters should be [percent-encoded](https://en.wikipedia.org/wiki/Percent-encoding#Reserved_characters), e.g., the `@` symbol should be encoded as `%40`. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**[]ListGlobalSuppression200ResponseInner**](ListGlobalSuppression200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/suppressions/docs/ListGlobalSuppression200ResponseInner.md b/rest/api/v3/suppressions/docs/ListGlobalSuppression200ResponseInner.md new file mode 100644 index 00000000..320a8bba --- /dev/null +++ b/rest/api/v3/suppressions/docs/ListGlobalSuppression200ResponseInner.md @@ -0,0 +1,12 @@ +# ListGlobalSuppression200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Created** | **int32** | A Unix timestamp indicating when the recipient was added to the global suppression list. | +**Email** | **string** | The email address of the recipient who is globally suppressed. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ListCategory.md b/rest/api/v3/suppressions/docs/ListInvalidEmail.md similarity index 62% rename from rest/api/v3/stats/docs/ListCategory.md rename to rest/api/v3/suppressions/docs/ListInvalidEmail.md index 02a75cbb..645fd8d9 100644 --- a/rest/api/v3/stats/docs/ListCategory.md +++ b/rest/api/v3/suppressions/docs/ListInvalidEmail.md @@ -1,20 +1,20 @@ -# ListCategory +# ListInvalidEmail All URIs are relative to *https://api.sendgrid.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**ListCategory**](ListCategory.md#ListCategory) | **Get** /v3/categories | Retrieve all categories +[**ListInvalidEmail**](ListInvalidEmail.md#ListInvalidEmail) | **Get** /v3/suppression/invalid_emails | Retrieve all invalid emails -## ListCategory +## ListInvalidEmail -> []ListCategory200ResponseInner ListCategory(ctx, optional) +> []InvalidEmail ListInvalidEmail(ctx, optional) -Retrieve all categories +Retrieve all invalid emails -**This endpoint allows you to retrieve a paginated list of all of your categories.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. +**This endpoint allows you to retrieve a paginated list of all invalid email addresses.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. ### Path Parameters @@ -22,19 +22,21 @@ This endpoint does not need any path parameter. ### Other Parameters -Other parameters are passed through a pointer to a ListCategoryParams struct +Other parameters are passed through a pointer to a ListInvalidEmailParams struct Name | Type | Description ------------- | ------------- | ------------- -**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. -**Category** | **string** | Allows you to perform a prefix search on this particular category. +**StartTime** | **int32** | Refers start of the time range in unix timestamp when an invalid email was created (inclusive). +**EndTime** | **int32** | Refers end of the time range in unix timestamp when an invalid email was created (inclusive). +**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. The maximum page size for this endpoint is 500 items per page. **Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. +**Email** | **string** | This parameter allows you to filter results by email address. Only invalid addresses matching an address passed in this parameter will be returned. **Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. ### Return type -[**[]ListCategory200ResponseInner**](ListCategory200ResponseInner.md) +[**[]InvalidEmail**](InvalidEmail.md) ### Authorization diff --git a/rest/api/v3/suppressions/docs/ListSpamReport.md b/rest/api/v3/suppressions/docs/ListSpamReport.md new file mode 100644 index 00000000..02471e3b --- /dev/null +++ b/rest/api/v3/suppressions/docs/ListSpamReport.md @@ -0,0 +1,53 @@ +# ListSpamReport + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSpamReport**](ListSpamReport.md#ListSpamReport) | **Get** /v3/suppression/spam_reports | Retrieve all spam reports + + + +## ListSpamReport + +> []SpamReportsResponseInner ListSpamReport(ctx, optional) + +Retrieve all spam reports + +**This endpoint allows you to retrieve a paginated list of all spam reports.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSpamReportParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**StartTime** | **int32** | The start of the time range when a spam report was created (inclusive). This is a unix timestamp. +**EndTime** | **int32** | The end of the time range when a spam report was created (inclusive). This is a unix timestamp. +**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. The maximum page size for this endpoint is 500 items per page. +**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. +**Email** | **string** | Specifies which records to return based on the records' associated email addresses. For example, `sales` returns records with email addresses that start with 'sales', such as `salesdepartment@example.com` or `sales@example.com`. You can also use `%25` as a wildcard. For example, `%25market` returns records containing email addresses with the string 'market' anywhere in the email address, and `%25market%25tree` returns records containing email addresses with the string 'market' followed by the string 'tree'. Any reserved characters should be [percent-encoded](https://en.wikipedia.org/wiki/Percent-encoding#Reserved_characters), e.g., the `@` symbol should be encoded as `%40`. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**[]SpamReportsResponseInner**](SpamReportsResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/suppressions/docs/ListSuppressionBlock.md b/rest/api/v3/suppressions/docs/ListSuppressionBlock.md new file mode 100644 index 00000000..8880af05 --- /dev/null +++ b/rest/api/v3/suppressions/docs/ListSuppressionBlock.md @@ -0,0 +1,53 @@ +# ListSuppressionBlock + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSuppressionBlock**](ListSuppressionBlock.md#ListSuppressionBlock) | **Get** /v3/suppression/blocks | Retrieve all blocks + + + +## ListSuppressionBlock + +> []BlocksResponseInner ListSuppressionBlock(ctx, optional) + +Retrieve all blocks + +**This endpoint allows you to retrieve a paginated list of all email addresses that are currently on your blocks list.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSuppressionBlockParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**StartTime** | **int32** | The start of the time range when a blocked email was created (inclusive). This is a unix timestamp. +**EndTime** | **int32** | The end of the time range when a blocked email was created (inclusive). This is a unix timestamp. +**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. The maximum page size for this endpoint is 500 items per page. +**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. +**Email** | **string** | Specifies which records to return based on the records' associated email addresses. For example, `sales` returns records with email addresses that start with 'sales', such as `salesdepartment@example.com` or `sales@example.com`. You can also use `%25` as a wildcard. For example, `%25market` returns records containing email addresses with the string 'market' anywhere in the email address, and `%25market%25tree` returns records containing email addresses with the string 'market' followed by the string 'tree'. Any reserved characters should be [percent-encoded](https://en.wikipedia.org/wiki/Percent-encoding#Reserved_characters), e.g., the `@` symbol should be encoded as `%40`. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**[]BlocksResponseInner**](BlocksResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/suppressions/docs/ListSuppressionBounces.md b/rest/api/v3/suppressions/docs/ListSuppressionBounces.md new file mode 100644 index 00000000..f4a1b4d5 --- /dev/null +++ b/rest/api/v3/suppressions/docs/ListSuppressionBounces.md @@ -0,0 +1,53 @@ +# ListSuppressionBounces + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSuppressionBounces**](ListSuppressionBounces.md#ListSuppressionBounces) | **Get** /v3/suppression/bounces | Retrieve all bounces + + + +## ListSuppressionBounces + +> []BounceResponse ListSuppressionBounces(ctx, Acceptoptional) + +Retrieve all bounces + +**This endpoint allows you to retrieve a paginated list of all your bounces.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSuppressionBouncesParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**StartTime** | **int32** | Refers start of the time range in unix timestamp when a bounce was created (inclusive). +**EndTime** | **int32** | Refers end of the time range in unix timestamp when a bounce was created (inclusive). +**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. The maximum page size for this endpoint is 500 items per page. +**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. +**Email** | **string** | Specifies which records to return based on the records' associated email addresses. For example, `sales` returns records with email addresses that start with 'sales', such as `salesdepartment@example.com` or `sales@example.com`. You can also use `%25` as a wildcard. For example, `%25market` returns records containing email addresses with the string 'market' anywhere in the email address, and `%25market%25tree` returns records containing email addresses with the string 'market' followed by the string 'tree'. Any reserved characters should be [percent-encoded](https://en.wikipedia.org/wiki/Percent-encoding#Reserved_characters), e.g., the `@` symbol should be encoded as `%40`. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**[]BounceResponse**](BounceResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/stats/docs/ListClientStat.md b/rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications.md similarity index 50% rename from rest/api/v3/stats/docs/ListClientStat.md rename to rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications.md index 12cd3294..e8eb6786 100644 --- a/rest/api/v3/stats/docs/ListClientStat.md +++ b/rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications.md @@ -1,20 +1,20 @@ -# ListClientStat +# ListSuppressionBouncesClassifications All URIs are relative to *https://api.sendgrid.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**ListClientStat**](ListClientStat.md#ListClientStat) | **Get** /v3/clients/stats | Retrieve email statistics by client type. +[**ListSuppressionBouncesClassifications**](ListSuppressionBouncesClassifications.md#ListSuppressionBouncesClassifications) | **Get** /v3/suppression/bounces/classifications | Retrieve bounce classification totals -## ListClientStat +## ListSuppressionBouncesClassifications -> []ListClientStat200ResponseInner ListClientStat(ctx, StartDateoptional) +> ListSuppressionBouncesClassifications200Response ListSuppressionBouncesClassifications(ctx, Acceptoptional) -Retrieve email statistics by client type. +Retrieve bounce classification totals -**This endpoint allows you to retrieve your email statistics segmented by client type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). +This endpoint will return the total number of bounces by classification in descending order for each day. You can retrieve the bounce classification totals in CSV format by specifying `\"text/csv\"` in the Accept header. ### Path Parameters @@ -22,18 +22,18 @@ This endpoint does not need any path parameter. ### Other Parameters -Other parameters are passed through a pointer to a ListClientStatParams struct +Other parameters are passed through a pointer to a ListSuppressionBouncesClassificationsParams struct Name | Type | Description ------------- | ------------- | ------------- +**StartDate** | **string** | The start of the time range, in YYYY-MM-DD format, when a bounce was created (inclusive). +**EndDate** | **string** | The end of the time range, in YYYY-MM-DD format, when a bounce was created (inclusive). **Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. -**AggregatedBy** | [**AggregatedBy2**](AggregatedBy2AggregatedBy2.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". ### Return type -[**[]ListClientStat200ResponseInner**](ListClientStat200ResponseInner.md) +[**ListSuppressionBouncesClassifications200Response**](ListSuppressionBouncesClassifications200Response.md) ### Authorization diff --git a/rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications200Response.md b/rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications200Response.md new file mode 100644 index 00000000..32dd2843 --- /dev/null +++ b/rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications200Response.md @@ -0,0 +1,11 @@ +# ListSuppressionBouncesClassifications200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ListSuppressionBouncesClassifications200ResponseResultInner**](ListSuppressionBouncesClassifications200ResponseResultInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications200ResponseResultInner.md b/rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications200ResponseResultInner.md new file mode 100644 index 00000000..6bcb64f5 --- /dev/null +++ b/rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications200ResponseResultInner.md @@ -0,0 +1,12 @@ +# ListSuppressionBouncesClassifications200ResponseResultInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | **string** | |[optional] +**Stats** | [**[]ListSuppressionBouncesClassifications200ResponseResultInnerStatsInner**](ListSuppressionBouncesClassifications200ResponseResultInnerStatsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications200ResponseResultInnerStatsInner.md b/rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications200ResponseResultInnerStatsInner.md new file mode 100644 index 00000000..17c6caf2 --- /dev/null +++ b/rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications200ResponseResultInnerStatsInner.md @@ -0,0 +1,12 @@ +# ListSuppressionBouncesClassifications200ResponseResultInnerStatsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Classification** | [**Classification**](Classification.md) | |[optional] +**Count** | **int32** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/docs/ListSuppressionFromAsmGroup.md b/rest/api/v3/suppressions/docs/ListSuppressionFromAsmGroup.md new file mode 100644 index 00000000..7aa31499 --- /dev/null +++ b/rest/api/v3/suppressions/docs/ListSuppressionFromAsmGroup.md @@ -0,0 +1,52 @@ +# ListSuppressionFromAsmGroup + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSuppressionFromAsmGroup**](ListSuppressionFromAsmGroup.md#ListSuppressionFromAsmGroup) | **Get** /v3/asm/groups/{GroupId}/suppressions | Retrieve all suppressions for a suppression group + + + +## ListSuppressionFromAsmGroup + +> []string ListSuppressionFromAsmGroup(ctx, GroupIdoptional) + +Retrieve all suppressions for a suppression group + +**This endpoint allows you to retrieve all suppressed email addresses belonging to the given group.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**GroupId** | **string** | The id of the unsubscribe group that you are adding suppressions to. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSuppressionFromAsmGroupParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**[]string** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_designs/docs/DesignDuplicateInput.md b/rest/api/v3/suppressions/docs/RetrieveAGlobalSuppressionResponse.md similarity index 55% rename from rest/api/v3/mc_designs/docs/DesignDuplicateInput.md rename to rest/api/v3/suppressions/docs/RetrieveAGlobalSuppressionResponse.md index db86680e..f4aa0680 100644 --- a/rest/api/v3/mc_designs/docs/DesignDuplicateInput.md +++ b/rest/api/v3/suppressions/docs/RetrieveAGlobalSuppressionResponse.md @@ -1,11 +1,10 @@ -# DesignDuplicateInput +# RetrieveAGlobalSuppressionResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Name** | **string** | The name of the new design. |[optional] [default to "Duplicate: "] -**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] +**RecipientEmail** | **string** | The email address that is globally suppressed. This will be an empty object if the email address you included in your call is not globally suppressed. | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rest/api/v3/suppressions/docs/SearchSuppressionFromAsmGroup.md b/rest/api/v3/suppressions/docs/SearchSuppressionFromAsmGroup.md new file mode 100644 index 00000000..a626bb5c --- /dev/null +++ b/rest/api/v3/suppressions/docs/SearchSuppressionFromAsmGroup.md @@ -0,0 +1,53 @@ +# SearchSuppressionFromAsmGroup + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SearchSuppressionFromAsmGroup**](SearchSuppressionFromAsmGroup.md#SearchSuppressionFromAsmGroup) | **Post** /v3/asm/groups/{GroupId}/suppressions/search | Search for suppressions within a group + + + +## SearchSuppressionFromAsmGroup + +> []string SearchSuppressionFromAsmGroup(ctx, GroupIdoptional) + +Search for suppressions within a group + +**This endpoint allows you to search a suppression group for multiple suppressions.** When given a list of email addresses and a group ID, this endpoint will only return the email addresses that have been unsubscribed from the given group. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**GroupId** | **string** | The ID of the suppression group that you would like to search. + +### Other Parameters + +Other parameters are passed through a pointer to a SearchSuppressionFromAsmGroupParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**SuppressionsRequest** | [**SuppressionsRequest**](SuppressionsRequest.md) | + +### Return type + +**[]string** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/suppressions/docs/SpamReportsResponseInner.md b/rest/api/v3/suppressions/docs/SpamReportsResponseInner.md new file mode 100644 index 00000000..5255b8f6 --- /dev/null +++ b/rest/api/v3/suppressions/docs/SpamReportsResponseInner.md @@ -0,0 +1,13 @@ +# SpamReportsResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Created** | **int32** | A Unix timestamp that indicates when the recipient marked your message as spam. | +**Email** | **string** | The email address of the recipient that marked your message as spam. | +**Ip** | **string** | The IP address that the message was sent from. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/docs/SuppressionGroup.md b/rest/api/v3/suppressions/docs/SuppressionGroup.md new file mode 100644 index 00000000..ec5a5d8d --- /dev/null +++ b/rest/api/v3/suppressions/docs/SuppressionGroup.md @@ -0,0 +1,16 @@ +# SuppressionGroup + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **float32** | The id of the suppression group. | +**Name** | **string** | The name of the suppression group. Each group created by a user must have a unique name. | +**Description** | **string** | A description of the suppression group. | +**LastEmailSentAt** | **int32** | |[optional] +**IsDefault** | **bool** | Indicates if this is the default suppression group. |[optional] [default to false] +**Unsubscribes** | **int32** | The unsubscribes associated with this group. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/docs/SuppressionGroupRequestBaseProps.md b/rest/api/v3/suppressions/docs/SuppressionGroupRequestBaseProps.md new file mode 100644 index 00000000..1974035c --- /dev/null +++ b/rest/api/v3/suppressions/docs/SuppressionGroupRequestBaseProps.md @@ -0,0 +1,13 @@ +# SuppressionGroupRequestBaseProps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of your suppression group. Required when creating a group. |[optional] +**Description** | **string** | A brief description of your suppression group. Required when creating a group. |[optional] +**IsDefault** | **bool** | Indicates if you would like this to be your default suppression group. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/docs/SuppressionsRequest.md b/rest/api/v3/suppressions/docs/SuppressionsRequest.md new file mode 100644 index 00000000..daf35b4c --- /dev/null +++ b/rest/api/v3/suppressions/docs/SuppressionsRequest.md @@ -0,0 +1,11 @@ +# SuppressionsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RecipientEmails** | **[]string** | The array of email addresses to add or find. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/docs/UpdateAsmGroup.md b/rest/api/v3/suppressions/docs/UpdateAsmGroup.md new file mode 100644 index 00000000..a64117f5 --- /dev/null +++ b/rest/api/v3/suppressions/docs/UpdateAsmGroup.md @@ -0,0 +1,53 @@ +# UpdateAsmGroup + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateAsmGroup**](UpdateAsmGroup.md#UpdateAsmGroup) | **Patch** /v3/asm/groups/{GroupId} | Update a suppression group. + + + +## UpdateAsmGroup + +> SuppressionGroup UpdateAsmGroup(ctx, GroupIdoptional) + +Update a suppression group. + +**This endpoint allows you to update or change a suppression group.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**GroupId** | **string** | The ID of the suppression group you would like to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateAsmGroupParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateAsmGroupRequest** | [**UpdateAsmGroupRequest**](UpdateAsmGroupRequest.md) | + +### Return type + +[**SuppressionGroup**](SuppressionGroup.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/suppressions/docs/UpdateAsmGroupRequest.md b/rest/api/v3/suppressions/docs/UpdateAsmGroupRequest.md new file mode 100644 index 00000000..35240f0d --- /dev/null +++ b/rest/api/v3/suppressions/docs/UpdateAsmGroupRequest.md @@ -0,0 +1,13 @@ +# UpdateAsmGroupRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of your suppression group. Required when creating a group. |[optional] +**Description** | **string** | A brief description of your suppression group. Required when creating a group. |[optional] +**IsDefault** | **bool** | Indicates if you would like this to be your default suppression group. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/suppressions/model_accept.go b/rest/api/v3/suppressions/model_accept.go new file mode 100644 index 00000000..e08023dd --- /dev/null +++ b/rest/api/v3/suppressions/model_accept.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Accept the model 'Accept' +type Accept string + +// List of Accept +const ( + ACCEPT_APPLICATION_JSON Accept = "application/json" + ACCEPT_TEXT_CSV Accept = "text/csv" +) diff --git a/rest/api/v3/suppressions/model_accept1.go b/rest/api/v3/suppressions/model_accept1.go new file mode 100644 index 00000000..f70b5a65 --- /dev/null +++ b/rest/api/v3/suppressions/model_accept1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Accept1 the model 'Accept1' +type Accept1 string + +// List of Accept1 +const ( + ACCEPT1_APPLICATION_JSON Accept1 = "application/json" + ACCEPT1_TEXT_CSV Accept1 = "text/csv" +) diff --git a/rest/api/v3/suppressions/model_add_suppression_to_asm_group_201_response.go b/rest/api/v3/suppressions/model_add_suppression_to_asm_group_201_response.go new file mode 100644 index 00000000..c5ebcabf --- /dev/null +++ b/rest/api/v3/suppressions/model_add_suppression_to_asm_group_201_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddSuppressionToAsmGroup201Response struct for AddSuppressionToAsmGroup201Response +type AddSuppressionToAsmGroup201Response struct { + // The email addresses you added to the unsubscribe group + RecipientEmails *[]string `json:"recipient_emails,omitempty"` +} diff --git a/rest/api/v3/suppressions/model_blocks_response_inner.go b/rest/api/v3/suppressions/model_blocks_response_inner.go new file mode 100644 index 00000000..a906ce03 --- /dev/null +++ b/rest/api/v3/suppressions/model_blocks_response_inner.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// BlocksResponseInner struct for BlocksResponseInner +type BlocksResponseInner struct { + // A Unix timestamp indicating when the email address was added to the blocks list. + Created int32 `json:"created"` + // The email address that was added to the block list. + Email string `json:"email"` + // An explanation for the reason of the block. + Reason string `json:"reason"` + // The status of the block. + Status string `json:"status"` +} diff --git a/rest/api/v3/suppressions/model_bounce_response.go b/rest/api/v3/suppressions/model_bounce_response.go new file mode 100644 index 00000000..6834eb6d --- /dev/null +++ b/rest/api/v3/suppressions/model_bounce_response.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// BounceResponse struct for BounceResponse +type BounceResponse struct { + // The unix timestamp for when the bounce record was created at SendGrid. + Created *float32 `json:"created,omitempty"` + // The email address that was added to the bounce list. + Email *string `json:"email,omitempty"` + // The reason for the bounce. This typically will be a bounce code, an enhanced code, and a description. + Reason *string `json:"reason,omitempty"` + // Enhanced SMTP bounce response + Status *string `json:"status,omitempty"` +} diff --git a/rest/api/v3/suppressions/model_classification.go b/rest/api/v3/suppressions/model_classification.go new file mode 100644 index 00000000..53bcb61f --- /dev/null +++ b/rest/api/v3/suppressions/model_classification.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Classification the model 'Classification' +type Classification string + +// List of Classification +const ( + CLASSIFICATION_CONTENT Classification = "Content" + CLASSIFICATION_FREQUENCY_OR_VOLUME_TOO_HIGH Classification = "Frequency or Volume Too High" + CLASSIFICATION_INVALID_ADDRESS Classification = "Invalid Address" + CLASSIFICATION_MAILBOX_UNAVAILABLE Classification = "Mailbox Unavailable" + CLASSIFICATION_REPUTATION Classification = "Reputation" + CLASSIFICATION_TECHNICAL_FAILURE Classification = "Technical Failure" + CLASSIFICATION_UNCLASSIFIED Classification = "Unclassified" +) diff --git a/rest/api/v3/suppressions/model_classification1.go b/rest/api/v3/suppressions/model_classification1.go new file mode 100644 index 00000000..3d9f6e88 --- /dev/null +++ b/rest/api/v3/suppressions/model_classification1.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Classification1 the model 'Classification1' +type Classification1 string + +// List of Classification1 +const ( + CLASSIFICATION1_CONTENT Classification1 = "Content" + CLASSIFICATION1_FREQUENCY_OR_VOLUME_TOO_HIGH Classification1 = "Frequency or Volume Too High" + CLASSIFICATION1_INVALID_ADDRESS Classification1 = "Invalid Address" + CLASSIFICATION1_MAILBOX_UNAVAILABLE Classification1 = "Mailbox Unavailable" + CLASSIFICATION1_REPUTATION Classification1 = "Reputation" + CLASSIFICATION1_TECHNICAL_FAILURE Classification1 = "Technical Failure" + CLASSIFICATION1_UNCLASSIFIED Classification1 = "Unclassified" +) diff --git a/rest/api/v3/suppressions/model_creat_asm_group_201_response.go b/rest/api/v3/suppressions/model_creat_asm_group_201_response.go new file mode 100644 index 00000000..2a685e21 --- /dev/null +++ b/rest/api/v3/suppressions/model_creat_asm_group_201_response.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreatAsmGroup201Response struct for CreatAsmGroup201Response +type CreatAsmGroup201Response struct { + // The ID of the suppression group. + Id int32 `json:"id"` + // The name of the suppression group. + Name string `json:"name"` + // A brief description of the suppression group. + Description string `json:"description"` + // Indicates if this is the default suppression group. + IsDefault bool `json:"is_default"` +} diff --git a/rest/api/v3/suppressions/model_create_global_suppression_201_response.go b/rest/api/v3/suppressions/model_create_global_suppression_201_response.go new file mode 100644 index 00000000..df12fc56 --- /dev/null +++ b/rest/api/v3/suppressions/model_create_global_suppression_201_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateGlobalSuppression201Response struct for CreateGlobalSuppression201Response +type CreateGlobalSuppression201Response struct { + // The email addresses that are globally suppressed + RecipientEmails []string `json:"recipient_emails"` +} diff --git a/rest/api/v3/suppressions/model_delete_invalid_emails_request.go b/rest/api/v3/suppressions/model_delete_invalid_emails_request.go new file mode 100644 index 00000000..2fa43185 --- /dev/null +++ b/rest/api/v3/suppressions/model_delete_invalid_emails_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteInvalidEmailsRequest struct for DeleteInvalidEmailsRequest +type DeleteInvalidEmailsRequest struct { + // Indicates if you want to remove all email address from the invalid emails list. + DeleteAll *bool `json:"delete_all,omitempty"` + // The list of specific email addresses that you want to remove. + Emails *[]string `json:"emails,omitempty"` +} diff --git a/rest/api/v3/suppressions/model_delete_spam_reports_request.go b/rest/api/v3/suppressions/model_delete_spam_reports_request.go new file mode 100644 index 00000000..9beb9883 --- /dev/null +++ b/rest/api/v3/suppressions/model_delete_spam_reports_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteSpamReportsRequest struct for DeleteSpamReportsRequest +type DeleteSpamReportsRequest struct { + // Indicates if you want to delete all email addresses on the spam report list. + DeleteAll *bool `json:"delete_all,omitempty"` + // A list of specific email addresses that you want to remove from the spam report list. + Emails *[]string `json:"emails,omitempty"` +} diff --git a/rest/api/v3/suppressions/model_delete_suppression_blocks_request.go b/rest/api/v3/suppressions/model_delete_suppression_blocks_request.go new file mode 100644 index 00000000..8387a722 --- /dev/null +++ b/rest/api/v3/suppressions/model_delete_suppression_blocks_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteSuppressionBlocksRequest struct for DeleteSuppressionBlocksRequest +type DeleteSuppressionBlocksRequest struct { + // Indicates if you want to delete all blocked email addresses. + DeleteAll *bool `json:"delete_all,omitempty"` + // The specific blocked email addresses that you want to delete. + Emails *[]string `json:"emails,omitempty"` +} diff --git a/rest/api/v3/suppressions/model_delete_suppression_bounces_request.go b/rest/api/v3/suppressions/model_delete_suppression_bounces_request.go new file mode 100644 index 00000000..7e8eeea0 --- /dev/null +++ b/rest/api/v3/suppressions/model_delete_suppression_bounces_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteSuppressionBouncesRequest struct for DeleteSuppressionBouncesRequest +type DeleteSuppressionBouncesRequest struct { + // This parameter allows you to delete **every** email in your bounce list. This should not be used with the emails parameter. + DeleteAll *bool `json:"delete_all,omitempty"` + // Delete multiple emails from your bounce list at the same time. This should not be used with the delete_all parameter. + Emails *[]string `json:"emails,omitempty"` +} diff --git a/rest/api/v3/suppressions/model_error_response.go b/rest/api/v3/suppressions/model_error_response.go new file mode 100644 index 00000000..a6d36320 --- /dev/null +++ b/rest/api/v3/suppressions/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/suppressions/model_error_response_errors_inner.go b/rest/api/v3/suppressions/model_error_response_errors_inner.go new file mode 100644 index 00000000..a20447e5 --- /dev/null +++ b/rest/api/v3/suppressions/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/suppressions/model_get_asm_group_200_response.go b/rest/api/v3/suppressions/model_get_asm_group_200_response.go new file mode 100644 index 00000000..bb547531 --- /dev/null +++ b/rest/api/v3/suppressions/model_get_asm_group_200_response.go @@ -0,0 +1,29 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetAsmGroup200Response struct for GetAsmGroup200Response +type GetAsmGroup200Response struct { + // The name of your suppression group. Required when creating a group. + Name *string `json:"name,omitempty"` + // A brief description of your suppression group. Required when creating a group. + Description *string `json:"description,omitempty"` + // Indicates if you would like this to be your default suppression group. + IsDefault *bool `json:"is_default,omitempty"` + // The ID of the suppression group. + Id int32 `json:"id"` + // The number of unsubscribes, or suppressions, in this group. + Unsubscribes *int32 `json:"unsubscribes,omitempty"` + LastEmailSentAt *string `json:"last_email_sent_at,omitempty"` +} diff --git a/rest/api/v3/suppressions/model_get_asm_suppression_200_response.go b/rest/api/v3/suppressions/model_get_asm_suppression_200_response.go new file mode 100644 index 00000000..009b3bdc --- /dev/null +++ b/rest/api/v3/suppressions/model_get_asm_suppression_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetAsmSuppression200Response struct for GetAsmSuppression200Response +type GetAsmSuppression200Response struct { + // The array of suppression groups. + Suppressions []GetAsmSuppression200ResponseSuppressionsInner `json:"suppressions"` +} diff --git a/rest/api/v3/suppressions/model_get_asm_suppression_200_response_suppressions_inner.go b/rest/api/v3/suppressions/model_get_asm_suppression_200_response_suppressions_inner.go new file mode 100644 index 00000000..6edb9094 --- /dev/null +++ b/rest/api/v3/suppressions/model_get_asm_suppression_200_response_suppressions_inner.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetAsmSuppression200ResponseSuppressionsInner struct for GetAsmSuppression200ResponseSuppressionsInner +type GetAsmSuppression200ResponseSuppressionsInner struct { + // The description of the suppression group. + Description string `json:"description"` + // The id of the suppression group. + Id int32 `json:"id"` + // Indicates if the suppression group is set as the default. + IsDefault bool `json:"is_default"` + // The name of the suppression group. + Name string `json:"name"` + // Indicates if the given email address is suppressed for this group. + Suppressed bool `json:"suppressed"` +} diff --git a/rest/api/v3/suppressions/model_get_suppression_bounces_classifications_200_response.go b/rest/api/v3/suppressions/model_get_suppression_bounces_classifications_200_response.go new file mode 100644 index 00000000..f20a08bd --- /dev/null +++ b/rest/api/v3/suppressions/model_get_suppression_bounces_classifications_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetSuppressionBouncesClassifications200Response struct for GetSuppressionBouncesClassifications200Response +type GetSuppressionBouncesClassifications200Response struct { + Result *[]GetSuppressionBouncesClassifications200ResponseResultInner `json:"result,omitempty"` +} diff --git a/rest/api/v3/suppressions/model_get_suppression_bounces_classifications_200_response_result_inner.go b/rest/api/v3/suppressions/model_get_suppression_bounces_classifications_200_response_result_inner.go new file mode 100644 index 00000000..9a5bda36 --- /dev/null +++ b/rest/api/v3/suppressions/model_get_suppression_bounces_classifications_200_response_result_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetSuppressionBouncesClassifications200ResponseResultInner struct for GetSuppressionBouncesClassifications200ResponseResultInner +type GetSuppressionBouncesClassifications200ResponseResultInner struct { + Date *string `json:"date,omitempty"` + Stats *[]GetSuppressionBouncesClassifications200ResponseResultInnerStatsInner `json:"stats,omitempty"` +} diff --git a/rest/api/v3/suppressions/model_get_suppression_bounces_classifications_200_response_result_inner_stats_inner.go b/rest/api/v3/suppressions/model_get_suppression_bounces_classifications_200_response_result_inner_stats_inner.go new file mode 100644 index 00000000..2cfe0b26 --- /dev/null +++ b/rest/api/v3/suppressions/model_get_suppression_bounces_classifications_200_response_result_inner_stats_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetSuppressionBouncesClassifications200ResponseResultInnerStatsInner struct for GetSuppressionBouncesClassifications200ResponseResultInnerStatsInner +type GetSuppressionBouncesClassifications200ResponseResultInnerStatsInner struct { + Domain *string `json:"domain,omitempty"` + Count *int32 `json:"count,omitempty"` +} diff --git a/rest/api/v3/suppressions/model_invalid_email.go b/rest/api/v3/suppressions/model_invalid_email.go new file mode 100644 index 00000000..0157a939 --- /dev/null +++ b/rest/api/v3/suppressions/model_invalid_email.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// InvalidEmail struct for InvalidEmail +type InvalidEmail struct { + // A Unix timestamp indicating when the email address was added to the invalid emails list. + Created *int32 `json:"created,omitempty"` + // The email address that was marked as invalid. + Email *string `json:"email,omitempty"` + // The reason that the email address was marked as invalid. + Reason *string `json:"reason,omitempty"` +} diff --git a/rest/api/v3/suppressions/model_list_asm_suppression_200_response_inner.go b/rest/api/v3/suppressions/model_list_asm_suppression_200_response_inner.go new file mode 100644 index 00000000..60015fac --- /dev/null +++ b/rest/api/v3/suppressions/model_list_asm_suppression_200_response_inner.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListAsmSuppression200ResponseInner struct for ListAsmSuppression200ResponseInner +type ListAsmSuppression200ResponseInner struct { + // The email address that was suppressed. + Email string `json:"email"` + // The id of the suppression group that this email address belongs to. + GroupId int32 `json:"group_id"` + // The name of the suppression group that this email address belongs to. + GroupName string `json:"group_name"` + // A UNIX timestamp indicating when the suppression was created. + CreatedAt int32 `json:"created_at"` +} diff --git a/rest/api/v3/suppressions/model_list_global_suppression_200_response_inner.go b/rest/api/v3/suppressions/model_list_global_suppression_200_response_inner.go new file mode 100644 index 00000000..b9b83a4c --- /dev/null +++ b/rest/api/v3/suppressions/model_list_global_suppression_200_response_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListGlobalSuppression200ResponseInner struct for ListGlobalSuppression200ResponseInner +type ListGlobalSuppression200ResponseInner struct { + // A Unix timestamp indicating when the recipient was added to the global suppression list. + Created int32 `json:"created"` + // The email address of the recipient who is globally suppressed. + Email string `json:"email"` +} diff --git a/rest/api/v3/suppressions/model_list_suppression_bounces_classifications_200_response.go b/rest/api/v3/suppressions/model_list_suppression_bounces_classifications_200_response.go new file mode 100644 index 00000000..bafc10de --- /dev/null +++ b/rest/api/v3/suppressions/model_list_suppression_bounces_classifications_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSuppressionBouncesClassifications200Response struct for ListSuppressionBouncesClassifications200Response +type ListSuppressionBouncesClassifications200Response struct { + Result *[]ListSuppressionBouncesClassifications200ResponseResultInner `json:"result,omitempty"` +} diff --git a/rest/api/v3/suppressions/model_list_suppression_bounces_classifications_200_response_result_inner.go b/rest/api/v3/suppressions/model_list_suppression_bounces_classifications_200_response_result_inner.go new file mode 100644 index 00000000..b567cb4d --- /dev/null +++ b/rest/api/v3/suppressions/model_list_suppression_bounces_classifications_200_response_result_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSuppressionBouncesClassifications200ResponseResultInner struct for ListSuppressionBouncesClassifications200ResponseResultInner +type ListSuppressionBouncesClassifications200ResponseResultInner struct { + Date *string `json:"date,omitempty"` + Stats *[]ListSuppressionBouncesClassifications200ResponseResultInnerStatsInner `json:"stats,omitempty"` +} diff --git a/rest/api/v3/suppressions/model_list_suppression_bounces_classifications_200_response_result_inner_stats_inner.go b/rest/api/v3/suppressions/model_list_suppression_bounces_classifications_200_response_result_inner_stats_inner.go new file mode 100644 index 00000000..c9fed4cc --- /dev/null +++ b/rest/api/v3/suppressions/model_list_suppression_bounces_classifications_200_response_result_inner_stats_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSuppressionBouncesClassifications200ResponseResultInnerStatsInner struct for ListSuppressionBouncesClassifications200ResponseResultInnerStatsInner +type ListSuppressionBouncesClassifications200ResponseResultInnerStatsInner struct { + Classification *Classification `json:"classification,omitempty"` + Count *int32 `json:"count,omitempty"` +} diff --git a/rest/api/v3/suppressions/model_retrieve_a_global_suppression_response.go b/rest/api/v3/suppressions/model_retrieve_a_global_suppression_response.go new file mode 100644 index 00000000..3cd524c7 --- /dev/null +++ b/rest/api/v3/suppressions/model_retrieve_a_global_suppression_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// RetrieveAGlobalSuppressionResponse struct for RetrieveAGlobalSuppressionResponse +type RetrieveAGlobalSuppressionResponse struct { + // The email address that is globally suppressed. This will be an empty object if the email address you included in your call is not globally suppressed. + RecipientEmail string `json:"recipient_email"` +} diff --git a/rest/api/v3/suppressions/model_spam_reports_response_inner.go b/rest/api/v3/suppressions/model_spam_reports_response_inner.go new file mode 100644 index 00000000..37df519f --- /dev/null +++ b/rest/api/v3/suppressions/model_spam_reports_response_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SpamReportsResponseInner struct for SpamReportsResponseInner +type SpamReportsResponseInner struct { + // A Unix timestamp that indicates when the recipient marked your message as spam. + Created int32 `json:"created"` + // The email address of the recipient that marked your message as spam. + Email string `json:"email"` + // The IP address that the message was sent from. + Ip string `json:"ip"` +} diff --git a/rest/api/v3/suppressions/model_suppression_group.go b/rest/api/v3/suppressions/model_suppression_group.go new file mode 100644 index 00000000..390ef4a6 --- /dev/null +++ b/rest/api/v3/suppressions/model_suppression_group.go @@ -0,0 +1,29 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SuppressionGroup struct for SuppressionGroup +type SuppressionGroup struct { + // The id of the suppression group. + Id float32 `json:"id"` + // The name of the suppression group. Each group created by a user must have a unique name. + Name string `json:"name"` + // A description of the suppression group. + Description string `json:"description"` + LastEmailSentAt *int32 `json:"last_email_sent_at,omitempty"` + // Indicates if this is the default suppression group. + IsDefault *bool `json:"is_default,omitempty"` + // The unsubscribes associated with this group. + Unsubscribes *int32 `json:"unsubscribes,omitempty"` +} diff --git a/rest/api/v3/suppressions/model_suppression_group_request_base_props.go b/rest/api/v3/suppressions/model_suppression_group_request_base_props.go new file mode 100644 index 00000000..e6afdd18 --- /dev/null +++ b/rest/api/v3/suppressions/model_suppression_group_request_base_props.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SuppressionGroupRequestBaseProps struct for SuppressionGroupRequestBaseProps +type SuppressionGroupRequestBaseProps struct { + // The name of your suppression group. Required when creating a group. + Name *string `json:"name,omitempty"` + // A brief description of your suppression group. Required when creating a group. + Description *string `json:"description,omitempty"` + // Indicates if you would like this to be your default suppression group. + IsDefault *bool `json:"is_default,omitempty"` +} diff --git a/rest/api/v3/suppressions/model_suppressions_request.go b/rest/api/v3/suppressions/model_suppressions_request.go new file mode 100644 index 00000000..c38f1bfd --- /dev/null +++ b/rest/api/v3/suppressions/model_suppressions_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SuppressionsRequest struct for SuppressionsRequest +type SuppressionsRequest struct { + // The array of email addresses to add or find. + RecipientEmails []string `json:"recipient_emails"` +} diff --git a/rest/api/v3/suppressions/model_update_asm_group_request.go b/rest/api/v3/suppressions/model_update_asm_group_request.go new file mode 100644 index 00000000..21982594 --- /dev/null +++ b/rest/api/v3/suppressions/model_update_asm_group_request.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Suppressions API +* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateAsmGroupRequest struct for UpdateAsmGroupRequest +type UpdateAsmGroupRequest struct { + // The name of your suppression group. Required when creating a group. + Name *string `json:"name,omitempty"` + // A brief description of your suppression group. Required when creating a group. + Description *string `json:"description,omitempty"` + // Indicates if you would like this to be your default suppression group. + IsDefault *bool `json:"is_default,omitempty"` +} diff --git a/rest/api/v3/teammates/.openapi-generator b/rest/api/v3/teammates/.openapi-generator index 3d306f1a..1048799f 100644 --- a/rest/api/v3/teammates/.openapi-generator +++ b/rest/api/v3/teammates/.openapi-generator @@ -1,4 +1,5 @@ .openapi-generator +.openapi-generator-ignore README.md api_delete_pending_teammate.go api_delete_teammate.go diff --git a/rest/api/v3/teammates/README.md b/rest/api/v3/teammates/README.md index b737841f..8f89c763 100644 --- a/rest/api/v3/teammates/README.md +++ b/rest/api/v3/teammates/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:44.531869+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:38.449175+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/teammates/api_delete_pending_teammate.go b/rest/api/v3/teammates/api_delete_pending_teammate.go index 8bbc5450..bf4f704f 100644 --- a/rest/api/v3/teammates/api_delete_pending_teammate.go +++ b/rest/api/v3/teammates/api_delete_pending_teammate.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -65,5 +66,5 @@ func (c *ApiService) DeletePendingTeammate(params *DeletePendingTeammateParam) ( return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/teammates/api_delete_teammate.go b/rest/api/v3/teammates/api_delete_teammate.go index e7a451b1..62147561 100644 --- a/rest/api/v3/teammates/api_delete_teammate.go +++ b/rest/api/v3/teammates/api_delete_teammate.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -65,5 +66,5 @@ func (c *ApiService) DeleteTeammate(params *DeleteTeammateParam) (interface{}, e return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/teammates/api_get_teammate.go b/rest/api/v3/teammates/api_get_teammate.go index 45f2a7bb..484b7167 100644 --- a/rest/api/v3/teammates/api_get_teammate.go +++ b/rest/api/v3/teammates/api_get_teammate.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -65,5 +66,5 @@ func (c *ApiService) GetTeammate(params *GetTeammateParam) (interface{}, error) return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/teammates/api_invite_teammate.go b/rest/api/v3/teammates/api_invite_teammate.go index a41dca17..13739ee5 100644 --- a/rest/api/v3/teammates/api_invite_teammate.go +++ b/rest/api/v3/teammates/api_invite_teammate.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -77,5 +78,5 @@ func (c *ApiService) InviteTeammate(params *InviteTeammateParam) (interface{}, e return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/teammates/api_list_pending_teammate.go b/rest/api/v3/teammates/api_list_pending_teammate.go index 6331225a..afbc29ea 100644 --- a/rest/api/v3/teammates/api_list_pending_teammate.go +++ b/rest/api/v3/teammates/api_list_pending_teammate.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -54,5 +55,5 @@ func (c *ApiService) ListPendingTeammate(params *ListPendingTeammateParam) (inte return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/teammates/api_list_subuser_by_template.go b/rest/api/v3/teammates/api_list_subuser_by_template.go index f52e7d1a..c032f77d 100644 --- a/rest/api/v3/teammates/api_list_subuser_by_template.go +++ b/rest/api/v3/teammates/api_list_subuser_by_template.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" "strings" @@ -117,5 +118,5 @@ func (c *ApiService) ListSubuserByTemplate(params *ListSubuserByTemplateParam) ( return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/teammates/api_list_teammate.go b/rest/api/v3/teammates/api_list_teammate.go index 2e703563..0109f5ea 100644 --- a/rest/api/v3/teammates/api_list_teammate.go +++ b/rest/api/v3/teammates/api_list_teammate.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -74,5 +75,5 @@ func (c *ApiService) ListTeammate(params *ListTeammateParam) (interface{}, error return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/teammates/api_resend_teammate_invite.go b/rest/api/v3/teammates/api_resend_teammate_invite.go index 585f60ca..f882caae 100644 --- a/rest/api/v3/teammates/api_resend_teammate_invite.go +++ b/rest/api/v3/teammates/api_resend_teammate_invite.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -73,5 +74,5 @@ func (c *ApiService) ResendTeammateInvite(params *ResendTeammateInviteParam) (in return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/teammates/api_update_teammate.go b/rest/api/v3/teammates/api_update_teammate.go index 83c1d5d4..afc24ee0 100644 --- a/rest/api/v3/teammates/api_update_teammate.go +++ b/rest/api/v3/teammates/api_update_teammate.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -96,5 +97,5 @@ func (c *ApiService) UpdateTeammate(params *UpdateTeammateParam) (interface{}, e return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/templates/.openapi-generator b/rest/api/v3/templates/.openapi-generator index 15d4d7d4..1d4b1f66 100644 --- a/rest/api/v3/templates/.openapi-generator +++ b/rest/api/v3/templates/.openapi-generator @@ -1,4 +1,5 @@ .openapi-generator +.openapi-generator-ignore README.md api_activate_template_version.go api_create_template.go diff --git a/rest/api/v3/templates/README.md b/rest/api/v3/templates/README.md index d37cb730..d0132555 100644 --- a/rest/api/v3/templates/README.md +++ b/rest/api/v3/templates/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:44.535845+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:38.465357+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/templates/api_activate_template_version.go b/rest/api/v3/templates/api_activate_template_version.go index defc3076..c1b70608 100644 --- a/rest/api/v3/templates/api_activate_template_version.go +++ b/rest/api/v3/templates/api_activate_template_version.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -74,5 +75,5 @@ func (c *ApiService) ActivateTemplateVersion(params *ActivateTemplateVersionPara return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/templates/api_create_template.go b/rest/api/v3/templates/api_create_template.go index 783d94aa..2a686e8c 100644 --- a/rest/api/v3/templates/api_create_template.go +++ b/rest/api/v3/templates/api_create_template.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -69,5 +70,5 @@ func (c *ApiService) CreateTemplate(params *CreateTemplateParam) (interface{}, e return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/templates/api_create_template_version.go b/rest/api/v3/templates/api_create_template_version.go index ca08ddff..f0b71f2c 100644 --- a/rest/api/v3/templates/api_create_template_version.go +++ b/rest/api/v3/templates/api_create_template_version.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -80,5 +81,5 @@ func (c *ApiService) CreateTemplateVersion(params *CreateTemplateVersionParam) ( return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/templates/api_delete_template.go b/rest/api/v3/templates/api_delete_template.go index 01d3f63d..fc3c83f5 100644 --- a/rest/api/v3/templates/api_delete_template.go +++ b/rest/api/v3/templates/api_delete_template.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -65,5 +66,5 @@ func (c *ApiService) DeleteTemplate(params *DeleteTemplateParam) (interface{}, e return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/templates/api_delete_template_version.go b/rest/api/v3/templates/api_delete_template_version.go index b80da19b..cb6029dd 100644 --- a/rest/api/v3/templates/api_delete_template_version.go +++ b/rest/api/v3/templates/api_delete_template_version.go @@ -14,6 +14,7 @@ package openapi import ( + "net/http" "net/url" "strings" @@ -65,5 +66,5 @@ func (c *ApiService) DeleteTemplateVersion(params *DeleteTemplateVersionParam) ( } defer resp.Body.Close() - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/templates/api_duplicate_template.go b/rest/api/v3/templates/api_duplicate_template.go index a17e9178..4158f613 100644 --- a/rest/api/v3/templates/api_duplicate_template.go +++ b/rest/api/v3/templates/api_duplicate_template.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -80,5 +81,5 @@ func (c *ApiService) DuplicateTemplate(params *DuplicateTemplateParam) (interfac return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/templates/api_get_template.go b/rest/api/v3/templates/api_get_template.go index 85c005b9..e9de9de8 100644 --- a/rest/api/v3/templates/api_get_template.go +++ b/rest/api/v3/templates/api_get_template.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -65,5 +66,5 @@ func (c *ApiService) GetTemplate(params *GetTemplateParam) (interface{}, error) return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/templates/api_get_template_version.go b/rest/api/v3/templates/api_get_template_version.go index 13d44a21..4aceeda3 100644 --- a/rest/api/v3/templates/api_get_template_version.go +++ b/rest/api/v3/templates/api_get_template_version.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -74,5 +75,5 @@ func (c *ApiService) GetTemplateVersion(params *GetTemplateVersionParam) (interf return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/templates/api_list_template.go b/rest/api/v3/templates/api_list_template.go index 2f66317f..2003a0af 100644 --- a/rest/api/v3/templates/api_list_template.go +++ b/rest/api/v3/templates/api_list_template.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -91,5 +92,5 @@ func (c *ApiService) ListTemplate(params *ListTemplateParam) (interface{}, error return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/templates/api_update_template.go b/rest/api/v3/templates/api_update_template.go index cc483ed9..430d00fc 100644 --- a/rest/api/v3/templates/api_update_template.go +++ b/rest/api/v3/templates/api_update_template.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -80,5 +81,5 @@ func (c *ApiService) UpdateTemplate(params *UpdateTemplateParam) (interface{}, e return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/templates/api_update_template_version.go b/rest/api/v3/templates/api_update_template_version.go index 358bc618..6ff3eeac 100644 --- a/rest/api/v3/templates/api_update_template_version.go +++ b/rest/api/v3/templates/api_update_template_version.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -89,5 +90,5 @@ func (c *ApiService) UpdateTemplateVersion(params *UpdateTemplateVersionParam) ( return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/tracking_settings/README.md b/rest/api/v3/tracking_settings/README.md index 5359dddf..911353ae 100644 --- a/rest/api/v3/tracking_settings/README.md +++ b/rest/api/v3/tracking_settings/README.md @@ -7,7 +7,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:44.521559+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:38.511849+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/tracking_settings/api_list_click_tracking_setting.go b/rest/api/v3/tracking_settings/api_list_click_tracking_setting.go index 277e8b37..c2aa40b0 100644 --- a/rest/api/v3/tracking_settings/api_list_click_tracking_setting.go +++ b/rest/api/v3/tracking_settings/api_list_click_tracking_setting.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -54,5 +55,5 @@ func (c *ApiService) ListClickTrackingSetting(params *ListClickTrackingSettingPa return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/tracking_settings/api_list_google_analytics_tracking_setting.go b/rest/api/v3/tracking_settings/api_list_google_analytics_tracking_setting.go index eb245ccd..0f180a15 100644 --- a/rest/api/v3/tracking_settings/api_list_google_analytics_tracking_setting.go +++ b/rest/api/v3/tracking_settings/api_list_google_analytics_tracking_setting.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -54,5 +55,5 @@ func (c *ApiService) ListGoogleAnalyticsTrackingSetting(params *ListGoogleAnalyt return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/tracking_settings/api_list_open_tracking_setting.go b/rest/api/v3/tracking_settings/api_list_open_tracking_setting.go index fea7e0bf..1b2f70b3 100644 --- a/rest/api/v3/tracking_settings/api_list_open_tracking_setting.go +++ b/rest/api/v3/tracking_settings/api_list_open_tracking_setting.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -54,5 +55,5 @@ func (c *ApiService) ListOpenTrackingSetting(params *ListOpenTrackingSettingPara return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/tracking_settings/api_list_subscription_tracking_setting.go b/rest/api/v3/tracking_settings/api_list_subscription_tracking_setting.go index 0b1c1897..d4bacca7 100644 --- a/rest/api/v3/tracking_settings/api_list_subscription_tracking_setting.go +++ b/rest/api/v3/tracking_settings/api_list_subscription_tracking_setting.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -54,5 +55,5 @@ func (c *ApiService) ListSubscriptionTrackingSetting(params *ListSubscriptionTra return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/tracking_settings/api_list_tracking_setting.go b/rest/api/v3/tracking_settings/api_list_tracking_setting.go index 03bd6d65..764765fa 100644 --- a/rest/api/v3/tracking_settings/api_list_tracking_setting.go +++ b/rest/api/v3/tracking_settings/api_list_tracking_setting.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -54,5 +55,5 @@ func (c *ApiService) ListTrackingSetting(params *ListTrackingSettingParam) (inte return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/tracking_settings/api_update_click_tracking_setting.go b/rest/api/v3/tracking_settings/api_update_click_tracking_setting.go index 2a728ec4..87736652 100644 --- a/rest/api/v3/tracking_settings/api_update_click_tracking_setting.go +++ b/rest/api/v3/tracking_settings/api_update_click_tracking_setting.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -69,5 +70,5 @@ func (c *ApiService) UpdateClickTrackingSetting(params *UpdateClickTrackingSetti return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/tracking_settings/api_update_google_analytics_tracking_setting.go b/rest/api/v3/tracking_settings/api_update_google_analytics_tracking_setting.go index 5de9af69..ee613a5f 100644 --- a/rest/api/v3/tracking_settings/api_update_google_analytics_tracking_setting.go +++ b/rest/api/v3/tracking_settings/api_update_google_analytics_tracking_setting.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -69,5 +70,5 @@ func (c *ApiService) UpdateGoogleAnalyticsTrackingSetting(params *UpdateGoogleAn return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/tracking_settings/api_update_open_tracking_setting.go b/rest/api/v3/tracking_settings/api_update_open_tracking_setting.go index 3f8feb68..55deed7c 100644 --- a/rest/api/v3/tracking_settings/api_update_open_tracking_setting.go +++ b/rest/api/v3/tracking_settings/api_update_open_tracking_setting.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -69,5 +70,5 @@ func (c *ApiService) UpdateOpenTrackingSetting(params *UpdateOpenTrackingSetting return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/tracking_settings/api_update_subscription_tracking_setting.go b/rest/api/v3/tracking_settings/api_update_subscription_tracking_setting.go index 94359c04..ac3f8cee 100644 --- a/rest/api/v3/tracking_settings/api_update_subscription_tracking_setting.go +++ b/rest/api/v3/tracking_settings/api_update_subscription_tracking_setting.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -69,5 +70,5 @@ func (c *ApiService) UpdateSubscriptionTrackingSetting(params *UpdateSubscriptio return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/user/.openapi-generator b/rest/api/v3/user/.openapi-generator new file mode 100644 index 00000000..06f331eb --- /dev/null +++ b/rest/api/v3/user/.openapi-generator @@ -0,0 +1,50 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_list_account.go +api_list_credit.go +api_list_email.go +api_list_profile.go +api_list_username.go +api_service.go +api_update_email.go +api_update_password.go +api_update_profile.go +api_update_username.go +docs/ErrorResponse.md +docs/ErrorResponseErrorsInner.md +docs/GETUserAccountResponse.md +docs/GETUserProfileResponse.md +docs/ListAccount.md +docs/ListCredit.md +docs/ListCredit200Response.md +docs/ListEmail.md +docs/ListEmail200Response.md +docs/ListProfile.md +docs/ListUsername.md +docs/ListUsername200Response.md +docs/Type.md +docs/UpdateEmail.md +docs/UpdateEmail200Response.md +docs/UpdateEmailRequest.md +docs/UpdatePassword.md +docs/UpdatePasswordRequest.md +docs/UpdateProfile.md +docs/UpdateUsername.md +docs/UpdateUsername200Response.md +docs/UpdateUsernameRequest.md +docs/UserProfile.md +model_error_response.go +model_error_response_errors_inner.go +model_get_user_account_response.go +model_get_user_profile_response.go +model_list_credit_200_response.go +model_list_email_200_response.go +model_list_username_200_response.go +model_type.go +model_update_email_200_response.go +model_update_email_request.go +model_update_password_request.go +model_update_username_200_response.go +model_update_username_request.go +model_user_profile.go diff --git a/rest/api/v3/user/.openapi-generator-ignore b/rest/api/v3/user/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/user/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/user/README.md b/rest/api/v3/user/README.md new file mode 100644 index 00000000..fdb77310 --- /dev/null +++ b/rest/api/v3/user/README.md @@ -0,0 +1,83 @@ +# Go API client for + +The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. + +See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T16:57:38.549672+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ListAccount* | [**ListAccount**](docs/ListAccount.md#listaccount) | **Get** /v3/user/account | Get a user's account information. +*ListCredit* | [**ListCredit**](docs/ListCredit.md#listcredit) | **Get** /v3/user/credits | Retrieve your credit balance +*ListEmail* | [**ListEmail**](docs/ListEmail.md#listemail) | **Get** /v3/user/email | Retrieve your account email address +*ListProfile* | [**ListProfile**](docs/ListProfile.md#listprofile) | **Get** /v3/user/profile | Get a user's profile +*ListUsername* | [**ListUsername**](docs/ListUsername.md#listusername) | **Get** /v3/user/username | Retrieve your username +*UpdateEmail* | [**UpdateEmail**](docs/UpdateEmail.md#updateemail) | **Put** /v3/user/email | Update your account email address +*UpdatePassword* | [**UpdatePassword**](docs/UpdatePassword.md#updatepassword) | **Put** /v3/user/password | Update your password +*UpdateProfile* | [**UpdateProfile**](docs/UpdateProfile.md#updateprofile) | **Patch** /v3/user/profile | Update a user's profile +*UpdateUsername* | [**UpdateUsername**](docs/UpdateUsername.md#updateusername) | **Put** /v3/user/username | Update your username + + +## Documentation For Models + + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [GETUserAccountResponse](GETUserAccountResponse.md) + - [GETUserProfileResponse](GETUserProfileResponse.md) + - [ListCredit200Response](ListCredit200Response.md) + - [ListEmail200Response](ListEmail200Response.md) + - [ListUsername200Response](ListUsername200Response.md) + - [Type](Type.md) + - [UpdateEmail200Response](UpdateEmail200Response.md) + - [UpdateEmailRequest](UpdateEmailRequest.md) + - [UpdatePasswordRequest](UpdatePasswordRequest.md) + - [UpdateUsername200Response](UpdateUsername200Response.md) + - [UpdateUsernameRequest](UpdateUsernameRequest.md) + - [UserProfile](UserProfile.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/user/api_list_account.go b/rest/api/v3/user/api_list_account.go new file mode 100644 index 00000000..11dcd73e --- /dev/null +++ b/rest/api/v3/user/api_list_account.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListAccountParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListAccountParam) SetOnbehalfof(Onbehalfof string) *ListAccountParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve your user account details.** Your user's account information includes the user's account type and reputation. +func (c *ApiService) ListAccount(params *ListAccountParam) (interface{}, error) { + path := "/v3/user/account" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GETUserAccountResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/user/api_list_credit.go b/rest/api/v3/user/api_list_credit.go new file mode 100644 index 00000000..7e3000da --- /dev/null +++ b/rest/api/v3/user/api_list_credit.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListCreditParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListCreditParam) SetOnbehalfof(Onbehalfof string) *ListCreditParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve the current credit balance for your account.** Each account has a credit balance, which is a base number of emails it can send before receiving per-email charges. For more information about credits and billing, see [Billing and Plan details information](https://sendgrid.com/docs/ui/account-and-settings/billing/). +func (c *ApiService) ListCredit(params *ListCreditParam) (interface{}, error) { + path := "/v3/user/credits" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListCredit200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/user/api_list_email.go b/rest/api/v3/user/api_list_email.go new file mode 100644 index 00000000..3dfa7739 --- /dev/null +++ b/rest/api/v3/user/api_list_email.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListEmailParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListEmailParam) SetOnbehalfof(Onbehalfof string) *ListEmailParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve the email address currently on file for your account.** +func (c *ApiService) ListEmail(params *ListEmailParam) (interface{}, error) { + path := "/v3/user/email" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListEmail200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/user/api_list_profile.go b/rest/api/v3/user/api_list_profile.go new file mode 100644 index 00000000..759caf9d --- /dev/null +++ b/rest/api/v3/user/api_list_profile.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListProfileParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListProfileParam) SetOnbehalfof(Onbehalfof string) *ListProfileParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve your current profile details.** +func (c *ApiService) ListProfile(params *ListProfileParam) (interface{}, error) { + path := "/v3/user/profile" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GETUserProfileResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/user/api_list_username.go b/rest/api/v3/user/api_list_username.go new file mode 100644 index 00000000..939fad8c --- /dev/null +++ b/rest/api/v3/user/api_list_username.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListUsernameParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListUsernameParam) SetOnbehalfof(Onbehalfof string) *ListUsernameParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve your current account username.** +func (c *ApiService) ListUsername(params *ListUsernameParam) (interface{}, error) { + path := "/v3/user/username" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListUsername200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/user/api_service.go b/rest/api/v3/user/api_service.go new file mode 100644 index 00000000..67bbc6b4 --- /dev/null +++ b/rest/api/v3/user/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/user/api_update_email.go b/rest/api/v3/user/api_update_email.go new file mode 100644 index 00000000..e8ae9bcd --- /dev/null +++ b/rest/api/v3/user/api_update_email.go @@ -0,0 +1,74 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type UpdateEmailParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateEmailRequest *UpdateEmailRequest `json:"UpdateEmailRequest,omitempty"` +} + +func (params *UpdateEmailParam) SetOnbehalfof(Onbehalfof string) *UpdateEmailParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateEmailParam) SetUpdateEmailRequest(UpdateEmailRequest UpdateEmailRequest) *UpdateEmailParam { + params.UpdateEmailRequest = &UpdateEmailRequest + return params +} + +// **This endpoint allows you to update the email address currently on file for your account.** +func (c *ApiService) UpdateEmail(params *UpdateEmailParam) (interface{}, error) { + path := "/v3/user/email" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateEmailRequest != nil { + b, err := json.Marshal(*params.UpdateEmailRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &UpdateEmail200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/user/api_update_password.go b/rest/api/v3/user/api_update_password.go new file mode 100644 index 00000000..5eb8a292 --- /dev/null +++ b/rest/api/v3/user/api_update_password.go @@ -0,0 +1,74 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type UpdatePasswordParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdatePasswordRequest *UpdatePasswordRequest `json:"UpdatePasswordRequest,omitempty"` +} + +func (params *UpdatePasswordParam) SetOnbehalfof(Onbehalfof string) *UpdatePasswordParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdatePasswordParam) SetUpdatePasswordRequest(UpdatePasswordRequest UpdatePasswordRequest) *UpdatePasswordParam { + params.UpdatePasswordRequest = &UpdatePasswordRequest + return params +} + +// **This endpoint allows you to update your password.** +func (c *ApiService) UpdatePassword(params *UpdatePasswordParam) (interface{}, error) { + path := "/v3/user/password" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdatePasswordRequest != nil { + b, err := json.Marshal(*params.UpdatePasswordRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/user/api_update_profile.go b/rest/api/v3/user/api_update_profile.go new file mode 100644 index 00000000..3335c111 --- /dev/null +++ b/rest/api/v3/user/api_update_profile.go @@ -0,0 +1,82 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type UpdateProfileParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UserProfile *UserProfile `json:"UserProfile,omitempty"` +} + +func (params *UpdateProfileParam) SetOnbehalfof(Onbehalfof string) *UpdateProfileParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateProfileParam) SetUserProfile(UserProfile UserProfile) *UpdateProfileParam { + params.UserProfile = &UserProfile + return params +} + +// **This endpoint allows you to update your current profile details.** Any one or more of the parameters can be updated via the PATCH `/user/profile` endpoint. You must include at least one when you PATCH. +func (c *ApiService) UpdateProfile(params *UpdateProfileParam) (interface{}, error) { + path := "/v3/user/profile" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UserProfile != nil { + b, err := json.Marshal(*params.UserProfile) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &UserProfile{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/user/api_update_username.go b/rest/api/v3/user/api_update_username.go new file mode 100644 index 00000000..5b64544d --- /dev/null +++ b/rest/api/v3/user/api_update_username.go @@ -0,0 +1,74 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type UpdateUsernameParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateUsernameRequest *UpdateUsernameRequest `json:"UpdateUsernameRequest,omitempty"` +} + +func (params *UpdateUsernameParam) SetOnbehalfof(Onbehalfof string) *UpdateUsernameParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateUsernameParam) SetUpdateUsernameRequest(UpdateUsernameRequest UpdateUsernameRequest) *UpdateUsernameParam { + params.UpdateUsernameRequest = &UpdateUsernameRequest + return params +} + +// **This endpoint allows you to update the username for your account.** +func (c *ApiService) UpdateUsername(params *UpdateUsernameParam) (interface{}, error) { + path := "/v3/user/username" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateUsernameRequest != nil { + b, err := json.Marshal(*params.UpdateUsernameRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &UpdateUsername200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/user/docs/ErrorResponse.md b/rest/api/v3/user/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/user/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/user/docs/ErrorResponseErrorsInner.md b/rest/api/v3/user/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/user/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/user/docs/GETUserAccountResponse.md b/rest/api/v3/user/docs/GETUserAccountResponse.md new file mode 100644 index 00000000..3c2144b8 --- /dev/null +++ b/rest/api/v3/user/docs/GETUserAccountResponse.md @@ -0,0 +1,12 @@ +# GETUserAccountResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | [**Type**](Type.md) | The type of account for this user. | +**Reputation** | **float32** | The sender reputation for this user. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/user/docs/GETUserProfileResponse.md b/rest/api/v3/user/docs/GETUserProfileResponse.md new file mode 100644 index 00000000..37a24d1d --- /dev/null +++ b/rest/api/v3/user/docs/GETUserProfileResponse.md @@ -0,0 +1,21 @@ +# GETUserProfileResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Address** | **string** | The user's address. | +**Address2** | **string** | The second line of the user's address. |[optional] +**City** | **string** | The user's city. | +**Company** | **string** | The name of the user's company. | +**Country** | **string** | The user's country. | +**FirstName** | **string** | The user's first name. | +**LastName** | **string** | The user's last name. | +**Phone** | **string** | The user's phone number. | +**State** | **string** | The user's state. | +**Website** | **string** | The user's website URL. | +**Zip** | **string** | The user's zip code. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/user/docs/ListAccount.md b/rest/api/v3/user/docs/ListAccount.md new file mode 100644 index 00000000..ca5f15ad --- /dev/null +++ b/rest/api/v3/user/docs/ListAccount.md @@ -0,0 +1,48 @@ +# ListAccount + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListAccount**](ListAccount.md#ListAccount) | **Get** /v3/user/account | Get a user's account information. + + + +## ListAccount + +> GETUserAccountResponse ListAccount(ctx, optional) + +Get a user's account information. + +**This endpoint allows you to retrieve your user account details.** Your user's account information includes the user's account type and reputation. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListAccountParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**GETUserAccountResponse**](GETUserAccountResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/user/docs/ListCredit.md b/rest/api/v3/user/docs/ListCredit.md new file mode 100644 index 00000000..48078ae9 --- /dev/null +++ b/rest/api/v3/user/docs/ListCredit.md @@ -0,0 +1,48 @@ +# ListCredit + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListCredit**](ListCredit.md#ListCredit) | **Get** /v3/user/credits | Retrieve your credit balance + + + +## ListCredit + +> ListCredit200Response ListCredit(ctx, optional) + +Retrieve your credit balance + +**This endpoint allows you to retrieve the current credit balance for your account.** Each account has a credit balance, which is a base number of emails it can send before receiving per-email charges. For more information about credits and billing, see [Billing and Plan details information](https://sendgrid.com/docs/ui/account-and-settings/billing/). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListCreditParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListCredit200Response**](ListCredit200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/user/docs/ListCredit200Response.md b/rest/api/v3/user/docs/ListCredit200Response.md new file mode 100644 index 00000000..9a650e21 --- /dev/null +++ b/rest/api/v3/user/docs/ListCredit200Response.md @@ -0,0 +1,17 @@ +# ListCredit200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Remain** | **int32** | The remaining number of credits available on your account. | +**Total** | **int32** | The total number of credits assigned to your account. | +**Overage** | **int32** | The number of overdrawn credits for your account. | +**Used** | **int32** | The number of credits that you have used. | +**LastReset** | **string** | The date that your credit balance was last reset. | +**NextReset** | **string** | The next date that your credit balance will be reset. | +**ResetFrequency** | **string** | The frequency at which your credit balance will be reset. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/user/docs/ListEmail.md b/rest/api/v3/user/docs/ListEmail.md new file mode 100644 index 00000000..aa5614c1 --- /dev/null +++ b/rest/api/v3/user/docs/ListEmail.md @@ -0,0 +1,48 @@ +# ListEmail + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListEmail**](ListEmail.md#ListEmail) | **Get** /v3/user/email | Retrieve your account email address + + + +## ListEmail + +> ListEmail200Response ListEmail(ctx, optional) + +Retrieve your account email address + +**This endpoint allows you to retrieve the email address currently on file for your account.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListEmailParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListEmail200Response**](ListEmail200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/user/docs/ListEmail200Response.md b/rest/api/v3/user/docs/ListEmail200Response.md new file mode 100644 index 00000000..a7387a81 --- /dev/null +++ b/rest/api/v3/user/docs/ListEmail200Response.md @@ -0,0 +1,11 @@ +# ListEmail200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address currently on file for your account. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/user/docs/ListProfile.md b/rest/api/v3/user/docs/ListProfile.md new file mode 100644 index 00000000..d41f9b32 --- /dev/null +++ b/rest/api/v3/user/docs/ListProfile.md @@ -0,0 +1,48 @@ +# ListProfile + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListProfile**](ListProfile.md#ListProfile) | **Get** /v3/user/profile | Get a user's profile + + + +## ListProfile + +> GETUserProfileResponse ListProfile(ctx, optional) + +Get a user's profile + +**This endpoint allows you to retrieve your current profile details.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListProfileParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**GETUserProfileResponse**](GETUserProfileResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/user/docs/ListUsername.md b/rest/api/v3/user/docs/ListUsername.md new file mode 100644 index 00000000..e9f91d80 --- /dev/null +++ b/rest/api/v3/user/docs/ListUsername.md @@ -0,0 +1,48 @@ +# ListUsername + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListUsername**](ListUsername.md#ListUsername) | **Get** /v3/user/username | Retrieve your username + + + +## ListUsername + +> ListUsername200Response ListUsername(ctx, optional) + +Retrieve your username + +**This endpoint allows you to retrieve your current account username.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListUsernameParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListUsername200Response**](ListUsername200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/user/docs/ListUsername200Response.md b/rest/api/v3/user/docs/ListUsername200Response.md new file mode 100644 index 00000000..c1d23200 --- /dev/null +++ b/rest/api/v3/user/docs/ListUsername200Response.md @@ -0,0 +1,12 @@ +# ListUsername200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | Your account username. | +**UserId** | **int32** | The user ID for your account. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/user/docs/Type.md b/rest/api/v3/user/docs/Type.md new file mode 100644 index 00000000..7736c70d --- /dev/null +++ b/rest/api/v3/user/docs/Type.md @@ -0,0 +1,13 @@ +# Type + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**FREE** | string | (value: `"free"`) +**PAID** | string | (value: `"paid"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/user/docs/UpdateEmail.md b/rest/api/v3/user/docs/UpdateEmail.md new file mode 100644 index 00000000..aa382b8c --- /dev/null +++ b/rest/api/v3/user/docs/UpdateEmail.md @@ -0,0 +1,49 @@ +# UpdateEmail + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateEmail**](UpdateEmail.md#UpdateEmail) | **Put** /v3/user/email | Update your account email address + + + +## UpdateEmail + +> UpdateEmail200Response UpdateEmail(ctx, optional) + +Update your account email address + +**This endpoint allows you to update the email address currently on file for your account.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateEmailParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateEmailRequest** | [**UpdateEmailRequest**](UpdateEmailRequest.md) | + +### Return type + +[**UpdateEmail200Response**](UpdateEmail200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/user/docs/UpdateEmail200Response.md b/rest/api/v3/user/docs/UpdateEmail200Response.md new file mode 100644 index 00000000..795960c4 --- /dev/null +++ b/rest/api/v3/user/docs/UpdateEmail200Response.md @@ -0,0 +1,11 @@ +# UpdateEmail200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The current email address on file for your account. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/user/docs/UpdateEmailRequest.md b/rest/api/v3/user/docs/UpdateEmailRequest.md new file mode 100644 index 00000000..1cde2463 --- /dev/null +++ b/rest/api/v3/user/docs/UpdateEmailRequest.md @@ -0,0 +1,11 @@ +# UpdateEmailRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The new email address that you would like to use for your account. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/user/docs/UpdatePassword.md b/rest/api/v3/user/docs/UpdatePassword.md new file mode 100644 index 00000000..d393707f --- /dev/null +++ b/rest/api/v3/user/docs/UpdatePassword.md @@ -0,0 +1,49 @@ +# UpdatePassword + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdatePassword**](UpdatePassword.md#UpdatePassword) | **Put** /v3/user/password | Update your password + + + +## UpdatePassword + +> map[string]interface{} UpdatePassword(ctx, optional) + +Update your password + +**This endpoint allows you to update your password.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdatePasswordParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdatePasswordRequest** | [**UpdatePasswordRequest**](UpdatePasswordRequest.md) | + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/user/docs/UpdatePasswordRequest.md b/rest/api/v3/user/docs/UpdatePasswordRequest.md new file mode 100644 index 00000000..a1264921 --- /dev/null +++ b/rest/api/v3/user/docs/UpdatePasswordRequest.md @@ -0,0 +1,12 @@ +# UpdatePasswordRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NewPassword** | **string** | The new password you would like to use for your account. | +**OldPassword** | **string** | The old password for your account. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/user/docs/UpdateProfile.md b/rest/api/v3/user/docs/UpdateProfile.md new file mode 100644 index 00000000..b0dc8f42 --- /dev/null +++ b/rest/api/v3/user/docs/UpdateProfile.md @@ -0,0 +1,49 @@ +# UpdateProfile + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateProfile**](UpdateProfile.md#UpdateProfile) | **Patch** /v3/user/profile | Update a user's profile + + + +## UpdateProfile + +> UserProfile UpdateProfile(ctx, optional) + +Update a user's profile + +**This endpoint allows you to update your current profile details.** Any one or more of the parameters can be updated via the PATCH `/user/profile` endpoint. You must include at least one when you PATCH. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateProfileParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UserProfile** | [**UserProfile**](UserProfile.md) | + +### Return type + +[**UserProfile**](UserProfile.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/user/docs/UpdateUsername.md b/rest/api/v3/user/docs/UpdateUsername.md new file mode 100644 index 00000000..96938ac8 --- /dev/null +++ b/rest/api/v3/user/docs/UpdateUsername.md @@ -0,0 +1,49 @@ +# UpdateUsername + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateUsername**](UpdateUsername.md#UpdateUsername) | **Put** /v3/user/username | Update your username + + + +## UpdateUsername + +> UpdateUsername200Response UpdateUsername(ctx, optional) + +Update your username + +**This endpoint allows you to update the username for your account.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateUsernameParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateUsernameRequest** | [**UpdateUsernameRequest**](UpdateUsernameRequest.md) | + +### Return type + +[**UpdateUsername200Response**](UpdateUsername200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/user/docs/UpdateUsername200Response.md b/rest/api/v3/user/docs/UpdateUsername200Response.md new file mode 100644 index 00000000..07ffae6c --- /dev/null +++ b/rest/api/v3/user/docs/UpdateUsername200Response.md @@ -0,0 +1,11 @@ +# UpdateUsername200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | The current username on file for your account. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/user/docs/UpdateUsernameRequest.md b/rest/api/v3/user/docs/UpdateUsernameRequest.md new file mode 100644 index 00000000..85e3d52f --- /dev/null +++ b/rest/api/v3/user/docs/UpdateUsernameRequest.md @@ -0,0 +1,11 @@ +# UpdateUsernameRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | The new username you would like to use for your account. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/user/docs/UserProfile.md b/rest/api/v3/user/docs/UserProfile.md new file mode 100644 index 00000000..bd9d571e --- /dev/null +++ b/rest/api/v3/user/docs/UserProfile.md @@ -0,0 +1,21 @@ +# UserProfile + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Address** | **string** | The street address for this user profile. |[optional] +**Address2** | **string** | An optional second line for the street address of this user profile. |[optional] +**City** | **string** | The city for the user profile. |[optional] +**Company** | **string** | That company that this user profile is associated with. |[optional] +**Country** | **string** | Th country of this user profile. |[optional] +**FirstName** | **string** | The first name of the user. |[optional] +**LastName** | **string** | The last name of the user. |[optional] +**Phone** | **string** | The phone number for the user. |[optional] +**State** | **string** | The state for this user. |[optional] +**Website** | **string** | The website associated with this user. |[optional] +**Zip** | **string** | The zip code for this user. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/user/model_error_response.go b/rest/api/v3/user/model_error_response.go new file mode 100644 index 00000000..a7e81b7e --- /dev/null +++ b/rest/api/v3/user/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/user/model_error_response_errors_inner.go b/rest/api/v3/user/model_error_response_errors_inner.go new file mode 100644 index 00000000..623e0242 --- /dev/null +++ b/rest/api/v3/user/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/user/model_get_user_account_response.go b/rest/api/v3/user/model_get_user_account_response.go new file mode 100644 index 00000000..c910dc5f --- /dev/null +++ b/rest/api/v3/user/model_get_user_account_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GETUserAccountResponse struct for GETUserAccountResponse +type GETUserAccountResponse struct { + // The type of account for this user. + Type Type `json:"type"` + // The sender reputation for this user. + Reputation float32 `json:"reputation"` +} diff --git a/rest/api/v3/user/model_get_user_profile_response.go b/rest/api/v3/user/model_get_user_profile_response.go new file mode 100644 index 00000000..ab9bc7d3 --- /dev/null +++ b/rest/api/v3/user/model_get_user_profile_response.go @@ -0,0 +1,40 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GETUserProfileResponse struct for GETUserProfileResponse +type GETUserProfileResponse struct { + // The user's address. + Address string `json:"address"` + // The second line of the user's address. + Address2 *string `json:"address2,omitempty"` + // The user's city. + City string `json:"city"` + // The name of the user's company. + Company string `json:"company"` + // The user's country. + Country string `json:"country"` + // The user's first name. + FirstName string `json:"first_name"` + // The user's last name. + LastName string `json:"last_name"` + // The user's phone number. + Phone string `json:"phone"` + // The user's state. + State string `json:"state"` + // The user's website URL. + Website string `json:"website"` + // The user's zip code. + Zip string `json:"zip"` +} diff --git a/rest/api/v3/user/model_list_credit_200_response.go b/rest/api/v3/user/model_list_credit_200_response.go new file mode 100644 index 00000000..515d6d5d --- /dev/null +++ b/rest/api/v3/user/model_list_credit_200_response.go @@ -0,0 +1,32 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListCredit200Response struct for ListCredit200Response +type ListCredit200Response struct { + // The remaining number of credits available on your account. + Remain int32 `json:"remain"` + // The total number of credits assigned to your account. + Total int32 `json:"total"` + // The number of overdrawn credits for your account. + Overage int32 `json:"overage"` + // The number of credits that you have used. + Used int32 `json:"used"` + // The date that your credit balance was last reset. + LastReset string `json:"last_reset"` + // The next date that your credit balance will be reset. + NextReset string `json:"next_reset"` + // The frequency at which your credit balance will be reset. + ResetFrequency string `json:"reset_frequency"` +} diff --git a/rest/api/v3/user/model_list_email_200_response.go b/rest/api/v3/user/model_list_email_200_response.go new file mode 100644 index 00000000..d1b39a6e --- /dev/null +++ b/rest/api/v3/user/model_list_email_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListEmail200Response struct for ListEmail200Response +type ListEmail200Response struct { + // The email address currently on file for your account. + Email string `json:"email"` +} diff --git a/rest/api/v3/user/model_list_username_200_response.go b/rest/api/v3/user/model_list_username_200_response.go new file mode 100644 index 00000000..b024b8c7 --- /dev/null +++ b/rest/api/v3/user/model_list_username_200_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListUsername200Response struct for ListUsername200Response +type ListUsername200Response struct { + // Your account username. + Username string `json:"username"` + // The user ID for your account. + UserId int32 `json:"user_id"` +} diff --git a/rest/api/v3/user/model_type.go b/rest/api/v3/user/model_type.go new file mode 100644 index 00000000..aa8dbdd4 --- /dev/null +++ b/rest/api/v3/user/model_type.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Type the model 'Type' +type Type string + +// List of Type +const ( + TYPE_FREE Type = "free" + TYPE_PAID Type = "paid" +) diff --git a/rest/api/v3/user/model_update_email_200_response.go b/rest/api/v3/user/model_update_email_200_response.go new file mode 100644 index 00000000..12777e4f --- /dev/null +++ b/rest/api/v3/user/model_update_email_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateEmail200Response struct for UpdateEmail200Response +type UpdateEmail200Response struct { + // The current email address on file for your account. + Email string `json:"email"` +} diff --git a/rest/api/v3/user/model_update_email_request.go b/rest/api/v3/user/model_update_email_request.go new file mode 100644 index 00000000..b6d70118 --- /dev/null +++ b/rest/api/v3/user/model_update_email_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateEmailRequest struct for UpdateEmailRequest +type UpdateEmailRequest struct { + // The new email address that you would like to use for your account. + Email *string `json:"email,omitempty"` +} diff --git a/rest/api/v3/user/model_update_password_request.go b/rest/api/v3/user/model_update_password_request.go new file mode 100644 index 00000000..ed046469 --- /dev/null +++ b/rest/api/v3/user/model_update_password_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdatePasswordRequest struct for UpdatePasswordRequest +type UpdatePasswordRequest struct { + // The new password you would like to use for your account. + NewPassword string `json:"new_password"` + // The old password for your account. + OldPassword string `json:"old_password"` +} diff --git a/rest/api/v3/user/model_update_username_200_response.go b/rest/api/v3/user/model_update_username_200_response.go new file mode 100644 index 00000000..455a234c --- /dev/null +++ b/rest/api/v3/user/model_update_username_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateUsername200Response struct for UpdateUsername200Response +type UpdateUsername200Response struct { + // The current username on file for your account. + Username string `json:"username"` +} diff --git a/rest/api/v3/user/model_update_username_request.go b/rest/api/v3/user/model_update_username_request.go new file mode 100644 index 00000000..ec922edc --- /dev/null +++ b/rest/api/v3/user/model_update_username_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateUsernameRequest struct for UpdateUsernameRequest +type UpdateUsernameRequest struct { + // The new username you would like to use for your account. + Username *string `json:"username,omitempty"` +} diff --git a/rest/api/v3/user/model_user_profile.go b/rest/api/v3/user/model_user_profile.go new file mode 100644 index 00000000..9d9ffcf4 --- /dev/null +++ b/rest/api/v3/user/model_user_profile.go @@ -0,0 +1,40 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UserProfile struct for UserProfile +type UserProfile struct { + // The street address for this user profile. + Address *string `json:"address,omitempty"` + // An optional second line for the street address of this user profile. + Address2 *string `json:"address2,omitempty"` + // The city for the user profile. + City *string `json:"city,omitempty"` + // That company that this user profile is associated with. + Company *string `json:"company,omitempty"` + // Th country of this user profile. + Country *string `json:"country,omitempty"` + // The first name of the user. + FirstName *string `json:"first_name,omitempty"` + // The last name of the user. + LastName *string `json:"last_name,omitempty"` + // The phone number for the user. + Phone *string `json:"phone,omitempty"` + // The state for this user. + State *string `json:"state,omitempty"` + // The website associated with this user. + Website *string `json:"website,omitempty"` + // The zip code for this user. + Zip *string `json:"zip,omitempty"` +} diff --git a/rest/api/v3/verified_senders/.openapi-generator b/rest/api/v3/verified_senders/.openapi-generator new file mode 100644 index 00000000..261ce635 --- /dev/null +++ b/rest/api/v3/verified_senders/.openapi-generator @@ -0,0 +1,48 @@ +.openapi-generator +.openapi-generator-ignore +README.md +api_create_verified_sender.go +api_delete_verified_sender.go +api_list_verified_sender.go +api_list_verified_sender_domain.go +api_list_verified_sender_steps_completed.go +api_resend_verified_sender.go +api_service.go +api_update_verified_sender.go +api_verify_sender_token.go +docs/CreateVerifiedSender.md +docs/CreateVerifiedSender400Response.md +docs/CreateVerifiedSender400ResponseErrorsInner.md +docs/DeleteVerifiedSender.md +docs/DeleteVerifiedSender403Response.md +docs/DeleteVerifiedSender403ResponseErrorsInner.md +docs/DeleteVerifiedSender404Response.md +docs/ErrorResponse.md +docs/ErrorResponseErrorsInner.md +docs/ListVerifiedSender.md +docs/ListVerifiedSender200Response.md +docs/ListVerifiedSenderDomain.md +docs/ListVerifiedSenderDomain200Response.md +docs/ListVerifiedSenderDomain200ResponseResults.md +docs/ListVerifiedSenderStepsCompleted.md +docs/ListVerifiedSenderStepsCompleted200Response.md +docs/ListVerifiedSenderStepsCompleted200ResponseResults.md +docs/ResendVerifiedSender.md +docs/UpdateVerifiedSender.md +docs/VerifiedSenderRequest.md +docs/VerifiedSenderResponse.md +docs/VerifySenderToken.md +model_create_verified_sender_400_response.go +model_create_verified_sender_400_response_errors_inner.go +model_delete_verified_sender_403_response.go +model_delete_verified_sender_403_response_errors_inner.go +model_delete_verified_sender_404_response.go +model_error_response.go +model_error_response_errors_inner.go +model_list_verified_sender_200_response.go +model_list_verified_sender_domain_200_response.go +model_list_verified_sender_domain_200_response_results.go +model_list_verified_sender_steps_completed_200_response.go +model_list_verified_sender_steps_completed_200_response_results.go +model_verified_sender_request.go +model_verified_sender_response.go diff --git a/rest/api/v3/verified_senders/.openapi-generator-ignore b/rest/api/v3/verified_senders/.openapi-generator-ignore new file mode 100644 index 00000000..7484ee59 --- /dev/null +++ b/rest/api/v3/verified_senders/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/rest/api/v3/verified_senders/README.md b/rest/api/v3/verified_senders/README.md new file mode 100644 index 00000000..6cd87d8c --- /dev/null +++ b/rest/api/v3/verified_senders/README.md @@ -0,0 +1,84 @@ +# Go API client for + +The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. + +You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. + +This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T16:57:38.552145+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateVerifiedSender* | [**CreateVerifiedSender**](docs/CreateVerifiedSender.md#createverifiedsender) | **Post** /v3/verified_senders | Create Verified Sender Request +*DeleteVerifiedSender* | [**DeleteVerifiedSender**](docs/DeleteVerifiedSender.md#deleteverifiedsender) | **Delete** /v3/verified_senders/{Id} | Delete Verified Sender +*ListVerifiedSender* | [**ListVerifiedSender**](docs/ListVerifiedSender.md#listverifiedsender) | **Get** /v3/verified_senders | Get All Verified Senders +*ListVerifiedSenderDomain* | [**ListVerifiedSenderDomain**](docs/ListVerifiedSenderDomain.md#listverifiedsenderdomain) | **Get** /v3/verified_senders/domains | Domain Warn List +*ListVerifiedSenderStepsCompleted* | [**ListVerifiedSenderStepsCompleted**](docs/ListVerifiedSenderStepsCompleted.md#listverifiedsenderstepscompleted) | **Get** /v3/verified_senders/steps_completed | Completed Steps +*ResendVerifiedSender* | [**ResendVerifiedSender**](docs/ResendVerifiedSender.md#resendverifiedsender) | **Post** /v3/verified_senders/resend/{Id} | Resend Verified Sender Request +*UpdateVerifiedSender* | [**UpdateVerifiedSender**](docs/UpdateVerifiedSender.md#updateverifiedsender) | **Patch** /v3/verified_senders/{Id} | Edit Verified Sender +*VerifySenderToken* | [**VerifySenderToken**](docs/VerifySenderToken.md#verifysendertoken) | **Get** /v3/verified_senders/verify/{Token} | Verify Sender Request + + +## Documentation For Models + + - [CreateVerifiedSender400Response](CreateVerifiedSender400Response.md) + - [CreateVerifiedSender400ResponseErrorsInner](CreateVerifiedSender400ResponseErrorsInner.md) + - [DeleteVerifiedSender403Response](DeleteVerifiedSender403Response.md) + - [DeleteVerifiedSender403ResponseErrorsInner](DeleteVerifiedSender403ResponseErrorsInner.md) + - [DeleteVerifiedSender404Response](DeleteVerifiedSender404Response.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [ListVerifiedSender200Response](ListVerifiedSender200Response.md) + - [ListVerifiedSenderDomain200Response](ListVerifiedSenderDomain200Response.md) + - [ListVerifiedSenderDomain200ResponseResults](ListVerifiedSenderDomain200ResponseResults.md) + - [ListVerifiedSenderStepsCompleted200Response](ListVerifiedSenderStepsCompleted200Response.md) + - [ListVerifiedSenderStepsCompleted200ResponseResults](ListVerifiedSenderStepsCompleted200ResponseResults.md) + - [VerifiedSenderRequest](VerifiedSenderRequest.md) + - [VerifiedSenderResponse](VerifiedSenderResponse.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/verified_senders/api_create_verified_sender.go b/rest/api/v3/verified_senders/api_create_verified_sender.go new file mode 100644 index 00000000..7daeea53 --- /dev/null +++ b/rest/api/v3/verified_senders/api_create_verified_sender.go @@ -0,0 +1,97 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateVerifiedSenderParam struct { + // + VerifiedSenderRequest *VerifiedSenderRequest `json:"VerifiedSenderRequest,omitempty"` +} + +func (params *CreateVerifiedSenderParam) SetVerifiedSenderRequest(VerifiedSenderRequest VerifiedSenderRequest) *CreateVerifiedSenderParam { + params.VerifiedSenderRequest = &VerifiedSenderRequest + return params +} + +// **This endpoint allows you to create a new Sender Identify**. Upon successful submission of a `POST` request to this endpoint, an identity will be created, and a verification email will be sent to the address assigned to the `from_email` field. You must complete the verification process using the sent email to fully verify the sender. If you need to resend the verification email, you can do so with the Resend Verified Sender Request, `/resend/{id}`, endpoint. If you need to authenticate a domain rather than a Single Sender, see the [Domain Authentication API](https://docs.sendgrid.com/api-reference/domain-authentication/authenticate-a-domain). +func (c *ApiService) CreateVerifiedSender(params *CreateVerifiedSenderParam) (interface{}, error) { + path := "/v3/verified_senders" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.VerifiedSenderRequest != nil { + b, err := json.Marshal(*params.VerifiedSenderRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &VerifiedSenderResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &CreateVerifiedSender400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/verified_senders/api_delete_verified_sender.go b/rest/api/v3/verified_senders/api_delete_verified_sender.go new file mode 100644 index 00000000..84e67ccf --- /dev/null +++ b/rest/api/v3/verified_senders/api_delete_verified_sender.go @@ -0,0 +1,85 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteVerifiedSenderParam struct { + // + Id *string `json:"id"` +} + +func (params *DeleteVerifiedSenderParam) SetId(Id string) *DeleteVerifiedSenderParam { + params.Id = &Id + return params +} + +// **This endpoint allows you to delete a Sender Identity**. Pass the `id` assigned to a Sender Identity to this endpoint to delete the Sender Identity from your account. You can retrieve the IDs associated with Sender Identities using the \"Get All Verified Senders\" endpoint. +func (c *ApiService) DeleteVerifiedSender(params *DeleteVerifiedSenderParam) (interface{}, error) { + path := "/v3/verified_senders/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &DeleteVerifiedSender403Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &DeleteVerifiedSender404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/verified_senders/api_list_verified_sender.go b/rest/api/v3/verified_senders/api_list_verified_sender.go new file mode 100644 index 00000000..ec51b58f --- /dev/null +++ b/rest/api/v3/verified_senders/api_list_verified_sender.go @@ -0,0 +1,103 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListVerifiedSenderParam struct { + // Specifies the number of results to be returned by the API. This parameter can be used to limit the results returned or in combination with the `lastSeenID` parameter to iterate through paginated results. + Limit *float32 `json:"limit,omitempty"` + // Returns senders with an ID number occurring after the passed in ID. In other words, the `lastSeenID` provides a starting point from which SendGrid will iterate to find Sender Identities associated with your account. + LastSeenID *float32 `json:"lastSeenID,omitempty"` + // Returns information about only the Sender Identity passed in the request. + Id *int32 `json:"id,omitempty"` +} + +func (params *ListVerifiedSenderParam) SetLimit(Limit float32) *ListVerifiedSenderParam { + params.Limit = &Limit + return params +} +func (params *ListVerifiedSenderParam) SetLastSeenID(LastSeenID float32) *ListVerifiedSenderParam { + params.LastSeenID = &LastSeenID + return params +} +func (params *ListVerifiedSenderParam) SetId(Id int32) *ListVerifiedSenderParam { + params.Id = &Id + return params +} + +// **This endpoint allows you to retrieve all the Sender Identities associated with an account.** This endpoint will return both verified and unverified senders. You can limit the number of results returned using the `limit`, `lastSeenID`, and `id` query string parameters. * `limit` allows you to specify an exact number of Sender Identities to return. * `lastSeenID` will return senders with an ID number occuring after the passed in ID. In other words, the `lastSeenID` provides a starting point from which SendGrid will iterate to find Sender Identities associated with your account. * `id` will return information about only the Sender Identity passed in the request. +func (c *ApiService) ListVerifiedSender(params *ListVerifiedSenderParam) (interface{}, error) { + path := "/v3/verified_senders" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.LastSeenID != nil { + data.Set("lastSeenID", fmt.Sprint(*params.LastSeenID)) + } + if params != nil && params.Id != nil { + data.Set("id", fmt.Sprint(*params.Id)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListVerifiedSender200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/verified_senders/api_list_verified_sender_domain.go b/rest/api/v3/verified_senders/api_list_verified_sender_domain.go new file mode 100644 index 00000000..34000f11 --- /dev/null +++ b/rest/api/v3/verified_senders/api_list_verified_sender_domain.go @@ -0,0 +1,73 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListVerifiedSenderDomainParam struct { +} + +// **This endpoint returns a list of domains known to implement DMARC and categorizes them by failure type — hard failure or soft failure**. Domains listed as hard failures will not deliver mail when used as a [Sender Identity](https://sendgrid.com/docs/for-developers/sending-email/sender-identity/) due to the domain's DMARC policy settings. For example, using a `yahoo.com` email address as a Sender Identity will likely result in the rejection of your mail. For more information about DMARC, see [Everything about DMARC](https://sendgrid.com/docs/ui/sending-email/dmarc/). +func (c *ApiService) ListVerifiedSenderDomain() (interface{}, error) { + path := "/v3/verified_senders/domains" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListVerifiedSenderDomain200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/verified_senders/api_list_verified_sender_steps_completed.go b/rest/api/v3/verified_senders/api_list_verified_sender_steps_completed.go new file mode 100644 index 00000000..2a6945ab --- /dev/null +++ b/rest/api/v3/verified_senders/api_list_verified_sender_steps_completed.go @@ -0,0 +1,73 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListVerifiedSenderStepsCompletedParam struct { +} + +// **This endpoint allows you to determine which of SendGrid’s verification processes have been completed for an account**. This endpoint returns boolean values, `true` and `false`, for [Domain Authentication](https://sendgrid.com/docs/for-developers/sending-email/sender-identity/#domain-authentication), `domain_verified`, and [Single Sender Verification](https://sendgrid.com/docs/for-developers/sending-email/sender-identity/#single-sender-verification), `sender_verified`, for the account. An account may have one, both, or neither verification steps completed. If you need to authenticate a domain rather than a Single Sender, see the \"Authenticate a domain\" endpoint. +func (c *ApiService) ListVerifiedSenderStepsCompleted() (interface{}, error) { + path := "/v3/verified_senders/steps_completed" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListVerifiedSenderStepsCompleted200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/verified_senders/api_resend_verified_sender.go b/rest/api/v3/verified_senders/api_resend_verified_sender.go new file mode 100644 index 00000000..831c5682 --- /dev/null +++ b/rest/api/v3/verified_senders/api_resend_verified_sender.go @@ -0,0 +1,93 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type ResendVerifiedSenderParam struct { + // + Id *string `json:"id"` +} + +func (params *ResendVerifiedSenderParam) SetId(Id string) *ResendVerifiedSenderParam { + params.Id = &Id + return params +} + +// **This endpoint allows you to resend a verification email to a specified Sender Identity**. Passing the `id` assigned to a Sender Identity to this endpoint will resend a verification email to the `from_address` associated with the Sender Identity. This can be useful if someone loses their verification email or needs to have it resent for any other reason. You can retrieve the IDs associated with Sender Identities by passing a \"Get All Verified Senders\" endpoint. +func (c *ApiService) ResendVerifiedSender(params *ResendVerifiedSenderParam) (interface{}, error) { + path := "/v3/verified_senders/resend/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &DeleteVerifiedSender404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &DeleteVerifiedSender404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/verified_senders/api_service.go b/rest/api/v3/verified_senders/api_service.go new file mode 100644 index 00000000..4ef324e5 --- /dev/null +++ b/rest/api/v3/verified_senders/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/verified_senders/api_update_verified_sender.go b/rest/api/v3/verified_senders/api_update_verified_sender.go new file mode 100644 index 00000000..dd10883a --- /dev/null +++ b/rest/api/v3/verified_senders/api_update_verified_sender.go @@ -0,0 +1,108 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateVerifiedSenderParam struct { + // + Id *string `json:"id"` + // + VerifiedSenderRequest *VerifiedSenderRequest `json:"VerifiedSenderRequest,omitempty"` +} + +func (params *UpdateVerifiedSenderParam) SetId(Id string) *UpdateVerifiedSenderParam { + params.Id = &Id + return params +} +func (params *UpdateVerifiedSenderParam) SetVerifiedSenderRequest(VerifiedSenderRequest VerifiedSenderRequest) *UpdateVerifiedSenderParam { + params.VerifiedSenderRequest = &VerifiedSenderRequest + return params +} + +// **This endpoint allows you to update an existing Sender Identity**. Pass the `id` assigned to a Sender Identity to this endpoint as a path parameter. Include any fields you wish to update in the request body in JSON format. You can retrieve the IDs associated with Sender Identities by passing a `GET` request to the Get All Verified Senders endpoint, `/verified_senders`. **Note:** Unlike a `PUT` request, `PATCH` allows you to update only the fields you wish to edit. Fields that are not passed as part of a request will remain unaltered. +func (c *ApiService) UpdateVerifiedSender(params *UpdateVerifiedSenderParam) (interface{}, error) { + path := "/v3/verified_senders/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.VerifiedSenderRequest != nil { + b, err := json.Marshal(*params.VerifiedSenderRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &VerifiedSenderResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &CreateVerifiedSender400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &DeleteVerifiedSender404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &DeleteVerifiedSender404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/verified_senders/api_verify_sender_token.go b/rest/api/v3/verified_senders/api_verify_sender_token.go new file mode 100644 index 00000000..4cd82a33 --- /dev/null +++ b/rest/api/v3/verified_senders/api_verify_sender_token.go @@ -0,0 +1,77 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type VerifySenderTokenParam struct { + // + Token *string `json:"token"` +} + +func (params *VerifySenderTokenParam) SetToken(Token string) *VerifySenderTokenParam { + params.Token = &Token + return params +} + +// **This endpoint allows you to verify a sender requests.** The token is generated by SendGrid and included in a verification email delivered to the address that's pending verification. +func (c *ApiService) VerifySenderToken(params *VerifySenderTokenParam) (interface{}, error) { + path := "/v3/verified_senders/verify/{Token}" + if params != nil && params.Token != nil { + path = strings.Replace(path, "{"+"Token"+"}", *params.Token, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &DeleteVerifiedSender404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil +} diff --git a/rest/api/v3/verified_senders/docs/CreateVerifiedSender.md b/rest/api/v3/verified_senders/docs/CreateVerifiedSender.md new file mode 100644 index 00000000..2d228f45 --- /dev/null +++ b/rest/api/v3/verified_senders/docs/CreateVerifiedSender.md @@ -0,0 +1,48 @@ +# CreateVerifiedSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateVerifiedSender**](CreateVerifiedSender.md#CreateVerifiedSender) | **Post** /v3/verified_senders | Create Verified Sender Request + + + +## CreateVerifiedSender + +> VerifiedSenderResponse CreateVerifiedSender(ctx, optional) + +Create Verified Sender Request + +**This endpoint allows you to create a new Sender Identify**. Upon successful submission of a `POST` request to this endpoint, an identity will be created, and a verification email will be sent to the address assigned to the `from_email` field. You must complete the verification process using the sent email to fully verify the sender. If you need to resend the verification email, you can do so with the Resend Verified Sender Request, `/resend/{id}`, endpoint. If you need to authenticate a domain rather than a Single Sender, see the [Domain Authentication API](https://docs.sendgrid.com/api-reference/domain-authentication/authenticate-a-domain). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateVerifiedSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**VerifiedSenderRequest** | [**VerifiedSenderRequest**](VerifiedSenderRequest.md) | + +### Return type + +[**VerifiedSenderResponse**](VerifiedSenderResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/verified_senders/docs/CreateVerifiedSender400Response.md b/rest/api/v3/verified_senders/docs/CreateVerifiedSender400Response.md new file mode 100644 index 00000000..600ce1a3 --- /dev/null +++ b/rest/api/v3/verified_senders/docs/CreateVerifiedSender400Response.md @@ -0,0 +1,11 @@ +# CreateVerifiedSender400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]CreateVerifiedSender400ResponseErrorsInner**](CreateVerifiedSender400ResponseErrorsInner.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/verified_senders/docs/CreateVerifiedSender400ResponseErrorsInner.md b/rest/api/v3/verified_senders/docs/CreateVerifiedSender400ResponseErrorsInner.md new file mode 100644 index 00000000..490e7921 --- /dev/null +++ b/rest/api/v3/verified_senders/docs/CreateVerifiedSender400ResponseErrorsInner.md @@ -0,0 +1,13 @@ +# CreateVerifiedSender400ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | |[optional] +**Message** | **string** | | +**ErrorId** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/GetSsoIntegration.md b/rest/api/v3/verified_senders/docs/DeleteVerifiedSender.md similarity index 54% rename from rest/api/v3/sso/docs/GetSsoIntegration.md rename to rest/api/v3/verified_senders/docs/DeleteVerifiedSender.md index ea49cd71..64eb0663 100644 --- a/rest/api/v3/sso/docs/GetSsoIntegration.md +++ b/rest/api/v3/verified_senders/docs/DeleteVerifiedSender.md @@ -1,20 +1,20 @@ -# GetSsoIntegration +# DeleteVerifiedSender All URIs are relative to *https://api.sendgrid.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**GetSsoIntegration**](GetSsoIntegration.md#GetSsoIntegration) | **Get** /v3/sso/integrations/{Id} | Get an SSO Integration +[**DeleteVerifiedSender**](DeleteVerifiedSender.md#DeleteVerifiedSender) | **Delete** /v3/verified_senders/{Id} | Delete Verified Sender -## GetSsoIntegration +## DeleteVerifiedSender -> SsoIntegration GetSsoIntegration(ctx, Idoptional) +> map[string]interface{} DeleteVerifiedSender(ctx, Id) -Get an SSO Integration +Delete Verified Sender -**This endpoint allows you to retrieve an SSO integration by ID.** You can retrieve the IDs for your configurations from the response provided by the \"Get All SSO Integrations\" endpoint. +**This endpoint allows you to delete a Sender Identity**. Pass the `id` assigned to a Sender Identity to this endpoint to delete the Sender Identity from your account. You can retrieve the IDs associated with Sender Identities using the \"Get All Verified Senders\" endpoint. ### Path Parameters @@ -26,16 +26,15 @@ Name | Type | Description ### Other Parameters -Other parameters are passed through a pointer to a GetSsoIntegrationParams struct +Other parameters are passed through a pointer to a DeleteVerifiedSenderParams struct Name | Type | Description ------------- | ------------- | ------------- -**Si** | **bool** | If this parameter is set to `true`, the response will include the `completed_integration` field. ### Return type -[**SsoIntegration**](SsoIntegration.md) +**map[string]interface{}** ### Authorization diff --git a/rest/api/v3/verified_senders/docs/DeleteVerifiedSender403Response.md b/rest/api/v3/verified_senders/docs/DeleteVerifiedSender403Response.md new file mode 100644 index 00000000..0f07e32b --- /dev/null +++ b/rest/api/v3/verified_senders/docs/DeleteVerifiedSender403Response.md @@ -0,0 +1,11 @@ +# DeleteVerifiedSender403Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]DeleteVerifiedSender403ResponseErrorsInner**](DeleteVerifiedSender403ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_designs/docs/ApiError.md b/rest/api/v3/verified_senders/docs/DeleteVerifiedSender403ResponseErrorsInner.md similarity index 88% rename from rest/api/v3/mc_designs/docs/ApiError.md rename to rest/api/v3/verified_senders/docs/DeleteVerifiedSender403ResponseErrorsInner.md index 65ebab4d..89ece5f2 100644 --- a/rest/api/v3/mc_designs/docs/ApiError.md +++ b/rest/api/v3/verified_senders/docs/DeleteVerifiedSender403ResponseErrorsInner.md @@ -1,11 +1,10 @@ -# ApiError +# DeleteVerifiedSender403ResponseErrorsInner ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Message** | **string** | | -**Field** | **string** | | **ErrorId** | **string** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rest/api/v3/verified_senders/docs/DeleteVerifiedSender404Response.md b/rest/api/v3/verified_senders/docs/DeleteVerifiedSender404Response.md new file mode 100644 index 00000000..ef2a483c --- /dev/null +++ b/rest/api/v3/verified_senders/docs/DeleteVerifiedSender404Response.md @@ -0,0 +1,11 @@ +# DeleteVerifiedSender404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]DeleteVerifiedSender403ResponseErrorsInner**](DeleteVerifiedSender403ResponseErrorsInner.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/verified_senders/docs/ErrorResponse.md b/rest/api/v3/verified_senders/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/verified_senders/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/verified_senders/docs/ErrorResponseErrorsInner.md b/rest/api/v3/verified_senders/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/verified_senders/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/verified_senders/docs/ListVerifiedSender.md b/rest/api/v3/verified_senders/docs/ListVerifiedSender.md new file mode 100644 index 00000000..115a8292 --- /dev/null +++ b/rest/api/v3/verified_senders/docs/ListVerifiedSender.md @@ -0,0 +1,50 @@ +# ListVerifiedSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListVerifiedSender**](ListVerifiedSender.md#ListVerifiedSender) | **Get** /v3/verified_senders | Get All Verified Senders + + + +## ListVerifiedSender + +> ListVerifiedSender200Response ListVerifiedSender(ctx, optional) + +Get All Verified Senders + +**This endpoint allows you to retrieve all the Sender Identities associated with an account.** This endpoint will return both verified and unverified senders. You can limit the number of results returned using the `limit`, `lastSeenID`, and `id` query string parameters. * `limit` allows you to specify an exact number of Sender Identities to return. * `lastSeenID` will return senders with an ID number occuring after the passed in ID. In other words, the `lastSeenID` provides a starting point from which SendGrid will iterate to find Sender Identities associated with your account. * `id` will return information about only the Sender Identity passed in the request. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListVerifiedSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **float32** | Specifies the number of results to be returned by the API. This parameter can be used to limit the results returned or in combination with the `lastSeenID` parameter to iterate through paginated results. +**LastSeenID** | **float32** | Returns senders with an ID number occurring after the passed in ID. In other words, the `lastSeenID` provides a starting point from which SendGrid will iterate to find Sender Identities associated with your account. +**Id** | **int32** | Returns information about only the Sender Identity passed in the request. + +### Return type + +[**ListVerifiedSender200Response**](ListVerifiedSender200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/verified_senders/docs/ListVerifiedSender200Response.md b/rest/api/v3/verified_senders/docs/ListVerifiedSender200Response.md new file mode 100644 index 00000000..6d5bfc9d --- /dev/null +++ b/rest/api/v3/verified_senders/docs/ListVerifiedSender200Response.md @@ -0,0 +1,11 @@ +# ListVerifiedSender200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | [**[]VerifiedSenderResponse**](VerifiedSenderResponse.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain.md b/rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain.md new file mode 100644 index 00000000..1669c7e7 --- /dev/null +++ b/rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain.md @@ -0,0 +1,44 @@ +# ListVerifiedSenderDomain + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListVerifiedSenderDomain**](ListVerifiedSenderDomain.md#ListVerifiedSenderDomain) | **Get** /v3/verified_senders/domains | Domain Warn List + + + +## ListVerifiedSenderDomain + +> ListVerifiedSenderDomain200Response ListVerifiedSenderDomain(ctx, ) + +Domain Warn List + +**This endpoint returns a list of domains known to implement DMARC and categorizes them by failure type — hard failure or soft failure**. Domains listed as hard failures will not deliver mail when used as a [Sender Identity](https://sendgrid.com/docs/for-developers/sending-email/sender-identity/) due to the domain's DMARC policy settings. For example, using a `yahoo.com` email address as a Sender Identity will likely result in the rejection of your mail. For more information about DMARC, see [Everything about DMARC](https://sendgrid.com/docs/ui/sending-email/dmarc/). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListVerifiedSenderDomainParams struct + + +### Return type + +[**ListVerifiedSenderDomain200Response**](ListVerifiedSenderDomain200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain200Response.md b/rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain200Response.md new file mode 100644 index 00000000..fed32ddc --- /dev/null +++ b/rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain200Response.md @@ -0,0 +1,11 @@ +# ListVerifiedSenderDomain200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | [**ListVerifiedSenderDomain200ResponseResults**](ListVerifiedSenderDomain200ResponseResults.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain200ResponseResults.md b/rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain200ResponseResults.md new file mode 100644 index 00000000..2217409c --- /dev/null +++ b/rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain200ResponseResults.md @@ -0,0 +1,12 @@ +# ListVerifiedSenderDomain200ResponseResults + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SoftFailures** | **[]string** | | +**HardFailures** | **[]string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted.md b/rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted.md new file mode 100644 index 00000000..e793dd48 --- /dev/null +++ b/rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted.md @@ -0,0 +1,44 @@ +# ListVerifiedSenderStepsCompleted + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListVerifiedSenderStepsCompleted**](ListVerifiedSenderStepsCompleted.md#ListVerifiedSenderStepsCompleted) | **Get** /v3/verified_senders/steps_completed | Completed Steps + + + +## ListVerifiedSenderStepsCompleted + +> ListVerifiedSenderStepsCompleted200Response ListVerifiedSenderStepsCompleted(ctx, ) + +Completed Steps + +**This endpoint allows you to determine which of SendGrid’s verification processes have been completed for an account**. This endpoint returns boolean values, `true` and `false`, for [Domain Authentication](https://sendgrid.com/docs/for-developers/sending-email/sender-identity/#domain-authentication), `domain_verified`, and [Single Sender Verification](https://sendgrid.com/docs/for-developers/sending-email/sender-identity/#single-sender-verification), `sender_verified`, for the account. An account may have one, both, or neither verification steps completed. If you need to authenticate a domain rather than a Single Sender, see the \"Authenticate a domain\" endpoint. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListVerifiedSenderStepsCompletedParams struct + + +### Return type + +[**ListVerifiedSenderStepsCompleted200Response**](ListVerifiedSenderStepsCompleted200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted200Response.md b/rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted200Response.md new file mode 100644 index 00000000..2257b312 --- /dev/null +++ b/rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted200Response.md @@ -0,0 +1,11 @@ +# ListVerifiedSenderStepsCompleted200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | [**ListVerifiedSenderStepsCompleted200ResponseResults**](ListVerifiedSenderStepsCompleted200ResponseResults.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted200ResponseResults.md b/rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted200ResponseResults.md new file mode 100644 index 00000000..b114a2ad --- /dev/null +++ b/rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted200ResponseResults.md @@ -0,0 +1,12 @@ +# ListVerifiedSenderStepsCompleted200ResponseResults + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SenderVerified** | **bool** | |[optional] +**DomainVerified** | **bool** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/verified_senders/docs/ResendVerifiedSender.md b/rest/api/v3/verified_senders/docs/ResendVerifiedSender.md new file mode 100644 index 00000000..d7837503 --- /dev/null +++ b/rest/api/v3/verified_senders/docs/ResendVerifiedSender.md @@ -0,0 +1,51 @@ +# ResendVerifiedSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ResendVerifiedSender**](ResendVerifiedSender.md#ResendVerifiedSender) | **Post** /v3/verified_senders/resend/{Id} | Resend Verified Sender Request + + + +## ResendVerifiedSender + +> map[string]interface{} ResendVerifiedSender(ctx, Id) + +Resend Verified Sender Request + +**This endpoint allows you to resend a verification email to a specified Sender Identity**. Passing the `id` assigned to a Sender Identity to this endpoint will resend a verification email to the `from_address` associated with the Sender Identity. This can be useful if someone loses their verification email or needs to have it resent for any other reason. You can retrieve the IDs associated with Sender Identities by passing a \"Get All Verified Senders\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a ResendVerifiedSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/verified_senders/docs/UpdateVerifiedSender.md b/rest/api/v3/verified_senders/docs/UpdateVerifiedSender.md new file mode 100644 index 00000000..cf10ee97 --- /dev/null +++ b/rest/api/v3/verified_senders/docs/UpdateVerifiedSender.md @@ -0,0 +1,52 @@ +# UpdateVerifiedSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateVerifiedSender**](UpdateVerifiedSender.md#UpdateVerifiedSender) | **Patch** /v3/verified_senders/{Id} | Edit Verified Sender + + + +## UpdateVerifiedSender + +> VerifiedSenderResponse UpdateVerifiedSender(ctx, Idoptional) + +Edit Verified Sender + +**This endpoint allows you to update an existing Sender Identity**. Pass the `id` assigned to a Sender Identity to this endpoint as a path parameter. Include any fields you wish to update in the request body in JSON format. You can retrieve the IDs associated with Sender Identities by passing a `GET` request to the Get All Verified Senders endpoint, `/verified_senders`. **Note:** Unlike a `PUT` request, `PATCH` allows you to update only the fields you wish to edit. Fields that are not passed as part of a request will remain unaltered. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateVerifiedSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**VerifiedSenderRequest** | [**VerifiedSenderRequest**](VerifiedSenderRequest.md) | + +### Return type + +[**VerifiedSenderResponse**](VerifiedSenderResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/verified_senders/docs/VerifiedSenderRequest.md b/rest/api/v3/verified_senders/docs/VerifiedSenderRequest.md new file mode 100644 index 00000000..adb9c1cf --- /dev/null +++ b/rest/api/v3/verified_senders/docs/VerifiedSenderRequest.md @@ -0,0 +1,21 @@ +# VerifiedSenderRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Nickname** | **string** | | +**FromEmail** | **string** | | +**FromName** | **string** | |[optional] +**ReplyTo** | **string** | | +**ReplyToName** | **string** | |[optional] +**Address** | **string** | |[optional] +**Address2** | **string** | |[optional] +**State** | **string** | |[optional] +**City** | **string** | |[optional] +**Zip** | **string** | |[optional] +**Country** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/verified_senders/docs/VerifiedSenderResponse.md b/rest/api/v3/verified_senders/docs/VerifiedSenderResponse.md new file mode 100644 index 00000000..4a6bf8df --- /dev/null +++ b/rest/api/v3/verified_senders/docs/VerifiedSenderResponse.md @@ -0,0 +1,24 @@ +# VerifiedSenderResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | |[optional] +**Nickname** | **string** | |[optional] +**FromEmail** | **string** | |[optional] +**FromName** | **string** | |[optional] +**ReplyTo** | **string** | |[optional] +**ReplyToName** | **string** | |[optional] +**Address** | **string** | |[optional] +**Address2** | **string** | |[optional] +**State** | **string** | |[optional] +**City** | **string** | |[optional] +**Zip** | **string** | |[optional] +**Country** | **string** | |[optional] +**Verified** | **bool** | |[optional] +**Locked** | **bool** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/DeleteSsoCertificate.md b/rest/api/v3/verified_senders/docs/VerifySenderToken.md similarity index 56% rename from rest/api/v3/sso/docs/DeleteSsoCertificate.md rename to rest/api/v3/verified_senders/docs/VerifySenderToken.md index 27eba6d0..5dec772e 100644 --- a/rest/api/v3/sso/docs/DeleteSsoCertificate.md +++ b/rest/api/v3/verified_senders/docs/VerifySenderToken.md @@ -1,20 +1,20 @@ -# DeleteSsoCertificate +# VerifySenderToken All URIs are relative to *https://api.sendgrid.com* Method | HTTP request | Description ------------- | ------------- | ------------- -[**DeleteSsoCertificate**](DeleteSsoCertificate.md#DeleteSsoCertificate) | **Delete** /v3/sso/certificates/{CertId} | Delete an SSO Certificate +[**VerifySenderToken**](VerifySenderToken.md#VerifySenderToken) | **Get** /v3/verified_senders/verify/{Token} | Verify Sender Request -## DeleteSsoCertificate +## VerifySenderToken -> SsoCertificateBody DeleteSsoCertificate(ctx, CertId) +> VerifySenderToken(ctx, Token) -Delete an SSO Certificate +Verify Sender Request -**This endpoint allows you to delete an SSO certificate.** You can retrieve a certificate's ID from the response provided by the \"Get All SSO Integrations\" endpoint. +**This endpoint allows you to verify a sender requests.** The token is generated by SendGrid and included in a verification email delivered to the address that's pending verification. ### Path Parameters @@ -22,11 +22,11 @@ Delete an SSO Certificate Name | Type | Description ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**CertId** | **string** | +**Token** | **string** | ### Other Parameters -Other parameters are passed through a pointer to a DeleteSsoCertificateParams struct +Other parameters are passed through a pointer to a VerifySenderTokenParams struct Name | Type | Description @@ -34,7 +34,7 @@ Name | Type | Description ### Return type -[**SsoCertificateBody**](SsoCertificateBody.md) + (empty response body) ### Authorization diff --git a/rest/api/v3/verified_senders/model_create_verified_sender_400_response.go b/rest/api/v3/verified_senders/model_create_verified_sender_400_response.go new file mode 100644 index 00000000..5b15d971 --- /dev/null +++ b/rest/api/v3/verified_senders/model_create_verified_sender_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateVerifiedSender400Response struct for CreateVerifiedSender400Response +type CreateVerifiedSender400Response struct { + Errors []CreateVerifiedSender400ResponseErrorsInner `json:"errors"` +} diff --git a/rest/api/v3/verified_senders/model_create_verified_sender_400_response_errors_inner.go b/rest/api/v3/verified_senders/model_create_verified_sender_400_response_errors_inner.go new file mode 100644 index 00000000..6682ad11 --- /dev/null +++ b/rest/api/v3/verified_senders/model_create_verified_sender_400_response_errors_inner.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateVerifiedSender400ResponseErrorsInner struct for CreateVerifiedSender400ResponseErrorsInner +type CreateVerifiedSender400ResponseErrorsInner struct { + Field *string `json:"field,omitempty"` + Message string `json:"message"` + ErrorId string `json:"error_id"` +} diff --git a/rest/api/v3/verified_senders/model_delete_verified_sender_403_response.go b/rest/api/v3/verified_senders/model_delete_verified_sender_403_response.go new file mode 100644 index 00000000..2aa7215f --- /dev/null +++ b/rest/api/v3/verified_senders/model_delete_verified_sender_403_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteVerifiedSender403Response struct for DeleteVerifiedSender403Response +type DeleteVerifiedSender403Response struct { + Errors *[]DeleteVerifiedSender403ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/verified_senders/model_delete_verified_sender_403_response_errors_inner.go b/rest/api/v3/verified_senders/model_delete_verified_sender_403_response_errors_inner.go new file mode 100644 index 00000000..f3f8a340 --- /dev/null +++ b/rest/api/v3/verified_senders/model_delete_verified_sender_403_response_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteVerifiedSender403ResponseErrorsInner struct for DeleteVerifiedSender403ResponseErrorsInner +type DeleteVerifiedSender403ResponseErrorsInner struct { + Message string `json:"message"` + ErrorId string `json:"error_id"` +} diff --git a/rest/api/v3/verified_senders/model_delete_verified_sender_404_response.go b/rest/api/v3/verified_senders/model_delete_verified_sender_404_response.go new file mode 100644 index 00000000..b25527ed --- /dev/null +++ b/rest/api/v3/verified_senders/model_delete_verified_sender_404_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteVerifiedSender404Response struct for DeleteVerifiedSender404Response +type DeleteVerifiedSender404Response struct { + Errors []DeleteVerifiedSender403ResponseErrorsInner `json:"errors"` +} diff --git a/rest/api/v3/verified_senders/model_error_response.go b/rest/api/v3/verified_senders/model_error_response.go new file mode 100644 index 00000000..e607f39f --- /dev/null +++ b/rest/api/v3/verified_senders/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/verified_senders/model_error_response_errors_inner.go b/rest/api/v3/verified_senders/model_error_response_errors_inner.go new file mode 100644 index 00000000..f544f8bb --- /dev/null +++ b/rest/api/v3/verified_senders/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/verified_senders/model_list_verified_sender_200_response.go b/rest/api/v3/verified_senders/model_list_verified_sender_200_response.go new file mode 100644 index 00000000..3a68dd4b --- /dev/null +++ b/rest/api/v3/verified_senders/model_list_verified_sender_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListVerifiedSender200Response struct for ListVerifiedSender200Response +type ListVerifiedSender200Response struct { + Results *[]VerifiedSenderResponse `json:"results,omitempty"` +} diff --git a/rest/api/v3/verified_senders/model_list_verified_sender_domain_200_response.go b/rest/api/v3/verified_senders/model_list_verified_sender_domain_200_response.go new file mode 100644 index 00000000..3f77bce9 --- /dev/null +++ b/rest/api/v3/verified_senders/model_list_verified_sender_domain_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListVerifiedSenderDomain200Response struct for ListVerifiedSenderDomain200Response +type ListVerifiedSenderDomain200Response struct { + Results ListVerifiedSenderDomain200ResponseResults `json:"results"` +} diff --git a/rest/api/v3/verified_senders/model_list_verified_sender_domain_200_response_results.go b/rest/api/v3/verified_senders/model_list_verified_sender_domain_200_response_results.go new file mode 100644 index 00000000..703a3515 --- /dev/null +++ b/rest/api/v3/verified_senders/model_list_verified_sender_domain_200_response_results.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListVerifiedSenderDomain200ResponseResults struct for ListVerifiedSenderDomain200ResponseResults +type ListVerifiedSenderDomain200ResponseResults struct { + SoftFailures []string `json:"soft_failures"` + HardFailures []string `json:"hard_failures"` +} diff --git a/rest/api/v3/verified_senders/model_list_verified_sender_steps_completed_200_response.go b/rest/api/v3/verified_senders/model_list_verified_sender_steps_completed_200_response.go new file mode 100644 index 00000000..a252d30c --- /dev/null +++ b/rest/api/v3/verified_senders/model_list_verified_sender_steps_completed_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListVerifiedSenderStepsCompleted200Response struct for ListVerifiedSenderStepsCompleted200Response +type ListVerifiedSenderStepsCompleted200Response struct { + Results *ListVerifiedSenderStepsCompleted200ResponseResults `json:"results,omitempty"` +} diff --git a/rest/api/v3/verified_senders/model_list_verified_sender_steps_completed_200_response_results.go b/rest/api/v3/verified_senders/model_list_verified_sender_steps_completed_200_response_results.go new file mode 100644 index 00000000..21b54ce8 --- /dev/null +++ b/rest/api/v3/verified_senders/model_list_verified_sender_steps_completed_200_response_results.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListVerifiedSenderStepsCompleted200ResponseResults struct for ListVerifiedSenderStepsCompleted200ResponseResults +type ListVerifiedSenderStepsCompleted200ResponseResults struct { + SenderVerified *bool `json:"sender_verified,omitempty"` + DomainVerified *bool `json:"domain_verified,omitempty"` +} diff --git a/rest/api/v3/verified_senders/model_verified_sender_request.go b/rest/api/v3/verified_senders/model_verified_sender_request.go new file mode 100644 index 00000000..3dc370c4 --- /dev/null +++ b/rest/api/v3/verified_senders/model_verified_sender_request.go @@ -0,0 +1,29 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// VerifiedSenderRequest struct for VerifiedSenderRequest +type VerifiedSenderRequest struct { + Nickname string `json:"nickname"` + FromEmail string `json:"from_email"` + FromName *string `json:"from_name,omitempty"` + ReplyTo string `json:"reply_to"` + ReplyToName *string `json:"reply_to_name,omitempty"` + Address *string `json:"address,omitempty"` + Address2 *string `json:"address2,omitempty"` + State *string `json:"state,omitempty"` + City *string `json:"city,omitempty"` + Zip *string `json:"zip,omitempty"` + Country *string `json:"country,omitempty"` +} diff --git a/rest/api/v3/verified_senders/model_verified_sender_response.go b/rest/api/v3/verified_senders/model_verified_sender_response.go new file mode 100644 index 00000000..308efbc6 --- /dev/null +++ b/rest/api/v3/verified_senders/model_verified_sender_response.go @@ -0,0 +1,32 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// VerifiedSenderResponse struct for VerifiedSenderResponse +type VerifiedSenderResponse struct { + Id *int32 `json:"id,omitempty"` + Nickname *string `json:"nickname,omitempty"` + FromEmail *string `json:"from_email,omitempty"` + FromName *string `json:"from_name,omitempty"` + ReplyTo *string `json:"reply_to,omitempty"` + ReplyToName *string `json:"reply_to_name,omitempty"` + Address *string `json:"address,omitempty"` + Address2 *string `json:"address2,omitempty"` + State *string `json:"state,omitempty"` + City *string `json:"city,omitempty"` + Zip *string `json:"zip,omitempty"` + Country *string `json:"country,omitempty"` + Verified *bool `json:"verified,omitempty"` + Locked *bool `json:"locked,omitempty"` +} diff --git a/rest/api/v3/webhooks/README.md b/rest/api/v3/webhooks/README.md index e5f26d25..e7ffa141 100644 --- a/rest/api/v3/webhooks/README.md +++ b/rest/api/v3/webhooks/README.md @@ -11,7 +11,7 @@ This API client was generated by the [OpenAPI Generator](https://openapi-generat - API version: 1.0.0 - Package version: -- Build date: 2024-10-04T13:25:44.562782+05:30[Asia/Kolkata] +- Build date: 2024-10-04T16:57:38.593153+05:30[Asia/Kolkata] - Build package: com.sendgrid.oai.go.SendgridGoGenerator For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) diff --git a/rest/api/v3/webhooks/api_create_event_webhook.go b/rest/api/v3/webhooks/api_create_event_webhook.go index 0dd3432d..6b1ce155 100644 --- a/rest/api/v3/webhooks/api_create_event_webhook.go +++ b/rest/api/v3/webhooks/api_create_event_webhook.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -77,5 +78,5 @@ func (c *ApiService) CreateEventWebhook(params *CreateEventWebhookParam) (interf return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/webhooks/api_create_parse_setting.go b/rest/api/v3/webhooks/api_create_parse_setting.go index cc7a8562..a0ca6e2e 100644 --- a/rest/api/v3/webhooks/api_create_parse_setting.go +++ b/rest/api/v3/webhooks/api_create_parse_setting.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -93,5 +94,5 @@ func (c *ApiService) CreateParseSetting(params *CreateParseSettingParam) (interf return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/webhooks/api_delete_event_webhook.go b/rest/api/v3/webhooks/api_delete_event_webhook.go index df797e9e..5c2182d8 100644 --- a/rest/api/v3/webhooks/api_delete_event_webhook.go +++ b/rest/api/v3/webhooks/api_delete_event_webhook.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -65,5 +66,5 @@ func (c *ApiService) DeleteEventWebhook(params *DeleteEventWebhookParam) (interf return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/webhooks/api_delete_parse_setting.go b/rest/api/v3/webhooks/api_delete_parse_setting.go index e4332ebc..f153aa53 100644 --- a/rest/api/v3/webhooks/api_delete_parse_setting.go +++ b/rest/api/v3/webhooks/api_delete_parse_setting.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -89,5 +90,5 @@ func (c *ApiService) DeleteParseSetting(params *DeleteParseSettingParam) (interf return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/webhooks/api_get_event_webhook.go b/rest/api/v3/webhooks/api_get_event_webhook.go index 89484ed5..0f76419b 100644 --- a/rest/api/v3/webhooks/api_get_event_webhook.go +++ b/rest/api/v3/webhooks/api_get_event_webhook.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -83,5 +84,5 @@ func (c *ApiService) GetEventWebhook(params *GetEventWebhookParam) (interface{}, return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/webhooks/api_get_parse_setting.go b/rest/api/v3/webhooks/api_get_parse_setting.go index 3efb389a..5b1b3f9e 100644 --- a/rest/api/v3/webhooks/api_get_parse_setting.go +++ b/rest/api/v3/webhooks/api_get_parse_setting.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -89,5 +90,5 @@ func (c *ApiService) GetParseSetting(params *GetParseSettingParam) (interface{}, return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/webhooks/api_get_signed_event_webhook.go b/rest/api/v3/webhooks/api_get_signed_event_webhook.go index 3ee37388..0bd97803 100644 --- a/rest/api/v3/webhooks/api_get_signed_event_webhook.go +++ b/rest/api/v3/webhooks/api_get_signed_event_webhook.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -73,5 +74,5 @@ func (c *ApiService) GetSignedEventWebhook(params *GetSignedEventWebhookParam) ( return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/webhooks/api_list_event_webhook.go b/rest/api/v3/webhooks/api_list_event_webhook.go index e1b4bb6b..16889f64 100644 --- a/rest/api/v3/webhooks/api_list_event_webhook.go +++ b/rest/api/v3/webhooks/api_list_event_webhook.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -64,5 +65,5 @@ func (c *ApiService) ListEventWebhook(params *ListEventWebhookParam) (interface{ return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/webhooks/api_list_parse_setting.go b/rest/api/v3/webhooks/api_list_parse_setting.go index cb0cd5e4..0925578e 100644 --- a/rest/api/v3/webhooks/api_list_parse_setting.go +++ b/rest/api/v3/webhooks/api_list_parse_setting.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -78,5 +79,5 @@ func (c *ApiService) ListParseSetting(params *ListParseSettingParam) (interface{ return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/webhooks/api_list_parse_static.go b/rest/api/v3/webhooks/api_list_parse_static.go index 5d7129ae..e717caae 100644 --- a/rest/api/v3/webhooks/api_list_parse_static.go +++ b/rest/api/v3/webhooks/api_list_parse_static.go @@ -16,6 +16,7 @@ package openapi import ( "encoding/json" "fmt" + "net/http" "net/url" ) @@ -101,5 +102,5 @@ func (c *ApiService) ListParseStatic(params *ListParseStaticParam) (interface{}, return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/webhooks/api_test_event_webhook.go b/rest/api/v3/webhooks/api_test_event_webhook.go index b183cd8e..acb1e0dc 100644 --- a/rest/api/v3/webhooks/api_test_event_webhook.go +++ b/rest/api/v3/webhooks/api_test_event_webhook.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" ) @@ -61,5 +62,5 @@ func (c *ApiService) TestEventWebhook(params *TestEventWebhookParam) (interface{ } defer resp.Body.Close() - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/webhooks/api_update_event_webhook.go b/rest/api/v3/webhooks/api_update_event_webhook.go index eb308063..1a49d592 100644 --- a/rest/api/v3/webhooks/api_update_event_webhook.go +++ b/rest/api/v3/webhooks/api_update_event_webhook.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -105,5 +106,5 @@ func (c *ApiService) UpdateEventWebhook(params *UpdateEventWebhookParam) (interf return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/webhooks/api_update_parse_setting.go b/rest/api/v3/webhooks/api_update_parse_setting.go index 19db3589..f4537108 100644 --- a/rest/api/v3/webhooks/api_update_parse_setting.go +++ b/rest/api/v3/webhooks/api_update_parse_setting.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -104,5 +105,5 @@ func (c *ApiService) UpdateParseSetting(params *UpdateParseSettingParam) (interf return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/rest/api/v3/webhooks/api_update_signed_event_webhook.go b/rest/api/v3/webhooks/api_update_signed_event_webhook.go index 403effeb..1e962925 100644 --- a/rest/api/v3/webhooks/api_update_signed_event_webhook.go +++ b/rest/api/v3/webhooks/api_update_signed_event_webhook.go @@ -15,6 +15,7 @@ package openapi import ( "encoding/json" + "net/http" "net/url" "strings" @@ -88,5 +89,5 @@ func (c *ApiService) UpdateSignedEventWebhook(params *UpdateSignedEventWebhookPa return ps, err } - return nil, nil + return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil } diff --git a/sendgrid.go b/sendgrid.go index 4a1b2881..f9986f6e 100644 --- a/sendgrid.go +++ b/sendgrid.go @@ -36,24 +36,28 @@ import ( LmcSendersV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/lmc_senders" MailV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mail" MailSettingsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mail_settings" - McDesignsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_designs" + McContactsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_contacts" + McCustomFieldsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_custom_fields" McListsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_lists" McSegmentsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_segments" McSegments2V3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_segments_2" McSendersV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_senders" McSinglesendsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_singlesends" + McStatsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_stats" McTestV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_test" PartnerV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/partner" RecipientsDataErasureV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/recipients_data_erasure" ReverseDnsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/reverse_dns" ScheduledSendsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/scheduled_sends" + ScopesV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/scopes" SeqV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/seq" - SsoV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/sso" - StatsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/stats" SubusersV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/subusers" + SuppressionsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/suppressions" TeammatesV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/teammates" TemplatesV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/templates" TrackingSettingsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/tracking_settings" + UserV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/user" + VerifiedSendersV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/verified_senders" WebhooksV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/webhooks" ) @@ -78,24 +82,28 @@ type RestClient struct { LmcSendersV3 *LmcSendersV3.ApiService MailV3 *MailV3.ApiService MailSettingsV3 *MailSettingsV3.ApiService - McDesignsV3 *McDesignsV3.ApiService + McContactsV3 *McContactsV3.ApiService + McCustomFieldsV3 *McCustomFieldsV3.ApiService McListsV3 *McListsV3.ApiService McSegmentsV3 *McSegmentsV3.ApiService McSegments2V3 *McSegments2V3.ApiService McSendersV3 *McSendersV3.ApiService McSinglesendsV3 *McSinglesendsV3.ApiService + McStatsV3 *McStatsV3.ApiService McTestV3 *McTestV3.ApiService PartnerV3 *PartnerV3.ApiService RecipientsDataErasureV3 *RecipientsDataErasureV3.ApiService ReverseDnsV3 *ReverseDnsV3.ApiService ScheduledSendsV3 *ScheduledSendsV3.ApiService + ScopesV3 *ScopesV3.ApiService SeqV3 *SeqV3.ApiService - SsoV3 *SsoV3.ApiService - StatsV3 *StatsV3.ApiService SubusersV3 *SubusersV3.ApiService + SuppressionsV3 *SuppressionsV3.ApiService TeammatesV3 *TeammatesV3.ApiService TemplatesV3 *TemplatesV3.ApiService TrackingSettingsV3 *TrackingSettingsV3.ApiService + UserV3 *UserV3.ApiService + VerifiedSendersV3 *VerifiedSendersV3.ApiService WebhooksV3 *WebhooksV3.ApiService } @@ -204,24 +212,28 @@ func NewRestClientWithParams(params ClientParams) *RestClient { c.LmcSendersV3 = LmcSendersV3.NewApiService(c.RequestHandler) c.MailV3 = MailV3.NewApiService(c.RequestHandler) c.MailSettingsV3 = MailSettingsV3.NewApiService(c.RequestHandler) - c.McDesignsV3 = McDesignsV3.NewApiService(c.RequestHandler) + c.McContactsV3 = McContactsV3.NewApiService(c.RequestHandler) + c.McCustomFieldsV3 = McCustomFieldsV3.NewApiService(c.RequestHandler) c.McListsV3 = McListsV3.NewApiService(c.RequestHandler) c.McSegmentsV3 = McSegmentsV3.NewApiService(c.RequestHandler) c.McSegments2V3 = McSegments2V3.NewApiService(c.RequestHandler) c.McSendersV3 = McSendersV3.NewApiService(c.RequestHandler) c.McSinglesendsV3 = McSinglesendsV3.NewApiService(c.RequestHandler) + c.McStatsV3 = McStatsV3.NewApiService(c.RequestHandler) c.McTestV3 = McTestV3.NewApiService(c.RequestHandler) c.PartnerV3 = PartnerV3.NewApiService(c.RequestHandler) c.RecipientsDataErasureV3 = RecipientsDataErasureV3.NewApiService(c.RequestHandler) c.ReverseDnsV3 = ReverseDnsV3.NewApiService(c.RequestHandler) c.ScheduledSendsV3 = ScheduledSendsV3.NewApiService(c.RequestHandler) + c.ScopesV3 = ScopesV3.NewApiService(c.RequestHandler) c.SeqV3 = SeqV3.NewApiService(c.RequestHandler) - c.SsoV3 = SsoV3.NewApiService(c.RequestHandler) - c.StatsV3 = StatsV3.NewApiService(c.RequestHandler) c.SubusersV3 = SubusersV3.NewApiService(c.RequestHandler) + c.SuppressionsV3 = SuppressionsV3.NewApiService(c.RequestHandler) c.TeammatesV3 = TeammatesV3.NewApiService(c.RequestHandler) c.TemplatesV3 = TemplatesV3.NewApiService(c.RequestHandler) c.TrackingSettingsV3 = TrackingSettingsV3.NewApiService(c.RequestHandler) + c.UserV3 = UserV3.NewApiService(c.RequestHandler) + c.VerifiedSendersV3 = VerifiedSendersV3.NewApiService(c.RequestHandler) c.WebhooksV3 = WebhooksV3.NewApiService(c.RequestHandler) return c From f298f3dc73601a094870d06adb9ed412fcad01b9 Mon Sep 17 00:00:00 2001 From: Shubham Tiwari Date: Fri, 4 Oct 2024 18:17:37 +0530 Subject: [PATCH 14/16] chore: update readme and upgrade guide --- CHANGELOG.md | 4 ++++ README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ UPGRADE.md | 11 +++++++++++ base_interface.go | 2 +- 4 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 UPGRADE.md diff --git a/CHANGELOG.md b/CHANGELOG.md index ad1db81f..7a49f3ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Change Log All notable changes to this project will be documented in this file. +[2024-10-04] Version 4.0.0-rc.1 +--------------------------- +Release Candidate Preparation + [2024-08-26] Version 3.16.0 --------------------------- **Library - Chore** diff --git a/README.md b/README.md index 6a2130cd..e18e28f3 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,49 @@ source ./sendgrid.env The following is the minimum needed code to send an email with the [/mail/send Helper](helpers/mail) ([here](examples/helpers/mail/example.go#L32) is a full example): +### Using Autogenerated Code +```go +package main + +import ( + "encoding/json" + "fmt" + "github.com/sendgrid/sendgrid-go" + MailV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mail" + "net/http" + "os" +) + +func main() { + client := sendgrid.NewRestClientWithParams(sendgrid.ClientParams{ + ApiKey: os.Getenv("SENDGRID_API_KEY"), + }) + name := "John Doe" + subject := "Sending with Twilio SendGrid is Fun" + mailTo := &MailV3.MailTo{Email: "test@example.com"} + to := []MailV3.MailTo{*mailTo} + sendMailRequest := MailV3.SendMailRequest{ + From: MailV3.MailFrom{Name: &name, Email: VERIFIED_EMAIL}, + ReplyTo: mailTo, + Subject: &subject, + Personalizations: []MailV3.SendMailRequestPersonalizationsInner{{To: to}}, + Content: &[]MailV3.SendMailRequestContentInner{{Type: "text/plain", Value: "Abc"}}, + } + sendMailParam := &MailV3.SendMailParam{SendMailRequest: &sendMailRequest} + resp, err := client.MailV3.SendMail(sendMailParam) + if err != nil { + fmt.Println("Error sending mail: " + err.Error()) + } else { + response, _ := json.Marshal(resp) + var ps http.Response + json.Unmarshal(response, &ps) + fmt.Println(ps.StatusCode) + fmt.Println(ps.Body) + fmt.Println(ps.Header) + } +} +``` + ### With Mail Helper Class ```go diff --git a/UPGRADE.md b/UPGRADE.md new file mode 100644 index 00000000..82751aa6 --- /dev/null +++ b/UPGRADE.md @@ -0,0 +1,11 @@ +# Upgrade Guide + +_`MAJOR` version bumps will have upgrade notes posted here._ + +[2024-10-04] 3.x.x to 4.x.x-rc.x +-------------------------------- +### Overview + +#### Sendgrid Go Helper Library's version 4.0.0-rc.x is now available. + +Behind the scenes Go Helper is now auto-generated via OpenAPI with this release. This enables us to rapidly add new features and enhance consistency across versions and languages. diff --git a/base_interface.go b/base_interface.go index 6fdaf3cf..cb76514e 100644 --- a/base_interface.go +++ b/base_interface.go @@ -15,7 +15,7 @@ import ( // Version is this client library's current version const ( - Version = "3.16.0" + Version = "4.0.0-rc.1" rateLimitRetry = 5 rateLimitSleep = 1100 ) From bf215d8b335c7cb32365e250098e553886f743eb Mon Sep 17 00:00:00 2001 From: Shubham Tiwari Date: Fri, 4 Oct 2024 18:28:37 +0530 Subject: [PATCH 15/16] chore: remove rest folder --- .../account_provisioning/.openapi-generator | 58 ------ .../.openapi-generator-ignore | 23 --- rest/api/v3/account_provisioning/README.md | 87 --------- .../api_authenticate_account.go | 52 ----- .../api_create_account.go | 74 ------- .../api_delete_account.go | 52 ----- .../api_get_account_state.go | 61 ------ .../account_provisioning/api_list_account.go | 70 ------- .../api_list_account_offering.go | 61 ------ .../account_provisioning/api_list_offering.go | 49 ----- .../v3/account_provisioning/api_service.go | 34 ---- .../api_update_account_offering.go | 76 -------- .../api_update_account_state.go | 68 ------- .../account_provisioning/docs/AccountList.md | 12 -- .../docs/AccountProvisioningAccount.md | 12 -- .../docs/AccountProvisioningAccountId.md | 11 -- .../docs/AccountProvisioningCatalog.md | 11 -- .../docs/AccountProvisioningOfferingList.md | 11 -- .../docs/AccountProvisioningOfferingV1.md | 13 -- .../docs/AccountProvisioningPagination.md | 12 -- .../docs/AccountProvisioningProfile.md | 17 -- .../docs/AccountProvisioningStateRead.md | 11 -- .../docs/AccountProvisioningStateWrite.md | 11 -- .../docs/AuthenticateAccount.md | 51 ----- .../account_provisioning/docs/CatalogEntry.md | 12 -- .../docs/CatalogEntryEntitlements.md | 14 -- .../docs/CreateAccount.md | 48 ----- .../docs/CreateAccountParams.md | 12 -- .../docs/DeleteAccount.md | 51 ----- .../docs/ErrorResponse.md | 13 -- .../docs/GetAccountState.md | 51 ----- .../account_provisioning/docs/ListAccount.md | 49 ----- .../docs/ListAccountOffering.md | 51 ----- .../account_provisioning/docs/ListOffering.md | 44 ----- .../docs/OfferingsToAdd.md | 11 -- .../api/v3/account_provisioning/docs/State.md | 16 -- .../v3/account_provisioning/docs/State1.md | 13 -- rest/api/v3/account_provisioning/docs/Type.md | 13 -- .../docs/UpdateAccountOffering.md | 51 ----- .../docs/UpdateAccountState.md | 51 ----- .../model_account_list.go | 21 -- .../model_account_provisioning_account.go | 26 --- .../model_account_provisioning_account_id.go | 20 -- .../model_account_provisioning_catalog.go | 19 -- ...odel_account_provisioning_offering_list.go | 19 -- .../model_account_provisioning_offering_v1.go | 24 --- .../model_account_provisioning_pagination.go | 21 -- .../model_account_provisioning_profile.go | 32 --- .../model_account_provisioning_state_read.go | 20 -- .../model_account_provisioning_state_write.go | 20 -- .../model_catalog_entry.go | 20 -- .../model_catalog_entry_entitlements.go | 26 --- .../model_create_account_params.go | 21 -- .../model_error_response.go | 24 --- .../model_offerings_to_add.go | 20 -- .../v3/account_provisioning/model_state.go | 26 --- .../v3/account_provisioning/model_state1.go | 23 --- .../api/v3/account_provisioning/model_type.go | 23 --- rest/api/v3/alerts/.openapi-generator | 38 ---- rest/api/v3/alerts/.openapi-generator-ignore | 23 --- rest/api/v3/alerts/README.md | 77 -------- rest/api/v3/alerts/api_create_alert.go | 82 -------- rest/api/v3/alerts/api_delete_alert.go | 62 ------ rest/api/v3/alerts/api_get_alert.go | 71 ------- rest/api/v3/alerts/api_list_alert.go | 59 ------ rest/api/v3/alerts/api_service.go | 34 ---- rest/api/v3/alerts/api_update_alert.go | 86 -------- rest/api/v3/alerts/docs/CreateAlert.md | 49 ----- .../v3/alerts/docs/CreateAlert201Response.md | 17 -- rest/api/v3/alerts/docs/CreateAlertRequest.md | 14 -- rest/api/v3/alerts/docs/DeleteAlert.md | 52 ----- rest/api/v3/alerts/docs/ErrorResponse.md | 12 -- .../alerts/docs/ErrorResponseErrorsInner.md | 13 -- rest/api/v3/alerts/docs/GetAlert.md | 52 ----- .../api/v3/alerts/docs/GetAlert200Response.md | 17 -- rest/api/v3/alerts/docs/ListAlert.md | 48 ----- .../alerts/docs/ListAlert200ResponseInner.md | 17 -- rest/api/v3/alerts/docs/Type.md | 13 -- rest/api/v3/alerts/docs/Type1.md | 13 -- rest/api/v3/alerts/docs/Type2.md | 13 -- rest/api/v3/alerts/docs/Type3.md | 13 -- rest/api/v3/alerts/docs/UpdateAlert.md | 53 ----- .../v3/alerts/docs/UpdateAlert200Response.md | 17 -- rest/api/v3/alerts/docs/UpdateAlertRequest.md | 13 -- .../alerts/model_create_alert_201_response.go | 32 --- .../v3/alerts/model_create_alert_request.go | 26 --- rest/api/v3/alerts/model_error_response.go | 21 -- .../model_error_response_errors_inner.go | 24 --- .../v3/alerts/model_get_alert_200_response.go | 32 --- .../model_list_alert_200_response_inner.go | 32 --- rest/api/v3/alerts/model_type.go | 23 --- rest/api/v3/alerts/model_type1.go | 23 --- rest/api/v3/alerts/model_type2.go | 23 --- rest/api/v3/alerts/model_type3.go | 23 --- .../alerts/model_update_alert_200_response.go | 32 --- .../v3/alerts/model_update_alert_request.go | 24 --- rest/api/v3/api_keys/.openapi-generator | 36 ---- .../api/v3/api_keys/.openapi-generator-ignore | 23 --- rest/api/v3/api_keys/README.md | 76 -------- rest/api/v3/api_keys/api_create_api_key.go | 106 ---------- rest/api/v3/api_keys/api_delete_api_key.go | 94 --------- rest/api/v3/api_keys/api_get_api_key.go | 102 ---------- rest/api/v3/api_keys/api_list_api_key.go | 94 --------- rest/api/v3/api_keys/api_service.go | 34 ---- rest/api/v3/api_keys/api_update_api_key.go | 117 ----------- .../v3/api_keys/api_update_api_key_name.go | 117 ----------- rest/api/v3/api_keys/docs/ApiKeyResponse.md | 12 -- .../v3/api_keys/docs/ApiKeyScopesResponse.md | 13 -- rest/api/v3/api_keys/docs/CreateApiKey.md | 49 ----- .../api_keys/docs/CreateApiKey201Response.md | 14 -- .../v3/api_keys/docs/CreateApiKeyRequest.md | 12 -- rest/api/v3/api_keys/docs/DeleteApiKey.md | 52 ----- rest/api/v3/api_keys/docs/ErrorResponse.md | 12 -- .../api_keys/docs/ErrorResponseErrorsInner.md | 13 -- rest/api/v3/api_keys/docs/GetApiKey.md | 52 ----- .../v3/api_keys/docs/GetApiKey200Response.md | 11 -- rest/api/v3/api_keys/docs/ListApiKey.md | 49 ----- .../v3/api_keys/docs/ListApiKey200Response.md | 11 -- rest/api/v3/api_keys/docs/UpdateApiKey.md | 53 ----- rest/api/v3/api_keys/docs/UpdateApiKeyName.md | 53 ----- .../api_keys/docs/UpdateApiKeyNameRequest.md | 11 -- .../v3/api_keys/docs/UpdateApiKeyRequest.md | 12 -- .../api/v3/api_keys/model_api_key_response.go | 22 --- .../api_keys/model_api_key_scopes_response.go | 24 --- .../model_create_api_key_201_response.go | 22 --- .../api_keys/model_create_api_key_request.go | 22 --- rest/api/v3/api_keys/model_error_response.go | 21 -- .../model_error_response_errors_inner.go | 24 --- .../model_get_api_key_200_response.go | 19 -- .../model_list_api_key_200_response.go | 19 -- .../model_update_api_key_name_request.go | 20 -- .../api_keys/model_update_api_key_request.go | 20 -- .../domain_authentication/.openapi-generator | 86 -------- .../.openapi-generator-ignore | 23 --- rest/api/v3/domain_authentication/README.md | 103 ---------- .../api_add_ip_to_authenticated_domain.go | 86 -------- .../api_associate_subuser_with_domain.go | 77 -------- ..._associate_subuser_with_domain_multiple.go | 77 -------- .../api_authenticate_domain.go | 74 ------- .../api_delete_authenticated_domain.go | 70 ------- ...api_delete_ip_from_authenticated_domain.go | 80 -------- ...ssociate_authenticated_domain_from_user.go | 60 ------ .../api_disassociate_subuser_from_domain.go | 72 ------- .../api_email_dns_record.go | 65 ------- .../api_get_authenticated_domain.go | 70 ------- ...list_all_authenticated_domain_with_user.go | 60 ------ .../api_list_authenticated_domain.go | 106 ---------- ...api_list_authenticated_domain_with_user.go | 60 ------ .../api_list_default_authenticated_domain.go | 69 ------- .../v3/domain_authentication/api_service.go | 34 ---- .../api_update_authenticated_domain.go | 85 -------- .../api_validate_authenticated_domain.go | 79 -------- .../docs/AddIpToAuthenticatedDomain.md | 53 ----- .../docs/AddIpToAuthenticatedDomainRequest.md | 11 -- .../docs/AssociateSubuserWithDomain.md | 52 ----- .../AssociateSubuserWithDomainMultiple.md | 52 ----- .../docs/AssociateSubuserWithDomainRequest.md | 11 -- .../docs/AuthenticateDomain.md | 49 ----- .../docs/AuthenticateDomainRequest.md | 19 -- .../docs/AuthenticatedDomain.md | 22 --- .../docs/AuthenticatedDomainSpf.md | 22 --- .../docs/AuthenticatedDomainSpfDns.md | 14 -- .../docs/AuthenticatedDomainSpfDnsDkim.md | 14 -- .../AuthenticatedDomainSpfDnsDomainSpf.md | 14 -- .../AuthenticatedDomainSpfDnsMailServer.md | 14 -- .../AuthenticatedDomainSpfDnsSubdomainSpf.md | 14 -- .../docs/DeleteAuthenticatedDomain.md | 52 ----- .../docs/DeleteIpFromAuthenticatedDomain.md | 53 ----- ...DisassociateAuthenticatedDomainFromUser.md | 48 ----- .../docs/DisassociateSubuserFromDomain.md | 52 ----- .../docs/EmailDnsRecord.md | 48 ----- .../docs/EmailDnsRecord400Response.md | 11 -- .../docs/EmailDnsRecord400ResponseErrors.md | 12 -- .../docs/EmailDnsRecordRequest.md | 14 -- .../docs/GetAuthenticatedDomain.md | 52 ----- .../ListAllAuthenticatedDomainWithUser.md | 47 ----- ...enticatedDomainWithUser200ResponseInner.md | 22 --- ...icatedDomainWithUser200ResponseInnerDns.md | 13 -- ...dDomainWithUser200ResponseInnerDnsDkim1.md | 14 -- ...ainWithUser200ResponseInnerDnsMailCname.md | 14 -- .../docs/ListAuthenticatedDomain.md | 53 ----- .../docs/ListAuthenticatedDomainWithUser.md | 47 ----- .../docs/ListDefaultAuthenticatedDomain.md | 49 ----- .../docs/UpdateAuthenticatedDomain.md | 53 ----- .../docs/UpdateAuthenticatedDomainRequest.md | 12 -- .../docs/ValidateAuthenticatedDomain.md | 52 ----- .../ValidateAuthenticatedDomain200Response.md | 13 -- ...catedDomain200ResponseValidationResults.md | 14 -- ...Domain200ResponseValidationResultsDkim1.md | 12 -- ...in200ResponseValidationResultsMailCname.md | 12 -- ...edDomain200ResponseValidationResultsSpf.md | 12 -- .../ValidateAuthenticatedDomain500Response.md | 11 -- ...thenticatedDomain500ResponseErrorsInner.md | 11 -- ..._add_ip_to_authenticated_domain_request.go | 20 -- ...l_associate_subuser_with_domain_request.go | 20 -- .../model_authenticate_domain_request.go | 36 ---- .../model_authenticated_domain.go | 41 ---- .../model_authenticated_domain_spf.go | 41 ---- .../model_authenticated_domain_spf_dns.go | 22 --- ...model_authenticated_domain_spf_dns_dkim.go | 26 --- ...authenticated_domain_spf_dns_domain_spf.go | 26 --- ...uthenticated_domain_spf_dns_mail_server.go | 26 --- ...henticated_domain_spf_dns_subdomain_spf.go | 26 --- .../model_email_dns_record_400_response.go | 19 -- ...el_email_dns_record_400_response_errors.go | 20 -- .../model_email_dns_record_request.go | 26 --- ...ted_domain_with_user_200_response_inner.go | 41 ---- ...domain_with_user_200_response_inner_dns.go | 21 -- ..._with_user_200_response_inner_dns_dkim1.go | 26 --- ..._user_200_response_inner_dns_mail_cname.go | 26 --- ...del_update_authenticated_domain_request.go | 22 --- ...idate_authenticated_domain_200_response.go | 23 --- ..._domain_200_response_validation_results.go | 22 --- ...n_200_response_validation_results_dkim1.go | 21 -- ..._response_validation_results_mail_cname.go | 22 --- ...ain_200_response_validation_results_spf.go | 21 -- ...idate_authenticated_domain_500_response.go | 19 -- ...icated_domain_500_response_errors_inner.go | 20 -- rest/api/v3/email_activity/.openapi-generator | 58 ------ .../email_activity/.openapi-generator-ignore | 23 --- rest/api/v3/email_activity/README.md | 89 --------- .../api/v3/email_activity/api_download_csv.go | 77 -------- rest/api/v3/email_activity/api_get_message.go | 85 -------- .../api/v3/email_activity/api_list_message.go | 86 -------- rest/api/v3/email_activity/api_request_csv.go | 84 -------- rest/api/v3/email_activity/api_service.go | 34 ---- .../api/v3/email_activity/docs/AbbvMessage.md | 18 -- rest/api/v3/email_activity/docs/BounceType.md | 13 -- .../api/v3/email_activity/docs/BounceType1.md | 13 -- .../api/v3/email_activity/docs/DownloadCsv.md | 51 ----- .../docs/DownloadCsv200Response.md | 12 -- .../docs/EmailActivityResponseBaseProps.md | 15 -- rest/api/v3/email_activity/docs/Event.md | 18 -- rest/api/v3/email_activity/docs/EventName.md | 22 --- rest/api/v3/email_activity/docs/EventName1.md | 22 --- rest/api/v3/email_activity/docs/GetMessage.md | 51 ----- .../docs/GetMessage404Response.md | 11 -- .../docs/GetMessage404ResponseErrorsInner.md | 12 -- .../api/v3/email_activity/docs/ListMessage.md | 48 ----- .../docs/ListMessage200Response.md | 11 -- .../docs/ListMessage400Response.md | 11 -- .../docs/ListMessage400ResponseErrorsInner.md | 11 -- .../docs/ListMessage429Response.md | 11 -- .../docs/ListMessage429ResponseErrorsInner.md | 11 -- rest/api/v3/email_activity/docs/Message.md | 25 --- .../v3/email_activity/docs/OutboundIpType.md | 13 -- .../v3/email_activity/docs/OutboundIpType1.md | 13 -- rest/api/v3/email_activity/docs/RequestCsv.md | 48 ----- .../docs/RequestCsv202Response.md | 12 -- rest/api/v3/email_activity/docs/Status.md | 14 -- rest/api/v3/email_activity/docs/Status1.md | 14 -- rest/api/v3/email_activity/docs/Status2.md | 12 -- rest/api/v3/email_activity/docs/Status3.md | 14 -- .../v3/email_activity/model_abbv__message.go | 27 --- .../v3/email_activity/model_bounce_type.go | 23 --- .../v3/email_activity/model_bounce_type1.go | 23 --- .../model_download_csv_200_response.go | 22 --- ...odel_email_activity_response_base_props.go | 28 --- rest/api/v3/email_activity/model_event.go | 34 ---- .../api/v3/email_activity/model_event_name.go | 32 --- .../v3/email_activity/model_event_name1.go | 32 --- .../model_get_message_404_response.go | 19 -- ...l_get_message_404_response_errors_inner.go | 20 -- .../model_list_message_200_response.go | 19 -- .../model_list_message_400_response.go | 19 -- ..._list_message_400_response_errors_inner.go | 19 -- .../model_list_message_429_response.go | 19 -- ..._list_message_429_response_errors_inner.go | 19 -- rest/api/v3/email_activity/model_message.go | 48 ----- .../email_activity/model_outbound_ip_type.go | 23 --- .../email_activity/model_outbound_ip_type1.go | 23 --- .../model_request_csv_202_response.go | 20 -- rest/api/v3/email_activity/model_status.go | 24 --- rest/api/v3/email_activity/model_status1.go | 24 --- rest/api/v3/email_activity/model_status2.go | 22 --- rest/api/v3/email_activity/model_status3.go | 24 --- .../v3/email_validation/.openapi-generator | 54 ----- .../.openapi-generator-ignore | 23 --- rest/api/v3/email_validation/README.md | 94 --------- .../api_get_email_job_for_verification.go | 77 -------- .../api_get_validations_email_jobs.go | 65 ------- .../api_list_email_job_for_verification.go | 81 -------- rest/api/v3/email_validation/api_service.go | 34 ---- .../v3/email_validation/api_validate_email.go | 65 ------- .../v3/email_validation/docs/ErrorResponse.md | 12 -- .../docs/ErrorResponseErrorsInner.md | 13 -- rest/api/v3/email_validation/docs/FileType.md | 13 -- .../docs/GetEmailJobForVerification.md | 51 ----- .../docs/GetValidationsEmailJobs.md | 44 ----- .../GetValidationsEmailJobs200Response.md | 11 -- ...idationsEmailJobs200ResponseResultInner.md | 14 -- ...GetValidationsEmailJobsJobId200Response.md | 11 -- ...idationsEmailJobsJobId200ResponseResult.md | 18 -- ...ilJobsJobId200ResponseResultErrorsInner.md | 11 -- .../docs/ListEmailJobForVerification.md | 48 ----- .../ListEmailJobForVerificationRequest.md | 11 -- .../PutValidationsEmailJobs200Response.md | 13 -- ...sEmailJobs200ResponseUploadHeadersInner.md | 12 -- rest/api/v3/email_validation/docs/Status.md | 17 -- rest/api/v3/email_validation/docs/Status1.md | 17 -- .../v3/email_validation/docs/ValidateEmail.md | 48 ----- .../docs/ValidateEmail200Response.md | 11 -- .../docs/ValidateEmail200ResponseResult.md | 19 -- .../ValidateEmail200ResponseResultChecks.md | 13 -- ...eEmail200ResponseResultChecksAdditional.md | 12 -- ...idateEmail200ResponseResultChecksDomain.md | 13 -- ...teEmail200ResponseResultChecksLocalPart.md | 11 -- .../docs/ValidateEmailRequest.md | 12 -- rest/api/v3/email_validation/docs/Verdict.md | 14 -- .../email_validation/model_error_response.go | 21 -- .../model_error_response_errors_inner.go | 24 --- .../v3/email_validation/model_file_type.go | 23 --- ..._get_validations_email_jobs200_response.go | 20 -- ...ons_email_jobs200_response_result_inner.go | 26 --- ...lidations_email_jobs_job_id200_response.go | 19 -- ...ns_email_jobs_job_id200_response_result.go | 34 ---- ..._job_id200_response_result_errors_inner.go | 20 -- ...list_email_job_for_verification_request.go | 20 -- ..._put_validations_email_jobs200_response.go | 24 --- ...l_jobs200_response_upload_headers_inner.go | 22 --- rest/api/v3/email_validation/model_status.go | 27 --- rest/api/v3/email_validation/model_status1.go | 27 --- .../model_validate_email_200_response.go | 19 -- ...odel_validate_email_200_response_result.go | 35 ---- ...lidate_email_200_response_result_checks.go | 21 -- ...l_200_response_result_checks_additional.go | 22 --- ...email_200_response_result_checks_domain.go | 24 --- ...l_200_response_result_checks_local_part.go | 20 -- .../model_validate_email_request.go | 22 --- rest/api/v3/email_validation/model_verdict.go | 24 --- rest/api/v3/enforced_tls/.openapi-generator | 16 -- .../v3/enforced_tls/.openapi-generator-ignore | 23 --- rest/api/v3/enforced_tls/README.md | 68 ------- .../api_list_enforced_tls_setting.go | 83 -------- rest/api/v3/enforced_tls/api_service.go | 34 ---- .../api_update_enforced_tls_setting.go | 98 ---------- .../docs/EnforcedTlsRequestResponse.md | 13 -- .../api/v3/enforced_tls/docs/ErrorResponse.md | 12 -- .../docs/ErrorResponseErrorsInner.md | 13 -- .../docs/ListEnforcedTlsSetting.md | 48 ----- .../docs/UpdateEnforcedTlsSetting.md | 49 ----- rest/api/v3/enforced_tls/docs/Version.md | 14 -- .../model_enforced_tls_request_response.go | 24 --- .../v3/enforced_tls/model_error_response.go | 21 -- .../model_error_response_errors_inner.go | 24 --- rest/api/v3/enforced_tls/model_version.go | 24 --- rest/api/v3/integrations/.openapi-generator | 76 -------- .../v3/integrations/.openapi-generator-ignore | 23 --- rest/api/v3/integrations/README.md | 94 --------- .../v3/integrations/api_add_integration.go | 89 --------- .../v3/integrations/api_delete_integration.go | 93 --------- .../api_find_integration_by_id.go | 85 -------- .../api_get_integrations_by_user.go | 65 ------- rest/api/v3/integrations/api_service.go | 34 ---- .../v3/integrations/api_update_integration.go | 108 ---------- .../v3/integrations/docs/AddIntegration.md | 47 ----- .../docs/AddIntegration400Response.md | 11 -- .../v3/integrations/docs/DeleteIntegration.md | 47 ----- .../docs/DeleteIntegration400Response.md | 11 -- .../docs/DeleteIntegration404Response.md | 11 -- rest/api/v3/integrations/docs/Destination.md | 12 -- rest/api/v3/integrations/docs/Destination1.md | 12 -- rest/api/v3/integrations/docs/Destination2.md | 12 -- rest/api/v3/integrations/docs/Destination3.md | 12 -- .../v3/integrations/docs/DestinationRegion.md | 13 -- .../integrations/docs/DestinationRegion1.md | 13 -- .../integrations/docs/DestinationRegion2.md | 13 -- .../integrations/docs/FindIntegrationById.md | 51 ----- rest/api/v3/integrations/docs/Forbidden.md | 11 -- .../docs/GetIntegrationsByUser.md | 44 ----- .../docs/GetIntegrationsByUser200Response.md | 11 -- .../docs/GetIntegrationsByUser403Response.md | 11 -- .../docs/GetIntegrationsByUser500Response.md | 11 -- rest/api/v3/integrations/docs/Id.md | 11 -- rest/api/v3/integrations/docs/Integration.md | 16 -- .../integrations/docs/IntegrationFilters.md | 11 -- .../v3/integrations/docs/IntegrationInput.md | 14 -- .../docs/IntegrationInputFilters.md | 11 -- .../docs/IntegrationInputProperties.md | 12 -- .../integrations/docs/IntegrationNotFound.md | 11 -- .../v3/integrations/docs/IntegrationPatch.md | 14 -- .../docs/IntegrationPatchFilters.md | 11 -- .../docs/IntegrationPatchProperties.md | 12 -- .../docs/IntegrationProperties.md | 12 -- .../api/v3/integrations/docs/InternalError.md | 11 -- .../integrations/docs/InvalidDeleteRequest.md | 12 -- .../v3/integrations/docs/InvalidRequest.md | 12 -- rest/api/v3/integrations/docs/Items.md | 23 --- rest/api/v3/integrations/docs/Items1.md | 23 --- rest/api/v3/integrations/docs/Items2.md | 23 --- .../v3/integrations/docs/UpdateIntegration.md | 51 ----- .../model_add_integration_400_response.go | 19 -- .../model_delete_integration_400_response.go | 19 -- .../model_delete_integration_404_response.go | 19 -- rest/api/v3/integrations/model_destination.go | 22 --- .../api/v3/integrations/model_destination1.go | 22 --- .../api/v3/integrations/model_destination2.go | 22 --- .../api/v3/integrations/model_destination3.go | 22 --- .../integrations/model_destination_region.go | 23 --- .../integrations/model_destination_region1.go | 23 --- .../integrations/model_destination_region2.go | 23 --- rest/api/v3/integrations/model_forbidden.go | 20 -- ...l_get_integrations_by_user_200_response.go | 19 -- ...l_get_integrations_by_user_403_response.go | 19 -- ...l_get_integrations_by_user_500_response.go | 19 -- rest/api/v3/integrations/model_id.go | 19 -- rest/api/v3/integrations/model_integration.go | 28 --- .../integrations/model_integration_filters.go | 20 -- .../integrations/model_integration_input.go | 24 --- .../model_integration_input_filters.go | 20 -- .../model_integration_input_properties.go | 22 --- .../model_integration_not_found.go | 20 -- .../integrations/model_integration_patch.go | 24 --- .../model_integration_patch_filters.go | 20 -- .../model_integration_patch_properties.go | 22 --- .../model_integration_properties.go | 22 --- .../v3/integrations/model_internal_error.go | 20 -- .../model_invalid_delete_request.go | 22 --- .../v3/integrations/model_invalid_request.go | 22 --- rest/api/v3/integrations/model_items.go | 33 ---- rest/api/v3/integrations/model_items1.go | 33 ---- rest/api/v3/integrations/model_items2.go | 33 ---- .../ip_access_management/.openapi-generator | 34 ---- .../.openapi-generator-ignore | 23 --- rest/api/v3/ip_access_management/README.md | 79 -------- .../api_add_ip_to_allow_list.go | 98 ---------- .../api_delete_allowed_ip.go | 70 ------- .../api_delete_allowed_ips.go | 98 ---------- .../api_get_allowed_ip.go | 70 ------- .../api_list_access_activity.go | 94 --------- .../api_list_allowed_ip.go | 83 -------- .../v3/ip_access_management/api_service.go | 34 ---- .../docs/AddIpToAllowList.md | 49 ----- .../docs/AddIpToAllowListRequest.md | 11 -- .../docs/AddIpToAllowListRequestIpsInner.md | 11 -- .../docs/DeleteAllowedIp.md | 52 ----- .../docs/DeleteAllowedIps.md | 49 ----- .../docs/DeleteAllowedIpsRequest.md | 11 -- .../docs/ErrorResponse.md | 12 -- .../docs/ErrorResponseErrorsInner.md | 13 -- .../ip_access_management/docs/GetAllowedIp.md | 52 ----- .../docs/IpAccessManagement2xx.md | 11 -- .../docs/IpAccessManagement2xxResultInner.md | 14 -- .../docs/ListAccessActivity.md | 49 ----- .../docs/ListAccessActivity200Response.md | 11 -- ...istAccessActivity200ResponseResultInner.md | 16 -- .../docs/ListAllowedIp.md | 48 ----- .../model_add_ip_to_allow_list_request.go | 20 -- ..._add_ip_to_allow_list_request_ips_inner.go | 20 -- .../model_delete_allowed_ips_request.go | 20 -- .../model_error_response.go | 21 -- .../model_error_response_errors_inner.go | 24 --- .../model_ip_access_management2xx.go | 20 -- ...el_ip_access_management2xx_result_inner.go | 26 --- ...model_list_access_activity_200_response.go | 20 -- ...cess_activity_200_response_result_inner.go | 30 --- .../ip_address_management/.openapi-generator | 124 ------------ .../.openapi-generator-ignore | 23 --- rest/api/v3/ip_address_management/README.md | 118 ----------- .../v3/ip_address_management/api_add_ip.go | 89 --------- .../api_add_ips_to_ip_pool.go | 100 ---------- .../api_add_sub_users_to_ip.go | 100 ---------- .../api_create_ip_pool.go | 89 --------- .../api_delete_ip_pool.go | 77 -------- .../api_delete_ips_from_ip_pool.go | 92 --------- .../api_delete_sub_users_from_ip.go | 92 --------- .../v3/ip_address_management/api_get_ip.go | 85 -------- .../ip_address_management/api_get_ip_pool.go | 85 -------- .../v3/ip_address_management/api_list_ip.go | 184 ------------------ .../api_list_ip_assigned_to_ip_pool.go | 103 ---------- .../ip_address_management/api_list_ip_pool.go | 121 ------------ .../api_list_sub_user_assigned_to_ip.go | 94 --------- .../v3/ip_address_management/api_service.go | 34 ---- .../v3/ip_address_management/api_update_ip.go | 100 ---------- .../api_update_ip_pool.go | 100 ---------- .../v3/ip_address_management/docs/AddIp.md | 48 ----- .../docs/AddIp201Response.md | 15 -- .../docs/AddIpRequest.md | 15 -- .../docs/AddIpsToIpPool.md | 52 ----- .../docs/AddIpsToIpPool200Response.md | 13 -- .../docs/AddIpsToIpPoolRequest.md | 11 -- .../docs/AddSubUsersToIp.md | 52 ----- .../docs/AddSubUsersToIp200Response.md | 12 -- .../docs/AddSubUsersToIpRequest.md | 11 -- .../docs/CreateIpPool.md | 48 ----- .../docs/CreateIpPool201Response.md | 13 -- .../docs/CreateIpPoolRequest.md | 12 -- .../docs/DeleteIpPool.md | 51 ----- .../docs/DeleteIpsFromIpPool.md | 52 ----- .../docs/DeleteIpsFromIpPoolRequest.md | 11 -- .../docs/DeleteSubUsersFromIp.md | 52 ----- .../docs/DeleteSubUsersFromIpRequest.md | 11 -- .../v3/ip_address_management/docs/GetIp.md | 48 ----- .../docs/GetIp200Response.md | 19 -- .../docs/GetIp200ResponsePoolsInner.md | 12 -- .../ip_address_management/docs/GetIpPool.md | 48 ----- .../docs/GetIpPool200Response.md | 15 -- ...etIpPool200ResponseIpCountByRegionInner.md | 12 -- .../docs/IpAddressManagementErrorResponse.md | 11 -- ...dressManagementErrorResponseErrorsInner.md | 12 -- .../v3/ip_address_management/docs/Items.md | 13 -- .../v3/ip_address_management/docs/ListIp.md | 59 ------ .../docs/ListIp200Response.md | 12 -- .../docs/ListIp200ResponseMetadata.md | 11 -- .../ListIp200ResponseMetadataNextParams.md | 22 --- .../docs/ListIp200ResponseResultInner.md | 19 -- .../ListIp200ResponseResultInnerPoolsInner.md | 12 -- .../docs/ListIpAssignedToIpPool.md | 50 ----- .../docs/ListIpAssignedToIpPool200Response.md | 12 -- ...stIpAssignedToIpPool200ResponseMetadata.md | 11 -- ...edToIpPool200ResponseMetadataNextParams.md | 13 -- ...pAssignedToIpPool200ResponseResultInner.md | 13 -- .../ip_address_management/docs/ListIpPool.md | 52 ----- .../docs/ListIpPool200Response.md | 12 -- .../docs/ListIpPool200ResponseMetadata.md | 11 -- ...ListIpPool200ResponseMetadataNextParams.md | 15 -- .../docs/ListIpPool200ResponseResultInner.md | 15 -- .../docs/ListSubUserAssignedToIp.md | 49 ----- .../ListSubUserAssignedToIp200Response.md | 12 -- ...tSubUserAssignedToIp200ResponseMetadata.md | 11 -- ...signedToIp200ResponseMetadataNextParams.md | 12 -- .../v3/ip_address_management/docs/Region.md | 13 -- .../v3/ip_address_management/docs/Region1.md | 14 -- .../v3/ip_address_management/docs/Region2.md | 13 -- .../v3/ip_address_management/docs/Region3.md | 13 -- .../v3/ip_address_management/docs/Region4.md | 14 -- .../v3/ip_address_management/docs/Region5.md | 13 -- .../v3/ip_address_management/docs/Region6.md | 13 -- .../v3/ip_address_management/docs/Region7.md | 14 -- .../v3/ip_address_management/docs/UpdateIp.md | 52 ----- .../docs/UpdateIp200Response.md | 14 -- .../docs/UpdateIpPool.md | 52 ----- .../docs/UpdateIpPool200Response.md | 12 -- .../docs/UpdateIpPoolRequest.md | 11 -- .../docs/UpdateIpRequest.md | 13 -- .../model_add_ip_201_response.go | 28 --- .../model_add_ip_request.go | 28 --- .../model_add_ips_to_ip_pool_200_response.go | 24 --- .../model_add_ips_to_ip_pool_request.go | 20 -- .../model_add_sub_users_to_ip_200_response.go | 22 --- .../model_add_sub_users_to_ip_request.go | 20 -- .../model_create_ip_pool_201_response.go | 24 --- .../model_create_ip_pool_request.go | 22 --- .../model_delete_ips_from_ip_pool_request.go | 20 -- .../model_delete_sub_users_from_ip_request.go | 20 -- .../model_get_ip_200_response.go | 36 ---- .../model_get_ip_200_response_pools_inner.go | 22 --- .../model_get_ip_pool_200_response.go | 28 --- ...l_200_response_ip_count_by_region_inner.go | 22 --- ...el_ip_address_management_error_response.go | 20 -- ..._management_error_response_errors_inner.go | 22 --- .../v3/ip_address_management/model_items.go | 23 --- .../model_list_ip_200_response.go | 20 -- .../model_list_ip_200_response__metadata.go | 19 -- ...t_ip_200_response__metadata_next_params.go | 42 ---- ...model_list_ip_200_response_result_inner.go | 36 ---- ...p_200_response_result_inner_pools_inner.go | 22 --- ...ist_ip_assigned_to_ip_pool_200_response.go | 20 -- ...igned_to_ip_pool_200_response__metadata.go | 19 -- ...pool_200_response__metadata_next_params.go | 24 --- ...ed_to_ip_pool_200_response_result_inner.go | 24 --- .../model_list_ip_pool_200_response.go | 20 -- ...del_list_ip_pool_200_response__metadata.go | 19 -- ...pool_200_response__metadata_next_params.go | 28 --- ..._list_ip_pool_200_response_result_inner.go | 28 --- ...st_sub_user_assigned_to_ip_200_response.go | 21 -- ...r_assigned_to_ip_200_response__metadata.go | 19 -- ...o_ip_200_response__metadata_next_params.go | 22 --- .../v3/ip_address_management/model_region.go | 23 --- .../v3/ip_address_management/model_region1.go | 24 --- .../v3/ip_address_management/model_region2.go | 23 --- .../v3/ip_address_management/model_region3.go | 23 --- .../v3/ip_address_management/model_region4.go | 24 --- .../v3/ip_address_management/model_region5.go | 23 --- .../v3/ip_address_management/model_region6.go | 23 --- .../v3/ip_address_management/model_region7.go | 24 --- .../model_update_ip_200_response.go | 26 --- .../model_update_ip_pool_200_response.go | 22 --- .../model_update_ip_pool_request.go | 20 -- .../model_update_ip_request.go | 24 --- rest/api/v3/ip_warmup/.openapi-generator | 28 --- .../v3/ip_warmup/.openapi-generator-ignore | 23 --- rest/api/v3/ip_warmup/README.md | 76 -------- rest/api/v3/ip_warmup/api_get_warm_up_ip.go | 69 ------- rest/api/v3/ip_warmup/api_list_warm_up_ip.go | 49 ----- rest/api/v3/ip_warmup/api_service.go | 34 ---- rest/api/v3/ip_warmup/api_stop_ip_warm_up.go | 69 ------- rest/api/v3/ip_warmup/api_warm_up_ip.go | 73 ------- rest/api/v3/ip_warmup/docs/GetWarmUpIp.md | 51 ----- .../ip_warmup/docs/GetWarmUpIp404Response.md | 11 -- .../docs/GetWarmUpIp404ResponseErrorsInner.md | 12 -- .../api/v3/ip_warmup/docs/IpWarmup200Inner.md | 12 -- rest/api/v3/ip_warmup/docs/ListWarmUpIp.md | 44 ----- rest/api/v3/ip_warmup/docs/StopIpWarmUp.md | 51 ----- .../ip_warmup/docs/StopIpWarmUp404Response.md | 11 -- .../StopIpWarmUp404ResponseErrorsInner.md | 12 -- rest/api/v3/ip_warmup/docs/WarmUpIp.md | 48 ----- .../v3/ip_warmup/docs/WarmUpIp404Response.md | 11 -- .../docs/WarmUpIp404ResponseErrorsInner.md | 12 -- rest/api/v3/ip_warmup/docs/WarmUpIpRequest.md | 11 -- .../model_get_warm_up_ip_404_response.go | 20 -- ...et_warm_up_ip_404_response_errors_inner.go | 21 -- .../v3/ip_warmup/model_ip_warmup200_inner.go | 22 --- .../model_stop_ip_warm_up_404_response.go | 20 -- ...op_ip_warm_up_404_response_errors_inner.go | 21 -- .../model_warm_up_ip_404_response.go | 20 -- ...el_warm_up_ip_404_response_errors_inner.go | 21 -- .../v3/ip_warmup/model_warm_up_ip_request.go | 20 -- rest/api/v3/ips/.openapi-generator | 78 -------- rest/api/v3/ips/.openapi-generator-ignore | 23 --- rest/api/v3/ips/README.md | 95 --------- rest/api/v3/ips/api_add_ip.go | 73 ------- rest/api/v3/ips/api_add_ip_to_ip_pool.go | 84 -------- rest/api/v3/ips/api_create_ip_pool.go | 65 ------- rest/api/v3/ips/api_delete_ip_from_ip_pool.go | 78 -------- rest/api/v3/ips/api_delete_ip_pool.go | 69 ------- rest/api/v3/ips/api_get_ip.go | 61 ------ rest/api/v3/ips/api_get_ip_pool.go | 69 ------- rest/api/v3/ips/api_list_assigned_ip.go | 49 ----- rest/api/v3/ips/api_list_ip.go | 106 ---------- rest/api/v3/ips/api_list_ip_pool.go | 49 ----- .../api/v3/ips/api_list_remaining_ip_count.go | 49 ----- rest/api/v3/ips/api_service.go | 34 ---- rest/api/v3/ips/api_update_ip_pool.go | 84 -------- rest/api/v3/ips/docs/AddIp.md | 48 ----- rest/api/v3/ips/docs/AddIp201Response.md | 13 -- .../v3/ips/docs/AddIp201ResponseIpsInner.md | 12 -- rest/api/v3/ips/docs/AddIpRequest.md | 13 -- rest/api/v3/ips/docs/AddIpToIpPool.md | 52 ----- .../v3/ips/docs/AddIpToIpPool201Response.md | 14 -- .../v3/ips/docs/AddIpToIpPool404Response.md | 11 -- .../AddIpToIpPool404ResponseErrorsInner.md | 12 -- rest/api/v3/ips/docs/AddIpToIpPoolRequest.md | 11 -- rest/api/v3/ips/docs/CreateIpPool.md | 48 ----- rest/api/v3/ips/docs/CreateIpPoolRequest.md | 11 -- rest/api/v3/ips/docs/DeleteIpFromIpPool.md | 52 ----- .../ips/docs/DeleteIpFromIpPool404Response.md | 11 -- rest/api/v3/ips/docs/DeleteIpPool.md | 51 ----- .../v3/ips/docs/DeleteIpPool404Response.md | 11 -- rest/api/v3/ips/docs/ErrorResponse.md | 12 -- .../v3/ips/docs/ErrorResponseErrorsInner.md | 13 -- rest/api/v3/ips/docs/GetIp.md | 51 ----- rest/api/v3/ips/docs/GetIp200Response.md | 17 -- rest/api/v3/ips/docs/GetIpPool.md | 51 ----- rest/api/v3/ips/docs/GetIpPool200Response.md | 12 -- rest/api/v3/ips/docs/GetIpPool404Response.md | 11 -- .../docs/GetIpPool404ResponseErrorsInner.md | 12 -- rest/api/v3/ips/docs/IpPools200.md | 11 -- rest/api/v3/ips/docs/ListAssignedIp.md | 44 ----- .../docs/ListAssignedIp200ResponseInner.md | 14 -- rest/api/v3/ips/docs/ListIp.md | 53 ----- .../api/v3/ips/docs/ListIp200ResponseInner.md | 18 -- rest/api/v3/ips/docs/ListIpPool.md | 44 ----- rest/api/v3/ips/docs/ListRemainingIpCount.md | 44 ----- .../docs/ListRemainingIpCount200Response.md | 11 -- ...RemainingIpCount200ResponseResultsInner.md | 13 -- rest/api/v3/ips/docs/SortByDirection.md | 13 -- rest/api/v3/ips/docs/UpdateIpPool.md | 52 ----- .../v3/ips/docs/UpdateIpPool404Response.md | 11 -- .../UpdateIpPool404ResponseErrorsInner.md | 12 -- rest/api/v3/ips/docs/UpdateIpPoolRequest.md | 11 -- rest/api/v3/ips/model_add_ip_201_response.go | 24 --- .../model_add_ip_201_response_ips_inner.go | 22 --- rest/api/v3/ips/model_add_ip_request.go | 24 --- .../model_add_ip_to_ip_pool_201_response.go | 26 --- .../model_add_ip_to_ip_pool_404_response.go | 20 -- ...ip_to_ip_pool_404_response_errors_inner.go | 21 -- .../v3/ips/model_add_ip_to_ip_pool_request.go | 20 -- .../v3/ips/model_create_ip_pool_request.go | 20 -- ...del_delete_ip_from_ip_pool_404_response.go | 20 -- .../ips/model_delete_ip_pool_404_response.go | 20 -- rest/api/v3/ips/model_error_response.go | 21 -- .../ips/model_error_response_errors_inner.go | 24 --- rest/api/v3/ips/model_get_ip_200_response.go | 32 --- .../v3/ips/model_get_ip_pool_200_response.go | 22 --- .../v3/ips/model_get_ip_pool_404_response.go | 19 -- ...l_get_ip_pool_404_response_errors_inner.go | 22 --- rest/api/v3/ips/model_ip_pools200.go | 20 -- ...del_list_assigned_ip_200_response_inner.go | 26 --- .../ips/model_list_ip_200_response_inner.go | 34 ---- ...el_list_remaining_ip_count_200_response.go | 19 -- ...ing_ip_count_200_response_results_inner.go | 24 --- rest/api/v3/ips/model_sort_by_direction.go | 23 --- .../ips/model_update_ip_pool_404_response.go | 19 -- ...pdate_ip_pool_404_response_errors_inner.go | 21 -- .../v3/ips/model_update_ip_pool_request.go | 20 -- rest/api/v3/link_branding/.openapi-generator | 76 -------- .../link_branding/.openapi-generator-ignore | 23 --- rest/api/v3/link_branding/README.md | 98 ---------- ...api_associate_branded_link_with_subuser.go | 77 -------- .../link_branding/api_create_branded_link.go | 74 ------- .../link_branding/api_delete_branded_link.go | 71 ------- ..._disassociate_branded_link_from_subuser.go | 60 ------ .../v3/link_branding/api_get_branded_link.go | 71 ------- .../v3/link_branding/api_list_branded_link.go | 70 ------- .../api_list_default_branded_link.go | 69 ------- .../api_list_subuser_branded_link.go | 60 ------ rest/api/v3/link_branding/api_service.go | 34 ---- .../link_branding/api_update_branded_link.go | 86 -------- .../api_validate_branded_link.go | 79 -------- .../docs/AssociateBrandedLinkWithSubuser.md | 52 ----- .../AssociateBrandedLinkWithSubuserRequest.md | 11 -- .../link_branding/docs/CreateBrandedLink.md | 49 ----- .../docs/CreateBrandedLinkRequest.md | 14 -- rest/api/v3/link_branding/docs/Default.md | 13 -- rest/api/v3/link_branding/docs/Default1.md | 13 -- rest/api/v3/link_branding/docs/Default2.md | 13 -- .../link_branding/docs/DeleteBrandedLink.md | 52 ----- .../DisassociateBrandedLinkFromSubuser.md | 47 ----- .../v3/link_branding/docs/GetBrandedLink.md | 52 ----- rest/api/v3/link_branding/docs/Legacy.md | 13 -- .../v3/link_branding/docs/LinkBranding200.md | 19 -- .../link_branding/docs/LinkBranding200Dns.md | 12 -- .../docs/LinkBranding200DnsDomainCname.md | 14 -- .../docs/LinkBranding200DnsOwnerCname.md | 14 -- .../v3/link_branding/docs/ListBrandedLink.md | 49 ----- .../docs/ListDefaultBrandedLink.md | 49 ----- .../docs/ListSubuserBrandedLink.md | 47 ----- rest/api/v3/link_branding/docs/Region.md | 13 -- rest/api/v3/link_branding/docs/Type.md | 14 -- rest/api/v3/link_branding/docs/Type1.md | 14 -- .../link_branding/docs/UpdateBrandedLink.md | 53 ----- .../docs/UpdateBrandedLinkRequest.md | 11 -- rest/api/v3/link_branding/docs/Valid.md | 13 -- rest/api/v3/link_branding/docs/Valid1.md | 13 -- rest/api/v3/link_branding/docs/Valid2.md | 13 -- rest/api/v3/link_branding/docs/Valid3.md | 13 -- rest/api/v3/link_branding/docs/Valid4.md | 13 -- rest/api/v3/link_branding/docs/Valid5.md | 13 -- .../link_branding/docs/ValidateBrandedLink.md | 52 ----- .../docs/ValidateBrandedLink200Response.md | 13 -- ...BrandedLink200ResponseValidationResults.md | 12 -- ...200ResponseValidationResultsDomainCname.md | 12 -- ...k200ResponseValidationResultsOwnerCname.md | 12 -- .../docs/ValidateBrandedLink500Response.md | 11 -- ...lidateBrandedLink500ResponseErrorsInner.md | 11 -- ...ciate_branded_link_with_subuser_request.go | 20 -- .../model_create_branded_link_request.go | 26 --- rest/api/v3/link_branding/model_default.go | 23 --- rest/api/v3/link_branding/model_default1.go | 23 --- rest/api/v3/link_branding/model_default2.go | 23 --- rest/api/v3/link_branding/model_legacy.go | 23 --- .../link_branding/model_link_branding200.go | 35 ---- .../model_link_branding200_dns.go | 20 -- ...model_link_branding200_dns_domain_cname.go | 26 --- .../model_link_branding200_dns_owner_cname.go | 26 --- rest/api/v3/link_branding/model_region.go | 23 --- rest/api/v3/link_branding/model_type.go | 24 --- rest/api/v3/link_branding/model_type1.go | 24 --- .../model_update_branded_link_request.go | 20 -- rest/api/v3/link_branding/model_valid.go | 23 --- rest/api/v3/link_branding/model_valid1.go | 23 --- rest/api/v3/link_branding/model_valid2.go | 23 --- rest/api/v3/link_branding/model_valid3.go | 23 --- rest/api/v3/link_branding/model_valid4.go | 23 --- rest/api/v3/link_branding/model_valid5.go | 23 --- ...odel_validate_branded_link_200_response.go | 23 --- ...ed_link_200_response_validation_results.go | 20 -- ...esponse_validation_results_domain_cname.go | 22 --- ...response_validation_results_owner_cname.go | 22 --- ...odel_validate_branded_link_500_response.go | 20 -- ..._branded_link_500_response_errors_inner.go | 20 -- rest/api/v3/lmc_campaigns/.openapi-generator | 60 ------ .../lmc_campaigns/.openapi-generator-ignore | 23 --- rest/api/v3/lmc_campaigns/README.md | 88 --------- .../v3/lmc_campaigns/api_create_campaign.go | 90 --------- .../v3/lmc_campaigns/api_delete_campaign.go | 79 -------- rest/api/v3/lmc_campaigns/api_get_campaign.go | 87 --------- .../api_get_scheduled_campaign.go | 79 -------- .../api/v3/lmc_campaigns/api_list_campaign.go | 79 -------- .../v3/lmc_campaigns/api_schedule_campaign.go | 118 ----------- .../api/v3/lmc_campaigns/api_send_campaign.go | 103 ---------- .../lmc_campaigns/api_send_test_campaign.go | 102 ---------- rest/api/v3/lmc_campaigns/api_service.go | 34 ---- .../lmc_campaigns/api_un_schedule_campaign.go | 79 -------- .../v3/lmc_campaigns/api_update_campaign.go | 118 ----------- .../api_update_scheduled_campaign.go | 110 ----------- .../api/v3/lmc_campaigns/docs/Campaigns2xx.md | 24 --- .../v3/lmc_campaigns/docs/CreateCampaign.md | 49 ----- .../v3/lmc_campaigns/docs/DeleteCampaign.md | 52 ----- rest/api/v3/lmc_campaigns/docs/Editor.md | 13 -- .../v3/lmc_campaigns/docs/ErrorResponse.md | 12 -- .../docs/ErrorResponseErrorsInner.md | 13 -- rest/api/v3/lmc_campaigns/docs/GetCampaign.md | 52 ----- .../docs/GetCampaign200Response.md | 23 --- .../docs/GetScheduledCampaign.md | 52 ----- .../api/v3/lmc_campaigns/docs/ListCampaign.md | 50 ----- .../docs/ListCampaign200Response.md | 11 -- .../docs/PostCampaignsRequest.md | 22 --- .../docs/ScheduleACampaignRequest.md | 11 -- .../docs/ScheduleACampaignResponse.md | 13 -- .../v3/lmc_campaigns/docs/ScheduleCampaign.md | 53 ----- .../docs/SendACampaignResponse.md | 12 -- .../docs/SendATestCampaignRequest.md | 11 -- .../api/v3/lmc_campaigns/docs/SendCampaign.md | 52 ----- .../v3/lmc_campaigns/docs/SendTestCampaign.md | 53 ----- .../docs/SendTestCampaignRequest.md | 11 -- rest/api/v3/lmc_campaigns/docs/Status.md | 12 -- .../lmc_campaigns/docs/UnScheduleCampaign.md | 52 ----- .../docs/UpdateACampaignRequest.md | 15 -- .../docs/UpdateAScheduledCampaignRequest.md | 11 -- .../docs/UpdateAScheduledCampaignResponse.md | 13 -- .../v3/lmc_campaigns/docs/UpdateCampaign.md | 53 ----- .../docs/UpdateScheduledCampaign.md | 53 ----- .../ViewScheduledTimeOfACampaignResponse.md | 11 -- .../v3/lmc_campaigns/model_campaigns2xx.go | 45 ----- rest/api/v3/lmc_campaigns/model_editor.go | 23 --- .../v3/lmc_campaigns/model_error_response.go | 21 -- .../model_error_response_errors_inner.go | 24 --- .../model_get_campaign_200_response.go | 31 --- .../model_list_campaign_200_response.go | 19 -- .../model_post_campaigns_request.go | 42 ---- .../model_schedule_a_campaign_request.go | 20 -- .../model_schedule_a_campaign_response.go | 24 --- .../model_send_a_campaign_response.go | 20 -- .../model_send_a_test_campaign_request.go | 19 -- .../model_send_test_campaign_request.go | 20 -- rest/api/v3/lmc_campaigns/model_status.go | 22 --- .../model_update_a_campaign_request.go | 28 --- ...del_update_a_scheduled_campaign_request.go | 19 -- ...el_update_a_scheduled_campaign_response.go | 24 --- ...w_scheduled_time_of_a_campaign_response.go | 19 -- rest/api/v3/lmc_contactdb/.openapi-generator | 152 --------------- .../lmc_contactdb/.openapi-generator-ignore | 23 --- rest/api/v3/lmc_contactdb/README.md | 134 ------------- .../api/v3/lmc_contactdb/api_add_recipient.go | 90 --------- .../api_add_recipient_to_contact_db_list.go | 96 --------- .../api_add_recipients_to_contact_db_list.go | 102 ---------- .../api_create_contact_db_list.go | 90 --------- .../lmc_contactdb/api_create_custom_field.go | 82 -------- .../v3/lmc_contactdb/api_create_segment.go | 90 --------- .../api_delete_contact_db_list.go | 111 ----------- .../api_delete_contact_db_lists.go | 82 -------- .../lmc_contactdb/api_delete_custom_field.go | 95 --------- .../v3/lmc_contactdb/api_delete_recipient.go | 94 --------- ...i_delete_recipient_from_contact_db_list.go | 111 ----------- .../v3/lmc_contactdb/api_delete_recipients.go | 90 --------- .../v3/lmc_contactdb/api_delete_segment.go | 111 ----------- rest/api/v3/lmc_contactdb/api_get_billable.go | 67 ------- .../lmc_contactdb/api_get_contact_db_list.go | 95 --------- .../v3/lmc_contactdb/api_get_custom_field.go | 95 --------- .../api/v3/lmc_contactdb/api_get_recipient.go | 94 --------- .../lmc_contactdb/api_get_recipient_list.go | 94 --------- rest/api/v3/lmc_contactdb/api_get_segment.go | 95 --------- .../lmc_contactdb/api_list_contact_db_list.go | 59 ------ .../v3/lmc_contactdb/api_list_custom_field.go | 67 ------- .../v3/lmc_contactdb/api_list_recipient.go | 95 --------- .../lmc_contactdb/api_list_recipient_count.go | 67 ------- .../api_list_recipient_for_segment.go | 114 ----------- ...pi_list_recipients_from_contact_db_list.go | 106 ---------- .../lmc_contactdb/api_list_reserved_field.go | 67 ------- .../api_list_search_recipient.go | 85 -------- rest/api/v3/lmc_contactdb/api_list_segment.go | 67 ------- rest/api/v3/lmc_contactdb/api_list_status.go | 59 ------ .../v3/lmc_contactdb/api_search_recipient.go | 65 ------- rest/api/v3/lmc_contactdb/api_service.go | 34 ---- .../api_update_contact_db_list.go | 102 ---------- .../v3/lmc_contactdb/api_update_recipient.go | 90 --------- .../v3/lmc_contactdb/api_update_segment.go | 102 ---------- .../api/v3/lmc_contactdb/docs/AddRecipient.md | 49 ----- .../docs/AddRecipientRequestInner.md | 14 -- .../docs/AddRecipientToContactDbList.md | 53 ----- .../docs/AddRecipientsToContactDbList.md | 53 ----- rest/api/v3/lmc_contactdb/docs/AndOr.md | 14 -- .../docs/ContactdbCustomField.md | 12 -- .../docs/ContactdbCustomFieldId2xx.md | 13 -- .../docs/ContactdbCustomFieldIdValue.md | 14 -- .../v3/lmc_contactdb/docs/ContactdbList2xx.md | 13 -- .../docs/ContactdbRecipient200.md | 11 -- .../ContactdbRecipient200RecipientsInner.md | 20 -- .../docs/ContactdbRecipientCount200.md | 11 -- .../docs/ContactdbRecipientResponse201.md | 16 -- ...ontactdbRecipientResponse201ErrorsInner.md | 12 -- .../lmc_contactdb/docs/ContactdbSegments.md | 14 -- .../docs/ContactdbSegmentsConditions.md | 14 -- .../docs/ContactdbSegmentsId200.md | 15 -- .../lmc_contactdb/docs/CreateAListRequest.md | 11 -- .../lmc_contactdb/docs/CreateContactDbList.md | 49 ----- .../lmc_contactdb/docs/CreateCustomField.md | 49 ----- .../docs/CreateCustomFieldRequest.md | 12 -- .../v3/lmc_contactdb/docs/CreateSegment.md | 49 ----- .../lmc_contactdb/docs/DeleteContactDbList.md | 54 ----- .../docs/DeleteContactDbLists.md | 49 ----- .../v3/lmc_contactdb/docs/DeleteContacts.md | 13 -- .../lmc_contactdb/docs/DeleteCustomField.md | 52 ----- .../v3/lmc_contactdb/docs/DeleteRecipient.md | 52 ----- .../docs/DeleteRecipientFromContactDbList.md | 54 ----- .../v3/lmc_contactdb/docs/DeleteRecipients.md | 49 ----- .../v3/lmc_contactdb/docs/DeleteSegment.md | 54 ----- .../v3/lmc_contactdb/docs/ErrorResponse.md | 12 -- .../docs/ErrorResponseErrorsInner.md | 13 -- rest/api/v3/lmc_contactdb/docs/GetBillable.md | 48 ----- .../v3/lmc_contactdb/docs/GetContactDbList.md | 52 ----- .../v3/lmc_contactdb/docs/GetCustomField.md | 52 ----- .../api/v3/lmc_contactdb/docs/GetRecipient.md | 52 ----- .../v3/lmc_contactdb/docs/GetRecipientList.md | 52 ----- .../docs/GetRecipientList200Response.md | 11 -- rest/api/v3/lmc_contactdb/docs/GetSegment.md | 52 ----- .../docs/ListAllCustomFieldsResponse.md | 11 -- .../docs/ListAllListsResponse.md | 11 -- .../docs/ListAllSegmentsResponse.md | 11 -- .../lmc_contactdb/docs/ListContactDbList.md | 48 ----- .../v3/lmc_contactdb/docs/ListCustomField.md | 48 ----- .../v3/lmc_contactdb/docs/ListRecipient.md | 50 ----- .../lmc_contactdb/docs/ListRecipientCount.md | 48 ----- .../docs/ListRecipientForSegment.md | 54 ----- .../docs/ListRecipientsFromContactDbList.md | 54 ----- ...tRecipientsFromContactDbList200Response.md | 11 -- .../docs/ListRecipientsOnASegmentResponse.md | 11 -- .../docs/ListRecipientsResponse.md | 11 -- .../lmc_contactdb/docs/ListReservedField.md | 48 ----- .../docs/ListReservedField200Response.md | 11 -- ...rvedField200ResponseReservedFieldsInner.md | 12 -- .../lmc_contactdb/docs/ListSearchRecipient.md | 49 ----- rest/api/v3/lmc_contactdb/docs/ListSegment.md | 48 ----- rest/api/v3/lmc_contactdb/docs/ListStatus.md | 48 ----- .../docs/ListStatus200Response.md | 11 -- .../docs/ListStatus200ResponseStatusInner.md | 12 -- rest/api/v3/lmc_contactdb/docs/Operator.md | 16 -- .../v3/lmc_contactdb/docs/SearchRecipient.md | 48 ----- .../docs/SearchRecipient200Response.md | 12 -- ...archRecipient200ResponseRecipientsInner.md | 19 -- ...esponseRecipientsInnerCustomFieldsInner.md | 14 -- ...seRecipientsInnerCustomFieldsInnerValue.md | 10 - .../docs/SearchRecipientRequest.md | 12 -- rest/api/v3/lmc_contactdb/docs/Type.md | 14 -- .../lmc_contactdb/docs/UpdateAListRequest.md | 11 -- .../lmc_contactdb/docs/UpdateContactDbList.md | 53 ----- .../docs/UpdateContactDbList200Response.md | 13 -- .../v3/lmc_contactdb/docs/UpdateRecipient.md | 49 ----- .../docs/UpdateRecipientRequestInner.md | 13 -- .../v3/lmc_contactdb/docs/UpdateSegment.md | 53 ----- .../docs/UpdateSegmentRequest.md | 13 -- .../model_add_recipient_request_inner.go | 25 --- rest/api/v3/lmc_contactdb/model_and_or.go | 24 --- .../model_contactdb_custom_field.go | 22 --- .../model_contactdb_custom_field_id2xx.go | 24 --- .../model_contactdb_custom_field_id_value.go | 26 --- .../lmc_contactdb/model_contactdb_list2xx.go | 24 --- .../model_contactdb_recipient200.go | 19 -- ...contactdb_recipient200_recipients_inner.go | 38 ---- .../model_contactdb_recipient_count200.go | 20 -- .../model_contactdb_recipient_response201.go | 29 --- ...ctdb_recipient_response201_errors_inner.go | 20 -- .../lmc_contactdb/model_contactdb_segments.go | 26 --- .../model_contactdb_segments_conditions.go | 22 --- .../model_contactdb_segments_id200.go | 28 --- .../model_create_a_list_request.go | 19 -- .../model_create_custom_field_request.go | 20 -- .../v3/lmc_contactdb/model_delete_contacts.go | 23 --- .../v3/lmc_contactdb/model_error_response.go | 21 -- .../model_error_response_errors_inner.go | 24 --- .../model_get_recipient_list_200_response.go | 19 -- .../model_list_all_custom_fields_response.go | 19 -- .../model_list_all_lists_response.go | 19 -- .../model_list_all_segments_response.go | 19 -- ...ients_from_contact_db_list_200_response.go | 19 -- ...l_list_recipients_on_a_segment_response.go | 19 -- .../model_list_recipients_response.go | 19 -- .../model_list_reserved_field_200_response.go | 19 -- ...ield_200_response_reserved_fields_inner.go | 20 -- .../model_list_status_200_response.go | 19 -- ...l_list_status_200_response_status_inner.go | 22 --- rest/api/v3/lmc_contactdb/model_operator.go | 26 --- .../model_search_recipient_200_response.go | 20 -- ...recipient_200_response_recipients_inner.go | 27 --- ...se_recipients_inner_custom_fields_inner.go | 22 --- ...ipients_inner_custom_fields_inner_value.go | 18 -- .../model_search_recipient_request.go | 21 -- rest/api/v3/lmc_contactdb/model_type.go | 24 --- .../model_update_a_list_request.go | 20 -- ...del_update_contact_db_list_200_response.go | 24 --- .../model_update_recipient_request_inner.go | 23 --- .../model_update_segment_request.go | 23 --- rest/api/v3/lmc_senders/.openapi-generator | 32 --- .../v3/lmc_senders/.openapi-generator-ignore | 23 --- rest/api/v3/lmc_senders/README.md | 74 ------- rest/api/v3/lmc_senders/api_create_sender.go | 82 -------- rest/api/v3/lmc_senders/api_delete_sender.go | 87 --------- rest/api/v3/lmc_senders/api_get_sender.go | 79 -------- rest/api/v3/lmc_senders/api_list_sender.go | 59 ------ .../api_reset_sender_verification.go | 87 --------- rest/api/v3/lmc_senders/api_service.go | 34 ---- rest/api/v3/lmc_senders/api_update_sender.go | 110 ----------- rest/api/v3/lmc_senders/docs/CreateSender.md | 49 ----- .../docs/CreateSender400Response.md | 11 -- .../CreateSender400ResponseErrorsInner.md | 12 -- .../lmc_senders/docs/CreateSenderRequest.md | 19 -- rest/api/v3/lmc_senders/docs/DeleteSender.md | 52 ----- rest/api/v3/lmc_senders/docs/GetSender.md | 52 ----- rest/api/v3/lmc_senders/docs/ListSender.md | 48 ----- .../lmc_senders/docs/ListSender200Response.md | 11 -- .../docs/ResetSenderVerification.md | 52 ----- rest/api/v3/lmc_senders/docs/SenderId.md | 24 --- .../v3/lmc_senders/docs/SenderIdRequest.md | 19 -- .../lmc_senders/docs/SenderIdRequestFrom.md | 12 -- .../docs/SenderIdRequestReplyTo.md | 12 -- rest/api/v3/lmc_senders/docs/UpdateSender.md | 53 ----- .../model_create_sender_400_response.go | 19 -- ...create_sender_400_response_errors_inner.go | 20 -- .../model_create_sender_request.go | 34 ---- .../model_list_sender_200_response.go | 19 -- rest/api/v3/lmc_senders/model_sender_id.go | 44 ----- .../v3/lmc_senders/model_sender_id_request.go | 34 ---- .../model_sender_id_request_from.go | 22 --- .../model_sender_id_request_reply_to.go | 22 --- rest/api/v3/mail/.openapi-generator | 58 ------ rest/api/v3/mail/.openapi-generator-ignore | 23 --- rest/api/v3/mail/README.md | 85 -------- rest/api/v3/mail/api_create_mail_batch.go | 107 ---------- rest/api/v3/mail/api_get_mail_batch.go | 99 ---------- rest/api/v3/mail/api_send_mail.go | 122 ------------ rest/api/v3/mail/api_service.go | 34 ---- rest/api/v3/mail/docs/ContentEncoding.md | 12 -- rest/api/v3/mail/docs/CreateMailBatch.md | 48 ----- rest/api/v3/mail/docs/Disposition.md | 13 -- rest/api/v3/mail/docs/ErrorResponse.md | 12 -- .../v3/mail/docs/ErrorResponseErrorsInner.md | 13 -- rest/api/v3/mail/docs/GetMailBatch.md | 48 ----- rest/api/v3/mail/docs/MailBatchResponse.md | 11 -- rest/api/v3/mail/docs/MailFrom.md | 12 -- rest/api/v3/mail/docs/MailTo.md | 12 -- rest/api/v3/mail/docs/SendMail.md | 49 ----- rest/api/v3/mail/docs/SendMailRequest.md | 27 --- rest/api/v3/mail/docs/SendMailRequestAsm.md | 12 -- .../docs/SendMailRequestAttachmentsInner.md | 15 -- .../mail/docs/SendMailRequestContentInner.md | 12 -- .../mail/docs/SendMailRequestMailSettings.md | 16 -- ...questMailSettingsBypassBounceManagement.md | 11 -- ...RequestMailSettingsBypassListManagement.md | 11 -- ...RequestMailSettingsBypassSpamManagement.md | 11 -- ...MailSettingsBypassUnsubscribeManagement.md | 11 -- .../docs/SendMailRequestMailSettingsFooter.md | 13 -- .../SendMailRequestMailSettingsSandboxMode.md | 11 -- .../SendMailRequestPersonalizationsInner.md | 20 -- .../docs/SendMailRequestTrackingSettings.md | 14 -- ...ailRequestTrackingSettingsClickTracking.md | 12 -- ...ndMailRequestTrackingSettingsGanalytics.md | 16 -- ...MailRequestTrackingSettingsOpenTracking.md | 12 -- ...estTrackingSettingsSubscriptionTracking.md | 14 -- rest/api/v3/mail/model_content_encoding.go | 22 --- rest/api/v3/mail/model_disposition.go | 23 --- rest/api/v3/mail/model_error_response.go | 21 -- .../mail/model_error_response_errors_inner.go | 24 --- rest/api/v3/mail/model_mail_batch_response.go | 20 -- rest/api/v3/mail/model_mail_from.go | 22 --- rest/api/v3/mail/model_mail_to.go | 22 --- rest/api/v3/mail/model_send_mail_request.go | 47 ----- .../v3/mail/model_send_mail_request_asm.go | 22 --- ...del_send_mail_request_attachments_inner.go | 28 --- .../model_send_mail_request_content_inner.go | 22 --- .../model_send_mail_request_mail_settings.go | 24 --- ..._mail_settings_bypass_bounce_management.go | 20 -- ...st_mail_settings_bypass_list_management.go | 20 -- ...st_mail_settings_bypass_spam_management.go | 20 -- ..._settings_bypass_unsubscribe_management.go | 20 -- ..._send_mail_request_mail_settings_footer.go | 24 --- ...mail_request_mail_settings_sandbox_mode.go | 20 -- ...end_mail_request_personalizations_inner.go | 37 ---- ...del_send_mail_request_tracking_settings.go | 22 --- ...equest_tracking_settings_click_tracking.go | 22 --- ...il_request_tracking_settings_ganalytics.go | 30 --- ...request_tracking_settings_open_tracking.go | 22 --- ...tracking_settings_subscription_tracking.go | 26 --- rest/api/v3/mail_settings/.openapi-generator | 52 ----- .../mail_settings/.openapi-generator-ignore | 23 --- rest/api/v3/mail_settings/README.md | 86 -------- .../api_list_address_whitelist.go | 59 ------ .../v3/mail_settings/api_list_bounce_purge.go | 59 ------ rest/api/v3/mail_settings/api_list_footer.go | 59 ------ .../mail_settings/api_list_forward_bounce.go | 59 ------ .../v3/mail_settings/api_list_forward_spam.go | 59 ------ .../v3/mail_settings/api_list_mail_setting.go | 79 -------- .../api/v3/mail_settings/api_list_template.go | 59 ------ rest/api/v3/mail_settings/api_service.go | 34 ---- .../api_update_address_whitelist.go | 74 ------- .../mail_settings/api_update_bounce_purge.go | 74 ------- .../api/v3/mail_settings/api_update_footer.go | 74 ------- .../api_update_forward_bounce.go | 74 ------- .../mail_settings/api_update_forward_spam.go | 74 ------- .../v3/mail_settings/api_update_template.go | 74 ------- .../docs/ListAddressWhitelist.md | 48 ----- .../v3/mail_settings/docs/ListBouncePurge.md | 48 ----- rest/api/v3/mail_settings/docs/ListFooter.md | 48 ----- .../mail_settings/docs/ListForwardBounce.md | 48 ----- .../v3/mail_settings/docs/ListForwardSpam.md | 48 ----- .../v3/mail_settings/docs/ListMailSetting.md | 50 ----- .../docs/ListMailSetting200Response.md | 11 -- .../ListMailSetting200ResponseResultInner.md | 14 -- .../api/v3/mail_settings/docs/ListTemplate.md | 48 ----- .../docs/MailSettingsAddressWhitelabel200.md | 12 -- .../docs/MailSettingsBouncePurge.md | 13 -- .../mail_settings/docs/MailSettingsFooter.md | 13 -- .../docs/MailSettingsForwardBounce.md | 12 -- .../docs/MailSettingsForwardSpam.md | 12 -- .../docs/MailSettingsTemplate200.md | 12 -- .../docs/UpdateAddressWhitelist.md | 49 ----- .../docs/UpdateAddressWhitelistRequest.md | 12 -- .../mail_settings/docs/UpdateBouncePurge.md | 49 ----- .../api/v3/mail_settings/docs/UpdateFooter.md | 49 ----- .../mail_settings/docs/UpdateForwardBounce.md | 49 ----- .../mail_settings/docs/UpdateForwardSpam.md | 49 ----- .../v3/mail_settings/docs/UpdateTemplate.md | 49 ----- .../docs/UpdateTemplate200Response.md | 12 -- .../docs/UpdateTemplateRequest.md | 12 -- .../model_list_mail_setting_200_response.go | 20 -- ..._mail_setting_200_response_result_inner.go | 26 --- ...del_mail_settings_address_whitelabel200.go | 22 --- .../model_mail_settings_bounce_purge.go | 24 --- .../model_mail_settings_footer.go | 24 --- .../model_mail_settings_forward_bounce.go | 22 --- .../model_mail_settings_forward_spam.go | 22 --- .../model_mail_settings_template200.go | 22 --- .../model_update_address_whitelist_request.go | 22 --- .../model_update_template_200_response.go | 22 --- .../model_update_template_request.go | 22 --- rest/api/v3/mc_contacts/.openapi-generator | 145 -------------- .../v3/mc_contacts/.openapi-generator-ignore | 23 --- rest/api/v3/mc_contacts/README.md | 131 ------------- rest/api/v3/mc_contacts/api_delete_contact.go | 109 ----------- .../api_delete_contact_identifier.go | 116 ----------- rest/api/v3/mc_contacts/api_export_contact.go | 105 ---------- rest/api/v3/mc_contacts/api_get_contact.go | 85 -------- .../api_get_contact_by_identifiers.go | 117 ----------- .../v3/mc_contacts/api_get_export_contact.go | 101 ---------- .../v3/mc_contacts/api_get_import_contact.go | 101 ---------- rest/api/v3/mc_contacts/api_import_contact.go | 105 ---------- .../mc_contacts/api_list_batched_contact.go | 97 --------- rest/api/v3/mc_contacts/api_list_contact.go | 89 --------- .../mc_contacts/api_list_contact_by_email.go | 105 ---------- .../v3/mc_contacts/api_list_contact_count.go | 81 -------- .../v3/mc_contacts/api_list_export_contact.go | 89 --------- rest/api/v3/mc_contacts/api_search_contact.go | 105 ---------- rest/api/v3/mc_contacts/api_service.go | 34 ---- rest/api/v3/mc_contacts/api_update_contact.go | 105 ---------- .../v3/mc_contacts/docs/ContactDetails3.md | 35 ---- rest/api/v3/mc_contacts/docs/ContactExport.md | 20 -- rest/api/v3/mc_contacts/docs/ContactImport.md | 16 -- .../mc_contacts/docs/ContactImportResults.md | 16 -- .../api/v3/mc_contacts/docs/ContactRequest.md | 24 --- .../docs/ContactRequestCustomFields.md | 11 -- rest/api/v3/mc_contacts/docs/ContactsError.md | 14 -- rest/api/v3/mc_contacts/docs/DeleteContact.md | 49 ----- .../docs/DeleteContact202Response.md | 11 -- .../docs/DeleteContact400Response.md | 11 -- .../docs/DeleteContactIdentifier.md | 52 ----- .../DeleteContactIdentifier202Response.md | 11 -- .../docs/DeleteContactIdentifierRequest.md | 12 -- rest/api/v3/mc_contacts/docs/ErrorResponse.md | 12 -- .../docs/ErrorResponseErrorsInner.md | 13 -- rest/api/v3/mc_contacts/docs/ExportContact.md | 48 ----- .../docs/ExportContact202Response.md | 12 -- .../mc_contacts/docs/ExportContactRequest.md | 15 -- .../docs/ExportContactRequestNotifications.md | 11 -- rest/api/v3/mc_contacts/docs/FileType.md | 13 -- rest/api/v3/mc_contacts/docs/FileType1.md | 12 -- rest/api/v3/mc_contacts/docs/GetContact.md | 51 ----- .../docs/GetContactByIdentifiers.md | 52 ----- .../GetContactByIdentifiers200Response.md | 11 -- ...tactByIdentifiers200ResponseResultValue.md | 12 -- .../docs/GetContactByIdentifiersRequest.md | 11 -- ...actByIdentifiersRequestIdentifiersInner.md | 14 -- .../v3/mc_contacts/docs/GetExportContact.md | 51 ----- .../v3/mc_contacts/docs/GetImportContact.md | 51 ----- .../docs/GetImportContact400Response.md | 11 -- .../api/v3/mc_contacts/docs/IdentifierType.md | 15 -- .../v3/mc_contacts/docs/IdentifierType1.md | 15 -- rest/api/v3/mc_contacts/docs/ImportContact.md | 48 ----- .../docs/ImportContact200Response.md | 13 -- ...ortContact200ResponseUploadHeadersInner.md | 12 -- .../docs/ImportContact400Response.md | 11 -- .../docs/ImportContact404Response.md | 11 -- .../mc_contacts/docs/ImportContactRequest.md | 13 -- .../v3/mc_contacts/docs/ListBatchedContact.md | 48 ----- .../docs/ListBatchedContact200Response.md | 11 -- .../docs/ListBatchedContactRequest.md | 11 -- rest/api/v3/mc_contacts/docs/ListContact.md | 44 ----- .../docs/ListContact200Response.md | 13 -- .../docs/ListContact400Response.md | 11 -- .../v3/mc_contacts/docs/ListContactByEmail.md | 48 ----- .../docs/ListContactByEmail200Response.md | 11 -- .../docs/ListContactByEmailRequest.md | 14 -- .../v3/mc_contacts/docs/ListContactCount.md | 44 ----- .../docs/ListContactCount200Response.md | 13 -- ...ontactCount200ResponseBillableBreakdown.md | 12 -- .../v3/mc_contacts/docs/ListExportContact.md | 44 ----- .../docs/ListExportContact200Response.md | 12 -- .../ListExportContact200ResponseMetadata.md | 13 -- ...ListExportContact200ResponseResultInner.md | 21 -- ...rtContact200ResponseResultInnerMetadata.md | 13 -- ...tact200ResponseResultInnerSegmentsInner.md | 12 -- .../docs/ListExportContact400Response.md | 11 -- ...ListExportContact400ResponseErrorsInner.md | 12 -- rest/api/v3/mc_contacts/docs/Metadata.md | 14 -- rest/api/v3/mc_contacts/docs/SearchContact.md | 48 ----- .../docs/SearchContact200Response.md | 13 -- .../docs/SearchContact400Response.md | 11 -- .../SearchContact400ResponseErrorsInner.md | 12 -- .../docs/SearchContact500Response.md | 11 -- .../SearchContact500ResponseErrorsInner.md | 11 -- .../mc_contacts/docs/SearchContactRequest.md | 11 -- rest/api/v3/mc_contacts/docs/SelfMetadata.md | 11 -- rest/api/v3/mc_contacts/docs/Status.md | 14 -- rest/api/v3/mc_contacts/docs/UpdateContact.md | 48 ----- .../docs/UpdateContact202Response.md | 11 -- .../mc_contacts/docs/UpdateContactRequest.md | 12 -- .../v3/mc_contacts/model_contact_details3.go | 43 ---- .../v3/mc_contacts/model_contact_export.go | 36 ---- .../v3/mc_contacts/model_contact_import.go | 29 --- .../model_contact_import_results.go | 30 --- .../v3/mc_contacts/model_contact_request.go | 45 ----- .../model_contact_request_custom_fields.go | 20 -- .../v3/mc_contacts/model_contacts_error.go | 22 --- .../model_delete_contact_202_response.go | 20 -- .../model_delete_contact_400_response.go | 19 -- ..._delete_contact_identifier_202_response.go | 20 -- ...model_delete_contact_identifier_request.go | 22 --- .../v3/mc_contacts/model_error_response.go | 21 -- .../model_error_response_errors_inner.go | 24 --- .../model_export_contact_202_response.go | 21 -- .../model_export_contact_request.go | 27 --- ...el_export_contact_request_notifications.go | 19 -- rest/api/v3/mc_contacts/model_file_type.go | 23 --- rest/api/v3/mc_contacts/model_file_type1.go | 22 --- ...get_contact_by_identifiers_200_response.go | 19 -- ...y_identifiers_200_response_result_value.go | 20 -- ...odel_get_contact_by_identifiers_request.go | 20 -- ...y_identifiers_request_identifiers_inner.go | 25 --- .../model_get_import_contact_400_response.go | 19 -- .../v3/mc_contacts/model_identifier_type.go | 25 --- .../v3/mc_contacts/model_identifier_type1.go | 25 --- .../model_import_contact_200_response.go | 24 --- ...ntact_200_response_upload_headers_inner.go | 20 -- .../model_import_contact_400_response.go | 19 -- .../model_import_contact_404_response.go | 19 -- .../model_import_contact_request.go | 24 --- ...model_list_batched_contact_200_response.go | 19 -- .../model_list_batched_contact_request.go | 19 -- .../model_list_contact_200_response.go | 21 -- .../model_list_contact_400_response.go | 19 -- ...odel_list_contact_by_email_200_response.go | 19 -- .../model_list_contact_by_email_request.go | 26 --- .../model_list_contact_count_200_response.go | 23 --- ...t_count_200_response_billable_breakdown.go | 22 --- .../model_list_export_contact_200_response.go | 20 -- ...t_export_contact_200_response__metadata.go | 23 --- ...xport_contact_200_response_result_inner.go | 37 ---- ...act_200_response_result_inner__metadata.go | 21 -- ...00_response_result_inner_segments_inner.go | 20 -- .../model_list_export_contact_400_response.go | 19 -- ...xport_contact_400_response_errors_inner.go | 20 -- rest/api/v3/mc_contacts/model_metadata.go | 26 --- .../model_search_contact_200_response.go | 22 --- .../model_search_contact_400_response.go | 19 -- ...earch_contact_400_response_errors_inner.go | 20 -- .../model_search_contact_500_response.go | 19 -- ...earch_contact_500_response_errors_inner.go | 19 -- .../model_search_contact_request.go | 20 -- .../api/v3/mc_contacts/model_self_metadata.go | 20 -- rest/api/v3/mc_contacts/model_status.go | 24 --- .../model_update_contact_202_response.go | 20 -- .../model_update_contact_request.go | 22 --- .../v3/mc_custom_fields/.openapi-generator | 36 ---- .../.openapi-generator-ignore | 23 --- rest/api/v3/mc_custom_fields/README.md | 78 -------- .../api_create_field_definition.go | 73 ------- .../api_delete_field_definition.go | 61 ------ .../api_list_field_definition.go | 49 ----- rest/api/v3/mc_custom_fields/api_service.go | 34 ---- .../api_update_field_definition.go | 92 --------- .../docs/CreateFieldDefinition.md | 48 ----- .../docs/CreateFieldDefinition200Response.md | 14 -- .../docs/CreateFieldDefinition400Response.md | 11 -- .../docs/CreateFieldDefinitionRequest.md | 12 -- .../docs/CustomFieldDefinitionsResponse.md | 13 -- .../docs/CustomFieldsError.md | 14 -- .../docs/DeleteFieldDefinition.md | 51 ----- .../api/v3/mc_custom_fields/docs/FieldType.md | 14 -- .../v3/mc_custom_fields/docs/FieldType1.md | 14 -- .../v3/mc_custom_fields/docs/FieldType2.md | 14 -- .../docs/ListFieldDefinition.md | 44 ----- .../docs/ListFieldDefinition200Response.md | 13 -- rest/api/v3/mc_custom_fields/docs/Metadata.md | 14 -- .../ReservedFieldDefinitionsResponseInner.md | 13 -- .../docs/UpdateFieldDefinition.md | 52 ----- .../docs/UpdateFieldDefinitionRequest.md | 11 -- ...el_create_field_definition_200_response.go | 22 --- ...el_create_field_definition_400_response.go | 19 -- .../model_create_field_definition_request.go | 20 -- ...model_custom_field_definitions_response.go | 21 -- .../model_custom_fields_error.go | 22 --- .../v3/mc_custom_fields/model_field_type.go | 24 --- .../v3/mc_custom_fields/model_field_type1.go | 24 --- .../v3/mc_custom_fields/model_field_type2.go | 24 --- ...odel_list_field_definition_200_response.go | 21 -- .../api/v3/mc_custom_fields/model_metadata.go | 22 --- ...served_field_definitions_response_inner.go | 22 --- .../model_update_field_definition_request.go | 19 -- rest/api/v3/mc_designs/.openapi-generator | 43 ---- .../v3/mc_designs/.openapi-generator-ignore | 23 --- rest/api/v3/mc_designs/README.md | 84 -------- rest/api/v3/mc_designs/api_create_design.go | 72 ------- rest/api/v3/mc_designs/api_delete_design.go | 76 -------- .../api/v3/mc_designs/api_duplicate_design.go | 91 --------- .../api_duplicate_pre_built_design.go | 91 --------- rest/api/v3/mc_designs/api_get_design.go | 76 -------- .../v3/mc_designs/api_get_pre_built_design.go | 76 -------- rest/api/v3/mc_designs/api_list_design.go | 78 -------- .../mc_designs/api_list_pre_built_design.go | 78 -------- rest/api/v3/mc_designs/api_service.go | 34 ---- rest/api/v3/mc_designs/api_update_design.go | 91 --------- rest/api/v3/mc_designs/docs/ApiError.md | 13 -- rest/api/v3/mc_designs/docs/ApiErrors.md | 11 -- rest/api/v3/mc_designs/docs/CreateDesign.md | 48 ----- rest/api/v3/mc_designs/docs/DeleteDesign.md | 51 ----- .../mc_designs/docs/DesignCommonProperties.md | 15 -- .../mc_designs/docs/DesignDuplicateInput.md | 12 -- rest/api/v3/mc_designs/docs/DesignInput.md | 14 -- rest/api/v3/mc_designs/docs/DesignOutput.md | 14 -- .../v3/mc_designs/docs/DesignOutputSummary.md | 16 -- .../api/v3/mc_designs/docs/DuplicateDesign.md | 52 ----- .../docs/DuplicatePreBuiltDesign.md | 52 ----- rest/api/v3/mc_designs/docs/Editor.md | 13 -- rest/api/v3/mc_designs/docs/GetDesign.md | 51 ----- .../v3/mc_designs/docs/GetPreBuiltDesign.md | 51 ----- rest/api/v3/mc_designs/docs/ListDesign.md | 50 ----- .../mc_designs/docs/ListDesign200Response.md | 12 -- .../v3/mc_designs/docs/ListPreBuiltDesign.md | 50 ----- rest/api/v3/mc_designs/docs/Metadata.md | 14 -- rest/api/v3/mc_designs/docs/UpdateDesign.md | 52 ----- .../v3/mc_designs/docs/UpdateDesignRequest.md | 16 -- rest/api/v3/mc_designs/model_api_error.go | 21 -- rest/api/v3/mc_designs/model_api_errors.go | 19 -- .../model_design_common_properties.go | 28 --- .../model_design_duplicate_input.go | 22 --- rest/api/v3/mc_designs/model_design_input.go | 26 --- rest/api/v3/mc_designs/model_design_output.go | 26 --- .../mc_designs/model_design_output_summary.go | 30 --- rest/api/v3/mc_designs/model_editor.go | 23 --- .../model_list_design_200_response.go | 20 -- rest/api/v3/mc_designs/model_metadata.go | 22 --- .../mc_designs/model_update_design_request.go | 30 --- rest/api/v3/mc_lists/.openapi-generator | 46 ----- .../api/v3/mc_lists/.openapi-generator-ignore | 23 --- rest/api/v3/mc_lists/README.md | 81 -------- .../v3/mc_lists/api_create_marketing_list.go | 73 ------- rest/api/v3/mc_lists/api_delete_contact.go | 79 -------- .../v3/mc_lists/api_delete_marketing_list.go | 89 --------- .../api/v3/mc_lists/api_get_marketing_list.go | 80 -------- .../api/v3/mc_lists/api_list_contact_count.go | 69 ------- .../v3/mc_lists/api_list_marketing_list.go | 70 ------- rest/api/v3/mc_lists/api_service.go | 34 ---- .../v3/mc_lists/api_update_marketing_list.go | 92 --------- rest/api/v3/mc_lists/docs/ContactDetails.md | 35 ---- .../v3/mc_lists/docs/CreateMarketingList.md | 48 ----- .../docs/CreateMarketingList400Response.md | 11 -- .../docs/CreateMarketingListRequest.md | 11 -- rest/api/v3/mc_lists/docs/DeleteContact.md | 51 ----- .../mc_lists/docs/DeleteContact202Response.md | 11 -- .../v3/mc_lists/docs/DeleteMarketingList.md | 52 ----- .../docs/DeleteMarketingList200Response.md | 11 -- .../docs/DeleteMarketingList404Response.md | 11 -- rest/api/v3/mc_lists/docs/Error.md | 14 -- rest/api/v3/mc_lists/docs/GetMarketingList.md | 52 ----- .../docs/GetMarketingList200Response.md | 15 -- rest/api/v3/mc_lists/docs/List.md | 14 -- rest/api/v3/mc_lists/docs/ListContactCount.md | 51 ----- .../docs/ListContactCount200Response.md | 12 -- .../api/v3/mc_lists/docs/ListMarketingList.md | 49 ----- .../docs/ListMarketingList200Response.md | 12 -- rest/api/v3/mc_lists/docs/Metadata.md | 14 -- rest/api/v3/mc_lists/docs/SelfMetadata.md | 11 -- .../v3/mc_lists/docs/UpdateMarketingList.md | 52 ----- .../docs/UpdateMarketingListRequest.md | 11 -- rest/api/v3/mc_lists/model_contact_details.go | 47 ----- ...odel_create_marketing_list_400_response.go | 19 -- .../model_create_marketing_list_request.go | 20 -- .../model_delete_contact_202_response.go | 20 -- ...odel_delete_marketing_list_200_response.go | 20 -- ...odel_delete_marketing_list_404_response.go | 19 -- rest/api/v3/mc_lists/model_error.go | 22 --- .../model_get_marketing_list_200_response.go | 26 --- rest/api/v3/mc_lists/model_list.go | 25 --- .../model_list_contact_count_200_response.go | 20 -- .../model_list_marketing_list_200_response.go | 20 -- rest/api/v3/mc_lists/model_metadata.go | 26 --- rest/api/v3/mc_lists/model_self_metadata.go | 20 -- .../model_update_marketing_list_request.go | 20 -- rest/api/v3/mc_segments/.openapi-generator | 34 ---- .../v3/mc_segments/.openapi-generator-ignore | 23 --- rest/api/v3/mc_segments/README.md | 75 ------- rest/api/v3/mc_segments/api_delete_segment.go | 101 ---------- rest/api/v3/mc_segments/api_get_segment.go | 104 ---------- rest/api/v3/mc_segments/api_list_segment.go | 120 ------------ rest/api/v3/mc_segments/api_service.go | 34 ---- .../v3/mc_segments/docs/ContactResponse.md | 27 --- .../docs/ContactResponseCustomFields.md | 12 -- rest/api/v3/mc_segments/docs/DeleteSegment.md | 51 ----- rest/api/v3/mc_segments/docs/ErrorResponse.md | 12 -- .../docs/ErrorResponseErrorsInner.md | 13 -- rest/api/v3/mc_segments/docs/FullSegment.md | 22 --- rest/api/v3/mc_segments/docs/GetSegment.md | 52 ----- .../mc_segments/docs/GetSegment404Response.md | 11 -- .../docs/GetSegment404ResponseErrorsInner.md | 12 -- rest/api/v3/mc_segments/docs/ListSegment.md | 50 ----- .../docs/ListSegment200Response.md | 11 -- .../docs/ListSegment500Response.md | 11 -- .../docs/ListSegment500ResponseErrorsInner.md | 11 -- .../api/v3/mc_segments/docs/SegmentSummary.md | 18 -- .../api/v3/mc_segments/docs/SegmentWriteV2.md | 13 -- .../v3/mc_segments/model_contact_response.go | 51 ----- .../model_contact_response_custom_fields.go | 20 -- .../v3/mc_segments/model_error_response.go | 21 -- .../model_error_response_errors_inner.go | 24 --- rest/api/v3/mc_segments/model_full_segment.go | 43 ---- .../model_get_segment_404_response.go | 19 -- ...l_get_segment_404_response_errors_inner.go | 20 -- .../model_list_segment_200_response.go | 19 -- .../model_list_segment_500_response.go | 19 -- ..._list_segment_500_response_errors_inner.go | 19 -- .../v3/mc_segments/model_segment_summary.go | 35 ---- .../v3/mc_segments/model_segment_write_v2.go | 24 --- rest/api/v3/mc_segments_2/.openapi-generator | 42 ---- .../mc_segments_2/.openapi-generator-ignore | 23 --- rest/api/v3/mc_segments_2/README.md | 87 --------- .../v3/mc_segments_2/api_create_segment.go | 81 -------- .../v3/mc_segments_2/api_delete_segment.go | 69 ------- rest/api/v3/mc_segments_2/api_get_segment.go | 88 --------- rest/api/v3/mc_segments_2/api_list_segment.go | 104 ---------- .../v3/mc_segments_2/api_refresh_segment.go | 92 --------- rest/api/v3/mc_segments_2/api_service.go | 34 ---- .../v3/mc_segments_2/api_update_segment.go | 92 --------- .../v3/mc_segments_2/docs/AllSegments200.md | 21 -- .../v3/mc_segments_2/docs/ContactResponse.md | 27 --- .../docs/ContactResponseCustomFields.md | 12 -- .../v3/mc_segments_2/docs/CreateSegment.md | 48 ----- .../v3/mc_segments_2/docs/DeleteSegment.md | 51 ----- .../v3/mc_segments_2/docs/ErrorsSegmentV2.md | 11 -- .../docs/ErrorsSegmentV2ErrorsInner.md | 12 -- rest/api/v3/mc_segments_2/docs/GetSegment.md | 52 ----- rest/api/v3/mc_segments_2/docs/ListSegment.md | 50 ----- rest/api/v3/mc_segments_2/docs/Metadata.md | 14 -- .../v3/mc_segments_2/docs/RefreshSegment.md | 51 ----- rest/api/v3/mc_segments_2/docs/Segment2xx.md | 25 --- .../api/v3/mc_segments_2/docs/SegmentError.md | 11 -- .../mc_segments_2/docs/SegmentRefresh202.md | 11 -- .../docs/SegmentRefreshRequest.md | 11 -- .../docs/SegmentStatusResponse.md | 12 -- .../v3/mc_segments_2/docs/SegmentUpdate.md | 12 -- .../v3/mc_segments_2/docs/SegmentWriteV2.md | 13 -- .../v3/mc_segments_2/docs/UpdateSegment.md | 52 ----- .../v3/mc_segments_2/model_all_segments200.go | 38 ---- .../mc_segments_2/model_contact_response.go | 51 ----- .../model_contact_response_custom_fields.go | 20 -- .../mc_segments_2/model_errors_segment_v2.go | 19 -- .../model_errors_segment_v2_errors_inner.go | 22 --- rest/api/v3/mc_segments_2/model_metadata.go | 22 --- rest/api/v3/mc_segments_2/model_segment2xx.go | 47 ----- .../v3/mc_segments_2/model_segment_error.go | 20 -- .../mc_segments_2/model_segment_refresh202.go | 20 -- .../model_segment_refresh_request.go | 20 -- .../model_segment_status_response.go | 22 --- .../v3/mc_segments_2/model_segment_update.go | 22 --- .../mc_segments_2/model_segment_write_v2.go | 24 --- rest/api/v3/mc_senders/.openapi-generator | 36 ---- .../v3/mc_senders/.openapi-generator-ignore | 23 --- rest/api/v3/mc_senders/README.md | 74 ------- rest/api/v3/mc_senders/api_create_sender.go | 98 ---------- rest/api/v3/mc_senders/api_delete_sender.go | 79 -------- rest/api/v3/mc_senders/api_get_sender.go | 79 -------- rest/api/v3/mc_senders/api_list_sender.go | 67 ------- .../api_reset_sender_verification.go | 79 -------- rest/api/v3/mc_senders/api_service.go | 34 ---- rest/api/v3/mc_senders/api_update_sender.go | 110 ----------- rest/api/v3/mc_senders/docs/CreateSender.md | 49 ----- .../v3/mc_senders/docs/CreateSenderRequest.md | 19 -- .../docs/CreateSenderRequestFrom.md | 12 -- .../docs/CreateSenderRequestReplyTo.md | 12 -- rest/api/v3/mc_senders/docs/DeleteSender.md | 52 ----- rest/api/v3/mc_senders/docs/ErrorResponse.md | 12 -- .../docs/ErrorResponseErrorsInner.md | 13 -- rest/api/v3/mc_senders/docs/GetSender.md | 52 ----- rest/api/v3/mc_senders/docs/ListSender.md | 48 ----- .../mc_senders/docs/ListSender200Response.md | 11 -- .../docs/ResetSenderVerification.md | 52 ----- rest/api/v3/mc_senders/docs/Sender.md | 24 --- rest/api/v3/mc_senders/docs/SenderRequest.md | 19 -- .../v3/mc_senders/docs/SenderRequestFrom.md | 12 -- .../mc_senders/docs/SenderRequestReplyTo.md | 12 -- rest/api/v3/mc_senders/docs/UpdateSender.md | 53 ----- .../mc_senders/model_create_sender_request.go | 34 ---- .../model_create_sender_request_from.go | 22 --- .../model_create_sender_request_reply_to.go | 22 --- .../api/v3/mc_senders/model_error_response.go | 21 -- .../model_error_response_errors_inner.go | 24 --- .../model_list_sender_200_response.go | 20 -- rest/api/v3/mc_senders/model_sender.go | 44 ----- .../api/v3/mc_senders/model_sender_request.go | 34 ---- .../mc_senders/model_sender_request_from.go | 22 --- .../model_sender_request_reply_to.go | 22 --- rest/api/v3/mc_singlesends/.openapi-generator | 82 -------- .../mc_singlesends/.openapi-generator-ignore | 23 --- rest/api/v3/mc_singlesends/README.md | 103 ---------- .../mc_singlesends/api_create_single_send.go | 81 -------- .../api_delete_scheduled_single_send.go | 77 -------- .../mc_singlesends/api_delete_single_send.go | 69 ------- .../mc_singlesends/api_delete_single_sends.go | 77 -------- .../api_duplicate_single_send.go | 92 --------- .../v3/mc_singlesends/api_get_single_send.go | 77 -------- .../v3/mc_singlesends/api_list_category.go | 57 ------ .../v3/mc_singlesends/api_list_single_send.go | 78 -------- .../api_schedule_single_send.go | 92 --------- .../mc_singlesends/api_search_single_send.go | 92 --------- rest/api/v3/mc_singlesends/api_service.go | 34 ---- .../mc_singlesends/api_update_single_send.go | 100 ---------- .../v3/mc_singlesends/docs/AbTestSummary.md | 17 -- .../mc_singlesends/docs/CreateSingleSend.md | 48 ----- .../docs/DeleteScheduledSingleSend.md | 51 ----- .../mc_singlesends/docs/DeleteSingleSend.md | 51 ----- .../mc_singlesends/docs/DeleteSingleSends.md | 48 ----- .../docs/DuplicateSingleSend.md | 52 ----- .../docs/DuplicateSingleSendRequest.md | 11 -- rest/api/v3/mc_singlesends/docs/Editor.md | 13 -- rest/api/v3/mc_singlesends/docs/Editor1.md | 13 -- .../v3/mc_singlesends/docs/GetSingleSend.md | 51 ----- rest/api/v3/mc_singlesends/docs/Items.md | 14 -- .../v3/mc_singlesends/docs/ListCategory.md | 44 ----- .../docs/ListCategory200Response.md | 11 -- .../v3/mc_singlesends/docs/ListSingleSend.md | 49 ----- .../docs/ListSingleSend200Response.md | 12 -- .../docs/ListSingleSend500Response.md | 11 -- .../ListSingleSend500ResponseErrorsInner.md | 13 -- rest/api/v3/mc_singlesends/docs/Metadata.md | 14 -- .../mc_singlesends/docs/ScheduleSingleSend.md | 52 ----- .../docs/ScheduleSingleSend201Response.md | 12 -- .../docs/ScheduleSingleSendRequest.md | 11 -- .../mc_singlesends/docs/SearchSingleSend.md | 50 ----- .../mc_singlesends/docs/SinglesendRequest.md | 15 -- .../docs/SinglesendRequestEmailConfig.md | 20 -- .../docs/SinglesendRequestSendTo.md | 13 -- .../mc_singlesends/docs/SinglesendResponse.md | 20 -- .../docs/SinglesendResponseEmailConfig.md | 20 -- .../docs/SinglesendResponseSendTo.md | 13 -- .../docs/SinglesendResponseShort.md | 19 -- .../docs/SinglesendResponseWarningsInner.md | 13 -- .../mc_singlesends/docs/SinglesendSchedule.md | 12 -- .../mc_singlesends/docs/SinglesendSearch.md | 13 -- rest/api/v3/mc_singlesends/docs/Status.md | 12 -- rest/api/v3/mc_singlesends/docs/Status1.md | 14 -- rest/api/v3/mc_singlesends/docs/Status2.md | 14 -- rest/api/v3/mc_singlesends/docs/Status3.md | 14 -- rest/api/v3/mc_singlesends/docs/Type.md | 13 -- .../mc_singlesends/docs/UpdateSingleSend.md | 52 ----- .../v3/mc_singlesends/docs/WinnerCriteria.md | 14 -- .../mc_singlesends/model_ab_test_summary.go | 32 --- .../model_duplicate_single_send_request.go | 20 -- rest/api/v3/mc_singlesends/model_editor.go | 23 --- rest/api/v3/mc_singlesends/model_editor1.go | 23 --- rest/api/v3/mc_singlesends/model_items.go | 24 --- .../model_list_category_200_response.go | 20 -- .../model_list_single_send_200_response.go | 20 -- .../model_list_single_send_500_response.go | 19 -- ...t_single_send_500_response_errors_inner.go | 21 -- rest/api/v3/mc_singlesends/model_metadata.go | 22 --- ...model_schedule_single_send_201_response.go | 25 --- .../model_schedule_single_send_request.go | 24 --- .../model_singlesend_request.go | 30 --- .../model_singlesend_request_email_config.go | 38 ---- .../model_singlesend_request_send_to.go | 24 --- .../model_singlesend_response.go | 39 ---- .../model_singlesend_response_email_config.go | 38 ---- .../model_singlesend_response_send_to.go | 24 --- .../model_singlesend_response_short.go | 38 ---- ...odel_singlesend_response_warnings_inner.go | 21 -- .../model_singlesend_schedule.go | 25 --- .../mc_singlesends/model_singlesend_search.go | 24 --- rest/api/v3/mc_singlesends/model_status.go | 22 --- rest/api/v3/mc_singlesends/model_status1.go | 24 --- rest/api/v3/mc_singlesends/model_status2.go | 24 --- rest/api/v3/mc_singlesends/model_status3.go | 24 --- rest/api/v3/mc_singlesends/model_type.go | 23 --- .../mc_singlesends/model_winner_criteria.go | 24 --- rest/api/v3/mc_stats/.openapi-generator | 60 ------ .../api/v3/mc_stats/.openapi-generator-ignore | 23 --- rest/api/v3/mc_stats/README.md | 88 --------- .../v3/mc_stats/api_export_automation_stat.go | 79 -------- .../mc_stats/api_export_single_send_stat.go | 79 -------- .../v3/mc_stats/api_get_automation_stat.go | 161 --------------- .../v3/mc_stats/api_get_single_send_stat.go | 143 -------------- .../v3/mc_stats/api_list_automation_stat.go | 96 --------- .../mc_stats/api_list_click_tracking_stat.go | 133 ------------- .../v3/mc_stats/api_list_single_send_stat.go | 96 --------- .../api_list_single_send_tracking_stat.go | 133 ------------- rest/api/v3/mc_stats/api_service.go | 34 ---- rest/api/v3/mc_stats/docs/AbPhase.md | 14 -- rest/api/v3/mc_stats/docs/AbPhase1.md | 14 -- rest/api/v3/mc_stats/docs/AbPhaseId.md | 13 -- rest/api/v3/mc_stats/docs/AggregatedBy.md | 13 -- .../docs/AutmoationsLinkStatsResponse.md | 13 -- ...utmoationsLinkStatsResponseResultsInner.md | 14 -- .../v3/mc_stats/docs/AutomationsResponse.md | 12 -- .../docs/AutomationsResponseResultsInner.md | 14 -- rest/api/v3/mc_stats/docs/ErrorResponse.md | 12 -- .../mc_stats/docs/ErrorResponseErrorsInner.md | 13 -- .../v3/mc_stats/docs/ExportAutomationStat.md | 49 ----- .../v3/mc_stats/docs/ExportSingleSendStat.md | 49 ----- .../api/v3/mc_stats/docs/GetAutomationStat.md | 59 ------ .../api/v3/mc_stats/docs/GetSingleSendStat.md | 58 ------ rest/api/v3/mc_stats/docs/Items.md | 12 -- rest/api/v3/mc_stats/docs/Items1.md | 13 -- rest/api/v3/mc_stats/docs/Items2.md | 13 -- .../v3/mc_stats/docs/LinkTrackingMetadata.md | 14 -- .../v3/mc_stats/docs/ListAutomationStat.md | 50 ----- .../v3/mc_stats/docs/ListClickTrackingStat.md | 55 ------ .../v3/mc_stats/docs/ListSingleSendStat.md | 50 ----- .../docs/ListSingleSendTrackingStat.md | 56 ------ rest/api/v3/mc_stats/docs/Metadata.md | 14 -- rest/api/v3/mc_stats/docs/Metrics.md | 22 --- .../docs/SinglesendsLinkStatsResponse.md | 13 -- ...inglesendsLinkStatsResponseResultsInner.md | 15 -- .../v3/mc_stats/docs/SinglesendsResponse.md | 12 -- .../docs/SinglesendsResponseResultsInner.md | 15 -- rest/api/v3/mc_stats/model_ab_phase.go | 24 --- rest/api/v3/mc_stats/model_ab_phase1.go | 24 --- rest/api/v3/mc_stats/model_ab_phase_id.go | 23 --- rest/api/v3/mc_stats/model_aggregated_by.go | 23 --- .../model_autmoations_link_stats_response.go | 22 --- ...tions_link_stats_response_results_inner.go | 26 --- .../v3/mc_stats/model_automations_response.go | 20 -- ...odel_automations_response_results_inner.go | 25 --- rest/api/v3/mc_stats/model_error_response.go | 21 -- .../model_error_response_errors_inner.go | 24 --- rest/api/v3/mc_stats/model_items.go | 22 --- rest/api/v3/mc_stats/model_items1.go | 23 --- rest/api/v3/mc_stats/model_items2.go | 23 --- .../mc_stats/model_link_tracking_metadata.go | 26 --- rest/api/v3/mc_stats/model_metadata.go | 26 --- rest/api/v3/mc_stats/model_metrics.go | 30 --- .../model_singlesends_link_stats_response.go | 22 --- ...sends_link_stats_response_results_inner.go | 28 --- .../v3/mc_stats/model_singlesends_response.go | 20 -- ...odel_singlesends_response_results_inner.go | 27 --- rest/api/v3/mc_test/.openapi-generator | 12 -- rest/api/v3/mc_test/.openapi-generator-ignore | 23 --- rest/api/v3/mc_test/README.md | 62 ------ .../mc_test/api_send_test_marketing_email.go | 73 ------- rest/api/v3/mc_test/api_service.go | 34 ---- rest/api/v3/mc_test/docs/ErrorResponse.md | 12 -- .../mc_test/docs/ErrorResponseErrorsInner.md | 13 -- .../v3/mc_test/docs/SendTestMarketingEmail.md | 48 ----- .../docs/SendTestMarketingEmailRequest.md | 17 -- rest/api/v3/mc_test/model_error_response.go | 21 -- .../model_error_response_errors_inner.go | 24 --- ...model_send_test_marketing_email_request.go | 31 --- rest/api/v3/partner/.openapi-generator | 10 - rest/api/v3/partner/.openapi-generator-ignore | 23 --- rest/api/v3/partner/README.md | 61 ------ .../v3/partner/api_list_partner_setting.go | 79 -------- rest/api/v3/partner/api_service.go | 34 ---- .../api/v3/partner/docs/ListPartnerSetting.md | 50 ----- .../docs/ListPartnerSetting200Response.md | 11 -- ...istPartnerSetting200ResponseResultInner.md | 14 -- ...model_list_partner_setting_200_response.go | 19 -- ...rtner_setting_200_response_result_inner.go | 26 --- .../.openapi-generator | 12 -- .../.openapi-generator-ignore | 23 --- rest/api/v3/recipients_data_erasure/README.md | 62 ------ .../api_erase_recipient_email_data.go | 74 ------- .../v3/recipients_data_erasure/api_service.go | 34 ---- .../docs/EraseRecipientEmailData.md | 48 ----- ...pientsDataErasureEraseRecipientsRequest.md | 11 -- .../docs/RecipientsDataErasureErrorV1.md | 12 -- .../docs/RecipientsDataErasureJobId.md | 11 -- ...s_data_erasure_erase_recipients_request.go | 20 -- .../model_recipients_data_erasure_error_v1.go | 22 --- .../model_recipients_data_erasure_job_id.go | 20 -- rest/api/v3/reverse_dns/.openapi-generator | 40 ---- .../v3/reverse_dns/.openapi-generator-ignore | 23 --- rest/api/v3/reverse_dns/README.md | 84 -------- .../v3/reverse_dns/api_delete_reverse_dns.go | 70 ------- .../api/v3/reverse_dns/api_get_reverse_dns.go | 70 ------- .../v3/reverse_dns/api_list_reverse_dns.go | 88 --------- rest/api/v3/reverse_dns/api_service.go | 34 ---- .../v3/reverse_dns/api_set_up_reverse_dns.go | 74 ------- .../reverse_dns/api_validate_reverse_dns.go | 86 -------- .../v3/reverse_dns/docs/DeleteReverseDns.md | 52 ----- rest/api/v3/reverse_dns/docs/GetReverseDns.md | 52 ----- .../api/v3/reverse_dns/docs/ListReverseDns.md | 51 ----- rest/api/v3/reverse_dns/docs/ReverseDns.md | 20 -- .../v3/reverse_dns/docs/ReverseDnsARecord.md | 14 -- .../reverse_dns/docs/ReverseDnsUsersInner.md | 12 -- .../v3/reverse_dns/docs/SetUpReverseDns.md | 49 ----- .../docs/SetUpReverseDnsRequest.md | 13 -- rest/api/v3/reverse_dns/docs/Valid.md | 13 -- rest/api/v3/reverse_dns/docs/Valid1.md | 13 -- .../v3/reverse_dns/docs/ValidateReverseDns.md | 52 ----- .../docs/ValidateReverseDns200Response.md | 13 -- ...eReverseDns200ResponseValidationResults.md | 11 -- ...eDns200ResponseValidationResultsARecord.md | 12 -- .../docs/ValidateReverseDns404Response.md | 11 -- ...alidateReverseDns404ResponseErrorsInner.md | 11 -- .../docs/ValidateReverseDns500Response.md | 11 -- ...alidateReverseDns500ResponseErrorsInner.md | 11 -- rest/api/v3/reverse_dns/model_reverse_dns.go | 37 ---- .../reverse_dns/model_reverse_dns_a_record.go | 26 --- .../model_reverse_dns_users_inner.go | 22 --- .../model_set_up_reverse_dns_request.go | 24 --- rest/api/v3/reverse_dns/model_valid.go | 23 --- rest/api/v3/reverse_dns/model_valid1.go | 23 --- ...model_validate_reverse_dns_200_response.go | 23 --- ...rse_dns_200_response_validation_results.go | 19 -- ...00_response_validation_results_a_record.go | 22 --- ...model_validate_reverse_dns_404_response.go | 20 -- ...e_reverse_dns_404_response_errors_inner.go | 20 -- ...model_validate_reverse_dns_500_response.go | 20 -- ...e_reverse_dns_500_response_errors_inner.go | 20 -- .../api/v3/scheduled_sends/.openapi-generator | 32 --- .../scheduled_sends/.openapi-generator-ignore | 23 --- rest/api/v3/scheduled_sends/README.md | 82 -------- .../api_create_scheduled_send.go | 106 ---------- .../api_delete_scheduled_send.go | 94 --------- .../scheduled_sends/api_get_scheduled_send.go | 102 ---------- .../api_list_scheduled_send.go | 91 --------- rest/api/v3/scheduled_sends/api_service.go | 34 ---- .../api_update_scheduled_send.go | 109 ----------- .../CancelOrPauseAScheduledSendRequest.md | 12 -- .../docs/CreateScheduledSend.md | 49 ----- .../docs/DeleteScheduledSend.md | 52 ----- .../v3/scheduled_sends/docs/ErrorResponse.md | 12 -- .../docs/ErrorResponseErrorsInner.md | 13 -- .../scheduled_sends/docs/GetScheduledSend.md | 52 ----- .../scheduled_sends/docs/ListScheduledSend.md | 48 ----- .../v3/scheduled_sends/docs/MailBatchId.md | 11 -- .../docs/ScheduledSendStatus.md | 12 -- rest/api/v3/scheduled_sends/docs/Status.md | 13 -- rest/api/v3/scheduled_sends/docs/Status1.md | 13 -- rest/api/v3/scheduled_sends/docs/Status2.md | 13 -- .../docs/UpdateScheduledSend.md | 53 ----- .../docs/UpdateScheduledSendRequest.md | 11 -- ...ancel_or_pause_a_scheduled_send_request.go | 22 --- .../scheduled_sends/model_error_response.go | 21 -- .../model_error_response_errors_inner.go | 24 --- .../v3/scheduled_sends/model_mail_batch_id.go | 19 -- .../model_scheduled_send_status.go | 21 -- rest/api/v3/scheduled_sends/model_status.go | 23 --- rest/api/v3/scheduled_sends/model_status1.go | 23 --- rest/api/v3/scheduled_sends/model_status2.go | 23 --- .../model_update_scheduled_send_request.go | 20 -- rest/api/v3/scopes/.openapi-generator | 29 --- rest/api/v3/scopes/.openapi-generator-ignore | 23 --- rest/api/v3/scopes/README.md | 71 ------- .../v3/scopes/api_approve_scope_request.go | 77 -------- rest/api/v3/scopes/api_deny_scope_request.go | 61 ------ rest/api/v3/scopes/api_list_scope.go | 91 --------- rest/api/v3/scopes/api_list_scope_request.go | 70 ------- rest/api/v3/scopes/api_service.go | 34 ---- .../api/v3/scopes/docs/ApproveScopeRequest.md | 51 ----- .../docs/ApproveScopeRequest200Response.md | 11 -- rest/api/v3/scopes/docs/DenyScopeRequest.md | 51 ----- .../docs/DenyScopeRequest404Response.md | 11 -- .../DenyScopeRequest404ResponseErrorsInner.md | 12 -- rest/api/v3/scopes/docs/ErrorResponse.md | 12 -- .../scopes/docs/ErrorResponseErrorsInner.md | 13 -- rest/api/v3/scopes/docs/ListScope.md | 48 ----- .../v3/scopes/docs/ListScope200Response.md | 11 -- .../v3/scopes/docs/ListScope401Response.md | 11 -- .../docs/ListScope401ResponseErrorsInner.md | 12 -- rest/api/v3/scopes/docs/ListScopeRequest.md | 49 ----- .../docs/ListScopeRequest200ResponseInner.md | 16 -- ...odel_approve_scope_request_200_response.go | 20 -- .../model_deny_scope_request_404_response.go | 19 -- ...scope_request_404_response_errors_inner.go | 20 -- rest/api/v3/scopes/model_error_response.go | 21 -- .../model_error_response_errors_inner.go | 24 --- .../scopes/model_list_scope_200_response.go | 20 -- .../scopes/model_list_scope_401_response.go | 20 -- ...el_list_scope_401_response_errors_inner.go | 22 --- ...l_list_scope_request_200_response_inner.go | 30 --- rest/api/v3/seq/.openapi-generator | 17 -- rest/api/v3/seq/.openapi-generator-ignore | 23 --- rest/api/v3/seq/README.md | 71 ------- .../seq/api_list_engagement_quality_score.go | 70 ------- ...i_list_subuser_engagement_quality_score.go | 79 -------- rest/api/v3/seq/api_service.go | 34 ---- .../v3/seq/docs/ListEngagementQualityScore.md | 48 ----- .../docs/ListSubuserEngagementQualityScore.md | 50 ----- rest/api/v3/seq/docs/SeqError.md | 12 -- rest/api/v3/seq/docs/SeqMetadata.md | 11 -- rest/api/v3/seq/docs/SeqMetadataNextParams.md | 11 -- rest/api/v3/seq/docs/SeqMetrics.md | 15 -- rest/api/v3/seq/docs/SeqScore.md | 15 -- rest/api/v3/seq/model_seq_error.go | 22 --- rest/api/v3/seq/model_seq_metadata.go | 19 -- .../v3/seq/model_seq_metadata_next_params.go | 20 -- rest/api/v3/seq/model_seq_metrics.go | 28 --- rest/api/v3/seq/model_seq_score.go | 27 --- rest/api/v3/sso/.openapi-generator | 64 ------ rest/api/v3/sso/.openapi-generator-ignore | 23 --- rest/api/v3/sso/README.md | 94 --------- rest/api/v3/sso/api_create_sso_certificate.go | 104 ---------- rest/api/v3/sso/api_create_sso_integration.go | 104 ---------- rest/api/v3/sso/api_create_sso_teammate.go | 104 ---------- rest/api/v3/sso/api_delete_sso_certificate.go | 100 ---------- rest/api/v3/sso/api_delete_sso_integration.go | 92 --------- rest/api/v3/sso/api_get_sso_certificate.go | 100 ---------- rest/api/v3/sso/api_get_sso_integration.go | 111 ----------- rest/api/v3/sso/api_list_sso_integration.go | 100 ---------- .../api_list_sso_integration_certificate.go | 100 ---------- rest/api/v3/sso/api_service.go | 34 ---- rest/api/v3/sso/api_update_sso_certificate.go | 115 ----------- rest/api/v3/sso/api_update_sso_integration.go | 125 ------------ rest/api/v3/sso/api_update_sso_teammate.go | 115 ----------- rest/api/v3/sso/docs/CreateSsoCertificate.md | 48 ----- .../sso/docs/CreateSsoCertificateRequest.md | 13 -- rest/api/v3/sso/docs/CreateSsoIntegration.md | 48 ----- rest/api/v3/sso/docs/CreateSsoTeammate.md | 48 ----- rest/api/v3/sso/docs/DeleteSsoCertificate.md | 51 ----- rest/api/v3/sso/docs/DeleteSsoIntegration.md | 51 ----- rest/api/v3/sso/docs/GetSsoCertificate.md | 51 ----- rest/api/v3/sso/docs/GetSsoIntegration.md | 52 ----- rest/api/v3/sso/docs/ListSsoIntegration.md | 48 ----- .../sso/docs/ListSsoIntegrationCertificate.md | 51 ----- rest/api/v3/sso/docs/PatchSsoTeammates200.md | 29 --- rest/api/v3/sso/docs/PermissionType.md | 13 -- rest/api/v3/sso/docs/PermissionType1.md | 13 -- rest/api/v3/sso/docs/Persona.md | 15 -- .../sso/docs/PostPatchIntegrationRequest.md | 16 -- rest/api/v3/sso/docs/PostSsoTeammates201.md | 18 -- .../v3/sso/docs/PostSsoTeammatesRequest.md | 18 -- rest/api/v3/sso/docs/SsoCertificateBody.md | 15 -- rest/api/v3/sso/docs/SsoErrorResponseInner.md | 13 -- rest/api/v3/sso/docs/SsoIntegration.md | 20 -- .../sso/docs/SsoTeammatesBaseRequestProps.md | 17 -- ...matesBaseRequestPropsSubuserAccessInner.md | 13 -- .../sso/docs/SsoTeammatesBaseResponseProps.md | 16 -- ...TeammatesRestrictedSubuserResponseProps.md | 12 -- ...dSubuserResponsePropsSubuserAccessInner.md | 16 -- rest/api/v3/sso/docs/UpdateSsoCertificate.md | 52 ----- .../sso/docs/UpdateSsoCertificateRequest.md | 13 -- rest/api/v3/sso/docs/UpdateSsoIntegration.md | 53 ----- rest/api/v3/sso/docs/UpdateSsoTeammate.md | 52 ----- rest/api/v3/sso/docs/UserType.md | 14 -- .../model_create_sso_certificate_request.go | 24 --- .../v3/sso/model_patch_sso_teammates200.go | 56 ------ rest/api/v3/sso/model_permission_type.go | 23 --- rest/api/v3/sso/model_permission_type1.go | 23 --- rest/api/v3/sso/model_persona.go | 25 --- .../model_post_patch_integration_request.go | 30 --- .../api/v3/sso/model_post_sso_teammates201.go | 34 ---- .../sso/model_post_sso_teammates_request.go | 34 ---- rest/api/v3/sso/model_sso_certificate_body.go | 28 --- .../v3/sso/model_sso_error_response_inner.go | 21 -- rest/api/v3/sso/model_sso_integration.go | 38 ---- .../model_sso_teammates_base_request_props.go | 32 --- ...base_request_props_subuser_access_inner.go | 24 --- ...model_sso_teammates_base_response_props.go | 30 --- ...mates_restricted_subuser_response_props.go | 22 --- ...ser_response_props_subuser_access_inner.go | 30 --- .../model_update_sso_certificate_request.go | 24 --- rest/api/v3/sso/model_user_type.go | 24 --- rest/api/v3/stats/.openapi-generator | 80 -------- rest/api/v3/stats/.openapi-generator-ignore | 23 --- rest/api/v3/stats/README.md | 104 ---------- rest/api/v3/stats/api_get_client_stat.go | 98 ---------- rest/api/v3/stats/api_list_browser_stat.go | 114 ----------- rest/api/v3/stats/api_list_category.go | 95 --------- rest/api/v3/stats/api_list_category_stat.go | 96 --------- .../v3/stats/api_list_category_stat_sum.go | 123 ------------ rest/api/v3/stats/api_list_client_stat.go | 87 --------- rest/api/v3/stats/api_list_device_stat.go | 105 ---------- rest/api/v3/stats/api_list_geo_stat.go | 114 ----------- .../stats/api_list_mailbox_provider_stat.go | 114 ----------- rest/api/v3/stats/api_list_stat.go | 105 ---------- rest/api/v3/stats/api_service.go | 34 ---- rest/api/v3/stats/docs/AdvancedStatsClicks.md | 12 -- .../v3/stats/docs/AdvancedStatsClicksOpens.md | 14 -- .../docs/AdvancedStatsMailboxProvider.md | 18 -- rest/api/v3/stats/docs/AdvancedStatsOpens.md | 12 -- rest/api/v3/stats/docs/AggregatedBy.md | 14 -- rest/api/v3/stats/docs/AggregatedBy1.md | 14 -- rest/api/v3/stats/docs/AggregatedBy2.md | 14 -- rest/api/v3/stats/docs/AggregatedBy3.md | 14 -- rest/api/v3/stats/docs/CategoryStats.md | 12 -- .../v3/stats/docs/CategoryStatsStatsInner.md | 13 -- .../docs/CategoryStatsStatsInnerMetrics.md | 26 --- rest/api/v3/stats/docs/ClientType.md | 15 -- rest/api/v3/stats/docs/Country.md | 13 -- rest/api/v3/stats/docs/GetClientStat.md | 54 ----- rest/api/v3/stats/docs/ListBrowserStat.md | 53 ----- .../docs/ListBrowserStat200ResponseInner.md | 12 -- ...stBrowserStat200ResponseInnerStatsInner.md | 13 -- rest/api/v3/stats/docs/ListCategory.md | 51 ----- .../docs/ListCategory200ResponseInner.md | 11 -- .../v3/stats/docs/ListCategory400Response.md | 11 -- .../ListCategory400ResponseErrorsInner.md | 12 -- rest/api/v3/stats/docs/ListCategoryStat.md | 50 ----- rest/api/v3/stats/docs/ListCategoryStatSum.md | 54 ----- rest/api/v3/stats/docs/ListClientStat.md | 50 ----- .../docs/ListClientStat200ResponseInner.md | 12 -- ...istClientStat200ResponseInnerStatsInner.md | 13 -- rest/api/v3/stats/docs/ListDeviceStat.md | 52 ----- rest/api/v3/stats/docs/ListGeoStat.md | 53 ----- .../stats/docs/ListGeoStat200ResponseInner.md | 12 -- .../ListGeoStat200ResponseInnerStatsInner.md | 13 -- .../v3/stats/docs/ListMailboxProviderStat.md | 53 ----- ...ListMailboxProviderStat200ResponseInner.md | 12 -- ...xProviderStat200ResponseInnerStatsInner.md | 13 -- rest/api/v3/stats/docs/ListStat.md | 52 ----- .../v3/stats/docs/ListStat200ResponseInner.md | 12 -- .../ListStat200ResponseInnerStatsInner.md | 11 -- rest/api/v3/stats/docs/SortByDirection.md | 13 -- .../v3/stats/docs/StatsAdvancedGlobalStats.md | 26 --- .../v3/stats/model_advanced_stats_clicks.go | 22 --- .../model_advanced_stats_clicks_opens.go | 26 --- .../model_advanced_stats_mailbox_provider.go | 34 ---- .../v3/stats/model_advanced_stats_opens.go | 22 --- rest/api/v3/stats/model_aggregated_by.go | 24 --- rest/api/v3/stats/model_aggregated_by1.go | 24 --- rest/api/v3/stats/model_aggregated_by2.go | 24 --- rest/api/v3/stats/model_aggregated_by3.go | 24 --- rest/api/v3/stats/model_category_stats.go | 21 -- .../stats/model_category_stats_stats_inner.go | 23 --- ...odel_category_stats_stats_inner_metrics.go | 50 ----- rest/api/v3/stats/model_client_type.go | 25 --- rest/api/v3/stats/model_country.go | 23 --- ...el_list_browser_stat_200_response_inner.go | 22 --- ...ser_stat_200_response_inner_stats_inner.go | 23 --- .../model_list_category_200_response_inner.go | 20 -- .../stats/model_list_category_400_response.go | 20 -- ...list_category_400_response_errors_inner.go | 21 -- ...del_list_client_stat_200_response_inner.go | 22 --- ...ent_stat_200_response_inner_stats_inner.go | 23 --- .../model_list_geo_stat_200_response_inner.go | 22 --- ...geo_stat_200_response_inner_stats_inner.go | 23 --- ...ailbox_provider_stat_200_response_inner.go | 22 --- ...der_stat_200_response_inner_stats_inner.go | 23 --- .../model_list_stat_200_response_inner.go | 22 --- ...ist_stat_200_response_inner_stats_inner.go | 19 -- rest/api/v3/stats/model_sort_by_direction.go | 23 --- .../model_stats_advanced_global_stats.go | 50 ----- rest/api/v3/subusers/.openapi-generator | 96 --------- .../api/v3/subusers/.openapi-generator-ignore | 23 --- rest/api/v3/subusers/README.md | 106 ---------- rest/api/v3/subusers/api_create_subuser.go | 97 --------- rest/api/v3/subusers/api_delete_subuser.go | 69 ------- .../api/v3/subusers/api_get_subuser_credit.go | 69 ------- rest/api/v3/subusers/api_list_monthly_stat.go | 106 ---------- rest/api/v3/subusers/api_list_reputation.go | 60 ------ rest/api/v3/subusers/api_list_stat.go | 106 ---------- rest/api/v3/subusers/api_list_stat_sum.go | 115 ----------- rest/api/v3/subusers/api_list_subuser.go | 105 ---------- .../subusers/api_list_subuser_monthly_stat.go | 108 ---------- rest/api/v3/subusers/api_service.go | 34 ---- rest/api/v3/subusers/api_update_subuser.go | 100 ---------- .../v3/subusers/api_update_subuser_credit.go | 84 -------- rest/api/v3/subusers/api_update_subuser_ip.go | 84 -------- .../api_update_subuser_remaining_credit.go | 84 -------- .../api_update_subuser_website_access.go | 76 -------- rest/api/v3/subusers/docs/AggregatedBy.md | 14 -- rest/api/v3/subusers/docs/CategoryStats.md | 12 -- .../subusers/docs/CategoryStatsStatsInner.md | 13 -- .../docs/CategoryStatsStatsInnerMetrics.md | 26 --- rest/api/v3/subusers/docs/CreateSubuser.md | 48 ----- .../v3/subusers/docs/CreateSubuserRequest.md | 16 -- rest/api/v3/subusers/docs/DeleteSubuser.md | 51 ----- rest/api/v3/subusers/docs/ErrorResponse.md | 12 -- .../subusers/docs/ErrorResponseErrorsInner.md | 13 -- rest/api/v3/subusers/docs/GetSubuserCredit.md | 51 ----- rest/api/v3/subusers/docs/ListMonthlyStat.md | 52 ----- rest/api/v3/subusers/docs/ListReputation.md | 48 ----- .../docs/ListReputation200ResponseInner.md | 12 -- rest/api/v3/subusers/docs/ListStat.md | 51 ----- rest/api/v3/subusers/docs/ListStatSum.md | 53 ----- rest/api/v3/subusers/docs/ListSubuser.md | 52 ----- .../subusers/docs/ListSubuserMonthlyStat.md | 55 ------ rest/api/v3/subusers/docs/Region.md | 14 -- rest/api/v3/subusers/docs/Region1.md | 13 -- rest/api/v3/subusers/docs/Region2.md | 13 -- rest/api/v3/subusers/docs/Region3.md | 13 -- rest/api/v3/subusers/docs/ResetFrequency.md | 14 -- rest/api/v3/subusers/docs/ResetFrequency1.md | 14 -- rest/api/v3/subusers/docs/SortByDirection.md | 13 -- rest/api/v3/subusers/docs/SortByDirection1.md | 13 -- rest/api/v3/subusers/docs/SortByDirection2.md | 13 -- rest/api/v3/subusers/docs/SortByMetric.md | 20 -- rest/api/v3/subusers/docs/Subuser.md | 15 -- rest/api/v3/subusers/docs/SubuserCredits.md | 15 -- .../v3/subusers/docs/SubuserCreditsRequest.md | 13 -- rest/api/v3/subusers/docs/SubuserPost.md | 15 -- .../docs/SubuserPostCreditAllocation.md | 11 -- rest/api/v3/subusers/docs/SubuserStats.md | 12 -- .../subusers/docs/SubuserStatsStatsInner.md | 15 -- .../docs/SubuserStatsStatsInnerMetrics.md | 26 --- rest/api/v3/subusers/docs/Type.md | 14 -- rest/api/v3/subusers/docs/Type1.md | 14 -- rest/api/v3/subusers/docs/UpdateSubuser.md | 52 ----- .../v3/subusers/docs/UpdateSubuserCredit.md | 51 ----- rest/api/v3/subusers/docs/UpdateSubuserIp.md | 52 ----- .../docs/UpdateSubuserIp200Response.md | 11 -- .../docs/UpdateSubuserRemainingCredit.md | 51 ----- .../UpdateSubuserRemainingCreditRequest.md | 11 -- .../v3/subusers/docs/UpdateSubuserRequest.md | 11 -- .../docs/UpdateSubuserWebsiteAccess.md | 52 ----- .../docs/UpdateSubuserWebsiteAccessRequest.md | 11 -- rest/api/v3/subusers/model_aggregated_by.go | 24 --- rest/api/v3/subusers/model_category_stats.go | 21 -- .../model_category_stats_stats_inner.go | 23 --- ...odel_category_stats_stats_inner_metrics.go | 50 ----- .../subusers/model_create_subuser_request.go | 30 --- rest/api/v3/subusers/model_error_response.go | 21 -- .../model_error_response_errors_inner.go | 24 --- ...odel_list_reputation_200_response_inner.go | 22 --- rest/api/v3/subusers/model_region.go | 24 --- rest/api/v3/subusers/model_region1.go | 23 --- rest/api/v3/subusers/model_region2.go | 23 --- rest/api/v3/subusers/model_region3.go | 23 --- rest/api/v3/subusers/model_reset_frequency.go | 24 --- .../api/v3/subusers/model_reset_frequency1.go | 24 --- .../v3/subusers/model_sort_by_direction.go | 23 --- .../v3/subusers/model_sort_by_direction1.go | 23 --- .../v3/subusers/model_sort_by_direction2.go | 23 --- rest/api/v3/subusers/model_sort_by_metric.go | 30 --- rest/api/v3/subusers/model_subuser.go | 28 --- rest/api/v3/subusers/model_subuser_credits.go | 28 --- .../subusers/model_subuser_credits_request.go | 24 --- rest/api/v3/subusers/model_subuser_post.go | 27 --- .../model_subuser_post_credit_allocation.go | 19 -- rest/api/v3/subusers/model_subuser_stats.go | 22 --- .../model_subuser_stats_stats_inner.go | 27 --- ...model_subuser_stats_stats_inner_metrics.go | 50 ----- rest/api/v3/subusers/model_type.go | 24 --- rest/api/v3/subusers/model_type1.go | 24 --- .../model_update_subuser_ip_200_response.go | 20 -- ...update_subuser_remaining_credit_request.go | 20 -- .../subusers/model_update_subuser_request.go | 20 -- ...l_update_subuser_website_access_request.go | 20 -- rest/api/v3/suppressions/.openapi-generator | 136 ------------- .../v3/suppressions/.openapi-generator-ignore | 23 --- rest/api/v3/suppressions/README.md | 130 ------------- .../api_add_suppression_to_asm_group.go | 85 -------- .../v3/suppressions/api_creat_asm_group.go | 74 ------- .../api_create_global_suppression.go | 74 ------- .../v3/suppressions/api_delete_asm_group.go | 70 ------- .../api_delete_global_suppression.go | 70 ------- .../suppressions/api_delete_invalid_email.go | 70 ------- .../suppressions/api_delete_invalid_emails.go | 74 ------- .../v3/suppressions/api_delete_spam_report.go | 70 ------- .../suppressions/api_delete_spam_reports.go | 74 ------- .../api_delete_suppression_block.go | 70 ------- .../api_delete_suppression_blocks.go | 74 ------- .../api_delete_suppression_bounce.go | 78 -------- .../api_delete_suppression_bounces.go | 74 ------- .../api_delete_suppression_from_asm_group.go | 70 ------- rest/api/v3/suppressions/api_get_asm_group.go | 70 ------- .../suppressions/api_get_asm_suppression.go | 70 ------- .../api_get_global_suppression.go | 70 ------- .../v3/suppressions/api_get_invalid_email.go | 70 ------- .../v3/suppressions/api_get_spam_report.go | 70 ------- .../suppressions/api_get_suppression_block.go | 70 ------- .../api_get_suppression_bounces.go | 70 ------- ...get_suppression_bounces_classifications.go | 99 ---------- .../api/v3/suppressions/api_list_asm_group.go | 70 ------- .../suppressions/api_list_asm_suppression.go | 59 ------ .../api_list_global_suppression.go | 106 ---------- .../v3/suppressions/api_list_invalid_email.go | 106 ---------- .../v3/suppressions/api_list_spam_report.go | 106 ---------- .../api_list_suppression_block.go | 106 ---------- .../api_list_suppression_bounces.go | 123 ------------ ...ist_suppression_bounces_classifications.go | 95 --------- .../api_list_suppression_from_asm_group.go | 70 ------- .../api_search_suppression_from_asm_group.go | 85 -------- rest/api/v3/suppressions/api_service.go | 34 ---- .../v3/suppressions/api_update_asm_group.go | 85 -------- rest/api/v3/suppressions/docs/Accept.md | 13 -- rest/api/v3/suppressions/docs/Accept1.md | 13 -- .../docs/AddSuppressionToAsmGroup.md | 53 ----- .../AddSuppressionToAsmGroup201Response.md | 11 -- .../suppressions/docs/BlocksResponseInner.md | 14 -- .../v3/suppressions/docs/BounceResponse.md | 14 -- .../v3/suppressions/docs/Classification.md | 18 -- .../v3/suppressions/docs/Classification1.md | 18 -- .../api/v3/suppressions/docs/CreatAsmGroup.md | 49 ----- .../docs/CreatAsmGroup201Response.md | 14 -- .../docs/CreateGlobalSuppression.md | 49 ----- .../CreateGlobalSuppression201Response.md | 11 -- .../v3/suppressions/docs/DeleteAsmGroup.md | 52 ----- .../docs/DeleteGlobalSuppression.md | 52 ----- .../suppressions/docs/DeleteInvalidEmail.md | 52 ----- .../suppressions/docs/DeleteInvalidEmails.md | 49 ----- .../docs/DeleteInvalidEmailsRequest.md | 12 -- .../v3/suppressions/docs/DeleteSpamReport.md | 52 ----- .../v3/suppressions/docs/DeleteSpamReports.md | 49 ----- .../docs/DeleteSpamReportsRequest.md | 12 -- .../docs/DeleteSuppressionBlock.md | 52 ----- .../docs/DeleteSuppressionBlocks.md | 49 ----- .../docs/DeleteSuppressionBlocksRequest.md | 12 -- .../docs/DeleteSuppressionBounce.md | 52 ----- .../docs/DeleteSuppressionBounces.md | 49 ----- .../docs/DeleteSuppressionBouncesRequest.md | 12 -- .../docs/DeleteSuppressionFromAsmGroup.md | 53 ----- .../api/v3/suppressions/docs/ErrorResponse.md | 12 -- .../docs/ErrorResponseErrorsInner.md | 13 -- rest/api/v3/suppressions/docs/GetAsmGroup.md | 52 ----- .../docs/GetAsmGroup200Response.md | 16 -- .../v3/suppressions/docs/GetAsmSuppression.md | 52 ----- .../docs/GetAsmSuppression200Response.md | 11 -- ...Suppression200ResponseSuppressionsInner.md | 15 -- .../suppressions/docs/GetGlobalSuppression.md | 52 ----- .../v3/suppressions/docs/GetInvalidEmail.md | 52 ----- .../api/v3/suppressions/docs/GetSpamReport.md | 52 ----- .../suppressions/docs/GetSuppressionBlock.md | 52 ----- .../docs/GetSuppressionBounces.md | 52 ----- .../GetSuppressionBouncesClassifications.md | 54 ----- ...essionBouncesClassifications200Response.md | 11 -- ...esClassifications200ResponseResultInner.md | 12 -- ...cations200ResponseResultInnerStatsInner.md | 12 -- rest/api/v3/suppressions/docs/InvalidEmail.md | 13 -- rest/api/v3/suppressions/docs/ListAsmGroup.md | 49 ----- .../suppressions/docs/ListAsmSuppression.md | 48 ----- .../ListAsmSuppression200ResponseInner.md | 14 -- .../docs/ListGlobalSuppression.md | 53 ----- .../ListGlobalSuppression200ResponseInner.md | 12 -- .../v3/suppressions/docs/ListInvalidEmail.md | 53 ----- .../v3/suppressions/docs/ListSpamReport.md | 53 ----- .../suppressions/docs/ListSuppressionBlock.md | 53 ----- .../docs/ListSuppressionBounces.md | 53 ----- .../ListSuppressionBouncesClassifications.md | 50 ----- ...essionBouncesClassifications200Response.md | 11 -- ...esClassifications200ResponseResultInner.md | 12 -- ...cations200ResponseResultInnerStatsInner.md | 12 -- .../docs/ListSuppressionFromAsmGroup.md | 52 ----- .../RetrieveAGlobalSuppressionResponse.md | 11 -- .../docs/SearchSuppressionFromAsmGroup.md | 53 ----- .../docs/SpamReportsResponseInner.md | 13 -- .../v3/suppressions/docs/SuppressionGroup.md | 16 -- .../docs/SuppressionGroupRequestBaseProps.md | 13 -- .../suppressions/docs/SuppressionsRequest.md | 11 -- .../v3/suppressions/docs/UpdateAsmGroup.md | 53 ----- .../docs/UpdateAsmGroupRequest.md | 13 -- rest/api/v3/suppressions/model_accept.go | 23 --- rest/api/v3/suppressions/model_accept1.go | 23 --- ...d_suppression_to_asm_group_201_response.go | 20 -- .../model_blocks_response_inner.go | 26 --- .../v3/suppressions/model_bounce_response.go | 26 --- .../v3/suppressions/model_classification.go | 28 --- .../v3/suppressions/model_classification1.go | 28 --- .../model_creat_asm_group_201_response.go | 26 --- ..._create_global_suppression_201_response.go | 20 -- .../model_delete_invalid_emails_request.go | 22 --- .../model_delete_spam_reports_request.go | 22 --- ...model_delete_suppression_blocks_request.go | 22 --- ...odel_delete_suppression_bounces_request.go | 22 --- .../v3/suppressions/model_error_response.go | 21 -- .../model_error_response_errors_inner.go | 24 --- .../model_get_asm_group_200_response.go | 29 --- .../model_get_asm_suppression_200_response.go | 20 -- ...ression_200_response_suppressions_inner.go | 28 --- ...on_bounces_classifications_200_response.go | 19 -- ...assifications_200_response_result_inner.go | 20 -- ...s_200_response_result_inner_stats_inner.go | 20 -- .../v3/suppressions/model_invalid_email.go | 24 --- ...list_asm_suppression_200_response_inner.go | 26 --- ...t_global_suppression_200_response_inner.go | 22 --- ...on_bounces_classifications_200_response.go | 19 -- ...assifications_200_response_result_inner.go | 20 -- ...s_200_response_result_inner_stats_inner.go | 20 -- ..._retrieve_a_global_suppression_response.go | 20 -- .../model_spam_reports_response_inner.go | 24 --- .../suppressions/model_suppression_group.go | 29 --- ...el_suppression_group_request_base_props.go | 24 --- .../model_suppressions_request.go | 20 -- .../model_update_asm_group_request.go | 24 --- rest/api/v3/teammates/.openapi-generator | 66 ------- .../v3/teammates/.openapi-generator-ignore | 23 --- rest/api/v3/teammates/README.md | 89 --------- .../teammates/api_delete_pending_teammate.go | 70 ------- rest/api/v3/teammates/api_delete_teammate.go | 70 ------- rest/api/v3/teammates/api_get_teammate.go | 70 ------- rest/api/v3/teammates/api_invite_teammate.go | 82 -------- .../v3/teammates/api_list_pending_teammate.go | 59 ------ .../teammates/api_list_subuser_by_template.go | 122 ------------ rest/api/v3/teammates/api_list_teammate.go | 79 -------- .../teammates/api_resend_teammate_invite.go | 78 -------- rest/api/v3/teammates/api_service.go | 34 ---- rest/api/v3/teammates/api_update_teammate.go | 101 ---------- .../teammates/docs/DeletePendingTeammate.md | 52 ----- rest/api/v3/teammates/docs/DeleteTeammate.md | 52 ----- rest/api/v3/teammates/docs/GetTeammate.md | 52 ----- .../teammates/docs/GetTeammate200Response.md | 25 --- rest/api/v3/teammates/docs/InviteTeammate.md | 49 ----- .../docs/InviteTeammate201Response.md | 14 -- .../docs/InviteTeammate400Response.md | 11 -- .../InviteTeammate400ResponseErrorsInner.md | 12 -- .../teammates/docs/InviteTeammateRequest.md | 13 -- .../v3/teammates/docs/ListPendingTeammate.md | 48 ----- .../docs/ListPendingTeammate200Response.md | 11 -- ...stPendingTeammate200ResponseResultInner.md | 15 -- .../teammates/docs/ListSubuserByTemplate.md | 54 ----- .../docs/ListSubuserByTemplate200Response.md | 13 -- ...istSubuserByTemplate200ResponseMetadata.md | 11 -- ...ByTemplate200ResponseMetadataNextParams.md | 13 -- ...ByTemplate200ResponseSubuserAccessInner.md | 16 -- .../docs/ListSubuserByTemplate400Response.md | 11 -- ...SubuserByTemplate400ResponseErrorsInner.md | 12 -- rest/api/v3/teammates/docs/ListTeammate.md | 50 ----- .../teammates/docs/ListTeammate200Response.md | 11 -- .../ListTeammate200ResponseResultInner.md | 24 --- rest/api/v3/teammates/docs/PermissionType.md | 13 -- .../v3/teammates/docs/ResendTeammateInvite.md | 52 ----- .../docs/ResendTeammateInvite200Response.md | 14 -- rest/api/v3/teammates/docs/UpdateTeammate.md | 53 ----- .../docs/UpdateTeammate200Response.md | 25 --- .../teammates/docs/UpdateTeammateRequest.md | 12 -- rest/api/v3/teammates/docs/UserType.md | 14 -- rest/api/v3/teammates/docs/UserType1.md | 14 -- rest/api/v3/teammates/docs/UserType2.md | 14 -- .../model_get_teammate_200_response.go | 48 ----- .../model_invite_teammate_201_response.go | 26 --- .../model_invite_teammate_400_response.go | 19 -- ...vite_teammate_400_response_errors_inner.go | 20 -- .../model_invite_teammate_request.go | 24 --- ...odel_list_pending_teammate_200_response.go | 19 -- ...ding_teammate_200_response_result_inner.go | 28 --- ...l_list_subuser_by_template_200_response.go | 23 --- ...user_by_template_200_response__metadata.go | 19 -- ...late_200_response__metadata_next_params.go | 24 --- ...plate_200_response_subuser_access_inner.go | 30 --- ...l_list_subuser_by_template_400_response.go | 19 -- ...r_by_template_400_response_errors_inner.go | 22 --- .../model_list_teammate_200_response.go | 19 -- ...list_teammate_200_response_result_inner.go | 46 ----- .../api/v3/teammates/model_permission_type.go | 23 --- ...del_resend_teammate_invite_200_response.go | 26 --- .../model_update_teammate_200_response.go | 48 ----- .../model_update_teammate_request.go | 22 --- rest/api/v3/teammates/model_user_type.go | 24 --- rest/api/v3/teammates/model_user_type1.go | 24 --- rest/api/v3/teammates/model_user_type2.go | 24 --- rest/api/v3/templates/.openapi-generator | 66 ------- .../v3/templates/.openapi-generator-ignore | 23 --- rest/api/v3/templates/README.md | 93 --------- .../api_activate_template_version.go | 79 -------- rest/api/v3/templates/api_create_template.go | 74 ------- .../templates/api_create_template_version.go | 85 -------- rest/api/v3/templates/api_delete_template.go | 70 ------- .../templates/api_delete_template_version.go | 70 ------- .../v3/templates/api_duplicate_template.go | 85 -------- rest/api/v3/templates/api_get_template.go | 70 ------- .../v3/templates/api_get_template_version.go | 79 -------- rest/api/v3/templates/api_list_template.go | 96 --------- rest/api/v3/templates/api_service.go | 34 ---- rest/api/v3/templates/api_update_template.go | 85 -------- .../templates/api_update_template_version.go | 94 --------- .../templates/docs/ActivateTemplateVersion.md | 53 ----- rest/api/v3/templates/docs/Active.md | 13 -- rest/api/v3/templates/docs/Active1.md | 13 -- rest/api/v3/templates/docs/CreateTemplate.md | 49 ----- .../templates/docs/CreateTemplateRequest.md | 12 -- .../templates/docs/CreateTemplateVersion.md | 53 ----- rest/api/v3/templates/docs/DeleteTemplate.md | 52 ----- .../templates/docs/DeleteTemplateVersion.md | 53 ----- .../v3/templates/docs/DuplicateTemplate.md | 53 ----- .../docs/DuplicateTemplateRequest.md | 11 -- rest/api/v3/templates/docs/Editor.md | 13 -- rest/api/v3/templates/docs/Editor1.md | 13 -- rest/api/v3/templates/docs/Generation.md | 13 -- rest/api/v3/templates/docs/Generation1.md | 13 -- rest/api/v3/templates/docs/Generations.md | 14 -- rest/api/v3/templates/docs/GetTemplate.md | 52 ----- .../v3/templates/docs/GetTemplateVersion.md | 53 ----- rest/api/v3/templates/docs/ListTemplate.md | 50 ----- .../templates/docs/ListTemplate200Response.md | 12 -- .../templates/docs/ListTemplate400Response.md | 11 -- .../ListTemplate400ResponseErrorsInner.md | 12 -- rest/api/v3/templates/docs/Metadata.md | 14 -- .../templates/docs/TransactionalTemplate.md | 16 -- .../TransactionalTemplateVersionCreate.md | 18 -- .../TransactionalTemplateVersionOutput.md | 23 --- .../docs/TransactionalTemplateWarning.md | 11 -- .../TransactionalTemplatesTemplateLean.md | 15 -- ...TransactionalTemplatesVersionOutputLean.md | 21 -- rest/api/v3/templates/docs/UpdateTemplate.md | 53 ----- .../templates/docs/UpdateTemplateRequest.md | 11 -- .../templates/docs/UpdateTemplateVersion.md | 54 ----- rest/api/v3/templates/model_active.go | 23 --- rest/api/v3/templates/model_active1.go | 23 --- .../model_create_template_request.go | 22 --- .../model_duplicate_template_request.go | 20 -- rest/api/v3/templates/model_editor.go | 23 --- rest/api/v3/templates/model_editor1.go | 23 --- rest/api/v3/templates/model_generation.go | 23 --- rest/api/v3/templates/model_generation1.go | 23 --- rest/api/v3/templates/model_generations.go | 24 --- .../model_list_template_200_response.go | 21 -- .../model_list_template_400_response.go | 19 -- ...list_template_400_response_errors_inner.go | 20 -- rest/api/v3/templates/model_metadata.go | 22 --- .../templates/model_transactional_template.go | 29 --- ...l_transactional_template_version_create.go | 34 ---- ...l_transactional_template_version_output.go | 43 ---- .../model_transactional_template_warning.go | 20 -- ...l_transactional_templates_template_lean.go | 28 --- ...sactional_templates_version_output_lean.go | 40 ---- .../model_update_template_request.go | 20 -- .../v3/tracking_settings/.openapi-generator | 38 ---- .../.openapi-generator-ignore | 23 --- rest/api/v3/tracking_settings/README.md | 75 ------- .../api_list_click_tracking_setting.go | 59 ------ ..._list_google_analytics_tracking_setting.go | 59 ------ .../api_list_open_tracking_setting.go | 59 ------ .../api_list_subscription_tracking_setting.go | 59 ------ .../api_list_tracking_setting.go | 59 ------ rest/api/v3/tracking_settings/api_service.go | 34 ---- .../api_update_click_tracking_setting.go | 74 ------- ...pdate_google_analytics_tracking_setting.go | 74 ------- .../api_update_open_tracking_setting.go | 74 ------- ...pi_update_subscription_tracking_setting.go | 74 ------- .../tracking_settings/docs/ClickTracking.md | 12 -- .../docs/GoogleAnalyticsSettings.md | 16 -- .../docs/ListClickTrackingSetting.md | 48 ----- .../ListGoogleAnalyticsTrackingSetting.md | 48 ----- .../docs/ListOpenTrackingSetting.md | 48 ----- .../ListOpenTrackingSetting200Response.md | 11 -- .../docs/ListSubscriptionTrackingSetting.md | 48 ----- .../docs/ListTrackingSetting.md | 48 ----- .../docs/ListTrackingSetting200Response.md | 11 -- ...stTrackingSetting200ResponseResultInner.md | 14 -- .../docs/SubscriptionTrackingSettings.md | 16 -- .../docs/UpdateClickTrackingSetting.md | 49 ----- .../docs/UpdateClickTrackingSettingRequest.md | 11 -- .../UpdateGoogleAnalyticsTrackingSetting.md | 49 ----- .../docs/UpdateOpenTrackingSetting.md | 49 ----- .../docs/UpdateOpenTrackingSettingRequest.md | 11 -- .../docs/UpdateSubscriptionTrackingSetting.md | 49 ----- .../tracking_settings/model_click_tracking.go | 22 --- .../model_google_analytics_settings.go | 30 --- ...list_open_tracking_setting_200_response.go | 20 -- ...odel_list_tracking_setting_200_response.go | 20 -- ...cking_setting_200_response_result_inner.go | 26 --- .../model_subscription_tracking_settings.go | 30 --- ...l_update_click_tracking_setting_request.go | 20 -- ...el_update_open_tracking_setting_request.go | 20 -- rest/api/v3/user/.openapi-generator | 50 ----- rest/api/v3/user/.openapi-generator-ignore | 23 --- rest/api/v3/user/README.md | 83 -------- rest/api/v3/user/api_list_account.go | 59 ------ rest/api/v3/user/api_list_credit.go | 59 ------ rest/api/v3/user/api_list_email.go | 59 ------ rest/api/v3/user/api_list_profile.go | 59 ------ rest/api/v3/user/api_list_username.go | 59 ------ rest/api/v3/user/api_service.go | 34 ---- rest/api/v3/user/api_update_email.go | 74 ------- rest/api/v3/user/api_update_password.go | 74 ------- rest/api/v3/user/api_update_profile.go | 82 -------- rest/api/v3/user/api_update_username.go | 74 ------- rest/api/v3/user/docs/ErrorResponse.md | 12 -- .../v3/user/docs/ErrorResponseErrorsInner.md | 13 -- .../v3/user/docs/GETUserAccountResponse.md | 12 -- .../v3/user/docs/GETUserProfileResponse.md | 21 -- rest/api/v3/user/docs/ListAccount.md | 48 ----- rest/api/v3/user/docs/ListCredit.md | 48 ----- .../api/v3/user/docs/ListCredit200Response.md | 17 -- rest/api/v3/user/docs/ListEmail.md | 48 ----- rest/api/v3/user/docs/ListEmail200Response.md | 11 -- rest/api/v3/user/docs/ListProfile.md | 48 ----- rest/api/v3/user/docs/ListUsername.md | 48 ----- .../v3/user/docs/ListUsername200Response.md | 12 -- rest/api/v3/user/docs/Type.md | 13 -- rest/api/v3/user/docs/UpdateEmail.md | 49 ----- .../v3/user/docs/UpdateEmail200Response.md | 11 -- rest/api/v3/user/docs/UpdateEmailRequest.md | 11 -- rest/api/v3/user/docs/UpdatePassword.md | 49 ----- .../api/v3/user/docs/UpdatePasswordRequest.md | 12 -- rest/api/v3/user/docs/UpdateProfile.md | 49 ----- rest/api/v3/user/docs/UpdateUsername.md | 49 ----- .../v3/user/docs/UpdateUsername200Response.md | 11 -- .../api/v3/user/docs/UpdateUsernameRequest.md | 11 -- rest/api/v3/user/docs/UserProfile.md | 21 -- rest/api/v3/user/model_error_response.go | 21 -- .../user/model_error_response_errors_inner.go | 24 --- .../user/model_get_user_account_response.go | 22 --- .../user/model_get_user_profile_response.go | 40 ---- .../v3/user/model_list_credit_200_response.go | 32 --- .../v3/user/model_list_email_200_response.go | 20 -- .../user/model_list_username_200_response.go | 22 --- rest/api/v3/user/model_type.go | 23 --- .../user/model_update_email_200_response.go | 20 -- .../api/v3/user/model_update_email_request.go | 20 -- .../v3/user/model_update_password_request.go | 22 --- .../model_update_username_200_response.go | 20 -- .../v3/user/model_update_username_request.go | 20 -- rest/api/v3/user/model_user_profile.go | 40 ---- .../v3/verified_senders/.openapi-generator | 48 ----- .../.openapi-generator-ignore | 23 --- rest/api/v3/verified_senders/README.md | 84 -------- .../api_create_verified_sender.go | 97 --------- .../api_delete_verified_sender.go | 85 -------- .../api_list_verified_sender.go | 103 ---------- .../api_list_verified_sender_domain.go | 73 ------- ...pi_list_verified_sender_steps_completed.go | 73 ------- .../api_resend_verified_sender.go | 93 --------- rest/api/v3/verified_senders/api_service.go | 34 ---- .../api_update_verified_sender.go | 108 ---------- .../api_verify_sender_token.go | 77 -------- .../docs/CreateVerifiedSender.md | 48 ----- .../docs/CreateVerifiedSender400Response.md | 11 -- ...ateVerifiedSender400ResponseErrorsInner.md | 13 -- .../docs/DeleteVerifiedSender.md | 51 ----- .../docs/DeleteVerifiedSender403Response.md | 11 -- ...eteVerifiedSender403ResponseErrorsInner.md | 12 -- .../docs/DeleteVerifiedSender404Response.md | 11 -- .../v3/verified_senders/docs/ErrorResponse.md | 12 -- .../docs/ErrorResponseErrorsInner.md | 13 -- .../docs/ListVerifiedSender.md | 50 ----- .../docs/ListVerifiedSender200Response.md | 11 -- .../docs/ListVerifiedSenderDomain.md | 44 ----- .../ListVerifiedSenderDomain200Response.md | 11 -- ...tVerifiedSenderDomain200ResponseResults.md | 12 -- .../docs/ListVerifiedSenderStepsCompleted.md | 44 ----- ...VerifiedSenderStepsCompleted200Response.md | 11 -- ...dSenderStepsCompleted200ResponseResults.md | 12 -- .../docs/ResendVerifiedSender.md | 51 ----- .../docs/UpdateVerifiedSender.md | 52 ----- .../docs/VerifiedSenderRequest.md | 21 -- .../docs/VerifiedSenderResponse.md | 24 --- .../docs/VerifySenderToken.md | 51 ----- ...del_create_verified_sender_400_response.go | 19 -- ...rified_sender_400_response_errors_inner.go | 21 -- ...del_delete_verified_sender_403_response.go | 19 -- ...rified_sender_403_response_errors_inner.go | 20 -- ...del_delete_verified_sender_404_response.go | 19 -- .../verified_senders/model_error_response.go | 21 -- .../model_error_response_errors_inner.go | 24 --- ...model_list_verified_sender_200_response.go | 19 -- ...ist_verified_sender_domain_200_response.go | 19 -- ...fied_sender_domain_200_response_results.go | 20 -- ...ied_sender_steps_completed_200_response.go | 19 -- ...er_steps_completed_200_response_results.go | 20 -- .../model_verified_sender_request.go | 29 --- .../model_verified_sender_response.go | 32 --- rest/api/v3/webhooks/.openapi-generator | 80 -------- .../api/v3/webhooks/.openapi-generator-ignore | 23 --- rest/api/v3/webhooks/README.md | 100 ---------- .../v3/webhooks/api_create_event_webhook.go | 82 -------- .../v3/webhooks/api_create_parse_setting.go | 98 ---------- .../v3/webhooks/api_delete_event_webhook.go | 70 ------- .../v3/webhooks/api_delete_parse_setting.go | 94 --------- rest/api/v3/webhooks/api_get_event_webhook.go | 88 --------- rest/api/v3/webhooks/api_get_parse_setting.go | 94 --------- .../webhooks/api_get_signed_event_webhook.go | 78 -------- .../api/v3/webhooks/api_list_event_webhook.go | 69 ------- .../api/v3/webhooks/api_list_parse_setting.go | 83 -------- rest/api/v3/webhooks/api_list_parse_static.go | 106 ---------- rest/api/v3/webhooks/api_service.go | 34 ---- .../api/v3/webhooks/api_test_event_webhook.go | 66 ------- .../v3/webhooks/api_update_event_webhook.go | 110 ----------- .../v3/webhooks/api_update_parse_setting.go | 109 ----------- .../api_update_signed_event_webhook.go | 93 --------- rest/api/v3/webhooks/docs/AggregatedBy.md | 14 -- .../v3/webhooks/docs/CreateEventWebhook.md | 49 ----- .../docs/CreateEventWebhook400Response.md | 11 -- ...reateEventWebhook400ResponseErrorsInner.md | 13 -- .../v3/webhooks/docs/CreateParseSetting.md | 49 ----- .../v3/webhooks/docs/DeleteEventWebhook.md | 52 ----- .../v3/webhooks/docs/DeleteParseSetting.md | 52 ----- rest/api/v3/webhooks/docs/ErrorResponse.md | 12 -- .../webhooks/docs/ErrorResponseErrorsInner.md | 13 -- .../webhooks/docs/EventWebhookAllResponse.md | 12 -- .../docs/EventWebhookBaseResponseProps.md | 26 --- .../docs/EventWebhookDateResponseProps.md | 12 -- .../docs/EventWebhookNoDatesResponse.md | 29 --- .../docs/EventWebhookOauthResponseProps.md | 12 -- .../v3/webhooks/docs/EventWebhookRequest.md | 27 --- .../docs/EventWebhookSignedResponse.md | 31 --- .../docs/EventWebhookSignedResponseProp.md | 11 -- .../webhooks/docs/EventWebhookTestRequest.md | 15 -- .../docs/EventWebhookUnsignedResponse.md | 30 --- rest/api/v3/webhooks/docs/GetEventWebhook.md | 53 ----- rest/api/v3/webhooks/docs/GetParseSetting.md | 52 ----- .../v3/webhooks/docs/GetSignedEventWebhook.md | 52 ----- .../docs/GetSignedEventWebhook200Response.md | 12 -- .../docs/GetSignedEventWebhook404Response.md | 11 -- ...ignedEventWebhook404ResponseErrorsInner.md | 11 -- rest/api/v3/webhooks/docs/ListEventWebhook.md | 49 ----- rest/api/v3/webhooks/docs/ListParseSetting.md | 48 ----- .../docs/ListParseSetting200Response.md | 11 -- rest/api/v3/webhooks/docs/ListParseStatic.md | 52 ----- .../docs/ListParseStatic200ResponseInner.md | 12 -- ...stParseStatic200ResponseInnerStatsInner.md | 11 -- ...Static200ResponseInnerStatsInnerMetrics.md | 11 -- rest/api/v3/webhooks/docs/ParseSetting.md | 14 -- rest/api/v3/webhooks/docs/TestEventWebhook.md | 49 ----- .../v3/webhooks/docs/UpdateEventWebhook.md | 54 ----- .../v3/webhooks/docs/UpdateParseSetting.md | 53 ----- .../webhooks/docs/UpdateSignedEventWebhook.md | 53 ----- .../docs/UpdateSignedEventWebhookRequest.md | 11 -- rest/api/v3/webhooks/model_aggregated_by.go | 24 --- ...model_create_event_webhook_400_response.go | 19 -- ...event_webhook_400_response_errors_inner.go | 24 --- rest/api/v3/webhooks/model_error_response.go | 21 -- .../model_error_response_errors_inner.go | 24 --- .../model_event_webhook_all_response.go | 22 --- ...model_event_webhook_base_response_props.go | 50 ----- ...model_event_webhook_date_response_props.go | 26 --- .../model_event_webhook_no_dates_response.go | 56 ------ ...odel_event_webhook_oauth_response_props.go | 22 --- .../webhooks/model_event_webhook_request.go | 52 ----- .../model_event_webhook_signed_response.go | 64 ------ ...odel_event_webhook_signed_response_prop.go | 20 -- .../model_event_webhook_test_request.go | 28 --- .../model_event_webhook_unsigned_response.go | 62 ------ ...l_get_signed_event_webhook_200_response.go | 22 --- ...l_get_signed_event_webhook_404_response.go | 19 -- ...event_webhook_404_response_errors_inner.go | 20 -- .../model_list_parse_setting_200_response.go | 20 -- ...el_list_parse_static_200_response_inner.go | 22 --- ...e_static_200_response_inner_stats_inner.go | 19 -- ..._200_response_inner_stats_inner_metrics.go | 20 -- rest/api/v3/webhooks/model_parse_setting.go | 26 --- ...del_update_signed_event_webhook_request.go | 20 -- 2520 files changed, 90074 deletions(-) delete mode 100644 rest/api/v3/account_provisioning/.openapi-generator delete mode 100644 rest/api/v3/account_provisioning/.openapi-generator-ignore delete mode 100644 rest/api/v3/account_provisioning/README.md delete mode 100644 rest/api/v3/account_provisioning/api_authenticate_account.go delete mode 100644 rest/api/v3/account_provisioning/api_create_account.go delete mode 100644 rest/api/v3/account_provisioning/api_delete_account.go delete mode 100644 rest/api/v3/account_provisioning/api_get_account_state.go delete mode 100644 rest/api/v3/account_provisioning/api_list_account.go delete mode 100644 rest/api/v3/account_provisioning/api_list_account_offering.go delete mode 100644 rest/api/v3/account_provisioning/api_list_offering.go delete mode 100644 rest/api/v3/account_provisioning/api_service.go delete mode 100644 rest/api/v3/account_provisioning/api_update_account_offering.go delete mode 100644 rest/api/v3/account_provisioning/api_update_account_state.go delete mode 100644 rest/api/v3/account_provisioning/docs/AccountList.md delete mode 100644 rest/api/v3/account_provisioning/docs/AccountProvisioningAccount.md delete mode 100644 rest/api/v3/account_provisioning/docs/AccountProvisioningAccountId.md delete mode 100644 rest/api/v3/account_provisioning/docs/AccountProvisioningCatalog.md delete mode 100644 rest/api/v3/account_provisioning/docs/AccountProvisioningOfferingList.md delete mode 100644 rest/api/v3/account_provisioning/docs/AccountProvisioningOfferingV1.md delete mode 100644 rest/api/v3/account_provisioning/docs/AccountProvisioningPagination.md delete mode 100644 rest/api/v3/account_provisioning/docs/AccountProvisioningProfile.md delete mode 100644 rest/api/v3/account_provisioning/docs/AccountProvisioningStateRead.md delete mode 100644 rest/api/v3/account_provisioning/docs/AccountProvisioningStateWrite.md delete mode 100644 rest/api/v3/account_provisioning/docs/AuthenticateAccount.md delete mode 100644 rest/api/v3/account_provisioning/docs/CatalogEntry.md delete mode 100644 rest/api/v3/account_provisioning/docs/CatalogEntryEntitlements.md delete mode 100644 rest/api/v3/account_provisioning/docs/CreateAccount.md delete mode 100644 rest/api/v3/account_provisioning/docs/CreateAccountParams.md delete mode 100644 rest/api/v3/account_provisioning/docs/DeleteAccount.md delete mode 100644 rest/api/v3/account_provisioning/docs/ErrorResponse.md delete mode 100644 rest/api/v3/account_provisioning/docs/GetAccountState.md delete mode 100644 rest/api/v3/account_provisioning/docs/ListAccount.md delete mode 100644 rest/api/v3/account_provisioning/docs/ListAccountOffering.md delete mode 100644 rest/api/v3/account_provisioning/docs/ListOffering.md delete mode 100644 rest/api/v3/account_provisioning/docs/OfferingsToAdd.md delete mode 100644 rest/api/v3/account_provisioning/docs/State.md delete mode 100644 rest/api/v3/account_provisioning/docs/State1.md delete mode 100644 rest/api/v3/account_provisioning/docs/Type.md delete mode 100644 rest/api/v3/account_provisioning/docs/UpdateAccountOffering.md delete mode 100644 rest/api/v3/account_provisioning/docs/UpdateAccountState.md delete mode 100644 rest/api/v3/account_provisioning/model_account_list.go delete mode 100644 rest/api/v3/account_provisioning/model_account_provisioning_account.go delete mode 100644 rest/api/v3/account_provisioning/model_account_provisioning_account_id.go delete mode 100644 rest/api/v3/account_provisioning/model_account_provisioning_catalog.go delete mode 100644 rest/api/v3/account_provisioning/model_account_provisioning_offering_list.go delete mode 100644 rest/api/v3/account_provisioning/model_account_provisioning_offering_v1.go delete mode 100644 rest/api/v3/account_provisioning/model_account_provisioning_pagination.go delete mode 100644 rest/api/v3/account_provisioning/model_account_provisioning_profile.go delete mode 100644 rest/api/v3/account_provisioning/model_account_provisioning_state_read.go delete mode 100644 rest/api/v3/account_provisioning/model_account_provisioning_state_write.go delete mode 100644 rest/api/v3/account_provisioning/model_catalog_entry.go delete mode 100644 rest/api/v3/account_provisioning/model_catalog_entry_entitlements.go delete mode 100644 rest/api/v3/account_provisioning/model_create_account_params.go delete mode 100644 rest/api/v3/account_provisioning/model_error_response.go delete mode 100644 rest/api/v3/account_provisioning/model_offerings_to_add.go delete mode 100644 rest/api/v3/account_provisioning/model_state.go delete mode 100644 rest/api/v3/account_provisioning/model_state1.go delete mode 100644 rest/api/v3/account_provisioning/model_type.go delete mode 100644 rest/api/v3/alerts/.openapi-generator delete mode 100644 rest/api/v3/alerts/.openapi-generator-ignore delete mode 100644 rest/api/v3/alerts/README.md delete mode 100644 rest/api/v3/alerts/api_create_alert.go delete mode 100644 rest/api/v3/alerts/api_delete_alert.go delete mode 100644 rest/api/v3/alerts/api_get_alert.go delete mode 100644 rest/api/v3/alerts/api_list_alert.go delete mode 100644 rest/api/v3/alerts/api_service.go delete mode 100644 rest/api/v3/alerts/api_update_alert.go delete mode 100644 rest/api/v3/alerts/docs/CreateAlert.md delete mode 100644 rest/api/v3/alerts/docs/CreateAlert201Response.md delete mode 100644 rest/api/v3/alerts/docs/CreateAlertRequest.md delete mode 100644 rest/api/v3/alerts/docs/DeleteAlert.md delete mode 100644 rest/api/v3/alerts/docs/ErrorResponse.md delete mode 100644 rest/api/v3/alerts/docs/ErrorResponseErrorsInner.md delete mode 100644 rest/api/v3/alerts/docs/GetAlert.md delete mode 100644 rest/api/v3/alerts/docs/GetAlert200Response.md delete mode 100644 rest/api/v3/alerts/docs/ListAlert.md delete mode 100644 rest/api/v3/alerts/docs/ListAlert200ResponseInner.md delete mode 100644 rest/api/v3/alerts/docs/Type.md delete mode 100644 rest/api/v3/alerts/docs/Type1.md delete mode 100644 rest/api/v3/alerts/docs/Type2.md delete mode 100644 rest/api/v3/alerts/docs/Type3.md delete mode 100644 rest/api/v3/alerts/docs/UpdateAlert.md delete mode 100644 rest/api/v3/alerts/docs/UpdateAlert200Response.md delete mode 100644 rest/api/v3/alerts/docs/UpdateAlertRequest.md delete mode 100644 rest/api/v3/alerts/model_create_alert_201_response.go delete mode 100644 rest/api/v3/alerts/model_create_alert_request.go delete mode 100644 rest/api/v3/alerts/model_error_response.go delete mode 100644 rest/api/v3/alerts/model_error_response_errors_inner.go delete mode 100644 rest/api/v3/alerts/model_get_alert_200_response.go delete mode 100644 rest/api/v3/alerts/model_list_alert_200_response_inner.go delete mode 100644 rest/api/v3/alerts/model_type.go delete mode 100644 rest/api/v3/alerts/model_type1.go delete mode 100644 rest/api/v3/alerts/model_type2.go delete mode 100644 rest/api/v3/alerts/model_type3.go delete mode 100644 rest/api/v3/alerts/model_update_alert_200_response.go delete mode 100644 rest/api/v3/alerts/model_update_alert_request.go delete mode 100644 rest/api/v3/api_keys/.openapi-generator delete mode 100644 rest/api/v3/api_keys/.openapi-generator-ignore delete mode 100644 rest/api/v3/api_keys/README.md delete mode 100644 rest/api/v3/api_keys/api_create_api_key.go delete mode 100644 rest/api/v3/api_keys/api_delete_api_key.go delete mode 100644 rest/api/v3/api_keys/api_get_api_key.go delete mode 100644 rest/api/v3/api_keys/api_list_api_key.go delete mode 100644 rest/api/v3/api_keys/api_service.go delete mode 100644 rest/api/v3/api_keys/api_update_api_key.go delete mode 100644 rest/api/v3/api_keys/api_update_api_key_name.go delete mode 100644 rest/api/v3/api_keys/docs/ApiKeyResponse.md delete mode 100644 rest/api/v3/api_keys/docs/ApiKeyScopesResponse.md delete mode 100644 rest/api/v3/api_keys/docs/CreateApiKey.md delete mode 100644 rest/api/v3/api_keys/docs/CreateApiKey201Response.md delete mode 100644 rest/api/v3/api_keys/docs/CreateApiKeyRequest.md delete mode 100644 rest/api/v3/api_keys/docs/DeleteApiKey.md delete mode 100644 rest/api/v3/api_keys/docs/ErrorResponse.md delete mode 100644 rest/api/v3/api_keys/docs/ErrorResponseErrorsInner.md delete mode 100644 rest/api/v3/api_keys/docs/GetApiKey.md delete mode 100644 rest/api/v3/api_keys/docs/GetApiKey200Response.md delete mode 100644 rest/api/v3/api_keys/docs/ListApiKey.md delete mode 100644 rest/api/v3/api_keys/docs/ListApiKey200Response.md delete mode 100644 rest/api/v3/api_keys/docs/UpdateApiKey.md delete mode 100644 rest/api/v3/api_keys/docs/UpdateApiKeyName.md delete mode 100644 rest/api/v3/api_keys/docs/UpdateApiKeyNameRequest.md delete mode 100644 rest/api/v3/api_keys/docs/UpdateApiKeyRequest.md delete mode 100644 rest/api/v3/api_keys/model_api_key_response.go delete mode 100644 rest/api/v3/api_keys/model_api_key_scopes_response.go delete mode 100644 rest/api/v3/api_keys/model_create_api_key_201_response.go delete mode 100644 rest/api/v3/api_keys/model_create_api_key_request.go delete mode 100644 rest/api/v3/api_keys/model_error_response.go delete mode 100644 rest/api/v3/api_keys/model_error_response_errors_inner.go delete mode 100644 rest/api/v3/api_keys/model_get_api_key_200_response.go delete mode 100644 rest/api/v3/api_keys/model_list_api_key_200_response.go delete mode 100644 rest/api/v3/api_keys/model_update_api_key_name_request.go delete mode 100644 rest/api/v3/api_keys/model_update_api_key_request.go delete mode 100644 rest/api/v3/domain_authentication/.openapi-generator delete mode 100644 rest/api/v3/domain_authentication/.openapi-generator-ignore delete mode 100644 rest/api/v3/domain_authentication/README.md delete mode 100644 rest/api/v3/domain_authentication/api_add_ip_to_authenticated_domain.go delete mode 100644 rest/api/v3/domain_authentication/api_associate_subuser_with_domain.go delete mode 100644 rest/api/v3/domain_authentication/api_associate_subuser_with_domain_multiple.go delete mode 100644 rest/api/v3/domain_authentication/api_authenticate_domain.go delete mode 100644 rest/api/v3/domain_authentication/api_delete_authenticated_domain.go delete mode 100644 rest/api/v3/domain_authentication/api_delete_ip_from_authenticated_domain.go delete mode 100644 rest/api/v3/domain_authentication/api_disassociate_authenticated_domain_from_user.go delete mode 100644 rest/api/v3/domain_authentication/api_disassociate_subuser_from_domain.go delete mode 100644 rest/api/v3/domain_authentication/api_email_dns_record.go delete mode 100644 rest/api/v3/domain_authentication/api_get_authenticated_domain.go delete mode 100644 rest/api/v3/domain_authentication/api_list_all_authenticated_domain_with_user.go delete mode 100644 rest/api/v3/domain_authentication/api_list_authenticated_domain.go delete mode 100644 rest/api/v3/domain_authentication/api_list_authenticated_domain_with_user.go delete mode 100644 rest/api/v3/domain_authentication/api_list_default_authenticated_domain.go delete mode 100644 rest/api/v3/domain_authentication/api_service.go delete mode 100644 rest/api/v3/domain_authentication/api_update_authenticated_domain.go delete mode 100644 rest/api/v3/domain_authentication/api_validate_authenticated_domain.go delete mode 100644 rest/api/v3/domain_authentication/docs/AddIpToAuthenticatedDomain.md delete mode 100644 rest/api/v3/domain_authentication/docs/AddIpToAuthenticatedDomainRequest.md delete mode 100644 rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomain.md delete mode 100644 rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomainMultiple.md delete mode 100644 rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomainRequest.md delete mode 100644 rest/api/v3/domain_authentication/docs/AuthenticateDomain.md delete mode 100644 rest/api/v3/domain_authentication/docs/AuthenticateDomainRequest.md delete mode 100644 rest/api/v3/domain_authentication/docs/AuthenticatedDomain.md delete mode 100644 rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpf.md delete mode 100644 rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDns.md delete mode 100644 rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsDkim.md delete mode 100644 rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsDomainSpf.md delete mode 100644 rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsMailServer.md delete mode 100644 rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsSubdomainSpf.md delete mode 100644 rest/api/v3/domain_authentication/docs/DeleteAuthenticatedDomain.md delete mode 100644 rest/api/v3/domain_authentication/docs/DeleteIpFromAuthenticatedDomain.md delete mode 100644 rest/api/v3/domain_authentication/docs/DisassociateAuthenticatedDomainFromUser.md delete mode 100644 rest/api/v3/domain_authentication/docs/DisassociateSubuserFromDomain.md delete mode 100644 rest/api/v3/domain_authentication/docs/EmailDnsRecord.md delete mode 100644 rest/api/v3/domain_authentication/docs/EmailDnsRecord400Response.md delete mode 100644 rest/api/v3/domain_authentication/docs/EmailDnsRecord400ResponseErrors.md delete mode 100644 rest/api/v3/domain_authentication/docs/EmailDnsRecordRequest.md delete mode 100644 rest/api/v3/domain_authentication/docs/GetAuthenticatedDomain.md delete mode 100644 rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser.md delete mode 100644 rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInner.md delete mode 100644 rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDns.md delete mode 100644 rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1.md delete mode 100644 rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname.md delete mode 100644 rest/api/v3/domain_authentication/docs/ListAuthenticatedDomain.md delete mode 100644 rest/api/v3/domain_authentication/docs/ListAuthenticatedDomainWithUser.md delete mode 100644 rest/api/v3/domain_authentication/docs/ListDefaultAuthenticatedDomain.md delete mode 100644 rest/api/v3/domain_authentication/docs/UpdateAuthenticatedDomain.md delete mode 100644 rest/api/v3/domain_authentication/docs/UpdateAuthenticatedDomainRequest.md delete mode 100644 rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain.md delete mode 100644 rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200Response.md delete mode 100644 rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResults.md delete mode 100644 rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsDkim1.md delete mode 100644 rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsMailCname.md delete mode 100644 rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsSpf.md delete mode 100644 rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain500Response.md delete mode 100644 rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain500ResponseErrorsInner.md delete mode 100644 rest/api/v3/domain_authentication/model_add_ip_to_authenticated_domain_request.go delete mode 100644 rest/api/v3/domain_authentication/model_associate_subuser_with_domain_request.go delete mode 100644 rest/api/v3/domain_authentication/model_authenticate_domain_request.go delete mode 100644 rest/api/v3/domain_authentication/model_authenticated_domain.go delete mode 100644 rest/api/v3/domain_authentication/model_authenticated_domain_spf.go delete mode 100644 rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns.go delete mode 100644 rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_dkim.go delete mode 100644 rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_domain_spf.go delete mode 100644 rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_mail_server.go delete mode 100644 rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_subdomain_spf.go delete mode 100644 rest/api/v3/domain_authentication/model_email_dns_record_400_response.go delete mode 100644 rest/api/v3/domain_authentication/model_email_dns_record_400_response_errors.go delete mode 100644 rest/api/v3/domain_authentication/model_email_dns_record_request.go delete mode 100644 rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner.go delete mode 100644 rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns.go delete mode 100644 rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns_dkim1.go delete mode 100644 rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns_mail_cname.go delete mode 100644 rest/api/v3/domain_authentication/model_update_authenticated_domain_request.go delete mode 100644 rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response.go delete mode 100644 rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results.go delete mode 100644 rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_dkim1.go delete mode 100644 rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_mail_cname.go delete mode 100644 rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_spf.go delete mode 100644 rest/api/v3/domain_authentication/model_validate_authenticated_domain_500_response.go delete mode 100644 rest/api/v3/domain_authentication/model_validate_authenticated_domain_500_response_errors_inner.go delete mode 100644 rest/api/v3/email_activity/.openapi-generator delete mode 100644 rest/api/v3/email_activity/.openapi-generator-ignore delete mode 100644 rest/api/v3/email_activity/README.md delete mode 100644 rest/api/v3/email_activity/api_download_csv.go delete mode 100644 rest/api/v3/email_activity/api_get_message.go delete mode 100644 rest/api/v3/email_activity/api_list_message.go delete mode 100644 rest/api/v3/email_activity/api_request_csv.go delete mode 100644 rest/api/v3/email_activity/api_service.go delete mode 100644 rest/api/v3/email_activity/docs/AbbvMessage.md delete mode 100644 rest/api/v3/email_activity/docs/BounceType.md delete mode 100644 rest/api/v3/email_activity/docs/BounceType1.md delete mode 100644 rest/api/v3/email_activity/docs/DownloadCsv.md delete mode 100644 rest/api/v3/email_activity/docs/DownloadCsv200Response.md delete mode 100644 rest/api/v3/email_activity/docs/EmailActivityResponseBaseProps.md delete mode 100644 rest/api/v3/email_activity/docs/Event.md delete mode 100644 rest/api/v3/email_activity/docs/EventName.md delete mode 100644 rest/api/v3/email_activity/docs/EventName1.md delete mode 100644 rest/api/v3/email_activity/docs/GetMessage.md delete mode 100644 rest/api/v3/email_activity/docs/GetMessage404Response.md delete mode 100644 rest/api/v3/email_activity/docs/GetMessage404ResponseErrorsInner.md delete mode 100644 rest/api/v3/email_activity/docs/ListMessage.md delete mode 100644 rest/api/v3/email_activity/docs/ListMessage200Response.md delete mode 100644 rest/api/v3/email_activity/docs/ListMessage400Response.md delete mode 100644 rest/api/v3/email_activity/docs/ListMessage400ResponseErrorsInner.md delete mode 100644 rest/api/v3/email_activity/docs/ListMessage429Response.md delete mode 100644 rest/api/v3/email_activity/docs/ListMessage429ResponseErrorsInner.md delete mode 100644 rest/api/v3/email_activity/docs/Message.md delete mode 100644 rest/api/v3/email_activity/docs/OutboundIpType.md delete mode 100644 rest/api/v3/email_activity/docs/OutboundIpType1.md delete mode 100644 rest/api/v3/email_activity/docs/RequestCsv.md delete mode 100644 rest/api/v3/email_activity/docs/RequestCsv202Response.md delete mode 100644 rest/api/v3/email_activity/docs/Status.md delete mode 100644 rest/api/v3/email_activity/docs/Status1.md delete mode 100644 rest/api/v3/email_activity/docs/Status2.md delete mode 100644 rest/api/v3/email_activity/docs/Status3.md delete mode 100644 rest/api/v3/email_activity/model_abbv__message.go delete mode 100644 rest/api/v3/email_activity/model_bounce_type.go delete mode 100644 rest/api/v3/email_activity/model_bounce_type1.go delete mode 100644 rest/api/v3/email_activity/model_download_csv_200_response.go delete mode 100644 rest/api/v3/email_activity/model_email_activity_response_base_props.go delete mode 100644 rest/api/v3/email_activity/model_event.go delete mode 100644 rest/api/v3/email_activity/model_event_name.go delete mode 100644 rest/api/v3/email_activity/model_event_name1.go delete mode 100644 rest/api/v3/email_activity/model_get_message_404_response.go delete mode 100644 rest/api/v3/email_activity/model_get_message_404_response_errors_inner.go delete mode 100644 rest/api/v3/email_activity/model_list_message_200_response.go delete mode 100644 rest/api/v3/email_activity/model_list_message_400_response.go delete mode 100644 rest/api/v3/email_activity/model_list_message_400_response_errors_inner.go delete mode 100644 rest/api/v3/email_activity/model_list_message_429_response.go delete mode 100644 rest/api/v3/email_activity/model_list_message_429_response_errors_inner.go delete mode 100644 rest/api/v3/email_activity/model_message.go delete mode 100644 rest/api/v3/email_activity/model_outbound_ip_type.go delete mode 100644 rest/api/v3/email_activity/model_outbound_ip_type1.go delete mode 100644 rest/api/v3/email_activity/model_request_csv_202_response.go delete mode 100644 rest/api/v3/email_activity/model_status.go delete mode 100644 rest/api/v3/email_activity/model_status1.go delete mode 100644 rest/api/v3/email_activity/model_status2.go delete mode 100644 rest/api/v3/email_activity/model_status3.go delete mode 100644 rest/api/v3/email_validation/.openapi-generator delete mode 100644 rest/api/v3/email_validation/.openapi-generator-ignore delete mode 100644 rest/api/v3/email_validation/README.md delete mode 100644 rest/api/v3/email_validation/api_get_email_job_for_verification.go delete mode 100644 rest/api/v3/email_validation/api_get_validations_email_jobs.go delete mode 100644 rest/api/v3/email_validation/api_list_email_job_for_verification.go delete mode 100644 rest/api/v3/email_validation/api_service.go delete mode 100644 rest/api/v3/email_validation/api_validate_email.go delete mode 100644 rest/api/v3/email_validation/docs/ErrorResponse.md delete mode 100644 rest/api/v3/email_validation/docs/ErrorResponseErrorsInner.md delete mode 100644 rest/api/v3/email_validation/docs/FileType.md delete mode 100644 rest/api/v3/email_validation/docs/GetEmailJobForVerification.md delete mode 100644 rest/api/v3/email_validation/docs/GetValidationsEmailJobs.md delete mode 100644 rest/api/v3/email_validation/docs/GetValidationsEmailJobs200Response.md delete mode 100644 rest/api/v3/email_validation/docs/GetValidationsEmailJobs200ResponseResultInner.md delete mode 100644 rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200Response.md delete mode 100644 rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200ResponseResult.md delete mode 100644 rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200ResponseResultErrorsInner.md delete mode 100644 rest/api/v3/email_validation/docs/ListEmailJobForVerification.md delete mode 100644 rest/api/v3/email_validation/docs/ListEmailJobForVerificationRequest.md delete mode 100644 rest/api/v3/email_validation/docs/PutValidationsEmailJobs200Response.md delete mode 100644 rest/api/v3/email_validation/docs/PutValidationsEmailJobs200ResponseUploadHeadersInner.md delete mode 100644 rest/api/v3/email_validation/docs/Status.md delete mode 100644 rest/api/v3/email_validation/docs/Status1.md delete mode 100644 rest/api/v3/email_validation/docs/ValidateEmail.md delete mode 100644 rest/api/v3/email_validation/docs/ValidateEmail200Response.md delete mode 100644 rest/api/v3/email_validation/docs/ValidateEmail200ResponseResult.md delete mode 100644 rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecks.md delete mode 100644 rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksAdditional.md delete mode 100644 rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksDomain.md delete mode 100644 rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksLocalPart.md delete mode 100644 rest/api/v3/email_validation/docs/ValidateEmailRequest.md delete mode 100644 rest/api/v3/email_validation/docs/Verdict.md delete mode 100644 rest/api/v3/email_validation/model_error_response.go delete mode 100644 rest/api/v3/email_validation/model_error_response_errors_inner.go delete mode 100644 rest/api/v3/email_validation/model_file_type.go delete mode 100644 rest/api/v3/email_validation/model_get_validations_email_jobs200_response.go delete mode 100644 rest/api/v3/email_validation/model_get_validations_email_jobs200_response_result_inner.go delete mode 100644 rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response.go delete mode 100644 rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response_result.go delete mode 100644 rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response_result_errors_inner.go delete mode 100644 rest/api/v3/email_validation/model_list_email_job_for_verification_request.go delete mode 100644 rest/api/v3/email_validation/model_put_validations_email_jobs200_response.go delete mode 100644 rest/api/v3/email_validation/model_put_validations_email_jobs200_response_upload_headers_inner.go delete mode 100644 rest/api/v3/email_validation/model_status.go delete mode 100644 rest/api/v3/email_validation/model_status1.go delete mode 100644 rest/api/v3/email_validation/model_validate_email_200_response.go delete mode 100644 rest/api/v3/email_validation/model_validate_email_200_response_result.go delete mode 100644 rest/api/v3/email_validation/model_validate_email_200_response_result_checks.go delete mode 100644 rest/api/v3/email_validation/model_validate_email_200_response_result_checks_additional.go delete mode 100644 rest/api/v3/email_validation/model_validate_email_200_response_result_checks_domain.go delete mode 100644 rest/api/v3/email_validation/model_validate_email_200_response_result_checks_local_part.go delete mode 100644 rest/api/v3/email_validation/model_validate_email_request.go delete mode 100644 rest/api/v3/email_validation/model_verdict.go delete mode 100644 rest/api/v3/enforced_tls/.openapi-generator delete mode 100644 rest/api/v3/enforced_tls/.openapi-generator-ignore delete mode 100644 rest/api/v3/enforced_tls/README.md delete mode 100644 rest/api/v3/enforced_tls/api_list_enforced_tls_setting.go delete mode 100644 rest/api/v3/enforced_tls/api_service.go delete mode 100644 rest/api/v3/enforced_tls/api_update_enforced_tls_setting.go delete mode 100644 rest/api/v3/enforced_tls/docs/EnforcedTlsRequestResponse.md delete mode 100644 rest/api/v3/enforced_tls/docs/ErrorResponse.md delete mode 100644 rest/api/v3/enforced_tls/docs/ErrorResponseErrorsInner.md delete mode 100644 rest/api/v3/enforced_tls/docs/ListEnforcedTlsSetting.md delete mode 100644 rest/api/v3/enforced_tls/docs/UpdateEnforcedTlsSetting.md delete mode 100644 rest/api/v3/enforced_tls/docs/Version.md delete mode 100644 rest/api/v3/enforced_tls/model_enforced_tls_request_response.go delete mode 100644 rest/api/v3/enforced_tls/model_error_response.go delete mode 100644 rest/api/v3/enforced_tls/model_error_response_errors_inner.go delete mode 100644 rest/api/v3/enforced_tls/model_version.go delete mode 100644 rest/api/v3/integrations/.openapi-generator delete mode 100644 rest/api/v3/integrations/.openapi-generator-ignore delete mode 100644 rest/api/v3/integrations/README.md delete mode 100644 rest/api/v3/integrations/api_add_integration.go delete mode 100644 rest/api/v3/integrations/api_delete_integration.go delete mode 100644 rest/api/v3/integrations/api_find_integration_by_id.go delete mode 100644 rest/api/v3/integrations/api_get_integrations_by_user.go delete mode 100644 rest/api/v3/integrations/api_service.go delete mode 100644 rest/api/v3/integrations/api_update_integration.go delete mode 100644 rest/api/v3/integrations/docs/AddIntegration.md delete mode 100644 rest/api/v3/integrations/docs/AddIntegration400Response.md delete mode 100644 rest/api/v3/integrations/docs/DeleteIntegration.md delete mode 100644 rest/api/v3/integrations/docs/DeleteIntegration400Response.md delete mode 100644 rest/api/v3/integrations/docs/DeleteIntegration404Response.md delete mode 100644 rest/api/v3/integrations/docs/Destination.md delete mode 100644 rest/api/v3/integrations/docs/Destination1.md delete mode 100644 rest/api/v3/integrations/docs/Destination2.md delete mode 100644 rest/api/v3/integrations/docs/Destination3.md delete mode 100644 rest/api/v3/integrations/docs/DestinationRegion.md delete mode 100644 rest/api/v3/integrations/docs/DestinationRegion1.md delete mode 100644 rest/api/v3/integrations/docs/DestinationRegion2.md delete mode 100644 rest/api/v3/integrations/docs/FindIntegrationById.md delete mode 100644 rest/api/v3/integrations/docs/Forbidden.md delete mode 100644 rest/api/v3/integrations/docs/GetIntegrationsByUser.md delete mode 100644 rest/api/v3/integrations/docs/GetIntegrationsByUser200Response.md delete mode 100644 rest/api/v3/integrations/docs/GetIntegrationsByUser403Response.md delete mode 100644 rest/api/v3/integrations/docs/GetIntegrationsByUser500Response.md delete mode 100644 rest/api/v3/integrations/docs/Id.md delete mode 100644 rest/api/v3/integrations/docs/Integration.md delete mode 100644 rest/api/v3/integrations/docs/IntegrationFilters.md delete mode 100644 rest/api/v3/integrations/docs/IntegrationInput.md delete mode 100644 rest/api/v3/integrations/docs/IntegrationInputFilters.md delete mode 100644 rest/api/v3/integrations/docs/IntegrationInputProperties.md delete mode 100644 rest/api/v3/integrations/docs/IntegrationNotFound.md delete mode 100644 rest/api/v3/integrations/docs/IntegrationPatch.md delete mode 100644 rest/api/v3/integrations/docs/IntegrationPatchFilters.md delete mode 100644 rest/api/v3/integrations/docs/IntegrationPatchProperties.md delete mode 100644 rest/api/v3/integrations/docs/IntegrationProperties.md delete mode 100644 rest/api/v3/integrations/docs/InternalError.md delete mode 100644 rest/api/v3/integrations/docs/InvalidDeleteRequest.md delete mode 100644 rest/api/v3/integrations/docs/InvalidRequest.md delete mode 100644 rest/api/v3/integrations/docs/Items.md delete mode 100644 rest/api/v3/integrations/docs/Items1.md delete mode 100644 rest/api/v3/integrations/docs/Items2.md delete mode 100644 rest/api/v3/integrations/docs/UpdateIntegration.md delete mode 100644 rest/api/v3/integrations/model_add_integration_400_response.go delete mode 100644 rest/api/v3/integrations/model_delete_integration_400_response.go delete mode 100644 rest/api/v3/integrations/model_delete_integration_404_response.go delete mode 100644 rest/api/v3/integrations/model_destination.go delete mode 100644 rest/api/v3/integrations/model_destination1.go delete mode 100644 rest/api/v3/integrations/model_destination2.go delete mode 100644 rest/api/v3/integrations/model_destination3.go delete mode 100644 rest/api/v3/integrations/model_destination_region.go delete mode 100644 rest/api/v3/integrations/model_destination_region1.go delete mode 100644 rest/api/v3/integrations/model_destination_region2.go delete mode 100644 rest/api/v3/integrations/model_forbidden.go delete mode 100644 rest/api/v3/integrations/model_get_integrations_by_user_200_response.go delete mode 100644 rest/api/v3/integrations/model_get_integrations_by_user_403_response.go delete mode 100644 rest/api/v3/integrations/model_get_integrations_by_user_500_response.go delete mode 100644 rest/api/v3/integrations/model_id.go delete mode 100644 rest/api/v3/integrations/model_integration.go delete mode 100644 rest/api/v3/integrations/model_integration_filters.go delete mode 100644 rest/api/v3/integrations/model_integration_input.go delete mode 100644 rest/api/v3/integrations/model_integration_input_filters.go delete mode 100644 rest/api/v3/integrations/model_integration_input_properties.go delete mode 100644 rest/api/v3/integrations/model_integration_not_found.go delete mode 100644 rest/api/v3/integrations/model_integration_patch.go delete mode 100644 rest/api/v3/integrations/model_integration_patch_filters.go delete mode 100644 rest/api/v3/integrations/model_integration_patch_properties.go delete mode 100644 rest/api/v3/integrations/model_integration_properties.go delete mode 100644 rest/api/v3/integrations/model_internal_error.go delete mode 100644 rest/api/v3/integrations/model_invalid_delete_request.go delete mode 100644 rest/api/v3/integrations/model_invalid_request.go delete mode 100644 rest/api/v3/integrations/model_items.go delete mode 100644 rest/api/v3/integrations/model_items1.go delete mode 100644 rest/api/v3/integrations/model_items2.go delete mode 100644 rest/api/v3/ip_access_management/.openapi-generator delete mode 100644 rest/api/v3/ip_access_management/.openapi-generator-ignore delete mode 100644 rest/api/v3/ip_access_management/README.md delete mode 100644 rest/api/v3/ip_access_management/api_add_ip_to_allow_list.go delete mode 100644 rest/api/v3/ip_access_management/api_delete_allowed_ip.go delete mode 100644 rest/api/v3/ip_access_management/api_delete_allowed_ips.go delete mode 100644 rest/api/v3/ip_access_management/api_get_allowed_ip.go delete mode 100644 rest/api/v3/ip_access_management/api_list_access_activity.go delete mode 100644 rest/api/v3/ip_access_management/api_list_allowed_ip.go delete mode 100644 rest/api/v3/ip_access_management/api_service.go delete mode 100644 rest/api/v3/ip_access_management/docs/AddIpToAllowList.md delete mode 100644 rest/api/v3/ip_access_management/docs/AddIpToAllowListRequest.md delete mode 100644 rest/api/v3/ip_access_management/docs/AddIpToAllowListRequestIpsInner.md delete mode 100644 rest/api/v3/ip_access_management/docs/DeleteAllowedIp.md delete mode 100644 rest/api/v3/ip_access_management/docs/DeleteAllowedIps.md delete mode 100644 rest/api/v3/ip_access_management/docs/DeleteAllowedIpsRequest.md delete mode 100644 rest/api/v3/ip_access_management/docs/ErrorResponse.md delete mode 100644 rest/api/v3/ip_access_management/docs/ErrorResponseErrorsInner.md delete mode 100644 rest/api/v3/ip_access_management/docs/GetAllowedIp.md delete mode 100644 rest/api/v3/ip_access_management/docs/IpAccessManagement2xx.md delete mode 100644 rest/api/v3/ip_access_management/docs/IpAccessManagement2xxResultInner.md delete mode 100644 rest/api/v3/ip_access_management/docs/ListAccessActivity.md delete mode 100644 rest/api/v3/ip_access_management/docs/ListAccessActivity200Response.md delete mode 100644 rest/api/v3/ip_access_management/docs/ListAccessActivity200ResponseResultInner.md delete mode 100644 rest/api/v3/ip_access_management/docs/ListAllowedIp.md delete mode 100644 rest/api/v3/ip_access_management/model_add_ip_to_allow_list_request.go delete mode 100644 rest/api/v3/ip_access_management/model_add_ip_to_allow_list_request_ips_inner.go delete mode 100644 rest/api/v3/ip_access_management/model_delete_allowed_ips_request.go delete mode 100644 rest/api/v3/ip_access_management/model_error_response.go delete mode 100644 rest/api/v3/ip_access_management/model_error_response_errors_inner.go delete mode 100644 rest/api/v3/ip_access_management/model_ip_access_management2xx.go delete mode 100644 rest/api/v3/ip_access_management/model_ip_access_management2xx_result_inner.go delete mode 100644 rest/api/v3/ip_access_management/model_list_access_activity_200_response.go delete mode 100644 rest/api/v3/ip_access_management/model_list_access_activity_200_response_result_inner.go delete mode 100644 rest/api/v3/ip_address_management/.openapi-generator delete mode 100644 rest/api/v3/ip_address_management/.openapi-generator-ignore delete mode 100644 rest/api/v3/ip_address_management/README.md delete mode 100644 rest/api/v3/ip_address_management/api_add_ip.go delete mode 100644 rest/api/v3/ip_address_management/api_add_ips_to_ip_pool.go delete mode 100644 rest/api/v3/ip_address_management/api_add_sub_users_to_ip.go delete mode 100644 rest/api/v3/ip_address_management/api_create_ip_pool.go delete mode 100644 rest/api/v3/ip_address_management/api_delete_ip_pool.go delete mode 100644 rest/api/v3/ip_address_management/api_delete_ips_from_ip_pool.go delete mode 100644 rest/api/v3/ip_address_management/api_delete_sub_users_from_ip.go delete mode 100644 rest/api/v3/ip_address_management/api_get_ip.go delete mode 100644 rest/api/v3/ip_address_management/api_get_ip_pool.go delete mode 100644 rest/api/v3/ip_address_management/api_list_ip.go delete mode 100644 rest/api/v3/ip_address_management/api_list_ip_assigned_to_ip_pool.go delete mode 100644 rest/api/v3/ip_address_management/api_list_ip_pool.go delete mode 100644 rest/api/v3/ip_address_management/api_list_sub_user_assigned_to_ip.go delete mode 100644 rest/api/v3/ip_address_management/api_service.go delete mode 100644 rest/api/v3/ip_address_management/api_update_ip.go delete mode 100644 rest/api/v3/ip_address_management/api_update_ip_pool.go delete mode 100644 rest/api/v3/ip_address_management/docs/AddIp.md delete mode 100644 rest/api/v3/ip_address_management/docs/AddIp201Response.md delete mode 100644 rest/api/v3/ip_address_management/docs/AddIpRequest.md delete mode 100644 rest/api/v3/ip_address_management/docs/AddIpsToIpPool.md delete mode 100644 rest/api/v3/ip_address_management/docs/AddIpsToIpPool200Response.md delete mode 100644 rest/api/v3/ip_address_management/docs/AddIpsToIpPoolRequest.md delete mode 100644 rest/api/v3/ip_address_management/docs/AddSubUsersToIp.md delete mode 100644 rest/api/v3/ip_address_management/docs/AddSubUsersToIp200Response.md delete mode 100644 rest/api/v3/ip_address_management/docs/AddSubUsersToIpRequest.md delete mode 100644 rest/api/v3/ip_address_management/docs/CreateIpPool.md delete mode 100644 rest/api/v3/ip_address_management/docs/CreateIpPool201Response.md delete mode 100644 rest/api/v3/ip_address_management/docs/CreateIpPoolRequest.md delete mode 100644 rest/api/v3/ip_address_management/docs/DeleteIpPool.md delete mode 100644 rest/api/v3/ip_address_management/docs/DeleteIpsFromIpPool.md delete mode 100644 rest/api/v3/ip_address_management/docs/DeleteIpsFromIpPoolRequest.md delete mode 100644 rest/api/v3/ip_address_management/docs/DeleteSubUsersFromIp.md delete mode 100644 rest/api/v3/ip_address_management/docs/DeleteSubUsersFromIpRequest.md delete mode 100644 rest/api/v3/ip_address_management/docs/GetIp.md delete mode 100644 rest/api/v3/ip_address_management/docs/GetIp200Response.md delete mode 100644 rest/api/v3/ip_address_management/docs/GetIp200ResponsePoolsInner.md delete mode 100644 rest/api/v3/ip_address_management/docs/GetIpPool.md delete mode 100644 rest/api/v3/ip_address_management/docs/GetIpPool200Response.md delete mode 100644 rest/api/v3/ip_address_management/docs/GetIpPool200ResponseIpCountByRegionInner.md delete mode 100644 rest/api/v3/ip_address_management/docs/IpAddressManagementErrorResponse.md delete mode 100644 rest/api/v3/ip_address_management/docs/IpAddressManagementErrorResponseErrorsInner.md delete mode 100644 rest/api/v3/ip_address_management/docs/Items.md delete mode 100644 rest/api/v3/ip_address_management/docs/ListIp.md delete mode 100644 rest/api/v3/ip_address_management/docs/ListIp200Response.md delete mode 100644 rest/api/v3/ip_address_management/docs/ListIp200ResponseMetadata.md delete mode 100644 rest/api/v3/ip_address_management/docs/ListIp200ResponseMetadataNextParams.md delete mode 100644 rest/api/v3/ip_address_management/docs/ListIp200ResponseResultInner.md delete mode 100644 rest/api/v3/ip_address_management/docs/ListIp200ResponseResultInnerPoolsInner.md delete mode 100644 rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool.md delete mode 100644 rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200Response.md delete mode 100644 rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseMetadata.md delete mode 100644 rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseMetadataNextParams.md delete mode 100644 rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseResultInner.md delete mode 100644 rest/api/v3/ip_address_management/docs/ListIpPool.md delete mode 100644 rest/api/v3/ip_address_management/docs/ListIpPool200Response.md delete mode 100644 rest/api/v3/ip_address_management/docs/ListIpPool200ResponseMetadata.md delete mode 100644 rest/api/v3/ip_address_management/docs/ListIpPool200ResponseMetadataNextParams.md delete mode 100644 rest/api/v3/ip_address_management/docs/ListIpPool200ResponseResultInner.md delete mode 100644 rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp.md delete mode 100644 rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200Response.md delete mode 100644 rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200ResponseMetadata.md delete mode 100644 rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200ResponseMetadataNextParams.md delete mode 100644 rest/api/v3/ip_address_management/docs/Region.md delete mode 100644 rest/api/v3/ip_address_management/docs/Region1.md delete mode 100644 rest/api/v3/ip_address_management/docs/Region2.md delete mode 100644 rest/api/v3/ip_address_management/docs/Region3.md delete mode 100644 rest/api/v3/ip_address_management/docs/Region4.md delete mode 100644 rest/api/v3/ip_address_management/docs/Region5.md delete mode 100644 rest/api/v3/ip_address_management/docs/Region6.md delete mode 100644 rest/api/v3/ip_address_management/docs/Region7.md delete mode 100644 rest/api/v3/ip_address_management/docs/UpdateIp.md delete mode 100644 rest/api/v3/ip_address_management/docs/UpdateIp200Response.md delete mode 100644 rest/api/v3/ip_address_management/docs/UpdateIpPool.md delete mode 100644 rest/api/v3/ip_address_management/docs/UpdateIpPool200Response.md delete mode 100644 rest/api/v3/ip_address_management/docs/UpdateIpPoolRequest.md delete mode 100644 rest/api/v3/ip_address_management/docs/UpdateIpRequest.md delete mode 100644 rest/api/v3/ip_address_management/model_add_ip_201_response.go delete mode 100644 rest/api/v3/ip_address_management/model_add_ip_request.go delete mode 100644 rest/api/v3/ip_address_management/model_add_ips_to_ip_pool_200_response.go delete mode 100644 rest/api/v3/ip_address_management/model_add_ips_to_ip_pool_request.go delete mode 100644 rest/api/v3/ip_address_management/model_add_sub_users_to_ip_200_response.go delete mode 100644 rest/api/v3/ip_address_management/model_add_sub_users_to_ip_request.go delete mode 100644 rest/api/v3/ip_address_management/model_create_ip_pool_201_response.go delete mode 100644 rest/api/v3/ip_address_management/model_create_ip_pool_request.go delete mode 100644 rest/api/v3/ip_address_management/model_delete_ips_from_ip_pool_request.go delete mode 100644 rest/api/v3/ip_address_management/model_delete_sub_users_from_ip_request.go delete mode 100644 rest/api/v3/ip_address_management/model_get_ip_200_response.go delete mode 100644 rest/api/v3/ip_address_management/model_get_ip_200_response_pools_inner.go delete mode 100644 rest/api/v3/ip_address_management/model_get_ip_pool_200_response.go delete mode 100644 rest/api/v3/ip_address_management/model_get_ip_pool_200_response_ip_count_by_region_inner.go delete mode 100644 rest/api/v3/ip_address_management/model_ip_address_management_error_response.go delete mode 100644 rest/api/v3/ip_address_management/model_ip_address_management_error_response_errors_inner.go delete mode 100644 rest/api/v3/ip_address_management/model_items.go delete mode 100644 rest/api/v3/ip_address_management/model_list_ip_200_response.go delete mode 100644 rest/api/v3/ip_address_management/model_list_ip_200_response__metadata.go delete mode 100644 rest/api/v3/ip_address_management/model_list_ip_200_response__metadata_next_params.go delete mode 100644 rest/api/v3/ip_address_management/model_list_ip_200_response_result_inner.go delete mode 100644 rest/api/v3/ip_address_management/model_list_ip_200_response_result_inner_pools_inner.go delete mode 100644 rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response.go delete mode 100644 rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response__metadata.go delete mode 100644 rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response__metadata_next_params.go delete mode 100644 rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response_result_inner.go delete mode 100644 rest/api/v3/ip_address_management/model_list_ip_pool_200_response.go delete mode 100644 rest/api/v3/ip_address_management/model_list_ip_pool_200_response__metadata.go delete mode 100644 rest/api/v3/ip_address_management/model_list_ip_pool_200_response__metadata_next_params.go delete mode 100644 rest/api/v3/ip_address_management/model_list_ip_pool_200_response_result_inner.go delete mode 100644 rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response.go delete mode 100644 rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response__metadata.go delete mode 100644 rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response__metadata_next_params.go delete mode 100644 rest/api/v3/ip_address_management/model_region.go delete mode 100644 rest/api/v3/ip_address_management/model_region1.go delete mode 100644 rest/api/v3/ip_address_management/model_region2.go delete mode 100644 rest/api/v3/ip_address_management/model_region3.go delete mode 100644 rest/api/v3/ip_address_management/model_region4.go delete mode 100644 rest/api/v3/ip_address_management/model_region5.go delete mode 100644 rest/api/v3/ip_address_management/model_region6.go delete mode 100644 rest/api/v3/ip_address_management/model_region7.go delete mode 100644 rest/api/v3/ip_address_management/model_update_ip_200_response.go delete mode 100644 rest/api/v3/ip_address_management/model_update_ip_pool_200_response.go delete mode 100644 rest/api/v3/ip_address_management/model_update_ip_pool_request.go delete mode 100644 rest/api/v3/ip_address_management/model_update_ip_request.go delete mode 100644 rest/api/v3/ip_warmup/.openapi-generator delete mode 100644 rest/api/v3/ip_warmup/.openapi-generator-ignore delete mode 100644 rest/api/v3/ip_warmup/README.md delete mode 100644 rest/api/v3/ip_warmup/api_get_warm_up_ip.go delete mode 100644 rest/api/v3/ip_warmup/api_list_warm_up_ip.go delete mode 100644 rest/api/v3/ip_warmup/api_service.go delete mode 100644 rest/api/v3/ip_warmup/api_stop_ip_warm_up.go delete mode 100644 rest/api/v3/ip_warmup/api_warm_up_ip.go delete mode 100644 rest/api/v3/ip_warmup/docs/GetWarmUpIp.md delete mode 100644 rest/api/v3/ip_warmup/docs/GetWarmUpIp404Response.md delete mode 100644 rest/api/v3/ip_warmup/docs/GetWarmUpIp404ResponseErrorsInner.md delete mode 100644 rest/api/v3/ip_warmup/docs/IpWarmup200Inner.md delete mode 100644 rest/api/v3/ip_warmup/docs/ListWarmUpIp.md delete mode 100644 rest/api/v3/ip_warmup/docs/StopIpWarmUp.md delete mode 100644 rest/api/v3/ip_warmup/docs/StopIpWarmUp404Response.md delete mode 100644 rest/api/v3/ip_warmup/docs/StopIpWarmUp404ResponseErrorsInner.md delete mode 100644 rest/api/v3/ip_warmup/docs/WarmUpIp.md delete mode 100644 rest/api/v3/ip_warmup/docs/WarmUpIp404Response.md delete mode 100644 rest/api/v3/ip_warmup/docs/WarmUpIp404ResponseErrorsInner.md delete mode 100644 rest/api/v3/ip_warmup/docs/WarmUpIpRequest.md delete mode 100644 rest/api/v3/ip_warmup/model_get_warm_up_ip_404_response.go delete mode 100644 rest/api/v3/ip_warmup/model_get_warm_up_ip_404_response_errors_inner.go delete mode 100644 rest/api/v3/ip_warmup/model_ip_warmup200_inner.go delete mode 100644 rest/api/v3/ip_warmup/model_stop_ip_warm_up_404_response.go delete mode 100644 rest/api/v3/ip_warmup/model_stop_ip_warm_up_404_response_errors_inner.go delete mode 100644 rest/api/v3/ip_warmup/model_warm_up_ip_404_response.go delete mode 100644 rest/api/v3/ip_warmup/model_warm_up_ip_404_response_errors_inner.go delete mode 100644 rest/api/v3/ip_warmup/model_warm_up_ip_request.go delete mode 100644 rest/api/v3/ips/.openapi-generator delete mode 100644 rest/api/v3/ips/.openapi-generator-ignore delete mode 100644 rest/api/v3/ips/README.md delete mode 100644 rest/api/v3/ips/api_add_ip.go delete mode 100644 rest/api/v3/ips/api_add_ip_to_ip_pool.go delete mode 100644 rest/api/v3/ips/api_create_ip_pool.go delete mode 100644 rest/api/v3/ips/api_delete_ip_from_ip_pool.go delete mode 100644 rest/api/v3/ips/api_delete_ip_pool.go delete mode 100644 rest/api/v3/ips/api_get_ip.go delete mode 100644 rest/api/v3/ips/api_get_ip_pool.go delete mode 100644 rest/api/v3/ips/api_list_assigned_ip.go delete mode 100644 rest/api/v3/ips/api_list_ip.go delete mode 100644 rest/api/v3/ips/api_list_ip_pool.go delete mode 100644 rest/api/v3/ips/api_list_remaining_ip_count.go delete mode 100644 rest/api/v3/ips/api_service.go delete mode 100644 rest/api/v3/ips/api_update_ip_pool.go delete mode 100644 rest/api/v3/ips/docs/AddIp.md delete mode 100644 rest/api/v3/ips/docs/AddIp201Response.md delete mode 100644 rest/api/v3/ips/docs/AddIp201ResponseIpsInner.md delete mode 100644 rest/api/v3/ips/docs/AddIpRequest.md delete mode 100644 rest/api/v3/ips/docs/AddIpToIpPool.md delete mode 100644 rest/api/v3/ips/docs/AddIpToIpPool201Response.md delete mode 100644 rest/api/v3/ips/docs/AddIpToIpPool404Response.md delete mode 100644 rest/api/v3/ips/docs/AddIpToIpPool404ResponseErrorsInner.md delete mode 100644 rest/api/v3/ips/docs/AddIpToIpPoolRequest.md delete mode 100644 rest/api/v3/ips/docs/CreateIpPool.md delete mode 100644 rest/api/v3/ips/docs/CreateIpPoolRequest.md delete mode 100644 rest/api/v3/ips/docs/DeleteIpFromIpPool.md delete mode 100644 rest/api/v3/ips/docs/DeleteIpFromIpPool404Response.md delete mode 100644 rest/api/v3/ips/docs/DeleteIpPool.md delete mode 100644 rest/api/v3/ips/docs/DeleteIpPool404Response.md delete mode 100644 rest/api/v3/ips/docs/ErrorResponse.md delete mode 100644 rest/api/v3/ips/docs/ErrorResponseErrorsInner.md delete mode 100644 rest/api/v3/ips/docs/GetIp.md delete mode 100644 rest/api/v3/ips/docs/GetIp200Response.md delete mode 100644 rest/api/v3/ips/docs/GetIpPool.md delete mode 100644 rest/api/v3/ips/docs/GetIpPool200Response.md delete mode 100644 rest/api/v3/ips/docs/GetIpPool404Response.md delete mode 100644 rest/api/v3/ips/docs/GetIpPool404ResponseErrorsInner.md delete mode 100644 rest/api/v3/ips/docs/IpPools200.md delete mode 100644 rest/api/v3/ips/docs/ListAssignedIp.md delete mode 100644 rest/api/v3/ips/docs/ListAssignedIp200ResponseInner.md delete mode 100644 rest/api/v3/ips/docs/ListIp.md delete mode 100644 rest/api/v3/ips/docs/ListIp200ResponseInner.md delete mode 100644 rest/api/v3/ips/docs/ListIpPool.md delete mode 100644 rest/api/v3/ips/docs/ListRemainingIpCount.md delete mode 100644 rest/api/v3/ips/docs/ListRemainingIpCount200Response.md delete mode 100644 rest/api/v3/ips/docs/ListRemainingIpCount200ResponseResultsInner.md delete mode 100644 rest/api/v3/ips/docs/SortByDirection.md delete mode 100644 rest/api/v3/ips/docs/UpdateIpPool.md delete mode 100644 rest/api/v3/ips/docs/UpdateIpPool404Response.md delete mode 100644 rest/api/v3/ips/docs/UpdateIpPool404ResponseErrorsInner.md delete mode 100644 rest/api/v3/ips/docs/UpdateIpPoolRequest.md delete mode 100644 rest/api/v3/ips/model_add_ip_201_response.go delete mode 100644 rest/api/v3/ips/model_add_ip_201_response_ips_inner.go delete mode 100644 rest/api/v3/ips/model_add_ip_request.go delete mode 100644 rest/api/v3/ips/model_add_ip_to_ip_pool_201_response.go delete mode 100644 rest/api/v3/ips/model_add_ip_to_ip_pool_404_response.go delete mode 100644 rest/api/v3/ips/model_add_ip_to_ip_pool_404_response_errors_inner.go delete mode 100644 rest/api/v3/ips/model_add_ip_to_ip_pool_request.go delete mode 100644 rest/api/v3/ips/model_create_ip_pool_request.go delete mode 100644 rest/api/v3/ips/model_delete_ip_from_ip_pool_404_response.go delete mode 100644 rest/api/v3/ips/model_delete_ip_pool_404_response.go delete mode 100644 rest/api/v3/ips/model_error_response.go delete mode 100644 rest/api/v3/ips/model_error_response_errors_inner.go delete mode 100644 rest/api/v3/ips/model_get_ip_200_response.go delete mode 100644 rest/api/v3/ips/model_get_ip_pool_200_response.go delete mode 100644 rest/api/v3/ips/model_get_ip_pool_404_response.go delete mode 100644 rest/api/v3/ips/model_get_ip_pool_404_response_errors_inner.go delete mode 100644 rest/api/v3/ips/model_ip_pools200.go delete mode 100644 rest/api/v3/ips/model_list_assigned_ip_200_response_inner.go delete mode 100644 rest/api/v3/ips/model_list_ip_200_response_inner.go delete mode 100644 rest/api/v3/ips/model_list_remaining_ip_count_200_response.go delete mode 100644 rest/api/v3/ips/model_list_remaining_ip_count_200_response_results_inner.go delete mode 100644 rest/api/v3/ips/model_sort_by_direction.go delete mode 100644 rest/api/v3/ips/model_update_ip_pool_404_response.go delete mode 100644 rest/api/v3/ips/model_update_ip_pool_404_response_errors_inner.go delete mode 100644 rest/api/v3/ips/model_update_ip_pool_request.go delete mode 100644 rest/api/v3/link_branding/.openapi-generator delete mode 100644 rest/api/v3/link_branding/.openapi-generator-ignore delete mode 100644 rest/api/v3/link_branding/README.md delete mode 100644 rest/api/v3/link_branding/api_associate_branded_link_with_subuser.go delete mode 100644 rest/api/v3/link_branding/api_create_branded_link.go delete mode 100644 rest/api/v3/link_branding/api_delete_branded_link.go delete mode 100644 rest/api/v3/link_branding/api_disassociate_branded_link_from_subuser.go delete mode 100644 rest/api/v3/link_branding/api_get_branded_link.go delete mode 100644 rest/api/v3/link_branding/api_list_branded_link.go delete mode 100644 rest/api/v3/link_branding/api_list_default_branded_link.go delete mode 100644 rest/api/v3/link_branding/api_list_subuser_branded_link.go delete mode 100644 rest/api/v3/link_branding/api_service.go delete mode 100644 rest/api/v3/link_branding/api_update_branded_link.go delete mode 100644 rest/api/v3/link_branding/api_validate_branded_link.go delete mode 100644 rest/api/v3/link_branding/docs/AssociateBrandedLinkWithSubuser.md delete mode 100644 rest/api/v3/link_branding/docs/AssociateBrandedLinkWithSubuserRequest.md delete mode 100644 rest/api/v3/link_branding/docs/CreateBrandedLink.md delete mode 100644 rest/api/v3/link_branding/docs/CreateBrandedLinkRequest.md delete mode 100644 rest/api/v3/link_branding/docs/Default.md delete mode 100644 rest/api/v3/link_branding/docs/Default1.md delete mode 100644 rest/api/v3/link_branding/docs/Default2.md delete mode 100644 rest/api/v3/link_branding/docs/DeleteBrandedLink.md delete mode 100644 rest/api/v3/link_branding/docs/DisassociateBrandedLinkFromSubuser.md delete mode 100644 rest/api/v3/link_branding/docs/GetBrandedLink.md delete mode 100644 rest/api/v3/link_branding/docs/Legacy.md delete mode 100644 rest/api/v3/link_branding/docs/LinkBranding200.md delete mode 100644 rest/api/v3/link_branding/docs/LinkBranding200Dns.md delete mode 100644 rest/api/v3/link_branding/docs/LinkBranding200DnsDomainCname.md delete mode 100644 rest/api/v3/link_branding/docs/LinkBranding200DnsOwnerCname.md delete mode 100644 rest/api/v3/link_branding/docs/ListBrandedLink.md delete mode 100644 rest/api/v3/link_branding/docs/ListDefaultBrandedLink.md delete mode 100644 rest/api/v3/link_branding/docs/ListSubuserBrandedLink.md delete mode 100644 rest/api/v3/link_branding/docs/Region.md delete mode 100644 rest/api/v3/link_branding/docs/Type.md delete mode 100644 rest/api/v3/link_branding/docs/Type1.md delete mode 100644 rest/api/v3/link_branding/docs/UpdateBrandedLink.md delete mode 100644 rest/api/v3/link_branding/docs/UpdateBrandedLinkRequest.md delete mode 100644 rest/api/v3/link_branding/docs/Valid.md delete mode 100644 rest/api/v3/link_branding/docs/Valid1.md delete mode 100644 rest/api/v3/link_branding/docs/Valid2.md delete mode 100644 rest/api/v3/link_branding/docs/Valid3.md delete mode 100644 rest/api/v3/link_branding/docs/Valid4.md delete mode 100644 rest/api/v3/link_branding/docs/Valid5.md delete mode 100644 rest/api/v3/link_branding/docs/ValidateBrandedLink.md delete mode 100644 rest/api/v3/link_branding/docs/ValidateBrandedLink200Response.md delete mode 100644 rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResults.md delete mode 100644 rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResultsDomainCname.md delete mode 100644 rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResultsOwnerCname.md delete mode 100644 rest/api/v3/link_branding/docs/ValidateBrandedLink500Response.md delete mode 100644 rest/api/v3/link_branding/docs/ValidateBrandedLink500ResponseErrorsInner.md delete mode 100644 rest/api/v3/link_branding/model_associate_branded_link_with_subuser_request.go delete mode 100644 rest/api/v3/link_branding/model_create_branded_link_request.go delete mode 100644 rest/api/v3/link_branding/model_default.go delete mode 100644 rest/api/v3/link_branding/model_default1.go delete mode 100644 rest/api/v3/link_branding/model_default2.go delete mode 100644 rest/api/v3/link_branding/model_legacy.go delete mode 100644 rest/api/v3/link_branding/model_link_branding200.go delete mode 100644 rest/api/v3/link_branding/model_link_branding200_dns.go delete mode 100644 rest/api/v3/link_branding/model_link_branding200_dns_domain_cname.go delete mode 100644 rest/api/v3/link_branding/model_link_branding200_dns_owner_cname.go delete mode 100644 rest/api/v3/link_branding/model_region.go delete mode 100644 rest/api/v3/link_branding/model_type.go delete mode 100644 rest/api/v3/link_branding/model_type1.go delete mode 100644 rest/api/v3/link_branding/model_update_branded_link_request.go delete mode 100644 rest/api/v3/link_branding/model_valid.go delete mode 100644 rest/api/v3/link_branding/model_valid1.go delete mode 100644 rest/api/v3/link_branding/model_valid2.go delete mode 100644 rest/api/v3/link_branding/model_valid3.go delete mode 100644 rest/api/v3/link_branding/model_valid4.go delete mode 100644 rest/api/v3/link_branding/model_valid5.go delete mode 100644 rest/api/v3/link_branding/model_validate_branded_link_200_response.go delete mode 100644 rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results.go delete mode 100644 rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results_domain_cname.go delete mode 100644 rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results_owner_cname.go delete mode 100644 rest/api/v3/link_branding/model_validate_branded_link_500_response.go delete mode 100644 rest/api/v3/link_branding/model_validate_branded_link_500_response_errors_inner.go delete mode 100644 rest/api/v3/lmc_campaigns/.openapi-generator delete mode 100644 rest/api/v3/lmc_campaigns/.openapi-generator-ignore delete mode 100644 rest/api/v3/lmc_campaigns/README.md delete mode 100644 rest/api/v3/lmc_campaigns/api_create_campaign.go delete mode 100644 rest/api/v3/lmc_campaigns/api_delete_campaign.go delete mode 100644 rest/api/v3/lmc_campaigns/api_get_campaign.go delete mode 100644 rest/api/v3/lmc_campaigns/api_get_scheduled_campaign.go delete mode 100644 rest/api/v3/lmc_campaigns/api_list_campaign.go delete mode 100644 rest/api/v3/lmc_campaigns/api_schedule_campaign.go delete mode 100644 rest/api/v3/lmc_campaigns/api_send_campaign.go delete mode 100644 rest/api/v3/lmc_campaigns/api_send_test_campaign.go delete mode 100644 rest/api/v3/lmc_campaigns/api_service.go delete mode 100644 rest/api/v3/lmc_campaigns/api_un_schedule_campaign.go delete mode 100644 rest/api/v3/lmc_campaigns/api_update_campaign.go delete mode 100644 rest/api/v3/lmc_campaigns/api_update_scheduled_campaign.go delete mode 100644 rest/api/v3/lmc_campaigns/docs/Campaigns2xx.md delete mode 100644 rest/api/v3/lmc_campaigns/docs/CreateCampaign.md delete mode 100644 rest/api/v3/lmc_campaigns/docs/DeleteCampaign.md delete mode 100644 rest/api/v3/lmc_campaigns/docs/Editor.md delete mode 100644 rest/api/v3/lmc_campaigns/docs/ErrorResponse.md delete mode 100644 rest/api/v3/lmc_campaigns/docs/ErrorResponseErrorsInner.md delete mode 100644 rest/api/v3/lmc_campaigns/docs/GetCampaign.md delete mode 100644 rest/api/v3/lmc_campaigns/docs/GetCampaign200Response.md delete mode 100644 rest/api/v3/lmc_campaigns/docs/GetScheduledCampaign.md delete mode 100644 rest/api/v3/lmc_campaigns/docs/ListCampaign.md delete mode 100644 rest/api/v3/lmc_campaigns/docs/ListCampaign200Response.md delete mode 100644 rest/api/v3/lmc_campaigns/docs/PostCampaignsRequest.md delete mode 100644 rest/api/v3/lmc_campaigns/docs/ScheduleACampaignRequest.md delete mode 100644 rest/api/v3/lmc_campaigns/docs/ScheduleACampaignResponse.md delete mode 100644 rest/api/v3/lmc_campaigns/docs/ScheduleCampaign.md delete mode 100644 rest/api/v3/lmc_campaigns/docs/SendACampaignResponse.md delete mode 100644 rest/api/v3/lmc_campaigns/docs/SendATestCampaignRequest.md delete mode 100644 rest/api/v3/lmc_campaigns/docs/SendCampaign.md delete mode 100644 rest/api/v3/lmc_campaigns/docs/SendTestCampaign.md delete mode 100644 rest/api/v3/lmc_campaigns/docs/SendTestCampaignRequest.md delete mode 100644 rest/api/v3/lmc_campaigns/docs/Status.md delete mode 100644 rest/api/v3/lmc_campaigns/docs/UnScheduleCampaign.md delete mode 100644 rest/api/v3/lmc_campaigns/docs/UpdateACampaignRequest.md delete mode 100644 rest/api/v3/lmc_campaigns/docs/UpdateAScheduledCampaignRequest.md delete mode 100644 rest/api/v3/lmc_campaigns/docs/UpdateAScheduledCampaignResponse.md delete mode 100644 rest/api/v3/lmc_campaigns/docs/UpdateCampaign.md delete mode 100644 rest/api/v3/lmc_campaigns/docs/UpdateScheduledCampaign.md delete mode 100644 rest/api/v3/lmc_campaigns/docs/ViewScheduledTimeOfACampaignResponse.md delete mode 100644 rest/api/v3/lmc_campaigns/model_campaigns2xx.go delete mode 100644 rest/api/v3/lmc_campaigns/model_editor.go delete mode 100644 rest/api/v3/lmc_campaigns/model_error_response.go delete mode 100644 rest/api/v3/lmc_campaigns/model_error_response_errors_inner.go delete mode 100644 rest/api/v3/lmc_campaigns/model_get_campaign_200_response.go delete mode 100644 rest/api/v3/lmc_campaigns/model_list_campaign_200_response.go delete mode 100644 rest/api/v3/lmc_campaigns/model_post_campaigns_request.go delete mode 100644 rest/api/v3/lmc_campaigns/model_schedule_a_campaign_request.go delete mode 100644 rest/api/v3/lmc_campaigns/model_schedule_a_campaign_response.go delete mode 100644 rest/api/v3/lmc_campaigns/model_send_a_campaign_response.go delete mode 100644 rest/api/v3/lmc_campaigns/model_send_a_test_campaign_request.go delete mode 100644 rest/api/v3/lmc_campaigns/model_send_test_campaign_request.go delete mode 100644 rest/api/v3/lmc_campaigns/model_status.go delete mode 100644 rest/api/v3/lmc_campaigns/model_update_a_campaign_request.go delete mode 100644 rest/api/v3/lmc_campaigns/model_update_a_scheduled_campaign_request.go delete mode 100644 rest/api/v3/lmc_campaigns/model_update_a_scheduled_campaign_response.go delete mode 100644 rest/api/v3/lmc_campaigns/model_view_scheduled_time_of_a_campaign_response.go delete mode 100644 rest/api/v3/lmc_contactdb/.openapi-generator delete mode 100644 rest/api/v3/lmc_contactdb/.openapi-generator-ignore delete mode 100644 rest/api/v3/lmc_contactdb/README.md delete mode 100644 rest/api/v3/lmc_contactdb/api_add_recipient.go delete mode 100644 rest/api/v3/lmc_contactdb/api_add_recipient_to_contact_db_list.go delete mode 100644 rest/api/v3/lmc_contactdb/api_add_recipients_to_contact_db_list.go delete mode 100644 rest/api/v3/lmc_contactdb/api_create_contact_db_list.go delete mode 100644 rest/api/v3/lmc_contactdb/api_create_custom_field.go delete mode 100644 rest/api/v3/lmc_contactdb/api_create_segment.go delete mode 100644 rest/api/v3/lmc_contactdb/api_delete_contact_db_list.go delete mode 100644 rest/api/v3/lmc_contactdb/api_delete_contact_db_lists.go delete mode 100644 rest/api/v3/lmc_contactdb/api_delete_custom_field.go delete mode 100644 rest/api/v3/lmc_contactdb/api_delete_recipient.go delete mode 100644 rest/api/v3/lmc_contactdb/api_delete_recipient_from_contact_db_list.go delete mode 100644 rest/api/v3/lmc_contactdb/api_delete_recipients.go delete mode 100644 rest/api/v3/lmc_contactdb/api_delete_segment.go delete mode 100644 rest/api/v3/lmc_contactdb/api_get_billable.go delete mode 100644 rest/api/v3/lmc_contactdb/api_get_contact_db_list.go delete mode 100644 rest/api/v3/lmc_contactdb/api_get_custom_field.go delete mode 100644 rest/api/v3/lmc_contactdb/api_get_recipient.go delete mode 100644 rest/api/v3/lmc_contactdb/api_get_recipient_list.go delete mode 100644 rest/api/v3/lmc_contactdb/api_get_segment.go delete mode 100644 rest/api/v3/lmc_contactdb/api_list_contact_db_list.go delete mode 100644 rest/api/v3/lmc_contactdb/api_list_custom_field.go delete mode 100644 rest/api/v3/lmc_contactdb/api_list_recipient.go delete mode 100644 rest/api/v3/lmc_contactdb/api_list_recipient_count.go delete mode 100644 rest/api/v3/lmc_contactdb/api_list_recipient_for_segment.go delete mode 100644 rest/api/v3/lmc_contactdb/api_list_recipients_from_contact_db_list.go delete mode 100644 rest/api/v3/lmc_contactdb/api_list_reserved_field.go delete mode 100644 rest/api/v3/lmc_contactdb/api_list_search_recipient.go delete mode 100644 rest/api/v3/lmc_contactdb/api_list_segment.go delete mode 100644 rest/api/v3/lmc_contactdb/api_list_status.go delete mode 100644 rest/api/v3/lmc_contactdb/api_search_recipient.go delete mode 100644 rest/api/v3/lmc_contactdb/api_service.go delete mode 100644 rest/api/v3/lmc_contactdb/api_update_contact_db_list.go delete mode 100644 rest/api/v3/lmc_contactdb/api_update_recipient.go delete mode 100644 rest/api/v3/lmc_contactdb/api_update_segment.go delete mode 100644 rest/api/v3/lmc_contactdb/docs/AddRecipient.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/AddRecipientRequestInner.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/AddRecipientToContactDbList.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/AddRecipientsToContactDbList.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/AndOr.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbCustomField.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbCustomFieldId2xx.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbCustomFieldIdValue.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbList2xx.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbRecipient200.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbRecipient200RecipientsInner.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbRecipientCount200.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbRecipientResponse201.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbRecipientResponse201ErrorsInner.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbSegments.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbSegmentsConditions.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbSegmentsId200.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/CreateAListRequest.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/CreateContactDbList.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/CreateCustomField.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/CreateCustomFieldRequest.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/CreateSegment.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/DeleteContactDbList.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/DeleteContactDbLists.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/DeleteContacts.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/DeleteCustomField.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/DeleteRecipient.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/DeleteRecipientFromContactDbList.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/DeleteRecipients.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/DeleteSegment.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ErrorResponse.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ErrorResponseErrorsInner.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/GetBillable.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/GetContactDbList.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/GetCustomField.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/GetRecipient.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/GetRecipientList.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/GetRecipientList200Response.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/GetSegment.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ListAllCustomFieldsResponse.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ListAllListsResponse.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ListAllSegmentsResponse.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ListContactDbList.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ListCustomField.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ListRecipient.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ListRecipientCount.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ListRecipientForSegment.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ListRecipientsFromContactDbList.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ListRecipientsFromContactDbList200Response.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ListRecipientsOnASegmentResponse.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ListRecipientsResponse.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ListReservedField.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ListReservedField200Response.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ListReservedField200ResponseReservedFieldsInner.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ListSearchRecipient.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ListSegment.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ListStatus.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ListStatus200Response.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/ListStatus200ResponseStatusInner.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/Operator.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/SearchRecipient.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/SearchRecipient200Response.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInner.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInnerCustomFieldsInner.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/SearchRecipientRequest.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/Type.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/UpdateAListRequest.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/UpdateContactDbList.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/UpdateContactDbList200Response.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/UpdateRecipient.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/UpdateRecipientRequestInner.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/UpdateSegment.md delete mode 100644 rest/api/v3/lmc_contactdb/docs/UpdateSegmentRequest.md delete mode 100644 rest/api/v3/lmc_contactdb/model_add_recipient_request_inner.go delete mode 100644 rest/api/v3/lmc_contactdb/model_and_or.go delete mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_custom_field.go delete mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_custom_field_id2xx.go delete mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_custom_field_id_value.go delete mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_list2xx.go delete mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_recipient200.go delete mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_recipient200_recipients_inner.go delete mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_recipient_count200.go delete mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_recipient_response201.go delete mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_recipient_response201_errors_inner.go delete mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_segments.go delete mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_segments_conditions.go delete mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_segments_id200.go delete mode 100644 rest/api/v3/lmc_contactdb/model_create_a_list_request.go delete mode 100644 rest/api/v3/lmc_contactdb/model_create_custom_field_request.go delete mode 100644 rest/api/v3/lmc_contactdb/model_delete_contacts.go delete mode 100644 rest/api/v3/lmc_contactdb/model_error_response.go delete mode 100644 rest/api/v3/lmc_contactdb/model_error_response_errors_inner.go delete mode 100644 rest/api/v3/lmc_contactdb/model_get_recipient_list_200_response.go delete mode 100644 rest/api/v3/lmc_contactdb/model_list_all_custom_fields_response.go delete mode 100644 rest/api/v3/lmc_contactdb/model_list_all_lists_response.go delete mode 100644 rest/api/v3/lmc_contactdb/model_list_all_segments_response.go delete mode 100644 rest/api/v3/lmc_contactdb/model_list_recipients_from_contact_db_list_200_response.go delete mode 100644 rest/api/v3/lmc_contactdb/model_list_recipients_on_a_segment_response.go delete mode 100644 rest/api/v3/lmc_contactdb/model_list_recipients_response.go delete mode 100644 rest/api/v3/lmc_contactdb/model_list_reserved_field_200_response.go delete mode 100644 rest/api/v3/lmc_contactdb/model_list_reserved_field_200_response_reserved_fields_inner.go delete mode 100644 rest/api/v3/lmc_contactdb/model_list_status_200_response.go delete mode 100644 rest/api/v3/lmc_contactdb/model_list_status_200_response_status_inner.go delete mode 100644 rest/api/v3/lmc_contactdb/model_operator.go delete mode 100644 rest/api/v3/lmc_contactdb/model_search_recipient_200_response.go delete mode 100644 rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner.go delete mode 100644 rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner_custom_fields_inner.go delete mode 100644 rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner_custom_fields_inner_value.go delete mode 100644 rest/api/v3/lmc_contactdb/model_search_recipient_request.go delete mode 100644 rest/api/v3/lmc_contactdb/model_type.go delete mode 100644 rest/api/v3/lmc_contactdb/model_update_a_list_request.go delete mode 100644 rest/api/v3/lmc_contactdb/model_update_contact_db_list_200_response.go delete mode 100644 rest/api/v3/lmc_contactdb/model_update_recipient_request_inner.go delete mode 100644 rest/api/v3/lmc_contactdb/model_update_segment_request.go delete mode 100644 rest/api/v3/lmc_senders/.openapi-generator delete mode 100644 rest/api/v3/lmc_senders/.openapi-generator-ignore delete mode 100644 rest/api/v3/lmc_senders/README.md delete mode 100644 rest/api/v3/lmc_senders/api_create_sender.go delete mode 100644 rest/api/v3/lmc_senders/api_delete_sender.go delete mode 100644 rest/api/v3/lmc_senders/api_get_sender.go delete mode 100644 rest/api/v3/lmc_senders/api_list_sender.go delete mode 100644 rest/api/v3/lmc_senders/api_reset_sender_verification.go delete mode 100644 rest/api/v3/lmc_senders/api_service.go delete mode 100644 rest/api/v3/lmc_senders/api_update_sender.go delete mode 100644 rest/api/v3/lmc_senders/docs/CreateSender.md delete mode 100644 rest/api/v3/lmc_senders/docs/CreateSender400Response.md delete mode 100644 rest/api/v3/lmc_senders/docs/CreateSender400ResponseErrorsInner.md delete mode 100644 rest/api/v3/lmc_senders/docs/CreateSenderRequest.md delete mode 100644 rest/api/v3/lmc_senders/docs/DeleteSender.md delete mode 100644 rest/api/v3/lmc_senders/docs/GetSender.md delete mode 100644 rest/api/v3/lmc_senders/docs/ListSender.md delete mode 100644 rest/api/v3/lmc_senders/docs/ListSender200Response.md delete mode 100644 rest/api/v3/lmc_senders/docs/ResetSenderVerification.md delete mode 100644 rest/api/v3/lmc_senders/docs/SenderId.md delete mode 100644 rest/api/v3/lmc_senders/docs/SenderIdRequest.md delete mode 100644 rest/api/v3/lmc_senders/docs/SenderIdRequestFrom.md delete mode 100644 rest/api/v3/lmc_senders/docs/SenderIdRequestReplyTo.md delete mode 100644 rest/api/v3/lmc_senders/docs/UpdateSender.md delete mode 100644 rest/api/v3/lmc_senders/model_create_sender_400_response.go delete mode 100644 rest/api/v3/lmc_senders/model_create_sender_400_response_errors_inner.go delete mode 100644 rest/api/v3/lmc_senders/model_create_sender_request.go delete mode 100644 rest/api/v3/lmc_senders/model_list_sender_200_response.go delete mode 100644 rest/api/v3/lmc_senders/model_sender_id.go delete mode 100644 rest/api/v3/lmc_senders/model_sender_id_request.go delete mode 100644 rest/api/v3/lmc_senders/model_sender_id_request_from.go delete mode 100644 rest/api/v3/lmc_senders/model_sender_id_request_reply_to.go delete mode 100644 rest/api/v3/mail/.openapi-generator delete mode 100644 rest/api/v3/mail/.openapi-generator-ignore delete mode 100644 rest/api/v3/mail/README.md delete mode 100644 rest/api/v3/mail/api_create_mail_batch.go delete mode 100644 rest/api/v3/mail/api_get_mail_batch.go delete mode 100644 rest/api/v3/mail/api_send_mail.go delete mode 100644 rest/api/v3/mail/api_service.go delete mode 100644 rest/api/v3/mail/docs/ContentEncoding.md delete mode 100644 rest/api/v3/mail/docs/CreateMailBatch.md delete mode 100644 rest/api/v3/mail/docs/Disposition.md delete mode 100644 rest/api/v3/mail/docs/ErrorResponse.md delete mode 100644 rest/api/v3/mail/docs/ErrorResponseErrorsInner.md delete mode 100644 rest/api/v3/mail/docs/GetMailBatch.md delete mode 100644 rest/api/v3/mail/docs/MailBatchResponse.md delete mode 100644 rest/api/v3/mail/docs/MailFrom.md delete mode 100644 rest/api/v3/mail/docs/MailTo.md delete mode 100644 rest/api/v3/mail/docs/SendMail.md delete mode 100644 rest/api/v3/mail/docs/SendMailRequest.md delete mode 100644 rest/api/v3/mail/docs/SendMailRequestAsm.md delete mode 100644 rest/api/v3/mail/docs/SendMailRequestAttachmentsInner.md delete mode 100644 rest/api/v3/mail/docs/SendMailRequestContentInner.md delete mode 100644 rest/api/v3/mail/docs/SendMailRequestMailSettings.md delete mode 100644 rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassBounceManagement.md delete mode 100644 rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassListManagement.md delete mode 100644 rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassSpamManagement.md delete mode 100644 rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassUnsubscribeManagement.md delete mode 100644 rest/api/v3/mail/docs/SendMailRequestMailSettingsFooter.md delete mode 100644 rest/api/v3/mail/docs/SendMailRequestMailSettingsSandboxMode.md delete mode 100644 rest/api/v3/mail/docs/SendMailRequestPersonalizationsInner.md delete mode 100644 rest/api/v3/mail/docs/SendMailRequestTrackingSettings.md delete mode 100644 rest/api/v3/mail/docs/SendMailRequestTrackingSettingsClickTracking.md delete mode 100644 rest/api/v3/mail/docs/SendMailRequestTrackingSettingsGanalytics.md delete mode 100644 rest/api/v3/mail/docs/SendMailRequestTrackingSettingsOpenTracking.md delete mode 100644 rest/api/v3/mail/docs/SendMailRequestTrackingSettingsSubscriptionTracking.md delete mode 100644 rest/api/v3/mail/model_content_encoding.go delete mode 100644 rest/api/v3/mail/model_disposition.go delete mode 100644 rest/api/v3/mail/model_error_response.go delete mode 100644 rest/api/v3/mail/model_error_response_errors_inner.go delete mode 100644 rest/api/v3/mail/model_mail_batch_response.go delete mode 100644 rest/api/v3/mail/model_mail_from.go delete mode 100644 rest/api/v3/mail/model_mail_to.go delete mode 100644 rest/api/v3/mail/model_send_mail_request.go delete mode 100644 rest/api/v3/mail/model_send_mail_request_asm.go delete mode 100644 rest/api/v3/mail/model_send_mail_request_attachments_inner.go delete mode 100644 rest/api/v3/mail/model_send_mail_request_content_inner.go delete mode 100644 rest/api/v3/mail/model_send_mail_request_mail_settings.go delete mode 100644 rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_bounce_management.go delete mode 100644 rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_list_management.go delete mode 100644 rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_spam_management.go delete mode 100644 rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_unsubscribe_management.go delete mode 100644 rest/api/v3/mail/model_send_mail_request_mail_settings_footer.go delete mode 100644 rest/api/v3/mail/model_send_mail_request_mail_settings_sandbox_mode.go delete mode 100644 rest/api/v3/mail/model_send_mail_request_personalizations_inner.go delete mode 100644 rest/api/v3/mail/model_send_mail_request_tracking_settings.go delete mode 100644 rest/api/v3/mail/model_send_mail_request_tracking_settings_click_tracking.go delete mode 100644 rest/api/v3/mail/model_send_mail_request_tracking_settings_ganalytics.go delete mode 100644 rest/api/v3/mail/model_send_mail_request_tracking_settings_open_tracking.go delete mode 100644 rest/api/v3/mail/model_send_mail_request_tracking_settings_subscription_tracking.go delete mode 100644 rest/api/v3/mail_settings/.openapi-generator delete mode 100644 rest/api/v3/mail_settings/.openapi-generator-ignore delete mode 100644 rest/api/v3/mail_settings/README.md delete mode 100644 rest/api/v3/mail_settings/api_list_address_whitelist.go delete mode 100644 rest/api/v3/mail_settings/api_list_bounce_purge.go delete mode 100644 rest/api/v3/mail_settings/api_list_footer.go delete mode 100644 rest/api/v3/mail_settings/api_list_forward_bounce.go delete mode 100644 rest/api/v3/mail_settings/api_list_forward_spam.go delete mode 100644 rest/api/v3/mail_settings/api_list_mail_setting.go delete mode 100644 rest/api/v3/mail_settings/api_list_template.go delete mode 100644 rest/api/v3/mail_settings/api_service.go delete mode 100644 rest/api/v3/mail_settings/api_update_address_whitelist.go delete mode 100644 rest/api/v3/mail_settings/api_update_bounce_purge.go delete mode 100644 rest/api/v3/mail_settings/api_update_footer.go delete mode 100644 rest/api/v3/mail_settings/api_update_forward_bounce.go delete mode 100644 rest/api/v3/mail_settings/api_update_forward_spam.go delete mode 100644 rest/api/v3/mail_settings/api_update_template.go delete mode 100644 rest/api/v3/mail_settings/docs/ListAddressWhitelist.md delete mode 100644 rest/api/v3/mail_settings/docs/ListBouncePurge.md delete mode 100644 rest/api/v3/mail_settings/docs/ListFooter.md delete mode 100644 rest/api/v3/mail_settings/docs/ListForwardBounce.md delete mode 100644 rest/api/v3/mail_settings/docs/ListForwardSpam.md delete mode 100644 rest/api/v3/mail_settings/docs/ListMailSetting.md delete mode 100644 rest/api/v3/mail_settings/docs/ListMailSetting200Response.md delete mode 100644 rest/api/v3/mail_settings/docs/ListMailSetting200ResponseResultInner.md delete mode 100644 rest/api/v3/mail_settings/docs/ListTemplate.md delete mode 100644 rest/api/v3/mail_settings/docs/MailSettingsAddressWhitelabel200.md delete mode 100644 rest/api/v3/mail_settings/docs/MailSettingsBouncePurge.md delete mode 100644 rest/api/v3/mail_settings/docs/MailSettingsFooter.md delete mode 100644 rest/api/v3/mail_settings/docs/MailSettingsForwardBounce.md delete mode 100644 rest/api/v3/mail_settings/docs/MailSettingsForwardSpam.md delete mode 100644 rest/api/v3/mail_settings/docs/MailSettingsTemplate200.md delete mode 100644 rest/api/v3/mail_settings/docs/UpdateAddressWhitelist.md delete mode 100644 rest/api/v3/mail_settings/docs/UpdateAddressWhitelistRequest.md delete mode 100644 rest/api/v3/mail_settings/docs/UpdateBouncePurge.md delete mode 100644 rest/api/v3/mail_settings/docs/UpdateFooter.md delete mode 100644 rest/api/v3/mail_settings/docs/UpdateForwardBounce.md delete mode 100644 rest/api/v3/mail_settings/docs/UpdateForwardSpam.md delete mode 100644 rest/api/v3/mail_settings/docs/UpdateTemplate.md delete mode 100644 rest/api/v3/mail_settings/docs/UpdateTemplate200Response.md delete mode 100644 rest/api/v3/mail_settings/docs/UpdateTemplateRequest.md delete mode 100644 rest/api/v3/mail_settings/model_list_mail_setting_200_response.go delete mode 100644 rest/api/v3/mail_settings/model_list_mail_setting_200_response_result_inner.go delete mode 100644 rest/api/v3/mail_settings/model_mail_settings_address_whitelabel200.go delete mode 100644 rest/api/v3/mail_settings/model_mail_settings_bounce_purge.go delete mode 100644 rest/api/v3/mail_settings/model_mail_settings_footer.go delete mode 100644 rest/api/v3/mail_settings/model_mail_settings_forward_bounce.go delete mode 100644 rest/api/v3/mail_settings/model_mail_settings_forward_spam.go delete mode 100644 rest/api/v3/mail_settings/model_mail_settings_template200.go delete mode 100644 rest/api/v3/mail_settings/model_update_address_whitelist_request.go delete mode 100644 rest/api/v3/mail_settings/model_update_template_200_response.go delete mode 100644 rest/api/v3/mail_settings/model_update_template_request.go delete mode 100644 rest/api/v3/mc_contacts/.openapi-generator delete mode 100644 rest/api/v3/mc_contacts/.openapi-generator-ignore delete mode 100644 rest/api/v3/mc_contacts/README.md delete mode 100644 rest/api/v3/mc_contacts/api_delete_contact.go delete mode 100644 rest/api/v3/mc_contacts/api_delete_contact_identifier.go delete mode 100644 rest/api/v3/mc_contacts/api_export_contact.go delete mode 100644 rest/api/v3/mc_contacts/api_get_contact.go delete mode 100644 rest/api/v3/mc_contacts/api_get_contact_by_identifiers.go delete mode 100644 rest/api/v3/mc_contacts/api_get_export_contact.go delete mode 100644 rest/api/v3/mc_contacts/api_get_import_contact.go delete mode 100644 rest/api/v3/mc_contacts/api_import_contact.go delete mode 100644 rest/api/v3/mc_contacts/api_list_batched_contact.go delete mode 100644 rest/api/v3/mc_contacts/api_list_contact.go delete mode 100644 rest/api/v3/mc_contacts/api_list_contact_by_email.go delete mode 100644 rest/api/v3/mc_contacts/api_list_contact_count.go delete mode 100644 rest/api/v3/mc_contacts/api_list_export_contact.go delete mode 100644 rest/api/v3/mc_contacts/api_search_contact.go delete mode 100644 rest/api/v3/mc_contacts/api_service.go delete mode 100644 rest/api/v3/mc_contacts/api_update_contact.go delete mode 100644 rest/api/v3/mc_contacts/docs/ContactDetails3.md delete mode 100644 rest/api/v3/mc_contacts/docs/ContactExport.md delete mode 100644 rest/api/v3/mc_contacts/docs/ContactImport.md delete mode 100644 rest/api/v3/mc_contacts/docs/ContactImportResults.md delete mode 100644 rest/api/v3/mc_contacts/docs/ContactRequest.md delete mode 100644 rest/api/v3/mc_contacts/docs/ContactRequestCustomFields.md delete mode 100644 rest/api/v3/mc_contacts/docs/ContactsError.md delete mode 100644 rest/api/v3/mc_contacts/docs/DeleteContact.md delete mode 100644 rest/api/v3/mc_contacts/docs/DeleteContact202Response.md delete mode 100644 rest/api/v3/mc_contacts/docs/DeleteContact400Response.md delete mode 100644 rest/api/v3/mc_contacts/docs/DeleteContactIdentifier.md delete mode 100644 rest/api/v3/mc_contacts/docs/DeleteContactIdentifier202Response.md delete mode 100644 rest/api/v3/mc_contacts/docs/DeleteContactIdentifierRequest.md delete mode 100644 rest/api/v3/mc_contacts/docs/ErrorResponse.md delete mode 100644 rest/api/v3/mc_contacts/docs/ErrorResponseErrorsInner.md delete mode 100644 rest/api/v3/mc_contacts/docs/ExportContact.md delete mode 100644 rest/api/v3/mc_contacts/docs/ExportContact202Response.md delete mode 100644 rest/api/v3/mc_contacts/docs/ExportContactRequest.md delete mode 100644 rest/api/v3/mc_contacts/docs/ExportContactRequestNotifications.md delete mode 100644 rest/api/v3/mc_contacts/docs/FileType.md delete mode 100644 rest/api/v3/mc_contacts/docs/FileType1.md delete mode 100644 rest/api/v3/mc_contacts/docs/GetContact.md delete mode 100644 rest/api/v3/mc_contacts/docs/GetContactByIdentifiers.md delete mode 100644 rest/api/v3/mc_contacts/docs/GetContactByIdentifiers200Response.md delete mode 100644 rest/api/v3/mc_contacts/docs/GetContactByIdentifiers200ResponseResultValue.md delete mode 100644 rest/api/v3/mc_contacts/docs/GetContactByIdentifiersRequest.md delete mode 100644 rest/api/v3/mc_contacts/docs/GetContactByIdentifiersRequestIdentifiersInner.md delete mode 100644 rest/api/v3/mc_contacts/docs/GetExportContact.md delete mode 100644 rest/api/v3/mc_contacts/docs/GetImportContact.md delete mode 100644 rest/api/v3/mc_contacts/docs/GetImportContact400Response.md delete mode 100644 rest/api/v3/mc_contacts/docs/IdentifierType.md delete mode 100644 rest/api/v3/mc_contacts/docs/IdentifierType1.md delete mode 100644 rest/api/v3/mc_contacts/docs/ImportContact.md delete mode 100644 rest/api/v3/mc_contacts/docs/ImportContact200Response.md delete mode 100644 rest/api/v3/mc_contacts/docs/ImportContact200ResponseUploadHeadersInner.md delete mode 100644 rest/api/v3/mc_contacts/docs/ImportContact400Response.md delete mode 100644 rest/api/v3/mc_contacts/docs/ImportContact404Response.md delete mode 100644 rest/api/v3/mc_contacts/docs/ImportContactRequest.md delete mode 100644 rest/api/v3/mc_contacts/docs/ListBatchedContact.md delete mode 100644 rest/api/v3/mc_contacts/docs/ListBatchedContact200Response.md delete mode 100644 rest/api/v3/mc_contacts/docs/ListBatchedContactRequest.md delete mode 100644 rest/api/v3/mc_contacts/docs/ListContact.md delete mode 100644 rest/api/v3/mc_contacts/docs/ListContact200Response.md delete mode 100644 rest/api/v3/mc_contacts/docs/ListContact400Response.md delete mode 100644 rest/api/v3/mc_contacts/docs/ListContactByEmail.md delete mode 100644 rest/api/v3/mc_contacts/docs/ListContactByEmail200Response.md delete mode 100644 rest/api/v3/mc_contacts/docs/ListContactByEmailRequest.md delete mode 100644 rest/api/v3/mc_contacts/docs/ListContactCount.md delete mode 100644 rest/api/v3/mc_contacts/docs/ListContactCount200Response.md delete mode 100644 rest/api/v3/mc_contacts/docs/ListContactCount200ResponseBillableBreakdown.md delete mode 100644 rest/api/v3/mc_contacts/docs/ListExportContact.md delete mode 100644 rest/api/v3/mc_contacts/docs/ListExportContact200Response.md delete mode 100644 rest/api/v3/mc_contacts/docs/ListExportContact200ResponseMetadata.md delete mode 100644 rest/api/v3/mc_contacts/docs/ListExportContact200ResponseResultInner.md delete mode 100644 rest/api/v3/mc_contacts/docs/ListExportContact200ResponseResultInnerMetadata.md delete mode 100644 rest/api/v3/mc_contacts/docs/ListExportContact200ResponseResultInnerSegmentsInner.md delete mode 100644 rest/api/v3/mc_contacts/docs/ListExportContact400Response.md delete mode 100644 rest/api/v3/mc_contacts/docs/ListExportContact400ResponseErrorsInner.md delete mode 100644 rest/api/v3/mc_contacts/docs/Metadata.md delete mode 100644 rest/api/v3/mc_contacts/docs/SearchContact.md delete mode 100644 rest/api/v3/mc_contacts/docs/SearchContact200Response.md delete mode 100644 rest/api/v3/mc_contacts/docs/SearchContact400Response.md delete mode 100644 rest/api/v3/mc_contacts/docs/SearchContact400ResponseErrorsInner.md delete mode 100644 rest/api/v3/mc_contacts/docs/SearchContact500Response.md delete mode 100644 rest/api/v3/mc_contacts/docs/SearchContact500ResponseErrorsInner.md delete mode 100644 rest/api/v3/mc_contacts/docs/SearchContactRequest.md delete mode 100644 rest/api/v3/mc_contacts/docs/SelfMetadata.md delete mode 100644 rest/api/v3/mc_contacts/docs/Status.md delete mode 100644 rest/api/v3/mc_contacts/docs/UpdateContact.md delete mode 100644 rest/api/v3/mc_contacts/docs/UpdateContact202Response.md delete mode 100644 rest/api/v3/mc_contacts/docs/UpdateContactRequest.md delete mode 100644 rest/api/v3/mc_contacts/model_contact_details3.go delete mode 100644 rest/api/v3/mc_contacts/model_contact_export.go delete mode 100644 rest/api/v3/mc_contacts/model_contact_import.go delete mode 100644 rest/api/v3/mc_contacts/model_contact_import_results.go delete mode 100644 rest/api/v3/mc_contacts/model_contact_request.go delete mode 100644 rest/api/v3/mc_contacts/model_contact_request_custom_fields.go delete mode 100644 rest/api/v3/mc_contacts/model_contacts_error.go delete mode 100644 rest/api/v3/mc_contacts/model_delete_contact_202_response.go delete mode 100644 rest/api/v3/mc_contacts/model_delete_contact_400_response.go delete mode 100644 rest/api/v3/mc_contacts/model_delete_contact_identifier_202_response.go delete mode 100644 rest/api/v3/mc_contacts/model_delete_contact_identifier_request.go delete mode 100644 rest/api/v3/mc_contacts/model_error_response.go delete mode 100644 rest/api/v3/mc_contacts/model_error_response_errors_inner.go delete mode 100644 rest/api/v3/mc_contacts/model_export_contact_202_response.go delete mode 100644 rest/api/v3/mc_contacts/model_export_contact_request.go delete mode 100644 rest/api/v3/mc_contacts/model_export_contact_request_notifications.go delete mode 100644 rest/api/v3/mc_contacts/model_file_type.go delete mode 100644 rest/api/v3/mc_contacts/model_file_type1.go delete mode 100644 rest/api/v3/mc_contacts/model_get_contact_by_identifiers_200_response.go delete mode 100644 rest/api/v3/mc_contacts/model_get_contact_by_identifiers_200_response_result_value.go delete mode 100644 rest/api/v3/mc_contacts/model_get_contact_by_identifiers_request.go delete mode 100644 rest/api/v3/mc_contacts/model_get_contact_by_identifiers_request_identifiers_inner.go delete mode 100644 rest/api/v3/mc_contacts/model_get_import_contact_400_response.go delete mode 100644 rest/api/v3/mc_contacts/model_identifier_type.go delete mode 100644 rest/api/v3/mc_contacts/model_identifier_type1.go delete mode 100644 rest/api/v3/mc_contacts/model_import_contact_200_response.go delete mode 100644 rest/api/v3/mc_contacts/model_import_contact_200_response_upload_headers_inner.go delete mode 100644 rest/api/v3/mc_contacts/model_import_contact_400_response.go delete mode 100644 rest/api/v3/mc_contacts/model_import_contact_404_response.go delete mode 100644 rest/api/v3/mc_contacts/model_import_contact_request.go delete mode 100644 rest/api/v3/mc_contacts/model_list_batched_contact_200_response.go delete mode 100644 rest/api/v3/mc_contacts/model_list_batched_contact_request.go delete mode 100644 rest/api/v3/mc_contacts/model_list_contact_200_response.go delete mode 100644 rest/api/v3/mc_contacts/model_list_contact_400_response.go delete mode 100644 rest/api/v3/mc_contacts/model_list_contact_by_email_200_response.go delete mode 100644 rest/api/v3/mc_contacts/model_list_contact_by_email_request.go delete mode 100644 rest/api/v3/mc_contacts/model_list_contact_count_200_response.go delete mode 100644 rest/api/v3/mc_contacts/model_list_contact_count_200_response_billable_breakdown.go delete mode 100644 rest/api/v3/mc_contacts/model_list_export_contact_200_response.go delete mode 100644 rest/api/v3/mc_contacts/model_list_export_contact_200_response__metadata.go delete mode 100644 rest/api/v3/mc_contacts/model_list_export_contact_200_response_result_inner.go delete mode 100644 rest/api/v3/mc_contacts/model_list_export_contact_200_response_result_inner__metadata.go delete mode 100644 rest/api/v3/mc_contacts/model_list_export_contact_200_response_result_inner_segments_inner.go delete mode 100644 rest/api/v3/mc_contacts/model_list_export_contact_400_response.go delete mode 100644 rest/api/v3/mc_contacts/model_list_export_contact_400_response_errors_inner.go delete mode 100644 rest/api/v3/mc_contacts/model_metadata.go delete mode 100644 rest/api/v3/mc_contacts/model_search_contact_200_response.go delete mode 100644 rest/api/v3/mc_contacts/model_search_contact_400_response.go delete mode 100644 rest/api/v3/mc_contacts/model_search_contact_400_response_errors_inner.go delete mode 100644 rest/api/v3/mc_contacts/model_search_contact_500_response.go delete mode 100644 rest/api/v3/mc_contacts/model_search_contact_500_response_errors_inner.go delete mode 100644 rest/api/v3/mc_contacts/model_search_contact_request.go delete mode 100644 rest/api/v3/mc_contacts/model_self_metadata.go delete mode 100644 rest/api/v3/mc_contacts/model_status.go delete mode 100644 rest/api/v3/mc_contacts/model_update_contact_202_response.go delete mode 100644 rest/api/v3/mc_contacts/model_update_contact_request.go delete mode 100644 rest/api/v3/mc_custom_fields/.openapi-generator delete mode 100644 rest/api/v3/mc_custom_fields/.openapi-generator-ignore delete mode 100644 rest/api/v3/mc_custom_fields/README.md delete mode 100644 rest/api/v3/mc_custom_fields/api_create_field_definition.go delete mode 100644 rest/api/v3/mc_custom_fields/api_delete_field_definition.go delete mode 100644 rest/api/v3/mc_custom_fields/api_list_field_definition.go delete mode 100644 rest/api/v3/mc_custom_fields/api_service.go delete mode 100644 rest/api/v3/mc_custom_fields/api_update_field_definition.go delete mode 100644 rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition.md delete mode 100644 rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition200Response.md delete mode 100644 rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition400Response.md delete mode 100644 rest/api/v3/mc_custom_fields/docs/CreateFieldDefinitionRequest.md delete mode 100644 rest/api/v3/mc_custom_fields/docs/CustomFieldDefinitionsResponse.md delete mode 100644 rest/api/v3/mc_custom_fields/docs/CustomFieldsError.md delete mode 100644 rest/api/v3/mc_custom_fields/docs/DeleteFieldDefinition.md delete mode 100644 rest/api/v3/mc_custom_fields/docs/FieldType.md delete mode 100644 rest/api/v3/mc_custom_fields/docs/FieldType1.md delete mode 100644 rest/api/v3/mc_custom_fields/docs/FieldType2.md delete mode 100644 rest/api/v3/mc_custom_fields/docs/ListFieldDefinition.md delete mode 100644 rest/api/v3/mc_custom_fields/docs/ListFieldDefinition200Response.md delete mode 100644 rest/api/v3/mc_custom_fields/docs/Metadata.md delete mode 100644 rest/api/v3/mc_custom_fields/docs/ReservedFieldDefinitionsResponseInner.md delete mode 100644 rest/api/v3/mc_custom_fields/docs/UpdateFieldDefinition.md delete mode 100644 rest/api/v3/mc_custom_fields/docs/UpdateFieldDefinitionRequest.md delete mode 100644 rest/api/v3/mc_custom_fields/model_create_field_definition_200_response.go delete mode 100644 rest/api/v3/mc_custom_fields/model_create_field_definition_400_response.go delete mode 100644 rest/api/v3/mc_custom_fields/model_create_field_definition_request.go delete mode 100644 rest/api/v3/mc_custom_fields/model_custom_field_definitions_response.go delete mode 100644 rest/api/v3/mc_custom_fields/model_custom_fields_error.go delete mode 100644 rest/api/v3/mc_custom_fields/model_field_type.go delete mode 100644 rest/api/v3/mc_custom_fields/model_field_type1.go delete mode 100644 rest/api/v3/mc_custom_fields/model_field_type2.go delete mode 100644 rest/api/v3/mc_custom_fields/model_list_field_definition_200_response.go delete mode 100644 rest/api/v3/mc_custom_fields/model_metadata.go delete mode 100644 rest/api/v3/mc_custom_fields/model_reserved_field_definitions_response_inner.go delete mode 100644 rest/api/v3/mc_custom_fields/model_update_field_definition_request.go delete mode 100644 rest/api/v3/mc_designs/.openapi-generator delete mode 100644 rest/api/v3/mc_designs/.openapi-generator-ignore delete mode 100644 rest/api/v3/mc_designs/README.md delete mode 100644 rest/api/v3/mc_designs/api_create_design.go delete mode 100644 rest/api/v3/mc_designs/api_delete_design.go delete mode 100644 rest/api/v3/mc_designs/api_duplicate_design.go delete mode 100644 rest/api/v3/mc_designs/api_duplicate_pre_built_design.go delete mode 100644 rest/api/v3/mc_designs/api_get_design.go delete mode 100644 rest/api/v3/mc_designs/api_get_pre_built_design.go delete mode 100644 rest/api/v3/mc_designs/api_list_design.go delete mode 100644 rest/api/v3/mc_designs/api_list_pre_built_design.go delete mode 100644 rest/api/v3/mc_designs/api_service.go delete mode 100644 rest/api/v3/mc_designs/api_update_design.go delete mode 100644 rest/api/v3/mc_designs/docs/ApiError.md delete mode 100644 rest/api/v3/mc_designs/docs/ApiErrors.md delete mode 100644 rest/api/v3/mc_designs/docs/CreateDesign.md delete mode 100644 rest/api/v3/mc_designs/docs/DeleteDesign.md delete mode 100644 rest/api/v3/mc_designs/docs/DesignCommonProperties.md delete mode 100644 rest/api/v3/mc_designs/docs/DesignDuplicateInput.md delete mode 100644 rest/api/v3/mc_designs/docs/DesignInput.md delete mode 100644 rest/api/v3/mc_designs/docs/DesignOutput.md delete mode 100644 rest/api/v3/mc_designs/docs/DesignOutputSummary.md delete mode 100644 rest/api/v3/mc_designs/docs/DuplicateDesign.md delete mode 100644 rest/api/v3/mc_designs/docs/DuplicatePreBuiltDesign.md delete mode 100644 rest/api/v3/mc_designs/docs/Editor.md delete mode 100644 rest/api/v3/mc_designs/docs/GetDesign.md delete mode 100644 rest/api/v3/mc_designs/docs/GetPreBuiltDesign.md delete mode 100644 rest/api/v3/mc_designs/docs/ListDesign.md delete mode 100644 rest/api/v3/mc_designs/docs/ListDesign200Response.md delete mode 100644 rest/api/v3/mc_designs/docs/ListPreBuiltDesign.md delete mode 100644 rest/api/v3/mc_designs/docs/Metadata.md delete mode 100644 rest/api/v3/mc_designs/docs/UpdateDesign.md delete mode 100644 rest/api/v3/mc_designs/docs/UpdateDesignRequest.md delete mode 100644 rest/api/v3/mc_designs/model_api_error.go delete mode 100644 rest/api/v3/mc_designs/model_api_errors.go delete mode 100644 rest/api/v3/mc_designs/model_design_common_properties.go delete mode 100644 rest/api/v3/mc_designs/model_design_duplicate_input.go delete mode 100644 rest/api/v3/mc_designs/model_design_input.go delete mode 100644 rest/api/v3/mc_designs/model_design_output.go delete mode 100644 rest/api/v3/mc_designs/model_design_output_summary.go delete mode 100644 rest/api/v3/mc_designs/model_editor.go delete mode 100644 rest/api/v3/mc_designs/model_list_design_200_response.go delete mode 100644 rest/api/v3/mc_designs/model_metadata.go delete mode 100644 rest/api/v3/mc_designs/model_update_design_request.go delete mode 100644 rest/api/v3/mc_lists/.openapi-generator delete mode 100644 rest/api/v3/mc_lists/.openapi-generator-ignore delete mode 100644 rest/api/v3/mc_lists/README.md delete mode 100644 rest/api/v3/mc_lists/api_create_marketing_list.go delete mode 100644 rest/api/v3/mc_lists/api_delete_contact.go delete mode 100644 rest/api/v3/mc_lists/api_delete_marketing_list.go delete mode 100644 rest/api/v3/mc_lists/api_get_marketing_list.go delete mode 100644 rest/api/v3/mc_lists/api_list_contact_count.go delete mode 100644 rest/api/v3/mc_lists/api_list_marketing_list.go delete mode 100644 rest/api/v3/mc_lists/api_service.go delete mode 100644 rest/api/v3/mc_lists/api_update_marketing_list.go delete mode 100644 rest/api/v3/mc_lists/docs/ContactDetails.md delete mode 100644 rest/api/v3/mc_lists/docs/CreateMarketingList.md delete mode 100644 rest/api/v3/mc_lists/docs/CreateMarketingList400Response.md delete mode 100644 rest/api/v3/mc_lists/docs/CreateMarketingListRequest.md delete mode 100644 rest/api/v3/mc_lists/docs/DeleteContact.md delete mode 100644 rest/api/v3/mc_lists/docs/DeleteContact202Response.md delete mode 100644 rest/api/v3/mc_lists/docs/DeleteMarketingList.md delete mode 100644 rest/api/v3/mc_lists/docs/DeleteMarketingList200Response.md delete mode 100644 rest/api/v3/mc_lists/docs/DeleteMarketingList404Response.md delete mode 100644 rest/api/v3/mc_lists/docs/Error.md delete mode 100644 rest/api/v3/mc_lists/docs/GetMarketingList.md delete mode 100644 rest/api/v3/mc_lists/docs/GetMarketingList200Response.md delete mode 100644 rest/api/v3/mc_lists/docs/List.md delete mode 100644 rest/api/v3/mc_lists/docs/ListContactCount.md delete mode 100644 rest/api/v3/mc_lists/docs/ListContactCount200Response.md delete mode 100644 rest/api/v3/mc_lists/docs/ListMarketingList.md delete mode 100644 rest/api/v3/mc_lists/docs/ListMarketingList200Response.md delete mode 100644 rest/api/v3/mc_lists/docs/Metadata.md delete mode 100644 rest/api/v3/mc_lists/docs/SelfMetadata.md delete mode 100644 rest/api/v3/mc_lists/docs/UpdateMarketingList.md delete mode 100644 rest/api/v3/mc_lists/docs/UpdateMarketingListRequest.md delete mode 100644 rest/api/v3/mc_lists/model_contact_details.go delete mode 100644 rest/api/v3/mc_lists/model_create_marketing_list_400_response.go delete mode 100644 rest/api/v3/mc_lists/model_create_marketing_list_request.go delete mode 100644 rest/api/v3/mc_lists/model_delete_contact_202_response.go delete mode 100644 rest/api/v3/mc_lists/model_delete_marketing_list_200_response.go delete mode 100644 rest/api/v3/mc_lists/model_delete_marketing_list_404_response.go delete mode 100644 rest/api/v3/mc_lists/model_error.go delete mode 100644 rest/api/v3/mc_lists/model_get_marketing_list_200_response.go delete mode 100644 rest/api/v3/mc_lists/model_list.go delete mode 100644 rest/api/v3/mc_lists/model_list_contact_count_200_response.go delete mode 100644 rest/api/v3/mc_lists/model_list_marketing_list_200_response.go delete mode 100644 rest/api/v3/mc_lists/model_metadata.go delete mode 100644 rest/api/v3/mc_lists/model_self_metadata.go delete mode 100644 rest/api/v3/mc_lists/model_update_marketing_list_request.go delete mode 100644 rest/api/v3/mc_segments/.openapi-generator delete mode 100644 rest/api/v3/mc_segments/.openapi-generator-ignore delete mode 100644 rest/api/v3/mc_segments/README.md delete mode 100644 rest/api/v3/mc_segments/api_delete_segment.go delete mode 100644 rest/api/v3/mc_segments/api_get_segment.go delete mode 100644 rest/api/v3/mc_segments/api_list_segment.go delete mode 100644 rest/api/v3/mc_segments/api_service.go delete mode 100644 rest/api/v3/mc_segments/docs/ContactResponse.md delete mode 100644 rest/api/v3/mc_segments/docs/ContactResponseCustomFields.md delete mode 100644 rest/api/v3/mc_segments/docs/DeleteSegment.md delete mode 100644 rest/api/v3/mc_segments/docs/ErrorResponse.md delete mode 100644 rest/api/v3/mc_segments/docs/ErrorResponseErrorsInner.md delete mode 100644 rest/api/v3/mc_segments/docs/FullSegment.md delete mode 100644 rest/api/v3/mc_segments/docs/GetSegment.md delete mode 100644 rest/api/v3/mc_segments/docs/GetSegment404Response.md delete mode 100644 rest/api/v3/mc_segments/docs/GetSegment404ResponseErrorsInner.md delete mode 100644 rest/api/v3/mc_segments/docs/ListSegment.md delete mode 100644 rest/api/v3/mc_segments/docs/ListSegment200Response.md delete mode 100644 rest/api/v3/mc_segments/docs/ListSegment500Response.md delete mode 100644 rest/api/v3/mc_segments/docs/ListSegment500ResponseErrorsInner.md delete mode 100644 rest/api/v3/mc_segments/docs/SegmentSummary.md delete mode 100644 rest/api/v3/mc_segments/docs/SegmentWriteV2.md delete mode 100644 rest/api/v3/mc_segments/model_contact_response.go delete mode 100644 rest/api/v3/mc_segments/model_contact_response_custom_fields.go delete mode 100644 rest/api/v3/mc_segments/model_error_response.go delete mode 100644 rest/api/v3/mc_segments/model_error_response_errors_inner.go delete mode 100644 rest/api/v3/mc_segments/model_full_segment.go delete mode 100644 rest/api/v3/mc_segments/model_get_segment_404_response.go delete mode 100644 rest/api/v3/mc_segments/model_get_segment_404_response_errors_inner.go delete mode 100644 rest/api/v3/mc_segments/model_list_segment_200_response.go delete mode 100644 rest/api/v3/mc_segments/model_list_segment_500_response.go delete mode 100644 rest/api/v3/mc_segments/model_list_segment_500_response_errors_inner.go delete mode 100644 rest/api/v3/mc_segments/model_segment_summary.go delete mode 100644 rest/api/v3/mc_segments/model_segment_write_v2.go delete mode 100644 rest/api/v3/mc_segments_2/.openapi-generator delete mode 100644 rest/api/v3/mc_segments_2/.openapi-generator-ignore delete mode 100644 rest/api/v3/mc_segments_2/README.md delete mode 100644 rest/api/v3/mc_segments_2/api_create_segment.go delete mode 100644 rest/api/v3/mc_segments_2/api_delete_segment.go delete mode 100644 rest/api/v3/mc_segments_2/api_get_segment.go delete mode 100644 rest/api/v3/mc_segments_2/api_list_segment.go delete mode 100644 rest/api/v3/mc_segments_2/api_refresh_segment.go delete mode 100644 rest/api/v3/mc_segments_2/api_service.go delete mode 100644 rest/api/v3/mc_segments_2/api_update_segment.go delete mode 100644 rest/api/v3/mc_segments_2/docs/AllSegments200.md delete mode 100644 rest/api/v3/mc_segments_2/docs/ContactResponse.md delete mode 100644 rest/api/v3/mc_segments_2/docs/ContactResponseCustomFields.md delete mode 100644 rest/api/v3/mc_segments_2/docs/CreateSegment.md delete mode 100644 rest/api/v3/mc_segments_2/docs/DeleteSegment.md delete mode 100644 rest/api/v3/mc_segments_2/docs/ErrorsSegmentV2.md delete mode 100644 rest/api/v3/mc_segments_2/docs/ErrorsSegmentV2ErrorsInner.md delete mode 100644 rest/api/v3/mc_segments_2/docs/GetSegment.md delete mode 100644 rest/api/v3/mc_segments_2/docs/ListSegment.md delete mode 100644 rest/api/v3/mc_segments_2/docs/Metadata.md delete mode 100644 rest/api/v3/mc_segments_2/docs/RefreshSegment.md delete mode 100644 rest/api/v3/mc_segments_2/docs/Segment2xx.md delete mode 100644 rest/api/v3/mc_segments_2/docs/SegmentError.md delete mode 100644 rest/api/v3/mc_segments_2/docs/SegmentRefresh202.md delete mode 100644 rest/api/v3/mc_segments_2/docs/SegmentRefreshRequest.md delete mode 100644 rest/api/v3/mc_segments_2/docs/SegmentStatusResponse.md delete mode 100644 rest/api/v3/mc_segments_2/docs/SegmentUpdate.md delete mode 100644 rest/api/v3/mc_segments_2/docs/SegmentWriteV2.md delete mode 100644 rest/api/v3/mc_segments_2/docs/UpdateSegment.md delete mode 100644 rest/api/v3/mc_segments_2/model_all_segments200.go delete mode 100644 rest/api/v3/mc_segments_2/model_contact_response.go delete mode 100644 rest/api/v3/mc_segments_2/model_contact_response_custom_fields.go delete mode 100644 rest/api/v3/mc_segments_2/model_errors_segment_v2.go delete mode 100644 rest/api/v3/mc_segments_2/model_errors_segment_v2_errors_inner.go delete mode 100644 rest/api/v3/mc_segments_2/model_metadata.go delete mode 100644 rest/api/v3/mc_segments_2/model_segment2xx.go delete mode 100644 rest/api/v3/mc_segments_2/model_segment_error.go delete mode 100644 rest/api/v3/mc_segments_2/model_segment_refresh202.go delete mode 100644 rest/api/v3/mc_segments_2/model_segment_refresh_request.go delete mode 100644 rest/api/v3/mc_segments_2/model_segment_status_response.go delete mode 100644 rest/api/v3/mc_segments_2/model_segment_update.go delete mode 100644 rest/api/v3/mc_segments_2/model_segment_write_v2.go delete mode 100644 rest/api/v3/mc_senders/.openapi-generator delete mode 100644 rest/api/v3/mc_senders/.openapi-generator-ignore delete mode 100644 rest/api/v3/mc_senders/README.md delete mode 100644 rest/api/v3/mc_senders/api_create_sender.go delete mode 100644 rest/api/v3/mc_senders/api_delete_sender.go delete mode 100644 rest/api/v3/mc_senders/api_get_sender.go delete mode 100644 rest/api/v3/mc_senders/api_list_sender.go delete mode 100644 rest/api/v3/mc_senders/api_reset_sender_verification.go delete mode 100644 rest/api/v3/mc_senders/api_service.go delete mode 100644 rest/api/v3/mc_senders/api_update_sender.go delete mode 100644 rest/api/v3/mc_senders/docs/CreateSender.md delete mode 100644 rest/api/v3/mc_senders/docs/CreateSenderRequest.md delete mode 100644 rest/api/v3/mc_senders/docs/CreateSenderRequestFrom.md delete mode 100644 rest/api/v3/mc_senders/docs/CreateSenderRequestReplyTo.md delete mode 100644 rest/api/v3/mc_senders/docs/DeleteSender.md delete mode 100644 rest/api/v3/mc_senders/docs/ErrorResponse.md delete mode 100644 rest/api/v3/mc_senders/docs/ErrorResponseErrorsInner.md delete mode 100644 rest/api/v3/mc_senders/docs/GetSender.md delete mode 100644 rest/api/v3/mc_senders/docs/ListSender.md delete mode 100644 rest/api/v3/mc_senders/docs/ListSender200Response.md delete mode 100644 rest/api/v3/mc_senders/docs/ResetSenderVerification.md delete mode 100644 rest/api/v3/mc_senders/docs/Sender.md delete mode 100644 rest/api/v3/mc_senders/docs/SenderRequest.md delete mode 100644 rest/api/v3/mc_senders/docs/SenderRequestFrom.md delete mode 100644 rest/api/v3/mc_senders/docs/SenderRequestReplyTo.md delete mode 100644 rest/api/v3/mc_senders/docs/UpdateSender.md delete mode 100644 rest/api/v3/mc_senders/model_create_sender_request.go delete mode 100644 rest/api/v3/mc_senders/model_create_sender_request_from.go delete mode 100644 rest/api/v3/mc_senders/model_create_sender_request_reply_to.go delete mode 100644 rest/api/v3/mc_senders/model_error_response.go delete mode 100644 rest/api/v3/mc_senders/model_error_response_errors_inner.go delete mode 100644 rest/api/v3/mc_senders/model_list_sender_200_response.go delete mode 100644 rest/api/v3/mc_senders/model_sender.go delete mode 100644 rest/api/v3/mc_senders/model_sender_request.go delete mode 100644 rest/api/v3/mc_senders/model_sender_request_from.go delete mode 100644 rest/api/v3/mc_senders/model_sender_request_reply_to.go delete mode 100644 rest/api/v3/mc_singlesends/.openapi-generator delete mode 100644 rest/api/v3/mc_singlesends/.openapi-generator-ignore delete mode 100644 rest/api/v3/mc_singlesends/README.md delete mode 100644 rest/api/v3/mc_singlesends/api_create_single_send.go delete mode 100644 rest/api/v3/mc_singlesends/api_delete_scheduled_single_send.go delete mode 100644 rest/api/v3/mc_singlesends/api_delete_single_send.go delete mode 100644 rest/api/v3/mc_singlesends/api_delete_single_sends.go delete mode 100644 rest/api/v3/mc_singlesends/api_duplicate_single_send.go delete mode 100644 rest/api/v3/mc_singlesends/api_get_single_send.go delete mode 100644 rest/api/v3/mc_singlesends/api_list_category.go delete mode 100644 rest/api/v3/mc_singlesends/api_list_single_send.go delete mode 100644 rest/api/v3/mc_singlesends/api_schedule_single_send.go delete mode 100644 rest/api/v3/mc_singlesends/api_search_single_send.go delete mode 100644 rest/api/v3/mc_singlesends/api_service.go delete mode 100644 rest/api/v3/mc_singlesends/api_update_single_send.go delete mode 100644 rest/api/v3/mc_singlesends/docs/AbTestSummary.md delete mode 100644 rest/api/v3/mc_singlesends/docs/CreateSingleSend.md delete mode 100644 rest/api/v3/mc_singlesends/docs/DeleteScheduledSingleSend.md delete mode 100644 rest/api/v3/mc_singlesends/docs/DeleteSingleSend.md delete mode 100644 rest/api/v3/mc_singlesends/docs/DeleteSingleSends.md delete mode 100644 rest/api/v3/mc_singlesends/docs/DuplicateSingleSend.md delete mode 100644 rest/api/v3/mc_singlesends/docs/DuplicateSingleSendRequest.md delete mode 100644 rest/api/v3/mc_singlesends/docs/Editor.md delete mode 100644 rest/api/v3/mc_singlesends/docs/Editor1.md delete mode 100644 rest/api/v3/mc_singlesends/docs/GetSingleSend.md delete mode 100644 rest/api/v3/mc_singlesends/docs/Items.md delete mode 100644 rest/api/v3/mc_singlesends/docs/ListCategory.md delete mode 100644 rest/api/v3/mc_singlesends/docs/ListCategory200Response.md delete mode 100644 rest/api/v3/mc_singlesends/docs/ListSingleSend.md delete mode 100644 rest/api/v3/mc_singlesends/docs/ListSingleSend200Response.md delete mode 100644 rest/api/v3/mc_singlesends/docs/ListSingleSend500Response.md delete mode 100644 rest/api/v3/mc_singlesends/docs/ListSingleSend500ResponseErrorsInner.md delete mode 100644 rest/api/v3/mc_singlesends/docs/Metadata.md delete mode 100644 rest/api/v3/mc_singlesends/docs/ScheduleSingleSend.md delete mode 100644 rest/api/v3/mc_singlesends/docs/ScheduleSingleSend201Response.md delete mode 100644 rest/api/v3/mc_singlesends/docs/ScheduleSingleSendRequest.md delete mode 100644 rest/api/v3/mc_singlesends/docs/SearchSingleSend.md delete mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendRequest.md delete mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendRequestEmailConfig.md delete mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendRequestSendTo.md delete mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendResponse.md delete mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendResponseEmailConfig.md delete mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendResponseSendTo.md delete mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendResponseShort.md delete mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendResponseWarningsInner.md delete mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendSchedule.md delete mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendSearch.md delete mode 100644 rest/api/v3/mc_singlesends/docs/Status.md delete mode 100644 rest/api/v3/mc_singlesends/docs/Status1.md delete mode 100644 rest/api/v3/mc_singlesends/docs/Status2.md delete mode 100644 rest/api/v3/mc_singlesends/docs/Status3.md delete mode 100644 rest/api/v3/mc_singlesends/docs/Type.md delete mode 100644 rest/api/v3/mc_singlesends/docs/UpdateSingleSend.md delete mode 100644 rest/api/v3/mc_singlesends/docs/WinnerCriteria.md delete mode 100644 rest/api/v3/mc_singlesends/model_ab_test_summary.go delete mode 100644 rest/api/v3/mc_singlesends/model_duplicate_single_send_request.go delete mode 100644 rest/api/v3/mc_singlesends/model_editor.go delete mode 100644 rest/api/v3/mc_singlesends/model_editor1.go delete mode 100644 rest/api/v3/mc_singlesends/model_items.go delete mode 100644 rest/api/v3/mc_singlesends/model_list_category_200_response.go delete mode 100644 rest/api/v3/mc_singlesends/model_list_single_send_200_response.go delete mode 100644 rest/api/v3/mc_singlesends/model_list_single_send_500_response.go delete mode 100644 rest/api/v3/mc_singlesends/model_list_single_send_500_response_errors_inner.go delete mode 100644 rest/api/v3/mc_singlesends/model_metadata.go delete mode 100644 rest/api/v3/mc_singlesends/model_schedule_single_send_201_response.go delete mode 100644 rest/api/v3/mc_singlesends/model_schedule_single_send_request.go delete mode 100644 rest/api/v3/mc_singlesends/model_singlesend_request.go delete mode 100644 rest/api/v3/mc_singlesends/model_singlesend_request_email_config.go delete mode 100644 rest/api/v3/mc_singlesends/model_singlesend_request_send_to.go delete mode 100644 rest/api/v3/mc_singlesends/model_singlesend_response.go delete mode 100644 rest/api/v3/mc_singlesends/model_singlesend_response_email_config.go delete mode 100644 rest/api/v3/mc_singlesends/model_singlesend_response_send_to.go delete mode 100644 rest/api/v3/mc_singlesends/model_singlesend_response_short.go delete mode 100644 rest/api/v3/mc_singlesends/model_singlesend_response_warnings_inner.go delete mode 100644 rest/api/v3/mc_singlesends/model_singlesend_schedule.go delete mode 100644 rest/api/v3/mc_singlesends/model_singlesend_search.go delete mode 100644 rest/api/v3/mc_singlesends/model_status.go delete mode 100644 rest/api/v3/mc_singlesends/model_status1.go delete mode 100644 rest/api/v3/mc_singlesends/model_status2.go delete mode 100644 rest/api/v3/mc_singlesends/model_status3.go delete mode 100644 rest/api/v3/mc_singlesends/model_type.go delete mode 100644 rest/api/v3/mc_singlesends/model_winner_criteria.go delete mode 100644 rest/api/v3/mc_stats/.openapi-generator delete mode 100644 rest/api/v3/mc_stats/.openapi-generator-ignore delete mode 100644 rest/api/v3/mc_stats/README.md delete mode 100644 rest/api/v3/mc_stats/api_export_automation_stat.go delete mode 100644 rest/api/v3/mc_stats/api_export_single_send_stat.go delete mode 100644 rest/api/v3/mc_stats/api_get_automation_stat.go delete mode 100644 rest/api/v3/mc_stats/api_get_single_send_stat.go delete mode 100644 rest/api/v3/mc_stats/api_list_automation_stat.go delete mode 100644 rest/api/v3/mc_stats/api_list_click_tracking_stat.go delete mode 100644 rest/api/v3/mc_stats/api_list_single_send_stat.go delete mode 100644 rest/api/v3/mc_stats/api_list_single_send_tracking_stat.go delete mode 100644 rest/api/v3/mc_stats/api_service.go delete mode 100644 rest/api/v3/mc_stats/docs/AbPhase.md delete mode 100644 rest/api/v3/mc_stats/docs/AbPhase1.md delete mode 100644 rest/api/v3/mc_stats/docs/AbPhaseId.md delete mode 100644 rest/api/v3/mc_stats/docs/AggregatedBy.md delete mode 100644 rest/api/v3/mc_stats/docs/AutmoationsLinkStatsResponse.md delete mode 100644 rest/api/v3/mc_stats/docs/AutmoationsLinkStatsResponseResultsInner.md delete mode 100644 rest/api/v3/mc_stats/docs/AutomationsResponse.md delete mode 100644 rest/api/v3/mc_stats/docs/AutomationsResponseResultsInner.md delete mode 100644 rest/api/v3/mc_stats/docs/ErrorResponse.md delete mode 100644 rest/api/v3/mc_stats/docs/ErrorResponseErrorsInner.md delete mode 100644 rest/api/v3/mc_stats/docs/ExportAutomationStat.md delete mode 100644 rest/api/v3/mc_stats/docs/ExportSingleSendStat.md delete mode 100644 rest/api/v3/mc_stats/docs/GetAutomationStat.md delete mode 100644 rest/api/v3/mc_stats/docs/GetSingleSendStat.md delete mode 100644 rest/api/v3/mc_stats/docs/Items.md delete mode 100644 rest/api/v3/mc_stats/docs/Items1.md delete mode 100644 rest/api/v3/mc_stats/docs/Items2.md delete mode 100644 rest/api/v3/mc_stats/docs/LinkTrackingMetadata.md delete mode 100644 rest/api/v3/mc_stats/docs/ListAutomationStat.md delete mode 100644 rest/api/v3/mc_stats/docs/ListClickTrackingStat.md delete mode 100644 rest/api/v3/mc_stats/docs/ListSingleSendStat.md delete mode 100644 rest/api/v3/mc_stats/docs/ListSingleSendTrackingStat.md delete mode 100644 rest/api/v3/mc_stats/docs/Metadata.md delete mode 100644 rest/api/v3/mc_stats/docs/Metrics.md delete mode 100644 rest/api/v3/mc_stats/docs/SinglesendsLinkStatsResponse.md delete mode 100644 rest/api/v3/mc_stats/docs/SinglesendsLinkStatsResponseResultsInner.md delete mode 100644 rest/api/v3/mc_stats/docs/SinglesendsResponse.md delete mode 100644 rest/api/v3/mc_stats/docs/SinglesendsResponseResultsInner.md delete mode 100644 rest/api/v3/mc_stats/model_ab_phase.go delete mode 100644 rest/api/v3/mc_stats/model_ab_phase1.go delete mode 100644 rest/api/v3/mc_stats/model_ab_phase_id.go delete mode 100644 rest/api/v3/mc_stats/model_aggregated_by.go delete mode 100644 rest/api/v3/mc_stats/model_autmoations_link_stats_response.go delete mode 100644 rest/api/v3/mc_stats/model_autmoations_link_stats_response_results_inner.go delete mode 100644 rest/api/v3/mc_stats/model_automations_response.go delete mode 100644 rest/api/v3/mc_stats/model_automations_response_results_inner.go delete mode 100644 rest/api/v3/mc_stats/model_error_response.go delete mode 100644 rest/api/v3/mc_stats/model_error_response_errors_inner.go delete mode 100644 rest/api/v3/mc_stats/model_items.go delete mode 100644 rest/api/v3/mc_stats/model_items1.go delete mode 100644 rest/api/v3/mc_stats/model_items2.go delete mode 100644 rest/api/v3/mc_stats/model_link_tracking_metadata.go delete mode 100644 rest/api/v3/mc_stats/model_metadata.go delete mode 100644 rest/api/v3/mc_stats/model_metrics.go delete mode 100644 rest/api/v3/mc_stats/model_singlesends_link_stats_response.go delete mode 100644 rest/api/v3/mc_stats/model_singlesends_link_stats_response_results_inner.go delete mode 100644 rest/api/v3/mc_stats/model_singlesends_response.go delete mode 100644 rest/api/v3/mc_stats/model_singlesends_response_results_inner.go delete mode 100644 rest/api/v3/mc_test/.openapi-generator delete mode 100644 rest/api/v3/mc_test/.openapi-generator-ignore delete mode 100644 rest/api/v3/mc_test/README.md delete mode 100644 rest/api/v3/mc_test/api_send_test_marketing_email.go delete mode 100644 rest/api/v3/mc_test/api_service.go delete mode 100644 rest/api/v3/mc_test/docs/ErrorResponse.md delete mode 100644 rest/api/v3/mc_test/docs/ErrorResponseErrorsInner.md delete mode 100644 rest/api/v3/mc_test/docs/SendTestMarketingEmail.md delete mode 100644 rest/api/v3/mc_test/docs/SendTestMarketingEmailRequest.md delete mode 100644 rest/api/v3/mc_test/model_error_response.go delete mode 100644 rest/api/v3/mc_test/model_error_response_errors_inner.go delete mode 100644 rest/api/v3/mc_test/model_send_test_marketing_email_request.go delete mode 100644 rest/api/v3/partner/.openapi-generator delete mode 100644 rest/api/v3/partner/.openapi-generator-ignore delete mode 100644 rest/api/v3/partner/README.md delete mode 100644 rest/api/v3/partner/api_list_partner_setting.go delete mode 100644 rest/api/v3/partner/api_service.go delete mode 100644 rest/api/v3/partner/docs/ListPartnerSetting.md delete mode 100644 rest/api/v3/partner/docs/ListPartnerSetting200Response.md delete mode 100644 rest/api/v3/partner/docs/ListPartnerSetting200ResponseResultInner.md delete mode 100644 rest/api/v3/partner/model_list_partner_setting_200_response.go delete mode 100644 rest/api/v3/partner/model_list_partner_setting_200_response_result_inner.go delete mode 100644 rest/api/v3/recipients_data_erasure/.openapi-generator delete mode 100644 rest/api/v3/recipients_data_erasure/.openapi-generator-ignore delete mode 100644 rest/api/v3/recipients_data_erasure/README.md delete mode 100644 rest/api/v3/recipients_data_erasure/api_erase_recipient_email_data.go delete mode 100644 rest/api/v3/recipients_data_erasure/api_service.go delete mode 100644 rest/api/v3/recipients_data_erasure/docs/EraseRecipientEmailData.md delete mode 100644 rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureEraseRecipientsRequest.md delete mode 100644 rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureErrorV1.md delete mode 100644 rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureJobId.md delete mode 100644 rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_erase_recipients_request.go delete mode 100644 rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_error_v1.go delete mode 100644 rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_job_id.go delete mode 100644 rest/api/v3/reverse_dns/.openapi-generator delete mode 100644 rest/api/v3/reverse_dns/.openapi-generator-ignore delete mode 100644 rest/api/v3/reverse_dns/README.md delete mode 100644 rest/api/v3/reverse_dns/api_delete_reverse_dns.go delete mode 100644 rest/api/v3/reverse_dns/api_get_reverse_dns.go delete mode 100644 rest/api/v3/reverse_dns/api_list_reverse_dns.go delete mode 100644 rest/api/v3/reverse_dns/api_service.go delete mode 100644 rest/api/v3/reverse_dns/api_set_up_reverse_dns.go delete mode 100644 rest/api/v3/reverse_dns/api_validate_reverse_dns.go delete mode 100644 rest/api/v3/reverse_dns/docs/DeleteReverseDns.md delete mode 100644 rest/api/v3/reverse_dns/docs/GetReverseDns.md delete mode 100644 rest/api/v3/reverse_dns/docs/ListReverseDns.md delete mode 100644 rest/api/v3/reverse_dns/docs/ReverseDns.md delete mode 100644 rest/api/v3/reverse_dns/docs/ReverseDnsARecord.md delete mode 100644 rest/api/v3/reverse_dns/docs/ReverseDnsUsersInner.md delete mode 100644 rest/api/v3/reverse_dns/docs/SetUpReverseDns.md delete mode 100644 rest/api/v3/reverse_dns/docs/SetUpReverseDnsRequest.md delete mode 100644 rest/api/v3/reverse_dns/docs/Valid.md delete mode 100644 rest/api/v3/reverse_dns/docs/Valid1.md delete mode 100644 rest/api/v3/reverse_dns/docs/ValidateReverseDns.md delete mode 100644 rest/api/v3/reverse_dns/docs/ValidateReverseDns200Response.md delete mode 100644 rest/api/v3/reverse_dns/docs/ValidateReverseDns200ResponseValidationResults.md delete mode 100644 rest/api/v3/reverse_dns/docs/ValidateReverseDns200ResponseValidationResultsARecord.md delete mode 100644 rest/api/v3/reverse_dns/docs/ValidateReverseDns404Response.md delete mode 100644 rest/api/v3/reverse_dns/docs/ValidateReverseDns404ResponseErrorsInner.md delete mode 100644 rest/api/v3/reverse_dns/docs/ValidateReverseDns500Response.md delete mode 100644 rest/api/v3/reverse_dns/docs/ValidateReverseDns500ResponseErrorsInner.md delete mode 100644 rest/api/v3/reverse_dns/model_reverse_dns.go delete mode 100644 rest/api/v3/reverse_dns/model_reverse_dns_a_record.go delete mode 100644 rest/api/v3/reverse_dns/model_reverse_dns_users_inner.go delete mode 100644 rest/api/v3/reverse_dns/model_set_up_reverse_dns_request.go delete mode 100644 rest/api/v3/reverse_dns/model_valid.go delete mode 100644 rest/api/v3/reverse_dns/model_valid1.go delete mode 100644 rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response.go delete mode 100644 rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response_validation_results.go delete mode 100644 rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response_validation_results_a_record.go delete mode 100644 rest/api/v3/reverse_dns/model_validate_reverse_dns_404_response.go delete mode 100644 rest/api/v3/reverse_dns/model_validate_reverse_dns_404_response_errors_inner.go delete mode 100644 rest/api/v3/reverse_dns/model_validate_reverse_dns_500_response.go delete mode 100644 rest/api/v3/reverse_dns/model_validate_reverse_dns_500_response_errors_inner.go delete mode 100644 rest/api/v3/scheduled_sends/.openapi-generator delete mode 100644 rest/api/v3/scheduled_sends/.openapi-generator-ignore delete mode 100644 rest/api/v3/scheduled_sends/README.md delete mode 100644 rest/api/v3/scheduled_sends/api_create_scheduled_send.go delete mode 100644 rest/api/v3/scheduled_sends/api_delete_scheduled_send.go delete mode 100644 rest/api/v3/scheduled_sends/api_get_scheduled_send.go delete mode 100644 rest/api/v3/scheduled_sends/api_list_scheduled_send.go delete mode 100644 rest/api/v3/scheduled_sends/api_service.go delete mode 100644 rest/api/v3/scheduled_sends/api_update_scheduled_send.go delete mode 100644 rest/api/v3/scheduled_sends/docs/CancelOrPauseAScheduledSendRequest.md delete mode 100644 rest/api/v3/scheduled_sends/docs/CreateScheduledSend.md delete mode 100644 rest/api/v3/scheduled_sends/docs/DeleteScheduledSend.md delete mode 100644 rest/api/v3/scheduled_sends/docs/ErrorResponse.md delete mode 100644 rest/api/v3/scheduled_sends/docs/ErrorResponseErrorsInner.md delete mode 100644 rest/api/v3/scheduled_sends/docs/GetScheduledSend.md delete mode 100644 rest/api/v3/scheduled_sends/docs/ListScheduledSend.md delete mode 100644 rest/api/v3/scheduled_sends/docs/MailBatchId.md delete mode 100644 rest/api/v3/scheduled_sends/docs/ScheduledSendStatus.md delete mode 100644 rest/api/v3/scheduled_sends/docs/Status.md delete mode 100644 rest/api/v3/scheduled_sends/docs/Status1.md delete mode 100644 rest/api/v3/scheduled_sends/docs/Status2.md delete mode 100644 rest/api/v3/scheduled_sends/docs/UpdateScheduledSend.md delete mode 100644 rest/api/v3/scheduled_sends/docs/UpdateScheduledSendRequest.md delete mode 100644 rest/api/v3/scheduled_sends/model_cancel_or_pause_a_scheduled_send_request.go delete mode 100644 rest/api/v3/scheduled_sends/model_error_response.go delete mode 100644 rest/api/v3/scheduled_sends/model_error_response_errors_inner.go delete mode 100644 rest/api/v3/scheduled_sends/model_mail_batch_id.go delete mode 100644 rest/api/v3/scheduled_sends/model_scheduled_send_status.go delete mode 100644 rest/api/v3/scheduled_sends/model_status.go delete mode 100644 rest/api/v3/scheduled_sends/model_status1.go delete mode 100644 rest/api/v3/scheduled_sends/model_status2.go delete mode 100644 rest/api/v3/scheduled_sends/model_update_scheduled_send_request.go delete mode 100644 rest/api/v3/scopes/.openapi-generator delete mode 100644 rest/api/v3/scopes/.openapi-generator-ignore delete mode 100644 rest/api/v3/scopes/README.md delete mode 100644 rest/api/v3/scopes/api_approve_scope_request.go delete mode 100644 rest/api/v3/scopes/api_deny_scope_request.go delete mode 100644 rest/api/v3/scopes/api_list_scope.go delete mode 100644 rest/api/v3/scopes/api_list_scope_request.go delete mode 100644 rest/api/v3/scopes/api_service.go delete mode 100644 rest/api/v3/scopes/docs/ApproveScopeRequest.md delete mode 100644 rest/api/v3/scopes/docs/ApproveScopeRequest200Response.md delete mode 100644 rest/api/v3/scopes/docs/DenyScopeRequest.md delete mode 100644 rest/api/v3/scopes/docs/DenyScopeRequest404Response.md delete mode 100644 rest/api/v3/scopes/docs/DenyScopeRequest404ResponseErrorsInner.md delete mode 100644 rest/api/v3/scopes/docs/ErrorResponse.md delete mode 100644 rest/api/v3/scopes/docs/ErrorResponseErrorsInner.md delete mode 100644 rest/api/v3/scopes/docs/ListScope.md delete mode 100644 rest/api/v3/scopes/docs/ListScope200Response.md delete mode 100644 rest/api/v3/scopes/docs/ListScope401Response.md delete mode 100644 rest/api/v3/scopes/docs/ListScope401ResponseErrorsInner.md delete mode 100644 rest/api/v3/scopes/docs/ListScopeRequest.md delete mode 100644 rest/api/v3/scopes/docs/ListScopeRequest200ResponseInner.md delete mode 100644 rest/api/v3/scopes/model_approve_scope_request_200_response.go delete mode 100644 rest/api/v3/scopes/model_deny_scope_request_404_response.go delete mode 100644 rest/api/v3/scopes/model_deny_scope_request_404_response_errors_inner.go delete mode 100644 rest/api/v3/scopes/model_error_response.go delete mode 100644 rest/api/v3/scopes/model_error_response_errors_inner.go delete mode 100644 rest/api/v3/scopes/model_list_scope_200_response.go delete mode 100644 rest/api/v3/scopes/model_list_scope_401_response.go delete mode 100644 rest/api/v3/scopes/model_list_scope_401_response_errors_inner.go delete mode 100644 rest/api/v3/scopes/model_list_scope_request_200_response_inner.go delete mode 100644 rest/api/v3/seq/.openapi-generator delete mode 100644 rest/api/v3/seq/.openapi-generator-ignore delete mode 100644 rest/api/v3/seq/README.md delete mode 100644 rest/api/v3/seq/api_list_engagement_quality_score.go delete mode 100644 rest/api/v3/seq/api_list_subuser_engagement_quality_score.go delete mode 100644 rest/api/v3/seq/api_service.go delete mode 100644 rest/api/v3/seq/docs/ListEngagementQualityScore.md delete mode 100644 rest/api/v3/seq/docs/ListSubuserEngagementQualityScore.md delete mode 100644 rest/api/v3/seq/docs/SeqError.md delete mode 100644 rest/api/v3/seq/docs/SeqMetadata.md delete mode 100644 rest/api/v3/seq/docs/SeqMetadataNextParams.md delete mode 100644 rest/api/v3/seq/docs/SeqMetrics.md delete mode 100644 rest/api/v3/seq/docs/SeqScore.md delete mode 100644 rest/api/v3/seq/model_seq_error.go delete mode 100644 rest/api/v3/seq/model_seq_metadata.go delete mode 100644 rest/api/v3/seq/model_seq_metadata_next_params.go delete mode 100644 rest/api/v3/seq/model_seq_metrics.go delete mode 100644 rest/api/v3/seq/model_seq_score.go delete mode 100644 rest/api/v3/sso/.openapi-generator delete mode 100644 rest/api/v3/sso/.openapi-generator-ignore delete mode 100644 rest/api/v3/sso/README.md delete mode 100644 rest/api/v3/sso/api_create_sso_certificate.go delete mode 100644 rest/api/v3/sso/api_create_sso_integration.go delete mode 100644 rest/api/v3/sso/api_create_sso_teammate.go delete mode 100644 rest/api/v3/sso/api_delete_sso_certificate.go delete mode 100644 rest/api/v3/sso/api_delete_sso_integration.go delete mode 100644 rest/api/v3/sso/api_get_sso_certificate.go delete mode 100644 rest/api/v3/sso/api_get_sso_integration.go delete mode 100644 rest/api/v3/sso/api_list_sso_integration.go delete mode 100644 rest/api/v3/sso/api_list_sso_integration_certificate.go delete mode 100644 rest/api/v3/sso/api_service.go delete mode 100644 rest/api/v3/sso/api_update_sso_certificate.go delete mode 100644 rest/api/v3/sso/api_update_sso_integration.go delete mode 100644 rest/api/v3/sso/api_update_sso_teammate.go delete mode 100644 rest/api/v3/sso/docs/CreateSsoCertificate.md delete mode 100644 rest/api/v3/sso/docs/CreateSsoCertificateRequest.md delete mode 100644 rest/api/v3/sso/docs/CreateSsoIntegration.md delete mode 100644 rest/api/v3/sso/docs/CreateSsoTeammate.md delete mode 100644 rest/api/v3/sso/docs/DeleteSsoCertificate.md delete mode 100644 rest/api/v3/sso/docs/DeleteSsoIntegration.md delete mode 100644 rest/api/v3/sso/docs/GetSsoCertificate.md delete mode 100644 rest/api/v3/sso/docs/GetSsoIntegration.md delete mode 100644 rest/api/v3/sso/docs/ListSsoIntegration.md delete mode 100644 rest/api/v3/sso/docs/ListSsoIntegrationCertificate.md delete mode 100644 rest/api/v3/sso/docs/PatchSsoTeammates200.md delete mode 100644 rest/api/v3/sso/docs/PermissionType.md delete mode 100644 rest/api/v3/sso/docs/PermissionType1.md delete mode 100644 rest/api/v3/sso/docs/Persona.md delete mode 100644 rest/api/v3/sso/docs/PostPatchIntegrationRequest.md delete mode 100644 rest/api/v3/sso/docs/PostSsoTeammates201.md delete mode 100644 rest/api/v3/sso/docs/PostSsoTeammatesRequest.md delete mode 100644 rest/api/v3/sso/docs/SsoCertificateBody.md delete mode 100644 rest/api/v3/sso/docs/SsoErrorResponseInner.md delete mode 100644 rest/api/v3/sso/docs/SsoIntegration.md delete mode 100644 rest/api/v3/sso/docs/SsoTeammatesBaseRequestProps.md delete mode 100644 rest/api/v3/sso/docs/SsoTeammatesBaseRequestPropsSubuserAccessInner.md delete mode 100644 rest/api/v3/sso/docs/SsoTeammatesBaseResponseProps.md delete mode 100644 rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponseProps.md delete mode 100644 rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md delete mode 100644 rest/api/v3/sso/docs/UpdateSsoCertificate.md delete mode 100644 rest/api/v3/sso/docs/UpdateSsoCertificateRequest.md delete mode 100644 rest/api/v3/sso/docs/UpdateSsoIntegration.md delete mode 100644 rest/api/v3/sso/docs/UpdateSsoTeammate.md delete mode 100644 rest/api/v3/sso/docs/UserType.md delete mode 100644 rest/api/v3/sso/model_create_sso_certificate_request.go delete mode 100644 rest/api/v3/sso/model_patch_sso_teammates200.go delete mode 100644 rest/api/v3/sso/model_permission_type.go delete mode 100644 rest/api/v3/sso/model_permission_type1.go delete mode 100644 rest/api/v3/sso/model_persona.go delete mode 100644 rest/api/v3/sso/model_post_patch_integration_request.go delete mode 100644 rest/api/v3/sso/model_post_sso_teammates201.go delete mode 100644 rest/api/v3/sso/model_post_sso_teammates_request.go delete mode 100644 rest/api/v3/sso/model_sso_certificate_body.go delete mode 100644 rest/api/v3/sso/model_sso_error_response_inner.go delete mode 100644 rest/api/v3/sso/model_sso_integration.go delete mode 100644 rest/api/v3/sso/model_sso_teammates_base_request_props.go delete mode 100644 rest/api/v3/sso/model_sso_teammates_base_request_props_subuser_access_inner.go delete mode 100644 rest/api/v3/sso/model_sso_teammates_base_response_props.go delete mode 100644 rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props.go delete mode 100644 rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props_subuser_access_inner.go delete mode 100644 rest/api/v3/sso/model_update_sso_certificate_request.go delete mode 100644 rest/api/v3/sso/model_user_type.go delete mode 100644 rest/api/v3/stats/.openapi-generator delete mode 100644 rest/api/v3/stats/.openapi-generator-ignore delete mode 100644 rest/api/v3/stats/README.md delete mode 100644 rest/api/v3/stats/api_get_client_stat.go delete mode 100644 rest/api/v3/stats/api_list_browser_stat.go delete mode 100644 rest/api/v3/stats/api_list_category.go delete mode 100644 rest/api/v3/stats/api_list_category_stat.go delete mode 100644 rest/api/v3/stats/api_list_category_stat_sum.go delete mode 100644 rest/api/v3/stats/api_list_client_stat.go delete mode 100644 rest/api/v3/stats/api_list_device_stat.go delete mode 100644 rest/api/v3/stats/api_list_geo_stat.go delete mode 100644 rest/api/v3/stats/api_list_mailbox_provider_stat.go delete mode 100644 rest/api/v3/stats/api_list_stat.go delete mode 100644 rest/api/v3/stats/api_service.go delete mode 100644 rest/api/v3/stats/docs/AdvancedStatsClicks.md delete mode 100644 rest/api/v3/stats/docs/AdvancedStatsClicksOpens.md delete mode 100644 rest/api/v3/stats/docs/AdvancedStatsMailboxProvider.md delete mode 100644 rest/api/v3/stats/docs/AdvancedStatsOpens.md delete mode 100644 rest/api/v3/stats/docs/AggregatedBy.md delete mode 100644 rest/api/v3/stats/docs/AggregatedBy1.md delete mode 100644 rest/api/v3/stats/docs/AggregatedBy2.md delete mode 100644 rest/api/v3/stats/docs/AggregatedBy3.md delete mode 100644 rest/api/v3/stats/docs/CategoryStats.md delete mode 100644 rest/api/v3/stats/docs/CategoryStatsStatsInner.md delete mode 100644 rest/api/v3/stats/docs/CategoryStatsStatsInnerMetrics.md delete mode 100644 rest/api/v3/stats/docs/ClientType.md delete mode 100644 rest/api/v3/stats/docs/Country.md delete mode 100644 rest/api/v3/stats/docs/GetClientStat.md delete mode 100644 rest/api/v3/stats/docs/ListBrowserStat.md delete mode 100644 rest/api/v3/stats/docs/ListBrowserStat200ResponseInner.md delete mode 100644 rest/api/v3/stats/docs/ListBrowserStat200ResponseInnerStatsInner.md delete mode 100644 rest/api/v3/stats/docs/ListCategory.md delete mode 100644 rest/api/v3/stats/docs/ListCategory200ResponseInner.md delete mode 100644 rest/api/v3/stats/docs/ListCategory400Response.md delete mode 100644 rest/api/v3/stats/docs/ListCategory400ResponseErrorsInner.md delete mode 100644 rest/api/v3/stats/docs/ListCategoryStat.md delete mode 100644 rest/api/v3/stats/docs/ListCategoryStatSum.md delete mode 100644 rest/api/v3/stats/docs/ListClientStat.md delete mode 100644 rest/api/v3/stats/docs/ListClientStat200ResponseInner.md delete mode 100644 rest/api/v3/stats/docs/ListClientStat200ResponseInnerStatsInner.md delete mode 100644 rest/api/v3/stats/docs/ListDeviceStat.md delete mode 100644 rest/api/v3/stats/docs/ListGeoStat.md delete mode 100644 rest/api/v3/stats/docs/ListGeoStat200ResponseInner.md delete mode 100644 rest/api/v3/stats/docs/ListGeoStat200ResponseInnerStatsInner.md delete mode 100644 rest/api/v3/stats/docs/ListMailboxProviderStat.md delete mode 100644 rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInner.md delete mode 100644 rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInnerStatsInner.md delete mode 100644 rest/api/v3/stats/docs/ListStat.md delete mode 100644 rest/api/v3/stats/docs/ListStat200ResponseInner.md delete mode 100644 rest/api/v3/stats/docs/ListStat200ResponseInnerStatsInner.md delete mode 100644 rest/api/v3/stats/docs/SortByDirection.md delete mode 100644 rest/api/v3/stats/docs/StatsAdvancedGlobalStats.md delete mode 100644 rest/api/v3/stats/model_advanced_stats_clicks.go delete mode 100644 rest/api/v3/stats/model_advanced_stats_clicks_opens.go delete mode 100644 rest/api/v3/stats/model_advanced_stats_mailbox_provider.go delete mode 100644 rest/api/v3/stats/model_advanced_stats_opens.go delete mode 100644 rest/api/v3/stats/model_aggregated_by.go delete mode 100644 rest/api/v3/stats/model_aggregated_by1.go delete mode 100644 rest/api/v3/stats/model_aggregated_by2.go delete mode 100644 rest/api/v3/stats/model_aggregated_by3.go delete mode 100644 rest/api/v3/stats/model_category_stats.go delete mode 100644 rest/api/v3/stats/model_category_stats_stats_inner.go delete mode 100644 rest/api/v3/stats/model_category_stats_stats_inner_metrics.go delete mode 100644 rest/api/v3/stats/model_client_type.go delete mode 100644 rest/api/v3/stats/model_country.go delete mode 100644 rest/api/v3/stats/model_list_browser_stat_200_response_inner.go delete mode 100644 rest/api/v3/stats/model_list_browser_stat_200_response_inner_stats_inner.go delete mode 100644 rest/api/v3/stats/model_list_category_200_response_inner.go delete mode 100644 rest/api/v3/stats/model_list_category_400_response.go delete mode 100644 rest/api/v3/stats/model_list_category_400_response_errors_inner.go delete mode 100644 rest/api/v3/stats/model_list_client_stat_200_response_inner.go delete mode 100644 rest/api/v3/stats/model_list_client_stat_200_response_inner_stats_inner.go delete mode 100644 rest/api/v3/stats/model_list_geo_stat_200_response_inner.go delete mode 100644 rest/api/v3/stats/model_list_geo_stat_200_response_inner_stats_inner.go delete mode 100644 rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner.go delete mode 100644 rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner_stats_inner.go delete mode 100644 rest/api/v3/stats/model_list_stat_200_response_inner.go delete mode 100644 rest/api/v3/stats/model_list_stat_200_response_inner_stats_inner.go delete mode 100644 rest/api/v3/stats/model_sort_by_direction.go delete mode 100644 rest/api/v3/stats/model_stats_advanced_global_stats.go delete mode 100644 rest/api/v3/subusers/.openapi-generator delete mode 100644 rest/api/v3/subusers/.openapi-generator-ignore delete mode 100644 rest/api/v3/subusers/README.md delete mode 100644 rest/api/v3/subusers/api_create_subuser.go delete mode 100644 rest/api/v3/subusers/api_delete_subuser.go delete mode 100644 rest/api/v3/subusers/api_get_subuser_credit.go delete mode 100644 rest/api/v3/subusers/api_list_monthly_stat.go delete mode 100644 rest/api/v3/subusers/api_list_reputation.go delete mode 100644 rest/api/v3/subusers/api_list_stat.go delete mode 100644 rest/api/v3/subusers/api_list_stat_sum.go delete mode 100644 rest/api/v3/subusers/api_list_subuser.go delete mode 100644 rest/api/v3/subusers/api_list_subuser_monthly_stat.go delete mode 100644 rest/api/v3/subusers/api_service.go delete mode 100644 rest/api/v3/subusers/api_update_subuser.go delete mode 100644 rest/api/v3/subusers/api_update_subuser_credit.go delete mode 100644 rest/api/v3/subusers/api_update_subuser_ip.go delete mode 100644 rest/api/v3/subusers/api_update_subuser_remaining_credit.go delete mode 100644 rest/api/v3/subusers/api_update_subuser_website_access.go delete mode 100644 rest/api/v3/subusers/docs/AggregatedBy.md delete mode 100644 rest/api/v3/subusers/docs/CategoryStats.md delete mode 100644 rest/api/v3/subusers/docs/CategoryStatsStatsInner.md delete mode 100644 rest/api/v3/subusers/docs/CategoryStatsStatsInnerMetrics.md delete mode 100644 rest/api/v3/subusers/docs/CreateSubuser.md delete mode 100644 rest/api/v3/subusers/docs/CreateSubuserRequest.md delete mode 100644 rest/api/v3/subusers/docs/DeleteSubuser.md delete mode 100644 rest/api/v3/subusers/docs/ErrorResponse.md delete mode 100644 rest/api/v3/subusers/docs/ErrorResponseErrorsInner.md delete mode 100644 rest/api/v3/subusers/docs/GetSubuserCredit.md delete mode 100644 rest/api/v3/subusers/docs/ListMonthlyStat.md delete mode 100644 rest/api/v3/subusers/docs/ListReputation.md delete mode 100644 rest/api/v3/subusers/docs/ListReputation200ResponseInner.md delete mode 100644 rest/api/v3/subusers/docs/ListStat.md delete mode 100644 rest/api/v3/subusers/docs/ListStatSum.md delete mode 100644 rest/api/v3/subusers/docs/ListSubuser.md delete mode 100644 rest/api/v3/subusers/docs/ListSubuserMonthlyStat.md delete mode 100644 rest/api/v3/subusers/docs/Region.md delete mode 100644 rest/api/v3/subusers/docs/Region1.md delete mode 100644 rest/api/v3/subusers/docs/Region2.md delete mode 100644 rest/api/v3/subusers/docs/Region3.md delete mode 100644 rest/api/v3/subusers/docs/ResetFrequency.md delete mode 100644 rest/api/v3/subusers/docs/ResetFrequency1.md delete mode 100644 rest/api/v3/subusers/docs/SortByDirection.md delete mode 100644 rest/api/v3/subusers/docs/SortByDirection1.md delete mode 100644 rest/api/v3/subusers/docs/SortByDirection2.md delete mode 100644 rest/api/v3/subusers/docs/SortByMetric.md delete mode 100644 rest/api/v3/subusers/docs/Subuser.md delete mode 100644 rest/api/v3/subusers/docs/SubuserCredits.md delete mode 100644 rest/api/v3/subusers/docs/SubuserCreditsRequest.md delete mode 100644 rest/api/v3/subusers/docs/SubuserPost.md delete mode 100644 rest/api/v3/subusers/docs/SubuserPostCreditAllocation.md delete mode 100644 rest/api/v3/subusers/docs/SubuserStats.md delete mode 100644 rest/api/v3/subusers/docs/SubuserStatsStatsInner.md delete mode 100644 rest/api/v3/subusers/docs/SubuserStatsStatsInnerMetrics.md delete mode 100644 rest/api/v3/subusers/docs/Type.md delete mode 100644 rest/api/v3/subusers/docs/Type1.md delete mode 100644 rest/api/v3/subusers/docs/UpdateSubuser.md delete mode 100644 rest/api/v3/subusers/docs/UpdateSubuserCredit.md delete mode 100644 rest/api/v3/subusers/docs/UpdateSubuserIp.md delete mode 100644 rest/api/v3/subusers/docs/UpdateSubuserIp200Response.md delete mode 100644 rest/api/v3/subusers/docs/UpdateSubuserRemainingCredit.md delete mode 100644 rest/api/v3/subusers/docs/UpdateSubuserRemainingCreditRequest.md delete mode 100644 rest/api/v3/subusers/docs/UpdateSubuserRequest.md delete mode 100644 rest/api/v3/subusers/docs/UpdateSubuserWebsiteAccess.md delete mode 100644 rest/api/v3/subusers/docs/UpdateSubuserWebsiteAccessRequest.md delete mode 100644 rest/api/v3/subusers/model_aggregated_by.go delete mode 100644 rest/api/v3/subusers/model_category_stats.go delete mode 100644 rest/api/v3/subusers/model_category_stats_stats_inner.go delete mode 100644 rest/api/v3/subusers/model_category_stats_stats_inner_metrics.go delete mode 100644 rest/api/v3/subusers/model_create_subuser_request.go delete mode 100644 rest/api/v3/subusers/model_error_response.go delete mode 100644 rest/api/v3/subusers/model_error_response_errors_inner.go delete mode 100644 rest/api/v3/subusers/model_list_reputation_200_response_inner.go delete mode 100644 rest/api/v3/subusers/model_region.go delete mode 100644 rest/api/v3/subusers/model_region1.go delete mode 100644 rest/api/v3/subusers/model_region2.go delete mode 100644 rest/api/v3/subusers/model_region3.go delete mode 100644 rest/api/v3/subusers/model_reset_frequency.go delete mode 100644 rest/api/v3/subusers/model_reset_frequency1.go delete mode 100644 rest/api/v3/subusers/model_sort_by_direction.go delete mode 100644 rest/api/v3/subusers/model_sort_by_direction1.go delete mode 100644 rest/api/v3/subusers/model_sort_by_direction2.go delete mode 100644 rest/api/v3/subusers/model_sort_by_metric.go delete mode 100644 rest/api/v3/subusers/model_subuser.go delete mode 100644 rest/api/v3/subusers/model_subuser_credits.go delete mode 100644 rest/api/v3/subusers/model_subuser_credits_request.go delete mode 100644 rest/api/v3/subusers/model_subuser_post.go delete mode 100644 rest/api/v3/subusers/model_subuser_post_credit_allocation.go delete mode 100644 rest/api/v3/subusers/model_subuser_stats.go delete mode 100644 rest/api/v3/subusers/model_subuser_stats_stats_inner.go delete mode 100644 rest/api/v3/subusers/model_subuser_stats_stats_inner_metrics.go delete mode 100644 rest/api/v3/subusers/model_type.go delete mode 100644 rest/api/v3/subusers/model_type1.go delete mode 100644 rest/api/v3/subusers/model_update_subuser_ip_200_response.go delete mode 100644 rest/api/v3/subusers/model_update_subuser_remaining_credit_request.go delete mode 100644 rest/api/v3/subusers/model_update_subuser_request.go delete mode 100644 rest/api/v3/subusers/model_update_subuser_website_access_request.go delete mode 100644 rest/api/v3/suppressions/.openapi-generator delete mode 100644 rest/api/v3/suppressions/.openapi-generator-ignore delete mode 100644 rest/api/v3/suppressions/README.md delete mode 100644 rest/api/v3/suppressions/api_add_suppression_to_asm_group.go delete mode 100644 rest/api/v3/suppressions/api_creat_asm_group.go delete mode 100644 rest/api/v3/suppressions/api_create_global_suppression.go delete mode 100644 rest/api/v3/suppressions/api_delete_asm_group.go delete mode 100644 rest/api/v3/suppressions/api_delete_global_suppression.go delete mode 100644 rest/api/v3/suppressions/api_delete_invalid_email.go delete mode 100644 rest/api/v3/suppressions/api_delete_invalid_emails.go delete mode 100644 rest/api/v3/suppressions/api_delete_spam_report.go delete mode 100644 rest/api/v3/suppressions/api_delete_spam_reports.go delete mode 100644 rest/api/v3/suppressions/api_delete_suppression_block.go delete mode 100644 rest/api/v3/suppressions/api_delete_suppression_blocks.go delete mode 100644 rest/api/v3/suppressions/api_delete_suppression_bounce.go delete mode 100644 rest/api/v3/suppressions/api_delete_suppression_bounces.go delete mode 100644 rest/api/v3/suppressions/api_delete_suppression_from_asm_group.go delete mode 100644 rest/api/v3/suppressions/api_get_asm_group.go delete mode 100644 rest/api/v3/suppressions/api_get_asm_suppression.go delete mode 100644 rest/api/v3/suppressions/api_get_global_suppression.go delete mode 100644 rest/api/v3/suppressions/api_get_invalid_email.go delete mode 100644 rest/api/v3/suppressions/api_get_spam_report.go delete mode 100644 rest/api/v3/suppressions/api_get_suppression_block.go delete mode 100644 rest/api/v3/suppressions/api_get_suppression_bounces.go delete mode 100644 rest/api/v3/suppressions/api_get_suppression_bounces_classifications.go delete mode 100644 rest/api/v3/suppressions/api_list_asm_group.go delete mode 100644 rest/api/v3/suppressions/api_list_asm_suppression.go delete mode 100644 rest/api/v3/suppressions/api_list_global_suppression.go delete mode 100644 rest/api/v3/suppressions/api_list_invalid_email.go delete mode 100644 rest/api/v3/suppressions/api_list_spam_report.go delete mode 100644 rest/api/v3/suppressions/api_list_suppression_block.go delete mode 100644 rest/api/v3/suppressions/api_list_suppression_bounces.go delete mode 100644 rest/api/v3/suppressions/api_list_suppression_bounces_classifications.go delete mode 100644 rest/api/v3/suppressions/api_list_suppression_from_asm_group.go delete mode 100644 rest/api/v3/suppressions/api_search_suppression_from_asm_group.go delete mode 100644 rest/api/v3/suppressions/api_service.go delete mode 100644 rest/api/v3/suppressions/api_update_asm_group.go delete mode 100644 rest/api/v3/suppressions/docs/Accept.md delete mode 100644 rest/api/v3/suppressions/docs/Accept1.md delete mode 100644 rest/api/v3/suppressions/docs/AddSuppressionToAsmGroup.md delete mode 100644 rest/api/v3/suppressions/docs/AddSuppressionToAsmGroup201Response.md delete mode 100644 rest/api/v3/suppressions/docs/BlocksResponseInner.md delete mode 100644 rest/api/v3/suppressions/docs/BounceResponse.md delete mode 100644 rest/api/v3/suppressions/docs/Classification.md delete mode 100644 rest/api/v3/suppressions/docs/Classification1.md delete mode 100644 rest/api/v3/suppressions/docs/CreatAsmGroup.md delete mode 100644 rest/api/v3/suppressions/docs/CreatAsmGroup201Response.md delete mode 100644 rest/api/v3/suppressions/docs/CreateGlobalSuppression.md delete mode 100644 rest/api/v3/suppressions/docs/CreateGlobalSuppression201Response.md delete mode 100644 rest/api/v3/suppressions/docs/DeleteAsmGroup.md delete mode 100644 rest/api/v3/suppressions/docs/DeleteGlobalSuppression.md delete mode 100644 rest/api/v3/suppressions/docs/DeleteInvalidEmail.md delete mode 100644 rest/api/v3/suppressions/docs/DeleteInvalidEmails.md delete mode 100644 rest/api/v3/suppressions/docs/DeleteInvalidEmailsRequest.md delete mode 100644 rest/api/v3/suppressions/docs/DeleteSpamReport.md delete mode 100644 rest/api/v3/suppressions/docs/DeleteSpamReports.md delete mode 100644 rest/api/v3/suppressions/docs/DeleteSpamReportsRequest.md delete mode 100644 rest/api/v3/suppressions/docs/DeleteSuppressionBlock.md delete mode 100644 rest/api/v3/suppressions/docs/DeleteSuppressionBlocks.md delete mode 100644 rest/api/v3/suppressions/docs/DeleteSuppressionBlocksRequest.md delete mode 100644 rest/api/v3/suppressions/docs/DeleteSuppressionBounce.md delete mode 100644 rest/api/v3/suppressions/docs/DeleteSuppressionBounces.md delete mode 100644 rest/api/v3/suppressions/docs/DeleteSuppressionBouncesRequest.md delete mode 100644 rest/api/v3/suppressions/docs/DeleteSuppressionFromAsmGroup.md delete mode 100644 rest/api/v3/suppressions/docs/ErrorResponse.md delete mode 100644 rest/api/v3/suppressions/docs/ErrorResponseErrorsInner.md delete mode 100644 rest/api/v3/suppressions/docs/GetAsmGroup.md delete mode 100644 rest/api/v3/suppressions/docs/GetAsmGroup200Response.md delete mode 100644 rest/api/v3/suppressions/docs/GetAsmSuppression.md delete mode 100644 rest/api/v3/suppressions/docs/GetAsmSuppression200Response.md delete mode 100644 rest/api/v3/suppressions/docs/GetAsmSuppression200ResponseSuppressionsInner.md delete mode 100644 rest/api/v3/suppressions/docs/GetGlobalSuppression.md delete mode 100644 rest/api/v3/suppressions/docs/GetInvalidEmail.md delete mode 100644 rest/api/v3/suppressions/docs/GetSpamReport.md delete mode 100644 rest/api/v3/suppressions/docs/GetSuppressionBlock.md delete mode 100644 rest/api/v3/suppressions/docs/GetSuppressionBounces.md delete mode 100644 rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications.md delete mode 100644 rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications200Response.md delete mode 100644 rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications200ResponseResultInner.md delete mode 100644 rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications200ResponseResultInnerStatsInner.md delete mode 100644 rest/api/v3/suppressions/docs/InvalidEmail.md delete mode 100644 rest/api/v3/suppressions/docs/ListAsmGroup.md delete mode 100644 rest/api/v3/suppressions/docs/ListAsmSuppression.md delete mode 100644 rest/api/v3/suppressions/docs/ListAsmSuppression200ResponseInner.md delete mode 100644 rest/api/v3/suppressions/docs/ListGlobalSuppression.md delete mode 100644 rest/api/v3/suppressions/docs/ListGlobalSuppression200ResponseInner.md delete mode 100644 rest/api/v3/suppressions/docs/ListInvalidEmail.md delete mode 100644 rest/api/v3/suppressions/docs/ListSpamReport.md delete mode 100644 rest/api/v3/suppressions/docs/ListSuppressionBlock.md delete mode 100644 rest/api/v3/suppressions/docs/ListSuppressionBounces.md delete mode 100644 rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications.md delete mode 100644 rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications200Response.md delete mode 100644 rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications200ResponseResultInner.md delete mode 100644 rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications200ResponseResultInnerStatsInner.md delete mode 100644 rest/api/v3/suppressions/docs/ListSuppressionFromAsmGroup.md delete mode 100644 rest/api/v3/suppressions/docs/RetrieveAGlobalSuppressionResponse.md delete mode 100644 rest/api/v3/suppressions/docs/SearchSuppressionFromAsmGroup.md delete mode 100644 rest/api/v3/suppressions/docs/SpamReportsResponseInner.md delete mode 100644 rest/api/v3/suppressions/docs/SuppressionGroup.md delete mode 100644 rest/api/v3/suppressions/docs/SuppressionGroupRequestBaseProps.md delete mode 100644 rest/api/v3/suppressions/docs/SuppressionsRequest.md delete mode 100644 rest/api/v3/suppressions/docs/UpdateAsmGroup.md delete mode 100644 rest/api/v3/suppressions/docs/UpdateAsmGroupRequest.md delete mode 100644 rest/api/v3/suppressions/model_accept.go delete mode 100644 rest/api/v3/suppressions/model_accept1.go delete mode 100644 rest/api/v3/suppressions/model_add_suppression_to_asm_group_201_response.go delete mode 100644 rest/api/v3/suppressions/model_blocks_response_inner.go delete mode 100644 rest/api/v3/suppressions/model_bounce_response.go delete mode 100644 rest/api/v3/suppressions/model_classification.go delete mode 100644 rest/api/v3/suppressions/model_classification1.go delete mode 100644 rest/api/v3/suppressions/model_creat_asm_group_201_response.go delete mode 100644 rest/api/v3/suppressions/model_create_global_suppression_201_response.go delete mode 100644 rest/api/v3/suppressions/model_delete_invalid_emails_request.go delete mode 100644 rest/api/v3/suppressions/model_delete_spam_reports_request.go delete mode 100644 rest/api/v3/suppressions/model_delete_suppression_blocks_request.go delete mode 100644 rest/api/v3/suppressions/model_delete_suppression_bounces_request.go delete mode 100644 rest/api/v3/suppressions/model_error_response.go delete mode 100644 rest/api/v3/suppressions/model_error_response_errors_inner.go delete mode 100644 rest/api/v3/suppressions/model_get_asm_group_200_response.go delete mode 100644 rest/api/v3/suppressions/model_get_asm_suppression_200_response.go delete mode 100644 rest/api/v3/suppressions/model_get_asm_suppression_200_response_suppressions_inner.go delete mode 100644 rest/api/v3/suppressions/model_get_suppression_bounces_classifications_200_response.go delete mode 100644 rest/api/v3/suppressions/model_get_suppression_bounces_classifications_200_response_result_inner.go delete mode 100644 rest/api/v3/suppressions/model_get_suppression_bounces_classifications_200_response_result_inner_stats_inner.go delete mode 100644 rest/api/v3/suppressions/model_invalid_email.go delete mode 100644 rest/api/v3/suppressions/model_list_asm_suppression_200_response_inner.go delete mode 100644 rest/api/v3/suppressions/model_list_global_suppression_200_response_inner.go delete mode 100644 rest/api/v3/suppressions/model_list_suppression_bounces_classifications_200_response.go delete mode 100644 rest/api/v3/suppressions/model_list_suppression_bounces_classifications_200_response_result_inner.go delete mode 100644 rest/api/v3/suppressions/model_list_suppression_bounces_classifications_200_response_result_inner_stats_inner.go delete mode 100644 rest/api/v3/suppressions/model_retrieve_a_global_suppression_response.go delete mode 100644 rest/api/v3/suppressions/model_spam_reports_response_inner.go delete mode 100644 rest/api/v3/suppressions/model_suppression_group.go delete mode 100644 rest/api/v3/suppressions/model_suppression_group_request_base_props.go delete mode 100644 rest/api/v3/suppressions/model_suppressions_request.go delete mode 100644 rest/api/v3/suppressions/model_update_asm_group_request.go delete mode 100644 rest/api/v3/teammates/.openapi-generator delete mode 100644 rest/api/v3/teammates/.openapi-generator-ignore delete mode 100644 rest/api/v3/teammates/README.md delete mode 100644 rest/api/v3/teammates/api_delete_pending_teammate.go delete mode 100644 rest/api/v3/teammates/api_delete_teammate.go delete mode 100644 rest/api/v3/teammates/api_get_teammate.go delete mode 100644 rest/api/v3/teammates/api_invite_teammate.go delete mode 100644 rest/api/v3/teammates/api_list_pending_teammate.go delete mode 100644 rest/api/v3/teammates/api_list_subuser_by_template.go delete mode 100644 rest/api/v3/teammates/api_list_teammate.go delete mode 100644 rest/api/v3/teammates/api_resend_teammate_invite.go delete mode 100644 rest/api/v3/teammates/api_service.go delete mode 100644 rest/api/v3/teammates/api_update_teammate.go delete mode 100644 rest/api/v3/teammates/docs/DeletePendingTeammate.md delete mode 100644 rest/api/v3/teammates/docs/DeleteTeammate.md delete mode 100644 rest/api/v3/teammates/docs/GetTeammate.md delete mode 100644 rest/api/v3/teammates/docs/GetTeammate200Response.md delete mode 100644 rest/api/v3/teammates/docs/InviteTeammate.md delete mode 100644 rest/api/v3/teammates/docs/InviteTeammate201Response.md delete mode 100644 rest/api/v3/teammates/docs/InviteTeammate400Response.md delete mode 100644 rest/api/v3/teammates/docs/InviteTeammate400ResponseErrorsInner.md delete mode 100644 rest/api/v3/teammates/docs/InviteTeammateRequest.md delete mode 100644 rest/api/v3/teammates/docs/ListPendingTeammate.md delete mode 100644 rest/api/v3/teammates/docs/ListPendingTeammate200Response.md delete mode 100644 rest/api/v3/teammates/docs/ListPendingTeammate200ResponseResultInner.md delete mode 100644 rest/api/v3/teammates/docs/ListSubuserByTemplate.md delete mode 100644 rest/api/v3/teammates/docs/ListSubuserByTemplate200Response.md delete mode 100644 rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadata.md delete mode 100644 rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadataNextParams.md delete mode 100644 rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseSubuserAccessInner.md delete mode 100644 rest/api/v3/teammates/docs/ListSubuserByTemplate400Response.md delete mode 100644 rest/api/v3/teammates/docs/ListSubuserByTemplate400ResponseErrorsInner.md delete mode 100644 rest/api/v3/teammates/docs/ListTeammate.md delete mode 100644 rest/api/v3/teammates/docs/ListTeammate200Response.md delete mode 100644 rest/api/v3/teammates/docs/ListTeammate200ResponseResultInner.md delete mode 100644 rest/api/v3/teammates/docs/PermissionType.md delete mode 100644 rest/api/v3/teammates/docs/ResendTeammateInvite.md delete mode 100644 rest/api/v3/teammates/docs/ResendTeammateInvite200Response.md delete mode 100644 rest/api/v3/teammates/docs/UpdateTeammate.md delete mode 100644 rest/api/v3/teammates/docs/UpdateTeammate200Response.md delete mode 100644 rest/api/v3/teammates/docs/UpdateTeammateRequest.md delete mode 100644 rest/api/v3/teammates/docs/UserType.md delete mode 100644 rest/api/v3/teammates/docs/UserType1.md delete mode 100644 rest/api/v3/teammates/docs/UserType2.md delete mode 100644 rest/api/v3/teammates/model_get_teammate_200_response.go delete mode 100644 rest/api/v3/teammates/model_invite_teammate_201_response.go delete mode 100644 rest/api/v3/teammates/model_invite_teammate_400_response.go delete mode 100644 rest/api/v3/teammates/model_invite_teammate_400_response_errors_inner.go delete mode 100644 rest/api/v3/teammates/model_invite_teammate_request.go delete mode 100644 rest/api/v3/teammates/model_list_pending_teammate_200_response.go delete mode 100644 rest/api/v3/teammates/model_list_pending_teammate_200_response_result_inner.go delete mode 100644 rest/api/v3/teammates/model_list_subuser_by_template_200_response.go delete mode 100644 rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata.go delete mode 100644 rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata_next_params.go delete mode 100644 rest/api/v3/teammates/model_list_subuser_by_template_200_response_subuser_access_inner.go delete mode 100644 rest/api/v3/teammates/model_list_subuser_by_template_400_response.go delete mode 100644 rest/api/v3/teammates/model_list_subuser_by_template_400_response_errors_inner.go delete mode 100644 rest/api/v3/teammates/model_list_teammate_200_response.go delete mode 100644 rest/api/v3/teammates/model_list_teammate_200_response_result_inner.go delete mode 100644 rest/api/v3/teammates/model_permission_type.go delete mode 100644 rest/api/v3/teammates/model_resend_teammate_invite_200_response.go delete mode 100644 rest/api/v3/teammates/model_update_teammate_200_response.go delete mode 100644 rest/api/v3/teammates/model_update_teammate_request.go delete mode 100644 rest/api/v3/teammates/model_user_type.go delete mode 100644 rest/api/v3/teammates/model_user_type1.go delete mode 100644 rest/api/v3/teammates/model_user_type2.go delete mode 100644 rest/api/v3/templates/.openapi-generator delete mode 100644 rest/api/v3/templates/.openapi-generator-ignore delete mode 100644 rest/api/v3/templates/README.md delete mode 100644 rest/api/v3/templates/api_activate_template_version.go delete mode 100644 rest/api/v3/templates/api_create_template.go delete mode 100644 rest/api/v3/templates/api_create_template_version.go delete mode 100644 rest/api/v3/templates/api_delete_template.go delete mode 100644 rest/api/v3/templates/api_delete_template_version.go delete mode 100644 rest/api/v3/templates/api_duplicate_template.go delete mode 100644 rest/api/v3/templates/api_get_template.go delete mode 100644 rest/api/v3/templates/api_get_template_version.go delete mode 100644 rest/api/v3/templates/api_list_template.go delete mode 100644 rest/api/v3/templates/api_service.go delete mode 100644 rest/api/v3/templates/api_update_template.go delete mode 100644 rest/api/v3/templates/api_update_template_version.go delete mode 100644 rest/api/v3/templates/docs/ActivateTemplateVersion.md delete mode 100644 rest/api/v3/templates/docs/Active.md delete mode 100644 rest/api/v3/templates/docs/Active1.md delete mode 100644 rest/api/v3/templates/docs/CreateTemplate.md delete mode 100644 rest/api/v3/templates/docs/CreateTemplateRequest.md delete mode 100644 rest/api/v3/templates/docs/CreateTemplateVersion.md delete mode 100644 rest/api/v3/templates/docs/DeleteTemplate.md delete mode 100644 rest/api/v3/templates/docs/DeleteTemplateVersion.md delete mode 100644 rest/api/v3/templates/docs/DuplicateTemplate.md delete mode 100644 rest/api/v3/templates/docs/DuplicateTemplateRequest.md delete mode 100644 rest/api/v3/templates/docs/Editor.md delete mode 100644 rest/api/v3/templates/docs/Editor1.md delete mode 100644 rest/api/v3/templates/docs/Generation.md delete mode 100644 rest/api/v3/templates/docs/Generation1.md delete mode 100644 rest/api/v3/templates/docs/Generations.md delete mode 100644 rest/api/v3/templates/docs/GetTemplate.md delete mode 100644 rest/api/v3/templates/docs/GetTemplateVersion.md delete mode 100644 rest/api/v3/templates/docs/ListTemplate.md delete mode 100644 rest/api/v3/templates/docs/ListTemplate200Response.md delete mode 100644 rest/api/v3/templates/docs/ListTemplate400Response.md delete mode 100644 rest/api/v3/templates/docs/ListTemplate400ResponseErrorsInner.md delete mode 100644 rest/api/v3/templates/docs/Metadata.md delete mode 100644 rest/api/v3/templates/docs/TransactionalTemplate.md delete mode 100644 rest/api/v3/templates/docs/TransactionalTemplateVersionCreate.md delete mode 100644 rest/api/v3/templates/docs/TransactionalTemplateVersionOutput.md delete mode 100644 rest/api/v3/templates/docs/TransactionalTemplateWarning.md delete mode 100644 rest/api/v3/templates/docs/TransactionalTemplatesTemplateLean.md delete mode 100644 rest/api/v3/templates/docs/TransactionalTemplatesVersionOutputLean.md delete mode 100644 rest/api/v3/templates/docs/UpdateTemplate.md delete mode 100644 rest/api/v3/templates/docs/UpdateTemplateRequest.md delete mode 100644 rest/api/v3/templates/docs/UpdateTemplateVersion.md delete mode 100644 rest/api/v3/templates/model_active.go delete mode 100644 rest/api/v3/templates/model_active1.go delete mode 100644 rest/api/v3/templates/model_create_template_request.go delete mode 100644 rest/api/v3/templates/model_duplicate_template_request.go delete mode 100644 rest/api/v3/templates/model_editor.go delete mode 100644 rest/api/v3/templates/model_editor1.go delete mode 100644 rest/api/v3/templates/model_generation.go delete mode 100644 rest/api/v3/templates/model_generation1.go delete mode 100644 rest/api/v3/templates/model_generations.go delete mode 100644 rest/api/v3/templates/model_list_template_200_response.go delete mode 100644 rest/api/v3/templates/model_list_template_400_response.go delete mode 100644 rest/api/v3/templates/model_list_template_400_response_errors_inner.go delete mode 100644 rest/api/v3/templates/model_metadata.go delete mode 100644 rest/api/v3/templates/model_transactional_template.go delete mode 100644 rest/api/v3/templates/model_transactional_template_version_create.go delete mode 100644 rest/api/v3/templates/model_transactional_template_version_output.go delete mode 100644 rest/api/v3/templates/model_transactional_template_warning.go delete mode 100644 rest/api/v3/templates/model_transactional_templates_template_lean.go delete mode 100644 rest/api/v3/templates/model_transactional_templates_version_output_lean.go delete mode 100644 rest/api/v3/templates/model_update_template_request.go delete mode 100644 rest/api/v3/tracking_settings/.openapi-generator delete mode 100644 rest/api/v3/tracking_settings/.openapi-generator-ignore delete mode 100644 rest/api/v3/tracking_settings/README.md delete mode 100644 rest/api/v3/tracking_settings/api_list_click_tracking_setting.go delete mode 100644 rest/api/v3/tracking_settings/api_list_google_analytics_tracking_setting.go delete mode 100644 rest/api/v3/tracking_settings/api_list_open_tracking_setting.go delete mode 100644 rest/api/v3/tracking_settings/api_list_subscription_tracking_setting.go delete mode 100644 rest/api/v3/tracking_settings/api_list_tracking_setting.go delete mode 100644 rest/api/v3/tracking_settings/api_service.go delete mode 100644 rest/api/v3/tracking_settings/api_update_click_tracking_setting.go delete mode 100644 rest/api/v3/tracking_settings/api_update_google_analytics_tracking_setting.go delete mode 100644 rest/api/v3/tracking_settings/api_update_open_tracking_setting.go delete mode 100644 rest/api/v3/tracking_settings/api_update_subscription_tracking_setting.go delete mode 100644 rest/api/v3/tracking_settings/docs/ClickTracking.md delete mode 100644 rest/api/v3/tracking_settings/docs/GoogleAnalyticsSettings.md delete mode 100644 rest/api/v3/tracking_settings/docs/ListClickTrackingSetting.md delete mode 100644 rest/api/v3/tracking_settings/docs/ListGoogleAnalyticsTrackingSetting.md delete mode 100644 rest/api/v3/tracking_settings/docs/ListOpenTrackingSetting.md delete mode 100644 rest/api/v3/tracking_settings/docs/ListOpenTrackingSetting200Response.md delete mode 100644 rest/api/v3/tracking_settings/docs/ListSubscriptionTrackingSetting.md delete mode 100644 rest/api/v3/tracking_settings/docs/ListTrackingSetting.md delete mode 100644 rest/api/v3/tracking_settings/docs/ListTrackingSetting200Response.md delete mode 100644 rest/api/v3/tracking_settings/docs/ListTrackingSetting200ResponseResultInner.md delete mode 100644 rest/api/v3/tracking_settings/docs/SubscriptionTrackingSettings.md delete mode 100644 rest/api/v3/tracking_settings/docs/UpdateClickTrackingSetting.md delete mode 100644 rest/api/v3/tracking_settings/docs/UpdateClickTrackingSettingRequest.md delete mode 100644 rest/api/v3/tracking_settings/docs/UpdateGoogleAnalyticsTrackingSetting.md delete mode 100644 rest/api/v3/tracking_settings/docs/UpdateOpenTrackingSetting.md delete mode 100644 rest/api/v3/tracking_settings/docs/UpdateOpenTrackingSettingRequest.md delete mode 100644 rest/api/v3/tracking_settings/docs/UpdateSubscriptionTrackingSetting.md delete mode 100644 rest/api/v3/tracking_settings/model_click_tracking.go delete mode 100644 rest/api/v3/tracking_settings/model_google_analytics_settings.go delete mode 100644 rest/api/v3/tracking_settings/model_list_open_tracking_setting_200_response.go delete mode 100644 rest/api/v3/tracking_settings/model_list_tracking_setting_200_response.go delete mode 100644 rest/api/v3/tracking_settings/model_list_tracking_setting_200_response_result_inner.go delete mode 100644 rest/api/v3/tracking_settings/model_subscription_tracking_settings.go delete mode 100644 rest/api/v3/tracking_settings/model_update_click_tracking_setting_request.go delete mode 100644 rest/api/v3/tracking_settings/model_update_open_tracking_setting_request.go delete mode 100644 rest/api/v3/user/.openapi-generator delete mode 100644 rest/api/v3/user/.openapi-generator-ignore delete mode 100644 rest/api/v3/user/README.md delete mode 100644 rest/api/v3/user/api_list_account.go delete mode 100644 rest/api/v3/user/api_list_credit.go delete mode 100644 rest/api/v3/user/api_list_email.go delete mode 100644 rest/api/v3/user/api_list_profile.go delete mode 100644 rest/api/v3/user/api_list_username.go delete mode 100644 rest/api/v3/user/api_service.go delete mode 100644 rest/api/v3/user/api_update_email.go delete mode 100644 rest/api/v3/user/api_update_password.go delete mode 100644 rest/api/v3/user/api_update_profile.go delete mode 100644 rest/api/v3/user/api_update_username.go delete mode 100644 rest/api/v3/user/docs/ErrorResponse.md delete mode 100644 rest/api/v3/user/docs/ErrorResponseErrorsInner.md delete mode 100644 rest/api/v3/user/docs/GETUserAccountResponse.md delete mode 100644 rest/api/v3/user/docs/GETUserProfileResponse.md delete mode 100644 rest/api/v3/user/docs/ListAccount.md delete mode 100644 rest/api/v3/user/docs/ListCredit.md delete mode 100644 rest/api/v3/user/docs/ListCredit200Response.md delete mode 100644 rest/api/v3/user/docs/ListEmail.md delete mode 100644 rest/api/v3/user/docs/ListEmail200Response.md delete mode 100644 rest/api/v3/user/docs/ListProfile.md delete mode 100644 rest/api/v3/user/docs/ListUsername.md delete mode 100644 rest/api/v3/user/docs/ListUsername200Response.md delete mode 100644 rest/api/v3/user/docs/Type.md delete mode 100644 rest/api/v3/user/docs/UpdateEmail.md delete mode 100644 rest/api/v3/user/docs/UpdateEmail200Response.md delete mode 100644 rest/api/v3/user/docs/UpdateEmailRequest.md delete mode 100644 rest/api/v3/user/docs/UpdatePassword.md delete mode 100644 rest/api/v3/user/docs/UpdatePasswordRequest.md delete mode 100644 rest/api/v3/user/docs/UpdateProfile.md delete mode 100644 rest/api/v3/user/docs/UpdateUsername.md delete mode 100644 rest/api/v3/user/docs/UpdateUsername200Response.md delete mode 100644 rest/api/v3/user/docs/UpdateUsernameRequest.md delete mode 100644 rest/api/v3/user/docs/UserProfile.md delete mode 100644 rest/api/v3/user/model_error_response.go delete mode 100644 rest/api/v3/user/model_error_response_errors_inner.go delete mode 100644 rest/api/v3/user/model_get_user_account_response.go delete mode 100644 rest/api/v3/user/model_get_user_profile_response.go delete mode 100644 rest/api/v3/user/model_list_credit_200_response.go delete mode 100644 rest/api/v3/user/model_list_email_200_response.go delete mode 100644 rest/api/v3/user/model_list_username_200_response.go delete mode 100644 rest/api/v3/user/model_type.go delete mode 100644 rest/api/v3/user/model_update_email_200_response.go delete mode 100644 rest/api/v3/user/model_update_email_request.go delete mode 100644 rest/api/v3/user/model_update_password_request.go delete mode 100644 rest/api/v3/user/model_update_username_200_response.go delete mode 100644 rest/api/v3/user/model_update_username_request.go delete mode 100644 rest/api/v3/user/model_user_profile.go delete mode 100644 rest/api/v3/verified_senders/.openapi-generator delete mode 100644 rest/api/v3/verified_senders/.openapi-generator-ignore delete mode 100644 rest/api/v3/verified_senders/README.md delete mode 100644 rest/api/v3/verified_senders/api_create_verified_sender.go delete mode 100644 rest/api/v3/verified_senders/api_delete_verified_sender.go delete mode 100644 rest/api/v3/verified_senders/api_list_verified_sender.go delete mode 100644 rest/api/v3/verified_senders/api_list_verified_sender_domain.go delete mode 100644 rest/api/v3/verified_senders/api_list_verified_sender_steps_completed.go delete mode 100644 rest/api/v3/verified_senders/api_resend_verified_sender.go delete mode 100644 rest/api/v3/verified_senders/api_service.go delete mode 100644 rest/api/v3/verified_senders/api_update_verified_sender.go delete mode 100644 rest/api/v3/verified_senders/api_verify_sender_token.go delete mode 100644 rest/api/v3/verified_senders/docs/CreateVerifiedSender.md delete mode 100644 rest/api/v3/verified_senders/docs/CreateVerifiedSender400Response.md delete mode 100644 rest/api/v3/verified_senders/docs/CreateVerifiedSender400ResponseErrorsInner.md delete mode 100644 rest/api/v3/verified_senders/docs/DeleteVerifiedSender.md delete mode 100644 rest/api/v3/verified_senders/docs/DeleteVerifiedSender403Response.md delete mode 100644 rest/api/v3/verified_senders/docs/DeleteVerifiedSender403ResponseErrorsInner.md delete mode 100644 rest/api/v3/verified_senders/docs/DeleteVerifiedSender404Response.md delete mode 100644 rest/api/v3/verified_senders/docs/ErrorResponse.md delete mode 100644 rest/api/v3/verified_senders/docs/ErrorResponseErrorsInner.md delete mode 100644 rest/api/v3/verified_senders/docs/ListVerifiedSender.md delete mode 100644 rest/api/v3/verified_senders/docs/ListVerifiedSender200Response.md delete mode 100644 rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain.md delete mode 100644 rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain200Response.md delete mode 100644 rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain200ResponseResults.md delete mode 100644 rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted.md delete mode 100644 rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted200Response.md delete mode 100644 rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted200ResponseResults.md delete mode 100644 rest/api/v3/verified_senders/docs/ResendVerifiedSender.md delete mode 100644 rest/api/v3/verified_senders/docs/UpdateVerifiedSender.md delete mode 100644 rest/api/v3/verified_senders/docs/VerifiedSenderRequest.md delete mode 100644 rest/api/v3/verified_senders/docs/VerifiedSenderResponse.md delete mode 100644 rest/api/v3/verified_senders/docs/VerifySenderToken.md delete mode 100644 rest/api/v3/verified_senders/model_create_verified_sender_400_response.go delete mode 100644 rest/api/v3/verified_senders/model_create_verified_sender_400_response_errors_inner.go delete mode 100644 rest/api/v3/verified_senders/model_delete_verified_sender_403_response.go delete mode 100644 rest/api/v3/verified_senders/model_delete_verified_sender_403_response_errors_inner.go delete mode 100644 rest/api/v3/verified_senders/model_delete_verified_sender_404_response.go delete mode 100644 rest/api/v3/verified_senders/model_error_response.go delete mode 100644 rest/api/v3/verified_senders/model_error_response_errors_inner.go delete mode 100644 rest/api/v3/verified_senders/model_list_verified_sender_200_response.go delete mode 100644 rest/api/v3/verified_senders/model_list_verified_sender_domain_200_response.go delete mode 100644 rest/api/v3/verified_senders/model_list_verified_sender_domain_200_response_results.go delete mode 100644 rest/api/v3/verified_senders/model_list_verified_sender_steps_completed_200_response.go delete mode 100644 rest/api/v3/verified_senders/model_list_verified_sender_steps_completed_200_response_results.go delete mode 100644 rest/api/v3/verified_senders/model_verified_sender_request.go delete mode 100644 rest/api/v3/verified_senders/model_verified_sender_response.go delete mode 100644 rest/api/v3/webhooks/.openapi-generator delete mode 100644 rest/api/v3/webhooks/.openapi-generator-ignore delete mode 100644 rest/api/v3/webhooks/README.md delete mode 100644 rest/api/v3/webhooks/api_create_event_webhook.go delete mode 100644 rest/api/v3/webhooks/api_create_parse_setting.go delete mode 100644 rest/api/v3/webhooks/api_delete_event_webhook.go delete mode 100644 rest/api/v3/webhooks/api_delete_parse_setting.go delete mode 100644 rest/api/v3/webhooks/api_get_event_webhook.go delete mode 100644 rest/api/v3/webhooks/api_get_parse_setting.go delete mode 100644 rest/api/v3/webhooks/api_get_signed_event_webhook.go delete mode 100644 rest/api/v3/webhooks/api_list_event_webhook.go delete mode 100644 rest/api/v3/webhooks/api_list_parse_setting.go delete mode 100644 rest/api/v3/webhooks/api_list_parse_static.go delete mode 100644 rest/api/v3/webhooks/api_service.go delete mode 100644 rest/api/v3/webhooks/api_test_event_webhook.go delete mode 100644 rest/api/v3/webhooks/api_update_event_webhook.go delete mode 100644 rest/api/v3/webhooks/api_update_parse_setting.go delete mode 100644 rest/api/v3/webhooks/api_update_signed_event_webhook.go delete mode 100644 rest/api/v3/webhooks/docs/AggregatedBy.md delete mode 100644 rest/api/v3/webhooks/docs/CreateEventWebhook.md delete mode 100644 rest/api/v3/webhooks/docs/CreateEventWebhook400Response.md delete mode 100644 rest/api/v3/webhooks/docs/CreateEventWebhook400ResponseErrorsInner.md delete mode 100644 rest/api/v3/webhooks/docs/CreateParseSetting.md delete mode 100644 rest/api/v3/webhooks/docs/DeleteEventWebhook.md delete mode 100644 rest/api/v3/webhooks/docs/DeleteParseSetting.md delete mode 100644 rest/api/v3/webhooks/docs/ErrorResponse.md delete mode 100644 rest/api/v3/webhooks/docs/ErrorResponseErrorsInner.md delete mode 100644 rest/api/v3/webhooks/docs/EventWebhookAllResponse.md delete mode 100644 rest/api/v3/webhooks/docs/EventWebhookBaseResponseProps.md delete mode 100644 rest/api/v3/webhooks/docs/EventWebhookDateResponseProps.md delete mode 100644 rest/api/v3/webhooks/docs/EventWebhookNoDatesResponse.md delete mode 100644 rest/api/v3/webhooks/docs/EventWebhookOauthResponseProps.md delete mode 100644 rest/api/v3/webhooks/docs/EventWebhookRequest.md delete mode 100644 rest/api/v3/webhooks/docs/EventWebhookSignedResponse.md delete mode 100644 rest/api/v3/webhooks/docs/EventWebhookSignedResponseProp.md delete mode 100644 rest/api/v3/webhooks/docs/EventWebhookTestRequest.md delete mode 100644 rest/api/v3/webhooks/docs/EventWebhookUnsignedResponse.md delete mode 100644 rest/api/v3/webhooks/docs/GetEventWebhook.md delete mode 100644 rest/api/v3/webhooks/docs/GetParseSetting.md delete mode 100644 rest/api/v3/webhooks/docs/GetSignedEventWebhook.md delete mode 100644 rest/api/v3/webhooks/docs/GetSignedEventWebhook200Response.md delete mode 100644 rest/api/v3/webhooks/docs/GetSignedEventWebhook404Response.md delete mode 100644 rest/api/v3/webhooks/docs/GetSignedEventWebhook404ResponseErrorsInner.md delete mode 100644 rest/api/v3/webhooks/docs/ListEventWebhook.md delete mode 100644 rest/api/v3/webhooks/docs/ListParseSetting.md delete mode 100644 rest/api/v3/webhooks/docs/ListParseSetting200Response.md delete mode 100644 rest/api/v3/webhooks/docs/ListParseStatic.md delete mode 100644 rest/api/v3/webhooks/docs/ListParseStatic200ResponseInner.md delete mode 100644 rest/api/v3/webhooks/docs/ListParseStatic200ResponseInnerStatsInner.md delete mode 100644 rest/api/v3/webhooks/docs/ListParseStatic200ResponseInnerStatsInnerMetrics.md delete mode 100644 rest/api/v3/webhooks/docs/ParseSetting.md delete mode 100644 rest/api/v3/webhooks/docs/TestEventWebhook.md delete mode 100644 rest/api/v3/webhooks/docs/UpdateEventWebhook.md delete mode 100644 rest/api/v3/webhooks/docs/UpdateParseSetting.md delete mode 100644 rest/api/v3/webhooks/docs/UpdateSignedEventWebhook.md delete mode 100644 rest/api/v3/webhooks/docs/UpdateSignedEventWebhookRequest.md delete mode 100644 rest/api/v3/webhooks/model_aggregated_by.go delete mode 100644 rest/api/v3/webhooks/model_create_event_webhook_400_response.go delete mode 100644 rest/api/v3/webhooks/model_create_event_webhook_400_response_errors_inner.go delete mode 100644 rest/api/v3/webhooks/model_error_response.go delete mode 100644 rest/api/v3/webhooks/model_error_response_errors_inner.go delete mode 100644 rest/api/v3/webhooks/model_event_webhook_all_response.go delete mode 100644 rest/api/v3/webhooks/model_event_webhook_base_response_props.go delete mode 100644 rest/api/v3/webhooks/model_event_webhook_date_response_props.go delete mode 100644 rest/api/v3/webhooks/model_event_webhook_no_dates_response.go delete mode 100644 rest/api/v3/webhooks/model_event_webhook_oauth_response_props.go delete mode 100644 rest/api/v3/webhooks/model_event_webhook_request.go delete mode 100644 rest/api/v3/webhooks/model_event_webhook_signed_response.go delete mode 100644 rest/api/v3/webhooks/model_event_webhook_signed_response_prop.go delete mode 100644 rest/api/v3/webhooks/model_event_webhook_test_request.go delete mode 100644 rest/api/v3/webhooks/model_event_webhook_unsigned_response.go delete mode 100644 rest/api/v3/webhooks/model_get_signed_event_webhook_200_response.go delete mode 100644 rest/api/v3/webhooks/model_get_signed_event_webhook_404_response.go delete mode 100644 rest/api/v3/webhooks/model_get_signed_event_webhook_404_response_errors_inner.go delete mode 100644 rest/api/v3/webhooks/model_list_parse_setting_200_response.go delete mode 100644 rest/api/v3/webhooks/model_list_parse_static_200_response_inner.go delete mode 100644 rest/api/v3/webhooks/model_list_parse_static_200_response_inner_stats_inner.go delete mode 100644 rest/api/v3/webhooks/model_list_parse_static_200_response_inner_stats_inner_metrics.go delete mode 100644 rest/api/v3/webhooks/model_parse_setting.go delete mode 100644 rest/api/v3/webhooks/model_update_signed_event_webhook_request.go diff --git a/rest/api/v3/account_provisioning/.openapi-generator b/rest/api/v3/account_provisioning/.openapi-generator deleted file mode 100644 index 97bc3ef8..00000000 --- a/rest/api/v3/account_provisioning/.openapi-generator +++ /dev/null @@ -1,58 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_authenticate_account.go -api_create_account.go -api_delete_account.go -api_get_account_state.go -api_list_account.go -api_list_account_offering.go -api_list_offering.go -api_service.go -api_update_account_offering.go -api_update_account_state.go -docs/AccountList.md -docs/AccountProvisioningAccount.md -docs/AccountProvisioningAccountId.md -docs/AccountProvisioningCatalog.md -docs/AccountProvisioningOfferingList.md -docs/AccountProvisioningOfferingV1.md -docs/AccountProvisioningPagination.md -docs/AccountProvisioningProfile.md -docs/AccountProvisioningStateRead.md -docs/AccountProvisioningStateWrite.md -docs/AuthenticateAccount.md -docs/CatalogEntry.md -docs/CatalogEntryEntitlements.md -docs/CreateAccount.md -docs/CreateAccountParams.md -docs/DeleteAccount.md -docs/ErrorResponse.md -docs/GetAccountState.md -docs/ListAccount.md -docs/ListAccountOffering.md -docs/ListOffering.md -docs/OfferingsToAdd.md -docs/State.md -docs/State1.md -docs/Type.md -docs/UpdateAccountOffering.md -docs/UpdateAccountState.md -model_account_list.go -model_account_provisioning_account.go -model_account_provisioning_account_id.go -model_account_provisioning_catalog.go -model_account_provisioning_offering_list.go -model_account_provisioning_offering_v1.go -model_account_provisioning_pagination.go -model_account_provisioning_profile.go -model_account_provisioning_state_read.go -model_account_provisioning_state_write.go -model_catalog_entry.go -model_catalog_entry_entitlements.go -model_create_account_params.go -model_error_response.go -model_offerings_to_add.go -model_state.go -model_state1.go -model_type.go diff --git a/rest/api/v3/account_provisioning/.openapi-generator-ignore b/rest/api/v3/account_provisioning/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/account_provisioning/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/account_provisioning/README.md b/rest/api/v3/account_provisioning/README.md deleted file mode 100644 index 78c647b4..00000000 --- a/rest/api/v3/account_provisioning/README.md +++ /dev/null @@ -1,87 +0,0 @@ -# Go API client for - -The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. - -You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:37.555407+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AuthenticateAccount* | [**AuthenticateAccount**](docs/AuthenticateAccount.md#authenticateaccount) | **Post** /v3/partners/accounts/{AccountID}/sso | Authenticate an account with single sign on -*CreateAccount* | [**CreateAccount**](docs/CreateAccount.md#createaccount) | **Post** /v3/partners/accounts | Create an account -*DeleteAccount* | [**DeleteAccount**](docs/DeleteAccount.md#deleteaccount) | **Delete** /v3/partners/accounts/{AccountID} | Delete an account -*GetAccountState* | [**GetAccountState**](docs/GetAccountState.md#getaccountstate) | **Get** /v3/partners/accounts/{AccountID}/state | Get an account's state -*ListAccount* | [**ListAccount**](docs/ListAccount.md#listaccount) | **Get** /v3/partners/accounts | Get all accounts -*ListAccountOffering* | [**ListAccountOffering**](docs/ListAccountOffering.md#listaccountoffering) | **Get** /v3/partners/accounts/{AccountID}/offerings | Get account offerings -*ListOffering* | [**ListOffering**](docs/ListOffering.md#listoffering) | **Get** /v3/partners/offerings | Get all available offerings -*UpdateAccountOffering* | [**UpdateAccountOffering**](docs/UpdateAccountOffering.md#updateaccountoffering) | **Put** /v3/partners/accounts/{AccountID}/offerings | Update account offerings -*UpdateAccountState* | [**UpdateAccountState**](docs/UpdateAccountState.md#updateaccountstate) | **Put** /v3/partners/accounts/{AccountID}/state | Update an account's state - - -## Documentation For Models - - - [AccountList](AccountList.md) - - [AccountProvisioningAccount](AccountProvisioningAccount.md) - - [AccountProvisioningAccountId](AccountProvisioningAccountId.md) - - [AccountProvisioningCatalog](AccountProvisioningCatalog.md) - - [AccountProvisioningOfferingList](AccountProvisioningOfferingList.md) - - [AccountProvisioningOfferingV1](AccountProvisioningOfferingV1.md) - - [AccountProvisioningPagination](AccountProvisioningPagination.md) - - [AccountProvisioningProfile](AccountProvisioningProfile.md) - - [AccountProvisioningStateRead](AccountProvisioningStateRead.md) - - [AccountProvisioningStateWrite](AccountProvisioningStateWrite.md) - - [CatalogEntry](CatalogEntry.md) - - [CatalogEntryEntitlements](CatalogEntryEntitlements.md) - - [CreateAccountParams](CreateAccountParams.md) - - [ErrorResponse](ErrorResponse.md) - - [OfferingsToAdd](OfferingsToAdd.md) - - [State](State.md) - - [State1](State1.md) - - [Type](Type.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/account_provisioning/api_authenticate_account.go b/rest/api/v3/account_provisioning/api_authenticate_account.go deleted file mode 100644 index d131c10e..00000000 --- a/rest/api/v3/account_provisioning/api_authenticate_account.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Account Provisioning API -* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "net/http" - "net/url" - - "strings" -) - -type AuthenticateAccountParam struct { - // Twilio SendGrid account ID - AccountID *string `json:"accountID"` -} - -func (params *AuthenticateAccountParam) SetAccountID(AccountID string) *AuthenticateAccountParam { - params.AccountID = &AccountID - return params -} - -// Authenticates and logs in a user to Twilio Sendgrid as a specific admin identity configured for SSO by partner. Any additional teammates or subusers will need to log in directly via app.sendgrid.com -func (c *ApiService) AuthenticateAccount(params *AuthenticateAccountParam) (interface{}, error) { - path := "/v3/partners/accounts/{AccountID}/sso" - if params != nil && params.AccountID != nil { - path = strings.Replace(path, "{"+"AccountID"+"}", *params.AccountID, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/account_provisioning/api_create_account.go b/rest/api/v3/account_provisioning/api_create_account.go deleted file mode 100644 index 963dd62a..00000000 --- a/rest/api/v3/account_provisioning/api_create_account.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Account Provisioning API -* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type CreateAccountParam struct { - // - CreateAccountParams *CreateAccountParams `json:"CreateAccountParams"` - // **OPTIONAL** Custom request header provided ONLY for a test account - TTestAccount *string `json:"T-Test-Account,omitempty"` -} - -func (params *CreateAccountParam) SetCreateAccountParams(CreateAccountParams CreateAccountParams) *CreateAccountParam { - params.CreateAccountParams = &CreateAccountParams - return params -} -func (params *CreateAccountParam) SetTTestAccount(TTestAccount string) *CreateAccountParam { - params.TTestAccount = &TTestAccount - return params -} - -// Creates a new account, with specified offering, under the organization. -func (c *ApiService) CreateAccount(params *CreateAccountParam) (interface{}, error) { - path := "/v3/partners/accounts" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.CreateAccountParams != nil { - b, err := json.Marshal(*params.CreateAccountParams) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.TTestAccount != nil { - headers["T-Test-Account"] = *params.TTestAccount - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &AccountProvisioningAccountId{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/account_provisioning/api_delete_account.go b/rest/api/v3/account_provisioning/api_delete_account.go deleted file mode 100644 index e01ac89e..00000000 --- a/rest/api/v3/account_provisioning/api_delete_account.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Account Provisioning API -* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "net/http" - "net/url" - - "strings" -) - -type DeleteAccountParam struct { - // Twilio SendGrid account ID - AccountID *string `json:"accountID"` -} - -func (params *DeleteAccountParam) SetAccountID(AccountID string) *DeleteAccountParam { - params.AccountID = &AccountID - return params -} - -// Delete a specific account under your organization by account ID. Note that this is an **irreversible** action that does the following: - Revokes API Keys and SSO so that the account user cannot log in or access SendGrid data. - Removes all offerings and configured SendGrid resources such as dedicated IPs. - Cancels billing effective immediately. -func (c *ApiService) DeleteAccount(params *DeleteAccountParam) (interface{}, error) { - path := "/v3/partners/accounts/{AccountID}" - if params != nil && params.AccountID != nil { - path = strings.Replace(path, "{"+"AccountID"+"}", *params.AccountID, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/account_provisioning/api_get_account_state.go b/rest/api/v3/account_provisioning/api_get_account_state.go deleted file mode 100644 index 8f723008..00000000 --- a/rest/api/v3/account_provisioning/api_get_account_state.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Account Provisioning API -* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetAccountStateParam struct { - // Twilio SendGrid account ID - AccountID *string `json:"accountID"` -} - -func (params *GetAccountStateParam) SetAccountID(AccountID string) *GetAccountStateParam { - params.AccountID = &AccountID - return params -} - -// Retrieve the state of the specified account. -func (c *ApiService) GetAccountState(params *GetAccountStateParam) (interface{}, error) { - path := "/v3/partners/accounts/{AccountID}/state" - if params != nil && params.AccountID != nil { - path = strings.Replace(path, "{"+"AccountID"+"}", *params.AccountID, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &AccountProvisioningStateRead{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/account_provisioning/api_list_account.go b/rest/api/v3/account_provisioning/api_list_account.go deleted file mode 100644 index 71dba184..00000000 --- a/rest/api/v3/account_provisioning/api_list_account.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Account Provisioning API -* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListAccountParam struct { - // The last item successfully retrieved - Offset *string `json:"offset,omitempty"` - // The number of items to return - Limit *int32 `json:"limit,omitempty"` -} - -func (params *ListAccountParam) SetOffset(Offset string) *ListAccountParam { - params.Offset = &Offset - return params -} -func (params *ListAccountParam) SetLimit(Limit int32) *ListAccountParam { - params.Limit = &Limit - return params -} - -// Retrieves all accounts under the organization. -func (c *ApiService) ListAccount(params *ListAccountParam) (interface{}, error) { - path := "/v3/partners/accounts" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Offset != nil { - data.Set("offset", *params.Offset) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &AccountList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/account_provisioning/api_list_account_offering.go b/rest/api/v3/account_provisioning/api_list_account_offering.go deleted file mode 100644 index 916500b8..00000000 --- a/rest/api/v3/account_provisioning/api_list_account_offering.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Account Provisioning API -* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type ListAccountOfferingParam struct { - // Twilio SendGrid account ID - AccountID *string `json:"accountID"` -} - -func (params *ListAccountOfferingParam) SetAccountID(AccountID string) *ListAccountOfferingParam { - params.AccountID = &AccountID - return params -} - -// Retrieves offering information about the specified account. -func (c *ApiService) ListAccountOffering(params *ListAccountOfferingParam) (interface{}, error) { - path := "/v3/partners/accounts/{AccountID}/offerings" - if params != nil && params.AccountID != nil { - path = strings.Replace(path, "{"+"AccountID"+"}", *params.AccountID, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &AccountProvisioningOfferingList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/account_provisioning/api_list_offering.go b/rest/api/v3/account_provisioning/api_list_offering.go deleted file mode 100644 index 48e4553e..00000000 --- a/rest/api/v3/account_provisioning/api_list_offering.go +++ /dev/null @@ -1,49 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Account Provisioning API -* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListOfferingParam struct { -} - -// Retrieves offerings available under the organization. -func (c *ApiService) ListOffering() (interface{}, error) { - path := "/v3/partners/offerings" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &AccountProvisioningCatalog{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/account_provisioning/api_service.go b/rest/api/v3/account_provisioning/api_service.go deleted file mode 100644 index 6459d6eb..00000000 --- a/rest/api/v3/account_provisioning/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Account Provisioning API -* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/account_provisioning/api_update_account_offering.go b/rest/api/v3/account_provisioning/api_update_account_offering.go deleted file mode 100644 index 1fd7e402..00000000 --- a/rest/api/v3/account_provisioning/api_update_account_offering.go +++ /dev/null @@ -1,76 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Account Provisioning API -* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type UpdateAccountOfferingParam struct { - // Twilio SendGrid account ID - AccountID *string `json:"accountID"` - // - OfferingsToAdd *OfferingsToAdd `json:"OfferingsToAdd"` -} - -func (params *UpdateAccountOfferingParam) SetAccountID(AccountID string) *UpdateAccountOfferingParam { - params.AccountID = &AccountID - return params -} -func (params *UpdateAccountOfferingParam) SetOfferingsToAdd(OfferingsToAdd OfferingsToAdd) *UpdateAccountOfferingParam { - params.OfferingsToAdd = &OfferingsToAdd - return params -} - -// Changes a package offering for the specified account. Please note that an account can have only one package offering. Also associates one or more add-on offerings such as Marketing Campaigns, Dedicated IP Addresses, and Expert Services to the specified account. -func (c *ApiService) UpdateAccountOffering(params *UpdateAccountOfferingParam) (interface{}, error) { - path := "/v3/partners/accounts/{AccountID}/offerings" - if params != nil && params.AccountID != nil { - path = strings.Replace(path, "{"+"AccountID"+"}", *params.AccountID, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.OfferingsToAdd != nil { - b, err := json.Marshal(*params.OfferingsToAdd) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &AccountProvisioningOfferingList{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/account_provisioning/api_update_account_state.go b/rest/api/v3/account_provisioning/api_update_account_state.go deleted file mode 100644 index c87093d9..00000000 --- a/rest/api/v3/account_provisioning/api_update_account_state.go +++ /dev/null @@ -1,68 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Account Provisioning API -* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type UpdateAccountStateParam struct { - // Twilio SendGrid account ID - AccountID *string `json:"accountID"` - // - AccountProvisioningStateWrite *AccountProvisioningStateWrite `json:"AccountProvisioningStateWrite"` -} - -func (params *UpdateAccountStateParam) SetAccountID(AccountID string) *UpdateAccountStateParam { - params.AccountID = &AccountID - return params -} -func (params *UpdateAccountStateParam) SetAccountProvisioningStateWrite(AccountProvisioningStateWrite AccountProvisioningStateWrite) *UpdateAccountStateParam { - params.AccountProvisioningStateWrite = &AccountProvisioningStateWrite - return params -} - -// Update the state of the specified account. -func (c *ApiService) UpdateAccountState(params *UpdateAccountStateParam) (interface{}, error) { - path := "/v3/partners/accounts/{AccountID}/state" - if params != nil && params.AccountID != nil { - path = strings.Replace(path, "{"+"AccountID"+"}", *params.AccountID, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.AccountProvisioningStateWrite != nil { - b, err := json.Marshal(*params.AccountProvisioningStateWrite) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/account_provisioning/docs/AccountList.md b/rest/api/v3/account_provisioning/docs/AccountList.md deleted file mode 100644 index 8ce68222..00000000 --- a/rest/api/v3/account_provisioning/docs/AccountList.md +++ /dev/null @@ -1,12 +0,0 @@ -# AccountList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Accounts** | [**[]AccountProvisioningAccount**](AccountProvisioningAccount.md) | List of account objects. |[optional] -**Pages** | [**AccountProvisioningPagination**](AccountProvisioningPagination.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/account_provisioning/docs/AccountProvisioningAccount.md b/rest/api/v3/account_provisioning/docs/AccountProvisioningAccount.md deleted file mode 100644 index acb44d9b..00000000 --- a/rest/api/v3/account_provisioning/docs/AccountProvisioningAccount.md +++ /dev/null @@ -1,12 +0,0 @@ -# AccountProvisioningAccount - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | Twilio SendGrid account ID | -**CreatedAt** | [**time.Time**](time.Time.md) | Timestamp indicating when the account was created. Format is [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/account_provisioning/docs/AccountProvisioningAccountId.md b/rest/api/v3/account_provisioning/docs/AccountProvisioningAccountId.md deleted file mode 100644 index 47063845..00000000 --- a/rest/api/v3/account_provisioning/docs/AccountProvisioningAccountId.md +++ /dev/null @@ -1,11 +0,0 @@ -# AccountProvisioningAccountId - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AccountId** | **string** | Twilio SendGrid account ID | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/account_provisioning/docs/AccountProvisioningCatalog.md b/rest/api/v3/account_provisioning/docs/AccountProvisioningCatalog.md deleted file mode 100644 index d0fe779b..00000000 --- a/rest/api/v3/account_provisioning/docs/AccountProvisioningCatalog.md +++ /dev/null @@ -1,11 +0,0 @@ -# AccountProvisioningCatalog - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Catalog** | [**[]CatalogEntry**](CatalogEntry.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/account_provisioning/docs/AccountProvisioningOfferingList.md b/rest/api/v3/account_provisioning/docs/AccountProvisioningOfferingList.md deleted file mode 100644 index 7bea6750..00000000 --- a/rest/api/v3/account_provisioning/docs/AccountProvisioningOfferingList.md +++ /dev/null @@ -1,11 +0,0 @@ -# AccountProvisioningOfferingList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Offerings** | [**[]AccountProvisioningOfferingV1**](AccountProvisioningOfferingV1.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/account_provisioning/docs/AccountProvisioningOfferingV1.md b/rest/api/v3/account_provisioning/docs/AccountProvisioningOfferingV1.md deleted file mode 100644 index d4da851a..00000000 --- a/rest/api/v3/account_provisioning/docs/AccountProvisioningOfferingV1.md +++ /dev/null @@ -1,13 +0,0 @@ -# AccountProvisioningOfferingV1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Name of the offering | -**Type** | [**Type**](Type.md) | Defines the type of offering (e.g., package or addon). | -**Quantity** | **int64** | Quantity of the specified addon to be added. If offering type is `package`, quantity must be 1. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/account_provisioning/docs/AccountProvisioningPagination.md b/rest/api/v3/account_provisioning/docs/AccountProvisioningPagination.md deleted file mode 100644 index 1c2e4e18..00000000 --- a/rest/api/v3/account_provisioning/docs/AccountProvisioningPagination.md +++ /dev/null @@ -1,12 +0,0 @@ -# AccountProvisioningPagination - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Last** | **string** | The last item returned |[optional] -**Example** | Pointer to **interface{}** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/account_provisioning/docs/AccountProvisioningProfile.md b/rest/api/v3/account_provisioning/docs/AccountProvisioningProfile.md deleted file mode 100644 index 9f5c6154..00000000 --- a/rest/api/v3/account_provisioning/docs/AccountProvisioningProfile.md +++ /dev/null @@ -1,17 +0,0 @@ -# AccountProvisioningProfile - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FirstName** | **string** | First name of the account holder |[optional] -**LastName** | **string** | Last name of the account holder |[optional] -**CompanyName** | **string** | Company name of the account holder |[optional] -**CompanyWebsite** | **string** | Company website of the account holder |[optional] -**Email** | **string** | Email of the account holder |[optional] -**Phone** | **string** | Phone number with a maximum of fifteen digits formatted using the E.164 standard consisting of [+] [country code] [subscriber number including area code] |[optional] -**Timezone** | **string** | Area/Location as listed in the [IANA Time Zone database](https://www.iana.org/time-zones) |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/account_provisioning/docs/AccountProvisioningStateRead.md b/rest/api/v3/account_provisioning/docs/AccountProvisioningStateRead.md deleted file mode 100644 index 8d2164df..00000000 --- a/rest/api/v3/account_provisioning/docs/AccountProvisioningStateRead.md +++ /dev/null @@ -1,11 +0,0 @@ -# AccountProvisioningStateRead - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**State** | [**State**](State.md) | The state of the account (e.g., `activated`, `deactivated`, `suspended`, `banned`, or `indeterminate`) | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/account_provisioning/docs/AccountProvisioningStateWrite.md b/rest/api/v3/account_provisioning/docs/AccountProvisioningStateWrite.md deleted file mode 100644 index e0e3fdae..00000000 --- a/rest/api/v3/account_provisioning/docs/AccountProvisioningStateWrite.md +++ /dev/null @@ -1,11 +0,0 @@ -# AccountProvisioningStateWrite - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**State** | [**State1**](State1.md) | The state of the account (e.g., `activated`, `deactivated`) | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/account_provisioning/docs/AuthenticateAccount.md b/rest/api/v3/account_provisioning/docs/AuthenticateAccount.md deleted file mode 100644 index c4d769bc..00000000 --- a/rest/api/v3/account_provisioning/docs/AuthenticateAccount.md +++ /dev/null @@ -1,51 +0,0 @@ -# AuthenticateAccount - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AuthenticateAccount**](AuthenticateAccount.md#AuthenticateAccount) | **Post** /v3/partners/accounts/{AccountID}/sso | Authenticate an account with single sign on - - - -## AuthenticateAccount - -> AuthenticateAccount(ctx, AccountID) - -Authenticate an account with single sign on - -Authenticates and logs in a user to Twilio Sendgrid as a specific admin identity configured for SSO by partner. Any additional teammates or subusers will need to log in directly via app.sendgrid.com - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**AccountID** | **string** | Twilio SendGrid account ID - -### Other Parameters - -Other parameters are passed through a pointer to a AuthenticateAccountParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/account_provisioning/docs/CatalogEntry.md b/rest/api/v3/account_provisioning/docs/CatalogEntry.md deleted file mode 100644 index b9c58b86..00000000 --- a/rest/api/v3/account_provisioning/docs/CatalogEntry.md +++ /dev/null @@ -1,12 +0,0 @@ -# CatalogEntry - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Offering** | [**AccountProvisioningOfferingV1**](AccountProvisioningOfferingV1.md) | |[optional] -**Entitlements** | [**CatalogEntryEntitlements**](CatalogEntryEntitlements.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/account_provisioning/docs/CatalogEntryEntitlements.md b/rest/api/v3/account_provisioning/docs/CatalogEntryEntitlements.md deleted file mode 100644 index 295aba0e..00000000 --- a/rest/api/v3/account_provisioning/docs/CatalogEntryEntitlements.md +++ /dev/null @@ -1,14 +0,0 @@ -# CatalogEntryEntitlements - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**EmailSendsMaxMonthly** | **int64** | Total number of email sends per month |[optional] -**IpCount** | **int64** | Number of dedicated IPs offered |[optional] -**TeammatesMaxTotal** | **int64** | Total number of teammates allowed |[optional] -**UsersMaxTotal** | **int64** | Total number of subusers allowed |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/account_provisioning/docs/CreateAccount.md b/rest/api/v3/account_provisioning/docs/CreateAccount.md deleted file mode 100644 index ecbf0664..00000000 --- a/rest/api/v3/account_provisioning/docs/CreateAccount.md +++ /dev/null @@ -1,48 +0,0 @@ -# CreateAccount - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateAccount**](CreateAccount.md#CreateAccount) | **Post** /v3/partners/accounts | Create an account - - - -## CreateAccount - -> AccountProvisioningAccountId CreateAccount(ctx, CreateAccountParamsoptional) - -Create an account - -Creates a new account, with specified offering, under the organization. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateAccountParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**TTestAccount** | **string** | **OPTIONAL** Custom request header provided ONLY for a test account - -### Return type - -[**AccountProvisioningAccountId**](AccountProvisioningAccountId.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/account_provisioning/docs/CreateAccountParams.md b/rest/api/v3/account_provisioning/docs/CreateAccountParams.md deleted file mode 100644 index 0770960f..00000000 --- a/rest/api/v3/account_provisioning/docs/CreateAccountParams.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateAccountParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Profile** | [**AccountProvisioningProfile**](AccountProvisioningProfile.md) | |[optional] -**Offerings** | [**[]AccountProvisioningOfferingV1**](AccountProvisioningOfferingV1.md) | List of offering names to assign to account. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/account_provisioning/docs/DeleteAccount.md b/rest/api/v3/account_provisioning/docs/DeleteAccount.md deleted file mode 100644 index 56c25b9b..00000000 --- a/rest/api/v3/account_provisioning/docs/DeleteAccount.md +++ /dev/null @@ -1,51 +0,0 @@ -# DeleteAccount - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteAccount**](DeleteAccount.md#DeleteAccount) | **Delete** /v3/partners/accounts/{AccountID} | Delete an account - - - -## DeleteAccount - -> DeleteAccount(ctx, AccountID) - -Delete an account - -Delete a specific account under your organization by account ID. Note that this is an **irreversible** action that does the following: - Revokes API Keys and SSO so that the account user cannot log in or access SendGrid data. - Removes all offerings and configured SendGrid resources such as dedicated IPs. - Cancels billing effective immediately. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**AccountID** | **string** | Twilio SendGrid account ID - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteAccountParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/account_provisioning/docs/ErrorResponse.md b/rest/api/v3/account_provisioning/docs/ErrorResponse.md deleted file mode 100644 index 976ef82d..00000000 --- a/rest/api/v3/account_provisioning/docs/ErrorResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# ErrorResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | The message representing the error from the API. | -**Field** | **string** | The field associated with the error. | -**ErrorId** | **string** | ID representing the error as a unique nubmer. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/account_provisioning/docs/GetAccountState.md b/rest/api/v3/account_provisioning/docs/GetAccountState.md deleted file mode 100644 index 72f545d0..00000000 --- a/rest/api/v3/account_provisioning/docs/GetAccountState.md +++ /dev/null @@ -1,51 +0,0 @@ -# GetAccountState - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetAccountState**](GetAccountState.md#GetAccountState) | **Get** /v3/partners/accounts/{AccountID}/state | Get an account's state - - - -## GetAccountState - -> AccountProvisioningStateRead GetAccountState(ctx, AccountID) - -Get an account's state - -Retrieve the state of the specified account. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**AccountID** | **string** | Twilio SendGrid account ID - -### Other Parameters - -Other parameters are passed through a pointer to a GetAccountStateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**AccountProvisioningStateRead**](AccountProvisioningStateRead.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/account_provisioning/docs/ListAccount.md b/rest/api/v3/account_provisioning/docs/ListAccount.md deleted file mode 100644 index 08835e00..00000000 --- a/rest/api/v3/account_provisioning/docs/ListAccount.md +++ /dev/null @@ -1,49 +0,0 @@ -# ListAccount - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListAccount**](ListAccount.md#ListAccount) | **Get** /v3/partners/accounts | Get all accounts - - - -## ListAccount - -> AccountList ListAccount(ctx, optional) - -Get all accounts - -Retrieves all accounts under the organization. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListAccountParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Offset** | **string** | The last item successfully retrieved -**Limit** | **int32** | The number of items to return - -### Return type - -[**AccountList**](AccountList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/account_provisioning/docs/ListAccountOffering.md b/rest/api/v3/account_provisioning/docs/ListAccountOffering.md deleted file mode 100644 index dfcc05e9..00000000 --- a/rest/api/v3/account_provisioning/docs/ListAccountOffering.md +++ /dev/null @@ -1,51 +0,0 @@ -# ListAccountOffering - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListAccountOffering**](ListAccountOffering.md#ListAccountOffering) | **Get** /v3/partners/accounts/{AccountID}/offerings | Get account offerings - - - -## ListAccountOffering - -> AccountProvisioningOfferingList ListAccountOffering(ctx, AccountID) - -Get account offerings - -Retrieves offering information about the specified account. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**AccountID** | **string** | Twilio SendGrid account ID - -### Other Parameters - -Other parameters are passed through a pointer to a ListAccountOfferingParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**AccountProvisioningOfferingList**](AccountProvisioningOfferingList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/account_provisioning/docs/ListOffering.md b/rest/api/v3/account_provisioning/docs/ListOffering.md deleted file mode 100644 index 7f8f7f4d..00000000 --- a/rest/api/v3/account_provisioning/docs/ListOffering.md +++ /dev/null @@ -1,44 +0,0 @@ -# ListOffering - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListOffering**](ListOffering.md#ListOffering) | **Get** /v3/partners/offerings | Get all available offerings - - - -## ListOffering - -> AccountProvisioningCatalog ListOffering(ctx, ) - -Get all available offerings - -Retrieves offerings available under the organization. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListOfferingParams struct - - -### Return type - -[**AccountProvisioningCatalog**](AccountProvisioningCatalog.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/account_provisioning/docs/OfferingsToAdd.md b/rest/api/v3/account_provisioning/docs/OfferingsToAdd.md deleted file mode 100644 index 331a737f..00000000 --- a/rest/api/v3/account_provisioning/docs/OfferingsToAdd.md +++ /dev/null @@ -1,11 +0,0 @@ -# OfferingsToAdd - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Offerings** | [**[]AccountProvisioningOfferingV1**](AccountProvisioningOfferingV1.md) | List of offerings to assign to account. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/account_provisioning/docs/State.md b/rest/api/v3/account_provisioning/docs/State.md deleted file mode 100644 index e6eafdea..00000000 --- a/rest/api/v3/account_provisioning/docs/State.md +++ /dev/null @@ -1,16 +0,0 @@ -# State - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**ACTIVATED** | string | (value: `"activated"`) -**DEACTIVATED** | string | (value: `"deactivated"`) -**SUSPENDED** | string | (value: `"suspended"`) -**BANNED** | string | (value: `"banned"`) -**INDETERMINATE** | string | (value: `"indeterminate"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/account_provisioning/docs/State1.md b/rest/api/v3/account_provisioning/docs/State1.md deleted file mode 100644 index ef3ce852..00000000 --- a/rest/api/v3/account_provisioning/docs/State1.md +++ /dev/null @@ -1,13 +0,0 @@ -# State1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**ACTIVATED** | string | (value: `"activated"`) -**DEACTIVATED** | string | (value: `"deactivated"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/account_provisioning/docs/Type.md b/rest/api/v3/account_provisioning/docs/Type.md deleted file mode 100644 index f07e195a..00000000 --- a/rest/api/v3/account_provisioning/docs/Type.md +++ /dev/null @@ -1,13 +0,0 @@ -# Type - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**PACKAGE** | string | (value: `"package"`) -**ADDON** | string | (value: `"addon"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/account_provisioning/docs/UpdateAccountOffering.md b/rest/api/v3/account_provisioning/docs/UpdateAccountOffering.md deleted file mode 100644 index 2e4299a3..00000000 --- a/rest/api/v3/account_provisioning/docs/UpdateAccountOffering.md +++ /dev/null @@ -1,51 +0,0 @@ -# UpdateAccountOffering - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateAccountOffering**](UpdateAccountOffering.md#UpdateAccountOffering) | **Put** /v3/partners/accounts/{AccountID}/offerings | Update account offerings - - - -## UpdateAccountOffering - -> AccountProvisioningOfferingList UpdateAccountOffering(ctx, AccountIDOfferingsToAdd) - -Update account offerings - -Changes a package offering for the specified account. Please note that an account can have only one package offering. Also associates one or more add-on offerings such as Marketing Campaigns, Dedicated IP Addresses, and Expert Services to the specified account. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**AccountID** | **string** | Twilio SendGrid account ID - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateAccountOfferingParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**AccountProvisioningOfferingList**](AccountProvisioningOfferingList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/account_provisioning/docs/UpdateAccountState.md b/rest/api/v3/account_provisioning/docs/UpdateAccountState.md deleted file mode 100644 index c8a82904..00000000 --- a/rest/api/v3/account_provisioning/docs/UpdateAccountState.md +++ /dev/null @@ -1,51 +0,0 @@ -# UpdateAccountState - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateAccountState**](UpdateAccountState.md#UpdateAccountState) | **Put** /v3/partners/accounts/{AccountID}/state | Update an account's state - - - -## UpdateAccountState - -> UpdateAccountState(ctx, AccountIDAccountProvisioningStateWrite) - -Update an account's state - -Update the state of the specified account. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**AccountID** | **string** | Twilio SendGrid account ID - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateAccountStateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/account_provisioning/model_account_list.go b/rest/api/v3/account_provisioning/model_account_list.go deleted file mode 100644 index 59f5e79d..00000000 --- a/rest/api/v3/account_provisioning/model_account_list.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Account Provisioning API -* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AccountList struct for AccountList -type AccountList struct { - // List of account objects. - Accounts *[]AccountProvisioningAccount `json:"accounts,omitempty"` - Pages *AccountProvisioningPagination `json:"pages,omitempty"` -} diff --git a/rest/api/v3/account_provisioning/model_account_provisioning_account.go b/rest/api/v3/account_provisioning/model_account_provisioning_account.go deleted file mode 100644 index bcbe2fdb..00000000 --- a/rest/api/v3/account_provisioning/model_account_provisioning_account.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Account Provisioning API -* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "time" -) - -// AccountProvisioningAccount struct for AccountProvisioningAccount -type AccountProvisioningAccount struct { - // Twilio SendGrid account ID - Id string `json:"id"` - // Timestamp indicating when the account was created. Format is [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) - CreatedAt time.Time `json:"created_at"` -} diff --git a/rest/api/v3/account_provisioning/model_account_provisioning_account_id.go b/rest/api/v3/account_provisioning/model_account_provisioning_account_id.go deleted file mode 100644 index c73f6222..00000000 --- a/rest/api/v3/account_provisioning/model_account_provisioning_account_id.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Account Provisioning API -* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AccountProvisioningAccountId struct for AccountProvisioningAccountId -type AccountProvisioningAccountId struct { - // Twilio SendGrid account ID - AccountId string `json:"account_id"` -} diff --git a/rest/api/v3/account_provisioning/model_account_provisioning_catalog.go b/rest/api/v3/account_provisioning/model_account_provisioning_catalog.go deleted file mode 100644 index 717c1073..00000000 --- a/rest/api/v3/account_provisioning/model_account_provisioning_catalog.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Account Provisioning API -* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AccountProvisioningCatalog struct for AccountProvisioningCatalog -type AccountProvisioningCatalog struct { - Catalog *[]CatalogEntry `json:"catalog,omitempty"` -} diff --git a/rest/api/v3/account_provisioning/model_account_provisioning_offering_list.go b/rest/api/v3/account_provisioning/model_account_provisioning_offering_list.go deleted file mode 100644 index 2381fe06..00000000 --- a/rest/api/v3/account_provisioning/model_account_provisioning_offering_list.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Account Provisioning API -* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AccountProvisioningOfferingList struct for AccountProvisioningOfferingList -type AccountProvisioningOfferingList struct { - Offerings *[]AccountProvisioningOfferingV1 `json:"offerings,omitempty"` -} diff --git a/rest/api/v3/account_provisioning/model_account_provisioning_offering_v1.go b/rest/api/v3/account_provisioning/model_account_provisioning_offering_v1.go deleted file mode 100644 index e3652f95..00000000 --- a/rest/api/v3/account_provisioning/model_account_provisioning_offering_v1.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Account Provisioning API -* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AccountProvisioningOfferingV1 An offering is a package (email infrastructure) or add-on (marketing campaigns, dedicated IP addresses, EASE) that an account can acquire. Each offering has a list of entitlements that indicate the benefits the account receives from the acquisition. -type AccountProvisioningOfferingV1 struct { - // Name of the offering - Name string `json:"name"` - // Defines the type of offering (e.g., package or addon). - Type Type `json:"type"` - // Quantity of the specified addon to be added. If offering type is `package`, quantity must be 1. - Quantity *int64 `json:"quantity,omitempty"` -} diff --git a/rest/api/v3/account_provisioning/model_account_provisioning_pagination.go b/rest/api/v3/account_provisioning/model_account_provisioning_pagination.go deleted file mode 100644 index a4f93bf0..00000000 --- a/rest/api/v3/account_provisioning/model_account_provisioning_pagination.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Account Provisioning API -* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AccountProvisioningPagination struct for AccountProvisioningPagination -type AccountProvisioningPagination struct { - // The last item returned - Last *string `json:"last,omitempty"` - Example *interface{} `json:"example,omitempty"` -} diff --git a/rest/api/v3/account_provisioning/model_account_provisioning_profile.go b/rest/api/v3/account_provisioning/model_account_provisioning_profile.go deleted file mode 100644 index c352a637..00000000 --- a/rest/api/v3/account_provisioning/model_account_provisioning_profile.go +++ /dev/null @@ -1,32 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Account Provisioning API -* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AccountProvisioningProfile struct for AccountProvisioningProfile -type AccountProvisioningProfile struct { - // First name of the account holder - FirstName *string `json:"first_name,omitempty"` - // Last name of the account holder - LastName *string `json:"last_name,omitempty"` - // Company name of the account holder - CompanyName *string `json:"company_name,omitempty"` - // Company website of the account holder - CompanyWebsite *string `json:"company_website,omitempty"` - // Email of the account holder - Email *string `json:"email,omitempty"` - // Phone number with a maximum of fifteen digits formatted using the E.164 standard consisting of [+] [country code] [subscriber number including area code] - Phone *string `json:"phone,omitempty"` - // Area/Location as listed in the [IANA Time Zone database](https://www.iana.org/time-zones) - Timezone *string `json:"timezone,omitempty"` -} diff --git a/rest/api/v3/account_provisioning/model_account_provisioning_state_read.go b/rest/api/v3/account_provisioning/model_account_provisioning_state_read.go deleted file mode 100644 index 84d25d48..00000000 --- a/rest/api/v3/account_provisioning/model_account_provisioning_state_read.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Account Provisioning API -* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AccountProvisioningStateRead struct for AccountProvisioningStateRead -type AccountProvisioningStateRead struct { - // The state of the account (e.g., `activated`, `deactivated`, `suspended`, `banned`, or `indeterminate`) - State State `json:"state"` -} diff --git a/rest/api/v3/account_provisioning/model_account_provisioning_state_write.go b/rest/api/v3/account_provisioning/model_account_provisioning_state_write.go deleted file mode 100644 index 625284be..00000000 --- a/rest/api/v3/account_provisioning/model_account_provisioning_state_write.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Account Provisioning API -* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AccountProvisioningStateWrite struct for AccountProvisioningStateWrite -type AccountProvisioningStateWrite struct { - // The state of the account (e.g., `activated`, `deactivated`) - State State1 `json:"state"` -} diff --git a/rest/api/v3/account_provisioning/model_catalog_entry.go b/rest/api/v3/account_provisioning/model_catalog_entry.go deleted file mode 100644 index b488d947..00000000 --- a/rest/api/v3/account_provisioning/model_catalog_entry.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Account Provisioning API -* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CatalogEntry struct for CatalogEntry -type CatalogEntry struct { - Offering *AccountProvisioningOfferingV1 `json:"offering,omitempty"` - Entitlements *CatalogEntryEntitlements `json:"entitlements,omitempty"` -} diff --git a/rest/api/v3/account_provisioning/model_catalog_entry_entitlements.go b/rest/api/v3/account_provisioning/model_catalog_entry_entitlements.go deleted file mode 100644 index 841d6738..00000000 --- a/rest/api/v3/account_provisioning/model_catalog_entry_entitlements.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Account Provisioning API -* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CatalogEntryEntitlements Set of entitlements the specified offering comes with -type CatalogEntryEntitlements struct { - // Total number of email sends per month - EmailSendsMaxMonthly *int64 `json:"email_sends_max_monthly,omitempty"` - // Number of dedicated IPs offered - IpCount *int64 `json:"ip_count,omitempty"` - // Total number of teammates allowed - TeammatesMaxTotal *int64 `json:"teammates_max_total,omitempty"` - // Total number of subusers allowed - UsersMaxTotal *int64 `json:"users_max_total,omitempty"` -} diff --git a/rest/api/v3/account_provisioning/model_create_account_params.go b/rest/api/v3/account_provisioning/model_create_account_params.go deleted file mode 100644 index dd953c68..00000000 --- a/rest/api/v3/account_provisioning/model_create_account_params.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Account Provisioning API -* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateAccountParams struct for CreateAccountParams -type CreateAccountParams struct { - Profile *AccountProvisioningProfile `json:"profile,omitempty"` - // List of offering names to assign to account. - Offerings []AccountProvisioningOfferingV1 `json:"offerings"` -} diff --git a/rest/api/v3/account_provisioning/model_error_response.go b/rest/api/v3/account_provisioning/model_error_response.go deleted file mode 100644 index 553b37fa..00000000 --- a/rest/api/v3/account_provisioning/model_error_response.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Account Provisioning API -* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponse struct for ErrorResponse -type ErrorResponse struct { - // The message representing the error from the API. - Message string `json:"message"` - // The field associated with the error. - Field string `json:"field"` - // ID representing the error as a unique nubmer. - ErrorId string `json:"error_id"` -} diff --git a/rest/api/v3/account_provisioning/model_offerings_to_add.go b/rest/api/v3/account_provisioning/model_offerings_to_add.go deleted file mode 100644 index 8913aff0..00000000 --- a/rest/api/v3/account_provisioning/model_offerings_to_add.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Account Provisioning API -* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// OfferingsToAdd struct for OfferingsToAdd -type OfferingsToAdd struct { - // List of offerings to assign to account. - Offerings []AccountProvisioningOfferingV1 `json:"offerings"` -} diff --git a/rest/api/v3/account_provisioning/model_state.go b/rest/api/v3/account_provisioning/model_state.go deleted file mode 100644 index b9deec05..00000000 --- a/rest/api/v3/account_provisioning/model_state.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Account Provisioning API -* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// State the model 'State' -type State string - -// List of State -const ( - STATE_ACTIVATED State = "activated" - STATE_DEACTIVATED State = "deactivated" - STATE_SUSPENDED State = "suspended" - STATE_BANNED State = "banned" - STATE_INDETERMINATE State = "indeterminate" -) diff --git a/rest/api/v3/account_provisioning/model_state1.go b/rest/api/v3/account_provisioning/model_state1.go deleted file mode 100644 index 16b6afaf..00000000 --- a/rest/api/v3/account_provisioning/model_state1.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Account Provisioning API -* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// State1 the model 'State1' -type State1 string - -// List of State1 -const ( - STATE1_ACTIVATED State1 = "activated" - STATE1_DEACTIVATED State1 = "deactivated" -) diff --git a/rest/api/v3/account_provisioning/model_type.go b/rest/api/v3/account_provisioning/model_type.go deleted file mode 100644 index 8b89c8bf..00000000 --- a/rest/api/v3/account_provisioning/model_type.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Account Provisioning API -* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Type the model 'Type' -type Type string - -// List of Type -const ( - TYPE_PACKAGE Type = "package" - TYPE_ADDON Type = "addon" -) diff --git a/rest/api/v3/alerts/.openapi-generator b/rest/api/v3/alerts/.openapi-generator deleted file mode 100644 index 26ec3615..00000000 --- a/rest/api/v3/alerts/.openapi-generator +++ /dev/null @@ -1,38 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_create_alert.go -api_delete_alert.go -api_get_alert.go -api_list_alert.go -api_service.go -api_update_alert.go -docs/CreateAlert.md -docs/CreateAlert201Response.md -docs/CreateAlertRequest.md -docs/DeleteAlert.md -docs/ErrorResponse.md -docs/ErrorResponseErrorsInner.md -docs/GetAlert.md -docs/GetAlert200Response.md -docs/ListAlert.md -docs/ListAlert200ResponseInner.md -docs/Type.md -docs/Type1.md -docs/Type2.md -docs/Type3.md -docs/UpdateAlert.md -docs/UpdateAlert200Response.md -docs/UpdateAlertRequest.md -model_create_alert_201_response.go -model_create_alert_request.go -model_error_response.go -model_error_response_errors_inner.go -model_get_alert_200_response.go -model_list_alert_200_response_inner.go -model_type.go -model_type1.go -model_type2.go -model_type3.go -model_update_alert_200_response.go -model_update_alert_request.go diff --git a/rest/api/v3/alerts/.openapi-generator-ignore b/rest/api/v3/alerts/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/alerts/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/alerts/README.md b/rest/api/v3/alerts/README.md deleted file mode 100644 index 4a3643b5..00000000 --- a/rest/api/v3/alerts/README.md +++ /dev/null @@ -1,77 +0,0 @@ -# Go API client for - -The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. - -For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:37.549840+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*CreateAlert* | [**CreateAlert**](docs/CreateAlert.md#createalert) | **Post** /v3/alerts | Create a new Alert -*DeleteAlert* | [**DeleteAlert**](docs/DeleteAlert.md#deletealert) | **Delete** /v3/alerts/{AlertId} | Delete an alert -*GetAlert* | [**GetAlert**](docs/GetAlert.md#getalert) | **Get** /v3/alerts/{AlertId} | Retrieve a specific alert -*ListAlert* | [**ListAlert**](docs/ListAlert.md#listalert) | **Get** /v3/alerts | Retrieve all alerts -*UpdateAlert* | [**UpdateAlert**](docs/UpdateAlert.md#updatealert) | **Patch** /v3/alerts/{AlertId} | Update an alert - - -## Documentation For Models - - - [CreateAlert201Response](CreateAlert201Response.md) - - [CreateAlertRequest](CreateAlertRequest.md) - - [ErrorResponse](ErrorResponse.md) - - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) - - [GetAlert200Response](GetAlert200Response.md) - - [ListAlert200ResponseInner](ListAlert200ResponseInner.md) - - [Type](Type.md) - - [Type1](Type1.md) - - [Type2](Type2.md) - - [Type3](Type3.md) - - [UpdateAlert200Response](UpdateAlert200Response.md) - - [UpdateAlertRequest](UpdateAlertRequest.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/alerts/api_create_alert.go b/rest/api/v3/alerts/api_create_alert.go deleted file mode 100644 index 955be858..00000000 --- a/rest/api/v3/alerts/api_create_alert.go +++ /dev/null @@ -1,82 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Alerts API -* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type CreateAlertParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - CreateAlertRequest *CreateAlertRequest `json:"CreateAlertRequest,omitempty"` -} - -func (params *CreateAlertParam) SetOnbehalfof(Onbehalfof string) *CreateAlertParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *CreateAlertParam) SetCreateAlertRequest(CreateAlertRequest CreateAlertRequest) *CreateAlertParam { - params.CreateAlertRequest = &CreateAlertRequest - return params -} - -// **This endpoint allows you to create a new alert.** -func (c *ApiService) CreateAlert(params *CreateAlertParam) (interface{}, error) { - path := "/v3/alerts" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.CreateAlertRequest != nil { - b, err := json.Marshal(*params.CreateAlertRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &CreateAlert201Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/alerts/api_delete_alert.go b/rest/api/v3/alerts/api_delete_alert.go deleted file mode 100644 index 1592a253..00000000 --- a/rest/api/v3/alerts/api_delete_alert.go +++ /dev/null @@ -1,62 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Alerts API -* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "fmt" - "net/http" - "net/url" - - "strings" -) - -type DeleteAlertParam struct { - // The ID of the alert you would like to retrieve. - AlertId *int32 `json:"alert_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *DeleteAlertParam) SetAlertId(AlertId int32) *DeleteAlertParam { - params.AlertId = &AlertId - return params -} -func (params *DeleteAlertParam) SetOnbehalfof(Onbehalfof string) *DeleteAlertParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to delete an alert.** -func (c *ApiService) DeleteAlert(params *DeleteAlertParam) (interface{}, error) { - path := "/v3/alerts/{AlertId}" - if params != nil && params.AlertId != nil { - path = strings.Replace(path, "{"+"AlertId"+"}", fmt.Sprint(*params.AlertId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/alerts/api_get_alert.go b/rest/api/v3/alerts/api_get_alert.go deleted file mode 100644 index 0d99f947..00000000 --- a/rest/api/v3/alerts/api_get_alert.go +++ /dev/null @@ -1,71 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Alerts API -* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type GetAlertParam struct { - // The ID of the alert you would like to retrieve. - AlertId *int32 `json:"alert_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetAlertParam) SetAlertId(AlertId int32) *GetAlertParam { - params.AlertId = &AlertId - return params -} -func (params *GetAlertParam) SetOnbehalfof(Onbehalfof string) *GetAlertParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a specific alert.** -func (c *ApiService) GetAlert(params *GetAlertParam) (interface{}, error) { - path := "/v3/alerts/{AlertId}" - if params != nil && params.AlertId != nil { - path = strings.Replace(path, "{"+"AlertId"+"}", fmt.Sprint(*params.AlertId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &GetAlert200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/alerts/api_list_alert.go b/rest/api/v3/alerts/api_list_alert.go deleted file mode 100644 index 184c07aa..00000000 --- a/rest/api/v3/alerts/api_list_alert.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Alerts API -* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListAlertParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListAlertParam) SetOnbehalfof(Onbehalfof string) *ListAlertParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve all of your alerts.** -func (c *ApiService) ListAlert(params *ListAlertParam) (interface{}, error) { - path := "/v3/alerts" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]ListAlert200ResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/alerts/api_service.go b/rest/api/v3/alerts/api_service.go deleted file mode 100644 index 79301822..00000000 --- a/rest/api/v3/alerts/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Alerts API -* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/alerts/api_update_alert.go b/rest/api/v3/alerts/api_update_alert.go deleted file mode 100644 index aa0a59fd..00000000 --- a/rest/api/v3/alerts/api_update_alert.go +++ /dev/null @@ -1,86 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Alerts API -* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type UpdateAlertParam struct { - // The ID of the alert you would like to retrieve. - AlertId *int32 `json:"alert_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - UpdateAlertRequest *UpdateAlertRequest `json:"UpdateAlertRequest,omitempty"` -} - -func (params *UpdateAlertParam) SetAlertId(AlertId int32) *UpdateAlertParam { - params.AlertId = &AlertId - return params -} -func (params *UpdateAlertParam) SetOnbehalfof(Onbehalfof string) *UpdateAlertParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateAlertParam) SetUpdateAlertRequest(UpdateAlertRequest UpdateAlertRequest) *UpdateAlertParam { - params.UpdateAlertRequest = &UpdateAlertRequest - return params -} - -// **This endpoint allows you to update an alert.** -func (c *ApiService) UpdateAlert(params *UpdateAlertParam) (interface{}, error) { - path := "/v3/alerts/{AlertId}" - if params != nil && params.AlertId != nil { - path = strings.Replace(path, "{"+"AlertId"+"}", fmt.Sprint(*params.AlertId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateAlertRequest != nil { - b, err := json.Marshal(*params.UpdateAlertRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &UpdateAlert200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/alerts/docs/CreateAlert.md b/rest/api/v3/alerts/docs/CreateAlert.md deleted file mode 100644 index 5b8a4c69..00000000 --- a/rest/api/v3/alerts/docs/CreateAlert.md +++ /dev/null @@ -1,49 +0,0 @@ -# CreateAlert - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateAlert**](CreateAlert.md#CreateAlert) | **Post** /v3/alerts | Create a new Alert - - - -## CreateAlert - -> CreateAlert201Response CreateAlert(ctx, optional) - -Create a new Alert - -**This endpoint allows you to create a new alert.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateAlertParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**CreateAlertRequest** | [**CreateAlertRequest**](CreateAlertRequest.md) | - -### Return type - -[**CreateAlert201Response**](CreateAlert201Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/alerts/docs/CreateAlert201Response.md b/rest/api/v3/alerts/docs/CreateAlert201Response.md deleted file mode 100644 index 8d9fce20..00000000 --- a/rest/api/v3/alerts/docs/CreateAlert201Response.md +++ /dev/null @@ -1,17 +0,0 @@ -# CreateAlert201Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CreatedAt** | **int32** | A Unix timestamp indicating when the alert was created. | -**EmailTo** | **string** | The email address that the alert will be sent to. | -**Frequency** | **string** | If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent. For example, \"daily\", \"weekly\", or \"monthly\". |[optional] -**Id** | **int32** | The ID of the alert. | -**Type** | **string** | The type of alert. | -**UpdatedAt** | **int32** | A Unix timestamp indicating when the alert was last modified. | -**Percentage** | **int32** | If the alert is of type `usage_limit`, this indicates the percentage of email usage that must be reached before the alert will be sent. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/alerts/docs/CreateAlertRequest.md b/rest/api/v3/alerts/docs/CreateAlertRequest.md deleted file mode 100644 index b043fc6a..00000000 --- a/rest/api/v3/alerts/docs/CreateAlertRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreateAlertRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | [**Type**](Type.md) | The type of alert you want to create. Can be either usage_limit or stats_notification. Example: usage_limit | -**EmailTo** | **string** | The email address the alert will be sent to. Example: test@example.com | -**Frequency** | **string** | Required for stats_notification. How frequently the alert will be sent. Example: daily |[optional] -**Percentage** | **int32** | Required for usage_limit. When this usage threshold is reached, the alert will be sent. Example: 90 |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/alerts/docs/DeleteAlert.md b/rest/api/v3/alerts/docs/DeleteAlert.md deleted file mode 100644 index ba62219b..00000000 --- a/rest/api/v3/alerts/docs/DeleteAlert.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeleteAlert - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteAlert**](DeleteAlert.md#DeleteAlert) | **Delete** /v3/alerts/{AlertId} | Delete an alert - - - -## DeleteAlert - -> DeleteAlert(ctx, AlertIdoptional) - -Delete an alert - -**This endpoint allows you to delete an alert.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**AlertId** | **int32** | The ID of the alert you would like to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteAlertParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/alerts/docs/ErrorResponse.md b/rest/api/v3/alerts/docs/ErrorResponse.md deleted file mode 100644 index ec2d41f6..00000000 --- a/rest/api/v3/alerts/docs/ErrorResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ErrorResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] -**Id** | **string** | When applicable, this property value will be an error ID. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/alerts/docs/ErrorResponseErrorsInner.md b/rest/api/v3/alerts/docs/ErrorResponseErrorsInner.md deleted file mode 100644 index 5449c685..00000000 --- a/rest/api/v3/alerts/docs/ErrorResponseErrorsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ErrorResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | An error message. |[optional] -**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] -**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/alerts/docs/GetAlert.md b/rest/api/v3/alerts/docs/GetAlert.md deleted file mode 100644 index 345075a6..00000000 --- a/rest/api/v3/alerts/docs/GetAlert.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetAlert - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetAlert**](GetAlert.md#GetAlert) | **Get** /v3/alerts/{AlertId} | Retrieve a specific alert - - - -## GetAlert - -> GetAlert200Response GetAlert(ctx, AlertIdoptional) - -Retrieve a specific alert - -**This endpoint allows you to retrieve a specific alert.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**AlertId** | **int32** | The ID of the alert you would like to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a GetAlertParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**GetAlert200Response**](GetAlert200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/alerts/docs/GetAlert200Response.md b/rest/api/v3/alerts/docs/GetAlert200Response.md deleted file mode 100644 index 4ea6ac01..00000000 --- a/rest/api/v3/alerts/docs/GetAlert200Response.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetAlert200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CreatedAt** | **int32** | A Unix timestamp indicating when the alert was created. | -**EmailTo** | **string** | The email address that the alert will be sent to. | -**Frequency** | **string** | If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent. For example: \"daily\", \"weekly\", or \"monthly\". |[optional] -**Id** | **int32** | The ID of the alert. | -**Type** | [**Type2**](Type2.md) | The type of alert. | -**UpdatedAt** | **int32** | A Unix timestamp indicating when the alert was last modified. | -**Percentage** | **int32** | If the alert is of type usage_limit, this indicates the percentage of email usage that must be reached before the alert will be sent. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/alerts/docs/ListAlert.md b/rest/api/v3/alerts/docs/ListAlert.md deleted file mode 100644 index 9996e4cd..00000000 --- a/rest/api/v3/alerts/docs/ListAlert.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListAlert - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListAlert**](ListAlert.md#ListAlert) | **Get** /v3/alerts | Retrieve all alerts - - - -## ListAlert - -> []ListAlert200ResponseInner ListAlert(ctx, optional) - -Retrieve all alerts - -**This endpoint allows you to retrieve all of your alerts.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListAlertParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**[]ListAlert200ResponseInner**](ListAlert200ResponseInner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/alerts/docs/ListAlert200ResponseInner.md b/rest/api/v3/alerts/docs/ListAlert200ResponseInner.md deleted file mode 100644 index a078cc54..00000000 --- a/rest/api/v3/alerts/docs/ListAlert200ResponseInner.md +++ /dev/null @@ -1,17 +0,0 @@ -# ListAlert200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CreatedAt** | **int32** | A Unix timestamp indicating when the alert was created. | -**EmailTo** | **string** | The email address that the alert will be sent to. | -**Id** | **int32** | The ID of the alert. | -**Percentage** | **int32** | If the alert is of type usage_limit, this indicates the percentage of email usage that must be reached before the alert will be sent. |[optional] -**Type** | [**Type1**](Type1.md) | The type of alert. | -**UpdatedAt** | **int32** | A Unix timestamp indicating when the alert was last modified. |[optional] -**Frequency** | **string** | If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent. For example, \"daily\", \"weekly\", or \"monthly\". |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/alerts/docs/Type.md b/rest/api/v3/alerts/docs/Type.md deleted file mode 100644 index 31653d8d..00000000 --- a/rest/api/v3/alerts/docs/Type.md +++ /dev/null @@ -1,13 +0,0 @@ -# Type - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**STATS_NOTIFICATION** | string | (value: `"stats_notification"`) -**USAGE_LIMIT** | string | (value: `"usage_limit"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/alerts/docs/Type1.md b/rest/api/v3/alerts/docs/Type1.md deleted file mode 100644 index 6ae1d3bf..00000000 --- a/rest/api/v3/alerts/docs/Type1.md +++ /dev/null @@ -1,13 +0,0 @@ -# Type1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**USAGE_LIMIT** | string | (value: `"usage_limit"`) -**STATS_NOTIFICATION** | string | (value: `"stats_notification"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/alerts/docs/Type2.md b/rest/api/v3/alerts/docs/Type2.md deleted file mode 100644 index 54da2c21..00000000 --- a/rest/api/v3/alerts/docs/Type2.md +++ /dev/null @@ -1,13 +0,0 @@ -# Type2 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**USAGE_LIMIT** | string | (value: `"usage_limit"`) -**STATS_NOTIFICATION** | string | (value: `"stats_notification"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/alerts/docs/Type3.md b/rest/api/v3/alerts/docs/Type3.md deleted file mode 100644 index 60187fd5..00000000 --- a/rest/api/v3/alerts/docs/Type3.md +++ /dev/null @@ -1,13 +0,0 @@ -# Type3 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**USAGE_LIMIT** | string | (value: `"usage_limit"`) -**STATS_NOTIFICATION** | string | (value: `"stats_notification"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/alerts/docs/UpdateAlert.md b/rest/api/v3/alerts/docs/UpdateAlert.md deleted file mode 100644 index 85acdfc3..00000000 --- a/rest/api/v3/alerts/docs/UpdateAlert.md +++ /dev/null @@ -1,53 +0,0 @@ -# UpdateAlert - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateAlert**](UpdateAlert.md#UpdateAlert) | **Patch** /v3/alerts/{AlertId} | Update an alert - - - -## UpdateAlert - -> UpdateAlert200Response UpdateAlert(ctx, AlertIdoptional) - -Update an alert - -**This endpoint allows you to update an alert.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**AlertId** | **int32** | The ID of the alert you would like to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateAlertParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**UpdateAlertRequest** | [**UpdateAlertRequest**](UpdateAlertRequest.md) | - -### Return type - -[**UpdateAlert200Response**](UpdateAlert200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/alerts/docs/UpdateAlert200Response.md b/rest/api/v3/alerts/docs/UpdateAlert200Response.md deleted file mode 100644 index 49e6cfb3..00000000 --- a/rest/api/v3/alerts/docs/UpdateAlert200Response.md +++ /dev/null @@ -1,17 +0,0 @@ -# UpdateAlert200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CreatedAt** | **int32** | A Unix timestamp indicating when the alert was created. | -**EmailTo** | **string** | The email address that the alert will be sent to. | -**Frequency** | **string** | If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent. For example: \"daily\", \"weekly\", or \"monthly\". |[optional] -**Id** | **int32** | The ID of the alert. | -**Type** | [**Type3**](Type3.md) | The type of alert. | -**UpdatedAt** | **int32** | A Unix timestamp indicating when the alert was last modified. | -**Percentage** | **int32** | If the alert is of type usage_limit, this indicates the percentage of email usage that must be reached before the alert will be sent. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/alerts/docs/UpdateAlertRequest.md b/rest/api/v3/alerts/docs/UpdateAlertRequest.md deleted file mode 100644 index 1bb4d6f0..00000000 --- a/rest/api/v3/alerts/docs/UpdateAlertRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# UpdateAlertRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**EmailTo** | **string** | The new email address you want your alert to be sent to. Example: test@example.com |[optional] -**Frequency** | **string** | The new frequency at which to send the stats_notification alert. Example: monthly |[optional] -**Percentage** | **int32** | The new percentage threshold at which the usage_limit alert will be sent. Example: 90 |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/alerts/model_create_alert_201_response.go b/rest/api/v3/alerts/model_create_alert_201_response.go deleted file mode 100644 index 7b4d5d87..00000000 --- a/rest/api/v3/alerts/model_create_alert_201_response.go +++ /dev/null @@ -1,32 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Alerts API -* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateAlert201Response struct for CreateAlert201Response -type CreateAlert201Response struct { - // A Unix timestamp indicating when the alert was created. - CreatedAt int32 `json:"created_at"` - // The email address that the alert will be sent to. - EmailTo string `json:"email_to"` - // If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent. For example, \"daily\", \"weekly\", or \"monthly\". - Frequency *string `json:"frequency,omitempty"` - // The ID of the alert. - Id int32 `json:"id"` - // The type of alert. - Type string `json:"type"` - // A Unix timestamp indicating when the alert was last modified. - UpdatedAt int32 `json:"updated_at"` - // If the alert is of type `usage_limit`, this indicates the percentage of email usage that must be reached before the alert will be sent. - Percentage *int32 `json:"percentage,omitempty"` -} diff --git a/rest/api/v3/alerts/model_create_alert_request.go b/rest/api/v3/alerts/model_create_alert_request.go deleted file mode 100644 index a741cf0f..00000000 --- a/rest/api/v3/alerts/model_create_alert_request.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Alerts API -* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateAlertRequest struct for CreateAlertRequest -type CreateAlertRequest struct { - // The type of alert you want to create. Can be either usage_limit or stats_notification. Example: usage_limit - Type Type `json:"type"` - // The email address the alert will be sent to. Example: test@example.com - EmailTo string `json:"email_to"` - // Required for stats_notification. How frequently the alert will be sent. Example: daily - Frequency *string `json:"frequency,omitempty"` - // Required for usage_limit. When this usage threshold is reached, the alert will be sent. Example: 90 - Percentage *int32 `json:"percentage,omitempty"` -} diff --git a/rest/api/v3/alerts/model_error_response.go b/rest/api/v3/alerts/model_error_response.go deleted file mode 100644 index 98b54223..00000000 --- a/rest/api/v3/alerts/model_error_response.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Alerts API -* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponse struct for ErrorResponse -type ErrorResponse struct { - Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` - // When applicable, this property value will be an error ID. - Id *string `json:"id,omitempty"` -} diff --git a/rest/api/v3/alerts/model_error_response_errors_inner.go b/rest/api/v3/alerts/model_error_response_errors_inner.go deleted file mode 100644 index 2cbef824..00000000 --- a/rest/api/v3/alerts/model_error_response_errors_inner.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Alerts API -* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner -type ErrorResponseErrorsInner struct { - // An error message. - Message *string `json:"message,omitempty"` - // When applicable, this property value will be the field that generated the error. - Field *string `json:"field,omitempty"` - // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. - Help *map[string]interface{} `json:"help,omitempty"` -} diff --git a/rest/api/v3/alerts/model_get_alert_200_response.go b/rest/api/v3/alerts/model_get_alert_200_response.go deleted file mode 100644 index bc0595ff..00000000 --- a/rest/api/v3/alerts/model_get_alert_200_response.go +++ /dev/null @@ -1,32 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Alerts API -* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetAlert200Response struct for GetAlert200Response -type GetAlert200Response struct { - // A Unix timestamp indicating when the alert was created. - CreatedAt int32 `json:"created_at"` - // The email address that the alert will be sent to. - EmailTo string `json:"email_to"` - // If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent. For example: \"daily\", \"weekly\", or \"monthly\". - Frequency *string `json:"frequency,omitempty"` - // The ID of the alert. - Id int32 `json:"id"` - // The type of alert. - Type Type2 `json:"type"` - // A Unix timestamp indicating when the alert was last modified. - UpdatedAt int32 `json:"updated_at"` - // If the alert is of type usage_limit, this indicates the percentage of email usage that must be reached before the alert will be sent. - Percentage *int32 `json:"percentage,omitempty"` -} diff --git a/rest/api/v3/alerts/model_list_alert_200_response_inner.go b/rest/api/v3/alerts/model_list_alert_200_response_inner.go deleted file mode 100644 index 06751c6c..00000000 --- a/rest/api/v3/alerts/model_list_alert_200_response_inner.go +++ /dev/null @@ -1,32 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Alerts API -* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListAlert200ResponseInner struct for ListAlert200ResponseInner -type ListAlert200ResponseInner struct { - // A Unix timestamp indicating when the alert was created. - CreatedAt int32 `json:"created_at"` - // The email address that the alert will be sent to. - EmailTo string `json:"email_to"` - // The ID of the alert. - Id int32 `json:"id"` - // If the alert is of type usage_limit, this indicates the percentage of email usage that must be reached before the alert will be sent. - Percentage *int32 `json:"percentage,omitempty"` - // The type of alert. - Type Type1 `json:"type"` - // A Unix timestamp indicating when the alert was last modified. - UpdatedAt *int32 `json:"updated_at,omitempty"` - // If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent. For example, \"daily\", \"weekly\", or \"monthly\". - Frequency *string `json:"frequency,omitempty"` -} diff --git a/rest/api/v3/alerts/model_type.go b/rest/api/v3/alerts/model_type.go deleted file mode 100644 index 83d8da9f..00000000 --- a/rest/api/v3/alerts/model_type.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Alerts API -* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Type the model 'Type' -type Type string - -// List of Type -const ( - TYPE_STATS_NOTIFICATION Type = "stats_notification" - TYPE_USAGE_LIMIT Type = "usage_limit" -) diff --git a/rest/api/v3/alerts/model_type1.go b/rest/api/v3/alerts/model_type1.go deleted file mode 100644 index 1c9bb449..00000000 --- a/rest/api/v3/alerts/model_type1.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Alerts API -* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Type1 the model 'Type1' -type Type1 string - -// List of Type1 -const ( - TYPE1_USAGE_LIMIT Type1 = "usage_limit" - TYPE1_STATS_NOTIFICATION Type1 = "stats_notification" -) diff --git a/rest/api/v3/alerts/model_type2.go b/rest/api/v3/alerts/model_type2.go deleted file mode 100644 index 27b77da8..00000000 --- a/rest/api/v3/alerts/model_type2.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Alerts API -* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Type2 the model 'Type2' -type Type2 string - -// List of Type2 -const ( - TYPE2_USAGE_LIMIT Type2 = "usage_limit" - TYPE2_STATS_NOTIFICATION Type2 = "stats_notification" -) diff --git a/rest/api/v3/alerts/model_type3.go b/rest/api/v3/alerts/model_type3.go deleted file mode 100644 index 25e96e17..00000000 --- a/rest/api/v3/alerts/model_type3.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Alerts API -* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Type3 the model 'Type3' -type Type3 string - -// List of Type3 -const ( - TYPE3_USAGE_LIMIT Type3 = "usage_limit" - TYPE3_STATS_NOTIFICATION Type3 = "stats_notification" -) diff --git a/rest/api/v3/alerts/model_update_alert_200_response.go b/rest/api/v3/alerts/model_update_alert_200_response.go deleted file mode 100644 index da9d6c62..00000000 --- a/rest/api/v3/alerts/model_update_alert_200_response.go +++ /dev/null @@ -1,32 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Alerts API -* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateAlert200Response struct for UpdateAlert200Response -type UpdateAlert200Response struct { - // A Unix timestamp indicating when the alert was created. - CreatedAt int32 `json:"created_at"` - // The email address that the alert will be sent to. - EmailTo string `json:"email_to"` - // If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent. For example: \"daily\", \"weekly\", or \"monthly\". - Frequency *string `json:"frequency,omitempty"` - // The ID of the alert. - Id int32 `json:"id"` - // The type of alert. - Type Type3 `json:"type"` - // A Unix timestamp indicating when the alert was last modified. - UpdatedAt int32 `json:"updated_at"` - // If the alert is of type usage_limit, this indicates the percentage of email usage that must be reached before the alert will be sent. - Percentage *int32 `json:"percentage,omitempty"` -} diff --git a/rest/api/v3/alerts/model_update_alert_request.go b/rest/api/v3/alerts/model_update_alert_request.go deleted file mode 100644 index 3573cc14..00000000 --- a/rest/api/v3/alerts/model_update_alert_request.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Alerts API -* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateAlertRequest struct for UpdateAlertRequest -type UpdateAlertRequest struct { - // The new email address you want your alert to be sent to. Example: test@example.com - EmailTo *string `json:"email_to,omitempty"` - // The new frequency at which to send the stats_notification alert. Example: monthly - Frequency *string `json:"frequency,omitempty"` - // The new percentage threshold at which the usage_limit alert will be sent. Example: 90 - Percentage *int32 `json:"percentage,omitempty"` -} diff --git a/rest/api/v3/api_keys/.openapi-generator b/rest/api/v3/api_keys/.openapi-generator deleted file mode 100644 index 70c88658..00000000 --- a/rest/api/v3/api_keys/.openapi-generator +++ /dev/null @@ -1,36 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_create_api_key.go -api_delete_api_key.go -api_get_api_key.go -api_list_api_key.go -api_service.go -api_update_api_key.go -api_update_api_key_name.go -docs/ApiKeyResponse.md -docs/ApiKeyScopesResponse.md -docs/CreateApiKey.md -docs/CreateApiKey201Response.md -docs/CreateApiKeyRequest.md -docs/DeleteApiKey.md -docs/ErrorResponse.md -docs/ErrorResponseErrorsInner.md -docs/GetApiKey.md -docs/GetApiKey200Response.md -docs/ListApiKey.md -docs/ListApiKey200Response.md -docs/UpdateApiKey.md -docs/UpdateApiKeyName.md -docs/UpdateApiKeyNameRequest.md -docs/UpdateApiKeyRequest.md -model_api_key_response.go -model_api_key_scopes_response.go -model_create_api_key_201_response.go -model_create_api_key_request.go -model_error_response.go -model_error_response_errors_inner.go -model_get_api_key_200_response.go -model_list_api_key_200_response.go -model_update_api_key_name_request.go -model_update_api_key_request.go diff --git a/rest/api/v3/api_keys/.openapi-generator-ignore b/rest/api/v3/api_keys/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/api_keys/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/api_keys/README.md b/rest/api/v3/api_keys/README.md deleted file mode 100644 index 8ff06985..00000000 --- a/rest/api/v3/api_keys/README.md +++ /dev/null @@ -1,76 +0,0 @@ -# Go API client for - -The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. - -To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:37.552328+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*CreateApiKey* | [**CreateApiKey**](docs/CreateApiKey.md#createapikey) | **Post** /v3/api_keys | Create API keys -*DeleteApiKey* | [**DeleteApiKey**](docs/DeleteApiKey.md#deleteapikey) | **Delete** /v3/api_keys/{ApiKeyId} | Delete API keys -*GetApiKey* | [**GetApiKey**](docs/GetApiKey.md#getapikey) | **Get** /v3/api_keys/{ApiKeyId} | Retrieve an existing API Key -*ListApiKey* | [**ListApiKey**](docs/ListApiKey.md#listapikey) | **Get** /v3/api_keys | Retrieve all API Keys belonging to the authenticated user -*UpdateApiKey* | [**UpdateApiKey**](docs/UpdateApiKey.md#updateapikey) | **Put** /v3/api_keys/{ApiKeyId} | Update API key name and scopes -*UpdateApiKeyName* | [**UpdateApiKeyName**](docs/UpdateApiKeyName.md#updateapikeyname) | **Patch** /v3/api_keys/{ApiKeyId} | Update API key name - - -## Documentation For Models - - - [ApiKeyResponse](ApiKeyResponse.md) - - [ApiKeyScopesResponse](ApiKeyScopesResponse.md) - - [CreateApiKey201Response](CreateApiKey201Response.md) - - [CreateApiKeyRequest](CreateApiKeyRequest.md) - - [ErrorResponse](ErrorResponse.md) - - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) - - [GetApiKey200Response](GetApiKey200Response.md) - - [ListApiKey200Response](ListApiKey200Response.md) - - [UpdateApiKeyNameRequest](UpdateApiKeyNameRequest.md) - - [UpdateApiKeyRequest](UpdateApiKeyRequest.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/api_keys/api_create_api_key.go b/rest/api/v3/api_keys/api_create_api_key.go deleted file mode 100644 index b73e3188..00000000 --- a/rest/api/v3/api_keys/api_create_api_key.go +++ /dev/null @@ -1,106 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid API Keys API -* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type CreateApiKeyParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - CreateApiKeyRequest *CreateApiKeyRequest `json:"CreateApiKeyRequest,omitempty"` -} - -func (params *CreateApiKeyParam) SetOnbehalfof(Onbehalfof string) *CreateApiKeyParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *CreateApiKeyParam) SetCreateApiKeyRequest(CreateApiKeyRequest CreateApiKeyRequest) *CreateApiKeyParam { - params.CreateApiKeyRequest = &CreateApiKeyRequest - return params -} - -// **This endpoint allows you to create a new API Key for the user.** To create your initial SendGrid API Key, you should [use the SendGrid App](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. A JSON request body containing a `name` property is required when making requests to this endpoint. If the number of maximum keys, 100, is reached, a `403` status will be returned. Though the `name` field is required, it does not need to be unique. A unique API key ID will be generated for each key you create and returned in the response body. It is not necessary to pass a `scopes` field to the API when creating a key, but you should be aware that omitting the `scopes` field from your request will create a key with \"Full Access\" permissions by default. See the [API Key Permissions List](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/authorization) for all available scopes. An API key's scopes can be updated after creation using the \"Update API keys\" endpoint. -func (c *ApiService) CreateApiKey(params *CreateApiKeyParam) (interface{}, error) { - path := "/v3/api_keys" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.CreateApiKeyRequest != nil { - b, err := json.Marshal(*params.CreateApiKeyRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &CreateApiKey201Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/api_keys/api_delete_api_key.go b/rest/api/v3/api_keys/api_delete_api_key.go deleted file mode 100644 index 49208d6b..00000000 --- a/rest/api/v3/api_keys/api_delete_api_key.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid API Keys API -* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteApiKeyParam struct { - // - ApiKeyId *string `json:"api_key_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *DeleteApiKeyParam) SetApiKeyId(ApiKeyId string) *DeleteApiKeyParam { - params.ApiKeyId = &ApiKeyId - return params -} -func (params *DeleteApiKeyParam) SetOnbehalfof(Onbehalfof string) *DeleteApiKeyParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to revoke an existing API Key using an `api_key_id`** Authentications using a revoked API Key will fail after after some small propogation delay. If the API Key ID does not exist, a `404` status will be returned. -func (c *ApiService) DeleteApiKey(params *DeleteApiKeyParam) (interface{}, error) { - path := "/v3/api_keys/{ApiKeyId}" - if params != nil && params.ApiKeyId != nil { - path = strings.Replace(path, "{"+"ApiKeyId"+"}", *params.ApiKeyId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/api_keys/api_get_api_key.go b/rest/api/v3/api_keys/api_get_api_key.go deleted file mode 100644 index 25b4cfcc..00000000 --- a/rest/api/v3/api_keys/api_get_api_key.go +++ /dev/null @@ -1,102 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid API Keys API -* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetApiKeyParam struct { - // - ApiKeyId *string `json:"api_key_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetApiKeyParam) SetApiKeyId(ApiKeyId string) *GetApiKeyParam { - params.ApiKeyId = &ApiKeyId - return params -} -func (params *GetApiKeyParam) SetOnbehalfof(Onbehalfof string) *GetApiKeyParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a single API key using an `api_key_id`.** The endpoint will return a key's name, ID, and scopes. If the API Key ID does not, exist a `404` status will be returned. See the [API Key Permissions List](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/authorization) for all available scopes. An API key's scopes can be updated after creation using the \"Update API keys\" endpoint. -func (c *ApiService) GetApiKey(params *GetApiKeyParam) (interface{}, error) { - path := "/v3/api_keys/{ApiKeyId}" - if params != nil && params.ApiKeyId != nil { - path = strings.Replace(path, "{"+"ApiKeyId"+"}", *params.ApiKeyId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &GetApiKey200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/api_keys/api_list_api_key.go b/rest/api/v3/api_keys/api_list_api_key.go deleted file mode 100644 index 0866765d..00000000 --- a/rest/api/v3/api_keys/api_list_api_key.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid API Keys API -* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListApiKeyParam struct { - // - Limit *int32 `json:"limit,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListApiKeyParam) SetLimit(Limit int32) *ListApiKeyParam { - params.Limit = &Limit - return params -} -func (params *ListApiKeyParam) SetOnbehalfof(Onbehalfof string) *ListApiKeyParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve all API Keys that belong to the authenticated user.** A successful response from this API will include all available API keys' names and IDs. For security reasons, there is not a way to retrieve the key itself after it's created. If you lose your API key, you must create a new one. Only the \"Create API keys\" endpoint will return a key to you and only at the time of creation. An `api_key_id` can be used to update or delete the key, as well as retrieve the key's details, such as its scopes. -func (c *ApiService) ListApiKey(params *ListApiKeyParam) (interface{}, error) { - path := "/v3/api_keys" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListApiKey200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/api_keys/api_service.go b/rest/api/v3/api_keys/api_service.go deleted file mode 100644 index 24d94ab9..00000000 --- a/rest/api/v3/api_keys/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid API Keys API -* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/api_keys/api_update_api_key.go b/rest/api/v3/api_keys/api_update_api_key.go deleted file mode 100644 index 76ea4783..00000000 --- a/rest/api/v3/api_keys/api_update_api_key.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid API Keys API -* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type UpdateApiKeyParam struct { - // - ApiKeyId *string `json:"api_key_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - UpdateApiKeyRequest *UpdateApiKeyRequest `json:"UpdateApiKeyRequest,omitempty"` -} - -func (params *UpdateApiKeyParam) SetApiKeyId(ApiKeyId string) *UpdateApiKeyParam { - params.ApiKeyId = &ApiKeyId - return params -} -func (params *UpdateApiKeyParam) SetOnbehalfof(Onbehalfof string) *UpdateApiKeyParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateApiKeyParam) SetUpdateApiKeyRequest(UpdateApiKeyRequest UpdateApiKeyRequest) *UpdateApiKeyParam { - params.UpdateApiKeyRequest = &UpdateApiKeyRequest - return params -} - -// **This endpoint allows you to update the name and scopes of a given API key.** You must pass this endpoint a JSON request body with a `name` field and a `scopes` array containing at least one scope. The `name` and `scopes` fields will be used to update the key associated with the `api_key_id` in the request URL. If you need to update a key's scopes only, pass the `name` field with the key's existing name; the `name` will not be modified. If you need to update a key's name only, use the \"Update API key name\" endpoint. See the [API Key Permissions List](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/authorization) for all available scopes. -func (c *ApiService) UpdateApiKey(params *UpdateApiKeyParam) (interface{}, error) { - path := "/v3/api_keys/{ApiKeyId}" - if params != nil && params.ApiKeyId != nil { - path = strings.Replace(path, "{"+"ApiKeyId"+"}", *params.ApiKeyId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateApiKeyRequest != nil { - b, err := json.Marshal(*params.UpdateApiKeyRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ApiKeyResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/api_keys/api_update_api_key_name.go b/rest/api/v3/api_keys/api_update_api_key_name.go deleted file mode 100644 index c7adf840..00000000 --- a/rest/api/v3/api_keys/api_update_api_key_name.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid API Keys API -* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type UpdateApiKeyNameParam struct { - // - ApiKeyId *string `json:"api_key_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - UpdateApiKeyNameRequest *UpdateApiKeyNameRequest `json:"UpdateApiKeyNameRequest,omitempty"` -} - -func (params *UpdateApiKeyNameParam) SetApiKeyId(ApiKeyId string) *UpdateApiKeyNameParam { - params.ApiKeyId = &ApiKeyId - return params -} -func (params *UpdateApiKeyNameParam) SetOnbehalfof(Onbehalfof string) *UpdateApiKeyNameParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateApiKeyNameParam) SetUpdateApiKeyNameRequest(UpdateApiKeyNameRequest UpdateApiKeyNameRequest) *UpdateApiKeyNameParam { - params.UpdateApiKeyNameRequest = &UpdateApiKeyNameRequest - return params -} - -// **This endpoint allows you to update the name of an existing API Key.** You must pass this endpoint a JSON request body with a `name` property, which will be used to rename the key associated with the `api_key_id` passed in the URL. -func (c *ApiService) UpdateApiKeyName(params *UpdateApiKeyNameParam) (interface{}, error) { - path := "/v3/api_keys/{ApiKeyId}" - if params != nil && params.ApiKeyId != nil { - path = strings.Replace(path, "{"+"ApiKeyId"+"}", *params.ApiKeyId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateApiKeyNameRequest != nil { - b, err := json.Marshal(*params.UpdateApiKeyNameRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ApiKeyResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/api_keys/docs/ApiKeyResponse.md b/rest/api/v3/api_keys/docs/ApiKeyResponse.md deleted file mode 100644 index 2a77ce3f..00000000 --- a/rest/api/v3/api_keys/docs/ApiKeyResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ApiKeyResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ApiKeyId** | **string** | The ID of your API Key. |[optional] -**Name** | **string** | The name of your API Key. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/api_keys/docs/ApiKeyScopesResponse.md b/rest/api/v3/api_keys/docs/ApiKeyScopesResponse.md deleted file mode 100644 index 1e853c9b..00000000 --- a/rest/api/v3/api_keys/docs/ApiKeyScopesResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# ApiKeyScopesResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Scopes** | **[]string** | The permissions this API Key has access to. |[optional] -**ApiKeyId** | **string** | The ID of your API Key. |[optional] -**Name** | **string** | The name of your API Key. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/api_keys/docs/CreateApiKey.md b/rest/api/v3/api_keys/docs/CreateApiKey.md deleted file mode 100644 index a51a16ca..00000000 --- a/rest/api/v3/api_keys/docs/CreateApiKey.md +++ /dev/null @@ -1,49 +0,0 @@ -# CreateApiKey - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateApiKey**](CreateApiKey.md#CreateApiKey) | **Post** /v3/api_keys | Create API keys - - - -## CreateApiKey - -> CreateApiKey201Response CreateApiKey(ctx, optional) - -Create API keys - -**This endpoint allows you to create a new API Key for the user.** To create your initial SendGrid API Key, you should [use the SendGrid App](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. A JSON request body containing a `name` property is required when making requests to this endpoint. If the number of maximum keys, 100, is reached, a `403` status will be returned. Though the `name` field is required, it does not need to be unique. A unique API key ID will be generated for each key you create and returned in the response body. It is not necessary to pass a `scopes` field to the API when creating a key, but you should be aware that omitting the `scopes` field from your request will create a key with \"Full Access\" permissions by default. See the [API Key Permissions List](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/authorization) for all available scopes. An API key's scopes can be updated after creation using the \"Update API keys\" endpoint. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateApiKeyParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**CreateApiKeyRequest** | [**CreateApiKeyRequest**](CreateApiKeyRequest.md) | - -### Return type - -[**CreateApiKey201Response**](CreateApiKey201Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/api_keys/docs/CreateApiKey201Response.md b/rest/api/v3/api_keys/docs/CreateApiKey201Response.md deleted file mode 100644 index e0b7aa07..00000000 --- a/rest/api/v3/api_keys/docs/CreateApiKey201Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreateApiKey201Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ApiKey** | **string** | |[optional] -**ApiKeyId** | **string** | |[optional] -**Name** | **string** | |[optional] -**Scopes** | **[]string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/api_keys/docs/CreateApiKeyRequest.md b/rest/api/v3/api_keys/docs/CreateApiKeyRequest.md deleted file mode 100644 index e9ef1a2c..00000000 --- a/rest/api/v3/api_keys/docs/CreateApiKeyRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateApiKeyRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name you will use to describe this API Key. | -**Scopes** | **[]string** | The individual permissions that you are giving to this API Key. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/api_keys/docs/DeleteApiKey.md b/rest/api/v3/api_keys/docs/DeleteApiKey.md deleted file mode 100644 index 4a144d28..00000000 --- a/rest/api/v3/api_keys/docs/DeleteApiKey.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeleteApiKey - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteApiKey**](DeleteApiKey.md#DeleteApiKey) | **Delete** /v3/api_keys/{ApiKeyId} | Delete API keys - - - -## DeleteApiKey - -> DeleteApiKey(ctx, ApiKeyIdoptional) - -Delete API keys - -**This endpoint allows you to revoke an existing API Key using an `api_key_id`** Authentications using a revoked API Key will fail after after some small propogation delay. If the API Key ID does not exist, a `404` status will be returned. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**ApiKeyId** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteApiKeyParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/api_keys/docs/ErrorResponse.md b/rest/api/v3/api_keys/docs/ErrorResponse.md deleted file mode 100644 index ec2d41f6..00000000 --- a/rest/api/v3/api_keys/docs/ErrorResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ErrorResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] -**Id** | **string** | When applicable, this property value will be an error ID. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/api_keys/docs/ErrorResponseErrorsInner.md b/rest/api/v3/api_keys/docs/ErrorResponseErrorsInner.md deleted file mode 100644 index 5449c685..00000000 --- a/rest/api/v3/api_keys/docs/ErrorResponseErrorsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ErrorResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | An error message. |[optional] -**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] -**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/api_keys/docs/GetApiKey.md b/rest/api/v3/api_keys/docs/GetApiKey.md deleted file mode 100644 index 053b02e9..00000000 --- a/rest/api/v3/api_keys/docs/GetApiKey.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetApiKey - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetApiKey**](GetApiKey.md#GetApiKey) | **Get** /v3/api_keys/{ApiKeyId} | Retrieve an existing API Key - - - -## GetApiKey - -> GetApiKey200Response GetApiKey(ctx, ApiKeyIdoptional) - -Retrieve an existing API Key - -**This endpoint allows you to retrieve a single API key using an `api_key_id`.** The endpoint will return a key's name, ID, and scopes. If the API Key ID does not, exist a `404` status will be returned. See the [API Key Permissions List](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/authorization) for all available scopes. An API key's scopes can be updated after creation using the \"Update API keys\" endpoint. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**ApiKeyId** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a GetApiKeyParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**GetApiKey200Response**](GetApiKey200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/api_keys/docs/GetApiKey200Response.md b/rest/api/v3/api_keys/docs/GetApiKey200Response.md deleted file mode 100644 index 43bebd71..00000000 --- a/rest/api/v3/api_keys/docs/GetApiKey200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetApiKey200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]ApiKeyScopesResponse**](ApiKeyScopesResponse.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/api_keys/docs/ListApiKey.md b/rest/api/v3/api_keys/docs/ListApiKey.md deleted file mode 100644 index 5fd1de6d..00000000 --- a/rest/api/v3/api_keys/docs/ListApiKey.md +++ /dev/null @@ -1,49 +0,0 @@ -# ListApiKey - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListApiKey**](ListApiKey.md#ListApiKey) | **Get** /v3/api_keys | Retrieve all API Keys belonging to the authenticated user - - - -## ListApiKey - -> ListApiKey200Response ListApiKey(ctx, optional) - -Retrieve all API Keys belonging to the authenticated user - -**This endpoint allows you to retrieve all API Keys that belong to the authenticated user.** A successful response from this API will include all available API keys' names and IDs. For security reasons, there is not a way to retrieve the key itself after it's created. If you lose your API key, you must create a new one. Only the \"Create API keys\" endpoint will return a key to you and only at the time of creation. An `api_key_id` can be used to update or delete the key, as well as retrieve the key's details, such as its scopes. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListApiKeyParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Limit** | **int32** | -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListApiKey200Response**](ListApiKey200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/api_keys/docs/ListApiKey200Response.md b/rest/api/v3/api_keys/docs/ListApiKey200Response.md deleted file mode 100644 index 66bb5c12..00000000 --- a/rest/api/v3/api_keys/docs/ListApiKey200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListApiKey200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]ApiKeyResponse**](ApiKeyResponse.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/api_keys/docs/UpdateApiKey.md b/rest/api/v3/api_keys/docs/UpdateApiKey.md deleted file mode 100644 index c763c8ac..00000000 --- a/rest/api/v3/api_keys/docs/UpdateApiKey.md +++ /dev/null @@ -1,53 +0,0 @@ -# UpdateApiKey - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateApiKey**](UpdateApiKey.md#UpdateApiKey) | **Put** /v3/api_keys/{ApiKeyId} | Update API key name and scopes - - - -## UpdateApiKey - -> ApiKeyResponse UpdateApiKey(ctx, ApiKeyIdoptional) - -Update API key name and scopes - -**This endpoint allows you to update the name and scopes of a given API key.** You must pass this endpoint a JSON request body with a `name` field and a `scopes` array containing at least one scope. The `name` and `scopes` fields will be used to update the key associated with the `api_key_id` in the request URL. If you need to update a key's scopes only, pass the `name` field with the key's existing name; the `name` will not be modified. If you need to update a key's name only, use the \"Update API key name\" endpoint. See the [API Key Permissions List](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/authorization) for all available scopes. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**ApiKeyId** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateApiKeyParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**UpdateApiKeyRequest** | [**UpdateApiKeyRequest**](UpdateApiKeyRequest.md) | - -### Return type - -[**ApiKeyResponse**](ApiKeyResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/api_keys/docs/UpdateApiKeyName.md b/rest/api/v3/api_keys/docs/UpdateApiKeyName.md deleted file mode 100644 index 84379fe3..00000000 --- a/rest/api/v3/api_keys/docs/UpdateApiKeyName.md +++ /dev/null @@ -1,53 +0,0 @@ -# UpdateApiKeyName - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateApiKeyName**](UpdateApiKeyName.md#UpdateApiKeyName) | **Patch** /v3/api_keys/{ApiKeyId} | Update API key name - - - -## UpdateApiKeyName - -> ApiKeyResponse UpdateApiKeyName(ctx, ApiKeyIdoptional) - -Update API key name - -**This endpoint allows you to update the name of an existing API Key.** You must pass this endpoint a JSON request body with a `name` property, which will be used to rename the key associated with the `api_key_id` passed in the URL. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**ApiKeyId** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateApiKeyNameParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**UpdateApiKeyNameRequest** | [**UpdateApiKeyNameRequest**](UpdateApiKeyNameRequest.md) | - -### Return type - -[**ApiKeyResponse**](ApiKeyResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/api_keys/docs/UpdateApiKeyNameRequest.md b/rest/api/v3/api_keys/docs/UpdateApiKeyNameRequest.md deleted file mode 100644 index bf4a4e51..00000000 --- a/rest/api/v3/api_keys/docs/UpdateApiKeyNameRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateApiKeyNameRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The new name of the API Key. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/api_keys/docs/UpdateApiKeyRequest.md b/rest/api/v3/api_keys/docs/UpdateApiKeyRequest.md deleted file mode 100644 index 06c502e3..00000000 --- a/rest/api/v3/api_keys/docs/UpdateApiKeyRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# UpdateApiKeyRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | -**Scopes** | **[]string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/api_keys/model_api_key_response.go b/rest/api/v3/api_keys/model_api_key_response.go deleted file mode 100644 index 32f2fcf9..00000000 --- a/rest/api/v3/api_keys/model_api_key_response.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid API Keys API -* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ApiKeyResponse struct for ApiKeyResponse -type ApiKeyResponse struct { - // The ID of your API Key. - ApiKeyId *string `json:"api_key_id,omitempty"` - // The name of your API Key. - Name *string `json:"name,omitempty"` -} diff --git a/rest/api/v3/api_keys/model_api_key_scopes_response.go b/rest/api/v3/api_keys/model_api_key_scopes_response.go deleted file mode 100644 index 25d1c7bc..00000000 --- a/rest/api/v3/api_keys/model_api_key_scopes_response.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid API Keys API -* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ApiKeyScopesResponse struct for ApiKeyScopesResponse -type ApiKeyScopesResponse struct { - // The permissions this API Key has access to. - Scopes *[]string `json:"scopes,omitempty"` - // The ID of your API Key. - ApiKeyId *string `json:"api_key_id,omitempty"` - // The name of your API Key. - Name *string `json:"name,omitempty"` -} diff --git a/rest/api/v3/api_keys/model_create_api_key_201_response.go b/rest/api/v3/api_keys/model_create_api_key_201_response.go deleted file mode 100644 index bd196421..00000000 --- a/rest/api/v3/api_keys/model_create_api_key_201_response.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid API Keys API -* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateApiKey201Response struct for CreateApiKey201Response -type CreateApiKey201Response struct { - ApiKey *string `json:"api_key,omitempty"` - ApiKeyId *string `json:"api_key_id,omitempty"` - Name *string `json:"name,omitempty"` - Scopes *[]string `json:"scopes,omitempty"` -} diff --git a/rest/api/v3/api_keys/model_create_api_key_request.go b/rest/api/v3/api_keys/model_create_api_key_request.go deleted file mode 100644 index 3185d573..00000000 --- a/rest/api/v3/api_keys/model_create_api_key_request.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid API Keys API -* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateApiKeyRequest struct for CreateApiKeyRequest -type CreateApiKeyRequest struct { - // The name you will use to describe this API Key. - Name string `json:"name"` - // The individual permissions that you are giving to this API Key. - Scopes *[]string `json:"scopes,omitempty"` -} diff --git a/rest/api/v3/api_keys/model_error_response.go b/rest/api/v3/api_keys/model_error_response.go deleted file mode 100644 index 593ee939..00000000 --- a/rest/api/v3/api_keys/model_error_response.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid API Keys API -* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponse struct for ErrorResponse -type ErrorResponse struct { - Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` - // When applicable, this property value will be an error ID. - Id *string `json:"id,omitempty"` -} diff --git a/rest/api/v3/api_keys/model_error_response_errors_inner.go b/rest/api/v3/api_keys/model_error_response_errors_inner.go deleted file mode 100644 index 909b9fc2..00000000 --- a/rest/api/v3/api_keys/model_error_response_errors_inner.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid API Keys API -* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner -type ErrorResponseErrorsInner struct { - // An error message. - Message *string `json:"message,omitempty"` - // When applicable, this property value will be the field that generated the error. - Field *string `json:"field,omitempty"` - // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. - Help *map[string]interface{} `json:"help,omitempty"` -} diff --git a/rest/api/v3/api_keys/model_get_api_key_200_response.go b/rest/api/v3/api_keys/model_get_api_key_200_response.go deleted file mode 100644 index 72056608..00000000 --- a/rest/api/v3/api_keys/model_get_api_key_200_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid API Keys API -* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetApiKey200Response struct for GetApiKey200Response -type GetApiKey200Response struct { - Result *[]ApiKeyScopesResponse `json:"result,omitempty"` -} diff --git a/rest/api/v3/api_keys/model_list_api_key_200_response.go b/rest/api/v3/api_keys/model_list_api_key_200_response.go deleted file mode 100644 index 06fb1c13..00000000 --- a/rest/api/v3/api_keys/model_list_api_key_200_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid API Keys API -* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListApiKey200Response struct for ListApiKey200Response -type ListApiKey200Response struct { - Result *[]ApiKeyResponse `json:"result,omitempty"` -} diff --git a/rest/api/v3/api_keys/model_update_api_key_name_request.go b/rest/api/v3/api_keys/model_update_api_key_name_request.go deleted file mode 100644 index 6b90e1a1..00000000 --- a/rest/api/v3/api_keys/model_update_api_key_name_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid API Keys API -* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateApiKeyNameRequest struct for UpdateApiKeyNameRequest -type UpdateApiKeyNameRequest struct { - // The new name of the API Key. - Name string `json:"name"` -} diff --git a/rest/api/v3/api_keys/model_update_api_key_request.go b/rest/api/v3/api_keys/model_update_api_key_request.go deleted file mode 100644 index 303efc75..00000000 --- a/rest/api/v3/api_keys/model_update_api_key_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid API Keys API -* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateApiKeyRequest struct for UpdateApiKeyRequest -type UpdateApiKeyRequest struct { - Name string `json:"name"` - Scopes *[]string `json:"scopes,omitempty"` -} diff --git a/rest/api/v3/domain_authentication/.openapi-generator b/rest/api/v3/domain_authentication/.openapi-generator deleted file mode 100644 index dfdb5d90..00000000 --- a/rest/api/v3/domain_authentication/.openapi-generator +++ /dev/null @@ -1,86 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_add_ip_to_authenticated_domain.go -api_associate_subuser_with_domain.go -api_associate_subuser_with_domain_multiple.go -api_authenticate_domain.go -api_delete_authenticated_domain.go -api_delete_ip_from_authenticated_domain.go -api_disassociate_authenticated_domain_from_user.go -api_disassociate_subuser_from_domain.go -api_email_dns_record.go -api_get_authenticated_domain.go -api_list_all_authenticated_domain_with_user.go -api_list_authenticated_domain.go -api_list_authenticated_domain_with_user.go -api_list_default_authenticated_domain.go -api_service.go -api_update_authenticated_domain.go -api_validate_authenticated_domain.go -docs/AddIpToAuthenticatedDomain.md -docs/AddIpToAuthenticatedDomainRequest.md -docs/AssociateSubuserWithDomain.md -docs/AssociateSubuserWithDomainMultiple.md -docs/AssociateSubuserWithDomainRequest.md -docs/AuthenticateDomain.md -docs/AuthenticateDomainRequest.md -docs/AuthenticatedDomain.md -docs/AuthenticatedDomainSpf.md -docs/AuthenticatedDomainSpfDns.md -docs/AuthenticatedDomainSpfDnsDkim.md -docs/AuthenticatedDomainSpfDnsDomainSpf.md -docs/AuthenticatedDomainSpfDnsMailServer.md -docs/AuthenticatedDomainSpfDnsSubdomainSpf.md -docs/DeleteAuthenticatedDomain.md -docs/DeleteIpFromAuthenticatedDomain.md -docs/DisassociateAuthenticatedDomainFromUser.md -docs/DisassociateSubuserFromDomain.md -docs/EmailDnsRecord.md -docs/EmailDnsRecord400Response.md -docs/EmailDnsRecord400ResponseErrors.md -docs/EmailDnsRecordRequest.md -docs/GetAuthenticatedDomain.md -docs/ListAllAuthenticatedDomainWithUser.md -docs/ListAllAuthenticatedDomainWithUser200ResponseInner.md -docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDns.md -docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1.md -docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname.md -docs/ListAuthenticatedDomain.md -docs/ListAuthenticatedDomainWithUser.md -docs/ListDefaultAuthenticatedDomain.md -docs/UpdateAuthenticatedDomain.md -docs/UpdateAuthenticatedDomainRequest.md -docs/ValidateAuthenticatedDomain.md -docs/ValidateAuthenticatedDomain200Response.md -docs/ValidateAuthenticatedDomain200ResponseValidationResults.md -docs/ValidateAuthenticatedDomain200ResponseValidationResultsDkim1.md -docs/ValidateAuthenticatedDomain200ResponseValidationResultsMailCname.md -docs/ValidateAuthenticatedDomain200ResponseValidationResultsSpf.md -docs/ValidateAuthenticatedDomain500Response.md -docs/ValidateAuthenticatedDomain500ResponseErrorsInner.md -model_add_ip_to_authenticated_domain_request.go -model_associate_subuser_with_domain_request.go -model_authenticate_domain_request.go -model_authenticated_domain.go -model_authenticated_domain_spf.go -model_authenticated_domain_spf_dns.go -model_authenticated_domain_spf_dns_dkim.go -model_authenticated_domain_spf_dns_domain_spf.go -model_authenticated_domain_spf_dns_mail_server.go -model_authenticated_domain_spf_dns_subdomain_spf.go -model_email_dns_record_400_response.go -model_email_dns_record_400_response_errors.go -model_email_dns_record_request.go -model_list_all_authenticated_domain_with_user_200_response_inner.go -model_list_all_authenticated_domain_with_user_200_response_inner_dns.go -model_list_all_authenticated_domain_with_user_200_response_inner_dns_dkim1.go -model_list_all_authenticated_domain_with_user_200_response_inner_dns_mail_cname.go -model_update_authenticated_domain_request.go -model_validate_authenticated_domain_200_response.go -model_validate_authenticated_domain_200_response_validation_results.go -model_validate_authenticated_domain_200_response_validation_results_dkim1.go -model_validate_authenticated_domain_200_response_validation_results_mail_cname.go -model_validate_authenticated_domain_200_response_validation_results_spf.go -model_validate_authenticated_domain_500_response.go -model_validate_authenticated_domain_500_response_errors_inner.go diff --git a/rest/api/v3/domain_authentication/.openapi-generator-ignore b/rest/api/v3/domain_authentication/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/domain_authentication/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/domain_authentication/README.md b/rest/api/v3/domain_authentication/README.md deleted file mode 100644 index 1162490f..00000000 --- a/rest/api/v3/domain_authentication/README.md +++ /dev/null @@ -1,103 +0,0 @@ -# Go API client for - -The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. - -Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). - -Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:37.561320+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AddIpToAuthenticatedDomain* | [**AddIpToAuthenticatedDomain**](docs/AddIpToAuthenticatedDomain.md#addiptoauthenticateddomain) | **Post** /v3/whitelabel/domains/{Id}/ips | Add an IP to an authenticated domain -*AssociateSubuserWithDomain* | [**AssociateSubuserWithDomain**](docs/AssociateSubuserWithDomain.md#associatesubuserwithdomain) | **Post** /v3/whitelabel/domains/{DomainId}/subuser | Associate an authenticated domain with a given user. -*AssociateSubuserWithDomainMultiple* | [**AssociateSubuserWithDomainMultiple**](docs/AssociateSubuserWithDomainMultiple.md#associatesubuserwithdomainmultiple) | **Post** /v3/whitelabel/domains/{DomainId}/subuser:add | Associate an authenticated domain with a given user, for up to five domains. -*AuthenticateDomain* | [**AuthenticateDomain**](docs/AuthenticateDomain.md#authenticatedomain) | **Post** /v3/whitelabel/domains | Authenticate a domain -*DeleteAuthenticatedDomain* | [**DeleteAuthenticatedDomain**](docs/DeleteAuthenticatedDomain.md#deleteauthenticateddomain) | **Delete** /v3/whitelabel/domains/{DomainId} | Delete an authenticated domain. -*DeleteIpFromAuthenticatedDomain* | [**DeleteIpFromAuthenticatedDomain**](docs/DeleteIpFromAuthenticatedDomain.md#deleteipfromauthenticateddomain) | **Delete** /v3/whitelabel/domains/{Id}/ips/{Ip} | Remove an IP from an authenticated domain. -*DisassociateAuthenticatedDomainFromUser* | [**DisassociateAuthenticatedDomainFromUser**](docs/DisassociateAuthenticatedDomainFromUser.md#disassociateauthenticateddomainfromuser) | **Delete** /v3/whitelabel/domains/subuser | Disassociate an authenticated domain from a given user. -*DisassociateSubuserFromDomain* | [**DisassociateSubuserFromDomain**](docs/DisassociateSubuserFromDomain.md#disassociatesubuserfromdomain) | **Delete** /v3/whitelabel/domains/{DomainId}/subuser | Disassociate an authenticated domain from a given user for users with up to five associated domains. -*EmailDnsRecord* | [**EmailDnsRecord**](docs/EmailDnsRecord.md#emaildnsrecord) | **Post** /v3/whitelabel/dns/email | Email DNS records to a co-worker -*GetAuthenticatedDomain* | [**GetAuthenticatedDomain**](docs/GetAuthenticatedDomain.md#getauthenticateddomain) | **Get** /v3/whitelabel/domains/{DomainId} | Retrieve an authenticated domain -*ListAllAuthenticatedDomainWithUser* | [**ListAllAuthenticatedDomainWithUser**](docs/ListAllAuthenticatedDomainWithUser.md#listallauthenticateddomainwithuser) | **Get** /v3/whitelabel/domains/subuser/all | List all the authenticated domains associated with the given user. -*ListAuthenticatedDomain* | [**ListAuthenticatedDomain**](docs/ListAuthenticatedDomain.md#listauthenticateddomain) | **Get** /v3/whitelabel/domains | List all authenticated domains -*ListAuthenticatedDomainWithUser* | [**ListAuthenticatedDomainWithUser**](docs/ListAuthenticatedDomainWithUser.md#listauthenticateddomainwithuser) | **Get** /v3/whitelabel/domains/subuser | List the authenticated domain associated with the given user. -*ListDefaultAuthenticatedDomain* | [**ListDefaultAuthenticatedDomain**](docs/ListDefaultAuthenticatedDomain.md#listdefaultauthenticateddomain) | **Get** /v3/whitelabel/domains/default | Get the default authentication -*UpdateAuthenticatedDomain* | [**UpdateAuthenticatedDomain**](docs/UpdateAuthenticatedDomain.md#updateauthenticateddomain) | **Patch** /v3/whitelabel/domains/{DomainId} | Update an authenticated domain -*ValidateAuthenticatedDomain* | [**ValidateAuthenticatedDomain**](docs/ValidateAuthenticatedDomain.md#validateauthenticateddomain) | **Post** /v3/whitelabel/domains/{Id}/validate | Validate a domain authentication. - - -## Documentation For Models - - - [AddIpToAuthenticatedDomainRequest](AddIpToAuthenticatedDomainRequest.md) - - [AssociateSubuserWithDomainRequest](AssociateSubuserWithDomainRequest.md) - - [AuthenticateDomainRequest](AuthenticateDomainRequest.md) - - [AuthenticatedDomain](AuthenticatedDomain.md) - - [AuthenticatedDomainSpf](AuthenticatedDomainSpf.md) - - [AuthenticatedDomainSpfDns](AuthenticatedDomainSpfDns.md) - - [AuthenticatedDomainSpfDnsDkim](AuthenticatedDomainSpfDnsDkim.md) - - [AuthenticatedDomainSpfDnsDomainSpf](AuthenticatedDomainSpfDnsDomainSpf.md) - - [AuthenticatedDomainSpfDnsMailServer](AuthenticatedDomainSpfDnsMailServer.md) - - [AuthenticatedDomainSpfDnsSubdomainSpf](AuthenticatedDomainSpfDnsSubdomainSpf.md) - - [EmailDnsRecord400Response](EmailDnsRecord400Response.md) - - [EmailDnsRecord400ResponseErrors](EmailDnsRecord400ResponseErrors.md) - - [EmailDnsRecordRequest](EmailDnsRecordRequest.md) - - [ListAllAuthenticatedDomainWithUser200ResponseInner](ListAllAuthenticatedDomainWithUser200ResponseInner.md) - - [ListAllAuthenticatedDomainWithUser200ResponseInnerDns](ListAllAuthenticatedDomainWithUser200ResponseInnerDns.md) - - [ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1](ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1.md) - - [ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname](ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname.md) - - [UpdateAuthenticatedDomainRequest](UpdateAuthenticatedDomainRequest.md) - - [ValidateAuthenticatedDomain200Response](ValidateAuthenticatedDomain200Response.md) - - [ValidateAuthenticatedDomain200ResponseValidationResults](ValidateAuthenticatedDomain200ResponseValidationResults.md) - - [ValidateAuthenticatedDomain200ResponseValidationResultsDkim1](ValidateAuthenticatedDomain200ResponseValidationResultsDkim1.md) - - [ValidateAuthenticatedDomain200ResponseValidationResultsMailCname](ValidateAuthenticatedDomain200ResponseValidationResultsMailCname.md) - - [ValidateAuthenticatedDomain200ResponseValidationResultsSpf](ValidateAuthenticatedDomain200ResponseValidationResultsSpf.md) - - [ValidateAuthenticatedDomain500Response](ValidateAuthenticatedDomain500Response.md) - - [ValidateAuthenticatedDomain500ResponseErrorsInner](ValidateAuthenticatedDomain500ResponseErrorsInner.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/domain_authentication/api_add_ip_to_authenticated_domain.go b/rest/api/v3/domain_authentication/api_add_ip_to_authenticated_domain.go deleted file mode 100644 index 460dd3b4..00000000 --- a/rest/api/v3/domain_authentication/api_add_ip_to_authenticated_domain.go +++ /dev/null @@ -1,86 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type AddIpToAuthenticatedDomainParam struct { - // ID of the domain to which you are adding an IP - Id *int32 `json:"id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - AddIpToAuthenticatedDomainRequest *AddIpToAuthenticatedDomainRequest `json:"AddIpToAuthenticatedDomainRequest,omitempty"` -} - -func (params *AddIpToAuthenticatedDomainParam) SetId(Id int32) *AddIpToAuthenticatedDomainParam { - params.Id = &Id - return params -} -func (params *AddIpToAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *AddIpToAuthenticatedDomainParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *AddIpToAuthenticatedDomainParam) SetAddIpToAuthenticatedDomainRequest(AddIpToAuthenticatedDomainRequest AddIpToAuthenticatedDomainRequest) *AddIpToAuthenticatedDomainParam { - params.AddIpToAuthenticatedDomainRequest = &AddIpToAuthenticatedDomainRequest - return params -} - -// **This endpoint allows you to add an IP address to an authenticated domain.** -func (c *ApiService) AddIpToAuthenticatedDomain(params *AddIpToAuthenticatedDomainParam) (interface{}, error) { - path := "/v3/whitelabel/domains/{Id}/ips" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.AddIpToAuthenticatedDomainRequest != nil { - b, err := json.Marshal(*params.AddIpToAuthenticatedDomainRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &AuthenticatedDomainSpf{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/domain_authentication/api_associate_subuser_with_domain.go b/rest/api/v3/domain_authentication/api_associate_subuser_with_domain.go deleted file mode 100644 index fa41be68..00000000 --- a/rest/api/v3/domain_authentication/api_associate_subuser_with_domain.go +++ /dev/null @@ -1,77 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type AssociateSubuserWithDomainParam struct { - // ID of the authenticated domain to associate with the subuser. - DomainId *int32 `json:"domain_id"` - // - AssociateSubuserWithDomainRequest *AssociateSubuserWithDomainRequest `json:"AssociateSubuserWithDomainRequest,omitempty"` -} - -func (params *AssociateSubuserWithDomainParam) SetDomainId(DomainId int32) *AssociateSubuserWithDomainParam { - params.DomainId = &DomainId - return params -} -func (params *AssociateSubuserWithDomainParam) SetAssociateSubuserWithDomainRequest(AssociateSubuserWithDomainRequest AssociateSubuserWithDomainRequest) *AssociateSubuserWithDomainParam { - params.AssociateSubuserWithDomainRequest = &AssociateSubuserWithDomainRequest - return params -} - -// **This endpoint allows you to associate a specific authenticated domain with a subuser.** Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent's domain. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. [You can associate more than one domain with a subuser using the `v3/whitelabel/domains/{domain_id}/subuser:add` endpoint](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/associate-an-authenticated-domain-with-a-subuser-multiple). -func (c *ApiService) AssociateSubuserWithDomain(params *AssociateSubuserWithDomainParam) (interface{}, error) { - path := "/v3/whitelabel/domains/{DomainId}/subuser" - if params != nil && params.DomainId != nil { - path = strings.Replace(path, "{"+"DomainId"+"}", fmt.Sprint(*params.DomainId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.AssociateSubuserWithDomainRequest != nil { - b, err := json.Marshal(*params.AssociateSubuserWithDomainRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &AuthenticatedDomainSpf{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/domain_authentication/api_associate_subuser_with_domain_multiple.go b/rest/api/v3/domain_authentication/api_associate_subuser_with_domain_multiple.go deleted file mode 100644 index 65a24153..00000000 --- a/rest/api/v3/domain_authentication/api_associate_subuser_with_domain_multiple.go +++ /dev/null @@ -1,77 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type AssociateSubuserWithDomainMultipleParam struct { - // ID of the authenticated domain to associate with the subuser. - DomainId *int32 `json:"domain_id"` - // - AssociateSubuserWithDomainRequest *AssociateSubuserWithDomainRequest `json:"AssociateSubuserWithDomainRequest,omitempty"` -} - -func (params *AssociateSubuserWithDomainMultipleParam) SetDomainId(DomainId int32) *AssociateSubuserWithDomainMultipleParam { - params.DomainId = &DomainId - return params -} -func (params *AssociateSubuserWithDomainMultipleParam) SetAssociateSubuserWithDomainRequest(AssociateSubuserWithDomainRequest AssociateSubuserWithDomainRequest) *AssociateSubuserWithDomainMultipleParam { - params.AssociateSubuserWithDomainRequest = &AssociateSubuserWithDomainRequest - return params -} - -// **This endpoint allows you to associate a specific authenticated domain with a subuser. It can be used to associate up to five authenticated domains.** This functionality allows subusers to send mail using their parent's domain. Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. A subuser can have up to five associated authenticated domains. To see the domains that have already been associated with this user, you can [use the API to list the domains currently associated with the subuser](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/list-the-authenticated-domain-associated-with-a-subuser-multiple). When selecting a domain to send email from, SendGrid checks for domains in the following order and chooses the first one that appears in the hierarchy: 1. Domain assigned by the subuser that matches the email's `From` address domain. 2. The subuser's default domain. 3. Domain assigned by the parent user that matches the `From` address domain. 4. Parent user's default domain. 5. sendgrid.net -func (c *ApiService) AssociateSubuserWithDomainMultiple(params *AssociateSubuserWithDomainMultipleParam) (interface{}, error) { - path := "/v3/whitelabel/domains/{DomainId}/subuser:add" - if params != nil && params.DomainId != nil { - path = strings.Replace(path, "{"+"DomainId"+"}", fmt.Sprint(*params.DomainId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.AssociateSubuserWithDomainRequest != nil { - b, err := json.Marshal(*params.AssociateSubuserWithDomainRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &AuthenticatedDomainSpf{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/domain_authentication/api_authenticate_domain.go b/rest/api/v3/domain_authentication/api_authenticate_domain.go deleted file mode 100644 index 2f926205..00000000 --- a/rest/api/v3/domain_authentication/api_authenticate_domain.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type AuthenticateDomainParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - AuthenticateDomainRequest *AuthenticateDomainRequest `json:"AuthenticateDomainRequest,omitempty"` -} - -func (params *AuthenticateDomainParam) SetOnbehalfof(Onbehalfof string) *AuthenticateDomainParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *AuthenticateDomainParam) SetAuthenticateDomainRequest(AuthenticateDomainRequest AuthenticateDomainRequest) *AuthenticateDomainParam { - params.AuthenticateDomainRequest = &AuthenticateDomainRequest - return params -} - -// **This endpoint allows you to authenticate a domain.** If you are authenticating a domain for a subuser, you have two options: 1. Use the \"username\" parameter. This allows you to authenticate a domain on behalf of your subuser. This means the subuser is able to see and modify the authenticated domain. 2. Use the Association workflow (see Associate Domain section). This allows you to authenticate a domain created by the parent to a subuser. This means the subuser will default to the assigned domain, but will not be able to see or modify that authenticated domain. However, if the subuser authenticates their own domain it will overwrite the assigned domain. -func (c *ApiService) AuthenticateDomain(params *AuthenticateDomainParam) (interface{}, error) { - path := "/v3/whitelabel/domains" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.AuthenticateDomainRequest != nil { - b, err := json.Marshal(*params.AuthenticateDomainRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &AuthenticatedDomain{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/domain_authentication/api_delete_authenticated_domain.go b/rest/api/v3/domain_authentication/api_delete_authenticated_domain.go deleted file mode 100644 index 31ef3a69..00000000 --- a/rest/api/v3/domain_authentication/api_delete_authenticated_domain.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteAuthenticatedDomainParam struct { - // - DomainId *string `json:"domain_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *DeleteAuthenticatedDomainParam) SetDomainId(DomainId string) *DeleteAuthenticatedDomainParam { - params.DomainId = &DomainId - return params -} -func (params *DeleteAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *DeleteAuthenticatedDomainParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to delete an authenticated domain.** -func (c *ApiService) DeleteAuthenticatedDomain(params *DeleteAuthenticatedDomainParam) (interface{}, error) { - path := "/v3/whitelabel/domains/{DomainId}" - if params != nil && params.DomainId != nil { - path = strings.Replace(path, "{"+"DomainId"+"}", *params.DomainId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/domain_authentication/api_delete_ip_from_authenticated_domain.go b/rest/api/v3/domain_authentication/api_delete_ip_from_authenticated_domain.go deleted file mode 100644 index ba8a7f9b..00000000 --- a/rest/api/v3/domain_authentication/api_delete_ip_from_authenticated_domain.go +++ /dev/null @@ -1,80 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type DeleteIpFromAuthenticatedDomainParam struct { - // ID of the domain to delete the IP from. - Id *int32 `json:"id"` - // IP to remove from the domain. - Ip *string `json:"ip"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *DeleteIpFromAuthenticatedDomainParam) SetId(Id int32) *DeleteIpFromAuthenticatedDomainParam { - params.Id = &Id - return params -} -func (params *DeleteIpFromAuthenticatedDomainParam) SetIp(Ip string) *DeleteIpFromAuthenticatedDomainParam { - params.Ip = &Ip - return params -} -func (params *DeleteIpFromAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *DeleteIpFromAuthenticatedDomainParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to remove an IP address from that domain's authentication.** -func (c *ApiService) DeleteIpFromAuthenticatedDomain(params *DeleteIpFromAuthenticatedDomainParam) (interface{}, error) { - path := "/v3/whitelabel/domains/{Id}/ips/{Ip}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) - } - if params != nil && params.Ip != nil { - path = strings.Replace(path, "{"+"Ip"+"}", *params.Ip, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &AuthenticatedDomainSpf{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/domain_authentication/api_disassociate_authenticated_domain_from_user.go b/rest/api/v3/domain_authentication/api_disassociate_authenticated_domain_from_user.go deleted file mode 100644 index 6ba51ea1..00000000 --- a/rest/api/v3/domain_authentication/api_disassociate_authenticated_domain_from_user.go +++ /dev/null @@ -1,60 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type DisassociateAuthenticatedDomainFromUserParam struct { - // Username for the subuser to find associated authenticated domain. - Username *string `json:"username,omitempty"` -} - -func (params *DisassociateAuthenticatedDomainFromUserParam) SetUsername(Username string) *DisassociateAuthenticatedDomainFromUserParam { - params.Username = &Username - return params -} - -// **This endpoint allows you to disassociate a specific authenticated domain from a subuser.** Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent's domain. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. Note that if you used the [`/v3/whitelabel/domains/{domain_id}/subuser:add` endpoint](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/associate-an-authenticated-domain-with-a-subuser-multiple) to add multiple domains to the subuser, you should use the [`/v3/whitelabel/domains/{domain_id}/subuser` endpoint](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/disassociate-an-authenticated-domain-from-a-subuser-multiple) to disassociate those domains. -func (c *ApiService) DisassociateAuthenticatedDomainFromUser(params *DisassociateAuthenticatedDomainFromUserParam) (interface{}, error) { - path := "/v3/whitelabel/domains/subuser" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Username != nil { - data.Set("username", *params.Username) - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/domain_authentication/api_disassociate_subuser_from_domain.go b/rest/api/v3/domain_authentication/api_disassociate_subuser_from_domain.go deleted file mode 100644 index 8d017f29..00000000 --- a/rest/api/v3/domain_authentication/api_disassociate_subuser_from_domain.go +++ /dev/null @@ -1,72 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type DisassociateSubuserFromDomainParam struct { - // ID of the authenticated domain to be disassociated with the subuser. - DomainId *int32 `json:"domain_id"` - // Username for the subuser to find associated authenticated domain. - Username *string `json:"username,omitempty"` -} - -func (params *DisassociateSubuserFromDomainParam) SetDomainId(DomainId int32) *DisassociateSubuserFromDomainParam { - params.DomainId = &DomainId - return params -} -func (params *DisassociateSubuserFromDomainParam) SetUsername(Username string) *DisassociateSubuserFromDomainParam { - params.Username = &Username - return params -} - -// **This endpoint allows you to disassociate a specific authenticated domain from a subuser, for users with up to five associated domains.** This functionality allows subusers to send mail using their parent's domain. Authenticated domains can be associated with (i.e. assigned to) subusers kknt, and a subuser can have up to five associated authenticated domains. You can dissociate an authenticated domain from any subuser that has one or more authenticated domains using this endpoint. -func (c *ApiService) DisassociateSubuserFromDomain(params *DisassociateSubuserFromDomainParam) (interface{}, error) { - path := "/v3/whitelabel/domains/{DomainId}/subuser" - if params != nil && params.DomainId != nil { - path = strings.Replace(path, "{"+"DomainId"+"}", fmt.Sprint(*params.DomainId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Username != nil { - data.Set("username", *params.Username) - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/domain_authentication/api_email_dns_record.go b/rest/api/v3/domain_authentication/api_email_dns_record.go deleted file mode 100644 index b3511b52..00000000 --- a/rest/api/v3/domain_authentication/api_email_dns_record.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type EmailDnsRecordParam struct { - // - EmailDnsRecordRequest *EmailDnsRecordRequest `json:"EmailDnsRecordRequest,omitempty"` -} - -func (params *EmailDnsRecordParam) SetEmailDnsRecordRequest(EmailDnsRecordRequest EmailDnsRecordRequest) *EmailDnsRecordParam { - params.EmailDnsRecordRequest = &EmailDnsRecordRequest - return params -} - -// **This endpoint is used to share DNS records with a colleagues** Use this endpoint to send SendGrid-generated DNS record information to a co-worker so they can enter it into your DNS provider to validate your domain and link branding. What type of records are sent will depend on whether you have chosen Automated Security or not. When using Automated Security, SendGrid provides you with three CNAME records. If you turn Automated Security off, you are instead given TXT and MX records. If you pass a `link_id` to this endpoint, the generated email will supply the DNS records necessary to complete [Link Branding](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) setup. If you pass a `domain_id` to this endpoint, the generated email will supply the DNS records needed to complete [Domain Authentication](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Passing both IDs will generate an email with the records needed to complete both setup steps. You can retrieve all your domain IDs from the returned `id` fields for each domain using the \"List all authenticated domains\" endpoint. You can retrieve all of your link IDs using the \"Retrieve all branded links\" endpoint. -func (c *ApiService) EmailDnsRecord(params *EmailDnsRecordParam) (interface{}, error) { - path := "/v3/whitelabel/dns/email" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.EmailDnsRecordRequest != nil { - b, err := json.Marshal(*params.EmailDnsRecordRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 400 { - ps := &EmailDnsRecord400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/domain_authentication/api_get_authenticated_domain.go b/rest/api/v3/domain_authentication/api_get_authenticated_domain.go deleted file mode 100644 index ae5c5900..00000000 --- a/rest/api/v3/domain_authentication/api_get_authenticated_domain.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetAuthenticatedDomainParam struct { - // - DomainId *string `json:"domain_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetAuthenticatedDomainParam) SetDomainId(DomainId string) *GetAuthenticatedDomainParam { - params.DomainId = &DomainId - return params -} -func (params *GetAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *GetAuthenticatedDomainParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a specific authenticated domain.** -func (c *ApiService) GetAuthenticatedDomain(params *GetAuthenticatedDomainParam) (interface{}, error) { - path := "/v3/whitelabel/domains/{DomainId}" - if params != nil && params.DomainId != nil { - path = strings.Replace(path, "{"+"DomainId"+"}", *params.DomainId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &AuthenticatedDomain{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/domain_authentication/api_list_all_authenticated_domain_with_user.go b/rest/api/v3/domain_authentication/api_list_all_authenticated_domain_with_user.go deleted file mode 100644 index b2f225e9..00000000 --- a/rest/api/v3/domain_authentication/api_list_all_authenticated_domain_with_user.go +++ /dev/null @@ -1,60 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListAllAuthenticatedDomainWithUserParam struct { - // Username for the subuser to find associated authenticated domains. - Username *string `json:"username"` -} - -func (params *ListAllAuthenticatedDomainWithUserParam) SetUsername(Username string) *ListAllAuthenticatedDomainWithUserParam { - params.Username = &Username - return params -} - -// **This endpoint allows you to retrieve all of the authenticated domains that have been assigned to a specific subuser.** This functionality allows subusers to send mail using their parent's domain. Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account, and a subuser can have up to five associated domains. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. When selecting a domain to send email from, SendGrid checks for domains in the following order and chooses the first one that appears in the hierarchy: 1. Domain assigned by the subuser that matches the email's `From` address domain. 2. The subuser's default domain. 3. Domain assigned by the parent user that matches the `From` address domain. 4. Parent user's default domain. 5. sendgrid.net -func (c *ApiService) ListAllAuthenticatedDomainWithUser(params *ListAllAuthenticatedDomainWithUserParam) (interface{}, error) { - path := "/v3/whitelabel/domains/subuser/all" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Username != nil { - data.Set("username", *params.Username) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]ListAllAuthenticatedDomainWithUser200ResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/domain_authentication/api_list_authenticated_domain.go b/rest/api/v3/domain_authentication/api_list_authenticated_domain.go deleted file mode 100644 index 7296ba61..00000000 --- a/rest/api/v3/domain_authentication/api_list_authenticated_domain.go +++ /dev/null @@ -1,106 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListAuthenticatedDomainParam struct { - // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. - Limit *int32 `json:"limit,omitempty"` - // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. - Offset *int32 `json:"offset,omitempty"` - // Exclude subuser domains from the result. - ExcludeSubusers *bool `json:"exclude_subusers,omitempty"` - // The username associated with an authenticated domain. - Username *string `json:"username,omitempty"` - // Search for authenticated domains. - Domain *string `json:"domain,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListAuthenticatedDomainParam) SetLimit(Limit int32) *ListAuthenticatedDomainParam { - params.Limit = &Limit - return params -} -func (params *ListAuthenticatedDomainParam) SetOffset(Offset int32) *ListAuthenticatedDomainParam { - params.Offset = &Offset - return params -} -func (params *ListAuthenticatedDomainParam) SetExcludeSubusers(ExcludeSubusers bool) *ListAuthenticatedDomainParam { - params.ExcludeSubusers = &ExcludeSubusers - return params -} -func (params *ListAuthenticatedDomainParam) SetUsername(Username string) *ListAuthenticatedDomainParam { - params.Username = &Username - return params -} -func (params *ListAuthenticatedDomainParam) SetDomain(Domain string) *ListAuthenticatedDomainParam { - params.Domain = &Domain - return params -} -func (params *ListAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *ListAuthenticatedDomainParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a paginated list of all domains you have authenticated.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. -func (c *ApiService) ListAuthenticatedDomain(params *ListAuthenticatedDomainParam) (interface{}, error) { - path := "/v3/whitelabel/domains" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - if params != nil && params.ExcludeSubusers != nil { - data.Set("exclude_subusers", fmt.Sprint(*params.ExcludeSubusers)) - } - if params != nil && params.Username != nil { - data.Set("username", *params.Username) - } - if params != nil && params.Domain != nil { - data.Set("domain", *params.Domain) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/domain_authentication/api_list_authenticated_domain_with_user.go b/rest/api/v3/domain_authentication/api_list_authenticated_domain_with_user.go deleted file mode 100644 index 3bfbb0c4..00000000 --- a/rest/api/v3/domain_authentication/api_list_authenticated_domain_with_user.go +++ /dev/null @@ -1,60 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListAuthenticatedDomainWithUserParam struct { - // Username for the subuser to find associated authenticated domain. - Username *string `json:"username"` -} - -func (params *ListAuthenticatedDomainWithUserParam) SetUsername(Username string) *ListAuthenticatedDomainWithUserParam { - params.Username = &Username - return params -} - -// **This endpoint allows you to retrieve all of the authenticated domains that have been assigned to a specific subuser.** Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent's domain. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. Note that if you used the [`/v3/whitelabel/domains/{domain_id}/subuser:add` endpoint]( https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/associate-an-authenticated-domain-with-a-subuser-multiple) to add multiple domains to the subuser, you can use the [`/v3/whitelabel/domains/subuser/all` endpoint](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/list-the-authenticated-domain-associated-with-a-subuser-multiple) to list those associated domains. -func (c *ApiService) ListAuthenticatedDomainWithUser(params *ListAuthenticatedDomainWithUserParam) (interface{}, error) { - path := "/v3/whitelabel/domains/subuser" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Username != nil { - data.Set("username", *params.Username) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &AuthenticatedDomainSpf{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/domain_authentication/api_list_default_authenticated_domain.go b/rest/api/v3/domain_authentication/api_list_default_authenticated_domain.go deleted file mode 100644 index 62cd4ae0..00000000 --- a/rest/api/v3/domain_authentication/api_list_default_authenticated_domain.go +++ /dev/null @@ -1,69 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListDefaultAuthenticatedDomainParam struct { - // The domain to find a default authentication. - Domain *string `json:"domain,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListDefaultAuthenticatedDomainParam) SetDomain(Domain string) *ListDefaultAuthenticatedDomainParam { - params.Domain = &Domain - return params -} -func (params *ListDefaultAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *ListDefaultAuthenticatedDomainParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve the default authentication for a domain.** When creating or updating a domain authentication, you can set the domain as a default. The default domain will be used to send all mail. If you have multiple authenticated domains, the authenticated domain matching the domain of the From address will be used, and the default will be overridden. This endpoint will return a default domain and its details only if a default is set. You are not required to set a default. If you do not set a default domain, this endpoint will return general information about your domain authentication status. -func (c *ApiService) ListDefaultAuthenticatedDomain(params *ListDefaultAuthenticatedDomainParam) (interface{}, error) { - path := "/v3/whitelabel/domains/default" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Domain != nil { - data.Set("domain", *params.Domain) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/domain_authentication/api_service.go b/rest/api/v3/domain_authentication/api_service.go deleted file mode 100644 index bfe66aff..00000000 --- a/rest/api/v3/domain_authentication/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/domain_authentication/api_update_authenticated_domain.go b/rest/api/v3/domain_authentication/api_update_authenticated_domain.go deleted file mode 100644 index 5b048bce..00000000 --- a/rest/api/v3/domain_authentication/api_update_authenticated_domain.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type UpdateAuthenticatedDomainParam struct { - // - DomainId *string `json:"domain_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - UpdateAuthenticatedDomainRequest *UpdateAuthenticatedDomainRequest `json:"UpdateAuthenticatedDomainRequest,omitempty"` -} - -func (params *UpdateAuthenticatedDomainParam) SetDomainId(DomainId string) *UpdateAuthenticatedDomainParam { - params.DomainId = &DomainId - return params -} -func (params *UpdateAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *UpdateAuthenticatedDomainParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateAuthenticatedDomainParam) SetUpdateAuthenticatedDomainRequest(UpdateAuthenticatedDomainRequest UpdateAuthenticatedDomainRequest) *UpdateAuthenticatedDomainParam { - params.UpdateAuthenticatedDomainRequest = &UpdateAuthenticatedDomainRequest - return params -} - -// **This endpoint allows you to update the settings for an authenticated domain.** -func (c *ApiService) UpdateAuthenticatedDomain(params *UpdateAuthenticatedDomainParam) (interface{}, error) { - path := "/v3/whitelabel/domains/{DomainId}" - if params != nil && params.DomainId != nil { - path = strings.Replace(path, "{"+"DomainId"+"}", *params.DomainId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateAuthenticatedDomainRequest != nil { - b, err := json.Marshal(*params.UpdateAuthenticatedDomainRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/domain_authentication/api_validate_authenticated_domain.go b/rest/api/v3/domain_authentication/api_validate_authenticated_domain.go deleted file mode 100644 index de42d935..00000000 --- a/rest/api/v3/domain_authentication/api_validate_authenticated_domain.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type ValidateAuthenticatedDomainParam struct { - // ID of the domain to validate. - Id *int32 `json:"id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ValidateAuthenticatedDomainParam) SetId(Id int32) *ValidateAuthenticatedDomainParam { - params.Id = &Id - return params -} -func (params *ValidateAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *ValidateAuthenticatedDomainParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to validate an authenticated domain. If it fails, it will return an error message describing why the domain could not be validated.** -func (c *ApiService) ValidateAuthenticatedDomain(params *ValidateAuthenticatedDomainParam) (interface{}, error) { - path := "/v3/whitelabel/domains/{Id}/validate" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ValidateAuthenticatedDomain200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ValidateAuthenticatedDomain500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/domain_authentication/docs/AddIpToAuthenticatedDomain.md b/rest/api/v3/domain_authentication/docs/AddIpToAuthenticatedDomain.md deleted file mode 100644 index cc716fea..00000000 --- a/rest/api/v3/domain_authentication/docs/AddIpToAuthenticatedDomain.md +++ /dev/null @@ -1,53 +0,0 @@ -# AddIpToAuthenticatedDomain - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddIpToAuthenticatedDomain**](AddIpToAuthenticatedDomain.md#AddIpToAuthenticatedDomain) | **Post** /v3/whitelabel/domains/{Id}/ips | Add an IP to an authenticated domain - - - -## AddIpToAuthenticatedDomain - -> AuthenticatedDomainSpf AddIpToAuthenticatedDomain(ctx, Idoptional) - -Add an IP to an authenticated domain - -**This endpoint allows you to add an IP address to an authenticated domain.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **int32** | ID of the domain to which you are adding an IP - -### Other Parameters - -Other parameters are passed through a pointer to a AddIpToAuthenticatedDomainParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**AddIpToAuthenticatedDomainRequest** | [**AddIpToAuthenticatedDomainRequest**](AddIpToAuthenticatedDomainRequest.md) | - -### Return type - -[**AuthenticatedDomainSpf**](AuthenticatedDomainSpf.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/domain_authentication/docs/AddIpToAuthenticatedDomainRequest.md b/rest/api/v3/domain_authentication/docs/AddIpToAuthenticatedDomainRequest.md deleted file mode 100644 index 6eba37a6..00000000 --- a/rest/api/v3/domain_authentication/docs/AddIpToAuthenticatedDomainRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# AddIpToAuthenticatedDomainRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Ip** | **string** | IP to associate with the domain. Used for manually specifying IPs for custom SPF. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomain.md b/rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomain.md deleted file mode 100644 index f96c9ebb..00000000 --- a/rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomain.md +++ /dev/null @@ -1,52 +0,0 @@ -# AssociateSubuserWithDomain - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AssociateSubuserWithDomain**](AssociateSubuserWithDomain.md#AssociateSubuserWithDomain) | **Post** /v3/whitelabel/domains/{DomainId}/subuser | Associate an authenticated domain with a given user. - - - -## AssociateSubuserWithDomain - -> AuthenticatedDomainSpf AssociateSubuserWithDomain(ctx, DomainIdoptional) - -Associate an authenticated domain with a given user. - -**This endpoint allows you to associate a specific authenticated domain with a subuser.** Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent's domain. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. [You can associate more than one domain with a subuser using the `v3/whitelabel/domains/{domain_id}/subuser:add` endpoint](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/associate-an-authenticated-domain-with-a-subuser-multiple). - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**DomainId** | **int32** | ID of the authenticated domain to associate with the subuser. - -### Other Parameters - -Other parameters are passed through a pointer to a AssociateSubuserWithDomainParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**AssociateSubuserWithDomainRequest** | [**AssociateSubuserWithDomainRequest**](AssociateSubuserWithDomainRequest.md) | - -### Return type - -[**AuthenticatedDomainSpf**](AuthenticatedDomainSpf.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomainMultiple.md b/rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomainMultiple.md deleted file mode 100644 index 7aec4d78..00000000 --- a/rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomainMultiple.md +++ /dev/null @@ -1,52 +0,0 @@ -# AssociateSubuserWithDomainMultiple - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AssociateSubuserWithDomainMultiple**](AssociateSubuserWithDomainMultiple.md#AssociateSubuserWithDomainMultiple) | **Post** /v3/whitelabel/domains/{DomainId}/subuser:add | Associate an authenticated domain with a given user, for up to five domains. - - - -## AssociateSubuserWithDomainMultiple - -> AuthenticatedDomainSpf AssociateSubuserWithDomainMultiple(ctx, DomainIdoptional) - -Associate an authenticated domain with a given user, for up to five domains. - -**This endpoint allows you to associate a specific authenticated domain with a subuser. It can be used to associate up to five authenticated domains.** This functionality allows subusers to send mail using their parent's domain. Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. A subuser can have up to five associated authenticated domains. To see the domains that have already been associated with this user, you can [use the API to list the domains currently associated with the subuser](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/list-the-authenticated-domain-associated-with-a-subuser-multiple). When selecting a domain to send email from, SendGrid checks for domains in the following order and chooses the first one that appears in the hierarchy: 1. Domain assigned by the subuser that matches the email's `From` address domain. 2. The subuser's default domain. 3. Domain assigned by the parent user that matches the `From` address domain. 4. Parent user's default domain. 5. sendgrid.net - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**DomainId** | **int32** | ID of the authenticated domain to associate with the subuser. - -### Other Parameters - -Other parameters are passed through a pointer to a AssociateSubuserWithDomainMultipleParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**AssociateSubuserWithDomainRequest** | [**AssociateSubuserWithDomainRequest**](AssociateSubuserWithDomainRequest.md) | - -### Return type - -[**AuthenticatedDomainSpf**](AuthenticatedDomainSpf.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomainRequest.md b/rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomainRequest.md deleted file mode 100644 index ed7c75bf..00000000 --- a/rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomainRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# AssociateSubuserWithDomainRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Username** | **string** | Username to associate with the authenticated domain. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/domain_authentication/docs/AuthenticateDomain.md b/rest/api/v3/domain_authentication/docs/AuthenticateDomain.md deleted file mode 100644 index 950f3cce..00000000 --- a/rest/api/v3/domain_authentication/docs/AuthenticateDomain.md +++ /dev/null @@ -1,49 +0,0 @@ -# AuthenticateDomain - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AuthenticateDomain**](AuthenticateDomain.md#AuthenticateDomain) | **Post** /v3/whitelabel/domains | Authenticate a domain - - - -## AuthenticateDomain - -> AuthenticatedDomain AuthenticateDomain(ctx, optional) - -Authenticate a domain - -**This endpoint allows you to authenticate a domain.** If you are authenticating a domain for a subuser, you have two options: 1. Use the \"username\" parameter. This allows you to authenticate a domain on behalf of your subuser. This means the subuser is able to see and modify the authenticated domain. 2. Use the Association workflow (see Associate Domain section). This allows you to authenticate a domain created by the parent to a subuser. This means the subuser will default to the assigned domain, but will not be able to see or modify that authenticated domain. However, if the subuser authenticates their own domain it will overwrite the assigned domain. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a AuthenticateDomainParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**AuthenticateDomainRequest** | [**AuthenticateDomainRequest**](AuthenticateDomainRequest.md) | - -### Return type - -[**AuthenticatedDomain**](AuthenticatedDomain.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/domain_authentication/docs/AuthenticateDomainRequest.md b/rest/api/v3/domain_authentication/docs/AuthenticateDomainRequest.md deleted file mode 100644 index 35a69969..00000000 --- a/rest/api/v3/domain_authentication/docs/AuthenticateDomainRequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# AuthenticateDomainRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Domain** | **string** | Domain being authenticated. | -**Subdomain** | **string** | The subdomain to use for this authenticated domain. |[optional] -**Username** | **string** | The username associated with this domain. |[optional] -**Ips** | **[]string** | The IP addresses that will be included in the custom SPF record for this authenticated domain. |[optional] -**CustomSpf** | **bool** | Specify whether to use a custom SPF or allow SendGrid to manage your SPF. This option is only available to authenticated domains set up for manual security. |[optional] -**Default** | **bool** | Whether to use this authenticated domain as the fallback if no authenticated domains match the sender's domain. |[optional] -**AutomaticSecurity** | **bool** | Whether to allow SendGrid to manage your SPF records, DKIM keys, and DKIM key rotation. |[optional] -**CustomDkimSelector** | **string** | Add a custom DKIM selector. Accepts three letters or numbers. |[optional] -**Region** | **string** | The region of the domain. Allowed values are `global` and `eu`. The default value is `global`. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/domain_authentication/docs/AuthenticatedDomain.md b/rest/api/v3/domain_authentication/docs/AuthenticatedDomain.md deleted file mode 100644 index 6cd5c65b..00000000 --- a/rest/api/v3/domain_authentication/docs/AuthenticatedDomain.md +++ /dev/null @@ -1,22 +0,0 @@ -# AuthenticatedDomain - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **float32** | The ID of the authenticated domain. | -**UserId** | **float32** | The ID of the user that this domain is associated with. | -**Subdomain** | **string** | The subdomain to use for this authenticated domain. | -**Domain** | **string** | The domain to be authenticated. | -**Username** | **string** | The username that this domain will be associated with. | -**Ips** | **[]string** | The IPs to be included in the custom SPF record for this authenticated domain. | -**CustomSpf** | **bool** | Indicates whether this authenticated domain uses custom SPF. | -**Default** | **bool** | Indicates if this is the default authenticated domain. | -**Legacy** | **bool** | Indicates if this authenticated domain was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new authenticated domain if you need to update it. | -**AutomaticSecurity** | **bool** | Indicates if this authenticated domain uses automated security. | -**Valid** | **bool** | Indicates if this is a valid authenticated domain. | -**Dns** | [**ListAllAuthenticatedDomainWithUser200ResponseInnerDns**](ListAllAuthenticatedDomainWithUser200ResponseInnerDns.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpf.md b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpf.md deleted file mode 100644 index 1f08a00e..00000000 --- a/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpf.md +++ /dev/null @@ -1,22 +0,0 @@ -# AuthenticatedDomainSpf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int32** | The ID of the authenticated domain. | -**Domain** | **string** | The domain authenticated. | -**Subdomain** | **string** | The subdomain that was used to create this authenticated domain. |[optional] -**Username** | **string** | The username of the account that this authenticated domain is associated with. | -**UserId** | **int32** | The user_id of the account that this authenticated domain is associated with. | -**Ips** | **[]interface{}** | The IP addresses that are included in the SPF record for this authenticated domain. | -**CustomSpf** | **bool** | Indicates if this authenticated domain uses custom SPF. | -**Default** | **bool** | Indicates if this is the default domain. | -**Legacy** | **bool** | Indicates if this authenticated domain was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new authenticated domain if you need to update it. | -**AutomaticSecurity** | **bool** | Indicates if this authenticated domain uses automated security. | -**Valid** | **bool** | Indicates if this is a valid authenticated domain . | -**Dns** | [**AuthenticatedDomainSpfDns**](AuthenticatedDomainSpfDns.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDns.md b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDns.md deleted file mode 100644 index d4eaca8b..00000000 --- a/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDns.md +++ /dev/null @@ -1,14 +0,0 @@ -# AuthenticatedDomainSpfDns - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MailServer** | [**AuthenticatedDomainSpfDnsMailServer**](AuthenticatedDomainSpfDnsMailServer.md) | | -**SubdomainSpf** | [**AuthenticatedDomainSpfDnsSubdomainSpf**](AuthenticatedDomainSpfDnsSubdomainSpf.md) | | -**DomainSpf** | [**AuthenticatedDomainSpfDnsDomainSpf**](AuthenticatedDomainSpfDnsDomainSpf.md) | | -**Dkim** | [**AuthenticatedDomainSpfDnsDkim**](AuthenticatedDomainSpfDnsDkim.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsDkim.md b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsDkim.md deleted file mode 100644 index ec37b619..00000000 --- a/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsDkim.md +++ /dev/null @@ -1,14 +0,0 @@ -# AuthenticatedDomainSpfDnsDkim - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Host** | **string** | The DNS labels for the DKIM signature. | -**Type** | **string** | The type of data in the DKIM record. | -**Data** | **string** | The DKIM record. | -**Valid** | **bool** | Indicates if the DKIM record is valid. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsDomainSpf.md b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsDomainSpf.md deleted file mode 100644 index f8f4e368..00000000 --- a/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsDomainSpf.md +++ /dev/null @@ -1,14 +0,0 @@ -# AuthenticatedDomainSpfDnsDomainSpf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Host** | **string** | The root domain that this SPF record will be used to authenticate. | -**Type** | **string** | The type of data in the SPF record. | -**Data** | **string** | The SPF record. | -**Valid** | **bool** | Indicates if the SPF record is valid. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsMailServer.md b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsMailServer.md deleted file mode 100644 index b50d175b..00000000 --- a/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsMailServer.md +++ /dev/null @@ -1,14 +0,0 @@ -# AuthenticatedDomainSpfDnsMailServer - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Host** | **string** | The domain sending the messages. | -**Type** | **string** | They type of DNS record. | -**Data** | **string** | The mail server responsible for accepting messages from the sending domain. | -**Valid** | **bool** | Indicates if this is a valid DNS record. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsSubdomainSpf.md b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsSubdomainSpf.md deleted file mode 100644 index f2665a2a..00000000 --- a/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsSubdomainSpf.md +++ /dev/null @@ -1,14 +0,0 @@ -# AuthenticatedDomainSpfDnsSubdomainSpf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Host** | **string** | The domain that this SPF record will be used to authenticate. | -**Type** | **string** | The type of data in the SPF record. | -**Data** | **string** | The SPF record. | -**Valid** | **bool** | Indicates if this is a valid SPF record. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/domain_authentication/docs/DeleteAuthenticatedDomain.md b/rest/api/v3/domain_authentication/docs/DeleteAuthenticatedDomain.md deleted file mode 100644 index eb4c9a6c..00000000 --- a/rest/api/v3/domain_authentication/docs/DeleteAuthenticatedDomain.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeleteAuthenticatedDomain - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteAuthenticatedDomain**](DeleteAuthenticatedDomain.md#DeleteAuthenticatedDomain) | **Delete** /v3/whitelabel/domains/{DomainId} | Delete an authenticated domain. - - - -## DeleteAuthenticatedDomain - -> map[string]interface{} DeleteAuthenticatedDomain(ctx, DomainIdoptional) - -Delete an authenticated domain. - -**This endpoint allows you to delete an authenticated domain.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**DomainId** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteAuthenticatedDomainParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/domain_authentication/docs/DeleteIpFromAuthenticatedDomain.md b/rest/api/v3/domain_authentication/docs/DeleteIpFromAuthenticatedDomain.md deleted file mode 100644 index a8b5e6a5..00000000 --- a/rest/api/v3/domain_authentication/docs/DeleteIpFromAuthenticatedDomain.md +++ /dev/null @@ -1,53 +0,0 @@ -# DeleteIpFromAuthenticatedDomain - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteIpFromAuthenticatedDomain**](DeleteIpFromAuthenticatedDomain.md#DeleteIpFromAuthenticatedDomain) | **Delete** /v3/whitelabel/domains/{Id}/ips/{Ip} | Remove an IP from an authenticated domain. - - - -## DeleteIpFromAuthenticatedDomain - -> AuthenticatedDomainSpf DeleteIpFromAuthenticatedDomain(ctx, IdIpoptional) - -Remove an IP from an authenticated domain. - -**This endpoint allows you to remove an IP address from that domain's authentication.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **int32** | ID of the domain to delete the IP from. -**Ip** | **string** | IP to remove from the domain. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteIpFromAuthenticatedDomainParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**AuthenticatedDomainSpf**](AuthenticatedDomainSpf.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/domain_authentication/docs/DisassociateAuthenticatedDomainFromUser.md b/rest/api/v3/domain_authentication/docs/DisassociateAuthenticatedDomainFromUser.md deleted file mode 100644 index ccfdb2ea..00000000 --- a/rest/api/v3/domain_authentication/docs/DisassociateAuthenticatedDomainFromUser.md +++ /dev/null @@ -1,48 +0,0 @@ -# DisassociateAuthenticatedDomainFromUser - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DisassociateAuthenticatedDomainFromUser**](DisassociateAuthenticatedDomainFromUser.md#DisassociateAuthenticatedDomainFromUser) | **Delete** /v3/whitelabel/domains/subuser | Disassociate an authenticated domain from a given user. - - - -## DisassociateAuthenticatedDomainFromUser - -> map[string]interface{} DisassociateAuthenticatedDomainFromUser(ctx, optional) - -Disassociate an authenticated domain from a given user. - -**This endpoint allows you to disassociate a specific authenticated domain from a subuser.** Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent's domain. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. Note that if you used the [`/v3/whitelabel/domains/{domain_id}/subuser:add` endpoint](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/associate-an-authenticated-domain-with-a-subuser-multiple) to add multiple domains to the subuser, you should use the [`/v3/whitelabel/domains/{domain_id}/subuser` endpoint](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/disassociate-an-authenticated-domain-from-a-subuser-multiple) to disassociate those domains. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a DisassociateAuthenticatedDomainFromUserParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Username** | **string** | Username for the subuser to find associated authenticated domain. - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/domain_authentication/docs/DisassociateSubuserFromDomain.md b/rest/api/v3/domain_authentication/docs/DisassociateSubuserFromDomain.md deleted file mode 100644 index beb09018..00000000 --- a/rest/api/v3/domain_authentication/docs/DisassociateSubuserFromDomain.md +++ /dev/null @@ -1,52 +0,0 @@ -# DisassociateSubuserFromDomain - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DisassociateSubuserFromDomain**](DisassociateSubuserFromDomain.md#DisassociateSubuserFromDomain) | **Delete** /v3/whitelabel/domains/{DomainId}/subuser | Disassociate an authenticated domain from a given user for users with up to five associated domains. - - - -## DisassociateSubuserFromDomain - -> map[string]interface{} DisassociateSubuserFromDomain(ctx, DomainIdoptional) - -Disassociate an authenticated domain from a given user for users with up to five associated domains. - -**This endpoint allows you to disassociate a specific authenticated domain from a subuser, for users with up to five associated domains.** This functionality allows subusers to send mail using their parent's domain. Authenticated domains can be associated with (i.e. assigned to) subusers kknt, and a subuser can have up to five associated authenticated domains. You can dissociate an authenticated domain from any subuser that has one or more authenticated domains using this endpoint. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**DomainId** | **int32** | ID of the authenticated domain to be disassociated with the subuser. - -### Other Parameters - -Other parameters are passed through a pointer to a DisassociateSubuserFromDomainParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Username** | **string** | Username for the subuser to find associated authenticated domain. - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/domain_authentication/docs/EmailDnsRecord.md b/rest/api/v3/domain_authentication/docs/EmailDnsRecord.md deleted file mode 100644 index 6e37810d..00000000 --- a/rest/api/v3/domain_authentication/docs/EmailDnsRecord.md +++ /dev/null @@ -1,48 +0,0 @@ -# EmailDnsRecord - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**EmailDnsRecord**](EmailDnsRecord.md#EmailDnsRecord) | **Post** /v3/whitelabel/dns/email | Email DNS records to a co-worker - - - -## EmailDnsRecord - -> EmailDnsRecord(ctx, optional) - -Email DNS records to a co-worker - -**This endpoint is used to share DNS records with a colleagues** Use this endpoint to send SendGrid-generated DNS record information to a co-worker so they can enter it into your DNS provider to validate your domain and link branding. What type of records are sent will depend on whether you have chosen Automated Security or not. When using Automated Security, SendGrid provides you with three CNAME records. If you turn Automated Security off, you are instead given TXT and MX records. If you pass a `link_id` to this endpoint, the generated email will supply the DNS records necessary to complete [Link Branding](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) setup. If you pass a `domain_id` to this endpoint, the generated email will supply the DNS records needed to complete [Domain Authentication](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Passing both IDs will generate an email with the records needed to complete both setup steps. You can retrieve all your domain IDs from the returned `id` fields for each domain using the \"List all authenticated domains\" endpoint. You can retrieve all of your link IDs using the \"Retrieve all branded links\" endpoint. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a EmailDnsRecordParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**EmailDnsRecordRequest** | [**EmailDnsRecordRequest**](EmailDnsRecordRequest.md) | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/domain_authentication/docs/EmailDnsRecord400Response.md b/rest/api/v3/domain_authentication/docs/EmailDnsRecord400Response.md deleted file mode 100644 index 74634e08..00000000 --- a/rest/api/v3/domain_authentication/docs/EmailDnsRecord400Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# EmailDnsRecord400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**EmailDnsRecord400ResponseErrors**](EmailDnsRecord400ResponseErrors.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/domain_authentication/docs/EmailDnsRecord400ResponseErrors.md b/rest/api/v3/domain_authentication/docs/EmailDnsRecord400ResponseErrors.md deleted file mode 100644 index 285e881a..00000000 --- a/rest/api/v3/domain_authentication/docs/EmailDnsRecord400ResponseErrors.md +++ /dev/null @@ -1,12 +0,0 @@ -# EmailDnsRecord400ResponseErrors - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Error** | **string** | |[optional] -**Field** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/domain_authentication/docs/EmailDnsRecordRequest.md b/rest/api/v3/domain_authentication/docs/EmailDnsRecordRequest.md deleted file mode 100644 index f4f61a68..00000000 --- a/rest/api/v3/domain_authentication/docs/EmailDnsRecordRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# EmailDnsRecordRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**LinkId** | **int32** | The ID of the branded link. | -**DomainId** | **int32** | The ID of your SendGrid domain record. | -**Email** | **string** | The email address to send the DNS information to. | -**Message** | **string** | A custom text block to include in the email body sent with the records. |[optional] [default to "Please set these DNS records in our hosting solution."] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/domain_authentication/docs/GetAuthenticatedDomain.md b/rest/api/v3/domain_authentication/docs/GetAuthenticatedDomain.md deleted file mode 100644 index e472f781..00000000 --- a/rest/api/v3/domain_authentication/docs/GetAuthenticatedDomain.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetAuthenticatedDomain - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetAuthenticatedDomain**](GetAuthenticatedDomain.md#GetAuthenticatedDomain) | **Get** /v3/whitelabel/domains/{DomainId} | Retrieve an authenticated domain - - - -## GetAuthenticatedDomain - -> AuthenticatedDomain GetAuthenticatedDomain(ctx, DomainIdoptional) - -Retrieve an authenticated domain - -**This endpoint allows you to retrieve a specific authenticated domain.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**DomainId** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a GetAuthenticatedDomainParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**AuthenticatedDomain**](AuthenticatedDomain.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser.md b/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser.md deleted file mode 100644 index facdf5b6..00000000 --- a/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser.md +++ /dev/null @@ -1,47 +0,0 @@ -# ListAllAuthenticatedDomainWithUser - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListAllAuthenticatedDomainWithUser**](ListAllAuthenticatedDomainWithUser.md#ListAllAuthenticatedDomainWithUser) | **Get** /v3/whitelabel/domains/subuser/all | List all the authenticated domains associated with the given user. - - - -## ListAllAuthenticatedDomainWithUser - -> []ListAllAuthenticatedDomainWithUser200ResponseInner ListAllAuthenticatedDomainWithUser(ctx, Username) - -List all the authenticated domains associated with the given user. - -**This endpoint allows you to retrieve all of the authenticated domains that have been assigned to a specific subuser.** This functionality allows subusers to send mail using their parent's domain. Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account, and a subuser can have up to five associated domains. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. When selecting a domain to send email from, SendGrid checks for domains in the following order and chooses the first one that appears in the hierarchy: 1. Domain assigned by the subuser that matches the email's `From` address domain. 2. The subuser's default domain. 3. Domain assigned by the parent user that matches the `From` address domain. 4. Parent user's default domain. 5. sendgrid.net - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListAllAuthenticatedDomainWithUserParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**[]ListAllAuthenticatedDomainWithUser200ResponseInner**](ListAllAuthenticatedDomainWithUser200ResponseInner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInner.md b/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInner.md deleted file mode 100644 index 01be72df..00000000 --- a/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInner.md +++ /dev/null @@ -1,22 +0,0 @@ -# ListAllAuthenticatedDomainWithUser200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **float32** | The ID of the authenticated domain. | -**UserId** | **float32** | The ID of the user that this domain is associated with. | -**Subdomain** | **string** | The subdomain to use for this authenticated domain. | -**Domain** | **string** | The domain to be authenticated. | -**Username** | **string** | The username that this domain will be associated with. | -**Ips** | **[]string** | The IPs to be included in the custom SPF record for this authenticated domain. | -**CustomSpf** | **bool** | Indicates whether this authenticated domain uses custom SPF. | -**Default** | **bool** | Indicates if this is the default authenticated domain. | -**Legacy** | **bool** | Indicates if this authenticated domain was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new authenticated domain if you need to update it. | -**AutomaticSecurity** | **bool** | Indicates if this authenticated domain uses automated security. | -**Valid** | **bool** | Indicates if this is a valid authenticated domain. | -**Dns** | [**ListAllAuthenticatedDomainWithUser200ResponseInnerDns**](ListAllAuthenticatedDomainWithUser200ResponseInnerDns.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDns.md b/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDns.md deleted file mode 100644 index 52d1114c..00000000 --- a/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDns.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListAllAuthenticatedDomainWithUser200ResponseInnerDns - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MailCname** | [**ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname**](ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname.md) | | -**Dkim1** | [**ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1**](ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1.md) | | -**Dkim2** | [**ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1**](ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1.md b/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1.md deleted file mode 100644 index be86cafd..00000000 --- a/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1.md +++ /dev/null @@ -1,14 +0,0 @@ -# ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Valid** | **bool** | Indicates if this is a valid DNS record. | -**Type** | **string** | The type of DNS record. | -**Host** | **string** | The domain that this DNS record was created for. | -**Data** | **string** | The DNS record. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname.md b/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname.md deleted file mode 100644 index f15d047a..00000000 --- a/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname.md +++ /dev/null @@ -1,14 +0,0 @@ -# ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Valid** | **bool** | Indicates if this is a valid CNAME. | -**Type** | **string** | The type of DNS record. | -**Host** | **string** | The domain that this CNAME is created for. | -**Data** | **string** | The CNAME record. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/domain_authentication/docs/ListAuthenticatedDomain.md b/rest/api/v3/domain_authentication/docs/ListAuthenticatedDomain.md deleted file mode 100644 index b8031638..00000000 --- a/rest/api/v3/domain_authentication/docs/ListAuthenticatedDomain.md +++ /dev/null @@ -1,53 +0,0 @@ -# ListAuthenticatedDomain - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListAuthenticatedDomain**](ListAuthenticatedDomain.md#ListAuthenticatedDomain) | **Get** /v3/whitelabel/domains | List all authenticated domains - - - -## ListAuthenticatedDomain - -> []interface{} ListAuthenticatedDomain(ctx, optional) - -List all authenticated domains - -**This endpoint allows you to retrieve a paginated list of all domains you have authenticated.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListAuthenticatedDomainParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. -**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. -**ExcludeSubusers** | **bool** | Exclude subuser domains from the result. -**Username** | **string** | The username associated with an authenticated domain. -**Domain** | **string** | Search for authenticated domains. -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -**[]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/domain_authentication/docs/ListAuthenticatedDomainWithUser.md b/rest/api/v3/domain_authentication/docs/ListAuthenticatedDomainWithUser.md deleted file mode 100644 index 18628529..00000000 --- a/rest/api/v3/domain_authentication/docs/ListAuthenticatedDomainWithUser.md +++ /dev/null @@ -1,47 +0,0 @@ -# ListAuthenticatedDomainWithUser - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListAuthenticatedDomainWithUser**](ListAuthenticatedDomainWithUser.md#ListAuthenticatedDomainWithUser) | **Get** /v3/whitelabel/domains/subuser | List the authenticated domain associated with the given user. - - - -## ListAuthenticatedDomainWithUser - -> AuthenticatedDomainSpf ListAuthenticatedDomainWithUser(ctx, Username) - -List the authenticated domain associated with the given user. - -**This endpoint allows you to retrieve all of the authenticated domains that have been assigned to a specific subuser.** Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent's domain. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. Note that if you used the [`/v3/whitelabel/domains/{domain_id}/subuser:add` endpoint]( https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/associate-an-authenticated-domain-with-a-subuser-multiple) to add multiple domains to the subuser, you can use the [`/v3/whitelabel/domains/subuser/all` endpoint](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/list-the-authenticated-domain-associated-with-a-subuser-multiple) to list those associated domains. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListAuthenticatedDomainWithUserParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**AuthenticatedDomainSpf**](AuthenticatedDomainSpf.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/domain_authentication/docs/ListDefaultAuthenticatedDomain.md b/rest/api/v3/domain_authentication/docs/ListDefaultAuthenticatedDomain.md deleted file mode 100644 index 0c23d724..00000000 --- a/rest/api/v3/domain_authentication/docs/ListDefaultAuthenticatedDomain.md +++ /dev/null @@ -1,49 +0,0 @@ -# ListDefaultAuthenticatedDomain - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListDefaultAuthenticatedDomain**](ListDefaultAuthenticatedDomain.md#ListDefaultAuthenticatedDomain) | **Get** /v3/whitelabel/domains/default | Get the default authentication - - - -## ListDefaultAuthenticatedDomain - -> []interface{} ListDefaultAuthenticatedDomain(ctx, optional) - -Get the default authentication - -**This endpoint allows you to retrieve the default authentication for a domain.** When creating or updating a domain authentication, you can set the domain as a default. The default domain will be used to send all mail. If you have multiple authenticated domains, the authenticated domain matching the domain of the From address will be used, and the default will be overridden. This endpoint will return a default domain and its details only if a default is set. You are not required to set a default. If you do not set a default domain, this endpoint will return general information about your domain authentication status. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListDefaultAuthenticatedDomainParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Domain** | **string** | The domain to find a default authentication. -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -**[]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/domain_authentication/docs/UpdateAuthenticatedDomain.md b/rest/api/v3/domain_authentication/docs/UpdateAuthenticatedDomain.md deleted file mode 100644 index aa6feaad..00000000 --- a/rest/api/v3/domain_authentication/docs/UpdateAuthenticatedDomain.md +++ /dev/null @@ -1,53 +0,0 @@ -# UpdateAuthenticatedDomain - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateAuthenticatedDomain**](UpdateAuthenticatedDomain.md#UpdateAuthenticatedDomain) | **Patch** /v3/whitelabel/domains/{DomainId} | Update an authenticated domain - - - -## UpdateAuthenticatedDomain - -> []interface{} UpdateAuthenticatedDomain(ctx, DomainIdoptional) - -Update an authenticated domain - -**This endpoint allows you to update the settings for an authenticated domain.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**DomainId** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateAuthenticatedDomainParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**UpdateAuthenticatedDomainRequest** | [**UpdateAuthenticatedDomainRequest**](UpdateAuthenticatedDomainRequest.md) | - -### Return type - -**[]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/domain_authentication/docs/UpdateAuthenticatedDomainRequest.md b/rest/api/v3/domain_authentication/docs/UpdateAuthenticatedDomainRequest.md deleted file mode 100644 index 99eac6b7..00000000 --- a/rest/api/v3/domain_authentication/docs/UpdateAuthenticatedDomainRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# UpdateAuthenticatedDomainRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Default** | **bool** | Indicates whether this is the default authenticated domain. |[optional] [default to false] -**CustomSpf** | **bool** | Indicates whether to generate a custom SPF record for manual security. |[optional] [default to false] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain.md b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain.md deleted file mode 100644 index 2382aa2a..00000000 --- a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain.md +++ /dev/null @@ -1,52 +0,0 @@ -# ValidateAuthenticatedDomain - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ValidateAuthenticatedDomain**](ValidateAuthenticatedDomain.md#ValidateAuthenticatedDomain) | **Post** /v3/whitelabel/domains/{Id}/validate | Validate a domain authentication. - - - -## ValidateAuthenticatedDomain - -> ValidateAuthenticatedDomain200Response ValidateAuthenticatedDomain(ctx, Idoptional) - -Validate a domain authentication. - -**This endpoint allows you to validate an authenticated domain. If it fails, it will return an error message describing why the domain could not be validated.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **int32** | ID of the domain to validate. - -### Other Parameters - -Other parameters are passed through a pointer to a ValidateAuthenticatedDomainParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ValidateAuthenticatedDomain200Response**](ValidateAuthenticatedDomain200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200Response.md b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200Response.md deleted file mode 100644 index 12efc7d9..00000000 --- a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200Response.md +++ /dev/null @@ -1,13 +0,0 @@ -# ValidateAuthenticatedDomain200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int32** | The ID of the authenticated domain. |[optional] -**Valid** | **bool** | Indicates if this is a valid authenticated domain. |[optional] -**ValidationResults** | [**ValidateAuthenticatedDomain200ResponseValidationResults**](ValidateAuthenticatedDomain200ResponseValidationResults.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResults.md b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResults.md deleted file mode 100644 index 5afcb1d5..00000000 --- a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResults.md +++ /dev/null @@ -1,14 +0,0 @@ -# ValidateAuthenticatedDomain200ResponseValidationResults - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MailCname** | [**ValidateAuthenticatedDomain200ResponseValidationResultsMailCname**](ValidateAuthenticatedDomain200ResponseValidationResultsMailCname.md) | |[optional] -**Dkim1** | [**ValidateAuthenticatedDomain200ResponseValidationResultsDkim1**](ValidateAuthenticatedDomain200ResponseValidationResultsDkim1.md) | |[optional] -**Dkim2** | [**ValidateAuthenticatedDomain200ResponseValidationResultsDkim1**](ValidateAuthenticatedDomain200ResponseValidationResultsDkim1.md) | |[optional] -**Spf** | [**ValidateAuthenticatedDomain200ResponseValidationResultsSpf**](ValidateAuthenticatedDomain200ResponseValidationResultsSpf.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsDkim1.md b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsDkim1.md deleted file mode 100644 index 48d7eb03..00000000 --- a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsDkim1.md +++ /dev/null @@ -1,12 +0,0 @@ -# ValidateAuthenticatedDomain200ResponseValidationResultsDkim1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Valid** | **bool** | Indicates if the DNS record is valid. |[optional] -**Reason** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsMailCname.md b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsMailCname.md deleted file mode 100644 index b87534f9..00000000 --- a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsMailCname.md +++ /dev/null @@ -1,12 +0,0 @@ -# ValidateAuthenticatedDomain200ResponseValidationResultsMailCname - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Valid** | **bool** | Indicates if this DNS record is valid. |[optional] -**Reason** | **string** | The reason this record is invalid. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsSpf.md b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsSpf.md deleted file mode 100644 index 12ba1b89..00000000 --- a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsSpf.md +++ /dev/null @@ -1,12 +0,0 @@ -# ValidateAuthenticatedDomain200ResponseValidationResultsSpf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Valid** | **bool** | Indicates if the SPF record is valid. |[optional] -**Reason** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain500Response.md b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain500Response.md deleted file mode 100644 index 47da7002..00000000 --- a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain500Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValidateAuthenticatedDomain500Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ValidateAuthenticatedDomain500ResponseErrorsInner**](ValidateAuthenticatedDomain500ResponseErrorsInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain500ResponseErrorsInner.md b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain500ResponseErrorsInner.md deleted file mode 100644 index ddc1de56..00000000 --- a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain500ResponseErrorsInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValidateAuthenticatedDomain500ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | A message explaining the reason for the error. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/domain_authentication/model_add_ip_to_authenticated_domain_request.go b/rest/api/v3/domain_authentication/model_add_ip_to_authenticated_domain_request.go deleted file mode 100644 index 618ecd41..00000000 --- a/rest/api/v3/domain_authentication/model_add_ip_to_authenticated_domain_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AddIpToAuthenticatedDomainRequest struct for AddIpToAuthenticatedDomainRequest -type AddIpToAuthenticatedDomainRequest struct { - // IP to associate with the domain. Used for manually specifying IPs for custom SPF. - Ip string `json:"ip"` -} diff --git a/rest/api/v3/domain_authentication/model_associate_subuser_with_domain_request.go b/rest/api/v3/domain_authentication/model_associate_subuser_with_domain_request.go deleted file mode 100644 index 46d3898a..00000000 --- a/rest/api/v3/domain_authentication/model_associate_subuser_with_domain_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AssociateSubuserWithDomainRequest struct for AssociateSubuserWithDomainRequest -type AssociateSubuserWithDomainRequest struct { - // Username to associate with the authenticated domain. - Username string `json:"username"` -} diff --git a/rest/api/v3/domain_authentication/model_authenticate_domain_request.go b/rest/api/v3/domain_authentication/model_authenticate_domain_request.go deleted file mode 100644 index 1896d15f..00000000 --- a/rest/api/v3/domain_authentication/model_authenticate_domain_request.go +++ /dev/null @@ -1,36 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AuthenticateDomainRequest struct for AuthenticateDomainRequest -type AuthenticateDomainRequest struct { - // Domain being authenticated. - Domain string `json:"domain"` - // The subdomain to use for this authenticated domain. - Subdomain *string `json:"subdomain,omitempty"` - // The username associated with this domain. - Username *string `json:"username,omitempty"` - // The IP addresses that will be included in the custom SPF record for this authenticated domain. - Ips *[]string `json:"ips,omitempty"` - // Specify whether to use a custom SPF or allow SendGrid to manage your SPF. This option is only available to authenticated domains set up for manual security. - CustomSpf *bool `json:"custom_spf,omitempty"` - // Whether to use this authenticated domain as the fallback if no authenticated domains match the sender's domain. - Default *bool `json:"default,omitempty"` - // Whether to allow SendGrid to manage your SPF records, DKIM keys, and DKIM key rotation. - AutomaticSecurity *bool `json:"automatic_security,omitempty"` - // Add a custom DKIM selector. Accepts three letters or numbers. - CustomDkimSelector *string `json:"custom_dkim_selector,omitempty"` - // The region of the domain. Allowed values are `global` and `eu`. The default value is `global`. - Region *string `json:"region,omitempty"` -} diff --git a/rest/api/v3/domain_authentication/model_authenticated_domain.go b/rest/api/v3/domain_authentication/model_authenticated_domain.go deleted file mode 100644 index 1de91ca9..00000000 --- a/rest/api/v3/domain_authentication/model_authenticated_domain.go +++ /dev/null @@ -1,41 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AuthenticatedDomain struct for AuthenticatedDomain -type AuthenticatedDomain struct { - // The ID of the authenticated domain. - Id float32 `json:"id"` - // The ID of the user that this domain is associated with. - UserId float32 `json:"user_id"` - // The subdomain to use for this authenticated domain. - Subdomain string `json:"subdomain"` - // The domain to be authenticated. - Domain string `json:"domain"` - // The username that this domain will be associated with. - Username string `json:"username"` - // The IPs to be included in the custom SPF record for this authenticated domain. - Ips []string `json:"ips"` - // Indicates whether this authenticated domain uses custom SPF. - CustomSpf bool `json:"custom_spf"` - // Indicates if this is the default authenticated domain. - Default bool `json:"default"` - // Indicates if this authenticated domain was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new authenticated domain if you need to update it. - Legacy bool `json:"legacy"` - // Indicates if this authenticated domain uses automated security. - AutomaticSecurity bool `json:"automatic_security"` - // Indicates if this is a valid authenticated domain. - Valid bool `json:"valid"` - Dns ListAllAuthenticatedDomainWithUser200ResponseInnerDns `json:"dns"` -} diff --git a/rest/api/v3/domain_authentication/model_authenticated_domain_spf.go b/rest/api/v3/domain_authentication/model_authenticated_domain_spf.go deleted file mode 100644 index 8253d6a7..00000000 --- a/rest/api/v3/domain_authentication/model_authenticated_domain_spf.go +++ /dev/null @@ -1,41 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AuthenticatedDomainSpf struct for AuthenticatedDomainSpf -type AuthenticatedDomainSpf struct { - // The ID of the authenticated domain. - Id int32 `json:"id"` - // The domain authenticated. - Domain string `json:"domain"` - // The subdomain that was used to create this authenticated domain. - Subdomain *string `json:"subdomain,omitempty"` - // The username of the account that this authenticated domain is associated with. - Username string `json:"username"` - // The user_id of the account that this authenticated domain is associated with. - UserId int32 `json:"user_id"` - // The IP addresses that are included in the SPF record for this authenticated domain. - Ips []interface{} `json:"ips"` - // Indicates if this authenticated domain uses custom SPF. - CustomSpf bool `json:"custom_spf"` - // Indicates if this is the default domain. - Default bool `json:"default"` - // Indicates if this authenticated domain was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new authenticated domain if you need to update it. - Legacy bool `json:"legacy"` - // Indicates if this authenticated domain uses automated security. - AutomaticSecurity bool `json:"automatic_security"` - // Indicates if this is a valid authenticated domain . - Valid bool `json:"valid"` - Dns AuthenticatedDomainSpfDns `json:"dns"` -} diff --git a/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns.go b/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns.go deleted file mode 100644 index 776411ba..00000000 --- a/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AuthenticatedDomainSpfDns The DNS records for this authenticated domain. -type AuthenticatedDomainSpfDns struct { - MailServer AuthenticatedDomainSpfDnsMailServer `json:"mail_server"` - SubdomainSpf AuthenticatedDomainSpfDnsSubdomainSpf `json:"subdomain_spf"` - DomainSpf AuthenticatedDomainSpfDnsDomainSpf `json:"domain_spf"` - Dkim AuthenticatedDomainSpfDnsDkim `json:"dkim"` -} diff --git a/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_dkim.go b/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_dkim.go deleted file mode 100644 index e7001397..00000000 --- a/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_dkim.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AuthenticatedDomainSpfDnsDkim The DKIM record for messages sent using this authenticated domain. -type AuthenticatedDomainSpfDnsDkim struct { - // The DNS labels for the DKIM signature. - Host string `json:"host"` - // The type of data in the DKIM record. - Type string `json:"type"` - // The DKIM record. - Data string `json:"data"` - // Indicates if the DKIM record is valid. - Valid bool `json:"valid"` -} diff --git a/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_domain_spf.go b/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_domain_spf.go deleted file mode 100644 index 4a5499ee..00000000 --- a/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_domain_spf.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AuthenticatedDomainSpfDnsDomainSpf The SPF record for the root domain. -type AuthenticatedDomainSpfDnsDomainSpf struct { - // The root domain that this SPF record will be used to authenticate. - Host string `json:"host"` - // The type of data in the SPF record. - Type string `json:"type"` - // The SPF record. - Data string `json:"data"` - // Indicates if the SPF record is valid. - Valid bool `json:"valid"` -} diff --git a/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_mail_server.go b/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_mail_server.go deleted file mode 100644 index cd48d541..00000000 --- a/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_mail_server.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AuthenticatedDomainSpfDnsMailServer Designates which mail server is responsible for accepting messages from a domain. -type AuthenticatedDomainSpfDnsMailServer struct { - // The domain sending the messages. - Host string `json:"host"` - // They type of DNS record. - Type string `json:"type"` - // The mail server responsible for accepting messages from the sending domain. - Data string `json:"data"` - // Indicates if this is a valid DNS record. - Valid bool `json:"valid"` -} diff --git a/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_subdomain_spf.go b/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_subdomain_spf.go deleted file mode 100644 index 9b298d28..00000000 --- a/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_subdomain_spf.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AuthenticatedDomainSpfDnsSubdomainSpf The SPF record for the subdomain used to create this authenticated domain. -type AuthenticatedDomainSpfDnsSubdomainSpf struct { - // The domain that this SPF record will be used to authenticate. - Host string `json:"host"` - // The type of data in the SPF record. - Type string `json:"type"` - // The SPF record. - Data string `json:"data"` - // Indicates if this is a valid SPF record. - Valid bool `json:"valid"` -} diff --git a/rest/api/v3/domain_authentication/model_email_dns_record_400_response.go b/rest/api/v3/domain_authentication/model_email_dns_record_400_response.go deleted file mode 100644 index 5c9bd4d1..00000000 --- a/rest/api/v3/domain_authentication/model_email_dns_record_400_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// EmailDnsRecord400Response struct for EmailDnsRecord400Response -type EmailDnsRecord400Response struct { - Errors *EmailDnsRecord400ResponseErrors `json:"errors,omitempty"` -} diff --git a/rest/api/v3/domain_authentication/model_email_dns_record_400_response_errors.go b/rest/api/v3/domain_authentication/model_email_dns_record_400_response_errors.go deleted file mode 100644 index b694a199..00000000 --- a/rest/api/v3/domain_authentication/model_email_dns_record_400_response_errors.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// EmailDnsRecord400ResponseErrors struct for EmailDnsRecord400ResponseErrors -type EmailDnsRecord400ResponseErrors struct { - Error *string `json:"error,omitempty"` - Field *string `json:"field,omitempty"` -} diff --git a/rest/api/v3/domain_authentication/model_email_dns_record_request.go b/rest/api/v3/domain_authentication/model_email_dns_record_request.go deleted file mode 100644 index f8ddf111..00000000 --- a/rest/api/v3/domain_authentication/model_email_dns_record_request.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// EmailDnsRecordRequest struct for EmailDnsRecordRequest -type EmailDnsRecordRequest struct { - // The ID of the branded link. - LinkId int32 `json:"link_id"` - // The ID of your SendGrid domain record. - DomainId int32 `json:"domain_id"` - // The email address to send the DNS information to. - Email string `json:"email"` - // A custom text block to include in the email body sent with the records. - Message *string `json:"message,omitempty"` -} diff --git a/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner.go b/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner.go deleted file mode 100644 index ffc38779..00000000 --- a/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner.go +++ /dev/null @@ -1,41 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListAllAuthenticatedDomainWithUser200ResponseInner struct for ListAllAuthenticatedDomainWithUser200ResponseInner -type ListAllAuthenticatedDomainWithUser200ResponseInner struct { - // The ID of the authenticated domain. - Id float32 `json:"id"` - // The ID of the user that this domain is associated with. - UserId float32 `json:"user_id"` - // The subdomain to use for this authenticated domain. - Subdomain string `json:"subdomain"` - // The domain to be authenticated. - Domain string `json:"domain"` - // The username that this domain will be associated with. - Username string `json:"username"` - // The IPs to be included in the custom SPF record for this authenticated domain. - Ips []string `json:"ips"` - // Indicates whether this authenticated domain uses custom SPF. - CustomSpf bool `json:"custom_spf"` - // Indicates if this is the default authenticated domain. - Default bool `json:"default"` - // Indicates if this authenticated domain was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new authenticated domain if you need to update it. - Legacy bool `json:"legacy"` - // Indicates if this authenticated domain uses automated security. - AutomaticSecurity bool `json:"automatic_security"` - // Indicates if this is a valid authenticated domain. - Valid bool `json:"valid"` - Dns ListAllAuthenticatedDomainWithUser200ResponseInnerDns `json:"dns"` -} diff --git a/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns.go b/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns.go deleted file mode 100644 index 4d4066b6..00000000 --- a/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListAllAuthenticatedDomainWithUser200ResponseInnerDns The DNS records used to authenticate the sending domain. -type ListAllAuthenticatedDomainWithUser200ResponseInnerDns struct { - MailCname ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname `json:"mail_cname"` - Dkim1 ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1 `json:"dkim1"` - Dkim2 ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1 `json:"dkim2"` -} diff --git a/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns_dkim1.go b/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns_dkim1.go deleted file mode 100644 index 527e6c15..00000000 --- a/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns_dkim1.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1 A DNS record. -type ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1 struct { - // Indicates if this is a valid DNS record. - Valid bool `json:"valid"` - // The type of DNS record. - Type string `json:"type"` - // The domain that this DNS record was created for. - Host string `json:"host"` - // The DNS record. - Data string `json:"data"` -} diff --git a/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns_mail_cname.go b/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns_mail_cname.go deleted file mode 100644 index fe6f1868..00000000 --- a/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns_mail_cname.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname The CNAME for your sending domain that points to sendgrid.net. -type ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname struct { - // Indicates if this is a valid CNAME. - Valid bool `json:"valid"` - // The type of DNS record. - Type string `json:"type"` - // The domain that this CNAME is created for. - Host string `json:"host"` - // The CNAME record. - Data string `json:"data"` -} diff --git a/rest/api/v3/domain_authentication/model_update_authenticated_domain_request.go b/rest/api/v3/domain_authentication/model_update_authenticated_domain_request.go deleted file mode 100644 index 37075169..00000000 --- a/rest/api/v3/domain_authentication/model_update_authenticated_domain_request.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateAuthenticatedDomainRequest struct for UpdateAuthenticatedDomainRequest -type UpdateAuthenticatedDomainRequest struct { - // Indicates whether this is the default authenticated domain. - Default *bool `json:"default,omitempty"` - // Indicates whether to generate a custom SPF record for manual security. - CustomSpf *bool `json:"custom_spf,omitempty"` -} diff --git a/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response.go b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response.go deleted file mode 100644 index 8d90293f..00000000 --- a/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ValidateAuthenticatedDomain200Response struct for ValidateAuthenticatedDomain200Response -type ValidateAuthenticatedDomain200Response struct { - // The ID of the authenticated domain. - Id *int32 `json:"id,omitempty"` - // Indicates if this is a valid authenticated domain. - Valid *bool `json:"valid,omitempty"` - ValidationResults *ValidateAuthenticatedDomain200ResponseValidationResults `json:"validation_results,omitempty"` -} diff --git a/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results.go b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results.go deleted file mode 100644 index 127ec9c9..00000000 --- a/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ValidateAuthenticatedDomain200ResponseValidationResults The individual DNS records that are checked when validating, including the reason for any invalid DNS records. -type ValidateAuthenticatedDomain200ResponseValidationResults struct { - MailCname *ValidateAuthenticatedDomain200ResponseValidationResultsMailCname `json:"mail_cname,omitempty"` - Dkim1 *ValidateAuthenticatedDomain200ResponseValidationResultsDkim1 `json:"dkim1,omitempty"` - Dkim2 *ValidateAuthenticatedDomain200ResponseValidationResultsDkim1 `json:"dkim2,omitempty"` - Spf *ValidateAuthenticatedDomain200ResponseValidationResultsSpf `json:"spf,omitempty"` -} diff --git a/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_dkim1.go b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_dkim1.go deleted file mode 100644 index 9a8df2e2..00000000 --- a/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_dkim1.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ValidateAuthenticatedDomain200ResponseValidationResultsDkim1 A DNS record for this authenticated domain. -type ValidateAuthenticatedDomain200ResponseValidationResultsDkim1 struct { - // Indicates if the DNS record is valid. - Valid *bool `json:"valid,omitempty"` - Reason *string `json:"reason,omitempty"` -} diff --git a/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_mail_cname.go b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_mail_cname.go deleted file mode 100644 index d7664480..00000000 --- a/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_mail_cname.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ValidateAuthenticatedDomain200ResponseValidationResultsMailCname The CNAME record for the authenticated domain. -type ValidateAuthenticatedDomain200ResponseValidationResultsMailCname struct { - // Indicates if this DNS record is valid. - Valid *bool `json:"valid,omitempty"` - // The reason this record is invalid. - Reason *string `json:"reason,omitempty"` -} diff --git a/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_spf.go b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_spf.go deleted file mode 100644 index 1505eba8..00000000 --- a/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_spf.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ValidateAuthenticatedDomain200ResponseValidationResultsSpf The SPF record for the authenticated domain. -type ValidateAuthenticatedDomain200ResponseValidationResultsSpf struct { - // Indicates if the SPF record is valid. - Valid *bool `json:"valid,omitempty"` - Reason *string `json:"reason,omitempty"` -} diff --git a/rest/api/v3/domain_authentication/model_validate_authenticated_domain_500_response.go b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_500_response.go deleted file mode 100644 index d3f70be7..00000000 --- a/rest/api/v3/domain_authentication/model_validate_authenticated_domain_500_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ValidateAuthenticatedDomain500Response struct for ValidateAuthenticatedDomain500Response -type ValidateAuthenticatedDomain500Response struct { - Errors *[]ValidateAuthenticatedDomain500ResponseErrorsInner `json:"errors,omitempty"` -} diff --git a/rest/api/v3/domain_authentication/model_validate_authenticated_domain_500_response_errors_inner.go b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_500_response_errors_inner.go deleted file mode 100644 index fc47a4c6..00000000 --- a/rest/api/v3/domain_authentication/model_validate_authenticated_domain_500_response_errors_inner.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Domain Authentication API -* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ValidateAuthenticatedDomain500ResponseErrorsInner struct for ValidateAuthenticatedDomain500ResponseErrorsInner -type ValidateAuthenticatedDomain500ResponseErrorsInner struct { - // A message explaining the reason for the error. - Message string `json:"message"` -} diff --git a/rest/api/v3/email_activity/.openapi-generator b/rest/api/v3/email_activity/.openapi-generator deleted file mode 100644 index 2406166e..00000000 --- a/rest/api/v3/email_activity/.openapi-generator +++ /dev/null @@ -1,58 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_download_csv.go -api_get_message.go -api_list_message.go -api_request_csv.go -api_service.go -docs/AbbvMessage.md -docs/BounceType.md -docs/BounceType1.md -docs/DownloadCsv.md -docs/DownloadCsv200Response.md -docs/EmailActivityResponseBaseProps.md -docs/Event.md -docs/EventName.md -docs/EventName1.md -docs/GetMessage.md -docs/GetMessage404Response.md -docs/GetMessage404ResponseErrorsInner.md -docs/ListMessage.md -docs/ListMessage200Response.md -docs/ListMessage400Response.md -docs/ListMessage400ResponseErrorsInner.md -docs/ListMessage429Response.md -docs/ListMessage429ResponseErrorsInner.md -docs/Message.md -docs/OutboundIpType.md -docs/OutboundIpType1.md -docs/RequestCsv.md -docs/RequestCsv202Response.md -docs/Status.md -docs/Status1.md -docs/Status2.md -docs/Status3.md -model_abbv__message.go -model_bounce_type.go -model_bounce_type1.go -model_download_csv_200_response.go -model_email_activity_response_base_props.go -model_event.go -model_event_name.go -model_event_name1.go -model_get_message_404_response.go -model_get_message_404_response_errors_inner.go -model_list_message_200_response.go -model_list_message_400_response.go -model_list_message_400_response_errors_inner.go -model_list_message_429_response.go -model_list_message_429_response_errors_inner.go -model_message.go -model_outbound_ip_type.go -model_outbound_ip_type1.go -model_request_csv_202_response.go -model_status.go -model_status1.go -model_status2.go -model_status3.go diff --git a/rest/api/v3/email_activity/.openapi-generator-ignore b/rest/api/v3/email_activity/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/email_activity/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/email_activity/README.md b/rest/api/v3/email_activity/README.md deleted file mode 100644 index 55a23799..00000000 --- a/rest/api/v3/email_activity/README.md +++ /dev/null @@ -1,89 +0,0 @@ -# Go API client for - -The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. - -You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. - -See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:37.552250+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DownloadCsv* | [**DownloadCsv**](docs/DownloadCsv.md#downloadcsv) | **Get** /v3/messages/download/{DownloadUuid} | Download CSV -*GetMessage* | [**GetMessage**](docs/GetMessage.md#getmessage) | **Get** /v3/messages/{MsgId} | Filter messages by message ID -*ListMessage* | [**ListMessage**](docs/ListMessage.md#listmessage) | **Get** /v3/messages | Filter all messages -*RequestCsv* | [**RequestCsv**](docs/RequestCsv.md#requestcsv) | **Post** /v3/messages/download | Request CSV - - -## Documentation For Models - - - [AbbvMessage](AbbvMessage.md) - - [BounceType](BounceType.md) - - [BounceType1](BounceType1.md) - - [DownloadCsv200Response](DownloadCsv200Response.md) - - [EmailActivityResponseBaseProps](EmailActivityResponseBaseProps.md) - - [Event](Event.md) - - [EventName](EventName.md) - - [EventName1](EventName1.md) - - [GetMessage404Response](GetMessage404Response.md) - - [GetMessage404ResponseErrorsInner](GetMessage404ResponseErrorsInner.md) - - [ListMessage200Response](ListMessage200Response.md) - - [ListMessage400Response](ListMessage400Response.md) - - [ListMessage400ResponseErrorsInner](ListMessage400ResponseErrorsInner.md) - - [ListMessage429Response](ListMessage429Response.md) - - [ListMessage429ResponseErrorsInner](ListMessage429ResponseErrorsInner.md) - - [Message](Message.md) - - [OutboundIpType](OutboundIpType.md) - - [OutboundIpType1](OutboundIpType1.md) - - [RequestCsv202Response](RequestCsv202Response.md) - - [Status](Status.md) - - [Status1](Status1.md) - - [Status2](Status2.md) - - [Status3](Status3.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/email_activity/api_download_csv.go b/rest/api/v3/email_activity/api_download_csv.go deleted file mode 100644 index 4099749d..00000000 --- a/rest/api/v3/email_activity/api_download_csv.go +++ /dev/null @@ -1,77 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Activity API -* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DownloadCsvParam struct { - // UUID used to locate the download csv request entry in the DB. This is the UUID provided in the email sent to the user when their csv file is ready to download - DownloadUuid *string `json:"download_uuid"` -} - -func (params *DownloadCsvParam) SetDownloadUuid(DownloadUuid string) *DownloadCsvParam { - params.DownloadUuid = &DownloadUuid - return params -} - -// **This endpoint will return a presigned URL that can be used to download the CSV that was requested from the \"Request a CSV\" endpoint.** -func (c *ApiService) DownloadCsv(params *DownloadCsvParam) (interface{}, error) { - path := "/v3/messages/download/{DownloadUuid}" - if params != nil && params.DownloadUuid != nil { - path = strings.Replace(path, "{"+"DownloadUuid"+"}", *params.DownloadUuid, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &DownloadCsv200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ListMessage429Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ListMessage429Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/email_activity/api_get_message.go b/rest/api/v3/email_activity/api_get_message.go deleted file mode 100644 index 117173dd..00000000 --- a/rest/api/v3/email_activity/api_get_message.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Activity API -* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetMessageParam struct { - // The ID of the message you are requesting details for. - MsgId *string `json:"msg_id"` -} - -func (params *GetMessageParam) SetMsgId(MsgId string) *GetMessageParam { - params.MsgId = &MsgId - return params -} - -// Get all of the details about the specified message. -func (c *ApiService) GetMessage(params *GetMessageParam) (interface{}, error) { - path := "/v3/messages/{MsgId}" - if params != nil && params.MsgId != nil { - path = strings.Replace(path, "{"+"MsgId"+"}", *params.MsgId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &Message{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ListMessage429Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &GetMessage404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 429 { - ps := &ListMessage429Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/email_activity/api_list_message.go b/rest/api/v3/email_activity/api_list_message.go deleted file mode 100644 index 50a736d0..00000000 --- a/rest/api/v3/email_activity/api_list_message.go +++ /dev/null @@ -1,86 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Activity API -* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListMessageParam struct { - // Use the query syntax to filter your email activity. - Query *string `json:"query"` - // The number of messages returned. This parameter must be greater than 0 and less than or equal to 1000 - Limit *float32 `json:"limit,omitempty"` -} - -func (params *ListMessageParam) SetQuery(Query string) *ListMessageParam { - params.Query = &Query - return params -} -func (params *ListMessageParam) SetLimit(Limit float32) *ListMessageParam { - params.Limit = &Limit - return params -} - -// Filter all messages to search your Email Activity. All queries must be [URL encoded](https://meyerweb.com/eric/tools/dencoder/), and use the following format: `query={query_type}=\"{query_content}\"` Once URL encoded, the previous query will look like this: `query=type%3D%22query_content%22` For example, to filter by a specific email, use the following query: `query=to_email%3D%22example%40example.com%22` Visit our [Query Reference section](https://docs.sendgrid.com/for-developers/sending-email/getting-started-email-activity-api#query-reference) to see a full list of basic query types and examples. -func (c *ApiService) ListMessage(params *ListMessageParam) (interface{}, error) { - path := "/v3/messages" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Query != nil { - data.Set("query", *params.Query) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListMessage200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ListMessage400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 429 { - ps := &ListMessage429Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/email_activity/api_request_csv.go b/rest/api/v3/email_activity/api_request_csv.go deleted file mode 100644 index 7e77789b..00000000 --- a/rest/api/v3/email_activity/api_request_csv.go +++ /dev/null @@ -1,84 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Activity API -* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type RequestCsvParam struct { - // Uses a SQL like syntax to indicate which messages to include in the CSV - Query *string `json:"query,omitempty"` -} - -func (params *RequestCsvParam) SetQuery(Query string) *RequestCsvParam { - params.Query = &Query - return params -} - -// This request will kick off a backend process to generate a CSV file. Once generated, the worker will then send an email for the user download the file. The link will expire in 3 days. The CSV will contain the events from the last 30 days, limited to the last 1 million events maximum. This endpoint will be rate limited to 1 request every 12 hours (rate limit may change). This endpoint is similar to the GET Single Message endpoint - the only difference is that /download is added to indicate that this is a CSV download requests but the same query is used to determine what the CSV should contain. -func (c *ApiService) RequestCsv(params *RequestCsvParam) (interface{}, error) { - path := "/v3/messages/download" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Query != nil { - data.Set("query", *params.Query) - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 202 { - ps := &RequestCsv202Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ListMessage429Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 429 { - ps := &ListMessage429Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ListMessage429Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/email_activity/api_service.go b/rest/api/v3/email_activity/api_service.go deleted file mode 100644 index 9a929e14..00000000 --- a/rest/api/v3/email_activity/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Activity API -* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/email_activity/docs/AbbvMessage.md b/rest/api/v3/email_activity/docs/AbbvMessage.md deleted file mode 100644 index d5eb580e..00000000 --- a/rest/api/v3/email_activity/docs/AbbvMessage.md +++ /dev/null @@ -1,18 +0,0 @@ -# AbbvMessage - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FromEmail** | **string** | | -**MsgId** | **string** | | -**Subject** | **string** | | -**ToEmail** | **string** | | -**Status** | [**Status**](Status.md) | | -**OpensCount** | **int32** | | -**ClicksCount** | **int32** | | -**LastEventTime** | **string** | iso 8601 format | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_activity/docs/BounceType.md b/rest/api/v3/email_activity/docs/BounceType.md deleted file mode 100644 index d419a200..00000000 --- a/rest/api/v3/email_activity/docs/BounceType.md +++ /dev/null @@ -1,13 +0,0 @@ -# BounceType - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**SOFT** | string | (value: `"soft"`) -**HARD** | string | (value: `"hard"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_activity/docs/BounceType1.md b/rest/api/v3/email_activity/docs/BounceType1.md deleted file mode 100644 index 6c717285..00000000 --- a/rest/api/v3/email_activity/docs/BounceType1.md +++ /dev/null @@ -1,13 +0,0 @@ -# BounceType1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**SOFT** | string | (value: `"soft"`) -**HARD** | string | (value: `"hard"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_activity/docs/DownloadCsv.md b/rest/api/v3/email_activity/docs/DownloadCsv.md deleted file mode 100644 index e53ea921..00000000 --- a/rest/api/v3/email_activity/docs/DownloadCsv.md +++ /dev/null @@ -1,51 +0,0 @@ -# DownloadCsv - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DownloadCsv**](DownloadCsv.md#DownloadCsv) | **Get** /v3/messages/download/{DownloadUuid} | Download CSV - - - -## DownloadCsv - -> DownloadCsv200Response DownloadCsv(ctx, DownloadUuid) - -Download CSV - -**This endpoint will return a presigned URL that can be used to download the CSV that was requested from the \"Request a CSV\" endpoint.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**DownloadUuid** | **string** | UUID used to locate the download csv request entry in the DB. This is the UUID provided in the email sent to the user when their csv file is ready to download - -### Other Parameters - -Other parameters are passed through a pointer to a DownloadCsvParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**DownloadCsv200Response**](DownloadCsv200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/email_activity/docs/DownloadCsv200Response.md b/rest/api/v3/email_activity/docs/DownloadCsv200Response.md deleted file mode 100644 index 5a2abcc5..00000000 --- a/rest/api/v3/email_activity/docs/DownloadCsv200Response.md +++ /dev/null @@ -1,12 +0,0 @@ -# DownloadCsv200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**PresignedUrl** | **string** | A signed link that will allow you to download the CSV file requested by the Request a CSV endpoint. |[optional] -**Csv** | **string** | Returns the aws signed link to the csv file which mako UI should perform a get on to trigger the csv download for the user | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_activity/docs/EmailActivityResponseBaseProps.md b/rest/api/v3/email_activity/docs/EmailActivityResponseBaseProps.md deleted file mode 100644 index 9a6546f4..00000000 --- a/rest/api/v3/email_activity/docs/EmailActivityResponseBaseProps.md +++ /dev/null @@ -1,15 +0,0 @@ -# EmailActivityResponseBaseProps - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FromEmail** | **string** | The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account. |[optional] [default to "test0@example.com"] -**MsgId** | **string** | A unique ID assigned to the message. This ID can be used to retrieve activity data for the specific message. |[optional] -**Subject** | **string** | The email's subject line. |[optional] -**ToEmail** | **string** | The intended recipient's email address. |[optional] -**Status** | [**Status3**](Status3.md) | The message's status. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_activity/docs/Event.md b/rest/api/v3/email_activity/docs/Event.md deleted file mode 100644 index 78e02233..00000000 --- a/rest/api/v3/email_activity/docs/Event.md +++ /dev/null @@ -1,18 +0,0 @@ -# Event - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**EventName** | [**EventName**](EventName.md) | Name of event | -**Processed** | **string** | The date when the event was processed | -**Reason** | **string** | Explanation of what caused the message to be \"bounced\", \"deferred\", or \"blocked\". Usually contains error message from the server - e.g. message from gmail why mail was deferred. |[optional] -**AttemptNum** | **int32** | Used with \"deferred\" events to indicate the attempt number out of 10. One \"deferred\" entry will exists under events array for each time a message was deferred with error message from the server. |[optional] -**Url** | **string** | Used with \"clicked\" event to indicate which url the user clicked. |[optional] -**BounceType** | [**BounceType**](BounceType.md) | Use to distinguish between types of bounces | -**HttpUserAgent** | **string** | Client recipient used to click or open message | -**MxServer** | **string** | The MX server that received the email. For example, mx.gmail.com | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_activity/docs/EventName.md b/rest/api/v3/email_activity/docs/EventName.md deleted file mode 100644 index fc3500e5..00000000 --- a/rest/api/v3/email_activity/docs/EventName.md +++ /dev/null @@ -1,22 +0,0 @@ -# EventName - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**BOUNCED** | string | (value: `"bounced"`) -**OPENED** | string | (value: `"opened"`) -**CLICKED** | string | (value: `"clicked"`) -**PROCESSED** | string | (value: `"processed"`) -**DROPPED** | string | (value: `"dropped"`) -**DELIVERED** | string | (value: `"delivered"`) -**DEFERRED** | string | (value: `"deferred"`) -**SPAM_REPORT** | string | (value: `"spam_report"`) -**UNSUBSCRIBE** | string | (value: `"unsubscribe"`) -**GROUP_UNSUBSCRIBE** | string | (value: `"group_unsubscribe"`) -**GROUP_RESUBSCRIBE** | string | (value: `"group_resubscribe"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_activity/docs/EventName1.md b/rest/api/v3/email_activity/docs/EventName1.md deleted file mode 100644 index 32f92dff..00000000 --- a/rest/api/v3/email_activity/docs/EventName1.md +++ /dev/null @@ -1,22 +0,0 @@ -# EventName1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**BOUNCED** | string | (value: `"bounced"`) -**OPENED** | string | (value: `"opened"`) -**CLICKED** | string | (value: `"clicked"`) -**PROCESSED** | string | (value: `"processed"`) -**DROPPED** | string | (value: `"dropped"`) -**DELIVERED** | string | (value: `"delivered"`) -**DEFERRED** | string | (value: `"deferred"`) -**SPAM_REPORT** | string | (value: `"spam_report"`) -**UNSUBSCRIBE** | string | (value: `"unsubscribe"`) -**GROUP_UNSUBSCRIBE** | string | (value: `"group_unsubscribe"`) -**GROUP_RESUBSCRIBE** | string | (value: `"group_resubscribe"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_activity/docs/GetMessage.md b/rest/api/v3/email_activity/docs/GetMessage.md deleted file mode 100644 index aa7a5818..00000000 --- a/rest/api/v3/email_activity/docs/GetMessage.md +++ /dev/null @@ -1,51 +0,0 @@ -# GetMessage - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetMessage**](GetMessage.md#GetMessage) | **Get** /v3/messages/{MsgId} | Filter messages by message ID - - - -## GetMessage - -> Message GetMessage(ctx, MsgId) - -Filter messages by message ID - -Get all of the details about the specified message. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**MsgId** | **string** | The ID of the message you are requesting details for. - -### Other Parameters - -Other parameters are passed through a pointer to a GetMessageParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**Message**](Message.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/email_activity/docs/GetMessage404Response.md b/rest/api/v3/email_activity/docs/GetMessage404Response.md deleted file mode 100644 index 488a3b4d..00000000 --- a/rest/api/v3/email_activity/docs/GetMessage404Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetMessage404Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]GetMessage404ResponseErrorsInner**](GetMessage404ResponseErrorsInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_activity/docs/GetMessage404ResponseErrorsInner.md b/rest/api/v3/email_activity/docs/GetMessage404ResponseErrorsInner.md deleted file mode 100644 index fd1ec1f1..00000000 --- a/rest/api/v3/email_activity/docs/GetMessage404ResponseErrorsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetMessage404ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | |[optional] -**Field** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_activity/docs/ListMessage.md b/rest/api/v3/email_activity/docs/ListMessage.md deleted file mode 100644 index e2438fc5..00000000 --- a/rest/api/v3/email_activity/docs/ListMessage.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListMessage - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListMessage**](ListMessage.md#ListMessage) | **Get** /v3/messages | Filter all messages - - - -## ListMessage - -> ListMessage200Response ListMessage(ctx, Queryoptional) - -Filter all messages - -Filter all messages to search your Email Activity. All queries must be [URL encoded](https://meyerweb.com/eric/tools/dencoder/), and use the following format: `query={query_type}=\"{query_content}\"` Once URL encoded, the previous query will look like this: `query=type%3D%22query_content%22` For example, to filter by a specific email, use the following query: `query=to_email%3D%22example%40example.com%22` Visit our [Query Reference section](https://docs.sendgrid.com/for-developers/sending-email/getting-started-email-activity-api#query-reference) to see a full list of basic query types and examples. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListMessageParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Limit** | **float32** | The number of messages returned. This parameter must be greater than 0 and less than or equal to 1000 - -### Return type - -[**ListMessage200Response**](ListMessage200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/email_activity/docs/ListMessage200Response.md b/rest/api/v3/email_activity/docs/ListMessage200Response.md deleted file mode 100644 index 4c8b0b60..00000000 --- a/rest/api/v3/email_activity/docs/ListMessage200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListMessage200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Messages** | [**[]AbbvMessage**](AbbvMessage.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_activity/docs/ListMessage400Response.md b/rest/api/v3/email_activity/docs/ListMessage400Response.md deleted file mode 100644 index 66b20996..00000000 --- a/rest/api/v3/email_activity/docs/ListMessage400Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListMessage400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ListMessage400ResponseErrorsInner**](ListMessage400ResponseErrorsInner.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_activity/docs/ListMessage400ResponseErrorsInner.md b/rest/api/v3/email_activity/docs/ListMessage400ResponseErrorsInner.md deleted file mode 100644 index f75aa149..00000000 --- a/rest/api/v3/email_activity/docs/ListMessage400ResponseErrorsInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListMessage400ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_activity/docs/ListMessage429Response.md b/rest/api/v3/email_activity/docs/ListMessage429Response.md deleted file mode 100644 index 5f0af5e3..00000000 --- a/rest/api/v3/email_activity/docs/ListMessage429Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListMessage429Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ListMessage429ResponseErrorsInner**](ListMessage429ResponseErrorsInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_activity/docs/ListMessage429ResponseErrorsInner.md b/rest/api/v3/email_activity/docs/ListMessage429ResponseErrorsInner.md deleted file mode 100644 index 14d3e696..00000000 --- a/rest/api/v3/email_activity/docs/ListMessage429ResponseErrorsInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListMessage429ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_activity/docs/Message.md b/rest/api/v3/email_activity/docs/Message.md deleted file mode 100644 index db81f245..00000000 --- a/rest/api/v3/email_activity/docs/Message.md +++ /dev/null @@ -1,25 +0,0 @@ -# Message - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FromEmail** | **string** | The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account. |[optional] [default to "test0@example.com"] -**MsgId** | **string** | A unique ID assigned to the message. This ID can be used to retrieve activity data for the specific message. |[optional] -**Subject** | **string** | The email's subject line. |[optional] -**ToEmail** | **string** | The intended recipient's email address. |[optional] -**Status** | [**Status3**](Status3.md) | The message's status. |[optional] -**TemplateId** | **string** | The ID associated with a Twilio SendGrid email template used to format the message. | -**AsmGroupId** | **int32** | The unsubscribe group associated with this email. | -**Teammate** | **string** | Teammate's username | -**ApiKeyId** | **string** | The ID of the API Key used to authenticate the sending request for the message. | -**Events** | [**[]Event**](Event.md) | List of events related to email message | -**OriginatingIp** | **string** | This is the IP of the user who sent the message. | -**Categories** | **[]string** | Categories users associated to the message | -**UniqueArgs** | **string** | JSON hash of key-value pairs associated with the message. |[default to "Null"] -**OutboundIp** | **string** | IP used to send to the remote Mail Transfer Agent. | -**OutboundIpType** | [**OutboundIpType**](OutboundIpType.md) | Whether or not the outbound IP is dedicated vs shared | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_activity/docs/OutboundIpType.md b/rest/api/v3/email_activity/docs/OutboundIpType.md deleted file mode 100644 index 0b59274a..00000000 --- a/rest/api/v3/email_activity/docs/OutboundIpType.md +++ /dev/null @@ -1,13 +0,0 @@ -# OutboundIpType - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**DEDICATED** | string | (value: `"dedicated"`) -**SHARED** | string | (value: `"shared"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_activity/docs/OutboundIpType1.md b/rest/api/v3/email_activity/docs/OutboundIpType1.md deleted file mode 100644 index e6261498..00000000 --- a/rest/api/v3/email_activity/docs/OutboundIpType1.md +++ /dev/null @@ -1,13 +0,0 @@ -# OutboundIpType1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**DEDICATED** | string | (value: `"dedicated"`) -**SHARED** | string | (value: `"shared"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_activity/docs/RequestCsv.md b/rest/api/v3/email_activity/docs/RequestCsv.md deleted file mode 100644 index c18ac4b3..00000000 --- a/rest/api/v3/email_activity/docs/RequestCsv.md +++ /dev/null @@ -1,48 +0,0 @@ -# RequestCsv - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**RequestCsv**](RequestCsv.md#RequestCsv) | **Post** /v3/messages/download | Request CSV - - - -## RequestCsv - -> RequestCsv202Response RequestCsv(ctx, optional) - -Request CSV - -This request will kick off a backend process to generate a CSV file. Once generated, the worker will then send an email for the user download the file. The link will expire in 3 days. The CSV will contain the events from the last 30 days, limited to the last 1 million events maximum. This endpoint will be rate limited to 1 request every 12 hours (rate limit may change). This endpoint is similar to the GET Single Message endpoint - the only difference is that /download is added to indicate that this is a CSV download requests but the same query is used to determine what the CSV should contain. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a RequestCsvParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Query** | **string** | Uses a SQL like syntax to indicate which messages to include in the CSV - -### Return type - -[**RequestCsv202Response**](RequestCsv202Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/email_activity/docs/RequestCsv202Response.md b/rest/api/v3/email_activity/docs/RequestCsv202Response.md deleted file mode 100644 index 04c55510..00000000 --- a/rest/api/v3/email_activity/docs/RequestCsv202Response.md +++ /dev/null @@ -1,12 +0,0 @@ -# RequestCsv202Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Status** | [**Status2**](Status2.md) | |[optional] -**Message** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_activity/docs/Status.md b/rest/api/v3/email_activity/docs/Status.md deleted file mode 100644 index 9c0176ea..00000000 --- a/rest/api/v3/email_activity/docs/Status.md +++ /dev/null @@ -1,14 +0,0 @@ -# Status - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**PROCESSED** | string | (value: `"processed"`) -**DELIVERED** | string | (value: `"delivered"`) -**NOT_DELIVERED** | string | (value: `"not_delivered"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_activity/docs/Status1.md b/rest/api/v3/email_activity/docs/Status1.md deleted file mode 100644 index 835d5e5c..00000000 --- a/rest/api/v3/email_activity/docs/Status1.md +++ /dev/null @@ -1,14 +0,0 @@ -# Status1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**PROCESSED** | string | (value: `"processed"`) -**NOT_DELIVERED** | string | (value: `"not_delivered"`) -**DELIVERED** | string | (value: `"delivered"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_activity/docs/Status2.md b/rest/api/v3/email_activity/docs/Status2.md deleted file mode 100644 index 35da3328..00000000 --- a/rest/api/v3/email_activity/docs/Status2.md +++ /dev/null @@ -1,12 +0,0 @@ -# Status2 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**PENDING** | string | (value: `"pending"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_activity/docs/Status3.md b/rest/api/v3/email_activity/docs/Status3.md deleted file mode 100644 index 0cccb107..00000000 --- a/rest/api/v3/email_activity/docs/Status3.md +++ /dev/null @@ -1,14 +0,0 @@ -# Status3 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**PROCESSED** | string | (value: `"processed"`) -**DELIVERED** | string | (value: `"delivered"`) -**NOT_DELIVERED** | string | (value: `"not_delivered"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_activity/model_abbv__message.go b/rest/api/v3/email_activity/model_abbv__message.go deleted file mode 100644 index 11ab95ae..00000000 --- a/rest/api/v3/email_activity/model_abbv__message.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Activity API -* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AbbvMessage struct for AbbvMessage -type AbbvMessage struct { - FromEmail string `json:"from_email"` - MsgId string `json:"msg_id"` - Subject string `json:"subject"` - ToEmail string `json:"to_email"` - Status Status `json:"status"` - OpensCount int32 `json:"opens_count"` - ClicksCount int32 `json:"clicks_count"` - // iso 8601 format - LastEventTime string `json:"last_event_time"` -} diff --git a/rest/api/v3/email_activity/model_bounce_type.go b/rest/api/v3/email_activity/model_bounce_type.go deleted file mode 100644 index 76c31a7f..00000000 --- a/rest/api/v3/email_activity/model_bounce_type.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Activity API -* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// BounceType the model 'BounceType' -type BounceType string - -// List of BounceType -const ( - BOUNCETYPE_SOFT BounceType = "soft" - BOUNCETYPE_HARD BounceType = "hard" -) diff --git a/rest/api/v3/email_activity/model_bounce_type1.go b/rest/api/v3/email_activity/model_bounce_type1.go deleted file mode 100644 index a9c49152..00000000 --- a/rest/api/v3/email_activity/model_bounce_type1.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Activity API -* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// BounceType1 the model 'BounceType1' -type BounceType1 string - -// List of BounceType1 -const ( - BOUNCETYPE1_SOFT BounceType1 = "soft" - BOUNCETYPE1_HARD BounceType1 = "hard" -) diff --git a/rest/api/v3/email_activity/model_download_csv_200_response.go b/rest/api/v3/email_activity/model_download_csv_200_response.go deleted file mode 100644 index ee65ebd8..00000000 --- a/rest/api/v3/email_activity/model_download_csv_200_response.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Activity API -* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DownloadCsv200Response struct for DownloadCsv200Response -type DownloadCsv200Response struct { - // A signed link that will allow you to download the CSV file requested by the Request a CSV endpoint. - PresignedUrl *string `json:"presigned_url,omitempty"` - // Returns the aws signed link to the csv file which mako UI should perform a get on to trigger the csv download for the user - Csv string `json:"csv"` -} diff --git a/rest/api/v3/email_activity/model_email_activity_response_base_props.go b/rest/api/v3/email_activity/model_email_activity_response_base_props.go deleted file mode 100644 index 3de2c61d..00000000 --- a/rest/api/v3/email_activity/model_email_activity_response_base_props.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Activity API -* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// EmailActivityResponseBaseProps struct for EmailActivityResponseBaseProps -type EmailActivityResponseBaseProps struct { - // The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account. - FromEmail *string `json:"from_email,omitempty"` - // A unique ID assigned to the message. This ID can be used to retrieve activity data for the specific message. - MsgId *string `json:"msg_id,omitempty"` - // The email's subject line. - Subject *string `json:"subject,omitempty"` - // The intended recipient's email address. - ToEmail *string `json:"to_email,omitempty"` - // The message's status. - Status *Status3 `json:"status,omitempty"` -} diff --git a/rest/api/v3/email_activity/model_event.go b/rest/api/v3/email_activity/model_event.go deleted file mode 100644 index 1353170d..00000000 --- a/rest/api/v3/email_activity/model_event.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Activity API -* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Event struct for Event -type Event struct { - // Name of event - EventName EventName `json:"event_name"` - // The date when the event was processed - Processed string `json:"processed"` - // Explanation of what caused the message to be \"bounced\", \"deferred\", or \"blocked\". Usually contains error message from the server - e.g. message from gmail why mail was deferred. - Reason *string `json:"reason,omitempty"` - // Used with \"deferred\" events to indicate the attempt number out of 10. One \"deferred\" entry will exists under events array for each time a message was deferred with error message from the server. - AttemptNum *int32 `json:"attempt_num,omitempty"` - // Used with \"clicked\" event to indicate which url the user clicked. - Url *string `json:"url,omitempty"` - // Use to distinguish between types of bounces - BounceType BounceType `json:"bounce_type"` - // Client recipient used to click or open message - HttpUserAgent string `json:"http_user_agent"` - // The MX server that received the email. For example, mx.gmail.com - MxServer string `json:"mx_server"` -} diff --git a/rest/api/v3/email_activity/model_event_name.go b/rest/api/v3/email_activity/model_event_name.go deleted file mode 100644 index 0756869a..00000000 --- a/rest/api/v3/email_activity/model_event_name.go +++ /dev/null @@ -1,32 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Activity API -* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// EventName the model 'EventName' -type EventName string - -// List of EventName -const ( - EVENTNAME_BOUNCED EventName = "bounced" - EVENTNAME_OPENED EventName = "opened" - EVENTNAME_CLICKED EventName = "clicked" - EVENTNAME_PROCESSED EventName = "processed" - EVENTNAME_DROPPED EventName = "dropped" - EVENTNAME_DELIVERED EventName = "delivered" - EVENTNAME_DEFERRED EventName = "deferred" - EVENTNAME_SPAM_REPORT EventName = "spam_report" - EVENTNAME_UNSUBSCRIBE EventName = "unsubscribe" - EVENTNAME_GROUP_UNSUBSCRIBE EventName = "group_unsubscribe" - EVENTNAME_GROUP_RESUBSCRIBE EventName = "group_resubscribe" -) diff --git a/rest/api/v3/email_activity/model_event_name1.go b/rest/api/v3/email_activity/model_event_name1.go deleted file mode 100644 index 28041369..00000000 --- a/rest/api/v3/email_activity/model_event_name1.go +++ /dev/null @@ -1,32 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Activity API -* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// EventName1 the model 'EventName1' -type EventName1 string - -// List of EventName1 -const ( - EVENTNAME1_BOUNCED EventName1 = "bounced" - EVENTNAME1_OPENED EventName1 = "opened" - EVENTNAME1_CLICKED EventName1 = "clicked" - EVENTNAME1_PROCESSED EventName1 = "processed" - EVENTNAME1_DROPPED EventName1 = "dropped" - EVENTNAME1_DELIVERED EventName1 = "delivered" - EVENTNAME1_DEFERRED EventName1 = "deferred" - EVENTNAME1_SPAM_REPORT EventName1 = "spam_report" - EVENTNAME1_UNSUBSCRIBE EventName1 = "unsubscribe" - EVENTNAME1_GROUP_UNSUBSCRIBE EventName1 = "group_unsubscribe" - EVENTNAME1_GROUP_RESUBSCRIBE EventName1 = "group_resubscribe" -) diff --git a/rest/api/v3/email_activity/model_get_message_404_response.go b/rest/api/v3/email_activity/model_get_message_404_response.go deleted file mode 100644 index 4ba14b45..00000000 --- a/rest/api/v3/email_activity/model_get_message_404_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Activity API -* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetMessage404Response struct for GetMessage404Response -type GetMessage404Response struct { - Errors *[]GetMessage404ResponseErrorsInner `json:"errors,omitempty"` -} diff --git a/rest/api/v3/email_activity/model_get_message_404_response_errors_inner.go b/rest/api/v3/email_activity/model_get_message_404_response_errors_inner.go deleted file mode 100644 index c2a0aa50..00000000 --- a/rest/api/v3/email_activity/model_get_message_404_response_errors_inner.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Activity API -* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetMessage404ResponseErrorsInner struct for GetMessage404ResponseErrorsInner -type GetMessage404ResponseErrorsInner struct { - Message *string `json:"message,omitempty"` - Field *string `json:"field,omitempty"` -} diff --git a/rest/api/v3/email_activity/model_list_message_200_response.go b/rest/api/v3/email_activity/model_list_message_200_response.go deleted file mode 100644 index f66abfe1..00000000 --- a/rest/api/v3/email_activity/model_list_message_200_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Activity API -* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListMessage200Response struct for ListMessage200Response -type ListMessage200Response struct { - Messages *[]AbbvMessage `json:"messages,omitempty"` -} diff --git a/rest/api/v3/email_activity/model_list_message_400_response.go b/rest/api/v3/email_activity/model_list_message_400_response.go deleted file mode 100644 index 2ad9c3ff..00000000 --- a/rest/api/v3/email_activity/model_list_message_400_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Activity API -* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListMessage400Response struct for ListMessage400Response -type ListMessage400Response struct { - Errors []ListMessage400ResponseErrorsInner `json:"errors"` -} diff --git a/rest/api/v3/email_activity/model_list_message_400_response_errors_inner.go b/rest/api/v3/email_activity/model_list_message_400_response_errors_inner.go deleted file mode 100644 index 561b7001..00000000 --- a/rest/api/v3/email_activity/model_list_message_400_response_errors_inner.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Activity API -* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListMessage400ResponseErrorsInner struct for ListMessage400ResponseErrorsInner -type ListMessage400ResponseErrorsInner struct { - Message string `json:"message"` -} diff --git a/rest/api/v3/email_activity/model_list_message_429_response.go b/rest/api/v3/email_activity/model_list_message_429_response.go deleted file mode 100644 index 46d73b1f..00000000 --- a/rest/api/v3/email_activity/model_list_message_429_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Activity API -* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListMessage429Response struct for ListMessage429Response -type ListMessage429Response struct { - Errors *[]ListMessage429ResponseErrorsInner `json:"errors,omitempty"` -} diff --git a/rest/api/v3/email_activity/model_list_message_429_response_errors_inner.go b/rest/api/v3/email_activity/model_list_message_429_response_errors_inner.go deleted file mode 100644 index 6d46e6cc..00000000 --- a/rest/api/v3/email_activity/model_list_message_429_response_errors_inner.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Activity API -* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListMessage429ResponseErrorsInner struct for ListMessage429ResponseErrorsInner -type ListMessage429ResponseErrorsInner struct { - Message *string `json:"message,omitempty"` -} diff --git a/rest/api/v3/email_activity/model_message.go b/rest/api/v3/email_activity/model_message.go deleted file mode 100644 index dad57509..00000000 --- a/rest/api/v3/email_activity/model_message.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Activity API -* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Message struct for Message -type Message struct { - // The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account. - FromEmail *string `json:"from_email,omitempty"` - // A unique ID assigned to the message. This ID can be used to retrieve activity data for the specific message. - MsgId *string `json:"msg_id,omitempty"` - // The email's subject line. - Subject *string `json:"subject,omitempty"` - // The intended recipient's email address. - ToEmail *string `json:"to_email,omitempty"` - // The message's status. - Status *Status3 `json:"status,omitempty"` - // The ID associated with a Twilio SendGrid email template used to format the message. - TemplateId string `json:"template_id"` - // The unsubscribe group associated with this email. - AsmGroupId int32 `json:"asm_group_id"` - // Teammate's username - Teammate string `json:"teammate"` - // The ID of the API Key used to authenticate the sending request for the message. - ApiKeyId string `json:"api_key_id"` - // List of events related to email message - Events []Event `json:"events"` - // This is the IP of the user who sent the message. - OriginatingIp string `json:"originating_ip"` - // Categories users associated to the message - Categories []string `json:"categories"` - // JSON hash of key-value pairs associated with the message. - UniqueArgs string `json:"unique_args"` - // IP used to send to the remote Mail Transfer Agent. - OutboundIp string `json:"outbound_ip"` - // Whether or not the outbound IP is dedicated vs shared - OutboundIpType OutboundIpType `json:"outbound_ip_type"` -} diff --git a/rest/api/v3/email_activity/model_outbound_ip_type.go b/rest/api/v3/email_activity/model_outbound_ip_type.go deleted file mode 100644 index ae6cfae7..00000000 --- a/rest/api/v3/email_activity/model_outbound_ip_type.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Activity API -* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// OutboundIpType the model 'OutboundIpType' -type OutboundIpType string - -// List of OutboundIpType -const ( - OUTBOUNDIPTYPE_DEDICATED OutboundIpType = "dedicated" - OUTBOUNDIPTYPE_SHARED OutboundIpType = "shared" -) diff --git a/rest/api/v3/email_activity/model_outbound_ip_type1.go b/rest/api/v3/email_activity/model_outbound_ip_type1.go deleted file mode 100644 index ad734c10..00000000 --- a/rest/api/v3/email_activity/model_outbound_ip_type1.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Activity API -* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// OutboundIpType1 the model 'OutboundIpType1' -type OutboundIpType1 string - -// List of OutboundIpType1 -const ( - OUTBOUNDIPTYPE1_DEDICATED OutboundIpType1 = "dedicated" - OUTBOUNDIPTYPE1_SHARED OutboundIpType1 = "shared" -) diff --git a/rest/api/v3/email_activity/model_request_csv_202_response.go b/rest/api/v3/email_activity/model_request_csv_202_response.go deleted file mode 100644 index 567a4c3f..00000000 --- a/rest/api/v3/email_activity/model_request_csv_202_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Activity API -* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// RequestCsv202Response struct for RequestCsv202Response -type RequestCsv202Response struct { - Status *Status2 `json:"status,omitempty"` - Message *string `json:"message,omitempty"` -} diff --git a/rest/api/v3/email_activity/model_status.go b/rest/api/v3/email_activity/model_status.go deleted file mode 100644 index 5e003d33..00000000 --- a/rest/api/v3/email_activity/model_status.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Activity API -* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Status the model 'Status' -type Status string - -// List of Status -const ( - STATUS_PROCESSED Status = "processed" - STATUS_DELIVERED Status = "delivered" - STATUS_NOT_DELIVERED Status = "not_delivered" -) diff --git a/rest/api/v3/email_activity/model_status1.go b/rest/api/v3/email_activity/model_status1.go deleted file mode 100644 index 84650532..00000000 --- a/rest/api/v3/email_activity/model_status1.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Activity API -* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Status1 the model 'Status1' -type Status1 string - -// List of Status1 -const ( - STATUS1_PROCESSED Status1 = "processed" - STATUS1_NOT_DELIVERED Status1 = "not_delivered" - STATUS1_DELIVERED Status1 = "delivered" -) diff --git a/rest/api/v3/email_activity/model_status2.go b/rest/api/v3/email_activity/model_status2.go deleted file mode 100644 index f54b4277..00000000 --- a/rest/api/v3/email_activity/model_status2.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Activity API -* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Status2 the model 'Status2' -type Status2 string - -// List of Status2 -const ( - STATUS2_PENDING Status2 = "pending" -) diff --git a/rest/api/v3/email_activity/model_status3.go b/rest/api/v3/email_activity/model_status3.go deleted file mode 100644 index 0bbf51d8..00000000 --- a/rest/api/v3/email_activity/model_status3.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Activity API -* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Status3 the model 'Status3' -type Status3 string - -// List of Status3 -const ( - STATUS3_PROCESSED Status3 = "processed" - STATUS3_DELIVERED Status3 = "delivered" - STATUS3_NOT_DELIVERED Status3 = "not_delivered" -) diff --git a/rest/api/v3/email_validation/.openapi-generator b/rest/api/v3/email_validation/.openapi-generator deleted file mode 100644 index 58bf91fb..00000000 --- a/rest/api/v3/email_validation/.openapi-generator +++ /dev/null @@ -1,54 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_get_email_job_for_verification.go -api_get_validations_email_jobs.go -api_list_email_job_for_verification.go -api_service.go -api_validate_email.go -docs/ErrorResponse.md -docs/ErrorResponseErrorsInner.md -docs/FileType.md -docs/GetEmailJobForVerification.md -docs/GetValidationsEmailJobs.md -docs/GetValidationsEmailJobs200Response.md -docs/GetValidationsEmailJobs200ResponseResultInner.md -docs/GetValidationsEmailJobsJobId200Response.md -docs/GetValidationsEmailJobsJobId200ResponseResult.md -docs/GetValidationsEmailJobsJobId200ResponseResultErrorsInner.md -docs/ListEmailJobForVerification.md -docs/ListEmailJobForVerificationRequest.md -docs/PutValidationsEmailJobs200Response.md -docs/PutValidationsEmailJobs200ResponseUploadHeadersInner.md -docs/Status.md -docs/Status1.md -docs/ValidateEmail.md -docs/ValidateEmail200Response.md -docs/ValidateEmail200ResponseResult.md -docs/ValidateEmail200ResponseResultChecks.md -docs/ValidateEmail200ResponseResultChecksAdditional.md -docs/ValidateEmail200ResponseResultChecksDomain.md -docs/ValidateEmail200ResponseResultChecksLocalPart.md -docs/ValidateEmailRequest.md -docs/Verdict.md -model_error_response.go -model_error_response_errors_inner.go -model_file_type.go -model_get_validations_email_jobs200_response.go -model_get_validations_email_jobs200_response_result_inner.go -model_get_validations_email_jobs_job_id200_response.go -model_get_validations_email_jobs_job_id200_response_result.go -model_get_validations_email_jobs_job_id200_response_result_errors_inner.go -model_list_email_job_for_verification_request.go -model_put_validations_email_jobs200_response.go -model_put_validations_email_jobs200_response_upload_headers_inner.go -model_status.go -model_status1.go -model_validate_email_200_response.go -model_validate_email_200_response_result.go -model_validate_email_200_response_result_checks.go -model_validate_email_200_response_result_checks_additional.go -model_validate_email_200_response_result_checks_domain.go -model_validate_email_200_response_result_checks_local_part.go -model_validate_email_request.go -model_verdict.go diff --git a/rest/api/v3/email_validation/.openapi-generator-ignore b/rest/api/v3/email_validation/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/email_validation/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/email_validation/README.md b/rest/api/v3/email_validation/README.md deleted file mode 100644 index 987b30fc..00000000 --- a/rest/api/v3/email_validation/README.md +++ /dev/null @@ -1,94 +0,0 @@ -# Go API client for - -The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. - -Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. - -You can use this API to: -- Indicate to users that the address they have entered into a form is invalid. -- Drop invalid email addresses from your database. -- Suppress invalid email addresses from your sending to decrease your bounce rate. - -See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. - -You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:37.555281+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*GetEmailJobForVerification* | [**GetEmailJobForVerification**](docs/GetEmailJobForVerification.md#getemailjobforverification) | **Get** /v3/validations/email/jobs/{JobId} | This request returns a single Bulk Email Validation Job. -*GetValidationsEmailJobs* | [**GetValidationsEmailJobs**](docs/GetValidationsEmailJobs.md#getvalidationsemailjobs) | **Get** /v3/validations/email/jobs | This request lists all of a user's Bulk Email Validation Jobs. -*ListEmailJobForVerification* | [**ListEmailJobForVerification**](docs/ListEmailJobForVerification.md#listemailjobforverification) | **Put** /v3/validations/email/jobs | Request a presigned URL and headers for Bulk Email Address Validation list upload. -*ValidateEmail* | [**ValidateEmail**](docs/ValidateEmail.md#validateemail) | **Post** /v3/validations/email | Validate an email - - -## Documentation For Models - - - [ErrorResponse](ErrorResponse.md) - - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) - - [FileType](FileType.md) - - [GetValidationsEmailJobs200Response](GetValidationsEmailJobs200Response.md) - - [GetValidationsEmailJobs200ResponseResultInner](GetValidationsEmailJobs200ResponseResultInner.md) - - [GetValidationsEmailJobsJobId200Response](GetValidationsEmailJobsJobId200Response.md) - - [GetValidationsEmailJobsJobId200ResponseResult](GetValidationsEmailJobsJobId200ResponseResult.md) - - [GetValidationsEmailJobsJobId200ResponseResultErrorsInner](GetValidationsEmailJobsJobId200ResponseResultErrorsInner.md) - - [ListEmailJobForVerificationRequest](ListEmailJobForVerificationRequest.md) - - [PutValidationsEmailJobs200Response](PutValidationsEmailJobs200Response.md) - - [PutValidationsEmailJobs200ResponseUploadHeadersInner](PutValidationsEmailJobs200ResponseUploadHeadersInner.md) - - [Status](Status.md) - - [Status1](Status1.md) - - [ValidateEmail200Response](ValidateEmail200Response.md) - - [ValidateEmail200ResponseResult](ValidateEmail200ResponseResult.md) - - [ValidateEmail200ResponseResultChecks](ValidateEmail200ResponseResultChecks.md) - - [ValidateEmail200ResponseResultChecksAdditional](ValidateEmail200ResponseResultChecksAdditional.md) - - [ValidateEmail200ResponseResultChecksDomain](ValidateEmail200ResponseResultChecksDomain.md) - - [ValidateEmail200ResponseResultChecksLocalPart](ValidateEmail200ResponseResultChecksLocalPart.md) - - [ValidateEmailRequest](ValidateEmailRequest.md) - - [Verdict](Verdict.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/email_validation/api_get_email_job_for_verification.go b/rest/api/v3/email_validation/api_get_email_job_for_verification.go deleted file mode 100644 index 7bbbb4ed..00000000 --- a/rest/api/v3/email_validation/api_get_email_job_for_verification.go +++ /dev/null @@ -1,77 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Address Validation API -* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetEmailJobForVerificationParam struct { - // The ID of the Bulk Email Address Validation Job you wish to retrieve. - JobId *string `json:"job_id"` -} - -func (params *GetEmailJobForVerificationParam) SetJobId(JobId string) *GetEmailJobForVerificationParam { - params.JobId = &JobId - return params -} - -// **This endpoint returns a specific Bulk Email Validation Job. You can use this endpoint to check on the progress of a Job.** -func (c *ApiService) GetEmailJobForVerification(params *GetEmailJobForVerificationParam) (interface{}, error) { - path := "/v3/validations/email/jobs/{JobId}" - if params != nil && params.JobId != nil { - path = strings.Replace(path, "{"+"JobId"+"}", *params.JobId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &GetValidationsEmailJobsJobId200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/email_validation/api_get_validations_email_jobs.go b/rest/api/v3/email_validation/api_get_validations_email_jobs.go deleted file mode 100644 index c4f18da2..00000000 --- a/rest/api/v3/email_validation/api_get_validations_email_jobs.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Address Validation API -* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type GetValidationsEmailJobsParam struct { -} - -// **This endpoint returns a list of all of a user's Bulk Email Validation Jobs.** -func (c *ApiService) GetValidationsEmailJobs() (interface{}, error) { - path := "/v3/validations/email/jobs" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &GetValidationsEmailJobs200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/email_validation/api_list_email_job_for_verification.go b/rest/api/v3/email_validation/api_list_email_job_for_verification.go deleted file mode 100644 index cc8083ba..00000000 --- a/rest/api/v3/email_validation/api_list_email_job_for_verification.go +++ /dev/null @@ -1,81 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Address Validation API -* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListEmailJobForVerificationParam struct { - // - ListEmailJobForVerificationRequest *ListEmailJobForVerificationRequest `json:"ListEmailJobForVerificationRequest,omitempty"` -} - -func (params *ListEmailJobForVerificationParam) SetListEmailJobForVerificationRequest(ListEmailJobForVerificationRequest ListEmailJobForVerificationRequest) *ListEmailJobForVerificationParam { - params.ListEmailJobForVerificationRequest = &ListEmailJobForVerificationRequest - return params -} - -// **This endpoint returns a presigned URL and request headers. Use this information to upload a list of email addresses for verification.** Note that in a successful response the `content-type` header value matches the provided `file_type` parameter in the `PUT` request. Once you have an `upload_uri` and the `upload_headers`, you're ready to upload your email address list for verification. For the expected format of the email address list and a sample upload request, see the [Bulk Email Address Validation Overview page](https://www.twilio.com/docs/sendgrid/ui/managing-contacts/email-address-validation/bulk-email-address-validation-overview). -func (c *ApiService) ListEmailJobForVerification(params *ListEmailJobForVerificationParam) (interface{}, error) { - path := "/v3/validations/email/jobs" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.ListEmailJobForVerificationRequest != nil { - b, err := json.Marshal(*params.ListEmailJobForVerificationRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &PutValidationsEmailJobs200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/email_validation/api_service.go b/rest/api/v3/email_validation/api_service.go deleted file mode 100644 index 12f01b4a..00000000 --- a/rest/api/v3/email_validation/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Address Validation API -* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/email_validation/api_validate_email.go b/rest/api/v3/email_validation/api_validate_email.go deleted file mode 100644 index fe9804ce..00000000 --- a/rest/api/v3/email_validation/api_validate_email.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Address Validation API -* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ValidateEmailParam struct { - // - ValidateEmailRequest *ValidateEmailRequest `json:"ValidateEmailRequest,omitempty"` -} - -func (params *ValidateEmailParam) SetValidateEmailRequest(ValidateEmailRequest ValidateEmailRequest) *ValidateEmailParam { - params.ValidateEmailRequest = &ValidateEmailRequest - return params -} - -// **This endpoint allows you to validate an email address.** -func (c *ApiService) ValidateEmail(params *ValidateEmailParam) (interface{}, error) { - path := "/v3/validations/email" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.ValidateEmailRequest != nil { - b, err := json.Marshal(*params.ValidateEmailRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ValidateEmail200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/email_validation/docs/ErrorResponse.md b/rest/api/v3/email_validation/docs/ErrorResponse.md deleted file mode 100644 index 7e5e23ed..00000000 --- a/rest/api/v3/email_validation/docs/ErrorResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ErrorResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] -**Id** | **string** | ID representing the error. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_validation/docs/ErrorResponseErrorsInner.md b/rest/api/v3/email_validation/docs/ErrorResponseErrorsInner.md deleted file mode 100644 index f2c33b2a..00000000 --- a/rest/api/v3/email_validation/docs/ErrorResponseErrorsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ErrorResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | The message representing the error from the API. | -**Field** | **string** | The field associated with the error. |[optional] -**Help** | **map[string]interface{}** | Helper text or docs for troubleshooting. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_validation/docs/FileType.md b/rest/api/v3/email_validation/docs/FileType.md deleted file mode 100644 index 0108ebdf..00000000 --- a/rest/api/v3/email_validation/docs/FileType.md +++ /dev/null @@ -1,13 +0,0 @@ -# FileType - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**CSV** | string | (value: `"csv"`) -**ZIP** | string | (value: `"zip"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_validation/docs/GetEmailJobForVerification.md b/rest/api/v3/email_validation/docs/GetEmailJobForVerification.md deleted file mode 100644 index 0184c450..00000000 --- a/rest/api/v3/email_validation/docs/GetEmailJobForVerification.md +++ /dev/null @@ -1,51 +0,0 @@ -# GetEmailJobForVerification - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetEmailJobForVerification**](GetEmailJobForVerification.md#GetEmailJobForVerification) | **Get** /v3/validations/email/jobs/{JobId} | This request returns a single Bulk Email Validation Job. - - - -## GetEmailJobForVerification - -> GetValidationsEmailJobsJobId200Response GetEmailJobForVerification(ctx, JobId) - -This request returns a single Bulk Email Validation Job. - -**This endpoint returns a specific Bulk Email Validation Job. You can use this endpoint to check on the progress of a Job.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**JobId** | **string** | The ID of the Bulk Email Address Validation Job you wish to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a GetEmailJobForVerificationParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**GetValidationsEmailJobsJobId200Response**](GetValidationsEmailJobsJobId200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/email_validation/docs/GetValidationsEmailJobs.md b/rest/api/v3/email_validation/docs/GetValidationsEmailJobs.md deleted file mode 100644 index 65bc01db..00000000 --- a/rest/api/v3/email_validation/docs/GetValidationsEmailJobs.md +++ /dev/null @@ -1,44 +0,0 @@ -# GetValidationsEmailJobs - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetValidationsEmailJobs**](GetValidationsEmailJobs.md#GetValidationsEmailJobs) | **Get** /v3/validations/email/jobs | This request lists all of a user's Bulk Email Validation Jobs. - - - -## GetValidationsEmailJobs - -> GetValidationsEmailJobs200Response GetValidationsEmailJobs(ctx, ) - -This request lists all of a user's Bulk Email Validation Jobs. - -**This endpoint returns a list of all of a user's Bulk Email Validation Jobs.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a GetValidationsEmailJobsParams struct - - -### Return type - -[**GetValidationsEmailJobs200Response**](GetValidationsEmailJobs200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/email_validation/docs/GetValidationsEmailJobs200Response.md b/rest/api/v3/email_validation/docs/GetValidationsEmailJobs200Response.md deleted file mode 100644 index 6005e09e..00000000 --- a/rest/api/v3/email_validation/docs/GetValidationsEmailJobs200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetValidationsEmailJobs200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]GetValidationsEmailJobs200ResponseResultInner**](GetValidationsEmailJobs200ResponseResultInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_validation/docs/GetValidationsEmailJobs200ResponseResultInner.md b/rest/api/v3/email_validation/docs/GetValidationsEmailJobs200ResponseResultInner.md deleted file mode 100644 index 9f39fef1..00000000 --- a/rest/api/v3/email_validation/docs/GetValidationsEmailJobs200ResponseResultInner.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetValidationsEmailJobs200ResponseResultInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | The unique ID of the Bulk Email Address Validation Job. |[optional] -**Status** | [**Status**](Status.md) | The status of the Bulk Email Address Validation Job. |[optional] -**StartedAt** | **float32** | The ISO8601 timestamp when the Job was created. This is the time at which the upload request was sent to the `upload_uri`. |[optional] -**FinishedAt** | **float32** | The ISO8601 timestamp when the Job was finished. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200Response.md b/rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200Response.md deleted file mode 100644 index 62a5383d..00000000 --- a/rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetValidationsEmailJobsJobId200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**GetValidationsEmailJobsJobId200ResponseResult**](GetValidationsEmailJobsJobId200ResponseResult.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200ResponseResult.md b/rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200ResponseResult.md deleted file mode 100644 index d9c9395f..00000000 --- a/rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200ResponseResult.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetValidationsEmailJobsJobId200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | The unique ID of the Bulk Email Address Validation Job. |[optional] -**Status** | [**Status1**](Status1.md) | The status of the Bulk Email Address Validation Job. |[optional] -**Segments** | **float32** | The total number of segments in the Bulk Email Address Validation Job. There are 1,500 email addresses per segment. The value is `0` until the Job `status` is `Processing`. |[optional] -**SegmentsProcessed** | **float32** | The number of segments processed at the time of the request. 100 segments process in parallel at a time. |[optional] -**IsDownloadAvailable** | **bool** | Boolean indicating whether the results CSV file is available for download. |[optional] -**StartedAt** | **float32** | The ISO8601 timestamp when the Job was created. This is the time at which the upload request was sent to the `upload_uri`. |[optional] -**FinishedAt** | **float32** | The ISO8601 timestamp when the Job was finished. |[optional] -**Errors** | [**[]GetValidationsEmailJobsJobId200ResponseResultErrorsInner**](GetValidationsEmailJobsJobId200ResponseResultErrorsInner.md) | Array containing error messages related to the Bulk Email Address Validation Job. Array is empty if no errors ocurred. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200ResponseResultErrorsInner.md b/rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200ResponseResultErrorsInner.md deleted file mode 100644 index 0d5492ae..00000000 --- a/rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200ResponseResultErrorsInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetValidationsEmailJobsJobId200ResponseResultErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | Description of the error encountered during execution of the Bulk Email Address Validation Job. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_validation/docs/ListEmailJobForVerification.md b/rest/api/v3/email_validation/docs/ListEmailJobForVerification.md deleted file mode 100644 index 6cd0053d..00000000 --- a/rest/api/v3/email_validation/docs/ListEmailJobForVerification.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListEmailJobForVerification - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListEmailJobForVerification**](ListEmailJobForVerification.md#ListEmailJobForVerification) | **Put** /v3/validations/email/jobs | Request a presigned URL and headers for Bulk Email Address Validation list upload. - - - -## ListEmailJobForVerification - -> PutValidationsEmailJobs200Response ListEmailJobForVerification(ctx, optional) - -Request a presigned URL and headers for Bulk Email Address Validation list upload. - -**This endpoint returns a presigned URL and request headers. Use this information to upload a list of email addresses for verification.** Note that in a successful response the `content-type` header value matches the provided `file_type` parameter in the `PUT` request. Once you have an `upload_uri` and the `upload_headers`, you're ready to upload your email address list for verification. For the expected format of the email address list and a sample upload request, see the [Bulk Email Address Validation Overview page](https://www.twilio.com/docs/sendgrid/ui/managing-contacts/email-address-validation/bulk-email-address-validation-overview). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListEmailJobForVerificationParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**ListEmailJobForVerificationRequest** | [**ListEmailJobForVerificationRequest**](ListEmailJobForVerificationRequest.md) | - -### Return type - -[**PutValidationsEmailJobs200Response**](PutValidationsEmailJobs200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/email_validation/docs/ListEmailJobForVerificationRequest.md b/rest/api/v3/email_validation/docs/ListEmailJobForVerificationRequest.md deleted file mode 100644 index a3d4fb06..00000000 --- a/rest/api/v3/email_validation/docs/ListEmailJobForVerificationRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListEmailJobForVerificationRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FileType** | [**FileType**](FileType.md) | The format of the file you wish to upload. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_validation/docs/PutValidationsEmailJobs200Response.md b/rest/api/v3/email_validation/docs/PutValidationsEmailJobs200Response.md deleted file mode 100644 index 7caf2bcc..00000000 --- a/rest/api/v3/email_validation/docs/PutValidationsEmailJobs200Response.md +++ /dev/null @@ -1,13 +0,0 @@ -# PutValidationsEmailJobs200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**JobId** | **string** | The unique ID of the Bulk Email Address Validation Job. |[optional] -**UploadUri** | **string** | The URI to use for the request to upload your list of email addresses. |[optional] -**UploadHeaders** | [**[]PutValidationsEmailJobs200ResponseUploadHeadersInner**](PutValidationsEmailJobs200ResponseUploadHeadersInner.md) | Array containing headers and header values. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_validation/docs/PutValidationsEmailJobs200ResponseUploadHeadersInner.md b/rest/api/v3/email_validation/docs/PutValidationsEmailJobs200ResponseUploadHeadersInner.md deleted file mode 100644 index 96781e62..00000000 --- a/rest/api/v3/email_validation/docs/PutValidationsEmailJobs200ResponseUploadHeadersInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# PutValidationsEmailJobs200ResponseUploadHeadersInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Header** | **string** | The name of the header that must be included in the upload request. |[optional] -**Value** | **string** | The value of the header that must be included in the upload request. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_validation/docs/Status.md b/rest/api/v3/email_validation/docs/Status.md deleted file mode 100644 index 3915e79c..00000000 --- a/rest/api/v3/email_validation/docs/Status.md +++ /dev/null @@ -1,17 +0,0 @@ -# Status - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**INITIATED** | string | (value: `"Initiated"`) -**QUEUED** | string | (value: `"Queued"`) -**READY** | string | (value: `"Ready"`) -**PROCESSING** | string | (value: `"Processing"`) -**DONE** | string | (value: `"Done"`) -**ERROR** | string | (value: `"Error"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_validation/docs/Status1.md b/rest/api/v3/email_validation/docs/Status1.md deleted file mode 100644 index a6d983e9..00000000 --- a/rest/api/v3/email_validation/docs/Status1.md +++ /dev/null @@ -1,17 +0,0 @@ -# Status1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**INITIATED** | string | (value: `"Initiated"`) -**QUEUED** | string | (value: `"Queued"`) -**READY** | string | (value: `"Ready"`) -**PROCESSING** | string | (value: `"Processing"`) -**DONE** | string | (value: `"Done"`) -**ERROR** | string | (value: `"Error"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_validation/docs/ValidateEmail.md b/rest/api/v3/email_validation/docs/ValidateEmail.md deleted file mode 100644 index 6d217df2..00000000 --- a/rest/api/v3/email_validation/docs/ValidateEmail.md +++ /dev/null @@ -1,48 +0,0 @@ -# ValidateEmail - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ValidateEmail**](ValidateEmail.md#ValidateEmail) | **Post** /v3/validations/email | Validate an email - - - -## ValidateEmail - -> ValidateEmail200Response ValidateEmail(ctx, optional) - -Validate an email - -**This endpoint allows you to validate an email address.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ValidateEmailParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**ValidateEmailRequest** | [**ValidateEmailRequest**](ValidateEmailRequest.md) | - -### Return type - -[**ValidateEmail200Response**](ValidateEmail200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/email_validation/docs/ValidateEmail200Response.md b/rest/api/v3/email_validation/docs/ValidateEmail200Response.md deleted file mode 100644 index 1fe2612e..00000000 --- a/rest/api/v3/email_validation/docs/ValidateEmail200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValidateEmail200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**ValidateEmail200ResponseResult**](ValidateEmail200ResponseResult.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResult.md b/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResult.md deleted file mode 100644 index 1de44347..00000000 --- a/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResult.md +++ /dev/null @@ -1,19 +0,0 @@ -# ValidateEmail200ResponseResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | **string** | The email being validated | -**Verdict** | [**Verdict**](Verdict.md) | A generic classification of whether or not the email address is valid. | -**Score** | **float32** | A numeric representation of the email validity. | -**Local** | **string** | The local part of the email address. | -**Host** | **string** | The domain of the email address. | -**Suggestion** | **string** | A suggested correction in the event of domain name typos (e.g., gmial.com) |[optional] -**Checks** | [**ValidateEmail200ResponseResultChecks**](ValidateEmail200ResponseResultChecks.md) | | -**Source** | **string** | The source of the validation, as per the API request. |[optional] -**IpAddress** | **string** | The IP address associated with this email. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecks.md b/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecks.md deleted file mode 100644 index d664bcf0..00000000 --- a/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecks.md +++ /dev/null @@ -1,13 +0,0 @@ -# ValidateEmail200ResponseResultChecks - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Domain** | [**ValidateEmail200ResponseResultChecksDomain**](ValidateEmail200ResponseResultChecksDomain.md) | | -**LocalPart** | [**ValidateEmail200ResponseResultChecksLocalPart**](ValidateEmail200ResponseResultChecksLocalPart.md) | | -**Additional** | [**ValidateEmail200ResponseResultChecksAdditional**](ValidateEmail200ResponseResultChecksAdditional.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksAdditional.md b/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksAdditional.md deleted file mode 100644 index ff503099..00000000 --- a/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksAdditional.md +++ /dev/null @@ -1,12 +0,0 @@ -# ValidateEmail200ResponseResultChecksAdditional - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**HasKnownBounces** | **bool** | Whether email sent to this address from your account has bounced. | -**HasSuspectedBounces** | **bool** | Whether our model predicts that the email address might bounce. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksDomain.md b/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksDomain.md deleted file mode 100644 index 3d2d75b3..00000000 --- a/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksDomain.md +++ /dev/null @@ -1,13 +0,0 @@ -# ValidateEmail200ResponseResultChecksDomain - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**HasValidAddressSyntax** | **bool** | Whether the email address syntax is valid. | -**HasMxOrARecord** | **bool** | Whether the email has appropriate DNS records to deliver a message. | -**IsSuspectedDisposableAddress** | **bool** | Whether the domain appears to be from a disposable email address service. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksLocalPart.md b/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksLocalPart.md deleted file mode 100644 index 7219d6de..00000000 --- a/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksLocalPart.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValidateEmail200ResponseResultChecksLocalPart - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**IsSuspectedRoleAddress** | **bool** | Whether the local part of email appears to be a role or group (e.g., hr, admin) | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_validation/docs/ValidateEmailRequest.md b/rest/api/v3/email_validation/docs/ValidateEmailRequest.md deleted file mode 100644 index 404db498..00000000 --- a/rest/api/v3/email_validation/docs/ValidateEmailRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# ValidateEmailRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | **string** | The email address that you want to validate. | -**Source** | **string** | A one-word classifier for where this validation originated. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_validation/docs/Verdict.md b/rest/api/v3/email_validation/docs/Verdict.md deleted file mode 100644 index 5f6dae14..00000000 --- a/rest/api/v3/email_validation/docs/Verdict.md +++ /dev/null @@ -1,14 +0,0 @@ -# Verdict - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**VALID** | string | (value: `"Valid"`) -**RISKY** | string | (value: `"Risky"`) -**INVALID** | string | (value: `"Invalid"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/email_validation/model_error_response.go b/rest/api/v3/email_validation/model_error_response.go deleted file mode 100644 index 0471f1b6..00000000 --- a/rest/api/v3/email_validation/model_error_response.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Address Validation API -* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponse struct for ErrorResponse -type ErrorResponse struct { - Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` - // ID representing the error. - Id *string `json:"id,omitempty"` -} diff --git a/rest/api/v3/email_validation/model_error_response_errors_inner.go b/rest/api/v3/email_validation/model_error_response_errors_inner.go deleted file mode 100644 index 363c1a49..00000000 --- a/rest/api/v3/email_validation/model_error_response_errors_inner.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Address Validation API -* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner -type ErrorResponseErrorsInner struct { - // The message representing the error from the API. - Message string `json:"message"` - // The field associated with the error. - Field *string `json:"field,omitempty"` - // Helper text or docs for troubleshooting. - Help *map[string]interface{} `json:"help,omitempty"` -} diff --git a/rest/api/v3/email_validation/model_file_type.go b/rest/api/v3/email_validation/model_file_type.go deleted file mode 100644 index 9326cdd5..00000000 --- a/rest/api/v3/email_validation/model_file_type.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Address Validation API -* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// FileType the model 'FileType' -type FileType string - -// List of FileType -const ( - FILETYPE_CSV FileType = "csv" - FILETYPE_ZIP FileType = "zip" -) diff --git a/rest/api/v3/email_validation/model_get_validations_email_jobs200_response.go b/rest/api/v3/email_validation/model_get_validations_email_jobs200_response.go deleted file mode 100644 index 435a4a34..00000000 --- a/rest/api/v3/email_validation/model_get_validations_email_jobs200_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Address Validation API -* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetValidationsEmailJobs200Response struct for GetValidationsEmailJobs200Response -type GetValidationsEmailJobs200Response struct { - // - Result *[]GetValidationsEmailJobs200ResponseResultInner `json:"result,omitempty"` -} diff --git a/rest/api/v3/email_validation/model_get_validations_email_jobs200_response_result_inner.go b/rest/api/v3/email_validation/model_get_validations_email_jobs200_response_result_inner.go deleted file mode 100644 index 8e1859d9..00000000 --- a/rest/api/v3/email_validation/model_get_validations_email_jobs200_response_result_inner.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Address Validation API -* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetValidationsEmailJobs200ResponseResultInner struct for GetValidationsEmailJobs200ResponseResultInner -type GetValidationsEmailJobs200ResponseResultInner struct { - // The unique ID of the Bulk Email Address Validation Job. - Id *string `json:"id,omitempty"` - // The status of the Bulk Email Address Validation Job. - Status *Status `json:"status,omitempty"` - // The ISO8601 timestamp when the Job was created. This is the time at which the upload request was sent to the `upload_uri`. - StartedAt *float32 `json:"started_at,omitempty"` - // The ISO8601 timestamp when the Job was finished. - FinishedAt *float32 `json:"finished_at,omitempty"` -} diff --git a/rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response.go b/rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response.go deleted file mode 100644 index d7625423..00000000 --- a/rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Address Validation API -* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetValidationsEmailJobsJobId200Response struct for GetValidationsEmailJobsJobId200Response -type GetValidationsEmailJobsJobId200Response struct { - Result *GetValidationsEmailJobsJobId200ResponseResult `json:"result,omitempty"` -} diff --git a/rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response_result.go b/rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response_result.go deleted file mode 100644 index 0f6d9761..00000000 --- a/rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response_result.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Address Validation API -* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetValidationsEmailJobsJobId200ResponseResult -type GetValidationsEmailJobsJobId200ResponseResult struct { - // The unique ID of the Bulk Email Address Validation Job. - Id *string `json:"id,omitempty"` - // The status of the Bulk Email Address Validation Job. - Status *Status1 `json:"status,omitempty"` - // The total number of segments in the Bulk Email Address Validation Job. There are 1,500 email addresses per segment. The value is `0` until the Job `status` is `Processing`. - Segments *float32 `json:"segments,omitempty"` - // The number of segments processed at the time of the request. 100 segments process in parallel at a time. - SegmentsProcessed *float32 `json:"segments_processed,omitempty"` - // Boolean indicating whether the results CSV file is available for download. - IsDownloadAvailable *bool `json:"is_download_available,omitempty"` - // The ISO8601 timestamp when the Job was created. This is the time at which the upload request was sent to the `upload_uri`. - StartedAt *float32 `json:"started_at,omitempty"` - // The ISO8601 timestamp when the Job was finished. - FinishedAt *float32 `json:"finished_at,omitempty"` - // Array containing error messages related to the Bulk Email Address Validation Job. Array is empty if no errors ocurred. - Errors *[]GetValidationsEmailJobsJobId200ResponseResultErrorsInner `json:"errors,omitempty"` -} diff --git a/rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response_result_errors_inner.go b/rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response_result_errors_inner.go deleted file mode 100644 index db8ee837..00000000 --- a/rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response_result_errors_inner.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Address Validation API -* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetValidationsEmailJobsJobId200ResponseResultErrorsInner struct for GetValidationsEmailJobsJobId200ResponseResultErrorsInner -type GetValidationsEmailJobsJobId200ResponseResultErrorsInner struct { - // Description of the error encountered during execution of the Bulk Email Address Validation Job. - Message *string `json:"message,omitempty"` -} diff --git a/rest/api/v3/email_validation/model_list_email_job_for_verification_request.go b/rest/api/v3/email_validation/model_list_email_job_for_verification_request.go deleted file mode 100644 index 6ec08c9a..00000000 --- a/rest/api/v3/email_validation/model_list_email_job_for_verification_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Address Validation API -* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListEmailJobForVerificationRequest struct for ListEmailJobForVerificationRequest -type ListEmailJobForVerificationRequest struct { - // The format of the file you wish to upload. - FileType FileType `json:"file_type"` -} diff --git a/rest/api/v3/email_validation/model_put_validations_email_jobs200_response.go b/rest/api/v3/email_validation/model_put_validations_email_jobs200_response.go deleted file mode 100644 index 3c8bfba2..00000000 --- a/rest/api/v3/email_validation/model_put_validations_email_jobs200_response.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Address Validation API -* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// PutValidationsEmailJobs200Response struct for PutValidationsEmailJobs200Response -type PutValidationsEmailJobs200Response struct { - // The unique ID of the Bulk Email Address Validation Job. - JobId *string `json:"job_id,omitempty"` - // The URI to use for the request to upload your list of email addresses. - UploadUri *string `json:"upload_uri,omitempty"` - // Array containing headers and header values. - UploadHeaders *[]PutValidationsEmailJobs200ResponseUploadHeadersInner `json:"upload_headers,omitempty"` -} diff --git a/rest/api/v3/email_validation/model_put_validations_email_jobs200_response_upload_headers_inner.go b/rest/api/v3/email_validation/model_put_validations_email_jobs200_response_upload_headers_inner.go deleted file mode 100644 index 5763532e..00000000 --- a/rest/api/v3/email_validation/model_put_validations_email_jobs200_response_upload_headers_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Address Validation API -* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// PutValidationsEmailJobs200ResponseUploadHeadersInner struct for PutValidationsEmailJobs200ResponseUploadHeadersInner -type PutValidationsEmailJobs200ResponseUploadHeadersInner struct { - // The name of the header that must be included in the upload request. - Header *string `json:"header,omitempty"` - // The value of the header that must be included in the upload request. - Value *string `json:"value,omitempty"` -} diff --git a/rest/api/v3/email_validation/model_status.go b/rest/api/v3/email_validation/model_status.go deleted file mode 100644 index c92c4771..00000000 --- a/rest/api/v3/email_validation/model_status.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Address Validation API -* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Status the model 'Status' -type Status string - -// List of Status -const ( - STATUS_INITIATED Status = "Initiated" - STATUS_QUEUED Status = "Queued" - STATUS_READY Status = "Ready" - STATUS_PROCESSING Status = "Processing" - STATUS_DONE Status = "Done" - STATUS_ERROR Status = "Error" -) diff --git a/rest/api/v3/email_validation/model_status1.go b/rest/api/v3/email_validation/model_status1.go deleted file mode 100644 index eb3f76b1..00000000 --- a/rest/api/v3/email_validation/model_status1.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Address Validation API -* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Status1 the model 'Status1' -type Status1 string - -// List of Status1 -const ( - STATUS1_INITIATED Status1 = "Initiated" - STATUS1_QUEUED Status1 = "Queued" - STATUS1_READY Status1 = "Ready" - STATUS1_PROCESSING Status1 = "Processing" - STATUS1_DONE Status1 = "Done" - STATUS1_ERROR Status1 = "Error" -) diff --git a/rest/api/v3/email_validation/model_validate_email_200_response.go b/rest/api/v3/email_validation/model_validate_email_200_response.go deleted file mode 100644 index bd91dd02..00000000 --- a/rest/api/v3/email_validation/model_validate_email_200_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Address Validation API -* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ValidateEmail200Response struct for ValidateEmail200Response -type ValidateEmail200Response struct { - Result ValidateEmail200ResponseResult `json:"result"` -} diff --git a/rest/api/v3/email_validation/model_validate_email_200_response_result.go b/rest/api/v3/email_validation/model_validate_email_200_response_result.go deleted file mode 100644 index 44356b58..00000000 --- a/rest/api/v3/email_validation/model_validate_email_200_response_result.go +++ /dev/null @@ -1,35 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Address Validation API -* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ValidateEmail200ResponseResult struct for ValidateEmail200ResponseResult -type ValidateEmail200ResponseResult struct { - // The email being validated - Email string `json:"email"` - // A generic classification of whether or not the email address is valid. - Verdict Verdict `json:"verdict"` - // A numeric representation of the email validity. - Score float32 `json:"score"` - // The local part of the email address. - Local string `json:"local"` - // The domain of the email address. - Host string `json:"host"` - // A suggested correction in the event of domain name typos (e.g., gmial.com) - Suggestion *string `json:"suggestion,omitempty"` - Checks ValidateEmail200ResponseResultChecks `json:"checks"` - // The source of the validation, as per the API request. - Source *string `json:"source,omitempty"` - // The IP address associated with this email. - IpAddress string `json:"ip_address"` -} diff --git a/rest/api/v3/email_validation/model_validate_email_200_response_result_checks.go b/rest/api/v3/email_validation/model_validate_email_200_response_result_checks.go deleted file mode 100644 index 5238ab2c..00000000 --- a/rest/api/v3/email_validation/model_validate_email_200_response_result_checks.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Address Validation API -* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ValidateEmail200ResponseResultChecks Granular checks for email address validity. -type ValidateEmail200ResponseResultChecks struct { - Domain ValidateEmail200ResponseResultChecksDomain `json:"domain"` - LocalPart ValidateEmail200ResponseResultChecksLocalPart `json:"local_part"` - Additional ValidateEmail200ResponseResultChecksAdditional `json:"additional"` -} diff --git a/rest/api/v3/email_validation/model_validate_email_200_response_result_checks_additional.go b/rest/api/v3/email_validation/model_validate_email_200_response_result_checks_additional.go deleted file mode 100644 index a805b2f6..00000000 --- a/rest/api/v3/email_validation/model_validate_email_200_response_result_checks_additional.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Address Validation API -* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ValidateEmail200ResponseResultChecksAdditional Additional checks on the email address. -type ValidateEmail200ResponseResultChecksAdditional struct { - // Whether email sent to this address from your account has bounced. - HasKnownBounces bool `json:"has_known_bounces"` - // Whether our model predicts that the email address might bounce. - HasSuspectedBounces bool `json:"has_suspected_bounces"` -} diff --git a/rest/api/v3/email_validation/model_validate_email_200_response_result_checks_domain.go b/rest/api/v3/email_validation/model_validate_email_200_response_result_checks_domain.go deleted file mode 100644 index 2effd822..00000000 --- a/rest/api/v3/email_validation/model_validate_email_200_response_result_checks_domain.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Address Validation API -* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ValidateEmail200ResponseResultChecksDomain Checks on the domain portion of the email address. -type ValidateEmail200ResponseResultChecksDomain struct { - // Whether the email address syntax is valid. - HasValidAddressSyntax bool `json:"has_valid_address_syntax"` - // Whether the email has appropriate DNS records to deliver a message. - HasMxOrARecord bool `json:"has_mx_or_a_record"` - // Whether the domain appears to be from a disposable email address service. - IsSuspectedDisposableAddress bool `json:"is_suspected_disposable_address"` -} diff --git a/rest/api/v3/email_validation/model_validate_email_200_response_result_checks_local_part.go b/rest/api/v3/email_validation/model_validate_email_200_response_result_checks_local_part.go deleted file mode 100644 index 2290db2a..00000000 --- a/rest/api/v3/email_validation/model_validate_email_200_response_result_checks_local_part.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Address Validation API -* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ValidateEmail200ResponseResultChecksLocalPart Checks on the local part of the email address. -type ValidateEmail200ResponseResultChecksLocalPart struct { - // Whether the local part of email appears to be a role or group (e.g., hr, admin) - IsSuspectedRoleAddress bool `json:"is_suspected_role_address"` -} diff --git a/rest/api/v3/email_validation/model_validate_email_request.go b/rest/api/v3/email_validation/model_validate_email_request.go deleted file mode 100644 index f8f03693..00000000 --- a/rest/api/v3/email_validation/model_validate_email_request.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Address Validation API -* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ValidateEmailRequest struct for ValidateEmailRequest -type ValidateEmailRequest struct { - // The email address that you want to validate. - Email string `json:"email"` - // A one-word classifier for where this validation originated. - Source *string `json:"source,omitempty"` -} diff --git a/rest/api/v3/email_validation/model_verdict.go b/rest/api/v3/email_validation/model_verdict.go deleted file mode 100644 index d7fdf767..00000000 --- a/rest/api/v3/email_validation/model_verdict.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Email Address Validation API -* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Verdict the model 'Verdict' -type Verdict string - -// List of Verdict -const ( - VERDICT_VALID Verdict = "Valid" - VERDICT_RISKY Verdict = "Risky" - VERDICT_INVALID Verdict = "Invalid" -) diff --git a/rest/api/v3/enforced_tls/.openapi-generator b/rest/api/v3/enforced_tls/.openapi-generator deleted file mode 100644 index 39211a73..00000000 --- a/rest/api/v3/enforced_tls/.openapi-generator +++ /dev/null @@ -1,16 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_list_enforced_tls_setting.go -api_service.go -api_update_enforced_tls_setting.go -docs/EnforcedTlsRequestResponse.md -docs/ErrorResponse.md -docs/ErrorResponseErrorsInner.md -docs/ListEnforcedTlsSetting.md -docs/UpdateEnforcedTlsSetting.md -docs/Version.md -model_enforced_tls_request_response.go -model_error_response.go -model_error_response_errors_inner.go -model_version.go diff --git a/rest/api/v3/enforced_tls/.openapi-generator-ignore b/rest/api/v3/enforced_tls/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/enforced_tls/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/enforced_tls/README.md b/rest/api/v3/enforced_tls/README.md deleted file mode 100644 index 1af7b22c..00000000 --- a/rest/api/v3/enforced_tls/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# Go API client for - -The Twilio SendGrid Enforced TLS API allows you to specify whether or not the recipient of your mail send is required to support TLS or have a valid certificate. - -Twilio SendGrid sends all emails with [Opportunistic TLS](https://sendgrid.com/blog/myth-opportunistic-tls-email-privacy/) by default, meaning email is sent with TLS, and if the recipient's inbox provider does not accept the TLS encryption, we then send the message unencrypted. - -You can optionally choose to enforce TLS encryption, meaning that if the recipient's inbox provider does not accept the TLS encryption, Twilio SendGrid drops the message and sends a block event with the message, “TLS required but not supported” as the description. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:37.544012+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*ListEnforcedTlsSetting* | [**ListEnforcedTlsSetting**](docs/ListEnforcedTlsSetting.md#listenforcedtlssetting) | **Get** /v3/user/settings/enforced_tls | Retrieve current Enforced TLS settings. -*UpdateEnforcedTlsSetting* | [**UpdateEnforcedTlsSetting**](docs/UpdateEnforcedTlsSetting.md#updateenforcedtlssetting) | **Patch** /v3/user/settings/enforced_tls | Update Enforced TLS settings - - -## Documentation For Models - - - [EnforcedTlsRequestResponse](EnforcedTlsRequestResponse.md) - - [ErrorResponse](ErrorResponse.md) - - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) - - [Version](Version.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/enforced_tls/api_list_enforced_tls_setting.go b/rest/api/v3/enforced_tls/api_list_enforced_tls_setting.go deleted file mode 100644 index 9f2bb1ab..00000000 --- a/rest/api/v3/enforced_tls/api_list_enforced_tls_setting.go +++ /dev/null @@ -1,83 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Enforced TLS API -* The Twilio SendGrid Enforced TLS API allows you to specify whether or not the recipient of your mail send is required to support TLS or have a valid certificate. Twilio SendGrid sends all emails with [Opportunistic TLS](https://sendgrid.com/blog/myth-opportunistic-tls-email-privacy/) by default, meaning email is sent with TLS, and if the recipient's inbox provider does not accept the TLS encryption, we then send the message unencrypted. You can optionally choose to enforce TLS encryption, meaning that if the recipient's inbox provider does not accept the TLS encryption, Twilio SendGrid drops the message and sends a block event with the message, “TLS required but not supported” as the description. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListEnforcedTlsSettingParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListEnforcedTlsSettingParam) SetOnbehalfof(Onbehalfof string) *ListEnforcedTlsSettingParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve your current Enforced TLS settings.** The Enforced TLS settings specify whether or not the recipient is required to support TLS or have a valid certificate. If either `require_tls` or `require_valid_cert` is set to `true`, the recipient must support TLS 1.1 or higher or have a valid certificate. If these conditions are not met, Twilio SendGrid will drop the message and send a block event with “TLS required but not supported” as the description. -func (c *ApiService) ListEnforcedTlsSetting(params *ListEnforcedTlsSettingParam) (interface{}, error) { - path := "/v3/user/settings/enforced_tls" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &EnforcedTlsRequestResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/enforced_tls/api_service.go b/rest/api/v3/enforced_tls/api_service.go deleted file mode 100644 index b52f212f..00000000 --- a/rest/api/v3/enforced_tls/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Enforced TLS API -* The Twilio SendGrid Enforced TLS API allows you to specify whether or not the recipient of your mail send is required to support TLS or have a valid certificate. Twilio SendGrid sends all emails with [Opportunistic TLS](https://sendgrid.com/blog/myth-opportunistic-tls-email-privacy/) by default, meaning email is sent with TLS, and if the recipient's inbox provider does not accept the TLS encryption, we then send the message unencrypted. You can optionally choose to enforce TLS encryption, meaning that if the recipient's inbox provider does not accept the TLS encryption, Twilio SendGrid drops the message and sends a block event with the message, “TLS required but not supported” as the description. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/enforced_tls/api_update_enforced_tls_setting.go b/rest/api/v3/enforced_tls/api_update_enforced_tls_setting.go deleted file mode 100644 index aa1a2ad6..00000000 --- a/rest/api/v3/enforced_tls/api_update_enforced_tls_setting.go +++ /dev/null @@ -1,98 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Enforced TLS API -* The Twilio SendGrid Enforced TLS API allows you to specify whether or not the recipient of your mail send is required to support TLS or have a valid certificate. Twilio SendGrid sends all emails with [Opportunistic TLS](https://sendgrid.com/blog/myth-opportunistic-tls-email-privacy/) by default, meaning email is sent with TLS, and if the recipient's inbox provider does not accept the TLS encryption, we then send the message unencrypted. You can optionally choose to enforce TLS encryption, meaning that if the recipient's inbox provider does not accept the TLS encryption, Twilio SendGrid drops the message and sends a block event with the message, “TLS required but not supported” as the description. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type UpdateEnforcedTlsSettingParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - EnforcedTlsRequestResponse *EnforcedTlsRequestResponse `json:"EnforcedTlsRequestResponse,omitempty"` -} - -func (params *UpdateEnforcedTlsSettingParam) SetOnbehalfof(Onbehalfof string) *UpdateEnforcedTlsSettingParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateEnforcedTlsSettingParam) SetEnforcedTlsRequestResponse(EnforcedTlsRequestResponse EnforcedTlsRequestResponse) *UpdateEnforcedTlsSettingParam { - params.EnforcedTlsRequestResponse = &EnforcedTlsRequestResponse - return params -} - -// **This endpoint allows you to update your Enforced TLS settings.** To require TLS from recipients, set `require_tls` to `true`. If either `require_tls` or `require_valid_cert` is set to `true`, the recipient must support TLS 1.1 or higher or have a valid certificate. If these conditions are not met, Twilio SendGrid will drop the message and send a block event with “TLS required but not supported” as the description. -func (c *ApiService) UpdateEnforcedTlsSetting(params *UpdateEnforcedTlsSettingParam) (interface{}, error) { - path := "/v3/user/settings/enforced_tls" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.EnforcedTlsRequestResponse != nil { - b, err := json.Marshal(*params.EnforcedTlsRequestResponse) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &EnforcedTlsRequestResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/enforced_tls/docs/EnforcedTlsRequestResponse.md b/rest/api/v3/enforced_tls/docs/EnforcedTlsRequestResponse.md deleted file mode 100644 index afa34268..00000000 --- a/rest/api/v3/enforced_tls/docs/EnforcedTlsRequestResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# EnforcedTlsRequestResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**RequireTls** | **bool** | Indicates if you want to require your recipients to support TLS. |[optional] -**RequireValidCert** | **bool** | Indicates if you want to require your recipients to have a valid certificate. |[optional] -**Version** | [**Version**](Version.md) | The minimum required TLS certificate version. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/enforced_tls/docs/ErrorResponse.md b/rest/api/v3/enforced_tls/docs/ErrorResponse.md deleted file mode 100644 index ec2d41f6..00000000 --- a/rest/api/v3/enforced_tls/docs/ErrorResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ErrorResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] -**Id** | **string** | When applicable, this property value will be an error ID. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/enforced_tls/docs/ErrorResponseErrorsInner.md b/rest/api/v3/enforced_tls/docs/ErrorResponseErrorsInner.md deleted file mode 100644 index 5449c685..00000000 --- a/rest/api/v3/enforced_tls/docs/ErrorResponseErrorsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ErrorResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | An error message. |[optional] -**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] -**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/enforced_tls/docs/ListEnforcedTlsSetting.md b/rest/api/v3/enforced_tls/docs/ListEnforcedTlsSetting.md deleted file mode 100644 index 43d636d3..00000000 --- a/rest/api/v3/enforced_tls/docs/ListEnforcedTlsSetting.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListEnforcedTlsSetting - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListEnforcedTlsSetting**](ListEnforcedTlsSetting.md#ListEnforcedTlsSetting) | **Get** /v3/user/settings/enforced_tls | Retrieve current Enforced TLS settings. - - - -## ListEnforcedTlsSetting - -> EnforcedTlsRequestResponse ListEnforcedTlsSetting(ctx, optional) - -Retrieve current Enforced TLS settings. - -**This endpoint allows you to retrieve your current Enforced TLS settings.** The Enforced TLS settings specify whether or not the recipient is required to support TLS or have a valid certificate. If either `require_tls` or `require_valid_cert` is set to `true`, the recipient must support TLS 1.1 or higher or have a valid certificate. If these conditions are not met, Twilio SendGrid will drop the message and send a block event with “TLS required but not supported” as the description. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListEnforcedTlsSettingParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**EnforcedTlsRequestResponse**](EnforcedTlsRequestResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/enforced_tls/docs/UpdateEnforcedTlsSetting.md b/rest/api/v3/enforced_tls/docs/UpdateEnforcedTlsSetting.md deleted file mode 100644 index 958bc070..00000000 --- a/rest/api/v3/enforced_tls/docs/UpdateEnforcedTlsSetting.md +++ /dev/null @@ -1,49 +0,0 @@ -# UpdateEnforcedTlsSetting - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateEnforcedTlsSetting**](UpdateEnforcedTlsSetting.md#UpdateEnforcedTlsSetting) | **Patch** /v3/user/settings/enforced_tls | Update Enforced TLS settings - - - -## UpdateEnforcedTlsSetting - -> EnforcedTlsRequestResponse UpdateEnforcedTlsSetting(ctx, optional) - -Update Enforced TLS settings - -**This endpoint allows you to update your Enforced TLS settings.** To require TLS from recipients, set `require_tls` to `true`. If either `require_tls` or `require_valid_cert` is set to `true`, the recipient must support TLS 1.1 or higher or have a valid certificate. If these conditions are not met, Twilio SendGrid will drop the message and send a block event with “TLS required but not supported” as the description. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateEnforcedTlsSettingParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**EnforcedTlsRequestResponse** | [**EnforcedTlsRequestResponse**](EnforcedTlsRequestResponse.md) | - -### Return type - -[**EnforcedTlsRequestResponse**](EnforcedTlsRequestResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/enforced_tls/docs/Version.md b/rest/api/v3/enforced_tls/docs/Version.md deleted file mode 100644 index 0dff80c4..00000000 --- a/rest/api/v3/enforced_tls/docs/Version.md +++ /dev/null @@ -1,14 +0,0 @@ -# Version - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**_1_DOT_1** | float32 | (value: `1.1`) -**_1_DOT_2** | float32 | (value: `1.2`) -**_1_DOT_3** | float32 | (value: `1.3`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/enforced_tls/model_enforced_tls_request_response.go b/rest/api/v3/enforced_tls/model_enforced_tls_request_response.go deleted file mode 100644 index 7788c006..00000000 --- a/rest/api/v3/enforced_tls/model_enforced_tls_request_response.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Enforced TLS API -* The Twilio SendGrid Enforced TLS API allows you to specify whether or not the recipient of your mail send is required to support TLS or have a valid certificate. Twilio SendGrid sends all emails with [Opportunistic TLS](https://sendgrid.com/blog/myth-opportunistic-tls-email-privacy/) by default, meaning email is sent with TLS, and if the recipient's inbox provider does not accept the TLS encryption, we then send the message unencrypted. You can optionally choose to enforce TLS encryption, meaning that if the recipient's inbox provider does not accept the TLS encryption, Twilio SendGrid drops the message and sends a block event with the message, “TLS required but not supported” as the description. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// EnforcedTlsRequestResponse struct for EnforcedTlsRequestResponse -type EnforcedTlsRequestResponse struct { - // Indicates if you want to require your recipients to support TLS. - RequireTls *bool `json:"require_tls,omitempty"` - // Indicates if you want to require your recipients to have a valid certificate. - RequireValidCert *bool `json:"require_valid_cert,omitempty"` - // The minimum required TLS certificate version. - Version *Version `json:"version,omitempty"` -} diff --git a/rest/api/v3/enforced_tls/model_error_response.go b/rest/api/v3/enforced_tls/model_error_response.go deleted file mode 100644 index 5c54a419..00000000 --- a/rest/api/v3/enforced_tls/model_error_response.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Enforced TLS API -* The Twilio SendGrid Enforced TLS API allows you to specify whether or not the recipient of your mail send is required to support TLS or have a valid certificate. Twilio SendGrid sends all emails with [Opportunistic TLS](https://sendgrid.com/blog/myth-opportunistic-tls-email-privacy/) by default, meaning email is sent with TLS, and if the recipient's inbox provider does not accept the TLS encryption, we then send the message unencrypted. You can optionally choose to enforce TLS encryption, meaning that if the recipient's inbox provider does not accept the TLS encryption, Twilio SendGrid drops the message and sends a block event with the message, “TLS required but not supported” as the description. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponse struct for ErrorResponse -type ErrorResponse struct { - Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` - // When applicable, this property value will be an error ID. - Id *string `json:"id,omitempty"` -} diff --git a/rest/api/v3/enforced_tls/model_error_response_errors_inner.go b/rest/api/v3/enforced_tls/model_error_response_errors_inner.go deleted file mode 100644 index f31a0e09..00000000 --- a/rest/api/v3/enforced_tls/model_error_response_errors_inner.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Enforced TLS API -* The Twilio SendGrid Enforced TLS API allows you to specify whether or not the recipient of your mail send is required to support TLS or have a valid certificate. Twilio SendGrid sends all emails with [Opportunistic TLS](https://sendgrid.com/blog/myth-opportunistic-tls-email-privacy/) by default, meaning email is sent with TLS, and if the recipient's inbox provider does not accept the TLS encryption, we then send the message unencrypted. You can optionally choose to enforce TLS encryption, meaning that if the recipient's inbox provider does not accept the TLS encryption, Twilio SendGrid drops the message and sends a block event with the message, “TLS required but not supported” as the description. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner -type ErrorResponseErrorsInner struct { - // An error message. - Message *string `json:"message,omitempty"` - // When applicable, this property value will be the field that generated the error. - Field *string `json:"field,omitempty"` - // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. - Help *map[string]interface{} `json:"help,omitempty"` -} diff --git a/rest/api/v3/enforced_tls/model_version.go b/rest/api/v3/enforced_tls/model_version.go deleted file mode 100644 index 731e1719..00000000 --- a/rest/api/v3/enforced_tls/model_version.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Enforced TLS API -* The Twilio SendGrid Enforced TLS API allows you to specify whether or not the recipient of your mail send is required to support TLS or have a valid certificate. Twilio SendGrid sends all emails with [Opportunistic TLS](https://sendgrid.com/blog/myth-opportunistic-tls-email-privacy/) by default, meaning email is sent with TLS, and if the recipient's inbox provider does not accept the TLS encryption, we then send the message unencrypted. You can optionally choose to enforce TLS encryption, meaning that if the recipient's inbox provider does not accept the TLS encryption, Twilio SendGrid drops the message and sends a block event with the message, “TLS required but not supported” as the description. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Version the model 'Version' -type Version float32 - -// List of Version -const ( - VERSION__1_DOT_1 Version = 1.1 - VERSION__1_DOT_2 Version = 1.2 - VERSION__1_DOT_3 Version = 1.3 -) diff --git a/rest/api/v3/integrations/.openapi-generator b/rest/api/v3/integrations/.openapi-generator deleted file mode 100644 index f98f8c43..00000000 --- a/rest/api/v3/integrations/.openapi-generator +++ /dev/null @@ -1,76 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_add_integration.go -api_delete_integration.go -api_find_integration_by_id.go -api_get_integrations_by_user.go -api_service.go -api_update_integration.go -docs/AddIntegration.md -docs/AddIntegration400Response.md -docs/DeleteIntegration.md -docs/DeleteIntegration400Response.md -docs/DeleteIntegration404Response.md -docs/Destination.md -docs/Destination1.md -docs/Destination2.md -docs/Destination3.md -docs/DestinationRegion.md -docs/DestinationRegion1.md -docs/DestinationRegion2.md -docs/FindIntegrationById.md -docs/Forbidden.md -docs/GetIntegrationsByUser.md -docs/GetIntegrationsByUser200Response.md -docs/GetIntegrationsByUser403Response.md -docs/GetIntegrationsByUser500Response.md -docs/Id.md -docs/Integration.md -docs/IntegrationFilters.md -docs/IntegrationInput.md -docs/IntegrationInputFilters.md -docs/IntegrationInputProperties.md -docs/IntegrationNotFound.md -docs/IntegrationPatch.md -docs/IntegrationPatchFilters.md -docs/IntegrationPatchProperties.md -docs/IntegrationProperties.md -docs/InternalError.md -docs/InvalidDeleteRequest.md -docs/InvalidRequest.md -docs/Items.md -docs/Items1.md -docs/Items2.md -docs/UpdateIntegration.md -model_add_integration_400_response.go -model_delete_integration_400_response.go -model_delete_integration_404_response.go -model_destination.go -model_destination1.go -model_destination2.go -model_destination3.go -model_destination_region.go -model_destination_region1.go -model_destination_region2.go -model_forbidden.go -model_get_integrations_by_user_200_response.go -model_get_integrations_by_user_403_response.go -model_get_integrations_by_user_500_response.go -model_id.go -model_integration.go -model_integration_filters.go -model_integration_input.go -model_integration_input_filters.go -model_integration_input_properties.go -model_integration_not_found.go -model_integration_patch.go -model_integration_patch_filters.go -model_integration_patch_properties.go -model_integration_properties.go -model_internal_error.go -model_invalid_delete_request.go -model_invalid_request.go -model_items.go -model_items1.go -model_items2.go diff --git a/rest/api/v3/integrations/.openapi-generator-ignore b/rest/api/v3/integrations/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/integrations/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/integrations/README.md b/rest/api/v3/integrations/README.md deleted file mode 100644 index 7400f9c8..00000000 --- a/rest/api/v3/integrations/README.md +++ /dev/null @@ -1,94 +0,0 @@ -# Go API client for - -Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:37.549545+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AddIntegration* | [**AddIntegration**](docs/AddIntegration.md#addintegration) | **Post** /v3/marketing/integrations | CreateIntegration -*DeleteIntegration* | [**DeleteIntegration**](docs/DeleteIntegration.md#deleteintegration) | **Delete** /v3/marketing/integrations | DeleteBulkIntegration -*FindIntegrationById* | [**FindIntegrationById**](docs/FindIntegrationById.md#findintegrationbyid) | **Get** /v3/marketing/integrations/{Id} | GetIntegration -*GetIntegrationsByUser* | [**GetIntegrationsByUser**](docs/GetIntegrationsByUser.md#getintegrationsbyuser) | **Get** /v3/marketing/integrations | ListIntegration -*UpdateIntegration* | [**UpdateIntegration**](docs/UpdateIntegration.md#updateintegration) | **Patch** /v3/marketing/integrations/{Id} | UpdateIntegration - - -## Documentation For Models - - - [AddIntegration400Response](AddIntegration400Response.md) - - [DeleteIntegration400Response](DeleteIntegration400Response.md) - - [DeleteIntegration404Response](DeleteIntegration404Response.md) - - [Destination](Destination.md) - - [Destination1](Destination1.md) - - [Destination2](Destination2.md) - - [Destination3](Destination3.md) - - [DestinationRegion](DestinationRegion.md) - - [DestinationRegion1](DestinationRegion1.md) - - [DestinationRegion2](DestinationRegion2.md) - - [Forbidden](Forbidden.md) - - [GetIntegrationsByUser200Response](GetIntegrationsByUser200Response.md) - - [GetIntegrationsByUser403Response](GetIntegrationsByUser403Response.md) - - [GetIntegrationsByUser500Response](GetIntegrationsByUser500Response.md) - - [Id](Id.md) - - [Integration](Integration.md) - - [IntegrationFilters](IntegrationFilters.md) - - [IntegrationInput](IntegrationInput.md) - - [IntegrationInputFilters](IntegrationInputFilters.md) - - [IntegrationInputProperties](IntegrationInputProperties.md) - - [IntegrationNotFound](IntegrationNotFound.md) - - [IntegrationPatch](IntegrationPatch.md) - - [IntegrationPatchFilters](IntegrationPatchFilters.md) - - [IntegrationPatchProperties](IntegrationPatchProperties.md) - - [IntegrationProperties](IntegrationProperties.md) - - [InternalError](InternalError.md) - - [InvalidDeleteRequest](InvalidDeleteRequest.md) - - [InvalidRequest](InvalidRequest.md) - - [Items](Items.md) - - [Items1](Items1.md) - - [Items2](Items2.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/integrations/api_add_integration.go b/rest/api/v3/integrations/api_add_integration.go deleted file mode 100644 index 92004e55..00000000 --- a/rest/api/v3/integrations/api_add_integration.go +++ /dev/null @@ -1,89 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type AddIntegrationParam struct { - // - IntegrationInput *IntegrationInput `json:"IntegrationInput"` -} - -func (params *AddIntegrationParam) SetIntegrationInput(IntegrationInput IntegrationInput) *AddIntegrationParam { - params.IntegrationInput = &IntegrationInput - return params -} - -// This endpoint creates an Integration for email event forwarding. Each Integration has a maximum number of allowed Integration instances per user. For example, users can create up to 10 Segment Integrations. -func (c *ApiService) AddIntegration(params *AddIntegrationParam) (interface{}, error) { - path := "/v3/marketing/integrations" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.IntegrationInput != nil { - b, err := json.Marshal(*params.IntegrationInput) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &Integration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &AddIntegration400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &GetIntegrationsByUser403Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &GetIntegrationsByUser500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/integrations/api_delete_integration.go b/rest/api/v3/integrations/api_delete_integration.go deleted file mode 100644 index 40e4c4ae..00000000 --- a/rest/api/v3/integrations/api_delete_integration.go +++ /dev/null @@ -1,93 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type DeleteIntegrationParam struct { - // Comma-delimited Integration IDs for the Integrations to delete. - Ids *[]Id `json:"ids"` -} - -func (params *DeleteIntegrationParam) SetIds(Ids []Id) *DeleteIntegrationParam { - params.Ids = &Ids - return params -} - -// This endpoint deletes Integrations. -func (c *ApiService) DeleteIntegration(params *DeleteIntegrationParam) (interface{}, error) { - path := "/v3/marketing/integrations" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Ids != nil { - for _, item := range *params.Ids { - v, err := json.Marshal(item) - - if err != nil { - return nil, err - } - - data.Add("ids", string(v)) - - } - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 400 { - ps := &DeleteIntegration400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &GetIntegrationsByUser403Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &DeleteIntegration404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &GetIntegrationsByUser500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/integrations/api_find_integration_by_id.go b/rest/api/v3/integrations/api_find_integration_by_id.go deleted file mode 100644 index b0594610..00000000 --- a/rest/api/v3/integrations/api_find_integration_by_id.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type FindIntegrationByIdParam struct { - // The ID of the Integration you would like to retrieve. - Id *string `json:"id"` -} - -func (params *FindIntegrationByIdParam) SetId(Id string) *FindIntegrationByIdParam { - params.Id = &Id - return params -} - -// This endpoint returns the data for a specific Integration. -func (c *ApiService) FindIntegrationById(params *FindIntegrationByIdParam) (interface{}, error) { - path := "/v3/marketing/integrations/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &Integration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &GetIntegrationsByUser403Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &DeleteIntegration404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &GetIntegrationsByUser500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/integrations/api_get_integrations_by_user.go b/rest/api/v3/integrations/api_get_integrations_by_user.go deleted file mode 100644 index 3c4d1908..00000000 --- a/rest/api/v3/integrations/api_get_integrations_by_user.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type GetIntegrationsByUserParam struct { -} - -// This endpoint returns all the Integrations for the user making this call. -func (c *ApiService) GetIntegrationsByUser() (interface{}, error) { - path := "/v3/marketing/integrations" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &GetIntegrationsByUser200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &GetIntegrationsByUser403Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &GetIntegrationsByUser500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/integrations/api_service.go b/rest/api/v3/integrations/api_service.go deleted file mode 100644 index 6a43a8ff..00000000 --- a/rest/api/v3/integrations/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/integrations/api_update_integration.go b/rest/api/v3/integrations/api_update_integration.go deleted file mode 100644 index b62b01c5..00000000 --- a/rest/api/v3/integrations/api_update_integration.go +++ /dev/null @@ -1,108 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type UpdateIntegrationParam struct { - // The ID of the Integration you would like to update. - Id *string `json:"id"` - // - IntegrationPatch *IntegrationPatch `json:"IntegrationPatch"` -} - -func (params *UpdateIntegrationParam) SetId(Id string) *UpdateIntegrationParam { - params.Id = &Id - return params -} -func (params *UpdateIntegrationParam) SetIntegrationPatch(IntegrationPatch IntegrationPatch) *UpdateIntegrationParam { - params.IntegrationPatch = &IntegrationPatch - return params -} - -// This endpoint updates an existing Integration. -func (c *ApiService) UpdateIntegration(params *UpdateIntegrationParam) (interface{}, error) { - path := "/v3/marketing/integrations/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.IntegrationPatch != nil { - b, err := json.Marshal(*params.IntegrationPatch) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &Integration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &AddIntegration400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &GetIntegrationsByUser403Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &DeleteIntegration404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &GetIntegrationsByUser500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/integrations/docs/AddIntegration.md b/rest/api/v3/integrations/docs/AddIntegration.md deleted file mode 100644 index ffe11319..00000000 --- a/rest/api/v3/integrations/docs/AddIntegration.md +++ /dev/null @@ -1,47 +0,0 @@ -# AddIntegration - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddIntegration**](AddIntegration.md#AddIntegration) | **Post** /v3/marketing/integrations | CreateIntegration - - - -## AddIntegration - -> Integration AddIntegration(ctx, IntegrationInput) - -CreateIntegration - -This endpoint creates an Integration for email event forwarding. Each Integration has a maximum number of allowed Integration instances per user. For example, users can create up to 10 Segment Integrations. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a AddIntegrationParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**Integration**](Integration.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/integrations/docs/AddIntegration400Response.md b/rest/api/v3/integrations/docs/AddIntegration400Response.md deleted file mode 100644 index c08231ce..00000000 --- a/rest/api/v3/integrations/docs/AddIntegration400Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# AddIntegration400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]InvalidRequest**](InvalidRequest.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/DeleteIntegration.md b/rest/api/v3/integrations/docs/DeleteIntegration.md deleted file mode 100644 index 730e43f0..00000000 --- a/rest/api/v3/integrations/docs/DeleteIntegration.md +++ /dev/null @@ -1,47 +0,0 @@ -# DeleteIntegration - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteIntegration**](DeleteIntegration.md#DeleteIntegration) | **Delete** /v3/marketing/integrations | DeleteBulkIntegration - - - -## DeleteIntegration - -> DeleteIntegration(ctx, Ids) - -DeleteBulkIntegration - -This endpoint deletes Integrations. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteIntegrationParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/integrations/docs/DeleteIntegration400Response.md b/rest/api/v3/integrations/docs/DeleteIntegration400Response.md deleted file mode 100644 index 52a6707f..00000000 --- a/rest/api/v3/integrations/docs/DeleteIntegration400Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeleteIntegration400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]InvalidDeleteRequest**](InvalidDeleteRequest.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/DeleteIntegration404Response.md b/rest/api/v3/integrations/docs/DeleteIntegration404Response.md deleted file mode 100644 index ab33a208..00000000 --- a/rest/api/v3/integrations/docs/DeleteIntegration404Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeleteIntegration404Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]IntegrationNotFound**](IntegrationNotFound.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/Destination.md b/rest/api/v3/integrations/docs/Destination.md deleted file mode 100644 index e0a69331..00000000 --- a/rest/api/v3/integrations/docs/Destination.md +++ /dev/null @@ -1,12 +0,0 @@ -# Destination - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**SEGMENT** | string | (value: `"Segment"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/Destination1.md b/rest/api/v3/integrations/docs/Destination1.md deleted file mode 100644 index eeff58b5..00000000 --- a/rest/api/v3/integrations/docs/Destination1.md +++ /dev/null @@ -1,12 +0,0 @@ -# Destination1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**SEGMENT** | string | (value: `"Segment"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/Destination2.md b/rest/api/v3/integrations/docs/Destination2.md deleted file mode 100644 index 6c18c7f8..00000000 --- a/rest/api/v3/integrations/docs/Destination2.md +++ /dev/null @@ -1,12 +0,0 @@ -# Destination2 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**SEGMENT** | string | (value: `"Segment"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/Destination3.md b/rest/api/v3/integrations/docs/Destination3.md deleted file mode 100644 index bfbae361..00000000 --- a/rest/api/v3/integrations/docs/Destination3.md +++ /dev/null @@ -1,12 +0,0 @@ -# Destination3 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**SEGMENT** | string | (value: `"Segment"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/DestinationRegion.md b/rest/api/v3/integrations/docs/DestinationRegion.md deleted file mode 100644 index 1a56b3c2..00000000 --- a/rest/api/v3/integrations/docs/DestinationRegion.md +++ /dev/null @@ -1,13 +0,0 @@ -# DestinationRegion - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**EU** | string | (value: `"EU"`) -**US** | string | (value: `"US"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/DestinationRegion1.md b/rest/api/v3/integrations/docs/DestinationRegion1.md deleted file mode 100644 index 42ac76a4..00000000 --- a/rest/api/v3/integrations/docs/DestinationRegion1.md +++ /dev/null @@ -1,13 +0,0 @@ -# DestinationRegion1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**EU** | string | (value: `"EU"`) -**US** | string | (value: `"US"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/DestinationRegion2.md b/rest/api/v3/integrations/docs/DestinationRegion2.md deleted file mode 100644 index b79835bb..00000000 --- a/rest/api/v3/integrations/docs/DestinationRegion2.md +++ /dev/null @@ -1,13 +0,0 @@ -# DestinationRegion2 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**EU** | string | (value: `"EU"`) -**US** | string | (value: `"US"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/FindIntegrationById.md b/rest/api/v3/integrations/docs/FindIntegrationById.md deleted file mode 100644 index 3f19621a..00000000 --- a/rest/api/v3/integrations/docs/FindIntegrationById.md +++ /dev/null @@ -1,51 +0,0 @@ -# FindIntegrationById - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**FindIntegrationById**](FindIntegrationById.md#FindIntegrationById) | **Get** /v3/marketing/integrations/{Id} | GetIntegration - - - -## FindIntegrationById - -> Integration FindIntegrationById(ctx, Id) - -GetIntegration - -This endpoint returns the data for a specific Integration. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of the Integration you would like to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a FindIntegrationByIdParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**Integration**](Integration.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/integrations/docs/Forbidden.md b/rest/api/v3/integrations/docs/Forbidden.md deleted file mode 100644 index 1852697e..00000000 --- a/rest/api/v3/integrations/docs/Forbidden.md +++ /dev/null @@ -1,11 +0,0 @@ -# Forbidden - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | The error message tells you the cause of failure. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/GetIntegrationsByUser.md b/rest/api/v3/integrations/docs/GetIntegrationsByUser.md deleted file mode 100644 index c692ef46..00000000 --- a/rest/api/v3/integrations/docs/GetIntegrationsByUser.md +++ /dev/null @@ -1,44 +0,0 @@ -# GetIntegrationsByUser - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetIntegrationsByUser**](GetIntegrationsByUser.md#GetIntegrationsByUser) | **Get** /v3/marketing/integrations | ListIntegration - - - -## GetIntegrationsByUser - -> GetIntegrationsByUser200Response GetIntegrationsByUser(ctx, ) - -ListIntegration - -This endpoint returns all the Integrations for the user making this call. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a GetIntegrationsByUserParams struct - - -### Return type - -[**GetIntegrationsByUser200Response**](GetIntegrationsByUser200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/integrations/docs/GetIntegrationsByUser200Response.md b/rest/api/v3/integrations/docs/GetIntegrationsByUser200Response.md deleted file mode 100644 index 511b87d8..00000000 --- a/rest/api/v3/integrations/docs/GetIntegrationsByUser200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetIntegrationsByUser200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]Integration**](Integration.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/GetIntegrationsByUser403Response.md b/rest/api/v3/integrations/docs/GetIntegrationsByUser403Response.md deleted file mode 100644 index 59d7a833..00000000 --- a/rest/api/v3/integrations/docs/GetIntegrationsByUser403Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetIntegrationsByUser403Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]Forbidden**](Forbidden.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/GetIntegrationsByUser500Response.md b/rest/api/v3/integrations/docs/GetIntegrationsByUser500Response.md deleted file mode 100644 index 6d5d7f88..00000000 --- a/rest/api/v3/integrations/docs/GetIntegrationsByUser500Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetIntegrationsByUser500Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]InternalError**](InternalError.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/Id.md b/rest/api/v3/integrations/docs/Id.md deleted file mode 100644 index 67dc46d0..00000000 --- a/rest/api/v3/integrations/docs/Id.md +++ /dev/null @@ -1,11 +0,0 @@ -# Id - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**IntegrationId** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/Integration.md b/rest/api/v3/integrations/docs/Integration.md deleted file mode 100644 index a3645110..00000000 --- a/rest/api/v3/integrations/docs/Integration.md +++ /dev/null @@ -1,16 +0,0 @@ -# Integration - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**IntegrationId** | **string** | The unique ID of an Integration. |[optional] -**UserId** | **string** | Your Twilio SendGrid account ID. |[optional] -**Filters** | [**IntegrationFilters**](IntegrationFilters.md) | |[optional] -**Properties** | [**IntegrationProperties**](IntegrationProperties.md) | |[optional] -**Label** | **string** | The nickname for the Integration. |[optional] [default to "Untitled Integration"] -**Destination** | [**Destination3**](Destination3.md) | The third-party application you would like to forward your events to. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/IntegrationFilters.md b/rest/api/v3/integrations/docs/IntegrationFilters.md deleted file mode 100644 index 17812e6e..00000000 --- a/rest/api/v3/integrations/docs/IntegrationFilters.md +++ /dev/null @@ -1,11 +0,0 @@ -# IntegrationFilters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**EmailEvents** | [**[]Items2**](Items2.md) | The possible SendGrid email event types for event forwarding. Specify all the email event types that you would like to forward to the Integration's destination. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/IntegrationInput.md b/rest/api/v3/integrations/docs/IntegrationInput.md deleted file mode 100644 index 0d6fa829..00000000 --- a/rest/api/v3/integrations/docs/IntegrationInput.md +++ /dev/null @@ -1,14 +0,0 @@ -# IntegrationInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Destination** | [**Destination2**](Destination2.md) | The third-party application you would like to forward your events to. | -**Filters** | [**IntegrationInputFilters**](IntegrationInputFilters.md) | | -**Properties** | [**IntegrationInputProperties**](IntegrationInputProperties.md) | | -**Label** | **string** | The nickname for the Integration. |[optional] [default to "Untitled Integration"] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/IntegrationInputFilters.md b/rest/api/v3/integrations/docs/IntegrationInputFilters.md deleted file mode 100644 index dc1ebf0f..00000000 --- a/rest/api/v3/integrations/docs/IntegrationInputFilters.md +++ /dev/null @@ -1,11 +0,0 @@ -# IntegrationInputFilters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**EmailEvents** | [**[]Items1**](Items1.md) | The possible SendGrid email event types for event forwarding. Specify all the email event types that you would like to forward to the Integration's destination. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/IntegrationInputProperties.md b/rest/api/v3/integrations/docs/IntegrationInputProperties.md deleted file mode 100644 index 5e56f5d6..00000000 --- a/rest/api/v3/integrations/docs/IntegrationInputProperties.md +++ /dev/null @@ -1,12 +0,0 @@ -# IntegrationInputProperties - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**WriteKey** | **string** | The write key provided by the Segment Source you'd like to have events forwarded to. Must be between 6 and 51 characters. | -**DestinationRegion** | [**DestinationRegion1**](DestinationRegion1.md) | The workspace region where the Segment Source write key lives. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/IntegrationNotFound.md b/rest/api/v3/integrations/docs/IntegrationNotFound.md deleted file mode 100644 index dc5cbacf..00000000 --- a/rest/api/v3/integrations/docs/IntegrationNotFound.md +++ /dev/null @@ -1,11 +0,0 @@ -# IntegrationNotFound - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | The error message tells you the cause of failure. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/IntegrationPatch.md b/rest/api/v3/integrations/docs/IntegrationPatch.md deleted file mode 100644 index bf974d8c..00000000 --- a/rest/api/v3/integrations/docs/IntegrationPatch.md +++ /dev/null @@ -1,14 +0,0 @@ -# IntegrationPatch - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Destination** | [**Destination1**](Destination1.md) | The third-party application you would like to forward your email events to. |[optional] -**Filters** | [**IntegrationPatchFilters**](IntegrationPatchFilters.md) | |[optional] -**Properties** | [**IntegrationPatchProperties**](IntegrationPatchProperties.md) | |[optional] -**Label** | **string** | The nickname for the Integration. |[optional] [default to "Untitled Integration"] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/IntegrationPatchFilters.md b/rest/api/v3/integrations/docs/IntegrationPatchFilters.md deleted file mode 100644 index 4feb447e..00000000 --- a/rest/api/v3/integrations/docs/IntegrationPatchFilters.md +++ /dev/null @@ -1,11 +0,0 @@ -# IntegrationPatchFilters - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**EmailEvents** | [**[]Items**](Items.md) | The possible SendGrid email event types for event forwarding. Specify all the email event types that you would like to forward to the Integration's destination. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/IntegrationPatchProperties.md b/rest/api/v3/integrations/docs/IntegrationPatchProperties.md deleted file mode 100644 index 2ef4f33f..00000000 --- a/rest/api/v3/integrations/docs/IntegrationPatchProperties.md +++ /dev/null @@ -1,12 +0,0 @@ -# IntegrationPatchProperties - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**WriteKey** | **string** | The write key provided by the Segment Source you'd like to have events forwarded to. Must be between 6 and 51 characters. |[optional] -**DestinationRegion** | [**DestinationRegion**](DestinationRegion.md) | The workspace region where the Segment Source write key lives. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/IntegrationProperties.md b/rest/api/v3/integrations/docs/IntegrationProperties.md deleted file mode 100644 index 9ddebe9b..00000000 --- a/rest/api/v3/integrations/docs/IntegrationProperties.md +++ /dev/null @@ -1,12 +0,0 @@ -# IntegrationProperties - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**WriteKey** | **string** | The write key provided by the Segment Source you'd like to have events forwarded to. Must be between 6 and 51 characters. |[optional] -**DestinationRegion** | [**DestinationRegion2**](DestinationRegion2.md) | The workspace region where the Segment Source write key lives. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/InternalError.md b/rest/api/v3/integrations/docs/InternalError.md deleted file mode 100644 index 46bca29a..00000000 --- a/rest/api/v3/integrations/docs/InternalError.md +++ /dev/null @@ -1,11 +0,0 @@ -# InternalError - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | The error message tells you the cause of failure. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/InvalidDeleteRequest.md b/rest/api/v3/integrations/docs/InvalidDeleteRequest.md deleted file mode 100644 index 0a26bf26..00000000 --- a/rest/api/v3/integrations/docs/InvalidDeleteRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# InvalidDeleteRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | The error message tells you the cause of failure. |[optional] -**Parameter** | **string** | The parameter shows more information about where the error is. The number in the brackets is the invalid ID indexed. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/InvalidRequest.md b/rest/api/v3/integrations/docs/InvalidRequest.md deleted file mode 100644 index 2058d058..00000000 --- a/rest/api/v3/integrations/docs/InvalidRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# InvalidRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | The error message tells you the cause of validation failure(s), separated by commas if there are multiple failures. |[optional] -**Field** | **string** | The field shows more information on where the error is when available. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/Items.md b/rest/api/v3/integrations/docs/Items.md deleted file mode 100644 index 31a64e99..00000000 --- a/rest/api/v3/integrations/docs/Items.md +++ /dev/null @@ -1,23 +0,0 @@ -# Items - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**DROP** | string | (value: `"drop"`) -**PROCESSED** | string | (value: `"processed"`) -**DEFERRED** | string | (value: `"deferred"`) -**GROUP_UNSUBSCRIBE** | string | (value: `"group_unsubscribe"`) -**BOUNCE** | string | (value: `"bounce"`) -**DELIVERED** | string | (value: `"delivered"`) -**CLICK** | string | (value: `"click"`) -**UNSUBSCRIBE** | string | (value: `"unsubscribe"`) -**OPEN** | string | (value: `"open"`) -**GROUP_RESUBSCRIBE** | string | (value: `"group_resubscribe"`) -**SPAMREPORT** | string | (value: `"spamreport"`) -**MACHINE_OPENED** | string | (value: `"machine_opened"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/Items1.md b/rest/api/v3/integrations/docs/Items1.md deleted file mode 100644 index 70d35e3a..00000000 --- a/rest/api/v3/integrations/docs/Items1.md +++ /dev/null @@ -1,23 +0,0 @@ -# Items1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**DROP** | string | (value: `"drop"`) -**PROCESSED** | string | (value: `"processed"`) -**DEFERRED** | string | (value: `"deferred"`) -**GROUP_UNSUBSCRIBE** | string | (value: `"group_unsubscribe"`) -**BOUNCE** | string | (value: `"bounce"`) -**DELIVERED** | string | (value: `"delivered"`) -**CLICK** | string | (value: `"click"`) -**UNSUBSCRIBE** | string | (value: `"unsubscribe"`) -**OPEN** | string | (value: `"open"`) -**GROUP_RESUBSCRIBE** | string | (value: `"group_resubscribe"`) -**SPAMREPORT** | string | (value: `"spamreport"`) -**MACHINE_OPENED** | string | (value: `"machine_opened"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/Items2.md b/rest/api/v3/integrations/docs/Items2.md deleted file mode 100644 index 07701e8f..00000000 --- a/rest/api/v3/integrations/docs/Items2.md +++ /dev/null @@ -1,23 +0,0 @@ -# Items2 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**DROP** | string | (value: `"drop"`) -**PROCESSED** | string | (value: `"processed"`) -**DEFERRED** | string | (value: `"deferred"`) -**GROUP_UNSUBSCRIBE** | string | (value: `"group_unsubscribe"`) -**BOUNCE** | string | (value: `"bounce"`) -**DELIVERED** | string | (value: `"delivered"`) -**CLICK** | string | (value: `"click"`) -**UNSUBSCRIBE** | string | (value: `"unsubscribe"`) -**OPEN** | string | (value: `"open"`) -**GROUP_RESUBSCRIBE** | string | (value: `"group_resubscribe"`) -**SPAMREPORT** | string | (value: `"spamreport"`) -**MACHINE_OPENED** | string | (value: `"machine_opened"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/integrations/docs/UpdateIntegration.md b/rest/api/v3/integrations/docs/UpdateIntegration.md deleted file mode 100644 index f3fb79c2..00000000 --- a/rest/api/v3/integrations/docs/UpdateIntegration.md +++ /dev/null @@ -1,51 +0,0 @@ -# UpdateIntegration - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateIntegration**](UpdateIntegration.md#UpdateIntegration) | **Patch** /v3/marketing/integrations/{Id} | UpdateIntegration - - - -## UpdateIntegration - -> Integration UpdateIntegration(ctx, IdIntegrationPatch) - -UpdateIntegration - -This endpoint updates an existing Integration. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of the Integration you would like to update. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateIntegrationParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**Integration**](Integration.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/integrations/model_add_integration_400_response.go b/rest/api/v3/integrations/model_add_integration_400_response.go deleted file mode 100644 index ad8e53b3..00000000 --- a/rest/api/v3/integrations/model_add_integration_400_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AddIntegration400Response struct for AddIntegration400Response -type AddIntegration400Response struct { - Errors *[]InvalidRequest `json:"errors,omitempty"` -} diff --git a/rest/api/v3/integrations/model_delete_integration_400_response.go b/rest/api/v3/integrations/model_delete_integration_400_response.go deleted file mode 100644 index 81d15a69..00000000 --- a/rest/api/v3/integrations/model_delete_integration_400_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DeleteIntegration400Response struct for DeleteIntegration400Response -type DeleteIntegration400Response struct { - Errors *[]InvalidDeleteRequest `json:"errors,omitempty"` -} diff --git a/rest/api/v3/integrations/model_delete_integration_404_response.go b/rest/api/v3/integrations/model_delete_integration_404_response.go deleted file mode 100644 index 990eeba8..00000000 --- a/rest/api/v3/integrations/model_delete_integration_404_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DeleteIntegration404Response struct for DeleteIntegration404Response -type DeleteIntegration404Response struct { - Errors *[]IntegrationNotFound `json:"errors,omitempty"` -} diff --git a/rest/api/v3/integrations/model_destination.go b/rest/api/v3/integrations/model_destination.go deleted file mode 100644 index 133a8563..00000000 --- a/rest/api/v3/integrations/model_destination.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Destination The third-party application you would like to forward your email events to. -type Destination string - -// List of Destination -const ( - DESTINATION_SEGMENT Destination = "Segment" -) diff --git a/rest/api/v3/integrations/model_destination1.go b/rest/api/v3/integrations/model_destination1.go deleted file mode 100644 index 4350d666..00000000 --- a/rest/api/v3/integrations/model_destination1.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Destination1 the model 'Destination1' -type Destination1 string - -// List of Destination1 -const ( - DESTINATION1_SEGMENT Destination1 = "Segment" -) diff --git a/rest/api/v3/integrations/model_destination2.go b/rest/api/v3/integrations/model_destination2.go deleted file mode 100644 index f888e2ef..00000000 --- a/rest/api/v3/integrations/model_destination2.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Destination2 the model 'Destination2' -type Destination2 string - -// List of Destination2 -const ( - DESTINATION2_SEGMENT Destination2 = "Segment" -) diff --git a/rest/api/v3/integrations/model_destination3.go b/rest/api/v3/integrations/model_destination3.go deleted file mode 100644 index 7ef311db..00000000 --- a/rest/api/v3/integrations/model_destination3.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Destination3 the model 'Destination3' -type Destination3 string - -// List of Destination3 -const ( - DESTINATION3_SEGMENT Destination3 = "Segment" -) diff --git a/rest/api/v3/integrations/model_destination_region.go b/rest/api/v3/integrations/model_destination_region.go deleted file mode 100644 index b972f4cc..00000000 --- a/rest/api/v3/integrations/model_destination_region.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DestinationRegion the model 'DestinationRegion' -type DestinationRegion string - -// List of DestinationRegion -const ( - DESTINATIONREGION_EU DestinationRegion = "EU" - DESTINATIONREGION_US DestinationRegion = "US" -) diff --git a/rest/api/v3/integrations/model_destination_region1.go b/rest/api/v3/integrations/model_destination_region1.go deleted file mode 100644 index fe5b5c33..00000000 --- a/rest/api/v3/integrations/model_destination_region1.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DestinationRegion1 the model 'DestinationRegion1' -type DestinationRegion1 string - -// List of DestinationRegion1 -const ( - DESTINATIONREGION1_EU DestinationRegion1 = "EU" - DESTINATIONREGION1_US DestinationRegion1 = "US" -) diff --git a/rest/api/v3/integrations/model_destination_region2.go b/rest/api/v3/integrations/model_destination_region2.go deleted file mode 100644 index 85079c07..00000000 --- a/rest/api/v3/integrations/model_destination_region2.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DestinationRegion2 the model 'DestinationRegion2' -type DestinationRegion2 string - -// List of DestinationRegion2 -const ( - DESTINATIONREGION2_EU DestinationRegion2 = "EU" - DESTINATIONREGION2_US DestinationRegion2 = "US" -) diff --git a/rest/api/v3/integrations/model_forbidden.go b/rest/api/v3/integrations/model_forbidden.go deleted file mode 100644 index 9e941266..00000000 --- a/rest/api/v3/integrations/model_forbidden.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Forbidden struct for Forbidden -type Forbidden struct { - // The error message tells you the cause of failure. - Message *string `json:"message,omitempty"` -} diff --git a/rest/api/v3/integrations/model_get_integrations_by_user_200_response.go b/rest/api/v3/integrations/model_get_integrations_by_user_200_response.go deleted file mode 100644 index f7421247..00000000 --- a/rest/api/v3/integrations/model_get_integrations_by_user_200_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetIntegrationsByUser200Response struct for GetIntegrationsByUser200Response -type GetIntegrationsByUser200Response struct { - Result *[]Integration `json:"result,omitempty"` -} diff --git a/rest/api/v3/integrations/model_get_integrations_by_user_403_response.go b/rest/api/v3/integrations/model_get_integrations_by_user_403_response.go deleted file mode 100644 index c0b4cf0a..00000000 --- a/rest/api/v3/integrations/model_get_integrations_by_user_403_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetIntegrationsByUser403Response struct for GetIntegrationsByUser403Response -type GetIntegrationsByUser403Response struct { - Errors *[]Forbidden `json:"errors,omitempty"` -} diff --git a/rest/api/v3/integrations/model_get_integrations_by_user_500_response.go b/rest/api/v3/integrations/model_get_integrations_by_user_500_response.go deleted file mode 100644 index c315cb2b..00000000 --- a/rest/api/v3/integrations/model_get_integrations_by_user_500_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetIntegrationsByUser500Response struct for GetIntegrationsByUser500Response -type GetIntegrationsByUser500Response struct { - Errors *[]InternalError `json:"errors,omitempty"` -} diff --git a/rest/api/v3/integrations/model_id.go b/rest/api/v3/integrations/model_id.go deleted file mode 100644 index e5ddf078..00000000 --- a/rest/api/v3/integrations/model_id.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Id The unique ID of an Integration. -type Id struct { - IntegrationId *string `json:"integration_id,omitempty"` -} diff --git a/rest/api/v3/integrations/model_integration.go b/rest/api/v3/integrations/model_integration.go deleted file mode 100644 index 82d04c57..00000000 --- a/rest/api/v3/integrations/model_integration.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Integration struct for Integration -type Integration struct { - // The unique ID of an Integration. - IntegrationId *string `json:"integration_id,omitempty"` - // Your Twilio SendGrid account ID. - UserId *string `json:"user_id,omitempty"` - Filters *IntegrationFilters `json:"filters,omitempty"` - Properties *IntegrationProperties `json:"properties,omitempty"` - // The nickname for the Integration. - Label *string `json:"label,omitempty"` - // The third-party application you would like to forward your events to. - Destination *Destination3 `json:"destination,omitempty"` -} diff --git a/rest/api/v3/integrations/model_integration_filters.go b/rest/api/v3/integrations/model_integration_filters.go deleted file mode 100644 index fbf2911c..00000000 --- a/rest/api/v3/integrations/model_integration_filters.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// IntegrationFilters The configurable filters for SendGrid to destination email event forwarding. -type IntegrationFilters struct { - // The possible SendGrid email event types for event forwarding. Specify all the email event types that you would like to forward to the Integration's destination. - EmailEvents *[]Items2 `json:"email_events,omitempty"` -} diff --git a/rest/api/v3/integrations/model_integration_input.go b/rest/api/v3/integrations/model_integration_input.go deleted file mode 100644 index 032d394b..00000000 --- a/rest/api/v3/integrations/model_integration_input.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// IntegrationInput struct for IntegrationInput -type IntegrationInput struct { - // The third-party application you would like to forward your events to. - Destination Destination2 `json:"destination"` - Filters IntegrationInputFilters `json:"filters"` - Properties IntegrationInputProperties `json:"properties"` - // The nickname for the Integration. - Label *string `json:"label,omitempty"` -} diff --git a/rest/api/v3/integrations/model_integration_input_filters.go b/rest/api/v3/integrations/model_integration_input_filters.go deleted file mode 100644 index 15f01bb0..00000000 --- a/rest/api/v3/integrations/model_integration_input_filters.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// IntegrationInputFilters The configurable filters for SendGrid to destination email event forwarding. -type IntegrationInputFilters struct { - // The possible SendGrid email event types for event forwarding. Specify all the email event types that you would like to forward to the Integration's destination. - EmailEvents []Items1 `json:"email_events"` -} diff --git a/rest/api/v3/integrations/model_integration_input_properties.go b/rest/api/v3/integrations/model_integration_input_properties.go deleted file mode 100644 index b4c3a181..00000000 --- a/rest/api/v3/integrations/model_integration_input_properties.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// IntegrationInputProperties The properties of an Integration required to send events to a specific third-party application. -type IntegrationInputProperties struct { - // The write key provided by the Segment Source you'd like to have events forwarded to. Must be between 6 and 51 characters. - WriteKey string `json:"write_key"` - // The workspace region where the Segment Source write key lives. - DestinationRegion DestinationRegion1 `json:"destination_region"` -} diff --git a/rest/api/v3/integrations/model_integration_not_found.go b/rest/api/v3/integrations/model_integration_not_found.go deleted file mode 100644 index ae903136..00000000 --- a/rest/api/v3/integrations/model_integration_not_found.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// IntegrationNotFound struct for IntegrationNotFound -type IntegrationNotFound struct { - // The error message tells you the cause of failure. - Message *string `json:"message,omitempty"` -} diff --git a/rest/api/v3/integrations/model_integration_patch.go b/rest/api/v3/integrations/model_integration_patch.go deleted file mode 100644 index 0f43f1a8..00000000 --- a/rest/api/v3/integrations/model_integration_patch.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// IntegrationPatch struct for IntegrationPatch -type IntegrationPatch struct { - // The third-party application you would like to forward your email events to. - Destination *Destination1 `json:"destination,omitempty"` - Filters *IntegrationPatchFilters `json:"filters,omitempty"` - Properties *IntegrationPatchProperties `json:"properties,omitempty"` - // The nickname for the Integration. - Label *string `json:"label,omitempty"` -} diff --git a/rest/api/v3/integrations/model_integration_patch_filters.go b/rest/api/v3/integrations/model_integration_patch_filters.go deleted file mode 100644 index 0ded71fd..00000000 --- a/rest/api/v3/integrations/model_integration_patch_filters.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// IntegrationPatchFilters The configurable filters for SendGrid to destination email event forwarding. -type IntegrationPatchFilters struct { - // The possible SendGrid email event types for event forwarding. Specify all the email event types that you would like to forward to the Integration's destination. - EmailEvents *[]Items `json:"email_events,omitempty"` -} diff --git a/rest/api/v3/integrations/model_integration_patch_properties.go b/rest/api/v3/integrations/model_integration_patch_properties.go deleted file mode 100644 index f8fd78c1..00000000 --- a/rest/api/v3/integrations/model_integration_patch_properties.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// IntegrationPatchProperties The properties of an Integration required to send events to a specific third-party application. -type IntegrationPatchProperties struct { - // The write key provided by the Segment Source you'd like to have events forwarded to. Must be between 6 and 51 characters. - WriteKey *string `json:"write_key,omitempty"` - // The workspace region where the Segment Source write key lives. - DestinationRegion *DestinationRegion `json:"destination_region,omitempty"` -} diff --git a/rest/api/v3/integrations/model_integration_properties.go b/rest/api/v3/integrations/model_integration_properties.go deleted file mode 100644 index 822fec09..00000000 --- a/rest/api/v3/integrations/model_integration_properties.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// IntegrationProperties The properties of an Integration required to send events to a specific third-party application. -type IntegrationProperties struct { - // The write key provided by the Segment Source you'd like to have events forwarded to. Must be between 6 and 51 characters. - WriteKey *string `json:"write_key,omitempty"` - // The workspace region where the Segment Source write key lives. - DestinationRegion *DestinationRegion2 `json:"destination_region,omitempty"` -} diff --git a/rest/api/v3/integrations/model_internal_error.go b/rest/api/v3/integrations/model_internal_error.go deleted file mode 100644 index 34b072b8..00000000 --- a/rest/api/v3/integrations/model_internal_error.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// InternalError struct for InternalError -type InternalError struct { - // The error message tells you the cause of failure. - Message *string `json:"message,omitempty"` -} diff --git a/rest/api/v3/integrations/model_invalid_delete_request.go b/rest/api/v3/integrations/model_invalid_delete_request.go deleted file mode 100644 index 6adbbc72..00000000 --- a/rest/api/v3/integrations/model_invalid_delete_request.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// InvalidDeleteRequest struct for InvalidDeleteRequest -type InvalidDeleteRequest struct { - // The error message tells you the cause of failure. - Message *string `json:"message,omitempty"` - // The parameter shows more information about where the error is. The number in the brackets is the invalid ID indexed. - Parameter *string `json:"parameter,omitempty"` -} diff --git a/rest/api/v3/integrations/model_invalid_request.go b/rest/api/v3/integrations/model_invalid_request.go deleted file mode 100644 index 9fae34ad..00000000 --- a/rest/api/v3/integrations/model_invalid_request.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// InvalidRequest struct for InvalidRequest -type InvalidRequest struct { - // The error message tells you the cause of validation failure(s), separated by commas if there are multiple failures. - Message *string `json:"message,omitempty"` - // The field shows more information on where the error is when available. - Field *string `json:"field,omitempty"` -} diff --git a/rest/api/v3/integrations/model_items.go b/rest/api/v3/integrations/model_items.go deleted file mode 100644 index c90149eb..00000000 --- a/rest/api/v3/integrations/model_items.go +++ /dev/null @@ -1,33 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Items the model 'Items' -type Items string - -// List of Items -const ( - ITEMS_DROP Items = "drop" - ITEMS_PROCESSED Items = "processed" - ITEMS_DEFERRED Items = "deferred" - ITEMS_GROUP_UNSUBSCRIBE Items = "group_unsubscribe" - ITEMS_BOUNCE Items = "bounce" - ITEMS_DELIVERED Items = "delivered" - ITEMS_CLICK Items = "click" - ITEMS_UNSUBSCRIBE Items = "unsubscribe" - ITEMS_OPEN Items = "open" - ITEMS_GROUP_RESUBSCRIBE Items = "group_resubscribe" - ITEMS_SPAMREPORT Items = "spamreport" - ITEMS_MACHINE_OPENED Items = "machine_opened" -) diff --git a/rest/api/v3/integrations/model_items1.go b/rest/api/v3/integrations/model_items1.go deleted file mode 100644 index ff8a80da..00000000 --- a/rest/api/v3/integrations/model_items1.go +++ /dev/null @@ -1,33 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Items1 the model 'Items1' -type Items1 string - -// List of Items1 -const ( - ITEMS1_DROP Items1 = "drop" - ITEMS1_PROCESSED Items1 = "processed" - ITEMS1_DEFERRED Items1 = "deferred" - ITEMS1_GROUP_UNSUBSCRIBE Items1 = "group_unsubscribe" - ITEMS1_BOUNCE Items1 = "bounce" - ITEMS1_DELIVERED Items1 = "delivered" - ITEMS1_CLICK Items1 = "click" - ITEMS1_UNSUBSCRIBE Items1 = "unsubscribe" - ITEMS1_OPEN Items1 = "open" - ITEMS1_GROUP_RESUBSCRIBE Items1 = "group_resubscribe" - ITEMS1_SPAMREPORT Items1 = "spamreport" - ITEMS1_MACHINE_OPENED Items1 = "machine_opened" -) diff --git a/rest/api/v3/integrations/model_items2.go b/rest/api/v3/integrations/model_items2.go deleted file mode 100644 index 1cb6e646..00000000 --- a/rest/api/v3/integrations/model_items2.go +++ /dev/null @@ -1,33 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Integrations API -* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Items2 the model 'Items2' -type Items2 string - -// List of Items2 -const ( - ITEMS2_DROP Items2 = "drop" - ITEMS2_PROCESSED Items2 = "processed" - ITEMS2_DEFERRED Items2 = "deferred" - ITEMS2_GROUP_UNSUBSCRIBE Items2 = "group_unsubscribe" - ITEMS2_BOUNCE Items2 = "bounce" - ITEMS2_DELIVERED Items2 = "delivered" - ITEMS2_CLICK Items2 = "click" - ITEMS2_UNSUBSCRIBE Items2 = "unsubscribe" - ITEMS2_OPEN Items2 = "open" - ITEMS2_GROUP_RESUBSCRIBE Items2 = "group_resubscribe" - ITEMS2_SPAMREPORT Items2 = "spamreport" - ITEMS2_MACHINE_OPENED Items2 = "machine_opened" -) diff --git a/rest/api/v3/ip_access_management/.openapi-generator b/rest/api/v3/ip_access_management/.openapi-generator deleted file mode 100644 index c17313c5..00000000 --- a/rest/api/v3/ip_access_management/.openapi-generator +++ /dev/null @@ -1,34 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_add_ip_to_allow_list.go -api_delete_allowed_ip.go -api_delete_allowed_ips.go -api_get_allowed_ip.go -api_list_access_activity.go -api_list_allowed_ip.go -api_service.go -docs/AddIpToAllowList.md -docs/AddIpToAllowListRequest.md -docs/AddIpToAllowListRequestIpsInner.md -docs/DeleteAllowedIp.md -docs/DeleteAllowedIps.md -docs/DeleteAllowedIpsRequest.md -docs/ErrorResponse.md -docs/ErrorResponseErrorsInner.md -docs/GetAllowedIp.md -docs/IpAccessManagement2xx.md -docs/IpAccessManagement2xxResultInner.md -docs/ListAccessActivity.md -docs/ListAccessActivity200Response.md -docs/ListAccessActivity200ResponseResultInner.md -docs/ListAllowedIp.md -model_add_ip_to_allow_list_request.go -model_add_ip_to_allow_list_request_ips_inner.go -model_delete_allowed_ips_request.go -model_error_response.go -model_error_response_errors_inner.go -model_ip_access_management2xx.go -model_ip_access_management2xx_result_inner.go -model_list_access_activity_200_response.go -model_list_access_activity_200_response_result_inner.go diff --git a/rest/api/v3/ip_access_management/.openapi-generator-ignore b/rest/api/v3/ip_access_management/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/ip_access_management/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/ip_access_management/README.md b/rest/api/v3/ip_access_management/README.md deleted file mode 100644 index 26a4be45..00000000 --- a/rest/api/v3/ip_access_management/README.md +++ /dev/null @@ -1,79 +0,0 @@ -# Go API client for - -IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. - -There is no limit to the number of IP addresses that you can allow. - -It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. - -See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:37.545896+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AddIpToAllowList* | [**AddIpToAllowList**](docs/AddIpToAllowList.md#addiptoallowlist) | **Post** /v3/access_settings/whitelist | Add one or more IPs to the allow list -*DeleteAllowedIp* | [**DeleteAllowedIp**](docs/DeleteAllowedIp.md#deleteallowedip) | **Delete** /v3/access_settings/whitelist/{RuleId} | Remove a specific IP from the allowed list -*DeleteAllowedIps* | [**DeleteAllowedIps**](docs/DeleteAllowedIps.md#deleteallowedips) | **Delete** /v3/access_settings/whitelist | Remove one or more IPs from the allow list -*GetAllowedIp* | [**GetAllowedIp**](docs/GetAllowedIp.md#getallowedip) | **Get** /v3/access_settings/whitelist/{RuleId} | Retrieve a specific allowed IP -*ListAccessActivity* | [**ListAccessActivity**](docs/ListAccessActivity.md#listaccessactivity) | **Get** /v3/access_settings/activity | Retrieve all recent access attempts -*ListAllowedIp* | [**ListAllowedIp**](docs/ListAllowedIp.md#listallowedip) | **Get** /v3/access_settings/whitelist | Retrieve a list of currently allowed IPs - - -## Documentation For Models - - - [AddIpToAllowListRequest](AddIpToAllowListRequest.md) - - [AddIpToAllowListRequestIpsInner](AddIpToAllowListRequestIpsInner.md) - - [DeleteAllowedIpsRequest](DeleteAllowedIpsRequest.md) - - [ErrorResponse](ErrorResponse.md) - - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) - - [IpAccessManagement2xx](IpAccessManagement2xx.md) - - [IpAccessManagement2xxResultInner](IpAccessManagement2xxResultInner.md) - - [ListAccessActivity200Response](ListAccessActivity200Response.md) - - [ListAccessActivity200ResponseResultInner](ListAccessActivity200ResponseResultInner.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/ip_access_management/api_add_ip_to_allow_list.go b/rest/api/v3/ip_access_management/api_add_ip_to_allow_list.go deleted file mode 100644 index cff469da..00000000 --- a/rest/api/v3/ip_access_management/api_add_ip_to_allow_list.go +++ /dev/null @@ -1,98 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Access Management API -* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type AddIpToAllowListParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - AddIpToAllowListRequest *AddIpToAllowListRequest `json:"AddIpToAllowListRequest,omitempty"` -} - -func (params *AddIpToAllowListParam) SetOnbehalfof(Onbehalfof string) *AddIpToAllowListParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *AddIpToAllowListParam) SetAddIpToAllowListRequest(AddIpToAllowListRequest AddIpToAllowListRequest) *AddIpToAllowListParam { - params.AddIpToAllowListRequest = &AddIpToAllowListRequest - return params -} - -// **This endpoint allows you to add one or more allowed IP addresses.** To allow one or more IP addresses, pass them to this endpoint in an array. Once an IP address is added to your allow list, it will be assigned an `id` that can be used to remove the address. You can retrieve the ID associated with an IP using the \"Retrieve a list of currently allowed IPs\" endpoint. -func (c *ApiService) AddIpToAllowList(params *AddIpToAllowListParam) (interface{}, error) { - path := "/v3/access_settings/whitelist" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.AddIpToAllowListRequest != nil { - b, err := json.Marshal(*params.AddIpToAllowListRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &IpAccessManagement2xx{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ip_access_management/api_delete_allowed_ip.go b/rest/api/v3/ip_access_management/api_delete_allowed_ip.go deleted file mode 100644 index c411f9a0..00000000 --- a/rest/api/v3/ip_access_management/api_delete_allowed_ip.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Access Management API -* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteAllowedIpParam struct { - // The ID of the allowed IP address that you want to retrieve. - RuleId *string `json:"rule_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *DeleteAllowedIpParam) SetRuleId(RuleId string) *DeleteAllowedIpParam { - params.RuleId = &RuleId - return params -} -func (params *DeleteAllowedIpParam) SetOnbehalfof(Onbehalfof string) *DeleteAllowedIpParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to remove a specific IP address from your list of allowed addresses.** When removing a specific IP address from your list, you must include the ID in your call. You can retrieve the IDs associated with your allowed IP addresses using the \"Retrieve a list of currently allowed IPs\" endpoint. -func (c *ApiService) DeleteAllowedIp(params *DeleteAllowedIpParam) (interface{}, error) { - path := "/v3/access_settings/whitelist/{RuleId}" - if params != nil && params.RuleId != nil { - path = strings.Replace(path, "{"+"RuleId"+"}", *params.RuleId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ip_access_management/api_delete_allowed_ips.go b/rest/api/v3/ip_access_management/api_delete_allowed_ips.go deleted file mode 100644 index 4e25500a..00000000 --- a/rest/api/v3/ip_access_management/api_delete_allowed_ips.go +++ /dev/null @@ -1,98 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Access Management API -* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type DeleteAllowedIpsParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - DeleteAllowedIpsRequest *DeleteAllowedIpsRequest `json:"DeleteAllowedIpsRequest,omitempty"` -} - -func (params *DeleteAllowedIpsParam) SetOnbehalfof(Onbehalfof string) *DeleteAllowedIpsParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *DeleteAllowedIpsParam) SetDeleteAllowedIpsRequest(DeleteAllowedIpsRequest DeleteAllowedIpsRequest) *DeleteAllowedIpsParam { - params.DeleteAllowedIpsRequest = &DeleteAllowedIpsRequest - return params -} - -// **This endpoint allows you to remove one or more IP addresses from your list of allowed addresses.** To remove one or more IP addresses, pass this endpoint an array containing the ID(s) associated with the IP(s) you intend to remove. You can retrieve the IDs associated with your allowed IP addresses using the \"Retrieve a list of currently allowed IPs\" endpoint. It is possible to remove your own IP address, which will block access to your account. You will need to submit a [support ticket](https://sendgrid.com/docs/ui/account-and-settings/support/) if this happens. For this reason, it is important to double check that you are removing only the IPs you intend to remove when using this endpoint. -func (c *ApiService) DeleteAllowedIps(params *DeleteAllowedIpsParam) (interface{}, error) { - path := "/v3/access_settings/whitelist" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.DeleteAllowedIpsRequest != nil { - b, err := json.Marshal(*params.DeleteAllowedIpsRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ip_access_management/api_get_allowed_ip.go b/rest/api/v3/ip_access_management/api_get_allowed_ip.go deleted file mode 100644 index c11e9af9..00000000 --- a/rest/api/v3/ip_access_management/api_get_allowed_ip.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Access Management API -* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetAllowedIpParam struct { - // The ID of the allowed IP address that you want to retrieve. - RuleId *string `json:"rule_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetAllowedIpParam) SetRuleId(RuleId string) *GetAllowedIpParam { - params.RuleId = &RuleId - return params -} -func (params *GetAllowedIpParam) SetOnbehalfof(Onbehalfof string) *GetAllowedIpParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retreive a specific IP address that has been allowed to access your account.** You must include the ID for the specific IP address you want to retrieve in your call. You can retrieve the IDs associated with your allowed IP addresses using the \"Retrieve a list of currently allowed IPs\" endpoint. -func (c *ApiService) GetAllowedIp(params *GetAllowedIpParam) (interface{}, error) { - path := "/v3/access_settings/whitelist/{RuleId}" - if params != nil && params.RuleId != nil { - path = strings.Replace(path, "{"+"RuleId"+"}", *params.RuleId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &IpAccessManagement2xx{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ip_access_management/api_list_access_activity.go b/rest/api/v3/ip_access_management/api_list_access_activity.go deleted file mode 100644 index 8c9869a5..00000000 --- a/rest/api/v3/ip_access_management/api_list_access_activity.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Access Management API -* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListAccessActivityParam struct { - // Limits the number of IPs to return. - Limit *int32 `json:"limit,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListAccessActivityParam) SetLimit(Limit int32) *ListAccessActivityParam { - params.Limit = &Limit - return params -} -func (params *ListAccessActivityParam) SetOnbehalfof(Onbehalfof string) *ListAccessActivityParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a list of all of the IP addresses that recently attempted to access your account either through the User Interface or the API.** -func (c *ApiService) ListAccessActivity(params *ListAccessActivityParam) (interface{}, error) { - path := "/v3/access_settings/activity" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListAccessActivity200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ip_access_management/api_list_allowed_ip.go b/rest/api/v3/ip_access_management/api_list_allowed_ip.go deleted file mode 100644 index 2274b2b4..00000000 --- a/rest/api/v3/ip_access_management/api_list_allowed_ip.go +++ /dev/null @@ -1,83 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Access Management API -* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListAllowedIpParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListAllowedIpParam) SetOnbehalfof(Onbehalfof string) *ListAllowedIpParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a list of IP addresses that are currently allowed to access your account.** Each IP address returned to you will have `created_at` and `updated_at` dates. Each IP will also be associated with an `id` that can be used to remove the address from your allow list. -func (c *ApiService) ListAllowedIp(params *ListAllowedIpParam) (interface{}, error) { - path := "/v3/access_settings/whitelist" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &IpAccessManagement2xx{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ip_access_management/api_service.go b/rest/api/v3/ip_access_management/api_service.go deleted file mode 100644 index d43663e0..00000000 --- a/rest/api/v3/ip_access_management/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Access Management API -* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/ip_access_management/docs/AddIpToAllowList.md b/rest/api/v3/ip_access_management/docs/AddIpToAllowList.md deleted file mode 100644 index 71f14dd1..00000000 --- a/rest/api/v3/ip_access_management/docs/AddIpToAllowList.md +++ /dev/null @@ -1,49 +0,0 @@ -# AddIpToAllowList - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddIpToAllowList**](AddIpToAllowList.md#AddIpToAllowList) | **Post** /v3/access_settings/whitelist | Add one or more IPs to the allow list - - - -## AddIpToAllowList - -> IpAccessManagement2xx AddIpToAllowList(ctx, optional) - -Add one or more IPs to the allow list - -**This endpoint allows you to add one or more allowed IP addresses.** To allow one or more IP addresses, pass them to this endpoint in an array. Once an IP address is added to your allow list, it will be assigned an `id` that can be used to remove the address. You can retrieve the ID associated with an IP using the \"Retrieve a list of currently allowed IPs\" endpoint. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a AddIpToAllowListParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**AddIpToAllowListRequest** | [**AddIpToAllowListRequest**](AddIpToAllowListRequest.md) | - -### Return type - -[**IpAccessManagement2xx**](IpAccessManagement2xx.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ip_access_management/docs/AddIpToAllowListRequest.md b/rest/api/v3/ip_access_management/docs/AddIpToAllowListRequest.md deleted file mode 100644 index f4318398..00000000 --- a/rest/api/v3/ip_access_management/docs/AddIpToAllowListRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# AddIpToAllowListRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Ips** | [**[]AddIpToAllowListRequestIpsInner**](AddIpToAllowListRequestIpsInner.md) | An array containing the IP(s) you want to allow. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_access_management/docs/AddIpToAllowListRequestIpsInner.md b/rest/api/v3/ip_access_management/docs/AddIpToAllowListRequestIpsInner.md deleted file mode 100644 index 7f0dc81f..00000000 --- a/rest/api/v3/ip_access_management/docs/AddIpToAllowListRequestIpsInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# AddIpToAllowListRequestIpsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Ip** | **string** | An IP address that you want to allow. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_access_management/docs/DeleteAllowedIp.md b/rest/api/v3/ip_access_management/docs/DeleteAllowedIp.md deleted file mode 100644 index 64cf1795..00000000 --- a/rest/api/v3/ip_access_management/docs/DeleteAllowedIp.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeleteAllowedIp - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteAllowedIp**](DeleteAllowedIp.md#DeleteAllowedIp) | **Delete** /v3/access_settings/whitelist/{RuleId} | Remove a specific IP from the allowed list - - - -## DeleteAllowedIp - -> map[string]interface{} DeleteAllowedIp(ctx, RuleIdoptional) - -Remove a specific IP from the allowed list - -**This endpoint allows you to remove a specific IP address from your list of allowed addresses.** When removing a specific IP address from your list, you must include the ID in your call. You can retrieve the IDs associated with your allowed IP addresses using the \"Retrieve a list of currently allowed IPs\" endpoint. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**RuleId** | **string** | The ID of the allowed IP address that you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteAllowedIpParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ip_access_management/docs/DeleteAllowedIps.md b/rest/api/v3/ip_access_management/docs/DeleteAllowedIps.md deleted file mode 100644 index ffe7222a..00000000 --- a/rest/api/v3/ip_access_management/docs/DeleteAllowedIps.md +++ /dev/null @@ -1,49 +0,0 @@ -# DeleteAllowedIps - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteAllowedIps**](DeleteAllowedIps.md#DeleteAllowedIps) | **Delete** /v3/access_settings/whitelist | Remove one or more IPs from the allow list - - - -## DeleteAllowedIps - -> map[string]interface{} DeleteAllowedIps(ctx, optional) - -Remove one or more IPs from the allow list - -**This endpoint allows you to remove one or more IP addresses from your list of allowed addresses.** To remove one or more IP addresses, pass this endpoint an array containing the ID(s) associated with the IP(s) you intend to remove. You can retrieve the IDs associated with your allowed IP addresses using the \"Retrieve a list of currently allowed IPs\" endpoint. It is possible to remove your own IP address, which will block access to your account. You will need to submit a [support ticket](https://sendgrid.com/docs/ui/account-and-settings/support/) if this happens. For this reason, it is important to double check that you are removing only the IPs you intend to remove when using this endpoint. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteAllowedIpsParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**DeleteAllowedIpsRequest** | [**DeleteAllowedIpsRequest**](DeleteAllowedIpsRequest.md) | - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ip_access_management/docs/DeleteAllowedIpsRequest.md b/rest/api/v3/ip_access_management/docs/DeleteAllowedIpsRequest.md deleted file mode 100644 index 9c466261..00000000 --- a/rest/api/v3/ip_access_management/docs/DeleteAllowedIpsRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeleteAllowedIpsRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Ids** | **[]int32** | An array of the IDs of the IP address that you want to remove from your allow list. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_access_management/docs/ErrorResponse.md b/rest/api/v3/ip_access_management/docs/ErrorResponse.md deleted file mode 100644 index ec2d41f6..00000000 --- a/rest/api/v3/ip_access_management/docs/ErrorResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ErrorResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] -**Id** | **string** | When applicable, this property value will be an error ID. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_access_management/docs/ErrorResponseErrorsInner.md b/rest/api/v3/ip_access_management/docs/ErrorResponseErrorsInner.md deleted file mode 100644 index 5449c685..00000000 --- a/rest/api/v3/ip_access_management/docs/ErrorResponseErrorsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ErrorResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | An error message. |[optional] -**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] -**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_access_management/docs/GetAllowedIp.md b/rest/api/v3/ip_access_management/docs/GetAllowedIp.md deleted file mode 100644 index 4ea75448..00000000 --- a/rest/api/v3/ip_access_management/docs/GetAllowedIp.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetAllowedIp - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetAllowedIp**](GetAllowedIp.md#GetAllowedIp) | **Get** /v3/access_settings/whitelist/{RuleId} | Retrieve a specific allowed IP - - - -## GetAllowedIp - -> IpAccessManagement2xx GetAllowedIp(ctx, RuleIdoptional) - -Retrieve a specific allowed IP - -**This endpoint allows you to retreive a specific IP address that has been allowed to access your account.** You must include the ID for the specific IP address you want to retrieve in your call. You can retrieve the IDs associated with your allowed IP addresses using the \"Retrieve a list of currently allowed IPs\" endpoint. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**RuleId** | **string** | The ID of the allowed IP address that you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a GetAllowedIpParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**IpAccessManagement2xx**](IpAccessManagement2xx.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ip_access_management/docs/IpAccessManagement2xx.md b/rest/api/v3/ip_access_management/docs/IpAccessManagement2xx.md deleted file mode 100644 index 5391826f..00000000 --- a/rest/api/v3/ip_access_management/docs/IpAccessManagement2xx.md +++ /dev/null @@ -1,11 +0,0 @@ -# IpAccessManagement2xx - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]IpAccessManagement2xxResultInner**](IpAccessManagement2xxResultInner.md) | An array listing one or more of your allowed IPs. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_access_management/docs/IpAccessManagement2xxResultInner.md b/rest/api/v3/ip_access_management/docs/IpAccessManagement2xxResultInner.md deleted file mode 100644 index 853651fa..00000000 --- a/rest/api/v3/ip_access_management/docs/IpAccessManagement2xxResultInner.md +++ /dev/null @@ -1,14 +0,0 @@ -# IpAccessManagement2xxResultInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int32** | The ID of the allowed IP. |[optional] -**Ip** | **string** | The allowed IP. |[optional] -**CreatedAt** | **int32** | A Unix timestamp indicating when the IP was added to the allow list. |[optional] -**UpdatedAt** | **int32** | A Unix timestamp indicating when the IPs allow status was most recently updated. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_access_management/docs/ListAccessActivity.md b/rest/api/v3/ip_access_management/docs/ListAccessActivity.md deleted file mode 100644 index ef433ccb..00000000 --- a/rest/api/v3/ip_access_management/docs/ListAccessActivity.md +++ /dev/null @@ -1,49 +0,0 @@ -# ListAccessActivity - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListAccessActivity**](ListAccessActivity.md#ListAccessActivity) | **Get** /v3/access_settings/activity | Retrieve all recent access attempts - - - -## ListAccessActivity - -> ListAccessActivity200Response ListAccessActivity(ctx, optional) - -Retrieve all recent access attempts - -**This endpoint allows you to retrieve a list of all of the IP addresses that recently attempted to access your account either through the User Interface or the API.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListAccessActivityParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Limit** | **int32** | Limits the number of IPs to return. -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListAccessActivity200Response**](ListAccessActivity200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ip_access_management/docs/ListAccessActivity200Response.md b/rest/api/v3/ip_access_management/docs/ListAccessActivity200Response.md deleted file mode 100644 index b78a8525..00000000 --- a/rest/api/v3/ip_access_management/docs/ListAccessActivity200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListAccessActivity200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]ListAccessActivity200ResponseResultInner**](ListAccessActivity200ResponseResultInner.md) | An array containing the IPs that recently attempted to access your account. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_access_management/docs/ListAccessActivity200ResponseResultInner.md b/rest/api/v3/ip_access_management/docs/ListAccessActivity200ResponseResultInner.md deleted file mode 100644 index 8ca798d0..00000000 --- a/rest/api/v3/ip_access_management/docs/ListAccessActivity200ResponseResultInner.md +++ /dev/null @@ -1,16 +0,0 @@ -# ListAccessActivity200ResponseResultInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Allowed** | **bool** | Indicates if the IP address was granted access to the account. | -**AuthMethod** | **string** | The authentication method used when attempting access. | -**FirstAt** | **int32** | A Unix timestamp indicating when the first access attempt was made. | -**Ip** | **string** | The IP addressed used during the access attempt. | -**LastAt** | **int32** | A Unix timestamp indicating when the most recent access attempt was made | -**Location** | **string** | The geographic location from which the access attempt originated. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_access_management/docs/ListAllowedIp.md b/rest/api/v3/ip_access_management/docs/ListAllowedIp.md deleted file mode 100644 index 00008876..00000000 --- a/rest/api/v3/ip_access_management/docs/ListAllowedIp.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListAllowedIp - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListAllowedIp**](ListAllowedIp.md#ListAllowedIp) | **Get** /v3/access_settings/whitelist | Retrieve a list of currently allowed IPs - - - -## ListAllowedIp - -> IpAccessManagement2xx ListAllowedIp(ctx, optional) - -Retrieve a list of currently allowed IPs - -**This endpoint allows you to retrieve a list of IP addresses that are currently allowed to access your account.** Each IP address returned to you will have `created_at` and `updated_at` dates. Each IP will also be associated with an `id` that can be used to remove the address from your allow list. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListAllowedIpParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**IpAccessManagement2xx**](IpAccessManagement2xx.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ip_access_management/model_add_ip_to_allow_list_request.go b/rest/api/v3/ip_access_management/model_add_ip_to_allow_list_request.go deleted file mode 100644 index 023d725d..00000000 --- a/rest/api/v3/ip_access_management/model_add_ip_to_allow_list_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Access Management API -* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AddIpToAllowListRequest struct for AddIpToAllowListRequest -type AddIpToAllowListRequest struct { - // An array containing the IP(s) you want to allow. - Ips []AddIpToAllowListRequestIpsInner `json:"ips"` -} diff --git a/rest/api/v3/ip_access_management/model_add_ip_to_allow_list_request_ips_inner.go b/rest/api/v3/ip_access_management/model_add_ip_to_allow_list_request_ips_inner.go deleted file mode 100644 index 34ad310c..00000000 --- a/rest/api/v3/ip_access_management/model_add_ip_to_allow_list_request_ips_inner.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Access Management API -* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AddIpToAllowListRequestIpsInner struct for AddIpToAllowListRequestIpsInner -type AddIpToAllowListRequestIpsInner struct { - // An IP address that you want to allow. - Ip string `json:"ip"` -} diff --git a/rest/api/v3/ip_access_management/model_delete_allowed_ips_request.go b/rest/api/v3/ip_access_management/model_delete_allowed_ips_request.go deleted file mode 100644 index ceba5206..00000000 --- a/rest/api/v3/ip_access_management/model_delete_allowed_ips_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Access Management API -* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DeleteAllowedIpsRequest struct for DeleteAllowedIpsRequest -type DeleteAllowedIpsRequest struct { - // An array of the IDs of the IP address that you want to remove from your allow list. - Ids *[]int32 `json:"ids,omitempty"` -} diff --git a/rest/api/v3/ip_access_management/model_error_response.go b/rest/api/v3/ip_access_management/model_error_response.go deleted file mode 100644 index 025b609b..00000000 --- a/rest/api/v3/ip_access_management/model_error_response.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Access Management API -* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponse struct for ErrorResponse -type ErrorResponse struct { - Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` - // When applicable, this property value will be an error ID. - Id *string `json:"id,omitempty"` -} diff --git a/rest/api/v3/ip_access_management/model_error_response_errors_inner.go b/rest/api/v3/ip_access_management/model_error_response_errors_inner.go deleted file mode 100644 index 02c85e55..00000000 --- a/rest/api/v3/ip_access_management/model_error_response_errors_inner.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Access Management API -* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner -type ErrorResponseErrorsInner struct { - // An error message. - Message *string `json:"message,omitempty"` - // When applicable, this property value will be the field that generated the error. - Field *string `json:"field,omitempty"` - // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. - Help *map[string]interface{} `json:"help,omitempty"` -} diff --git a/rest/api/v3/ip_access_management/model_ip_access_management2xx.go b/rest/api/v3/ip_access_management/model_ip_access_management2xx.go deleted file mode 100644 index 868be517..00000000 --- a/rest/api/v3/ip_access_management/model_ip_access_management2xx.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Access Management API -* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// IpAccessManagement2xx struct for IpAccessManagement2xx -type IpAccessManagement2xx struct { - // An array listing one or more of your allowed IPs. - Result *[]IpAccessManagement2xxResultInner `json:"result,omitempty"` -} diff --git a/rest/api/v3/ip_access_management/model_ip_access_management2xx_result_inner.go b/rest/api/v3/ip_access_management/model_ip_access_management2xx_result_inner.go deleted file mode 100644 index ea547bb2..00000000 --- a/rest/api/v3/ip_access_management/model_ip_access_management2xx_result_inner.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Access Management API -* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// IpAccessManagement2xxResultInner struct for IpAccessManagement2xxResultInner -type IpAccessManagement2xxResultInner struct { - // The ID of the allowed IP. - Id *int32 `json:"id,omitempty"` - // The allowed IP. - Ip *string `json:"ip,omitempty"` - // A Unix timestamp indicating when the IP was added to the allow list. - CreatedAt *int32 `json:"created_at,omitempty"` - // A Unix timestamp indicating when the IPs allow status was most recently updated. - UpdatedAt *int32 `json:"updated_at,omitempty"` -} diff --git a/rest/api/v3/ip_access_management/model_list_access_activity_200_response.go b/rest/api/v3/ip_access_management/model_list_access_activity_200_response.go deleted file mode 100644 index f39f3d16..00000000 --- a/rest/api/v3/ip_access_management/model_list_access_activity_200_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Access Management API -* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListAccessActivity200Response struct for ListAccessActivity200Response -type ListAccessActivity200Response struct { - // An array containing the IPs that recently attempted to access your account. - Result []ListAccessActivity200ResponseResultInner `json:"result"` -} diff --git a/rest/api/v3/ip_access_management/model_list_access_activity_200_response_result_inner.go b/rest/api/v3/ip_access_management/model_list_access_activity_200_response_result_inner.go deleted file mode 100644 index b1a28ff3..00000000 --- a/rest/api/v3/ip_access_management/model_list_access_activity_200_response_result_inner.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Access Management API -* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListAccessActivity200ResponseResultInner struct for ListAccessActivity200ResponseResultInner -type ListAccessActivity200ResponseResultInner struct { - // Indicates if the IP address was granted access to the account. - Allowed bool `json:"allowed"` - // The authentication method used when attempting access. - AuthMethod string `json:"auth_method"` - // A Unix timestamp indicating when the first access attempt was made. - FirstAt int32 `json:"first_at"` - // The IP addressed used during the access attempt. - Ip string `json:"ip"` - // A Unix timestamp indicating when the most recent access attempt was made - LastAt int32 `json:"last_at"` - // The geographic location from which the access attempt originated. - Location string `json:"location"` -} diff --git a/rest/api/v3/ip_address_management/.openapi-generator b/rest/api/v3/ip_address_management/.openapi-generator deleted file mode 100644 index 228b2a71..00000000 --- a/rest/api/v3/ip_address_management/.openapi-generator +++ /dev/null @@ -1,124 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_add_ip.go -api_add_ips_to_ip_pool.go -api_add_sub_users_to_ip.go -api_create_ip_pool.go -api_delete_ip_pool.go -api_delete_ips_from_ip_pool.go -api_delete_sub_users_from_ip.go -api_get_ip.go -api_get_ip_pool.go -api_list_ip.go -api_list_ip_assigned_to_ip_pool.go -api_list_ip_pool.go -api_list_sub_user_assigned_to_ip.go -api_service.go -api_update_ip.go -api_update_ip_pool.go -docs/AddIp.md -docs/AddIp201Response.md -docs/AddIpRequest.md -docs/AddIpsToIpPool.md -docs/AddIpsToIpPool200Response.md -docs/AddIpsToIpPoolRequest.md -docs/AddSubUsersToIp.md -docs/AddSubUsersToIp200Response.md -docs/AddSubUsersToIpRequest.md -docs/CreateIpPool.md -docs/CreateIpPool201Response.md -docs/CreateIpPoolRequest.md -docs/DeleteIpPool.md -docs/DeleteIpsFromIpPool.md -docs/DeleteIpsFromIpPoolRequest.md -docs/DeleteSubUsersFromIp.md -docs/DeleteSubUsersFromIpRequest.md -docs/GetIp.md -docs/GetIp200Response.md -docs/GetIp200ResponsePoolsInner.md -docs/GetIpPool.md -docs/GetIpPool200Response.md -docs/GetIpPool200ResponseIpCountByRegionInner.md -docs/IpAddressManagementErrorResponse.md -docs/IpAddressManagementErrorResponseErrorsInner.md -docs/Items.md -docs/ListIp.md -docs/ListIp200Response.md -docs/ListIp200ResponseMetadata.md -docs/ListIp200ResponseMetadataNextParams.md -docs/ListIp200ResponseResultInner.md -docs/ListIp200ResponseResultInnerPoolsInner.md -docs/ListIpAssignedToIpPool.md -docs/ListIpAssignedToIpPool200Response.md -docs/ListIpAssignedToIpPool200ResponseMetadata.md -docs/ListIpAssignedToIpPool200ResponseMetadataNextParams.md -docs/ListIpAssignedToIpPool200ResponseResultInner.md -docs/ListIpPool.md -docs/ListIpPool200Response.md -docs/ListIpPool200ResponseMetadata.md -docs/ListIpPool200ResponseMetadataNextParams.md -docs/ListIpPool200ResponseResultInner.md -docs/ListSubUserAssignedToIp.md -docs/ListSubUserAssignedToIp200Response.md -docs/ListSubUserAssignedToIp200ResponseMetadata.md -docs/ListSubUserAssignedToIp200ResponseMetadataNextParams.md -docs/Region.md -docs/Region1.md -docs/Region2.md -docs/Region3.md -docs/Region4.md -docs/Region5.md -docs/Region6.md -docs/Region7.md -docs/UpdateIp.md -docs/UpdateIp200Response.md -docs/UpdateIpPool.md -docs/UpdateIpPool200Response.md -docs/UpdateIpPoolRequest.md -docs/UpdateIpRequest.md -model_add_ip_201_response.go -model_add_ip_request.go -model_add_ips_to_ip_pool_200_response.go -model_add_ips_to_ip_pool_request.go -model_add_sub_users_to_ip_200_response.go -model_add_sub_users_to_ip_request.go -model_create_ip_pool_201_response.go -model_create_ip_pool_request.go -model_delete_ips_from_ip_pool_request.go -model_delete_sub_users_from_ip_request.go -model_get_ip_200_response.go -model_get_ip_200_response_pools_inner.go -model_get_ip_pool_200_response.go -model_get_ip_pool_200_response_ip_count_by_region_inner.go -model_ip_address_management_error_response.go -model_ip_address_management_error_response_errors_inner.go -model_items.go -model_list_ip_200_response.go -model_list_ip_200_response__metadata.go -model_list_ip_200_response__metadata_next_params.go -model_list_ip_200_response_result_inner.go -model_list_ip_200_response_result_inner_pools_inner.go -model_list_ip_assigned_to_ip_pool_200_response.go -model_list_ip_assigned_to_ip_pool_200_response__metadata.go -model_list_ip_assigned_to_ip_pool_200_response__metadata_next_params.go -model_list_ip_assigned_to_ip_pool_200_response_result_inner.go -model_list_ip_pool_200_response.go -model_list_ip_pool_200_response__metadata.go -model_list_ip_pool_200_response__metadata_next_params.go -model_list_ip_pool_200_response_result_inner.go -model_list_sub_user_assigned_to_ip_200_response.go -model_list_sub_user_assigned_to_ip_200_response__metadata.go -model_list_sub_user_assigned_to_ip_200_response__metadata_next_params.go -model_region.go -model_region1.go -model_region2.go -model_region3.go -model_region4.go -model_region5.go -model_region6.go -model_region7.go -model_update_ip_200_response.go -model_update_ip_pool_200_response.go -model_update_ip_pool_request.go -model_update_ip_request.go diff --git a/rest/api/v3/ip_address_management/.openapi-generator-ignore b/rest/api/v3/ip_address_management/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/ip_address_management/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/ip_address_management/README.md b/rest/api/v3/ip_address_management/README.md deleted file mode 100644 index eb8a9ce3..00000000 --- a/rest/api/v3/ip_address_management/README.md +++ /dev/null @@ -1,118 +0,0 @@ -# Go API client for - -The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:37.587585+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AddIp* | [**AddIp**](docs/AddIp.md#addip) | **Post** /v3/send_ips/ips | Add a Twilio SendGrid IP Address -*AddIpsToIpPool* | [**AddIpsToIpPool**](docs/AddIpsToIpPool.md#addipstoippool) | **Post** /v3/send_ips/pools/{Poolid}/ips:batchAdd | Add a Batch of IPs to an IP Pool -*AddSubUsersToIp* | [**AddSubUsersToIp**](docs/AddSubUsersToIp.md#addsubuserstoip) | **Post** /v3/send_ips/ips/{Ip}/subusers:batchAdd | Assign a Batch of Subusers to an IP -*CreateIpPool* | [**CreateIpPool**](docs/CreateIpPool.md#createippool) | **Post** /v3/send_ips/pools | Create an IP Pool with a Name and IP Assignments -*DeleteIpPool* | [**DeleteIpPool**](docs/DeleteIpPool.md#deleteippool) | **Delete** /v3/send_ips/pools/{Poolid} | Delete IP Pool -*DeleteIpsFromIpPool* | [**DeleteIpsFromIpPool**](docs/DeleteIpsFromIpPool.md#deleteipsfromippool) | **Post** /v3/send_ips/pools/{Poolid}/ips:batchDelete | Delete a Batch of IPs from an IP Pool -*DeleteSubUsersFromIp* | [**DeleteSubUsersFromIp**](docs/DeleteSubUsersFromIp.md#deletesubusersfromip) | **Post** /v3/send_ips/ips/{Ip}/subusers:batchDelete | Delete a Batch of Subusers from an IP -*GetIp* | [**GetIp**](docs/GetIp.md#getip) | **Get** /v3/send_ips/ips/{Ip} | Get Details for an IP Address -*GetIpPool* | [**GetIpPool**](docs/GetIpPool.md#getippool) | **Get** /v3/send_ips/pools/{Poolid} | Get Details for an IP Pool -*ListIp* | [**ListIp**](docs/ListIp.md#listip) | **Get** /v3/send_ips/ips | Get a List of all IP Addresses on your Account -*ListIpAssignedToIpPool* | [**ListIpAssignedToIpPool**](docs/ListIpAssignedToIpPool.md#listipassignedtoippool) | **Get** /v3/send_ips/pools/{Poolid}/ips | Get IPs Assigned to an IP Pool -*ListIpPool* | [**ListIpPool**](docs/ListIpPool.md#listippool) | **Get** /v3/send_ips/pools | GET all IP Pools that have Associated IPs -*ListSubUserAssignedToIp* | [**ListSubUserAssignedToIp**](docs/ListSubUserAssignedToIp.md#listsubuserassignedtoip) | **Get** /v3/send_ips/ips/{Ip}/subusers | Get a List of Subusers Assigned to an IP -*UpdateIp* | [**UpdateIp**](docs/UpdateIp.md#updateip) | **Patch** /v3/send_ips/ips/{Ip} | Update Details for an IP Address -*UpdateIpPool* | [**UpdateIpPool**](docs/UpdateIpPool.md#updateippool) | **Put** /v3/send_ips/pools/{Poolid} | Update an IP Pool Name - - -## Documentation For Models - - - [AddIp201Response](AddIp201Response.md) - - [AddIpRequest](AddIpRequest.md) - - [AddIpsToIpPool200Response](AddIpsToIpPool200Response.md) - - [AddIpsToIpPoolRequest](AddIpsToIpPoolRequest.md) - - [AddSubUsersToIp200Response](AddSubUsersToIp200Response.md) - - [AddSubUsersToIpRequest](AddSubUsersToIpRequest.md) - - [CreateIpPool201Response](CreateIpPool201Response.md) - - [CreateIpPoolRequest](CreateIpPoolRequest.md) - - [DeleteIpsFromIpPoolRequest](DeleteIpsFromIpPoolRequest.md) - - [DeleteSubUsersFromIpRequest](DeleteSubUsersFromIpRequest.md) - - [GetIp200Response](GetIp200Response.md) - - [GetIp200ResponsePoolsInner](GetIp200ResponsePoolsInner.md) - - [GetIpPool200Response](GetIpPool200Response.md) - - [GetIpPool200ResponseIpCountByRegionInner](GetIpPool200ResponseIpCountByRegionInner.md) - - [IpAddressManagementErrorResponse](IpAddressManagementErrorResponse.md) - - [IpAddressManagementErrorResponseErrorsInner](IpAddressManagementErrorResponseErrorsInner.md) - - [Items](Items.md) - - [ListIp200Response](ListIp200Response.md) - - [ListIp200ResponseMetadata](ListIp200ResponseMetadata.md) - - [ListIp200ResponseMetadataNextParams](ListIp200ResponseMetadataNextParams.md) - - [ListIp200ResponseResultInner](ListIp200ResponseResultInner.md) - - [ListIp200ResponseResultInnerPoolsInner](ListIp200ResponseResultInnerPoolsInner.md) - - [ListIpAssignedToIpPool200Response](ListIpAssignedToIpPool200Response.md) - - [ListIpAssignedToIpPool200ResponseMetadata](ListIpAssignedToIpPool200ResponseMetadata.md) - - [ListIpAssignedToIpPool200ResponseMetadataNextParams](ListIpAssignedToIpPool200ResponseMetadataNextParams.md) - - [ListIpAssignedToIpPool200ResponseResultInner](ListIpAssignedToIpPool200ResponseResultInner.md) - - [ListIpPool200Response](ListIpPool200Response.md) - - [ListIpPool200ResponseMetadata](ListIpPool200ResponseMetadata.md) - - [ListIpPool200ResponseMetadataNextParams](ListIpPool200ResponseMetadataNextParams.md) - - [ListIpPool200ResponseResultInner](ListIpPool200ResponseResultInner.md) - - [ListSubUserAssignedToIp200Response](ListSubUserAssignedToIp200Response.md) - - [ListSubUserAssignedToIp200ResponseMetadata](ListSubUserAssignedToIp200ResponseMetadata.md) - - [ListSubUserAssignedToIp200ResponseMetadataNextParams](ListSubUserAssignedToIp200ResponseMetadataNextParams.md) - - [Region](Region.md) - - [Region1](Region1.md) - - [Region2](Region2.md) - - [Region3](Region3.md) - - [Region4](Region4.md) - - [Region5](Region5.md) - - [Region6](Region6.md) - - [Region7](Region7.md) - - [UpdateIp200Response](UpdateIp200Response.md) - - [UpdateIpPool200Response](UpdateIpPool200Response.md) - - [UpdateIpPoolRequest](UpdateIpPoolRequest.md) - - [UpdateIpRequest](UpdateIpRequest.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/ip_address_management/api_add_ip.go b/rest/api/v3/ip_address_management/api_add_ip.go deleted file mode 100644 index 95a077bf..00000000 --- a/rest/api/v3/ip_address_management/api_add_ip.go +++ /dev/null @@ -1,89 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type AddIpParam struct { - // - AddIpRequest *AddIpRequest `json:"AddIpRequest,omitempty"` -} - -func (params *AddIpParam) SetAddIpRequest(AddIpRequest AddIpRequest) *AddIpParam { - params.AddIpRequest = &AddIpRequest - return params -} - -// This operation adds a Twilio SendGrid IP address to your account. You can also assign up to 100 Subusers to the IP address at creation. -func (c *ApiService) AddIp(params *AddIpParam) (interface{}, error) { - path := "/v3/send_ips/ips" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.AddIpRequest != nil { - b, err := json.Marshal(*params.AddIpRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &AddIp201Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ip_address_management/api_add_ips_to_ip_pool.go b/rest/api/v3/ip_address_management/api_add_ips_to_ip_pool.go deleted file mode 100644 index b76d00b5..00000000 --- a/rest/api/v3/ip_address_management/api_add_ips_to_ip_pool.go +++ /dev/null @@ -1,100 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type AddIpsToIpPoolParam struct { - // Specifies the unique ID for an IP Pool. - Poolid *string `json:"poolid"` - // - AddIpsToIpPoolRequest *AddIpsToIpPoolRequest `json:"AddIpsToIpPoolRequest,omitempty"` -} - -func (params *AddIpsToIpPoolParam) SetPoolid(Poolid string) *AddIpsToIpPoolParam { - params.Poolid = &Poolid - return params -} -func (params *AddIpsToIpPoolParam) SetAddIpsToIpPoolRequest(AddIpsToIpPoolRequest AddIpsToIpPoolRequest) *AddIpsToIpPoolParam { - params.AddIpsToIpPoolRequest = &AddIpsToIpPoolRequest - return params -} - -// This operation appends a batch of IPs to an IP Pool. This operation requires all IP assignments to succeed. If any IP assignments fail, this endpoint will return an error. -func (c *ApiService) AddIpsToIpPool(params *AddIpsToIpPoolParam) (interface{}, error) { - path := "/v3/send_ips/pools/{Poolid}/ips:batchAdd" - if params != nil && params.Poolid != nil { - path = strings.Replace(path, "{"+"Poolid"+"}", *params.Poolid, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.AddIpsToIpPoolRequest != nil { - b, err := json.Marshal(*params.AddIpsToIpPoolRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &AddIpsToIpPool200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ip_address_management/api_add_sub_users_to_ip.go b/rest/api/v3/ip_address_management/api_add_sub_users_to_ip.go deleted file mode 100644 index a816b730..00000000 --- a/rest/api/v3/ip_address_management/api_add_sub_users_to_ip.go +++ /dev/null @@ -1,100 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type AddSubUsersToIpParam struct { - // The `ip` path parameter specifies an IP address to make the request against. - Ip *string `json:"ip"` - // - AddSubUsersToIpRequest *AddSubUsersToIpRequest `json:"AddSubUsersToIpRequest,omitempty"` -} - -func (params *AddSubUsersToIpParam) SetIp(Ip string) *AddSubUsersToIpParam { - params.Ip = &Ip - return params -} -func (params *AddSubUsersToIpParam) SetAddSubUsersToIpRequest(AddSubUsersToIpRequest AddSubUsersToIpRequest) *AddSubUsersToIpParam { - params.AddSubUsersToIpRequest = &AddSubUsersToIpRequest - return params -} - -// This operation appends a batch of Subusers to a specified IP address. This endpoint requires all Subuser assignments to succeed. If a Subuser assignment fails, this endpoint will return an error. -func (c *ApiService) AddSubUsersToIp(params *AddSubUsersToIpParam) (interface{}, error) { - path := "/v3/send_ips/ips/{Ip}/subusers:batchAdd" - if params != nil && params.Ip != nil { - path = strings.Replace(path, "{"+"Ip"+"}", *params.Ip, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.AddSubUsersToIpRequest != nil { - b, err := json.Marshal(*params.AddSubUsersToIpRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &AddSubUsersToIp200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ip_address_management/api_create_ip_pool.go b/rest/api/v3/ip_address_management/api_create_ip_pool.go deleted file mode 100644 index 0bbc040a..00000000 --- a/rest/api/v3/ip_address_management/api_create_ip_pool.go +++ /dev/null @@ -1,89 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type CreateIpPoolParam struct { - // - CreateIpPoolRequest *CreateIpPoolRequest `json:"CreateIpPoolRequest,omitempty"` -} - -func (params *CreateIpPoolParam) SetCreateIpPoolRequest(CreateIpPoolRequest CreateIpPoolRequest) *CreateIpPoolParam { - params.CreateIpPoolRequest = &CreateIpPoolRequest - return params -} - -// This operation will create a named IP Pool and associate specified IP addresses with the newly created Pool. This operation requires all IP assignments to succeed. If any IP assignments fail, this endpoint will return an error and the Pool will not be created. Each IP Pool may have a maximum of 100 assigned IP addresses. -func (c *ApiService) CreateIpPool(params *CreateIpPoolParam) (interface{}, error) { - path := "/v3/send_ips/pools" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.CreateIpPoolRequest != nil { - b, err := json.Marshal(*params.CreateIpPoolRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &CreateIpPool201Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ip_address_management/api_delete_ip_pool.go b/rest/api/v3/ip_address_management/api_delete_ip_pool.go deleted file mode 100644 index b63d0cd0..00000000 --- a/rest/api/v3/ip_address_management/api_delete_ip_pool.go +++ /dev/null @@ -1,77 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteIpPoolParam struct { - // Specifies the unique ID for an IP Pool. - Poolid *string `json:"poolid"` -} - -func (params *DeleteIpPoolParam) SetPoolid(Poolid string) *DeleteIpPoolParam { - params.Poolid = &Poolid - return params -} - -// This operation deletes an IP Pool and unassigns all IP addresses associated with the Pool. IP addresses associated with the deleted Pool will remain in your account. -func (c *ApiService) DeleteIpPool(params *DeleteIpPoolParam) (interface{}, error) { - path := "/v3/send_ips/pools/{Poolid}" - if params != nil && params.Poolid != nil { - path = strings.Replace(path, "{"+"Poolid"+"}", *params.Poolid, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 400 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ip_address_management/api_delete_ips_from_ip_pool.go b/rest/api/v3/ip_address_management/api_delete_ips_from_ip_pool.go deleted file mode 100644 index a3016366..00000000 --- a/rest/api/v3/ip_address_management/api_delete_ips_from_ip_pool.go +++ /dev/null @@ -1,92 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteIpsFromIpPoolParam struct { - // Specifies the unique ID for an IP Pool. - Poolid *string `json:"poolid"` - // - DeleteIpsFromIpPoolRequest *DeleteIpsFromIpPoolRequest `json:"DeleteIpsFromIpPoolRequest,omitempty"` -} - -func (params *DeleteIpsFromIpPoolParam) SetPoolid(Poolid string) *DeleteIpsFromIpPoolParam { - params.Poolid = &Poolid - return params -} -func (params *DeleteIpsFromIpPoolParam) SetDeleteIpsFromIpPoolRequest(DeleteIpsFromIpPoolRequest DeleteIpsFromIpPoolRequest) *DeleteIpsFromIpPoolParam { - params.DeleteIpsFromIpPoolRequest = &DeleteIpsFromIpPoolRequest - return params -} - -// This operation removes a batch of IPs from an IP Pool. All IPs associated with the Pool will be unassigned from the deleted Pool. However, this operation does not remove the IPs from your account. -func (c *ApiService) DeleteIpsFromIpPool(params *DeleteIpsFromIpPoolParam) (interface{}, error) { - path := "/v3/send_ips/pools/{Poolid}/ips:batchDelete" - if params != nil && params.Poolid != nil { - path = strings.Replace(path, "{"+"Poolid"+"}", *params.Poolid, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.DeleteIpsFromIpPoolRequest != nil { - b, err := json.Marshal(*params.DeleteIpsFromIpPoolRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 400 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ip_address_management/api_delete_sub_users_from_ip.go b/rest/api/v3/ip_address_management/api_delete_sub_users_from_ip.go deleted file mode 100644 index 87f8cafa..00000000 --- a/rest/api/v3/ip_address_management/api_delete_sub_users_from_ip.go +++ /dev/null @@ -1,92 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteSubUsersFromIpParam struct { - // The `ip` path parameter specifies an IP address to make the request against. - Ip *string `json:"ip"` - // - DeleteSubUsersFromIpRequest *DeleteSubUsersFromIpRequest `json:"DeleteSubUsersFromIpRequest,omitempty"` -} - -func (params *DeleteSubUsersFromIpParam) SetIp(Ip string) *DeleteSubUsersFromIpParam { - params.Ip = &Ip - return params -} -func (params *DeleteSubUsersFromIpParam) SetDeleteSubUsersFromIpRequest(DeleteSubUsersFromIpRequest DeleteSubUsersFromIpRequest) *DeleteSubUsersFromIpParam { - params.DeleteSubUsersFromIpRequest = &DeleteSubUsersFromIpRequest - return params -} - -// This operation removes a batch of Subusers from a specified IP address. -func (c *ApiService) DeleteSubUsersFromIp(params *DeleteSubUsersFromIpParam) (interface{}, error) { - path := "/v3/send_ips/ips/{Ip}/subusers:batchDelete" - if params != nil && params.Ip != nil { - path = strings.Replace(path, "{"+"Ip"+"}", *params.Ip, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.DeleteSubUsersFromIpRequest != nil { - b, err := json.Marshal(*params.DeleteSubUsersFromIpRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 400 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ip_address_management/api_get_ip.go b/rest/api/v3/ip_address_management/api_get_ip.go deleted file mode 100644 index ac3e99c1..00000000 --- a/rest/api/v3/ip_address_management/api_get_ip.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type GetIpParam struct { - // Boolean indicating whether or not to return the IP Pool's region information in the response. - IncludeRegion *bool `json:"include_region,omitempty"` -} - -func (params *GetIpParam) SetIncludeRegion(IncludeRegion bool) *GetIpParam { - params.IncludeRegion = &IncludeRegion - return params -} - -// This operation returns details for a specified IP address. Details include whether the IP is assigned to a parent account, set to warm up automatically, which Pools the IP is associated with, when the IP was added and modified, whether the IP is leased, and whether the IP is enabled. Note that this operation will not return Subuser information associated with the IP. To retrieve Subuser information, use the \"Get a List of Subusers Assigned to an IP\" endpoint. -func (c *ApiService) GetIp(params *GetIpParam) (interface{}, error) { - path := "/v3/send_ips/ips/{Ip}" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.IncludeRegion != nil { - data.Set("include_region", fmt.Sprint(*params.IncludeRegion)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &GetIp200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ip_address_management/api_get_ip_pool.go b/rest/api/v3/ip_address_management/api_get_ip_pool.go deleted file mode 100644 index 3b948455..00000000 --- a/rest/api/v3/ip_address_management/api_get_ip_pool.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type GetIpPoolParam struct { - // Boolean indicating whether or not to return the IP Pool's region information in the response. - IncludeRegion *bool `json:"include_region,omitempty"` -} - -func (params *GetIpPoolParam) SetIncludeRegion(IncludeRegion bool) *GetIpPoolParam { - params.IncludeRegion = &IncludeRegion - return params -} - -// This operation will return the details for a specified IP Pool, including the Pool's name, ID, a sample list of the IPs associated with the Pool, and the total number of IPs belonging to the Pool. A maximum of 10 IPs will be returned per IP Pool by default. To retrieve additional IP addresses associated with a Pool, use the \"Get IPs Assigned to an IP Pool\" operation. -func (c *ApiService) GetIpPool(params *GetIpPoolParam) (interface{}, error) { - path := "/v3/send_ips/pools/{Poolid}" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.IncludeRegion != nil { - data.Set("include_region", fmt.Sprint(*params.IncludeRegion)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &GetIpPool200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ip_address_management/api_list_ip.go b/rest/api/v3/ip_address_management/api_list_ip.go deleted file mode 100644 index 2094c04f..00000000 --- a/rest/api/v3/ip_address_management/api_list_ip.go +++ /dev/null @@ -1,184 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListIpParam struct { - // Specifies an IP address. The `ip` query parameter can be used to filter results by IP address. - Ip *string `json:"ip,omitempty"` - // Specifies the number of results to be returned by the API. This parameter can be used in combination with the `before_key` or `after_key` parameters to iterate through paginated results. - Limit *int32 `json:"limit,omitempty"` - // Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. - AfterKey *int32 `json:"after_key,omitempty"` - // Specifies which items to be returned by the API. When the `before_key` is specified, the API will return items beginning from the first item before the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. - BeforeKey *string `json:"before_key,omitempty"` - // Indicates whether an IP address is leased from Twilio SendGrid. If `false`, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account. - IsLeased *bool `json:"is_leased,omitempty"` - // Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. - IsEnabled *bool `json:"is_enabled,omitempty"` - // A parent must be assigned to an IP address before the parent can send mail from the IP and before the address can be assigned to an IP pool. Set this parameter value to true to allow the parent to send mail from the IP and make the IP eligible for IP pool assignment using the IP pool endpoints. - IsParentAssigned *bool `json:"is_parent_assigned,omitempty"` - // Specifies the unique ID for an IP Pool. When included, only IP addresses belonging to the specified Pool will be returned. - Pool *string `json:"pool,omitempty"` - // The `start_added_at` and `end_added_at` parameters are used to set a time window. IP addresses that were added to your account in the specified time window will be returned. The `start_added_at` parameter sets the beginning of the time window. - StartAddedAt *int32 `json:"start_added_at,omitempty"` - // The `start_added_at` and `end_added_at` parameters are used to set a time window. IP addresses that were added to your account in the specified time window will be returned. The `end_added_at` parameter sets the end of the time window. - EndAddedAt *int32 `json:"end_added_at,omitempty"` - // Allowed values are `all`, `eu`, and `us`. If you provide a specific region, results will include all pools that have at least one IP in the filtered region. If `all`, pools with at least one IP (regardless of region) will be returned. If the `region` filter is not provided, the query returns all pools, including empty ones. - Region *Region7 `json:"region,omitempty"` - // Boolean indicating whether or not to return the IP Pool's region information in the response. - IncludeRegion *bool `json:"include_region,omitempty"` -} - -func (params *ListIpParam) SetIp(Ip string) *ListIpParam { - params.Ip = &Ip - return params -} -func (params *ListIpParam) SetLimit(Limit int32) *ListIpParam { - params.Limit = &Limit - return params -} -func (params *ListIpParam) SetAfterKey(AfterKey int32) *ListIpParam { - params.AfterKey = &AfterKey - return params -} -func (params *ListIpParam) SetBeforeKey(BeforeKey string) *ListIpParam { - params.BeforeKey = &BeforeKey - return params -} -func (params *ListIpParam) SetIsLeased(IsLeased bool) *ListIpParam { - params.IsLeased = &IsLeased - return params -} -func (params *ListIpParam) SetIsEnabled(IsEnabled bool) *ListIpParam { - params.IsEnabled = &IsEnabled - return params -} -func (params *ListIpParam) SetIsParentAssigned(IsParentAssigned bool) *ListIpParam { - params.IsParentAssigned = &IsParentAssigned - return params -} -func (params *ListIpParam) SetPool(Pool string) *ListIpParam { - params.Pool = &Pool - return params -} -func (params *ListIpParam) SetStartAddedAt(StartAddedAt int32) *ListIpParam { - params.StartAddedAt = &StartAddedAt - return params -} -func (params *ListIpParam) SetEndAddedAt(EndAddedAt int32) *ListIpParam { - params.EndAddedAt = &EndAddedAt - return params -} -func (params *ListIpParam) SetRegion(Region Region7) *ListIpParam { - params.Region = &Region - return params -} -func (params *ListIpParam) SetIncludeRegion(IncludeRegion bool) *ListIpParam { - params.IncludeRegion = &IncludeRegion - return params -} - -// This operation returns a list of all IP addresses associated with your account. A sample of IP details is returned with each IP, including which Pools the IP is associated with, whether the IP is set to warm up automatically, and when the IP was last updated. ### Limitations The `is_parent_assigned` parameter and `pool` parameter cannot be used at the same time. By definition, an IP cannot be assigned to a Pool if it is not first enabled. You can use either the `before_key` or `after_key` in combination with the `limit` parameter to iterate through paginated results but not both. -func (c *ApiService) ListIp(params *ListIpParam) (interface{}, error) { - path := "/v3/send_ips/ips" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Ip != nil { - data.Set("ip", *params.Ip) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.AfterKey != nil { - data.Set("after_key", fmt.Sprint(*params.AfterKey)) - } - if params != nil && params.BeforeKey != nil { - data.Set("before_key", *params.BeforeKey) - } - if params != nil && params.IsLeased != nil { - data.Set("is_leased", fmt.Sprint(*params.IsLeased)) - } - if params != nil && params.IsEnabled != nil { - data.Set("is_enabled", fmt.Sprint(*params.IsEnabled)) - } - if params != nil && params.IsParentAssigned != nil { - data.Set("is_parent_assigned", fmt.Sprint(*params.IsParentAssigned)) - } - if params != nil && params.Pool != nil { - data.Set("pool", *params.Pool) - } - if params != nil && params.StartAddedAt != nil { - data.Set("start_added_at", fmt.Sprint(*params.StartAddedAt)) - } - if params != nil && params.EndAddedAt != nil { - data.Set("end_added_at", fmt.Sprint(*params.EndAddedAt)) - } - if params != nil && params.Region != nil { - data.Set("region", fmt.Sprint(*params.Region)) - } - if params != nil && params.IncludeRegion != nil { - data.Set("include_region", fmt.Sprint(*params.IncludeRegion)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListIp200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ip_address_management/api_list_ip_assigned_to_ip_pool.go b/rest/api/v3/ip_address_management/api_list_ip_assigned_to_ip_pool.go deleted file mode 100644 index 9c0dbe4f..00000000 --- a/rest/api/v3/ip_address_management/api_list_ip_assigned_to_ip_pool.go +++ /dev/null @@ -1,103 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListIpAssignedToIpPoolParam struct { - // Specifies the number of results to be returned by the API. This parameter can be used in combination with the `before_key` or `after_key` parameters to iterate through paginated results. - Limit *int32 `json:"limit,omitempty"` - // Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. - AfterKey *int32 `json:"after_key,omitempty"` - // Boolean indicating whether or not to return the IP Pool's region information in the response. - IncludeRegion *bool `json:"include_region,omitempty"` -} - -func (params *ListIpAssignedToIpPoolParam) SetLimit(Limit int32) *ListIpAssignedToIpPoolParam { - params.Limit = &Limit - return params -} -func (params *ListIpAssignedToIpPoolParam) SetAfterKey(AfterKey int32) *ListIpAssignedToIpPoolParam { - params.AfterKey = &AfterKey - return params -} -func (params *ListIpAssignedToIpPoolParam) SetIncludeRegion(IncludeRegion bool) *ListIpAssignedToIpPoolParam { - params.IncludeRegion = &IncludeRegion - return params -} - -// This operation returns the IP addresses that are assigned to the specified IP pool. -func (c *ApiService) ListIpAssignedToIpPool(params *ListIpAssignedToIpPoolParam) (interface{}, error) { - path := "/v3/send_ips/pools/{Poolid}/ips" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.AfterKey != nil { - data.Set("after_key", fmt.Sprint(*params.AfterKey)) - } - if params != nil && params.IncludeRegion != nil { - data.Set("include_region", fmt.Sprint(*params.IncludeRegion)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListIpAssignedToIpPool200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ip_address_management/api_list_ip_pool.go b/rest/api/v3/ip_address_management/api_list_ip_pool.go deleted file mode 100644 index 97b97dee..00000000 --- a/rest/api/v3/ip_address_management/api_list_ip_pool.go +++ /dev/null @@ -1,121 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListIpPoolParam struct { - // Specifies the number of results to be returned by the API. This parameter can be used in combination with the `before_key` or `after_key` parameters to iterate through paginated results. - Limit *int32 `json:"limit,omitempty"` - // Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. - AfterKey *int32 `json:"after_key,omitempty"` - // Specifies an IP address. The `ip` query parameter can be used to filter results by IP address. - Ip *string `json:"ip,omitempty"` - // Allowed values are `all`, `eu`, and `us`. If you provide a specific region, results will include all pools that have at least one IP in the filtered region. If `all`, pools with at least one IP (regardless of region) will be returned. If the `region` filter is not provided, the query returns all pools, including empty ones. - Region *Region7 `json:"region,omitempty"` - // Boolean indicating whether or not to return the IP Pool's region information in the response. - IncludeRegion *bool `json:"include_region,omitempty"` -} - -func (params *ListIpPoolParam) SetLimit(Limit int32) *ListIpPoolParam { - params.Limit = &Limit - return params -} -func (params *ListIpPoolParam) SetAfterKey(AfterKey int32) *ListIpPoolParam { - params.AfterKey = &AfterKey - return params -} -func (params *ListIpPoolParam) SetIp(Ip string) *ListIpPoolParam { - params.Ip = &Ip - return params -} -func (params *ListIpPoolParam) SetRegion(Region Region7) *ListIpPoolParam { - params.Region = &Region - return params -} -func (params *ListIpPoolParam) SetIncludeRegion(IncludeRegion bool) *ListIpPoolParam { - params.IncludeRegion = &IncludeRegion - return params -} - -// This operation returns a list of your IP Pools and a sample of each Pools' associated IP addresses. A maximum of 10 IPs will be returned per IP Pool by default. To retrieve additional IP addresses associated with a Pool, use the \"Get IPs Assigned to an IP Pool\" operation. Each user may have a maximum of 100 IP Pools. -func (c *ApiService) ListIpPool(params *ListIpPoolParam) (interface{}, error) { - path := "/v3/send_ips/pools" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.AfterKey != nil { - data.Set("after_key", fmt.Sprint(*params.AfterKey)) - } - if params != nil && params.Ip != nil { - data.Set("ip", *params.Ip) - } - if params != nil && params.Region != nil { - data.Set("region", fmt.Sprint(*params.Region)) - } - if params != nil && params.IncludeRegion != nil { - data.Set("include_region", fmt.Sprint(*params.IncludeRegion)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListIpPool200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ip_address_management/api_list_sub_user_assigned_to_ip.go b/rest/api/v3/ip_address_management/api_list_sub_user_assigned_to_ip.go deleted file mode 100644 index 42451d39..00000000 --- a/rest/api/v3/ip_address_management/api_list_sub_user_assigned_to_ip.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListSubUserAssignedToIpParam struct { - // Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. - AfterKey *int32 `json:"after_key,omitempty"` - // Specifies the number of results to be returned by the API. This parameter can be used in combination with the `after_key` parameters to iterate through paginated results. The maximum limit is 100. - Limit *int32 `json:"limit,omitempty"` -} - -func (params *ListSubUserAssignedToIpParam) SetAfterKey(AfterKey int32) *ListSubUserAssignedToIpParam { - params.AfterKey = &AfterKey - return params -} -func (params *ListSubUserAssignedToIpParam) SetLimit(Limit int32) *ListSubUserAssignedToIpParam { - params.Limit = &Limit - return params -} - -// This operation returns a list of Subuser IDs that have been assigned the specified IP address. To retrieve more information about the returned Subusers, use the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/list-all-subusers). You can use the `after_key` and `limit` query parameters to iterate through paginated results. The maximum limit is 100, meaning you may retrieve up to 100 Subusers per request. If the `after_key` in the API response is not null, there are more Subusers assigned to the IP address than those returned in the request. You can repeat the request with the non-null `after_key` value and the same limit to retrieve the next group of Subusers. -func (c *ApiService) ListSubUserAssignedToIp(params *ListSubUserAssignedToIpParam) (interface{}, error) { - path := "/v3/send_ips/ips/{Ip}/subusers" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.AfterKey != nil { - data.Set("after_key", fmt.Sprint(*params.AfterKey)) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListSubUserAssignedToIp200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ip_address_management/api_service.go b/rest/api/v3/ip_address_management/api_service.go deleted file mode 100644 index b08b7968..00000000 --- a/rest/api/v3/ip_address_management/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/ip_address_management/api_update_ip.go b/rest/api/v3/ip_address_management/api_update_ip.go deleted file mode 100644 index 4eb4e3f7..00000000 --- a/rest/api/v3/ip_address_management/api_update_ip.go +++ /dev/null @@ -1,100 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type UpdateIpParam struct { - // The `ip` path parameter specifies an IP address to make the request against. - Ip *string `json:"ip"` - // - UpdateIpRequest *UpdateIpRequest `json:"UpdateIpRequest,omitempty"` -} - -func (params *UpdateIpParam) SetIp(Ip string) *UpdateIpParam { - params.Ip = &Ip - return params -} -func (params *UpdateIpParam) SetUpdateIpRequest(UpdateIpRequest UpdateIpRequest) *UpdateIpParam { - params.UpdateIpRequest = &UpdateIpRequest - return params -} - -// This operation updates an IP address's settings, including whether the IP is set to warm up automatically, if the IP is assigned by a parent account, and whether the IP is enabled or disabled. The request body must include at least one of the `is_auto_warmup`, `is_parent_assigned`, or `is_enabled` fields. -func (c *ApiService) UpdateIp(params *UpdateIpParam) (interface{}, error) { - path := "/v3/send_ips/ips/{Ip}" - if params != nil && params.Ip != nil { - path = strings.Replace(path, "{"+"Ip"+"}", *params.Ip, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateIpRequest != nil { - b, err := json.Marshal(*params.UpdateIpRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &UpdateIp200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ip_address_management/api_update_ip_pool.go b/rest/api/v3/ip_address_management/api_update_ip_pool.go deleted file mode 100644 index e047f450..00000000 --- a/rest/api/v3/ip_address_management/api_update_ip_pool.go +++ /dev/null @@ -1,100 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type UpdateIpPoolParam struct { - // Specifies the unique ID for an IP Pool. - Poolid *string `json:"poolid"` - // - UpdateIpPoolRequest *UpdateIpPoolRequest `json:"UpdateIpPoolRequest,omitempty"` -} - -func (params *UpdateIpPoolParam) SetPoolid(Poolid string) *UpdateIpPoolParam { - params.Poolid = &Poolid - return params -} -func (params *UpdateIpPoolParam) SetUpdateIpPoolRequest(UpdateIpPoolRequest UpdateIpPoolRequest) *UpdateIpPoolParam { - params.UpdateIpPoolRequest = &UpdateIpPoolRequest - return params -} - -// This operation will rename an IP Pool. An IP Pool name cannot start with a dot/period (.) or space. -func (c *ApiService) UpdateIpPool(params *UpdateIpPoolParam) (interface{}, error) { - path := "/v3/send_ips/pools/{Poolid}" - if params != nil && params.Poolid != nil { - path = strings.Replace(path, "{"+"Poolid"+"}", *params.Poolid, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateIpPoolRequest != nil { - b, err := json.Marshal(*params.UpdateIpPoolRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &UpdateIpPool200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &IpAddressManagementErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ip_address_management/docs/AddIp.md b/rest/api/v3/ip_address_management/docs/AddIp.md deleted file mode 100644 index 9a9abe96..00000000 --- a/rest/api/v3/ip_address_management/docs/AddIp.md +++ /dev/null @@ -1,48 +0,0 @@ -# AddIp - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddIp**](AddIp.md#AddIp) | **Post** /v3/send_ips/ips | Add a Twilio SendGrid IP Address - - - -## AddIp - -> AddIp201Response AddIp(ctx, optional) - -Add a Twilio SendGrid IP Address - -This operation adds a Twilio SendGrid IP address to your account. You can also assign up to 100 Subusers to the IP address at creation. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a AddIpParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**AddIpRequest** | [**AddIpRequest**](AddIpRequest.md) | - -### Return type - -[**AddIp201Response**](AddIp201Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json, application/xml - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ip_address_management/docs/AddIp201Response.md b/rest/api/v3/ip_address_management/docs/AddIp201Response.md deleted file mode 100644 index dd163214..00000000 --- a/rest/api/v3/ip_address_management/docs/AddIp201Response.md +++ /dev/null @@ -1,15 +0,0 @@ -# AddIp201Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Ip** | **string** | The IP address that was added to your account. |[optional] -**IsAutoWarmup** | **bool** | Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). This parameter is returned only if the IP address is set to automatically warm up. |[optional] -**IsParentAssigned** | **bool** | Indicates if a parent on the account is able to send email from the IP address. |[optional] -**Subusers** | **[]string** | An array of Subuser IDs the IP address was assigned to. |[optional] -**Region** | [**Region2**](Region2.md) | The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/AddIpRequest.md b/rest/api/v3/ip_address_management/docs/AddIpRequest.md deleted file mode 100644 index 55d0e7b0..00000000 --- a/rest/api/v3/ip_address_management/docs/AddIpRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# AddIpRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**IsAutoWarmup** | **bool** | Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). | -**IsParentAssigned** | **bool** | Indicates if a parent on the account is able to send email from the IP address. | -**Subusers** | **[]string** | An array of Subuser IDs the IP address will be assigned to. |[optional] -**Region** | [**Region3**](Region3.md) | The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. |[optional] -**IncludeRegion** | **bool** | Boolean indicating whether or not to return the IP address's region information in the response. |[optional] [default to false] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/AddIpsToIpPool.md b/rest/api/v3/ip_address_management/docs/AddIpsToIpPool.md deleted file mode 100644 index a04565b8..00000000 --- a/rest/api/v3/ip_address_management/docs/AddIpsToIpPool.md +++ /dev/null @@ -1,52 +0,0 @@ -# AddIpsToIpPool - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddIpsToIpPool**](AddIpsToIpPool.md#AddIpsToIpPool) | **Post** /v3/send_ips/pools/{Poolid}/ips:batchAdd | Add a Batch of IPs to an IP Pool - - - -## AddIpsToIpPool - -> AddIpsToIpPool200Response AddIpsToIpPool(ctx, Poolidoptional) - -Add a Batch of IPs to an IP Pool - -This operation appends a batch of IPs to an IP Pool. This operation requires all IP assignments to succeed. If any IP assignments fail, this endpoint will return an error. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Poolid** | **string** | Specifies the unique ID for an IP Pool. - -### Other Parameters - -Other parameters are passed through a pointer to a AddIpsToIpPoolParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**AddIpsToIpPoolRequest** | [**AddIpsToIpPoolRequest**](AddIpsToIpPoolRequest.md) | - -### Return type - -[**AddIpsToIpPool200Response**](AddIpsToIpPool200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json, application/xml - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ip_address_management/docs/AddIpsToIpPool200Response.md b/rest/api/v3/ip_address_management/docs/AddIpsToIpPool200Response.md deleted file mode 100644 index b7c91aa0..00000000 --- a/rest/api/v3/ip_address_management/docs/AddIpsToIpPool200Response.md +++ /dev/null @@ -1,13 +0,0 @@ -# AddIpsToIpPool200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of the IP Pool. |[optional] -**Id** | **string** | The unique ID of the IP Pool. |[optional] -**Ips** | **[]string** | An array of IP addresses assigned to the IP Pool. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/AddIpsToIpPoolRequest.md b/rest/api/v3/ip_address_management/docs/AddIpsToIpPoolRequest.md deleted file mode 100644 index 179f44fa..00000000 --- a/rest/api/v3/ip_address_management/docs/AddIpsToIpPoolRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# AddIpsToIpPoolRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Ips** | **[]string** | An array of IP addresses to assign to the specified IP Pool. All assignments must succeed. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/AddSubUsersToIp.md b/rest/api/v3/ip_address_management/docs/AddSubUsersToIp.md deleted file mode 100644 index bfbe9f17..00000000 --- a/rest/api/v3/ip_address_management/docs/AddSubUsersToIp.md +++ /dev/null @@ -1,52 +0,0 @@ -# AddSubUsersToIp - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddSubUsersToIp**](AddSubUsersToIp.md#AddSubUsersToIp) | **Post** /v3/send_ips/ips/{Ip}/subusers:batchAdd | Assign a Batch of Subusers to an IP - - - -## AddSubUsersToIp - -> AddSubUsersToIp200Response AddSubUsersToIp(ctx, Ipoptional) - -Assign a Batch of Subusers to an IP - -This operation appends a batch of Subusers to a specified IP address. This endpoint requires all Subuser assignments to succeed. If a Subuser assignment fails, this endpoint will return an error. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Ip** | **string** | The `ip` path parameter specifies an IP address to make the request against. - -### Other Parameters - -Other parameters are passed through a pointer to a AddSubUsersToIpParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**AddSubUsersToIpRequest** | [**AddSubUsersToIpRequest**](AddSubUsersToIpRequest.md) | - -### Return type - -[**AddSubUsersToIp200Response**](AddSubUsersToIp200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json, application/xml - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ip_address_management/docs/AddSubUsersToIp200Response.md b/rest/api/v3/ip_address_management/docs/AddSubUsersToIp200Response.md deleted file mode 100644 index 735f87af..00000000 --- a/rest/api/v3/ip_address_management/docs/AddSubUsersToIp200Response.md +++ /dev/null @@ -1,12 +0,0 @@ -# AddSubUsersToIp200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Ip** | **string** | The IP address the Subusers were assigned to. |[optional] -**Subusers** | **[]string** | An array of Subuser IDs that were assigned to the specified IP address. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/AddSubUsersToIpRequest.md b/rest/api/v3/ip_address_management/docs/AddSubUsersToIpRequest.md deleted file mode 100644 index cdfb8a0d..00000000 --- a/rest/api/v3/ip_address_management/docs/AddSubUsersToIpRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# AddSubUsersToIpRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Subusers** | **[]string** | An array of Subuser IDs to be assigned to the specified IP address. All Subuser assignments must succeed. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/CreateIpPool.md b/rest/api/v3/ip_address_management/docs/CreateIpPool.md deleted file mode 100644 index a047e28f..00000000 --- a/rest/api/v3/ip_address_management/docs/CreateIpPool.md +++ /dev/null @@ -1,48 +0,0 @@ -# CreateIpPool - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateIpPool**](CreateIpPool.md#CreateIpPool) | **Post** /v3/send_ips/pools | Create an IP Pool with a Name and IP Assignments - - - -## CreateIpPool - -> CreateIpPool201Response CreateIpPool(ctx, optional) - -Create an IP Pool with a Name and IP Assignments - -This operation will create a named IP Pool and associate specified IP addresses with the newly created Pool. This operation requires all IP assignments to succeed. If any IP assignments fail, this endpoint will return an error and the Pool will not be created. Each IP Pool may have a maximum of 100 assigned IP addresses. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateIpPoolParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**CreateIpPoolRequest** | [**CreateIpPoolRequest**](CreateIpPoolRequest.md) | - -### Return type - -[**CreateIpPool201Response**](CreateIpPool201Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json, application/xml - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ip_address_management/docs/CreateIpPool201Response.md b/rest/api/v3/ip_address_management/docs/CreateIpPool201Response.md deleted file mode 100644 index 0e1723bd..00000000 --- a/rest/api/v3/ip_address_management/docs/CreateIpPool201Response.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateIpPool201Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name assigned to the IP Pool. |[optional] -**Id** | **string** | The unique ID of the IP Pool. |[optional] -**Ips** | **[]string** | An array of IP addresses assigned to the IP Pool. All assignments must succeed. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/CreateIpPoolRequest.md b/rest/api/v3/ip_address_management/docs/CreateIpPoolRequest.md deleted file mode 100644 index 77aa2295..00000000 --- a/rest/api/v3/ip_address_management/docs/CreateIpPoolRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateIpPoolRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name to assign to the IP Pool. An IP Pool name cannot begin with a space or period. | -**Ips** | **[]string** | An array of IP addresses to assign to the IP Pool. All assignments must succeed. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/DeleteIpPool.md b/rest/api/v3/ip_address_management/docs/DeleteIpPool.md deleted file mode 100644 index ddfe136d..00000000 --- a/rest/api/v3/ip_address_management/docs/DeleteIpPool.md +++ /dev/null @@ -1,51 +0,0 @@ -# DeleteIpPool - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteIpPool**](DeleteIpPool.md#DeleteIpPool) | **Delete** /v3/send_ips/pools/{Poolid} | Delete IP Pool - - - -## DeleteIpPool - -> DeleteIpPool(ctx, Poolid) - -Delete IP Pool - -This operation deletes an IP Pool and unassigns all IP addresses associated with the Pool. IP addresses associated with the deleted Pool will remain in your account. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Poolid** | **string** | Specifies the unique ID for an IP Pool. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteIpPoolParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, application/xml - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ip_address_management/docs/DeleteIpsFromIpPool.md b/rest/api/v3/ip_address_management/docs/DeleteIpsFromIpPool.md deleted file mode 100644 index 0d7f751b..00000000 --- a/rest/api/v3/ip_address_management/docs/DeleteIpsFromIpPool.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeleteIpsFromIpPool - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteIpsFromIpPool**](DeleteIpsFromIpPool.md#DeleteIpsFromIpPool) | **Post** /v3/send_ips/pools/{Poolid}/ips:batchDelete | Delete a Batch of IPs from an IP Pool - - - -## DeleteIpsFromIpPool - -> DeleteIpsFromIpPool(ctx, Poolidoptional) - -Delete a Batch of IPs from an IP Pool - -This operation removes a batch of IPs from an IP Pool. All IPs associated with the Pool will be unassigned from the deleted Pool. However, this operation does not remove the IPs from your account. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Poolid** | **string** | Specifies the unique ID for an IP Pool. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteIpsFromIpPoolParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**DeleteIpsFromIpPoolRequest** | [**DeleteIpsFromIpPoolRequest**](DeleteIpsFromIpPoolRequest.md) | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json, application/xml - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ip_address_management/docs/DeleteIpsFromIpPoolRequest.md b/rest/api/v3/ip_address_management/docs/DeleteIpsFromIpPoolRequest.md deleted file mode 100644 index 61bb0a31..00000000 --- a/rest/api/v3/ip_address_management/docs/DeleteIpsFromIpPoolRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeleteIpsFromIpPoolRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Ips** | **[]string** | An array of IP addresses to remove from the specified IP Pool. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/DeleteSubUsersFromIp.md b/rest/api/v3/ip_address_management/docs/DeleteSubUsersFromIp.md deleted file mode 100644 index 811d1638..00000000 --- a/rest/api/v3/ip_address_management/docs/DeleteSubUsersFromIp.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeleteSubUsersFromIp - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteSubUsersFromIp**](DeleteSubUsersFromIp.md#DeleteSubUsersFromIp) | **Post** /v3/send_ips/ips/{Ip}/subusers:batchDelete | Delete a Batch of Subusers from an IP - - - -## DeleteSubUsersFromIp - -> DeleteSubUsersFromIp(ctx, Ipoptional) - -Delete a Batch of Subusers from an IP - -This operation removes a batch of Subusers from a specified IP address. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Ip** | **string** | The `ip` path parameter specifies an IP address to make the request against. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteSubUsersFromIpParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**DeleteSubUsersFromIpRequest** | [**DeleteSubUsersFromIpRequest**](DeleteSubUsersFromIpRequest.md) | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json, application/xml - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ip_address_management/docs/DeleteSubUsersFromIpRequest.md b/rest/api/v3/ip_address_management/docs/DeleteSubUsersFromIpRequest.md deleted file mode 100644 index f8017d53..00000000 --- a/rest/api/v3/ip_address_management/docs/DeleteSubUsersFromIpRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeleteSubUsersFromIpRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Subusers** | **[]string** | An array of Subuser IDs to be removed from the specified IP address. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/GetIp.md b/rest/api/v3/ip_address_management/docs/GetIp.md deleted file mode 100644 index e911a0d5..00000000 --- a/rest/api/v3/ip_address_management/docs/GetIp.md +++ /dev/null @@ -1,48 +0,0 @@ -# GetIp - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetIp**](GetIp.md#GetIp) | **Get** /v3/send_ips/ips/{Ip} | Get Details for an IP Address - - - -## GetIp - -> GetIp200Response GetIp(ctx, optional) - -Get Details for an IP Address - -This operation returns details for a specified IP address. Details include whether the IP is assigned to a parent account, set to warm up automatically, which Pools the IP is associated with, when the IP was added and modified, whether the IP is leased, and whether the IP is enabled. Note that this operation will not return Subuser information associated with the IP. To retrieve Subuser information, use the \"Get a List of Subusers Assigned to an IP\" endpoint. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a GetIpParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**IncludeRegion** | **bool** | Boolean indicating whether or not to return the IP Pool's region information in the response. - -### Return type - -[**GetIp200Response**](GetIp200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, application/xml - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ip_address_management/docs/GetIp200Response.md b/rest/api/v3/ip_address_management/docs/GetIp200Response.md deleted file mode 100644 index 92877de3..00000000 --- a/rest/api/v3/ip_address_management/docs/GetIp200Response.md +++ /dev/null @@ -1,19 +0,0 @@ -# GetIp200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Ip** | **string** | The IP address specified in the request. |[optional] -**IsParentAssigned** | **bool** | Indicates if a parent on the account is able to send email from the IP address. |[optional] -**IsAutoWarmup** | **bool** | Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). |[optional] -**Pools** | [**[]GetIp200ResponsePoolsInner**](GetIp200ResponsePoolsInner.md) | An array of IP Pools the IP address is assigned to. |[optional] -**AddedAt** | **int32** | A timestamp indicating when the IP address was added to your account. |[optional] -**UpdatedAt** | Pointer to **int32** | A timestamp indicating when the IP was last updated. | -**IsEnabled** | Pointer to **bool** | Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. | -**IsLeased** | **bool** | Indicates whether an IP address is leased from Twilio SendGrid. If `false`, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account. |[optional] -**Region** | **string** | The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. Possible values are `us` or `eu`. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/GetIp200ResponsePoolsInner.md b/rest/api/v3/ip_address_management/docs/GetIp200ResponsePoolsInner.md deleted file mode 100644 index 4dff4853..00000000 --- a/rest/api/v3/ip_address_management/docs/GetIp200ResponsePoolsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetIp200ResponsePoolsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | The ID of the IP Pool. |[optional] -**Name** | **string** | The name of the IP Pool. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/GetIpPool.md b/rest/api/v3/ip_address_management/docs/GetIpPool.md deleted file mode 100644 index efbc6181..00000000 --- a/rest/api/v3/ip_address_management/docs/GetIpPool.md +++ /dev/null @@ -1,48 +0,0 @@ -# GetIpPool - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetIpPool**](GetIpPool.md#GetIpPool) | **Get** /v3/send_ips/pools/{Poolid} | Get Details for an IP Pool - - - -## GetIpPool - -> GetIpPool200Response GetIpPool(ctx, optional) - -Get Details for an IP Pool - -This operation will return the details for a specified IP Pool, including the Pool's name, ID, a sample list of the IPs associated with the Pool, and the total number of IPs belonging to the Pool. A maximum of 10 IPs will be returned per IP Pool by default. To retrieve additional IP addresses associated with a Pool, use the \"Get IPs Assigned to an IP Pool\" operation. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a GetIpPoolParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**IncludeRegion** | **bool** | Boolean indicating whether or not to return the IP Pool's region information in the response. - -### Return type - -[**GetIpPool200Response**](GetIpPool200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, application/xml - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ip_address_management/docs/GetIpPool200Response.md b/rest/api/v3/ip_address_management/docs/GetIpPool200Response.md deleted file mode 100644 index 38fffdf5..00000000 --- a/rest/api/v3/ip_address_management/docs/GetIpPool200Response.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetIpPool200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of the IP Pool. |[optional] -**Id** | **string** | The unique ID of the IP Pool. |[optional] -**IpsPreview** | **[]string** | A sample list of IP addresses associated with the IP Pool. The sample is limited to 10 results. |[optional] -**TotalIpCount** | **int32** | The total number of IP addresses in the IP Pool. An IP Pool can have a maximum of 100 associated IP addresses. |[optional] -**IpCountByRegion** | [**[]GetIpPool200ResponseIpCountByRegionInner**](GetIpPool200ResponseIpCountByRegionInner.md) | The total number of IP addresses by region. this object is only returned if the `include_region` parameter is included and set to `true` in the API request. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/GetIpPool200ResponseIpCountByRegionInner.md b/rest/api/v3/ip_address_management/docs/GetIpPool200ResponseIpCountByRegionInner.md deleted file mode 100644 index 287c899e..00000000 --- a/rest/api/v3/ip_address_management/docs/GetIpPool200ResponseIpCountByRegionInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetIpPool200ResponseIpCountByRegionInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Region** | [**Region5**](Region5.md) | The region associated with the number of IPs listed in the `count` property. |[optional] -**Count** | **int32** | The number of IP addresses in the pool that are assigned to the region specified in the `region` property for this count. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/IpAddressManagementErrorResponse.md b/rest/api/v3/ip_address_management/docs/IpAddressManagementErrorResponse.md deleted file mode 100644 index dcf00eaf..00000000 --- a/rest/api/v3/ip_address_management/docs/IpAddressManagementErrorResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# IpAddressManagementErrorResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]IpAddressManagementErrorResponseErrorsInner**](IpAddressManagementErrorResponseErrorsInner.md) | An array of error objects. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/IpAddressManagementErrorResponseErrorsInner.md b/rest/api/v3/ip_address_management/docs/IpAddressManagementErrorResponseErrorsInner.md deleted file mode 100644 index ce08001a..00000000 --- a/rest/api/v3/ip_address_management/docs/IpAddressManagementErrorResponseErrorsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# IpAddressManagementErrorResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Field** | **string** | Indicates which field caused the error. This may be an empty string if no specific field is responsible for the error. |[optional] -**Message** | **string** | An error-specific message that provides more information about the error's cause. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/Items.md b/rest/api/v3/ip_address_management/docs/Items.md deleted file mode 100644 index fb3e88bd..00000000 --- a/rest/api/v3/ip_address_management/docs/Items.md +++ /dev/null @@ -1,13 +0,0 @@ -# Items - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**EU** | string | (value: `"eu"`) -**US** | string | (value: `"us"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/ListIp.md b/rest/api/v3/ip_address_management/docs/ListIp.md deleted file mode 100644 index 4386ce78..00000000 --- a/rest/api/v3/ip_address_management/docs/ListIp.md +++ /dev/null @@ -1,59 +0,0 @@ -# ListIp - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListIp**](ListIp.md#ListIp) | **Get** /v3/send_ips/ips | Get a List of all IP Addresses on your Account - - - -## ListIp - -> ListIp200Response ListIp(ctx, optional) - -Get a List of all IP Addresses on your Account - -This operation returns a list of all IP addresses associated with your account. A sample of IP details is returned with each IP, including which Pools the IP is associated with, whether the IP is set to warm up automatically, and when the IP was last updated. ### Limitations The `is_parent_assigned` parameter and `pool` parameter cannot be used at the same time. By definition, an IP cannot be assigned to a Pool if it is not first enabled. You can use either the `before_key` or `after_key` in combination with the `limit` parameter to iterate through paginated results but not both. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListIpParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Ip** | **string** | Specifies an IP address. The `ip` query parameter can be used to filter results by IP address. -**Limit** | **int32** | Specifies the number of results to be returned by the API. This parameter can be used in combination with the `before_key` or `after_key` parameters to iterate through paginated results. -**AfterKey** | **int32** | Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. -**BeforeKey** | **string** | Specifies which items to be returned by the API. When the `before_key` is specified, the API will return items beginning from the first item before the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. -**IsLeased** | **bool** | Indicates whether an IP address is leased from Twilio SendGrid. If `false`, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account. -**IsEnabled** | **bool** | Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. -**IsParentAssigned** | **bool** | A parent must be assigned to an IP address before the parent can send mail from the IP and before the address can be assigned to an IP pool. Set this parameter value to true to allow the parent to send mail from the IP and make the IP eligible for IP pool assignment using the IP pool endpoints. -**Pool** | **string** | Specifies the unique ID for an IP Pool. When included, only IP addresses belonging to the specified Pool will be returned. -**StartAddedAt** | **int32** | The `start_added_at` and `end_added_at` parameters are used to set a time window. IP addresses that were added to your account in the specified time window will be returned. The `start_added_at` parameter sets the beginning of the time window. -**EndAddedAt** | **int32** | The `start_added_at` and `end_added_at` parameters are used to set a time window. IP addresses that were added to your account in the specified time window will be returned. The `end_added_at` parameter sets the end of the time window. -**Region** | [**Region7**](Region7Region7.md) | Allowed values are `all`, `eu`, and `us`. If you provide a specific region, results will include all pools that have at least one IP in the filtered region. If `all`, pools with at least one IP (regardless of region) will be returned. If the `region` filter is not provided, the query returns all pools, including empty ones. -**IncludeRegion** | **bool** | Boolean indicating whether or not to return the IP Pool's region information in the response. - -### Return type - -[**ListIp200Response**](ListIp200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, application/xml - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ip_address_management/docs/ListIp200Response.md b/rest/api/v3/ip_address_management/docs/ListIp200Response.md deleted file mode 100644 index d4e0057c..00000000 --- a/rest/api/v3/ip_address_management/docs/ListIp200Response.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListIp200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]ListIp200ResponseResultInner**](ListIp200ResponseResultInner.md) | |[optional] -**Metadata** | [**ListIp200ResponseMetadata**](ListIp200ResponseMetadata.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/ListIp200ResponseMetadata.md b/rest/api/v3/ip_address_management/docs/ListIp200ResponseMetadata.md deleted file mode 100644 index 025e9096..00000000 --- a/rest/api/v3/ip_address_management/docs/ListIp200ResponseMetadata.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListIp200ResponseMetadata - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**NextParams** | [**ListIp200ResponseMetadataNextParams**](ListIp200ResponseMetadataNextParams.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/ListIp200ResponseMetadataNextParams.md b/rest/api/v3/ip_address_management/docs/ListIp200ResponseMetadataNextParams.md deleted file mode 100644 index 5b3f6867..00000000 --- a/rest/api/v3/ip_address_management/docs/ListIp200ResponseMetadataNextParams.md +++ /dev/null @@ -1,22 +0,0 @@ -# ListIp200ResponseMetadataNextParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AfterKey** | Pointer to **string** | Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `after_key` cannot be used in combination with the `before_key` parameter. | -**BeforeKey** | Pointer to **string** | Specifies which items to be returned by the API. When the `before_key` is specified, the API will return items beginning from the first item before the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `before_key` cannot be used in combination with the `after_key` parameter. | -**Ip** | **string** | The IP address specified in the request with the `ip` query parameter. This parameter is returned only when an IP is included in the request. |[optional] -**IsLeased** | **bool** | Indicates whether an IP address is leased from Twilio SendGrid. If `false`, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account. This parameter is returned only if the IP address is leased. |[optional] -**IsEnabled** | **bool** | Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. This parameter is returned only if the IP address is enabled. |[optional] -**IsParentAssigned** | **bool** | Indicates if a parent on the account is able to send email from the IP address. This parameter is returned only if the IP address is parent assigned. |[optional] -**Pool** | **string** | The IP Pool ID specified in the request with the `pool` query parameter. This parameter is returned only when an IP Pool is included in the request. |[optional] -**StartAddedAt** | **string** | The beginning of the time window specified in the request with the `start_added_at` query parameter. This parameter is returned only when the `start_added_at` parameter is included in the request. |[optional] -**EndAddedAt** | **string** | The end of the time window specified in the request with the `end_added_at` query parameter. This parameter is returned only when the `end_added_at` parameter is included in the request. |[optional] -**Limit** | **string** | The number of items returned in the request. This parameter is returned only when a `limit` is set using the `limit` query parameter in the request. |[optional] -**Region** | [**Region1**](Region1.md) | The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request, |[optional] -**IncludeRegion** | **string** | Indicates whether or not to include the IP address's region. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/ListIp200ResponseResultInner.md b/rest/api/v3/ip_address_management/docs/ListIp200ResponseResultInner.md deleted file mode 100644 index f5afc216..00000000 --- a/rest/api/v3/ip_address_management/docs/ListIp200ResponseResultInner.md +++ /dev/null @@ -1,19 +0,0 @@ -# ListIp200ResponseResultInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Ip** | **string** | An IP address on your account. |[optional] -**Pools** | [**[]ListIp200ResponseResultInnerPoolsInner**](ListIp200ResponseResultInnerPoolsInner.md) | An array of IP Pools the IP address is assigned to. |[optional] -**IsAutoWarmup** | **bool** | Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). |[optional] -**IsParentAssigned** | Pointer to **bool** | Indicates if a parent on the account is able to send email from the IP address. This parameter will be returned only if the request was made by the parent account. | -**UpdatedAt** | Pointer to **int32** | A timestamp indicating when the IP was last updated. | -**IsEnabled** | Pointer to **bool** | Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. | -**IsLeased** | **bool** | Indicates whether an IP address is leased from Twilio SendGrid. If `false`, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account. |[optional] -**AddedAt** | **int32** | A timestamp representing when the IP address was added to your account. |[optional] -**Region** | [**Region**](Region.md) | The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/ListIp200ResponseResultInnerPoolsInner.md b/rest/api/v3/ip_address_management/docs/ListIp200ResponseResultInnerPoolsInner.md deleted file mode 100644 index 2457686e..00000000 --- a/rest/api/v3/ip_address_management/docs/ListIp200ResponseResultInnerPoolsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListIp200ResponseResultInnerPoolsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of the IP Pool. |[optional] -**Id** | **string** | The unique ID of the IP Pool. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool.md b/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool.md deleted file mode 100644 index 27120fb3..00000000 --- a/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool.md +++ /dev/null @@ -1,50 +0,0 @@ -# ListIpAssignedToIpPool - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListIpAssignedToIpPool**](ListIpAssignedToIpPool.md#ListIpAssignedToIpPool) | **Get** /v3/send_ips/pools/{Poolid}/ips | Get IPs Assigned to an IP Pool - - - -## ListIpAssignedToIpPool - -> ListIpAssignedToIpPool200Response ListIpAssignedToIpPool(ctx, optional) - -Get IPs Assigned to an IP Pool - -This operation returns the IP addresses that are assigned to the specified IP pool. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListIpAssignedToIpPoolParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Limit** | **int32** | Specifies the number of results to be returned by the API. This parameter can be used in combination with the `before_key` or `after_key` parameters to iterate through paginated results. -**AfterKey** | **int32** | Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. -**IncludeRegion** | **bool** | Boolean indicating whether or not to return the IP Pool's region information in the response. - -### Return type - -[**ListIpAssignedToIpPool200Response**](ListIpAssignedToIpPool200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, application/xml - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200Response.md b/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200Response.md deleted file mode 100644 index 6bbf46ba..00000000 --- a/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200Response.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListIpAssignedToIpPool200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]ListIpAssignedToIpPool200ResponseResultInner**](ListIpAssignedToIpPool200ResponseResultInner.md) | |[optional] -**Metadata** | [**ListIpAssignedToIpPool200ResponseMetadata**](ListIpAssignedToIpPool200ResponseMetadata.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseMetadata.md b/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseMetadata.md deleted file mode 100644 index f8890c12..00000000 --- a/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseMetadata.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListIpAssignedToIpPool200ResponseMetadata - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**NextParams** | [**ListIpAssignedToIpPool200ResponseMetadataNextParams**](ListIpAssignedToIpPool200ResponseMetadataNextParams.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseMetadataNextParams.md b/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseMetadataNextParams.md deleted file mode 100644 index 1988a996..00000000 --- a/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseMetadataNextParams.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListIpAssignedToIpPool200ResponseMetadataNextParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AfterKey** | Pointer to **string** | Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `after_key` cannot be used in combination with the `before_key` parameter. | -**Limit** | **string** | The `limit` specified in the request. This parameter will be included only if it was specified in the request. This is not the default limit enforced by the API. |[optional] -**IncludeRegion** | **string** | Indicates whether or not to include the IP address's region. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseResultInner.md b/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseResultInner.md deleted file mode 100644 index d8ffe910..00000000 --- a/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseResultInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListIpAssignedToIpPool200ResponseResultInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Ip** | **string** | An IP address assigned to the IP Pool. |[optional] -**Region** | [**Region6**](Region6.md) | The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. |[optional] -**Pools** | [**[]ListIp200ResponseResultInnerPoolsInner**](ListIp200ResponseResultInnerPoolsInner.md) | IP Pools the IP address is assigned to. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/ListIpPool.md b/rest/api/v3/ip_address_management/docs/ListIpPool.md deleted file mode 100644 index e49c30f6..00000000 --- a/rest/api/v3/ip_address_management/docs/ListIpPool.md +++ /dev/null @@ -1,52 +0,0 @@ -# ListIpPool - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListIpPool**](ListIpPool.md#ListIpPool) | **Get** /v3/send_ips/pools | GET all IP Pools that have Associated IPs - - - -## ListIpPool - -> ListIpPool200Response ListIpPool(ctx, optional) - -GET all IP Pools that have Associated IPs - -This operation returns a list of your IP Pools and a sample of each Pools' associated IP addresses. A maximum of 10 IPs will be returned per IP Pool by default. To retrieve additional IP addresses associated with a Pool, use the \"Get IPs Assigned to an IP Pool\" operation. Each user may have a maximum of 100 IP Pools. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListIpPoolParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Limit** | **int32** | Specifies the number of results to be returned by the API. This parameter can be used in combination with the `before_key` or `after_key` parameters to iterate through paginated results. -**AfterKey** | **int32** | Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. -**Ip** | **string** | Specifies an IP address. The `ip` query parameter can be used to filter results by IP address. -**Region** | [**Region7**](Region7Region7.md) | Allowed values are `all`, `eu`, and `us`. If you provide a specific region, results will include all pools that have at least one IP in the filtered region. If `all`, pools with at least one IP (regardless of region) will be returned. If the `region` filter is not provided, the query returns all pools, including empty ones. -**IncludeRegion** | **bool** | Boolean indicating whether or not to return the IP Pool's region information in the response. - -### Return type - -[**ListIpPool200Response**](ListIpPool200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, application/xml - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ip_address_management/docs/ListIpPool200Response.md b/rest/api/v3/ip_address_management/docs/ListIpPool200Response.md deleted file mode 100644 index 30b278aa..00000000 --- a/rest/api/v3/ip_address_management/docs/ListIpPool200Response.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListIpPool200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]ListIpPool200ResponseResultInner**](ListIpPool200ResponseResultInner.md) | |[optional] -**Metadata** | [**ListIpPool200ResponseMetadata**](ListIpPool200ResponseMetadata.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/ListIpPool200ResponseMetadata.md b/rest/api/v3/ip_address_management/docs/ListIpPool200ResponseMetadata.md deleted file mode 100644 index 33136f18..00000000 --- a/rest/api/v3/ip_address_management/docs/ListIpPool200ResponseMetadata.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListIpPool200ResponseMetadata - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**NextParams** | [**ListIpPool200ResponseMetadataNextParams**](ListIpPool200ResponseMetadataNextParams.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/ListIpPool200ResponseMetadataNextParams.md b/rest/api/v3/ip_address_management/docs/ListIpPool200ResponseMetadataNextParams.md deleted file mode 100644 index b59951d5..00000000 --- a/rest/api/v3/ip_address_management/docs/ListIpPool200ResponseMetadataNextParams.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListIpPool200ResponseMetadataNextParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AfterKey** | Pointer to **string** | Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `after_key` cannot be used in combination with the `before_key` parameter. | -**Ip** | **string** | The IP address specified in the request. This parameter will be returned only if it was specified in the request. |[optional] -**Limit** | **string** | The `limit` specified in the request. This parameter will be included only if it was specified in the request. This is not the default limit enforced by the API. |[optional] -**Region** | [**Region4**](Region4.md) | The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. |[optional] -**IncludeRegion** | **string** | Indicates whether or not to include the IP address's region. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/ListIpPool200ResponseResultInner.md b/rest/api/v3/ip_address_management/docs/ListIpPool200ResponseResultInner.md deleted file mode 100644 index f8b44a23..00000000 --- a/rest/api/v3/ip_address_management/docs/ListIpPool200ResponseResultInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListIpPool200ResponseResultInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of the IP Pool. |[optional] -**Id** | **string** | The unique ID of the IP Pool. |[optional] -**Regions** | [**[]Items**](Items.md) | An array of the unique regions of all the IP addresses returned within the IP pool. |[optional] -**IpsPreview** | **[]string** | A sample list of IP addresses associated with the IP Pool. The sample is limited to 10 results. |[optional] -**TotalIpCount** | **int32** | The total number of IP addresses in the IP Pool. An IP Pool can have a maximum of 100 associated IP addresses. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp.md b/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp.md deleted file mode 100644 index e672cdd2..00000000 --- a/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp.md +++ /dev/null @@ -1,49 +0,0 @@ -# ListSubUserAssignedToIp - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListSubUserAssignedToIp**](ListSubUserAssignedToIp.md#ListSubUserAssignedToIp) | **Get** /v3/send_ips/ips/{Ip}/subusers | Get a List of Subusers Assigned to an IP - - - -## ListSubUserAssignedToIp - -> ListSubUserAssignedToIp200Response ListSubUserAssignedToIp(ctx, optional) - -Get a List of Subusers Assigned to an IP - -This operation returns a list of Subuser IDs that have been assigned the specified IP address. To retrieve more information about the returned Subusers, use the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/list-all-subusers). You can use the `after_key` and `limit` query parameters to iterate through paginated results. The maximum limit is 100, meaning you may retrieve up to 100 Subusers per request. If the `after_key` in the API response is not null, there are more Subusers assigned to the IP address than those returned in the request. You can repeat the request with the non-null `after_key` value and the same limit to retrieve the next group of Subusers. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListSubUserAssignedToIpParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**AfterKey** | **int32** | Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. -**Limit** | **int32** | Specifies the number of results to be returned by the API. This parameter can be used in combination with the `after_key` parameters to iterate through paginated results. The maximum limit is 100. - -### Return type - -[**ListSubUserAssignedToIp200Response**](ListSubUserAssignedToIp200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, application/xml - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200Response.md b/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200Response.md deleted file mode 100644 index df5554fb..00000000 --- a/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200Response.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListSubUserAssignedToIp200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | **[]string** | An array of Subuser IDs that have been assigned the specified IP address. |[optional] -**Metadata** | [**ListSubUserAssignedToIp200ResponseMetadata**](ListSubUserAssignedToIp200ResponseMetadata.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200ResponseMetadata.md b/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200ResponseMetadata.md deleted file mode 100644 index 05e6ef0a..00000000 --- a/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200ResponseMetadata.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListSubUserAssignedToIp200ResponseMetadata - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**NextParams** | [**ListSubUserAssignedToIp200ResponseMetadataNextParams**](ListSubUserAssignedToIp200ResponseMetadataNextParams.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200ResponseMetadataNextParams.md b/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200ResponseMetadataNextParams.md deleted file mode 100644 index 36b362e5..00000000 --- a/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200ResponseMetadataNextParams.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListSubUserAssignedToIp200ResponseMetadataNextParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AfterKey** | Pointer to **string** | Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `after_key` cannot be used in combination with the `before_key` parameter. | -**Limit** | **string** | The `limit` specified in the request. This parameter will be included only if it was specified in the request. This is not the default limit enforced by the API. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/Region.md b/rest/api/v3/ip_address_management/docs/Region.md deleted file mode 100644 index e861b3d5..00000000 --- a/rest/api/v3/ip_address_management/docs/Region.md +++ /dev/null @@ -1,13 +0,0 @@ -# Region - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**EU** | string | (value: `"eu"`) -**US** | string | (value: `"us"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/Region1.md b/rest/api/v3/ip_address_management/docs/Region1.md deleted file mode 100644 index ca0566cb..00000000 --- a/rest/api/v3/ip_address_management/docs/Region1.md +++ /dev/null @@ -1,14 +0,0 @@ -# Region1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**ALL** | string | (value: `"all"`) -**US** | string | (value: `"us"`) -**EU** | string | (value: `"eu"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/Region2.md b/rest/api/v3/ip_address_management/docs/Region2.md deleted file mode 100644 index 09a272e0..00000000 --- a/rest/api/v3/ip_address_management/docs/Region2.md +++ /dev/null @@ -1,13 +0,0 @@ -# Region2 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**EU** | string | (value: `"eu"`) -**US** | string | (value: `"us"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/Region3.md b/rest/api/v3/ip_address_management/docs/Region3.md deleted file mode 100644 index c39c27e1..00000000 --- a/rest/api/v3/ip_address_management/docs/Region3.md +++ /dev/null @@ -1,13 +0,0 @@ -# Region3 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**EU** | string | (value: `"eu"`) -**US** | string | (value: `"us"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/Region4.md b/rest/api/v3/ip_address_management/docs/Region4.md deleted file mode 100644 index 928b038b..00000000 --- a/rest/api/v3/ip_address_management/docs/Region4.md +++ /dev/null @@ -1,14 +0,0 @@ -# Region4 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**ALL** | string | (value: `"all"`) -**US** | string | (value: `"us"`) -**EU** | string | (value: `"eu"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/Region5.md b/rest/api/v3/ip_address_management/docs/Region5.md deleted file mode 100644 index 2e619fff..00000000 --- a/rest/api/v3/ip_address_management/docs/Region5.md +++ /dev/null @@ -1,13 +0,0 @@ -# Region5 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**US** | string | (value: `"us"`) -**EU** | string | (value: `"eu"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/Region6.md b/rest/api/v3/ip_address_management/docs/Region6.md deleted file mode 100644 index 9a492375..00000000 --- a/rest/api/v3/ip_address_management/docs/Region6.md +++ /dev/null @@ -1,13 +0,0 @@ -# Region6 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**EU** | string | (value: `"eu"`) -**US** | string | (value: `"us"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/Region7.md b/rest/api/v3/ip_address_management/docs/Region7.md deleted file mode 100644 index c7db2ec2..00000000 --- a/rest/api/v3/ip_address_management/docs/Region7.md +++ /dev/null @@ -1,14 +0,0 @@ -# Region7 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**ALL** | string | (value: `"all"`) -**EU** | string | (value: `"eu"`) -**US** | string | (value: `"us"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/UpdateIp.md b/rest/api/v3/ip_address_management/docs/UpdateIp.md deleted file mode 100644 index 4dffc656..00000000 --- a/rest/api/v3/ip_address_management/docs/UpdateIp.md +++ /dev/null @@ -1,52 +0,0 @@ -# UpdateIp - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateIp**](UpdateIp.md#UpdateIp) | **Patch** /v3/send_ips/ips/{Ip} | Update Details for an IP Address - - - -## UpdateIp - -> UpdateIp200Response UpdateIp(ctx, Ipoptional) - -Update Details for an IP Address - -This operation updates an IP address's settings, including whether the IP is set to warm up automatically, if the IP is assigned by a parent account, and whether the IP is enabled or disabled. The request body must include at least one of the `is_auto_warmup`, `is_parent_assigned`, or `is_enabled` fields. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Ip** | **string** | The `ip` path parameter specifies an IP address to make the request against. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateIpParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**UpdateIpRequest** | [**UpdateIpRequest**](UpdateIpRequest.md) | - -### Return type - -[**UpdateIp200Response**](UpdateIp200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json, application/xml - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ip_address_management/docs/UpdateIp200Response.md b/rest/api/v3/ip_address_management/docs/UpdateIp200Response.md deleted file mode 100644 index ed2bc116..00000000 --- a/rest/api/v3/ip_address_management/docs/UpdateIp200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# UpdateIp200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Ip** | **string** | The IP address that was updated. |[optional] -**IsAutoWarmup** | **bool** | Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). |[optional] -**IsParentAssigned** | **bool** | Indicates if a parent on the account is able to send email from the IP address. This parameter is returned only if the IP address is parent assigned. |[optional] -**IsEnabled** | **bool** | An array of Subuser IDs the IP address was assigned to. This parameter is returned only if the IP address is enabled. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/UpdateIpPool.md b/rest/api/v3/ip_address_management/docs/UpdateIpPool.md deleted file mode 100644 index ab0e11fd..00000000 --- a/rest/api/v3/ip_address_management/docs/UpdateIpPool.md +++ /dev/null @@ -1,52 +0,0 @@ -# UpdateIpPool - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateIpPool**](UpdateIpPool.md#UpdateIpPool) | **Put** /v3/send_ips/pools/{Poolid} | Update an IP Pool Name - - - -## UpdateIpPool - -> UpdateIpPool200Response UpdateIpPool(ctx, Poolidoptional) - -Update an IP Pool Name - -This operation will rename an IP Pool. An IP Pool name cannot start with a dot/period (.) or space. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Poolid** | **string** | Specifies the unique ID for an IP Pool. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateIpPoolParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**UpdateIpPoolRequest** | [**UpdateIpPoolRequest**](UpdateIpPoolRequest.md) | - -### Return type - -[**UpdateIpPool200Response**](UpdateIpPool200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json, application/xml - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ip_address_management/docs/UpdateIpPool200Response.md b/rest/api/v3/ip_address_management/docs/UpdateIpPool200Response.md deleted file mode 100644 index 787fe0cc..00000000 --- a/rest/api/v3/ip_address_management/docs/UpdateIpPool200Response.md +++ /dev/null @@ -1,12 +0,0 @@ -# UpdateIpPool200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name assigned to the IP Pool. |[optional] -**Id** | **string** | The unique ID of the IP Pool. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/UpdateIpPoolRequest.md b/rest/api/v3/ip_address_management/docs/UpdateIpPoolRequest.md deleted file mode 100644 index 30357410..00000000 --- a/rest/api/v3/ip_address_management/docs/UpdateIpPoolRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateIpPoolRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name to assign to the IP Pool. An IP Pool name cannot begin with a space or period. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/docs/UpdateIpRequest.md b/rest/api/v3/ip_address_management/docs/UpdateIpRequest.md deleted file mode 100644 index a3c255d2..00000000 --- a/rest/api/v3/ip_address_management/docs/UpdateIpRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# UpdateIpRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**IsAutoWarmup** | **bool** | Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). |[optional] -**IsParentAssigned** | **bool** | Indicates if a parent on the account is able to send email from the IP address. |[optional] -**IsEnabled** | **bool** | Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_address_management/model_add_ip_201_response.go b/rest/api/v3/ip_address_management/model_add_ip_201_response.go deleted file mode 100644 index 7efdcac8..00000000 --- a/rest/api/v3/ip_address_management/model_add_ip_201_response.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AddIp201Response struct for AddIp201Response -type AddIp201Response struct { - // The IP address that was added to your account. - Ip *string `json:"ip,omitempty"` - // Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). This parameter is returned only if the IP address is set to automatically warm up. - IsAutoWarmup *bool `json:"is_auto_warmup,omitempty"` - // Indicates if a parent on the account is able to send email from the IP address. - IsParentAssigned *bool `json:"is_parent_assigned,omitempty"` - // An array of Subuser IDs the IP address was assigned to. - Subusers *[]string `json:"subusers,omitempty"` - // The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. - Region *Region2 `json:"region,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_add_ip_request.go b/rest/api/v3/ip_address_management/model_add_ip_request.go deleted file mode 100644 index 919d2b8a..00000000 --- a/rest/api/v3/ip_address_management/model_add_ip_request.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AddIpRequest struct for AddIpRequest -type AddIpRequest struct { - // Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). - IsAutoWarmup bool `json:"is_auto_warmup"` - // Indicates if a parent on the account is able to send email from the IP address. - IsParentAssigned bool `json:"is_parent_assigned"` - // An array of Subuser IDs the IP address will be assigned to. - Subusers *[]string `json:"subusers,omitempty"` - // The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. - Region *Region3 `json:"region,omitempty"` - // Boolean indicating whether or not to return the IP address's region information in the response. - IncludeRegion *bool `json:"include_region,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_add_ips_to_ip_pool_200_response.go b/rest/api/v3/ip_address_management/model_add_ips_to_ip_pool_200_response.go deleted file mode 100644 index 98259263..00000000 --- a/rest/api/v3/ip_address_management/model_add_ips_to_ip_pool_200_response.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AddIpsToIpPool200Response struct for AddIpsToIpPool200Response -type AddIpsToIpPool200Response struct { - // The name of the IP Pool. - Name *string `json:"name,omitempty"` - // The unique ID of the IP Pool. - Id *string `json:"id,omitempty"` - // An array of IP addresses assigned to the IP Pool. - Ips *[]string `json:"ips,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_add_ips_to_ip_pool_request.go b/rest/api/v3/ip_address_management/model_add_ips_to_ip_pool_request.go deleted file mode 100644 index e6bc299e..00000000 --- a/rest/api/v3/ip_address_management/model_add_ips_to_ip_pool_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AddIpsToIpPoolRequest struct for AddIpsToIpPoolRequest -type AddIpsToIpPoolRequest struct { - // An array of IP addresses to assign to the specified IP Pool. All assignments must succeed. - Ips []string `json:"ips"` -} diff --git a/rest/api/v3/ip_address_management/model_add_sub_users_to_ip_200_response.go b/rest/api/v3/ip_address_management/model_add_sub_users_to_ip_200_response.go deleted file mode 100644 index c565c49b..00000000 --- a/rest/api/v3/ip_address_management/model_add_sub_users_to_ip_200_response.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AddSubUsersToIp200Response struct for AddSubUsersToIp200Response -type AddSubUsersToIp200Response struct { - // The IP address the Subusers were assigned to. - Ip *string `json:"ip,omitempty"` - // An array of Subuser IDs that were assigned to the specified IP address. - Subusers *[]string `json:"subusers,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_add_sub_users_to_ip_request.go b/rest/api/v3/ip_address_management/model_add_sub_users_to_ip_request.go deleted file mode 100644 index 72670bf6..00000000 --- a/rest/api/v3/ip_address_management/model_add_sub_users_to_ip_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AddSubUsersToIpRequest struct for AddSubUsersToIpRequest -type AddSubUsersToIpRequest struct { - // An array of Subuser IDs to be assigned to the specified IP address. All Subuser assignments must succeed. - Subusers []string `json:"subusers"` -} diff --git a/rest/api/v3/ip_address_management/model_create_ip_pool_201_response.go b/rest/api/v3/ip_address_management/model_create_ip_pool_201_response.go deleted file mode 100644 index 8fa8d726..00000000 --- a/rest/api/v3/ip_address_management/model_create_ip_pool_201_response.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateIpPool201Response struct for CreateIpPool201Response -type CreateIpPool201Response struct { - // The name assigned to the IP Pool. - Name *string `json:"name,omitempty"` - // The unique ID of the IP Pool. - Id *string `json:"id,omitempty"` - // An array of IP addresses assigned to the IP Pool. All assignments must succeed. - Ips *[]string `json:"ips,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_create_ip_pool_request.go b/rest/api/v3/ip_address_management/model_create_ip_pool_request.go deleted file mode 100644 index c702be5a..00000000 --- a/rest/api/v3/ip_address_management/model_create_ip_pool_request.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateIpPoolRequest struct for CreateIpPoolRequest -type CreateIpPoolRequest struct { - // The name to assign to the IP Pool. An IP Pool name cannot begin with a space or period. - Name string `json:"name"` - // An array of IP addresses to assign to the IP Pool. All assignments must succeed. - Ips *[]string `json:"ips,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_delete_ips_from_ip_pool_request.go b/rest/api/v3/ip_address_management/model_delete_ips_from_ip_pool_request.go deleted file mode 100644 index f61bee66..00000000 --- a/rest/api/v3/ip_address_management/model_delete_ips_from_ip_pool_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DeleteIpsFromIpPoolRequest struct for DeleteIpsFromIpPoolRequest -type DeleteIpsFromIpPoolRequest struct { - // An array of IP addresses to remove from the specified IP Pool. - Ips []string `json:"ips"` -} diff --git a/rest/api/v3/ip_address_management/model_delete_sub_users_from_ip_request.go b/rest/api/v3/ip_address_management/model_delete_sub_users_from_ip_request.go deleted file mode 100644 index b558ec05..00000000 --- a/rest/api/v3/ip_address_management/model_delete_sub_users_from_ip_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DeleteSubUsersFromIpRequest struct for DeleteSubUsersFromIpRequest -type DeleteSubUsersFromIpRequest struct { - // An array of Subuser IDs to be removed from the specified IP address. - Subusers []string `json:"subusers"` -} diff --git a/rest/api/v3/ip_address_management/model_get_ip_200_response.go b/rest/api/v3/ip_address_management/model_get_ip_200_response.go deleted file mode 100644 index e9e90214..00000000 --- a/rest/api/v3/ip_address_management/model_get_ip_200_response.go +++ /dev/null @@ -1,36 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetIp200Response struct for GetIp200Response -type GetIp200Response struct { - // The IP address specified in the request. - Ip *string `json:"ip,omitempty"` - // Indicates if a parent on the account is able to send email from the IP address. - IsParentAssigned *bool `json:"is_parent_assigned,omitempty"` - // Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). - IsAutoWarmup *bool `json:"is_auto_warmup,omitempty"` - // An array of IP Pools the IP address is assigned to. - Pools *[]GetIp200ResponsePoolsInner `json:"pools,omitempty"` - // A timestamp indicating when the IP address was added to your account. - AddedAt *int32 `json:"added_at,omitempty"` - // A timestamp indicating when the IP was last updated. - UpdatedAt *int32 `json:"updated_at,omitempty"` - // Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. - IsEnabled *bool `json:"is_enabled,omitempty"` - // Indicates whether an IP address is leased from Twilio SendGrid. If `false`, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account. - IsLeased *bool `json:"is_leased,omitempty"` - // The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. Possible values are `us` or `eu`. - Region *string `json:"region,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_get_ip_200_response_pools_inner.go b/rest/api/v3/ip_address_management/model_get_ip_200_response_pools_inner.go deleted file mode 100644 index 36e7d5ee..00000000 --- a/rest/api/v3/ip_address_management/model_get_ip_200_response_pools_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetIp200ResponsePoolsInner struct for GetIp200ResponsePoolsInner -type GetIp200ResponsePoolsInner struct { - // The ID of the IP Pool. - Id *string `json:"id,omitempty"` - // The name of the IP Pool. - Name *string `json:"name,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_get_ip_pool_200_response.go b/rest/api/v3/ip_address_management/model_get_ip_pool_200_response.go deleted file mode 100644 index cd1b5410..00000000 --- a/rest/api/v3/ip_address_management/model_get_ip_pool_200_response.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetIpPool200Response struct for GetIpPool200Response -type GetIpPool200Response struct { - // The name of the IP Pool. - Name *string `json:"name,omitempty"` - // The unique ID of the IP Pool. - Id *string `json:"id,omitempty"` - // A sample list of IP addresses associated with the IP Pool. The sample is limited to 10 results. - IpsPreview *[]string `json:"ips_preview,omitempty"` - // The total number of IP addresses in the IP Pool. An IP Pool can have a maximum of 100 associated IP addresses. - TotalIpCount *int32 `json:"total_ip_count,omitempty"` - // The total number of IP addresses by region. this object is only returned if the `include_region` parameter is included and set to `true` in the API request. - IpCountByRegion *[]GetIpPool200ResponseIpCountByRegionInner `json:"ip_count_by_region,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_get_ip_pool_200_response_ip_count_by_region_inner.go b/rest/api/v3/ip_address_management/model_get_ip_pool_200_response_ip_count_by_region_inner.go deleted file mode 100644 index e16b374a..00000000 --- a/rest/api/v3/ip_address_management/model_get_ip_pool_200_response_ip_count_by_region_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetIpPool200ResponseIpCountByRegionInner struct for GetIpPool200ResponseIpCountByRegionInner -type GetIpPool200ResponseIpCountByRegionInner struct { - // The region associated with the number of IPs listed in the `count` property. - Region *Region5 `json:"region,omitempty"` - // The number of IP addresses in the pool that are assigned to the region specified in the `region` property for this count. - Count *int32 `json:"count,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_ip_address_management_error_response.go b/rest/api/v3/ip_address_management/model_ip_address_management_error_response.go deleted file mode 100644 index a9104eff..00000000 --- a/rest/api/v3/ip_address_management/model_ip_address_management_error_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// IpAddressManagementErrorResponse IP Address Management Error Response Schema -type IpAddressManagementErrorResponse struct { - // An array of error objects. - Errors *[]IpAddressManagementErrorResponseErrorsInner `json:"errors,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_ip_address_management_error_response_errors_inner.go b/rest/api/v3/ip_address_management/model_ip_address_management_error_response_errors_inner.go deleted file mode 100644 index 731e72c3..00000000 --- a/rest/api/v3/ip_address_management/model_ip_address_management_error_response_errors_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// IpAddressManagementErrorResponseErrorsInner struct for IpAddressManagementErrorResponseErrorsInner -type IpAddressManagementErrorResponseErrorsInner struct { - // Indicates which field caused the error. This may be an empty string if no specific field is responsible for the error. - Field *string `json:"field,omitempty"` - // An error-specific message that provides more information about the error's cause. - Message *string `json:"message,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_items.go b/rest/api/v3/ip_address_management/model_items.go deleted file mode 100644 index 87d3f404..00000000 --- a/rest/api/v3/ip_address_management/model_items.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Items the model 'Items' -type Items string - -// List of Items -const ( - ITEMS_EU Items = "eu" - ITEMS_US Items = "us" -) diff --git a/rest/api/v3/ip_address_management/model_list_ip_200_response.go b/rest/api/v3/ip_address_management/model_list_ip_200_response.go deleted file mode 100644 index 9ad4f44c..00000000 --- a/rest/api/v3/ip_address_management/model_list_ip_200_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListIp200Response struct for ListIp200Response -type ListIp200Response struct { - Result *[]ListIp200ResponseResultInner `json:"result,omitempty"` - Metadata *ListIp200ResponseMetadata `json:"_metadata,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_list_ip_200_response__metadata.go b/rest/api/v3/ip_address_management/model_list_ip_200_response__metadata.go deleted file mode 100644 index 6607e47c..00000000 --- a/rest/api/v3/ip_address_management/model_list_ip_200_response__metadata.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListIp200ResponseMetadata struct for ListIp200ResponseMetadata -type ListIp200ResponseMetadata struct { - NextParams *ListIp200ResponseMetadataNextParams `json:"next_params,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_list_ip_200_response__metadata_next_params.go b/rest/api/v3/ip_address_management/model_list_ip_200_response__metadata_next_params.go deleted file mode 100644 index 51a639b8..00000000 --- a/rest/api/v3/ip_address_management/model_list_ip_200_response__metadata_next_params.go +++ /dev/null @@ -1,42 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListIp200ResponseMetadataNextParams struct for ListIp200ResponseMetadataNextParams -type ListIp200ResponseMetadataNextParams struct { - // Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `after_key` cannot be used in combination with the `before_key` parameter. - AfterKey *string `json:"after_key,omitempty"` - // Specifies which items to be returned by the API. When the `before_key` is specified, the API will return items beginning from the first item before the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `before_key` cannot be used in combination with the `after_key` parameter. - BeforeKey *string `json:"before_key,omitempty"` - // The IP address specified in the request with the `ip` query parameter. This parameter is returned only when an IP is included in the request. - Ip *string `json:"ip,omitempty"` - // Indicates whether an IP address is leased from Twilio SendGrid. If `false`, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account. This parameter is returned only if the IP address is leased. - IsLeased *bool `json:"is_leased,omitempty"` - // Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. This parameter is returned only if the IP address is enabled. - IsEnabled *bool `json:"is_enabled,omitempty"` - // Indicates if a parent on the account is able to send email from the IP address. This parameter is returned only if the IP address is parent assigned. - IsParentAssigned *bool `json:"is_parent_assigned,omitempty"` - // The IP Pool ID specified in the request with the `pool` query parameter. This parameter is returned only when an IP Pool is included in the request. - Pool *string `json:"pool,omitempty"` - // The beginning of the time window specified in the request with the `start_added_at` query parameter. This parameter is returned only when the `start_added_at` parameter is included in the request. - StartAddedAt *string `json:"start_added_at,omitempty"` - // The end of the time window specified in the request with the `end_added_at` query parameter. This parameter is returned only when the `end_added_at` parameter is included in the request. - EndAddedAt *string `json:"end_added_at,omitempty"` - // The number of items returned in the request. This parameter is returned only when a `limit` is set using the `limit` query parameter in the request. - Limit *string `json:"limit,omitempty"` - // The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request, - Region *Region1 `json:"region,omitempty"` - // Indicates whether or not to include the IP address's region. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. - IncludeRegion *string `json:"include_region,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_list_ip_200_response_result_inner.go b/rest/api/v3/ip_address_management/model_list_ip_200_response_result_inner.go deleted file mode 100644 index 594cf786..00000000 --- a/rest/api/v3/ip_address_management/model_list_ip_200_response_result_inner.go +++ /dev/null @@ -1,36 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListIp200ResponseResultInner struct for ListIp200ResponseResultInner -type ListIp200ResponseResultInner struct { - // An IP address on your account. - Ip *string `json:"ip,omitempty"` - // An array of IP Pools the IP address is assigned to. - Pools *[]ListIp200ResponseResultInnerPoolsInner `json:"pools,omitempty"` - // Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). - IsAutoWarmup *bool `json:"is_auto_warmup,omitempty"` - // Indicates if a parent on the account is able to send email from the IP address. This parameter will be returned only if the request was made by the parent account. - IsParentAssigned *bool `json:"is_parent_assigned,omitempty"` - // A timestamp indicating when the IP was last updated. - UpdatedAt *int32 `json:"updated_at,omitempty"` - // Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. - IsEnabled *bool `json:"is_enabled,omitempty"` - // Indicates whether an IP address is leased from Twilio SendGrid. If `false`, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account. - IsLeased *bool `json:"is_leased,omitempty"` - // A timestamp representing when the IP address was added to your account. - AddedAt *int32 `json:"added_at,omitempty"` - // The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. - Region *Region `json:"region,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_list_ip_200_response_result_inner_pools_inner.go b/rest/api/v3/ip_address_management/model_list_ip_200_response_result_inner_pools_inner.go deleted file mode 100644 index c16d1584..00000000 --- a/rest/api/v3/ip_address_management/model_list_ip_200_response_result_inner_pools_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListIp200ResponseResultInnerPoolsInner struct for ListIp200ResponseResultInnerPoolsInner -type ListIp200ResponseResultInnerPoolsInner struct { - // The name of the IP Pool. - Name *string `json:"name,omitempty"` - // The unique ID of the IP Pool. - Id *string `json:"id,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response.go b/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response.go deleted file mode 100644 index 9ba7de72..00000000 --- a/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListIpAssignedToIpPool200Response struct for ListIpAssignedToIpPool200Response -type ListIpAssignedToIpPool200Response struct { - Result *[]ListIpAssignedToIpPool200ResponseResultInner `json:"result,omitempty"` - Metadata *ListIpAssignedToIpPool200ResponseMetadata `json:"_metadata,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response__metadata.go b/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response__metadata.go deleted file mode 100644 index 4ba29e47..00000000 --- a/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response__metadata.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListIpAssignedToIpPool200ResponseMetadata struct for ListIpAssignedToIpPool200ResponseMetadata -type ListIpAssignedToIpPool200ResponseMetadata struct { - NextParams *ListIpAssignedToIpPool200ResponseMetadataNextParams `json:"next_params,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response__metadata_next_params.go b/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response__metadata_next_params.go deleted file mode 100644 index 2849251f..00000000 --- a/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response__metadata_next_params.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListIpAssignedToIpPool200ResponseMetadataNextParams A collection of fields that can be used to work the endpoint. -type ListIpAssignedToIpPool200ResponseMetadataNextParams struct { - // Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `after_key` cannot be used in combination with the `before_key` parameter. - AfterKey *string `json:"after_key,omitempty"` - // The `limit` specified in the request. This parameter will be included only if it was specified in the request. This is not the default limit enforced by the API. - Limit *string `json:"limit,omitempty"` - // Indicates whether or not to include the IP address's region. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. - IncludeRegion *string `json:"include_region,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response_result_inner.go b/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response_result_inner.go deleted file mode 100644 index 29a22c36..00000000 --- a/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response_result_inner.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListIpAssignedToIpPool200ResponseResultInner struct for ListIpAssignedToIpPool200ResponseResultInner -type ListIpAssignedToIpPool200ResponseResultInner struct { - // An IP address assigned to the IP Pool. - Ip *string `json:"ip,omitempty"` - // The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. - Region *Region6 `json:"region,omitempty"` - // IP Pools the IP address is assigned to. - Pools *[]ListIp200ResponseResultInnerPoolsInner `json:"pools,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_list_ip_pool_200_response.go b/rest/api/v3/ip_address_management/model_list_ip_pool_200_response.go deleted file mode 100644 index 8e432462..00000000 --- a/rest/api/v3/ip_address_management/model_list_ip_pool_200_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListIpPool200Response struct for ListIpPool200Response -type ListIpPool200Response struct { - Result *[]ListIpPool200ResponseResultInner `json:"result,omitempty"` - Metadata *ListIpPool200ResponseMetadata `json:"_metadata,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_list_ip_pool_200_response__metadata.go b/rest/api/v3/ip_address_management/model_list_ip_pool_200_response__metadata.go deleted file mode 100644 index 1d7363c6..00000000 --- a/rest/api/v3/ip_address_management/model_list_ip_pool_200_response__metadata.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListIpPool200ResponseMetadata struct for ListIpPool200ResponseMetadata -type ListIpPool200ResponseMetadata struct { - NextParams *ListIpPool200ResponseMetadataNextParams `json:"next_params,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_list_ip_pool_200_response__metadata_next_params.go b/rest/api/v3/ip_address_management/model_list_ip_pool_200_response__metadata_next_params.go deleted file mode 100644 index 7b965b61..00000000 --- a/rest/api/v3/ip_address_management/model_list_ip_pool_200_response__metadata_next_params.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListIpPool200ResponseMetadataNextParams A collection of fields that can be used to work the endpoint. -type ListIpPool200ResponseMetadataNextParams struct { - // Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `after_key` cannot be used in combination with the `before_key` parameter. - AfterKey *string `json:"after_key,omitempty"` - // The IP address specified in the request. This parameter will be returned only if it was specified in the request. - Ip *string `json:"ip,omitempty"` - // The `limit` specified in the request. This parameter will be included only if it was specified in the request. This is not the default limit enforced by the API. - Limit *string `json:"limit,omitempty"` - // The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. - Region *Region4 `json:"region,omitempty"` - // Indicates whether or not to include the IP address's region. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. - IncludeRegion *string `json:"include_region,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_list_ip_pool_200_response_result_inner.go b/rest/api/v3/ip_address_management/model_list_ip_pool_200_response_result_inner.go deleted file mode 100644 index 002e0453..00000000 --- a/rest/api/v3/ip_address_management/model_list_ip_pool_200_response_result_inner.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListIpPool200ResponseResultInner struct for ListIpPool200ResponseResultInner -type ListIpPool200ResponseResultInner struct { - // The name of the IP Pool. - Name *string `json:"name,omitempty"` - // The unique ID of the IP Pool. - Id *string `json:"id,omitempty"` - // An array of the unique regions of all the IP addresses returned within the IP pool. - Regions *[]Items `json:"regions,omitempty"` - // A sample list of IP addresses associated with the IP Pool. The sample is limited to 10 results. - IpsPreview *[]string `json:"ips_preview,omitempty"` - // The total number of IP addresses in the IP Pool. An IP Pool can have a maximum of 100 associated IP addresses. - TotalIpCount *int32 `json:"total_ip_count,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response.go b/rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response.go deleted file mode 100644 index 90af39cf..00000000 --- a/rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSubUserAssignedToIp200Response struct for ListSubUserAssignedToIp200Response -type ListSubUserAssignedToIp200Response struct { - // An array of Subuser IDs that have been assigned the specified IP address. - Result *[]string `json:"result,omitempty"` - Metadata *ListSubUserAssignedToIp200ResponseMetadata `json:"_metadata,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response__metadata.go b/rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response__metadata.go deleted file mode 100644 index 5b8c875a..00000000 --- a/rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response__metadata.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSubUserAssignedToIp200ResponseMetadata struct for ListSubUserAssignedToIp200ResponseMetadata -type ListSubUserAssignedToIp200ResponseMetadata struct { - NextParams *ListSubUserAssignedToIp200ResponseMetadataNextParams `json:"next_params,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response__metadata_next_params.go b/rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response__metadata_next_params.go deleted file mode 100644 index 4f1dad9c..00000000 --- a/rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response__metadata_next_params.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSubUserAssignedToIp200ResponseMetadataNextParams A collection of fields that can be used to work the endpoint. -type ListSubUserAssignedToIp200ResponseMetadataNextParams struct { - // Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `after_key` cannot be used in combination with the `before_key` parameter. - AfterKey *string `json:"after_key,omitempty"` - // The `limit` specified in the request. This parameter will be included only if it was specified in the request. This is not the default limit enforced by the API. - Limit *string `json:"limit,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_region.go b/rest/api/v3/ip_address_management/model_region.go deleted file mode 100644 index 5821628d..00000000 --- a/rest/api/v3/ip_address_management/model_region.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Region the model 'Region' -type Region string - -// List of Region -const ( - REGION_EU Region = "eu" - REGION_US Region = "us" -) diff --git a/rest/api/v3/ip_address_management/model_region1.go b/rest/api/v3/ip_address_management/model_region1.go deleted file mode 100644 index a6404f11..00000000 --- a/rest/api/v3/ip_address_management/model_region1.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Region1 the model 'Region1' -type Region1 string - -// List of Region1 -const ( - REGION1_ALL Region1 = "all" - REGION1_US Region1 = "us" - REGION1_EU Region1 = "eu" -) diff --git a/rest/api/v3/ip_address_management/model_region2.go b/rest/api/v3/ip_address_management/model_region2.go deleted file mode 100644 index ec82c157..00000000 --- a/rest/api/v3/ip_address_management/model_region2.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Region2 the model 'Region2' -type Region2 string - -// List of Region2 -const ( - REGION2_EU Region2 = "eu" - REGION2_US Region2 = "us" -) diff --git a/rest/api/v3/ip_address_management/model_region3.go b/rest/api/v3/ip_address_management/model_region3.go deleted file mode 100644 index ea2e6c10..00000000 --- a/rest/api/v3/ip_address_management/model_region3.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Region3 the model 'Region3' -type Region3 string - -// List of Region3 -const ( - REGION3_EU Region3 = "eu" - REGION3_US Region3 = "us" -) diff --git a/rest/api/v3/ip_address_management/model_region4.go b/rest/api/v3/ip_address_management/model_region4.go deleted file mode 100644 index 9ccd77db..00000000 --- a/rest/api/v3/ip_address_management/model_region4.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Region4 the model 'Region4' -type Region4 string - -// List of Region4 -const ( - REGION4_ALL Region4 = "all" - REGION4_US Region4 = "us" - REGION4_EU Region4 = "eu" -) diff --git a/rest/api/v3/ip_address_management/model_region5.go b/rest/api/v3/ip_address_management/model_region5.go deleted file mode 100644 index 888ec48e..00000000 --- a/rest/api/v3/ip_address_management/model_region5.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Region5 the model 'Region5' -type Region5 string - -// List of Region5 -const ( - REGION5_US Region5 = "us" - REGION5_EU Region5 = "eu" -) diff --git a/rest/api/v3/ip_address_management/model_region6.go b/rest/api/v3/ip_address_management/model_region6.go deleted file mode 100644 index df05d87e..00000000 --- a/rest/api/v3/ip_address_management/model_region6.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Region6 the model 'Region6' -type Region6 string - -// List of Region6 -const ( - REGION6_EU Region6 = "eu" - REGION6_US Region6 = "us" -) diff --git a/rest/api/v3/ip_address_management/model_region7.go b/rest/api/v3/ip_address_management/model_region7.go deleted file mode 100644 index e6136ec0..00000000 --- a/rest/api/v3/ip_address_management/model_region7.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Region7 the model 'Region7' -type Region7 string - -// List of Region7 -const ( - REGION7_ALL Region7 = "all" - REGION7_EU Region7 = "eu" - REGION7_US Region7 = "us" -) diff --git a/rest/api/v3/ip_address_management/model_update_ip_200_response.go b/rest/api/v3/ip_address_management/model_update_ip_200_response.go deleted file mode 100644 index de980353..00000000 --- a/rest/api/v3/ip_address_management/model_update_ip_200_response.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateIp200Response struct for UpdateIp200Response -type UpdateIp200Response struct { - // The IP address that was updated. - Ip *string `json:"ip,omitempty"` - // Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). - IsAutoWarmup *bool `json:"is_auto_warmup,omitempty"` - // Indicates if a parent on the account is able to send email from the IP address. This parameter is returned only if the IP address is parent assigned. - IsParentAssigned *bool `json:"is_parent_assigned,omitempty"` - // An array of Subuser IDs the IP address was assigned to. This parameter is returned only if the IP address is enabled. - IsEnabled *bool `json:"is_enabled,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_update_ip_pool_200_response.go b/rest/api/v3/ip_address_management/model_update_ip_pool_200_response.go deleted file mode 100644 index 53bb550b..00000000 --- a/rest/api/v3/ip_address_management/model_update_ip_pool_200_response.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateIpPool200Response struct for UpdateIpPool200Response -type UpdateIpPool200Response struct { - // The name assigned to the IP Pool. - Name *string `json:"name,omitempty"` - // The unique ID of the IP Pool. - Id *string `json:"id,omitempty"` -} diff --git a/rest/api/v3/ip_address_management/model_update_ip_pool_request.go b/rest/api/v3/ip_address_management/model_update_ip_pool_request.go deleted file mode 100644 index 28600e4e..00000000 --- a/rest/api/v3/ip_address_management/model_update_ip_pool_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateIpPoolRequest struct for UpdateIpPoolRequest -type UpdateIpPoolRequest struct { - // The name to assign to the IP Pool. An IP Pool name cannot begin with a space or period. - Name string `json:"name"` -} diff --git a/rest/api/v3/ip_address_management/model_update_ip_request.go b/rest/api/v3/ip_address_management/model_update_ip_request.go deleted file mode 100644 index 1d627eb2..00000000 --- a/rest/api/v3/ip_address_management/model_update_ip_request.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address Management API -* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateIpRequest struct for UpdateIpRequest -type UpdateIpRequest struct { - // Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). - IsAutoWarmup *bool `json:"is_auto_warmup,omitempty"` - // Indicates if a parent on the account is able to send email from the IP address. - IsParentAssigned *bool `json:"is_parent_assigned,omitempty"` - // Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. - IsEnabled *bool `json:"is_enabled,omitempty"` -} diff --git a/rest/api/v3/ip_warmup/.openapi-generator b/rest/api/v3/ip_warmup/.openapi-generator deleted file mode 100644 index 58aa6542..00000000 --- a/rest/api/v3/ip_warmup/.openapi-generator +++ /dev/null @@ -1,28 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_get_warm_up_ip.go -api_list_warm_up_ip.go -api_service.go -api_stop_ip_warm_up.go -api_warm_up_ip.go -docs/GetWarmUpIp.md -docs/GetWarmUpIp404Response.md -docs/GetWarmUpIp404ResponseErrorsInner.md -docs/IpWarmup200Inner.md -docs/ListWarmUpIp.md -docs/StopIpWarmUp.md -docs/StopIpWarmUp404Response.md -docs/StopIpWarmUp404ResponseErrorsInner.md -docs/WarmUpIp.md -docs/WarmUpIp404Response.md -docs/WarmUpIp404ResponseErrorsInner.md -docs/WarmUpIpRequest.md -model_get_warm_up_ip_404_response.go -model_get_warm_up_ip_404_response_errors_inner.go -model_ip_warmup200_inner.go -model_stop_ip_warm_up_404_response.go -model_stop_ip_warm_up_404_response_errors_inner.go -model_warm_up_ip_404_response.go -model_warm_up_ip_404_response_errors_inner.go -model_warm_up_ip_request.go diff --git a/rest/api/v3/ip_warmup/.openapi-generator-ignore b/rest/api/v3/ip_warmup/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/ip_warmup/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/ip_warmup/README.md b/rest/api/v3/ip_warmup/README.md deleted file mode 100644 index a043457a..00000000 --- a/rest/api/v3/ip_warmup/README.md +++ /dev/null @@ -1,76 +0,0 @@ -# Go API client for - -The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. - -SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. - -See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. - -You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:37.552368+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*GetWarmUpIp* | [**GetWarmUpIp**](docs/GetWarmUpIp.md#getwarmupip) | **Get** /v3/ips/warmup/{IpAddress} | Retrieve the warmup status for a specific IP address -*ListWarmUpIp* | [**ListWarmUpIp**](docs/ListWarmUpIp.md#listwarmupip) | **Get** /v3/ips/warmup | Retrieve all IPs currently in warmup -*StopIpWarmUp* | [**StopIpWarmUp**](docs/StopIpWarmUp.md#stopipwarmup) | **Delete** /v3/ips/warmup/{IpAddress} | Stop warming up an IP address -*WarmUpIp* | [**WarmUpIp**](docs/WarmUpIp.md#warmupip) | **Post** /v3/ips/warmup | Start warming up an IP address - - -## Documentation For Models - - - [GetWarmUpIp404Response](GetWarmUpIp404Response.md) - - [GetWarmUpIp404ResponseErrorsInner](GetWarmUpIp404ResponseErrorsInner.md) - - [IpWarmup200Inner](IpWarmup200Inner.md) - - [StopIpWarmUp404Response](StopIpWarmUp404Response.md) - - [StopIpWarmUp404ResponseErrorsInner](StopIpWarmUp404ResponseErrorsInner.md) - - [WarmUpIp404Response](WarmUpIp404Response.md) - - [WarmUpIp404ResponseErrorsInner](WarmUpIp404ResponseErrorsInner.md) - - [WarmUpIpRequest](WarmUpIpRequest.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/ip_warmup/api_get_warm_up_ip.go b/rest/api/v3/ip_warmup/api_get_warm_up_ip.go deleted file mode 100644 index 7a702bcb..00000000 --- a/rest/api/v3/ip_warmup/api_get_warm_up_ip.go +++ /dev/null @@ -1,69 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Warmup API -* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetWarmUpIpParam struct { - // The IP address that you want to retrieve the warmup status for. - IpAddress *string `json:"ip_address"` -} - -func (params *GetWarmUpIpParam) SetIpAddress(IpAddress string) *GetWarmUpIpParam { - params.IpAddress = &IpAddress - return params -} - -// **This endpoint allows you to retrieve the warmup status for a specific IP address.** You can retrieve all of your warming IPs using the \"Retrieve all IPs currently in warmup\" endpoint. -func (c *ApiService) GetWarmUpIp(params *GetWarmUpIpParam) (interface{}, error) { - path := "/v3/ips/warmup/{IpAddress}" - if params != nil && params.IpAddress != nil { - path = strings.Replace(path, "{"+"IpAddress"+"}", *params.IpAddress, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]IpWarmup200Inner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &GetWarmUpIp404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ip_warmup/api_list_warm_up_ip.go b/rest/api/v3/ip_warmup/api_list_warm_up_ip.go deleted file mode 100644 index 625dac82..00000000 --- a/rest/api/v3/ip_warmup/api_list_warm_up_ip.go +++ /dev/null @@ -1,49 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Warmup API -* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListWarmUpIpParam struct { -} - -// **This endpoint allows you to retrieve all of your IP addresses that are currently warming up.** -func (c *ApiService) ListWarmUpIp() (interface{}, error) { - path := "/v3/ips/warmup" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]IpWarmup200Inner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ip_warmup/api_service.go b/rest/api/v3/ip_warmup/api_service.go deleted file mode 100644 index 53f0581d..00000000 --- a/rest/api/v3/ip_warmup/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Warmup API -* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/ip_warmup/api_stop_ip_warm_up.go b/rest/api/v3/ip_warmup/api_stop_ip_warm_up.go deleted file mode 100644 index bcc5a0d8..00000000 --- a/rest/api/v3/ip_warmup/api_stop_ip_warm_up.go +++ /dev/null @@ -1,69 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Warmup API -* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type StopIpWarmUpParam struct { - // The IP address that you want to retrieve the warmup status for. - IpAddress *string `json:"ip_address"` -} - -func (params *StopIpWarmUpParam) SetIpAddress(IpAddress string) *StopIpWarmUpParam { - params.IpAddress = &IpAddress - return params -} - -// **This endpoint allows you to remove an IP address from warmup mode.** Your request will return a 204 status code if the specified IP was successfully removed from warmup mode. To retrieve details of the IP’s warmup status *before* removing it from warmup mode, call the \"Retrieve the warmpup status for a specific IP address\" endpoint. -func (c *ApiService) StopIpWarmUp(params *StopIpWarmUpParam) (interface{}, error) { - path := "/v3/ips/warmup/{IpAddress}" - if params != nil && params.IpAddress != nil { - path = strings.Replace(path, "{"+"IpAddress"+"}", *params.IpAddress, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &StopIpWarmUp404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ip_warmup/api_warm_up_ip.go b/rest/api/v3/ip_warmup/api_warm_up_ip.go deleted file mode 100644 index a9e295a1..00000000 --- a/rest/api/v3/ip_warmup/api_warm_up_ip.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Warmup API -* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type WarmUpIpParam struct { - // - WarmUpIpRequest *WarmUpIpRequest `json:"WarmUpIpRequest,omitempty"` -} - -func (params *WarmUpIpParam) SetWarmUpIpRequest(WarmUpIpRequest WarmUpIpRequest) *WarmUpIpParam { - params.WarmUpIpRequest = &WarmUpIpRequest - return params -} - -// **This endpoint allows you to put an IP address into warmup mode.** -func (c *ApiService) WarmUpIp(params *WarmUpIpParam) (interface{}, error) { - path := "/v3/ips/warmup" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.WarmUpIpRequest != nil { - b, err := json.Marshal(*params.WarmUpIpRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]IpWarmup200Inner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &WarmUpIp404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ip_warmup/docs/GetWarmUpIp.md b/rest/api/v3/ip_warmup/docs/GetWarmUpIp.md deleted file mode 100644 index 0339c3f5..00000000 --- a/rest/api/v3/ip_warmup/docs/GetWarmUpIp.md +++ /dev/null @@ -1,51 +0,0 @@ -# GetWarmUpIp - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetWarmUpIp**](GetWarmUpIp.md#GetWarmUpIp) | **Get** /v3/ips/warmup/{IpAddress} | Retrieve the warmup status for a specific IP address - - - -## GetWarmUpIp - -> []IpWarmup200Inner GetWarmUpIp(ctx, IpAddress) - -Retrieve the warmup status for a specific IP address - -**This endpoint allows you to retrieve the warmup status for a specific IP address.** You can retrieve all of your warming IPs using the \"Retrieve all IPs currently in warmup\" endpoint. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**IpAddress** | **string** | The IP address that you want to retrieve the warmup status for. - -### Other Parameters - -Other parameters are passed through a pointer to a GetWarmUpIpParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**[]IpWarmup200Inner**](IpWarmup200Inner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ip_warmup/docs/GetWarmUpIp404Response.md b/rest/api/v3/ip_warmup/docs/GetWarmUpIp404Response.md deleted file mode 100644 index 9126d1b7..00000000 --- a/rest/api/v3/ip_warmup/docs/GetWarmUpIp404Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetWarmUpIp404Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]GetWarmUpIp404ResponseErrorsInner**](GetWarmUpIp404ResponseErrorsInner.md) | The errors that were encountered. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_warmup/docs/GetWarmUpIp404ResponseErrorsInner.md b/rest/api/v3/ip_warmup/docs/GetWarmUpIp404ResponseErrorsInner.md deleted file mode 100644 index 64076c11..00000000 --- a/rest/api/v3/ip_warmup/docs/GetWarmUpIp404ResponseErrorsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetWarmUpIp404ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Field** | **string** | |[optional] -**Message** | **string** | A message explaining why the warmup status could not be retrieved. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_warmup/docs/IpWarmup200Inner.md b/rest/api/v3/ip_warmup/docs/IpWarmup200Inner.md deleted file mode 100644 index 7a2a6aa0..00000000 --- a/rest/api/v3/ip_warmup/docs/IpWarmup200Inner.md +++ /dev/null @@ -1,12 +0,0 @@ -# IpWarmup200Inner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Ip** | **string** | The IP address. | -**StartDate** | **int32** | A Unix timestamp indicating when the IP address entered warmup mode. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_warmup/docs/ListWarmUpIp.md b/rest/api/v3/ip_warmup/docs/ListWarmUpIp.md deleted file mode 100644 index 5944ebf3..00000000 --- a/rest/api/v3/ip_warmup/docs/ListWarmUpIp.md +++ /dev/null @@ -1,44 +0,0 @@ -# ListWarmUpIp - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListWarmUpIp**](ListWarmUpIp.md#ListWarmUpIp) | **Get** /v3/ips/warmup | Retrieve all IPs currently in warmup - - - -## ListWarmUpIp - -> []IpWarmup200Inner ListWarmUpIp(ctx, ) - -Retrieve all IPs currently in warmup - -**This endpoint allows you to retrieve all of your IP addresses that are currently warming up.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListWarmUpIpParams struct - - -### Return type - -[**[]IpWarmup200Inner**](IpWarmup200Inner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ip_warmup/docs/StopIpWarmUp.md b/rest/api/v3/ip_warmup/docs/StopIpWarmUp.md deleted file mode 100644 index e8b5e45b..00000000 --- a/rest/api/v3/ip_warmup/docs/StopIpWarmUp.md +++ /dev/null @@ -1,51 +0,0 @@ -# StopIpWarmUp - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**StopIpWarmUp**](StopIpWarmUp.md#StopIpWarmUp) | **Delete** /v3/ips/warmup/{IpAddress} | Stop warming up an IP address - - - -## StopIpWarmUp - -> map[string]interface{} StopIpWarmUp(ctx, IpAddress) - -Stop warming up an IP address - -**This endpoint allows you to remove an IP address from warmup mode.** Your request will return a 204 status code if the specified IP was successfully removed from warmup mode. To retrieve details of the IP’s warmup status *before* removing it from warmup mode, call the \"Retrieve the warmpup status for a specific IP address\" endpoint. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**IpAddress** | **string** | The IP address that you want to retrieve the warmup status for. - -### Other Parameters - -Other parameters are passed through a pointer to a StopIpWarmUpParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ip_warmup/docs/StopIpWarmUp404Response.md b/rest/api/v3/ip_warmup/docs/StopIpWarmUp404Response.md deleted file mode 100644 index 2d45e893..00000000 --- a/rest/api/v3/ip_warmup/docs/StopIpWarmUp404Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# StopIpWarmUp404Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]StopIpWarmUp404ResponseErrorsInner**](StopIpWarmUp404ResponseErrorsInner.md) | The errors that were encountered. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_warmup/docs/StopIpWarmUp404ResponseErrorsInner.md b/rest/api/v3/ip_warmup/docs/StopIpWarmUp404ResponseErrorsInner.md deleted file mode 100644 index e3f1a0e8..00000000 --- a/rest/api/v3/ip_warmup/docs/StopIpWarmUp404ResponseErrorsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# StopIpWarmUp404ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Field** | **string** | |[optional] -**Message** | **string** | A message explaining why the IP couldn't be removed from warmup. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_warmup/docs/WarmUpIp.md b/rest/api/v3/ip_warmup/docs/WarmUpIp.md deleted file mode 100644 index 336117c8..00000000 --- a/rest/api/v3/ip_warmup/docs/WarmUpIp.md +++ /dev/null @@ -1,48 +0,0 @@ -# WarmUpIp - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**WarmUpIp**](WarmUpIp.md#WarmUpIp) | **Post** /v3/ips/warmup | Start warming up an IP address - - - -## WarmUpIp - -> []IpWarmup200Inner WarmUpIp(ctx, optional) - -Start warming up an IP address - -**This endpoint allows you to put an IP address into warmup mode.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a WarmUpIpParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**WarmUpIpRequest** | [**WarmUpIpRequest**](WarmUpIpRequest.md) | - -### Return type - -[**[]IpWarmup200Inner**](IpWarmup200Inner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ip_warmup/docs/WarmUpIp404Response.md b/rest/api/v3/ip_warmup/docs/WarmUpIp404Response.md deleted file mode 100644 index 7c3164cf..00000000 --- a/rest/api/v3/ip_warmup/docs/WarmUpIp404Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# WarmUpIp404Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]WarmUpIp404ResponseErrorsInner**](WarmUpIp404ResponseErrorsInner.md) | The errors that were encountered. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_warmup/docs/WarmUpIp404ResponseErrorsInner.md b/rest/api/v3/ip_warmup/docs/WarmUpIp404ResponseErrorsInner.md deleted file mode 100644 index 82a7d9bc..00000000 --- a/rest/api/v3/ip_warmup/docs/WarmUpIp404ResponseErrorsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# WarmUpIp404ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Field** | **string** | |[optional] -**Message** | **string** | A message explaining why the IP couldn't entered into warmup mode. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_warmup/docs/WarmUpIpRequest.md b/rest/api/v3/ip_warmup/docs/WarmUpIpRequest.md deleted file mode 100644 index c929749a..00000000 --- a/rest/api/v3/ip_warmup/docs/WarmUpIpRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# WarmUpIpRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Ip** | **string** | The IP address that you want to begin warming up. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ip_warmup/model_get_warm_up_ip_404_response.go b/rest/api/v3/ip_warmup/model_get_warm_up_ip_404_response.go deleted file mode 100644 index f61bd268..00000000 --- a/rest/api/v3/ip_warmup/model_get_warm_up_ip_404_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Warmup API -* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetWarmUpIp404Response struct for GetWarmUpIp404Response -type GetWarmUpIp404Response struct { - // The errors that were encountered. - Errors *[]GetWarmUpIp404ResponseErrorsInner `json:"errors,omitempty"` -} diff --git a/rest/api/v3/ip_warmup/model_get_warm_up_ip_404_response_errors_inner.go b/rest/api/v3/ip_warmup/model_get_warm_up_ip_404_response_errors_inner.go deleted file mode 100644 index a8376a66..00000000 --- a/rest/api/v3/ip_warmup/model_get_warm_up_ip_404_response_errors_inner.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Warmup API -* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetWarmUpIp404ResponseErrorsInner struct for GetWarmUpIp404ResponseErrorsInner -type GetWarmUpIp404ResponseErrorsInner struct { - Field *string `json:"field,omitempty"` - // A message explaining why the warmup status could not be retrieved. - Message *string `json:"message,omitempty"` -} diff --git a/rest/api/v3/ip_warmup/model_ip_warmup200_inner.go b/rest/api/v3/ip_warmup/model_ip_warmup200_inner.go deleted file mode 100644 index f25f10fe..00000000 --- a/rest/api/v3/ip_warmup/model_ip_warmup200_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Warmup API -* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// IpWarmup200Inner struct for IpWarmup200Inner -type IpWarmup200Inner struct { - // The IP address. - Ip string `json:"ip"` - // A Unix timestamp indicating when the IP address entered warmup mode. - StartDate int32 `json:"start_date"` -} diff --git a/rest/api/v3/ip_warmup/model_stop_ip_warm_up_404_response.go b/rest/api/v3/ip_warmup/model_stop_ip_warm_up_404_response.go deleted file mode 100644 index 040be57a..00000000 --- a/rest/api/v3/ip_warmup/model_stop_ip_warm_up_404_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Warmup API -* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// StopIpWarmUp404Response struct for StopIpWarmUp404Response -type StopIpWarmUp404Response struct { - // The errors that were encountered. - Errors *[]StopIpWarmUp404ResponseErrorsInner `json:"errors,omitempty"` -} diff --git a/rest/api/v3/ip_warmup/model_stop_ip_warm_up_404_response_errors_inner.go b/rest/api/v3/ip_warmup/model_stop_ip_warm_up_404_response_errors_inner.go deleted file mode 100644 index 050ce700..00000000 --- a/rest/api/v3/ip_warmup/model_stop_ip_warm_up_404_response_errors_inner.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Warmup API -* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// StopIpWarmUp404ResponseErrorsInner struct for StopIpWarmUp404ResponseErrorsInner -type StopIpWarmUp404ResponseErrorsInner struct { - Field *string `json:"field,omitempty"` - // A message explaining why the IP couldn't be removed from warmup. - Message *string `json:"message,omitempty"` -} diff --git a/rest/api/v3/ip_warmup/model_warm_up_ip_404_response.go b/rest/api/v3/ip_warmup/model_warm_up_ip_404_response.go deleted file mode 100644 index 64719fc9..00000000 --- a/rest/api/v3/ip_warmup/model_warm_up_ip_404_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Warmup API -* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// WarmUpIp404Response struct for WarmUpIp404Response -type WarmUpIp404Response struct { - // The errors that were encountered. - Errors *[]WarmUpIp404ResponseErrorsInner `json:"errors,omitempty"` -} diff --git a/rest/api/v3/ip_warmup/model_warm_up_ip_404_response_errors_inner.go b/rest/api/v3/ip_warmup/model_warm_up_ip_404_response_errors_inner.go deleted file mode 100644 index 745260ae..00000000 --- a/rest/api/v3/ip_warmup/model_warm_up_ip_404_response_errors_inner.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Warmup API -* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// WarmUpIp404ResponseErrorsInner struct for WarmUpIp404ResponseErrorsInner -type WarmUpIp404ResponseErrorsInner struct { - Field *string `json:"field,omitempty"` - // A message explaining why the IP couldn't entered into warmup mode. - Message *string `json:"message,omitempty"` -} diff --git a/rest/api/v3/ip_warmup/model_warm_up_ip_request.go b/rest/api/v3/ip_warmup/model_warm_up_ip_request.go deleted file mode 100644 index ac2c2bf4..00000000 --- a/rest/api/v3/ip_warmup/model_warm_up_ip_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Warmup API -* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// WarmUpIpRequest struct for WarmUpIpRequest -type WarmUpIpRequest struct { - // The IP address that you want to begin warming up. - Ip *string `json:"ip,omitempty"` -} diff --git a/rest/api/v3/ips/.openapi-generator b/rest/api/v3/ips/.openapi-generator deleted file mode 100644 index a1797269..00000000 --- a/rest/api/v3/ips/.openapi-generator +++ /dev/null @@ -1,78 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_add_ip.go -api_add_ip_to_ip_pool.go -api_create_ip_pool.go -api_delete_ip_from_ip_pool.go -api_delete_ip_pool.go -api_get_ip.go -api_get_ip_pool.go -api_list_assigned_ip.go -api_list_ip.go -api_list_ip_pool.go -api_list_remaining_ip_count.go -api_service.go -api_update_ip_pool.go -docs/AddIp.md -docs/AddIp201Response.md -docs/AddIp201ResponseIpsInner.md -docs/AddIpRequest.md -docs/AddIpToIpPool.md -docs/AddIpToIpPool201Response.md -docs/AddIpToIpPool404Response.md -docs/AddIpToIpPool404ResponseErrorsInner.md -docs/AddIpToIpPoolRequest.md -docs/CreateIpPool.md -docs/CreateIpPoolRequest.md -docs/DeleteIpFromIpPool.md -docs/DeleteIpFromIpPool404Response.md -docs/DeleteIpPool.md -docs/DeleteIpPool404Response.md -docs/ErrorResponse.md -docs/ErrorResponseErrorsInner.md -docs/GetIp.md -docs/GetIp200Response.md -docs/GetIpPool.md -docs/GetIpPool200Response.md -docs/GetIpPool404Response.md -docs/GetIpPool404ResponseErrorsInner.md -docs/IpPools200.md -docs/ListAssignedIp.md -docs/ListAssignedIp200ResponseInner.md -docs/ListIp.md -docs/ListIp200ResponseInner.md -docs/ListIpPool.md -docs/ListRemainingIpCount.md -docs/ListRemainingIpCount200Response.md -docs/ListRemainingIpCount200ResponseResultsInner.md -docs/SortByDirection.md -docs/UpdateIpPool.md -docs/UpdateIpPool404Response.md -docs/UpdateIpPool404ResponseErrorsInner.md -docs/UpdateIpPoolRequest.md -model_add_ip_201_response.go -model_add_ip_201_response_ips_inner.go -model_add_ip_request.go -model_add_ip_to_ip_pool_201_response.go -model_add_ip_to_ip_pool_404_response.go -model_add_ip_to_ip_pool_404_response_errors_inner.go -model_add_ip_to_ip_pool_request.go -model_create_ip_pool_request.go -model_delete_ip_from_ip_pool_404_response.go -model_delete_ip_pool_404_response.go -model_error_response.go -model_error_response_errors_inner.go -model_get_ip_200_response.go -model_get_ip_pool_200_response.go -model_get_ip_pool_404_response.go -model_get_ip_pool_404_response_errors_inner.go -model_ip_pools200.go -model_list_assigned_ip_200_response_inner.go -model_list_ip_200_response_inner.go -model_list_remaining_ip_count_200_response.go -model_list_remaining_ip_count_200_response_results_inner.go -model_sort_by_direction.go -model_update_ip_pool_404_response.go -model_update_ip_pool_404_response_errors_inner.go -model_update_ip_pool_request.go diff --git a/rest/api/v3/ips/.openapi-generator-ignore b/rest/api/v3/ips/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/ips/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/ips/README.md b/rest/api/v3/ips/README.md deleted file mode 100644 index 4096f68a..00000000 --- a/rest/api/v3/ips/README.md +++ /dev/null @@ -1,95 +0,0 @@ -# Go API client for - -The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:37.554882+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AddIp* | [**AddIp**](docs/AddIp.md#addip) | **Post** /v3/ips | Add IPs -*AddIpToIpPool* | [**AddIpToIpPool**](docs/AddIpToIpPool.md#addiptoippool) | **Post** /v3/ips/pools/{PoolName}/ips | Add an IP address to a pool -*CreateIpPool* | [**CreateIpPool**](docs/CreateIpPool.md#createippool) | **Post** /v3/ips/pools | Create an IP pool -*DeleteIpFromIpPool* | [**DeleteIpFromIpPool**](docs/DeleteIpFromIpPool.md#deleteipfromippool) | **Delete** /v3/ips/pools/{PoolName}/ips/{Ip} | Remove an IP address from a pool -*DeleteIpPool* | [**DeleteIpPool**](docs/DeleteIpPool.md#deleteippool) | **Delete** /v3/ips/pools/{PoolName} | Delete an IP pool -*GetIp* | [**GetIp**](docs/GetIp.md#getip) | **Get** /v3/ips/{IpAddress} | Retrieve all IP pools an IP address belongs to -*GetIpPool* | [**GetIpPool**](docs/GetIpPool.md#getippool) | **Get** /v3/ips/pools/{PoolName} | Retrieve all the IPs in a specified pool -*ListAssignedIp* | [**ListAssignedIp**](docs/ListAssignedIp.md#listassignedip) | **Get** /v3/ips/assigned | Retrieve all assigned IPs -*ListIp* | [**ListIp**](docs/ListIp.md#listip) | **Get** /v3/ips | Retrieve all IP addresses -*ListIpPool* | [**ListIpPool**](docs/ListIpPool.md#listippool) | **Get** /v3/ips/pools | Retrieve all IP pools -*ListRemainingIpCount* | [**ListRemainingIpCount**](docs/ListRemainingIpCount.md#listremainingipcount) | **Get** /v3/ips/remaining | Get remaining IPs count -*UpdateIpPool* | [**UpdateIpPool**](docs/UpdateIpPool.md#updateippool) | **Put** /v3/ips/pools/{PoolName} | Rename an IP pool - - -## Documentation For Models - - - [AddIp201Response](AddIp201Response.md) - - [AddIp201ResponseIpsInner](AddIp201ResponseIpsInner.md) - - [AddIpRequest](AddIpRequest.md) - - [AddIpToIpPool201Response](AddIpToIpPool201Response.md) - - [AddIpToIpPool404Response](AddIpToIpPool404Response.md) - - [AddIpToIpPool404ResponseErrorsInner](AddIpToIpPool404ResponseErrorsInner.md) - - [AddIpToIpPoolRequest](AddIpToIpPoolRequest.md) - - [CreateIpPoolRequest](CreateIpPoolRequest.md) - - [DeleteIpFromIpPool404Response](DeleteIpFromIpPool404Response.md) - - [DeleteIpPool404Response](DeleteIpPool404Response.md) - - [ErrorResponse](ErrorResponse.md) - - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) - - [GetIp200Response](GetIp200Response.md) - - [GetIpPool200Response](GetIpPool200Response.md) - - [GetIpPool404Response](GetIpPool404Response.md) - - [GetIpPool404ResponseErrorsInner](GetIpPool404ResponseErrorsInner.md) - - [IpPools200](IpPools200.md) - - [ListAssignedIp200ResponseInner](ListAssignedIp200ResponseInner.md) - - [ListIp200ResponseInner](ListIp200ResponseInner.md) - - [ListRemainingIpCount200Response](ListRemainingIpCount200Response.md) - - [ListRemainingIpCount200ResponseResultsInner](ListRemainingIpCount200ResponseResultsInner.md) - - [SortByDirection](SortByDirection.md) - - [UpdateIpPool404Response](UpdateIpPool404Response.md) - - [UpdateIpPool404ResponseErrorsInner](UpdateIpPool404ResponseErrorsInner.md) - - [UpdateIpPoolRequest](UpdateIpPoolRequest.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/ips/api_add_ip.go b/rest/api/v3/ips/api_add_ip.go deleted file mode 100644 index bedc6238..00000000 --- a/rest/api/v3/ips/api_add_ip.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type AddIpParam struct { - // - AddIpRequest *AddIpRequest `json:"AddIpRequest,omitempty"` -} - -func (params *AddIpParam) SetAddIpRequest(AddIpRequest AddIpRequest) *AddIpParam { - params.AddIpRequest = &AddIpRequest - return params -} - -// **This endpoint is for adding a(n) IP Address(es) to your account.** -func (c *ApiService) AddIp(params *AddIpParam) (interface{}, error) { - path := "/v3/ips" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.AddIpRequest != nil { - b, err := json.Marshal(*params.AddIpRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &AddIp201Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ips/api_add_ip_to_ip_pool.go b/rest/api/v3/ips/api_add_ip_to_ip_pool.go deleted file mode 100644 index 7ee18eeb..00000000 --- a/rest/api/v3/ips/api_add_ip_to_ip_pool.go +++ /dev/null @@ -1,84 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type AddIpToIpPoolParam struct { - // The name of the IP pool you want to add the address to. If the name contains spaces, they must be URL encoded (e.g., \"Test Pool\" becomes \"Test%20Pool\"). - PoolName *string `json:"pool_name"` - // - AddIpToIpPoolRequest *AddIpToIpPoolRequest `json:"AddIpToIpPoolRequest,omitempty"` -} - -func (params *AddIpToIpPoolParam) SetPoolName(PoolName string) *AddIpToIpPoolParam { - params.PoolName = &PoolName - return params -} -func (params *AddIpToIpPoolParam) SetAddIpToIpPoolRequest(AddIpToIpPoolRequest AddIpToIpPoolRequest) *AddIpToIpPoolParam { - params.AddIpToIpPoolRequest = &AddIpToIpPoolRequest - return params -} - -// **This endpoint allows you to add an IP address to an IP pool.** You can add the same IP address to multiple pools. It may take up to 60 seconds for your IP address to be added to a pool after your request is made. Before you can add an IP to a pool, you need to activate it in your SendGrid account: 1. Log into your SendGrid account. 1. Navigate to **Settings** and then select **IP Addresses**. 1. Find the IP address you want to activate and then click **Edit**. 1. Check **Allow my account to send mail using this IP address**. 1. Click **Save**. You can retrieve all of your available IP addresses from the \"Retrieve all IP addresses\" endpoint. -func (c *ApiService) AddIpToIpPool(params *AddIpToIpPoolParam) (interface{}, error) { - path := "/v3/ips/pools/{PoolName}/ips" - if params != nil && params.PoolName != nil { - path = strings.Replace(path, "{"+"PoolName"+"}", *params.PoolName, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.AddIpToIpPoolRequest != nil { - b, err := json.Marshal(*params.AddIpToIpPoolRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &AddIpToIpPool201Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &AddIpToIpPool404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ips/api_create_ip_pool.go b/rest/api/v3/ips/api_create_ip_pool.go deleted file mode 100644 index b225ff48..00000000 --- a/rest/api/v3/ips/api_create_ip_pool.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type CreateIpPoolParam struct { - // - CreateIpPoolRequest *CreateIpPoolRequest `json:"CreateIpPoolRequest,omitempty"` -} - -func (params *CreateIpPoolParam) SetCreateIpPoolRequest(CreateIpPoolRequest CreateIpPoolRequest) *CreateIpPoolParam { - params.CreateIpPoolRequest = &CreateIpPoolRequest - return params -} - -// **This endpoint allows you to create an IP pool.** Before you can create an IP pool, you need to activate the IP in your SendGrid account: 1. Log into your SendGrid account. 1. Navigate to **Settings** and then select **IP Addresses**. 1. Find the IP address you want to activate and then click **Edit**. 1. Check **Allow my account to send mail using this IP address**. 1. Click **Save**. -func (c *ApiService) CreateIpPool(params *CreateIpPoolParam) (interface{}, error) { - path := "/v3/ips/pools" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.CreateIpPoolRequest != nil { - b, err := json.Marshal(*params.CreateIpPoolRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &IpPools200{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ips/api_delete_ip_from_ip_pool.go b/rest/api/v3/ips/api_delete_ip_from_ip_pool.go deleted file mode 100644 index d2251ede..00000000 --- a/rest/api/v3/ips/api_delete_ip_from_ip_pool.go +++ /dev/null @@ -1,78 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteIpFromIpPoolParam struct { - // The name of the IP pool that you are removing the IP address from. - PoolName *string `json:"pool_name"` - // The IP address that you wish to remove. - Ip *string `json:"ip"` -} - -func (params *DeleteIpFromIpPoolParam) SetPoolName(PoolName string) *DeleteIpFromIpPoolParam { - params.PoolName = &PoolName - return params -} -func (params *DeleteIpFromIpPoolParam) SetIp(Ip string) *DeleteIpFromIpPoolParam { - params.Ip = &Ip - return params -} - -// **This endpoint allows you to remove an IP address from an IP pool.** -func (c *ApiService) DeleteIpFromIpPool(params *DeleteIpFromIpPoolParam) (interface{}, error) { - path := "/v3/ips/pools/{PoolName}/ips/{Ip}" - if params != nil && params.PoolName != nil { - path = strings.Replace(path, "{"+"PoolName"+"}", *params.PoolName, -1) - } - if params != nil && params.Ip != nil { - path = strings.Replace(path, "{"+"Ip"+"}", *params.Ip, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &DeleteIpFromIpPool404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ips/api_delete_ip_pool.go b/rest/api/v3/ips/api_delete_ip_pool.go deleted file mode 100644 index 925a6a62..00000000 --- a/rest/api/v3/ips/api_delete_ip_pool.go +++ /dev/null @@ -1,69 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteIpPoolParam struct { - // The name of the IP pool that you want to retrieve the IP addresses for. - PoolName *string `json:"pool_name"` -} - -func (params *DeleteIpPoolParam) SetPoolName(PoolName string) *DeleteIpPoolParam { - params.PoolName = &PoolName - return params -} - -// **This endpoint allows you to delete an IP pool.** -func (c *ApiService) DeleteIpPool(params *DeleteIpPoolParam) (interface{}, error) { - path := "/v3/ips/pools/{PoolName}" - if params != nil && params.PoolName != nil { - path = strings.Replace(path, "{"+"PoolName"+"}", *params.PoolName, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &DeleteIpPool404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ips/api_get_ip.go b/rest/api/v3/ips/api_get_ip.go deleted file mode 100644 index a8518213..00000000 --- a/rest/api/v3/ips/api_get_ip.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetIpParam struct { - // The IP address you are retrieving the IP pools for. - IpAddress *string `json:"ip_address"` -} - -func (params *GetIpParam) SetIpAddress(IpAddress string) *GetIpParam { - params.IpAddress = &IpAddress - return params -} - -// **This endpoint allows you to see which IP pools a particular IP address has been added to.** The same IP address can be added to multiple IP pools. A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is based on the aggregate performance of all the senders who use it. -func (c *ApiService) GetIp(params *GetIpParam) (interface{}, error) { - path := "/v3/ips/{IpAddress}" - if params != nil && params.IpAddress != nil { - path = strings.Replace(path, "{"+"IpAddress"+"}", *params.IpAddress, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &GetIp200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ips/api_get_ip_pool.go b/rest/api/v3/ips/api_get_ip_pool.go deleted file mode 100644 index e7b74f02..00000000 --- a/rest/api/v3/ips/api_get_ip_pool.go +++ /dev/null @@ -1,69 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetIpPoolParam struct { - // The name of the IP pool that you want to retrieve the IP addresses for. - PoolName *string `json:"pool_name"` -} - -func (params *GetIpPoolParam) SetPoolName(PoolName string) *GetIpPoolParam { - params.PoolName = &PoolName - return params -} - -// **This endpoint allows you to get all of the IP addresses that are in a specific IP pool.** -func (c *ApiService) GetIpPool(params *GetIpPoolParam) (interface{}, error) { - path := "/v3/ips/pools/{PoolName}" - if params != nil && params.PoolName != nil { - path = strings.Replace(path, "{"+"PoolName"+"}", *params.PoolName, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &GetIpPool200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &GetIpPool404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ips/api_list_assigned_ip.go b/rest/api/v3/ips/api_list_assigned_ip.go deleted file mode 100644 index 1f3c0e7a..00000000 --- a/rest/api/v3/ips/api_list_assigned_ip.go +++ /dev/null @@ -1,49 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListAssignedIpParam struct { -} - -// **This endpoint allows you to retrieve only assigned IP addresses.** A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is based on the aggregate performance of all the senders who use it. -func (c *ApiService) ListAssignedIp() (interface{}, error) { - path := "/v3/ips/assigned" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]ListAssignedIp200ResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ips/api_list_ip.go b/rest/api/v3/ips/api_list_ip.go deleted file mode 100644 index 83531941..00000000 --- a/rest/api/v3/ips/api_list_ip.go +++ /dev/null @@ -1,106 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListIpParam struct { - // The IP address to get - Ip *string `json:"ip,omitempty"` - // Should we exclude reverse DNS records (whitelabels)? - ExcludeWhitelabels *bool `json:"exclude_whitelabels,omitempty"` - // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. - Limit *int32 `json:"limit,omitempty"` - // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. - Offset *int32 `json:"offset,omitempty"` - // The subuser you are requesting for. - Subuser *string `json:"subuser,omitempty"` - // The direction to sort the results. - SortByDirection *SortByDirection `json:"sort_by_direction,omitempty"` -} - -func (params *ListIpParam) SetIp(Ip string) *ListIpParam { - params.Ip = &Ip - return params -} -func (params *ListIpParam) SetExcludeWhitelabels(ExcludeWhitelabels bool) *ListIpParam { - params.ExcludeWhitelabels = &ExcludeWhitelabels - return params -} -func (params *ListIpParam) SetLimit(Limit int32) *ListIpParam { - params.Limit = &Limit - return params -} -func (params *ListIpParam) SetOffset(Offset int32) *ListIpParam { - params.Offset = &Offset - return params -} -func (params *ListIpParam) SetSubuser(Subuser string) *ListIpParam { - params.Subuser = &Subuser - return params -} -func (params *ListIpParam) SetSortByDirection(SortByDirection SortByDirection) *ListIpParam { - params.SortByDirection = &SortByDirection - return params -} - -// **This endpoint allows you to retrieve a paginated list of all assigned and unassigned IPs.** Response includes warm up status, pools, assigned subusers, and reverse DNS info. The start_date field corresponds to when warmup started for that IP. A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is determined by the aggregate performance of all email traffic sent from it. You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. -func (c *ApiService) ListIp(params *ListIpParam) (interface{}, error) { - path := "/v3/ips" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Ip != nil { - data.Set("ip", *params.Ip) - } - if params != nil && params.ExcludeWhitelabels != nil { - data.Set("exclude_whitelabels", fmt.Sprint(*params.ExcludeWhitelabels)) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - if params != nil && params.Subuser != nil { - data.Set("subuser", *params.Subuser) - } - if params != nil && params.SortByDirection != nil { - data.Set("sort_by_direction", fmt.Sprint(*params.SortByDirection)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]ListIp200ResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ips/api_list_ip_pool.go b/rest/api/v3/ips/api_list_ip_pool.go deleted file mode 100644 index 8174f419..00000000 --- a/rest/api/v3/ips/api_list_ip_pool.go +++ /dev/null @@ -1,49 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListIpPoolParam struct { -} - -// **This endpoint allows you to get all of your IP pools.** -func (c *ApiService) ListIpPool() (interface{}, error) { - path := "/v3/ips/pools" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]IpPools200{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ips/api_list_remaining_ip_count.go b/rest/api/v3/ips/api_list_remaining_ip_count.go deleted file mode 100644 index 6edacb31..00000000 --- a/rest/api/v3/ips/api_list_remaining_ip_count.go +++ /dev/null @@ -1,49 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListRemainingIpCountParam struct { -} - -// **This endpoint gets amount of IP Addresses that can still be created during a given period and the price of those IPs.** -func (c *ApiService) ListRemainingIpCount() (interface{}, error) { - path := "/v3/ips/remaining" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListRemainingIpCount200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ips/api_service.go b/rest/api/v3/ips/api_service.go deleted file mode 100644 index 63970833..00000000 --- a/rest/api/v3/ips/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/ips/api_update_ip_pool.go b/rest/api/v3/ips/api_update_ip_pool.go deleted file mode 100644 index b7bfc30d..00000000 --- a/rest/api/v3/ips/api_update_ip_pool.go +++ /dev/null @@ -1,84 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type UpdateIpPoolParam struct { - // The name of the IP pool that you want to retrieve the IP addresses for. - PoolName *string `json:"pool_name"` - // - UpdateIpPoolRequest *UpdateIpPoolRequest `json:"UpdateIpPoolRequest,omitempty"` -} - -func (params *UpdateIpPoolParam) SetPoolName(PoolName string) *UpdateIpPoolParam { - params.PoolName = &PoolName - return params -} -func (params *UpdateIpPoolParam) SetUpdateIpPoolRequest(UpdateIpPoolRequest UpdateIpPoolRequest) *UpdateIpPoolParam { - params.UpdateIpPoolRequest = &UpdateIpPoolRequest - return params -} - -// **This endpoint allows you to update the name of an IP pool.** -func (c *ApiService) UpdateIpPool(params *UpdateIpPoolParam) (interface{}, error) { - path := "/v3/ips/pools/{PoolName}" - if params != nil && params.PoolName != nil { - path = strings.Replace(path, "{"+"PoolName"+"}", *params.PoolName, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateIpPoolRequest != nil { - b, err := json.Marshal(*params.UpdateIpPoolRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &IpPools200{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &UpdateIpPool404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/ips/docs/AddIp.md b/rest/api/v3/ips/docs/AddIp.md deleted file mode 100644 index ec934377..00000000 --- a/rest/api/v3/ips/docs/AddIp.md +++ /dev/null @@ -1,48 +0,0 @@ -# AddIp - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddIp**](AddIp.md#AddIp) | **Post** /v3/ips | Add IPs - - - -## AddIp - -> AddIp201Response AddIp(ctx, optional) - -Add IPs - -**This endpoint is for adding a(n) IP Address(es) to your account.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a AddIpParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**AddIpRequest** | [**AddIpRequest**](AddIpRequest.md) | - -### Return type - -[**AddIp201Response**](AddIp201Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ips/docs/AddIp201Response.md b/rest/api/v3/ips/docs/AddIp201Response.md deleted file mode 100644 index f62ecfe0..00000000 --- a/rest/api/v3/ips/docs/AddIp201Response.md +++ /dev/null @@ -1,13 +0,0 @@ -# AddIp201Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Ips** | [**[]AddIp201ResponseIpsInner**](AddIp201ResponseIpsInner.md) | List of IP objects. | -**RemainingIps** | **int32** | The number of IPs that can still be added to the user. | -**Warmup** | **bool** | Whether or not the IPs are being warmed up. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ips/docs/AddIp201ResponseIpsInner.md b/rest/api/v3/ips/docs/AddIp201ResponseIpsInner.md deleted file mode 100644 index 511cef97..00000000 --- a/rest/api/v3/ips/docs/AddIp201ResponseIpsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# AddIp201ResponseIpsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Ip** | **string** | IP added to account. | -**Subusers** | **[]string** | Array of usernames assigned a send IP. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ips/docs/AddIpRequest.md b/rest/api/v3/ips/docs/AddIpRequest.md deleted file mode 100644 index 1db399db..00000000 --- a/rest/api/v3/ips/docs/AddIpRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# AddIpRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Count** | **int32** | The amount of IPs to add to the account. | -**Subusers** | **[]string** | Array of usernames to be assigned a send IP. |[optional] -**Warmup** | **bool** | Whether or not to warmup the IPs being added. |[optional] [default to false] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ips/docs/AddIpToIpPool.md b/rest/api/v3/ips/docs/AddIpToIpPool.md deleted file mode 100644 index 77559a2a..00000000 --- a/rest/api/v3/ips/docs/AddIpToIpPool.md +++ /dev/null @@ -1,52 +0,0 @@ -# AddIpToIpPool - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddIpToIpPool**](AddIpToIpPool.md#AddIpToIpPool) | **Post** /v3/ips/pools/{PoolName}/ips | Add an IP address to a pool - - - -## AddIpToIpPool - -> AddIpToIpPool201Response AddIpToIpPool(ctx, PoolNameoptional) - -Add an IP address to a pool - -**This endpoint allows you to add an IP address to an IP pool.** You can add the same IP address to multiple pools. It may take up to 60 seconds for your IP address to be added to a pool after your request is made. Before you can add an IP to a pool, you need to activate it in your SendGrid account: 1. Log into your SendGrid account. 1. Navigate to **Settings** and then select **IP Addresses**. 1. Find the IP address you want to activate and then click **Edit**. 1. Check **Allow my account to send mail using this IP address**. 1. Click **Save**. You can retrieve all of your available IP addresses from the \"Retrieve all IP addresses\" endpoint. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**PoolName** | **string** | The name of the IP pool you want to add the address to. If the name contains spaces, they must be URL encoded (e.g., \"Test Pool\" becomes \"Test%20Pool\"). - -### Other Parameters - -Other parameters are passed through a pointer to a AddIpToIpPoolParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**AddIpToIpPoolRequest** | [**AddIpToIpPoolRequest**](AddIpToIpPoolRequest.md) | - -### Return type - -[**AddIpToIpPool201Response**](AddIpToIpPool201Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ips/docs/AddIpToIpPool201Response.md b/rest/api/v3/ips/docs/AddIpToIpPool201Response.md deleted file mode 100644 index 1121a789..00000000 --- a/rest/api/v3/ips/docs/AddIpToIpPool201Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# AddIpToIpPool201Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Ip** | **string** | The IP address. | -**Pools** | **[]string** | The IP pools that this IP address has been added to. | -**StartDate** | **int32** | A Unix timestamp indicating when the warmup process began for the added IP address. | -**Warmup** | **bool** | Indicates if the IP address is in warmup. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ips/docs/AddIpToIpPool404Response.md b/rest/api/v3/ips/docs/AddIpToIpPool404Response.md deleted file mode 100644 index ad57ab01..00000000 --- a/rest/api/v3/ips/docs/AddIpToIpPool404Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# AddIpToIpPool404Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]AddIpToIpPool404ResponseErrorsInner**](AddIpToIpPool404ResponseErrorsInner.md) | The error returned. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ips/docs/AddIpToIpPool404ResponseErrorsInner.md b/rest/api/v3/ips/docs/AddIpToIpPool404ResponseErrorsInner.md deleted file mode 100644 index 8c076206..00000000 --- a/rest/api/v3/ips/docs/AddIpToIpPool404ResponseErrorsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# AddIpToIpPool404ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Field** | **string** | |[optional] -**Message** | **string** | A message explaining why the IP address could not be added to the IP Pool. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ips/docs/AddIpToIpPoolRequest.md b/rest/api/v3/ips/docs/AddIpToIpPoolRequest.md deleted file mode 100644 index 71990c86..00000000 --- a/rest/api/v3/ips/docs/AddIpToIpPoolRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# AddIpToIpPoolRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Ip** | **string** | The IP address that you want to add to the named pool. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ips/docs/CreateIpPool.md b/rest/api/v3/ips/docs/CreateIpPool.md deleted file mode 100644 index 53cb6ad9..00000000 --- a/rest/api/v3/ips/docs/CreateIpPool.md +++ /dev/null @@ -1,48 +0,0 @@ -# CreateIpPool - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateIpPool**](CreateIpPool.md#CreateIpPool) | **Post** /v3/ips/pools | Create an IP pool - - - -## CreateIpPool - -> IpPools200 CreateIpPool(ctx, optional) - -Create an IP pool - -**This endpoint allows you to create an IP pool.** Before you can create an IP pool, you need to activate the IP in your SendGrid account: 1. Log into your SendGrid account. 1. Navigate to **Settings** and then select **IP Addresses**. 1. Find the IP address you want to activate and then click **Edit**. 1. Check **Allow my account to send mail using this IP address**. 1. Click **Save**. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateIpPoolParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**CreateIpPoolRequest** | [**CreateIpPoolRequest**](CreateIpPoolRequest.md) | - -### Return type - -[**IpPools200**](IpPools200.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ips/docs/CreateIpPoolRequest.md b/rest/api/v3/ips/docs/CreateIpPoolRequest.md deleted file mode 100644 index 22c450a9..00000000 --- a/rest/api/v3/ips/docs/CreateIpPoolRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateIpPoolRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of your new IP pool. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ips/docs/DeleteIpFromIpPool.md b/rest/api/v3/ips/docs/DeleteIpFromIpPool.md deleted file mode 100644 index 0f701fa8..00000000 --- a/rest/api/v3/ips/docs/DeleteIpFromIpPool.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeleteIpFromIpPool - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteIpFromIpPool**](DeleteIpFromIpPool.md#DeleteIpFromIpPool) | **Delete** /v3/ips/pools/{PoolName}/ips/{Ip} | Remove an IP address from a pool - - - -## DeleteIpFromIpPool - -> map[string]interface{} DeleteIpFromIpPool(ctx, PoolNameIp) - -Remove an IP address from a pool - -**This endpoint allows you to remove an IP address from an IP pool.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**PoolName** | **string** | The name of the IP pool that you are removing the IP address from. -**Ip** | **string** | The IP address that you wish to remove. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteIpFromIpPoolParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ips/docs/DeleteIpFromIpPool404Response.md b/rest/api/v3/ips/docs/DeleteIpFromIpPool404Response.md deleted file mode 100644 index de7496d3..00000000 --- a/rest/api/v3/ips/docs/DeleteIpFromIpPool404Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeleteIpFromIpPool404Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Error** | **string** | An error explaining why the IP address could not be removed from the IP pool. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ips/docs/DeleteIpPool.md b/rest/api/v3/ips/docs/DeleteIpPool.md deleted file mode 100644 index 1afd2aee..00000000 --- a/rest/api/v3/ips/docs/DeleteIpPool.md +++ /dev/null @@ -1,51 +0,0 @@ -# DeleteIpPool - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteIpPool**](DeleteIpPool.md#DeleteIpPool) | **Delete** /v3/ips/pools/{PoolName} | Delete an IP pool - - - -## DeleteIpPool - -> map[string]interface{} DeleteIpPool(ctx, PoolName) - -Delete an IP pool - -**This endpoint allows you to delete an IP pool.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**PoolName** | **string** | The name of the IP pool that you want to retrieve the IP addresses for. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteIpPoolParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ips/docs/DeleteIpPool404Response.md b/rest/api/v3/ips/docs/DeleteIpPool404Response.md deleted file mode 100644 index 667bd47e..00000000 --- a/rest/api/v3/ips/docs/DeleteIpPool404Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeleteIpPool404Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Error** | **string** | An error explaining why the pool could not be deleted. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ips/docs/ErrorResponse.md b/rest/api/v3/ips/docs/ErrorResponse.md deleted file mode 100644 index ec2d41f6..00000000 --- a/rest/api/v3/ips/docs/ErrorResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ErrorResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] -**Id** | **string** | When applicable, this property value will be an error ID. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ips/docs/ErrorResponseErrorsInner.md b/rest/api/v3/ips/docs/ErrorResponseErrorsInner.md deleted file mode 100644 index 5449c685..00000000 --- a/rest/api/v3/ips/docs/ErrorResponseErrorsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ErrorResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | An error message. |[optional] -**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] -**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ips/docs/GetIp.md b/rest/api/v3/ips/docs/GetIp.md deleted file mode 100644 index c9ea8a87..00000000 --- a/rest/api/v3/ips/docs/GetIp.md +++ /dev/null @@ -1,51 +0,0 @@ -# GetIp - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetIp**](GetIp.md#GetIp) | **Get** /v3/ips/{IpAddress} | Retrieve all IP pools an IP address belongs to - - - -## GetIp - -> GetIp200Response GetIp(ctx, IpAddress) - -Retrieve all IP pools an IP address belongs to - -**This endpoint allows you to see which IP pools a particular IP address has been added to.** The same IP address can be added to multiple IP pools. A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is based on the aggregate performance of all the senders who use it. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**IpAddress** | **string** | The IP address you are retrieving the IP pools for. - -### Other Parameters - -Other parameters are passed through a pointer to a GetIpParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**GetIp200Response**](GetIp200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ips/docs/GetIp200Response.md b/rest/api/v3/ips/docs/GetIp200Response.md deleted file mode 100644 index 34637db0..00000000 --- a/rest/api/v3/ips/docs/GetIp200Response.md +++ /dev/null @@ -1,17 +0,0 @@ -# GetIp200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Ip** | **string** | The IP address. | -**Subusers** | **[]string** | The subusers that can send email using this IP address. | -**Rdns** | **string** | The reverse DNS record for this IP address. | -**Pools** | **[]string** | The list of IP pools that this IP address belongs to. | -**Warmup** | **bool** | Indicates if this IP address is currently warming up. | -**StartDate** | **int32** | The date that the IP address was entered into warmup. | -**Whitelabeled** | **bool** | Indicates if this IP address is associated with a reverse DNS record. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ips/docs/GetIpPool.md b/rest/api/v3/ips/docs/GetIpPool.md deleted file mode 100644 index 8cd51783..00000000 --- a/rest/api/v3/ips/docs/GetIpPool.md +++ /dev/null @@ -1,51 +0,0 @@ -# GetIpPool - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetIpPool**](GetIpPool.md#GetIpPool) | **Get** /v3/ips/pools/{PoolName} | Retrieve all the IPs in a specified pool - - - -## GetIpPool - -> GetIpPool200Response GetIpPool(ctx, PoolName) - -Retrieve all the IPs in a specified pool - -**This endpoint allows you to get all of the IP addresses that are in a specific IP pool.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**PoolName** | **string** | The name of the IP pool that you want to retrieve the IP addresses for. - -### Other Parameters - -Other parameters are passed through a pointer to a GetIpPoolParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**GetIpPool200Response**](GetIpPool200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ips/docs/GetIpPool200Response.md b/rest/api/v3/ips/docs/GetIpPool200Response.md deleted file mode 100644 index 6f59aa12..00000000 --- a/rest/api/v3/ips/docs/GetIpPool200Response.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetIpPool200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**PoolName** | **string** | The name of the IP pool. |[optional] -**Ips** | **[]string** | The IP addresses that belong to this pool. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ips/docs/GetIpPool404Response.md b/rest/api/v3/ips/docs/GetIpPool404Response.md deleted file mode 100644 index 6e2dcd12..00000000 --- a/rest/api/v3/ips/docs/GetIpPool404Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetIpPool404Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]GetIpPool404ResponseErrorsInner**](GetIpPool404ResponseErrorsInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ips/docs/GetIpPool404ResponseErrorsInner.md b/rest/api/v3/ips/docs/GetIpPool404ResponseErrorsInner.md deleted file mode 100644 index 03472198..00000000 --- a/rest/api/v3/ips/docs/GetIpPool404ResponseErrorsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetIpPool404ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Field** | **string** | The name of the error. |[optional] -**Message** | **string** | A message explaining why the IP addresses could not be listed. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ips/docs/IpPools200.md b/rest/api/v3/ips/docs/IpPools200.md deleted file mode 100644 index 4fcf9926..00000000 --- a/rest/api/v3/ips/docs/IpPools200.md +++ /dev/null @@ -1,11 +0,0 @@ -# IpPools200 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of the IP pool. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ips/docs/ListAssignedIp.md b/rest/api/v3/ips/docs/ListAssignedIp.md deleted file mode 100644 index 1aed835b..00000000 --- a/rest/api/v3/ips/docs/ListAssignedIp.md +++ /dev/null @@ -1,44 +0,0 @@ -# ListAssignedIp - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListAssignedIp**](ListAssignedIp.md#ListAssignedIp) | **Get** /v3/ips/assigned | Retrieve all assigned IPs - - - -## ListAssignedIp - -> []ListAssignedIp200ResponseInner ListAssignedIp(ctx, ) - -Retrieve all assigned IPs - -**This endpoint allows you to retrieve only assigned IP addresses.** A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is based on the aggregate performance of all the senders who use it. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListAssignedIpParams struct - - -### Return type - -[**[]ListAssignedIp200ResponseInner**](ListAssignedIp200ResponseInner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ips/docs/ListAssignedIp200ResponseInner.md b/rest/api/v3/ips/docs/ListAssignedIp200ResponseInner.md deleted file mode 100644 index 0992bd04..00000000 --- a/rest/api/v3/ips/docs/ListAssignedIp200ResponseInner.md +++ /dev/null @@ -1,14 +0,0 @@ -# ListAssignedIp200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Ip** | **string** | The IP address. | -**Pools** | **[]string** | The IP pools that this IP address has been added to. | -**Warmup** | **bool** | Indicates if this IP address is currently warming up. | -**StartDate** | **int32** | The start date that this IP address was entered into warmup. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ips/docs/ListIp.md b/rest/api/v3/ips/docs/ListIp.md deleted file mode 100644 index 29d02acc..00000000 --- a/rest/api/v3/ips/docs/ListIp.md +++ /dev/null @@ -1,53 +0,0 @@ -# ListIp - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListIp**](ListIp.md#ListIp) | **Get** /v3/ips | Retrieve all IP addresses - - - -## ListIp - -> []ListIp200ResponseInner ListIp(ctx, optional) - -Retrieve all IP addresses - -**This endpoint allows you to retrieve a paginated list of all assigned and unassigned IPs.** Response includes warm up status, pools, assigned subusers, and reverse DNS info. The start_date field corresponds to when warmup started for that IP. A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is determined by the aggregate performance of all email traffic sent from it. You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListIpParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Ip** | **string** | The IP address to get -**ExcludeWhitelabels** | **bool** | Should we exclude reverse DNS records (whitelabels)? -**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. -**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. -**Subuser** | **string** | The subuser you are requesting for. -**SortByDirection** | [**SortByDirection**](SortByDirectionSortByDirection.md) | The direction to sort the results. - -### Return type - -[**[]ListIp200ResponseInner**](ListIp200ResponseInner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ips/docs/ListIp200ResponseInner.md b/rest/api/v3/ips/docs/ListIp200ResponseInner.md deleted file mode 100644 index 7b8e15a9..00000000 --- a/rest/api/v3/ips/docs/ListIp200ResponseInner.md +++ /dev/null @@ -1,18 +0,0 @@ -# ListIp200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Ip** | **string** | An IP address. | -**Subusers** | **[]string** | The subusers that are able to send email from this IP. | -**Rdns** | **string** | The reverse DNS record for this IP address. |[optional] -**Pools** | **[]string** | The IP pools that this IP has been added to. | -**Warmup** | **bool** | Indicates if this IP address is currently warming up. | -**StartDate** | **float32** | The date that the IP address was entered into warmup. | -**Whitelabeled** | **bool** | Indicates if this IP address is associated with a reverse DNS record. | -**AssignedAt** | **int32** | The date that the IP address was assigned to the user. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ips/docs/ListIpPool.md b/rest/api/v3/ips/docs/ListIpPool.md deleted file mode 100644 index 56fc7cf8..00000000 --- a/rest/api/v3/ips/docs/ListIpPool.md +++ /dev/null @@ -1,44 +0,0 @@ -# ListIpPool - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListIpPool**](ListIpPool.md#ListIpPool) | **Get** /v3/ips/pools | Retrieve all IP pools - - - -## ListIpPool - -> []IpPools200 ListIpPool(ctx, ) - -Retrieve all IP pools - -**This endpoint allows you to get all of your IP pools.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListIpPoolParams struct - - -### Return type - -[**[]IpPools200**](IpPools200.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ips/docs/ListRemainingIpCount.md b/rest/api/v3/ips/docs/ListRemainingIpCount.md deleted file mode 100644 index f3df4a93..00000000 --- a/rest/api/v3/ips/docs/ListRemainingIpCount.md +++ /dev/null @@ -1,44 +0,0 @@ -# ListRemainingIpCount - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListRemainingIpCount**](ListRemainingIpCount.md#ListRemainingIpCount) | **Get** /v3/ips/remaining | Get remaining IPs count - - - -## ListRemainingIpCount - -> ListRemainingIpCount200Response ListRemainingIpCount(ctx, ) - -Get remaining IPs count - -**This endpoint gets amount of IP Addresses that can still be created during a given period and the price of those IPs.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListRemainingIpCountParams struct - - -### Return type - -[**ListRemainingIpCount200Response**](ListRemainingIpCount200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ips/docs/ListRemainingIpCount200Response.md b/rest/api/v3/ips/docs/ListRemainingIpCount200Response.md deleted file mode 100644 index 8496c11d..00000000 --- a/rest/api/v3/ips/docs/ListRemainingIpCount200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListRemainingIpCount200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Results** | [**[]ListRemainingIpCount200ResponseResultsInner**](ListRemainingIpCount200ResponseResultsInner.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ips/docs/ListRemainingIpCount200ResponseResultsInner.md b/rest/api/v3/ips/docs/ListRemainingIpCount200ResponseResultsInner.md deleted file mode 100644 index 2eddbb09..00000000 --- a/rest/api/v3/ips/docs/ListRemainingIpCount200ResponseResultsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListRemainingIpCount200ResponseResultsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Remaining** | **int32** | The number of IPs that can still be added to the user. | -**Period** | **string** | The length of time until user can add more IPs. | -**PricePerIp** | **float32** | The current cost to add an IP. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ips/docs/SortByDirection.md b/rest/api/v3/ips/docs/SortByDirection.md deleted file mode 100644 index 0431e9a0..00000000 --- a/rest/api/v3/ips/docs/SortByDirection.md +++ /dev/null @@ -1,13 +0,0 @@ -# SortByDirection - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**DESC** | string | (value: `"desc"`) -**ASC** | string | (value: `"asc"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ips/docs/UpdateIpPool.md b/rest/api/v3/ips/docs/UpdateIpPool.md deleted file mode 100644 index 8f766155..00000000 --- a/rest/api/v3/ips/docs/UpdateIpPool.md +++ /dev/null @@ -1,52 +0,0 @@ -# UpdateIpPool - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateIpPool**](UpdateIpPool.md#UpdateIpPool) | **Put** /v3/ips/pools/{PoolName} | Rename an IP pool - - - -## UpdateIpPool - -> IpPools200 UpdateIpPool(ctx, PoolNameoptional) - -Rename an IP pool - -**This endpoint allows you to update the name of an IP pool.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**PoolName** | **string** | The name of the IP pool that you want to retrieve the IP addresses for. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateIpPoolParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**UpdateIpPoolRequest** | [**UpdateIpPoolRequest**](UpdateIpPoolRequest.md) | - -### Return type - -[**IpPools200**](IpPools200.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/ips/docs/UpdateIpPool404Response.md b/rest/api/v3/ips/docs/UpdateIpPool404Response.md deleted file mode 100644 index e3c5d6d7..00000000 --- a/rest/api/v3/ips/docs/UpdateIpPool404Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateIpPool404Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]UpdateIpPool404ResponseErrorsInner**](UpdateIpPool404ResponseErrorsInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ips/docs/UpdateIpPool404ResponseErrorsInner.md b/rest/api/v3/ips/docs/UpdateIpPool404ResponseErrorsInner.md deleted file mode 100644 index 58d029a9..00000000 --- a/rest/api/v3/ips/docs/UpdateIpPool404ResponseErrorsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# UpdateIpPool404ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Field** | **string** | |[optional] -**Message** | **string** | A message explaining why the name of your IP pool could not be updated. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ips/docs/UpdateIpPoolRequest.md b/rest/api/v3/ips/docs/UpdateIpPoolRequest.md deleted file mode 100644 index dff93b64..00000000 --- a/rest/api/v3/ips/docs/UpdateIpPoolRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateIpPoolRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The new name for your IP pool. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/ips/model_add_ip_201_response.go b/rest/api/v3/ips/model_add_ip_201_response.go deleted file mode 100644 index ac46d11c..00000000 --- a/rest/api/v3/ips/model_add_ip_201_response.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AddIp201Response struct for AddIp201Response -type AddIp201Response struct { - // List of IP objects. - Ips []AddIp201ResponseIpsInner `json:"ips"` - // The number of IPs that can still be added to the user. - RemainingIps int32 `json:"remaining_ips"` - // Whether or not the IPs are being warmed up. - Warmup bool `json:"warmup"` -} diff --git a/rest/api/v3/ips/model_add_ip_201_response_ips_inner.go b/rest/api/v3/ips/model_add_ip_201_response_ips_inner.go deleted file mode 100644 index e69af04a..00000000 --- a/rest/api/v3/ips/model_add_ip_201_response_ips_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AddIp201ResponseIpsInner struct for AddIp201ResponseIpsInner -type AddIp201ResponseIpsInner struct { - // IP added to account. - Ip string `json:"ip"` - // Array of usernames assigned a send IP. - Subusers []string `json:"subusers"` -} diff --git a/rest/api/v3/ips/model_add_ip_request.go b/rest/api/v3/ips/model_add_ip_request.go deleted file mode 100644 index 4a68e8ca..00000000 --- a/rest/api/v3/ips/model_add_ip_request.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AddIpRequest struct for AddIpRequest -type AddIpRequest struct { - // The amount of IPs to add to the account. - Count int32 `json:"count"` - // Array of usernames to be assigned a send IP. - Subusers *[]string `json:"subusers,omitempty"` - // Whether or not to warmup the IPs being added. - Warmup *bool `json:"warmup,omitempty"` -} diff --git a/rest/api/v3/ips/model_add_ip_to_ip_pool_201_response.go b/rest/api/v3/ips/model_add_ip_to_ip_pool_201_response.go deleted file mode 100644 index dbbb205e..00000000 --- a/rest/api/v3/ips/model_add_ip_to_ip_pool_201_response.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AddIpToIpPool201Response struct for AddIpToIpPool201Response -type AddIpToIpPool201Response struct { - // The IP address. - Ip string `json:"ip"` - // The IP pools that this IP address has been added to. - Pools []string `json:"pools"` - // A Unix timestamp indicating when the warmup process began for the added IP address. - StartDate int32 `json:"start_date"` - // Indicates if the IP address is in warmup. - Warmup bool `json:"warmup"` -} diff --git a/rest/api/v3/ips/model_add_ip_to_ip_pool_404_response.go b/rest/api/v3/ips/model_add_ip_to_ip_pool_404_response.go deleted file mode 100644 index a0333b44..00000000 --- a/rest/api/v3/ips/model_add_ip_to_ip_pool_404_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AddIpToIpPool404Response struct for AddIpToIpPool404Response -type AddIpToIpPool404Response struct { - // The error returned. - Errors *[]AddIpToIpPool404ResponseErrorsInner `json:"errors,omitempty"` -} diff --git a/rest/api/v3/ips/model_add_ip_to_ip_pool_404_response_errors_inner.go b/rest/api/v3/ips/model_add_ip_to_ip_pool_404_response_errors_inner.go deleted file mode 100644 index eccc086a..00000000 --- a/rest/api/v3/ips/model_add_ip_to_ip_pool_404_response_errors_inner.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AddIpToIpPool404ResponseErrorsInner struct for AddIpToIpPool404ResponseErrorsInner -type AddIpToIpPool404ResponseErrorsInner struct { - Field *string `json:"field,omitempty"` - // A message explaining why the IP address could not be added to the IP Pool. - Message *string `json:"message,omitempty"` -} diff --git a/rest/api/v3/ips/model_add_ip_to_ip_pool_request.go b/rest/api/v3/ips/model_add_ip_to_ip_pool_request.go deleted file mode 100644 index 4ab23abf..00000000 --- a/rest/api/v3/ips/model_add_ip_to_ip_pool_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AddIpToIpPoolRequest struct for AddIpToIpPoolRequest -type AddIpToIpPoolRequest struct { - // The IP address that you want to add to the named pool. - Ip *string `json:"ip,omitempty"` -} diff --git a/rest/api/v3/ips/model_create_ip_pool_request.go b/rest/api/v3/ips/model_create_ip_pool_request.go deleted file mode 100644 index 03bc175b..00000000 --- a/rest/api/v3/ips/model_create_ip_pool_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateIpPoolRequest struct for CreateIpPoolRequest -type CreateIpPoolRequest struct { - // The name of your new IP pool. - Name string `json:"name"` -} diff --git a/rest/api/v3/ips/model_delete_ip_from_ip_pool_404_response.go b/rest/api/v3/ips/model_delete_ip_from_ip_pool_404_response.go deleted file mode 100644 index c07d37d5..00000000 --- a/rest/api/v3/ips/model_delete_ip_from_ip_pool_404_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DeleteIpFromIpPool404Response struct for DeleteIpFromIpPool404Response -type DeleteIpFromIpPool404Response struct { - // An error explaining why the IP address could not be removed from the IP pool. - Error *string `json:"error,omitempty"` -} diff --git a/rest/api/v3/ips/model_delete_ip_pool_404_response.go b/rest/api/v3/ips/model_delete_ip_pool_404_response.go deleted file mode 100644 index e44f5d7a..00000000 --- a/rest/api/v3/ips/model_delete_ip_pool_404_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DeleteIpPool404Response struct for DeleteIpPool404Response -type DeleteIpPool404Response struct { - // An error explaining why the pool could not be deleted. - Error *string `json:"error,omitempty"` -} diff --git a/rest/api/v3/ips/model_error_response.go b/rest/api/v3/ips/model_error_response.go deleted file mode 100644 index 56fbd3ec..00000000 --- a/rest/api/v3/ips/model_error_response.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponse struct for ErrorResponse -type ErrorResponse struct { - Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` - // When applicable, this property value will be an error ID. - Id *string `json:"id,omitempty"` -} diff --git a/rest/api/v3/ips/model_error_response_errors_inner.go b/rest/api/v3/ips/model_error_response_errors_inner.go deleted file mode 100644 index 40c6b644..00000000 --- a/rest/api/v3/ips/model_error_response_errors_inner.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner -type ErrorResponseErrorsInner struct { - // An error message. - Message *string `json:"message,omitempty"` - // When applicable, this property value will be the field that generated the error. - Field *string `json:"field,omitempty"` - // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. - Help *map[string]interface{} `json:"help,omitempty"` -} diff --git a/rest/api/v3/ips/model_get_ip_200_response.go b/rest/api/v3/ips/model_get_ip_200_response.go deleted file mode 100644 index e04eb406..00000000 --- a/rest/api/v3/ips/model_get_ip_200_response.go +++ /dev/null @@ -1,32 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetIp200Response struct for GetIp200Response -type GetIp200Response struct { - // The IP address. - Ip string `json:"ip"` - // The subusers that can send email using this IP address. - Subusers []string `json:"subusers"` - // The reverse DNS record for this IP address. - Rdns string `json:"rdns"` - // The list of IP pools that this IP address belongs to. - Pools []string `json:"pools"` - // Indicates if this IP address is currently warming up. - Warmup bool `json:"warmup"` - // The date that the IP address was entered into warmup. - StartDate int32 `json:"start_date"` - // Indicates if this IP address is associated with a reverse DNS record. - Whitelabeled bool `json:"whitelabeled"` -} diff --git a/rest/api/v3/ips/model_get_ip_pool_200_response.go b/rest/api/v3/ips/model_get_ip_pool_200_response.go deleted file mode 100644 index e76d06e5..00000000 --- a/rest/api/v3/ips/model_get_ip_pool_200_response.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetIpPool200Response struct for GetIpPool200Response -type GetIpPool200Response struct { - // The name of the IP pool. - PoolName *string `json:"pool_name,omitempty"` - // The IP addresses that belong to this pool. - Ips *[]string `json:"ips,omitempty"` -} diff --git a/rest/api/v3/ips/model_get_ip_pool_404_response.go b/rest/api/v3/ips/model_get_ip_pool_404_response.go deleted file mode 100644 index d6bf3c53..00000000 --- a/rest/api/v3/ips/model_get_ip_pool_404_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetIpPool404Response struct for GetIpPool404Response -type GetIpPool404Response struct { - Errors *[]GetIpPool404ResponseErrorsInner `json:"errors,omitempty"` -} diff --git a/rest/api/v3/ips/model_get_ip_pool_404_response_errors_inner.go b/rest/api/v3/ips/model_get_ip_pool_404_response_errors_inner.go deleted file mode 100644 index 2478d7b8..00000000 --- a/rest/api/v3/ips/model_get_ip_pool_404_response_errors_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetIpPool404ResponseErrorsInner struct for GetIpPool404ResponseErrorsInner -type GetIpPool404ResponseErrorsInner struct { - // The name of the error. - Field *string `json:"field,omitempty"` - // A message explaining why the IP addresses could not be listed. - Message *string `json:"message,omitempty"` -} diff --git a/rest/api/v3/ips/model_ip_pools200.go b/rest/api/v3/ips/model_ip_pools200.go deleted file mode 100644 index 5e4936fb..00000000 --- a/rest/api/v3/ips/model_ip_pools200.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// IpPools200 struct for IpPools200 -type IpPools200 struct { - // The name of the IP pool. - Name *string `json:"name,omitempty"` -} diff --git a/rest/api/v3/ips/model_list_assigned_ip_200_response_inner.go b/rest/api/v3/ips/model_list_assigned_ip_200_response_inner.go deleted file mode 100644 index bdeb0205..00000000 --- a/rest/api/v3/ips/model_list_assigned_ip_200_response_inner.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListAssignedIp200ResponseInner struct for ListAssignedIp200ResponseInner -type ListAssignedIp200ResponseInner struct { - // The IP address. - Ip string `json:"ip"` - // The IP pools that this IP address has been added to. - Pools []string `json:"pools"` - // Indicates if this IP address is currently warming up. - Warmup bool `json:"warmup"` - // The start date that this IP address was entered into warmup. - StartDate int32 `json:"start_date"` -} diff --git a/rest/api/v3/ips/model_list_ip_200_response_inner.go b/rest/api/v3/ips/model_list_ip_200_response_inner.go deleted file mode 100644 index bed4a8f8..00000000 --- a/rest/api/v3/ips/model_list_ip_200_response_inner.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListIp200ResponseInner struct for ListIp200ResponseInner -type ListIp200ResponseInner struct { - // An IP address. - Ip string `json:"ip"` - // The subusers that are able to send email from this IP. - Subusers []string `json:"subusers"` - // The reverse DNS record for this IP address. - Rdns *string `json:"rdns,omitempty"` - // The IP pools that this IP has been added to. - Pools []string `json:"pools"` - // Indicates if this IP address is currently warming up. - Warmup bool `json:"warmup"` - // The date that the IP address was entered into warmup. - StartDate float32 `json:"start_date"` - // Indicates if this IP address is associated with a reverse DNS record. - Whitelabeled bool `json:"whitelabeled"` - // The date that the IP address was assigned to the user. - AssignedAt int32 `json:"assigned_at"` -} diff --git a/rest/api/v3/ips/model_list_remaining_ip_count_200_response.go b/rest/api/v3/ips/model_list_remaining_ip_count_200_response.go deleted file mode 100644 index 4bdd5881..00000000 --- a/rest/api/v3/ips/model_list_remaining_ip_count_200_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListRemainingIpCount200Response struct for ListRemainingIpCount200Response -type ListRemainingIpCount200Response struct { - Results []ListRemainingIpCount200ResponseResultsInner `json:"results"` -} diff --git a/rest/api/v3/ips/model_list_remaining_ip_count_200_response_results_inner.go b/rest/api/v3/ips/model_list_remaining_ip_count_200_response_results_inner.go deleted file mode 100644 index ec67dd2f..00000000 --- a/rest/api/v3/ips/model_list_remaining_ip_count_200_response_results_inner.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListRemainingIpCount200ResponseResultsInner struct for ListRemainingIpCount200ResponseResultsInner -type ListRemainingIpCount200ResponseResultsInner struct { - // The number of IPs that can still be added to the user. - Remaining int32 `json:"remaining"` - // The length of time until user can add more IPs. - Period string `json:"period"` - // The current cost to add an IP. - PricePerIp float32 `json:"price_per_ip"` -} diff --git a/rest/api/v3/ips/model_sort_by_direction.go b/rest/api/v3/ips/model_sort_by_direction.go deleted file mode 100644 index 0e012a7d..00000000 --- a/rest/api/v3/ips/model_sort_by_direction.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SortByDirection the model 'SortByDirection' -type SortByDirection string - -// List of SortByDirection -const ( - SORTBYDIRECTION_DESC SortByDirection = "desc" - SORTBYDIRECTION_ASC SortByDirection = "asc" -) diff --git a/rest/api/v3/ips/model_update_ip_pool_404_response.go b/rest/api/v3/ips/model_update_ip_pool_404_response.go deleted file mode 100644 index 9fca7b4c..00000000 --- a/rest/api/v3/ips/model_update_ip_pool_404_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateIpPool404Response struct for UpdateIpPool404Response -type UpdateIpPool404Response struct { - Errors *[]UpdateIpPool404ResponseErrorsInner `json:"errors,omitempty"` -} diff --git a/rest/api/v3/ips/model_update_ip_pool_404_response_errors_inner.go b/rest/api/v3/ips/model_update_ip_pool_404_response_errors_inner.go deleted file mode 100644 index 906137fd..00000000 --- a/rest/api/v3/ips/model_update_ip_pool_404_response_errors_inner.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateIpPool404ResponseErrorsInner struct for UpdateIpPool404ResponseErrorsInner -type UpdateIpPool404ResponseErrorsInner struct { - Field *string `json:"field,omitempty"` - // A message explaining why the name of your IP pool could not be updated. - Message *string `json:"message,omitempty"` -} diff --git a/rest/api/v3/ips/model_update_ip_pool_request.go b/rest/api/v3/ips/model_update_ip_pool_request.go deleted file mode 100644 index 766187d9..00000000 --- a/rest/api/v3/ips/model_update_ip_pool_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid IP Address API -* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateIpPoolRequest struct for UpdateIpPoolRequest -type UpdateIpPoolRequest struct { - // The new name for your IP pool. - Name *string `json:"name,omitempty"` -} diff --git a/rest/api/v3/link_branding/.openapi-generator b/rest/api/v3/link_branding/.openapi-generator deleted file mode 100644 index 95d56b5d..00000000 --- a/rest/api/v3/link_branding/.openapi-generator +++ /dev/null @@ -1,76 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_associate_branded_link_with_subuser.go -api_create_branded_link.go -api_delete_branded_link.go -api_disassociate_branded_link_from_subuser.go -api_get_branded_link.go -api_list_branded_link.go -api_list_default_branded_link.go -api_list_subuser_branded_link.go -api_service.go -api_update_branded_link.go -api_validate_branded_link.go -docs/AssociateBrandedLinkWithSubuser.md -docs/AssociateBrandedLinkWithSubuserRequest.md -docs/CreateBrandedLink.md -docs/CreateBrandedLinkRequest.md -docs/Default.md -docs/Default1.md -docs/Default2.md -docs/DeleteBrandedLink.md -docs/DisassociateBrandedLinkFromSubuser.md -docs/GetBrandedLink.md -docs/Legacy.md -docs/LinkBranding200.md -docs/LinkBranding200Dns.md -docs/LinkBranding200DnsDomainCname.md -docs/LinkBranding200DnsOwnerCname.md -docs/ListBrandedLink.md -docs/ListDefaultBrandedLink.md -docs/ListSubuserBrandedLink.md -docs/Region.md -docs/Type.md -docs/Type1.md -docs/UpdateBrandedLink.md -docs/UpdateBrandedLinkRequest.md -docs/Valid.md -docs/Valid1.md -docs/Valid2.md -docs/Valid3.md -docs/Valid4.md -docs/Valid5.md -docs/ValidateBrandedLink.md -docs/ValidateBrandedLink200Response.md -docs/ValidateBrandedLink200ResponseValidationResults.md -docs/ValidateBrandedLink200ResponseValidationResultsDomainCname.md -docs/ValidateBrandedLink200ResponseValidationResultsOwnerCname.md -docs/ValidateBrandedLink500Response.md -docs/ValidateBrandedLink500ResponseErrorsInner.md -model_associate_branded_link_with_subuser_request.go -model_create_branded_link_request.go -model_default.go -model_default1.go -model_default2.go -model_legacy.go -model_link_branding200.go -model_link_branding200_dns.go -model_link_branding200_dns_domain_cname.go -model_link_branding200_dns_owner_cname.go -model_region.go -model_type.go -model_type1.go -model_update_branded_link_request.go -model_valid.go -model_valid1.go -model_valid2.go -model_valid3.go -model_valid4.go -model_valid5.go -model_validate_branded_link_200_response.go -model_validate_branded_link_200_response_validation_results.go -model_validate_branded_link_200_response_validation_results_domain_cname.go -model_validate_branded_link_200_response_validation_results_owner_cname.go -model_validate_branded_link_500_response.go -model_validate_branded_link_500_response_errors_inner.go diff --git a/rest/api/v3/link_branding/.openapi-generator-ignore b/rest/api/v3/link_branding/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/link_branding/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/link_branding/README.md b/rest/api/v3/link_branding/README.md deleted file mode 100644 index 00f6eb72..00000000 --- a/rest/api/v3/link_branding/README.md +++ /dev/null @@ -1,98 +0,0 @@ -# Go API client for - -The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. - -You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. - - See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:37.551339+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AssociateBrandedLinkWithSubuser* | [**AssociateBrandedLinkWithSubuser**](docs/AssociateBrandedLinkWithSubuser.md#associatebrandedlinkwithsubuser) | **Post** /v3/whitelabel/links/{LinkId}/subuser | Associate a branded link with a subuser -*CreateBrandedLink* | [**CreateBrandedLink**](docs/CreateBrandedLink.md#createbrandedlink) | **Post** /v3/whitelabel/links | Create a branded link -*DeleteBrandedLink* | [**DeleteBrandedLink**](docs/DeleteBrandedLink.md#deletebrandedlink) | **Delete** /v3/whitelabel/links/{Id} | Delete a branded link -*DisassociateBrandedLinkFromSubuser* | [**DisassociateBrandedLinkFromSubuser**](docs/DisassociateBrandedLinkFromSubuser.md#disassociatebrandedlinkfromsubuser) | **Delete** /v3/whitelabel/links/subuser | Disassociate a branded link from a subuser -*GetBrandedLink* | [**GetBrandedLink**](docs/GetBrandedLink.md#getbrandedlink) | **Get** /v3/whitelabel/links/{Id} | Retrieve a branded link -*ListBrandedLink* | [**ListBrandedLink**](docs/ListBrandedLink.md#listbrandedlink) | **Get** /v3/whitelabel/links | Retrieve all branded links -*ListDefaultBrandedLink* | [**ListDefaultBrandedLink**](docs/ListDefaultBrandedLink.md#listdefaultbrandedlink) | **Get** /v3/whitelabel/links/default | Retrieve the default branded link -*ListSubuserBrandedLink* | [**ListSubuserBrandedLink**](docs/ListSubuserBrandedLink.md#listsubuserbrandedlink) | **Get** /v3/whitelabel/links/subuser | Retrieve a subuser's branded link -*UpdateBrandedLink* | [**UpdateBrandedLink**](docs/UpdateBrandedLink.md#updatebrandedlink) | **Patch** /v3/whitelabel/links/{Id} | Update a branded link -*ValidateBrandedLink* | [**ValidateBrandedLink**](docs/ValidateBrandedLink.md#validatebrandedlink) | **Post** /v3/whitelabel/links/{Id}/validate | Validate a branded link - - -## Documentation For Models - - - [AssociateBrandedLinkWithSubuserRequest](AssociateBrandedLinkWithSubuserRequest.md) - - [CreateBrandedLinkRequest](CreateBrandedLinkRequest.md) - - [Default](Default.md) - - [Default1](Default1.md) - - [Default2](Default2.md) - - [Legacy](Legacy.md) - - [LinkBranding200](LinkBranding200.md) - - [LinkBranding200Dns](LinkBranding200Dns.md) - - [LinkBranding200DnsDomainCname](LinkBranding200DnsDomainCname.md) - - [LinkBranding200DnsOwnerCname](LinkBranding200DnsOwnerCname.md) - - [Region](Region.md) - - [Type](Type.md) - - [Type1](Type1.md) - - [UpdateBrandedLinkRequest](UpdateBrandedLinkRequest.md) - - [Valid](Valid.md) - - [Valid1](Valid1.md) - - [Valid2](Valid2.md) - - [Valid3](Valid3.md) - - [Valid4](Valid4.md) - - [Valid5](Valid5.md) - - [ValidateBrandedLink200Response](ValidateBrandedLink200Response.md) - - [ValidateBrandedLink200ResponseValidationResults](ValidateBrandedLink200ResponseValidationResults.md) - - [ValidateBrandedLink200ResponseValidationResultsDomainCname](ValidateBrandedLink200ResponseValidationResultsDomainCname.md) - - [ValidateBrandedLink200ResponseValidationResultsOwnerCname](ValidateBrandedLink200ResponseValidationResultsOwnerCname.md) - - [ValidateBrandedLink500Response](ValidateBrandedLink500Response.md) - - [ValidateBrandedLink500ResponseErrorsInner](ValidateBrandedLink500ResponseErrorsInner.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/link_branding/api_associate_branded_link_with_subuser.go b/rest/api/v3/link_branding/api_associate_branded_link_with_subuser.go deleted file mode 100644 index 7b5595bb..00000000 --- a/rest/api/v3/link_branding/api_associate_branded_link_with_subuser.go +++ /dev/null @@ -1,77 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type AssociateBrandedLinkWithSubuserParam struct { - // The ID of the branded link you want to associate. - LinkId *int32 `json:"link_id"` - // - AssociateBrandedLinkWithSubuserRequest *AssociateBrandedLinkWithSubuserRequest `json:"AssociateBrandedLinkWithSubuserRequest,omitempty"` -} - -func (params *AssociateBrandedLinkWithSubuserParam) SetLinkId(LinkId int32) *AssociateBrandedLinkWithSubuserParam { - params.LinkId = &LinkId - return params -} -func (params *AssociateBrandedLinkWithSubuserParam) SetAssociateBrandedLinkWithSubuserRequest(AssociateBrandedLinkWithSubuserRequest AssociateBrandedLinkWithSubuserRequest) *AssociateBrandedLinkWithSubuserParam { - params.AssociateBrandedLinkWithSubuserRequest = &AssociateBrandedLinkWithSubuserRequest - return params -} - -// **This endpoint allows you to associate a branded link with a subuser account.** Link branding can be associated with subusers from the parent account. This functionality allows subusers to send mail using their parent's link branding. To associate link branding, the parent account must first create a branded link and validate it. The parent may then associate that branded link with a subuser via the API or the [Subuser Management page of the Twilio SendGrid App](https://app.sendgrid.com/settings/subusers). -func (c *ApiService) AssociateBrandedLinkWithSubuser(params *AssociateBrandedLinkWithSubuserParam) (interface{}, error) { - path := "/v3/whitelabel/links/{LinkId}/subuser" - if params != nil && params.LinkId != nil { - path = strings.Replace(path, "{"+"LinkId"+"}", fmt.Sprint(*params.LinkId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.AssociateBrandedLinkWithSubuserRequest != nil { - b, err := json.Marshal(*params.AssociateBrandedLinkWithSubuserRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &LinkBranding200{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/link_branding/api_create_branded_link.go b/rest/api/v3/link_branding/api_create_branded_link.go deleted file mode 100644 index 6f0308c9..00000000 --- a/rest/api/v3/link_branding/api_create_branded_link.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type CreateBrandedLinkParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - CreateBrandedLinkRequest *CreateBrandedLinkRequest `json:"CreateBrandedLinkRequest,omitempty"` -} - -func (params *CreateBrandedLinkParam) SetOnbehalfof(Onbehalfof string) *CreateBrandedLinkParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *CreateBrandedLinkParam) SetCreateBrandedLinkRequest(CreateBrandedLinkRequest CreateBrandedLinkRequest) *CreateBrandedLinkParam { - params.CreateBrandedLinkRequest = &CreateBrandedLinkRequest - return params -} - -// **This endpoint allows you to create a new branded link.** To create the link branding, supply the root domain and, optionally, the subdomain — these go into separate fields in your request body. The root domain should match your FROM email address. If you provide a subdomain, it must be different from the subdomain you used for authenticating your domain. You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. -func (c *ApiService) CreateBrandedLink(params *CreateBrandedLinkParam) (interface{}, error) { - path := "/v3/whitelabel/links" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.CreateBrandedLinkRequest != nil { - b, err := json.Marshal(*params.CreateBrandedLinkRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &LinkBranding200{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/link_branding/api_delete_branded_link.go b/rest/api/v3/link_branding/api_delete_branded_link.go deleted file mode 100644 index dd3d17b0..00000000 --- a/rest/api/v3/link_branding/api_delete_branded_link.go +++ /dev/null @@ -1,71 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type DeleteBrandedLinkParam struct { - // The ID of the branded link you want to retrieve. - Id *int32 `json:"id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *DeleteBrandedLinkParam) SetId(Id int32) *DeleteBrandedLinkParam { - params.Id = &Id - return params -} -func (params *DeleteBrandedLinkParam) SetOnbehalfof(Onbehalfof string) *DeleteBrandedLinkParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to delete a branded link.** Your request will receive a response with a 204 status code if the deletion was successful. The call does not return the link's details, so if you wish to record these make sure you call the \"Retrieve a branded link\" endpoint *before* you request its deletion. You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. -func (c *ApiService) DeleteBrandedLink(params *DeleteBrandedLinkParam) (interface{}, error) { - path := "/v3/whitelabel/links/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/link_branding/api_disassociate_branded_link_from_subuser.go b/rest/api/v3/link_branding/api_disassociate_branded_link_from_subuser.go deleted file mode 100644 index 2c8322b4..00000000 --- a/rest/api/v3/link_branding/api_disassociate_branded_link_from_subuser.go +++ /dev/null @@ -1,60 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type DisassociateBrandedLinkFromSubuserParam struct { - // The username of the subuser account that you want to disassociate a branded link from. - Username *string `json:"username"` -} - -func (params *DisassociateBrandedLinkFromSubuserParam) SetUsername(Username string) *DisassociateBrandedLinkFromSubuserParam { - params.Username = &Username - return params -} - -// **This endpoint allows you to take a branded link away from a subuser.** Link branding can be associated with subusers from the parent account. This functionality allows subusers to send mail using their parent's link branding. To associate link branding, the parent account must first create a branded link and validate it. The parent may then associate that branded link with a subuser via the API or the [Subuser Management page of the Twilio SendGrid App](https://app.sendgrid.com/settings/subusers). Your request will receive a response with a 204 status code if the disassociation was successful. -func (c *ApiService) DisassociateBrandedLinkFromSubuser(params *DisassociateBrandedLinkFromSubuserParam) (interface{}, error) { - path := "/v3/whitelabel/links/subuser" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Username != nil { - data.Set("username", *params.Username) - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/link_branding/api_get_branded_link.go b/rest/api/v3/link_branding/api_get_branded_link.go deleted file mode 100644 index 8de7aa53..00000000 --- a/rest/api/v3/link_branding/api_get_branded_link.go +++ /dev/null @@ -1,71 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type GetBrandedLinkParam struct { - // The ID of the branded link you want to retrieve. - Id *int32 `json:"id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetBrandedLinkParam) SetId(Id int32) *GetBrandedLinkParam { - params.Id = &Id - return params -} -func (params *GetBrandedLinkParam) SetOnbehalfof(Onbehalfof string) *GetBrandedLinkParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a specific branded link by providing its ID.** You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. -func (c *ApiService) GetBrandedLink(params *GetBrandedLinkParam) (interface{}, error) { - path := "/v3/whitelabel/links/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &LinkBranding200{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/link_branding/api_list_branded_link.go b/rest/api/v3/link_branding/api_list_branded_link.go deleted file mode 100644 index 1adf06e0..00000000 --- a/rest/api/v3/link_branding/api_list_branded_link.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListBrandedLinkParam struct { - // Limits the number of results returned per page. - Limit *int32 `json:"limit,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListBrandedLinkParam) SetLimit(Limit int32) *ListBrandedLinkParam { - params.Limit = &Limit - return params -} -func (params *ListBrandedLinkParam) SetOnbehalfof(Onbehalfof string) *ListBrandedLinkParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve all branded links**. You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. -func (c *ApiService) ListBrandedLink(params *ListBrandedLinkParam) (interface{}, error) { - path := "/v3/whitelabel/links" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]LinkBranding200{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/link_branding/api_list_default_branded_link.go b/rest/api/v3/link_branding/api_list_default_branded_link.go deleted file mode 100644 index b198243a..00000000 --- a/rest/api/v3/link_branding/api_list_default_branded_link.go +++ /dev/null @@ -1,69 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListDefaultBrandedLinkParam struct { - // The domain to match against when finding the default branded link. - Domain *string `json:"domain,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListDefaultBrandedLinkParam) SetDomain(Domain string) *ListDefaultBrandedLinkParam { - params.Domain = &Domain - return params -} -func (params *ListDefaultBrandedLinkParam) SetOnbehalfof(Onbehalfof string) *ListDefaultBrandedLinkParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve the default branded link.** The default branded link is the actual URL to be used when sending messages. If you have more than one branded link, the default is determined by the following order: * The validated branded link marked as `default` (set when you call the \"Create a branded link\" endpoint or by calling the \"Update a branded link\" endpoint on an existing link) * Legacy branded links (migrated from the whitelabel wizard) * Default SendGrid-branded links (i.e., `100.ct.sendgrid.net`) You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. -func (c *ApiService) ListDefaultBrandedLink(params *ListDefaultBrandedLinkParam) (interface{}, error) { - path := "/v3/whitelabel/links/default" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Domain != nil { - data.Set("domain", *params.Domain) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &LinkBranding200{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/link_branding/api_list_subuser_branded_link.go b/rest/api/v3/link_branding/api_list_subuser_branded_link.go deleted file mode 100644 index 1c2595c2..00000000 --- a/rest/api/v3/link_branding/api_list_subuser_branded_link.go +++ /dev/null @@ -1,60 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListSubuserBrandedLinkParam struct { - // The username of the subuser to retrieve associated branded links for. - Username *string `json:"username"` -} - -func (params *ListSubuserBrandedLinkParam) SetUsername(Username string) *ListSubuserBrandedLinkParam { - params.Username = &Username - return params -} - -// **This endpoint allows you to retrieve the branded link associated with a subuser.** Link branding can be associated with subusers from the parent account. This functionality allows subusers to send mail using their parent's link branding. To associate link branding, the parent account must first create a branded link and then validate it. The parent may then associate that branded link with a subuser via the API or the [Subuser Management page of the Twilio SendGrid App](https://app.sendgrid.com/settings/subusers). -func (c *ApiService) ListSubuserBrandedLink(params *ListSubuserBrandedLinkParam) (interface{}, error) { - path := "/v3/whitelabel/links/subuser" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Username != nil { - data.Set("username", *params.Username) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &LinkBranding200{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/link_branding/api_service.go b/rest/api/v3/link_branding/api_service.go deleted file mode 100644 index 53680fb0..00000000 --- a/rest/api/v3/link_branding/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/link_branding/api_update_branded_link.go b/rest/api/v3/link_branding/api_update_branded_link.go deleted file mode 100644 index 57fd9f1e..00000000 --- a/rest/api/v3/link_branding/api_update_branded_link.go +++ /dev/null @@ -1,86 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type UpdateBrandedLinkParam struct { - // The ID of the branded link you want to retrieve. - Id *int32 `json:"id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - UpdateBrandedLinkRequest *UpdateBrandedLinkRequest `json:"UpdateBrandedLinkRequest,omitempty"` -} - -func (params *UpdateBrandedLinkParam) SetId(Id int32) *UpdateBrandedLinkParam { - params.Id = &Id - return params -} -func (params *UpdateBrandedLinkParam) SetOnbehalfof(Onbehalfof string) *UpdateBrandedLinkParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateBrandedLinkParam) SetUpdateBrandedLinkRequest(UpdateBrandedLinkRequest UpdateBrandedLinkRequest) *UpdateBrandedLinkParam { - params.UpdateBrandedLinkRequest = &UpdateBrandedLinkRequest - return params -} - -// **This endpoint allows you to update a specific branded link. You can use this endpoint to change a branded link's default status.** You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. -func (c *ApiService) UpdateBrandedLink(params *UpdateBrandedLinkParam) (interface{}, error) { - path := "/v3/whitelabel/links/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateBrandedLinkRequest != nil { - b, err := json.Marshal(*params.UpdateBrandedLinkRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &LinkBranding200{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/link_branding/api_validate_branded_link.go b/rest/api/v3/link_branding/api_validate_branded_link.go deleted file mode 100644 index 350b12cb..00000000 --- a/rest/api/v3/link_branding/api_validate_branded_link.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type ValidateBrandedLinkParam struct { - // The ID of the branded link that you want to validate. - Id *int32 `json:"id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ValidateBrandedLinkParam) SetId(Id int32) *ValidateBrandedLinkParam { - params.Id = &Id - return params -} -func (params *ValidateBrandedLinkParam) SetOnbehalfof(Onbehalfof string) *ValidateBrandedLinkParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to validate a branded link.** You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. -func (c *ApiService) ValidateBrandedLink(params *ValidateBrandedLinkParam) (interface{}, error) { - path := "/v3/whitelabel/links/{Id}/validate" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ValidateBrandedLink200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ValidateBrandedLink500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/link_branding/docs/AssociateBrandedLinkWithSubuser.md b/rest/api/v3/link_branding/docs/AssociateBrandedLinkWithSubuser.md deleted file mode 100644 index f15454e0..00000000 --- a/rest/api/v3/link_branding/docs/AssociateBrandedLinkWithSubuser.md +++ /dev/null @@ -1,52 +0,0 @@ -# AssociateBrandedLinkWithSubuser - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AssociateBrandedLinkWithSubuser**](AssociateBrandedLinkWithSubuser.md#AssociateBrandedLinkWithSubuser) | **Post** /v3/whitelabel/links/{LinkId}/subuser | Associate a branded link with a subuser - - - -## AssociateBrandedLinkWithSubuser - -> LinkBranding200 AssociateBrandedLinkWithSubuser(ctx, LinkIdoptional) - -Associate a branded link with a subuser - -**This endpoint allows you to associate a branded link with a subuser account.** Link branding can be associated with subusers from the parent account. This functionality allows subusers to send mail using their parent's link branding. To associate link branding, the parent account must first create a branded link and validate it. The parent may then associate that branded link with a subuser via the API or the [Subuser Management page of the Twilio SendGrid App](https://app.sendgrid.com/settings/subusers). - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**LinkId** | **int32** | The ID of the branded link you want to associate. - -### Other Parameters - -Other parameters are passed through a pointer to a AssociateBrandedLinkWithSubuserParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**AssociateBrandedLinkWithSubuserRequest** | [**AssociateBrandedLinkWithSubuserRequest**](AssociateBrandedLinkWithSubuserRequest.md) | - -### Return type - -[**LinkBranding200**](LinkBranding200.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/link_branding/docs/AssociateBrandedLinkWithSubuserRequest.md b/rest/api/v3/link_branding/docs/AssociateBrandedLinkWithSubuserRequest.md deleted file mode 100644 index 09cd138a..00000000 --- a/rest/api/v3/link_branding/docs/AssociateBrandedLinkWithSubuserRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# AssociateBrandedLinkWithSubuserRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Username** | **string** | The username of the subuser account that you want to associate the branded link with. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/link_branding/docs/CreateBrandedLink.md b/rest/api/v3/link_branding/docs/CreateBrandedLink.md deleted file mode 100644 index 46b12fea..00000000 --- a/rest/api/v3/link_branding/docs/CreateBrandedLink.md +++ /dev/null @@ -1,49 +0,0 @@ -# CreateBrandedLink - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateBrandedLink**](CreateBrandedLink.md#CreateBrandedLink) | **Post** /v3/whitelabel/links | Create a branded link - - - -## CreateBrandedLink - -> LinkBranding200 CreateBrandedLink(ctx, optional) - -Create a branded link - -**This endpoint allows you to create a new branded link.** To create the link branding, supply the root domain and, optionally, the subdomain — these go into separate fields in your request body. The root domain should match your FROM email address. If you provide a subdomain, it must be different from the subdomain you used for authenticating your domain. You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateBrandedLinkParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**CreateBrandedLinkRequest** | [**CreateBrandedLinkRequest**](CreateBrandedLinkRequest.md) | - -### Return type - -[**LinkBranding200**](LinkBranding200.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/link_branding/docs/CreateBrandedLinkRequest.md b/rest/api/v3/link_branding/docs/CreateBrandedLinkRequest.md deleted file mode 100644 index 1f9c4806..00000000 --- a/rest/api/v3/link_branding/docs/CreateBrandedLinkRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreateBrandedLinkRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Domain** | **string** | The root domain for the subdomain that you are creating the link branding for. This should match your FROM email address. | -**Subdomain** | **string** | The subdomain to create the link branding for. Must be different from the subdomain you used for authenticating your domain. |[optional] -**Default** | [**Default**](Default.md) | Indicates if you want to use this link branding as the default or fallback. When setting a new default, the existing default link branding will have its default status removed automatically. |[optional] -**Region** | [**Region**](Region.md) | The region of the IP address. Can be `eu` or `us`. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/link_branding/docs/Default.md b/rest/api/v3/link_branding/docs/Default.md deleted file mode 100644 index d28299bf..00000000 --- a/rest/api/v3/link_branding/docs/Default.md +++ /dev/null @@ -1,13 +0,0 @@ -# Default - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**TRUE** | bool | (value: `true`) -**FALSE** | bool | (value: `false`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/link_branding/docs/Default1.md b/rest/api/v3/link_branding/docs/Default1.md deleted file mode 100644 index 5c6f9287..00000000 --- a/rest/api/v3/link_branding/docs/Default1.md +++ /dev/null @@ -1,13 +0,0 @@ -# Default1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**TRUE** | bool | (value: `true`) -**FALSE** | bool | (value: `false`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/link_branding/docs/Default2.md b/rest/api/v3/link_branding/docs/Default2.md deleted file mode 100644 index 41b408e4..00000000 --- a/rest/api/v3/link_branding/docs/Default2.md +++ /dev/null @@ -1,13 +0,0 @@ -# Default2 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**TRUE** | bool | (value: `true`) -**FALSE** | bool | (value: `false`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/link_branding/docs/DeleteBrandedLink.md b/rest/api/v3/link_branding/docs/DeleteBrandedLink.md deleted file mode 100644 index 994d7546..00000000 --- a/rest/api/v3/link_branding/docs/DeleteBrandedLink.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeleteBrandedLink - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteBrandedLink**](DeleteBrandedLink.md#DeleteBrandedLink) | **Delete** /v3/whitelabel/links/{Id} | Delete a branded link - - - -## DeleteBrandedLink - -> map[string]interface{} DeleteBrandedLink(ctx, Idoptional) - -Delete a branded link - -**This endpoint allows you to delete a branded link.** Your request will receive a response with a 204 status code if the deletion was successful. The call does not return the link's details, so if you wish to record these make sure you call the \"Retrieve a branded link\" endpoint *before* you request its deletion. You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **int32** | The ID of the branded link you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteBrandedLinkParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/link_branding/docs/DisassociateBrandedLinkFromSubuser.md b/rest/api/v3/link_branding/docs/DisassociateBrandedLinkFromSubuser.md deleted file mode 100644 index 2ec6eb15..00000000 --- a/rest/api/v3/link_branding/docs/DisassociateBrandedLinkFromSubuser.md +++ /dev/null @@ -1,47 +0,0 @@ -# DisassociateBrandedLinkFromSubuser - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DisassociateBrandedLinkFromSubuser**](DisassociateBrandedLinkFromSubuser.md#DisassociateBrandedLinkFromSubuser) | **Delete** /v3/whitelabel/links/subuser | Disassociate a branded link from a subuser - - - -## DisassociateBrandedLinkFromSubuser - -> map[string]interface{} DisassociateBrandedLinkFromSubuser(ctx, Username) - -Disassociate a branded link from a subuser - -**This endpoint allows you to take a branded link away from a subuser.** Link branding can be associated with subusers from the parent account. This functionality allows subusers to send mail using their parent's link branding. To associate link branding, the parent account must first create a branded link and validate it. The parent may then associate that branded link with a subuser via the API or the [Subuser Management page of the Twilio SendGrid App](https://app.sendgrid.com/settings/subusers). Your request will receive a response with a 204 status code if the disassociation was successful. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a DisassociateBrandedLinkFromSubuserParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/link_branding/docs/GetBrandedLink.md b/rest/api/v3/link_branding/docs/GetBrandedLink.md deleted file mode 100644 index ae77aa26..00000000 --- a/rest/api/v3/link_branding/docs/GetBrandedLink.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetBrandedLink - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetBrandedLink**](GetBrandedLink.md#GetBrandedLink) | **Get** /v3/whitelabel/links/{Id} | Retrieve a branded link - - - -## GetBrandedLink - -> LinkBranding200 GetBrandedLink(ctx, Idoptional) - -Retrieve a branded link - -**This endpoint allows you to retrieve a specific branded link by providing its ID.** You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **int32** | The ID of the branded link you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a GetBrandedLinkParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**LinkBranding200**](LinkBranding200.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/link_branding/docs/Legacy.md b/rest/api/v3/link_branding/docs/Legacy.md deleted file mode 100644 index fb166798..00000000 --- a/rest/api/v3/link_branding/docs/Legacy.md +++ /dev/null @@ -1,13 +0,0 @@ -# Legacy - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**TRUE** | bool | (value: `true`) -**FALSE** | bool | (value: `false`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/link_branding/docs/LinkBranding200.md b/rest/api/v3/link_branding/docs/LinkBranding200.md deleted file mode 100644 index 1993e342..00000000 --- a/rest/api/v3/link_branding/docs/LinkBranding200.md +++ /dev/null @@ -1,19 +0,0 @@ -# LinkBranding200 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int32** | The ID of the branded link. | -**Domain** | **string** | The root domain of the branded link. | -**Subdomain** | **string** | The subdomain used to generate the DNS records for this link branding. This subdomain must be different from the subdomain used for your authenticated domain. |[optional] -**Username** | **string** | The username of the account that this link branding is associated with. | -**UserId** | **int32** | The ID of the user that this link branding is associated with. | -**Default** | [**Default2**](Default2.md) | Indicates if this is the default link branding. | -**Valid** | [**Valid3**](Valid3.md) | Indicates if this link branding is valid. | -**Legacy** | [**Legacy**](Legacy.md) | Indicates if this link branding was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create new link branding if you need to update it. | -**Dns** | [**LinkBranding200Dns**](LinkBranding200Dns.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/link_branding/docs/LinkBranding200Dns.md b/rest/api/v3/link_branding/docs/LinkBranding200Dns.md deleted file mode 100644 index 48e06ca8..00000000 --- a/rest/api/v3/link_branding/docs/LinkBranding200Dns.md +++ /dev/null @@ -1,12 +0,0 @@ -# LinkBranding200Dns - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DomainCname** | [**LinkBranding200DnsDomainCname**](LinkBranding200DnsDomainCname.md) | | -**OwnerCname** | [**LinkBranding200DnsOwnerCname**](LinkBranding200DnsOwnerCname.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/link_branding/docs/LinkBranding200DnsDomainCname.md b/rest/api/v3/link_branding/docs/LinkBranding200DnsDomainCname.md deleted file mode 100644 index 4642dbe5..00000000 --- a/rest/api/v3/link_branding/docs/LinkBranding200DnsDomainCname.md +++ /dev/null @@ -1,14 +0,0 @@ -# LinkBranding200DnsDomainCname - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Valid** | [**Valid4**](Valid4.md) | Indicates if the DNS record is valid. | -**Type** | [**Type**](Type.md) | The type of DNS record that was generated. | -**Host** | **string** | The domain that this link branding will use for the links in your email. | -**Data** | **string** | The domain that the DNS record points to. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/link_branding/docs/LinkBranding200DnsOwnerCname.md b/rest/api/v3/link_branding/docs/LinkBranding200DnsOwnerCname.md deleted file mode 100644 index d87102cd..00000000 --- a/rest/api/v3/link_branding/docs/LinkBranding200DnsOwnerCname.md +++ /dev/null @@ -1,14 +0,0 @@ -# LinkBranding200DnsOwnerCname - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Valid** | [**Valid5**](Valid5.md) | Indicates if the DNS record is valid. | -**Type** | [**Type1**](Type1.md) | The type of DNS record generated. |[optional] -**Host** | **string** | Used to verify the link branding. The subdomain of this domain is the ID of the user who created the link branding. | -**Data** | **string** | The domain that the DNS record points to. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/link_branding/docs/ListBrandedLink.md b/rest/api/v3/link_branding/docs/ListBrandedLink.md deleted file mode 100644 index c9b5a627..00000000 --- a/rest/api/v3/link_branding/docs/ListBrandedLink.md +++ /dev/null @@ -1,49 +0,0 @@ -# ListBrandedLink - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListBrandedLink**](ListBrandedLink.md#ListBrandedLink) | **Get** /v3/whitelabel/links | Retrieve all branded links - - - -## ListBrandedLink - -> []LinkBranding200 ListBrandedLink(ctx, optional) - -Retrieve all branded links - -**This endpoint allows you to retrieve all branded links**. You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListBrandedLinkParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Limit** | **int32** | Limits the number of results returned per page. -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**[]LinkBranding200**](LinkBranding200.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/link_branding/docs/ListDefaultBrandedLink.md b/rest/api/v3/link_branding/docs/ListDefaultBrandedLink.md deleted file mode 100644 index b8360084..00000000 --- a/rest/api/v3/link_branding/docs/ListDefaultBrandedLink.md +++ /dev/null @@ -1,49 +0,0 @@ -# ListDefaultBrandedLink - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListDefaultBrandedLink**](ListDefaultBrandedLink.md#ListDefaultBrandedLink) | **Get** /v3/whitelabel/links/default | Retrieve the default branded link - - - -## ListDefaultBrandedLink - -> LinkBranding200 ListDefaultBrandedLink(ctx, optional) - -Retrieve the default branded link - -**This endpoint allows you to retrieve the default branded link.** The default branded link is the actual URL to be used when sending messages. If you have more than one branded link, the default is determined by the following order: * The validated branded link marked as `default` (set when you call the \"Create a branded link\" endpoint or by calling the \"Update a branded link\" endpoint on an existing link) * Legacy branded links (migrated from the whitelabel wizard) * Default SendGrid-branded links (i.e., `100.ct.sendgrid.net`) You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListDefaultBrandedLinkParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Domain** | **string** | The domain to match against when finding the default branded link. -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**LinkBranding200**](LinkBranding200.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/link_branding/docs/ListSubuserBrandedLink.md b/rest/api/v3/link_branding/docs/ListSubuserBrandedLink.md deleted file mode 100644 index 5ac2695b..00000000 --- a/rest/api/v3/link_branding/docs/ListSubuserBrandedLink.md +++ /dev/null @@ -1,47 +0,0 @@ -# ListSubuserBrandedLink - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListSubuserBrandedLink**](ListSubuserBrandedLink.md#ListSubuserBrandedLink) | **Get** /v3/whitelabel/links/subuser | Retrieve a subuser's branded link - - - -## ListSubuserBrandedLink - -> LinkBranding200 ListSubuserBrandedLink(ctx, Username) - -Retrieve a subuser's branded link - -**This endpoint allows you to retrieve the branded link associated with a subuser.** Link branding can be associated with subusers from the parent account. This functionality allows subusers to send mail using their parent's link branding. To associate link branding, the parent account must first create a branded link and then validate it. The parent may then associate that branded link with a subuser via the API or the [Subuser Management page of the Twilio SendGrid App](https://app.sendgrid.com/settings/subusers). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListSubuserBrandedLinkParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**LinkBranding200**](LinkBranding200.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/link_branding/docs/Region.md b/rest/api/v3/link_branding/docs/Region.md deleted file mode 100644 index e861b3d5..00000000 --- a/rest/api/v3/link_branding/docs/Region.md +++ /dev/null @@ -1,13 +0,0 @@ -# Region - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**EU** | string | (value: `"eu"`) -**US** | string | (value: `"us"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/link_branding/docs/Type.md b/rest/api/v3/link_branding/docs/Type.md deleted file mode 100644 index a510350e..00000000 --- a/rest/api/v3/link_branding/docs/Type.md +++ /dev/null @@ -1,14 +0,0 @@ -# Type - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**CNAME** | string | (value: `"cname"`) -**TXT** | string | (value: `"txt"`) -**MX** | string | (value: `"mx"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/link_branding/docs/Type1.md b/rest/api/v3/link_branding/docs/Type1.md deleted file mode 100644 index 5534cbae..00000000 --- a/rest/api/v3/link_branding/docs/Type1.md +++ /dev/null @@ -1,14 +0,0 @@ -# Type1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**CNAME** | string | (value: `"cname"`) -**TXT** | string | (value: `"txt"`) -**MX** | string | (value: `"mx"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/link_branding/docs/UpdateBrandedLink.md b/rest/api/v3/link_branding/docs/UpdateBrandedLink.md deleted file mode 100644 index c86f728b..00000000 --- a/rest/api/v3/link_branding/docs/UpdateBrandedLink.md +++ /dev/null @@ -1,53 +0,0 @@ -# UpdateBrandedLink - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateBrandedLink**](UpdateBrandedLink.md#UpdateBrandedLink) | **Patch** /v3/whitelabel/links/{Id} | Update a branded link - - - -## UpdateBrandedLink - -> LinkBranding200 UpdateBrandedLink(ctx, Idoptional) - -Update a branded link - -**This endpoint allows you to update a specific branded link. You can use this endpoint to change a branded link's default status.** You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **int32** | The ID of the branded link you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateBrandedLinkParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**UpdateBrandedLinkRequest** | [**UpdateBrandedLinkRequest**](UpdateBrandedLinkRequest.md) | - -### Return type - -[**LinkBranding200**](LinkBranding200.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/link_branding/docs/UpdateBrandedLinkRequest.md b/rest/api/v3/link_branding/docs/UpdateBrandedLinkRequest.md deleted file mode 100644 index 2072273a..00000000 --- a/rest/api/v3/link_branding/docs/UpdateBrandedLinkRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateBrandedLinkRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Default** | [**Default1**](Default1.md) | Indicates if the branded link is set as the default. When setting a new default, the existing default link branding will have its default status removed automatically. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/link_branding/docs/Valid.md b/rest/api/v3/link_branding/docs/Valid.md deleted file mode 100644 index 2addd0e7..00000000 --- a/rest/api/v3/link_branding/docs/Valid.md +++ /dev/null @@ -1,13 +0,0 @@ -# Valid - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**TRUE** | bool | (value: `true`) -**FALSE** | bool | (value: `false`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/link_branding/docs/Valid1.md b/rest/api/v3/link_branding/docs/Valid1.md deleted file mode 100644 index bca4d56b..00000000 --- a/rest/api/v3/link_branding/docs/Valid1.md +++ /dev/null @@ -1,13 +0,0 @@ -# Valid1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**TRUE** | bool | (value: `true`) -**FALSE** | bool | (value: `false`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/link_branding/docs/Valid2.md b/rest/api/v3/link_branding/docs/Valid2.md deleted file mode 100644 index 3abe1153..00000000 --- a/rest/api/v3/link_branding/docs/Valid2.md +++ /dev/null @@ -1,13 +0,0 @@ -# Valid2 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**TRUE** | bool | (value: `true`) -**FALSE** | bool | (value: `false`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/link_branding/docs/Valid3.md b/rest/api/v3/link_branding/docs/Valid3.md deleted file mode 100644 index dfdefa92..00000000 --- a/rest/api/v3/link_branding/docs/Valid3.md +++ /dev/null @@ -1,13 +0,0 @@ -# Valid3 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**TRUE** | bool | (value: `true`) -**FALSE** | bool | (value: `false`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/link_branding/docs/Valid4.md b/rest/api/v3/link_branding/docs/Valid4.md deleted file mode 100644 index e088e125..00000000 --- a/rest/api/v3/link_branding/docs/Valid4.md +++ /dev/null @@ -1,13 +0,0 @@ -# Valid4 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**TRUE** | bool | (value: `true`) -**FALSE** | bool | (value: `false`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/link_branding/docs/Valid5.md b/rest/api/v3/link_branding/docs/Valid5.md deleted file mode 100644 index a3efe196..00000000 --- a/rest/api/v3/link_branding/docs/Valid5.md +++ /dev/null @@ -1,13 +0,0 @@ -# Valid5 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**TRUE** | bool | (value: `true`) -**FALSE** | bool | (value: `false`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/link_branding/docs/ValidateBrandedLink.md b/rest/api/v3/link_branding/docs/ValidateBrandedLink.md deleted file mode 100644 index 98ebba01..00000000 --- a/rest/api/v3/link_branding/docs/ValidateBrandedLink.md +++ /dev/null @@ -1,52 +0,0 @@ -# ValidateBrandedLink - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ValidateBrandedLink**](ValidateBrandedLink.md#ValidateBrandedLink) | **Post** /v3/whitelabel/links/{Id}/validate | Validate a branded link - - - -## ValidateBrandedLink - -> ValidateBrandedLink200Response ValidateBrandedLink(ctx, Idoptional) - -Validate a branded link - -**This endpoint allows you to validate a branded link.** You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **int32** | The ID of the branded link that you want to validate. - -### Other Parameters - -Other parameters are passed through a pointer to a ValidateBrandedLinkParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ValidateBrandedLink200Response**](ValidateBrandedLink200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/link_branding/docs/ValidateBrandedLink200Response.md b/rest/api/v3/link_branding/docs/ValidateBrandedLink200Response.md deleted file mode 100644 index b90b62ad..00000000 --- a/rest/api/v3/link_branding/docs/ValidateBrandedLink200Response.md +++ /dev/null @@ -1,13 +0,0 @@ -# ValidateBrandedLink200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int32** | The ID of the branded link. | -**Valid** | [**Valid**](Valid.md) | Indicates if the link branding is valid. | -**ValidationResults** | [**ValidateBrandedLink200ResponseValidationResults**](ValidateBrandedLink200ResponseValidationResults.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResults.md b/rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResults.md deleted file mode 100644 index a1fba585..00000000 --- a/rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResults.md +++ /dev/null @@ -1,12 +0,0 @@ -# ValidateBrandedLink200ResponseValidationResults - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DomainCname** | [**ValidateBrandedLink200ResponseValidationResultsDomainCname**](ValidateBrandedLink200ResponseValidationResultsDomainCname.md) | | -**OwnerCname** | [**ValidateBrandedLink200ResponseValidationResultsOwnerCname**](ValidateBrandedLink200ResponseValidationResultsOwnerCname.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResultsDomainCname.md b/rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResultsDomainCname.md deleted file mode 100644 index 25e06af9..00000000 --- a/rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResultsDomainCname.md +++ /dev/null @@ -1,12 +0,0 @@ -# ValidateBrandedLink200ResponseValidationResultsDomainCname - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Valid** | [**Valid1**](Valid1.md) | Indicates if this DNS record is valid. | -**Reason** | **string** | Null if the DNS record is valid. If the DNS record is invalid, this will explain why. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResultsOwnerCname.md b/rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResultsOwnerCname.md deleted file mode 100644 index b9514012..00000000 --- a/rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResultsOwnerCname.md +++ /dev/null @@ -1,12 +0,0 @@ -# ValidateBrandedLink200ResponseValidationResultsOwnerCname - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Valid** | [**Valid2**](Valid2.md) | Indicates if the DNS record is valid. | -**Reason** | **string** | Null if valid. If the DNS record is invalid, this will explain why. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/link_branding/docs/ValidateBrandedLink500Response.md b/rest/api/v3/link_branding/docs/ValidateBrandedLink500Response.md deleted file mode 100644 index 53528b60..00000000 --- a/rest/api/v3/link_branding/docs/ValidateBrandedLink500Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValidateBrandedLink500Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ValidateBrandedLink500ResponseErrorsInner**](ValidateBrandedLink500ResponseErrorsInner.md) | The reasons why the validation failed. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/link_branding/docs/ValidateBrandedLink500ResponseErrorsInner.md b/rest/api/v3/link_branding/docs/ValidateBrandedLink500ResponseErrorsInner.md deleted file mode 100644 index 1e8880fd..00000000 --- a/rest/api/v3/link_branding/docs/ValidateBrandedLink500ResponseErrorsInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValidateBrandedLink500ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | The reason why the link whitelabel could not be validated. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/link_branding/model_associate_branded_link_with_subuser_request.go b/rest/api/v3/link_branding/model_associate_branded_link_with_subuser_request.go deleted file mode 100644 index 58038420..00000000 --- a/rest/api/v3/link_branding/model_associate_branded_link_with_subuser_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AssociateBrandedLinkWithSubuserRequest struct for AssociateBrandedLinkWithSubuserRequest -type AssociateBrandedLinkWithSubuserRequest struct { - // The username of the subuser account that you want to associate the branded link with. - Username *string `json:"username,omitempty"` -} diff --git a/rest/api/v3/link_branding/model_create_branded_link_request.go b/rest/api/v3/link_branding/model_create_branded_link_request.go deleted file mode 100644 index 7a72f580..00000000 --- a/rest/api/v3/link_branding/model_create_branded_link_request.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateBrandedLinkRequest struct for CreateBrandedLinkRequest -type CreateBrandedLinkRequest struct { - // The root domain for the subdomain that you are creating the link branding for. This should match your FROM email address. - Domain string `json:"domain"` - // The subdomain to create the link branding for. Must be different from the subdomain you used for authenticating your domain. - Subdomain *string `json:"subdomain,omitempty"` - // Indicates if you want to use this link branding as the default or fallback. When setting a new default, the existing default link branding will have its default status removed automatically. - Default *Default `json:"default,omitempty"` - // The region of the IP address. Can be `eu` or `us`. - Region *Region `json:"region,omitempty"` -} diff --git a/rest/api/v3/link_branding/model_default.go b/rest/api/v3/link_branding/model_default.go deleted file mode 100644 index 537e69bc..00000000 --- a/rest/api/v3/link_branding/model_default.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Default the model 'Default' -type Default bool - -// List of Default -const ( - DEFAULT_TRUE Default = true - DEFAULT_FALSE Default = false -) diff --git a/rest/api/v3/link_branding/model_default1.go b/rest/api/v3/link_branding/model_default1.go deleted file mode 100644 index eda59858..00000000 --- a/rest/api/v3/link_branding/model_default1.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Default1 the model 'Default1' -type Default1 bool - -// List of Default1 -const ( - DEFAULT1_TRUE Default1 = true - DEFAULT1_FALSE Default1 = false -) diff --git a/rest/api/v3/link_branding/model_default2.go b/rest/api/v3/link_branding/model_default2.go deleted file mode 100644 index e16aeccb..00000000 --- a/rest/api/v3/link_branding/model_default2.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Default2 the model 'Default2' -type Default2 bool - -// List of Default2 -const ( - DEFAULT2_TRUE Default2 = true - DEFAULT2_FALSE Default2 = false -) diff --git a/rest/api/v3/link_branding/model_legacy.go b/rest/api/v3/link_branding/model_legacy.go deleted file mode 100644 index 821b3360..00000000 --- a/rest/api/v3/link_branding/model_legacy.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Legacy the model 'Legacy' -type Legacy bool - -// List of Legacy -const ( - LEGACY_TRUE Legacy = true - LEGACY_FALSE Legacy = false -) diff --git a/rest/api/v3/link_branding/model_link_branding200.go b/rest/api/v3/link_branding/model_link_branding200.go deleted file mode 100644 index ff249aa3..00000000 --- a/rest/api/v3/link_branding/model_link_branding200.go +++ /dev/null @@ -1,35 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// LinkBranding200 struct for LinkBranding200 -type LinkBranding200 struct { - // The ID of the branded link. - Id int32 `json:"id"` - // The root domain of the branded link. - Domain string `json:"domain"` - // The subdomain used to generate the DNS records for this link branding. This subdomain must be different from the subdomain used for your authenticated domain. - Subdomain *string `json:"subdomain,omitempty"` - // The username of the account that this link branding is associated with. - Username string `json:"username"` - // The ID of the user that this link branding is associated with. - UserId int32 `json:"user_id"` - // Indicates if this is the default link branding. - Default Default2 `json:"default"` - // Indicates if this link branding is valid. - Valid Valid3 `json:"valid"` - // Indicates if this link branding was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create new link branding if you need to update it. - Legacy Legacy `json:"legacy"` - Dns LinkBranding200Dns `json:"dns"` -} diff --git a/rest/api/v3/link_branding/model_link_branding200_dns.go b/rest/api/v3/link_branding/model_link_branding200_dns.go deleted file mode 100644 index 6a3cd783..00000000 --- a/rest/api/v3/link_branding/model_link_branding200_dns.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// LinkBranding200Dns The DNS records generated for this link branding. -type LinkBranding200Dns struct { - DomainCname LinkBranding200DnsDomainCname `json:"domain_cname"` - OwnerCname *LinkBranding200DnsOwnerCname `json:"owner_cname,omitempty"` -} diff --git a/rest/api/v3/link_branding/model_link_branding200_dns_domain_cname.go b/rest/api/v3/link_branding/model_link_branding200_dns_domain_cname.go deleted file mode 100644 index 5a324f64..00000000 --- a/rest/api/v3/link_branding/model_link_branding200_dns_domain_cname.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// LinkBranding200DnsDomainCname The DNS record generated to point to your link branding subdomain. -type LinkBranding200DnsDomainCname struct { - // Indicates if the DNS record is valid. - Valid Valid4 `json:"valid"` - // The type of DNS record that was generated. - Type Type `json:"type"` - // The domain that this link branding will use for the links in your email. - Host string `json:"host"` - // The domain that the DNS record points to. - Data string `json:"data"` -} diff --git a/rest/api/v3/link_branding/model_link_branding200_dns_owner_cname.go b/rest/api/v3/link_branding/model_link_branding200_dns_owner_cname.go deleted file mode 100644 index 7f3f73c9..00000000 --- a/rest/api/v3/link_branding/model_link_branding200_dns_owner_cname.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// LinkBranding200DnsOwnerCname The DNS record generated to verify who created the link branding. -type LinkBranding200DnsOwnerCname struct { - // Indicates if the DNS record is valid. - Valid Valid5 `json:"valid"` - // The type of DNS record generated. - Type *Type1 `json:"type,omitempty"` - // Used to verify the link branding. The subdomain of this domain is the ID of the user who created the link branding. - Host string `json:"host"` - // The domain that the DNS record points to. - Data string `json:"data"` -} diff --git a/rest/api/v3/link_branding/model_region.go b/rest/api/v3/link_branding/model_region.go deleted file mode 100644 index b3919cb6..00000000 --- a/rest/api/v3/link_branding/model_region.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Region the model 'Region' -type Region string - -// List of Region -const ( - REGION_EU Region = "eu" - REGION_US Region = "us" -) diff --git a/rest/api/v3/link_branding/model_type.go b/rest/api/v3/link_branding/model_type.go deleted file mode 100644 index 81e166bf..00000000 --- a/rest/api/v3/link_branding/model_type.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Type the model 'Type' -type Type string - -// List of Type -const ( - TYPE_CNAME Type = "cname" - TYPE_TXT Type = "txt" - TYPE_MX Type = "mx" -) diff --git a/rest/api/v3/link_branding/model_type1.go b/rest/api/v3/link_branding/model_type1.go deleted file mode 100644 index bf73a4a5..00000000 --- a/rest/api/v3/link_branding/model_type1.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Type1 the model 'Type1' -type Type1 string - -// List of Type1 -const ( - TYPE1_CNAME Type1 = "cname" - TYPE1_TXT Type1 = "txt" - TYPE1_MX Type1 = "mx" -) diff --git a/rest/api/v3/link_branding/model_update_branded_link_request.go b/rest/api/v3/link_branding/model_update_branded_link_request.go deleted file mode 100644 index 8f050b3f..00000000 --- a/rest/api/v3/link_branding/model_update_branded_link_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateBrandedLinkRequest struct for UpdateBrandedLinkRequest -type UpdateBrandedLinkRequest struct { - // Indicates if the branded link is set as the default. When setting a new default, the existing default link branding will have its default status removed automatically. - Default *Default1 `json:"default,omitempty"` -} diff --git a/rest/api/v3/link_branding/model_valid.go b/rest/api/v3/link_branding/model_valid.go deleted file mode 100644 index 6ff1130e..00000000 --- a/rest/api/v3/link_branding/model_valid.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Valid the model 'Valid' -type Valid bool - -// List of Valid -const ( - VALID_TRUE Valid = true - VALID_FALSE Valid = false -) diff --git a/rest/api/v3/link_branding/model_valid1.go b/rest/api/v3/link_branding/model_valid1.go deleted file mode 100644 index b0a10088..00000000 --- a/rest/api/v3/link_branding/model_valid1.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Valid1 the model 'Valid1' -type Valid1 bool - -// List of Valid1 -const ( - VALID1_TRUE Valid1 = true - VALID1_FALSE Valid1 = false -) diff --git a/rest/api/v3/link_branding/model_valid2.go b/rest/api/v3/link_branding/model_valid2.go deleted file mode 100644 index b5131fe2..00000000 --- a/rest/api/v3/link_branding/model_valid2.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Valid2 the model 'Valid2' -type Valid2 bool - -// List of Valid2 -const ( - VALID2_TRUE Valid2 = true - VALID2_FALSE Valid2 = false -) diff --git a/rest/api/v3/link_branding/model_valid3.go b/rest/api/v3/link_branding/model_valid3.go deleted file mode 100644 index 5dcb4a84..00000000 --- a/rest/api/v3/link_branding/model_valid3.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Valid3 the model 'Valid3' -type Valid3 bool - -// List of Valid3 -const ( - VALID3_TRUE Valid3 = true - VALID3_FALSE Valid3 = false -) diff --git a/rest/api/v3/link_branding/model_valid4.go b/rest/api/v3/link_branding/model_valid4.go deleted file mode 100644 index 6f6bff20..00000000 --- a/rest/api/v3/link_branding/model_valid4.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Valid4 the model 'Valid4' -type Valid4 bool - -// List of Valid4 -const ( - VALID4_TRUE Valid4 = true - VALID4_FALSE Valid4 = false -) diff --git a/rest/api/v3/link_branding/model_valid5.go b/rest/api/v3/link_branding/model_valid5.go deleted file mode 100644 index 3edd72fb..00000000 --- a/rest/api/v3/link_branding/model_valid5.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Valid5 the model 'Valid5' -type Valid5 bool - -// List of Valid5 -const ( - VALID5_TRUE Valid5 = true - VALID5_FALSE Valid5 = false -) diff --git a/rest/api/v3/link_branding/model_validate_branded_link_200_response.go b/rest/api/v3/link_branding/model_validate_branded_link_200_response.go deleted file mode 100644 index 260ce5cd..00000000 --- a/rest/api/v3/link_branding/model_validate_branded_link_200_response.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ValidateBrandedLink200Response struct for ValidateBrandedLink200Response -type ValidateBrandedLink200Response struct { - // The ID of the branded link. - Id int32 `json:"id"` - // Indicates if the link branding is valid. - Valid Valid `json:"valid"` - ValidationResults ValidateBrandedLink200ResponseValidationResults `json:"validation_results"` -} diff --git a/rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results.go b/rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results.go deleted file mode 100644 index 5d4035c4..00000000 --- a/rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ValidateBrandedLink200ResponseValidationResults The individual validation results for each of the DNS records associated with this branded link. -type ValidateBrandedLink200ResponseValidationResults struct { - DomainCname ValidateBrandedLink200ResponseValidationResultsDomainCname `json:"domain_cname"` - OwnerCname *ValidateBrandedLink200ResponseValidationResultsOwnerCname `json:"owner_cname,omitempty"` -} diff --git a/rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results_domain_cname.go b/rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results_domain_cname.go deleted file mode 100644 index 4abbea3a..00000000 --- a/rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results_domain_cname.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ValidateBrandedLink200ResponseValidationResultsDomainCname The DNS record generated for the sending domain used for this branded link. -type ValidateBrandedLink200ResponseValidationResultsDomainCname struct { - // Indicates if this DNS record is valid. - Valid Valid1 `json:"valid"` - // Null if the DNS record is valid. If the DNS record is invalid, this will explain why. - Reason string `json:"reason"` -} diff --git a/rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results_owner_cname.go b/rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results_owner_cname.go deleted file mode 100644 index 0ee10180..00000000 --- a/rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results_owner_cname.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ValidateBrandedLink200ResponseValidationResultsOwnerCname The DNS record created to verify the branded link. -type ValidateBrandedLink200ResponseValidationResultsOwnerCname struct { - // Indicates if the DNS record is valid. - Valid Valid2 `json:"valid"` - // Null if valid. If the DNS record is invalid, this will explain why. - Reason string `json:"reason"` -} diff --git a/rest/api/v3/link_branding/model_validate_branded_link_500_response.go b/rest/api/v3/link_branding/model_validate_branded_link_500_response.go deleted file mode 100644 index f0ddbfc0..00000000 --- a/rest/api/v3/link_branding/model_validate_branded_link_500_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ValidateBrandedLink500Response struct for ValidateBrandedLink500Response -type ValidateBrandedLink500Response struct { - // The reasons why the validation failed. - Errors []ValidateBrandedLink500ResponseErrorsInner `json:"errors"` -} diff --git a/rest/api/v3/link_branding/model_validate_branded_link_500_response_errors_inner.go b/rest/api/v3/link_branding/model_validate_branded_link_500_response_errors_inner.go deleted file mode 100644 index d0d11fbc..00000000 --- a/rest/api/v3/link_branding/model_validate_branded_link_500_response_errors_inner.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Link Branding API -* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ValidateBrandedLink500ResponseErrorsInner struct for ValidateBrandedLink500ResponseErrorsInner -type ValidateBrandedLink500ResponseErrorsInner struct { - // The reason why the link whitelabel could not be validated. - Message string `json:"message"` -} diff --git a/rest/api/v3/lmc_campaigns/.openapi-generator b/rest/api/v3/lmc_campaigns/.openapi-generator deleted file mode 100644 index 5e92bef0..00000000 --- a/rest/api/v3/lmc_campaigns/.openapi-generator +++ /dev/null @@ -1,60 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_create_campaign.go -api_delete_campaign.go -api_get_campaign.go -api_get_scheduled_campaign.go -api_list_campaign.go -api_schedule_campaign.go -api_send_campaign.go -api_send_test_campaign.go -api_service.go -api_un_schedule_campaign.go -api_update_campaign.go -api_update_scheduled_campaign.go -docs/Campaigns2xx.md -docs/CreateCampaign.md -docs/DeleteCampaign.md -docs/Editor.md -docs/ErrorResponse.md -docs/ErrorResponseErrorsInner.md -docs/GetCampaign.md -docs/GetCampaign200Response.md -docs/GetScheduledCampaign.md -docs/ListCampaign.md -docs/ListCampaign200Response.md -docs/PostCampaignsRequest.md -docs/ScheduleACampaignRequest.md -docs/ScheduleACampaignResponse.md -docs/ScheduleCampaign.md -docs/SendACampaignResponse.md -docs/SendATestCampaignRequest.md -docs/SendCampaign.md -docs/SendTestCampaign.md -docs/SendTestCampaignRequest.md -docs/Status.md -docs/UnScheduleCampaign.md -docs/UpdateACampaignRequest.md -docs/UpdateAScheduledCampaignRequest.md -docs/UpdateAScheduledCampaignResponse.md -docs/UpdateCampaign.md -docs/UpdateScheduledCampaign.md -docs/ViewScheduledTimeOfACampaignResponse.md -model_campaigns2xx.go -model_editor.go -model_error_response.go -model_error_response_errors_inner.go -model_get_campaign_200_response.go -model_list_campaign_200_response.go -model_post_campaigns_request.go -model_schedule_a_campaign_request.go -model_schedule_a_campaign_response.go -model_send_a_campaign_response.go -model_send_a_test_campaign_request.go -model_send_test_campaign_request.go -model_status.go -model_update_a_campaign_request.go -model_update_a_scheduled_campaign_request.go -model_update_a_scheduled_campaign_response.go -model_view_scheduled_time_of_a_campaign_response.go diff --git a/rest/api/v3/lmc_campaigns/.openapi-generator-ignore b/rest/api/v3/lmc_campaigns/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/lmc_campaigns/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/lmc_campaigns/README.md b/rest/api/v3/lmc_campaigns/README.md deleted file mode 100644 index f5b444ef..00000000 --- a/rest/api/v3/lmc_campaigns/README.md +++ /dev/null @@ -1,88 +0,0 @@ -# Go API client for - -The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). - -See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:37.556712+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*CreateCampaign* | [**CreateCampaign**](docs/CreateCampaign.md#createcampaign) | **Post** /v3/campaigns | Create a Campaign -*DeleteCampaign* | [**DeleteCampaign**](docs/DeleteCampaign.md#deletecampaign) | **Delete** /v3/campaigns/{CampaignId} | Delete a Campaign -*GetCampaign* | [**GetCampaign**](docs/GetCampaign.md#getcampaign) | **Get** /v3/campaigns/{CampaignId} | Retrieve a single campaign -*GetScheduledCampaign* | [**GetScheduledCampaign**](docs/GetScheduledCampaign.md#getscheduledcampaign) | **Get** /v3/campaigns/{CampaignId}/schedules | View Scheduled Time of a Campaign -*ListCampaign* | [**ListCampaign**](docs/ListCampaign.md#listcampaign) | **Get** /v3/campaigns | Retrieve all Campaigns -*ScheduleCampaign* | [**ScheduleCampaign**](docs/ScheduleCampaign.md#schedulecampaign) | **Post** /v3/campaigns/{CampaignId}/schedules | Schedule a Campaign -*SendCampaign* | [**SendCampaign**](docs/SendCampaign.md#sendcampaign) | **Post** /v3/campaigns/{CampaignId}/schedules/now | Send a Campaign -*SendTestCampaign* | [**SendTestCampaign**](docs/SendTestCampaign.md#sendtestcampaign) | **Post** /v3/campaigns/{CampaignId}/schedules/test | Send a Test Campaign -*UnScheduleCampaign* | [**UnScheduleCampaign**](docs/UnScheduleCampaign.md#unschedulecampaign) | **Delete** /v3/campaigns/{CampaignId}/schedules | Unschedule a Scheduled Campaign -*UpdateCampaign* | [**UpdateCampaign**](docs/UpdateCampaign.md#updatecampaign) | **Patch** /v3/campaigns/{CampaignId} | Update a Campaign -*UpdateScheduledCampaign* | [**UpdateScheduledCampaign**](docs/UpdateScheduledCampaign.md#updatescheduledcampaign) | **Patch** /v3/campaigns/{CampaignId}/schedules | Update a Scheduled Campaign - - -## Documentation For Models - - - [Campaigns2xx](Campaigns2xx.md) - - [Editor](Editor.md) - - [ErrorResponse](ErrorResponse.md) - - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) - - [GetCampaign200Response](GetCampaign200Response.md) - - [ListCampaign200Response](ListCampaign200Response.md) - - [PostCampaignsRequest](PostCampaignsRequest.md) - - [ScheduleACampaignRequest](ScheduleACampaignRequest.md) - - [ScheduleACampaignResponse](ScheduleACampaignResponse.md) - - [SendACampaignResponse](SendACampaignResponse.md) - - [SendATestCampaignRequest](SendATestCampaignRequest.md) - - [SendTestCampaignRequest](SendTestCampaignRequest.md) - - [Status](Status.md) - - [UpdateACampaignRequest](UpdateACampaignRequest.md) - - [UpdateAScheduledCampaignRequest](UpdateAScheduledCampaignRequest.md) - - [UpdateAScheduledCampaignResponse](UpdateAScheduledCampaignResponse.md) - - [ViewScheduledTimeOfACampaignResponse](ViewScheduledTimeOfACampaignResponse.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/lmc_campaigns/api_create_campaign.go b/rest/api/v3/lmc_campaigns/api_create_campaign.go deleted file mode 100644 index 3aae6310..00000000 --- a/rest/api/v3/lmc_campaigns/api_create_campaign.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type CreateCampaignParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - PostCampaignsRequest *PostCampaignsRequest `json:"PostCampaignsRequest,omitempty"` -} - -func (params *CreateCampaignParam) SetOnbehalfof(Onbehalfof string) *CreateCampaignParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *CreateCampaignParam) SetPostCampaignsRequest(PostCampaignsRequest PostCampaignsRequest) *CreateCampaignParam { - params.PostCampaignsRequest = &PostCampaignsRequest - return params -} - -// **This endpoint allows you to create a campaign.** In order to send or schedule the campaign, you will be required to provide a subject, sender ID, content (we suggest both html and plain text), and at least one list or segment ID. This information is not required when you create a campaign. -func (c *ApiService) CreateCampaign(params *CreateCampaignParam) (interface{}, error) { - path := "/v3/campaigns" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.PostCampaignsRequest != nil { - b, err := json.Marshal(*params.PostCampaignsRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &Campaigns2xx{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_campaigns/api_delete_campaign.go b/rest/api/v3/lmc_campaigns/api_delete_campaign.go deleted file mode 100644 index 7aa3d483..00000000 --- a/rest/api/v3/lmc_campaigns/api_delete_campaign.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type DeleteCampaignParam struct { - // The id of the campaign you would like to retrieve. - CampaignId *int32 `json:"campaign_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *DeleteCampaignParam) SetCampaignId(CampaignId int32) *DeleteCampaignParam { - params.CampaignId = &CampaignId - return params -} -func (params *DeleteCampaignParam) SetOnbehalfof(Onbehalfof string) *DeleteCampaignParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to delete a specific campaign.** -func (c *ApiService) DeleteCampaign(params *DeleteCampaignParam) (interface{}, error) { - path := "/v3/campaigns/{CampaignId}" - if params != nil && params.CampaignId != nil { - path = strings.Replace(path, "{"+"CampaignId"+"}", fmt.Sprint(*params.CampaignId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 401 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_campaigns/api_get_campaign.go b/rest/api/v3/lmc_campaigns/api_get_campaign.go deleted file mode 100644 index ce3623a0..00000000 --- a/rest/api/v3/lmc_campaigns/api_get_campaign.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type GetCampaignParam struct { - // The id of the campaign you would like to retrieve. - CampaignId *int32 `json:"campaign_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetCampaignParam) SetCampaignId(CampaignId int32) *GetCampaignParam { - params.CampaignId = &CampaignId - return params -} -func (params *GetCampaignParam) SetOnbehalfof(Onbehalfof string) *GetCampaignParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a specific campaign.** -func (c *ApiService) GetCampaign(params *GetCampaignParam) (interface{}, error) { - path := "/v3/campaigns/{CampaignId}" - if params != nil && params.CampaignId != nil { - path = strings.Replace(path, "{"+"CampaignId"+"}", fmt.Sprint(*params.CampaignId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &GetCampaign200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_campaigns/api_get_scheduled_campaign.go b/rest/api/v3/lmc_campaigns/api_get_scheduled_campaign.go deleted file mode 100644 index 6f75dc54..00000000 --- a/rest/api/v3/lmc_campaigns/api_get_scheduled_campaign.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type GetScheduledCampaignParam struct { - // - CampaignId *int32 `json:"campaign_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetScheduledCampaignParam) SetCampaignId(CampaignId int32) *GetScheduledCampaignParam { - params.CampaignId = &CampaignId - return params -} -func (params *GetScheduledCampaignParam) SetOnbehalfof(Onbehalfof string) *GetScheduledCampaignParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve the date and time that a campaign has been scheduled to be sent.** -func (c *ApiService) GetScheduledCampaign(params *GetScheduledCampaignParam) (interface{}, error) { - path := "/v3/campaigns/{CampaignId}/schedules" - if params != nil && params.CampaignId != nil { - path = strings.Replace(path, "{"+"CampaignId"+"}", fmt.Sprint(*params.CampaignId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ViewScheduledTimeOfACampaignResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_campaigns/api_list_campaign.go b/rest/api/v3/lmc_campaigns/api_list_campaign.go deleted file mode 100644 index 590a724a..00000000 --- a/rest/api/v3/lmc_campaigns/api_list_campaign.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListCampaignParam struct { - // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. - Limit *int32 `json:"limit,omitempty"` - // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. - Offset *int32 `json:"offset,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListCampaignParam) SetLimit(Limit int32) *ListCampaignParam { - params.Limit = &Limit - return params -} -func (params *ListCampaignParam) SetOffset(Offset int32) *ListCampaignParam { - params.Offset = &Offset - return params -} -func (params *ListCampaignParam) SetOnbehalfof(Onbehalfof string) *ListCampaignParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a paginated list of all of your campaigns.** Returns campaigns in reverse order they were created (newest first). Returns an empty array if no campaigns exist. You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. -func (c *ApiService) ListCampaign(params *ListCampaignParam) (interface{}, error) { - path := "/v3/campaigns" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListCampaign200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_campaigns/api_schedule_campaign.go b/rest/api/v3/lmc_campaigns/api_schedule_campaign.go deleted file mode 100644 index 9a79ea55..00000000 --- a/rest/api/v3/lmc_campaigns/api_schedule_campaign.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type ScheduleCampaignParam struct { - // - CampaignId *int32 `json:"campaign_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - ScheduleACampaignRequest *ScheduleACampaignRequest `json:"ScheduleACampaignRequest,omitempty"` -} - -func (params *ScheduleCampaignParam) SetCampaignId(CampaignId int32) *ScheduleCampaignParam { - params.CampaignId = &CampaignId - return params -} -func (params *ScheduleCampaignParam) SetOnbehalfof(Onbehalfof string) *ScheduleCampaignParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *ScheduleCampaignParam) SetScheduleACampaignRequest(ScheduleACampaignRequest ScheduleACampaignRequest) *ScheduleCampaignParam { - params.ScheduleACampaignRequest = &ScheduleACampaignRequest - return params -} - -// **This endpoint allows you to schedule a specific date and time for your campaign to be sent.** If you have the flexibility, it's better to schedule mail for off-peak times. Most emails are scheduled and sent at the top of the hour or half hour. Scheduling email to avoid those times (for example, scheduling at 10:53) can result in lower deferral rates because it won't be going through our servers at the same times as everyone else's mail. -func (c *ApiService) ScheduleCampaign(params *ScheduleCampaignParam) (interface{}, error) { - path := "/v3/campaigns/{CampaignId}/schedules" - if params != nil && params.CampaignId != nil { - path = strings.Replace(path, "{"+"CampaignId"+"}", fmt.Sprint(*params.CampaignId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.ScheduleACampaignRequest != nil { - b, err := json.Marshal(*params.ScheduleACampaignRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &ScheduleACampaignResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_campaigns/api_send_campaign.go b/rest/api/v3/lmc_campaigns/api_send_campaign.go deleted file mode 100644 index 085410cd..00000000 --- a/rest/api/v3/lmc_campaigns/api_send_campaign.go +++ /dev/null @@ -1,103 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type SendCampaignParam struct { - // - CampaignId *int32 `json:"campaign_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *SendCampaignParam) SetCampaignId(CampaignId int32) *SendCampaignParam { - params.CampaignId = &CampaignId - return params -} -func (params *SendCampaignParam) SetOnbehalfof(Onbehalfof string) *SendCampaignParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to immediately send an existing campaign.** Normally a POST request would have a body, but since this endpoint is telling us to send a resource that is already created, a request body is not needed. -func (c *ApiService) SendCampaign(params *SendCampaignParam) (interface{}, error) { - path := "/v3/campaigns/{CampaignId}/schedules/now" - if params != nil && params.CampaignId != nil { - path = strings.Replace(path, "{"+"CampaignId"+"}", fmt.Sprint(*params.CampaignId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &SendACampaignResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_campaigns/api_send_test_campaign.go b/rest/api/v3/lmc_campaigns/api_send_test_campaign.go deleted file mode 100644 index d29a0129..00000000 --- a/rest/api/v3/lmc_campaigns/api_send_test_campaign.go +++ /dev/null @@ -1,102 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type SendTestCampaignParam struct { - // - CampaignId *int32 `json:"campaign_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - SendTestCampaignRequest *SendTestCampaignRequest `json:"SendTestCampaignRequest,omitempty"` -} - -func (params *SendTestCampaignParam) SetCampaignId(CampaignId int32) *SendTestCampaignParam { - params.CampaignId = &CampaignId - return params -} -func (params *SendTestCampaignParam) SetOnbehalfof(Onbehalfof string) *SendTestCampaignParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *SendTestCampaignParam) SetSendTestCampaignRequest(SendTestCampaignRequest SendTestCampaignRequest) *SendTestCampaignParam { - params.SendTestCampaignRequest = &SendTestCampaignRequest - return params -} - -// **This endpoint allows you to send a test campaign.** To send to multiple addresses, use an array for the JSON \"to\" value [\"one@address\",\"two@address\"] -func (c *ApiService) SendTestCampaign(params *SendTestCampaignParam) (interface{}, error) { - path := "/v3/campaigns/{CampaignId}/schedules/test" - if params != nil && params.CampaignId != nil { - path = strings.Replace(path, "{"+"CampaignId"+"}", fmt.Sprint(*params.CampaignId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.SendTestCampaignRequest != nil { - b, err := json.Marshal(*params.SendTestCampaignRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &SendATestCampaignRequest{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_campaigns/api_service.go b/rest/api/v3/lmc_campaigns/api_service.go deleted file mode 100644 index 8f9dfc14..00000000 --- a/rest/api/v3/lmc_campaigns/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/lmc_campaigns/api_un_schedule_campaign.go b/rest/api/v3/lmc_campaigns/api_un_schedule_campaign.go deleted file mode 100644 index 85ac977f..00000000 --- a/rest/api/v3/lmc_campaigns/api_un_schedule_campaign.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type UnScheduleCampaignParam struct { - // - CampaignId *int32 `json:"campaign_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *UnScheduleCampaignParam) SetCampaignId(CampaignId int32) *UnScheduleCampaignParam { - params.CampaignId = &CampaignId - return params -} -func (params *UnScheduleCampaignParam) SetOnbehalfof(Onbehalfof string) *UnScheduleCampaignParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to unschedule a campaign that has already been scheduled to be sent.** A successful unschedule will return a 204. If the specified campaign is in the process of being sent, the only option is to cancel (a different method). -func (c *ApiService) UnScheduleCampaign(params *UnScheduleCampaignParam) (interface{}, error) { - path := "/v3/campaigns/{CampaignId}/schedules" - if params != nil && params.CampaignId != nil { - path = strings.Replace(path, "{"+"CampaignId"+"}", fmt.Sprint(*params.CampaignId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_campaigns/api_update_campaign.go b/rest/api/v3/lmc_campaigns/api_update_campaign.go deleted file mode 100644 index 735592ad..00000000 --- a/rest/api/v3/lmc_campaigns/api_update_campaign.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type UpdateCampaignParam struct { - // The id of the campaign you would like to retrieve. - CampaignId *int32 `json:"campaign_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - UpdateACampaignRequest *UpdateACampaignRequest `json:"UpdateACampaignRequest,omitempty"` -} - -func (params *UpdateCampaignParam) SetCampaignId(CampaignId int32) *UpdateCampaignParam { - params.CampaignId = &CampaignId - return params -} -func (params *UpdateCampaignParam) SetOnbehalfof(Onbehalfof string) *UpdateCampaignParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateCampaignParam) SetUpdateACampaignRequest(UpdateACampaignRequest UpdateACampaignRequest) *UpdateCampaignParam { - params.UpdateACampaignRequest = &UpdateACampaignRequest - return params -} - -// **This endpoint allows you to update a specific campaign.** This is especially useful if you only set up the campaign using POST /campaigns, but didn't set many of the parameters. -func (c *ApiService) UpdateCampaign(params *UpdateCampaignParam) (interface{}, error) { - path := "/v3/campaigns/{CampaignId}" - if params != nil && params.CampaignId != nil { - path = strings.Replace(path, "{"+"CampaignId"+"}", fmt.Sprint(*params.CampaignId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateACampaignRequest != nil { - b, err := json.Marshal(*params.UpdateACampaignRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &Campaigns2xx{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_campaigns/api_update_scheduled_campaign.go b/rest/api/v3/lmc_campaigns/api_update_scheduled_campaign.go deleted file mode 100644 index f65d89f2..00000000 --- a/rest/api/v3/lmc_campaigns/api_update_scheduled_campaign.go +++ /dev/null @@ -1,110 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type UpdateScheduledCampaignParam struct { - // - CampaignId *int32 `json:"campaign_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - UpdateAScheduledCampaignRequest *UpdateAScheduledCampaignRequest `json:"UpdateAScheduledCampaignRequest,omitempty"` -} - -func (params *UpdateScheduledCampaignParam) SetCampaignId(CampaignId int32) *UpdateScheduledCampaignParam { - params.CampaignId = &CampaignId - return params -} -func (params *UpdateScheduledCampaignParam) SetOnbehalfof(Onbehalfof string) *UpdateScheduledCampaignParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateScheduledCampaignParam) SetUpdateAScheduledCampaignRequest(UpdateAScheduledCampaignRequest UpdateAScheduledCampaignRequest) *UpdateScheduledCampaignParam { - params.UpdateAScheduledCampaignRequest = &UpdateAScheduledCampaignRequest - return params -} - -// **This endpoint allows to you change the scheduled time and date for a campaign to be sent.** -func (c *ApiService) UpdateScheduledCampaign(params *UpdateScheduledCampaignParam) (interface{}, error) { - path := "/v3/campaigns/{CampaignId}/schedules" - if params != nil && params.CampaignId != nil { - path = strings.Replace(path, "{"+"CampaignId"+"}", fmt.Sprint(*params.CampaignId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateAScheduledCampaignRequest != nil { - b, err := json.Marshal(*params.UpdateAScheduledCampaignRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &UpdateAScheduledCampaignResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_campaigns/docs/Campaigns2xx.md b/rest/api/v3/lmc_campaigns/docs/Campaigns2xx.md deleted file mode 100644 index 0d21e23c..00000000 --- a/rest/api/v3/lmc_campaigns/docs/Campaigns2xx.md +++ /dev/null @@ -1,24 +0,0 @@ -# Campaigns2xx - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Title** | **string** | The display title of your campaign. This will be viewable by you in the Marketing Campaigns UI. | -**Subject** | **string** | The subject of your campaign that your recipients will see. |[optional] -**SenderId** | **int32** | The ID of the \"sender\" identity that you have created. Your recipients will see this as the \"from\" on your marketing emails. |[optional] -**ListIds** | **[]int32** | The IDs of the lists you are sending this campaign to. You can have both segment IDs and list IDs |[optional] -**SegmentIds** | **[]int32** | The segment IDs that you are sending this list to. You can have both segment IDs and list IDs. Segments are limited to 10 segment IDs. |[optional] -**Categories** | **[]string** | The categories you would like associated to this campaign. |[optional] -**SuppressionGroupId** | **int32** | The suppression group that this marketing email belongs to, allowing recipients to opt-out of emails of this type. |[optional] -**CustomUnsubscribeUrl** | **string** | This is the url of the custom unsubscribe page that you provide for customers to unsubscribe from your suppression groups. |[optional] -**IpPool** | **string** | The pool of IPs that you would like to send this email from. |[optional] -**HtmlContent** | **string** | The HTML of your marketing email. |[optional] -**PlainContent** | **string** | The plain text content of your emails. |[optional] -**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] -**Status** | **string** | The status of your campaign. | -**Id** | **int32** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_campaigns/docs/CreateCampaign.md b/rest/api/v3/lmc_campaigns/docs/CreateCampaign.md deleted file mode 100644 index f7c28367..00000000 --- a/rest/api/v3/lmc_campaigns/docs/CreateCampaign.md +++ /dev/null @@ -1,49 +0,0 @@ -# CreateCampaign - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateCampaign**](CreateCampaign.md#CreateCampaign) | **Post** /v3/campaigns | Create a Campaign - - - -## CreateCampaign - -> Campaigns2xx CreateCampaign(ctx, optional) - -Create a Campaign - -**This endpoint allows you to create a campaign.** In order to send or schedule the campaign, you will be required to provide a subject, sender ID, content (we suggest both html and plain text), and at least one list or segment ID. This information is not required when you create a campaign. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateCampaignParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**PostCampaignsRequest** | [**PostCampaignsRequest**](PostCampaignsRequest.md) | - -### Return type - -[**Campaigns2xx**](Campaigns2xx.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_campaigns/docs/DeleteCampaign.md b/rest/api/v3/lmc_campaigns/docs/DeleteCampaign.md deleted file mode 100644 index 1c2063be..00000000 --- a/rest/api/v3/lmc_campaigns/docs/DeleteCampaign.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeleteCampaign - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteCampaign**](DeleteCampaign.md#DeleteCampaign) | **Delete** /v3/campaigns/{CampaignId} | Delete a Campaign - - - -## DeleteCampaign - -> DeleteCampaign(ctx, CampaignIdoptional) - -Delete a Campaign - -**This endpoint allows you to delete a specific campaign.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**CampaignId** | **int32** | The id of the campaign you would like to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteCampaignParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_campaigns/docs/Editor.md b/rest/api/v3/lmc_campaigns/docs/Editor.md deleted file mode 100644 index 9d170841..00000000 --- a/rest/api/v3/lmc_campaigns/docs/Editor.md +++ /dev/null @@ -1,13 +0,0 @@ -# Editor - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**CODE** | string | (value: `"code"`) -**DESIGN** | string | (value: `"design"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_campaigns/docs/ErrorResponse.md b/rest/api/v3/lmc_campaigns/docs/ErrorResponse.md deleted file mode 100644 index ec2d41f6..00000000 --- a/rest/api/v3/lmc_campaigns/docs/ErrorResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ErrorResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] -**Id** | **string** | When applicable, this property value will be an error ID. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_campaigns/docs/ErrorResponseErrorsInner.md b/rest/api/v3/lmc_campaigns/docs/ErrorResponseErrorsInner.md deleted file mode 100644 index 5449c685..00000000 --- a/rest/api/v3/lmc_campaigns/docs/ErrorResponseErrorsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ErrorResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | An error message. |[optional] -**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] -**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_campaigns/docs/GetCampaign.md b/rest/api/v3/lmc_campaigns/docs/GetCampaign.md deleted file mode 100644 index 7fe9f996..00000000 --- a/rest/api/v3/lmc_campaigns/docs/GetCampaign.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetCampaign - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetCampaign**](GetCampaign.md#GetCampaign) | **Get** /v3/campaigns/{CampaignId} | Retrieve a single campaign - - - -## GetCampaign - -> GetCampaign200Response GetCampaign(ctx, CampaignIdoptional) - -Retrieve a single campaign - -**This endpoint allows you to retrieve a specific campaign.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**CampaignId** | **int32** | The id of the campaign you would like to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a GetCampaignParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**GetCampaign200Response**](GetCampaign200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_campaigns/docs/GetCampaign200Response.md b/rest/api/v3/lmc_campaigns/docs/GetCampaign200Response.md deleted file mode 100644 index 081bf696..00000000 --- a/rest/api/v3/lmc_campaigns/docs/GetCampaign200Response.md +++ /dev/null @@ -1,23 +0,0 @@ -# GetCampaign200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Categories** | **[]string** | |[optional] -**CustomUnsubscribeUrl** | **string** | |[optional] -**HtmlContent** | **string** | |[optional] -**Id** | **int32** | |[optional] -**IpPool** | **string** | |[optional] -**ListIds** | **[]int32** | |[optional] -**PlainContent** | **string** | |[optional] -**SegmentIds** | **[]int32** | |[optional] -**SenderId** | **int32** | |[optional] -**Status** | **string** | |[optional] -**Subject** | **string** | |[optional] -**SuppressionGroupId** | **int32** | |[optional] -**Title** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_campaigns/docs/GetScheduledCampaign.md b/rest/api/v3/lmc_campaigns/docs/GetScheduledCampaign.md deleted file mode 100644 index 66847be7..00000000 --- a/rest/api/v3/lmc_campaigns/docs/GetScheduledCampaign.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetScheduledCampaign - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetScheduledCampaign**](GetScheduledCampaign.md#GetScheduledCampaign) | **Get** /v3/campaigns/{CampaignId}/schedules | View Scheduled Time of a Campaign - - - -## GetScheduledCampaign - -> ViewScheduledTimeOfACampaignResponse GetScheduledCampaign(ctx, CampaignIdoptional) - -View Scheduled Time of a Campaign - -**This endpoint allows you to retrieve the date and time that a campaign has been scheduled to be sent.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**CampaignId** | **int32** | - -### Other Parameters - -Other parameters are passed through a pointer to a GetScheduledCampaignParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ViewScheduledTimeOfACampaignResponse**](ViewScheduledTimeOfACampaignResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_campaigns/docs/ListCampaign.md b/rest/api/v3/lmc_campaigns/docs/ListCampaign.md deleted file mode 100644 index 103eaf98..00000000 --- a/rest/api/v3/lmc_campaigns/docs/ListCampaign.md +++ /dev/null @@ -1,50 +0,0 @@ -# ListCampaign - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListCampaign**](ListCampaign.md#ListCampaign) | **Get** /v3/campaigns | Retrieve all Campaigns - - - -## ListCampaign - -> ListCampaign200Response ListCampaign(ctx, optional) - -Retrieve all Campaigns - -**This endpoint allows you to retrieve a paginated list of all of your campaigns.** Returns campaigns in reverse order they were created (newest first). Returns an empty array if no campaigns exist. You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListCampaignParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. -**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListCampaign200Response**](ListCampaign200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_campaigns/docs/ListCampaign200Response.md b/rest/api/v3/lmc_campaigns/docs/ListCampaign200Response.md deleted file mode 100644 index 4cb67061..00000000 --- a/rest/api/v3/lmc_campaigns/docs/ListCampaign200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListCampaign200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]Campaigns2xx**](Campaigns2xx.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_campaigns/docs/PostCampaignsRequest.md b/rest/api/v3/lmc_campaigns/docs/PostCampaignsRequest.md deleted file mode 100644 index aa92e8b4..00000000 --- a/rest/api/v3/lmc_campaigns/docs/PostCampaignsRequest.md +++ /dev/null @@ -1,22 +0,0 @@ -# PostCampaignsRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Title** | **string** | The display title of your campaign. This will be viewable by you in the Marketing Campaigns UI. | -**Subject** | **string** | The subject of your campaign that your recipients will see. |[optional] -**SenderId** | **int32** | The ID of the \"sender\" identity that you have created. Your recipients will see this as the \"from\" on your marketing emails. |[optional] -**ListIds** | **[]int32** | The IDs of the lists you are sending this campaign to. You can have both segment IDs and list IDs |[optional] -**SegmentIds** | **[]int32** | The segment IDs that you are sending this list to. You can have both segment IDs and list IDs. Segments are limited to 10 segment IDs. |[optional] -**Categories** | **[]string** | The categories you would like associated to this campaign. |[optional] -**SuppressionGroupId** | **int32** | The suppression group that this marketing email belongs to, allowing recipients to opt-out of emails of this type. |[optional] -**CustomUnsubscribeUrl** | **string** | This is the url of the custom unsubscribe page that you provide for customers to unsubscribe from your suppression groups. |[optional] -**IpPool** | **string** | The pool of IPs that you would like to send this email from. |[optional] -**HtmlContent** | **string** | The HTML of your marketing email. |[optional] -**PlainContent** | **string** | The plain text content of your emails. |[optional] -**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_campaigns/docs/ScheduleACampaignRequest.md b/rest/api/v3/lmc_campaigns/docs/ScheduleACampaignRequest.md deleted file mode 100644 index 489650a2..00000000 --- a/rest/api/v3/lmc_campaigns/docs/ScheduleACampaignRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# ScheduleACampaignRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SendAt** | **int32** | The unix timestamp for the date and time you would like your campaign to be sent out. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_campaigns/docs/ScheduleACampaignResponse.md b/rest/api/v3/lmc_campaigns/docs/ScheduleACampaignResponse.md deleted file mode 100644 index 3e850370..00000000 --- a/rest/api/v3/lmc_campaigns/docs/ScheduleACampaignResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# ScheduleACampaignResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int32** | The campaign ID. | -**SendAt** | **int32** | The date time you scheduled your campaign to be sent. | -**Status** | [**Status**](Status.md) | The status of your campaign. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_campaigns/docs/ScheduleCampaign.md b/rest/api/v3/lmc_campaigns/docs/ScheduleCampaign.md deleted file mode 100644 index 257a83bf..00000000 --- a/rest/api/v3/lmc_campaigns/docs/ScheduleCampaign.md +++ /dev/null @@ -1,53 +0,0 @@ -# ScheduleCampaign - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ScheduleCampaign**](ScheduleCampaign.md#ScheduleCampaign) | **Post** /v3/campaigns/{CampaignId}/schedules | Schedule a Campaign - - - -## ScheduleCampaign - -> ScheduleACampaignResponse ScheduleCampaign(ctx, CampaignIdoptional) - -Schedule a Campaign - -**This endpoint allows you to schedule a specific date and time for your campaign to be sent.** If you have the flexibility, it's better to schedule mail for off-peak times. Most emails are scheduled and sent at the top of the hour or half hour. Scheduling email to avoid those times (for example, scheduling at 10:53) can result in lower deferral rates because it won't be going through our servers at the same times as everyone else's mail. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**CampaignId** | **int32** | - -### Other Parameters - -Other parameters are passed through a pointer to a ScheduleCampaignParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**ScheduleACampaignRequest** | [**ScheduleACampaignRequest**](ScheduleACampaignRequest.md) | - -### Return type - -[**ScheduleACampaignResponse**](ScheduleACampaignResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_campaigns/docs/SendACampaignResponse.md b/rest/api/v3/lmc_campaigns/docs/SendACampaignResponse.md deleted file mode 100644 index 5b5d6e36..00000000 --- a/rest/api/v3/lmc_campaigns/docs/SendACampaignResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# SendACampaignResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int64** | | -**Status** | **string** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_campaigns/docs/SendATestCampaignRequest.md b/rest/api/v3/lmc_campaigns/docs/SendATestCampaignRequest.md deleted file mode 100644 index 7312efcb..00000000 --- a/rest/api/v3/lmc_campaigns/docs/SendATestCampaignRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# SendATestCampaignRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**To** | **string** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_campaigns/docs/SendCampaign.md b/rest/api/v3/lmc_campaigns/docs/SendCampaign.md deleted file mode 100644 index 8e303880..00000000 --- a/rest/api/v3/lmc_campaigns/docs/SendCampaign.md +++ /dev/null @@ -1,52 +0,0 @@ -# SendCampaign - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**SendCampaign**](SendCampaign.md#SendCampaign) | **Post** /v3/campaigns/{CampaignId}/schedules/now | Send a Campaign - - - -## SendCampaign - -> SendACampaignResponse SendCampaign(ctx, CampaignIdoptional) - -Send a Campaign - -**This endpoint allows you to immediately send an existing campaign.** Normally a POST request would have a body, but since this endpoint is telling us to send a resource that is already created, a request body is not needed. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**CampaignId** | **int32** | - -### Other Parameters - -Other parameters are passed through a pointer to a SendCampaignParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**SendACampaignResponse**](SendACampaignResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_campaigns/docs/SendTestCampaign.md b/rest/api/v3/lmc_campaigns/docs/SendTestCampaign.md deleted file mode 100644 index 8fdf3672..00000000 --- a/rest/api/v3/lmc_campaigns/docs/SendTestCampaign.md +++ /dev/null @@ -1,53 +0,0 @@ -# SendTestCampaign - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**SendTestCampaign**](SendTestCampaign.md#SendTestCampaign) | **Post** /v3/campaigns/{CampaignId}/schedules/test | Send a Test Campaign - - - -## SendTestCampaign - -> SendATestCampaignRequest SendTestCampaign(ctx, CampaignIdoptional) - -Send a Test Campaign - -**This endpoint allows you to send a test campaign.** To send to multiple addresses, use an array for the JSON \"to\" value [\"one@address\",\"two@address\"] - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**CampaignId** | **int32** | - -### Other Parameters - -Other parameters are passed through a pointer to a SendTestCampaignParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**SendTestCampaignRequest** | [**SendTestCampaignRequest**](SendTestCampaignRequest.md) | - -### Return type - -[**SendATestCampaignRequest**](SendATestCampaignRequest.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_campaigns/docs/SendTestCampaignRequest.md b/rest/api/v3/lmc_campaigns/docs/SendTestCampaignRequest.md deleted file mode 100644 index 3b22fcad..00000000 --- a/rest/api/v3/lmc_campaigns/docs/SendTestCampaignRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# SendTestCampaignRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**To** | **string** | The email address that should receive the test campaign. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_campaigns/docs/Status.md b/rest/api/v3/lmc_campaigns/docs/Status.md deleted file mode 100644 index 6f087e79..00000000 --- a/rest/api/v3/lmc_campaigns/docs/Status.md +++ /dev/null @@ -1,12 +0,0 @@ -# Status - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**SCHEDULED** | string | (value: `"Scheduled"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_campaigns/docs/UnScheduleCampaign.md b/rest/api/v3/lmc_campaigns/docs/UnScheduleCampaign.md deleted file mode 100644 index 1d0db274..00000000 --- a/rest/api/v3/lmc_campaigns/docs/UnScheduleCampaign.md +++ /dev/null @@ -1,52 +0,0 @@ -# UnScheduleCampaign - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UnScheduleCampaign**](UnScheduleCampaign.md#UnScheduleCampaign) | **Delete** /v3/campaigns/{CampaignId}/schedules | Unschedule a Scheduled Campaign - - - -## UnScheduleCampaign - -> UnScheduleCampaign(ctx, CampaignIdoptional) - -Unschedule a Scheduled Campaign - -**This endpoint allows you to unschedule a campaign that has already been scheduled to be sent.** A successful unschedule will return a 204. If the specified campaign is in the process of being sent, the only option is to cancel (a different method). - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**CampaignId** | **int32** | - -### Other Parameters - -Other parameters are passed through a pointer to a UnScheduleCampaignParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_campaigns/docs/UpdateACampaignRequest.md b/rest/api/v3/lmc_campaigns/docs/UpdateACampaignRequest.md deleted file mode 100644 index 18686464..00000000 --- a/rest/api/v3/lmc_campaigns/docs/UpdateACampaignRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# UpdateACampaignRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Title** | **string** | The title of the campaign. | -**Subject** | **string** | The subject line for your campaign. | -**Categories** | **[]string** | The categories you want to tag on this campaign. | -**HtmlContent** | **string** | The HTML content of this campaign. | -**PlainContent** | **string** | The plain content of this campaign. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_campaigns/docs/UpdateAScheduledCampaignRequest.md b/rest/api/v3/lmc_campaigns/docs/UpdateAScheduledCampaignRequest.md deleted file mode 100644 index 95153a0c..00000000 --- a/rest/api/v3/lmc_campaigns/docs/UpdateAScheduledCampaignRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateAScheduledCampaignRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SendAt** | **int64** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_campaigns/docs/UpdateAScheduledCampaignResponse.md b/rest/api/v3/lmc_campaigns/docs/UpdateAScheduledCampaignResponse.md deleted file mode 100644 index ca58edfc..00000000 --- a/rest/api/v3/lmc_campaigns/docs/UpdateAScheduledCampaignResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# UpdateAScheduledCampaignResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int32** | The campaign ID | -**SendAt** | **int32** | The unix timestamp to send the campaign. | -**Status** | **string** | The status of the schedule. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_campaigns/docs/UpdateCampaign.md b/rest/api/v3/lmc_campaigns/docs/UpdateCampaign.md deleted file mode 100644 index 763d4a0a..00000000 --- a/rest/api/v3/lmc_campaigns/docs/UpdateCampaign.md +++ /dev/null @@ -1,53 +0,0 @@ -# UpdateCampaign - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateCampaign**](UpdateCampaign.md#UpdateCampaign) | **Patch** /v3/campaigns/{CampaignId} | Update a Campaign - - - -## UpdateCampaign - -> Campaigns2xx UpdateCampaign(ctx, CampaignIdoptional) - -Update a Campaign - -**This endpoint allows you to update a specific campaign.** This is especially useful if you only set up the campaign using POST /campaigns, but didn't set many of the parameters. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**CampaignId** | **int32** | The id of the campaign you would like to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateCampaignParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**UpdateACampaignRequest** | [**UpdateACampaignRequest**](UpdateACampaignRequest.md) | - -### Return type - -[**Campaigns2xx**](Campaigns2xx.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_campaigns/docs/UpdateScheduledCampaign.md b/rest/api/v3/lmc_campaigns/docs/UpdateScheduledCampaign.md deleted file mode 100644 index 936135ed..00000000 --- a/rest/api/v3/lmc_campaigns/docs/UpdateScheduledCampaign.md +++ /dev/null @@ -1,53 +0,0 @@ -# UpdateScheduledCampaign - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateScheduledCampaign**](UpdateScheduledCampaign.md#UpdateScheduledCampaign) | **Patch** /v3/campaigns/{CampaignId}/schedules | Update a Scheduled Campaign - - - -## UpdateScheduledCampaign - -> UpdateAScheduledCampaignResponse UpdateScheduledCampaign(ctx, CampaignIdoptional) - -Update a Scheduled Campaign - -**This endpoint allows to you change the scheduled time and date for a campaign to be sent.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**CampaignId** | **int32** | - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateScheduledCampaignParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**UpdateAScheduledCampaignRequest** | [**UpdateAScheduledCampaignRequest**](UpdateAScheduledCampaignRequest.md) | - -### Return type - -[**UpdateAScheduledCampaignResponse**](UpdateAScheduledCampaignResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_campaigns/docs/ViewScheduledTimeOfACampaignResponse.md b/rest/api/v3/lmc_campaigns/docs/ViewScheduledTimeOfACampaignResponse.md deleted file mode 100644 index 76d1e22d..00000000 --- a/rest/api/v3/lmc_campaigns/docs/ViewScheduledTimeOfACampaignResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ViewScheduledTimeOfACampaignResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SendAt** | **int64** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_campaigns/model_campaigns2xx.go b/rest/api/v3/lmc_campaigns/model_campaigns2xx.go deleted file mode 100644 index f8c3ccfd..00000000 --- a/rest/api/v3/lmc_campaigns/model_campaigns2xx.go +++ /dev/null @@ -1,45 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Campaigns2xx struct for Campaigns2xx -type Campaigns2xx struct { - // The display title of your campaign. This will be viewable by you in the Marketing Campaigns UI. - Title string `json:"title"` - // The subject of your campaign that your recipients will see. - Subject *string `json:"subject,omitempty"` - // The ID of the \"sender\" identity that you have created. Your recipients will see this as the \"from\" on your marketing emails. - SenderId *int32 `json:"sender_id,omitempty"` - // The IDs of the lists you are sending this campaign to. You can have both segment IDs and list IDs - ListIds *[]int32 `json:"list_ids,omitempty"` - // The segment IDs that you are sending this list to. You can have both segment IDs and list IDs. Segments are limited to 10 segment IDs. - SegmentIds *[]int32 `json:"segment_ids,omitempty"` - // The categories you would like associated to this campaign. - Categories *[]string `json:"categories,omitempty"` - // The suppression group that this marketing email belongs to, allowing recipients to opt-out of emails of this type. - SuppressionGroupId *int32 `json:"suppression_group_id,omitempty"` - // This is the url of the custom unsubscribe page that you provide for customers to unsubscribe from your suppression groups. - CustomUnsubscribeUrl *string `json:"custom_unsubscribe_url,omitempty"` - // The pool of IPs that you would like to send this email from. - IpPool *string `json:"ip_pool,omitempty"` - // The HTML of your marketing email. - HtmlContent *string `json:"html_content,omitempty"` - // The plain text content of your emails. - PlainContent *string `json:"plain_content,omitempty"` - // The editor used in the UI. - Editor *Editor `json:"editor,omitempty"` - // The status of your campaign. - Status string `json:"status"` - Id *int32 `json:"id,omitempty"` -} diff --git a/rest/api/v3/lmc_campaigns/model_editor.go b/rest/api/v3/lmc_campaigns/model_editor.go deleted file mode 100644 index 4af6f4bb..00000000 --- a/rest/api/v3/lmc_campaigns/model_editor.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Editor the model 'Editor' -type Editor string - -// List of Editor -const ( - EDITOR_CODE Editor = "code" - EDITOR_DESIGN Editor = "design" -) diff --git a/rest/api/v3/lmc_campaigns/model_error_response.go b/rest/api/v3/lmc_campaigns/model_error_response.go deleted file mode 100644 index fd2e601a..00000000 --- a/rest/api/v3/lmc_campaigns/model_error_response.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponse struct for ErrorResponse -type ErrorResponse struct { - Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` - // When applicable, this property value will be an error ID. - Id *string `json:"id,omitempty"` -} diff --git a/rest/api/v3/lmc_campaigns/model_error_response_errors_inner.go b/rest/api/v3/lmc_campaigns/model_error_response_errors_inner.go deleted file mode 100644 index 77addddc..00000000 --- a/rest/api/v3/lmc_campaigns/model_error_response_errors_inner.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner -type ErrorResponseErrorsInner struct { - // An error message. - Message *string `json:"message,omitempty"` - // When applicable, this property value will be the field that generated the error. - Field *string `json:"field,omitempty"` - // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. - Help *map[string]interface{} `json:"help,omitempty"` -} diff --git a/rest/api/v3/lmc_campaigns/model_get_campaign_200_response.go b/rest/api/v3/lmc_campaigns/model_get_campaign_200_response.go deleted file mode 100644 index 7c675785..00000000 --- a/rest/api/v3/lmc_campaigns/model_get_campaign_200_response.go +++ /dev/null @@ -1,31 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetCampaign200Response struct for GetCampaign200Response -type GetCampaign200Response struct { - Categories *[]string `json:"categories,omitempty"` - CustomUnsubscribeUrl *string `json:"custom_unsubscribe_url,omitempty"` - HtmlContent *string `json:"html_content,omitempty"` - Id *int32 `json:"id,omitempty"` - IpPool *string `json:"ip_pool,omitempty"` - ListIds *[]int32 `json:"list_ids,omitempty"` - PlainContent *string `json:"plain_content,omitempty"` - SegmentIds *[]int32 `json:"segment_ids,omitempty"` - SenderId *int32 `json:"sender_id,omitempty"` - Status *string `json:"status,omitempty"` - Subject *string `json:"subject,omitempty"` - SuppressionGroupId *int32 `json:"suppression_group_id,omitempty"` - Title *string `json:"title,omitempty"` -} diff --git a/rest/api/v3/lmc_campaigns/model_list_campaign_200_response.go b/rest/api/v3/lmc_campaigns/model_list_campaign_200_response.go deleted file mode 100644 index 47cc209c..00000000 --- a/rest/api/v3/lmc_campaigns/model_list_campaign_200_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListCampaign200Response struct for ListCampaign200Response -type ListCampaign200Response struct { - Result *[]Campaigns2xx `json:"result,omitempty"` -} diff --git a/rest/api/v3/lmc_campaigns/model_post_campaigns_request.go b/rest/api/v3/lmc_campaigns/model_post_campaigns_request.go deleted file mode 100644 index 0cc45837..00000000 --- a/rest/api/v3/lmc_campaigns/model_post_campaigns_request.go +++ /dev/null @@ -1,42 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// PostCampaignsRequest struct for PostCampaignsRequest -type PostCampaignsRequest struct { - // The display title of your campaign. This will be viewable by you in the Marketing Campaigns UI. - Title string `json:"title"` - // The subject of your campaign that your recipients will see. - Subject *string `json:"subject,omitempty"` - // The ID of the \"sender\" identity that you have created. Your recipients will see this as the \"from\" on your marketing emails. - SenderId *int32 `json:"sender_id,omitempty"` - // The IDs of the lists you are sending this campaign to. You can have both segment IDs and list IDs - ListIds *[]int32 `json:"list_ids,omitempty"` - // The segment IDs that you are sending this list to. You can have both segment IDs and list IDs. Segments are limited to 10 segment IDs. - SegmentIds *[]int32 `json:"segment_ids,omitempty"` - // The categories you would like associated to this campaign. - Categories *[]string `json:"categories,omitempty"` - // The suppression group that this marketing email belongs to, allowing recipients to opt-out of emails of this type. - SuppressionGroupId *int32 `json:"suppression_group_id,omitempty"` - // This is the url of the custom unsubscribe page that you provide for customers to unsubscribe from your suppression groups. - CustomUnsubscribeUrl *string `json:"custom_unsubscribe_url,omitempty"` - // The pool of IPs that you would like to send this email from. - IpPool *string `json:"ip_pool,omitempty"` - // The HTML of your marketing email. - HtmlContent *string `json:"html_content,omitempty"` - // The plain text content of your emails. - PlainContent *string `json:"plain_content,omitempty"` - // The editor used in the UI. - Editor *Editor `json:"editor,omitempty"` -} diff --git a/rest/api/v3/lmc_campaigns/model_schedule_a_campaign_request.go b/rest/api/v3/lmc_campaigns/model_schedule_a_campaign_request.go deleted file mode 100644 index 4b53f35b..00000000 --- a/rest/api/v3/lmc_campaigns/model_schedule_a_campaign_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ScheduleACampaignRequest struct for ScheduleACampaignRequest -type ScheduleACampaignRequest struct { - // The unix timestamp for the date and time you would like your campaign to be sent out. - SendAt int32 `json:"send_at"` -} diff --git a/rest/api/v3/lmc_campaigns/model_schedule_a_campaign_response.go b/rest/api/v3/lmc_campaigns/model_schedule_a_campaign_response.go deleted file mode 100644 index 62df9ad9..00000000 --- a/rest/api/v3/lmc_campaigns/model_schedule_a_campaign_response.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ScheduleACampaignResponse struct for ScheduleACampaignResponse -type ScheduleACampaignResponse struct { - // The campaign ID. - Id int32 `json:"id"` - // The date time you scheduled your campaign to be sent. - SendAt int32 `json:"send_at"` - // The status of your campaign. - Status Status `json:"status"` -} diff --git a/rest/api/v3/lmc_campaigns/model_send_a_campaign_response.go b/rest/api/v3/lmc_campaigns/model_send_a_campaign_response.go deleted file mode 100644 index 75f64bda..00000000 --- a/rest/api/v3/lmc_campaigns/model_send_a_campaign_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SendACampaignResponse struct for SendACampaignResponse -type SendACampaignResponse struct { - Id int64 `json:"id"` - Status string `json:"status"` -} diff --git a/rest/api/v3/lmc_campaigns/model_send_a_test_campaign_request.go b/rest/api/v3/lmc_campaigns/model_send_a_test_campaign_request.go deleted file mode 100644 index 48db5624..00000000 --- a/rest/api/v3/lmc_campaigns/model_send_a_test_campaign_request.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SendATestCampaignRequest struct for SendATestCampaignRequest -type SendATestCampaignRequest struct { - To string `json:"to"` -} diff --git a/rest/api/v3/lmc_campaigns/model_send_test_campaign_request.go b/rest/api/v3/lmc_campaigns/model_send_test_campaign_request.go deleted file mode 100644 index facd4d89..00000000 --- a/rest/api/v3/lmc_campaigns/model_send_test_campaign_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SendTestCampaignRequest struct for SendTestCampaignRequest -type SendTestCampaignRequest struct { - // The email address that should receive the test campaign. - To string `json:"to"` -} diff --git a/rest/api/v3/lmc_campaigns/model_status.go b/rest/api/v3/lmc_campaigns/model_status.go deleted file mode 100644 index 099841ea..00000000 --- a/rest/api/v3/lmc_campaigns/model_status.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Status the model 'Status' -type Status string - -// List of Status -const ( - STATUS_SCHEDULED Status = "Scheduled" -) diff --git a/rest/api/v3/lmc_campaigns/model_update_a_campaign_request.go b/rest/api/v3/lmc_campaigns/model_update_a_campaign_request.go deleted file mode 100644 index be297454..00000000 --- a/rest/api/v3/lmc_campaigns/model_update_a_campaign_request.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateACampaignRequest struct for UpdateACampaignRequest -type UpdateACampaignRequest struct { - // The title of the campaign. - Title string `json:"title"` - // The subject line for your campaign. - Subject string `json:"subject"` - // The categories you want to tag on this campaign. - Categories []string `json:"categories"` - // The HTML content of this campaign. - HtmlContent string `json:"html_content"` - // The plain content of this campaign. - PlainContent string `json:"plain_content"` -} diff --git a/rest/api/v3/lmc_campaigns/model_update_a_scheduled_campaign_request.go b/rest/api/v3/lmc_campaigns/model_update_a_scheduled_campaign_request.go deleted file mode 100644 index e7a6d7cf..00000000 --- a/rest/api/v3/lmc_campaigns/model_update_a_scheduled_campaign_request.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateAScheduledCampaignRequest struct for UpdateAScheduledCampaignRequest -type UpdateAScheduledCampaignRequest struct { - SendAt int64 `json:"send_at"` -} diff --git a/rest/api/v3/lmc_campaigns/model_update_a_scheduled_campaign_response.go b/rest/api/v3/lmc_campaigns/model_update_a_scheduled_campaign_response.go deleted file mode 100644 index 1f31db5a..00000000 --- a/rest/api/v3/lmc_campaigns/model_update_a_scheduled_campaign_response.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateAScheduledCampaignResponse struct for UpdateAScheduledCampaignResponse -type UpdateAScheduledCampaignResponse struct { - // The campaign ID - Id int32 `json:"id"` - // The unix timestamp to send the campaign. - SendAt int32 `json:"send_at"` - // The status of the schedule. - Status string `json:"status"` -} diff --git a/rest/api/v3/lmc_campaigns/model_view_scheduled_time_of_a_campaign_response.go b/rest/api/v3/lmc_campaigns/model_view_scheduled_time_of_a_campaign_response.go deleted file mode 100644 index e224df4c..00000000 --- a/rest/api/v3/lmc_campaigns/model_view_scheduled_time_of_a_campaign_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Campaigns API -* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ViewScheduledTimeOfACampaignResponse struct for ViewScheduledTimeOfACampaignResponse -type ViewScheduledTimeOfACampaignResponse struct { - SendAt int64 `json:"send_at"` -} diff --git a/rest/api/v3/lmc_contactdb/.openapi-generator b/rest/api/v3/lmc_contactdb/.openapi-generator deleted file mode 100644 index 2833650b..00000000 --- a/rest/api/v3/lmc_contactdb/.openapi-generator +++ /dev/null @@ -1,152 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_add_recipient.go -api_add_recipient_to_contact_db_list.go -api_add_recipients_to_contact_db_list.go -api_create_contact_db_list.go -api_create_custom_field.go -api_create_segment.go -api_delete_contact_db_list.go -api_delete_contact_db_lists.go -api_delete_custom_field.go -api_delete_recipient.go -api_delete_recipient_from_contact_db_list.go -api_delete_recipients.go -api_delete_segment.go -api_get_billable.go -api_get_contact_db_list.go -api_get_custom_field.go -api_get_recipient.go -api_get_recipient_list.go -api_get_segment.go -api_list_contact_db_list.go -api_list_custom_field.go -api_list_recipient.go -api_list_recipient_count.go -api_list_recipient_for_segment.go -api_list_recipients_from_contact_db_list.go -api_list_reserved_field.go -api_list_search_recipient.go -api_list_segment.go -api_list_status.go -api_search_recipient.go -api_service.go -api_update_contact_db_list.go -api_update_recipient.go -api_update_segment.go -docs/AddRecipient.md -docs/AddRecipientRequestInner.md -docs/AddRecipientToContactDbList.md -docs/AddRecipientsToContactDbList.md -docs/AndOr.md -docs/ContactdbCustomField.md -docs/ContactdbCustomFieldId2xx.md -docs/ContactdbCustomFieldIdValue.md -docs/ContactdbList2xx.md -docs/ContactdbRecipient200.md -docs/ContactdbRecipient200RecipientsInner.md -docs/ContactdbRecipientCount200.md -docs/ContactdbRecipientResponse201.md -docs/ContactdbRecipientResponse201ErrorsInner.md -docs/ContactdbSegments.md -docs/ContactdbSegmentsConditions.md -docs/ContactdbSegmentsId200.md -docs/CreateAListRequest.md -docs/CreateContactDbList.md -docs/CreateCustomField.md -docs/CreateCustomFieldRequest.md -docs/CreateSegment.md -docs/DeleteContactDbList.md -docs/DeleteContactDbLists.md -docs/DeleteContacts.md -docs/DeleteCustomField.md -docs/DeleteRecipient.md -docs/DeleteRecipientFromContactDbList.md -docs/DeleteRecipients.md -docs/DeleteSegment.md -docs/ErrorResponse.md -docs/ErrorResponseErrorsInner.md -docs/GetBillable.md -docs/GetContactDbList.md -docs/GetCustomField.md -docs/GetRecipient.md -docs/GetRecipientList.md -docs/GetRecipientList200Response.md -docs/GetSegment.md -docs/ListAllCustomFieldsResponse.md -docs/ListAllListsResponse.md -docs/ListAllSegmentsResponse.md -docs/ListContactDbList.md -docs/ListCustomField.md -docs/ListRecipient.md -docs/ListRecipientCount.md -docs/ListRecipientForSegment.md -docs/ListRecipientsFromContactDbList.md -docs/ListRecipientsFromContactDbList200Response.md -docs/ListRecipientsOnASegmentResponse.md -docs/ListRecipientsResponse.md -docs/ListReservedField.md -docs/ListReservedField200Response.md -docs/ListReservedField200ResponseReservedFieldsInner.md -docs/ListSearchRecipient.md -docs/ListSegment.md -docs/ListStatus.md -docs/ListStatus200Response.md -docs/ListStatus200ResponseStatusInner.md -docs/Operator.md -docs/SearchRecipient.md -docs/SearchRecipient200Response.md -docs/SearchRecipient200ResponseRecipientsInner.md -docs/SearchRecipient200ResponseRecipientsInnerCustomFieldsInner.md -docs/SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue.md -docs/SearchRecipientRequest.md -docs/Type.md -docs/UpdateAListRequest.md -docs/UpdateContactDbList.md -docs/UpdateContactDbList200Response.md -docs/UpdateRecipient.md -docs/UpdateRecipientRequestInner.md -docs/UpdateSegment.md -docs/UpdateSegmentRequest.md -model_add_recipient_request_inner.go -model_and_or.go -model_contactdb_custom_field.go -model_contactdb_custom_field_id2xx.go -model_contactdb_custom_field_id_value.go -model_contactdb_list2xx.go -model_contactdb_recipient200.go -model_contactdb_recipient200_recipients_inner.go -model_contactdb_recipient_count200.go -model_contactdb_recipient_response201.go -model_contactdb_recipient_response201_errors_inner.go -model_contactdb_segments.go -model_contactdb_segments_conditions.go -model_contactdb_segments_id200.go -model_create_a_list_request.go -model_create_custom_field_request.go -model_delete_contacts.go -model_error_response.go -model_error_response_errors_inner.go -model_get_recipient_list_200_response.go -model_list_all_custom_fields_response.go -model_list_all_lists_response.go -model_list_all_segments_response.go -model_list_recipients_from_contact_db_list_200_response.go -model_list_recipients_on_a_segment_response.go -model_list_recipients_response.go -model_list_reserved_field_200_response.go -model_list_reserved_field_200_response_reserved_fields_inner.go -model_list_status_200_response.go -model_list_status_200_response_status_inner.go -model_operator.go -model_search_recipient_200_response.go -model_search_recipient_200_response_recipients_inner.go -model_search_recipient_200_response_recipients_inner_custom_fields_inner.go -model_search_recipient_200_response_recipients_inner_custom_fields_inner_value.go -model_search_recipient_request.go -model_type.go -model_update_a_list_request.go -model_update_contact_db_list_200_response.go -model_update_recipient_request_inner.go -model_update_segment_request.go diff --git a/rest/api/v3/lmc_contactdb/.openapi-generator-ignore b/rest/api/v3/lmc_contactdb/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/lmc_contactdb/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/lmc_contactdb/README.md b/rest/api/v3/lmc_contactdb/README.md deleted file mode 100644 index dec47a73..00000000 --- a/rest/api/v3/lmc_contactdb/README.md +++ /dev/null @@ -1,134 +0,0 @@ -# Go API client for - -The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. - -See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:37.593437+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AddRecipient* | [**AddRecipient**](docs/AddRecipient.md#addrecipient) | **Post** /v3/contactdb/recipients | Add recipients -*AddRecipientToContactDbList* | [**AddRecipientToContactDbList**](docs/AddRecipientToContactDbList.md#addrecipienttocontactdblist) | **Post** /v3/contactdb/lists/{ListId}/recipients/{RecipientId} | Add a Single Recipient to a List -*AddRecipientsToContactDbList* | [**AddRecipientsToContactDbList**](docs/AddRecipientsToContactDbList.md#addrecipientstocontactdblist) | **Post** /v3/contactdb/lists/{ListId}/recipients | Add Multiple Recipients to a List -*CreateContactDbList* | [**CreateContactDbList**](docs/CreateContactDbList.md#createcontactdblist) | **Post** /v3/contactdb/lists | Create a List -*CreateCustomField* | [**CreateCustomField**](docs/CreateCustomField.md#createcustomfield) | **Post** /v3/contactdb/custom_fields | Create a Custom Field -*CreateSegment* | [**CreateSegment**](docs/CreateSegment.md#createsegment) | **Post** /v3/contactdb/segments | Create a Segment -*DeleteContactDbList* | [**DeleteContactDbList**](docs/DeleteContactDbList.md#deletecontactdblist) | **Delete** /v3/contactdb/lists/{ListId} | Delete a List -*DeleteContactDbLists* | [**DeleteContactDbLists**](docs/DeleteContactDbLists.md#deletecontactdblists) | **Delete** /v3/contactdb/lists | Delete Multiple lists -*DeleteCustomField* | [**DeleteCustomField**](docs/DeleteCustomField.md#deletecustomfield) | **Delete** /v3/contactdb/custom_fields/{CustomFieldId} | Delete a Custom Field -*DeleteRecipient* | [**DeleteRecipient**](docs/DeleteRecipient.md#deleterecipient) | **Delete** /v3/contactdb/recipients/{RecipientId} | Delete a Recipient -*DeleteRecipientFromContactDbList* | [**DeleteRecipientFromContactDbList**](docs/DeleteRecipientFromContactDbList.md#deleterecipientfromcontactdblist) | **Delete** /v3/contactdb/lists/{ListId}/recipients/{RecipientId} | Delete a Single Recipient from a Single List -*DeleteRecipients* | [**DeleteRecipients**](docs/DeleteRecipients.md#deleterecipients) | **Delete** /v3/contactdb/recipients | Delete Recipients -*DeleteSegment* | [**DeleteSegment**](docs/DeleteSegment.md#deletesegment) | **Delete** /v3/contactdb/segments/{SegmentId} | Delete a segment -*GetBillable* | [**GetBillable**](docs/GetBillable.md#getbillable) | **Get** /v3/contactdb/recipients/billable_count | Retrieve the count of billable recipients -*GetContactDbList* | [**GetContactDbList**](docs/GetContactDbList.md#getcontactdblist) | **Get** /v3/contactdb/lists/{ListId} | Retrieve a single list -*GetCustomField* | [**GetCustomField**](docs/GetCustomField.md#getcustomfield) | **Get** /v3/contactdb/custom_fields/{CustomFieldId} | Retrieve a Custom Field -*GetRecipient* | [**GetRecipient**](docs/GetRecipient.md#getrecipient) | **Get** /v3/contactdb/recipients/{RecipientId} | Retrieve a single recipient -*GetRecipientList* | [**GetRecipientList**](docs/GetRecipientList.md#getrecipientlist) | **Get** /v3/contactdb/recipients/{RecipientId}/lists | Retrieve the lists that a recipient is on -*GetSegment* | [**GetSegment**](docs/GetSegment.md#getsegment) | **Get** /v3/contactdb/segments/{SegmentId} | Retrieve a segment -*ListContactDbList* | [**ListContactDbList**](docs/ListContactDbList.md#listcontactdblist) | **Get** /v3/contactdb/lists | Retrieve all lists -*ListCustomField* | [**ListCustomField**](docs/ListCustomField.md#listcustomfield) | **Get** /v3/contactdb/custom_fields | Retrieve all custom fields -*ListRecipient* | [**ListRecipient**](docs/ListRecipient.md#listrecipient) | **Get** /v3/contactdb/recipients | Retrieve recipients -*ListRecipientCount* | [**ListRecipientCount**](docs/ListRecipientCount.md#listrecipientcount) | **Get** /v3/contactdb/recipients/count | Retrieve a Count of Recipients -*ListRecipientForSegment* | [**ListRecipientForSegment**](docs/ListRecipientForSegment.md#listrecipientforsegment) | **Get** /v3/contactdb/segments/{SegmentId}/recipients | Retrieve recipients on a segment -*ListRecipientsFromContactDbList* | [**ListRecipientsFromContactDbList**](docs/ListRecipientsFromContactDbList.md#listrecipientsfromcontactdblist) | **Get** /v3/contactdb/lists/{ListId}/recipients | Retrieve all recipients on a List -*ListReservedField* | [**ListReservedField**](docs/ListReservedField.md#listreservedfield) | **Get** /v3/contactdb/reserved_fields | Retrieve reserved fields -*ListSearchRecipient* | [**ListSearchRecipient**](docs/ListSearchRecipient.md#listsearchrecipient) | **Get** /v3/contactdb/recipients/search | Search recipients -*ListSegment* | [**ListSegment**](docs/ListSegment.md#listsegment) | **Get** /v3/contactdb/segments | Retrieve all segments -*ListStatus* | [**ListStatus**](docs/ListStatus.md#liststatus) | **Get** /v3/contactdb/status | Get Recipient Upload Status -*SearchRecipient* | [**SearchRecipient**](docs/SearchRecipient.md#searchrecipient) | **Post** /v3/contactdb/recipients/search | Search recipients -*UpdateContactDbList* | [**UpdateContactDbList**](docs/UpdateContactDbList.md#updatecontactdblist) | **Patch** /v3/contactdb/lists/{ListId} | Update a List -*UpdateRecipient* | [**UpdateRecipient**](docs/UpdateRecipient.md#updaterecipient) | **Patch** /v3/contactdb/recipients | Update Recipient -*UpdateSegment* | [**UpdateSegment**](docs/UpdateSegment.md#updatesegment) | **Patch** /v3/contactdb/segments/{SegmentId} | Update a segment - - -## Documentation For Models - - - [AddRecipientRequestInner](AddRecipientRequestInner.md) - - [AndOr](AndOr.md) - - [ContactdbCustomField](ContactdbCustomField.md) - - [ContactdbCustomFieldId2xx](ContactdbCustomFieldId2xx.md) - - [ContactdbCustomFieldIdValue](ContactdbCustomFieldIdValue.md) - - [ContactdbList2xx](ContactdbList2xx.md) - - [ContactdbRecipient200](ContactdbRecipient200.md) - - [ContactdbRecipient200RecipientsInner](ContactdbRecipient200RecipientsInner.md) - - [ContactdbRecipientCount200](ContactdbRecipientCount200.md) - - [ContactdbRecipientResponse201](ContactdbRecipientResponse201.md) - - [ContactdbRecipientResponse201ErrorsInner](ContactdbRecipientResponse201ErrorsInner.md) - - [ContactdbSegments](ContactdbSegments.md) - - [ContactdbSegmentsConditions](ContactdbSegmentsConditions.md) - - [ContactdbSegmentsId200](ContactdbSegmentsId200.md) - - [CreateAListRequest](CreateAListRequest.md) - - [CreateCustomFieldRequest](CreateCustomFieldRequest.md) - - [DeleteContacts](DeleteContacts.md) - - [ErrorResponse](ErrorResponse.md) - - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) - - [GetRecipientList200Response](GetRecipientList200Response.md) - - [ListAllCustomFieldsResponse](ListAllCustomFieldsResponse.md) - - [ListAllListsResponse](ListAllListsResponse.md) - - [ListAllSegmentsResponse](ListAllSegmentsResponse.md) - - [ListRecipientsFromContactDbList200Response](ListRecipientsFromContactDbList200Response.md) - - [ListRecipientsOnASegmentResponse](ListRecipientsOnASegmentResponse.md) - - [ListRecipientsResponse](ListRecipientsResponse.md) - - [ListReservedField200Response](ListReservedField200Response.md) - - [ListReservedField200ResponseReservedFieldsInner](ListReservedField200ResponseReservedFieldsInner.md) - - [ListStatus200Response](ListStatus200Response.md) - - [ListStatus200ResponseStatusInner](ListStatus200ResponseStatusInner.md) - - [Operator](Operator.md) - - [SearchRecipient200Response](SearchRecipient200Response.md) - - [SearchRecipient200ResponseRecipientsInner](SearchRecipient200ResponseRecipientsInner.md) - - [SearchRecipient200ResponseRecipientsInnerCustomFieldsInner](SearchRecipient200ResponseRecipientsInnerCustomFieldsInner.md) - - [SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue](SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue.md) - - [SearchRecipientRequest](SearchRecipientRequest.md) - - [Type](Type.md) - - [UpdateAListRequest](UpdateAListRequest.md) - - [UpdateContactDbList200Response](UpdateContactDbList200Response.md) - - [UpdateRecipientRequestInner](UpdateRecipientRequestInner.md) - - [UpdateSegmentRequest](UpdateSegmentRequest.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/lmc_contactdb/api_add_recipient.go b/rest/api/v3/lmc_contactdb/api_add_recipient.go deleted file mode 100644 index 9c30bb60..00000000 --- a/rest/api/v3/lmc_contactdb/api_add_recipient.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type AddRecipientParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - AddRecipientRequestInner *[]AddRecipientRequestInner `json:"AddRecipientRequestInner,omitempty"` -} - -func (params *AddRecipientParam) SetOnbehalfof(Onbehalfof string) *AddRecipientParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *AddRecipientParam) SetAddRecipientRequestInner(AddRecipientRequestInner []AddRecipientRequestInner) *AddRecipientParam { - params.AddRecipientRequestInner = &AddRecipientRequestInner - return params -} - -// **This endpoint allows you to add a Marketing Campaigns recipient.** You can add custom field data as a parameter on this endpoint. We have provided an example using some of the default custom fields SendGrid provides. The rate limit is three requests every 2 seconds. You can upload 1000 contacts per request. So the maximum upload rate is 1500 recipients per second. -func (c *ApiService) AddRecipient(params *AddRecipientParam) (interface{}, error) { - path := "/v3/contactdb/recipients" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.AddRecipientRequestInner != nil { - b, err := json.Marshal(*params.AddRecipientRequestInner) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &ContactdbRecipientResponse201{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_add_recipient_to_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_add_recipient_to_contact_db_list.go deleted file mode 100644 index 3c477977..00000000 --- a/rest/api/v3/lmc_contactdb/api_add_recipient_to_contact_db_list.go +++ /dev/null @@ -1,96 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type AddRecipientToContactDbListParam struct { - // The ID of the list that you want to add the recipient to. - ListId *int32 `json:"list_id"` - // The ID of the recipient you are adding to the list. - RecipientId *string `json:"recipient_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *AddRecipientToContactDbListParam) SetListId(ListId int32) *AddRecipientToContactDbListParam { - params.ListId = &ListId - return params -} -func (params *AddRecipientToContactDbListParam) SetRecipientId(RecipientId string) *AddRecipientToContactDbListParam { - params.RecipientId = &RecipientId - return params -} -func (params *AddRecipientToContactDbListParam) SetOnbehalfof(Onbehalfof string) *AddRecipientToContactDbListParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to add a single recipient to a list.** -func (c *ApiService) AddRecipientToContactDbList(params *AddRecipientToContactDbListParam) (interface{}, error) { - path := "/v3/contactdb/lists/{ListId}/recipients/{RecipientId}" - if params != nil && params.ListId != nil { - path = strings.Replace(path, "{"+"ListId"+"}", fmt.Sprint(*params.ListId), -1) - } - if params != nil && params.RecipientId != nil { - path = strings.Replace(path, "{"+"RecipientId"+"}", *params.RecipientId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_add_recipients_to_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_add_recipients_to_contact_db_list.go deleted file mode 100644 index b9093241..00000000 --- a/rest/api/v3/lmc_contactdb/api_add_recipients_to_contact_db_list.go +++ /dev/null @@ -1,102 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type AddRecipientsToContactDbListParam struct { - // The id of the list of recipients you want to retrieve. - ListId *int32 `json:"list_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - RequestBody *[]int32 `json:"request_body,omitempty"` -} - -func (params *AddRecipientsToContactDbListParam) SetListId(ListId int32) *AddRecipientsToContactDbListParam { - params.ListId = &ListId - return params -} -func (params *AddRecipientsToContactDbListParam) SetOnbehalfof(Onbehalfof string) *AddRecipientsToContactDbListParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *AddRecipientsToContactDbListParam) SetRequestBody(RequestBody []int32) *AddRecipientsToContactDbListParam { - params.RequestBody = &RequestBody - return params -} - -// **This endpoint allows you to add multiple recipients to a list.** Adds existing recipients to a list, passing in the recipient IDs to add. Recipient IDs should be passed exactly as they are returned from recipient endpoints. -func (c *ApiService) AddRecipientsToContactDbList(params *AddRecipientsToContactDbListParam) (interface{}, error) { - path := "/v3/contactdb/lists/{ListId}/recipients" - if params != nil && params.ListId != nil { - path = strings.Replace(path, "{"+"ListId"+"}", fmt.Sprint(*params.ListId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.RequestBody != nil { - b, err := json.Marshal(*params.RequestBody) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_create_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_create_contact_db_list.go deleted file mode 100644 index 5616623b..00000000 --- a/rest/api/v3/lmc_contactdb/api_create_contact_db_list.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type CreateContactDbListParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - CreateAListRequest *CreateAListRequest `json:"CreateAListRequest,omitempty"` -} - -func (params *CreateContactDbListParam) SetOnbehalfof(Onbehalfof string) *CreateContactDbListParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *CreateContactDbListParam) SetCreateAListRequest(CreateAListRequest CreateAListRequest) *CreateContactDbListParam { - params.CreateAListRequest = &CreateAListRequest - return params -} - -// **This endpoint allows you to create a list for your recipients.** -func (c *ApiService) CreateContactDbList(params *CreateContactDbListParam) (interface{}, error) { - path := "/v3/contactdb/lists" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.CreateAListRequest != nil { - b, err := json.Marshal(*params.CreateAListRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &ContactdbList2xx{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_create_custom_field.go b/rest/api/v3/lmc_contactdb/api_create_custom_field.go deleted file mode 100644 index 0afd7372..00000000 --- a/rest/api/v3/lmc_contactdb/api_create_custom_field.go +++ /dev/null @@ -1,82 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type CreateCustomFieldParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - CreateCustomFieldRequest *CreateCustomFieldRequest `json:"CreateCustomFieldRequest,omitempty"` -} - -func (params *CreateCustomFieldParam) SetOnbehalfof(Onbehalfof string) *CreateCustomFieldParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *CreateCustomFieldParam) SetCreateCustomFieldRequest(CreateCustomFieldRequest CreateCustomFieldRequest) *CreateCustomFieldParam { - params.CreateCustomFieldRequest = &CreateCustomFieldRequest - return params -} - -// **This endpoint allows you to create a custom field.** **You can create up to 120 custom fields.** -func (c *ApiService) CreateCustomField(params *CreateCustomFieldParam) (interface{}, error) { - path := "/v3/contactdb/custom_fields" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.CreateCustomFieldRequest != nil { - b, err := json.Marshal(*params.CreateCustomFieldRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &ContactdbCustomFieldId2xx{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_create_segment.go b/rest/api/v3/lmc_contactdb/api_create_segment.go deleted file mode 100644 index c5c0786d..00000000 --- a/rest/api/v3/lmc_contactdb/api_create_segment.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type CreateSegmentParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - ContactdbSegments *ContactdbSegments `json:"ContactdbSegments,omitempty"` -} - -func (params *CreateSegmentParam) SetOnbehalfof(Onbehalfof string) *CreateSegmentParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *CreateSegmentParam) SetContactdbSegments(ContactdbSegments ContactdbSegments) *CreateSegmentParam { - params.ContactdbSegments = &ContactdbSegments - return params -} - -// **This endpoint allows you to create a new segment.** Valid operators for create and update depend on the type of the field for which you are searching. **Dates** - \"eq\", \"ne\", \"lt\" (before), \"gt\" (after) - You may use MM/DD/YYYY for day granularity or an epoch for second granularity. - \"empty\", \"not_empty\" - \"is within\" - You may use an [ISO 8601 date format](https://en.wikipedia.org/wiki/ISO_8601) or the # of days. **Text** - \"contains\" - \"eq\" (is/equals - matches the full field) - \"ne\" (is not/not equals - matches any field where the entire field is not the condition value) - \"empty\" - \"not_empty\" **Numbers** - \"eq\" (is/equals) - \"lt\" (is less than) - \"gt\" (is greater than) - \"empty\" - \"not_empty\" **Email Clicks and Opens** - \"eq\" (opened) - \"ne\" (not opened) All field values must be a string. Conditions using \"eq\" or \"ne\" for email clicks and opens should provide a \"field\" of either `clicks.campaign_identifier` or `opens.campaign_identifier`. The condition value should be a string containing the id of a completed campaign. The conditions list may contain multiple conditions, joined by an \"and\" or \"or\" in the \"and_or\" field. The first condition in the conditions list must have an empty \"and_or\", and subsequent conditions must all specify an \"and_or\". -func (c *ApiService) CreateSegment(params *CreateSegmentParam) (interface{}, error) { - path := "/v3/contactdb/segments" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.ContactdbSegments != nil { - b, err := json.Marshal(*params.ContactdbSegments) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ContactdbSegmentsId200{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_delete_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_delete_contact_db_list.go deleted file mode 100644 index 51a8f0f7..00000000 --- a/rest/api/v3/lmc_contactdb/api_delete_contact_db_list.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type DeleteContactDbListParam struct { - // - ListId *int32 `json:"list_id"` - // Adds the ability to delete all contacts on the list in addition to deleting the list. - DeleteContacts *DeleteContacts `json:"delete_contacts,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - Body *interface{} `json:"body,omitempty"` -} - -func (params *DeleteContactDbListParam) SetListId(ListId int32) *DeleteContactDbListParam { - params.ListId = &ListId - return params -} -func (params *DeleteContactDbListParam) SetDeleteContacts(DeleteContacts DeleteContacts) *DeleteContactDbListParam { - params.DeleteContacts = &DeleteContacts - return params -} -func (params *DeleteContactDbListParam) SetOnbehalfof(Onbehalfof string) *DeleteContactDbListParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *DeleteContactDbListParam) SetBody(Body interface{}) *DeleteContactDbListParam { - params.Body = &Body - return params -} - -// **This endpoint allows you to delete a specific recipient list with the given ID.** -func (c *ApiService) DeleteContactDbList(params *DeleteContactDbListParam) (interface{}, error) { - path := "/v3/contactdb/lists/{ListId}" - if params != nil && params.ListId != nil { - path = strings.Replace(path, "{"+"ListId"+"}", fmt.Sprint(*params.ListId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - if params != nil && params.DeleteContacts != nil { - data.Set("delete_contacts", fmt.Sprint(*params.DeleteContacts)) - } - body := []byte{} - if params != nil && params.Body != nil { - b, err := json.Marshal(*params.Body) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_delete_contact_db_lists.go b/rest/api/v3/lmc_contactdb/api_delete_contact_db_lists.go deleted file mode 100644 index 9135bcb7..00000000 --- a/rest/api/v3/lmc_contactdb/api_delete_contact_db_lists.go +++ /dev/null @@ -1,82 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type DeleteContactDbListsParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - RequestBody *[]int32 `json:"request_body,omitempty"` -} - -func (params *DeleteContactDbListsParam) SetOnbehalfof(Onbehalfof string) *DeleteContactDbListsParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *DeleteContactDbListsParam) SetRequestBody(RequestBody []int32) *DeleteContactDbListsParam { - params.RequestBody = &RequestBody - return params -} - -// **This endpoint allows you to delete multiple recipient lists.** -func (c *ApiService) DeleteContactDbLists(params *DeleteContactDbListsParam) (interface{}, error) { - path := "/v3/contactdb/lists" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.RequestBody != nil { - b, err := json.Marshal(*params.RequestBody) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_delete_custom_field.go b/rest/api/v3/lmc_contactdb/api_delete_custom_field.go deleted file mode 100644 index 759d208f..00000000 --- a/rest/api/v3/lmc_contactdb/api_delete_custom_field.go +++ /dev/null @@ -1,95 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type DeleteCustomFieldParam struct { - // The ID of the custom field that you want to retrieve. - CustomFieldId *int32 `json:"custom_field_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *DeleteCustomFieldParam) SetCustomFieldId(CustomFieldId int32) *DeleteCustomFieldParam { - params.CustomFieldId = &CustomFieldId - return params -} -func (params *DeleteCustomFieldParam) SetOnbehalfof(Onbehalfof string) *DeleteCustomFieldParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to delete a custom field by ID.** -func (c *ApiService) DeleteCustomField(params *DeleteCustomFieldParam) (interface{}, error) { - path := "/v3/contactdb/custom_fields/{CustomFieldId}" - if params != nil && params.CustomFieldId != nil { - path = strings.Replace(path, "{"+"CustomFieldId"+"}", fmt.Sprint(*params.CustomFieldId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 202 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_delete_recipient.go b/rest/api/v3/lmc_contactdb/api_delete_recipient.go deleted file mode 100644 index d018f459..00000000 --- a/rest/api/v3/lmc_contactdb/api_delete_recipient.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteRecipientParam struct { - // The ID of the recipient that you want to retrieve. - RecipientId *string `json:"recipient_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *DeleteRecipientParam) SetRecipientId(RecipientId string) *DeleteRecipientParam { - params.RecipientId = &RecipientId - return params -} -func (params *DeleteRecipientParam) SetOnbehalfof(Onbehalfof string) *DeleteRecipientParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to delete a single recipient with the given ID from your contact database.** > Use this to permanently delete your recipients from all of your contact lists and all segments if required by applicable law. -func (c *ApiService) DeleteRecipient(params *DeleteRecipientParam) (interface{}, error) { - path := "/v3/contactdb/recipients/{RecipientId}" - if params != nil && params.RecipientId != nil { - path = strings.Replace(path, "{"+"RecipientId"+"}", *params.RecipientId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_delete_recipient_from_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_delete_recipient_from_contact_db_list.go deleted file mode 100644 index 9a24b5f0..00000000 --- a/rest/api/v3/lmc_contactdb/api_delete_recipient_from_contact_db_list.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type DeleteRecipientFromContactDbListParam struct { - // The ID of the list that you want to add the recipient to. - ListId *int32 `json:"list_id"` - // The ID of the recipient you are adding to the list. - RecipientId *string `json:"recipient_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - Body *interface{} `json:"body,omitempty"` -} - -func (params *DeleteRecipientFromContactDbListParam) SetListId(ListId int32) *DeleteRecipientFromContactDbListParam { - params.ListId = &ListId - return params -} -func (params *DeleteRecipientFromContactDbListParam) SetRecipientId(RecipientId string) *DeleteRecipientFromContactDbListParam { - params.RecipientId = &RecipientId - return params -} -func (params *DeleteRecipientFromContactDbListParam) SetOnbehalfof(Onbehalfof string) *DeleteRecipientFromContactDbListParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *DeleteRecipientFromContactDbListParam) SetBody(Body interface{}) *DeleteRecipientFromContactDbListParam { - params.Body = &Body - return params -} - -// **This endpoint allows you to delete a single recipient from a list.** -func (c *ApiService) DeleteRecipientFromContactDbList(params *DeleteRecipientFromContactDbListParam) (interface{}, error) { - path := "/v3/contactdb/lists/{ListId}/recipients/{RecipientId}" - if params != nil && params.ListId != nil { - path = strings.Replace(path, "{"+"ListId"+"}", fmt.Sprint(*params.ListId), -1) - } - if params != nil && params.RecipientId != nil { - path = strings.Replace(path, "{"+"RecipientId"+"}", *params.RecipientId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.Body != nil { - b, err := json.Marshal(*params.Body) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_delete_recipients.go b/rest/api/v3/lmc_contactdb/api_delete_recipients.go deleted file mode 100644 index aab5d577..00000000 --- a/rest/api/v3/lmc_contactdb/api_delete_recipients.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type DeleteRecipientsParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - RequestBody *[]string `json:"request_body,omitempty"` -} - -func (params *DeleteRecipientsParam) SetOnbehalfof(Onbehalfof string) *DeleteRecipientsParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *DeleteRecipientsParam) SetRequestBody(RequestBody []string) *DeleteRecipientsParam { - params.RequestBody = &RequestBody - return params -} - -// **This endpoint allows you to deletes one or more recipients.** The body of an API call to this endpoint must include an array of recipient IDs of the recipients you want to delete. -func (c *ApiService) DeleteRecipients(params *DeleteRecipientsParam) (interface{}, error) { - path := "/v3/contactdb/recipients" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.RequestBody != nil { - b, err := json.Marshal(*params.RequestBody) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_delete_segment.go b/rest/api/v3/lmc_contactdb/api_delete_segment.go deleted file mode 100644 index 741655e1..00000000 --- a/rest/api/v3/lmc_contactdb/api_delete_segment.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type DeleteSegmentParam struct { - // - SegmentId *int32 `json:"segment_id"` - // True to delete all contacts matching the segment in addition to deleting the segment - DeleteContacts *bool `json:"delete_contacts,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - Body *interface{} `json:"body,omitempty"` -} - -func (params *DeleteSegmentParam) SetSegmentId(SegmentId int32) *DeleteSegmentParam { - params.SegmentId = &SegmentId - return params -} -func (params *DeleteSegmentParam) SetDeleteContacts(DeleteContacts bool) *DeleteSegmentParam { - params.DeleteContacts = &DeleteContacts - return params -} -func (params *DeleteSegmentParam) SetOnbehalfof(Onbehalfof string) *DeleteSegmentParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *DeleteSegmentParam) SetBody(Body interface{}) *DeleteSegmentParam { - params.Body = &Body - return params -} - -// **This endpoint allows you to delete a segment from your recipients database.** You also have the option to delete all the contacts from your Marketing Campaigns recipient database who were in this segment. -func (c *ApiService) DeleteSegment(params *DeleteSegmentParam) (interface{}, error) { - path := "/v3/contactdb/segments/{SegmentId}" - if params != nil && params.SegmentId != nil { - path = strings.Replace(path, "{"+"SegmentId"+"}", fmt.Sprint(*params.SegmentId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - if params != nil && params.DeleteContacts != nil { - data.Set("delete_contacts", fmt.Sprint(*params.DeleteContacts)) - } - body := []byte{} - if params != nil && params.Body != nil { - b, err := json.Marshal(*params.Body) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_get_billable.go b/rest/api/v3/lmc_contactdb/api_get_billable.go deleted file mode 100644 index 67af047f..00000000 --- a/rest/api/v3/lmc_contactdb/api_get_billable.go +++ /dev/null @@ -1,67 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type GetBillableParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetBillableParam) SetOnbehalfof(Onbehalfof string) *GetBillableParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve the number of Marketing Campaigns recipients that you will be billed for.** You are billed for marketing campaigns based on the highest number of recipients you have had in your account at one time. This endpoint will allow you to know the current billable count value. -func (c *ApiService) GetBillable(params *GetBillableParam) (interface{}, error) { - path := "/v3/contactdb/recipients/billable_count" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ContactdbRecipientCount200{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_get_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_get_contact_db_list.go deleted file mode 100644 index 5caec2f1..00000000 --- a/rest/api/v3/lmc_contactdb/api_get_contact_db_list.go +++ /dev/null @@ -1,95 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type GetContactDbListParam struct { - // - ListId *int32 `json:"list_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetContactDbListParam) SetListId(ListId int32) *GetContactDbListParam { - params.ListId = &ListId - return params -} -func (params *GetContactDbListParam) SetOnbehalfof(Onbehalfof string) *GetContactDbListParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a single recipient list.** -func (c *ApiService) GetContactDbList(params *GetContactDbListParam) (interface{}, error) { - path := "/v3/contactdb/lists/{ListId}" - if params != nil && params.ListId != nil { - path = strings.Replace(path, "{"+"ListId"+"}", fmt.Sprint(*params.ListId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ContactdbList2xx{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_get_custom_field.go b/rest/api/v3/lmc_contactdb/api_get_custom_field.go deleted file mode 100644 index de6dc76b..00000000 --- a/rest/api/v3/lmc_contactdb/api_get_custom_field.go +++ /dev/null @@ -1,95 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type GetCustomFieldParam struct { - // The ID of the custom field that you want to retrieve. - CustomFieldId *int32 `json:"custom_field_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetCustomFieldParam) SetCustomFieldId(CustomFieldId int32) *GetCustomFieldParam { - params.CustomFieldId = &CustomFieldId - return params -} -func (params *GetCustomFieldParam) SetOnbehalfof(Onbehalfof string) *GetCustomFieldParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a custom field by ID.** -func (c *ApiService) GetCustomField(params *GetCustomFieldParam) (interface{}, error) { - path := "/v3/contactdb/custom_fields/{CustomFieldId}" - if params != nil && params.CustomFieldId != nil { - path = strings.Replace(path, "{"+"CustomFieldId"+"}", fmt.Sprint(*params.CustomFieldId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ContactdbCustomFieldId2xx{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_get_recipient.go b/rest/api/v3/lmc_contactdb/api_get_recipient.go deleted file mode 100644 index 27ccf5c5..00000000 --- a/rest/api/v3/lmc_contactdb/api_get_recipient.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetRecipientParam struct { - // The ID of the recipient that you want to retrieve. - RecipientId *string `json:"recipient_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetRecipientParam) SetRecipientId(RecipientId string) *GetRecipientParam { - params.RecipientId = &RecipientId - return params -} -func (params *GetRecipientParam) SetOnbehalfof(Onbehalfof string) *GetRecipientParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a single recipient by ID from your contact database.** -func (c *ApiService) GetRecipient(params *GetRecipientParam) (interface{}, error) { - path := "/v3/contactdb/recipients/{RecipientId}" - if params != nil && params.RecipientId != nil { - path = strings.Replace(path, "{"+"RecipientId"+"}", *params.RecipientId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ContactdbRecipient200{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_get_recipient_list.go b/rest/api/v3/lmc_contactdb/api_get_recipient_list.go deleted file mode 100644 index 90f94199..00000000 --- a/rest/api/v3/lmc_contactdb/api_get_recipient_list.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetRecipientListParam struct { - // The ID of the recipient for whom you are retrieving lists. - RecipientId *string `json:"recipient_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetRecipientListParam) SetRecipientId(RecipientId string) *GetRecipientListParam { - params.RecipientId = &RecipientId - return params -} -func (params *GetRecipientListParam) SetOnbehalfof(Onbehalfof string) *GetRecipientListParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve the lists that a given recipient belongs to.** Each recipient can be on many lists. This endpoint gives you all of the lists that any one recipient has been added to. -func (c *ApiService) GetRecipientList(params *GetRecipientListParam) (interface{}, error) { - path := "/v3/contactdb/recipients/{RecipientId}/lists" - if params != nil && params.RecipientId != nil { - path = strings.Replace(path, "{"+"RecipientId"+"}", *params.RecipientId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &GetRecipientList200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_get_segment.go b/rest/api/v3/lmc_contactdb/api_get_segment.go deleted file mode 100644 index a7598d9d..00000000 --- a/rest/api/v3/lmc_contactdb/api_get_segment.go +++ /dev/null @@ -1,95 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type GetSegmentParam struct { - // - SegmentId *int32 `json:"segment_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetSegmentParam) SetSegmentId(SegmentId int32) *GetSegmentParam { - params.SegmentId = &SegmentId - return params -} -func (params *GetSegmentParam) SetOnbehalfof(Onbehalfof string) *GetSegmentParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a single segment with the given ID.** -func (c *ApiService) GetSegment(params *GetSegmentParam) (interface{}, error) { - path := "/v3/contactdb/segments/{SegmentId}" - if params != nil && params.SegmentId != nil { - path = strings.Replace(path, "{"+"SegmentId"+"}", fmt.Sprint(*params.SegmentId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ContactdbSegments{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_list_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_list_contact_db_list.go deleted file mode 100644 index ba280d54..00000000 --- a/rest/api/v3/lmc_contactdb/api_list_contact_db_list.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListContactDbListParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListContactDbListParam) SetOnbehalfof(Onbehalfof string) *ListContactDbListParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve all of your recipient lists. If you don't have any lists, an empty array will be returned.** -func (c *ApiService) ListContactDbList(params *ListContactDbListParam) (interface{}, error) { - path := "/v3/contactdb/lists" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListAllListsResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_list_custom_field.go b/rest/api/v3/lmc_contactdb/api_list_custom_field.go deleted file mode 100644 index 41457f8c..00000000 --- a/rest/api/v3/lmc_contactdb/api_list_custom_field.go +++ /dev/null @@ -1,67 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListCustomFieldParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListCustomFieldParam) SetOnbehalfof(Onbehalfof string) *ListCustomFieldParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve all custom fields.** -func (c *ApiService) ListCustomField(params *ListCustomFieldParam) (interface{}, error) { - path := "/v3/contactdb/custom_fields" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListAllCustomFieldsResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_list_recipient.go b/rest/api/v3/lmc_contactdb/api_list_recipient.go deleted file mode 100644 index 6cfe15d2..00000000 --- a/rest/api/v3/lmc_contactdb/api_list_recipient.go +++ /dev/null @@ -1,95 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListRecipientParam struct { - // Page index of first recipients to return (must be a positive integer) - Page *int32 `json:"page,omitempty"` - // Number of recipients to return at a time (must be a positive integer between 1 and 1000) - PageSize *int32 `json:"page_size,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListRecipientParam) SetPage(Page int32) *ListRecipientParam { - params.Page = &Page - return params -} -func (params *ListRecipientParam) SetPageSize(PageSize int32) *ListRecipientParam { - params.PageSize = &PageSize - return params -} -func (params *ListRecipientParam) SetOnbehalfof(Onbehalfof string) *ListRecipientParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve all of your Marketing Campaigns recipients.** Batch deletion of a page makes it possible to receive an empty page of recipients before reaching the end of the list of recipients. To avoid this issue; iterate over pages until a 404 is retrieved. -func (c *ApiService) ListRecipient(params *ListRecipientParam) (interface{}, error) { - path := "/v3/contactdb/recipients" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Page != nil { - data.Set("page", fmt.Sprint(*params.Page)) - } - if params != nil && params.PageSize != nil { - data.Set("page_size", fmt.Sprint(*params.PageSize)) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListRecipientsResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_list_recipient_count.go b/rest/api/v3/lmc_contactdb/api_list_recipient_count.go deleted file mode 100644 index 8e95f626..00000000 --- a/rest/api/v3/lmc_contactdb/api_list_recipient_count.go +++ /dev/null @@ -1,67 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListRecipientCountParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListRecipientCountParam) SetOnbehalfof(Onbehalfof string) *ListRecipientCountParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve the total number of Marketing Campaigns recipients.** -func (c *ApiService) ListRecipientCount(params *ListRecipientCountParam) (interface{}, error) { - path := "/v3/contactdb/recipients/count" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ContactdbRecipientCount200{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_list_recipient_for_segment.go b/rest/api/v3/lmc_contactdb/api_list_recipient_for_segment.go deleted file mode 100644 index 98350a33..00000000 --- a/rest/api/v3/lmc_contactdb/api_list_recipient_for_segment.go +++ /dev/null @@ -1,114 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type ListRecipientForSegmentParam struct { - // The ID of the segment from which you want to retrieve recipients. - SegmentId *int32 `json:"segment_id"` - // - Page *int32 `json:"page,omitempty"` - // - PageSize *int32 `json:"page_size,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListRecipientForSegmentParam) SetSegmentId(SegmentId int32) *ListRecipientForSegmentParam { - params.SegmentId = &SegmentId - return params -} -func (params *ListRecipientForSegmentParam) SetPage(Page int32) *ListRecipientForSegmentParam { - params.Page = &Page - return params -} -func (params *ListRecipientForSegmentParam) SetPageSize(PageSize int32) *ListRecipientForSegmentParam { - params.PageSize = &PageSize - return params -} -func (params *ListRecipientForSegmentParam) SetOnbehalfof(Onbehalfof string) *ListRecipientForSegmentParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve all of the recipients in a segment with the given ID.** -func (c *ApiService) ListRecipientForSegment(params *ListRecipientForSegmentParam) (interface{}, error) { - path := "/v3/contactdb/segments/{SegmentId}/recipients" - if params != nil && params.SegmentId != nil { - path = strings.Replace(path, "{"+"SegmentId"+"}", fmt.Sprint(*params.SegmentId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Page != nil { - data.Set("page", fmt.Sprint(*params.Page)) - } - if params != nil && params.PageSize != nil { - data.Set("page_size", fmt.Sprint(*params.PageSize)) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListRecipientsOnASegmentResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_list_recipients_from_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_list_recipients_from_contact_db_list.go deleted file mode 100644 index b0154e82..00000000 --- a/rest/api/v3/lmc_contactdb/api_list_recipients_from_contact_db_list.go +++ /dev/null @@ -1,106 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type ListRecipientsFromContactDbListParam struct { - // The id of the list of recipients you want to retrieve. - ListId *int32 `json:"list_id"` - // Page index of first recipient to return (must be a positive integer) - Page *int32 `json:"page,omitempty"` - // Number of recipients to return at a time (must be a positive integer between 1 and 1000) - PageSize *int32 `json:"page_size,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListRecipientsFromContactDbListParam) SetListId(ListId int32) *ListRecipientsFromContactDbListParam { - params.ListId = &ListId - return params -} -func (params *ListRecipientsFromContactDbListParam) SetPage(Page int32) *ListRecipientsFromContactDbListParam { - params.Page = &Page - return params -} -func (params *ListRecipientsFromContactDbListParam) SetPageSize(PageSize int32) *ListRecipientsFromContactDbListParam { - params.PageSize = &PageSize - return params -} -func (params *ListRecipientsFromContactDbListParam) SetOnbehalfof(Onbehalfof string) *ListRecipientsFromContactDbListParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve all recipients on the list with the given ID.** -func (c *ApiService) ListRecipientsFromContactDbList(params *ListRecipientsFromContactDbListParam) (interface{}, error) { - path := "/v3/contactdb/lists/{ListId}/recipients" - if params != nil && params.ListId != nil { - path = strings.Replace(path, "{"+"ListId"+"}", fmt.Sprint(*params.ListId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Page != nil { - data.Set("page", fmt.Sprint(*params.Page)) - } - if params != nil && params.PageSize != nil { - data.Set("page_size", fmt.Sprint(*params.PageSize)) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListRecipientsFromContactDbList200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_list_reserved_field.go b/rest/api/v3/lmc_contactdb/api_list_reserved_field.go deleted file mode 100644 index 542cc371..00000000 --- a/rest/api/v3/lmc_contactdb/api_list_reserved_field.go +++ /dev/null @@ -1,67 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListReservedFieldParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListReservedFieldParam) SetOnbehalfof(Onbehalfof string) *ListReservedFieldParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to list all fields that are reserved and can't be used for custom field names.** -func (c *ApiService) ListReservedField(params *ListReservedFieldParam) (interface{}, error) { - path := "/v3/contactdb/reserved_fields" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListReservedField200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_list_search_recipient.go b/rest/api/v3/lmc_contactdb/api_list_search_recipient.go deleted file mode 100644 index b0f1d9de..00000000 --- a/rest/api/v3/lmc_contactdb/api_list_search_recipient.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListSearchRecipientParam struct { - // - FieldName *string `json:"{field_name},omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListSearchRecipientParam) SetFieldName(FieldName string) *ListSearchRecipientParam { - params.FieldName = &FieldName - return params -} -func (params *ListSearchRecipientParam) SetOnbehalfof(Onbehalfof string) *ListSearchRecipientParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to perform a search on all of your Marketing Campaigns recipients.** field_name: * is a variable that is substituted for your actual custom field name from your recipient. * Text fields must be url-encoded. Date fields are searchable only by unix timestamp (e.g. 2/2/2015 becomes 1422835200) * If field_name is a 'reserved' date field, such as created_at or updated_at, the system will internally convert your epoch time to a date range encompassing the entire day. For example, an epoch time of 1422835600 converts to Mon, 02 Feb 2015 00:06:40 GMT, but internally the system will search from Mon, 02 Feb 2015 00:00:00 GMT through Mon, 02 Feb 2015 23:59:59 GMT. -func (c *ApiService) ListSearchRecipient(params *ListSearchRecipientParam) (interface{}, error) { - path := "/v3/contactdb/recipients/search" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.FieldName != nil { - data.Set("{field_name}", *params.FieldName) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListRecipientsFromContactDbList200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_list_segment.go b/rest/api/v3/lmc_contactdb/api_list_segment.go deleted file mode 100644 index f200060f..00000000 --- a/rest/api/v3/lmc_contactdb/api_list_segment.go +++ /dev/null @@ -1,67 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListSegmentParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListSegmentParam) SetOnbehalfof(Onbehalfof string) *ListSegmentParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve all of your segments.** -func (c *ApiService) ListSegment(params *ListSegmentParam) (interface{}, error) { - path := "/v3/contactdb/segments" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListAllSegmentsResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_list_status.go b/rest/api/v3/lmc_contactdb/api_list_status.go deleted file mode 100644 index 612c9419..00000000 --- a/rest/api/v3/lmc_contactdb/api_list_status.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListStatusParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListStatusParam) SetOnbehalfof(Onbehalfof string) *ListStatusParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to check the upload status of a Marketing Campaigns recipient.** -func (c *ApiService) ListStatus(params *ListStatusParam) (interface{}, error) { - path := "/v3/contactdb/status" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListStatus200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_search_recipient.go b/rest/api/v3/lmc_contactdb/api_search_recipient.go deleted file mode 100644 index 28727db1..00000000 --- a/rest/api/v3/lmc_contactdb/api_search_recipient.go +++ /dev/null @@ -1,65 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type SearchRecipientParam struct { - // - SearchRecipientRequest *SearchRecipientRequest `json:"SearchRecipientRequest,omitempty"` -} - -func (params *SearchRecipientParam) SetSearchRecipientRequest(SearchRecipientRequest SearchRecipientRequest) *SearchRecipientParam { - params.SearchRecipientRequest = &SearchRecipientRequest - return params -} - -// Search using segment conditions without actually creating a segment. Body contains a JSON object with `conditions`, a list of conditions as described below, and an optional `list_id`, which is a valid list ID for a list to limit the search on. Valid operators for create and update depend on the type of the field for which you are searching. - Dates: - `\"eq\"`, `\"ne\"`, `\"lt\"` (before), `\"gt\"` (after) - You may use MM/DD/YYYY for day granularity or an epoch for second granularity. - `\"empty\"`, `\"not_empty\"` - `\"is within\"` - You may use an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date format or the # of days. - Text: `\"contains\"`, `\"eq\"` (is - matches the full field), `\"ne\"` (is not - matches any field where the entire field is not the condition value), `\"empty\"`, `\"not_empty\"` - Numbers: `\"eq\"`, `\"lt\"`, `\"gt\"`, `\"empty\"`, `\"not_empty\"` - Email Clicks and Opens: `\"eq\"` (opened), `\"ne\"` (not opened) Field values must all be a string. Search conditions using `\"eq\"` or `\"ne\"` for email clicks and opens should provide a \"field\" of either `clicks.campaign_identifier` or `opens.campaign_identifier`. The condition value should be a string containing the id of a completed campaign. Search conditions list may contain multiple conditions, joined by an `\"and\"` or `\"or\"` in the `\"and_or\"` field. The first condition in the conditions list must have an empty `\"and_or\"`, and subsequent conditions must all specify an `\"and_or\"`. -func (c *ApiService) SearchRecipient(params *SearchRecipientParam) (interface{}, error) { - path := "/v3/contactdb/recipients/search" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.SearchRecipientRequest != nil { - b, err := json.Marshal(*params.SearchRecipientRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SearchRecipient200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_service.go b/rest/api/v3/lmc_contactdb/api_service.go deleted file mode 100644 index 47aac07a..00000000 --- a/rest/api/v3/lmc_contactdb/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/lmc_contactdb/api_update_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_update_contact_db_list.go deleted file mode 100644 index d75d2327..00000000 --- a/rest/api/v3/lmc_contactdb/api_update_contact_db_list.go +++ /dev/null @@ -1,102 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type UpdateContactDbListParam struct { - // - ListId *int32 `json:"list_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - UpdateAListRequest *UpdateAListRequest `json:"UpdateAListRequest,omitempty"` -} - -func (params *UpdateContactDbListParam) SetListId(ListId int32) *UpdateContactDbListParam { - params.ListId = &ListId - return params -} -func (params *UpdateContactDbListParam) SetOnbehalfof(Onbehalfof string) *UpdateContactDbListParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateContactDbListParam) SetUpdateAListRequest(UpdateAListRequest UpdateAListRequest) *UpdateContactDbListParam { - params.UpdateAListRequest = &UpdateAListRequest - return params -} - -// **This endpoint allows you to update the name of one of your recipient lists.** -func (c *ApiService) UpdateContactDbList(params *UpdateContactDbListParam) (interface{}, error) { - path := "/v3/contactdb/lists/{ListId}" - if params != nil && params.ListId != nil { - path = strings.Replace(path, "{"+"ListId"+"}", fmt.Sprint(*params.ListId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateAListRequest != nil { - b, err := json.Marshal(*params.UpdateAListRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &UpdateContactDbList200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_update_recipient.go b/rest/api/v3/lmc_contactdb/api_update_recipient.go deleted file mode 100644 index 3d69b3be..00000000 --- a/rest/api/v3/lmc_contactdb/api_update_recipient.go +++ /dev/null @@ -1,90 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type UpdateRecipientParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - UpdateRecipientRequestInner *[]UpdateRecipientRequestInner `json:"UpdateRecipientRequestInner,omitempty"` -} - -func (params *UpdateRecipientParam) SetOnbehalfof(Onbehalfof string) *UpdateRecipientParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateRecipientParam) SetUpdateRecipientRequestInner(UpdateRecipientRequestInner []UpdateRecipientRequestInner) *UpdateRecipientParam { - params.UpdateRecipientRequestInner = &UpdateRecipientRequestInner - return params -} - -// **This endpoint allows you to update one or more recipients.** The body of an API call to this endpoint must include an array of one or more recipient objects. It is of note that you can add custom field data as parameters on recipient objects. We have provided an example using some of the default custom fields SendGrid provides. -func (c *ApiService) UpdateRecipient(params *UpdateRecipientParam) (interface{}, error) { - path := "/v3/contactdb/recipients" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateRecipientRequestInner != nil { - b, err := json.Marshal(*params.UpdateRecipientRequestInner) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &ContactdbRecipientResponse201{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/api_update_segment.go b/rest/api/v3/lmc_contactdb/api_update_segment.go deleted file mode 100644 index 7e8c754a..00000000 --- a/rest/api/v3/lmc_contactdb/api_update_segment.go +++ /dev/null @@ -1,102 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type UpdateSegmentParam struct { - // - SegmentId *int32 `json:"segment_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - UpdateSegmentRequest *UpdateSegmentRequest `json:"UpdateSegmentRequest,omitempty"` -} - -func (params *UpdateSegmentParam) SetSegmentId(SegmentId int32) *UpdateSegmentParam { - params.SegmentId = &SegmentId - return params -} -func (params *UpdateSegmentParam) SetOnbehalfof(Onbehalfof string) *UpdateSegmentParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateSegmentParam) SetUpdateSegmentRequest(UpdateSegmentRequest UpdateSegmentRequest) *UpdateSegmentParam { - params.UpdateSegmentRequest = &UpdateSegmentRequest - return params -} - -// **This endpoint allows you to update a segment.** -func (c *ApiService) UpdateSegment(params *UpdateSegmentParam) (interface{}, error) { - path := "/v3/contactdb/segments/{SegmentId}" - if params != nil && params.SegmentId != nil { - path = strings.Replace(path, "{"+"SegmentId"+"}", fmt.Sprint(*params.SegmentId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateSegmentRequest != nil { - b, err := json.Marshal(*params.UpdateSegmentRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ContactdbSegments{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_contactdb/docs/AddRecipient.md b/rest/api/v3/lmc_contactdb/docs/AddRecipient.md deleted file mode 100644 index 9bb1614c..00000000 --- a/rest/api/v3/lmc_contactdb/docs/AddRecipient.md +++ /dev/null @@ -1,49 +0,0 @@ -# AddRecipient - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddRecipient**](AddRecipient.md#AddRecipient) | **Post** /v3/contactdb/recipients | Add recipients - - - -## AddRecipient - -> ContactdbRecipientResponse201 AddRecipient(ctx, optional) - -Add recipients - -**This endpoint allows you to add a Marketing Campaigns recipient.** You can add custom field data as a parameter on this endpoint. We have provided an example using some of the default custom fields SendGrid provides. The rate limit is three requests every 2 seconds. You can upload 1000 contacts per request. So the maximum upload rate is 1500 recipients per second. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a AddRecipientParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**AddRecipientRequestInner** | [**[]AddRecipientRequestInner**](AddRecipientRequestInner.md) | - -### Return type - -[**ContactdbRecipientResponse201**](ContactdbRecipientResponse201.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/AddRecipientRequestInner.md b/rest/api/v3/lmc_contactdb/docs/AddRecipientRequestInner.md deleted file mode 100644 index 3860b0d0..00000000 --- a/rest/api/v3/lmc_contactdb/docs/AddRecipientRequestInner.md +++ /dev/null @@ -1,14 +0,0 @@ -# AddRecipientRequestInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | **string** | The email address of the recipient. | -**FirstName** | **string** | The first name of the recipient. |[optional] -**LastName** | **string** | The last name of the recipient. |[optional] -**Age** | **int32** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/AddRecipientToContactDbList.md b/rest/api/v3/lmc_contactdb/docs/AddRecipientToContactDbList.md deleted file mode 100644 index 1b9788b1..00000000 --- a/rest/api/v3/lmc_contactdb/docs/AddRecipientToContactDbList.md +++ /dev/null @@ -1,53 +0,0 @@ -# AddRecipientToContactDbList - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddRecipientToContactDbList**](AddRecipientToContactDbList.md#AddRecipientToContactDbList) | **Post** /v3/contactdb/lists/{ListId}/recipients/{RecipientId} | Add a Single Recipient to a List - - - -## AddRecipientToContactDbList - -> AddRecipientToContactDbList(ctx, ListIdRecipientIdoptional) - -Add a Single Recipient to a List - -**This endpoint allows you to add a single recipient to a list.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**ListId** | **int32** | The ID of the list that you want to add the recipient to. -**RecipientId** | **string** | The ID of the recipient you are adding to the list. - -### Other Parameters - -Other parameters are passed through a pointer to a AddRecipientToContactDbListParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/AddRecipientsToContactDbList.md b/rest/api/v3/lmc_contactdb/docs/AddRecipientsToContactDbList.md deleted file mode 100644 index ba687bc9..00000000 --- a/rest/api/v3/lmc_contactdb/docs/AddRecipientsToContactDbList.md +++ /dev/null @@ -1,53 +0,0 @@ -# AddRecipientsToContactDbList - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddRecipientsToContactDbList**](AddRecipientsToContactDbList.md#AddRecipientsToContactDbList) | **Post** /v3/contactdb/lists/{ListId}/recipients | Add Multiple Recipients to a List - - - -## AddRecipientsToContactDbList - -> AddRecipientsToContactDbList(ctx, ListIdoptional) - -Add Multiple Recipients to a List - -**This endpoint allows you to add multiple recipients to a list.** Adds existing recipients to a list, passing in the recipient IDs to add. Recipient IDs should be passed exactly as they are returned from recipient endpoints. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**ListId** | **int32** | The id of the list of recipients you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a AddRecipientsToContactDbListParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**RequestBody** | **[]int32** | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/AndOr.md b/rest/api/v3/lmc_contactdb/docs/AndOr.md deleted file mode 100644 index acf7be53..00000000 --- a/rest/api/v3/lmc_contactdb/docs/AndOr.md +++ /dev/null @@ -1,14 +0,0 @@ -# AndOr - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**AND** | string | (value: `"and"`) -**OR** | string | (value: `"or"`) -**EMPTY** | string | (value: `""`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbCustomField.md b/rest/api/v3/lmc_contactdb/docs/ContactdbCustomField.md deleted file mode 100644 index d152b843..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ContactdbCustomField.md +++ /dev/null @@ -1,12 +0,0 @@ -# ContactdbCustomField - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of the field |[optional] -**Type** | [**Type**](Type.md) | The type of the field. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbCustomFieldId2xx.md b/rest/api/v3/lmc_contactdb/docs/ContactdbCustomFieldId2xx.md deleted file mode 100644 index c8223d54..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ContactdbCustomFieldId2xx.md +++ /dev/null @@ -1,13 +0,0 @@ -# ContactdbCustomFieldId2xx - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of the field |[optional] -**Type** | [**Type**](Type.md) | The type of the field. |[optional] -**Id** | **float32** | The ID of the custom field. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbCustomFieldIdValue.md b/rest/api/v3/lmc_contactdb/docs/ContactdbCustomFieldIdValue.md deleted file mode 100644 index 411b325c..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ContactdbCustomFieldIdValue.md +++ /dev/null @@ -1,14 +0,0 @@ -# ContactdbCustomFieldIdValue - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of the field |[optional] -**Type** | [**Type**](Type.md) | The type of the field. |[optional] -**Id** | **float32** | The ID of the custom field. |[optional] -**Value** | **string** | The value of this recipient's custom field |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbList2xx.md b/rest/api/v3/lmc_contactdb/docs/ContactdbList2xx.md deleted file mode 100644 index ce51cebb..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ContactdbList2xx.md +++ /dev/null @@ -1,13 +0,0 @@ -# ContactdbList2xx - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int32** | The reference ID of your list. | -**Name** | **string** | The name of your list. Must be unique against all other list and segment names. | -**RecipientCount** | **int32** | The count of recipients currently in the list. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbRecipient200.md b/rest/api/v3/lmc_contactdb/docs/ContactdbRecipient200.md deleted file mode 100644 index b07a679b..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ContactdbRecipient200.md +++ /dev/null @@ -1,11 +0,0 @@ -# ContactdbRecipient200 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Recipients** | [**[]ContactdbRecipient200RecipientsInner**](ContactdbRecipient200RecipientsInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbRecipient200RecipientsInner.md b/rest/api/v3/lmc_contactdb/docs/ContactdbRecipient200RecipientsInner.md deleted file mode 100644 index 8ec7cf16..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ContactdbRecipient200RecipientsInner.md +++ /dev/null @@ -1,20 +0,0 @@ -# ContactdbRecipient200RecipientsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | The ID of this recipient. |[optional] -**CreatedAt** | **float32** | The time this record was created in your contactdb, in unixtime. |[optional] -**CustomFields** | [**[]ContactdbCustomFieldIdValue**](ContactdbCustomFieldIdValue.md) | The custom fields assigned to this recipient and their values. |[optional] -**Email** | **string** | The email address of this recipient. This is a default custom field that SendGrid provides. | -**FirstName** | **string** | The first name of this recipient. This is a default custom field that SendGrid provides. |[optional] -**LastName** | **string** | The last name of the recipient. |[optional] -**LastClicked** | **float32** | The last time this recipient clicked a link from one of your campaigns, in unixtime. |[optional] -**LastEmailed** | **float32** | The last time this user was emailed by one of your campaigns, in unixtime. |[optional] -**LastOpened** | **float32** | The last time this recipient opened an email from you, in unixtime. |[optional] -**UpdatedAt** | **float32** | The last update date for this recipient's record. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbRecipientCount200.md b/rest/api/v3/lmc_contactdb/docs/ContactdbRecipientCount200.md deleted file mode 100644 index 3a605dbc..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ContactdbRecipientCount200.md +++ /dev/null @@ -1,11 +0,0 @@ -# ContactdbRecipientCount200 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**RecipientCount** | **float32** | The count of recipients. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbRecipientResponse201.md b/rest/api/v3/lmc_contactdb/docs/ContactdbRecipientResponse201.md deleted file mode 100644 index f5b31dc6..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ContactdbRecipientResponse201.md +++ /dev/null @@ -1,16 +0,0 @@ -# ContactdbRecipientResponse201 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ErrorCount** | **float32** | The number of errors found while adding recipients. |[default to 0] -**ErrorIndices** | **[]float32** | The indices of the recipient(s) sent that caused the error. |[optional] [default to []] -**NewCount** | **float32** | The count of new recipients added to the contactdb. |[default to 0] -**PersistedRecipients** | **[]string** | The recipient IDs of the recipients that already existed from this request. |[default to []] -**UpdatedCount** | **float32** | The recipients who were updated from this request. |[default to 0] -**Errors** | [**[]ContactdbRecipientResponse201ErrorsInner**](ContactdbRecipientResponse201ErrorsInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbRecipientResponse201ErrorsInner.md b/rest/api/v3/lmc_contactdb/docs/ContactdbRecipientResponse201ErrorsInner.md deleted file mode 100644 index d7994f83..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ContactdbRecipientResponse201ErrorsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ContactdbRecipientResponse201ErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | |[optional] -**ErrorIndices** | **[]float32** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbSegments.md b/rest/api/v3/lmc_contactdb/docs/ContactdbSegments.md deleted file mode 100644 index c9573dfd..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ContactdbSegments.md +++ /dev/null @@ -1,14 +0,0 @@ -# ContactdbSegments - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of this segment. | -**ListId** | **int32** | The list id from which to make this segment. Not including this ID will mean your segment is created from the main contactdb rather than a list. |[optional] -**Conditions** | [**[]ContactdbSegmentsConditions**](ContactdbSegmentsConditions.md) | The conditions for a recipient to be included in this segment. | -**RecipientCount** | **float32** | The count of recipients in this list. This is not included on creation of segments. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbSegmentsConditions.md b/rest/api/v3/lmc_contactdb/docs/ContactdbSegmentsConditions.md deleted file mode 100644 index 0cac8eb2..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ContactdbSegmentsConditions.md +++ /dev/null @@ -1,14 +0,0 @@ -# ContactdbSegmentsConditions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Field** | **string** | | -**Value** | **string** | | -**Operator** | [**Operator**](Operator.md) | | -**AndOr** | [**AndOr**](AndOr.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbSegmentsId200.md b/rest/api/v3/lmc_contactdb/docs/ContactdbSegmentsId200.md deleted file mode 100644 index 8e94dfe6..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ContactdbSegmentsId200.md +++ /dev/null @@ -1,15 +0,0 @@ -# ContactdbSegmentsId200 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **float32** | The ID of the segment. | -**Name** | **string** | The name of this segment. | -**ListId** | **int32** | The list id from which to make this segment. Not including this ID will mean your segment is created from the main contactdb rather than a list. |[optional] -**Conditions** | [**[]ContactdbSegmentsConditions**](ContactdbSegmentsConditions.md) | The conditions for a recipient to be included in this segment. | -**RecipientCount** | **float32** | The count of recipients in this list. This is not included on creation of segments. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/CreateAListRequest.md b/rest/api/v3/lmc_contactdb/docs/CreateAListRequest.md deleted file mode 100644 index 0657b896..00000000 --- a/rest/api/v3/lmc_contactdb/docs/CreateAListRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateAListRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/CreateContactDbList.md b/rest/api/v3/lmc_contactdb/docs/CreateContactDbList.md deleted file mode 100644 index e513375e..00000000 --- a/rest/api/v3/lmc_contactdb/docs/CreateContactDbList.md +++ /dev/null @@ -1,49 +0,0 @@ -# CreateContactDbList - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateContactDbList**](CreateContactDbList.md#CreateContactDbList) | **Post** /v3/contactdb/lists | Create a List - - - -## CreateContactDbList - -> ContactdbList2xx CreateContactDbList(ctx, optional) - -Create a List - -**This endpoint allows you to create a list for your recipients.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateContactDbListParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**CreateAListRequest** | [**CreateAListRequest**](CreateAListRequest.md) | - -### Return type - -[**ContactdbList2xx**](ContactdbList2xx.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/CreateCustomField.md b/rest/api/v3/lmc_contactdb/docs/CreateCustomField.md deleted file mode 100644 index 6e9ca61e..00000000 --- a/rest/api/v3/lmc_contactdb/docs/CreateCustomField.md +++ /dev/null @@ -1,49 +0,0 @@ -# CreateCustomField - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateCustomField**](CreateCustomField.md#CreateCustomField) | **Post** /v3/contactdb/custom_fields | Create a Custom Field - - - -## CreateCustomField - -> ContactdbCustomFieldId2xx CreateCustomField(ctx, optional) - -Create a Custom Field - -**This endpoint allows you to create a custom field.** **You can create up to 120 custom fields.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateCustomFieldParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**CreateCustomFieldRequest** | [**CreateCustomFieldRequest**](CreateCustomFieldRequest.md) | - -### Return type - -[**ContactdbCustomFieldId2xx**](ContactdbCustomFieldId2xx.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/CreateCustomFieldRequest.md b/rest/api/v3/lmc_contactdb/docs/CreateCustomFieldRequest.md deleted file mode 100644 index 7254d6af..00000000 --- a/rest/api/v3/lmc_contactdb/docs/CreateCustomFieldRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateCustomFieldRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | |[optional] -**Type** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/CreateSegment.md b/rest/api/v3/lmc_contactdb/docs/CreateSegment.md deleted file mode 100644 index 4019fb85..00000000 --- a/rest/api/v3/lmc_contactdb/docs/CreateSegment.md +++ /dev/null @@ -1,49 +0,0 @@ -# CreateSegment - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateSegment**](CreateSegment.md#CreateSegment) | **Post** /v3/contactdb/segments | Create a Segment - - - -## CreateSegment - -> ContactdbSegmentsId200 CreateSegment(ctx, optional) - -Create a Segment - -**This endpoint allows you to create a new segment.** Valid operators for create and update depend on the type of the field for which you are searching. **Dates** - \"eq\", \"ne\", \"lt\" (before), \"gt\" (after) - You may use MM/DD/YYYY for day granularity or an epoch for second granularity. - \"empty\", \"not_empty\" - \"is within\" - You may use an [ISO 8601 date format](https://en.wikipedia.org/wiki/ISO_8601) or the # of days. **Text** - \"contains\" - \"eq\" (is/equals - matches the full field) - \"ne\" (is not/not equals - matches any field where the entire field is not the condition value) - \"empty\" - \"not_empty\" **Numbers** - \"eq\" (is/equals) - \"lt\" (is less than) - \"gt\" (is greater than) - \"empty\" - \"not_empty\" **Email Clicks and Opens** - \"eq\" (opened) - \"ne\" (not opened) All field values must be a string. Conditions using \"eq\" or \"ne\" for email clicks and opens should provide a \"field\" of either `clicks.campaign_identifier` or `opens.campaign_identifier`. The condition value should be a string containing the id of a completed campaign. The conditions list may contain multiple conditions, joined by an \"and\" or \"or\" in the \"and_or\" field. The first condition in the conditions list must have an empty \"and_or\", and subsequent conditions must all specify an \"and_or\". - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateSegmentParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**ContactdbSegments** | [**ContactdbSegments**](ContactdbSegments.md) | - -### Return type - -[**ContactdbSegmentsId200**](ContactdbSegmentsId200.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/DeleteContactDbList.md b/rest/api/v3/lmc_contactdb/docs/DeleteContactDbList.md deleted file mode 100644 index dfe3bbe6..00000000 --- a/rest/api/v3/lmc_contactdb/docs/DeleteContactDbList.md +++ /dev/null @@ -1,54 +0,0 @@ -# DeleteContactDbList - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteContactDbList**](DeleteContactDbList.md#DeleteContactDbList) | **Delete** /v3/contactdb/lists/{ListId} | Delete a List - - - -## DeleteContactDbList - -> DeleteContactDbList(ctx, ListIdoptional) - -Delete a List - -**This endpoint allows you to delete a specific recipient list with the given ID.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**ListId** | **int32** | - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteContactDbListParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**DeleteContacts** | [**DeleteContacts**](DeleteContactsDeleteContacts.md) | Adds the ability to delete all contacts on the list in addition to deleting the list. -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**Body** | **interface{}** | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/DeleteContactDbLists.md b/rest/api/v3/lmc_contactdb/docs/DeleteContactDbLists.md deleted file mode 100644 index 4acbb584..00000000 --- a/rest/api/v3/lmc_contactdb/docs/DeleteContactDbLists.md +++ /dev/null @@ -1,49 +0,0 @@ -# DeleteContactDbLists - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteContactDbLists**](DeleteContactDbLists.md#DeleteContactDbLists) | **Delete** /v3/contactdb/lists | Delete Multiple lists - - - -## DeleteContactDbLists - -> DeleteContactDbLists(ctx, optional) - -Delete Multiple lists - -**This endpoint allows you to delete multiple recipient lists.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteContactDbListsParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**RequestBody** | **[]int32** | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/DeleteContacts.md b/rest/api/v3/lmc_contactdb/docs/DeleteContacts.md deleted file mode 100644 index 46341479..00000000 --- a/rest/api/v3/lmc_contactdb/docs/DeleteContacts.md +++ /dev/null @@ -1,13 +0,0 @@ -# DeleteContacts - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**TRUE** | bool | (value: `true`) -**FALSE** | bool | (value: `false`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/DeleteCustomField.md b/rest/api/v3/lmc_contactdb/docs/DeleteCustomField.md deleted file mode 100644 index 7e69ff8f..00000000 --- a/rest/api/v3/lmc_contactdb/docs/DeleteCustomField.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeleteCustomField - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteCustomField**](DeleteCustomField.md#DeleteCustomField) | **Delete** /v3/contactdb/custom_fields/{CustomFieldId} | Delete a Custom Field - - - -## DeleteCustomField - -> ErrorResponse DeleteCustomField(ctx, CustomFieldIdoptional) - -Delete a Custom Field - -**This endpoint allows you to delete a custom field by ID.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**CustomFieldId** | **int32** | The ID of the custom field that you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteCustomFieldParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ErrorResponse**](ErrorResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/DeleteRecipient.md b/rest/api/v3/lmc_contactdb/docs/DeleteRecipient.md deleted file mode 100644 index 58d9ecb7..00000000 --- a/rest/api/v3/lmc_contactdb/docs/DeleteRecipient.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeleteRecipient - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteRecipient**](DeleteRecipient.md#DeleteRecipient) | **Delete** /v3/contactdb/recipients/{RecipientId} | Delete a Recipient - - - -## DeleteRecipient - -> map[string]interface{} DeleteRecipient(ctx, RecipientIdoptional) - -Delete a Recipient - -**This endpoint allows you to delete a single recipient with the given ID from your contact database.** > Use this to permanently delete your recipients from all of your contact lists and all segments if required by applicable law. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**RecipientId** | **string** | The ID of the recipient that you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteRecipientParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/DeleteRecipientFromContactDbList.md b/rest/api/v3/lmc_contactdb/docs/DeleteRecipientFromContactDbList.md deleted file mode 100644 index 236c6d0d..00000000 --- a/rest/api/v3/lmc_contactdb/docs/DeleteRecipientFromContactDbList.md +++ /dev/null @@ -1,54 +0,0 @@ -# DeleteRecipientFromContactDbList - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteRecipientFromContactDbList**](DeleteRecipientFromContactDbList.md#DeleteRecipientFromContactDbList) | **Delete** /v3/contactdb/lists/{ListId}/recipients/{RecipientId} | Delete a Single Recipient from a Single List - - - -## DeleteRecipientFromContactDbList - -> DeleteRecipientFromContactDbList(ctx, ListIdRecipientIdoptional) - -Delete a Single Recipient from a Single List - -**This endpoint allows you to delete a single recipient from a list.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**ListId** | **int32** | The ID of the list that you want to add the recipient to. -**RecipientId** | **string** | The ID of the recipient you are adding to the list. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteRecipientFromContactDbListParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**Body** | **interface{}** | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/DeleteRecipients.md b/rest/api/v3/lmc_contactdb/docs/DeleteRecipients.md deleted file mode 100644 index 69fe918f..00000000 --- a/rest/api/v3/lmc_contactdb/docs/DeleteRecipients.md +++ /dev/null @@ -1,49 +0,0 @@ -# DeleteRecipients - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteRecipients**](DeleteRecipients.md#DeleteRecipients) | **Delete** /v3/contactdb/recipients | Delete Recipients - - - -## DeleteRecipients - -> map[string]interface{} DeleteRecipients(ctx, optional) - -Delete Recipients - -**This endpoint allows you to deletes one or more recipients.** The body of an API call to this endpoint must include an array of recipient IDs of the recipients you want to delete. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteRecipientsParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**RequestBody** | **[]string** | - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/DeleteSegment.md b/rest/api/v3/lmc_contactdb/docs/DeleteSegment.md deleted file mode 100644 index 8bf76595..00000000 --- a/rest/api/v3/lmc_contactdb/docs/DeleteSegment.md +++ /dev/null @@ -1,54 +0,0 @@ -# DeleteSegment - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteSegment**](DeleteSegment.md#DeleteSegment) | **Delete** /v3/contactdb/segments/{SegmentId} | Delete a segment - - - -## DeleteSegment - -> DeleteSegment(ctx, SegmentIdoptional) - -Delete a segment - -**This endpoint allows you to delete a segment from your recipients database.** You also have the option to delete all the contacts from your Marketing Campaigns recipient database who were in this segment. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**SegmentId** | **int32** | - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteSegmentParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**DeleteContacts** | **bool** | True to delete all contacts matching the segment in addition to deleting the segment -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**Body** | **interface{}** | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/ErrorResponse.md b/rest/api/v3/lmc_contactdb/docs/ErrorResponse.md deleted file mode 100644 index ec2d41f6..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ErrorResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ErrorResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] -**Id** | **string** | When applicable, this property value will be an error ID. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/ErrorResponseErrorsInner.md b/rest/api/v3/lmc_contactdb/docs/ErrorResponseErrorsInner.md deleted file mode 100644 index 5449c685..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ErrorResponseErrorsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ErrorResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | An error message. |[optional] -**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] -**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/GetBillable.md b/rest/api/v3/lmc_contactdb/docs/GetBillable.md deleted file mode 100644 index ec9018ef..00000000 --- a/rest/api/v3/lmc_contactdb/docs/GetBillable.md +++ /dev/null @@ -1,48 +0,0 @@ -# GetBillable - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetBillable**](GetBillable.md#GetBillable) | **Get** /v3/contactdb/recipients/billable_count | Retrieve the count of billable recipients - - - -## GetBillable - -> ContactdbRecipientCount200 GetBillable(ctx, optional) - -Retrieve the count of billable recipients - -**This endpoint allows you to retrieve the number of Marketing Campaigns recipients that you will be billed for.** You are billed for marketing campaigns based on the highest number of recipients you have had in your account at one time. This endpoint will allow you to know the current billable count value. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a GetBillableParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ContactdbRecipientCount200**](ContactdbRecipientCount200.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/GetContactDbList.md b/rest/api/v3/lmc_contactdb/docs/GetContactDbList.md deleted file mode 100644 index c7814353..00000000 --- a/rest/api/v3/lmc_contactdb/docs/GetContactDbList.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetContactDbList - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetContactDbList**](GetContactDbList.md#GetContactDbList) | **Get** /v3/contactdb/lists/{ListId} | Retrieve a single list - - - -## GetContactDbList - -> ContactdbList2xx GetContactDbList(ctx, ListIdoptional) - -Retrieve a single list - -**This endpoint allows you to retrieve a single recipient list.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**ListId** | **int32** | - -### Other Parameters - -Other parameters are passed through a pointer to a GetContactDbListParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ContactdbList2xx**](ContactdbList2xx.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/GetCustomField.md b/rest/api/v3/lmc_contactdb/docs/GetCustomField.md deleted file mode 100644 index 9f0bd912..00000000 --- a/rest/api/v3/lmc_contactdb/docs/GetCustomField.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetCustomField - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetCustomField**](GetCustomField.md#GetCustomField) | **Get** /v3/contactdb/custom_fields/{CustomFieldId} | Retrieve a Custom Field - - - -## GetCustomField - -> ContactdbCustomFieldId2xx GetCustomField(ctx, CustomFieldIdoptional) - -Retrieve a Custom Field - -**This endpoint allows you to retrieve a custom field by ID.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**CustomFieldId** | **int32** | The ID of the custom field that you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a GetCustomFieldParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ContactdbCustomFieldId2xx**](ContactdbCustomFieldId2xx.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/GetRecipient.md b/rest/api/v3/lmc_contactdb/docs/GetRecipient.md deleted file mode 100644 index e4908f98..00000000 --- a/rest/api/v3/lmc_contactdb/docs/GetRecipient.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetRecipient - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetRecipient**](GetRecipient.md#GetRecipient) | **Get** /v3/contactdb/recipients/{RecipientId} | Retrieve a single recipient - - - -## GetRecipient - -> ContactdbRecipient200 GetRecipient(ctx, RecipientIdoptional) - -Retrieve a single recipient - -**This endpoint allows you to retrieve a single recipient by ID from your contact database.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**RecipientId** | **string** | The ID of the recipient that you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a GetRecipientParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ContactdbRecipient200**](ContactdbRecipient200.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/GetRecipientList.md b/rest/api/v3/lmc_contactdb/docs/GetRecipientList.md deleted file mode 100644 index 23c85802..00000000 --- a/rest/api/v3/lmc_contactdb/docs/GetRecipientList.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetRecipientList - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetRecipientList**](GetRecipientList.md#GetRecipientList) | **Get** /v3/contactdb/recipients/{RecipientId}/lists | Retrieve the lists that a recipient is on - - - -## GetRecipientList - -> GetRecipientList200Response GetRecipientList(ctx, RecipientIdoptional) - -Retrieve the lists that a recipient is on - -**This endpoint allows you to retrieve the lists that a given recipient belongs to.** Each recipient can be on many lists. This endpoint gives you all of the lists that any one recipient has been added to. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**RecipientId** | **string** | The ID of the recipient for whom you are retrieving lists. - -### Other Parameters - -Other parameters are passed through a pointer to a GetRecipientListParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**GetRecipientList200Response**](GetRecipientList200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/GetRecipientList200Response.md b/rest/api/v3/lmc_contactdb/docs/GetRecipientList200Response.md deleted file mode 100644 index ff8b2268..00000000 --- a/rest/api/v3/lmc_contactdb/docs/GetRecipientList200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetRecipientList200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Lists** | [**[]ContactdbList2xx**](ContactdbList2xx.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/GetSegment.md b/rest/api/v3/lmc_contactdb/docs/GetSegment.md deleted file mode 100644 index c6d62133..00000000 --- a/rest/api/v3/lmc_contactdb/docs/GetSegment.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetSegment - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetSegment**](GetSegment.md#GetSegment) | **Get** /v3/contactdb/segments/{SegmentId} | Retrieve a segment - - - -## GetSegment - -> ContactdbSegments GetSegment(ctx, SegmentIdoptional) - -Retrieve a segment - -**This endpoint allows you to retrieve a single segment with the given ID.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**SegmentId** | **int32** | - -### Other Parameters - -Other parameters are passed through a pointer to a GetSegmentParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ContactdbSegments**](ContactdbSegments.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/ListAllCustomFieldsResponse.md b/rest/api/v3/lmc_contactdb/docs/ListAllCustomFieldsResponse.md deleted file mode 100644 index 58fabba7..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ListAllCustomFieldsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListAllCustomFieldsResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CustomFields** | [**[]ContactdbCustomFieldId2xx**](ContactdbCustomFieldId2xx.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/ListAllListsResponse.md b/rest/api/v3/lmc_contactdb/docs/ListAllListsResponse.md deleted file mode 100644 index c94eff0b..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ListAllListsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListAllListsResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Lists** | [**[]ContactdbList2xx**](ContactdbList2xx.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/ListAllSegmentsResponse.md b/rest/api/v3/lmc_contactdb/docs/ListAllSegmentsResponse.md deleted file mode 100644 index 1d8fc71c..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ListAllSegmentsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListAllSegmentsResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Segments** | [**[]ContactdbSegments**](ContactdbSegments.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/ListContactDbList.md b/rest/api/v3/lmc_contactdb/docs/ListContactDbList.md deleted file mode 100644 index d0a72af7..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ListContactDbList.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListContactDbList - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListContactDbList**](ListContactDbList.md#ListContactDbList) | **Get** /v3/contactdb/lists | Retrieve all lists - - - -## ListContactDbList - -> ListAllListsResponse ListContactDbList(ctx, optional) - -Retrieve all lists - -**This endpoint allows you to retrieve all of your recipient lists. If you don't have any lists, an empty array will be returned.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListContactDbListParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListAllListsResponse**](ListAllListsResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/ListCustomField.md b/rest/api/v3/lmc_contactdb/docs/ListCustomField.md deleted file mode 100644 index d6450a9d..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ListCustomField.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListCustomField - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListCustomField**](ListCustomField.md#ListCustomField) | **Get** /v3/contactdb/custom_fields | Retrieve all custom fields - - - -## ListCustomField - -> ListAllCustomFieldsResponse ListCustomField(ctx, optional) - -Retrieve all custom fields - -**This endpoint allows you to retrieve all custom fields.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListCustomFieldParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListAllCustomFieldsResponse**](ListAllCustomFieldsResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/ListRecipient.md b/rest/api/v3/lmc_contactdb/docs/ListRecipient.md deleted file mode 100644 index 614b17ca..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ListRecipient.md +++ /dev/null @@ -1,50 +0,0 @@ -# ListRecipient - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListRecipient**](ListRecipient.md#ListRecipient) | **Get** /v3/contactdb/recipients | Retrieve recipients - - - -## ListRecipient - -> ListRecipientsResponse ListRecipient(ctx, optional) - -Retrieve recipients - -**This endpoint allows you to retrieve all of your Marketing Campaigns recipients.** Batch deletion of a page makes it possible to receive an empty page of recipients before reaching the end of the list of recipients. To avoid this issue; iterate over pages until a 404 is retrieved. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListRecipientParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Page** | **int32** | Page index of first recipients to return (must be a positive integer) -**PageSize** | **int32** | Number of recipients to return at a time (must be a positive integer between 1 and 1000) -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListRecipientsResponse**](ListRecipientsResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/ListRecipientCount.md b/rest/api/v3/lmc_contactdb/docs/ListRecipientCount.md deleted file mode 100644 index 32ab38da..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ListRecipientCount.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListRecipientCount - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListRecipientCount**](ListRecipientCount.md#ListRecipientCount) | **Get** /v3/contactdb/recipients/count | Retrieve a Count of Recipients - - - -## ListRecipientCount - -> ContactdbRecipientCount200 ListRecipientCount(ctx, optional) - -Retrieve a Count of Recipients - -**This endpoint allows you to retrieve the total number of Marketing Campaigns recipients.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListRecipientCountParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ContactdbRecipientCount200**](ContactdbRecipientCount200.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/ListRecipientForSegment.md b/rest/api/v3/lmc_contactdb/docs/ListRecipientForSegment.md deleted file mode 100644 index e1484761..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ListRecipientForSegment.md +++ /dev/null @@ -1,54 +0,0 @@ -# ListRecipientForSegment - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListRecipientForSegment**](ListRecipientForSegment.md#ListRecipientForSegment) | **Get** /v3/contactdb/segments/{SegmentId}/recipients | Retrieve recipients on a segment - - - -## ListRecipientForSegment - -> ListRecipientsOnASegmentResponse ListRecipientForSegment(ctx, SegmentIdoptional) - -Retrieve recipients on a segment - -**This endpoint allows you to retrieve all of the recipients in a segment with the given ID.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**SegmentId** | **int32** | The ID of the segment from which you want to retrieve recipients. - -### Other Parameters - -Other parameters are passed through a pointer to a ListRecipientForSegmentParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Page** | **int32** | -**PageSize** | **int32** | -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListRecipientsOnASegmentResponse**](ListRecipientsOnASegmentResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/ListRecipientsFromContactDbList.md b/rest/api/v3/lmc_contactdb/docs/ListRecipientsFromContactDbList.md deleted file mode 100644 index a0670961..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ListRecipientsFromContactDbList.md +++ /dev/null @@ -1,54 +0,0 @@ -# ListRecipientsFromContactDbList - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListRecipientsFromContactDbList**](ListRecipientsFromContactDbList.md#ListRecipientsFromContactDbList) | **Get** /v3/contactdb/lists/{ListId}/recipients | Retrieve all recipients on a List - - - -## ListRecipientsFromContactDbList - -> ListRecipientsFromContactDbList200Response ListRecipientsFromContactDbList(ctx, ListIdoptional) - -Retrieve all recipients on a List - -**This endpoint allows you to retrieve all recipients on the list with the given ID.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**ListId** | **int32** | The id of the list of recipients you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a ListRecipientsFromContactDbListParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Page** | **int32** | Page index of first recipient to return (must be a positive integer) -**PageSize** | **int32** | Number of recipients to return at a time (must be a positive integer between 1 and 1000) -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListRecipientsFromContactDbList200Response**](ListRecipientsFromContactDbList200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/ListRecipientsFromContactDbList200Response.md b/rest/api/v3/lmc_contactdb/docs/ListRecipientsFromContactDbList200Response.md deleted file mode 100644 index 2b06300b..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ListRecipientsFromContactDbList200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListRecipientsFromContactDbList200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Recipients** | [**[]ContactdbRecipient200**](ContactdbRecipient200.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/ListRecipientsOnASegmentResponse.md b/rest/api/v3/lmc_contactdb/docs/ListRecipientsOnASegmentResponse.md deleted file mode 100644 index cc781fe7..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ListRecipientsOnASegmentResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListRecipientsOnASegmentResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Recipients** | [**[]ContactdbRecipient200**](ContactdbRecipient200.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/ListRecipientsResponse.md b/rest/api/v3/lmc_contactdb/docs/ListRecipientsResponse.md deleted file mode 100644 index 9b46f996..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ListRecipientsResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListRecipientsResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Recipients** | **[]map[string]interface{}** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/ListReservedField.md b/rest/api/v3/lmc_contactdb/docs/ListReservedField.md deleted file mode 100644 index 18387270..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ListReservedField.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListReservedField - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListReservedField**](ListReservedField.md#ListReservedField) | **Get** /v3/contactdb/reserved_fields | Retrieve reserved fields - - - -## ListReservedField - -> ListReservedField200Response ListReservedField(ctx, optional) - -Retrieve reserved fields - -**This endpoint allows you to list all fields that are reserved and can't be used for custom field names.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListReservedFieldParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListReservedField200Response**](ListReservedField200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/ListReservedField200Response.md b/rest/api/v3/lmc_contactdb/docs/ListReservedField200Response.md deleted file mode 100644 index 5cad5ed8..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ListReservedField200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListReservedField200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ReservedFields** | [**[]ListReservedField200ResponseReservedFieldsInner**](ListReservedField200ResponseReservedFieldsInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/ListReservedField200ResponseReservedFieldsInner.md b/rest/api/v3/lmc_contactdb/docs/ListReservedField200ResponseReservedFieldsInner.md deleted file mode 100644 index 01d7b2cd..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ListReservedField200ResponseReservedFieldsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListReservedField200ResponseReservedFieldsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | |[optional] -**Type** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/ListSearchRecipient.md b/rest/api/v3/lmc_contactdb/docs/ListSearchRecipient.md deleted file mode 100644 index 1ff79ab8..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ListSearchRecipient.md +++ /dev/null @@ -1,49 +0,0 @@ -# ListSearchRecipient - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListSearchRecipient**](ListSearchRecipient.md#ListSearchRecipient) | **Get** /v3/contactdb/recipients/search | Search recipients - - - -## ListSearchRecipient - -> ListRecipientsFromContactDbList200Response ListSearchRecipient(ctx, optional) - -Search recipients - -**This endpoint allows you to perform a search on all of your Marketing Campaigns recipients.** field_name: * is a variable that is substituted for your actual custom field name from your recipient. * Text fields must be url-encoded. Date fields are searchable only by unix timestamp (e.g. 2/2/2015 becomes 1422835200) * If field_name is a 'reserved' date field, such as created_at or updated_at, the system will internally convert your epoch time to a date range encompassing the entire day. For example, an epoch time of 1422835600 converts to Mon, 02 Feb 2015 00:06:40 GMT, but internally the system will search from Mon, 02 Feb 2015 00:00:00 GMT through Mon, 02 Feb 2015 23:59:59 GMT. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListSearchRecipientParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**FieldName** | **string** | -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListRecipientsFromContactDbList200Response**](ListRecipientsFromContactDbList200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/ListSegment.md b/rest/api/v3/lmc_contactdb/docs/ListSegment.md deleted file mode 100644 index d4f37a4f..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ListSegment.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListSegment - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListSegment**](ListSegment.md#ListSegment) | **Get** /v3/contactdb/segments | Retrieve all segments - - - -## ListSegment - -> ListAllSegmentsResponse ListSegment(ctx, optional) - -Retrieve all segments - -**This endpoint allows you to retrieve all of your segments.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListSegmentParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListAllSegmentsResponse**](ListAllSegmentsResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/ListStatus.md b/rest/api/v3/lmc_contactdb/docs/ListStatus.md deleted file mode 100644 index 99c3cd47..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ListStatus.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListStatus - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListStatus**](ListStatus.md#ListStatus) | **Get** /v3/contactdb/status | Get Recipient Upload Status - - - -## ListStatus - -> ListStatus200Response ListStatus(ctx, optional) - -Get Recipient Upload Status - -**This endpoint allows you to check the upload status of a Marketing Campaigns recipient.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListStatusParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListStatus200Response**](ListStatus200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/ListStatus200Response.md b/rest/api/v3/lmc_contactdb/docs/ListStatus200Response.md deleted file mode 100644 index 942a9d91..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ListStatus200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListStatus200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Status** | [**[]ListStatus200ResponseStatusInner**](ListStatus200ResponseStatusInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/ListStatus200ResponseStatusInner.md b/rest/api/v3/lmc_contactdb/docs/ListStatus200ResponseStatusInner.md deleted file mode 100644 index 4e008b0b..00000000 --- a/rest/api/v3/lmc_contactdb/docs/ListStatus200ResponseStatusInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListStatus200ResponseStatusInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | Valid values are \"worker_delay\" and \"worker_delay_seconds\" (the second value appears only if \"worker_delay\" has a value of \"delayed\"). |[optional] [default to ""] -**Value** | **string** | Valid values for the ID \"worker_delay\" are \"OK\" or \"Delayed\". Valid values for the ID \"worker_delay_seconds\" is the time of delay to upload. |[optional] [default to ""] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/Operator.md b/rest/api/v3/lmc_contactdb/docs/Operator.md deleted file mode 100644 index 180b3c04..00000000 --- a/rest/api/v3/lmc_contactdb/docs/Operator.md +++ /dev/null @@ -1,16 +0,0 @@ -# Operator - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**EQ** | string | (value: `"eq"`) -**NE** | string | (value: `"ne"`) -**LT** | string | (value: `"lt"`) -**GT** | string | (value: `"gt"`) -**CONTAINS** | string | (value: `"contains"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/SearchRecipient.md b/rest/api/v3/lmc_contactdb/docs/SearchRecipient.md deleted file mode 100644 index 81e7460c..00000000 --- a/rest/api/v3/lmc_contactdb/docs/SearchRecipient.md +++ /dev/null @@ -1,48 +0,0 @@ -# SearchRecipient - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**SearchRecipient**](SearchRecipient.md#SearchRecipient) | **Post** /v3/contactdb/recipients/search | Search recipients - - - -## SearchRecipient - -> SearchRecipient200Response SearchRecipient(ctx, optional) - -Search recipients - -Search using segment conditions without actually creating a segment. Body contains a JSON object with `conditions`, a list of conditions as described below, and an optional `list_id`, which is a valid list ID for a list to limit the search on. Valid operators for create and update depend on the type of the field for which you are searching. - Dates: - `\"eq\"`, `\"ne\"`, `\"lt\"` (before), `\"gt\"` (after) - You may use MM/DD/YYYY for day granularity or an epoch for second granularity. - `\"empty\"`, `\"not_empty\"` - `\"is within\"` - You may use an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date format or the # of days. - Text: `\"contains\"`, `\"eq\"` (is - matches the full field), `\"ne\"` (is not - matches any field where the entire field is not the condition value), `\"empty\"`, `\"not_empty\"` - Numbers: `\"eq\"`, `\"lt\"`, `\"gt\"`, `\"empty\"`, `\"not_empty\"` - Email Clicks and Opens: `\"eq\"` (opened), `\"ne\"` (not opened) Field values must all be a string. Search conditions using `\"eq\"` or `\"ne\"` for email clicks and opens should provide a \"field\" of either `clicks.campaign_identifier` or `opens.campaign_identifier`. The condition value should be a string containing the id of a completed campaign. Search conditions list may contain multiple conditions, joined by an `\"and\"` or `\"or\"` in the `\"and_or\"` field. The first condition in the conditions list must have an empty `\"and_or\"`, and subsequent conditions must all specify an `\"and_or\"`. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a SearchRecipientParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**SearchRecipientRequest** | [**SearchRecipientRequest**](SearchRecipientRequest.md) | - -### Return type - -[**SearchRecipient200Response**](SearchRecipient200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/SearchRecipient200Response.md b/rest/api/v3/lmc_contactdb/docs/SearchRecipient200Response.md deleted file mode 100644 index c91ecb0a..00000000 --- a/rest/api/v3/lmc_contactdb/docs/SearchRecipient200Response.md +++ /dev/null @@ -1,12 +0,0 @@ -# SearchRecipient200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Recipients** | [**[]SearchRecipient200ResponseRecipientsInner**](SearchRecipient200ResponseRecipientsInner.md) | |[optional] -**RecipientCount** | **int32** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInner.md b/rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInner.md deleted file mode 100644 index 7ebc565e..00000000 --- a/rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInner.md +++ /dev/null @@ -1,19 +0,0 @@ -# SearchRecipient200ResponseRecipientsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CreatedAt** | **int32** | |[optional] -**Email** | **string** | |[optional] -**Id** | **string** | |[optional] -**LastEmailed** | **int32** | |[optional] -**LastClicked** | **int32** | |[optional] -**LastOpened** | **int32** | |[optional] -**CustomFields** | [**[]SearchRecipient200ResponseRecipientsInnerCustomFieldsInner**](SearchRecipient200ResponseRecipientsInnerCustomFieldsInner.md) | |[optional] -**UpdatedAt** | **int32** | |[optional] -**FirstName** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInnerCustomFieldsInner.md b/rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInnerCustomFieldsInner.md deleted file mode 100644 index 6d09dded..00000000 --- a/rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInnerCustomFieldsInner.md +++ /dev/null @@ -1,14 +0,0 @@ -# SearchRecipient200ResponseRecipientsInnerCustomFieldsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int32** | |[optional] -**Name** | **string** | |[optional] -**Value** | [**SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue**](SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue.md) | |[optional] -**Type** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue.md b/rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue.md deleted file mode 100644 index 73d53eb3..00000000 --- a/rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue.md +++ /dev/null @@ -1,10 +0,0 @@ -# SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/SearchRecipientRequest.md b/rest/api/v3/lmc_contactdb/docs/SearchRecipientRequest.md deleted file mode 100644 index de0b218c..00000000 --- a/rest/api/v3/lmc_contactdb/docs/SearchRecipientRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# SearchRecipientRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ListId** | **int32** | | -**Conditions** | [**[]ContactdbSegmentsConditions**](ContactdbSegmentsConditions.md) | The conditions by which this segment should be created. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/Type.md b/rest/api/v3/lmc_contactdb/docs/Type.md deleted file mode 100644 index 94e01859..00000000 --- a/rest/api/v3/lmc_contactdb/docs/Type.md +++ /dev/null @@ -1,14 +0,0 @@ -# Type - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**DATE** | string | (value: `"date"`) -**TEXT** | string | (value: `"text"`) -**NUMBER** | string | (value: `"number"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/UpdateAListRequest.md b/rest/api/v3/lmc_contactdb/docs/UpdateAListRequest.md deleted file mode 100644 index 5d1b4ce2..00000000 --- a/rest/api/v3/lmc_contactdb/docs/UpdateAListRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateAListRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The new name for your list. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/UpdateContactDbList.md b/rest/api/v3/lmc_contactdb/docs/UpdateContactDbList.md deleted file mode 100644 index 3285fc16..00000000 --- a/rest/api/v3/lmc_contactdb/docs/UpdateContactDbList.md +++ /dev/null @@ -1,53 +0,0 @@ -# UpdateContactDbList - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateContactDbList**](UpdateContactDbList.md#UpdateContactDbList) | **Patch** /v3/contactdb/lists/{ListId} | Update a List - - - -## UpdateContactDbList - -> UpdateContactDbList200Response UpdateContactDbList(ctx, ListIdoptional) - -Update a List - -**This endpoint allows you to update the name of one of your recipient lists.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**ListId** | **int32** | - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateContactDbListParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**UpdateAListRequest** | [**UpdateAListRequest**](UpdateAListRequest.md) | - -### Return type - -[**UpdateContactDbList200Response**](UpdateContactDbList200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/UpdateContactDbList200Response.md b/rest/api/v3/lmc_contactdb/docs/UpdateContactDbList200Response.md deleted file mode 100644 index de79f5bc..00000000 --- a/rest/api/v3/lmc_contactdb/docs/UpdateContactDbList200Response.md +++ /dev/null @@ -1,13 +0,0 @@ -# UpdateContactDbList200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int32** | The ID of the list |[optional] -**Name** | **string** | The new name for the list |[optional] -**RecipientCount** | **int32** | The number of recipients on the list |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/UpdateRecipient.md b/rest/api/v3/lmc_contactdb/docs/UpdateRecipient.md deleted file mode 100644 index 91d05ad5..00000000 --- a/rest/api/v3/lmc_contactdb/docs/UpdateRecipient.md +++ /dev/null @@ -1,49 +0,0 @@ -# UpdateRecipient - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateRecipient**](UpdateRecipient.md#UpdateRecipient) | **Patch** /v3/contactdb/recipients | Update Recipient - - - -## UpdateRecipient - -> ContactdbRecipientResponse201 UpdateRecipient(ctx, optional) - -Update Recipient - -**This endpoint allows you to update one or more recipients.** The body of an API call to this endpoint must include an array of one or more recipient objects. It is of note that you can add custom field data as parameters on recipient objects. We have provided an example using some of the default custom fields SendGrid provides. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateRecipientParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**UpdateRecipientRequestInner** | [**[]UpdateRecipientRequestInner**](UpdateRecipientRequestInner.md) | - -### Return type - -[**ContactdbRecipientResponse201**](ContactdbRecipientResponse201.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/UpdateRecipientRequestInner.md b/rest/api/v3/lmc_contactdb/docs/UpdateRecipientRequestInner.md deleted file mode 100644 index 0babc15d..00000000 --- a/rest/api/v3/lmc_contactdb/docs/UpdateRecipientRequestInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# UpdateRecipientRequestInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | **string** | | -**LastName** | **string** | The last name of the recipient. This is one of the default custom fields. |[optional] -**FirstName** | **string** | The first name of the recipient. This is one of the default custom fields. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/docs/UpdateSegment.md b/rest/api/v3/lmc_contactdb/docs/UpdateSegment.md deleted file mode 100644 index 57d79bd4..00000000 --- a/rest/api/v3/lmc_contactdb/docs/UpdateSegment.md +++ /dev/null @@ -1,53 +0,0 @@ -# UpdateSegment - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateSegment**](UpdateSegment.md#UpdateSegment) | **Patch** /v3/contactdb/segments/{SegmentId} | Update a segment - - - -## UpdateSegment - -> ContactdbSegments UpdateSegment(ctx, SegmentIdoptional) - -Update a segment - -**This endpoint allows you to update a segment.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**SegmentId** | **int32** | - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateSegmentParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**UpdateSegmentRequest** | [**UpdateSegmentRequest**](UpdateSegmentRequest.md) | - -### Return type - -[**ContactdbSegments**](ContactdbSegments.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_contactdb/docs/UpdateSegmentRequest.md b/rest/api/v3/lmc_contactdb/docs/UpdateSegmentRequest.md deleted file mode 100644 index 606cf19d..00000000 --- a/rest/api/v3/lmc_contactdb/docs/UpdateSegmentRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# UpdateSegmentRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | -**ListId** | **float32** | The list ID you would like this segment to be built from. |[optional] -**Conditions** | [**[]ContactdbSegmentsConditions**](ContactdbSegmentsConditions.md) | The conditions by which this segment should be created. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_contactdb/model_add_recipient_request_inner.go b/rest/api/v3/lmc_contactdb/model_add_recipient_request_inner.go deleted file mode 100644 index e5fa05f6..00000000 --- a/rest/api/v3/lmc_contactdb/model_add_recipient_request_inner.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AddRecipientRequestInner struct for AddRecipientRequestInner -type AddRecipientRequestInner struct { - // The email address of the recipient. - Email string `json:"email"` - // The first name of the recipient. - FirstName *string `json:"first_name,omitempty"` - // The last name of the recipient. - LastName *string `json:"last_name,omitempty"` - Age *int32 `json:"age,omitempty"` -} diff --git a/rest/api/v3/lmc_contactdb/model_and_or.go b/rest/api/v3/lmc_contactdb/model_and_or.go deleted file mode 100644 index 60a341a2..00000000 --- a/rest/api/v3/lmc_contactdb/model_and_or.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AndOr the model 'AndOr' -type AndOr string - -// List of AndOr -const ( - ANDOR_AND AndOr = "and" - ANDOR_OR AndOr = "or" - ANDOR_EMPTY AndOr = "" -) diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_custom_field.go b/rest/api/v3/lmc_contactdb/model_contactdb_custom_field.go deleted file mode 100644 index 480b2ede..00000000 --- a/rest/api/v3/lmc_contactdb/model_contactdb_custom_field.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ContactdbCustomField struct for ContactdbCustomField -type ContactdbCustomField struct { - // The name of the field - Name *string `json:"name,omitempty"` - // The type of the field. - Type *Type `json:"type,omitempty"` -} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_custom_field_id2xx.go b/rest/api/v3/lmc_contactdb/model_contactdb_custom_field_id2xx.go deleted file mode 100644 index 607a50eb..00000000 --- a/rest/api/v3/lmc_contactdb/model_contactdb_custom_field_id2xx.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ContactdbCustomFieldId2xx struct for ContactdbCustomFieldId2xx -type ContactdbCustomFieldId2xx struct { - // The name of the field - Name *string `json:"name,omitempty"` - // The type of the field. - Type *Type `json:"type,omitempty"` - // The ID of the custom field. - Id *float32 `json:"id,omitempty"` -} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_custom_field_id_value.go b/rest/api/v3/lmc_contactdb/model_contactdb_custom_field_id_value.go deleted file mode 100644 index 0e99ac75..00000000 --- a/rest/api/v3/lmc_contactdb/model_contactdb_custom_field_id_value.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ContactdbCustomFieldIdValue struct for ContactdbCustomFieldIdValue -type ContactdbCustomFieldIdValue struct { - // The name of the field - Name *string `json:"name,omitempty"` - // The type of the field. - Type *Type `json:"type,omitempty"` - // The ID of the custom field. - Id *float32 `json:"id,omitempty"` - // The value of this recipient's custom field - Value *string `json:"value,omitempty"` -} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_list2xx.go b/rest/api/v3/lmc_contactdb/model_contactdb_list2xx.go deleted file mode 100644 index 9a8f2703..00000000 --- a/rest/api/v3/lmc_contactdb/model_contactdb_list2xx.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ContactdbList2xx struct for ContactdbList2xx -type ContactdbList2xx struct { - // The reference ID of your list. - Id int32 `json:"id"` - // The name of your list. Must be unique against all other list and segment names. - Name string `json:"name"` - // The count of recipients currently in the list. - RecipientCount int32 `json:"recipient_count"` -} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_recipient200.go b/rest/api/v3/lmc_contactdb/model_contactdb_recipient200.go deleted file mode 100644 index 59735840..00000000 --- a/rest/api/v3/lmc_contactdb/model_contactdb_recipient200.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ContactdbRecipient200 struct for ContactdbRecipient200 -type ContactdbRecipient200 struct { - Recipients *[]ContactdbRecipient200RecipientsInner `json:"recipients,omitempty"` -} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_recipient200_recipients_inner.go b/rest/api/v3/lmc_contactdb/model_contactdb_recipient200_recipients_inner.go deleted file mode 100644 index 5b165ca2..00000000 --- a/rest/api/v3/lmc_contactdb/model_contactdb_recipient200_recipients_inner.go +++ /dev/null @@ -1,38 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ContactdbRecipient200RecipientsInner struct for ContactdbRecipient200RecipientsInner -type ContactdbRecipient200RecipientsInner struct { - // The ID of this recipient. - Id *string `json:"id,omitempty"` - // The time this record was created in your contactdb, in unixtime. - CreatedAt *float32 `json:"created_at,omitempty"` - // The custom fields assigned to this recipient and their values. - CustomFields *[]ContactdbCustomFieldIdValue `json:"custom_fields,omitempty"` - // The email address of this recipient. This is a default custom field that SendGrid provides. - Email string `json:"email"` - // The first name of this recipient. This is a default custom field that SendGrid provides. - FirstName *string `json:"first_name,omitempty"` - // The last name of the recipient. - LastName *string `json:"last_name,omitempty"` - // The last time this recipient clicked a link from one of your campaigns, in unixtime. - LastClicked *float32 `json:"last_clicked,omitempty"` - // The last time this user was emailed by one of your campaigns, in unixtime. - LastEmailed *float32 `json:"last_emailed,omitempty"` - // The last time this recipient opened an email from you, in unixtime. - LastOpened *float32 `json:"last_opened,omitempty"` - // The last update date for this recipient's record. - UpdatedAt *float32 `json:"updated_at,omitempty"` -} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_recipient_count200.go b/rest/api/v3/lmc_contactdb/model_contactdb_recipient_count200.go deleted file mode 100644 index 7e4a3521..00000000 --- a/rest/api/v3/lmc_contactdb/model_contactdb_recipient_count200.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ContactdbRecipientCount200 struct for ContactdbRecipientCount200 -type ContactdbRecipientCount200 struct { - // The count of recipients. - RecipientCount float32 `json:"recipient_count"` -} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_recipient_response201.go b/rest/api/v3/lmc_contactdb/model_contactdb_recipient_response201.go deleted file mode 100644 index b48d3be5..00000000 --- a/rest/api/v3/lmc_contactdb/model_contactdb_recipient_response201.go +++ /dev/null @@ -1,29 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ContactdbRecipientResponse201 struct for ContactdbRecipientResponse201 -type ContactdbRecipientResponse201 struct { - // The number of errors found while adding recipients. - ErrorCount float32 `json:"error_count"` - // The indices of the recipient(s) sent that caused the error. - ErrorIndices *[]float32 `json:"error_indices,omitempty"` - // The count of new recipients added to the contactdb. - NewCount float32 `json:"new_count"` - // The recipient IDs of the recipients that already existed from this request. - PersistedRecipients []string `json:"persisted_recipients"` - // The recipients who were updated from this request. - UpdatedCount float32 `json:"updated_count"` - Errors *[]ContactdbRecipientResponse201ErrorsInner `json:"errors,omitempty"` -} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_recipient_response201_errors_inner.go b/rest/api/v3/lmc_contactdb/model_contactdb_recipient_response201_errors_inner.go deleted file mode 100644 index 4ae71cd8..00000000 --- a/rest/api/v3/lmc_contactdb/model_contactdb_recipient_response201_errors_inner.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ContactdbRecipientResponse201ErrorsInner struct for ContactdbRecipientResponse201ErrorsInner -type ContactdbRecipientResponse201ErrorsInner struct { - Message *string `json:"message,omitempty"` - ErrorIndices *[]float32 `json:"error_indices,omitempty"` -} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_segments.go b/rest/api/v3/lmc_contactdb/model_contactdb_segments.go deleted file mode 100644 index 7fe704db..00000000 --- a/rest/api/v3/lmc_contactdb/model_contactdb_segments.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ContactdbSegments struct for ContactdbSegments -type ContactdbSegments struct { - // The name of this segment. - Name string `json:"name"` - // The list id from which to make this segment. Not including this ID will mean your segment is created from the main contactdb rather than a list. - ListId *int32 `json:"list_id,omitempty"` - // The conditions for a recipient to be included in this segment. - Conditions []ContactdbSegmentsConditions `json:"conditions"` - // The count of recipients in this list. This is not included on creation of segments. - RecipientCount *float32 `json:"recipient_count,omitempty"` -} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_segments_conditions.go b/rest/api/v3/lmc_contactdb/model_contactdb_segments_conditions.go deleted file mode 100644 index c0e67a33..00000000 --- a/rest/api/v3/lmc_contactdb/model_contactdb_segments_conditions.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ContactdbSegmentsConditions struct for ContactdbSegmentsConditions -type ContactdbSegmentsConditions struct { - Field string `json:"field"` - Value string `json:"value"` - Operator Operator `json:"operator"` - AndOr *AndOr `json:"and_or,omitempty"` -} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_segments_id200.go b/rest/api/v3/lmc_contactdb/model_contactdb_segments_id200.go deleted file mode 100644 index b3a4b612..00000000 --- a/rest/api/v3/lmc_contactdb/model_contactdb_segments_id200.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ContactdbSegmentsId200 struct for ContactdbSegmentsId200 -type ContactdbSegmentsId200 struct { - // The ID of the segment. - Id float32 `json:"id"` - // The name of this segment. - Name string `json:"name"` - // The list id from which to make this segment. Not including this ID will mean your segment is created from the main contactdb rather than a list. - ListId *int32 `json:"list_id,omitempty"` - // The conditions for a recipient to be included in this segment. - Conditions []ContactdbSegmentsConditions `json:"conditions"` - // The count of recipients in this list. This is not included on creation of segments. - RecipientCount *float32 `json:"recipient_count,omitempty"` -} diff --git a/rest/api/v3/lmc_contactdb/model_create_a_list_request.go b/rest/api/v3/lmc_contactdb/model_create_a_list_request.go deleted file mode 100644 index 773c84de..00000000 --- a/rest/api/v3/lmc_contactdb/model_create_a_list_request.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateAListRequest struct for CreateAListRequest -type CreateAListRequest struct { - Name string `json:"name"` -} diff --git a/rest/api/v3/lmc_contactdb/model_create_custom_field_request.go b/rest/api/v3/lmc_contactdb/model_create_custom_field_request.go deleted file mode 100644 index e17c24ac..00000000 --- a/rest/api/v3/lmc_contactdb/model_create_custom_field_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateCustomFieldRequest struct for CreateCustomFieldRequest -type CreateCustomFieldRequest struct { - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/rest/api/v3/lmc_contactdb/model_delete_contacts.go b/rest/api/v3/lmc_contactdb/model_delete_contacts.go deleted file mode 100644 index f916ee14..00000000 --- a/rest/api/v3/lmc_contactdb/model_delete_contacts.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DeleteContacts the model 'DeleteContacts' -type DeleteContacts bool - -// List of DeleteContacts -const ( - DELETECONTACTS_TRUE DeleteContacts = true - DELETECONTACTS_FALSE DeleteContacts = false -) diff --git a/rest/api/v3/lmc_contactdb/model_error_response.go b/rest/api/v3/lmc_contactdb/model_error_response.go deleted file mode 100644 index 9edcd5e2..00000000 --- a/rest/api/v3/lmc_contactdb/model_error_response.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponse struct for ErrorResponse -type ErrorResponse struct { - Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` - // When applicable, this property value will be an error ID. - Id *string `json:"id,omitempty"` -} diff --git a/rest/api/v3/lmc_contactdb/model_error_response_errors_inner.go b/rest/api/v3/lmc_contactdb/model_error_response_errors_inner.go deleted file mode 100644 index 64ff20ee..00000000 --- a/rest/api/v3/lmc_contactdb/model_error_response_errors_inner.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner -type ErrorResponseErrorsInner struct { - // An error message. - Message *string `json:"message,omitempty"` - // When applicable, this property value will be the field that generated the error. - Field *string `json:"field,omitempty"` - // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. - Help *map[string]interface{} `json:"help,omitempty"` -} diff --git a/rest/api/v3/lmc_contactdb/model_get_recipient_list_200_response.go b/rest/api/v3/lmc_contactdb/model_get_recipient_list_200_response.go deleted file mode 100644 index 3812b9ef..00000000 --- a/rest/api/v3/lmc_contactdb/model_get_recipient_list_200_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetRecipientList200Response struct for GetRecipientList200Response -type GetRecipientList200Response struct { - Lists *[]ContactdbList2xx `json:"lists,omitempty"` -} diff --git a/rest/api/v3/lmc_contactdb/model_list_all_custom_fields_response.go b/rest/api/v3/lmc_contactdb/model_list_all_custom_fields_response.go deleted file mode 100644 index 80c1834b..00000000 --- a/rest/api/v3/lmc_contactdb/model_list_all_custom_fields_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListAllCustomFieldsResponse struct for ListAllCustomFieldsResponse -type ListAllCustomFieldsResponse struct { - CustomFields []ContactdbCustomFieldId2xx `json:"custom_fields"` -} diff --git a/rest/api/v3/lmc_contactdb/model_list_all_lists_response.go b/rest/api/v3/lmc_contactdb/model_list_all_lists_response.go deleted file mode 100644 index beb23c3c..00000000 --- a/rest/api/v3/lmc_contactdb/model_list_all_lists_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListAllListsResponse struct for ListAllListsResponse -type ListAllListsResponse struct { - Lists []ContactdbList2xx `json:"lists"` -} diff --git a/rest/api/v3/lmc_contactdb/model_list_all_segments_response.go b/rest/api/v3/lmc_contactdb/model_list_all_segments_response.go deleted file mode 100644 index 9df8c58e..00000000 --- a/rest/api/v3/lmc_contactdb/model_list_all_segments_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListAllSegmentsResponse struct for ListAllSegmentsResponse -type ListAllSegmentsResponse struct { - Segments []ContactdbSegments `json:"segments"` -} diff --git a/rest/api/v3/lmc_contactdb/model_list_recipients_from_contact_db_list_200_response.go b/rest/api/v3/lmc_contactdb/model_list_recipients_from_contact_db_list_200_response.go deleted file mode 100644 index d271c30d..00000000 --- a/rest/api/v3/lmc_contactdb/model_list_recipients_from_contact_db_list_200_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListRecipientsFromContactDbList200Response struct for ListRecipientsFromContactDbList200Response -type ListRecipientsFromContactDbList200Response struct { - Recipients *[]ContactdbRecipient200 `json:"recipients,omitempty"` -} diff --git a/rest/api/v3/lmc_contactdb/model_list_recipients_on_a_segment_response.go b/rest/api/v3/lmc_contactdb/model_list_recipients_on_a_segment_response.go deleted file mode 100644 index 2c9656c9..00000000 --- a/rest/api/v3/lmc_contactdb/model_list_recipients_on_a_segment_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListRecipientsOnASegmentResponse struct for ListRecipientsOnASegmentResponse -type ListRecipientsOnASegmentResponse struct { - Recipients []ContactdbRecipient200 `json:"recipients"` -} diff --git a/rest/api/v3/lmc_contactdb/model_list_recipients_response.go b/rest/api/v3/lmc_contactdb/model_list_recipients_response.go deleted file mode 100644 index b09ef108..00000000 --- a/rest/api/v3/lmc_contactdb/model_list_recipients_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListRecipientsResponse struct for ListRecipientsResponse -type ListRecipientsResponse struct { - Recipients []map[string]interface{} `json:"recipients"` -} diff --git a/rest/api/v3/lmc_contactdb/model_list_reserved_field_200_response.go b/rest/api/v3/lmc_contactdb/model_list_reserved_field_200_response.go deleted file mode 100644 index 19b63d9e..00000000 --- a/rest/api/v3/lmc_contactdb/model_list_reserved_field_200_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListReservedField200Response struct for ListReservedField200Response -type ListReservedField200Response struct { - ReservedFields *[]ListReservedField200ResponseReservedFieldsInner `json:"reserved_fields,omitempty"` -} diff --git a/rest/api/v3/lmc_contactdb/model_list_reserved_field_200_response_reserved_fields_inner.go b/rest/api/v3/lmc_contactdb/model_list_reserved_field_200_response_reserved_fields_inner.go deleted file mode 100644 index d213170a..00000000 --- a/rest/api/v3/lmc_contactdb/model_list_reserved_field_200_response_reserved_fields_inner.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListReservedField200ResponseReservedFieldsInner struct for ListReservedField200ResponseReservedFieldsInner -type ListReservedField200ResponseReservedFieldsInner struct { - Name *string `json:"name,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/rest/api/v3/lmc_contactdb/model_list_status_200_response.go b/rest/api/v3/lmc_contactdb/model_list_status_200_response.go deleted file mode 100644 index b357ab9a..00000000 --- a/rest/api/v3/lmc_contactdb/model_list_status_200_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListStatus200Response struct for ListStatus200Response -type ListStatus200Response struct { - Status *[]ListStatus200ResponseStatusInner `json:"status,omitempty"` -} diff --git a/rest/api/v3/lmc_contactdb/model_list_status_200_response_status_inner.go b/rest/api/v3/lmc_contactdb/model_list_status_200_response_status_inner.go deleted file mode 100644 index 89247e3e..00000000 --- a/rest/api/v3/lmc_contactdb/model_list_status_200_response_status_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListStatus200ResponseStatusInner struct for ListStatus200ResponseStatusInner -type ListStatus200ResponseStatusInner struct { - // Valid values are \"worker_delay\" and \"worker_delay_seconds\" (the second value appears only if \"worker_delay\" has a value of \"delayed\"). - Id *string `json:"id,omitempty"` - // Valid values for the ID \"worker_delay\" are \"OK\" or \"Delayed\". Valid values for the ID \"worker_delay_seconds\" is the time of delay to upload. - Value *string `json:"value,omitempty"` -} diff --git a/rest/api/v3/lmc_contactdb/model_operator.go b/rest/api/v3/lmc_contactdb/model_operator.go deleted file mode 100644 index da90b9e6..00000000 --- a/rest/api/v3/lmc_contactdb/model_operator.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Operator the model 'Operator' -type Operator string - -// List of Operator -const ( - OPERATOR_EQ Operator = "eq" - OPERATOR_NE Operator = "ne" - OPERATOR_LT Operator = "lt" - OPERATOR_GT Operator = "gt" - OPERATOR_CONTAINS Operator = "contains" -) diff --git a/rest/api/v3/lmc_contactdb/model_search_recipient_200_response.go b/rest/api/v3/lmc_contactdb/model_search_recipient_200_response.go deleted file mode 100644 index 0285df3f..00000000 --- a/rest/api/v3/lmc_contactdb/model_search_recipient_200_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SearchRecipient200Response struct for SearchRecipient200Response -type SearchRecipient200Response struct { - Recipients *[]SearchRecipient200ResponseRecipientsInner `json:"recipients,omitempty"` - RecipientCount *int32 `json:"recipient_count,omitempty"` -} diff --git a/rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner.go b/rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner.go deleted file mode 100644 index 2eba7382..00000000 --- a/rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SearchRecipient200ResponseRecipientsInner struct for SearchRecipient200ResponseRecipientsInner -type SearchRecipient200ResponseRecipientsInner struct { - CreatedAt *int32 `json:"created_at,omitempty"` - Email *string `json:"email,omitempty"` - Id *string `json:"id,omitempty"` - LastEmailed *int32 `json:"last_emailed,omitempty"` - LastClicked *int32 `json:"last_clicked,omitempty"` - LastOpened *int32 `json:"last_opened,omitempty"` - CustomFields *[]SearchRecipient200ResponseRecipientsInnerCustomFieldsInner `json:"custom_fields,omitempty"` - UpdatedAt *int32 `json:"updated_at,omitempty"` - FirstName *string `json:"first_name,omitempty"` -} diff --git a/rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner_custom_fields_inner.go b/rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner_custom_fields_inner.go deleted file mode 100644 index d541c438..00000000 --- a/rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner_custom_fields_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SearchRecipient200ResponseRecipientsInnerCustomFieldsInner struct for SearchRecipient200ResponseRecipientsInnerCustomFieldsInner -type SearchRecipient200ResponseRecipientsInnerCustomFieldsInner struct { - Id *int32 `json:"id,omitempty"` - Name *string `json:"name,omitempty"` - Value *SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue `json:"value,omitempty"` - Type *string `json:"type,omitempty"` -} diff --git a/rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner_custom_fields_inner_value.go b/rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner_custom_fields_inner_value.go deleted file mode 100644 index 6465eb37..00000000 --- a/rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner_custom_fields_inner_value.go +++ /dev/null @@ -1,18 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue struct for SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue -type SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue struct { -} diff --git a/rest/api/v3/lmc_contactdb/model_search_recipient_request.go b/rest/api/v3/lmc_contactdb/model_search_recipient_request.go deleted file mode 100644 index 8f940790..00000000 --- a/rest/api/v3/lmc_contactdb/model_search_recipient_request.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SearchRecipientRequest struct for SearchRecipientRequest -type SearchRecipientRequest struct { - ListId int32 `json:"list_id"` - // The conditions by which this segment should be created. - Conditions []ContactdbSegmentsConditions `json:"conditions"` -} diff --git a/rest/api/v3/lmc_contactdb/model_type.go b/rest/api/v3/lmc_contactdb/model_type.go deleted file mode 100644 index 92c5e4b6..00000000 --- a/rest/api/v3/lmc_contactdb/model_type.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Type the model 'Type' -type Type string - -// List of Type -const ( - TYPE_DATE Type = "date" - TYPE_TEXT Type = "text" - TYPE_NUMBER Type = "number" -) diff --git a/rest/api/v3/lmc_contactdb/model_update_a_list_request.go b/rest/api/v3/lmc_contactdb/model_update_a_list_request.go deleted file mode 100644 index db1099c4..00000000 --- a/rest/api/v3/lmc_contactdb/model_update_a_list_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateAListRequest struct for UpdateAListRequest -type UpdateAListRequest struct { - // The new name for your list. - Name string `json:"name"` -} diff --git a/rest/api/v3/lmc_contactdb/model_update_contact_db_list_200_response.go b/rest/api/v3/lmc_contactdb/model_update_contact_db_list_200_response.go deleted file mode 100644 index 852e50f7..00000000 --- a/rest/api/v3/lmc_contactdb/model_update_contact_db_list_200_response.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateContactDbList200Response struct for UpdateContactDbList200Response -type UpdateContactDbList200Response struct { - // The ID of the list - Id *int32 `json:"id,omitempty"` - // The new name for the list - Name *string `json:"name,omitempty"` - // The number of recipients on the list - RecipientCount *int32 `json:"recipient_count,omitempty"` -} diff --git a/rest/api/v3/lmc_contactdb/model_update_recipient_request_inner.go b/rest/api/v3/lmc_contactdb/model_update_recipient_request_inner.go deleted file mode 100644 index 5382ec99..00000000 --- a/rest/api/v3/lmc_contactdb/model_update_recipient_request_inner.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateRecipientRequestInner struct for UpdateRecipientRequestInner -type UpdateRecipientRequestInner struct { - Email string `json:"email"` - // The last name of the recipient. This is one of the default custom fields. - LastName *string `json:"last_name,omitempty"` - // The first name of the recipient. This is one of the default custom fields. - FirstName *string `json:"first_name,omitempty"` -} diff --git a/rest/api/v3/lmc_contactdb/model_update_segment_request.go b/rest/api/v3/lmc_contactdb/model_update_segment_request.go deleted file mode 100644 index f2d1e726..00000000 --- a/rest/api/v3/lmc_contactdb/model_update_segment_request.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Contacts API -* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateSegmentRequest struct for UpdateSegmentRequest -type UpdateSegmentRequest struct { - Name string `json:"name"` - // The list ID you would like this segment to be built from. - ListId *float32 `json:"list_id,omitempty"` - // The conditions by which this segment should be created. - Conditions *[]ContactdbSegmentsConditions `json:"conditions,omitempty"` -} diff --git a/rest/api/v3/lmc_senders/.openapi-generator b/rest/api/v3/lmc_senders/.openapi-generator deleted file mode 100644 index 0aaf0e82..00000000 --- a/rest/api/v3/lmc_senders/.openapi-generator +++ /dev/null @@ -1,32 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_create_sender.go -api_delete_sender.go -api_get_sender.go -api_list_sender.go -api_reset_sender_verification.go -api_service.go -api_update_sender.go -docs/CreateSender.md -docs/CreateSender400Response.md -docs/CreateSender400ResponseErrorsInner.md -docs/CreateSenderRequest.md -docs/DeleteSender.md -docs/GetSender.md -docs/ListSender.md -docs/ListSender200Response.md -docs/ResetSenderVerification.md -docs/SenderId.md -docs/SenderIdRequest.md -docs/SenderIdRequestFrom.md -docs/SenderIdRequestReplyTo.md -docs/UpdateSender.md -model_create_sender_400_response.go -model_create_sender_400_response_errors_inner.go -model_create_sender_request.go -model_list_sender_200_response.go -model_sender_id.go -model_sender_id_request.go -model_sender_id_request_from.go -model_sender_id_request_reply_to.go diff --git a/rest/api/v3/lmc_senders/.openapi-generator-ignore b/rest/api/v3/lmc_senders/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/lmc_senders/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/lmc_senders/README.md b/rest/api/v3/lmc_senders/README.md deleted file mode 100644 index c185bc2a..00000000 --- a/rest/api/v3/lmc_senders/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# Go API client for - -The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). - -See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:37.552401+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*CreateSender* | [**CreateSender**](docs/CreateSender.md#createsender) | **Post** /v3/senders | Create a Sender Identity -*DeleteSender* | [**DeleteSender**](docs/DeleteSender.md#deletesender) | **Delete** /v3/senders/{SenderId} | Delete a Sender Identity -*GetSender* | [**GetSender**](docs/GetSender.md#getsender) | **Get** /v3/senders/{SenderId} | View a Sender Identity -*ListSender* | [**ListSender**](docs/ListSender.md#listsender) | **Get** /v3/senders | Get all Sender Identities -*ResetSenderVerification* | [**ResetSenderVerification**](docs/ResetSenderVerification.md#resetsenderverification) | **Post** /v3/senders/{SenderId}/resend_verification | Resend Sender Identity Verification -*UpdateSender* | [**UpdateSender**](docs/UpdateSender.md#updatesender) | **Patch** /v3/senders/{SenderId} | Update a Sender Identity - - -## Documentation For Models - - - [CreateSender400Response](CreateSender400Response.md) - - [CreateSender400ResponseErrorsInner](CreateSender400ResponseErrorsInner.md) - - [CreateSenderRequest](CreateSenderRequest.md) - - [ListSender200Response](ListSender200Response.md) - - [SenderId](SenderId.md) - - [SenderIdRequest](SenderIdRequest.md) - - [SenderIdRequestFrom](SenderIdRequestFrom.md) - - [SenderIdRequestReplyTo](SenderIdRequestReplyTo.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/lmc_senders/api_create_sender.go b/rest/api/v3/lmc_senders/api_create_sender.go deleted file mode 100644 index 942e6c56..00000000 --- a/rest/api/v3/lmc_senders/api_create_sender.go +++ /dev/null @@ -1,82 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API -* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type CreateSenderParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - CreateSenderRequest *CreateSenderRequest `json:"CreateSenderRequest,omitempty"` -} - -func (params *CreateSenderParam) SetOnbehalfof(Onbehalfof string) *CreateSenderParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *CreateSenderParam) SetCreateSenderRequest(CreateSenderRequest CreateSenderRequest) *CreateSenderParam { - params.CreateSenderRequest = &CreateSenderRequest - return params -} - -// **This endpoint allows you to create a new sender identity.** You may create up to 100 unique sender identities. -func (c *ApiService) CreateSender(params *CreateSenderParam) (interface{}, error) { - path := "/v3/senders" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.CreateSenderRequest != nil { - b, err := json.Marshal(*params.CreateSenderRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &SenderId{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &CreateSender400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_senders/api_delete_sender.go b/rest/api/v3/lmc_senders/api_delete_sender.go deleted file mode 100644 index b072b7f6..00000000 --- a/rest/api/v3/lmc_senders/api_delete_sender.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API -* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type DeleteSenderParam struct { - // The ID of the sender identity that you want to retrieve. - SenderId *int32 `json:"sender_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *DeleteSenderParam) SetSenderId(SenderId int32) *DeleteSenderParam { - params.SenderId = &SenderId - return params -} -func (params *DeleteSenderParam) SetOnbehalfof(Onbehalfof string) *DeleteSenderParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to delete one of your sender identities.** -func (c *ApiService) DeleteSender(params *DeleteSenderParam) (interface{}, error) { - path := "/v3/senders/{SenderId}" - if params != nil && params.SenderId != nil { - path = strings.Replace(path, "{"+"SenderId"+"}", fmt.Sprint(*params.SenderId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &CreateSender400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &CreateSender400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_senders/api_get_sender.go b/rest/api/v3/lmc_senders/api_get_sender.go deleted file mode 100644 index 5d2ae68b..00000000 --- a/rest/api/v3/lmc_senders/api_get_sender.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API -* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type GetSenderParam struct { - // The ID of the sender identity that you want to retrieve. - SenderId *int32 `json:"sender_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetSenderParam) SetSenderId(SenderId int32) *GetSenderParam { - params.SenderId = &SenderId - return params -} -func (params *GetSenderParam) SetOnbehalfof(Onbehalfof string) *GetSenderParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a specific sender identity.** -func (c *ApiService) GetSender(params *GetSenderParam) (interface{}, error) { - path := "/v3/senders/{SenderId}" - if params != nil && params.SenderId != nil { - path = strings.Replace(path, "{"+"SenderId"+"}", fmt.Sprint(*params.SenderId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SenderId{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &CreateSender400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_senders/api_list_sender.go b/rest/api/v3/lmc_senders/api_list_sender.go deleted file mode 100644 index 2b81f7bd..00000000 --- a/rest/api/v3/lmc_senders/api_list_sender.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API -* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListSenderParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListSenderParam) SetOnbehalfof(Onbehalfof string) *ListSenderParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a list of all sender identities that have been created for your account.** -func (c *ApiService) ListSender(params *ListSenderParam) (interface{}, error) { - path := "/v3/senders" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListSender200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_senders/api_reset_sender_verification.go b/rest/api/v3/lmc_senders/api_reset_sender_verification.go deleted file mode 100644 index e3d3ece3..00000000 --- a/rest/api/v3/lmc_senders/api_reset_sender_verification.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API -* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type ResetSenderVerificationParam struct { - // The ID of the sender identity for which you would like to resend a verification email. - SenderId *int32 `json:"sender_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ResetSenderVerificationParam) SetSenderId(SenderId int32) *ResetSenderVerificationParam { - params.SenderId = &SenderId - return params -} -func (params *ResetSenderVerificationParam) SetOnbehalfof(Onbehalfof string) *ResetSenderVerificationParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to resend a sender identity verification email.** -func (c *ApiService) ResetSenderVerification(params *ResetSenderVerificationParam) (interface{}, error) { - path := "/v3/senders/{SenderId}/resend_verification" - if params != nil && params.SenderId != nil { - path = strings.Replace(path, "{"+"SenderId"+"}", fmt.Sprint(*params.SenderId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &CreateSender400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &CreateSender400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_senders/api_service.go b/rest/api/v3/lmc_senders/api_service.go deleted file mode 100644 index aa0529a6..00000000 --- a/rest/api/v3/lmc_senders/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API -* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/lmc_senders/api_update_sender.go b/rest/api/v3/lmc_senders/api_update_sender.go deleted file mode 100644 index 68789162..00000000 --- a/rest/api/v3/lmc_senders/api_update_sender.go +++ /dev/null @@ -1,110 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API -* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type UpdateSenderParam struct { - // The ID of the sender identity that you want to retrieve. - SenderId *int32 `json:"sender_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - SenderIdRequest *SenderIdRequest `json:"SenderIdRequest,omitempty"` -} - -func (params *UpdateSenderParam) SetSenderId(SenderId int32) *UpdateSenderParam { - params.SenderId = &SenderId - return params -} -func (params *UpdateSenderParam) SetOnbehalfof(Onbehalfof string) *UpdateSenderParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateSenderParam) SetSenderIdRequest(SenderIdRequest SenderIdRequest) *UpdateSenderParam { - params.SenderIdRequest = &SenderIdRequest - return params -} - -// **This endpoint allows you to update a sender identity.** Updates to `from.email` require re-verification. Partial updates are allowed, but fields that are marked as \"required\" in the POST (create) endpoint must not be nil if that field is included in the PATCH request. -func (c *ApiService) UpdateSender(params *UpdateSenderParam) (interface{}, error) { - path := "/v3/senders/{SenderId}" - if params != nil && params.SenderId != nil { - path = strings.Replace(path, "{"+"SenderId"+"}", fmt.Sprint(*params.SenderId), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.SenderIdRequest != nil { - b, err := json.Marshal(*params.SenderIdRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SenderId{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &CreateSender400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &CreateSender400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &CreateSender400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/lmc_senders/docs/CreateSender.md b/rest/api/v3/lmc_senders/docs/CreateSender.md deleted file mode 100644 index c3e50784..00000000 --- a/rest/api/v3/lmc_senders/docs/CreateSender.md +++ /dev/null @@ -1,49 +0,0 @@ -# CreateSender - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateSender**](CreateSender.md#CreateSender) | **Post** /v3/senders | Create a Sender Identity - - - -## CreateSender - -> SenderId CreateSender(ctx, optional) - -Create a Sender Identity - -**This endpoint allows you to create a new sender identity.** You may create up to 100 unique sender identities. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateSenderParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**CreateSenderRequest** | [**CreateSenderRequest**](CreateSenderRequest.md) | - -### Return type - -[**SenderId**](SenderId.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_senders/docs/CreateSender400Response.md b/rest/api/v3/lmc_senders/docs/CreateSender400Response.md deleted file mode 100644 index 82215c7b..00000000 --- a/rest/api/v3/lmc_senders/docs/CreateSender400Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateSender400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]CreateSender400ResponseErrorsInner**](CreateSender400ResponseErrorsInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_senders/docs/CreateSender400ResponseErrorsInner.md b/rest/api/v3/lmc_senders/docs/CreateSender400ResponseErrorsInner.md deleted file mode 100644 index 9ed78de2..00000000 --- a/rest/api/v3/lmc_senders/docs/CreateSender400ResponseErrorsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateSender400ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | |[optional] -**Field** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_senders/docs/CreateSenderRequest.md b/rest/api/v3/lmc_senders/docs/CreateSenderRequest.md deleted file mode 100644 index 97a03bec..00000000 --- a/rest/api/v3/lmc_senders/docs/CreateSenderRequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# CreateSenderRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Nickname** | **string** | A nickname for the sender identity. Not used for sending. | -**From** | **map[string]interface{}** | |[optional] -**ReplyTo** | **map[string]interface{}** | |[optional] -**Address** | **string** | The physical address of the sender identity. | -**Address2** | **string** | Additional sender identity address information. |[optional] -**City** | **string** | The city of the sender identity. | -**State** | **string** | The state of the sender identity. |[optional] -**Zip** | **string** | The zipcode of the sender identity. |[optional] -**Country** | **string** | The country of the sender identity. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_senders/docs/DeleteSender.md b/rest/api/v3/lmc_senders/docs/DeleteSender.md deleted file mode 100644 index 5a3cd16b..00000000 --- a/rest/api/v3/lmc_senders/docs/DeleteSender.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeleteSender - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteSender**](DeleteSender.md#DeleteSender) | **Delete** /v3/senders/{SenderId} | Delete a Sender Identity - - - -## DeleteSender - -> map[string]interface{} DeleteSender(ctx, SenderIdoptional) - -Delete a Sender Identity - -**This endpoint allows you to delete one of your sender identities.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**SenderId** | **int32** | The ID of the sender identity that you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteSenderParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_senders/docs/GetSender.md b/rest/api/v3/lmc_senders/docs/GetSender.md deleted file mode 100644 index e183cdfd..00000000 --- a/rest/api/v3/lmc_senders/docs/GetSender.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetSender - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetSender**](GetSender.md#GetSender) | **Get** /v3/senders/{SenderId} | View a Sender Identity - - - -## GetSender - -> SenderId GetSender(ctx, SenderIdoptional) - -View a Sender Identity - -**This endpoint allows you to retrieve a specific sender identity.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**SenderId** | **int32** | The ID of the sender identity that you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a GetSenderParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**SenderId**](SenderId.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_senders/docs/ListSender.md b/rest/api/v3/lmc_senders/docs/ListSender.md deleted file mode 100644 index e2cdca72..00000000 --- a/rest/api/v3/lmc_senders/docs/ListSender.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListSender - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListSender**](ListSender.md#ListSender) | **Get** /v3/senders | Get all Sender Identities - - - -## ListSender - -> ListSender200Response ListSender(ctx, optional) - -Get all Sender Identities - -**This endpoint allows you to retrieve a list of all sender identities that have been created for your account.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListSenderParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListSender200Response**](ListSender200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_senders/docs/ListSender200Response.md b/rest/api/v3/lmc_senders/docs/ListSender200Response.md deleted file mode 100644 index a43f2cf1..00000000 --- a/rest/api/v3/lmc_senders/docs/ListSender200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListSender200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]SenderId**](SenderId.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_senders/docs/ResetSenderVerification.md b/rest/api/v3/lmc_senders/docs/ResetSenderVerification.md deleted file mode 100644 index 772fee5c..00000000 --- a/rest/api/v3/lmc_senders/docs/ResetSenderVerification.md +++ /dev/null @@ -1,52 +0,0 @@ -# ResetSenderVerification - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ResetSenderVerification**](ResetSenderVerification.md#ResetSenderVerification) | **Post** /v3/senders/{SenderId}/resend_verification | Resend Sender Identity Verification - - - -## ResetSenderVerification - -> map[string]interface{} ResetSenderVerification(ctx, SenderIdoptional) - -Resend Sender Identity Verification - -**This endpoint allows you to resend a sender identity verification email.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**SenderId** | **int32** | The ID of the sender identity for which you would like to resend a verification email. - -### Other Parameters - -Other parameters are passed through a pointer to a ResetSenderVerificationParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_senders/docs/SenderId.md b/rest/api/v3/lmc_senders/docs/SenderId.md deleted file mode 100644 index 5873d37d..00000000 --- a/rest/api/v3/lmc_senders/docs/SenderId.md +++ /dev/null @@ -1,24 +0,0 @@ -# SenderId - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Nickname** | **string** | A nickname for the sender identity. Not used for sending. | -**From** | [**SenderIdRequestFrom**](SenderIdRequestFrom.md) | |[optional] -**ReplyTo** | [**SenderIdRequestReplyTo**](SenderIdRequestReplyTo.md) | |[optional] -**Address** | **string** | The physical address of the sender identity. | -**Address2** | **string** | Additional sender identity address information. |[optional] -**City** | **string** | The city of the sender identity. | -**State** | **string** | The state of the sender identity. |[optional] -**Zip** | **string** | The zipcode of the sender identity. |[optional] -**Country** | **string** | The country of the sender identity. | -**Id** | **int32** | The unique identifier of the sender identity. |[optional] -**Verified** | **bool** | If the sender identity is verified or not. Only verified sender identities can be used to send email. |[optional] -**UpdatedAt** | **int32** | The time the sender identity was last updated. |[optional] -**CreatedAt** | **int32** | The time the sender identity was created. |[optional] -**Locked** | **bool** | True when the sender id is associated to a campaign in the Draft, Scheduled, or In Progress status. You cannot update or delete a locked sender identity. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_senders/docs/SenderIdRequest.md b/rest/api/v3/lmc_senders/docs/SenderIdRequest.md deleted file mode 100644 index 263408e5..00000000 --- a/rest/api/v3/lmc_senders/docs/SenderIdRequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# SenderIdRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Nickname** | **string** | A nickname for the sender identity. Not used for sending. |[optional] -**From** | [**SenderIdRequestFrom**](SenderIdRequestFrom.md) | |[optional] -**ReplyTo** | [**SenderIdRequestReplyTo**](SenderIdRequestReplyTo.md) | |[optional] -**Address** | **string** | The physical address of the sender identity. |[optional] -**Address2** | **string** | Additional sender identity address information. |[optional] -**City** | **string** | The city of the sender identity. |[optional] -**State** | **string** | The state of the sender identity. |[optional] -**Zip** | **string** | The zipcode of the sender identity. |[optional] -**Country** | **string** | The country of the sender identity. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_senders/docs/SenderIdRequestFrom.md b/rest/api/v3/lmc_senders/docs/SenderIdRequestFrom.md deleted file mode 100644 index eaf4d8fa..00000000 --- a/rest/api/v3/lmc_senders/docs/SenderIdRequestFrom.md +++ /dev/null @@ -1,12 +0,0 @@ -# SenderIdRequestFrom - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | **string** | The email address from which your recipient will receive emails. |[optional] -**Name** | **string** | The name appended to the from email field. Typically your name or company name. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_senders/docs/SenderIdRequestReplyTo.md b/rest/api/v3/lmc_senders/docs/SenderIdRequestReplyTo.md deleted file mode 100644 index bcdd0642..00000000 --- a/rest/api/v3/lmc_senders/docs/SenderIdRequestReplyTo.md +++ /dev/null @@ -1,12 +0,0 @@ -# SenderIdRequestReplyTo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | **string** | The email address to which your recipient will reply. |[optional] -**Name** | **string** | The name appended to the reply to email field. Typically your name or company name. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/lmc_senders/docs/UpdateSender.md b/rest/api/v3/lmc_senders/docs/UpdateSender.md deleted file mode 100644 index c48c1685..00000000 --- a/rest/api/v3/lmc_senders/docs/UpdateSender.md +++ /dev/null @@ -1,53 +0,0 @@ -# UpdateSender - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateSender**](UpdateSender.md#UpdateSender) | **Patch** /v3/senders/{SenderId} | Update a Sender Identity - - - -## UpdateSender - -> SenderId UpdateSender(ctx, SenderIdoptional) - -Update a Sender Identity - -**This endpoint allows you to update a sender identity.** Updates to `from.email` require re-verification. Partial updates are allowed, but fields that are marked as \"required\" in the POST (create) endpoint must not be nil if that field is included in the PATCH request. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**SenderId** | **int32** | The ID of the sender identity that you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateSenderParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**SenderIdRequest** | [**SenderIdRequest**](SenderIdRequest.md) | - -### Return type - -[**SenderId**](SenderId.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/lmc_senders/model_create_sender_400_response.go b/rest/api/v3/lmc_senders/model_create_sender_400_response.go deleted file mode 100644 index 81a60813..00000000 --- a/rest/api/v3/lmc_senders/model_create_sender_400_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API -* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateSender400Response struct for CreateSender400Response -type CreateSender400Response struct { - Errors *[]CreateSender400ResponseErrorsInner `json:"errors,omitempty"` -} diff --git a/rest/api/v3/lmc_senders/model_create_sender_400_response_errors_inner.go b/rest/api/v3/lmc_senders/model_create_sender_400_response_errors_inner.go deleted file mode 100644 index 829750a6..00000000 --- a/rest/api/v3/lmc_senders/model_create_sender_400_response_errors_inner.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API -* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateSender400ResponseErrorsInner struct for CreateSender400ResponseErrorsInner -type CreateSender400ResponseErrorsInner struct { - Message *string `json:"message,omitempty"` - Field *string `json:"field,omitempty"` -} diff --git a/rest/api/v3/lmc_senders/model_create_sender_request.go b/rest/api/v3/lmc_senders/model_create_sender_request.go deleted file mode 100644 index a8496af9..00000000 --- a/rest/api/v3/lmc_senders/model_create_sender_request.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API -* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateSenderRequest struct for CreateSenderRequest -type CreateSenderRequest struct { - // A nickname for the sender identity. Not used for sending. - Nickname string `json:"nickname"` - From *map[string]interface{} `json:"from,omitempty"` - ReplyTo *map[string]interface{} `json:"reply_to,omitempty"` - // The physical address of the sender identity. - Address string `json:"address"` - // Additional sender identity address information. - Address2 *string `json:"address_2,omitempty"` - // The city of the sender identity. - City string `json:"city"` - // The state of the sender identity. - State *string `json:"state,omitempty"` - // The zipcode of the sender identity. - Zip *string `json:"zip,omitempty"` - // The country of the sender identity. - Country string `json:"country"` -} diff --git a/rest/api/v3/lmc_senders/model_list_sender_200_response.go b/rest/api/v3/lmc_senders/model_list_sender_200_response.go deleted file mode 100644 index 7394409a..00000000 --- a/rest/api/v3/lmc_senders/model_list_sender_200_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API -* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSender200Response struct for ListSender200Response -type ListSender200Response struct { - Result *[]SenderId `json:"result,omitempty"` -} diff --git a/rest/api/v3/lmc_senders/model_sender_id.go b/rest/api/v3/lmc_senders/model_sender_id.go deleted file mode 100644 index aa460bd2..00000000 --- a/rest/api/v3/lmc_senders/model_sender_id.go +++ /dev/null @@ -1,44 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API -* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SenderId struct for SenderId -type SenderId struct { - // A nickname for the sender identity. Not used for sending. - Nickname string `json:"nickname"` - From *SenderIdRequestFrom `json:"from,omitempty"` - ReplyTo *SenderIdRequestReplyTo `json:"reply_to,omitempty"` - // The physical address of the sender identity. - Address string `json:"address"` - // Additional sender identity address information. - Address2 *string `json:"address_2,omitempty"` - // The city of the sender identity. - City string `json:"city"` - // The state of the sender identity. - State *string `json:"state,omitempty"` - // The zipcode of the sender identity. - Zip *string `json:"zip,omitempty"` - // The country of the sender identity. - Country string `json:"country"` - // The unique identifier of the sender identity. - Id *int32 `json:"id,omitempty"` - // If the sender identity is verified or not. Only verified sender identities can be used to send email. - Verified *bool `json:"verified,omitempty"` - // The time the sender identity was last updated. - UpdatedAt *int32 `json:"updated_at,omitempty"` - // The time the sender identity was created. - CreatedAt *int32 `json:"created_at,omitempty"` - // True when the sender id is associated to a campaign in the Draft, Scheduled, or In Progress status. You cannot update or delete a locked sender identity. - Locked *bool `json:"locked,omitempty"` -} diff --git a/rest/api/v3/lmc_senders/model_sender_id_request.go b/rest/api/v3/lmc_senders/model_sender_id_request.go deleted file mode 100644 index be2cf28a..00000000 --- a/rest/api/v3/lmc_senders/model_sender_id_request.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API -* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SenderIdRequest struct for SenderIdRequest -type SenderIdRequest struct { - // A nickname for the sender identity. Not used for sending. - Nickname *string `json:"nickname,omitempty"` - From *SenderIdRequestFrom `json:"from,omitempty"` - ReplyTo *SenderIdRequestReplyTo `json:"reply_to,omitempty"` - // The physical address of the sender identity. - Address *string `json:"address,omitempty"` - // Additional sender identity address information. - Address2 *string `json:"address_2,omitempty"` - // The city of the sender identity. - City *string `json:"city,omitempty"` - // The state of the sender identity. - State *string `json:"state,omitempty"` - // The zipcode of the sender identity. - Zip *string `json:"zip,omitempty"` - // The country of the sender identity. - Country *string `json:"country,omitempty"` -} diff --git a/rest/api/v3/lmc_senders/model_sender_id_request_from.go b/rest/api/v3/lmc_senders/model_sender_id_request_from.go deleted file mode 100644 index 03edf7fe..00000000 --- a/rest/api/v3/lmc_senders/model_sender_id_request_from.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API -* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SenderIdRequestFrom struct for SenderIdRequestFrom -type SenderIdRequestFrom struct { - // The email address from which your recipient will receive emails. - Email *string `json:"email,omitempty"` - // The name appended to the from email field. Typically your name or company name. - Name *string `json:"name,omitempty"` -} diff --git a/rest/api/v3/lmc_senders/model_sender_id_request_reply_to.go b/rest/api/v3/lmc_senders/model_sender_id_request_reply_to.go deleted file mode 100644 index 725356c0..00000000 --- a/rest/api/v3/lmc_senders/model_sender_id_request_reply_to.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API -* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SenderIdRequestReplyTo struct for SenderIdRequestReplyTo -type SenderIdRequestReplyTo struct { - // The email address to which your recipient will reply. - Email *string `json:"email,omitempty"` - // The name appended to the reply to email field. Typically your name or company name. - Name *string `json:"name,omitempty"` -} diff --git a/rest/api/v3/mail/.openapi-generator b/rest/api/v3/mail/.openapi-generator deleted file mode 100644 index 3c4fde5b..00000000 --- a/rest/api/v3/mail/.openapi-generator +++ /dev/null @@ -1,58 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_create_mail_batch.go -api_get_mail_batch.go -api_send_mail.go -api_service.go -docs/ContentEncoding.md -docs/CreateMailBatch.md -docs/Disposition.md -docs/ErrorResponse.md -docs/ErrorResponseErrorsInner.md -docs/GetMailBatch.md -docs/MailBatchResponse.md -docs/MailFrom.md -docs/MailTo.md -docs/SendMail.md -docs/SendMailRequest.md -docs/SendMailRequestAsm.md -docs/SendMailRequestAttachmentsInner.md -docs/SendMailRequestContentInner.md -docs/SendMailRequestMailSettings.md -docs/SendMailRequestMailSettingsBypassBounceManagement.md -docs/SendMailRequestMailSettingsBypassListManagement.md -docs/SendMailRequestMailSettingsBypassSpamManagement.md -docs/SendMailRequestMailSettingsBypassUnsubscribeManagement.md -docs/SendMailRequestMailSettingsFooter.md -docs/SendMailRequestMailSettingsSandboxMode.md -docs/SendMailRequestPersonalizationsInner.md -docs/SendMailRequestTrackingSettings.md -docs/SendMailRequestTrackingSettingsClickTracking.md -docs/SendMailRequestTrackingSettingsGanalytics.md -docs/SendMailRequestTrackingSettingsOpenTracking.md -docs/SendMailRequestTrackingSettingsSubscriptionTracking.md -model_content_encoding.go -model_disposition.go -model_error_response.go -model_error_response_errors_inner.go -model_mail_batch_response.go -model_mail_from.go -model_mail_to.go -model_send_mail_request.go -model_send_mail_request_asm.go -model_send_mail_request_attachments_inner.go -model_send_mail_request_content_inner.go -model_send_mail_request_mail_settings.go -model_send_mail_request_mail_settings_bypass_bounce_management.go -model_send_mail_request_mail_settings_bypass_list_management.go -model_send_mail_request_mail_settings_bypass_spam_management.go -model_send_mail_request_mail_settings_bypass_unsubscribe_management.go -model_send_mail_request_mail_settings_footer.go -model_send_mail_request_mail_settings_sandbox_mode.go -model_send_mail_request_personalizations_inner.go -model_send_mail_request_tracking_settings.go -model_send_mail_request_tracking_settings_click_tracking.go -model_send_mail_request_tracking_settings_ganalytics.go -model_send_mail_request_tracking_settings_open_tracking.go -model_send_mail_request_tracking_settings_subscription_tracking.go diff --git a/rest/api/v3/mail/.openapi-generator-ignore b/rest/api/v3/mail/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/mail/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/mail/README.md b/rest/api/v3/mail/README.md deleted file mode 100644 index 0f785950..00000000 --- a/rest/api/v3/mail/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# Go API client for - -The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:37.974449+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*CreateMailBatch* | [**CreateMailBatch**](docs/CreateMailBatch.md#createmailbatch) | **Post** /v3/mail/batch | Create a batch ID. -*GetMailBatch* | [**GetMailBatch**](docs/GetMailBatch.md#getmailbatch) | **Get** /v3/mail/batch/{BatchId} | Validate a batch ID. -*SendMail* | [**SendMail**](docs/SendMail.md#sendmail) | **Post** /v3/mail/send | Send Email with Twilio SendGrid. - - -## Documentation For Models - - - [ContentEncoding](ContentEncoding.md) - - [Disposition](Disposition.md) - - [ErrorResponse](ErrorResponse.md) - - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) - - [MailBatchResponse](MailBatchResponse.md) - - [MailFrom](MailFrom.md) - - [MailTo](MailTo.md) - - [SendMailRequest](SendMailRequest.md) - - [SendMailRequestAsm](SendMailRequestAsm.md) - - [SendMailRequestAttachmentsInner](SendMailRequestAttachmentsInner.md) - - [SendMailRequestContentInner](SendMailRequestContentInner.md) - - [SendMailRequestMailSettings](SendMailRequestMailSettings.md) - - [SendMailRequestMailSettingsBypassBounceManagement](SendMailRequestMailSettingsBypassBounceManagement.md) - - [SendMailRequestMailSettingsBypassListManagement](SendMailRequestMailSettingsBypassListManagement.md) - - [SendMailRequestMailSettingsBypassSpamManagement](SendMailRequestMailSettingsBypassSpamManagement.md) - - [SendMailRequestMailSettingsBypassUnsubscribeManagement](SendMailRequestMailSettingsBypassUnsubscribeManagement.md) - - [SendMailRequestMailSettingsFooter](SendMailRequestMailSettingsFooter.md) - - [SendMailRequestMailSettingsSandboxMode](SendMailRequestMailSettingsSandboxMode.md) - - [SendMailRequestPersonalizationsInner](SendMailRequestPersonalizationsInner.md) - - [SendMailRequestTrackingSettings](SendMailRequestTrackingSettings.md) - - [SendMailRequestTrackingSettingsClickTracking](SendMailRequestTrackingSettingsClickTracking.md) - - [SendMailRequestTrackingSettingsGanalytics](SendMailRequestTrackingSettingsGanalytics.md) - - [SendMailRequestTrackingSettingsOpenTracking](SendMailRequestTrackingSettingsOpenTracking.md) - - [SendMailRequestTrackingSettingsSubscriptionTracking](SendMailRequestTrackingSettingsSubscriptionTracking.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/mail/api_create_mail_batch.go b/rest/api/v3/mail/api_create_mail_batch.go deleted file mode 100644 index d18fdc47..00000000 --- a/rest/api/v3/mail/api_create_mail_batch.go +++ /dev/null @@ -1,107 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail API -* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type CreateMailBatchParam struct { - // Use the `on-behalf-of` header to make API calls for a particular Subuser through the parent account. You can use this header to automate bulk updates or to administer a Subuser without changing the authentication in your code. You will use the parent account's API key when using this header. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *CreateMailBatchParam) SetOnbehalfof(Onbehalfof string) *CreateMailBatchParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This operation allows you to generate a new mail batch ID.** Once a batch ID is created, you can associate it with a mail send by passing it in the request body of the [Mail Send operation](https://docs.sendgrid.com/api-reference/mail-send/mail-send). This makes it possible to group multiple requests to the Mail Send operation by assigning them the same batch ID. A batch ID that's associated with a mail send can be used to access and modify the associated send. For example, you can pause or cancel a send using its batch ID. See the [Scheduled Sends API](https://www.twilio.com/docs/sendgrid/api-reference/cancel-scheduled-sends) for more information about pausing and cancelling a mail send. -func (c *ApiService) CreateMailBatch(params *CreateMailBatchParam) (interface{}, error) { - path := "/v3/mail/batch" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &MailBatchResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 405 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mail/api_get_mail_batch.go b/rest/api/v3/mail/api_get_mail_batch.go deleted file mode 100644 index ef16d225..00000000 --- a/rest/api/v3/mail/api_get_mail_batch.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail API -* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type GetMailBatchParam struct { - // Use the `on-behalf-of` header to make API calls for a particular Subuser through the parent account. You can use this header to automate bulk updates or to administer a Subuser without changing the authentication in your code. You will use the parent account's API key when using this header. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetMailBatchParam) SetOnbehalfof(Onbehalfof string) *GetMailBatchParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This operation allows you to validate a mail batch ID.** If you provide a valid batch ID, this operation will return a `200` status code and the batch ID itself. If you provide an invalid batch ID, you will receive a `400` level status code and an error message. A batch ID does not need to be assigned to a send to be considered valid. A successful response means only that the batch ID has been created, but it does not indicate that the ID has been assigned to a send. -func (c *ApiService) GetMailBatch(params *GetMailBatchParam) (interface{}, error) { - path := "/v3/mail/batch/{BatchId}" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &MailBatchResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 405 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mail/api_send_mail.go b/rest/api/v3/mail/api_send_mail.go deleted file mode 100644 index e697d176..00000000 --- a/rest/api/v3/mail/api_send_mail.go +++ /dev/null @@ -1,122 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail API -* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type SendMailParam struct { - // Use this header when sending a gzip compressed mail body. Mail body compression is available to some high volume accounts. Submit a [request to support](https://support.sendgrid.com/hc/en-us) to have gzip enabled on your account. - ContentEncoding *ContentEncoding `json:"Content-Encoding,omitempty"` - // - SendMailRequest *SendMailRequest `json:"SendMailRequest,omitempty"` -} - -func (params *SendMailParam) SetContentEncoding(ContentEncoding ContentEncoding) *SendMailParam { - params.ContentEncoding = &ContentEncoding - return params -} -func (params *SendMailParam) SetSendMailRequest(SendMailRequest SendMailRequest) *SendMailParam { - params.SendMailRequest = &SendMailRequest - return params -} - -// *The Mail Send operation allows you to send email over SendGrid's v3 Web API* For an overview of this API, including its features and limitations, please see the [Mail Send API overview page](https://www.twilio.com/docs/sendgrid/api-reference/mail-send) The overview page also includes links to SendGrid's Email API quickstarts and helper libraries to get you working with this endpoint even faster. -func (c *ApiService) SendMail(params *SendMailParam) (interface{}, error) { - path := "/v3/mail/send" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.SendMailRequest != nil { - b, err := json.Marshal(*params.SendMailRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.ContentEncoding != nil { - headers["Content-Encoding"] = *params.ContentEncoding - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 405 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 413 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil -} diff --git a/rest/api/v3/mail/api_service.go b/rest/api/v3/mail/api_service.go deleted file mode 100644 index 0ca11aea..00000000 --- a/rest/api/v3/mail/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail API -* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/mail/docs/ContentEncoding.md b/rest/api/v3/mail/docs/ContentEncoding.md deleted file mode 100644 index d7abc43b..00000000 --- a/rest/api/v3/mail/docs/ContentEncoding.md +++ /dev/null @@ -1,12 +0,0 @@ -# ContentEncoding - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**GZIP** | string | (value: `"gzip"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail/docs/CreateMailBatch.md b/rest/api/v3/mail/docs/CreateMailBatch.md deleted file mode 100644 index f1daaa8b..00000000 --- a/rest/api/v3/mail/docs/CreateMailBatch.md +++ /dev/null @@ -1,48 +0,0 @@ -# CreateMailBatch - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateMailBatch**](CreateMailBatch.md#CreateMailBatch) | **Post** /v3/mail/batch | Create a batch ID. - - - -## CreateMailBatch - -> MailBatchResponse CreateMailBatch(ctx, optional) - -Create a batch ID. - -**This operation allows you to generate a new mail batch ID.** Once a batch ID is created, you can associate it with a mail send by passing it in the request body of the [Mail Send operation](https://docs.sendgrid.com/api-reference/mail-send/mail-send). This makes it possible to group multiple requests to the Mail Send operation by assigning them the same batch ID. A batch ID that's associated with a mail send can be used to access and modify the associated send. For example, you can pause or cancel a send using its batch ID. See the [Scheduled Sends API](https://www.twilio.com/docs/sendgrid/api-reference/cancel-scheduled-sends) for more information about pausing and cancelling a mail send. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateMailBatchParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | Use the `on-behalf-of` header to make API calls for a particular Subuser through the parent account. You can use this header to automate bulk updates or to administer a Subuser without changing the authentication in your code. You will use the parent account's API key when using this header. - -### Return type - -[**MailBatchResponse**](MailBatchResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mail/docs/Disposition.md b/rest/api/v3/mail/docs/Disposition.md deleted file mode 100644 index 6240774b..00000000 --- a/rest/api/v3/mail/docs/Disposition.md +++ /dev/null @@ -1,13 +0,0 @@ -# Disposition - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**INLINE** | string | (value: `"inline"`) -**ATTACHMENT** | string | (value: `"attachment"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail/docs/ErrorResponse.md b/rest/api/v3/mail/docs/ErrorResponse.md deleted file mode 100644 index ec2d41f6..00000000 --- a/rest/api/v3/mail/docs/ErrorResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ErrorResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] -**Id** | **string** | When applicable, this property value will be an error ID. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail/docs/ErrorResponseErrorsInner.md b/rest/api/v3/mail/docs/ErrorResponseErrorsInner.md deleted file mode 100644 index 5449c685..00000000 --- a/rest/api/v3/mail/docs/ErrorResponseErrorsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ErrorResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | An error message. |[optional] -**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] -**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail/docs/GetMailBatch.md b/rest/api/v3/mail/docs/GetMailBatch.md deleted file mode 100644 index 2257a3fc..00000000 --- a/rest/api/v3/mail/docs/GetMailBatch.md +++ /dev/null @@ -1,48 +0,0 @@ -# GetMailBatch - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetMailBatch**](GetMailBatch.md#GetMailBatch) | **Get** /v3/mail/batch/{BatchId} | Validate a batch ID. - - - -## GetMailBatch - -> MailBatchResponse GetMailBatch(ctx, optional) - -Validate a batch ID. - -**This operation allows you to validate a mail batch ID.** If you provide a valid batch ID, this operation will return a `200` status code and the batch ID itself. If you provide an invalid batch ID, you will receive a `400` level status code and an error message. A batch ID does not need to be assigned to a send to be considered valid. A successful response means only that the batch ID has been created, but it does not indicate that the ID has been assigned to a send. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a GetMailBatchParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | Use the `on-behalf-of` header to make API calls for a particular Subuser through the parent account. You can use this header to automate bulk updates or to administer a Subuser without changing the authentication in your code. You will use the parent account's API key when using this header. - -### Return type - -[**MailBatchResponse**](MailBatchResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mail/docs/MailBatchResponse.md b/rest/api/v3/mail/docs/MailBatchResponse.md deleted file mode 100644 index 8103caed..00000000 --- a/rest/api/v3/mail/docs/MailBatchResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# MailBatchResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**BatchId** | **string** | A mail batch ID. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail/docs/MailFrom.md b/rest/api/v3/mail/docs/MailFrom.md deleted file mode 100644 index 3f3d4873..00000000 --- a/rest/api/v3/mail/docs/MailFrom.md +++ /dev/null @@ -1,12 +0,0 @@ -# MailFrom - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | **string** | The email address from which messages are sent. This address should be a verified sender in your Twilio SendGrid account. Email addresses specified in `personalizations` will override addresses set at the message level outside of the `personalizations` object. | -**Name** | **string** | A name or title associated with the email address such as \"Support\" or \"Alex\". |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail/docs/MailTo.md b/rest/api/v3/mail/docs/MailTo.md deleted file mode 100644 index 70935e77..00000000 --- a/rest/api/v3/mail/docs/MailTo.md +++ /dev/null @@ -1,12 +0,0 @@ -# MailTo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | **string** | An email address to which a message is sent. Email addresses specified in `personalizations` will override addresses set at the message level outside of the `personalizations` object. | -**Name** | **string** | A name or title associated with the email address such as \"Alex\". |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail/docs/SendMail.md b/rest/api/v3/mail/docs/SendMail.md deleted file mode 100644 index 450ee26d..00000000 --- a/rest/api/v3/mail/docs/SendMail.md +++ /dev/null @@ -1,49 +0,0 @@ -# SendMail - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**SendMail**](SendMail.md#SendMail) | **Post** /v3/mail/send | Send Email with Twilio SendGrid. - - - -## SendMail - -> SendMail(ctx, optional) - -Send Email with Twilio SendGrid. - -*The Mail Send operation allows you to send email over SendGrid's v3 Web API* For an overview of this API, including its features and limitations, please see the [Mail Send API overview page](https://www.twilio.com/docs/sendgrid/api-reference/mail-send) The overview page also includes links to SendGrid's Email API quickstarts and helper libraries to get you working with this endpoint even faster. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a SendMailParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**ContentEncoding** | [**ContentEncoding**](ContentEncodingContentEncoding.md) | Use this header when sending a gzip compressed mail body. Mail body compression is available to some high volume accounts. Submit a [request to support](https://support.sendgrid.com/hc/en-us) to have gzip enabled on your account. -**SendMailRequest** | [**SendMailRequest**](SendMailRequest.md) | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mail/docs/SendMailRequest.md b/rest/api/v3/mail/docs/SendMailRequest.md deleted file mode 100644 index 0bebde09..00000000 --- a/rest/api/v3/mail/docs/SendMailRequest.md +++ /dev/null @@ -1,27 +0,0 @@ -# SendMailRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Personalizations** | [**[]SendMailRequestPersonalizationsInner**](SendMailRequestPersonalizationsInner.md) | An array of messages and their metadata. Each object within the `personalizations` array can be thought of as a mail envelope—it defines who should receive an individual message and how that message should be handled. See [**Personalizations**](https://sendgrid.com/docs/for-developers/sending-email/personalizations/) for more information. | -**From** | [**MailFrom**](MailFrom.md) | | -**ReplyTo** | [**MailTo**](MailTo.md) | |[optional] -**ReplyToList** | [**[]MailTo**](MailTo.md) | An array of recipients to whom replies will be sent. Each object in this array must contain a recipient's email address. Each object in the array may optionally contain a recipient's name. You can use either the `reply_to` property or `reply_to_list` property but not both. |[optional] -**Subject** | **string** | The global or _message level_ subject of your email. Subject lines set in personalizations objects will override this global subject line. See line length limits specified in [RFC 2822](https://www.rfc-editor.org/rfc/rfc2822#section-2.1.1) for guidance on subject line character limits. |[optional] -**Content** | [**[]SendMailRequestContentInner**](SendMailRequestContentInner.md) | An array of objects, each containing a message body's content and [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types). You must specify at least one MIME type and may include multiple. To include more than one MIME type, add an object for each type to the array. |[optional] -**Attachments** | [**[]SendMailRequestAttachmentsInner**](SendMailRequestAttachmentsInner.md) | An array of objects where you can define any attachments to be included with the message. Each object contains a `content` property, which must be a Base64 encoded string of the attachment itself, and `type`, `filename`, `disposition`, and `content_id` properties that tell SendGrid how to handle the attachment. |[optional] -**TemplateId** | **string** | An email template ID. A template that contains a subject and content—either text or html—will override any subject and content values specified at the `personalizations` or message level. If a template ID begins with `d-`, it is a dynamic template and will work with the `dynamic_template_data` property. If the template ID does not begin with `d-`, it is a standard SendGrid template and will work with the `substitutions` property. See [**How to Send an Email with Dynamic Templates**](https://docs.sendgrid.com/ui/sending-email/how-to-send-an-email-with-dynamic-templates) for more information about working with templates. |[optional] -**Headers** | **map[string]interface{}** | A collection of JSON property name and property value pairs allowing you to specify handling instructions for your email. You may not override the following headers: `x-sg-id`, `x-sg-eid`, `received`, `dkim-signature`, `Content-Type`, `Content-Transfer-Encoding`, `To`, `From`, `Subject`, `Reply-To`, `CC`, `BCC`. |[optional] -**Categories** | **[]string** | An array of category names assigned to this message. Categories allow you to group messages by categories you define. Categories should be used sparingly to create general groups that are relevant to you. Categories are not meant to be used to track individual mail sends. For more granular categorization and tracking, use the `custom_args` property. A category name cannot exceed 255 characters. See [**Working with Categories**](https://docs.sendgrid.com/for-developers/sending-email/categories) for more information. |[optional] -**CustomArgs** | **string** | Values that are specific to the entire send that will be carried along with the email and its activity data. Substitutions will not be made on custom arguments, so any string that is assigned to this property will be assumed to be the custom argument that you would like to be used. This parameter is overridden by `custom_args` set at the personalizations level. Total `custom_args` size may not exceed 10,000 bytes. |[optional] -**SendAt** | **int32** | A [unix timestamp](https://en.wikipedia.org/wiki/Unix_time) allowing you to specify when your email should be sent. A send cannot be scheduled more than 72 hours in advance. This property may be overridden by the `send_at` property set at the personalizations level. |[optional] -**BatchId** | **string** | An ID representing a batch of emails to be sent at the same time. Including a `batch_id` in your request allows you to include this email in that batch. It also enables you to cancel or pause the delivery of that batch. See the [Scheduled Sends API](https://sendgrid.com/docs/api-reference/) for more information about scheduling your email. |[optional] -**Asm** | [**SendMailRequestAsm**](SendMailRequestAsm.md) | |[optional] -**IpPoolName** | **string** | The IP Pool that you would like to send this email from. IP Pools allow you to group your dedicated Twilio SendGrid IP addresses in order to have more control over your deliverability. See [**IP Pools**](https://docs.sendgrid.com/ui/account-and-settings/ip-pools) for more information. |[optional] -**MailSettings** | [**SendMailRequestMailSettings**](SendMailRequestMailSettings.md) | |[optional] -**TrackingSettings** | [**SendMailRequestTrackingSettings**](SendMailRequestTrackingSettings.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail/docs/SendMailRequestAsm.md b/rest/api/v3/mail/docs/SendMailRequestAsm.md deleted file mode 100644 index b8759b63..00000000 --- a/rest/api/v3/mail/docs/SendMailRequestAsm.md +++ /dev/null @@ -1,12 +0,0 @@ -# SendMailRequestAsm - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**GroupId** | **int32** | The unsubscribe group to associate with this email. See the [Suppressions API](https://docs.sendgrid.com/api-reference/suppressions/) to manage unsubscribe group IDs. | -**GroupsToDisplay** | **[]int32** | An array containing the unsubscribe groups that you would like to be displayed to a recipient on the unsubscribe preferences page. This page is displayed in the recipient's browser when they click the unsubscribe link in your message. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail/docs/SendMailRequestAttachmentsInner.md b/rest/api/v3/mail/docs/SendMailRequestAttachmentsInner.md deleted file mode 100644 index a58a0d58..00000000 --- a/rest/api/v3/mail/docs/SendMailRequestAttachmentsInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# SendMailRequestAttachmentsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Content** | **string** | The Base64 encoded content of the attachment. | -**Type** | **string** | The MIME type of the content you are attaching (e.g., `image/jpeg` or `application/pdf`). |[optional] -**Filename** | **string** | The attachment's filename, including the file extension. | -**Disposition** | [**Disposition**](Disposition.md) | The attachment's content-disposition specifies how you would like the attachment to be displayed. For example, `inline` results in the attached file being displayed automatically within the message while `attachment` results in the attached file requiring some action to be taken before it is displayed such as opening or downloading the file. |[optional] -**ContentId** | **string** | The attachment's content ID. The `content_id` is used when the `disposition` is set to `inline` and the attachment is an image, allowing the file to be displayed within the body of the email. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail/docs/SendMailRequestContentInner.md b/rest/api/v3/mail/docs/SendMailRequestContentInner.md deleted file mode 100644 index 43c2ae52..00000000 --- a/rest/api/v3/mail/docs/SendMailRequestContentInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# SendMailRequestContentInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | The MIME type of the content assigned in the `value` property of this object (e.g., `text/plain` or `text/html`). | -**Value** | **string** | The content of your message in the specified MIME type assigned in the `type` property of this object. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail/docs/SendMailRequestMailSettings.md b/rest/api/v3/mail/docs/SendMailRequestMailSettings.md deleted file mode 100644 index c78c164d..00000000 --- a/rest/api/v3/mail/docs/SendMailRequestMailSettings.md +++ /dev/null @@ -1,16 +0,0 @@ -# SendMailRequestMailSettings - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**BypassListManagement** | [**SendMailRequestMailSettingsBypassListManagement**](SendMailRequestMailSettingsBypassListManagement.md) | |[optional] -**BypassSpamManagement** | [**SendMailRequestMailSettingsBypassSpamManagement**](SendMailRequestMailSettingsBypassSpamManagement.md) | |[optional] -**BypassBounceManagement** | [**SendMailRequestMailSettingsBypassBounceManagement**](SendMailRequestMailSettingsBypassBounceManagement.md) | |[optional] -**BypassUnsubscribeManagement** | [**SendMailRequestMailSettingsBypassUnsubscribeManagement**](SendMailRequestMailSettingsBypassUnsubscribeManagement.md) | |[optional] -**Footer** | [**SendMailRequestMailSettingsFooter**](SendMailRequestMailSettingsFooter.md) | |[optional] -**SandboxMode** | [**SendMailRequestMailSettingsSandboxMode**](SendMailRequestMailSettingsSandboxMode.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassBounceManagement.md b/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassBounceManagement.md deleted file mode 100644 index 56893dd4..00000000 --- a/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassBounceManagement.md +++ /dev/null @@ -1,11 +0,0 @@ -# SendMailRequestMailSettingsBypassBounceManagement - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enable** | **bool** | Indicates if this setting is enabled. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassListManagement.md b/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassListManagement.md deleted file mode 100644 index fa9c2c7f..00000000 --- a/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassListManagement.md +++ /dev/null @@ -1,11 +0,0 @@ -# SendMailRequestMailSettingsBypassListManagement - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enable** | **bool** | Indicates if this setting is enabled. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassSpamManagement.md b/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassSpamManagement.md deleted file mode 100644 index a64754af..00000000 --- a/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassSpamManagement.md +++ /dev/null @@ -1,11 +0,0 @@ -# SendMailRequestMailSettingsBypassSpamManagement - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enable** | **bool** | Indicates if this setting is enabled. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassUnsubscribeManagement.md b/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassUnsubscribeManagement.md deleted file mode 100644 index 0ba329fe..00000000 --- a/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassUnsubscribeManagement.md +++ /dev/null @@ -1,11 +0,0 @@ -# SendMailRequestMailSettingsBypassUnsubscribeManagement - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enable** | **bool** | Indicates if this setting is enabled. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail/docs/SendMailRequestMailSettingsFooter.md b/rest/api/v3/mail/docs/SendMailRequestMailSettingsFooter.md deleted file mode 100644 index 423727ed..00000000 --- a/rest/api/v3/mail/docs/SendMailRequestMailSettingsFooter.md +++ /dev/null @@ -1,13 +0,0 @@ -# SendMailRequestMailSettingsFooter - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enable** | **bool** | Indicates if this setting is enabled. |[optional] -**Text** | **string** | The plain text content of your footer. |[optional] -**Html** | **string** | The HTML content of your footer. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail/docs/SendMailRequestMailSettingsSandboxMode.md b/rest/api/v3/mail/docs/SendMailRequestMailSettingsSandboxMode.md deleted file mode 100644 index f23907e5..00000000 --- a/rest/api/v3/mail/docs/SendMailRequestMailSettingsSandboxMode.md +++ /dev/null @@ -1,11 +0,0 @@ -# SendMailRequestMailSettingsSandboxMode - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enable** | **bool** | Indicates if this setting is enabled. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail/docs/SendMailRequestPersonalizationsInner.md b/rest/api/v3/mail/docs/SendMailRequestPersonalizationsInner.md deleted file mode 100644 index f89200e5..00000000 --- a/rest/api/v3/mail/docs/SendMailRequestPersonalizationsInner.md +++ /dev/null @@ -1,20 +0,0 @@ -# SendMailRequestPersonalizationsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**From** | [**MailFrom**](MailFrom.md) | |[optional] -**To** | [**[]MailTo**](MailTo.md) | An array of recipients to whom the email will be sent. Each object in this array must contain a recipient's email address. Each object in the array may optionally contain a recipient's name. | -**Cc** | [**[]MailTo**](MailTo.md) | An array of recipients to whom a copy of the email will be sent. Each object in this array must contain a recipient's email address. Each object in the array may optionally contain a recipient's name. |[optional] -**Bcc** | [**[]MailTo**](MailTo.md) | An array of recipients to whom a blind carbon copy of your email will be sent. Each object in this array must contain a recipient's email address. Each object in the array may optionally contain a recipient's name. |[optional] -**Subject** | **string** | The subject of your email. See line length limits specified in [RFC 2822](https://www.rfc-editor.org/rfc/rfc2822#section-2.1.1) for guidance on subject line character limits. |[optional] -**Headers** | **map[string]interface{}** | A collection of JSON property name and property value pairs allowing you to specify handling instructions for your email. You may not override the following headers: `x-sg-id`, `x-sg-eid`, `received`, `dkim-signature`, `Content-Type`, `Content-Transfer-Encoding`, `To`, `From`, `Subject`, `Reply-To`, `CC`, `BCC`. |[optional] -**Substitutions** | **map[string]string** | A collection property names that will be substituted by their corresponding property values in the `subject`, `reply-to` and `content` portions of your message. Name and value pairs follow the pattern `\"substitution_tag\":\"value to substitute\"`. The total collective size of your substitutions may not exceed 10,000 bytes per personalization object. Substitutions allow you to insert data without using SendGrid's Dynamic Templates. This property should not be used in combination with a Dynamic Template, which can be identified by a `template_id` starting with `d-`. See [**Substitution Tags**](https://docs.sendgrid.com/for-developers/sending-email/substitution-tags) for more information. |[optional] -**DynamicTemplateData** | **map[string]interface{}** | A collection property names that will be substituted by their corresponding property values in the `subject`, `reply-to` and `content` portions of a SendGrid Dynamic Template. Dynamic template data is available in a template using [Handlebars](https://docs.sendgrid.com/for-developers/sending-email/using-handlebars) syntax. This property should be used in combination with a Dynamic Template, which can be identified by a `template_id` starting with `d-`. See [**How to Send an Email with Dynamic Templates**](https://docs.sendgrid.com/ui/sending-email/how-to-send-an-email-with-dynamic-templates) for more information. |[optional] -**CustomArgs** | **map[string]interface{}** | Values that are specific to this personalization that will be carried along with the email and its activity data. Substitutions will not be made on custom arguments, so any string that is assigned to this property will be assumed to be the custom argument that you would like to be used. This field may not exceed 10,000 bytes. |[optional] -**SendAt** | **int32** | A [unix timestamp](https://en.wikipedia.org/wiki/Unix_time) allowing you to specify when your email should be sent. A send cannot be scheduled more than 72 hours in advance. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail/docs/SendMailRequestTrackingSettings.md b/rest/api/v3/mail/docs/SendMailRequestTrackingSettings.md deleted file mode 100644 index f932f68f..00000000 --- a/rest/api/v3/mail/docs/SendMailRequestTrackingSettings.md +++ /dev/null @@ -1,14 +0,0 @@ -# SendMailRequestTrackingSettings - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ClickTracking** | [**SendMailRequestTrackingSettingsClickTracking**](SendMailRequestTrackingSettingsClickTracking.md) | |[optional] -**OpenTracking** | [**SendMailRequestTrackingSettingsOpenTracking**](SendMailRequestTrackingSettingsOpenTracking.md) | |[optional] -**SubscriptionTracking** | [**SendMailRequestTrackingSettingsSubscriptionTracking**](SendMailRequestTrackingSettingsSubscriptionTracking.md) | |[optional] -**Ganalytics** | [**SendMailRequestTrackingSettingsGanalytics**](SendMailRequestTrackingSettingsGanalytics.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsClickTracking.md b/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsClickTracking.md deleted file mode 100644 index ddcd5c9c..00000000 --- a/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsClickTracking.md +++ /dev/null @@ -1,12 +0,0 @@ -# SendMailRequestTrackingSettingsClickTracking - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enable** | **bool** | Indicates if this setting is enabled. |[optional] -**EnableText** | **bool** | Indicates if this setting should be included in the `text/plain` portion of your email. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsGanalytics.md b/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsGanalytics.md deleted file mode 100644 index 48a45e0f..00000000 --- a/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsGanalytics.md +++ /dev/null @@ -1,16 +0,0 @@ -# SendMailRequestTrackingSettingsGanalytics - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enable** | **bool** | Indicates if this setting is enabled. |[optional] -**UtmSource** | **string** | Name of the referrer source. (e.g., Google, SomeDomain.com, or Marketing Email) |[optional] -**UtmMedium** | **string** | Name of the marketing medium. (e.g., Email) |[optional] -**UtmTerm** | **string** | Used to identify any paid keywords. |[optional] -**UtmContent** | **string** | Used to differentiate your campaign from advertisements. |[optional] -**UtmCampaign** | **string** | The name of the campaign. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsOpenTracking.md b/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsOpenTracking.md deleted file mode 100644 index 79ee6662..00000000 --- a/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsOpenTracking.md +++ /dev/null @@ -1,12 +0,0 @@ -# SendMailRequestTrackingSettingsOpenTracking - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enable** | **bool** | Indicates if this setting is enabled. |[optional] -**SubstitutionTag** | **string** | Allows you to specify a substitution tag that you can insert in the body of your email at a location that you desire. This tag will be replaced by the open tracking pixel. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsSubscriptionTracking.md b/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsSubscriptionTracking.md deleted file mode 100644 index f4bb0483..00000000 --- a/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsSubscriptionTracking.md +++ /dev/null @@ -1,14 +0,0 @@ -# SendMailRequestTrackingSettingsSubscriptionTracking - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enable** | **bool** | Indicates if this setting is enabled. |[optional] -**Text** | **string** | Text to be appended to the email with the subscription tracking link. |[optional] -**Html** | **string** | HTML to be appended to the email with the subscription tracking link. |[optional] -**SubstitutionTag** | **string** | A tag that will be replaced with the unsubscribe URL. If this property is used, it will override both the `text` and `html` properties. The URL of the link will be placed at the substitution tag's location in the message body with no additional formatting. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail/model_content_encoding.go b/rest/api/v3/mail/model_content_encoding.go deleted file mode 100644 index 5f356d2c..00000000 --- a/rest/api/v3/mail/model_content_encoding.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail API -* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ContentEncoding the model 'ContentEncoding' -type ContentEncoding string - -// List of ContentEncoding -const ( - CONTENTENCODING_GZIP ContentEncoding = "gzip" -) diff --git a/rest/api/v3/mail/model_disposition.go b/rest/api/v3/mail/model_disposition.go deleted file mode 100644 index ca013977..00000000 --- a/rest/api/v3/mail/model_disposition.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail API -* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Disposition the model 'Disposition' -type Disposition string - -// List of Disposition -const ( - DISPOSITION_INLINE Disposition = "inline" - DISPOSITION_ATTACHMENT Disposition = "attachment" -) diff --git a/rest/api/v3/mail/model_error_response.go b/rest/api/v3/mail/model_error_response.go deleted file mode 100644 index e74c4c35..00000000 --- a/rest/api/v3/mail/model_error_response.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail API -* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponse struct for ErrorResponse -type ErrorResponse struct { - Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` - // When applicable, this property value will be an error ID. - Id *string `json:"id,omitempty"` -} diff --git a/rest/api/v3/mail/model_error_response_errors_inner.go b/rest/api/v3/mail/model_error_response_errors_inner.go deleted file mode 100644 index d73b63c2..00000000 --- a/rest/api/v3/mail/model_error_response_errors_inner.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail API -* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner -type ErrorResponseErrorsInner struct { - // An error message. - Message *string `json:"message,omitempty"` - // When applicable, this property value will be the field that generated the error. - Field *string `json:"field,omitempty"` - // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. - Help *map[string]interface{} `json:"help,omitempty"` -} diff --git a/rest/api/v3/mail/model_mail_batch_response.go b/rest/api/v3/mail/model_mail_batch_response.go deleted file mode 100644 index 5c4311c1..00000000 --- a/rest/api/v3/mail/model_mail_batch_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail API -* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// MailBatchResponse struct for MailBatchResponse -type MailBatchResponse struct { - // A mail batch ID. - BatchId *string `json:"batch_id,omitempty"` -} diff --git a/rest/api/v3/mail/model_mail_from.go b/rest/api/v3/mail/model_mail_from.go deleted file mode 100644 index e055fe14..00000000 --- a/rest/api/v3/mail/model_mail_from.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail API -* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// MailFrom struct for MailFrom -type MailFrom struct { - // The email address from which messages are sent. This address should be a verified sender in your Twilio SendGrid account. Email addresses specified in `personalizations` will override addresses set at the message level outside of the `personalizations` object. - Email string `json:"email"` - // A name or title associated with the email address such as \"Support\" or \"Alex\". - Name *string `json:"name,omitempty"` -} diff --git a/rest/api/v3/mail/model_mail_to.go b/rest/api/v3/mail/model_mail_to.go deleted file mode 100644 index e0b3d749..00000000 --- a/rest/api/v3/mail/model_mail_to.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail API -* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// MailTo struct for MailTo -type MailTo struct { - // An email address to which a message is sent. Email addresses specified in `personalizations` will override addresses set at the message level outside of the `personalizations` object. - Email string `json:"email"` - // A name or title associated with the email address such as \"Alex\". - Name *string `json:"name,omitempty"` -} diff --git a/rest/api/v3/mail/model_send_mail_request.go b/rest/api/v3/mail/model_send_mail_request.go deleted file mode 100644 index 224118e1..00000000 --- a/rest/api/v3/mail/model_send_mail_request.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail API -* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SendMailRequest struct for SendMailRequest -type SendMailRequest struct { - // An array of messages and their metadata. Each object within the `personalizations` array can be thought of as a mail envelope—it defines who should receive an individual message and how that message should be handled. See [**Personalizations**](https://sendgrid.com/docs/for-developers/sending-email/personalizations/) for more information. - Personalizations []SendMailRequestPersonalizationsInner `json:"personalizations"` - From MailFrom `json:"from"` - ReplyTo *MailTo `json:"reply_to,omitempty"` - // An array of recipients to whom replies will be sent. Each object in this array must contain a recipient's email address. Each object in the array may optionally contain a recipient's name. You can use either the `reply_to` property or `reply_to_list` property but not both. - ReplyToList *[]MailTo `json:"reply_to_list,omitempty"` - // The global or _message level_ subject of your email. Subject lines set in personalizations objects will override this global subject line. See line length limits specified in [RFC 2822](https://www.rfc-editor.org/rfc/rfc2822#section-2.1.1) for guidance on subject line character limits. - Subject *string `json:"subject,omitempty"` - // An array of objects, each containing a message body's content and [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types). You must specify at least one MIME type and may include multiple. To include more than one MIME type, add an object for each type to the array. - Content *[]SendMailRequestContentInner `json:"content,omitempty"` - // An array of objects where you can define any attachments to be included with the message. Each object contains a `content` property, which must be a Base64 encoded string of the attachment itself, and `type`, `filename`, `disposition`, and `content_id` properties that tell SendGrid how to handle the attachment. - Attachments *[]SendMailRequestAttachmentsInner `json:"attachments,omitempty"` - // An email template ID. A template that contains a subject and content—either text or html—will override any subject and content values specified at the `personalizations` or message level. If a template ID begins with `d-`, it is a dynamic template and will work with the `dynamic_template_data` property. If the template ID does not begin with `d-`, it is a standard SendGrid template and will work with the `substitutions` property. See [**How to Send an Email with Dynamic Templates**](https://docs.sendgrid.com/ui/sending-email/how-to-send-an-email-with-dynamic-templates) for more information about working with templates. - TemplateId *string `json:"template_id,omitempty"` - // A collection of JSON property name and property value pairs allowing you to specify handling instructions for your email. You may not override the following headers: `x-sg-id`, `x-sg-eid`, `received`, `dkim-signature`, `Content-Type`, `Content-Transfer-Encoding`, `To`, `From`, `Subject`, `Reply-To`, `CC`, `BCC`. - Headers *map[string]interface{} `json:"headers,omitempty"` - // An array of category names assigned to this message. Categories allow you to group messages by categories you define. Categories should be used sparingly to create general groups that are relevant to you. Categories are not meant to be used to track individual mail sends. For more granular categorization and tracking, use the `custom_args` property. A category name cannot exceed 255 characters. See [**Working with Categories**](https://docs.sendgrid.com/for-developers/sending-email/categories) for more information. - Categories *[]string `json:"categories,omitempty"` - // Values that are specific to the entire send that will be carried along with the email and its activity data. Substitutions will not be made on custom arguments, so any string that is assigned to this property will be assumed to be the custom argument that you would like to be used. This parameter is overridden by `custom_args` set at the personalizations level. Total `custom_args` size may not exceed 10,000 bytes. - CustomArgs *string `json:"custom_args,omitempty"` - // A [unix timestamp](https://en.wikipedia.org/wiki/Unix_time) allowing you to specify when your email should be sent. A send cannot be scheduled more than 72 hours in advance. This property may be overridden by the `send_at` property set at the personalizations level. - SendAt *int32 `json:"send_at,omitempty"` - // An ID representing a batch of emails to be sent at the same time. Including a `batch_id` in your request allows you to include this email in that batch. It also enables you to cancel or pause the delivery of that batch. See the [Scheduled Sends API](https://sendgrid.com/docs/api-reference/) for more information about scheduling your email. - BatchId *string `json:"batch_id,omitempty"` - Asm *SendMailRequestAsm `json:"asm,omitempty"` - // The IP Pool that you would like to send this email from. IP Pools allow you to group your dedicated Twilio SendGrid IP addresses in order to have more control over your deliverability. See [**IP Pools**](https://docs.sendgrid.com/ui/account-and-settings/ip-pools) for more information. - IpPoolName *string `json:"ip_pool_name,omitempty"` - MailSettings *SendMailRequestMailSettings `json:"mail_settings,omitempty"` - TrackingSettings *SendMailRequestTrackingSettings `json:"tracking_settings,omitempty"` -} diff --git a/rest/api/v3/mail/model_send_mail_request_asm.go b/rest/api/v3/mail/model_send_mail_request_asm.go deleted file mode 100644 index 7d2afe19..00000000 --- a/rest/api/v3/mail/model_send_mail_request_asm.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail API -* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SendMailRequestAsm An object allowing you to specify how to handle unsubscribes. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. See [**Suppression Groups**](https://www.twilio.com/docs/sendgrid/api-reference/suppressions-unsubscribe-groups/create-a-new-suppression-group) for more information. -type SendMailRequestAsm struct { - // The unsubscribe group to associate with this email. See the [Suppressions API](https://docs.sendgrid.com/api-reference/suppressions/) to manage unsubscribe group IDs. - GroupId int32 `json:"group_id"` - // An array containing the unsubscribe groups that you would like to be displayed to a recipient on the unsubscribe preferences page. This page is displayed in the recipient's browser when they click the unsubscribe link in your message. - GroupsToDisplay *[]int32 `json:"groups_to_display,omitempty"` -} diff --git a/rest/api/v3/mail/model_send_mail_request_attachments_inner.go b/rest/api/v3/mail/model_send_mail_request_attachments_inner.go deleted file mode 100644 index 9c39ef33..00000000 --- a/rest/api/v3/mail/model_send_mail_request_attachments_inner.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail API -* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SendMailRequestAttachmentsInner struct for SendMailRequestAttachmentsInner -type SendMailRequestAttachmentsInner struct { - // The Base64 encoded content of the attachment. - Content string `json:"content"` - // The MIME type of the content you are attaching (e.g., `image/jpeg` or `application/pdf`). - Type *string `json:"type,omitempty"` - // The attachment's filename, including the file extension. - Filename string `json:"filename"` - // The attachment's content-disposition specifies how you would like the attachment to be displayed. For example, `inline` results in the attached file being displayed automatically within the message while `attachment` results in the attached file requiring some action to be taken before it is displayed such as opening or downloading the file. - Disposition *Disposition `json:"disposition,omitempty"` - // The attachment's content ID. The `content_id` is used when the `disposition` is set to `inline` and the attachment is an image, allowing the file to be displayed within the body of the email. - ContentId *string `json:"content_id,omitempty"` -} diff --git a/rest/api/v3/mail/model_send_mail_request_content_inner.go b/rest/api/v3/mail/model_send_mail_request_content_inner.go deleted file mode 100644 index e5377596..00000000 --- a/rest/api/v3/mail/model_send_mail_request_content_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail API -* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SendMailRequestContentInner struct for SendMailRequestContentInner -type SendMailRequestContentInner struct { - // The MIME type of the content assigned in the `value` property of this object (e.g., `text/plain` or `text/html`). - Type string `json:"type"` - // The content of your message in the specified MIME type assigned in the `type` property of this object. - Value string `json:"value"` -} diff --git a/rest/api/v3/mail/model_send_mail_request_mail_settings.go b/rest/api/v3/mail/model_send_mail_request_mail_settings.go deleted file mode 100644 index b1ecabc9..00000000 --- a/rest/api/v3/mail/model_send_mail_request_mail_settings.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail API -* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SendMailRequestMailSettings A collection of different mail settings that you can use to specify how you would like this email to be handled. Mail settings provide extra functionality to your mail send. See [**Mail Settings**](https://docs.sendgrid.com/ui/account-and-settings/mail) for more information. -type SendMailRequestMailSettings struct { - BypassListManagement *SendMailRequestMailSettingsBypassListManagement `json:"bypass_list_management,omitempty"` - BypassSpamManagement *SendMailRequestMailSettingsBypassSpamManagement `json:"bypass_spam_management,omitempty"` - BypassBounceManagement *SendMailRequestMailSettingsBypassBounceManagement `json:"bypass_bounce_management,omitempty"` - BypassUnsubscribeManagement *SendMailRequestMailSettingsBypassUnsubscribeManagement `json:"bypass_unsubscribe_management,omitempty"` - Footer *SendMailRequestMailSettingsFooter `json:"footer,omitempty"` - SandboxMode *SendMailRequestMailSettingsSandboxMode `json:"sandbox_mode,omitempty"` -} diff --git a/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_bounce_management.go b/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_bounce_management.go deleted file mode 100644 index 7eb6b77e..00000000 --- a/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_bounce_management.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail API -* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SendMailRequestMailSettingsBypassBounceManagement Allows you to bypass the bounce list to ensure that the email is delivered to recipients. Spam report and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the `bypass_list_management` filter. See the [the \"Bypass suppressions\" section of our **Suppressions Overview**](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters. -type SendMailRequestMailSettingsBypassBounceManagement struct { - // Indicates if this setting is enabled. - Enable *bool `json:"enable,omitempty"` -} diff --git a/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_list_management.go b/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_list_management.go deleted file mode 100644 index c838c86b..00000000 --- a/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_list_management.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail API -* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SendMailRequestMailSettingsBypassListManagement Allows you to bypass all unsubscribe groups and suppressions to ensure that the email is delivered to every single recipient. This should only be used in emergencies when it is absolutely necessary that every recipient receives your email. This filter cannot be combined with any other bypass filters. See the [the \"Bypass suppressions\" section of our **Suppressions Overview**](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters. -type SendMailRequestMailSettingsBypassListManagement struct { - // Indicates if this setting is enabled. - Enable *bool `json:"enable,omitempty"` -} diff --git a/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_spam_management.go b/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_spam_management.go deleted file mode 100644 index 0a81e09a..00000000 --- a/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_spam_management.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail API -* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SendMailRequestMailSettingsBypassSpamManagement Allows you to bypass the spam report list to ensure that the email is delivered to recipients. Bounce and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the `bypass_list_management` filter. See the [the \"Bypass suppressions\" section of our **Suppressions Overview**](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters. -type SendMailRequestMailSettingsBypassSpamManagement struct { - // Indicates if this setting is enabled. - Enable *bool `json:"enable,omitempty"` -} diff --git a/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_unsubscribe_management.go b/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_unsubscribe_management.go deleted file mode 100644 index b4990d41..00000000 --- a/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_unsubscribe_management.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail API -* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SendMailRequestMailSettingsBypassUnsubscribeManagement Allows you to bypass the global unsubscribe list to ensure that the email is delivered to recipients. Bounce and spam report lists will still be checked; addresses on these other lists will not receive the message. This filter applies only to global unsubscribes and will not bypass group unsubscribes. This filter cannot be combined with the `bypass_list_management` filter. See the [the \"Bypass suppressions\" section of our **Suppressions Overview**](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters. -type SendMailRequestMailSettingsBypassUnsubscribeManagement struct { - // Indicates if this setting is enabled. - Enable *bool `json:"enable,omitempty"` -} diff --git a/rest/api/v3/mail/model_send_mail_request_mail_settings_footer.go b/rest/api/v3/mail/model_send_mail_request_mail_settings_footer.go deleted file mode 100644 index b0fa2858..00000000 --- a/rest/api/v3/mail/model_send_mail_request_mail_settings_footer.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail API -* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SendMailRequestMailSettingsFooter Inserts a custom footer at the bottom of the text and HTML bodies of your messages. Use the `html` and `text` properties to include the content of the footers to be inserted. -type SendMailRequestMailSettingsFooter struct { - // Indicates if this setting is enabled. - Enable *bool `json:"enable,omitempty"` - // The plain text content of your footer. - Text *string `json:"text,omitempty"` - // The HTML content of your footer. - Html *string `json:"html,omitempty"` -} diff --git a/rest/api/v3/mail/model_send_mail_request_mail_settings_sandbox_mode.go b/rest/api/v3/mail/model_send_mail_request_mail_settings_sandbox_mode.go deleted file mode 100644 index f69f6280..00000000 --- a/rest/api/v3/mail/model_send_mail_request_mail_settings_sandbox_mode.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail API -* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SendMailRequestMailSettingsSandboxMode Sandbox Mode allows you to send a test email to ensure that your request body is valid and formatted correctly. -type SendMailRequestMailSettingsSandboxMode struct { - // Indicates if this setting is enabled. - Enable *bool `json:"enable,omitempty"` -} diff --git a/rest/api/v3/mail/model_send_mail_request_personalizations_inner.go b/rest/api/v3/mail/model_send_mail_request_personalizations_inner.go deleted file mode 100644 index ebcbc7d5..00000000 --- a/rest/api/v3/mail/model_send_mail_request_personalizations_inner.go +++ /dev/null @@ -1,37 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail API -* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SendMailRequestPersonalizationsInner struct for SendMailRequestPersonalizationsInner -type SendMailRequestPersonalizationsInner struct { - From *MailFrom `json:"from,omitempty"` - // An array of recipients to whom the email will be sent. Each object in this array must contain a recipient's email address. Each object in the array may optionally contain a recipient's name. - To []MailTo `json:"to"` - // An array of recipients to whom a copy of the email will be sent. Each object in this array must contain a recipient's email address. Each object in the array may optionally contain a recipient's name. - Cc *[]MailTo `json:"cc,omitempty"` - // An array of recipients to whom a blind carbon copy of your email will be sent. Each object in this array must contain a recipient's email address. Each object in the array may optionally contain a recipient's name. - Bcc *[]MailTo `json:"bcc,omitempty"` - // The subject of your email. See line length limits specified in [RFC 2822](https://www.rfc-editor.org/rfc/rfc2822#section-2.1.1) for guidance on subject line character limits. - Subject *string `json:"subject,omitempty"` - // A collection of JSON property name and property value pairs allowing you to specify handling instructions for your email. You may not override the following headers: `x-sg-id`, `x-sg-eid`, `received`, `dkim-signature`, `Content-Type`, `Content-Transfer-Encoding`, `To`, `From`, `Subject`, `Reply-To`, `CC`, `BCC`. - Headers *map[string]interface{} `json:"headers,omitempty"` - // A collection property names that will be substituted by their corresponding property values in the `subject`, `reply-to` and `content` portions of your message. Name and value pairs follow the pattern `\"substitution_tag\":\"value to substitute\"`. The total collective size of your substitutions may not exceed 10,000 bytes per personalization object. Substitutions allow you to insert data without using SendGrid's Dynamic Templates. This property should not be used in combination with a Dynamic Template, which can be identified by a `template_id` starting with `d-`. See [**Substitution Tags**](https://docs.sendgrid.com/for-developers/sending-email/substitution-tags) for more information. - Substitutions *map[string]string `json:"substitutions,omitempty"` - // A collection property names that will be substituted by their corresponding property values in the `subject`, `reply-to` and `content` portions of a SendGrid Dynamic Template. Dynamic template data is available in a template using [Handlebars](https://docs.sendgrid.com/for-developers/sending-email/using-handlebars) syntax. This property should be used in combination with a Dynamic Template, which can be identified by a `template_id` starting with `d-`. See [**How to Send an Email with Dynamic Templates**](https://docs.sendgrid.com/ui/sending-email/how-to-send-an-email-with-dynamic-templates) for more information. - DynamicTemplateData *map[string]interface{} `json:"dynamic_template_data,omitempty"` - // Values that are specific to this personalization that will be carried along with the email and its activity data. Substitutions will not be made on custom arguments, so any string that is assigned to this property will be assumed to be the custom argument that you would like to be used. This field may not exceed 10,000 bytes. - CustomArgs *map[string]interface{} `json:"custom_args,omitempty"` - // A [unix timestamp](https://en.wikipedia.org/wiki/Unix_time) allowing you to specify when your email should be sent. A send cannot be scheduled more than 72 hours in advance. - SendAt *int32 `json:"send_at,omitempty"` -} diff --git a/rest/api/v3/mail/model_send_mail_request_tracking_settings.go b/rest/api/v3/mail/model_send_mail_request_tracking_settings.go deleted file mode 100644 index 70621f0e..00000000 --- a/rest/api/v3/mail/model_send_mail_request_tracking_settings.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail API -* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SendMailRequestTrackingSettings Settings to determine how you would like to track the metrics of how your recipients interact with your email. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. -type SendMailRequestTrackingSettings struct { - ClickTracking *SendMailRequestTrackingSettingsClickTracking `json:"click_tracking,omitempty"` - OpenTracking *SendMailRequestTrackingSettingsOpenTracking `json:"open_tracking,omitempty"` - SubscriptionTracking *SendMailRequestTrackingSettingsSubscriptionTracking `json:"subscription_tracking,omitempty"` - Ganalytics *SendMailRequestTrackingSettingsGanalytics `json:"ganalytics,omitempty"` -} diff --git a/rest/api/v3/mail/model_send_mail_request_tracking_settings_click_tracking.go b/rest/api/v3/mail/model_send_mail_request_tracking_settings_click_tracking.go deleted file mode 100644 index 6c9c7e17..00000000 --- a/rest/api/v3/mail/model_send_mail_request_tracking_settings_click_tracking.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail API -* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SendMailRequestTrackingSettingsClickTracking Allows you to track if a recipient clicked a link in your email. -type SendMailRequestTrackingSettingsClickTracking struct { - // Indicates if this setting is enabled. - Enable *bool `json:"enable,omitempty"` - // Indicates if this setting should be included in the `text/plain` portion of your email. - EnableText *bool `json:"enable_text,omitempty"` -} diff --git a/rest/api/v3/mail/model_send_mail_request_tracking_settings_ganalytics.go b/rest/api/v3/mail/model_send_mail_request_tracking_settings_ganalytics.go deleted file mode 100644 index d3533334..00000000 --- a/rest/api/v3/mail/model_send_mail_request_tracking_settings_ganalytics.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail API -* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SendMailRequestTrackingSettingsGanalytics Allows you to enable tracking provided by Google Analytics. See [**Google Analytics and SendGrid Statistics**](https://docs.sendgrid.com/ui/analytics-and-reporting/google-analytics) for more information about this property. -type SendMailRequestTrackingSettingsGanalytics struct { - // Indicates if this setting is enabled. - Enable *bool `json:"enable,omitempty"` - // Name of the referrer source. (e.g., Google, SomeDomain.com, or Marketing Email) - UtmSource *string `json:"utm_source,omitempty"` - // Name of the marketing medium. (e.g., Email) - UtmMedium *string `json:"utm_medium,omitempty"` - // Used to identify any paid keywords. - UtmTerm *string `json:"utm_term,omitempty"` - // Used to differentiate your campaign from advertisements. - UtmContent *string `json:"utm_content,omitempty"` - // The name of the campaign. - UtmCampaign *string `json:"utm_campaign,omitempty"` -} diff --git a/rest/api/v3/mail/model_send_mail_request_tracking_settings_open_tracking.go b/rest/api/v3/mail/model_send_mail_request_tracking_settings_open_tracking.go deleted file mode 100644 index 90d6421e..00000000 --- a/rest/api/v3/mail/model_send_mail_request_tracking_settings_open_tracking.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail API -* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SendMailRequestTrackingSettingsOpenTracking Allows you to track if the email was opened by including a single transparent pixel image in the body of the message content. When the message is opened, a request for the pixel is sent. That request indicates to Twilio SendGrid that the message was opened. -type SendMailRequestTrackingSettingsOpenTracking struct { - // Indicates if this setting is enabled. - Enable *bool `json:"enable,omitempty"` - // Allows you to specify a substitution tag that you can insert in the body of your email at a location that you desire. This tag will be replaced by the open tracking pixel. - SubstitutionTag *string `json:"substitution_tag,omitempty"` -} diff --git a/rest/api/v3/mail/model_send_mail_request_tracking_settings_subscription_tracking.go b/rest/api/v3/mail/model_send_mail_request_tracking_settings_subscription_tracking.go deleted file mode 100644 index be8695e1..00000000 --- a/rest/api/v3/mail/model_send_mail_request_tracking_settings_subscription_tracking.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail API -* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SendMailRequestTrackingSettingsSubscriptionTracking Allows you to insert a subscription management link at the bottom of the text and HTML bodies of your email. If you would like to specify the location of the link within your email, you may use the `substitution_tag` property. -type SendMailRequestTrackingSettingsSubscriptionTracking struct { - // Indicates if this setting is enabled. - Enable *bool `json:"enable,omitempty"` - // Text to be appended to the email with the subscription tracking link. - Text *string `json:"text,omitempty"` - // HTML to be appended to the email with the subscription tracking link. - Html *string `json:"html,omitempty"` - // A tag that will be replaced with the unsubscribe URL. If this property is used, it will override both the `text` and `html` properties. The URL of the link will be placed at the substitution tag's location in the message body with no additional formatting. - SubstitutionTag *string `json:"substitution_tag,omitempty"` -} diff --git a/rest/api/v3/mail_settings/.openapi-generator b/rest/api/v3/mail_settings/.openapi-generator deleted file mode 100644 index 08f7a39b..00000000 --- a/rest/api/v3/mail_settings/.openapi-generator +++ /dev/null @@ -1,52 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_list_address_whitelist.go -api_list_bounce_purge.go -api_list_footer.go -api_list_forward_bounce.go -api_list_forward_spam.go -api_list_mail_setting.go -api_list_template.go -api_service.go -api_update_address_whitelist.go -api_update_bounce_purge.go -api_update_footer.go -api_update_forward_bounce.go -api_update_forward_spam.go -api_update_template.go -docs/ListAddressWhitelist.md -docs/ListBouncePurge.md -docs/ListFooter.md -docs/ListForwardBounce.md -docs/ListForwardSpam.md -docs/ListMailSetting.md -docs/ListMailSetting200Response.md -docs/ListMailSetting200ResponseResultInner.md -docs/ListTemplate.md -docs/MailSettingsAddressWhitelabel200.md -docs/MailSettingsBouncePurge.md -docs/MailSettingsFooter.md -docs/MailSettingsForwardBounce.md -docs/MailSettingsForwardSpam.md -docs/MailSettingsTemplate200.md -docs/UpdateAddressWhitelist.md -docs/UpdateAddressWhitelistRequest.md -docs/UpdateBouncePurge.md -docs/UpdateFooter.md -docs/UpdateForwardBounce.md -docs/UpdateForwardSpam.md -docs/UpdateTemplate.md -docs/UpdateTemplate200Response.md -docs/UpdateTemplateRequest.md -model_list_mail_setting_200_response.go -model_list_mail_setting_200_response_result_inner.go -model_mail_settings_address_whitelabel200.go -model_mail_settings_bounce_purge.go -model_mail_settings_footer.go -model_mail_settings_forward_bounce.go -model_mail_settings_forward_spam.go -model_mail_settings_template200.go -model_update_address_whitelist_request.go -model_update_template_200_response.go -model_update_template_request.go diff --git a/rest/api/v3/mail_settings/.openapi-generator-ignore b/rest/api/v3/mail_settings/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/mail_settings/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/mail_settings/README.md b/rest/api/v3/mail_settings/README.md deleted file mode 100644 index 25ab6357..00000000 --- a/rest/api/v3/mail_settings/README.md +++ /dev/null @@ -1,86 +0,0 @@ -# Go API client for - -The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. - -For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). - -You can also manage your Mail Settings in the Twilio SendGrid application user interface. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:37.970102+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*ListAddressWhitelist* | [**ListAddressWhitelist**](docs/ListAddressWhitelist.md#listaddresswhitelist) | **Get** /v3/mail_settings/address_whitelist | Retrieve address whitelist mail settings -*ListBouncePurge* | [**ListBouncePurge**](docs/ListBouncePurge.md#listbouncepurge) | **Get** /v3/mail_settings/bounce_purge | Retrieve bounce purge mail settings -*ListFooter* | [**ListFooter**](docs/ListFooter.md#listfooter) | **Get** /v3/mail_settings/footer | Retrieve footer mail settings -*ListForwardBounce* | [**ListForwardBounce**](docs/ListForwardBounce.md#listforwardbounce) | **Get** /v3/mail_settings/forward_bounce | Retrieve forward bounce mail settings -*ListForwardSpam* | [**ListForwardSpam**](docs/ListForwardSpam.md#listforwardspam) | **Get** /v3/mail_settings/forward_spam | Retrieve forward spam mail settings -*ListMailSetting* | [**ListMailSetting**](docs/ListMailSetting.md#listmailsetting) | **Get** /v3/mail_settings | Retrieve all mail settings -*ListTemplate* | [**ListTemplate**](docs/ListTemplate.md#listtemplate) | **Get** /v3/mail_settings/template | Retrieve legacy template mail settings -*UpdateAddressWhitelist* | [**UpdateAddressWhitelist**](docs/UpdateAddressWhitelist.md#updateaddresswhitelist) | **Patch** /v3/mail_settings/address_whitelist | Update address whitelist mail settings -*UpdateBouncePurge* | [**UpdateBouncePurge**](docs/UpdateBouncePurge.md#updatebouncepurge) | **Patch** /v3/mail_settings/bounce_purge | Update bounce purge mail settings -*UpdateFooter* | [**UpdateFooter**](docs/UpdateFooter.md#updatefooter) | **Patch** /v3/mail_settings/footer | Update footer mail settings -*UpdateForwardBounce* | [**UpdateForwardBounce**](docs/UpdateForwardBounce.md#updateforwardbounce) | **Patch** /v3/mail_settings/forward_bounce | Update forward bounce mail settings -*UpdateForwardSpam* | [**UpdateForwardSpam**](docs/UpdateForwardSpam.md#updateforwardspam) | **Patch** /v3/mail_settings/forward_spam | Update forward spam mail settings -*UpdateTemplate* | [**UpdateTemplate**](docs/UpdateTemplate.md#updatetemplate) | **Patch** /v3/mail_settings/template | Update template mail settings - - -## Documentation For Models - - - [ListMailSetting200Response](ListMailSetting200Response.md) - - [ListMailSetting200ResponseResultInner](ListMailSetting200ResponseResultInner.md) - - [MailSettingsAddressWhitelabel200](MailSettingsAddressWhitelabel200.md) - - [MailSettingsBouncePurge](MailSettingsBouncePurge.md) - - [MailSettingsFooter](MailSettingsFooter.md) - - [MailSettingsForwardBounce](MailSettingsForwardBounce.md) - - [MailSettingsForwardSpam](MailSettingsForwardSpam.md) - - [MailSettingsTemplate200](MailSettingsTemplate200.md) - - [UpdateAddressWhitelistRequest](UpdateAddressWhitelistRequest.md) - - [UpdateTemplate200Response](UpdateTemplate200Response.md) - - [UpdateTemplateRequest](UpdateTemplateRequest.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/mail_settings/api_list_address_whitelist.go b/rest/api/v3/mail_settings/api_list_address_whitelist.go deleted file mode 100644 index 6929ed4f..00000000 --- a/rest/api/v3/mail_settings/api_list_address_whitelist.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail Settings API -* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListAddressWhitelistParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListAddressWhitelistParam) SetOnbehalfof(Onbehalfof string) *ListAddressWhitelistParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve your current email address whitelist settings.** The Address Whitelist setting allows you to specify email addresses or domains for which mail should never be suppressed. For example, if you own the domain `example.com`, and one or more of your recipients use `email@example.com` addresses, placing `example.com` in the address whitelist setting instructs Twilio SendGrid to ignore all bounces, blocks, and unsubscribes logged for that domain. In other words, all bounces, blocks, and unsubscribes will still be sent to `example.com` as if they were sent under normal sending conditions. -func (c *ApiService) ListAddressWhitelist(params *ListAddressWhitelistParam) (interface{}, error) { - path := "/v3/mail_settings/address_whitelist" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &MailSettingsAddressWhitelabel200{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mail_settings/api_list_bounce_purge.go b/rest/api/v3/mail_settings/api_list_bounce_purge.go deleted file mode 100644 index 0bea59cb..00000000 --- a/rest/api/v3/mail_settings/api_list_bounce_purge.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail Settings API -* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListBouncePurgeParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListBouncePurgeParam) SetOnbehalfof(Onbehalfof string) *ListBouncePurgeParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve your current bounce and purge settings.** The Bounce Perge setting allows you to set a schedule that Twilio SendGrid will use to automatically delete contacts from your soft and hard bounce suppression lists. A hard bounce occurs when an email message has been returned to the sender because the recipient's address is invalid. A hard bounce might occur because the domain name doesn't exist or because the recipient is unknown. A soft bounce occurs when an email message reaches the recipient's mail server but is bounced back undelivered before it actually reaches the recipient. A soft bounce might occur because the recipient's inbox is full. You can also manage this setting in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). You can manage your bounces manually using the [Bounces API](https://docs.sendgrid.com/api-reference/bounces-api) or the [Bounces menu in the Twilio SendGrid App](https://app.sendgrid.com/suppressions/bounces). -func (c *ApiService) ListBouncePurge(params *ListBouncePurgeParam) (interface{}, error) { - path := "/v3/mail_settings/bounce_purge" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &MailSettingsBouncePurge{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mail_settings/api_list_footer.go b/rest/api/v3/mail_settings/api_list_footer.go deleted file mode 100644 index d4b4fa9b..00000000 --- a/rest/api/v3/mail_settings/api_list_footer.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail Settings API -* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListFooterParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListFooterParam) SetOnbehalfof(Onbehalfof string) *ListFooterParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve your current Footer mail settings.** The Footer setting will insert a custom footer at the bottom of your text and HTML email message bodies. You can insert your HTML or plain text directly using the \"Update footer mail settings\" endpoint, or you can create the footer using the [Mail Settings menu in the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). -func (c *ApiService) ListFooter(params *ListFooterParam) (interface{}, error) { - path := "/v3/mail_settings/footer" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &MailSettingsFooter{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mail_settings/api_list_forward_bounce.go b/rest/api/v3/mail_settings/api_list_forward_bounce.go deleted file mode 100644 index 0174fbe2..00000000 --- a/rest/api/v3/mail_settings/api_list_forward_bounce.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail Settings API -* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListForwardBounceParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListForwardBounceParam) SetOnbehalfof(Onbehalfof string) *ListForwardBounceParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve your current bounce forwarding mail settings.** Enabling the Forward Bounce setting allows you to specify `email` addresses to which bounce reports will be forwarded. This endpoint returns the email address you have set to receive forwarded bounces and an `enabled` status indicating if the setting is active. -func (c *ApiService) ListForwardBounce(params *ListForwardBounceParam) (interface{}, error) { - path := "/v3/mail_settings/forward_bounce" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &MailSettingsForwardBounce{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mail_settings/api_list_forward_spam.go b/rest/api/v3/mail_settings/api_list_forward_spam.go deleted file mode 100644 index da7a0f15..00000000 --- a/rest/api/v3/mail_settings/api_list_forward_spam.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail Settings API -* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListForwardSpamParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListForwardSpamParam) SetOnbehalfof(Onbehalfof string) *ListForwardSpamParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve your current Forward Spam mail settings.** Enabling the Forward Spam setting allows you to specify `email` addresses to which spam reports will be forwarded. This endpoint returns any email address(es) you have set to receive forwarded spam and an `enabled` status indicating if the setting is active. -func (c *ApiService) ListForwardSpam(params *ListForwardSpamParam) (interface{}, error) { - path := "/v3/mail_settings/forward_spam" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &MailSettingsForwardSpam{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mail_settings/api_list_mail_setting.go b/rest/api/v3/mail_settings/api_list_mail_setting.go deleted file mode 100644 index 926c57c4..00000000 --- a/rest/api/v3/mail_settings/api_list_mail_setting.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail Settings API -* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListMailSettingParam struct { - // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. - Limit *int32 `json:"limit,omitempty"` - // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. - Offset *int32 `json:"offset,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListMailSettingParam) SetLimit(Limit int32) *ListMailSettingParam { - params.Limit = &Limit - return params -} -func (params *ListMailSettingParam) SetOffset(Offset int32) *ListMailSettingParam { - params.Offset = &Offset - return params -} -func (params *ListMailSettingParam) SetOnbehalfof(Onbehalfof string) *ListMailSettingParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a paginated list of all mail settings.** Each setting will be returned with an `enabled` status set to `true` or `false` and a short description that explains what the setting does. You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. -func (c *ApiService) ListMailSetting(params *ListMailSettingParam) (interface{}, error) { - path := "/v3/mail_settings" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListMailSetting200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mail_settings/api_list_template.go b/rest/api/v3/mail_settings/api_list_template.go deleted file mode 100644 index a0634b10..00000000 --- a/rest/api/v3/mail_settings/api_list_template.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail Settings API -* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListTemplateParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListTemplateParam) SetOnbehalfof(Onbehalfof string) *ListTemplateParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve your current legacy email template settings.** This setting refers to our original email templates. We currently support more fully featured [Dynamic Transactional Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/). The legacy email template setting wraps an HTML template around your email content. This can be useful for sending out marketing email and/or other HTML formatted messages. For instructions on using legacy templates, see how to [\"Create and Edit Legacy Transactional Templates](https://sendgrid.com/docs/ui/sending-email/create-and-edit-legacy-transactional-templates/). For help migrating to our current template system, see [\"Migrating from Legacy Templates\"](https://sendgrid.com/docs/ui/sending-email/migrating-from-legacy-templates/). -func (c *ApiService) ListTemplate(params *ListTemplateParam) (interface{}, error) { - path := "/v3/mail_settings/template" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &MailSettingsTemplate200{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mail_settings/api_service.go b/rest/api/v3/mail_settings/api_service.go deleted file mode 100644 index e9a35ea3..00000000 --- a/rest/api/v3/mail_settings/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail Settings API -* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/mail_settings/api_update_address_whitelist.go b/rest/api/v3/mail_settings/api_update_address_whitelist.go deleted file mode 100644 index b57d5b2d..00000000 --- a/rest/api/v3/mail_settings/api_update_address_whitelist.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail Settings API -* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type UpdateAddressWhitelistParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - UpdateAddressWhitelistRequest *UpdateAddressWhitelistRequest `json:"UpdateAddressWhitelistRequest,omitempty"` -} - -func (params *UpdateAddressWhitelistParam) SetOnbehalfof(Onbehalfof string) *UpdateAddressWhitelistParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateAddressWhitelistParam) SetUpdateAddressWhitelistRequest(UpdateAddressWhitelistRequest UpdateAddressWhitelistRequest) *UpdateAddressWhitelistParam { - params.UpdateAddressWhitelistRequest = &UpdateAddressWhitelistRequest - return params -} - -// **This endpoint allows you to update your current email address whitelist settings.** You can select whether or not this setting should be enabled by assigning the `enabled` field a `true` or `false` value. Passing only the `enabled` field to this endpoint will not alter your current `list` of whitelist entries. However, any modifications to your `list` of entries will overwrite the entire list. For this reason, you must included all existing entries you wish to retain in your `list` in addition to any new entries you intend to add. To remove one or more `list` entries, pass a `list` with only the entries you wish to retain. You should not add generic domains such as `gmail.com` or `yahoo.com` in your `list` because your emails will not honor recipients' unsubscribes. This may cause a legal violation of [CAN-SPAM](https://sendgrid.com/docs/glossary/can-spam/) and could damage your sending reputation. The Address Whitelist setting allows you to specify email addresses or domains for which mail should never be suppressed. For example, if you own the domain `example.com`, and one or more of your recipients use `email@example.com` addresses, placing `example.com` in the address whitelist setting instructs Twilio SendGrid to ignore all bounces, blocks, and unsubscribes logged for that domain. In other words, all bounces, blocks, and unsubscribes will still be sent to `example.com` as if they were sent under normal sending conditions. -func (c *ApiService) UpdateAddressWhitelist(params *UpdateAddressWhitelistParam) (interface{}, error) { - path := "/v3/mail_settings/address_whitelist" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateAddressWhitelistRequest != nil { - b, err := json.Marshal(*params.UpdateAddressWhitelistRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &MailSettingsAddressWhitelabel200{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mail_settings/api_update_bounce_purge.go b/rest/api/v3/mail_settings/api_update_bounce_purge.go deleted file mode 100644 index 73420cd1..00000000 --- a/rest/api/v3/mail_settings/api_update_bounce_purge.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail Settings API -* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type UpdateBouncePurgeParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - MailSettingsBouncePurge *MailSettingsBouncePurge `json:"MailSettingsBouncePurge,omitempty"` -} - -func (params *UpdateBouncePurgeParam) SetOnbehalfof(Onbehalfof string) *UpdateBouncePurgeParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateBouncePurgeParam) SetMailSettingsBouncePurge(MailSettingsBouncePurge MailSettingsBouncePurge) *UpdateBouncePurgeParam { - params.MailSettingsBouncePurge = &MailSettingsBouncePurge - return params -} - -// **This endpoint allows you to update your current bounce and purge settings.** The Bounce Perge setting allows you to set a schedule that Twilio SendGrid will use to automatically delete contacts from your soft and hard bounce suppression lists. The schedule is set in full days by assigning the number of days, an integer, to the `soft_bounces` and/or `hard_bounces` fields. A hard bounce occurs when an email message has been returned to the sender because the recipient's address is invalid. A hard bounce might occur because the domain name doesn't exist or because the recipient is unknown. A soft bounce occurs when an email message reaches the recipient's mail server but is bounced back undelivered before it actually reaches the recipient. A soft bounce might occur because the recipient's inbox is full. You can also manage this setting in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). You can manage your bounces manually using the [Bounces API](https://docs.sendgrid.com/api-reference/bounces-api) or the [Bounces menu in the Twilio SendGrid App](https://app.sendgrid.com/suppressions/bounces). -func (c *ApiService) UpdateBouncePurge(params *UpdateBouncePurgeParam) (interface{}, error) { - path := "/v3/mail_settings/bounce_purge" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.MailSettingsBouncePurge != nil { - b, err := json.Marshal(*params.MailSettingsBouncePurge) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &MailSettingsBouncePurge{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mail_settings/api_update_footer.go b/rest/api/v3/mail_settings/api_update_footer.go deleted file mode 100644 index 0a10a4c5..00000000 --- a/rest/api/v3/mail_settings/api_update_footer.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail Settings API -* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type UpdateFooterParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - MailSettingsFooter *MailSettingsFooter `json:"MailSettingsFooter,omitempty"` -} - -func (params *UpdateFooterParam) SetOnbehalfof(Onbehalfof string) *UpdateFooterParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateFooterParam) SetMailSettingsFooter(MailSettingsFooter MailSettingsFooter) *UpdateFooterParam { - params.MailSettingsFooter = &MailSettingsFooter - return params -} - -// **This endpoint allows you to update your current Footer mail settings.** The Footer setting will insert a custom footer at the bottom of your text and HTML email message bodies. You can insert your HTML or plain text directly using this endpoint, or you can create the footer using the [Mail Settings menu in the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). -func (c *ApiService) UpdateFooter(params *UpdateFooterParam) (interface{}, error) { - path := "/v3/mail_settings/footer" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.MailSettingsFooter != nil { - b, err := json.Marshal(*params.MailSettingsFooter) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &MailSettingsFooter{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mail_settings/api_update_forward_bounce.go b/rest/api/v3/mail_settings/api_update_forward_bounce.go deleted file mode 100644 index 1d9950cc..00000000 --- a/rest/api/v3/mail_settings/api_update_forward_bounce.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail Settings API -* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type UpdateForwardBounceParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - MailSettingsForwardBounce *MailSettingsForwardBounce `json:"MailSettingsForwardBounce,omitempty"` -} - -func (params *UpdateForwardBounceParam) SetOnbehalfof(Onbehalfof string) *UpdateForwardBounceParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateForwardBounceParam) SetMailSettingsForwardBounce(MailSettingsForwardBounce MailSettingsForwardBounce) *UpdateForwardBounceParam { - params.MailSettingsForwardBounce = &MailSettingsForwardBounce - return params -} - -// **This endpoint allows you to update your current bounce forwarding mail settings.** Enabling the Forward Bounce setting allows you to specify an `email` address to which bounce reports will be forwarded. You can also configure the Forward Spam mail settings in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). -func (c *ApiService) UpdateForwardBounce(params *UpdateForwardBounceParam) (interface{}, error) { - path := "/v3/mail_settings/forward_bounce" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.MailSettingsForwardBounce != nil { - b, err := json.Marshal(*params.MailSettingsForwardBounce) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &MailSettingsForwardBounce{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mail_settings/api_update_forward_spam.go b/rest/api/v3/mail_settings/api_update_forward_spam.go deleted file mode 100644 index 2a5ea1d6..00000000 --- a/rest/api/v3/mail_settings/api_update_forward_spam.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail Settings API -* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type UpdateForwardSpamParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - MailSettingsForwardSpam *MailSettingsForwardSpam `json:"MailSettingsForwardSpam,omitempty"` -} - -func (params *UpdateForwardSpamParam) SetOnbehalfof(Onbehalfof string) *UpdateForwardSpamParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateForwardSpamParam) SetMailSettingsForwardSpam(MailSettingsForwardSpam MailSettingsForwardSpam) *UpdateForwardSpamParam { - params.MailSettingsForwardSpam = &MailSettingsForwardSpam - return params -} - -// **This endpoint allows you to update your current Forward Spam mail settings.** Enabling the Forward Spam setting allows you to specify `email` addresses to which spam reports will be forwarded. You can set multiple addresses by passing this endpoint a comma separated list of emails in a single string. ``` { \"email\": \"address1@example.com, address2@exapmle.com\", \"enabled\": true } ``` The Forward Spam setting may also be used to receive emails sent to `abuse@` and `postmaster@` role addresses if you have authenticated your domain. For example, if you authenticated `example.com` as your root domain and set a custom return path of `sub` for that domain, you could turn on Forward Spam, and any emails sent to `abuse@sub.example.com` or `postmaster@sub.example.com` would be forwarded to the email address you entered in the `email` field. You can authenticate your domain using the \"Authenticate a domain\" endpoint or in the [Sender Authentication section of the Twilio SendGrid App](https://app.sendgrid.com/settings/sender_auth). You can also configure the Forward Spam mail settings in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). -func (c *ApiService) UpdateForwardSpam(params *UpdateForwardSpamParam) (interface{}, error) { - path := "/v3/mail_settings/forward_spam" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.MailSettingsForwardSpam != nil { - b, err := json.Marshal(*params.MailSettingsForwardSpam) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &MailSettingsForwardSpam{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mail_settings/api_update_template.go b/rest/api/v3/mail_settings/api_update_template.go deleted file mode 100644 index 56a5d2f0..00000000 --- a/rest/api/v3/mail_settings/api_update_template.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail Settings API -* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type UpdateTemplateParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - UpdateTemplateRequest *UpdateTemplateRequest `json:"UpdateTemplateRequest,omitempty"` -} - -func (params *UpdateTemplateParam) SetOnbehalfof(Onbehalfof string) *UpdateTemplateParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateTemplateParam) SetUpdateTemplateRequest(UpdateTemplateRequest UpdateTemplateRequest) *UpdateTemplateParam { - params.UpdateTemplateRequest = &UpdateTemplateRequest - return params -} - -// **This endpoint allows you to update your current legacy email template settings.** This setting refers to our original email templates. We currently support more fully featured [Dynamic Transactional Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/). The legacy email template setting wraps an HTML template around your email content. This can be useful for sending out marketing email and/or other HTML formatted messages. For instructions on using legacy templates, see how to [\"Create and Edit Legacy Transactional Templates](https://sendgrid.com/docs/ui/sending-email/create-and-edit-legacy-transactional-templates/). For help migrating to our current template system, see [\"Migrating from Legacy Templates\"](https://sendgrid.com/docs/ui/sending-email/migrating-from-legacy-templates/). -func (c *ApiService) UpdateTemplate(params *UpdateTemplateParam) (interface{}, error) { - path := "/v3/mail_settings/template" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateTemplateRequest != nil { - b, err := json.Marshal(*params.UpdateTemplateRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &UpdateTemplate200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mail_settings/docs/ListAddressWhitelist.md b/rest/api/v3/mail_settings/docs/ListAddressWhitelist.md deleted file mode 100644 index 19d14d6b..00000000 --- a/rest/api/v3/mail_settings/docs/ListAddressWhitelist.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListAddressWhitelist - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListAddressWhitelist**](ListAddressWhitelist.md#ListAddressWhitelist) | **Get** /v3/mail_settings/address_whitelist | Retrieve address whitelist mail settings - - - -## ListAddressWhitelist - -> MailSettingsAddressWhitelabel200 ListAddressWhitelist(ctx, optional) - -Retrieve address whitelist mail settings - -**This endpoint allows you to retrieve your current email address whitelist settings.** The Address Whitelist setting allows you to specify email addresses or domains for which mail should never be suppressed. For example, if you own the domain `example.com`, and one or more of your recipients use `email@example.com` addresses, placing `example.com` in the address whitelist setting instructs Twilio SendGrid to ignore all bounces, blocks, and unsubscribes logged for that domain. In other words, all bounces, blocks, and unsubscribes will still be sent to `example.com` as if they were sent under normal sending conditions. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListAddressWhitelistParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**MailSettingsAddressWhitelabel200**](MailSettingsAddressWhitelabel200.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mail_settings/docs/ListBouncePurge.md b/rest/api/v3/mail_settings/docs/ListBouncePurge.md deleted file mode 100644 index edf160c3..00000000 --- a/rest/api/v3/mail_settings/docs/ListBouncePurge.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListBouncePurge - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListBouncePurge**](ListBouncePurge.md#ListBouncePurge) | **Get** /v3/mail_settings/bounce_purge | Retrieve bounce purge mail settings - - - -## ListBouncePurge - -> MailSettingsBouncePurge ListBouncePurge(ctx, optional) - -Retrieve bounce purge mail settings - -**This endpoint allows you to retrieve your current bounce and purge settings.** The Bounce Perge setting allows you to set a schedule that Twilio SendGrid will use to automatically delete contacts from your soft and hard bounce suppression lists. A hard bounce occurs when an email message has been returned to the sender because the recipient's address is invalid. A hard bounce might occur because the domain name doesn't exist or because the recipient is unknown. A soft bounce occurs when an email message reaches the recipient's mail server but is bounced back undelivered before it actually reaches the recipient. A soft bounce might occur because the recipient's inbox is full. You can also manage this setting in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). You can manage your bounces manually using the [Bounces API](https://docs.sendgrid.com/api-reference/bounces-api) or the [Bounces menu in the Twilio SendGrid App](https://app.sendgrid.com/suppressions/bounces). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListBouncePurgeParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**MailSettingsBouncePurge**](MailSettingsBouncePurge.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mail_settings/docs/ListFooter.md b/rest/api/v3/mail_settings/docs/ListFooter.md deleted file mode 100644 index 67d15a65..00000000 --- a/rest/api/v3/mail_settings/docs/ListFooter.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListFooter - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListFooter**](ListFooter.md#ListFooter) | **Get** /v3/mail_settings/footer | Retrieve footer mail settings - - - -## ListFooter - -> MailSettingsFooter ListFooter(ctx, optional) - -Retrieve footer mail settings - -**This endpoint allows you to retrieve your current Footer mail settings.** The Footer setting will insert a custom footer at the bottom of your text and HTML email message bodies. You can insert your HTML or plain text directly using the \"Update footer mail settings\" endpoint, or you can create the footer using the [Mail Settings menu in the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListFooterParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**MailSettingsFooter**](MailSettingsFooter.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mail_settings/docs/ListForwardBounce.md b/rest/api/v3/mail_settings/docs/ListForwardBounce.md deleted file mode 100644 index 03f8edb4..00000000 --- a/rest/api/v3/mail_settings/docs/ListForwardBounce.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListForwardBounce - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListForwardBounce**](ListForwardBounce.md#ListForwardBounce) | **Get** /v3/mail_settings/forward_bounce | Retrieve forward bounce mail settings - - - -## ListForwardBounce - -> MailSettingsForwardBounce ListForwardBounce(ctx, optional) - -Retrieve forward bounce mail settings - -**This endpoint allows you to retrieve your current bounce forwarding mail settings.** Enabling the Forward Bounce setting allows you to specify `email` addresses to which bounce reports will be forwarded. This endpoint returns the email address you have set to receive forwarded bounces and an `enabled` status indicating if the setting is active. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListForwardBounceParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**MailSettingsForwardBounce**](MailSettingsForwardBounce.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mail_settings/docs/ListForwardSpam.md b/rest/api/v3/mail_settings/docs/ListForwardSpam.md deleted file mode 100644 index 8a50b2a3..00000000 --- a/rest/api/v3/mail_settings/docs/ListForwardSpam.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListForwardSpam - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListForwardSpam**](ListForwardSpam.md#ListForwardSpam) | **Get** /v3/mail_settings/forward_spam | Retrieve forward spam mail settings - - - -## ListForwardSpam - -> MailSettingsForwardSpam ListForwardSpam(ctx, optional) - -Retrieve forward spam mail settings - -**This endpoint allows you to retrieve your current Forward Spam mail settings.** Enabling the Forward Spam setting allows you to specify `email` addresses to which spam reports will be forwarded. This endpoint returns any email address(es) you have set to receive forwarded spam and an `enabled` status indicating if the setting is active. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListForwardSpamParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**MailSettingsForwardSpam**](MailSettingsForwardSpam.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mail_settings/docs/ListMailSetting.md b/rest/api/v3/mail_settings/docs/ListMailSetting.md deleted file mode 100644 index 112b7db3..00000000 --- a/rest/api/v3/mail_settings/docs/ListMailSetting.md +++ /dev/null @@ -1,50 +0,0 @@ -# ListMailSetting - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListMailSetting**](ListMailSetting.md#ListMailSetting) | **Get** /v3/mail_settings | Retrieve all mail settings - - - -## ListMailSetting - -> ListMailSetting200Response ListMailSetting(ctx, optional) - -Retrieve all mail settings - -**This endpoint allows you to retrieve a paginated list of all mail settings.** Each setting will be returned with an `enabled` status set to `true` or `false` and a short description that explains what the setting does. You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListMailSettingParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. -**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListMailSetting200Response**](ListMailSetting200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mail_settings/docs/ListMailSetting200Response.md b/rest/api/v3/mail_settings/docs/ListMailSetting200Response.md deleted file mode 100644 index cbfa419e..00000000 --- a/rest/api/v3/mail_settings/docs/ListMailSetting200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListMailSetting200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]ListMailSetting200ResponseResultInner**](ListMailSetting200ResponseResultInner.md) | The list of all mail settings. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail_settings/docs/ListMailSetting200ResponseResultInner.md b/rest/api/v3/mail_settings/docs/ListMailSetting200ResponseResultInner.md deleted file mode 100644 index ffcbe98a..00000000 --- a/rest/api/v3/mail_settings/docs/ListMailSetting200ResponseResultInner.md +++ /dev/null @@ -1,14 +0,0 @@ -# ListMailSetting200ResponseResultInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Title** | **string** | The title of the mail setting. | -**Enabled** | **bool** | Indicates if this mail setting is currently enabled. | -**Name** | **string** | The name of the mail setting. | -**Description** | **string** | A description of the mail setting. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail_settings/docs/ListTemplate.md b/rest/api/v3/mail_settings/docs/ListTemplate.md deleted file mode 100644 index d793d851..00000000 --- a/rest/api/v3/mail_settings/docs/ListTemplate.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListTemplate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListTemplate**](ListTemplate.md#ListTemplate) | **Get** /v3/mail_settings/template | Retrieve legacy template mail settings - - - -## ListTemplate - -> MailSettingsTemplate200 ListTemplate(ctx, optional) - -Retrieve legacy template mail settings - -**This endpoint allows you to retrieve your current legacy email template settings.** This setting refers to our original email templates. We currently support more fully featured [Dynamic Transactional Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/). The legacy email template setting wraps an HTML template around your email content. This can be useful for sending out marketing email and/or other HTML formatted messages. For instructions on using legacy templates, see how to [\"Create and Edit Legacy Transactional Templates](https://sendgrid.com/docs/ui/sending-email/create-and-edit-legacy-transactional-templates/). For help migrating to our current template system, see [\"Migrating from Legacy Templates\"](https://sendgrid.com/docs/ui/sending-email/migrating-from-legacy-templates/). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListTemplateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**MailSettingsTemplate200**](MailSettingsTemplate200.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mail_settings/docs/MailSettingsAddressWhitelabel200.md b/rest/api/v3/mail_settings/docs/MailSettingsAddressWhitelabel200.md deleted file mode 100644 index faa984c3..00000000 --- a/rest/api/v3/mail_settings/docs/MailSettingsAddressWhitelabel200.md +++ /dev/null @@ -1,12 +0,0 @@ -# MailSettingsAddressWhitelabel200 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enabled** | **bool** | Indicates if you have an email address whitelist enabled. |[optional] -**List** | **[]string** | All email addresses that are currently on the whitelist. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail_settings/docs/MailSettingsBouncePurge.md b/rest/api/v3/mail_settings/docs/MailSettingsBouncePurge.md deleted file mode 100644 index a23734de..00000000 --- a/rest/api/v3/mail_settings/docs/MailSettingsBouncePurge.md +++ /dev/null @@ -1,13 +0,0 @@ -# MailSettingsBouncePurge - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enabled** | **bool** | Indicates if the bounce purge mail setting is enabled. |[optional] -**SoftBounces** | **int32** | The number of days after which SendGrid will purge all contacts from your soft bounces suppression lists. |[optional] -**HardBounces** | **int32** | The number of days after which SendGrid will purge all contacts from your hard bounces suppression lists. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail_settings/docs/MailSettingsFooter.md b/rest/api/v3/mail_settings/docs/MailSettingsFooter.md deleted file mode 100644 index 9e32dc8d..00000000 --- a/rest/api/v3/mail_settings/docs/MailSettingsFooter.md +++ /dev/null @@ -1,13 +0,0 @@ -# MailSettingsFooter - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enabled** | **bool** | Indicates if the Footer mail setting is currently enabled. |[optional] -**HtmlContent** | **string** | The custom HTML content of your email footer. |[optional] -**PlainContent** | **string** | The plain text content of your email footer. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail_settings/docs/MailSettingsForwardBounce.md b/rest/api/v3/mail_settings/docs/MailSettingsForwardBounce.md deleted file mode 100644 index b026f5b9..00000000 --- a/rest/api/v3/mail_settings/docs/MailSettingsForwardBounce.md +++ /dev/null @@ -1,12 +0,0 @@ -# MailSettingsForwardBounce - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | **string** | The email address that you would like your bounce reports forwarded to. |[optional] -**Enabled** | **bool** | Indicates if the bounce forwarding mail setting is enabled. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail_settings/docs/MailSettingsForwardSpam.md b/rest/api/v3/mail_settings/docs/MailSettingsForwardSpam.md deleted file mode 100644 index ab2ac86c..00000000 --- a/rest/api/v3/mail_settings/docs/MailSettingsForwardSpam.md +++ /dev/null @@ -1,12 +0,0 @@ -# MailSettingsForwardSpam - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | **string** | The email address where you would like the spam reports to be forwarded. |[optional] -**Enabled** | **bool** | Indicates if the Forward Spam setting is enabled. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail_settings/docs/MailSettingsTemplate200.md b/rest/api/v3/mail_settings/docs/MailSettingsTemplate200.md deleted file mode 100644 index 17d003ec..00000000 --- a/rest/api/v3/mail_settings/docs/MailSettingsTemplate200.md +++ /dev/null @@ -1,12 +0,0 @@ -# MailSettingsTemplate200 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enabled** | **bool** | Indicates if the legacy email template setting is enabled. |[optional] -**HtmlContent** | **string** | The HTML content that you want to use for your legacy email template. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail_settings/docs/UpdateAddressWhitelist.md b/rest/api/v3/mail_settings/docs/UpdateAddressWhitelist.md deleted file mode 100644 index 33b8dcda..00000000 --- a/rest/api/v3/mail_settings/docs/UpdateAddressWhitelist.md +++ /dev/null @@ -1,49 +0,0 @@ -# UpdateAddressWhitelist - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateAddressWhitelist**](UpdateAddressWhitelist.md#UpdateAddressWhitelist) | **Patch** /v3/mail_settings/address_whitelist | Update address whitelist mail settings - - - -## UpdateAddressWhitelist - -> MailSettingsAddressWhitelabel200 UpdateAddressWhitelist(ctx, optional) - -Update address whitelist mail settings - -**This endpoint allows you to update your current email address whitelist settings.** You can select whether or not this setting should be enabled by assigning the `enabled` field a `true` or `false` value. Passing only the `enabled` field to this endpoint will not alter your current `list` of whitelist entries. However, any modifications to your `list` of entries will overwrite the entire list. For this reason, you must included all existing entries you wish to retain in your `list` in addition to any new entries you intend to add. To remove one or more `list` entries, pass a `list` with only the entries you wish to retain. You should not add generic domains such as `gmail.com` or `yahoo.com` in your `list` because your emails will not honor recipients' unsubscribes. This may cause a legal violation of [CAN-SPAM](https://sendgrid.com/docs/glossary/can-spam/) and could damage your sending reputation. The Address Whitelist setting allows you to specify email addresses or domains for which mail should never be suppressed. For example, if you own the domain `example.com`, and one or more of your recipients use `email@example.com` addresses, placing `example.com` in the address whitelist setting instructs Twilio SendGrid to ignore all bounces, blocks, and unsubscribes logged for that domain. In other words, all bounces, blocks, and unsubscribes will still be sent to `example.com` as if they were sent under normal sending conditions. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateAddressWhitelistParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**UpdateAddressWhitelistRequest** | [**UpdateAddressWhitelistRequest**](UpdateAddressWhitelistRequest.md) | - -### Return type - -[**MailSettingsAddressWhitelabel200**](MailSettingsAddressWhitelabel200.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mail_settings/docs/UpdateAddressWhitelistRequest.md b/rest/api/v3/mail_settings/docs/UpdateAddressWhitelistRequest.md deleted file mode 100644 index 26fabf56..00000000 --- a/rest/api/v3/mail_settings/docs/UpdateAddressWhitelistRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# UpdateAddressWhitelistRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enabled** | **bool** | Indicates if your email address whitelist is enabled. |[optional] -**List** | **[]string** | Either a single email address that you want whitelisted or a domain, for which all email addresses belonging to this domain will be whitelisted. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail_settings/docs/UpdateBouncePurge.md b/rest/api/v3/mail_settings/docs/UpdateBouncePurge.md deleted file mode 100644 index 4ffdeafd..00000000 --- a/rest/api/v3/mail_settings/docs/UpdateBouncePurge.md +++ /dev/null @@ -1,49 +0,0 @@ -# UpdateBouncePurge - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateBouncePurge**](UpdateBouncePurge.md#UpdateBouncePurge) | **Patch** /v3/mail_settings/bounce_purge | Update bounce purge mail settings - - - -## UpdateBouncePurge - -> MailSettingsBouncePurge UpdateBouncePurge(ctx, optional) - -Update bounce purge mail settings - -**This endpoint allows you to update your current bounce and purge settings.** The Bounce Perge setting allows you to set a schedule that Twilio SendGrid will use to automatically delete contacts from your soft and hard bounce suppression lists. The schedule is set in full days by assigning the number of days, an integer, to the `soft_bounces` and/or `hard_bounces` fields. A hard bounce occurs when an email message has been returned to the sender because the recipient's address is invalid. A hard bounce might occur because the domain name doesn't exist or because the recipient is unknown. A soft bounce occurs when an email message reaches the recipient's mail server but is bounced back undelivered before it actually reaches the recipient. A soft bounce might occur because the recipient's inbox is full. You can also manage this setting in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). You can manage your bounces manually using the [Bounces API](https://docs.sendgrid.com/api-reference/bounces-api) or the [Bounces menu in the Twilio SendGrid App](https://app.sendgrid.com/suppressions/bounces). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateBouncePurgeParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**MailSettingsBouncePurge** | [**MailSettingsBouncePurge**](MailSettingsBouncePurge.md) | - -### Return type - -[**MailSettingsBouncePurge**](MailSettingsBouncePurge.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mail_settings/docs/UpdateFooter.md b/rest/api/v3/mail_settings/docs/UpdateFooter.md deleted file mode 100644 index 758cbdbd..00000000 --- a/rest/api/v3/mail_settings/docs/UpdateFooter.md +++ /dev/null @@ -1,49 +0,0 @@ -# UpdateFooter - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateFooter**](UpdateFooter.md#UpdateFooter) | **Patch** /v3/mail_settings/footer | Update footer mail settings - - - -## UpdateFooter - -> MailSettingsFooter UpdateFooter(ctx, optional) - -Update footer mail settings - -**This endpoint allows you to update your current Footer mail settings.** The Footer setting will insert a custom footer at the bottom of your text and HTML email message bodies. You can insert your HTML or plain text directly using this endpoint, or you can create the footer using the [Mail Settings menu in the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateFooterParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**MailSettingsFooter** | [**MailSettingsFooter**](MailSettingsFooter.md) | - -### Return type - -[**MailSettingsFooter**](MailSettingsFooter.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mail_settings/docs/UpdateForwardBounce.md b/rest/api/v3/mail_settings/docs/UpdateForwardBounce.md deleted file mode 100644 index f7250ada..00000000 --- a/rest/api/v3/mail_settings/docs/UpdateForwardBounce.md +++ /dev/null @@ -1,49 +0,0 @@ -# UpdateForwardBounce - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateForwardBounce**](UpdateForwardBounce.md#UpdateForwardBounce) | **Patch** /v3/mail_settings/forward_bounce | Update forward bounce mail settings - - - -## UpdateForwardBounce - -> MailSettingsForwardBounce UpdateForwardBounce(ctx, optional) - -Update forward bounce mail settings - -**This endpoint allows you to update your current bounce forwarding mail settings.** Enabling the Forward Bounce setting allows you to specify an `email` address to which bounce reports will be forwarded. You can also configure the Forward Spam mail settings in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateForwardBounceParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**MailSettingsForwardBounce** | [**MailSettingsForwardBounce**](MailSettingsForwardBounce.md) | - -### Return type - -[**MailSettingsForwardBounce**](MailSettingsForwardBounce.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mail_settings/docs/UpdateForwardSpam.md b/rest/api/v3/mail_settings/docs/UpdateForwardSpam.md deleted file mode 100644 index 72690164..00000000 --- a/rest/api/v3/mail_settings/docs/UpdateForwardSpam.md +++ /dev/null @@ -1,49 +0,0 @@ -# UpdateForwardSpam - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateForwardSpam**](UpdateForwardSpam.md#UpdateForwardSpam) | **Patch** /v3/mail_settings/forward_spam | Update forward spam mail settings - - - -## UpdateForwardSpam - -> MailSettingsForwardSpam UpdateForwardSpam(ctx, optional) - -Update forward spam mail settings - -**This endpoint allows you to update your current Forward Spam mail settings.** Enabling the Forward Spam setting allows you to specify `email` addresses to which spam reports will be forwarded. You can set multiple addresses by passing this endpoint a comma separated list of emails in a single string. ``` { \"email\": \"address1@example.com, address2@exapmle.com\", \"enabled\": true } ``` The Forward Spam setting may also be used to receive emails sent to `abuse@` and `postmaster@` role addresses if you have authenticated your domain. For example, if you authenticated `example.com` as your root domain and set a custom return path of `sub` for that domain, you could turn on Forward Spam, and any emails sent to `abuse@sub.example.com` or `postmaster@sub.example.com` would be forwarded to the email address you entered in the `email` field. You can authenticate your domain using the \"Authenticate a domain\" endpoint or in the [Sender Authentication section of the Twilio SendGrid App](https://app.sendgrid.com/settings/sender_auth). You can also configure the Forward Spam mail settings in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateForwardSpamParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**MailSettingsForwardSpam** | [**MailSettingsForwardSpam**](MailSettingsForwardSpam.md) | - -### Return type - -[**MailSettingsForwardSpam**](MailSettingsForwardSpam.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mail_settings/docs/UpdateTemplate.md b/rest/api/v3/mail_settings/docs/UpdateTemplate.md deleted file mode 100644 index 96add61e..00000000 --- a/rest/api/v3/mail_settings/docs/UpdateTemplate.md +++ /dev/null @@ -1,49 +0,0 @@ -# UpdateTemplate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateTemplate**](UpdateTemplate.md#UpdateTemplate) | **Patch** /v3/mail_settings/template | Update template mail settings - - - -## UpdateTemplate - -> UpdateTemplate200Response UpdateTemplate(ctx, optional) - -Update template mail settings - -**This endpoint allows you to update your current legacy email template settings.** This setting refers to our original email templates. We currently support more fully featured [Dynamic Transactional Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/). The legacy email template setting wraps an HTML template around your email content. This can be useful for sending out marketing email and/or other HTML formatted messages. For instructions on using legacy templates, see how to [\"Create and Edit Legacy Transactional Templates](https://sendgrid.com/docs/ui/sending-email/create-and-edit-legacy-transactional-templates/). For help migrating to our current template system, see [\"Migrating from Legacy Templates\"](https://sendgrid.com/docs/ui/sending-email/migrating-from-legacy-templates/). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateTemplateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**UpdateTemplateRequest** | [**UpdateTemplateRequest**](UpdateTemplateRequest.md) | - -### Return type - -[**UpdateTemplate200Response**](UpdateTemplate200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mail_settings/docs/UpdateTemplate200Response.md b/rest/api/v3/mail_settings/docs/UpdateTemplate200Response.md deleted file mode 100644 index 507108c7..00000000 --- a/rest/api/v3/mail_settings/docs/UpdateTemplate200Response.md +++ /dev/null @@ -1,12 +0,0 @@ -# UpdateTemplate200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enabled** | **bool** | Indicates if the legacy email template mail setting is enabled. | -**HtmlContent** | **string** | The HTML content of your legacy email template. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail_settings/docs/UpdateTemplateRequest.md b/rest/api/v3/mail_settings/docs/UpdateTemplateRequest.md deleted file mode 100644 index 52fb438d..00000000 --- a/rest/api/v3/mail_settings/docs/UpdateTemplateRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# UpdateTemplateRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enabled** | **bool** | Indicates if you want to enable the legacy email template mail setting. |[optional] -**HtmlContent** | **string** | The new HTML content for your legacy email template. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mail_settings/model_list_mail_setting_200_response.go b/rest/api/v3/mail_settings/model_list_mail_setting_200_response.go deleted file mode 100644 index f39bc1d9..00000000 --- a/rest/api/v3/mail_settings/model_list_mail_setting_200_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail Settings API -* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListMailSetting200Response struct for ListMailSetting200Response -type ListMailSetting200Response struct { - // The list of all mail settings. - Result []ListMailSetting200ResponseResultInner `json:"result"` -} diff --git a/rest/api/v3/mail_settings/model_list_mail_setting_200_response_result_inner.go b/rest/api/v3/mail_settings/model_list_mail_setting_200_response_result_inner.go deleted file mode 100644 index 7f4d09cb..00000000 --- a/rest/api/v3/mail_settings/model_list_mail_setting_200_response_result_inner.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail Settings API -* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListMailSetting200ResponseResultInner struct for ListMailSetting200ResponseResultInner -type ListMailSetting200ResponseResultInner struct { - // The title of the mail setting. - Title string `json:"title"` - // Indicates if this mail setting is currently enabled. - Enabled bool `json:"enabled"` - // The name of the mail setting. - Name string `json:"name"` - // A description of the mail setting. - Description string `json:"description"` -} diff --git a/rest/api/v3/mail_settings/model_mail_settings_address_whitelabel200.go b/rest/api/v3/mail_settings/model_mail_settings_address_whitelabel200.go deleted file mode 100644 index 541343fc..00000000 --- a/rest/api/v3/mail_settings/model_mail_settings_address_whitelabel200.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail Settings API -* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// MailSettingsAddressWhitelabel200 struct for MailSettingsAddressWhitelabel200 -type MailSettingsAddressWhitelabel200 struct { - // Indicates if you have an email address whitelist enabled. - Enabled *bool `json:"enabled,omitempty"` - // All email addresses that are currently on the whitelist. - List *[]string `json:"list,omitempty"` -} diff --git a/rest/api/v3/mail_settings/model_mail_settings_bounce_purge.go b/rest/api/v3/mail_settings/model_mail_settings_bounce_purge.go deleted file mode 100644 index f283828f..00000000 --- a/rest/api/v3/mail_settings/model_mail_settings_bounce_purge.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail Settings API -* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// MailSettingsBouncePurge struct for MailSettingsBouncePurge -type MailSettingsBouncePurge struct { - // Indicates if the bounce purge mail setting is enabled. - Enabled *bool `json:"enabled,omitempty"` - // The number of days after which SendGrid will purge all contacts from your soft bounces suppression lists. - SoftBounces *int32 `json:"soft_bounces,omitempty"` - // The number of days after which SendGrid will purge all contacts from your hard bounces suppression lists. - HardBounces *int32 `json:"hard_bounces,omitempty"` -} diff --git a/rest/api/v3/mail_settings/model_mail_settings_footer.go b/rest/api/v3/mail_settings/model_mail_settings_footer.go deleted file mode 100644 index b3e44acf..00000000 --- a/rest/api/v3/mail_settings/model_mail_settings_footer.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail Settings API -* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// MailSettingsFooter struct for MailSettingsFooter -type MailSettingsFooter struct { - // Indicates if the Footer mail setting is currently enabled. - Enabled *bool `json:"enabled,omitempty"` - // The custom HTML content of your email footer. - HtmlContent *string `json:"html_content,omitempty"` - // The plain text content of your email footer. - PlainContent *string `json:"plain_content,omitempty"` -} diff --git a/rest/api/v3/mail_settings/model_mail_settings_forward_bounce.go b/rest/api/v3/mail_settings/model_mail_settings_forward_bounce.go deleted file mode 100644 index 6b26be5d..00000000 --- a/rest/api/v3/mail_settings/model_mail_settings_forward_bounce.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail Settings API -* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// MailSettingsForwardBounce struct for MailSettingsForwardBounce -type MailSettingsForwardBounce struct { - // The email address that you would like your bounce reports forwarded to. - Email *string `json:"email,omitempty"` - // Indicates if the bounce forwarding mail setting is enabled. - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/rest/api/v3/mail_settings/model_mail_settings_forward_spam.go b/rest/api/v3/mail_settings/model_mail_settings_forward_spam.go deleted file mode 100644 index 82208334..00000000 --- a/rest/api/v3/mail_settings/model_mail_settings_forward_spam.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail Settings API -* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// MailSettingsForwardSpam struct for MailSettingsForwardSpam -type MailSettingsForwardSpam struct { - // The email address where you would like the spam reports to be forwarded. - Email *string `json:"email,omitempty"` - // Indicates if the Forward Spam setting is enabled. - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/rest/api/v3/mail_settings/model_mail_settings_template200.go b/rest/api/v3/mail_settings/model_mail_settings_template200.go deleted file mode 100644 index b2529e26..00000000 --- a/rest/api/v3/mail_settings/model_mail_settings_template200.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail Settings API -* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// MailSettingsTemplate200 struct for MailSettingsTemplate200 -type MailSettingsTemplate200 struct { - // Indicates if the legacy email template setting is enabled. - Enabled *bool `json:"enabled,omitempty"` - // The HTML content that you want to use for your legacy email template. - HtmlContent *string `json:"html_content,omitempty"` -} diff --git a/rest/api/v3/mail_settings/model_update_address_whitelist_request.go b/rest/api/v3/mail_settings/model_update_address_whitelist_request.go deleted file mode 100644 index f1881e61..00000000 --- a/rest/api/v3/mail_settings/model_update_address_whitelist_request.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail Settings API -* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateAddressWhitelistRequest struct for UpdateAddressWhitelistRequest -type UpdateAddressWhitelistRequest struct { - // Indicates if your email address whitelist is enabled. - Enabled *bool `json:"enabled,omitempty"` - // Either a single email address that you want whitelisted or a domain, for which all email addresses belonging to this domain will be whitelisted. - List *[]string `json:"list,omitempty"` -} diff --git a/rest/api/v3/mail_settings/model_update_template_200_response.go b/rest/api/v3/mail_settings/model_update_template_200_response.go deleted file mode 100644 index a879398f..00000000 --- a/rest/api/v3/mail_settings/model_update_template_200_response.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail Settings API -* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateTemplate200Response struct for UpdateTemplate200Response -type UpdateTemplate200Response struct { - // Indicates if the legacy email template mail setting is enabled. - Enabled bool `json:"enabled"` - // The HTML content of your legacy email template. - HtmlContent string `json:"html_content"` -} diff --git a/rest/api/v3/mail_settings/model_update_template_request.go b/rest/api/v3/mail_settings/model_update_template_request.go deleted file mode 100644 index ce310de0..00000000 --- a/rest/api/v3/mail_settings/model_update_template_request.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Mail Settings API -* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateTemplateRequest struct for UpdateTemplateRequest -type UpdateTemplateRequest struct { - // Indicates if you want to enable the legacy email template mail setting. - Enabled *bool `json:"enabled,omitempty"` - // The new HTML content for your legacy email template. - HtmlContent *string `json:"html_content,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/.openapi-generator b/rest/api/v3/mc_contacts/.openapi-generator deleted file mode 100644 index 657d7e47..00000000 --- a/rest/api/v3/mc_contacts/.openapi-generator +++ /dev/null @@ -1,145 +0,0 @@ -.openapi-generator -README.md -api_delete_contact.go -api_delete_contact_identifier.go -api_export_contact.go -api_get_contact.go -api_get_contact_by_identifiers.go -api_get_export_contact.go -api_get_import_contact.go -api_import_contact.go -api_list_batched_contact.go -api_list_contact.go -api_list_contact_by_email.go -api_list_contact_count.go -api_list_export_contact.go -api_search_contact.go -api_service.go -api_update_contact.go -docs/ContactDetails3.md -docs/ContactExport.md -docs/ContactImport.md -docs/ContactImportResults.md -docs/ContactRequest.md -docs/ContactRequestCustomFields.md -docs/ContactsError.md -docs/DeleteContact.md -docs/DeleteContact202Response.md -docs/DeleteContact400Response.md -docs/DeleteContactIdentifier.md -docs/DeleteContactIdentifier202Response.md -docs/DeleteContactIdentifierRequest.md -docs/ErrorResponse.md -docs/ErrorResponseErrorsInner.md -docs/ExportContact.md -docs/ExportContact202Response.md -docs/ExportContactRequest.md -docs/ExportContactRequestNotifications.md -docs/FileType.md -docs/FileType1.md -docs/GetContact.md -docs/GetContactByIdentifiers.md -docs/GetContactByIdentifiers200Response.md -docs/GetContactByIdentifiers200ResponseResultValue.md -docs/GetContactByIdentifiersRequest.md -docs/GetContactByIdentifiersRequestIdentifiersInner.md -docs/GetExportContact.md -docs/GetImportContact.md -docs/GetImportContact400Response.md -docs/IdentifierType.md -docs/IdentifierType1.md -docs/ImportContact.md -docs/ImportContact200Response.md -docs/ImportContact200ResponseUploadHeadersInner.md -docs/ImportContact400Response.md -docs/ImportContact404Response.md -docs/ImportContactRequest.md -docs/ListBatchedContact.md -docs/ListBatchedContact200Response.md -docs/ListBatchedContactRequest.md -docs/ListContact.md -docs/ListContact200Response.md -docs/ListContact400Response.md -docs/ListContactByEmail.md -docs/ListContactByEmail200Response.md -docs/ListContactByEmailRequest.md -docs/ListContactCount.md -docs/ListContactCount200Response.md -docs/ListContactCount200ResponseBillableBreakdown.md -docs/ListExportContact.md -docs/ListExportContact200Response.md -docs/ListExportContact200ResponseMetadata.md -docs/ListExportContact200ResponseResultInner.md -docs/ListExportContact200ResponseResultInnerMetadata.md -docs/ListExportContact200ResponseResultInnerSegmentsInner.md -docs/ListExportContact400Response.md -docs/ListExportContact400ResponseErrorsInner.md -docs/Metadata.md -docs/SearchContact.md -docs/SearchContact200Response.md -docs/SearchContact400Response.md -docs/SearchContact400ResponseErrorsInner.md -docs/SearchContact500Response.md -docs/SearchContact500ResponseErrorsInner.md -docs/SearchContactRequest.md -docs/SelfMetadata.md -docs/Status.md -docs/UpdateContact.md -docs/UpdateContact202Response.md -docs/UpdateContactRequest.md -model_contact_details3.go -model_contact_export.go -model_contact_import.go -model_contact_import_results.go -model_contact_request.go -model_contact_request_custom_fields.go -model_contacts_error.go -model_delete_contact_202_response.go -model_delete_contact_400_response.go -model_delete_contact_identifier_202_response.go -model_delete_contact_identifier_request.go -model_error_response.go -model_error_response_errors_inner.go -model_export_contact_202_response.go -model_export_contact_request.go -model_export_contact_request_notifications.go -model_file_type.go -model_file_type1.go -model_get_contact_by_identifiers_200_response.go -model_get_contact_by_identifiers_200_response_result_value.go -model_get_contact_by_identifiers_request.go -model_get_contact_by_identifiers_request_identifiers_inner.go -model_get_import_contact_400_response.go -model_identifier_type.go -model_identifier_type1.go -model_import_contact_200_response.go -model_import_contact_200_response_upload_headers_inner.go -model_import_contact_400_response.go -model_import_contact_404_response.go -model_import_contact_request.go -model_list_batched_contact_200_response.go -model_list_batched_contact_request.go -model_list_contact_200_response.go -model_list_contact_400_response.go -model_list_contact_by_email_200_response.go -model_list_contact_by_email_request.go -model_list_contact_count_200_response.go -model_list_contact_count_200_response_billable_breakdown.go -model_list_export_contact_200_response.go -model_list_export_contact_200_response__metadata.go -model_list_export_contact_200_response_result_inner.go -model_list_export_contact_200_response_result_inner__metadata.go -model_list_export_contact_200_response_result_inner_segments_inner.go -model_list_export_contact_400_response.go -model_list_export_contact_400_response_errors_inner.go -model_metadata.go -model_search_contact_200_response.go -model_search_contact_400_response.go -model_search_contact_400_response_errors_inner.go -model_search_contact_500_response.go -model_search_contact_500_response_errors_inner.go -model_search_contact_request.go -model_self_metadata.go -model_status.go -model_update_contact_202_response.go -model_update_contact_request.go diff --git a/rest/api/v3/mc_contacts/.openapi-generator-ignore b/rest/api/v3/mc_contacts/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/mc_contacts/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/mc_contacts/README.md b/rest/api/v3/mc_contacts/README.md deleted file mode 100644 index 36cb7f44..00000000 --- a/rest/api/v3/mc_contacts/README.md +++ /dev/null @@ -1,131 +0,0 @@ -# Go API client for - -The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). - -You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:38.063963+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DeleteContact* | [**DeleteContact**](docs/DeleteContact.md#deletecontact) | **Delete** /v3/marketing/contacts | Delete Contacts -*DeleteContactIdentifier* | [**DeleteContactIdentifier**](docs/DeleteContactIdentifier.md#deletecontactidentifier) | **Delete** /v3/marketing/contacts/{ContactId}/identifiers | Delete a Contact Identifier -*ExportContact* | [**ExportContact**](docs/ExportContact.md#exportcontact) | **Post** /v3/marketing/contacts/exports | Export Contacts -*GetContact* | [**GetContact**](docs/GetContact.md#getcontact) | **Get** /v3/marketing/contacts/{Id} | Get a Contact by ID -*GetContactByIdentifiers* | [**GetContactByIdentifiers**](docs/GetContactByIdentifiers.md#getcontactbyidentifiers) | **Post** /v3/marketing/contacts/search/identifiers/{IdentifierType} | Get Contacts by Identifiers -*GetExportContact* | [**GetExportContact**](docs/GetExportContact.md#getexportcontact) | **Get** /v3/marketing/contacts/exports/{Id} | Export Contacts Status -*GetImportContact* | [**GetImportContact**](docs/GetImportContact.md#getimportcontact) | **Get** /v3/marketing/contacts/imports/{Id} | Import Contacts Status -*ImportContact* | [**ImportContact**](docs/ImportContact.md#importcontact) | **Put** /v3/marketing/contacts/imports | Import Contacts -*ListBatchedContact* | [**ListBatchedContact**](docs/ListBatchedContact.md#listbatchedcontact) | **Post** /v3/marketing/contacts/batch | Get Batched Contacts by IDs -*ListContact* | [**ListContact**](docs/ListContact.md#listcontact) | **Get** /v3/marketing/contacts | Get Sample Contacts -*ListContactByEmail* | [**ListContactByEmail**](docs/ListContactByEmail.md#listcontactbyemail) | **Post** /v3/marketing/contacts/search/emails | Get Contacts by Emails -*ListContactCount* | [**ListContactCount**](docs/ListContactCount.md#listcontactcount) | **Get** /v3/marketing/contacts/count | Get Total Contact Count -*ListExportContact* | [**ListExportContact**](docs/ListExportContact.md#listexportcontact) | **Get** /v3/marketing/contacts/exports | Get All Existing Exports -*SearchContact* | [**SearchContact**](docs/SearchContact.md#searchcontact) | **Post** /v3/marketing/contacts/search | Search Contacts -*UpdateContact* | [**UpdateContact**](docs/UpdateContact.md#updatecontact) | **Put** /v3/marketing/contacts | Add or Update a Contact - - -## Documentation For Models - - - [ContactDetails3](ContactDetails3.md) - - [ContactExport](ContactExport.md) - - [ContactImport](ContactImport.md) - - [ContactImportResults](ContactImportResults.md) - - [ContactRequest](ContactRequest.md) - - [ContactRequestCustomFields](ContactRequestCustomFields.md) - - [ContactsError](ContactsError.md) - - [DeleteContact202Response](DeleteContact202Response.md) - - [DeleteContact400Response](DeleteContact400Response.md) - - [DeleteContactIdentifier202Response](DeleteContactIdentifier202Response.md) - - [DeleteContactIdentifierRequest](DeleteContactIdentifierRequest.md) - - [ErrorResponse](ErrorResponse.md) - - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) - - [ExportContact202Response](ExportContact202Response.md) - - [ExportContactRequest](ExportContactRequest.md) - - [ExportContactRequestNotifications](ExportContactRequestNotifications.md) - - [FileType](FileType.md) - - [FileType1](FileType1.md) - - [GetContactByIdentifiers200Response](GetContactByIdentifiers200Response.md) - - [GetContactByIdentifiers200ResponseResultValue](GetContactByIdentifiers200ResponseResultValue.md) - - [GetContactByIdentifiersRequest](GetContactByIdentifiersRequest.md) - - [GetContactByIdentifiersRequestIdentifiersInner](GetContactByIdentifiersRequestIdentifiersInner.md) - - [GetImportContact400Response](GetImportContact400Response.md) - - [IdentifierType](IdentifierType.md) - - [IdentifierType1](IdentifierType1.md) - - [ImportContact200Response](ImportContact200Response.md) - - [ImportContact200ResponseUploadHeadersInner](ImportContact200ResponseUploadHeadersInner.md) - - [ImportContact400Response](ImportContact400Response.md) - - [ImportContact404Response](ImportContact404Response.md) - - [ImportContactRequest](ImportContactRequest.md) - - [ListBatchedContact200Response](ListBatchedContact200Response.md) - - [ListBatchedContactRequest](ListBatchedContactRequest.md) - - [ListContact200Response](ListContact200Response.md) - - [ListContact400Response](ListContact400Response.md) - - [ListContactByEmail200Response](ListContactByEmail200Response.md) - - [ListContactByEmailRequest](ListContactByEmailRequest.md) - - [ListContactCount200Response](ListContactCount200Response.md) - - [ListContactCount200ResponseBillableBreakdown](ListContactCount200ResponseBillableBreakdown.md) - - [ListExportContact200Response](ListExportContact200Response.md) - - [ListExportContact200ResponseMetadata](ListExportContact200ResponseMetadata.md) - - [ListExportContact200ResponseResultInner](ListExportContact200ResponseResultInner.md) - - [ListExportContact200ResponseResultInnerMetadata](ListExportContact200ResponseResultInnerMetadata.md) - - [ListExportContact200ResponseResultInnerSegmentsInner](ListExportContact200ResponseResultInnerSegmentsInner.md) - - [ListExportContact400Response](ListExportContact400Response.md) - - [ListExportContact400ResponseErrorsInner](ListExportContact400ResponseErrorsInner.md) - - [Metadata](Metadata.md) - - [SearchContact200Response](SearchContact200Response.md) - - [SearchContact400Response](SearchContact400Response.md) - - [SearchContact400ResponseErrorsInner](SearchContact400ResponseErrorsInner.md) - - [SearchContact500Response](SearchContact500Response.md) - - [SearchContact500ResponseErrorsInner](SearchContact500ResponseErrorsInner.md) - - [SearchContactRequest](SearchContactRequest.md) - - [SelfMetadata](SelfMetadata.md) - - [Status](Status.md) - - [UpdateContact202Response](UpdateContact202Response.md) - - [UpdateContactRequest](UpdateContactRequest.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/mc_contacts/api_delete_contact.go b/rest/api/v3/mc_contacts/api_delete_contact.go deleted file mode 100644 index d75f1583..00000000 --- a/rest/api/v3/mc_contacts/api_delete_contact.go +++ /dev/null @@ -1,109 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type DeleteContactParam struct { - // Must be set to `\"true\"` to delete all contacts. - DeleteAllContacts *string `json:"delete_all_contacts,omitempty"` - // A comma-separated list of contact IDs. - Ids *string `json:"ids,omitempty"` -} - -func (params *DeleteContactParam) SetDeleteAllContacts(DeleteAllContacts string) *DeleteContactParam { - params.DeleteAllContacts = &DeleteAllContacts - return params -} -func (params *DeleteContactParam) SetIds(Ids string) *DeleteContactParam { - params.Ids = &Ids - return params -} - -// **This endpoint can be used to delete one or more contacts**. The query parameter `ids` must set to a comma-separated list of contact IDs for bulk contact deletion. The query parameter `delete_all_contacts` must be set to `\"true\"` to delete **all** contacts. You must set either `ids` or `delete_all_contacts`. Deletion jobs are processed asynchronously. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. -func (c *ApiService) DeleteContact(params *DeleteContactParam) (interface{}, error) { - path := "/v3/marketing/contacts" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.DeleteAllContacts != nil { - data.Set("delete_all_contacts", *params.DeleteAllContacts) - } - if params != nil && params.Ids != nil { - data.Set("ids", *params.Ids) - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 202 { - ps := &DeleteContact202Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &DeleteContact400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &SearchContact500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_contacts/api_delete_contact_identifier.go b/rest/api/v3/mc_contacts/api_delete_contact_identifier.go deleted file mode 100644 index ab90f0a0..00000000 --- a/rest/api/v3/mc_contacts/api_delete_contact_identifier.go +++ /dev/null @@ -1,116 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteContactIdentifierParam struct { - // Must be set to the `contact_id` of the contact you want to remove the identifier from. - ContactId *string `json:"contact_id"` - // - DeleteContactIdentifierRequest *DeleteContactIdentifierRequest `json:"DeleteContactIdentifierRequest,omitempty"` -} - -func (params *DeleteContactIdentifierParam) SetContactId(ContactId string) *DeleteContactIdentifierParam { - params.ContactId = &ContactId - return params -} -func (params *DeleteContactIdentifierParam) SetDeleteContactIdentifierRequest(DeleteContactIdentifierRequest DeleteContactIdentifierRequest) *DeleteContactIdentifierParam { - params.DeleteContactIdentifierRequest = &DeleteContactIdentifierRequest - return params -} - -// **This endpoint can be used to delete one identifier from a contact.** Deletion jobs are processed asynchronously. Note this is different from deleting a contact. If the contact has only one identifier, the asynchronous request will fail. All contacts are required to have at least one identifier. The request body field `identifier_type` must have a valid value of \"EMAIL\", \"PHONENUMBERID\", \"EXTERNALID\", or \"ANONYMOUSID\". -func (c *ApiService) DeleteContactIdentifier(params *DeleteContactIdentifierParam) (interface{}, error) { - path := "/v3/marketing/contacts/{ContactId}/identifiers" - if params != nil && params.ContactId != nil { - path = strings.Replace(path, "{"+"ContactId"+"}", *params.ContactId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.DeleteContactIdentifierRequest != nil { - b, err := json.Marshal(*params.DeleteContactIdentifierRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 202 { - ps := &DeleteContactIdentifier202Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &DeleteContact400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &SearchContact500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_contacts/api_export_contact.go b/rest/api/v3/mc_contacts/api_export_contact.go deleted file mode 100644 index 45745506..00000000 --- a/rest/api/v3/mc_contacts/api_export_contact.go +++ /dev/null @@ -1,105 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ExportContactParam struct { - // - ExportContactRequest *ExportContactRequest `json:"ExportContactRequest,omitempty"` -} - -func (params *ExportContactParam) SetExportContactRequest(ExportContactRequest ExportContactRequest) *ExportContactParam { - params.ExportContactRequest = &ExportContactRequest - return params -} - -// **Use this endpoint to export lists or segments of contacts**. If you would just like to have a link to the exported list sent to your email set the `notifications.email` option to `true` in the `POST` payload. If you would like to download the list, take the `id` that is returned and use the \"Export Contacts Status\" endpoint to get the `urls`. Once you have the list of URLs, make a `GET` request to each URL provided to download your CSV file(s). You specify the segments and or/contact lists you wish to export by providing the relevant IDs in, respectively, the `segment_ids` and `list_ids` fields in the request body. The lists will be provided in either JSON or CSV files. To specify which of these you would required, set the request body `file_type` field to `json` or `csv`. You can also specify a maximum file size (in MB). If the export file is larger than this, it will be split into multiple files. -func (c *ApiService) ExportContact(params *ExportContactParam) (interface{}, error) { - path := "/v3/marketing/contacts/exports" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.ExportContactRequest != nil { - b, err := json.Marshal(*params.ExportContactRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 202 { - ps := &ExportContact202Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ListContact400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &SearchContact500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_contacts/api_get_contact.go b/rest/api/v3/mc_contacts/api_get_contact.go deleted file mode 100644 index 5d0fd75f..00000000 --- a/rest/api/v3/mc_contacts/api_get_contact.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetContactParam struct { - // - Id *string `json:"id"` -} - -func (params *GetContactParam) SetId(Id string) *GetContactParam { - params.Id = &Id - return params -} - -// **This endpoint returns the full details and all fields for the specified contact**. The \"Get Contacts by Identifier\" endpoint can be used to get the ID of a contact. -func (c *ApiService) GetContact(params *GetContactParam) (interface{}, error) { - path := "/v3/marketing/contacts/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ContactDetails3{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &SearchContact500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_contacts/api_get_contact_by_identifiers.go b/rest/api/v3/mc_contacts/api_get_contact_by_identifiers.go deleted file mode 100644 index 0dfe0069..00000000 --- a/rest/api/v3/mc_contacts/api_get_contact_by_identifiers.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type GetContactByIdentifiersParam struct { - // The type of identifier to search for. - IdentifierType *IdentifierType1 `json:"identifier_type"` - // - GetContactByIdentifiersRequest *GetContactByIdentifiersRequest `json:"GetContactByIdentifiersRequest,omitempty"` -} - -func (params *GetContactByIdentifiersParam) SetIdentifierType(IdentifierType IdentifierType1) *GetContactByIdentifiersParam { - params.IdentifierType = &IdentifierType - return params -} -func (params *GetContactByIdentifiersParam) SetGetContactByIdentifiersRequest(GetContactByIdentifiersRequest GetContactByIdentifiersRequest) *GetContactByIdentifiersParam { - params.GetContactByIdentifiersRequest = &GetContactByIdentifiersRequest - return params -} - -// **This endpoint allows you to retrieve up to 100 contacts matching the searched identifier values for one type of specified identifier.** `identifier_type` must be a valid identifier type: `email`, `phone_number_id`, `external_id`, or `anonymous_id`. This endpoint should be used in place of the [Search Contacts endpoint](https://www.twilio.com/docs/sendgrid/api-reference/contacts/search-contacts) when you can provide exact identifiers and do not need to include other [Segmentation Query Language (SGQL)](https://www.twilio.com/docs/sendgrid/for-developers/sending-email/segmentation-query-language/) filters when searching. This endpoint returns a `200` status code when any contacts match the identifiers you supplied. When searching multiple identifiers in a single request, it is possible that some will match a contact while others will not. When a partially successful search like this is made, the matching contacts are returned in an object and an error message is returned for the identifiers that are not found. This endpoint returns a `404` status code when no contacts are found for the provided identifiers. A `400` status code is returned if any searched addresses are invalid. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. -func (c *ApiService) GetContactByIdentifiers(params *GetContactByIdentifiersParam) (interface{}, error) { - path := "/v3/marketing/contacts/search/identifiers/{IdentifierType}" - if params != nil && params.IdentifierType != nil { - path = strings.Replace(path, "{"+"IdentifierType"+"}", fmt.Sprint(*params.IdentifierType), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.GetContactByIdentifiersRequest != nil { - b, err := json.Marshal(*params.GetContactByIdentifiersRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &GetContactByIdentifiers200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ContactsError{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ContactsError{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &SearchContact500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_contacts/api_get_export_contact.go b/rest/api/v3/mc_contacts/api_get_export_contact.go deleted file mode 100644 index 81b27c4e..00000000 --- a/rest/api/v3/mc_contacts/api_get_export_contact.go +++ /dev/null @@ -1,101 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetExportContactParam struct { - // - Id *string `json:"id"` -} - -func (params *GetExportContactParam) SetId(Id string) *GetExportContactParam { - params.Id = &Id - return params -} - -// **This endpoint can be used to check the status of a contact export job**. To use this call, you will need the `id` from the \"Export Contacts\" call. If you would like to download a list, take the `id` that is returned from the \"Export Contacts\" endpoint and make an API request here to get the `urls`. Once you have the list of URLs, make a `GET` request on each URL to download your CSV file(s). Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. -func (c *ApiService) GetExportContact(params *GetExportContactParam) (interface{}, error) { - path := "/v3/marketing/contacts/exports/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ContactExport{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ListContact400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &SearchContact500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_contacts/api_get_import_contact.go b/rest/api/v3/mc_contacts/api_get_import_contact.go deleted file mode 100644 index 75b1ada5..00000000 --- a/rest/api/v3/mc_contacts/api_get_import_contact.go +++ /dev/null @@ -1,101 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetImportContactParam struct { - // - Id *string `json:"id"` -} - -func (params *GetImportContactParam) SetId(Id string) *GetImportContactParam { - params.Id = &Id - return params -} - -// **This endpoint can be used to check the status of a contact import job**. Use the `job_id` from the \"Import Contacts,\" \"Add or Update a Contact,\" or \"Delete Contacts\" endpoints as the `id` in the path parameter. If there is an error with your `PUT` request, download the `errors_url` file and open it to view more details. The job `status` field indicates whether the job is `pending`, `completed`, `errored`, or `failed`. Pending means not started. Completed means finished without any errors. Errored means finished with some errors. Failed means finished with all errors, or the job was entirely unprocessable: for example, if you attempt to import file format we do not support. The `results` object will have fields depending on the job type. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. -func (c *ApiService) GetImportContact(params *GetImportContactParam) (interface{}, error) { - path := "/v3/marketing/contacts/imports/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ContactImport{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &GetImportContact400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &SearchContact500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_contacts/api_import_contact.go b/rest/api/v3/mc_contacts/api_import_contact.go deleted file mode 100644 index b1ca987b..00000000 --- a/rest/api/v3/mc_contacts/api_import_contact.go +++ /dev/null @@ -1,105 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ImportContactParam struct { - // - ImportContactRequest *ImportContactRequest `json:"ImportContactRequest,omitempty"` -} - -func (params *ImportContactParam) SetImportContactRequest(ImportContactRequest ImportContactRequest) *ImportContactParam { - params.ImportContactRequest = &ImportContactRequest - return params -} - -// **This endpoint allows a CSV upload containing up to one million contacts or 5GB of data, whichever is smaller. At least one identifier is required for a successful import.** Imports take place asynchronously: the endpoint returns a URL (`upload_uri`) and HTTP headers (`upload_headers`) which can subsequently be used to `PUT` a file of contacts to be imported into our system. Uploaded CSV files may also be [gzip-compressed](https://en.wikipedia.org/wiki/Gzip). In either case, you must include the field `file_type` with the value `csv` in your request body. The `field_mappings` parameter is a respective list of field definition IDs to map the uploaded CSV columns to. It allows you to use CSVs where one or more columns are skipped (`null`) or remapped to the contact field. For example, if `field_mappings` is set to `[null, \"w1\", \"_rf1\"]`, this means skip column 0, map column 1 to the custom field with the ID `w1`, and map column 2 to the reserved field with the ID `_rf1`. See the \"Get All Field Definitions\" endpoint to fetch your custom and reserved field IDs to use with `field_mappings`. Once you receive the response body you can then initiate a **second** API call where you use the supplied URL and HTTP header to upload your file. For example: `curl --upload-file \"file/path.csv\" \"URL_GIVEN\" -H \"HEADER_GIVEN\"` If you would like to monitor the status of your import job, use the `job_id` and the \"Import Contacts Status\" endpoint. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. -func (c *ApiService) ImportContact(params *ImportContactParam) (interface{}, error) { - path := "/v3/marketing/contacts/imports" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.ImportContactRequest != nil { - b, err := json.Marshal(*params.ImportContactRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ImportContact200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ImportContact400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ImportContact404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &SearchContact500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_contacts/api_list_batched_contact.go b/rest/api/v3/mc_contacts/api_list_batched_contact.go deleted file mode 100644 index 881c20b6..00000000 --- a/rest/api/v3/mc_contacts/api_list_batched_contact.go +++ /dev/null @@ -1,97 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListBatchedContactParam struct { - // - ListBatchedContactRequest *ListBatchedContactRequest `json:"ListBatchedContactRequest,omitempty"` -} - -func (params *ListBatchedContactParam) SetListBatchedContactRequest(ListBatchedContactRequest ListBatchedContactRequest) *ListBatchedContactParam { - params.ListBatchedContactRequest = &ListBatchedContactRequest - return params -} - -// **This endpoint is used to retrieve a set of contacts identified by their IDs.** This can be more efficient endpoint to get contacts than making a series of individual `GET` requests to the \"Get a Contact by ID\" endpoint. You can supply up to 100 IDs. Pass them into the `ids` field in your request body as an array or one or more strings. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. -func (c *ApiService) ListBatchedContact(params *ListBatchedContactParam) (interface{}, error) { - path := "/v3/marketing/contacts/batch" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.ListBatchedContactRequest != nil { - b, err := json.Marshal(*params.ListBatchedContactRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListBatchedContact200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &SearchContact500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_contacts/api_list_contact.go b/rest/api/v3/mc_contacts/api_list_contact.go deleted file mode 100644 index 404901b3..00000000 --- a/rest/api/v3/mc_contacts/api_list_contact.go +++ /dev/null @@ -1,89 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListContactParam struct { -} - -// **This endpoint will return up to 50 of the most recent contacts uploaded or attached to a list**. This list will then be sorted by email address. The full contact count is also returned. Please note that pagination of the contacts has been deprecated. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. -func (c *ApiService) ListContact() (interface{}, error) { - path := "/v3/marketing/contacts" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListContact200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ListContact400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &SearchContact500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_contacts/api_list_contact_by_email.go b/rest/api/v3/mc_contacts/api_list_contact_by_email.go deleted file mode 100644 index c2a1913c..00000000 --- a/rest/api/v3/mc_contacts/api_list_contact_by_email.go +++ /dev/null @@ -1,105 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListContactByEmailParam struct { - // - ListContactByEmailRequest *ListContactByEmailRequest `json:"ListContactByEmailRequest,omitempty"` -} - -func (params *ListContactByEmailParam) SetListContactByEmailRequest(ListContactByEmailRequest ListContactByEmailRequest) *ListContactByEmailParam { - params.ListContactByEmailRequest = &ListContactByEmailRequest - return params -} - -// **This endpoint allows you to retrieve up to 100 contacts matching the searched `email` address(es), including any `alternate_emails`.** Email addresses are unique to a contact, meaning this endpoint can treat an email address as a primary key to search by. The contact object associated with the address, whether it is their `email` or one of their `alternate_emails` will be returned if matched. Email addresses in the search request do not need to match the case in which they're stored, but the email addresses in the result will be all lower case. Empty strings are excluded from the search and will not be returned. This endpoint should be used in place of the \"Search Contacts\" endpoint when you can provide exact email addresses and do not need to include other [Segmentation Query Language (SGQL)](https://sendgrid.com/docs/for-developers/sending-email/segmentation-query-language/) filters when searching. If you need to access a large percentage of your contacts, we recommend exporting your contacts with the \"Export Contacts\" endpoint and filtering the client side results. This endpoint returns a `200` status code when any contacts match the address(es) you supplied. When searching multiple addresses in a single request, it is possible that some addresses will match a contact while others will not. When a partially successful search like this is made, the matching contacts are returned in an object and an error message is returned for the email address(es) that are not found. This endpoint returns a `404` status code when no contacts are found for the provided email address(es). A `400` status code is returned if any searched addresses are invalid. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. -func (c *ApiService) ListContactByEmail(params *ListContactByEmailParam) (interface{}, error) { - path := "/v3/marketing/contacts/search/emails" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.ListContactByEmailRequest != nil { - b, err := json.Marshal(*params.ListContactByEmailRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListContactByEmail200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &SearchContact500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_contacts/api_list_contact_count.go b/rest/api/v3/mc_contacts/api_list_contact_count.go deleted file mode 100644 index 12643f45..00000000 --- a/rest/api/v3/mc_contacts/api_list_contact_count.go +++ /dev/null @@ -1,81 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListContactCountParam struct { -} - -// **This endpoint returns the total number of contacts you have stored.** Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. -func (c *ApiService) ListContactCount() (interface{}, error) { - path := "/v3/marketing/contacts/count" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListContactCount200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &SearchContact500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_contacts/api_list_export_contact.go b/rest/api/v3/mc_contacts/api_list_export_contact.go deleted file mode 100644 index 848febfa..00000000 --- a/rest/api/v3/mc_contacts/api_list_export_contact.go +++ /dev/null @@ -1,89 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListExportContactParam struct { -} - -// **Use this endpoint to retrieve details of all current exported jobs**. It will return an array of objects, each of which records an export job in flight or recently completed. Each object's `export_type` field will tell you which kind of export it is and its `status` field will indicate what stage of processing it has reached. Exports which are `ready` will be accompanied by a `urls` field which lists the URLs of the export's downloadable files — there will be more than one if you specified a maximum file size in your initial export request. Use this endpoint if you have exports in flight but do not know their IDs, which are required for the \"Export Contacts Status\" endpoint. -func (c *ApiService) ListExportContact() (interface{}, error) { - path := "/v3/marketing/contacts/exports" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListExportContact200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ListExportContact400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &SearchContact500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_contacts/api_search_contact.go b/rest/api/v3/mc_contacts/api_search_contact.go deleted file mode 100644 index bda12805..00000000 --- a/rest/api/v3/mc_contacts/api_search_contact.go +++ /dev/null @@ -1,105 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type SearchContactParam struct { - // - SearchContactRequest *SearchContactRequest `json:"SearchContactRequest,omitempty"` -} - -func (params *SearchContactParam) SetSearchContactRequest(SearchContactRequest SearchContactRequest) *SearchContactParam { - params.SearchContactRequest = &SearchContactRequest - return params -} - -// **Use this endpoint to locate contacts**. The request body's `query` field accepts valid [SGQL](https://sendgrid.com/docs/for-developers/sending-email/segmentation-query-language/) for searching for a contact. Because contact emails are stored in lower case, using SGQL to search by email address requires the provided email address to be in lower case. The SGQL `lower()` function can be used for this. Only the first 50 contacts that meet the search criteria will be returned. If the query takes longer than 20 seconds, a `408 Request Timeout` status will be returned. Formatting the `created_at` and `updated_at` values as Unix timestamps is deprecated. Instead, they are returned as ISO format as string. -func (c *ApiService) SearchContact(params *SearchContactParam) (interface{}, error) { - path := "/v3/marketing/contacts/search" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.SearchContactRequest != nil { - b, err := json.Marshal(*params.SearchContactRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SearchContact200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &SearchContact400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &SearchContact500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_contacts/api_service.go b/rest/api/v3/mc_contacts/api_service.go deleted file mode 100644 index e6fd6d1f..00000000 --- a/rest/api/v3/mc_contacts/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/mc_contacts/api_update_contact.go b/rest/api/v3/mc_contacts/api_update_contact.go deleted file mode 100644 index 9990676f..00000000 --- a/rest/api/v3/mc_contacts/api_update_contact.go +++ /dev/null @@ -1,105 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type UpdateContactParam struct { - // - UpdateContactRequest *UpdateContactRequest `json:"UpdateContactRequest,omitempty"` -} - -func (params *UpdateContactParam) SetUpdateContactRequest(UpdateContactRequest UpdateContactRequest) *UpdateContactParam { - params.UpdateContactRequest = &UpdateContactRequest - return params -} - -// **This endpoint allows the [upsert](https://en.wiktionary.org/wiki/upsert) (insert or update) of up to 30,000 contacts, or 6MB of data, whichever is lower**. Because the creation and update of contacts is an asynchronous process, the response will not contain immediate feedback on the processing of your upserted contacts. Rather, it will contain an HTTP 202 response indicating the contacts are queued for processing or an HTTP 4XX error containing validation errors. Should you wish to get the resulting contact's ID or confirm that your contacts have been updated or added, you can use the [Get Contacts by Identifiers operation](https://www.twilio.com/docs/sendgrid/api-reference/contacts/get-contacts-by-identifiers). Please note that custom fields need to have been already created if you wish to set their values for the contacts being upserted. To do this, please use the [Create Custom Field Definition endpoint](https://www.twilio.com/docs/sendgrid/api-reference/custom-fields/create-custom-field-definition). You will see a `job_id` in the response to your request. This can be used to check the status of your upsert job. To do so, please use the [Import Contacts Status endpoint](https://www.twilio.com/docs/sendgrid/api-reference/contacts/import-contacts-status). If the contact already exists in the system, any entries submitted via this endpoint will update the existing contact. In order to update a contact, all of its existing identifiers must be present. Any fields omitted from the request will remain as they were. A contact's ID cannot be used to update the contact. The email field will be changed to all lower-case. If a contact is added with an email that exists but contains capital letters, the existing contact with the all lower-case email will be updated. -func (c *ApiService) UpdateContact(params *UpdateContactParam) (interface{}, error) { - path := "/v3/marketing/contacts" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateContactRequest != nil { - b, err := json.Marshal(*params.UpdateContactRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 202 { - ps := &UpdateContact202Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ListContact400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &SearchContact500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_contacts/docs/ContactDetails3.md b/rest/api/v3/mc_contacts/docs/ContactDetails3.md deleted file mode 100644 index fb1addc0..00000000 --- a/rest/api/v3/mc_contacts/docs/ContactDetails3.md +++ /dev/null @@ -1,35 +0,0 @@ -# ContactDetails3 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | | -**FirstName** | **string** | |[optional] -**LastName** | **string** | |[optional] -**UniqueName** | **string** | |[optional] -**Email** | **string** | |[optional] -**PhoneNumberId** | **string** | |[optional] -**ExternalId** | **string** | |[optional] -**AnonymousId** | **string** | |[optional] -**AlternateEmails** | **[]string** | |[optional] -**AddressLine1** | **string** | |[optional] -**AddressLine2** | **string** | |[optional] -**City** | **string** | |[optional] -**StateProvinceRegion** | **string** | |[optional] -**Country** | **string** | |[optional] -**PostalCode** | **string** | |[optional] -**PhoneNumber** | **string** | |[optional] -**Whatsapp** | **string** | |[optional] -**Line** | **string** | |[optional] -**Facebook** | **string** | |[optional] -**ListIds** | **[]string** | | -**SegmentIds** | **[]string** | | -**CustomFields** | **map[string]interface{}** | |[optional] -**CreatedAt** | **string** | | -**UpdatedAt** | **string** | | -**Metadata** | [**SelfMetadata**](SelfMetadata.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ContactExport.md b/rest/api/v3/mc_contacts/docs/ContactExport.md deleted file mode 100644 index d0570ae9..00000000 --- a/rest/api/v3/mc_contacts/docs/ContactExport.md +++ /dev/null @@ -1,20 +0,0 @@ -# ContactExport - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | | -**Status** | [**Status**](Status.md) | The export job's status. Allowed values: `pending`, `ready`, or `failure`. | -**CreatedAt** | **string** | The ISO8601 timestamp when the export was begun. | -**UpdatedAt** | **string** | The ISO8601 timestamp when the export was updated. | -**CompletedAt** | **string** | The ISO8601 timestamp when the export was completed. |[optional] -**ExpiresAt** | **string** | The ISO8601 timestamp when the exported file on S3 will expire. | -**Urls** | **[]string** | One or more download URLs for the contact file if the status is `ready`. |[optional] -**Message** | **string** | A human readable message if the status is `failure`. |[optional] -**Metadata** | [**Metadata**](Metadata.md) | |[optional] -**ContactCount** | **int32** | The total number of exported contacts. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ContactImport.md b/rest/api/v3/mc_contacts/docs/ContactImport.md deleted file mode 100644 index c74de5b6..00000000 --- a/rest/api/v3/mc_contacts/docs/ContactImport.md +++ /dev/null @@ -1,16 +0,0 @@ -# ContactImport - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | The job ID. |[optional] -**Status** | **string** | The job state. Allowed values: `pending`, `completed`, `errored`, or `failed`. |[optional] -**JobType** | **string** | The job type. Allowed values: `upsert`, or `delete`. |[optional] -**Results** | [**ContactImportResults**](ContactImportResults.md) | |[optional] -**StartedAt** | **string** | The ISO8601 timestamp when the job was created. |[optional] -**FinishedAt** | **string** | The ISO8601 timestamp when the job was finished. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ContactImportResults.md b/rest/api/v3/mc_contacts/docs/ContactImportResults.md deleted file mode 100644 index 09691c7e..00000000 --- a/rest/api/v3/mc_contacts/docs/ContactImportResults.md +++ /dev/null @@ -1,16 +0,0 @@ -# ContactImportResults - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**RequestedCount** | **float32** | Requested contact count from the import. |[optional] -**CreatedCount** | **float32** | Created contact count from the import. |[optional] -**UpdatedCount** | **float32** | Updated contact count from the import. |[optional] -**DeletedCount** | **float32** | Count of deleted contacts that resulted in error. |[optional] -**ErroredCount** | **float32** | Count of imported contacts that resulted in error. |[optional] -**ErrorsUrl** | **string** | The download URL of the file which provides information about any errors. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ContactRequest.md b/rest/api/v3/mc_contacts/docs/ContactRequest.md deleted file mode 100644 index 29d8492f..00000000 --- a/rest/api/v3/mc_contacts/docs/ContactRequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# ContactRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AddressLine1** | **string** | The first line of the address. |[optional] -**AddressLine2** | **string** | An optional second line for the address. |[optional] -**AlternateEmails** | **[]string** | Additional emails associated with the contact. |[optional] -**City** | **string** | The contact's city. |[optional] -**Country** | **string** | The contact's country. Can be a full name or an abbreviation. |[optional] -**Email** | **string** | The contact's primary email. This is required to be a valid email. |[optional] -**PhoneNumberId** | **string** | The contact's Phone Number ID. This must be a valid phone number. |[optional] -**ExternalId** | **string** | The contact's External ID. |[optional] -**AnonymousId** | **string** | The contact's Anonymous ID. |[optional] -**FirstName** | **string** | The contact's personal name. |[optional] -**LastName** | **string** | The contact's family name. |[optional] -**PostalCode** | **string** | The contact's ZIP code or other postal code. |[optional] -**StateProvinceRegion** | **string** | The contact's state, province, or region. |[optional] -**CustomFields** | [**ContactRequestCustomFields**](ContactRequestCustomFields.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ContactRequestCustomFields.md b/rest/api/v3/mc_contacts/docs/ContactRequestCustomFields.md deleted file mode 100644 index 509644d6..00000000 --- a/rest/api/v3/mc_contacts/docs/ContactRequestCustomFields.md +++ /dev/null @@ -1,11 +0,0 @@ -# ContactRequestCustomFields - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**W1** | **string** | The properties in this object are made up of a key (the custom field ID) and value you want associated with that custom field. For example `{\"w1\": \"coffee\"}`. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ContactsError.md b/rest/api/v3/mc_contacts/docs/ContactsError.md deleted file mode 100644 index 4f398c3d..00000000 --- a/rest/api/v3/mc_contacts/docs/ContactsError.md +++ /dev/null @@ -1,14 +0,0 @@ -# ContactsError - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | | -**Field** | **string** | |[optional] -**ErrorId** | **string** | |[optional] -**Parameter** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/DeleteContact.md b/rest/api/v3/mc_contacts/docs/DeleteContact.md deleted file mode 100644 index 35fbb0d0..00000000 --- a/rest/api/v3/mc_contacts/docs/DeleteContact.md +++ /dev/null @@ -1,49 +0,0 @@ -# DeleteContact - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteContact**](DeleteContact.md#DeleteContact) | **Delete** /v3/marketing/contacts | Delete Contacts - - - -## DeleteContact - -> DeleteContact202Response DeleteContact(ctx, optional) - -Delete Contacts - -**This endpoint can be used to delete one or more contacts**. The query parameter `ids` must set to a comma-separated list of contact IDs for bulk contact deletion. The query parameter `delete_all_contacts` must be set to `\"true\"` to delete **all** contacts. You must set either `ids` or `delete_all_contacts`. Deletion jobs are processed asynchronously. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteContactParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**DeleteAllContacts** | **string** | Must be set to `\"true\"` to delete all contacts. -**Ids** | **string** | A comma-separated list of contact IDs. - -### Return type - -[**DeleteContact202Response**](DeleteContact202Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_contacts/docs/DeleteContact202Response.md b/rest/api/v3/mc_contacts/docs/DeleteContact202Response.md deleted file mode 100644 index 61dab669..00000000 --- a/rest/api/v3/mc_contacts/docs/DeleteContact202Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeleteContact202Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**JobId** | **map[string]interface{}** | The deletion job ID. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/DeleteContact400Response.md b/rest/api/v3/mc_contacts/docs/DeleteContact400Response.md deleted file mode 100644 index 6280dfdb..00000000 --- a/rest/api/v3/mc_contacts/docs/DeleteContact400Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeleteContact400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | **[]map[string]interface{}** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/DeleteContactIdentifier.md b/rest/api/v3/mc_contacts/docs/DeleteContactIdentifier.md deleted file mode 100644 index e7b37272..00000000 --- a/rest/api/v3/mc_contacts/docs/DeleteContactIdentifier.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeleteContactIdentifier - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteContactIdentifier**](DeleteContactIdentifier.md#DeleteContactIdentifier) | **Delete** /v3/marketing/contacts/{ContactId}/identifiers | Delete a Contact Identifier - - - -## DeleteContactIdentifier - -> DeleteContactIdentifier202Response DeleteContactIdentifier(ctx, ContactIdoptional) - -Delete a Contact Identifier - -**This endpoint can be used to delete one identifier from a contact.** Deletion jobs are processed asynchronously. Note this is different from deleting a contact. If the contact has only one identifier, the asynchronous request will fail. All contacts are required to have at least one identifier. The request body field `identifier_type` must have a valid value of \"EMAIL\", \"PHONENUMBERID\", \"EXTERNALID\", or \"ANONYMOUSID\". - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**ContactId** | **string** | Must be set to the `contact_id` of the contact you want to remove the identifier from. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteContactIdentifierParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**DeleteContactIdentifierRequest** | [**DeleteContactIdentifierRequest**](DeleteContactIdentifierRequest.md) | - -### Return type - -[**DeleteContactIdentifier202Response**](DeleteContactIdentifier202Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_contacts/docs/DeleteContactIdentifier202Response.md b/rest/api/v3/mc_contacts/docs/DeleteContactIdentifier202Response.md deleted file mode 100644 index 99b15007..00000000 --- a/rest/api/v3/mc_contacts/docs/DeleteContactIdentifier202Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeleteContactIdentifier202Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**JobId** | **map[string]interface{}** | The deletion job ID. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/DeleteContactIdentifierRequest.md b/rest/api/v3/mc_contacts/docs/DeleteContactIdentifierRequest.md deleted file mode 100644 index b8a5701a..00000000 --- a/rest/api/v3/mc_contacts/docs/DeleteContactIdentifierRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# DeleteContactIdentifierRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**IdentifierType** | [**IdentifierType**](IdentifierType.md) | The type of identifier you are removing from the contact. | -**IdentifierValue** | **string** | The value of the identifier you want to remove from the contact. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ErrorResponse.md b/rest/api/v3/mc_contacts/docs/ErrorResponse.md deleted file mode 100644 index ec2d41f6..00000000 --- a/rest/api/v3/mc_contacts/docs/ErrorResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ErrorResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] -**Id** | **string** | When applicable, this property value will be an error ID. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ErrorResponseErrorsInner.md b/rest/api/v3/mc_contacts/docs/ErrorResponseErrorsInner.md deleted file mode 100644 index 5449c685..00000000 --- a/rest/api/v3/mc_contacts/docs/ErrorResponseErrorsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ErrorResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | An error message. |[optional] -**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] -**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ExportContact.md b/rest/api/v3/mc_contacts/docs/ExportContact.md deleted file mode 100644 index 1e6807e0..00000000 --- a/rest/api/v3/mc_contacts/docs/ExportContact.md +++ /dev/null @@ -1,48 +0,0 @@ -# ExportContact - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ExportContact**](ExportContact.md#ExportContact) | **Post** /v3/marketing/contacts/exports | Export Contacts - - - -## ExportContact - -> ExportContact202Response ExportContact(ctx, optional) - -Export Contacts - -**Use this endpoint to export lists or segments of contacts**. If you would just like to have a link to the exported list sent to your email set the `notifications.email` option to `true` in the `POST` payload. If you would like to download the list, take the `id` that is returned and use the \"Export Contacts Status\" endpoint to get the `urls`. Once you have the list of URLs, make a `GET` request to each URL provided to download your CSV file(s). You specify the segments and or/contact lists you wish to export by providing the relevant IDs in, respectively, the `segment_ids` and `list_ids` fields in the request body. The lists will be provided in either JSON or CSV files. To specify which of these you would required, set the request body `file_type` field to `json` or `csv`. You can also specify a maximum file size (in MB). If the export file is larger than this, it will be split into multiple files. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ExportContactParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**ExportContactRequest** | [**ExportContactRequest**](ExportContactRequest.md) | - -### Return type - -[**ExportContact202Response**](ExportContact202Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_contacts/docs/ExportContact202Response.md b/rest/api/v3/mc_contacts/docs/ExportContact202Response.md deleted file mode 100644 index a1fa2d83..00000000 --- a/rest/api/v3/mc_contacts/docs/ExportContact202Response.md +++ /dev/null @@ -1,12 +0,0 @@ -# ExportContact202Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Metadata** | [**Metadata**](Metadata.md) | | -**Id** | **string** | The ID of the export job. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ExportContactRequest.md b/rest/api/v3/mc_contacts/docs/ExportContactRequest.md deleted file mode 100644 index 0dc71918..00000000 --- a/rest/api/v3/mc_contacts/docs/ExportContactRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# ExportContactRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ListIds** | **[]string** | IDs of the contact lists you want to export. |[optional] -**SegmentIds** | **[]string** | IDs of the contact segments you want to export. |[optional] -**Notifications** | [**ExportContactRequestNotifications**](ExportContactRequestNotifications.md) | |[optional] -**FileType** | [**FileType**](FileType.md) | File type for export file. Choose from `json` or `csv`. |[optional] -**MaxFileSize** | **int32** | The maximum size of an export file in MB. Note that when this option is specified, multiple output files may be returned from the export. |[optional] [default to 5000] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ExportContactRequestNotifications.md b/rest/api/v3/mc_contacts/docs/ExportContactRequestNotifications.md deleted file mode 100644 index 970bb936..00000000 --- a/rest/api/v3/mc_contacts/docs/ExportContactRequestNotifications.md +++ /dev/null @@ -1,11 +0,0 @@ -# ExportContactRequestNotifications - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | **bool** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/FileType.md b/rest/api/v3/mc_contacts/docs/FileType.md deleted file mode 100644 index c725a871..00000000 --- a/rest/api/v3/mc_contacts/docs/FileType.md +++ /dev/null @@ -1,13 +0,0 @@ -# FileType - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**CSV** | string | (value: `"csv"`) -**JSON** | string | (value: `"json"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/FileType1.md b/rest/api/v3/mc_contacts/docs/FileType1.md deleted file mode 100644 index bfcef1f9..00000000 --- a/rest/api/v3/mc_contacts/docs/FileType1.md +++ /dev/null @@ -1,12 +0,0 @@ -# FileType1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**CSV** | string | (value: `"csv"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/GetContact.md b/rest/api/v3/mc_contacts/docs/GetContact.md deleted file mode 100644 index f5c5a397..00000000 --- a/rest/api/v3/mc_contacts/docs/GetContact.md +++ /dev/null @@ -1,51 +0,0 @@ -# GetContact - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetContact**](GetContact.md#GetContact) | **Get** /v3/marketing/contacts/{Id} | Get a Contact by ID - - - -## GetContact - -> ContactDetails3 GetContact(ctx, Id) - -Get a Contact by ID - -**This endpoint returns the full details and all fields for the specified contact**. The \"Get Contacts by Identifier\" endpoint can be used to get the ID of a contact. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a GetContactParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**ContactDetails3**](ContactDetails3.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_contacts/docs/GetContactByIdentifiers.md b/rest/api/v3/mc_contacts/docs/GetContactByIdentifiers.md deleted file mode 100644 index 0085b184..00000000 --- a/rest/api/v3/mc_contacts/docs/GetContactByIdentifiers.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetContactByIdentifiers - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetContactByIdentifiers**](GetContactByIdentifiers.md#GetContactByIdentifiers) | **Post** /v3/marketing/contacts/search/identifiers/{IdentifierType} | Get Contacts by Identifiers - - - -## GetContactByIdentifiers - -> GetContactByIdentifiers200Response GetContactByIdentifiers(ctx, IdentifierTypeoptional) - -Get Contacts by Identifiers - -**This endpoint allows you to retrieve up to 100 contacts matching the searched identifier values for one type of specified identifier.** `identifier_type` must be a valid identifier type: `email`, `phone_number_id`, `external_id`, or `anonymous_id`. This endpoint should be used in place of the [Search Contacts endpoint](https://www.twilio.com/docs/sendgrid/api-reference/contacts/search-contacts) when you can provide exact identifiers and do not need to include other [Segmentation Query Language (SGQL)](https://www.twilio.com/docs/sendgrid/for-developers/sending-email/segmentation-query-language/) filters when searching. This endpoint returns a `200` status code when any contacts match the identifiers you supplied. When searching multiple identifiers in a single request, it is possible that some will match a contact while others will not. When a partially successful search like this is made, the matching contacts are returned in an object and an error message is returned for the identifiers that are not found. This endpoint returns a `404` status code when no contacts are found for the provided identifiers. A `400` status code is returned if any searched addresses are invalid. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**IdentifierType** | [**IdentifierType1**](IdentifierType1.md) | The type of identifier to search for. - -### Other Parameters - -Other parameters are passed through a pointer to a GetContactByIdentifiersParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**GetContactByIdentifiersRequest** | [**GetContactByIdentifiersRequest**](GetContactByIdentifiersRequest.md) | - -### Return type - -[**GetContactByIdentifiers200Response**](GetContactByIdentifiers200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_contacts/docs/GetContactByIdentifiers200Response.md b/rest/api/v3/mc_contacts/docs/GetContactByIdentifiers200Response.md deleted file mode 100644 index 214673b6..00000000 --- a/rest/api/v3/mc_contacts/docs/GetContactByIdentifiers200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetContactByIdentifiers200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | **interface{}** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/GetContactByIdentifiers200ResponseResultValue.md b/rest/api/v3/mc_contacts/docs/GetContactByIdentifiers200ResponseResultValue.md deleted file mode 100644 index 6652c7b4..00000000 --- a/rest/api/v3/mc_contacts/docs/GetContactByIdentifiers200ResponseResultValue.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetContactByIdentifiers200ResponseResultValue - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Contact** | [**ContactDetails3**](ContactDetails3.md) | |[optional] -**Error** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/GetContactByIdentifiersRequest.md b/rest/api/v3/mc_contacts/docs/GetContactByIdentifiersRequest.md deleted file mode 100644 index 92323249..00000000 --- a/rest/api/v3/mc_contacts/docs/GetContactByIdentifiersRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetContactByIdentifiersRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Identifiers** | [**[]GetContactByIdentifiersRequestIdentifiersInner**](GetContactByIdentifiersRequestIdentifiersInner.md) | One or more more identifier values to search for in your Marketing Campaigns contacts. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/GetContactByIdentifiersRequestIdentifiersInner.md b/rest/api/v3/mc_contacts/docs/GetContactByIdentifiersRequestIdentifiersInner.md deleted file mode 100644 index 7d2bdec4..00000000 --- a/rest/api/v3/mc_contacts/docs/GetContactByIdentifiersRequestIdentifiersInner.md +++ /dev/null @@ -1,14 +0,0 @@ -# GetContactByIdentifiersRequestIdentifiersInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | **string** | |[optional] -**PhoneNumberId** | **string** | The contact's Phone Number ID. This is required to be a valid phone number. |[optional] -**ExternalId** | **string** | The contact's External ID. |[optional] -**AnonymousId** | **string** | The contact's Anonymous ID. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/GetExportContact.md b/rest/api/v3/mc_contacts/docs/GetExportContact.md deleted file mode 100644 index d705c7a9..00000000 --- a/rest/api/v3/mc_contacts/docs/GetExportContact.md +++ /dev/null @@ -1,51 +0,0 @@ -# GetExportContact - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetExportContact**](GetExportContact.md#GetExportContact) | **Get** /v3/marketing/contacts/exports/{Id} | Export Contacts Status - - - -## GetExportContact - -> ContactExport GetExportContact(ctx, Id) - -Export Contacts Status - -**This endpoint can be used to check the status of a contact export job**. To use this call, you will need the `id` from the \"Export Contacts\" call. If you would like to download a list, take the `id` that is returned from the \"Export Contacts\" endpoint and make an API request here to get the `urls`. Once you have the list of URLs, make a `GET` request on each URL to download your CSV file(s). Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a GetExportContactParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**ContactExport**](ContactExport.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_contacts/docs/GetImportContact.md b/rest/api/v3/mc_contacts/docs/GetImportContact.md deleted file mode 100644 index 5e1ab06c..00000000 --- a/rest/api/v3/mc_contacts/docs/GetImportContact.md +++ /dev/null @@ -1,51 +0,0 @@ -# GetImportContact - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetImportContact**](GetImportContact.md#GetImportContact) | **Get** /v3/marketing/contacts/imports/{Id} | Import Contacts Status - - - -## GetImportContact - -> ContactImport GetImportContact(ctx, Id) - -Import Contacts Status - -**This endpoint can be used to check the status of a contact import job**. Use the `job_id` from the \"Import Contacts,\" \"Add or Update a Contact,\" or \"Delete Contacts\" endpoints as the `id` in the path parameter. If there is an error with your `PUT` request, download the `errors_url` file and open it to view more details. The job `status` field indicates whether the job is `pending`, `completed`, `errored`, or `failed`. Pending means not started. Completed means finished without any errors. Errored means finished with some errors. Failed means finished with all errors, or the job was entirely unprocessable: for example, if you attempt to import file format we do not support. The `results` object will have fields depending on the job type. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a GetImportContactParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**ContactImport**](ContactImport.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_contacts/docs/GetImportContact400Response.md b/rest/api/v3/mc_contacts/docs/GetImportContact400Response.md deleted file mode 100644 index b59d81f4..00000000 --- a/rest/api/v3/mc_contacts/docs/GetImportContact400Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetImportContact400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**ContactsError**](ContactsError.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/IdentifierType.md b/rest/api/v3/mc_contacts/docs/IdentifierType.md deleted file mode 100644 index d5cb9fc6..00000000 --- a/rest/api/v3/mc_contacts/docs/IdentifierType.md +++ /dev/null @@ -1,15 +0,0 @@ -# IdentifierType - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**EMAIL** | string | (value: `"EMAIL"`) -**PHONENUMBERID** | string | (value: `"PHONENUMBERID"`) -**EXTERNALID** | string | (value: `"EXTERNALID"`) -**ANONYMOUSID** | string | (value: `"ANONYMOUSID"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/IdentifierType1.md b/rest/api/v3/mc_contacts/docs/IdentifierType1.md deleted file mode 100644 index 87129625..00000000 --- a/rest/api/v3/mc_contacts/docs/IdentifierType1.md +++ /dev/null @@ -1,15 +0,0 @@ -# IdentifierType1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**EMAIL** | string | (value: `"email"`) -**PHONE_NUMBER_ID** | string | (value: `"phone_number_id"`) -**EXTERNAL_ID** | string | (value: `"external_id"`) -**ANONYMOUS_ID** | string | (value: `"anonymous_id"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ImportContact.md b/rest/api/v3/mc_contacts/docs/ImportContact.md deleted file mode 100644 index 9d5d80a3..00000000 --- a/rest/api/v3/mc_contacts/docs/ImportContact.md +++ /dev/null @@ -1,48 +0,0 @@ -# ImportContact - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ImportContact**](ImportContact.md#ImportContact) | **Put** /v3/marketing/contacts/imports | Import Contacts - - - -## ImportContact - -> ImportContact200Response ImportContact(ctx, optional) - -Import Contacts - -**This endpoint allows a CSV upload containing up to one million contacts or 5GB of data, whichever is smaller. At least one identifier is required for a successful import.** Imports take place asynchronously: the endpoint returns a URL (`upload_uri`) and HTTP headers (`upload_headers`) which can subsequently be used to `PUT` a file of contacts to be imported into our system. Uploaded CSV files may also be [gzip-compressed](https://en.wikipedia.org/wiki/Gzip). In either case, you must include the field `file_type` with the value `csv` in your request body. The `field_mappings` parameter is a respective list of field definition IDs to map the uploaded CSV columns to. It allows you to use CSVs where one or more columns are skipped (`null`) or remapped to the contact field. For example, if `field_mappings` is set to `[null, \"w1\", \"_rf1\"]`, this means skip column 0, map column 1 to the custom field with the ID `w1`, and map column 2 to the reserved field with the ID `_rf1`. See the \"Get All Field Definitions\" endpoint to fetch your custom and reserved field IDs to use with `field_mappings`. Once you receive the response body you can then initiate a **second** API call where you use the supplied URL and HTTP header to upload your file. For example: `curl --upload-file \"file/path.csv\" \"URL_GIVEN\" -H \"HEADER_GIVEN\"` If you would like to monitor the status of your import job, use the `job_id` and the \"Import Contacts Status\" endpoint. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ImportContactParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**ImportContactRequest** | [**ImportContactRequest**](ImportContactRequest.md) | - -### Return type - -[**ImportContact200Response**](ImportContact200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_contacts/docs/ImportContact200Response.md b/rest/api/v3/mc_contacts/docs/ImportContact200Response.md deleted file mode 100644 index 872a6469..00000000 --- a/rest/api/v3/mc_contacts/docs/ImportContact200Response.md +++ /dev/null @@ -1,13 +0,0 @@ -# ImportContact200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**JobId** | **string** | The ID of the import job. |[optional] -**UploadUri** | **string** | The URI to PUT the upload file to. |[optional] -**UploadHeaders** | [**[]ImportContact200ResponseUploadHeadersInner**](ImportContact200ResponseUploadHeadersInner.md) | A list of headers that must be included in PUT request. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ImportContact200ResponseUploadHeadersInner.md b/rest/api/v3/mc_contacts/docs/ImportContact200ResponseUploadHeadersInner.md deleted file mode 100644 index 1f57c2c5..00000000 --- a/rest/api/v3/mc_contacts/docs/ImportContact200ResponseUploadHeadersInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ImportContact200ResponseUploadHeadersInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Header** | **string** | | -**Value** | **string** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ImportContact400Response.md b/rest/api/v3/mc_contacts/docs/ImportContact400Response.md deleted file mode 100644 index f6218120..00000000 --- a/rest/api/v3/mc_contacts/docs/ImportContact400Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ImportContact400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ContactsError**](ContactsError.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ImportContact404Response.md b/rest/api/v3/mc_contacts/docs/ImportContact404Response.md deleted file mode 100644 index 10ad90e9..00000000 --- a/rest/api/v3/mc_contacts/docs/ImportContact404Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ImportContact404Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ContactsError**](ContactsError.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ImportContactRequest.md b/rest/api/v3/mc_contacts/docs/ImportContactRequest.md deleted file mode 100644 index a45dbe8a..00000000 --- a/rest/api/v3/mc_contacts/docs/ImportContactRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# ImportContactRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ListIds** | **[]string** | All contacts will be added to each of the specified lists. |[optional] -**FileType** | [**FileType1**](FileType1.md) | Upload file type. | -**FieldMappings** | **[]string** | Import file header to reserved/custom field mapping. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ListBatchedContact.md b/rest/api/v3/mc_contacts/docs/ListBatchedContact.md deleted file mode 100644 index 0420d571..00000000 --- a/rest/api/v3/mc_contacts/docs/ListBatchedContact.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListBatchedContact - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListBatchedContact**](ListBatchedContact.md#ListBatchedContact) | **Post** /v3/marketing/contacts/batch | Get Batched Contacts by IDs - - - -## ListBatchedContact - -> ListBatchedContact200Response ListBatchedContact(ctx, optional) - -Get Batched Contacts by IDs - -**This endpoint is used to retrieve a set of contacts identified by their IDs.** This can be more efficient endpoint to get contacts than making a series of individual `GET` requests to the \"Get a Contact by ID\" endpoint. You can supply up to 100 IDs. Pass them into the `ids` field in your request body as an array or one or more strings. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListBatchedContactParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**ListBatchedContactRequest** | [**ListBatchedContactRequest**](ListBatchedContactRequest.md) | - -### Return type - -[**ListBatchedContact200Response**](ListBatchedContact200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_contacts/docs/ListBatchedContact200Response.md b/rest/api/v3/mc_contacts/docs/ListBatchedContact200Response.md deleted file mode 100644 index 4d6a53f1..00000000 --- a/rest/api/v3/mc_contacts/docs/ListBatchedContact200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListBatchedContact200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]ContactDetails3**](ContactDetails3.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ListBatchedContactRequest.md b/rest/api/v3/mc_contacts/docs/ListBatchedContactRequest.md deleted file mode 100644 index b738da1c..00000000 --- a/rest/api/v3/mc_contacts/docs/ListBatchedContactRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListBatchedContactRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Ids** | **[]string** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ListContact.md b/rest/api/v3/mc_contacts/docs/ListContact.md deleted file mode 100644 index e7a76be0..00000000 --- a/rest/api/v3/mc_contacts/docs/ListContact.md +++ /dev/null @@ -1,44 +0,0 @@ -# ListContact - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListContact**](ListContact.md#ListContact) | **Get** /v3/marketing/contacts | Get Sample Contacts - - - -## ListContact - -> ListContact200Response ListContact(ctx, ) - -Get Sample Contacts - -**This endpoint will return up to 50 of the most recent contacts uploaded or attached to a list**. This list will then be sorted by email address. The full contact count is also returned. Please note that pagination of the contacts has been deprecated. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListContactParams struct - - -### Return type - -[**ListContact200Response**](ListContact200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_contacts/docs/ListContact200Response.md b/rest/api/v3/mc_contacts/docs/ListContact200Response.md deleted file mode 100644 index 1a87d2a9..00000000 --- a/rest/api/v3/mc_contacts/docs/ListContact200Response.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListContact200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]ContactDetails3**](ContactDetails3.md) | |[optional] -**Metadata** | [**SelfMetadata**](SelfMetadata.md) | |[optional] -**ContactCount** | **int32** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ListContact400Response.md b/rest/api/v3/mc_contacts/docs/ListContact400Response.md deleted file mode 100644 index 6bf4b674..00000000 --- a/rest/api/v3/mc_contacts/docs/ListContact400Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListContact400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ContactsError**](ContactsError.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ListContactByEmail.md b/rest/api/v3/mc_contacts/docs/ListContactByEmail.md deleted file mode 100644 index 3e411256..00000000 --- a/rest/api/v3/mc_contacts/docs/ListContactByEmail.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListContactByEmail - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListContactByEmail**](ListContactByEmail.md#ListContactByEmail) | **Post** /v3/marketing/contacts/search/emails | Get Contacts by Emails - - - -## ListContactByEmail - -> ListContactByEmail200Response ListContactByEmail(ctx, optional) - -Get Contacts by Emails - -**This endpoint allows you to retrieve up to 100 contacts matching the searched `email` address(es), including any `alternate_emails`.** Email addresses are unique to a contact, meaning this endpoint can treat an email address as a primary key to search by. The contact object associated with the address, whether it is their `email` or one of their `alternate_emails` will be returned if matched. Email addresses in the search request do not need to match the case in which they're stored, but the email addresses in the result will be all lower case. Empty strings are excluded from the search and will not be returned. This endpoint should be used in place of the \"Search Contacts\" endpoint when you can provide exact email addresses and do not need to include other [Segmentation Query Language (SGQL)](https://sendgrid.com/docs/for-developers/sending-email/segmentation-query-language/) filters when searching. If you need to access a large percentage of your contacts, we recommend exporting your contacts with the \"Export Contacts\" endpoint and filtering the client side results. This endpoint returns a `200` status code when any contacts match the address(es) you supplied. When searching multiple addresses in a single request, it is possible that some addresses will match a contact while others will not. When a partially successful search like this is made, the matching contacts are returned in an object and an error message is returned for the email address(es) that are not found. This endpoint returns a `404` status code when no contacts are found for the provided email address(es). A `400` status code is returned if any searched addresses are invalid. Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListContactByEmailParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**ListContactByEmailRequest** | [**ListContactByEmailRequest**](ListContactByEmailRequest.md) | - -### Return type - -[**ListContactByEmail200Response**](ListContactByEmail200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_contacts/docs/ListContactByEmail200Response.md b/rest/api/v3/mc_contacts/docs/ListContactByEmail200Response.md deleted file mode 100644 index 76177b92..00000000 --- a/rest/api/v3/mc_contacts/docs/ListContactByEmail200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListContactByEmail200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | **map[string]interface{}** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ListContactByEmailRequest.md b/rest/api/v3/mc_contacts/docs/ListContactByEmailRequest.md deleted file mode 100644 index 8ed62ff6..00000000 --- a/rest/api/v3/mc_contacts/docs/ListContactByEmailRequest.md +++ /dev/null @@ -1,14 +0,0 @@ -# ListContactByEmailRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Emails** | **[]string** | One or more primary and/or alternate email addresses to search for in your Marketing Campaigns contacts. | -**PhoneNumberId** | **string** | The contact's Phone Number ID. This is required to be a valid phone number. |[optional] -**ExternalId** | **string** | The contact's External ID. |[optional] -**AnonymousId** | **string** | The contact's Anonymous ID. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ListContactCount.md b/rest/api/v3/mc_contacts/docs/ListContactCount.md deleted file mode 100644 index effcc099..00000000 --- a/rest/api/v3/mc_contacts/docs/ListContactCount.md +++ /dev/null @@ -1,44 +0,0 @@ -# ListContactCount - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListContactCount**](ListContactCount.md#ListContactCount) | **Get** /v3/marketing/contacts/count | Get Total Contact Count - - - -## ListContactCount - -> ListContactCount200Response ListContactCount(ctx, ) - -Get Total Contact Count - -**This endpoint returns the total number of contacts you have stored.** Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListContactCountParams struct - - -### Return type - -[**ListContactCount200Response**](ListContactCount200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_contacts/docs/ListContactCount200Response.md b/rest/api/v3/mc_contacts/docs/ListContactCount200Response.md deleted file mode 100644 index 8dd466ee..00000000 --- a/rest/api/v3/mc_contacts/docs/ListContactCount200Response.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListContactCount200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ContactCount** | **int32** | The total number of contacts. | -**BillableCount** | **int32** | The count of contacts this month for billing purposes. |[optional] [default to 0] -**BillableBreakdown** | [**ListContactCount200ResponseBillableBreakdown**](ListContactCount200ResponseBillableBreakdown.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ListContactCount200ResponseBillableBreakdown.md b/rest/api/v3/mc_contacts/docs/ListContactCount200ResponseBillableBreakdown.md deleted file mode 100644 index 7082d450..00000000 --- a/rest/api/v3/mc_contacts/docs/ListContactCount200ResponseBillableBreakdown.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListContactCount200ResponseBillableBreakdown - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Total** | **int32** | The sum of all the subuser's billable contacts |[optional] -**Breakdown** | **map[string]interface{}** | A map of each subuser's billable contact usage. Each key is the subuser's ID and each value is the usage thus far this month. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ListExportContact.md b/rest/api/v3/mc_contacts/docs/ListExportContact.md deleted file mode 100644 index 26661c9d..00000000 --- a/rest/api/v3/mc_contacts/docs/ListExportContact.md +++ /dev/null @@ -1,44 +0,0 @@ -# ListExportContact - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListExportContact**](ListExportContact.md#ListExportContact) | **Get** /v3/marketing/contacts/exports | Get All Existing Exports - - - -## ListExportContact - -> ListExportContact200Response ListExportContact(ctx, ) - -Get All Existing Exports - -**Use this endpoint to retrieve details of all current exported jobs**. It will return an array of objects, each of which records an export job in flight or recently completed. Each object's `export_type` field will tell you which kind of export it is and its `status` field will indicate what stage of processing it has reached. Exports which are `ready` will be accompanied by a `urls` field which lists the URLs of the export's downloadable files — there will be more than one if you specified a maximum file size in your initial export request. Use this endpoint if you have exports in flight but do not know their IDs, which are required for the \"Export Contacts Status\" endpoint. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListExportContactParams struct - - -### Return type - -[**ListExportContact200Response**](ListExportContact200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_contacts/docs/ListExportContact200Response.md b/rest/api/v3/mc_contacts/docs/ListExportContact200Response.md deleted file mode 100644 index b2905af7..00000000 --- a/rest/api/v3/mc_contacts/docs/ListExportContact200Response.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListExportContact200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]ListExportContact200ResponseResultInner**](ListExportContact200ResponseResultInner.md) | |[optional] -**Metadata** | [**ListExportContact200ResponseMetadata**](ListExportContact200ResponseMetadata.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ListExportContact200ResponseMetadata.md b/rest/api/v3/mc_contacts/docs/ListExportContact200ResponseMetadata.md deleted file mode 100644 index a2e08656..00000000 --- a/rest/api/v3/mc_contacts/docs/ListExportContact200ResponseMetadata.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListExportContact200ResponseMetadata - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Prev** | **string** | |[optional] -**Self** | **string** | Link to this page. |[optional] -**Next** | **string** | Link to next page. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ListExportContact200ResponseResultInner.md b/rest/api/v3/mc_contacts/docs/ListExportContact200ResponseResultInner.md deleted file mode 100644 index 1fc9949b..00000000 --- a/rest/api/v3/mc_contacts/docs/ListExportContact200ResponseResultInner.md +++ /dev/null @@ -1,21 +0,0 @@ -# ListExportContact200ResponseResultInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | Export jobs ID. |[optional] -**Status** | **string** | Allowed values: `pending`, `ready`, or `failure`. |[optional] -**CreatedAt** | **string** | This ISO8601 timestamp when the export was created. |[optional] -**CompletedAt** | **string** | This ISO8601 timestamp when the export was completed. |[optional] -**ExpiresAt** | **string** | This ISO8601 timestamp when the export expires. |[optional] -**Urls** | **[]string** | One or more download URLs for the contact file(s) if the status is `ready`. |[optional] -**UserId** | **string** | User ID. |[optional] -**ExportType** | **string** | Allowed types: `contacts_export`, `list_export`, or `segment_export`. |[optional] -**Segments** | [**[]ListExportContact200ResponseResultInnerSegmentsInner**](ListExportContact200ResponseResultInnerSegmentsInner.md) | |[optional] -**Lists** | [**[]ListExportContact200ResponseResultInnerSegmentsInner**](ListExportContact200ResponseResultInnerSegmentsInner.md) | |[optional] -**Metadata** | [**ListExportContact200ResponseResultInnerMetadata**](ListExportContact200ResponseResultInnerMetadata.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ListExportContact200ResponseResultInnerMetadata.md b/rest/api/v3/mc_contacts/docs/ListExportContact200ResponseResultInnerMetadata.md deleted file mode 100644 index b779a41d..00000000 --- a/rest/api/v3/mc_contacts/docs/ListExportContact200ResponseResultInnerMetadata.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListExportContact200ResponseResultInnerMetadata - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Prev** | **string** | |[optional] -**Self** | **string** | |[optional] -**Next** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ListExportContact200ResponseResultInnerSegmentsInner.md b/rest/api/v3/mc_contacts/docs/ListExportContact200ResponseResultInnerSegmentsInner.md deleted file mode 100644 index d4724362..00000000 --- a/rest/api/v3/mc_contacts/docs/ListExportContact200ResponseResultInnerSegmentsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListExportContact200ResponseResultInnerSegmentsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ID** | **string** | |[optional] -**Name** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ListExportContact400Response.md b/rest/api/v3/mc_contacts/docs/ListExportContact400Response.md deleted file mode 100644 index 8aae0130..00000000 --- a/rest/api/v3/mc_contacts/docs/ListExportContact400Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListExportContact400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ListExportContact400ResponseErrorsInner**](ListExportContact400ResponseErrorsInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/ListExportContact400ResponseErrorsInner.md b/rest/api/v3/mc_contacts/docs/ListExportContact400ResponseErrorsInner.md deleted file mode 100644 index fbfc8b66..00000000 --- a/rest/api/v3/mc_contacts/docs/ListExportContact400ResponseErrorsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListExportContact400ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | | -**ErrorId** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/Metadata.md b/rest/api/v3/mc_contacts/docs/Metadata.md deleted file mode 100644 index 79ca153c..00000000 --- a/rest/api/v3/mc_contacts/docs/Metadata.md +++ /dev/null @@ -1,14 +0,0 @@ -# Metadata - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Prev** | **string** | The URL of the previous page of results. If this field isn't present, you're at the start of the list. |[optional] -**Self** | **string** | The URL of the current page of results. |[optional] -**Next** | **string** | The URL of the next page of results. If this field isn't present, you're at the end of the list. |[optional] -**Count** | **float32** | The number of items in the entire list, i.e., across all pages. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/SearchContact.md b/rest/api/v3/mc_contacts/docs/SearchContact.md deleted file mode 100644 index 4f83b037..00000000 --- a/rest/api/v3/mc_contacts/docs/SearchContact.md +++ /dev/null @@ -1,48 +0,0 @@ -# SearchContact - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**SearchContact**](SearchContact.md#SearchContact) | **Post** /v3/marketing/contacts/search | Search Contacts - - - -## SearchContact - -> SearchContact200Response SearchContact(ctx, optional) - -Search Contacts - -**Use this endpoint to locate contacts**. The request body's `query` field accepts valid [SGQL](https://sendgrid.com/docs/for-developers/sending-email/segmentation-query-language/) for searching for a contact. Because contact emails are stored in lower case, using SGQL to search by email address requires the provided email address to be in lower case. The SGQL `lower()` function can be used for this. Only the first 50 contacts that meet the search criteria will be returned. If the query takes longer than 20 seconds, a `408 Request Timeout` status will be returned. Formatting the `created_at` and `updated_at` values as Unix timestamps is deprecated. Instead, they are returned as ISO format as string. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a SearchContactParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**SearchContactRequest** | [**SearchContactRequest**](SearchContactRequest.md) | - -### Return type - -[**SearchContact200Response**](SearchContact200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_contacts/docs/SearchContact200Response.md b/rest/api/v3/mc_contacts/docs/SearchContact200Response.md deleted file mode 100644 index 734bda8a..00000000 --- a/rest/api/v3/mc_contacts/docs/SearchContact200Response.md +++ /dev/null @@ -1,13 +0,0 @@ -# SearchContact200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]ContactDetails3**](ContactDetails3.md) | |[optional] -**Metadata** | [**SelfMetadata**](SelfMetadata.md) | |[optional] -**ContactCount** | **float32** | The total number of contacts matched. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/SearchContact400Response.md b/rest/api/v3/mc_contacts/docs/SearchContact400Response.md deleted file mode 100644 index 2109e73e..00000000 --- a/rest/api/v3/mc_contacts/docs/SearchContact400Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# SearchContact400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]SearchContact400ResponseErrorsInner**](SearchContact400ResponseErrorsInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/SearchContact400ResponseErrorsInner.md b/rest/api/v3/mc_contacts/docs/SearchContact400ResponseErrorsInner.md deleted file mode 100644 index 144d5427..00000000 --- a/rest/api/v3/mc_contacts/docs/SearchContact400ResponseErrorsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# SearchContact400ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Field** | **string** | |[optional] -**Message** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/SearchContact500Response.md b/rest/api/v3/mc_contacts/docs/SearchContact500Response.md deleted file mode 100644 index 6e80df27..00000000 --- a/rest/api/v3/mc_contacts/docs/SearchContact500Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# SearchContact500Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]SearchContact500ResponseErrorsInner**](SearchContact500ResponseErrorsInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/SearchContact500ResponseErrorsInner.md b/rest/api/v3/mc_contacts/docs/SearchContact500ResponseErrorsInner.md deleted file mode 100644 index abe4d9c7..00000000 --- a/rest/api/v3/mc_contacts/docs/SearchContact500ResponseErrorsInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# SearchContact500ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/SearchContactRequest.md b/rest/api/v3/mc_contacts/docs/SearchContactRequest.md deleted file mode 100644 index 326fca7c..00000000 --- a/rest/api/v3/mc_contacts/docs/SearchContactRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# SearchContactRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Query** | **string** | An SGQL search string or other pattern. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/SelfMetadata.md b/rest/api/v3/mc_contacts/docs/SelfMetadata.md deleted file mode 100644 index f5efa07a..00000000 --- a/rest/api/v3/mc_contacts/docs/SelfMetadata.md +++ /dev/null @@ -1,11 +0,0 @@ -# SelfMetadata - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Self** | **string** | A link to this object. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/Status.md b/rest/api/v3/mc_contacts/docs/Status.md deleted file mode 100644 index 28ba61b2..00000000 --- a/rest/api/v3/mc_contacts/docs/Status.md +++ /dev/null @@ -1,14 +0,0 @@ -# Status - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**PENDING** | string | (value: `"pending"`) -**READY** | string | (value: `"ready"`) -**FAILURE** | string | (value: `"failure"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/UpdateContact.md b/rest/api/v3/mc_contacts/docs/UpdateContact.md deleted file mode 100644 index 7a857f90..00000000 --- a/rest/api/v3/mc_contacts/docs/UpdateContact.md +++ /dev/null @@ -1,48 +0,0 @@ -# UpdateContact - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateContact**](UpdateContact.md#UpdateContact) | **Put** /v3/marketing/contacts | Add or Update a Contact - - - -## UpdateContact - -> UpdateContact202Response UpdateContact(ctx, optional) - -Add or Update a Contact - -**This endpoint allows the [upsert](https://en.wiktionary.org/wiki/upsert) (insert or update) of up to 30,000 contacts, or 6MB of data, whichever is lower**. Because the creation and update of contacts is an asynchronous process, the response will not contain immediate feedback on the processing of your upserted contacts. Rather, it will contain an HTTP 202 response indicating the contacts are queued for processing or an HTTP 4XX error containing validation errors. Should you wish to get the resulting contact's ID or confirm that your contacts have been updated or added, you can use the [Get Contacts by Identifiers operation](https://www.twilio.com/docs/sendgrid/api-reference/contacts/get-contacts-by-identifiers). Please note that custom fields need to have been already created if you wish to set their values for the contacts being upserted. To do this, please use the [Create Custom Field Definition endpoint](https://www.twilio.com/docs/sendgrid/api-reference/custom-fields/create-custom-field-definition). You will see a `job_id` in the response to your request. This can be used to check the status of your upsert job. To do so, please use the [Import Contacts Status endpoint](https://www.twilio.com/docs/sendgrid/api-reference/contacts/import-contacts-status). If the contact already exists in the system, any entries submitted via this endpoint will update the existing contact. In order to update a contact, all of its existing identifiers must be present. Any fields omitted from the request will remain as they were. A contact's ID cannot be used to update the contact. The email field will be changed to all lower-case. If a contact is added with an email that exists but contains capital letters, the existing contact with the all lower-case email will be updated. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateContactParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**UpdateContactRequest** | [**UpdateContactRequest**](UpdateContactRequest.md) | - -### Return type - -[**UpdateContact202Response**](UpdateContact202Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_contacts/docs/UpdateContact202Response.md b/rest/api/v3/mc_contacts/docs/UpdateContact202Response.md deleted file mode 100644 index 463a2ace..00000000 --- a/rest/api/v3/mc_contacts/docs/UpdateContact202Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateContact202Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**JobId** | **string** | Indicates that the contacts are queued for processing. Check the job status with the \"Import Contacts Status\" endpoint. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/docs/UpdateContactRequest.md b/rest/api/v3/mc_contacts/docs/UpdateContactRequest.md deleted file mode 100644 index 03666fa3..00000000 --- a/rest/api/v3/mc_contacts/docs/UpdateContactRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# UpdateContactRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ListIds** | **[]string** | An array of List ID strings that this contact will be added to. |[optional] -**Contacts** | [**[]ContactRequest**](ContactRequest.md) | One or more contacts objects that you intend to upsert. Each contact needs to include at least one of `email`, `phone_number_id`, `external_id`, or `anonymous_id` as an identifier. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_contacts/model_contact_details3.go b/rest/api/v3/mc_contacts/model_contact_details3.go deleted file mode 100644 index 097a6c00..00000000 --- a/rest/api/v3/mc_contacts/model_contact_details3.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ContactDetails3 struct for ContactDetails3 -type ContactDetails3 struct { - Id string `json:"id"` - FirstName *string `json:"first_name,omitempty"` - LastName *string `json:"last_name,omitempty"` - UniqueName *string `json:"unique_name,omitempty"` - Email *string `json:"email,omitempty"` - PhoneNumberId *string `json:"phone_number_id,omitempty"` - ExternalId *string `json:"external_id,omitempty"` - AnonymousId *string `json:"anonymous_id,omitempty"` - AlternateEmails *[]string `json:"alternate_emails,omitempty"` - AddressLine1 *string `json:"address_line_1,omitempty"` - AddressLine2 *string `json:"address_line_2,omitempty"` - City *string `json:"city,omitempty"` - StateProvinceRegion *string `json:"state_province_region,omitempty"` - Country *string `json:"country,omitempty"` - PostalCode *string `json:"postal_code,omitempty"` - PhoneNumber *string `json:"phone_number,omitempty"` - Whatsapp *string `json:"whatsapp,omitempty"` - Line *string `json:"line,omitempty"` - Facebook *string `json:"facebook,omitempty"` - ListIds []string `json:"list_ids"` - SegmentIds []string `json:"segment_ids"` - CustomFields *map[string]interface{} `json:"custom_fields,omitempty"` - CreatedAt string `json:"created_at"` - UpdatedAt string `json:"updated_at"` - Metadata *SelfMetadata `json:"_metadata,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_contact_export.go b/rest/api/v3/mc_contacts/model_contact_export.go deleted file mode 100644 index 2d089580..00000000 --- a/rest/api/v3/mc_contacts/model_contact_export.go +++ /dev/null @@ -1,36 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ContactExport struct for ContactExport -type ContactExport struct { - Id string `json:"id"` - // The export job's status. Allowed values: `pending`, `ready`, or `failure`. - Status Status `json:"status"` - // The ISO8601 timestamp when the export was begun. - CreatedAt string `json:"created_at"` - // The ISO8601 timestamp when the export was updated. - UpdatedAt string `json:"updated_at"` - // The ISO8601 timestamp when the export was completed. - CompletedAt *string `json:"completed_at,omitempty"` - // The ISO8601 timestamp when the exported file on S3 will expire. - ExpiresAt string `json:"expires_at"` - // One or more download URLs for the contact file if the status is `ready`. - Urls *[]string `json:"urls,omitempty"` - // A human readable message if the status is `failure`. - Message *string `json:"message,omitempty"` - Metadata *Metadata `json:"_metadata,omitempty"` - // The total number of exported contacts. - ContactCount *int32 `json:"contact_count,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_contact_import.go b/rest/api/v3/mc_contacts/model_contact_import.go deleted file mode 100644 index 5c17fcf0..00000000 --- a/rest/api/v3/mc_contacts/model_contact_import.go +++ /dev/null @@ -1,29 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ContactImport struct for ContactImport -type ContactImport struct { - // The job ID. - Id *string `json:"id,omitempty"` - // The job state. Allowed values: `pending`, `completed`, `errored`, or `failed`. - Status *string `json:"status,omitempty"` - // The job type. Allowed values: `upsert`, or `delete`. - JobType *string `json:"job_type,omitempty"` - Results *ContactImportResults `json:"results,omitempty"` - // The ISO8601 timestamp when the job was created. - StartedAt *string `json:"started_at,omitempty"` - // The ISO8601 timestamp when the job was finished. - FinishedAt *string `json:"finished_at,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_contact_import_results.go b/rest/api/v3/mc_contacts/model_contact_import_results.go deleted file mode 100644 index 784e1b4d..00000000 --- a/rest/api/v3/mc_contacts/model_contact_import_results.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ContactImportResults Result map of the import job. -type ContactImportResults struct { - // Requested contact count from the import. - RequestedCount *float32 `json:"requested_count,omitempty"` - // Created contact count from the import. - CreatedCount *float32 `json:"created_count,omitempty"` - // Updated contact count from the import. - UpdatedCount *float32 `json:"updated_count,omitempty"` - // Count of deleted contacts that resulted in error. - DeletedCount *float32 `json:"deleted_count,omitempty"` - // Count of imported contacts that resulted in error. - ErroredCount *float32 `json:"errored_count,omitempty"` - // The download URL of the file which provides information about any errors. - ErrorsUrl *string `json:"errors_url,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_contact_request.go b/rest/api/v3/mc_contacts/model_contact_request.go deleted file mode 100644 index eaabe77c..00000000 --- a/rest/api/v3/mc_contacts/model_contact_request.go +++ /dev/null @@ -1,45 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ContactRequest struct for ContactRequest -type ContactRequest struct { - // The first line of the address. - AddressLine1 *string `json:"address_line_1,omitempty"` - // An optional second line for the address. - AddressLine2 *string `json:"address_line_2,omitempty"` - // Additional emails associated with the contact. - AlternateEmails *[]string `json:"alternate_emails,omitempty"` - // The contact's city. - City *string `json:"city,omitempty"` - // The contact's country. Can be a full name or an abbreviation. - Country *string `json:"country,omitempty"` - // The contact's primary email. This is required to be a valid email. - Email *string `json:"email,omitempty"` - // The contact's Phone Number ID. This must be a valid phone number. - PhoneNumberId *string `json:"phone_number_id,omitempty"` - // The contact's External ID. - ExternalId *string `json:"external_id,omitempty"` - // The contact's Anonymous ID. - AnonymousId *string `json:"anonymous_id,omitempty"` - // The contact's personal name. - FirstName *string `json:"first_name,omitempty"` - // The contact's family name. - LastName *string `json:"last_name,omitempty"` - // The contact's ZIP code or other postal code. - PostalCode *string `json:"postal_code,omitempty"` - // The contact's state, province, or region. - StateProvinceRegion *string `json:"state_province_region,omitempty"` - CustomFields *ContactRequestCustomFields `json:"custom_fields,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_contact_request_custom_fields.go b/rest/api/v3/mc_contacts/model_contact_request_custom_fields.go deleted file mode 100644 index cda6297c..00000000 --- a/rest/api/v3/mc_contacts/model_contact_request_custom_fields.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ContactRequestCustomFields An object of custom field IDs and the values you want to associate with those custom fields. You can retrieve the IDs of your custom fields from the [Get All Field Definitions endpoint](https://docs.sendgrid.com/api-reference/custom-fields/get-all-field-definitions). -type ContactRequestCustomFields struct { - // The properties in this object are made up of a key (the custom field ID) and value you want associated with that custom field. For example `{\"w1\": \"coffee\"}`. - W1 *string `json:"w1,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_contacts_error.go b/rest/api/v3/mc_contacts/model_contacts_error.go deleted file mode 100644 index 67328dc7..00000000 --- a/rest/api/v3/mc_contacts/model_contacts_error.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ContactsError struct for ContactsError -type ContactsError struct { - Message string `json:"message"` - Field *string `json:"field,omitempty"` - ErrorId *string `json:"error_id,omitempty"` - Parameter *string `json:"parameter,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_delete_contact_202_response.go b/rest/api/v3/mc_contacts/model_delete_contact_202_response.go deleted file mode 100644 index 9a6ae433..00000000 --- a/rest/api/v3/mc_contacts/model_delete_contact_202_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DeleteContact202Response The deletion job has been accepted and is being processed. -type DeleteContact202Response struct { - // The deletion job ID. - JobId map[string]interface{} `json:"job_id"` -} diff --git a/rest/api/v3/mc_contacts/model_delete_contact_400_response.go b/rest/api/v3/mc_contacts/model_delete_contact_400_response.go deleted file mode 100644 index 574ca904..00000000 --- a/rest/api/v3/mc_contacts/model_delete_contact_400_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DeleteContact400Response struct for DeleteContact400Response -type DeleteContact400Response struct { - Errors []map[string]interface{} `json:"errors"` -} diff --git a/rest/api/v3/mc_contacts/model_delete_contact_identifier_202_response.go b/rest/api/v3/mc_contacts/model_delete_contact_identifier_202_response.go deleted file mode 100644 index db027420..00000000 --- a/rest/api/v3/mc_contacts/model_delete_contact_identifier_202_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DeleteContactIdentifier202Response Indicates that the deletion is queued for processing. Check the job status with the Import Contacts Status endpoint. -type DeleteContactIdentifier202Response struct { - // The deletion job ID. - JobId map[string]interface{} `json:"job_id"` -} diff --git a/rest/api/v3/mc_contacts/model_delete_contact_identifier_request.go b/rest/api/v3/mc_contacts/model_delete_contact_identifier_request.go deleted file mode 100644 index 5a79733a..00000000 --- a/rest/api/v3/mc_contacts/model_delete_contact_identifier_request.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DeleteContactIdentifierRequest struct for DeleteContactIdentifierRequest -type DeleteContactIdentifierRequest struct { - // The type of identifier you are removing from the contact. - IdentifierType IdentifierType `json:"identifier_type"` - // The value of the identifier you want to remove from the contact. - IdentifierValue string `json:"identifier_value"` -} diff --git a/rest/api/v3/mc_contacts/model_error_response.go b/rest/api/v3/mc_contacts/model_error_response.go deleted file mode 100644 index 6623fe83..00000000 --- a/rest/api/v3/mc_contacts/model_error_response.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponse struct for ErrorResponse -type ErrorResponse struct { - Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` - // When applicable, this property value will be an error ID. - Id *string `json:"id,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_error_response_errors_inner.go b/rest/api/v3/mc_contacts/model_error_response_errors_inner.go deleted file mode 100644 index 71ae3883..00000000 --- a/rest/api/v3/mc_contacts/model_error_response_errors_inner.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner -type ErrorResponseErrorsInner struct { - // An error message. - Message *string `json:"message,omitempty"` - // When applicable, this property value will be the field that generated the error. - Field *string `json:"field,omitempty"` - // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. - Help *map[string]interface{} `json:"help,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_export_contact_202_response.go b/rest/api/v3/mc_contacts/model_export_contact_202_response.go deleted file mode 100644 index adf95b39..00000000 --- a/rest/api/v3/mc_contacts/model_export_contact_202_response.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ExportContact202Response struct for ExportContact202Response -type ExportContact202Response struct { - Metadata Metadata `json:"_metadata"` - // The ID of the export job. - Id *string `json:"id,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_export_contact_request.go b/rest/api/v3/mc_contacts/model_export_contact_request.go deleted file mode 100644 index a8cf34fd..00000000 --- a/rest/api/v3/mc_contacts/model_export_contact_request.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ExportContactRequest struct for ExportContactRequest -type ExportContactRequest struct { - // IDs of the contact lists you want to export. - ListIds *[]string `json:"list_ids,omitempty"` - // IDs of the contact segments you want to export. - SegmentIds *[]string `json:"segment_ids,omitempty"` - Notifications *ExportContactRequestNotifications `json:"notifications,omitempty"` - // File type for export file. Choose from `json` or `csv`. - FileType *FileType `json:"file_type,omitempty"` - // The maximum size of an export file in MB. Note that when this option is specified, multiple output files may be returned from the export. - MaxFileSize *int32 `json:"max_file_size,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_export_contact_request_notifications.go b/rest/api/v3/mc_contacts/model_export_contact_request_notifications.go deleted file mode 100644 index 75c8a811..00000000 --- a/rest/api/v3/mc_contacts/model_export_contact_request_notifications.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ExportContactRequestNotifications struct for ExportContactRequestNotifications -type ExportContactRequestNotifications struct { - Email *bool `json:"email,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_file_type.go b/rest/api/v3/mc_contacts/model_file_type.go deleted file mode 100644 index a0d80406..00000000 --- a/rest/api/v3/mc_contacts/model_file_type.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// FileType the model 'FileType' -type FileType string - -// List of FileType -const ( - FILETYPE_CSV FileType = "csv" - FILETYPE_JSON FileType = "json" -) diff --git a/rest/api/v3/mc_contacts/model_file_type1.go b/rest/api/v3/mc_contacts/model_file_type1.go deleted file mode 100644 index 2089bfb8..00000000 --- a/rest/api/v3/mc_contacts/model_file_type1.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// FileType1 the model 'FileType1' -type FileType1 string - -// List of FileType1 -const ( - FILETYPE1_CSV FileType1 = "csv" -) diff --git a/rest/api/v3/mc_contacts/model_get_contact_by_identifiers_200_response.go b/rest/api/v3/mc_contacts/model_get_contact_by_identifiers_200_response.go deleted file mode 100644 index 3b44b617..00000000 --- a/rest/api/v3/mc_contacts/model_get_contact_by_identifiers_200_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetContactByIdentifiers200Response An object containing one or more of the identifiers matching the searched identifiers in your contacts. -type GetContactByIdentifiers200Response struct { - Result *interface{} `json:"result,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_get_contact_by_identifiers_200_response_result_value.go b/rest/api/v3/mc_contacts/model_get_contact_by_identifiers_200_response_result_value.go deleted file mode 100644 index b6d8d8fe..00000000 --- a/rest/api/v3/mc_contacts/model_get_contact_by_identifiers_200_response_result_value.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetContactByIdentifiers200ResponseResultValue An identifiers value matching a searched identifier in your contacts. For example, if you use the email identifier type, the email address will be returned. -type GetContactByIdentifiers200ResponseResultValue struct { - Contact *ContactDetails3 `json:"contact,omitempty"` - Error *string `json:"error,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_get_contact_by_identifiers_request.go b/rest/api/v3/mc_contacts/model_get_contact_by_identifiers_request.go deleted file mode 100644 index 4557fa96..00000000 --- a/rest/api/v3/mc_contacts/model_get_contact_by_identifiers_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetContactByIdentifiersRequest -type GetContactByIdentifiersRequest struct { - // One or more more identifier values to search for in your Marketing Campaigns contacts. - Identifiers []GetContactByIdentifiersRequestIdentifiersInner `json:"identifiers"` -} diff --git a/rest/api/v3/mc_contacts/model_get_contact_by_identifiers_request_identifiers_inner.go b/rest/api/v3/mc_contacts/model_get_contact_by_identifiers_request_identifiers_inner.go deleted file mode 100644 index 9211d285..00000000 --- a/rest/api/v3/mc_contacts/model_get_contact_by_identifiers_request_identifiers_inner.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetContactByIdentifiersRequestIdentifiersInner struct for GetContactByIdentifiersRequestIdentifiersInner -type GetContactByIdentifiersRequestIdentifiersInner struct { - Email *string `json:"email,omitempty"` - // The contact's Phone Number ID. This is required to be a valid phone number. - PhoneNumberId *string `json:"phone_number_id,omitempty"` - // The contact's External ID. - ExternalId *string `json:"external_id,omitempty"` - // The contact's Anonymous ID. - AnonymousId *string `json:"anonymous_id,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_get_import_contact_400_response.go b/rest/api/v3/mc_contacts/model_get_import_contact_400_response.go deleted file mode 100644 index b4aa0490..00000000 --- a/rest/api/v3/mc_contacts/model_get_import_contact_400_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetImportContact400Response struct for GetImportContact400Response -type GetImportContact400Response struct { - Errors *ContactsError `json:"errors,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_identifier_type.go b/rest/api/v3/mc_contacts/model_identifier_type.go deleted file mode 100644 index 36ef1471..00000000 --- a/rest/api/v3/mc_contacts/model_identifier_type.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// IdentifierType the model 'IdentifierType' -type IdentifierType string - -// List of IdentifierType -const ( - IDENTIFIERTYPE_EMAIL IdentifierType = "EMAIL" - IDENTIFIERTYPE_PHONENUMBERID IdentifierType = "PHONENUMBERID" - IDENTIFIERTYPE_EXTERNALID IdentifierType = "EXTERNALID" - IDENTIFIERTYPE_ANONYMOUSID IdentifierType = "ANONYMOUSID" -) diff --git a/rest/api/v3/mc_contacts/model_identifier_type1.go b/rest/api/v3/mc_contacts/model_identifier_type1.go deleted file mode 100644 index 677f0158..00000000 --- a/rest/api/v3/mc_contacts/model_identifier_type1.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// IdentifierType1 the model 'IdentifierType1' -type IdentifierType1 string - -// List of IdentifierType1 -const ( - IDENTIFIERTYPE1_EMAIL IdentifierType1 = "email" - IDENTIFIERTYPE1_PHONE_NUMBER_ID IdentifierType1 = "phone_number_id" - IDENTIFIERTYPE1_EXTERNAL_ID IdentifierType1 = "external_id" - IDENTIFIERTYPE1_ANONYMOUS_ID IdentifierType1 = "anonymous_id" -) diff --git a/rest/api/v3/mc_contacts/model_import_contact_200_response.go b/rest/api/v3/mc_contacts/model_import_contact_200_response.go deleted file mode 100644 index b4966a07..00000000 --- a/rest/api/v3/mc_contacts/model_import_contact_200_response.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ImportContact200Response struct for ImportContact200Response -type ImportContact200Response struct { - // The ID of the import job. - JobId *string `json:"job_id,omitempty"` - // The URI to PUT the upload file to. - UploadUri *string `json:"upload_uri,omitempty"` - // A list of headers that must be included in PUT request. - UploadHeaders *[]ImportContact200ResponseUploadHeadersInner `json:"upload_headers,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_import_contact_200_response_upload_headers_inner.go b/rest/api/v3/mc_contacts/model_import_contact_200_response_upload_headers_inner.go deleted file mode 100644 index 983e49ef..00000000 --- a/rest/api/v3/mc_contacts/model_import_contact_200_response_upload_headers_inner.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ImportContact200ResponseUploadHeadersInner struct for ImportContact200ResponseUploadHeadersInner -type ImportContact200ResponseUploadHeadersInner struct { - Header string `json:"header"` - Value string `json:"value"` -} diff --git a/rest/api/v3/mc_contacts/model_import_contact_400_response.go b/rest/api/v3/mc_contacts/model_import_contact_400_response.go deleted file mode 100644 index 39873f4d..00000000 --- a/rest/api/v3/mc_contacts/model_import_contact_400_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ImportContact400Response struct for ImportContact400Response -type ImportContact400Response struct { - Errors []ContactsError `json:"errors"` -} diff --git a/rest/api/v3/mc_contacts/model_import_contact_404_response.go b/rest/api/v3/mc_contacts/model_import_contact_404_response.go deleted file mode 100644 index a7d6502b..00000000 --- a/rest/api/v3/mc_contacts/model_import_contact_404_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ImportContact404Response If any of the specified lists do not exist. -type ImportContact404Response struct { - Errors []ContactsError `json:"errors"` -} diff --git a/rest/api/v3/mc_contacts/model_import_contact_request.go b/rest/api/v3/mc_contacts/model_import_contact_request.go deleted file mode 100644 index 7684ed27..00000000 --- a/rest/api/v3/mc_contacts/model_import_contact_request.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ImportContactRequest struct for ImportContactRequest -type ImportContactRequest struct { - // All contacts will be added to each of the specified lists. - ListIds *[]string `json:"list_ids,omitempty"` - // Upload file type. - FileType FileType1 `json:"file_type"` - // Import file header to reserved/custom field mapping. - FieldMappings []string `json:"field_mappings"` -} diff --git a/rest/api/v3/mc_contacts/model_list_batched_contact_200_response.go b/rest/api/v3/mc_contacts/model_list_batched_contact_200_response.go deleted file mode 100644 index 245779a6..00000000 --- a/rest/api/v3/mc_contacts/model_list_batched_contact_200_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListBatchedContact200Response struct for ListBatchedContact200Response -type ListBatchedContact200Response struct { - Result *[]ContactDetails3 `json:"result,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_list_batched_contact_request.go b/rest/api/v3/mc_contacts/model_list_batched_contact_request.go deleted file mode 100644 index 88a83022..00000000 --- a/rest/api/v3/mc_contacts/model_list_batched_contact_request.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListBatchedContactRequest Array of IDs -type ListBatchedContactRequest struct { - Ids []string `json:"ids"` -} diff --git a/rest/api/v3/mc_contacts/model_list_contact_200_response.go b/rest/api/v3/mc_contacts/model_list_contact_200_response.go deleted file mode 100644 index 2b7b3a2e..00000000 --- a/rest/api/v3/mc_contacts/model_list_contact_200_response.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListContact200Response struct for ListContact200Response -type ListContact200Response struct { - Result *[]ContactDetails3 `json:"result,omitempty"` - Metadata *SelfMetadata `json:"_metadata,omitempty"` - ContactCount *int32 `json:"contact_count,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_list_contact_400_response.go b/rest/api/v3/mc_contacts/model_list_contact_400_response.go deleted file mode 100644 index 328110dc..00000000 --- a/rest/api/v3/mc_contacts/model_list_contact_400_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListContact400Response struct for ListContact400Response -type ListContact400Response struct { - Errors *[]ContactsError `json:"errors,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_list_contact_by_email_200_response.go b/rest/api/v3/mc_contacts/model_list_contact_by_email_200_response.go deleted file mode 100644 index 61afac23..00000000 --- a/rest/api/v3/mc_contacts/model_list_contact_by_email_200_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListContactByEmail200Response An object containing one or more of the email addresses matching the searched addresses in your contacts. -type ListContactByEmail200Response struct { - Result *map[string]interface{} `json:"result,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_list_contact_by_email_request.go b/rest/api/v3/mc_contacts/model_list_contact_by_email_request.go deleted file mode 100644 index 4d6d7a36..00000000 --- a/rest/api/v3/mc_contacts/model_list_contact_by_email_request.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListContactByEmailRequest -type ListContactByEmailRequest struct { - // One or more primary and/or alternate email addresses to search for in your Marketing Campaigns contacts. - Emails []string `json:"emails"` - // The contact's Phone Number ID. This is required to be a valid phone number. - PhoneNumberId *string `json:"phone_number_id,omitempty"` - // The contact's External ID. - ExternalId *string `json:"external_id,omitempty"` - // The contact's Anonymous ID. - AnonymousId *string `json:"anonymous_id,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_list_contact_count_200_response.go b/rest/api/v3/mc_contacts/model_list_contact_count_200_response.go deleted file mode 100644 index 8c0c4be5..00000000 --- a/rest/api/v3/mc_contacts/model_list_contact_count_200_response.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListContactCount200Response struct for ListContactCount200Response -type ListContactCount200Response struct { - // The total number of contacts. - ContactCount int32 `json:"contact_count"` - // The count of contacts this month for billing purposes. - BillableCount *int32 `json:"billable_count,omitempty"` - BillableBreakdown *ListContactCount200ResponseBillableBreakdown `json:"billable_breakdown,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_list_contact_count_200_response_billable_breakdown.go b/rest/api/v3/mc_contacts/model_list_contact_count_200_response_billable_breakdown.go deleted file mode 100644 index dbb6ff00..00000000 --- a/rest/api/v3/mc_contacts/model_list_contact_count_200_response_billable_breakdown.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListContactCount200ResponseBillableBreakdown `billable_breakdown` will only appear to the parent user in an account with subusers. -type ListContactCount200ResponseBillableBreakdown struct { - // The sum of all the subuser's billable contacts - Total *int32 `json:"total,omitempty"` - // A map of each subuser's billable contact usage. Each key is the subuser's ID and each value is the usage thus far this month. - Breakdown *map[string]interface{} `json:"breakdown,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_list_export_contact_200_response.go b/rest/api/v3/mc_contacts/model_list_export_contact_200_response.go deleted file mode 100644 index dea2a3fd..00000000 --- a/rest/api/v3/mc_contacts/model_list_export_contact_200_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListExportContact200Response struct for ListExportContact200Response -type ListExportContact200Response struct { - Result *[]ListExportContact200ResponseResultInner `json:"result,omitempty"` - Metadata *ListExportContact200ResponseMetadata `json:"_metadata,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_list_export_contact_200_response__metadata.go b/rest/api/v3/mc_contacts/model_list_export_contact_200_response__metadata.go deleted file mode 100644 index dc11ec2e..00000000 --- a/rest/api/v3/mc_contacts/model_list_export_contact_200_response__metadata.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListExportContact200ResponseMetadata struct for ListExportContact200ResponseMetadata -type ListExportContact200ResponseMetadata struct { - Prev *string `json:"prev,omitempty"` - // Link to this page. - Self *string `json:"self,omitempty"` - // Link to next page. - Next *string `json:"next,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_list_export_contact_200_response_result_inner.go b/rest/api/v3/mc_contacts/model_list_export_contact_200_response_result_inner.go deleted file mode 100644 index e4b39ec9..00000000 --- a/rest/api/v3/mc_contacts/model_list_export_contact_200_response_result_inner.go +++ /dev/null @@ -1,37 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListExportContact200ResponseResultInner struct for ListExportContact200ResponseResultInner -type ListExportContact200ResponseResultInner struct { - // Export jobs ID. - Id *string `json:"id,omitempty"` - // Allowed values: `pending`, `ready`, or `failure`. - Status *string `json:"status,omitempty"` - // This ISO8601 timestamp when the export was created. - CreatedAt *string `json:"created_at,omitempty"` - // This ISO8601 timestamp when the export was completed. - CompletedAt *string `json:"completed_at,omitempty"` - // This ISO8601 timestamp when the export expires. - ExpiresAt *string `json:"expires_at,omitempty"` - // One or more download URLs for the contact file(s) if the status is `ready`. - Urls *[]string `json:"urls,omitempty"` - // User ID. - UserId *string `json:"user_id,omitempty"` - // Allowed types: `contacts_export`, `list_export`, or `segment_export`. - ExportType *string `json:"export_type,omitempty"` - Segments *[]ListExportContact200ResponseResultInnerSegmentsInner `json:"segments,omitempty"` - Lists *[]ListExportContact200ResponseResultInnerSegmentsInner `json:"lists,omitempty"` - Metadata *ListExportContact200ResponseResultInnerMetadata `json:"_metadata,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_list_export_contact_200_response_result_inner__metadata.go b/rest/api/v3/mc_contacts/model_list_export_contact_200_response_result_inner__metadata.go deleted file mode 100644 index bceb2e28..00000000 --- a/rest/api/v3/mc_contacts/model_list_export_contact_200_response_result_inner__metadata.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListExportContact200ResponseResultInnerMetadata struct for ListExportContact200ResponseResultInnerMetadata -type ListExportContact200ResponseResultInnerMetadata struct { - Prev *string `json:"prev,omitempty"` - Self *string `json:"self,omitempty"` - Next *string `json:"next,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_list_export_contact_200_response_result_inner_segments_inner.go b/rest/api/v3/mc_contacts/model_list_export_contact_200_response_result_inner_segments_inner.go deleted file mode 100644 index b63c388d..00000000 --- a/rest/api/v3/mc_contacts/model_list_export_contact_200_response_result_inner_segments_inner.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListExportContact200ResponseResultInnerSegmentsInner struct for ListExportContact200ResponseResultInnerSegmentsInner -type ListExportContact200ResponseResultInnerSegmentsInner struct { - ID *string `json:"ID,omitempty"` - Name *string `json:"Name,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_list_export_contact_400_response.go b/rest/api/v3/mc_contacts/model_list_export_contact_400_response.go deleted file mode 100644 index 2e115747..00000000 --- a/rest/api/v3/mc_contacts/model_list_export_contact_400_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListExportContact400Response struct for ListExportContact400Response -type ListExportContact400Response struct { - Errors *[]ListExportContact400ResponseErrorsInner `json:"errors,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_list_export_contact_400_response_errors_inner.go b/rest/api/v3/mc_contacts/model_list_export_contact_400_response_errors_inner.go deleted file mode 100644 index 46b47022..00000000 --- a/rest/api/v3/mc_contacts/model_list_export_contact_400_response_errors_inner.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListExportContact400ResponseErrorsInner struct for ListExportContact400ResponseErrorsInner -type ListExportContact400ResponseErrorsInner struct { - Message string `json:"message"` - ErrorId *string `json:"error_id,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_metadata.go b/rest/api/v3/mc_contacts/model_metadata.go deleted file mode 100644 index 09a296e8..00000000 --- a/rest/api/v3/mc_contacts/model_metadata.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Metadata struct for Metadata -type Metadata struct { - // The URL of the previous page of results. If this field isn't present, you're at the start of the list. - Prev *string `json:"prev,omitempty"` - // The URL of the current page of results. - Self *string `json:"self,omitempty"` - // The URL of the next page of results. If this field isn't present, you're at the end of the list. - Next *string `json:"next,omitempty"` - // The number of items in the entire list, i.e., across all pages. - Count *float32 `json:"count,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_search_contact_200_response.go b/rest/api/v3/mc_contacts/model_search_contact_200_response.go deleted file mode 100644 index 6f4407d6..00000000 --- a/rest/api/v3/mc_contacts/model_search_contact_200_response.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SearchContact200Response struct for SearchContact200Response -type SearchContact200Response struct { - Result *[]ContactDetails3 `json:"result,omitempty"` - Metadata *SelfMetadata `json:"_metadata,omitempty"` - // The total number of contacts matched. - ContactCount float32 `json:"contact_count"` -} diff --git a/rest/api/v3/mc_contacts/model_search_contact_400_response.go b/rest/api/v3/mc_contacts/model_search_contact_400_response.go deleted file mode 100644 index 6832d06a..00000000 --- a/rest/api/v3/mc_contacts/model_search_contact_400_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SearchContact400Response struct for SearchContact400Response -type SearchContact400Response struct { - Errors *[]SearchContact400ResponseErrorsInner `json:"errors,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_search_contact_400_response_errors_inner.go b/rest/api/v3/mc_contacts/model_search_contact_400_response_errors_inner.go deleted file mode 100644 index 91e81750..00000000 --- a/rest/api/v3/mc_contacts/model_search_contact_400_response_errors_inner.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SearchContact400ResponseErrorsInner struct for SearchContact400ResponseErrorsInner -type SearchContact400ResponseErrorsInner struct { - Field *string `json:"field,omitempty"` - Message *string `json:"message,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_search_contact_500_response.go b/rest/api/v3/mc_contacts/model_search_contact_500_response.go deleted file mode 100644 index d2120801..00000000 --- a/rest/api/v3/mc_contacts/model_search_contact_500_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SearchContact500Response struct for SearchContact500Response -type SearchContact500Response struct { - Errors *[]SearchContact500ResponseErrorsInner `json:"errors,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_search_contact_500_response_errors_inner.go b/rest/api/v3/mc_contacts/model_search_contact_500_response_errors_inner.go deleted file mode 100644 index 04686de3..00000000 --- a/rest/api/v3/mc_contacts/model_search_contact_500_response_errors_inner.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SearchContact500ResponseErrorsInner struct for SearchContact500ResponseErrorsInner -type SearchContact500ResponseErrorsInner struct { - Message *string `json:"message,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_search_contact_request.go b/rest/api/v3/mc_contacts/model_search_contact_request.go deleted file mode 100644 index 18ff1943..00000000 --- a/rest/api/v3/mc_contacts/model_search_contact_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SearchContactRequest struct for SearchContactRequest -type SearchContactRequest struct { - // An SGQL search string or other pattern. - Query string `json:"query"` -} diff --git a/rest/api/v3/mc_contacts/model_self_metadata.go b/rest/api/v3/mc_contacts/model_self_metadata.go deleted file mode 100644 index ba8fd9db..00000000 --- a/rest/api/v3/mc_contacts/model_self_metadata.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SelfMetadata struct for SelfMetadata -type SelfMetadata struct { - // A link to this object. - Self *string `json:"self,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_status.go b/rest/api/v3/mc_contacts/model_status.go deleted file mode 100644 index 4bcf7e60..00000000 --- a/rest/api/v3/mc_contacts/model_status.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Status the model 'Status' -type Status string - -// List of Status -const ( - STATUS_PENDING Status = "pending" - STATUS_READY Status = "ready" - STATUS_FAILURE Status = "failure" -) diff --git a/rest/api/v3/mc_contacts/model_update_contact_202_response.go b/rest/api/v3/mc_contacts/model_update_contact_202_response.go deleted file mode 100644 index 13da7b97..00000000 --- a/rest/api/v3/mc_contacts/model_update_contact_202_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateContact202Response struct for UpdateContact202Response -type UpdateContact202Response struct { - // Indicates that the contacts are queued for processing. Check the job status with the \"Import Contacts Status\" endpoint. - JobId *string `json:"job_id,omitempty"` -} diff --git a/rest/api/v3/mc_contacts/model_update_contact_request.go b/rest/api/v3/mc_contacts/model_update_contact_request.go deleted file mode 100644 index 042670ac..00000000 --- a/rest/api/v3/mc_contacts/model_update_contact_request.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Contacts API -* The Twilio SendGrid Marketing Campaigns Contacts API allows you to manage all of your marketing contacts programmatically. You can also import and export contacts using this API. The Contacts API allows you to associate contacts with lists and segments; however, to manage the lists and segments themselves, see the [Lists API](https://docs.sendgrid.com/api-reference/lists/) and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/). You can also manage your marketing contacts with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**How to Send Email with New Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateContactRequest struct for UpdateContactRequest -type UpdateContactRequest struct { - // An array of List ID strings that this contact will be added to. - ListIds *[]string `json:"list_ids,omitempty"` - // One or more contacts objects that you intend to upsert. Each contact needs to include at least one of `email`, `phone_number_id`, `external_id`, or `anonymous_id` as an identifier. - Contacts []ContactRequest `json:"contacts"` -} diff --git a/rest/api/v3/mc_custom_fields/.openapi-generator b/rest/api/v3/mc_custom_fields/.openapi-generator deleted file mode 100644 index 0831e24f..00000000 --- a/rest/api/v3/mc_custom_fields/.openapi-generator +++ /dev/null @@ -1,36 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_create_field_definition.go -api_delete_field_definition.go -api_list_field_definition.go -api_service.go -api_update_field_definition.go -docs/CreateFieldDefinition.md -docs/CreateFieldDefinition200Response.md -docs/CreateFieldDefinition400Response.md -docs/CreateFieldDefinitionRequest.md -docs/CustomFieldDefinitionsResponse.md -docs/CustomFieldsError.md -docs/DeleteFieldDefinition.md -docs/FieldType.md -docs/FieldType1.md -docs/FieldType2.md -docs/ListFieldDefinition.md -docs/ListFieldDefinition200Response.md -docs/Metadata.md -docs/ReservedFieldDefinitionsResponseInner.md -docs/UpdateFieldDefinition.md -docs/UpdateFieldDefinitionRequest.md -model_create_field_definition_200_response.go -model_create_field_definition_400_response.go -model_create_field_definition_request.go -model_custom_field_definitions_response.go -model_custom_fields_error.go -model_field_type.go -model_field_type1.go -model_field_type2.go -model_list_field_definition_200_response.go -model_metadata.go -model_reserved_field_definitions_response_inner.go -model_update_field_definition_request.go diff --git a/rest/api/v3/mc_custom_fields/.openapi-generator-ignore b/rest/api/v3/mc_custom_fields/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/mc_custom_fields/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/mc_custom_fields/README.md b/rest/api/v3/mc_custom_fields/README.md deleted file mode 100644 index 5b20ee47..00000000 --- a/rest/api/v3/mc_custom_fields/README.md +++ /dev/null @@ -1,78 +0,0 @@ -# Go API client for - -The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. - -With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. - -You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:38.023442+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*CreateFieldDefinition* | [**CreateFieldDefinition**](docs/CreateFieldDefinition.md#createfielddefinition) | **Post** /v3/marketing/field_definitions | Create Custom Field Definition -*DeleteFieldDefinition* | [**DeleteFieldDefinition**](docs/DeleteFieldDefinition.md#deletefielddefinition) | **Delete** /v3/marketing/field_definitions/{CustomFieldId} | Delete Custom Field Definition -*ListFieldDefinition* | [**ListFieldDefinition**](docs/ListFieldDefinition.md#listfielddefinition) | **Get** /v3/marketing/field_definitions | Get All Field Definitions -*UpdateFieldDefinition* | [**UpdateFieldDefinition**](docs/UpdateFieldDefinition.md#updatefielddefinition) | **Patch** /v3/marketing/field_definitions/{CustomFieldId} | Update Custom Field Definition - - -## Documentation For Models - - - [CreateFieldDefinition200Response](CreateFieldDefinition200Response.md) - - [CreateFieldDefinition400Response](CreateFieldDefinition400Response.md) - - [CreateFieldDefinitionRequest](CreateFieldDefinitionRequest.md) - - [CustomFieldDefinitionsResponse](CustomFieldDefinitionsResponse.md) - - [CustomFieldsError](CustomFieldsError.md) - - [FieldType](FieldType.md) - - [FieldType1](FieldType1.md) - - [FieldType2](FieldType2.md) - - [ListFieldDefinition200Response](ListFieldDefinition200Response.md) - - [Metadata](Metadata.md) - - [ReservedFieldDefinitionsResponseInner](ReservedFieldDefinitionsResponseInner.md) - - [UpdateFieldDefinitionRequest](UpdateFieldDefinitionRequest.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/mc_custom_fields/api_create_field_definition.go b/rest/api/v3/mc_custom_fields/api_create_field_definition.go deleted file mode 100644 index e93771ca..00000000 --- a/rest/api/v3/mc_custom_fields/api_create_field_definition.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Custom Fields API -* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type CreateFieldDefinitionParam struct { - // - CreateFieldDefinitionRequest *CreateFieldDefinitionRequest `json:"CreateFieldDefinitionRequest,omitempty"` -} - -func (params *CreateFieldDefinitionParam) SetCreateFieldDefinitionRequest(CreateFieldDefinitionRequest CreateFieldDefinitionRequest) *CreateFieldDefinitionParam { - params.CreateFieldDefinitionRequest = &CreateFieldDefinitionRequest - return params -} - -// **This endpoint creates a new custom field definition.** Custom field definitions are created with the given `name` and `field_type`. Although field names are stored in a case-sensitive manner, all field names must be case-insensitively unique. This means you may create a field named `CamelCase` or `camelcase`, but not both. Additionally, a Custom Field name cannot collide with any Reserved Field names. You should save the returned `id` value in order to update or delete the field at a later date. You can have up to 500 custom fields. The custom field name should be created using only alphanumeric characters (A-Z and 0-9) and underscores (\\_). Custom fields can only begin with letters A-Z or underscores (_). The field type can be date, text, or number fields. The field type is important for creating segments from your contact database. **Note: Creating a custom field that begins with a number will cause issues with sending in Marketing Campaigns.** -func (c *ApiService) CreateFieldDefinition(params *CreateFieldDefinitionParam) (interface{}, error) { - path := "/v3/marketing/field_definitions" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.CreateFieldDefinitionRequest != nil { - b, err := json.Marshal(*params.CreateFieldDefinitionRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &CreateFieldDefinition200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &CreateFieldDefinition400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_custom_fields/api_delete_field_definition.go b/rest/api/v3/mc_custom_fields/api_delete_field_definition.go deleted file mode 100644 index ba38a496..00000000 --- a/rest/api/v3/mc_custom_fields/api_delete_field_definition.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Custom Fields API -* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteFieldDefinitionParam struct { - // - CustomFieldId *string `json:"custom_field_id"` -} - -func (params *DeleteFieldDefinitionParam) SetCustomFieldId(CustomFieldId string) *DeleteFieldDefinitionParam { - params.CustomFieldId = &CustomFieldId - return params -} - -// **This endpoint deletes a defined Custom Field.** You can delete only Custom Fields; Reserved Fields cannot be deleted. -func (c *ApiService) DeleteFieldDefinition(params *DeleteFieldDefinitionParam) (interface{}, error) { - path := "/v3/marketing/field_definitions/{CustomFieldId}" - if params != nil && params.CustomFieldId != nil { - path = strings.Replace(path, "{"+"CustomFieldId"+"}", *params.CustomFieldId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 404 { - ps := &CreateFieldDefinition400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_custom_fields/api_list_field_definition.go b/rest/api/v3/mc_custom_fields/api_list_field_definition.go deleted file mode 100644 index 6dbfba3d..00000000 --- a/rest/api/v3/mc_custom_fields/api_list_field_definition.go +++ /dev/null @@ -1,49 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Custom Fields API -* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListFieldDefinitionParam struct { -} - -// **This endpoint retrieves all defined Custom Fields and Reserved Fields.** -func (c *ApiService) ListFieldDefinition() (interface{}, error) { - path := "/v3/marketing/field_definitions" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListFieldDefinition200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_custom_fields/api_service.go b/rest/api/v3/mc_custom_fields/api_service.go deleted file mode 100644 index c8f8f2a4..00000000 --- a/rest/api/v3/mc_custom_fields/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Custom Fields API -* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/mc_custom_fields/api_update_field_definition.go b/rest/api/v3/mc_custom_fields/api_update_field_definition.go deleted file mode 100644 index 4081afd0..00000000 --- a/rest/api/v3/mc_custom_fields/api_update_field_definition.go +++ /dev/null @@ -1,92 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Custom Fields API -* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type UpdateFieldDefinitionParam struct { - // - CustomFieldId *string `json:"custom_field_id"` - // - UpdateFieldDefinitionRequest *UpdateFieldDefinitionRequest `json:"UpdateFieldDefinitionRequest,omitempty"` -} - -func (params *UpdateFieldDefinitionParam) SetCustomFieldId(CustomFieldId string) *UpdateFieldDefinitionParam { - params.CustomFieldId = &CustomFieldId - return params -} -func (params *UpdateFieldDefinitionParam) SetUpdateFieldDefinitionRequest(UpdateFieldDefinitionRequest UpdateFieldDefinitionRequest) *UpdateFieldDefinitionParam { - params.UpdateFieldDefinitionRequest = &UpdateFieldDefinitionRequest - return params -} - -// **This endpoint allows you to update a defined Custom Field.** Only your Custom fields can be modified; Reserved Fields cannot be updated. -func (c *ApiService) UpdateFieldDefinition(params *UpdateFieldDefinitionParam) (interface{}, error) { - path := "/v3/marketing/field_definitions/{CustomFieldId}" - if params != nil && params.CustomFieldId != nil { - path = strings.Replace(path, "{"+"CustomFieldId"+"}", *params.CustomFieldId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateFieldDefinitionRequest != nil { - b, err := json.Marshal(*params.UpdateFieldDefinitionRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &CreateFieldDefinition200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &CreateFieldDefinition400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &CreateFieldDefinition400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition.md b/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition.md deleted file mode 100644 index 08bd9259..00000000 --- a/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition.md +++ /dev/null @@ -1,48 +0,0 @@ -# CreateFieldDefinition - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateFieldDefinition**](CreateFieldDefinition.md#CreateFieldDefinition) | **Post** /v3/marketing/field_definitions | Create Custom Field Definition - - - -## CreateFieldDefinition - -> CreateFieldDefinition200Response CreateFieldDefinition(ctx, optional) - -Create Custom Field Definition - -**This endpoint creates a new custom field definition.** Custom field definitions are created with the given `name` and `field_type`. Although field names are stored in a case-sensitive manner, all field names must be case-insensitively unique. This means you may create a field named `CamelCase` or `camelcase`, but not both. Additionally, a Custom Field name cannot collide with any Reserved Field names. You should save the returned `id` value in order to update or delete the field at a later date. You can have up to 500 custom fields. The custom field name should be created using only alphanumeric characters (A-Z and 0-9) and underscores (\\_). Custom fields can only begin with letters A-Z or underscores (_). The field type can be date, text, or number fields. The field type is important for creating segments from your contact database. **Note: Creating a custom field that begins with a number will cause issues with sending in Marketing Campaigns.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateFieldDefinitionParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**CreateFieldDefinitionRequest** | [**CreateFieldDefinitionRequest**](CreateFieldDefinitionRequest.md) | - -### Return type - -[**CreateFieldDefinition200Response**](CreateFieldDefinition200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition200Response.md b/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition200Response.md deleted file mode 100644 index a68cd18e..00000000 --- a/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreateFieldDefinition200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | | -**Name** | **string** | | -**FieldType** | [**FieldType2**](FieldType2.md) | | -**Metadata** | [**Metadata**](Metadata.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition400Response.md b/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition400Response.md deleted file mode 100644 index 94eaa0b9..00000000 --- a/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition400Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateFieldDefinition400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]CustomFieldsError**](CustomFieldsError.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinitionRequest.md b/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinitionRequest.md deleted file mode 100644 index c1198cfc..00000000 --- a/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinitionRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateFieldDefinitionRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | -**FieldType** | [**FieldType**](FieldType.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_custom_fields/docs/CustomFieldDefinitionsResponse.md b/rest/api/v3/mc_custom_fields/docs/CustomFieldDefinitionsResponse.md deleted file mode 100644 index c899e1bd..00000000 --- a/rest/api/v3/mc_custom_fields/docs/CustomFieldDefinitionsResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# CustomFieldDefinitionsResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | | -**Name** | **string** | | -**FieldType** | [**FieldType2**](FieldType2.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_custom_fields/docs/CustomFieldsError.md b/rest/api/v3/mc_custom_fields/docs/CustomFieldsError.md deleted file mode 100644 index efda7914..00000000 --- a/rest/api/v3/mc_custom_fields/docs/CustomFieldsError.md +++ /dev/null @@ -1,14 +0,0 @@ -# CustomFieldsError - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | | -**Field** | **string** | |[optional] -**ErrorId** | **string** | |[optional] -**Parameter** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_custom_fields/docs/DeleteFieldDefinition.md b/rest/api/v3/mc_custom_fields/docs/DeleteFieldDefinition.md deleted file mode 100644 index 4d760132..00000000 --- a/rest/api/v3/mc_custom_fields/docs/DeleteFieldDefinition.md +++ /dev/null @@ -1,51 +0,0 @@ -# DeleteFieldDefinition - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteFieldDefinition**](DeleteFieldDefinition.md#DeleteFieldDefinition) | **Delete** /v3/marketing/field_definitions/{CustomFieldId} | Delete Custom Field Definition - - - -## DeleteFieldDefinition - -> DeleteFieldDefinition(ctx, CustomFieldId) - -Delete Custom Field Definition - -**This endpoint deletes a defined Custom Field.** You can delete only Custom Fields; Reserved Fields cannot be deleted. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**CustomFieldId** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteFieldDefinitionParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_custom_fields/docs/FieldType.md b/rest/api/v3/mc_custom_fields/docs/FieldType.md deleted file mode 100644 index 39cade55..00000000 --- a/rest/api/v3/mc_custom_fields/docs/FieldType.md +++ /dev/null @@ -1,14 +0,0 @@ -# FieldType - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**TEXT** | string | (value: `"Text"`) -**NUMBER** | string | (value: `"Number"`) -**DATE** | string | (value: `"Date"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_custom_fields/docs/FieldType1.md b/rest/api/v3/mc_custom_fields/docs/FieldType1.md deleted file mode 100644 index 0d96119b..00000000 --- a/rest/api/v3/mc_custom_fields/docs/FieldType1.md +++ /dev/null @@ -1,14 +0,0 @@ -# FieldType1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**TEXT** | string | (value: `"Text"`) -**NUMBER** | string | (value: `"Number"`) -**DATE** | string | (value: `"Date"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_custom_fields/docs/FieldType2.md b/rest/api/v3/mc_custom_fields/docs/FieldType2.md deleted file mode 100644 index df80145c..00000000 --- a/rest/api/v3/mc_custom_fields/docs/FieldType2.md +++ /dev/null @@ -1,14 +0,0 @@ -# FieldType2 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**TEXT** | string | (value: `"Text"`) -**NUMBER** | string | (value: `"Number"`) -**DATE** | string | (value: `"Date"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_custom_fields/docs/ListFieldDefinition.md b/rest/api/v3/mc_custom_fields/docs/ListFieldDefinition.md deleted file mode 100644 index 19ca33a6..00000000 --- a/rest/api/v3/mc_custom_fields/docs/ListFieldDefinition.md +++ /dev/null @@ -1,44 +0,0 @@ -# ListFieldDefinition - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListFieldDefinition**](ListFieldDefinition.md#ListFieldDefinition) | **Get** /v3/marketing/field_definitions | Get All Field Definitions - - - -## ListFieldDefinition - -> ListFieldDefinition200Response ListFieldDefinition(ctx, ) - -Get All Field Definitions - -**This endpoint retrieves all defined Custom Fields and Reserved Fields.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListFieldDefinitionParams struct - - -### Return type - -[**ListFieldDefinition200Response**](ListFieldDefinition200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_custom_fields/docs/ListFieldDefinition200Response.md b/rest/api/v3/mc_custom_fields/docs/ListFieldDefinition200Response.md deleted file mode 100644 index a3b477f4..00000000 --- a/rest/api/v3/mc_custom_fields/docs/ListFieldDefinition200Response.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListFieldDefinition200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CustomFields** | [**[]CustomFieldDefinitionsResponse**](CustomFieldDefinitionsResponse.md) | | -**ReservedFields** | [**[]ReservedFieldDefinitionsResponseInner**](ReservedFieldDefinitionsResponseInner.md) | | -**Metadata** | [**Metadata**](Metadata.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_custom_fields/docs/Metadata.md b/rest/api/v3/mc_custom_fields/docs/Metadata.md deleted file mode 100644 index 6121300c..00000000 --- a/rest/api/v3/mc_custom_fields/docs/Metadata.md +++ /dev/null @@ -1,14 +0,0 @@ -# Metadata - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Prev** | **string** | |[optional] -**Self** | **string** | |[optional] -**Next** | **string** | |[optional] -**Count** | **int32** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_custom_fields/docs/ReservedFieldDefinitionsResponseInner.md b/rest/api/v3/mc_custom_fields/docs/ReservedFieldDefinitionsResponseInner.md deleted file mode 100644 index 35e65741..00000000 --- a/rest/api/v3/mc_custom_fields/docs/ReservedFieldDefinitionsResponseInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ReservedFieldDefinitionsResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | |[optional] -**FieldType** | [**FieldType1**](FieldType1.md) | |[optional] -**ReadOnly** | **bool** | When `true` this means API consumers are unable to set the value of this field on contacts. |[optional] [default to false] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_custom_fields/docs/UpdateFieldDefinition.md b/rest/api/v3/mc_custom_fields/docs/UpdateFieldDefinition.md deleted file mode 100644 index 98914789..00000000 --- a/rest/api/v3/mc_custom_fields/docs/UpdateFieldDefinition.md +++ /dev/null @@ -1,52 +0,0 @@ -# UpdateFieldDefinition - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateFieldDefinition**](UpdateFieldDefinition.md#UpdateFieldDefinition) | **Patch** /v3/marketing/field_definitions/{CustomFieldId} | Update Custom Field Definition - - - -## UpdateFieldDefinition - -> CreateFieldDefinition200Response UpdateFieldDefinition(ctx, CustomFieldIdoptional) - -Update Custom Field Definition - -**This endpoint allows you to update a defined Custom Field.** Only your Custom fields can be modified; Reserved Fields cannot be updated. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**CustomFieldId** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateFieldDefinitionParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**UpdateFieldDefinitionRequest** | [**UpdateFieldDefinitionRequest**](UpdateFieldDefinitionRequest.md) | - -### Return type - -[**CreateFieldDefinition200Response**](CreateFieldDefinition200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_custom_fields/docs/UpdateFieldDefinitionRequest.md b/rest/api/v3/mc_custom_fields/docs/UpdateFieldDefinitionRequest.md deleted file mode 100644 index f386d9b3..00000000 --- a/rest/api/v3/mc_custom_fields/docs/UpdateFieldDefinitionRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateFieldDefinitionRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_custom_fields/model_create_field_definition_200_response.go b/rest/api/v3/mc_custom_fields/model_create_field_definition_200_response.go deleted file mode 100644 index 214fb310..00000000 --- a/rest/api/v3/mc_custom_fields/model_create_field_definition_200_response.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Custom Fields API -* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateFieldDefinition200Response struct for CreateFieldDefinition200Response -type CreateFieldDefinition200Response struct { - Id string `json:"id"` - Name string `json:"name"` - FieldType FieldType2 `json:"field_type"` - Metadata *Metadata `json:"_metadata,omitempty"` -} diff --git a/rest/api/v3/mc_custom_fields/model_create_field_definition_400_response.go b/rest/api/v3/mc_custom_fields/model_create_field_definition_400_response.go deleted file mode 100644 index 1ef18211..00000000 --- a/rest/api/v3/mc_custom_fields/model_create_field_definition_400_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Custom Fields API -* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateFieldDefinition400Response struct for CreateFieldDefinition400Response -type CreateFieldDefinition400Response struct { - Errors []CustomFieldsError `json:"errors"` -} diff --git a/rest/api/v3/mc_custom_fields/model_create_field_definition_request.go b/rest/api/v3/mc_custom_fields/model_create_field_definition_request.go deleted file mode 100644 index 599343f6..00000000 --- a/rest/api/v3/mc_custom_fields/model_create_field_definition_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Custom Fields API -* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateFieldDefinitionRequest struct for CreateFieldDefinitionRequest -type CreateFieldDefinitionRequest struct { - Name string `json:"name"` - FieldType FieldType `json:"field_type"` -} diff --git a/rest/api/v3/mc_custom_fields/model_custom_field_definitions_response.go b/rest/api/v3/mc_custom_fields/model_custom_field_definitions_response.go deleted file mode 100644 index 029a2c84..00000000 --- a/rest/api/v3/mc_custom_fields/model_custom_field_definitions_response.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Custom Fields API -* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CustomFieldDefinitionsResponse struct for CustomFieldDefinitionsResponse -type CustomFieldDefinitionsResponse struct { - Id string `json:"id"` - Name string `json:"name"` - FieldType FieldType2 `json:"field_type"` -} diff --git a/rest/api/v3/mc_custom_fields/model_custom_fields_error.go b/rest/api/v3/mc_custom_fields/model_custom_fields_error.go deleted file mode 100644 index c763d2ec..00000000 --- a/rest/api/v3/mc_custom_fields/model_custom_fields_error.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Custom Fields API -* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CustomFieldsError struct for CustomFieldsError -type CustomFieldsError struct { - Message string `json:"message"` - Field *string `json:"field,omitempty"` - ErrorId *string `json:"error_id,omitempty"` - Parameter *string `json:"parameter,omitempty"` -} diff --git a/rest/api/v3/mc_custom_fields/model_field_type.go b/rest/api/v3/mc_custom_fields/model_field_type.go deleted file mode 100644 index d667c56f..00000000 --- a/rest/api/v3/mc_custom_fields/model_field_type.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Custom Fields API -* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// FieldType the model 'FieldType' -type FieldType string - -// List of FieldType -const ( - FIELDTYPE_TEXT FieldType = "Text" - FIELDTYPE_NUMBER FieldType = "Number" - FIELDTYPE_DATE FieldType = "Date" -) diff --git a/rest/api/v3/mc_custom_fields/model_field_type1.go b/rest/api/v3/mc_custom_fields/model_field_type1.go deleted file mode 100644 index fb7ad5b7..00000000 --- a/rest/api/v3/mc_custom_fields/model_field_type1.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Custom Fields API -* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// FieldType1 the model 'FieldType1' -type FieldType1 string - -// List of FieldType1 -const ( - FIELDTYPE1_TEXT FieldType1 = "Text" - FIELDTYPE1_NUMBER FieldType1 = "Number" - FIELDTYPE1_DATE FieldType1 = "Date" -) diff --git a/rest/api/v3/mc_custom_fields/model_field_type2.go b/rest/api/v3/mc_custom_fields/model_field_type2.go deleted file mode 100644 index 93faa534..00000000 --- a/rest/api/v3/mc_custom_fields/model_field_type2.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Custom Fields API -* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// FieldType2 the model 'FieldType2' -type FieldType2 string - -// List of FieldType2 -const ( - FIELDTYPE2_TEXT FieldType2 = "Text" - FIELDTYPE2_NUMBER FieldType2 = "Number" - FIELDTYPE2_DATE FieldType2 = "Date" -) diff --git a/rest/api/v3/mc_custom_fields/model_list_field_definition_200_response.go b/rest/api/v3/mc_custom_fields/model_list_field_definition_200_response.go deleted file mode 100644 index 11dd5c80..00000000 --- a/rest/api/v3/mc_custom_fields/model_list_field_definition_200_response.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Custom Fields API -* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListFieldDefinition200Response struct for ListFieldDefinition200Response -type ListFieldDefinition200Response struct { - CustomFields []CustomFieldDefinitionsResponse `json:"custom_fields"` - ReservedFields []ReservedFieldDefinitionsResponseInner `json:"reserved_fields"` - Metadata *Metadata `json:"_metadata,omitempty"` -} diff --git a/rest/api/v3/mc_custom_fields/model_metadata.go b/rest/api/v3/mc_custom_fields/model_metadata.go deleted file mode 100644 index 99bc91cc..00000000 --- a/rest/api/v3/mc_custom_fields/model_metadata.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Custom Fields API -* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Metadata struct for Metadata -type Metadata struct { - Prev *string `json:"prev,omitempty"` - Self *string `json:"self,omitempty"` - Next *string `json:"next,omitempty"` - Count *int32 `json:"count,omitempty"` -} diff --git a/rest/api/v3/mc_custom_fields/model_reserved_field_definitions_response_inner.go b/rest/api/v3/mc_custom_fields/model_reserved_field_definitions_response_inner.go deleted file mode 100644 index ef81cb82..00000000 --- a/rest/api/v3/mc_custom_fields/model_reserved_field_definitions_response_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Custom Fields API -* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ReservedFieldDefinitionsResponseInner struct for ReservedFieldDefinitionsResponseInner -type ReservedFieldDefinitionsResponseInner struct { - Name *string `json:"name,omitempty"` - FieldType *FieldType1 `json:"field_type,omitempty"` - // When `true` this means API consumers are unable to set the value of this field on contacts. - ReadOnly *bool `json:"read_only,omitempty"` -} diff --git a/rest/api/v3/mc_custom_fields/model_update_field_definition_request.go b/rest/api/v3/mc_custom_fields/model_update_field_definition_request.go deleted file mode 100644 index 1172b9ce..00000000 --- a/rest/api/v3/mc_custom_fields/model_update_field_definition_request.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Custom Fields API -* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateFieldDefinitionRequest struct for UpdateFieldDefinitionRequest -type UpdateFieldDefinitionRequest struct { - Name string `json:"name"` -} diff --git a/rest/api/v3/mc_designs/.openapi-generator b/rest/api/v3/mc_designs/.openapi-generator deleted file mode 100644 index 6f44dcb1..00000000 --- a/rest/api/v3/mc_designs/.openapi-generator +++ /dev/null @@ -1,43 +0,0 @@ -.openapi-generator -README.md -api_create_design.go -api_delete_design.go -api_duplicate_design.go -api_duplicate_pre_built_design.go -api_get_design.go -api_get_pre_built_design.go -api_list_design.go -api_list_pre_built_design.go -api_service.go -api_update_design.go -docs/ApiError.md -docs/ApiErrors.md -docs/CreateDesign.md -docs/DeleteDesign.md -docs/DesignCommonProperties.md -docs/DesignDuplicateInput.md -docs/DesignInput.md -docs/DesignOutput.md -docs/DesignOutputSummary.md -docs/DuplicateDesign.md -docs/DuplicatePreBuiltDesign.md -docs/Editor.md -docs/GetDesign.md -docs/GetPreBuiltDesign.md -docs/ListDesign.md -docs/ListDesign200Response.md -docs/ListPreBuiltDesign.md -docs/Metadata.md -docs/UpdateDesign.md -docs/UpdateDesignRequest.md -model_api_error.go -model_api_errors.go -model_design_common_properties.go -model_design_duplicate_input.go -model_design_input.go -model_design_output.go -model_design_output_summary.go -model_editor.go -model_list_design_200_response.go -model_metadata.go -model_update_design_request.go diff --git a/rest/api/v3/mc_designs/.openapi-generator-ignore b/rest/api/v3/mc_designs/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/mc_designs/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/mc_designs/README.md b/rest/api/v3/mc_designs/README.md deleted file mode 100644 index 3de167f1..00000000 --- a/rest/api/v3/mc_designs/README.md +++ /dev/null @@ -1,84 +0,0 @@ -# Go API client for - -The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). - -The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. - -You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. - -The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T13:25:44.066640+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*CreateDesign* | [**CreateDesign**](docs/CreateDesign.md#createdesign) | **Post** /v3/designs | Create Design -*DeleteDesign* | [**DeleteDesign**](docs/DeleteDesign.md#deletedesign) | **Delete** /v3/designs/{Id} | Delete Design -*DuplicateDesign* | [**DuplicateDesign**](docs/DuplicateDesign.md#duplicatedesign) | **Post** /v3/designs/{Id} | Duplicate Design -*DuplicatePreBuiltDesign* | [**DuplicatePreBuiltDesign**](docs/DuplicatePreBuiltDesign.md#duplicateprebuiltdesign) | **Post** /v3/designs/pre-builts/{Id} | Duplicate SendGrid Pre-built Design -*GetDesign* | [**GetDesign**](docs/GetDesign.md#getdesign) | **Get** /v3/designs/{Id} | Get Design -*GetPreBuiltDesign* | [**GetPreBuiltDesign**](docs/GetPreBuiltDesign.md#getprebuiltdesign) | **Get** /v3/designs/pre-builts/{Id} | Get SendGrid Pre-built Design -*ListDesign* | [**ListDesign**](docs/ListDesign.md#listdesign) | **Get** /v3/designs | List Designs -*ListPreBuiltDesign* | [**ListPreBuiltDesign**](docs/ListPreBuiltDesign.md#listprebuiltdesign) | **Get** /v3/designs/pre-builts | List SendGrid Pre-built Designs -*UpdateDesign* | [**UpdateDesign**](docs/UpdateDesign.md#updatedesign) | **Patch** /v3/designs/{Id} | Update Design - - -## Documentation For Models - - - [ApiError](ApiError.md) - - [ApiErrors](ApiErrors.md) - - [DesignCommonProperties](DesignCommonProperties.md) - - [DesignDuplicateInput](DesignDuplicateInput.md) - - [DesignInput](DesignInput.md) - - [DesignOutput](DesignOutput.md) - - [DesignOutputSummary](DesignOutputSummary.md) - - [Editor](Editor.md) - - [ListDesign200Response](ListDesign200Response.md) - - [Metadata](Metadata.md) - - [UpdateDesignRequest](UpdateDesignRequest.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/mc_designs/api_create_design.go b/rest/api/v3/mc_designs/api_create_design.go deleted file mode 100644 index c8b41d3c..00000000 --- a/rest/api/v3/mc_designs/api_create_design.go +++ /dev/null @@ -1,72 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" -) - -type CreateDesignParam struct { - // - DesignInput *DesignInput `json:"DesignInput,omitempty"` -} - -func (params *CreateDesignParam) SetDesignInput(DesignInput DesignInput) *CreateDesignParam { - params.DesignInput = &DesignInput - return params -} - -// **This endpoint allows you to create a new design**. You can add a new design by passing data, including a string of HTML email content, to `/designs`. When creating designs from scratch, be aware of the styling constraints inherent to many email clients. For a list of best practices, see our guide to [Cross-Platform Email Design](https://sendgrid.com/docs/ui/sending-email/cross-platform-html-design/). The Design Library can also convert your design’s HTML elements into drag and drop modules that are editable in the Designs Library user interface. For more, visit the [Design and Code Editor documentation](https://sendgrid.com/docs/ui/sending-email/editor/#drag--drop-markup). Because the `/designs` endpoint makes it easy to add designs, you can create a design with your preferred tooling or migrate designs you already own without relying on the Design Library UI. -func (c *ApiService) CreateDesign(params *CreateDesignParam) (interface{}, error) { - path := "/v3/designs" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.DesignInput != nil { - b, err := json.Marshal(*params.DesignInput) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &DesignOutput{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ApiErrors{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/mc_designs/api_delete_design.go b/rest/api/v3/mc_designs/api_delete_design.go deleted file mode 100644 index eec2321c..00000000 --- a/rest/api/v3/mc_designs/api_delete_design.go +++ /dev/null @@ -1,76 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" - - "strings" -) - -type DeleteDesignParam struct { - // The ID of the Design you want to duplicate. - Id *string `json:"id"` -} - -func (params *DeleteDesignParam) SetId(Id string) *DeleteDesignParam { - params.Id = &Id - return params -} - -// **This endpoint allows you to delete a single design**. Be sure to check the ID of the design you intend to delete before making this request; deleting a design is a permanent action. -func (c *ApiService) DeleteDesign(params *DeleteDesignParam) (interface{}, error) { - path := "/v3/designs/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ApiErrors{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ApiErrors{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/mc_designs/api_duplicate_design.go b/rest/api/v3/mc_designs/api_duplicate_design.go deleted file mode 100644 index 823d9a41..00000000 --- a/rest/api/v3/mc_designs/api_duplicate_design.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" - - "strings" -) - -type DuplicateDesignParam struct { - // The ID of the Design you want to duplicate. - Id *string `json:"id"` - // - DesignDuplicateInput *DesignDuplicateInput `json:"DesignDuplicateInput,omitempty"` -} - -func (params *DuplicateDesignParam) SetId(Id string) *DuplicateDesignParam { - params.Id = &Id - return params -} -func (params *DuplicateDesignParam) SetDesignDuplicateInput(DesignDuplicateInput DesignDuplicateInput) *DuplicateDesignParam { - params.DesignDuplicateInput = &DesignDuplicateInput - return params -} - -// **This endpoint allows you to duplicate one of your existing designs**. Modifying an existing design is often the easiest way to create something new. You are not required to pass any data in the body of a request to this endpoint. If you choose to leave the `name` field blank, your duplicate will be assigned the name of the design it was copied from with the text \"Duplicate: \" prepended to it. This name change is only a convenience, as the duplicate will be assigned a unique ID that differentiates it from your other designs. You can modify your duplicate’s name at the time of creation by passing an updated value to the `name` field when making the initial request. More on retrieving design IDs can be found below. -func (c *ApiService) DuplicateDesign(params *DuplicateDesignParam) (interface{}, error) { - path := "/v3/designs/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.DesignDuplicateInput != nil { - b, err := json.Marshal(*params.DesignDuplicateInput) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &DesignOutput{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ApiError{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ApiErrors{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/mc_designs/api_duplicate_pre_built_design.go b/rest/api/v3/mc_designs/api_duplicate_pre_built_design.go deleted file mode 100644 index f8965925..00000000 --- a/rest/api/v3/mc_designs/api_duplicate_pre_built_design.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" - - "strings" -) - -type DuplicatePreBuiltDesignParam struct { - // The ID of the pre-built Design you want to duplicate. - Id *string `json:"id"` - // - DesignDuplicateInput *DesignDuplicateInput `json:"DesignDuplicateInput,omitempty"` -} - -func (params *DuplicatePreBuiltDesignParam) SetId(Id string) *DuplicatePreBuiltDesignParam { - params.Id = &Id - return params -} -func (params *DuplicatePreBuiltDesignParam) SetDesignDuplicateInput(DesignDuplicateInput DesignDuplicateInput) *DuplicatePreBuiltDesignParam { - params.DesignDuplicateInput = &DesignDuplicateInput - return params -} - -// **This endpoint allows you to duplicate one of the pre-built Twilio SendGrid designs**. Like duplicating one of your existing designs, you are not required to pass any data in the body of a request to this endpoint. If you choose to leave the `name` field blank, your duplicate will be assigned the name of the design it was copied from with the text \"Duplicate: \" prepended to it. This name change is only a convenience, as the duplicate design will be assigned a unique ID that differentiates it from your other designs. You can retrieve the IDs for Twilio SendGrid pre-built designs using the \"List SendGrid Pre-built Designs\" endpoint. You can modify your duplicate’s name at the time of creation by passing an updated value to the `name` field when making the initial request. More on retrieving design IDs can be found above. -func (c *ApiService) DuplicatePreBuiltDesign(params *DuplicatePreBuiltDesignParam) (interface{}, error) { - path := "/v3/designs/pre-builts/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.DesignDuplicateInput != nil { - b, err := json.Marshal(*params.DesignDuplicateInput) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &DesignOutput{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ApiErrors{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ApiErrors{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/mc_designs/api_get_design.go b/rest/api/v3/mc_designs/api_get_design.go deleted file mode 100644 index 39708536..00000000 --- a/rest/api/v3/mc_designs/api_get_design.go +++ /dev/null @@ -1,76 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" - - "strings" -) - -type GetDesignParam struct { - // The ID of the Design you want to duplicate. - Id *string `json:"id"` -} - -func (params *GetDesignParam) SetId(Id string) *GetDesignParam { - params.Id = &Id - return params -} - -// **This endpoint allows you to retrieve a single design**. A GET request to `/designs/{id}` will retrieve details about a specific design in your Design Library. This endpoint is valuable when retrieving information stored in a field that you wish to update using a PATCH request. -func (c *ApiService) GetDesign(params *GetDesignParam) (interface{}, error) { - path := "/v3/designs/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &DesignOutput{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ApiErrors{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ApiErrors{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/mc_designs/api_get_pre_built_design.go b/rest/api/v3/mc_designs/api_get_pre_built_design.go deleted file mode 100644 index 026869c5..00000000 --- a/rest/api/v3/mc_designs/api_get_pre_built_design.go +++ /dev/null @@ -1,76 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" - - "strings" -) - -type GetPreBuiltDesignParam struct { - // The ID of the pre-built Design you want to duplicate. - Id *string `json:"id"` -} - -func (params *GetPreBuiltDesignParam) SetId(Id string) *GetPreBuiltDesignParam { - params.Id = &Id - return params -} - -// **This endpoint allows you to retrieve a single pre-built design**. A GET request to `/designs/pre-builts/{id}` will retrieve details about a specific pre-built design. This endpoint is valuable when retrieving details about a pre-built design that you wish to duplicate and modify. -func (c *ApiService) GetPreBuiltDesign(params *GetPreBuiltDesignParam) (interface{}, error) { - path := "/v3/designs/pre-builts/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &DesignOutput{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ApiErrors{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ApiErrors{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/mc_designs/api_list_design.go b/rest/api/v3/mc_designs/api_list_design.go deleted file mode 100644 index 246480bf..00000000 --- a/rest/api/v3/mc_designs/api_list_design.go +++ /dev/null @@ -1,78 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" -) - -type ListDesignParam struct { - // number of results to return - PageSize *int32 `json:"page_size,omitempty"` - // token corresponding to a specific page of results, as provided by metadata - PageToken *string `json:"page_token,omitempty"` - // set to false to return all fields - Summary *bool `json:"summary,omitempty"` -} - -func (params *ListDesignParam) SetPageSize(PageSize int32) *ListDesignParam { - params.PageSize = &PageSize - return params -} -func (params *ListDesignParam) SetPageToken(PageToken string) *ListDesignParam { - params.PageToken = &PageToken - return params -} -func (params *ListDesignParam) SetSummary(Summary bool) *ListDesignParam { - params.Summary = &Summary - return params -} - -// **This endpoint allows you to retrieve a list of designs already stored in your Design Library**. A GET request to `/designs` will return a list of your existing designs. This endpoint will not return the pre-built Twilio SendGrid designs. Pre-built designs can be retrieved using the `/designs/pre-builts` endpoint, which is detailed below. By default, you will receive 100 results per request; however, you can modify the number of results returned by passing an integer to the `page_size` query parameter. -func (c *ApiService) ListDesign(params *ListDesignParam) (interface{}, error) { - path := "/v3/designs" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.PageSize != nil { - data.Set("page_size", fmt.Sprint(*params.PageSize)) - } - if params != nil && params.PageToken != nil { - data.Set("page_token", *params.PageToken) - } - if params != nil && params.Summary != nil { - data.Set("summary", fmt.Sprint(*params.Summary)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListDesign200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/mc_designs/api_list_pre_built_design.go b/rest/api/v3/mc_designs/api_list_pre_built_design.go deleted file mode 100644 index 2416565f..00000000 --- a/rest/api/v3/mc_designs/api_list_pre_built_design.go +++ /dev/null @@ -1,78 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" -) - -type ListPreBuiltDesignParam struct { - // number of results to return - PageSize *int32 `json:"page_size,omitempty"` - // token corresponding to a specific page of results, as provided by metadata - PageToken *string `json:"page_token,omitempty"` - // set to false to return all fields - Summary *bool `json:"summary,omitempty"` -} - -func (params *ListPreBuiltDesignParam) SetPageSize(PageSize int32) *ListPreBuiltDesignParam { - params.PageSize = &PageSize - return params -} -func (params *ListPreBuiltDesignParam) SetPageToken(PageToken string) *ListPreBuiltDesignParam { - params.PageToken = &PageToken - return params -} -func (params *ListPreBuiltDesignParam) SetSummary(Summary bool) *ListPreBuiltDesignParam { - params.Summary = &Summary - return params -} - -// **This endpoint allows you to retrieve a list of pre-built designs provided by Twilio SendGrid**. Unlike the `/designs` endpoint where *your* designs are stored, a GET request made to `designs/pre-builts` will retrieve a list of the pre-built Twilio SendGrid designs. This endpoint will not return the designs stored in your Design Library. By default, you will receive 100 results per request; however, you can modify the number of results returned by passing an integer to the `page_size` query parameter. This endpoint is useful for retrieving the IDs of Twilio SendGrid designs that you want to duplicate and modify. -func (c *ApiService) ListPreBuiltDesign(params *ListPreBuiltDesignParam) (interface{}, error) { - path := "/v3/designs/pre-builts" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.PageSize != nil { - data.Set("page_size", fmt.Sprint(*params.PageSize)) - } - if params != nil && params.PageToken != nil { - data.Set("page_token", *params.PageToken) - } - if params != nil && params.Summary != nil { - data.Set("summary", fmt.Sprint(*params.Summary)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListDesign200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/mc_designs/api_service.go b/rest/api/v3/mc_designs/api_service.go deleted file mode 100644 index d0bf8bbe..00000000 --- a/rest/api/v3/mc_designs/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/mc_designs/api_update_design.go b/rest/api/v3/mc_designs/api_update_design.go deleted file mode 100644 index 3b1122bc..00000000 --- a/rest/api/v3/mc_designs/api_update_design.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" - - "strings" -) - -type UpdateDesignParam struct { - // The ID of the Design you want to duplicate. - Id *string `json:"id"` - // - UpdateDesignRequest *UpdateDesignRequest `json:"UpdateDesignRequest,omitempty"` -} - -func (params *UpdateDesignParam) SetId(Id string) *UpdateDesignParam { - params.Id = &Id - return params -} -func (params *UpdateDesignParam) SetUpdateDesignRequest(UpdateDesignRequest UpdateDesignRequest) *UpdateDesignParam { - params.UpdateDesignRequest = &UpdateDesignRequest - return params -} - -// **This endpoint allows you to edit a design**. The Design API supports PATCH requests, which allow you to make partial updates to a single design. Passing data to a specific field will update only the data stored in that field; all other fields will be unaltered. For example, updating a design's name requires that you make a PATCH request to this endpoint with data specified for the `name` field only. ``` { \"name\": \"\" } ``` -func (c *ApiService) UpdateDesign(params *UpdateDesignParam) (interface{}, error) { - path := "/v3/designs/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateDesignRequest != nil { - b, err := json.Marshal(*params.UpdateDesignRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &DesignOutput{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ApiErrors{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ApiErrors{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/mc_designs/docs/ApiError.md b/rest/api/v3/mc_designs/docs/ApiError.md deleted file mode 100644 index 65ebab4d..00000000 --- a/rest/api/v3/mc_designs/docs/ApiError.md +++ /dev/null @@ -1,13 +0,0 @@ -# ApiError - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | | -**Field** | **string** | | -**ErrorId** | **string** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_designs/docs/ApiErrors.md b/rest/api/v3/mc_designs/docs/ApiErrors.md deleted file mode 100644 index 9228c171..00000000 --- a/rest/api/v3/mc_designs/docs/ApiErrors.md +++ /dev/null @@ -1,11 +0,0 @@ -# ApiErrors - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ApiError**](ApiError.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_designs/docs/CreateDesign.md b/rest/api/v3/mc_designs/docs/CreateDesign.md deleted file mode 100644 index 87211de3..00000000 --- a/rest/api/v3/mc_designs/docs/CreateDesign.md +++ /dev/null @@ -1,48 +0,0 @@ -# CreateDesign - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateDesign**](CreateDesign.md#CreateDesign) | **Post** /v3/designs | Create Design - - - -## CreateDesign - -> DesignOutput CreateDesign(ctx, optional) - -Create Design - -**This endpoint allows you to create a new design**. You can add a new design by passing data, including a string of HTML email content, to `/designs`. When creating designs from scratch, be aware of the styling constraints inherent to many email clients. For a list of best practices, see our guide to [Cross-Platform Email Design](https://sendgrid.com/docs/ui/sending-email/cross-platform-html-design/). The Design Library can also convert your design’s HTML elements into drag and drop modules that are editable in the Designs Library user interface. For more, visit the [Design and Code Editor documentation](https://sendgrid.com/docs/ui/sending-email/editor/#drag--drop-markup). Because the `/designs` endpoint makes it easy to add designs, you can create a design with your preferred tooling or migrate designs you already own without relying on the Design Library UI. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateDesignParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**DesignInput** | [**DesignInput**](DesignInput.md) | - -### Return type - -[**DesignOutput**](DesignOutput.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_designs/docs/DeleteDesign.md b/rest/api/v3/mc_designs/docs/DeleteDesign.md deleted file mode 100644 index 8b46426a..00000000 --- a/rest/api/v3/mc_designs/docs/DeleteDesign.md +++ /dev/null @@ -1,51 +0,0 @@ -# DeleteDesign - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteDesign**](DeleteDesign.md#DeleteDesign) | **Delete** /v3/designs/{Id} | Delete Design - - - -## DeleteDesign - -> map[string]interface{} DeleteDesign(ctx, Id) - -Delete Design - -**This endpoint allows you to delete a single design**. Be sure to check the ID of the design you intend to delete before making this request; deleting a design is a permanent action. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of the Design you want to duplicate. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteDesignParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_designs/docs/DesignCommonProperties.md b/rest/api/v3/mc_designs/docs/DesignCommonProperties.md deleted file mode 100644 index 70dfa399..00000000 --- a/rest/api/v3/mc_designs/docs/DesignCommonProperties.md +++ /dev/null @@ -1,15 +0,0 @@ -# DesignCommonProperties - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of the new design. |[optional] [default to "Duplicate: "] -**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] -**GeneratePlainContent** | **bool** | If true, plain_content is always generated from html_content. If false, plain_content is not altered. |[optional] [default to true] -**Subject** | **string** | Subject of the Design. |[optional] -**Categories** | **[]string** | The list of categories applied to the design |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_designs/docs/DesignDuplicateInput.md b/rest/api/v3/mc_designs/docs/DesignDuplicateInput.md deleted file mode 100644 index db86680e..00000000 --- a/rest/api/v3/mc_designs/docs/DesignDuplicateInput.md +++ /dev/null @@ -1,12 +0,0 @@ -# DesignDuplicateInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of the new design. |[optional] [default to "Duplicate: "] -**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_designs/docs/DesignInput.md b/rest/api/v3/mc_designs/docs/DesignInput.md deleted file mode 100644 index 3413ae98..00000000 --- a/rest/api/v3/mc_designs/docs/DesignInput.md +++ /dev/null @@ -1,14 +0,0 @@ -# DesignInput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of the new design. |[optional] [default to "Duplicate: "] -**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] -**HtmlContent** | **string** | The HTML content of the Design. | -**PlainContent** | **string** | Plain text content of the Design. |[optional] [default to ""] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_designs/docs/DesignOutput.md b/rest/api/v3/mc_designs/docs/DesignOutput.md deleted file mode 100644 index f80ba304..00000000 --- a/rest/api/v3/mc_designs/docs/DesignOutput.md +++ /dev/null @@ -1,14 +0,0 @@ -# DesignOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of the new design. |[optional] [default to "Duplicate: "] -**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] -**HtmlContent** | **string** | The HTML content of the Design. | -**PlainContent** | **string** | Plain text content of the Design. |[optional] [default to ""] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_designs/docs/DesignOutputSummary.md b/rest/api/v3/mc_designs/docs/DesignOutputSummary.md deleted file mode 100644 index 5a0c0a76..00000000 --- a/rest/api/v3/mc_designs/docs/DesignOutputSummary.md +++ /dev/null @@ -1,16 +0,0 @@ -# DesignOutputSummary - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | ID of the Design. |[optional] -**UpdatedAt** | **string** | Datetime that Design was last updated. |[optional] -**CreatedAt** | **string** | Datetime that Design was created. |[optional] -**ThumbnailUrl** | **string** | A Thumbnail preview of the template's html content. |[optional] -**Name** | **string** | The name of the new design. |[optional] [default to "Duplicate: "] -**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_designs/docs/DuplicateDesign.md b/rest/api/v3/mc_designs/docs/DuplicateDesign.md deleted file mode 100644 index 2496e786..00000000 --- a/rest/api/v3/mc_designs/docs/DuplicateDesign.md +++ /dev/null @@ -1,52 +0,0 @@ -# DuplicateDesign - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DuplicateDesign**](DuplicateDesign.md#DuplicateDesign) | **Post** /v3/designs/{Id} | Duplicate Design - - - -## DuplicateDesign - -> DesignOutput DuplicateDesign(ctx, Idoptional) - -Duplicate Design - -**This endpoint allows you to duplicate one of your existing designs**. Modifying an existing design is often the easiest way to create something new. You are not required to pass any data in the body of a request to this endpoint. If you choose to leave the `name` field blank, your duplicate will be assigned the name of the design it was copied from with the text \"Duplicate: \" prepended to it. This name change is only a convenience, as the duplicate will be assigned a unique ID that differentiates it from your other designs. You can modify your duplicate’s name at the time of creation by passing an updated value to the `name` field when making the initial request. More on retrieving design IDs can be found below. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of the Design you want to duplicate. - -### Other Parameters - -Other parameters are passed through a pointer to a DuplicateDesignParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**DesignDuplicateInput** | [**DesignDuplicateInput**](DesignDuplicateInput.md) | - -### Return type - -[**DesignOutput**](DesignOutput.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_designs/docs/DuplicatePreBuiltDesign.md b/rest/api/v3/mc_designs/docs/DuplicatePreBuiltDesign.md deleted file mode 100644 index 9d8e805f..00000000 --- a/rest/api/v3/mc_designs/docs/DuplicatePreBuiltDesign.md +++ /dev/null @@ -1,52 +0,0 @@ -# DuplicatePreBuiltDesign - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DuplicatePreBuiltDesign**](DuplicatePreBuiltDesign.md#DuplicatePreBuiltDesign) | **Post** /v3/designs/pre-builts/{Id} | Duplicate SendGrid Pre-built Design - - - -## DuplicatePreBuiltDesign - -> DesignOutput DuplicatePreBuiltDesign(ctx, Idoptional) - -Duplicate SendGrid Pre-built Design - -**This endpoint allows you to duplicate one of the pre-built Twilio SendGrid designs**. Like duplicating one of your existing designs, you are not required to pass any data in the body of a request to this endpoint. If you choose to leave the `name` field blank, your duplicate will be assigned the name of the design it was copied from with the text \"Duplicate: \" prepended to it. This name change is only a convenience, as the duplicate design will be assigned a unique ID that differentiates it from your other designs. You can retrieve the IDs for Twilio SendGrid pre-built designs using the \"List SendGrid Pre-built Designs\" endpoint. You can modify your duplicate’s name at the time of creation by passing an updated value to the `name` field when making the initial request. More on retrieving design IDs can be found above. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of the pre-built Design you want to duplicate. - -### Other Parameters - -Other parameters are passed through a pointer to a DuplicatePreBuiltDesignParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**DesignDuplicateInput** | [**DesignDuplicateInput**](DesignDuplicateInput.md) | - -### Return type - -[**DesignOutput**](DesignOutput.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_designs/docs/Editor.md b/rest/api/v3/mc_designs/docs/Editor.md deleted file mode 100644 index 9d170841..00000000 --- a/rest/api/v3/mc_designs/docs/Editor.md +++ /dev/null @@ -1,13 +0,0 @@ -# Editor - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**CODE** | string | (value: `"code"`) -**DESIGN** | string | (value: `"design"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_designs/docs/GetDesign.md b/rest/api/v3/mc_designs/docs/GetDesign.md deleted file mode 100644 index 8bd1d16c..00000000 --- a/rest/api/v3/mc_designs/docs/GetDesign.md +++ /dev/null @@ -1,51 +0,0 @@ -# GetDesign - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetDesign**](GetDesign.md#GetDesign) | **Get** /v3/designs/{Id} | Get Design - - - -## GetDesign - -> DesignOutput GetDesign(ctx, Id) - -Get Design - -**This endpoint allows you to retrieve a single design**. A GET request to `/designs/{id}` will retrieve details about a specific design in your Design Library. This endpoint is valuable when retrieving information stored in a field that you wish to update using a PATCH request. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of the Design you want to duplicate. - -### Other Parameters - -Other parameters are passed through a pointer to a GetDesignParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**DesignOutput**](DesignOutput.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_designs/docs/GetPreBuiltDesign.md b/rest/api/v3/mc_designs/docs/GetPreBuiltDesign.md deleted file mode 100644 index e49acc07..00000000 --- a/rest/api/v3/mc_designs/docs/GetPreBuiltDesign.md +++ /dev/null @@ -1,51 +0,0 @@ -# GetPreBuiltDesign - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetPreBuiltDesign**](GetPreBuiltDesign.md#GetPreBuiltDesign) | **Get** /v3/designs/pre-builts/{Id} | Get SendGrid Pre-built Design - - - -## GetPreBuiltDesign - -> DesignOutput GetPreBuiltDesign(ctx, Id) - -Get SendGrid Pre-built Design - -**This endpoint allows you to retrieve a single pre-built design**. A GET request to `/designs/pre-builts/{id}` will retrieve details about a specific pre-built design. This endpoint is valuable when retrieving details about a pre-built design that you wish to duplicate and modify. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of the pre-built Design you want to duplicate. - -### Other Parameters - -Other parameters are passed through a pointer to a GetPreBuiltDesignParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**DesignOutput**](DesignOutput.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_designs/docs/ListDesign.md b/rest/api/v3/mc_designs/docs/ListDesign.md deleted file mode 100644 index f1677008..00000000 --- a/rest/api/v3/mc_designs/docs/ListDesign.md +++ /dev/null @@ -1,50 +0,0 @@ -# ListDesign - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListDesign**](ListDesign.md#ListDesign) | **Get** /v3/designs | List Designs - - - -## ListDesign - -> ListDesign200Response ListDesign(ctx, optional) - -List Designs - -**This endpoint allows you to retrieve a list of designs already stored in your Design Library**. A GET request to `/designs` will return a list of your existing designs. This endpoint will not return the pre-built Twilio SendGrid designs. Pre-built designs can be retrieved using the `/designs/pre-builts` endpoint, which is detailed below. By default, you will receive 100 results per request; however, you can modify the number of results returned by passing an integer to the `page_size` query parameter. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListDesignParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**PageSize** | **int32** | number of results to return -**PageToken** | **string** | token corresponding to a specific page of results, as provided by metadata -**Summary** | **bool** | set to false to return all fields - -### Return type - -[**ListDesign200Response**](ListDesign200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_designs/docs/ListDesign200Response.md b/rest/api/v3/mc_designs/docs/ListDesign200Response.md deleted file mode 100644 index 32f31512..00000000 --- a/rest/api/v3/mc_designs/docs/ListDesign200Response.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListDesign200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]DesignOutputSummary**](DesignOutputSummary.md) | |[optional] -**Metadata** | [**Metadata**](Metadata.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_designs/docs/ListPreBuiltDesign.md b/rest/api/v3/mc_designs/docs/ListPreBuiltDesign.md deleted file mode 100644 index 0b635daa..00000000 --- a/rest/api/v3/mc_designs/docs/ListPreBuiltDesign.md +++ /dev/null @@ -1,50 +0,0 @@ -# ListPreBuiltDesign - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListPreBuiltDesign**](ListPreBuiltDesign.md#ListPreBuiltDesign) | **Get** /v3/designs/pre-builts | List SendGrid Pre-built Designs - - - -## ListPreBuiltDesign - -> ListDesign200Response ListPreBuiltDesign(ctx, optional) - -List SendGrid Pre-built Designs - -**This endpoint allows you to retrieve a list of pre-built designs provided by Twilio SendGrid**. Unlike the `/designs` endpoint where *your* designs are stored, a GET request made to `designs/pre-builts` will retrieve a list of the pre-built Twilio SendGrid designs. This endpoint will not return the designs stored in your Design Library. By default, you will receive 100 results per request; however, you can modify the number of results returned by passing an integer to the `page_size` query parameter. This endpoint is useful for retrieving the IDs of Twilio SendGrid designs that you want to duplicate and modify. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListPreBuiltDesignParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**PageSize** | **int32** | number of results to return -**PageToken** | **string** | token corresponding to a specific page of results, as provided by metadata -**Summary** | **bool** | set to false to return all fields - -### Return type - -[**ListDesign200Response**](ListDesign200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_designs/docs/Metadata.md b/rest/api/v3/mc_designs/docs/Metadata.md deleted file mode 100644 index 6121300c..00000000 --- a/rest/api/v3/mc_designs/docs/Metadata.md +++ /dev/null @@ -1,14 +0,0 @@ -# Metadata - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Prev** | **string** | |[optional] -**Self** | **string** | |[optional] -**Next** | **string** | |[optional] -**Count** | **int32** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_designs/docs/UpdateDesign.md b/rest/api/v3/mc_designs/docs/UpdateDesign.md deleted file mode 100644 index e7385735..00000000 --- a/rest/api/v3/mc_designs/docs/UpdateDesign.md +++ /dev/null @@ -1,52 +0,0 @@ -# UpdateDesign - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateDesign**](UpdateDesign.md#UpdateDesign) | **Patch** /v3/designs/{Id} | Update Design - - - -## UpdateDesign - -> DesignOutput UpdateDesign(ctx, Idoptional) - -Update Design - -**This endpoint allows you to edit a design**. The Design API supports PATCH requests, which allow you to make partial updates to a single design. Passing data to a specific field will update only the data stored in that field; all other fields will be unaltered. For example, updating a design's name requires that you make a PATCH request to this endpoint with data specified for the `name` field only. ``` { \"name\": \"\" } ``` - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of the Design you want to duplicate. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateDesignParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**UpdateDesignRequest** | [**UpdateDesignRequest**](UpdateDesignRequest.md) | - -### Return type - -[**DesignOutput**](DesignOutput.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_designs/docs/UpdateDesignRequest.md b/rest/api/v3/mc_designs/docs/UpdateDesignRequest.md deleted file mode 100644 index 2187c51b..00000000 --- a/rest/api/v3/mc_designs/docs/UpdateDesignRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# UpdateDesignRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Name of the Design. |[optional] [default to "My Design"] -**HtmlContent** | **string** | The HTML content of the Design. |[optional] -**PlainContent** | **string** | Plain text content of the Design. |[optional] [default to ""] -**GeneratePlainContent** | **bool** | If true, plain_content is always generated from html_content. If false, plain_content is not altered. |[optional] [default to true] -**Subject** | **string** | Subject of the Design. |[optional] -**Categories** | **[]string** | The list of categories applied to the design |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_designs/model_api_error.go b/rest/api/v3/mc_designs/model_api_error.go deleted file mode 100644 index 9dbc10bb..00000000 --- a/rest/api/v3/mc_designs/model_api_error.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ApiError struct for ApiError -type ApiError struct { - Message string `json:"message"` - Field string `json:"field"` - ErrorId string `json:"error_id"` -} diff --git a/rest/api/v3/mc_designs/model_api_errors.go b/rest/api/v3/mc_designs/model_api_errors.go deleted file mode 100644 index eedccc2a..00000000 --- a/rest/api/v3/mc_designs/model_api_errors.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ApiErrors struct for ApiErrors -type ApiErrors struct { - Errors *[]ApiError `json:"errors,omitempty"` -} diff --git a/rest/api/v3/mc_designs/model_design_common_properties.go b/rest/api/v3/mc_designs/model_design_common_properties.go deleted file mode 100644 index fc498689..00000000 --- a/rest/api/v3/mc_designs/model_design_common_properties.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DesignCommonProperties struct for DesignCommonProperties -type DesignCommonProperties struct { - // The name of the new design. - Name *string `json:"name,omitempty"` - // The editor used in the UI. - Editor *Editor `json:"editor,omitempty"` - // If true, plain_content is always generated from html_content. If false, plain_content is not altered. - GeneratePlainContent *bool `json:"generate_plain_content,omitempty"` - // Subject of the Design. - Subject *string `json:"subject,omitempty"` - // The list of categories applied to the design - Categories *[]string `json:"categories,omitempty"` -} diff --git a/rest/api/v3/mc_designs/model_design_duplicate_input.go b/rest/api/v3/mc_designs/model_design_duplicate_input.go deleted file mode 100644 index 19eac8f3..00000000 --- a/rest/api/v3/mc_designs/model_design_duplicate_input.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DesignDuplicateInput struct for DesignDuplicateInput -type DesignDuplicateInput struct { - // The name of the new design. - Name *string `json:"name,omitempty"` - // The editor used in the UI. - Editor *Editor `json:"editor,omitempty"` -} diff --git a/rest/api/v3/mc_designs/model_design_input.go b/rest/api/v3/mc_designs/model_design_input.go deleted file mode 100644 index a64b5bf3..00000000 --- a/rest/api/v3/mc_designs/model_design_input.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DesignInput struct for DesignInput -type DesignInput struct { - // The name of the new design. - Name *string `json:"name,omitempty"` - // The editor used in the UI. - Editor *Editor `json:"editor,omitempty"` - // The HTML content of the Design. - HtmlContent string `json:"html_content"` - // Plain text content of the Design. - PlainContent *string `json:"plain_content,omitempty"` -} diff --git a/rest/api/v3/mc_designs/model_design_output.go b/rest/api/v3/mc_designs/model_design_output.go deleted file mode 100644 index 3cb19435..00000000 --- a/rest/api/v3/mc_designs/model_design_output.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DesignOutput struct for DesignOutput -type DesignOutput struct { - // The name of the new design. - Name *string `json:"name,omitempty"` - // The editor used in the UI. - Editor *Editor `json:"editor,omitempty"` - // The HTML content of the Design. - HtmlContent string `json:"html_content"` - // Plain text content of the Design. - PlainContent *string `json:"plain_content,omitempty"` -} diff --git a/rest/api/v3/mc_designs/model_design_output_summary.go b/rest/api/v3/mc_designs/model_design_output_summary.go deleted file mode 100644 index 00b619d3..00000000 --- a/rest/api/v3/mc_designs/model_design_output_summary.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DesignOutputSummary struct for DesignOutputSummary -type DesignOutputSummary struct { - // ID of the Design. - Id *string `json:"id,omitempty"` - // Datetime that Design was last updated. - UpdatedAt *string `json:"updated_at,omitempty"` - // Datetime that Design was created. - CreatedAt *string `json:"created_at,omitempty"` - // A Thumbnail preview of the template's html content. - ThumbnailUrl *string `json:"thumbnail_url,omitempty"` - // The name of the new design. - Name *string `json:"name,omitempty"` - // The editor used in the UI. - Editor *Editor `json:"editor,omitempty"` -} diff --git a/rest/api/v3/mc_designs/model_editor.go b/rest/api/v3/mc_designs/model_editor.go deleted file mode 100644 index b5fba7d6..00000000 --- a/rest/api/v3/mc_designs/model_editor.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Editor the model 'Editor' -type Editor string - -// List of Editor -const ( - EDITOR_CODE Editor = "code" - EDITOR_DESIGN Editor = "design" -) diff --git a/rest/api/v3/mc_designs/model_list_design_200_response.go b/rest/api/v3/mc_designs/model_list_design_200_response.go deleted file mode 100644 index e2c23197..00000000 --- a/rest/api/v3/mc_designs/model_list_design_200_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListDesign200Response struct for ListDesign200Response -type ListDesign200Response struct { - Result *[]DesignOutputSummary `json:"result,omitempty"` - Metadata *Metadata `json:"_metadata,omitempty"` -} diff --git a/rest/api/v3/mc_designs/model_metadata.go b/rest/api/v3/mc_designs/model_metadata.go deleted file mode 100644 index 3d1281ea..00000000 --- a/rest/api/v3/mc_designs/model_metadata.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Metadata struct for Metadata -type Metadata struct { - Prev *string `json:"prev,omitempty"` - Self *string `json:"self,omitempty"` - Next *string `json:"next,omitempty"` - Count *int32 `json:"count,omitempty"` -} diff --git a/rest/api/v3/mc_designs/model_update_design_request.go b/rest/api/v3/mc_designs/model_update_design_request.go deleted file mode 100644 index b25a0cbe..00000000 --- a/rest/api/v3/mc_designs/model_update_design_request.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Designs -* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateDesignRequest struct for UpdateDesignRequest -type UpdateDesignRequest struct { - // Name of the Design. - Name *string `json:"name,omitempty"` - // The HTML content of the Design. - HtmlContent *string `json:"html_content,omitempty"` - // Plain text content of the Design. - PlainContent *string `json:"plain_content,omitempty"` - // If true, plain_content is always generated from html_content. If false, plain_content is not altered. - GeneratePlainContent *bool `json:"generate_plain_content,omitempty"` - // Subject of the Design. - Subject *string `json:"subject,omitempty"` - // The list of categories applied to the design - Categories *[]string `json:"categories,omitempty"` -} diff --git a/rest/api/v3/mc_lists/.openapi-generator b/rest/api/v3/mc_lists/.openapi-generator deleted file mode 100644 index 2a2e02f1..00000000 --- a/rest/api/v3/mc_lists/.openapi-generator +++ /dev/null @@ -1,46 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_create_marketing_list.go -api_delete_contact.go -api_delete_marketing_list.go -api_get_marketing_list.go -api_list_contact_count.go -api_list_marketing_list.go -api_service.go -api_update_marketing_list.go -docs/ContactDetails.md -docs/CreateMarketingList.md -docs/CreateMarketingList400Response.md -docs/CreateMarketingListRequest.md -docs/DeleteContact.md -docs/DeleteContact202Response.md -docs/DeleteMarketingList.md -docs/DeleteMarketingList200Response.md -docs/DeleteMarketingList404Response.md -docs/Error.md -docs/GetMarketingList.md -docs/GetMarketingList200Response.md -docs/List.md -docs/ListContactCount.md -docs/ListContactCount200Response.md -docs/ListMarketingList.md -docs/ListMarketingList200Response.md -docs/Metadata.md -docs/SelfMetadata.md -docs/UpdateMarketingList.md -docs/UpdateMarketingListRequest.md -model_contact_details.go -model_create_marketing_list_400_response.go -model_create_marketing_list_request.go -model_delete_contact_202_response.go -model_delete_marketing_list_200_response.go -model_delete_marketing_list_404_response.go -model_error.go -model_get_marketing_list_200_response.go -model_list.go -model_list_contact_count_200_response.go -model_list_marketing_list_200_response.go -model_metadata.go -model_self_metadata.go -model_update_marketing_list_request.go diff --git a/rest/api/v3/mc_lists/.openapi-generator-ignore b/rest/api/v3/mc_lists/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/mc_lists/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/mc_lists/README.md b/rest/api/v3/mc_lists/README.md deleted file mode 100644 index 5a04f200..00000000 --- a/rest/api/v3/mc_lists/README.md +++ /dev/null @@ -1,81 +0,0 @@ -# Go API client for - -The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). - -You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:38.062168+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*CreateMarketingList* | [**CreateMarketingList**](docs/CreateMarketingList.md#createmarketinglist) | **Post** /v3/marketing/lists | Create List -*DeleteContact* | [**DeleteContact**](docs/DeleteContact.md#deletecontact) | **Delete** /v3/marketing/lists/{Id}/contacts | Remove Contacts from a List -*DeleteMarketingList* | [**DeleteMarketingList**](docs/DeleteMarketingList.md#deletemarketinglist) | **Delete** /v3/marketing/lists/{Id} | Delete a list -*GetMarketingList* | [**GetMarketingList**](docs/GetMarketingList.md#getmarketinglist) | **Get** /v3/marketing/lists/{Id} | Get a List by ID -*ListContactCount* | [**ListContactCount**](docs/ListContactCount.md#listcontactcount) | **Get** /v3/marketing/lists/{Id}/contacts/count | Get List Contact Count -*ListMarketingList* | [**ListMarketingList**](docs/ListMarketingList.md#listmarketinglist) | **Get** /v3/marketing/lists | Get All Lists -*UpdateMarketingList* | [**UpdateMarketingList**](docs/UpdateMarketingList.md#updatemarketinglist) | **Patch** /v3/marketing/lists/{Id} | Update List - - -## Documentation For Models - - - [ContactDetails](ContactDetails.md) - - [CreateMarketingList400Response](CreateMarketingList400Response.md) - - [CreateMarketingListRequest](CreateMarketingListRequest.md) - - [DeleteContact202Response](DeleteContact202Response.md) - - [DeleteMarketingList200Response](DeleteMarketingList200Response.md) - - [DeleteMarketingList404Response](DeleteMarketingList404Response.md) - - [Error](Error.md) - - [GetMarketingList200Response](GetMarketingList200Response.md) - - [List](List.md) - - [ListContactCount200Response](ListContactCount200Response.md) - - [ListMarketingList200Response](ListMarketingList200Response.md) - - [Metadata](Metadata.md) - - [SelfMetadata](SelfMetadata.md) - - [UpdateMarketingListRequest](UpdateMarketingListRequest.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/mc_lists/api_create_marketing_list.go b/rest/api/v3/mc_lists/api_create_marketing_list.go deleted file mode 100644 index eab90b77..00000000 --- a/rest/api/v3/mc_lists/api_create_marketing_list.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Lists API -* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type CreateMarketingListParam struct { - // - CreateMarketingListRequest *CreateMarketingListRequest `json:"CreateMarketingListRequest,omitempty"` -} - -func (params *CreateMarketingListParam) SetCreateMarketingListRequest(CreateMarketingListRequest CreateMarketingListRequest) *CreateMarketingListParam { - params.CreateMarketingListRequest = &CreateMarketingListRequest - return params -} - -// **This endpoint creates a new contacts list.** Once you create a list, you can use the UI to [trigger an automation](https://sendgrid.com/docs/ui/sending-email/getting-started-with-automation/#create-an-automation) every time you add a new contact to the list. A link to the newly created object is in `_metadata`. -func (c *ApiService) CreateMarketingList(params *CreateMarketingListParam) (interface{}, error) { - path := "/v3/marketing/lists" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.CreateMarketingListRequest != nil { - b, err := json.Marshal(*params.CreateMarketingListRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &List{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &CreateMarketingList400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_lists/api_delete_contact.go b/rest/api/v3/mc_lists/api_delete_contact.go deleted file mode 100644 index ea5bf496..00000000 --- a/rest/api/v3/mc_lists/api_delete_contact.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Lists API -* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteContactParam struct { - // Comma separated list of contact IDs that you want to remove from the specified contacts list. - ContactIds *string `json:"contact_ids"` - // The ID of the list on which you want to perform the operation. - Id *string `json:"id"` -} - -func (params *DeleteContactParam) SetContactIds(ContactIds string) *DeleteContactParam { - params.ContactIds = &ContactIds - return params -} -func (params *DeleteContactParam) SetId(Id string) *DeleteContactParam { - params.Id = &Id - return params -} - -// **This endpoint allows you to remove contacts from a given list.** The contacts will not be deleted. Only their list membership will be changed. -func (c *ApiService) DeleteContact(params *DeleteContactParam) (interface{}, error) { - path := "/v3/marketing/lists/{Id}/contacts" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.ContactIds != nil { - data.Set("contact_ids", *params.ContactIds) - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 202 { - ps := &DeleteContact202Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &Error{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_lists/api_delete_marketing_list.go b/rest/api/v3/mc_lists/api_delete_marketing_list.go deleted file mode 100644 index e879aff0..00000000 --- a/rest/api/v3/mc_lists/api_delete_marketing_list.go +++ /dev/null @@ -1,89 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Lists API -* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type DeleteMarketingListParam struct { - // The ID of the list on which you want to perform the operation. - Id *string `json:"id"` - // Flag indicates that all contacts on the list are also to be deleted. - DeleteContacts *bool `json:"delete_contacts,omitempty"` -} - -func (params *DeleteMarketingListParam) SetId(Id string) *DeleteMarketingListParam { - params.Id = &Id - return params -} -func (params *DeleteMarketingListParam) SetDeleteContacts(DeleteContacts bool) *DeleteMarketingListParam { - params.DeleteContacts = &DeleteContacts - return params -} - -// **This endpoint allows you to deletes a specific list.** Optionally, you can also delete contacts associated to the list. The query parameter, `delete_contacts=true`, will delete the list and start an asynchronous job to delete associated contacts. -func (c *ApiService) DeleteMarketingList(params *DeleteMarketingListParam) (interface{}, error) { - path := "/v3/marketing/lists/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.DeleteContacts != nil { - data.Set("delete_contacts", fmt.Sprint(*params.DeleteContacts)) - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &DeleteMarketingList200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 204 { - s := "" - ps := &s - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &DeleteMarketingList404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_lists/api_get_marketing_list.go b/rest/api/v3/mc_lists/api_get_marketing_list.go deleted file mode 100644 index 48d2e726..00000000 --- a/rest/api/v3/mc_lists/api_get_marketing_list.go +++ /dev/null @@ -1,80 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Lists API -* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type GetMarketingListParam struct { - // The ID of the list on which you want to perform the operation. - Id *string `json:"id"` - // Setting this parameter to the true will cause the contact_sample to be returned - ContactSample *bool `json:"contact_sample,omitempty"` -} - -func (params *GetMarketingListParam) SetId(Id string) *GetMarketingListParam { - params.Id = &Id - return params -} -func (params *GetMarketingListParam) SetContactSample(ContactSample bool) *GetMarketingListParam { - params.ContactSample = &ContactSample - return params -} - -// **This endpoint returns data about a specific list.** Setting the optional parameter `contact_sample=true` returns the `contact_sample` in the response body. Up to 50 of the most recent contacts uploaded or attached to a list will be returned. The full contact count is also returned. -func (c *ApiService) GetMarketingList(params *GetMarketingListParam) (interface{}, error) { - path := "/v3/marketing/lists/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.ContactSample != nil { - data.Set("contact_sample", fmt.Sprint(*params.ContactSample)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &GetMarketingList200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &[]Error{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_lists/api_list_contact_count.go b/rest/api/v3/mc_lists/api_list_contact_count.go deleted file mode 100644 index fed144f5..00000000 --- a/rest/api/v3/mc_lists/api_list_contact_count.go +++ /dev/null @@ -1,69 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Lists API -* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type ListContactCountParam struct { - // - Id *string `json:"id"` -} - -func (params *ListContactCountParam) SetId(Id string) *ListContactCountParam { - params.Id = &Id - return params -} - -// **This endpoint returns the number of contacts on a specific list.** -func (c *ApiService) ListContactCount(params *ListContactCountParam) (interface{}, error) { - path := "/v3/marketing/lists/{Id}/contacts/count" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListContactCount200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_lists/api_list_marketing_list.go b/rest/api/v3/mc_lists/api_list_marketing_list.go deleted file mode 100644 index d572910b..00000000 --- a/rest/api/v3/mc_lists/api_list_marketing_list.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Lists API -* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListMarketingListParam struct { - // Maximum number of elements to return. Defaults to 100, returns 1000 max - PageSize *float32 `json:"page_size,omitempty"` - // - PageToken *string `json:"page_token,omitempty"` -} - -func (params *ListMarketingListParam) SetPageSize(PageSize float32) *ListMarketingListParam { - params.PageSize = &PageSize - return params -} -func (params *ListMarketingListParam) SetPageToken(PageToken string) *ListMarketingListParam { - params.PageToken = &PageToken - return params -} - -// **This endpoint returns an array of all of your contact lists.** -func (c *ApiService) ListMarketingList(params *ListMarketingListParam) (interface{}, error) { - path := "/v3/marketing/lists" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.PageSize != nil { - data.Set("page_size", fmt.Sprint(*params.PageSize)) - } - if params != nil && params.PageToken != nil { - data.Set("page_token", *params.PageToken) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListMarketingList200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_lists/api_service.go b/rest/api/v3/mc_lists/api_service.go deleted file mode 100644 index f7079e91..00000000 --- a/rest/api/v3/mc_lists/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Lists API -* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/mc_lists/api_update_marketing_list.go b/rest/api/v3/mc_lists/api_update_marketing_list.go deleted file mode 100644 index f28f345a..00000000 --- a/rest/api/v3/mc_lists/api_update_marketing_list.go +++ /dev/null @@ -1,92 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Lists API -* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type UpdateMarketingListParam struct { - // The ID of the list on which you want to perform the operation. - Id *string `json:"id"` - // - UpdateMarketingListRequest *UpdateMarketingListRequest `json:"UpdateMarketingListRequest,omitempty"` -} - -func (params *UpdateMarketingListParam) SetId(Id string) *UpdateMarketingListParam { - params.Id = &Id - return params -} -func (params *UpdateMarketingListParam) SetUpdateMarketingListRequest(UpdateMarketingListRequest UpdateMarketingListRequest) *UpdateMarketingListParam { - params.UpdateMarketingListRequest = &UpdateMarketingListRequest - return params -} - -// **This endpoint updates the name of a list.** -func (c *ApiService) UpdateMarketingList(params *UpdateMarketingListParam) (interface{}, error) { - path := "/v3/marketing/lists/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateMarketingListRequest != nil { - b, err := json.Marshal(*params.UpdateMarketingListRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &List{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &CreateMarketingList400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_lists/docs/ContactDetails.md b/rest/api/v3/mc_lists/docs/ContactDetails.md deleted file mode 100644 index 0e6d5277..00000000 --- a/rest/api/v3/mc_lists/docs/ContactDetails.md +++ /dev/null @@ -1,35 +0,0 @@ -# ContactDetails - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | | -**FirstName** | **string** | |[optional] -**LastName** | **string** | |[optional] -**UniqueName** | **string** | |[optional] -**Email** | **string** | |[optional] -**PhoneNumberId** | **string** | |[optional] -**ExternalId** | **string** | |[optional] -**AnonymousId** | **string** | |[optional] -**AlternateEmails** | **[]string** | |[optional] -**AddressLine1** | **string** | |[optional] -**AddressLine2** | **string** | |[optional] -**City** | **string** | |[optional] -**StateProvinceRegion** | **string** | |[optional] -**Country** | **string** | |[optional] -**PostalCode** | **string** | |[optional] -**PhoneNumber** | **string** | |[optional] -**Whatsapp** | **string** | |[optional] -**Line** | **string** | |[optional] -**Facebook** | **string** | |[optional] -**ListIds** | **[]string** | | -**SegmentIds** | **[]string** | |[optional] -**CustomFields** | **map[string]interface{}** | |[optional] -**CreatedAt** | [**time.Time**](time.Time.md) | | -**UpdatedAt** | [**time.Time**](time.Time.md) | | -**Metadata** | [**SelfMetadata**](SelfMetadata.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_lists/docs/CreateMarketingList.md b/rest/api/v3/mc_lists/docs/CreateMarketingList.md deleted file mode 100644 index e842327c..00000000 --- a/rest/api/v3/mc_lists/docs/CreateMarketingList.md +++ /dev/null @@ -1,48 +0,0 @@ -# CreateMarketingList - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateMarketingList**](CreateMarketingList.md#CreateMarketingList) | **Post** /v3/marketing/lists | Create List - - - -## CreateMarketingList - -> List CreateMarketingList(ctx, optional) - -Create List - -**This endpoint creates a new contacts list.** Once you create a list, you can use the UI to [trigger an automation](https://sendgrid.com/docs/ui/sending-email/getting-started-with-automation/#create-an-automation) every time you add a new contact to the list. A link to the newly created object is in `_metadata`. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateMarketingListParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**CreateMarketingListRequest** | [**CreateMarketingListRequest**](CreateMarketingListRequest.md) | - -### Return type - -[**List**](List.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_lists/docs/CreateMarketingList400Response.md b/rest/api/v3/mc_lists/docs/CreateMarketingList400Response.md deleted file mode 100644 index 2e203967..00000000 --- a/rest/api/v3/mc_lists/docs/CreateMarketingList400Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateMarketingList400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]Error**](Error.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_lists/docs/CreateMarketingListRequest.md b/rest/api/v3/mc_lists/docs/CreateMarketingListRequest.md deleted file mode 100644 index 6774aa99..00000000 --- a/rest/api/v3/mc_lists/docs/CreateMarketingListRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateMarketingListRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Your name for your list | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_lists/docs/DeleteContact.md b/rest/api/v3/mc_lists/docs/DeleteContact.md deleted file mode 100644 index 63c22e6c..00000000 --- a/rest/api/v3/mc_lists/docs/DeleteContact.md +++ /dev/null @@ -1,51 +0,0 @@ -# DeleteContact - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteContact**](DeleteContact.md#DeleteContact) | **Delete** /v3/marketing/lists/{Id}/contacts | Remove Contacts from a List - - - -## DeleteContact - -> DeleteContact202Response DeleteContact(ctx, ContactIdsId) - -Remove Contacts from a List - -**This endpoint allows you to remove contacts from a given list.** The contacts will not be deleted. Only their list membership will be changed. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of the list on which you want to perform the operation. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteContactParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**DeleteContact202Response**](DeleteContact202Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_lists/docs/DeleteContact202Response.md b/rest/api/v3/mc_lists/docs/DeleteContact202Response.md deleted file mode 100644 index 5d30a105..00000000 --- a/rest/api/v3/mc_lists/docs/DeleteContact202Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeleteContact202Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**JobId** | **string** | job_id of the async job |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_lists/docs/DeleteMarketingList.md b/rest/api/v3/mc_lists/docs/DeleteMarketingList.md deleted file mode 100644 index cc154218..00000000 --- a/rest/api/v3/mc_lists/docs/DeleteMarketingList.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeleteMarketingList - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteMarketingList**](DeleteMarketingList.md#DeleteMarketingList) | **Delete** /v3/marketing/lists/{Id} | Delete a list - - - -## DeleteMarketingList - -> DeleteMarketingList200Response DeleteMarketingList(ctx, Idoptional) - -Delete a list - -**This endpoint allows you to deletes a specific list.** Optionally, you can also delete contacts associated to the list. The query parameter, `delete_contacts=true`, will delete the list and start an asynchronous job to delete associated contacts. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of the list on which you want to perform the operation. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteMarketingListParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**DeleteContacts** | **bool** | Flag indicates that all contacts on the list are also to be deleted. - -### Return type - -[**DeleteMarketingList200Response**](DeleteMarketingList200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_lists/docs/DeleteMarketingList200Response.md b/rest/api/v3/mc_lists/docs/DeleteMarketingList200Response.md deleted file mode 100644 index 522ea6c4..00000000 --- a/rest/api/v3/mc_lists/docs/DeleteMarketingList200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeleteMarketingList200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**JobId** | **string** | job_id of the async job |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_lists/docs/DeleteMarketingList404Response.md b/rest/api/v3/mc_lists/docs/DeleteMarketingList404Response.md deleted file mode 100644 index a4ca0ac5..00000000 --- a/rest/api/v3/mc_lists/docs/DeleteMarketingList404Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeleteMarketingList404Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | **[]map[string]interface{}** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_lists/docs/Error.md b/rest/api/v3/mc_lists/docs/Error.md deleted file mode 100644 index e8d3a6f9..00000000 --- a/rest/api/v3/mc_lists/docs/Error.md +++ /dev/null @@ -1,14 +0,0 @@ -# Error - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | | -**Field** | **string** | |[optional] -**ErrorId** | **string** | |[optional] -**Parameter** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_lists/docs/GetMarketingList.md b/rest/api/v3/mc_lists/docs/GetMarketingList.md deleted file mode 100644 index 31285c58..00000000 --- a/rest/api/v3/mc_lists/docs/GetMarketingList.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetMarketingList - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetMarketingList**](GetMarketingList.md#GetMarketingList) | **Get** /v3/marketing/lists/{Id} | Get a List by ID - - - -## GetMarketingList - -> GetMarketingList200Response GetMarketingList(ctx, Idoptional) - -Get a List by ID - -**This endpoint returns data about a specific list.** Setting the optional parameter `contact_sample=true` returns the `contact_sample` in the response body. Up to 50 of the most recent contacts uploaded or attached to a list will be returned. The full contact count is also returned. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of the list on which you want to perform the operation. - -### Other Parameters - -Other parameters are passed through a pointer to a GetMarketingListParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**ContactSample** | **bool** | Setting this parameter to the true will cause the contact_sample to be returned - -### Return type - -[**GetMarketingList200Response**](GetMarketingList200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_lists/docs/GetMarketingList200Response.md b/rest/api/v3/mc_lists/docs/GetMarketingList200Response.md deleted file mode 100644 index c3f85dc0..00000000 --- a/rest/api/v3/mc_lists/docs/GetMarketingList200Response.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetMarketingList200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | The generated ID for your list. |[optional] -**Name** | **string** | The name you gave your list. |[optional] -**ContactCount** | **int32** | The number of contacts currently stored on the list. |[optional] -**Metadata** | [**SelfMetadata**](SelfMetadata.md) | |[optional] -**ContactSample** | [**ContactDetails**](ContactDetails.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_lists/docs/List.md b/rest/api/v3/mc_lists/docs/List.md deleted file mode 100644 index 7941f244..00000000 --- a/rest/api/v3/mc_lists/docs/List.md +++ /dev/null @@ -1,14 +0,0 @@ -# List - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | The generated ID for your list. |[optional] -**Name** | **string** | The name you gave your list. |[optional] -**ContactCount** | **int32** | The number of contacts currently stored on the list. |[optional] -**Metadata** | [**SelfMetadata**](SelfMetadata.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_lists/docs/ListContactCount.md b/rest/api/v3/mc_lists/docs/ListContactCount.md deleted file mode 100644 index 2e65fc61..00000000 --- a/rest/api/v3/mc_lists/docs/ListContactCount.md +++ /dev/null @@ -1,51 +0,0 @@ -# ListContactCount - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListContactCount**](ListContactCount.md#ListContactCount) | **Get** /v3/marketing/lists/{Id}/contacts/count | Get List Contact Count - - - -## ListContactCount - -> ListContactCount200Response ListContactCount(ctx, Id) - -Get List Contact Count - -**This endpoint returns the number of contacts on a specific list.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a ListContactCountParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**ListContactCount200Response**](ListContactCount200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_lists/docs/ListContactCount200Response.md b/rest/api/v3/mc_lists/docs/ListContactCount200Response.md deleted file mode 100644 index aebf7d3e..00000000 --- a/rest/api/v3/mc_lists/docs/ListContactCount200Response.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListContactCount200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ContactCount** | **int32** | |[optional] -**BillableCount** | **int32** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_lists/docs/ListMarketingList.md b/rest/api/v3/mc_lists/docs/ListMarketingList.md deleted file mode 100644 index 87a1ce7b..00000000 --- a/rest/api/v3/mc_lists/docs/ListMarketingList.md +++ /dev/null @@ -1,49 +0,0 @@ -# ListMarketingList - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListMarketingList**](ListMarketingList.md#ListMarketingList) | **Get** /v3/marketing/lists | Get All Lists - - - -## ListMarketingList - -> ListMarketingList200Response ListMarketingList(ctx, optional) - -Get All Lists - -**This endpoint returns an array of all of your contact lists.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListMarketingListParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**PageSize** | **float32** | Maximum number of elements to return. Defaults to 100, returns 1000 max -**PageToken** | **string** | - -### Return type - -[**ListMarketingList200Response**](ListMarketingList200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_lists/docs/ListMarketingList200Response.md b/rest/api/v3/mc_lists/docs/ListMarketingList200Response.md deleted file mode 100644 index cfe95bb0..00000000 --- a/rest/api/v3/mc_lists/docs/ListMarketingList200Response.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListMarketingList200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]List**](List.md) | |[optional] -**Metadata** | [**Metadata**](Metadata.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_lists/docs/Metadata.md b/rest/api/v3/mc_lists/docs/Metadata.md deleted file mode 100644 index 79ca153c..00000000 --- a/rest/api/v3/mc_lists/docs/Metadata.md +++ /dev/null @@ -1,14 +0,0 @@ -# Metadata - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Prev** | **string** | The URL of the previous page of results. If this field isn't present, you're at the start of the list. |[optional] -**Self** | **string** | The URL of the current page of results. |[optional] -**Next** | **string** | The URL of the next page of results. If this field isn't present, you're at the end of the list. |[optional] -**Count** | **float32** | The number of items in the entire list, i.e., across all pages. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_lists/docs/SelfMetadata.md b/rest/api/v3/mc_lists/docs/SelfMetadata.md deleted file mode 100644 index f5efa07a..00000000 --- a/rest/api/v3/mc_lists/docs/SelfMetadata.md +++ /dev/null @@ -1,11 +0,0 @@ -# SelfMetadata - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Self** | **string** | A link to this object. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_lists/docs/UpdateMarketingList.md b/rest/api/v3/mc_lists/docs/UpdateMarketingList.md deleted file mode 100644 index ed8e57ef..00000000 --- a/rest/api/v3/mc_lists/docs/UpdateMarketingList.md +++ /dev/null @@ -1,52 +0,0 @@ -# UpdateMarketingList - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateMarketingList**](UpdateMarketingList.md#UpdateMarketingList) | **Patch** /v3/marketing/lists/{Id} | Update List - - - -## UpdateMarketingList - -> List UpdateMarketingList(ctx, Idoptional) - -Update List - -**This endpoint updates the name of a list.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of the list on which you want to perform the operation. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateMarketingListParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**UpdateMarketingListRequest** | [**UpdateMarketingListRequest**](UpdateMarketingListRequest.md) | - -### Return type - -[**List**](List.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_lists/docs/UpdateMarketingListRequest.md b/rest/api/v3/mc_lists/docs/UpdateMarketingListRequest.md deleted file mode 100644 index 2d0bda0c..00000000 --- a/rest/api/v3/mc_lists/docs/UpdateMarketingListRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateMarketingListRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Your name for your list. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_lists/model_contact_details.go b/rest/api/v3/mc_lists/model_contact_details.go deleted file mode 100644 index 960045e4..00000000 --- a/rest/api/v3/mc_lists/model_contact_details.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Lists API -* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "time" -) - -// ContactDetails struct for ContactDetails -type ContactDetails struct { - Id string `json:"id"` - FirstName *string `json:"first_name,omitempty"` - LastName *string `json:"last_name,omitempty"` - UniqueName *string `json:"unique_name,omitempty"` - Email *string `json:"email,omitempty"` - PhoneNumberId *string `json:"phone_number_id,omitempty"` - ExternalId *string `json:"external_id,omitempty"` - AnonymousId *string `json:"anonymous_id,omitempty"` - AlternateEmails *[]string `json:"alternate_emails,omitempty"` - AddressLine1 *string `json:"address_line_1,omitempty"` - AddressLine2 *string `json:"address_line_2,omitempty"` - City *string `json:"city,omitempty"` - StateProvinceRegion *string `json:"state_province_region,omitempty"` - Country *string `json:"country,omitempty"` - PostalCode *string `json:"postal_code,omitempty"` - PhoneNumber *string `json:"phone_number,omitempty"` - Whatsapp *string `json:"whatsapp,omitempty"` - Line *string `json:"line,omitempty"` - Facebook *string `json:"facebook,omitempty"` - ListIds []string `json:"list_ids"` - SegmentIds *[]string `json:"segment_ids,omitempty"` - CustomFields *map[string]interface{} `json:"custom_fields,omitempty"` - CreatedAt time.Time `json:"created_at"` - UpdatedAt time.Time `json:"updated_at"` - Metadata *SelfMetadata `json:"_metadata,omitempty"` -} diff --git a/rest/api/v3/mc_lists/model_create_marketing_list_400_response.go b/rest/api/v3/mc_lists/model_create_marketing_list_400_response.go deleted file mode 100644 index f202e4ce..00000000 --- a/rest/api/v3/mc_lists/model_create_marketing_list_400_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Lists API -* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateMarketingList400Response struct for CreateMarketingList400Response -type CreateMarketingList400Response struct { - Errors *[]Error `json:"errors,omitempty"` -} diff --git a/rest/api/v3/mc_lists/model_create_marketing_list_request.go b/rest/api/v3/mc_lists/model_create_marketing_list_request.go deleted file mode 100644 index 45f22ed6..00000000 --- a/rest/api/v3/mc_lists/model_create_marketing_list_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Lists API -* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateMarketingListRequest struct for CreateMarketingListRequest -type CreateMarketingListRequest struct { - // Your name for your list - Name string `json:"name"` -} diff --git a/rest/api/v3/mc_lists/model_delete_contact_202_response.go b/rest/api/v3/mc_lists/model_delete_contact_202_response.go deleted file mode 100644 index 079254f3..00000000 --- a/rest/api/v3/mc_lists/model_delete_contact_202_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Lists API -* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DeleteContact202Response The removal is accepted and processing. -type DeleteContact202Response struct { - // job_id of the async job - JobId *string `json:"job_id,omitempty"` -} diff --git a/rest/api/v3/mc_lists/model_delete_marketing_list_200_response.go b/rest/api/v3/mc_lists/model_delete_marketing_list_200_response.go deleted file mode 100644 index 9a1800d8..00000000 --- a/rest/api/v3/mc_lists/model_delete_marketing_list_200_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Lists API -* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DeleteMarketingList200Response The delete has been accepted and is processing. -type DeleteMarketingList200Response struct { - // job_id of the async job - JobId *string `json:"job_id,omitempty"` -} diff --git a/rest/api/v3/mc_lists/model_delete_marketing_list_404_response.go b/rest/api/v3/mc_lists/model_delete_marketing_list_404_response.go deleted file mode 100644 index 14fa0c4c..00000000 --- a/rest/api/v3/mc_lists/model_delete_marketing_list_404_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Lists API -* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DeleteMarketingList404Response struct for DeleteMarketingList404Response -type DeleteMarketingList404Response struct { - Errors []map[string]interface{} `json:"errors"` -} diff --git a/rest/api/v3/mc_lists/model_error.go b/rest/api/v3/mc_lists/model_error.go deleted file mode 100644 index 60b82046..00000000 --- a/rest/api/v3/mc_lists/model_error.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Lists API -* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Error struct for Error -type Error struct { - Message string `json:"message"` - Field *string `json:"field,omitempty"` - ErrorId *string `json:"error_id,omitempty"` - Parameter *string `json:"parameter,omitempty"` -} diff --git a/rest/api/v3/mc_lists/model_get_marketing_list_200_response.go b/rest/api/v3/mc_lists/model_get_marketing_list_200_response.go deleted file mode 100644 index 927ac41b..00000000 --- a/rest/api/v3/mc_lists/model_get_marketing_list_200_response.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Lists API -* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetMarketingList200Response struct for GetMarketingList200Response -type GetMarketingList200Response struct { - // The generated ID for your list. - Id *string `json:"id,omitempty"` - // The name you gave your list. - Name *string `json:"name,omitempty"` - // The number of contacts currently stored on the list. - ContactCount *int32 `json:"contact_count,omitempty"` - Metadata *SelfMetadata `json:"_metadata,omitempty"` - ContactSample *ContactDetails `json:"contact_sample,omitempty"` -} diff --git a/rest/api/v3/mc_lists/model_list.go b/rest/api/v3/mc_lists/model_list.go deleted file mode 100644 index 2e9d382a..00000000 --- a/rest/api/v3/mc_lists/model_list.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Lists API -* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// List struct for List -type List struct { - // The generated ID for your list. - Id *string `json:"id,omitempty"` - // The name you gave your list. - Name *string `json:"name,omitempty"` - // The number of contacts currently stored on the list. - ContactCount *int32 `json:"contact_count,omitempty"` - Metadata *SelfMetadata `json:"_metadata,omitempty"` -} diff --git a/rest/api/v3/mc_lists/model_list_contact_count_200_response.go b/rest/api/v3/mc_lists/model_list_contact_count_200_response.go deleted file mode 100644 index bfb78493..00000000 --- a/rest/api/v3/mc_lists/model_list_contact_count_200_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Lists API -* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListContactCount200Response struct for ListContactCount200Response -type ListContactCount200Response struct { - ContactCount *int32 `json:"contact_count,omitempty"` - BillableCount *int32 `json:"billable_count,omitempty"` -} diff --git a/rest/api/v3/mc_lists/model_list_marketing_list_200_response.go b/rest/api/v3/mc_lists/model_list_marketing_list_200_response.go deleted file mode 100644 index 6b652a9e..00000000 --- a/rest/api/v3/mc_lists/model_list_marketing_list_200_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Lists API -* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListMarketingList200Response struct for ListMarketingList200Response -type ListMarketingList200Response struct { - Result *[]List `json:"result,omitempty"` - Metadata *Metadata `json:"_metadata,omitempty"` -} diff --git a/rest/api/v3/mc_lists/model_metadata.go b/rest/api/v3/mc_lists/model_metadata.go deleted file mode 100644 index f0c64e60..00000000 --- a/rest/api/v3/mc_lists/model_metadata.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Lists API -* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Metadata struct for Metadata -type Metadata struct { - // The URL of the previous page of results. If this field isn't present, you're at the start of the list. - Prev *string `json:"prev,omitempty"` - // The URL of the current page of results. - Self *string `json:"self,omitempty"` - // The URL of the next page of results. If this field isn't present, you're at the end of the list. - Next *string `json:"next,omitempty"` - // The number of items in the entire list, i.e., across all pages. - Count *float32 `json:"count,omitempty"` -} diff --git a/rest/api/v3/mc_lists/model_self_metadata.go b/rest/api/v3/mc_lists/model_self_metadata.go deleted file mode 100644 index 9ae3c90b..00000000 --- a/rest/api/v3/mc_lists/model_self_metadata.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Lists API -* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SelfMetadata struct for SelfMetadata -type SelfMetadata struct { - // A link to this object. - Self *string `json:"self,omitempty"` -} diff --git a/rest/api/v3/mc_lists/model_update_marketing_list_request.go b/rest/api/v3/mc_lists/model_update_marketing_list_request.go deleted file mode 100644 index 773e8ba3..00000000 --- a/rest/api/v3/mc_lists/model_update_marketing_list_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Lists API -* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateMarketingListRequest struct for UpdateMarketingListRequest -type UpdateMarketingListRequest struct { - // Your name for your list. - Name *string `json:"name,omitempty"` -} diff --git a/rest/api/v3/mc_segments/.openapi-generator b/rest/api/v3/mc_segments/.openapi-generator deleted file mode 100644 index f2a5bdb3..00000000 --- a/rest/api/v3/mc_segments/.openapi-generator +++ /dev/null @@ -1,34 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_delete_segment.go -api_get_segment.go -api_list_segment.go -api_service.go -docs/ContactResponse.md -docs/ContactResponseCustomFields.md -docs/DeleteSegment.md -docs/ErrorResponse.md -docs/ErrorResponseErrorsInner.md -docs/FullSegment.md -docs/GetSegment.md -docs/GetSegment404Response.md -docs/GetSegment404ResponseErrorsInner.md -docs/ListSegment.md -docs/ListSegment200Response.md -docs/ListSegment500Response.md -docs/ListSegment500ResponseErrorsInner.md -docs/SegmentSummary.md -docs/SegmentWriteV2.md -model_contact_response.go -model_contact_response_custom_fields.go -model_error_response.go -model_error_response_errors_inner.go -model_full_segment.go -model_get_segment_404_response.go -model_get_segment_404_response_errors_inner.go -model_list_segment_200_response.go -model_list_segment_500_response.go -model_list_segment_500_response_errors_inner.go -model_segment_summary.go -model_segment_write_v2.go diff --git a/rest/api/v3/mc_segments/.openapi-generator-ignore b/rest/api/v3/mc_segments/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/mc_segments/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/mc_segments/README.md b/rest/api/v3/mc_segments/README.md deleted file mode 100644 index acfd2411..00000000 --- a/rest/api/v3/mc_segments/README.md +++ /dev/null @@ -1,75 +0,0 @@ -# Go API client for - -This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). - -To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:38.181591+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DeleteSegment* | [**DeleteSegment**](docs/DeleteSegment.md#deletesegment) | **Delete** /v3/marketing/segments/{SegmentId} | Delete Segment -*GetSegment* | [**GetSegment**](docs/GetSegment.md#getsegment) | **Get** /v3/marketing/segments/{SegmentId} | Get Segment by ID -*ListSegment* | [**ListSegment**](docs/ListSegment.md#listsegment) | **Get** /v3/marketing/segments | Get List of Segments - - -## Documentation For Models - - - [ContactResponse](ContactResponse.md) - - [ContactResponseCustomFields](ContactResponseCustomFields.md) - - [ErrorResponse](ErrorResponse.md) - - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) - - [FullSegment](FullSegment.md) - - [GetSegment404Response](GetSegment404Response.md) - - [GetSegment404ResponseErrorsInner](GetSegment404ResponseErrorsInner.md) - - [ListSegment200Response](ListSegment200Response.md) - - [ListSegment500Response](ListSegment500Response.md) - - [ListSegment500ResponseErrorsInner](ListSegment500ResponseErrorsInner.md) - - [SegmentSummary](SegmentSummary.md) - - [SegmentWriteV2](SegmentWriteV2.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/mc_segments/api_delete_segment.go b/rest/api/v3/mc_segments/api_delete_segment.go deleted file mode 100644 index b911b1d1..00000000 --- a/rest/api/v3/mc_segments/api_delete_segment.go +++ /dev/null @@ -1,101 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteSegmentParam struct { - // - SegmentId *string `json:"segment_id"` -} - -func (params *DeleteSegmentParam) SetSegmentId(SegmentId string) *DeleteSegmentParam { - params.SegmentId = &SegmentId - return params -} - -// **This endpoint allows you to delete a segment by `segment_id`.** Note that deleting a segment does not delete the contacts associated with the segment by default. Contacts associated with a deleted segment will remain in your list of all contacts and any other segments they belong to. -func (c *ApiService) DeleteSegment(params *DeleteSegmentParam) (interface{}, error) { - path := "/v3/marketing/segments/{SegmentId}" - if params != nil && params.SegmentId != nil { - path = strings.Replace(path, "{"+"SegmentId"+"}", *params.SegmentId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 202 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &GetSegment404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ListSegment500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_segments/api_get_segment.go b/rest/api/v3/mc_segments/api_get_segment.go deleted file mode 100644 index f341bca0..00000000 --- a/rest/api/v3/mc_segments/api_get_segment.go +++ /dev/null @@ -1,104 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type GetSegmentParam struct { - // - SegmentId *string `json:"segment_id"` - // Defaults to `false`. Set to `true` to return the parsed SQL AST as a JSON object in the field `query_json` - QueryJson *bool `json:"query_json,omitempty"` -} - -func (params *GetSegmentParam) SetSegmentId(SegmentId string) *GetSegmentParam { - params.SegmentId = &SegmentId - return params -} -func (params *GetSegmentParam) SetQueryJson(QueryJson bool) *GetSegmentParam { - params.QueryJson = &QueryJson - return params -} - -// **This endpoint allows you to retrieve a single segment by ID.** -func (c *ApiService) GetSegment(params *GetSegmentParam) (interface{}, error) { - path := "/v3/marketing/segments/{SegmentId}" - if params != nil && params.SegmentId != nil { - path = strings.Replace(path, "{"+"SegmentId"+"}", *params.SegmentId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.QueryJson != nil { - data.Set("query_json", fmt.Sprint(*params.QueryJson)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &FullSegment{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &GetSegment404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ListSegment500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_segments/api_list_segment.go b/rest/api/v3/mc_segments/api_list_segment.go deleted file mode 100644 index 236fbe92..00000000 --- a/rest/api/v3/mc_segments/api_list_segment.go +++ /dev/null @@ -1,120 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListSegmentParam struct { - // A list of segment IDs to retrieve. When this parameter is included, the `no_parent_list_ids` and `parent_list_ids` parameters are ignored and only segments with given IDs are returned. - Ids *[]string `json:"ids,omitempty"` - // A comma separated list of list ids to be used when searching for segments with the specified parent_list_id, no more than 50 is allowed - ParentListIds *string `json:"parent_list_ids,omitempty"` - // If set to `true` segments with an empty value of `parent_list_id` will be returned in the filter. If the value is not present it defaults to 'false'. - NoParentListId *bool `json:"no_parent_list_id,omitempty"` -} - -func (params *ListSegmentParam) SetIds(Ids []string) *ListSegmentParam { - params.Ids = &Ids - return params -} -func (params *ListSegmentParam) SetParentListIds(ParentListIds string) *ListSegmentParam { - params.ParentListIds = &ParentListIds - return params -} -func (params *ListSegmentParam) SetNoParentListId(NoParentListId bool) *ListSegmentParam { - params.NoParentListId = &NoParentListId - return params -} - -// **This endpoint allows you to retrieve a list of segments.** The query param `parent_list_ids` is treated as a filter. Any match will be returned. Zero matches will return a response code of 200 with an empty `results` array. `parent_list_ids` | `no_parent_list_id` | `ids` | `result` -----------------:|:--------------------:|:-------------:|:-------------: empty | false | empty | all segments values list_ids | false | empty | segments filtered by list_ids values list_ids |true | empty | segments filtered by list_ids and segments with no parent list_ids empty empty | true | empty | segments with no parent list_ids anything | anything | ids | segments with matching segment ids | -func (c *ApiService) ListSegment(params *ListSegmentParam) (interface{}, error) { - path := "/v3/marketing/segments" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Ids != nil { - for _, item := range *params.Ids { - v, err := json.Marshal(item) - - if err != nil { - return nil, err - } - - data.Add("ids", string(v)) - - } - } - if params != nil && params.ParentListIds != nil { - data.Set("parent_list_ids", *params.ParentListIds) - } - if params != nil && params.NoParentListId != nil { - data.Set("no_parent_list_id", fmt.Sprint(*params.NoParentListId)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListSegment200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ListSegment500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_segments/api_service.go b/rest/api/v3/mc_segments/api_service.go deleted file mode 100644 index b3304ebe..00000000 --- a/rest/api/v3/mc_segments/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/mc_segments/docs/ContactResponse.md b/rest/api/v3/mc_segments/docs/ContactResponse.md deleted file mode 100644 index 0041ba2e..00000000 --- a/rest/api/v3/mc_segments/docs/ContactResponse.md +++ /dev/null @@ -1,27 +0,0 @@ -# ContactResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | ID assigned to a contact when added to the system. | -**Email** | **string** | Email of the contact. This is a reserved field. |[optional] -**PhoneNumberId** | **string** | The contact's Phone Number ID. This must be a valid phone number. |[optional] -**ExternalId** | **string** | The contact's External ID. |[optional] -**AnonymousId** | **string** | The contact's Anonymous ID. |[optional] -**AlternateEmails** | **[]string** | Alternate emails of the contact. This is a reserved field. | -**FirstName** | **string** | First name of the contact. This is a reserved field. | -**LastName** | **string** | Last name of the contact. This is a reserved field. | -**AddressLine1** | **string** | First line of address of the contact. This is a reserved field. | -**AddressLine2** | **string** | Second line of address of the contact. This is a reserved field. | -**City** | **string** | City associated with the contact. This is a reserved field. | -**StateProvinceRegion** | **string** | State associated with the contact. This is a reserved field. | -**PostalCode** | **int32** | Zipcode associated with the address of the contact. This is a reserved field. | -**Country** | **string** | Country associated with the address of the contact. This is a reserved field. | -**ListIds** | **[]string** | IDs of all lists the contact is part of |[optional] -**CustomFields** | [**ContactResponseCustomFields**](ContactResponseCustomFields.md) | | -**SegmentIds** | **[]string** | IDs of all segments the contact is part of |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments/docs/ContactResponseCustomFields.md b/rest/api/v3/mc_segments/docs/ContactResponseCustomFields.md deleted file mode 100644 index 0fc838a2..00000000 --- a/rest/api/v3/mc_segments/docs/ContactResponseCustomFields.md +++ /dev/null @@ -1,12 +0,0 @@ -# ContactResponseCustomFields - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CustomFieldName1** | **string** | |[optional] -**CustomFieldName2** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments/docs/DeleteSegment.md b/rest/api/v3/mc_segments/docs/DeleteSegment.md deleted file mode 100644 index 786d0f08..00000000 --- a/rest/api/v3/mc_segments/docs/DeleteSegment.md +++ /dev/null @@ -1,51 +0,0 @@ -# DeleteSegment - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteSegment**](DeleteSegment.md#DeleteSegment) | **Delete** /v3/marketing/segments/{SegmentId} | Delete Segment - - - -## DeleteSegment - -> map[string]interface{} DeleteSegment(ctx, SegmentId) - -Delete Segment - -**This endpoint allows you to delete a segment by `segment_id`.** Note that deleting a segment does not delete the contacts associated with the segment by default. Contacts associated with a deleted segment will remain in your list of all contacts and any other segments they belong to. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**SegmentId** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteSegmentParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_segments/docs/ErrorResponse.md b/rest/api/v3/mc_segments/docs/ErrorResponse.md deleted file mode 100644 index ec2d41f6..00000000 --- a/rest/api/v3/mc_segments/docs/ErrorResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ErrorResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] -**Id** | **string** | When applicable, this property value will be an error ID. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments/docs/ErrorResponseErrorsInner.md b/rest/api/v3/mc_segments/docs/ErrorResponseErrorsInner.md deleted file mode 100644 index 5449c685..00000000 --- a/rest/api/v3/mc_segments/docs/ErrorResponseErrorsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ErrorResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | An error message. |[optional] -**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] -**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments/docs/FullSegment.md b/rest/api/v3/mc_segments/docs/FullSegment.md deleted file mode 100644 index f0eb54e4..00000000 --- a/rest/api/v3/mc_segments/docs/FullSegment.md +++ /dev/null @@ -1,22 +0,0 @@ -# FullSegment - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | | -**ContactsCount** | **int32** | | -**CreatedAt** | [**time.Time**](time.Time.md) | ISO8601 of created timestamp | -**Name** | **string** | Name of the segment. | -**ParentListId** | **string** | The id of the list if this segment is a child of a list. This implies the query `AND CONTAINS(list_ids, ${parent_list_id})` |[optional] -**SampleUpdatedAt** | [**time.Time**](time.Time.md) | ISO8601 timestamp the sample was last updated | -**UpdatedAt** | [**time.Time**](time.Time.md) | ISO8601 timestamp the object was last updated | -**NextSampleUpdate** | **string** | ISO8601 string that is equal to `sample_updated_at` plus an internally calculated offset that depends on how often contacts enter or exit segments as the scheduled pipeline updates the samples. |[optional] -**ContactsSample** | [**[]ContactResponse**](ContactResponse.md) | | -**QueryJson** | **map[string]interface{}** | AST representation of the query DSL |[optional] -**ParentListIds** | **[]string** | The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future |[optional] -**QueryDsl** | **string** | SQL query which will filter contacts based on the conditions provided | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments/docs/GetSegment.md b/rest/api/v3/mc_segments/docs/GetSegment.md deleted file mode 100644 index c735c438..00000000 --- a/rest/api/v3/mc_segments/docs/GetSegment.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetSegment - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetSegment**](GetSegment.md#GetSegment) | **Get** /v3/marketing/segments/{SegmentId} | Get Segment by ID - - - -## GetSegment - -> FullSegment GetSegment(ctx, SegmentIdoptional) - -Get Segment by ID - -**This endpoint allows you to retrieve a single segment by ID.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**SegmentId** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a GetSegmentParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**QueryJson** | **bool** | Defaults to `false`. Set to `true` to return the parsed SQL AST as a JSON object in the field `query_json` - -### Return type - -[**FullSegment**](FullSegment.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_segments/docs/GetSegment404Response.md b/rest/api/v3/mc_segments/docs/GetSegment404Response.md deleted file mode 100644 index 1f7701d9..00000000 --- a/rest/api/v3/mc_segments/docs/GetSegment404Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSegment404Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]GetSegment404ResponseErrorsInner**](GetSegment404ResponseErrorsInner.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments/docs/GetSegment404ResponseErrorsInner.md b/rest/api/v3/mc_segments/docs/GetSegment404ResponseErrorsInner.md deleted file mode 100644 index 77220d8b..00000000 --- a/rest/api/v3/mc_segments/docs/GetSegment404ResponseErrorsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetSegment404ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | | -**Field** | **string** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments/docs/ListSegment.md b/rest/api/v3/mc_segments/docs/ListSegment.md deleted file mode 100644 index 21a8bd88..00000000 --- a/rest/api/v3/mc_segments/docs/ListSegment.md +++ /dev/null @@ -1,50 +0,0 @@ -# ListSegment - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListSegment**](ListSegment.md#ListSegment) | **Get** /v3/marketing/segments | Get List of Segments - - - -## ListSegment - -> ListSegment200Response ListSegment(ctx, optional) - -Get List of Segments - -**This endpoint allows you to retrieve a list of segments.** The query param `parent_list_ids` is treated as a filter. Any match will be returned. Zero matches will return a response code of 200 with an empty `results` array. `parent_list_ids` | `no_parent_list_id` | `ids` | `result` -----------------:|:--------------------:|:-------------:|:-------------: empty | false | empty | all segments values list_ids | false | empty | segments filtered by list_ids values list_ids |true | empty | segments filtered by list_ids and segments with no parent list_ids empty empty | true | empty | segments with no parent list_ids anything | anything | ids | segments with matching segment ids | - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListSegmentParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Ids** | **[]string** | A list of segment IDs to retrieve. When this parameter is included, the `no_parent_list_ids` and `parent_list_ids` parameters are ignored and only segments with given IDs are returned. -**ParentListIds** | **string** | A comma separated list of list ids to be used when searching for segments with the specified parent_list_id, no more than 50 is allowed -**NoParentListId** | **bool** | If set to `true` segments with an empty value of `parent_list_id` will be returned in the filter. If the value is not present it defaults to 'false'. - -### Return type - -[**ListSegment200Response**](ListSegment200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_segments/docs/ListSegment200Response.md b/rest/api/v3/mc_segments/docs/ListSegment200Response.md deleted file mode 100644 index a943da3b..00000000 --- a/rest/api/v3/mc_segments/docs/ListSegment200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListSegment200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Results** | [**[]SegmentSummary**](SegmentSummary.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments/docs/ListSegment500Response.md b/rest/api/v3/mc_segments/docs/ListSegment500Response.md deleted file mode 100644 index 169e9d8c..00000000 --- a/rest/api/v3/mc_segments/docs/ListSegment500Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListSegment500Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ListSegment500ResponseErrorsInner**](ListSegment500ResponseErrorsInner.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments/docs/ListSegment500ResponseErrorsInner.md b/rest/api/v3/mc_segments/docs/ListSegment500ResponseErrorsInner.md deleted file mode 100644 index ecd184d9..00000000 --- a/rest/api/v3/mc_segments/docs/ListSegment500ResponseErrorsInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListSegment500ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments/docs/SegmentSummary.md b/rest/api/v3/mc_segments/docs/SegmentSummary.md deleted file mode 100644 index 64484678..00000000 --- a/rest/api/v3/mc_segments/docs/SegmentSummary.md +++ /dev/null @@ -1,18 +0,0 @@ -# SegmentSummary - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | | -**ContactsCount** | **int32** | | -**CreatedAt** | [**time.Time**](time.Time.md) | ISO8601 of created timestamp | -**Name** | **string** | |[optional] -**ParentListId** | **string** | The id of the list if this segment is a child of a list. This implies the query `AND CONTAINS(list_ids, ${parent_list_id})` |[optional] -**SampleUpdatedAt** | [**time.Time**](time.Time.md) | ISO8601 timestamp the sample was last updated | -**UpdatedAt** | [**time.Time**](time.Time.md) | ISO8601 timestamp the object was last updated | -**NextSampleUpdate** | **string** | ISO8601 string that is equal to `sample_updated_at` plus an internally calculated offset that depends on how often contacts enter or exit segments as the scheduled pipeline updates the samples. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments/docs/SegmentWriteV2.md b/rest/api/v3/mc_segments/docs/SegmentWriteV2.md deleted file mode 100644 index 25cdc2d6..00000000 --- a/rest/api/v3/mc_segments/docs/SegmentWriteV2.md +++ /dev/null @@ -1,13 +0,0 @@ -# SegmentWriteV2 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Name of the segment. | -**ParentListIds** | **[]string** | The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future |[optional] -**QueryDsl** | **string** | SQL query which will filter contacts based on the conditions provided | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments/model_contact_response.go b/rest/api/v3/mc_segments/model_contact_response.go deleted file mode 100644 index 6977993a..00000000 --- a/rest/api/v3/mc_segments/model_contact_response.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ContactResponse struct for ContactResponse -type ContactResponse struct { - // ID assigned to a contact when added to the system. - Id string `json:"id"` - // Email of the contact. This is a reserved field. - Email *string `json:"email,omitempty"` - // The contact's Phone Number ID. This must be a valid phone number. - PhoneNumberId *string `json:"phone_number_id,omitempty"` - // The contact's External ID. - ExternalId *string `json:"external_id,omitempty"` - // The contact's Anonymous ID. - AnonymousId *string `json:"anonymous_id,omitempty"` - // Alternate emails of the contact. This is a reserved field. - AlternateEmails []string `json:"alternate_emails"` - // First name of the contact. This is a reserved field. - FirstName string `json:"first_name"` - // Last name of the contact. This is a reserved field. - LastName string `json:"last_name"` - // First line of address of the contact. This is a reserved field. - AddressLine1 string `json:"address_line_1"` - // Second line of address of the contact. This is a reserved field. - AddressLine2 string `json:"address_line_2"` - // City associated with the contact. This is a reserved field. - City string `json:"city"` - // State associated with the contact. This is a reserved field. - StateProvinceRegion string `json:"state_province_region"` - // Zipcode associated with the address of the contact. This is a reserved field. - PostalCode int32 `json:"postal_code"` - // Country associated with the address of the contact. This is a reserved field. - Country string `json:"country"` - // IDs of all lists the contact is part of - ListIds *[]string `json:"list_ids,omitempty"` - CustomFields ContactResponseCustomFields `json:"custom_fields"` - // IDs of all segments the contact is part of - SegmentIds *[]string `json:"segment_ids,omitempty"` -} diff --git a/rest/api/v3/mc_segments/model_contact_response_custom_fields.go b/rest/api/v3/mc_segments/model_contact_response_custom_fields.go deleted file mode 100644 index 2a736fc7..00000000 --- a/rest/api/v3/mc_segments/model_contact_response_custom_fields.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ContactResponseCustomFields The user may choose to create up to 120 custom fields or none at all. This is not a reserved field. -type ContactResponseCustomFields struct { - CustomFieldName1 *string `json:"custom_field_name1,omitempty"` - CustomFieldName2 *string `json:"custom_field_name2,omitempty"` -} diff --git a/rest/api/v3/mc_segments/model_error_response.go b/rest/api/v3/mc_segments/model_error_response.go deleted file mode 100644 index e178f466..00000000 --- a/rest/api/v3/mc_segments/model_error_response.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponse struct for ErrorResponse -type ErrorResponse struct { - Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` - // When applicable, this property value will be an error ID. - Id *string `json:"id,omitempty"` -} diff --git a/rest/api/v3/mc_segments/model_error_response_errors_inner.go b/rest/api/v3/mc_segments/model_error_response_errors_inner.go deleted file mode 100644 index b41f116b..00000000 --- a/rest/api/v3/mc_segments/model_error_response_errors_inner.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner -type ErrorResponseErrorsInner struct { - // An error message. - Message *string `json:"message,omitempty"` - // When applicable, this property value will be the field that generated the error. - Field *string `json:"field,omitempty"` - // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. - Help *map[string]interface{} `json:"help,omitempty"` -} diff --git a/rest/api/v3/mc_segments/model_full_segment.go b/rest/api/v3/mc_segments/model_full_segment.go deleted file mode 100644 index f365e55c..00000000 --- a/rest/api/v3/mc_segments/model_full_segment.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "time" -) - -// FullSegment struct for FullSegment -type FullSegment struct { - Id string `json:"id"` - ContactsCount int32 `json:"contacts_count"` - // ISO8601 of created timestamp - CreatedAt time.Time `json:"created_at"` - // Name of the segment. - Name string `json:"name"` - // The id of the list if this segment is a child of a list. This implies the query `AND CONTAINS(list_ids, ${parent_list_id})` - ParentListId *string `json:"parent_list_id,omitempty"` - // ISO8601 timestamp the sample was last updated - SampleUpdatedAt time.Time `json:"sample_updated_at"` - // ISO8601 timestamp the object was last updated - UpdatedAt time.Time `json:"updated_at"` - // ISO8601 string that is equal to `sample_updated_at` plus an internally calculated offset that depends on how often contacts enter or exit segments as the scheduled pipeline updates the samples. - NextSampleUpdate *string `json:"next_sample_update,omitempty"` - ContactsSample []ContactResponse `json:"contacts_sample"` - // AST representation of the query DSL - QueryJson *map[string]interface{} `json:"query_json,omitempty"` - // The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future - ParentListIds *[]string `json:"parent_list_ids,omitempty"` - // SQL query which will filter contacts based on the conditions provided - QueryDsl string `json:"query_dsl"` -} diff --git a/rest/api/v3/mc_segments/model_get_segment_404_response.go b/rest/api/v3/mc_segments/model_get_segment_404_response.go deleted file mode 100644 index b6987ee5..00000000 --- a/rest/api/v3/mc_segments/model_get_segment_404_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetSegment404Response struct for GetSegment404Response -type GetSegment404Response struct { - Errors []GetSegment404ResponseErrorsInner `json:"errors"` -} diff --git a/rest/api/v3/mc_segments/model_get_segment_404_response_errors_inner.go b/rest/api/v3/mc_segments/model_get_segment_404_response_errors_inner.go deleted file mode 100644 index 97445b5f..00000000 --- a/rest/api/v3/mc_segments/model_get_segment_404_response_errors_inner.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetSegment404ResponseErrorsInner struct for GetSegment404ResponseErrorsInner -type GetSegment404ResponseErrorsInner struct { - Message string `json:"message"` - Field string `json:"field"` -} diff --git a/rest/api/v3/mc_segments/model_list_segment_200_response.go b/rest/api/v3/mc_segments/model_list_segment_200_response.go deleted file mode 100644 index 44c6533a..00000000 --- a/rest/api/v3/mc_segments/model_list_segment_200_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSegment200Response struct for ListSegment200Response -type ListSegment200Response struct { - Results []SegmentSummary `json:"results"` -} diff --git a/rest/api/v3/mc_segments/model_list_segment_500_response.go b/rest/api/v3/mc_segments/model_list_segment_500_response.go deleted file mode 100644 index 38b58e34..00000000 --- a/rest/api/v3/mc_segments/model_list_segment_500_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSegment500Response struct for ListSegment500Response -type ListSegment500Response struct { - Errors []ListSegment500ResponseErrorsInner `json:"errors"` -} diff --git a/rest/api/v3/mc_segments/model_list_segment_500_response_errors_inner.go b/rest/api/v3/mc_segments/model_list_segment_500_response_errors_inner.go deleted file mode 100644 index 37a40fb1..00000000 --- a/rest/api/v3/mc_segments/model_list_segment_500_response_errors_inner.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSegment500ResponseErrorsInner struct for ListSegment500ResponseErrorsInner -type ListSegment500ResponseErrorsInner struct { - Message string `json:"message"` -} diff --git a/rest/api/v3/mc_segments/model_segment_summary.go b/rest/api/v3/mc_segments/model_segment_summary.go deleted file mode 100644 index c54aa9da..00000000 --- a/rest/api/v3/mc_segments/model_segment_summary.go +++ /dev/null @@ -1,35 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "time" -) - -// SegmentSummary struct for SegmentSummary -type SegmentSummary struct { - Id string `json:"id"` - ContactsCount int32 `json:"contacts_count"` - // ISO8601 of created timestamp - CreatedAt time.Time `json:"created_at"` - Name *string `json:"name,omitempty"` - // The id of the list if this segment is a child of a list. This implies the query `AND CONTAINS(list_ids, ${parent_list_id})` - ParentListId *string `json:"parent_list_id,omitempty"` - // ISO8601 timestamp the sample was last updated - SampleUpdatedAt time.Time `json:"sample_updated_at"` - // ISO8601 timestamp the object was last updated - UpdatedAt time.Time `json:"updated_at"` - // ISO8601 string that is equal to `sample_updated_at` plus an internally calculated offset that depends on how often contacts enter or exit segments as the scheduled pipeline updates the samples. - NextSampleUpdate *string `json:"next_sample_update,omitempty"` -} diff --git a/rest/api/v3/mc_segments/model_segment_write_v2.go b/rest/api/v3/mc_segments/model_segment_write_v2.go deleted file mode 100644 index 04aa8f81..00000000 --- a/rest/api/v3/mc_segments/model_segment_write_v2.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments API -* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SegmentWriteV2 struct for SegmentWriteV2 -type SegmentWriteV2 struct { - // Name of the segment. - Name string `json:"name"` - // The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future - ParentListIds *[]string `json:"parent_list_ids,omitempty"` - // SQL query which will filter contacts based on the conditions provided - QueryDsl string `json:"query_dsl"` -} diff --git a/rest/api/v3/mc_segments_2/.openapi-generator b/rest/api/v3/mc_segments_2/.openapi-generator deleted file mode 100644 index b68d3c0b..00000000 --- a/rest/api/v3/mc_segments_2/.openapi-generator +++ /dev/null @@ -1,42 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_create_segment.go -api_delete_segment.go -api_get_segment.go -api_list_segment.go -api_refresh_segment.go -api_service.go -api_update_segment.go -docs/AllSegments200.md -docs/ContactResponse.md -docs/ContactResponseCustomFields.md -docs/CreateSegment.md -docs/DeleteSegment.md -docs/ErrorsSegmentV2.md -docs/ErrorsSegmentV2ErrorsInner.md -docs/GetSegment.md -docs/ListSegment.md -docs/Metadata.md -docs/RefreshSegment.md -docs/Segment2xx.md -docs/SegmentError.md -docs/SegmentRefresh202.md -docs/SegmentRefreshRequest.md -docs/SegmentStatusResponse.md -docs/SegmentUpdate.md -docs/SegmentWriteV2.md -docs/UpdateSegment.md -model_all_segments200.go -model_contact_response.go -model_contact_response_custom_fields.go -model_errors_segment_v2.go -model_errors_segment_v2_errors_inner.go -model_metadata.go -model_segment2xx.go -model_segment_error.go -model_segment_refresh202.go -model_segment_refresh_request.go -model_segment_status_response.go -model_segment_update.go -model_segment_write_v2.go diff --git a/rest/api/v3/mc_segments_2/.openapi-generator-ignore b/rest/api/v3/mc_segments_2/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/mc_segments_2/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/mc_segments_2/README.md b/rest/api/v3/mc_segments_2/README.md deleted file mode 100644 index b2ab804c..00000000 --- a/rest/api/v3/mc_segments_2/README.md +++ /dev/null @@ -1,87 +0,0 @@ -# Go API client for - -The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. - -Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. - -Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. - -Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. - -Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. - -You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:38.102381+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*CreateSegment* | [**CreateSegment**](docs/CreateSegment.md#createsegment) | **Post** /v3/marketing/segments/2.0 | Create Segment -*DeleteSegment* | [**DeleteSegment**](docs/DeleteSegment.md#deletesegment) | **Delete** /v3/marketing/segments/2.0/{SegmentId} | Delete segment -*GetSegment* | [**GetSegment**](docs/GetSegment.md#getsegment) | **Get** /v3/marketing/segments/2.0/{SegmentId} | Get Segment by ID -*ListSegment* | [**ListSegment**](docs/ListSegment.md#listsegment) | **Get** /v3/marketing/segments/2.0 | Get List of Segments -*RefreshSegment* | [**RefreshSegment**](docs/RefreshSegment.md#refreshsegment) | **Post** /v3/marketing/segments/2.0/refresh/{SegmentId} | Manually refresh a segment -*UpdateSegment* | [**UpdateSegment**](docs/UpdateSegment.md#updatesegment) | **Patch** /v3/marketing/segments/2.0/{SegmentId} | Update Segment - - -## Documentation For Models - - - [AllSegments200](AllSegments200.md) - - [ContactResponse](ContactResponse.md) - - [ContactResponseCustomFields](ContactResponseCustomFields.md) - - [ErrorsSegmentV2](ErrorsSegmentV2.md) - - [ErrorsSegmentV2ErrorsInner](ErrorsSegmentV2ErrorsInner.md) - - [Metadata](Metadata.md) - - [Segment2xx](Segment2xx.md) - - [SegmentError](SegmentError.md) - - [SegmentRefresh202](SegmentRefresh202.md) - - [SegmentRefreshRequest](SegmentRefreshRequest.md) - - [SegmentStatusResponse](SegmentStatusResponse.md) - - [SegmentUpdate](SegmentUpdate.md) - - [SegmentWriteV2](SegmentWriteV2.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/mc_segments_2/api_create_segment.go b/rest/api/v3/mc_segments_2/api_create_segment.go deleted file mode 100644 index a9c6d799..00000000 --- a/rest/api/v3/mc_segments_2/api_create_segment.go +++ /dev/null @@ -1,81 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments 2.0 API -* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type CreateSegmentParam struct { - // - SegmentWriteV2 *SegmentWriteV2 `json:"SegmentWriteV2,omitempty"` -} - -func (params *CreateSegmentParam) SetSegmentWriteV2(SegmentWriteV2 SegmentWriteV2) *CreateSegmentParam { - params.SegmentWriteV2 = &SegmentWriteV2 - return params -} - -// Segment `name` has to be unique. A user can not create a new segment with an existing segment name. -func (c *ApiService) CreateSegment(params *CreateSegmentParam) (interface{}, error) { - path := "/v3/marketing/segments/2.0" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.SegmentWriteV2 != nil { - b, err := json.Marshal(*params.SegmentWriteV2) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &Segment2xx{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorsSegmentV2{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ErrorsSegmentV2{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_segments_2/api_delete_segment.go b/rest/api/v3/mc_segments_2/api_delete_segment.go deleted file mode 100644 index f16951c1..00000000 --- a/rest/api/v3/mc_segments_2/api_delete_segment.go +++ /dev/null @@ -1,69 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments 2.0 API -* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteSegmentParam struct { - // - SegmentId *string `json:"segment_id"` -} - -func (params *DeleteSegmentParam) SetSegmentId(SegmentId string) *DeleteSegmentParam { - params.SegmentId = &SegmentId - return params -} - -// **This endpoint allows you to delete a segment by ID.** -func (c *ApiService) DeleteSegment(params *DeleteSegmentParam) (interface{}, error) { - path := "/v3/marketing/segments/2.0/{SegmentId}" - if params != nil && params.SegmentId != nil { - path = strings.Replace(path, "{"+"SegmentId"+"}", *params.SegmentId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 400 { - ps := &ErrorsSegmentV2{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ErrorsSegmentV2{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_segments_2/api_get_segment.go b/rest/api/v3/mc_segments_2/api_get_segment.go deleted file mode 100644 index a5169d97..00000000 --- a/rest/api/v3/mc_segments_2/api_get_segment.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments 2.0 API -* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type GetSegmentParam struct { - // - SegmentId *string `json:"segment_id"` - // Defaults to `true`. Set to `false` to exclude the contacts_sample in the response. - ContactsSample *bool `json:"contacts_sample,omitempty"` -} - -func (params *GetSegmentParam) SetSegmentId(SegmentId string) *GetSegmentParam { - params.SegmentId = &SegmentId - return params -} -func (params *GetSegmentParam) SetContactsSample(ContactsSample bool) *GetSegmentParam { - params.ContactsSample = &ContactsSample - return params -} - -// Get Marketing Campaigns Segment by ID -func (c *ApiService) GetSegment(params *GetSegmentParam) (interface{}, error) { - path := "/v3/marketing/segments/2.0/{SegmentId}" - if params != nil && params.SegmentId != nil { - path = strings.Replace(path, "{"+"SegmentId"+"}", *params.SegmentId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.ContactsSample != nil { - data.Set("contacts_sample", fmt.Sprint(*params.ContactsSample)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &Segment2xx{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorsSegmentV2{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ErrorsSegmentV2{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_segments_2/api_list_segment.go b/rest/api/v3/mc_segments_2/api_list_segment.go deleted file mode 100644 index bf717e92..00000000 --- a/rest/api/v3/mc_segments_2/api_list_segment.go +++ /dev/null @@ -1,104 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments 2.0 API -* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListSegmentParam struct { - // A list of segment IDs to retrieve. When this parameter is included, the `no_parent_list_ids` and `parent_list_ids` parameters are ignored and only segments with given IDs are returned. - Ids *[]string `json:"ids,omitempty"` - // A comma separated list up to 50 in size, to filter segments on. Only segments that have any of these list ids as the parent list will be retrieved. This is different from the parameter of the same name used when creating a segment. - ParentListIds *string `json:"parent_list_ids,omitempty"` - // If set to `true`, segments with an empty value of `parent_list_id` will be returned in the filter. If the value is not present, it defaults to 'false'. - NoParentListId *bool `json:"no_parent_list_id,omitempty"` -} - -func (params *ListSegmentParam) SetIds(Ids []string) *ListSegmentParam { - params.Ids = &Ids - return params -} -func (params *ListSegmentParam) SetParentListIds(ParentListIds string) *ListSegmentParam { - params.ParentListIds = &ParentListIds - return params -} -func (params *ListSegmentParam) SetNoParentListId(NoParentListId bool) *ListSegmentParam { - params.NoParentListId = &NoParentListId - return params -} - -// **This endpoint allows you to retrieve a list of segments.** The query param `parent_list_ids` is treated as a filter. Any match will be returned. Zero matches will return a response code of 200 with an empty `results` array. `parent_list_ids` | `no_parent_list_id` | `ids` | `result` -----------------:|:--------------------:|:-------------:|:-------------: empty | false | empty | all segments values list_ids | false | empty | segments filtered by list_ids values list_ids |true | empty | segments filtered by list_ids and segments with no parent list_ids empty empty | true | empty | segments with no parent list_ids anything | anything | ids | segments with matching segment ids | -func (c *ApiService) ListSegment(params *ListSegmentParam) (interface{}, error) { - path := "/v3/marketing/segments/2.0" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Ids != nil { - for _, item := range *params.Ids { - v, err := json.Marshal(item) - - if err != nil { - return nil, err - } - - data.Add("ids", string(v)) - - } - } - if params != nil && params.ParentListIds != nil { - data.Set("parent_list_ids", *params.ParentListIds) - } - if params != nil && params.NoParentListId != nil { - data.Set("no_parent_list_id", fmt.Sprint(*params.NoParentListId)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &AllSegments200{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorsSegmentV2{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ErrorsSegmentV2{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_segments_2/api_refresh_segment.go b/rest/api/v3/mc_segments_2/api_refresh_segment.go deleted file mode 100644 index 535bff29..00000000 --- a/rest/api/v3/mc_segments_2/api_refresh_segment.go +++ /dev/null @@ -1,92 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments 2.0 API -* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type RefreshSegmentParam struct { - // - SegmentId *string `json:"segment_id"` - // - SegmentRefreshRequest *SegmentRefreshRequest `json:"SegmentRefreshRequest"` -} - -func (params *RefreshSegmentParam) SetSegmentId(SegmentId string) *RefreshSegmentParam { - params.SegmentId = &SegmentId - return params -} -func (params *RefreshSegmentParam) SetSegmentRefreshRequest(SegmentRefreshRequest SegmentRefreshRequest) *RefreshSegmentParam { - params.SegmentRefreshRequest = &SegmentRefreshRequest - return params -} - -// Manually refresh a segment by segment ID. -func (c *ApiService) RefreshSegment(params *RefreshSegmentParam) (interface{}, error) { - path := "/v3/marketing/segments/2.0/refresh/{SegmentId}" - if params != nil && params.SegmentId != nil { - path = strings.Replace(path, "{"+"SegmentId"+"}", *params.SegmentId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.SegmentRefreshRequest != nil { - b, err := json.Marshal(*params.SegmentRefreshRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 202 { - ps := &SegmentRefresh202{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &SegmentError{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &SegmentError{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_segments_2/api_service.go b/rest/api/v3/mc_segments_2/api_service.go deleted file mode 100644 index 6eb18a06..00000000 --- a/rest/api/v3/mc_segments_2/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments 2.0 API -* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/mc_segments_2/api_update_segment.go b/rest/api/v3/mc_segments_2/api_update_segment.go deleted file mode 100644 index 62911b6a..00000000 --- a/rest/api/v3/mc_segments_2/api_update_segment.go +++ /dev/null @@ -1,92 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments 2.0 API -* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type UpdateSegmentParam struct { - // - SegmentId *string `json:"segment_id"` - // - SegmentUpdate *SegmentUpdate `json:"SegmentUpdate,omitempty"` -} - -func (params *UpdateSegmentParam) SetSegmentId(SegmentId string) *UpdateSegmentParam { - params.SegmentId = &SegmentId - return params -} -func (params *UpdateSegmentParam) SetSegmentUpdate(SegmentUpdate SegmentUpdate) *UpdateSegmentParam { - params.SegmentUpdate = &SegmentUpdate - return params -} - -// Segment `name` has to be unique. A user can not create a new segment with an existing segment name. -func (c *ApiService) UpdateSegment(params *UpdateSegmentParam) (interface{}, error) { - path := "/v3/marketing/segments/2.0/{SegmentId}" - if params != nil && params.SegmentId != nil { - path = strings.Replace(path, "{"+"SegmentId"+"}", *params.SegmentId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.SegmentUpdate != nil { - b, err := json.Marshal(*params.SegmentUpdate) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &Segment2xx{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorsSegmentV2{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ErrorsSegmentV2{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_segments_2/docs/AllSegments200.md b/rest/api/v3/mc_segments_2/docs/AllSegments200.md deleted file mode 100644 index c0aa6fd7..00000000 --- a/rest/api/v3/mc_segments_2/docs/AllSegments200.md +++ /dev/null @@ -1,21 +0,0 @@ -# AllSegments200 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | ID assigned to the segment when created. | -**Name** | **string** | Name of the segment. | -**ContactsCount** | **int32** | Total number of contacts present in the segment | -**CreatedAt** | **string** | ISO8601 timestamp of when the object was created | -**UpdatedAt** | **string** | ISO8601 timestamp of when the object was last updated | -**SampleUpdatedAt** | **string** | ISO8601 timestamp of when the samples were last updated | -**NextSampleUpdate** | **string** | ISO8601 timestamp of when the samples will be next updated | -**ParentListIds** | **[]string** | The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future | -**QueryVersion** | **string** | If not set, segment contains a query for use with Segment v1 APIs. If set to '2', segment contains a SQL query for use in v2. | -**Metadata** | [**Metadata**](Metadata.md) | |[optional] -**Status** | [**SegmentStatusResponse**](SegmentStatusResponse.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments_2/docs/ContactResponse.md b/rest/api/v3/mc_segments_2/docs/ContactResponse.md deleted file mode 100644 index 0041ba2e..00000000 --- a/rest/api/v3/mc_segments_2/docs/ContactResponse.md +++ /dev/null @@ -1,27 +0,0 @@ -# ContactResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | ID assigned to a contact when added to the system. | -**Email** | **string** | Email of the contact. This is a reserved field. |[optional] -**PhoneNumberId** | **string** | The contact's Phone Number ID. This must be a valid phone number. |[optional] -**ExternalId** | **string** | The contact's External ID. |[optional] -**AnonymousId** | **string** | The contact's Anonymous ID. |[optional] -**AlternateEmails** | **[]string** | Alternate emails of the contact. This is a reserved field. | -**FirstName** | **string** | First name of the contact. This is a reserved field. | -**LastName** | **string** | Last name of the contact. This is a reserved field. | -**AddressLine1** | **string** | First line of address of the contact. This is a reserved field. | -**AddressLine2** | **string** | Second line of address of the contact. This is a reserved field. | -**City** | **string** | City associated with the contact. This is a reserved field. | -**StateProvinceRegion** | **string** | State associated with the contact. This is a reserved field. | -**PostalCode** | **int32** | Zipcode associated with the address of the contact. This is a reserved field. | -**Country** | **string** | Country associated with the address of the contact. This is a reserved field. | -**ListIds** | **[]string** | IDs of all lists the contact is part of |[optional] -**CustomFields** | [**ContactResponseCustomFields**](ContactResponseCustomFields.md) | | -**SegmentIds** | **[]string** | IDs of all segments the contact is part of |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments_2/docs/ContactResponseCustomFields.md b/rest/api/v3/mc_segments_2/docs/ContactResponseCustomFields.md deleted file mode 100644 index 0fc838a2..00000000 --- a/rest/api/v3/mc_segments_2/docs/ContactResponseCustomFields.md +++ /dev/null @@ -1,12 +0,0 @@ -# ContactResponseCustomFields - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CustomFieldName1** | **string** | |[optional] -**CustomFieldName2** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments_2/docs/CreateSegment.md b/rest/api/v3/mc_segments_2/docs/CreateSegment.md deleted file mode 100644 index 171e9d2d..00000000 --- a/rest/api/v3/mc_segments_2/docs/CreateSegment.md +++ /dev/null @@ -1,48 +0,0 @@ -# CreateSegment - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateSegment**](CreateSegment.md#CreateSegment) | **Post** /v3/marketing/segments/2.0 | Create Segment - - - -## CreateSegment - -> Segment2xx CreateSegment(ctx, optional) - -Create Segment - -Segment `name` has to be unique. A user can not create a new segment with an existing segment name. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateSegmentParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**SegmentWriteV2** | [**SegmentWriteV2**](SegmentWriteV2.md) | - -### Return type - -[**Segment2xx**](Segment2xx.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_segments_2/docs/DeleteSegment.md b/rest/api/v3/mc_segments_2/docs/DeleteSegment.md deleted file mode 100644 index b91fd466..00000000 --- a/rest/api/v3/mc_segments_2/docs/DeleteSegment.md +++ /dev/null @@ -1,51 +0,0 @@ -# DeleteSegment - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteSegment**](DeleteSegment.md#DeleteSegment) | **Delete** /v3/marketing/segments/2.0/{SegmentId} | Delete segment - - - -## DeleteSegment - -> DeleteSegment(ctx, SegmentId) - -Delete segment - -**This endpoint allows you to delete a segment by ID.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**SegmentId** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteSegmentParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_segments_2/docs/ErrorsSegmentV2.md b/rest/api/v3/mc_segments_2/docs/ErrorsSegmentV2.md deleted file mode 100644 index 07d67bc7..00000000 --- a/rest/api/v3/mc_segments_2/docs/ErrorsSegmentV2.md +++ /dev/null @@ -1,11 +0,0 @@ -# ErrorsSegmentV2 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ErrorsSegmentV2ErrorsInner**](ErrorsSegmentV2ErrorsInner.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments_2/docs/ErrorsSegmentV2ErrorsInner.md b/rest/api/v3/mc_segments_2/docs/ErrorsSegmentV2ErrorsInner.md deleted file mode 100644 index ec18b439..00000000 --- a/rest/api/v3/mc_segments_2/docs/ErrorsSegmentV2ErrorsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ErrorsSegmentV2ErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Field** | **string** | the field in the request body that is incorrect | -**Message** | **string** | a description of what is specifically wrong with the field passed in the request | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments_2/docs/GetSegment.md b/rest/api/v3/mc_segments_2/docs/GetSegment.md deleted file mode 100644 index 57cbe39a..00000000 --- a/rest/api/v3/mc_segments_2/docs/GetSegment.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetSegment - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetSegment**](GetSegment.md#GetSegment) | **Get** /v3/marketing/segments/2.0/{SegmentId} | Get Segment by ID - - - -## GetSegment - -> Segment2xx GetSegment(ctx, SegmentIdoptional) - -Get Segment by ID - -Get Marketing Campaigns Segment by ID - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**SegmentId** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a GetSegmentParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**ContactsSample** | **bool** | Defaults to `true`. Set to `false` to exclude the contacts_sample in the response. - -### Return type - -[**Segment2xx**](Segment2xx.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_segments_2/docs/ListSegment.md b/rest/api/v3/mc_segments_2/docs/ListSegment.md deleted file mode 100644 index 4ea5db66..00000000 --- a/rest/api/v3/mc_segments_2/docs/ListSegment.md +++ /dev/null @@ -1,50 +0,0 @@ -# ListSegment - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListSegment**](ListSegment.md#ListSegment) | **Get** /v3/marketing/segments/2.0 | Get List of Segments - - - -## ListSegment - -> AllSegments200 ListSegment(ctx, optional) - -Get List of Segments - -**This endpoint allows you to retrieve a list of segments.** The query param `parent_list_ids` is treated as a filter. Any match will be returned. Zero matches will return a response code of 200 with an empty `results` array. `parent_list_ids` | `no_parent_list_id` | `ids` | `result` -----------------:|:--------------------:|:-------------:|:-------------: empty | false | empty | all segments values list_ids | false | empty | segments filtered by list_ids values list_ids |true | empty | segments filtered by list_ids and segments with no parent list_ids empty empty | true | empty | segments with no parent list_ids anything | anything | ids | segments with matching segment ids | - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListSegmentParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Ids** | **[]string** | A list of segment IDs to retrieve. When this parameter is included, the `no_parent_list_ids` and `parent_list_ids` parameters are ignored and only segments with given IDs are returned. -**ParentListIds** | **string** | A comma separated list up to 50 in size, to filter segments on. Only segments that have any of these list ids as the parent list will be retrieved. This is different from the parameter of the same name used when creating a segment. -**NoParentListId** | **bool** | If set to `true`, segments with an empty value of `parent_list_id` will be returned in the filter. If the value is not present, it defaults to 'false'. - -### Return type - -[**AllSegments200**](AllSegments200.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_segments_2/docs/Metadata.md b/rest/api/v3/mc_segments_2/docs/Metadata.md deleted file mode 100644 index 6121300c..00000000 --- a/rest/api/v3/mc_segments_2/docs/Metadata.md +++ /dev/null @@ -1,14 +0,0 @@ -# Metadata - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Prev** | **string** | |[optional] -**Self** | **string** | |[optional] -**Next** | **string** | |[optional] -**Count** | **int32** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments_2/docs/RefreshSegment.md b/rest/api/v3/mc_segments_2/docs/RefreshSegment.md deleted file mode 100644 index d02196d2..00000000 --- a/rest/api/v3/mc_segments_2/docs/RefreshSegment.md +++ /dev/null @@ -1,51 +0,0 @@ -# RefreshSegment - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**RefreshSegment**](RefreshSegment.md#RefreshSegment) | **Post** /v3/marketing/segments/2.0/refresh/{SegmentId} | Manually refresh a segment - - - -## RefreshSegment - -> SegmentRefresh202 RefreshSegment(ctx, SegmentIdSegmentRefreshRequest) - -Manually refresh a segment - -Manually refresh a segment by segment ID. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**SegmentId** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a RefreshSegmentParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**SegmentRefresh202**](SegmentRefresh202.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_segments_2/docs/Segment2xx.md b/rest/api/v3/mc_segments_2/docs/Segment2xx.md deleted file mode 100644 index 7a16f7f4..00000000 --- a/rest/api/v3/mc_segments_2/docs/Segment2xx.md +++ /dev/null @@ -1,25 +0,0 @@ -# Segment2xx - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | ID assigned to the segment when created. | -**Name** | **string** | Name of the segment. | -**QueryDsl** | **string** | SQL query which will filter contacts based on the conditions provided | -**ContactsCount** | **int32** | Total number of contacts present in the segment | -**ContactsSample** | [**[]ContactResponse**](ContactResponse.md) | A subset of all contacts that are in this segment | -**CreatedAt** | **string** | ISO8601 timestamp of when the object was created | -**UpdatedAt** | **string** | ISO8601 timestamp of when the object was last updated | -**SampleUpdatedAt** | **string** | ISO8601 timestamp of when the samples were last updated | -**NextSampleUpdate** | **string** | ISO8601 timestamp of when the samples will be next updated | -**ParentListIds** | **[]string** | The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future | -**QueryVersion** | **string** | If not set, segment contains a Query for use with Segment v1 APIs. If set to '2', segment contains a SQL query for use in v2. | -**Status** | [**SegmentStatusResponse**](SegmentStatusResponse.md) | | -**RefreshesUsed** | **int32** | The number of times a segment has been manually refreshed since start of today in the user's timezone. |[optional] -**MaxRefreshes** | **int32** | The maximum number of manual refreshes allowed per day for this segment. Currently, only 2 are allowed. |[optional] -**LastRefreshedAt** | **string** | The ISO8601 timestamp when the segment was last refreshed in UTC time. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments_2/docs/SegmentError.md b/rest/api/v3/mc_segments_2/docs/SegmentError.md deleted file mode 100644 index f58e9427..00000000 --- a/rest/api/v3/mc_segments_2/docs/SegmentError.md +++ /dev/null @@ -1,11 +0,0 @@ -# SegmentError - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Error** | **string** | A description of the error. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments_2/docs/SegmentRefresh202.md b/rest/api/v3/mc_segments_2/docs/SegmentRefresh202.md deleted file mode 100644 index d930c1d1..00000000 --- a/rest/api/v3/mc_segments_2/docs/SegmentRefresh202.md +++ /dev/null @@ -1,11 +0,0 @@ -# SegmentRefresh202 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**JobId** | **string** | The ID of the manual refresh job. Used only for internal purposes. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments_2/docs/SegmentRefreshRequest.md b/rest/api/v3/mc_segments_2/docs/SegmentRefreshRequest.md deleted file mode 100644 index fb12c37b..00000000 --- a/rest/api/v3/mc_segments_2/docs/SegmentRefreshRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# SegmentRefreshRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**UserTimeZone** | **string** | The user's timezone. The timezone is used to reset the refresh count at midnight in the user's local time. Only [IANA time zone format](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) is accepted. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments_2/docs/SegmentStatusResponse.md b/rest/api/v3/mc_segments_2/docs/SegmentStatusResponse.md deleted file mode 100644 index efc40275..00000000 --- a/rest/api/v3/mc_segments_2/docs/SegmentStatusResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# SegmentStatusResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**QueryValidation** | **string** | Status of query validation. PENDING, VALID, or INVALID | -**ErrorMessage** | **string** | Describes any errors that were encountered during query validation |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments_2/docs/SegmentUpdate.md b/rest/api/v3/mc_segments_2/docs/SegmentUpdate.md deleted file mode 100644 index 9ddb7bfa..00000000 --- a/rest/api/v3/mc_segments_2/docs/SegmentUpdate.md +++ /dev/null @@ -1,12 +0,0 @@ -# SegmentUpdate - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Name of the segment. |[optional] -**QueryDsl** | **string** | SQL query which will filter contacts based on the conditions provided |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments_2/docs/SegmentWriteV2.md b/rest/api/v3/mc_segments_2/docs/SegmentWriteV2.md deleted file mode 100644 index 25cdc2d6..00000000 --- a/rest/api/v3/mc_segments_2/docs/SegmentWriteV2.md +++ /dev/null @@ -1,13 +0,0 @@ -# SegmentWriteV2 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | Name of the segment. | -**ParentListIds** | **[]string** | The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future |[optional] -**QueryDsl** | **string** | SQL query which will filter contacts based on the conditions provided | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_segments_2/docs/UpdateSegment.md b/rest/api/v3/mc_segments_2/docs/UpdateSegment.md deleted file mode 100644 index 87669084..00000000 --- a/rest/api/v3/mc_segments_2/docs/UpdateSegment.md +++ /dev/null @@ -1,52 +0,0 @@ -# UpdateSegment - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateSegment**](UpdateSegment.md#UpdateSegment) | **Patch** /v3/marketing/segments/2.0/{SegmentId} | Update Segment - - - -## UpdateSegment - -> Segment2xx UpdateSegment(ctx, SegmentIdoptional) - -Update Segment - -Segment `name` has to be unique. A user can not create a new segment with an existing segment name. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**SegmentId** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateSegmentParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**SegmentUpdate** | [**SegmentUpdate**](SegmentUpdate.md) | - -### Return type - -[**Segment2xx**](Segment2xx.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_segments_2/model_all_segments200.go b/rest/api/v3/mc_segments_2/model_all_segments200.go deleted file mode 100644 index 497ac8b7..00000000 --- a/rest/api/v3/mc_segments_2/model_all_segments200.go +++ /dev/null @@ -1,38 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments 2.0 API -* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AllSegments200 struct for AllSegments200 -type AllSegments200 struct { - // ID assigned to the segment when created. - Id string `json:"id"` - // Name of the segment. - Name string `json:"name"` - // Total number of contacts present in the segment - ContactsCount int32 `json:"contacts_count"` - // ISO8601 timestamp of when the object was created - CreatedAt string `json:"created_at"` - // ISO8601 timestamp of when the object was last updated - UpdatedAt string `json:"updated_at"` - // ISO8601 timestamp of when the samples were last updated - SampleUpdatedAt string `json:"sample_updated_at"` - // ISO8601 timestamp of when the samples will be next updated - NextSampleUpdate string `json:"next_sample_update"` - // The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future - ParentListIds []string `json:"parent_list_ids"` - // If not set, segment contains a query for use with Segment v1 APIs. If set to '2', segment contains a SQL query for use in v2. - QueryVersion string `json:"query_version"` - Metadata *Metadata `json:"_metadata,omitempty"` - Status SegmentStatusResponse `json:"status"` -} diff --git a/rest/api/v3/mc_segments_2/model_contact_response.go b/rest/api/v3/mc_segments_2/model_contact_response.go deleted file mode 100644 index 5a91c038..00000000 --- a/rest/api/v3/mc_segments_2/model_contact_response.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments 2.0 API -* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ContactResponse struct for ContactResponse -type ContactResponse struct { - // ID assigned to a contact when added to the system. - Id string `json:"id"` - // Email of the contact. This is a reserved field. - Email *string `json:"email,omitempty"` - // The contact's Phone Number ID. This must be a valid phone number. - PhoneNumberId *string `json:"phone_number_id,omitempty"` - // The contact's External ID. - ExternalId *string `json:"external_id,omitempty"` - // The contact's Anonymous ID. - AnonymousId *string `json:"anonymous_id,omitempty"` - // Alternate emails of the contact. This is a reserved field. - AlternateEmails []string `json:"alternate_emails"` - // First name of the contact. This is a reserved field. - FirstName string `json:"first_name"` - // Last name of the contact. This is a reserved field. - LastName string `json:"last_name"` - // First line of address of the contact. This is a reserved field. - AddressLine1 string `json:"address_line_1"` - // Second line of address of the contact. This is a reserved field. - AddressLine2 string `json:"address_line_2"` - // City associated with the contact. This is a reserved field. - City string `json:"city"` - // State associated with the contact. This is a reserved field. - StateProvinceRegion string `json:"state_province_region"` - // Zipcode associated with the address of the contact. This is a reserved field. - PostalCode int32 `json:"postal_code"` - // Country associated with the address of the contact. This is a reserved field. - Country string `json:"country"` - // IDs of all lists the contact is part of - ListIds *[]string `json:"list_ids,omitempty"` - CustomFields ContactResponseCustomFields `json:"custom_fields"` - // IDs of all segments the contact is part of - SegmentIds *[]string `json:"segment_ids,omitempty"` -} diff --git a/rest/api/v3/mc_segments_2/model_contact_response_custom_fields.go b/rest/api/v3/mc_segments_2/model_contact_response_custom_fields.go deleted file mode 100644 index 754537d5..00000000 --- a/rest/api/v3/mc_segments_2/model_contact_response_custom_fields.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments 2.0 API -* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ContactResponseCustomFields The user may choose to create up to 120 custom fields or none at all. This is not a reserved field. -type ContactResponseCustomFields struct { - CustomFieldName1 *string `json:"custom_field_name1,omitempty"` - CustomFieldName2 *string `json:"custom_field_name2,omitempty"` -} diff --git a/rest/api/v3/mc_segments_2/model_errors_segment_v2.go b/rest/api/v3/mc_segments_2/model_errors_segment_v2.go deleted file mode 100644 index 85afe100..00000000 --- a/rest/api/v3/mc_segments_2/model_errors_segment_v2.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments 2.0 API -* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorsSegmentV2 If the request is incorrect, an array of errors will be returned. -type ErrorsSegmentV2 struct { - Errors []ErrorsSegmentV2ErrorsInner `json:"errors"` -} diff --git a/rest/api/v3/mc_segments_2/model_errors_segment_v2_errors_inner.go b/rest/api/v3/mc_segments_2/model_errors_segment_v2_errors_inner.go deleted file mode 100644 index 26eeca07..00000000 --- a/rest/api/v3/mc_segments_2/model_errors_segment_v2_errors_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments 2.0 API -* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorsSegmentV2ErrorsInner struct for ErrorsSegmentV2ErrorsInner -type ErrorsSegmentV2ErrorsInner struct { - // the field in the request body that is incorrect - Field string `json:"field"` - // a description of what is specifically wrong with the field passed in the request - Message string `json:"message"` -} diff --git a/rest/api/v3/mc_segments_2/model_metadata.go b/rest/api/v3/mc_segments_2/model_metadata.go deleted file mode 100644 index 465ac16a..00000000 --- a/rest/api/v3/mc_segments_2/model_metadata.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments 2.0 API -* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Metadata struct for Metadata -type Metadata struct { - Prev *string `json:"prev,omitempty"` - Self *string `json:"self,omitempty"` - Next *string `json:"next,omitempty"` - Count *int32 `json:"count,omitempty"` -} diff --git a/rest/api/v3/mc_segments_2/model_segment2xx.go b/rest/api/v3/mc_segments_2/model_segment2xx.go deleted file mode 100644 index 0ce62a86..00000000 --- a/rest/api/v3/mc_segments_2/model_segment2xx.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments 2.0 API -* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Segment2xx struct for Segment2xx -type Segment2xx struct { - // ID assigned to the segment when created. - Id string `json:"id"` - // Name of the segment. - Name string `json:"name"` - // SQL query which will filter contacts based on the conditions provided - QueryDsl string `json:"query_dsl"` - // Total number of contacts present in the segment - ContactsCount int32 `json:"contacts_count"` - // A subset of all contacts that are in this segment - ContactsSample []ContactResponse `json:"contacts_sample"` - // ISO8601 timestamp of when the object was created - CreatedAt string `json:"created_at"` - // ISO8601 timestamp of when the object was last updated - UpdatedAt string `json:"updated_at"` - // ISO8601 timestamp of when the samples were last updated - SampleUpdatedAt string `json:"sample_updated_at"` - // ISO8601 timestamp of when the samples will be next updated - NextSampleUpdate string `json:"next_sample_update"` - // The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future - ParentListIds []string `json:"parent_list_ids"` - // If not set, segment contains a Query for use with Segment v1 APIs. If set to '2', segment contains a SQL query for use in v2. - QueryVersion string `json:"query_version"` - Status SegmentStatusResponse `json:"status"` - // The number of times a segment has been manually refreshed since start of today in the user's timezone. - RefreshesUsed *int32 `json:"refreshes_used,omitempty"` - // The maximum number of manual refreshes allowed per day for this segment. Currently, only 2 are allowed. - MaxRefreshes *int32 `json:"max_refreshes,omitempty"` - // The ISO8601 timestamp when the segment was last refreshed in UTC time. - LastRefreshedAt *string `json:"last_refreshed_at,omitempty"` -} diff --git a/rest/api/v3/mc_segments_2/model_segment_error.go b/rest/api/v3/mc_segments_2/model_segment_error.go deleted file mode 100644 index f08b583f..00000000 --- a/rest/api/v3/mc_segments_2/model_segment_error.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments 2.0 API -* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SegmentError struct for SegmentError -type SegmentError struct { - // A description of the error. - Error string `json:"error"` -} diff --git a/rest/api/v3/mc_segments_2/model_segment_refresh202.go b/rest/api/v3/mc_segments_2/model_segment_refresh202.go deleted file mode 100644 index 5c3e00b0..00000000 --- a/rest/api/v3/mc_segments_2/model_segment_refresh202.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments 2.0 API -* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SegmentRefresh202 struct for SegmentRefresh202 -type SegmentRefresh202 struct { - // The ID of the manual refresh job. Used only for internal purposes. - JobId *string `json:"job_id,omitempty"` -} diff --git a/rest/api/v3/mc_segments_2/model_segment_refresh_request.go b/rest/api/v3/mc_segments_2/model_segment_refresh_request.go deleted file mode 100644 index 4b509e53..00000000 --- a/rest/api/v3/mc_segments_2/model_segment_refresh_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments 2.0 API -* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SegmentRefreshRequest struct for SegmentRefreshRequest -type SegmentRefreshRequest struct { - // The user's timezone. The timezone is used to reset the refresh count at midnight in the user's local time. Only [IANA time zone format](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) is accepted. - UserTimeZone string `json:"user_time_zone"` -} diff --git a/rest/api/v3/mc_segments_2/model_segment_status_response.go b/rest/api/v3/mc_segments_2/model_segment_status_response.go deleted file mode 100644 index 2bf1bf83..00000000 --- a/rest/api/v3/mc_segments_2/model_segment_status_response.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments 2.0 API -* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SegmentStatusResponse Segment status indicates whether the segment's contacts will be updated periodically -type SegmentStatusResponse struct { - // Status of query validation. PENDING, VALID, or INVALID - QueryValidation string `json:"query_validation"` - // Describes any errors that were encountered during query validation - ErrorMessage *string `json:"error_message,omitempty"` -} diff --git a/rest/api/v3/mc_segments_2/model_segment_update.go b/rest/api/v3/mc_segments_2/model_segment_update.go deleted file mode 100644 index ebfede4c..00000000 --- a/rest/api/v3/mc_segments_2/model_segment_update.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments 2.0 API -* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SegmentUpdate struct for SegmentUpdate -type SegmentUpdate struct { - // Name of the segment. - Name *string `json:"name,omitempty"` - // SQL query which will filter contacts based on the conditions provided - QueryDsl *string `json:"query_dsl,omitempty"` -} diff --git a/rest/api/v3/mc_segments_2/model_segment_write_v2.go b/rest/api/v3/mc_segments_2/model_segment_write_v2.go deleted file mode 100644 index f0acdd74..00000000 --- a/rest/api/v3/mc_segments_2/model_segment_write_v2.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Segments 2.0 API -* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SegmentWriteV2 struct for SegmentWriteV2 -type SegmentWriteV2 struct { - // Name of the segment. - Name string `json:"name"` - // The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future - ParentListIds *[]string `json:"parent_list_ids,omitempty"` - // SQL query which will filter contacts based on the conditions provided - QueryDsl string `json:"query_dsl"` -} diff --git a/rest/api/v3/mc_senders/.openapi-generator b/rest/api/v3/mc_senders/.openapi-generator deleted file mode 100644 index 5d97710f..00000000 --- a/rest/api/v3/mc_senders/.openapi-generator +++ /dev/null @@ -1,36 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_create_sender.go -api_delete_sender.go -api_get_sender.go -api_list_sender.go -api_reset_sender_verification.go -api_service.go -api_update_sender.go -docs/CreateSender.md -docs/CreateSenderRequest.md -docs/CreateSenderRequestFrom.md -docs/CreateSenderRequestReplyTo.md -docs/DeleteSender.md -docs/ErrorResponse.md -docs/ErrorResponseErrorsInner.md -docs/GetSender.md -docs/ListSender.md -docs/ListSender200Response.md -docs/ResetSenderVerification.md -docs/Sender.md -docs/SenderRequest.md -docs/SenderRequestFrom.md -docs/SenderRequestReplyTo.md -docs/UpdateSender.md -model_create_sender_request.go -model_create_sender_request_from.go -model_create_sender_request_reply_to.go -model_error_response.go -model_error_response_errors_inner.go -model_list_sender_200_response.go -model_sender.go -model_sender_request.go -model_sender_request_from.go -model_sender_request_reply_to.go diff --git a/rest/api/v3/mc_senders/.openapi-generator-ignore b/rest/api/v3/mc_senders/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/mc_senders/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/mc_senders/README.md b/rest/api/v3/mc_senders/README.md deleted file mode 100644 index 185e2864..00000000 --- a/rest/api/v3/mc_senders/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# Go API client for - -The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:38.192647+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*CreateSender* | [**CreateSender**](docs/CreateSender.md#createsender) | **Post** /v3/marketing/senders | Create a Sender -*DeleteSender* | [**DeleteSender**](docs/DeleteSender.md#deletesender) | **Delete** /v3/marketing/senders/{Id} | Delete a Sender -*GetSender* | [**GetSender**](docs/GetSender.md#getsender) | **Get** /v3/marketing/senders/{Id} | Get a specific Sender -*ListSender* | [**ListSender**](docs/ListSender.md#listsender) | **Get** /v3/marketing/senders | Get a list of all Senders -*ResetSenderVerification* | [**ResetSenderVerification**](docs/ResetSenderVerification.md#resetsenderverification) | **Post** /v3/marketing/senders/{Id}/resend_verification | Resend a Sender verification -*UpdateSender* | [**UpdateSender**](docs/UpdateSender.md#updatesender) | **Patch** /v3/marketing/senders/{Id} | Update a Sender - - -## Documentation For Models - - - [CreateSenderRequest](CreateSenderRequest.md) - - [CreateSenderRequestFrom](CreateSenderRequestFrom.md) - - [CreateSenderRequestReplyTo](CreateSenderRequestReplyTo.md) - - [ErrorResponse](ErrorResponse.md) - - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) - - [ListSender200Response](ListSender200Response.md) - - [Sender](Sender.md) - - [SenderRequest](SenderRequest.md) - - [SenderRequestFrom](SenderRequestFrom.md) - - [SenderRequestReplyTo](SenderRequestReplyTo.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/mc_senders/api_create_sender.go b/rest/api/v3/mc_senders/api_create_sender.go deleted file mode 100644 index 1cd1e5e0..00000000 --- a/rest/api/v3/mc_senders/api_create_sender.go +++ /dev/null @@ -1,98 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Senders API -* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type CreateSenderParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - CreateSenderRequest *CreateSenderRequest `json:"CreateSenderRequest,omitempty"` -} - -func (params *CreateSenderParam) SetOnbehalfof(Onbehalfof string) *CreateSenderParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *CreateSenderParam) SetCreateSenderRequest(CreateSenderRequest CreateSenderRequest) *CreateSenderParam { - params.CreateSenderRequest = &CreateSenderRequest - return params -} - -// **This endpoint allows you to create a new Sender.** *You may create up to 100 unique Senders.* Senders are required to be verified before use. If your domain has been authenticated, a new Sender will auto verify on creation. Otherwise an email will be sent to the `from.email`. -func (c *ApiService) CreateSender(params *CreateSenderParam) (interface{}, error) { - path := "/v3/marketing/senders" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.CreateSenderRequest != nil { - b, err := json.Marshal(*params.CreateSenderRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &Sender{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_senders/api_delete_sender.go b/rest/api/v3/mc_senders/api_delete_sender.go deleted file mode 100644 index 698276fe..00000000 --- a/rest/api/v3/mc_senders/api_delete_sender.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Senders API -* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type DeleteSenderParam struct { - // The unique identifier of the Sender. - Id *int32 `json:"id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *DeleteSenderParam) SetId(Id int32) *DeleteSenderParam { - params.Id = &Id - return params -} -func (params *DeleteSenderParam) SetOnbehalfof(Onbehalfof string) *DeleteSenderParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to delete an existing Sender.** -func (c *ApiService) DeleteSender(params *DeleteSenderParam) (interface{}, error) { - path := "/v3/marketing/senders/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_senders/api_get_sender.go b/rest/api/v3/mc_senders/api_get_sender.go deleted file mode 100644 index 8991f124..00000000 --- a/rest/api/v3/mc_senders/api_get_sender.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Senders API -* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type GetSenderParam struct { - // The unique identifier of the Sender. - Id *int32 `json:"id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetSenderParam) SetId(Id int32) *GetSenderParam { - params.Id = &Id - return params -} -func (params *GetSenderParam) SetOnbehalfof(Onbehalfof string) *GetSenderParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to get the details for a specific Sender by `id`.** -func (c *ApiService) GetSender(params *GetSenderParam) (interface{}, error) { - path := "/v3/marketing/senders/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &Sender{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_senders/api_list_sender.go b/rest/api/v3/mc_senders/api_list_sender.go deleted file mode 100644 index d960867c..00000000 --- a/rest/api/v3/mc_senders/api_list_sender.go +++ /dev/null @@ -1,67 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Senders API -* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListSenderParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListSenderParam) SetOnbehalfof(Onbehalfof string) *ListSenderParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to get a list of all your Senders.** -func (c *ApiService) ListSender(params *ListSenderParam) (interface{}, error) { - path := "/v3/marketing/senders" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListSender200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_senders/api_reset_sender_verification.go b/rest/api/v3/mc_senders/api_reset_sender_verification.go deleted file mode 100644 index 850ccdd2..00000000 --- a/rest/api/v3/mc_senders/api_reset_sender_verification.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Senders API -* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type ResetSenderVerificationParam struct { - // The unique identifier of the Sender. - Id *int32 `json:"id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ResetSenderVerificationParam) SetId(Id int32) *ResetSenderVerificationParam { - params.Id = &Id - return params -} -func (params *ResetSenderVerificationParam) SetOnbehalfof(Onbehalfof string) *ResetSenderVerificationParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to resend the verification request for a specific Sender.** -func (c *ApiService) ResetSenderVerification(params *ResetSenderVerificationParam) (interface{}, error) { - path := "/v3/marketing/senders/{Id}/resend_verification" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_senders/api_service.go b/rest/api/v3/mc_senders/api_service.go deleted file mode 100644 index d8fd91ab..00000000 --- a/rest/api/v3/mc_senders/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Senders API -* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/mc_senders/api_update_sender.go b/rest/api/v3/mc_senders/api_update_sender.go deleted file mode 100644 index 438f70d5..00000000 --- a/rest/api/v3/mc_senders/api_update_sender.go +++ /dev/null @@ -1,110 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Senders API -* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type UpdateSenderParam struct { - // The unique identifier of the Sender. - Id *int32 `json:"id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - SenderRequest *SenderRequest `json:"SenderRequest,omitempty"` -} - -func (params *UpdateSenderParam) SetId(Id int32) *UpdateSenderParam { - params.Id = &Id - return params -} -func (params *UpdateSenderParam) SetOnbehalfof(Onbehalfof string) *UpdateSenderParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateSenderParam) SetSenderRequest(SenderRequest SenderRequest) *UpdateSenderParam { - params.SenderRequest = &SenderRequest - return params -} - -// **This endpoint allows you to update an existing Sender.** Updates to `from.email` require re-verification. If your domain has been authenticated, a new Sender will auto verify on creation. Otherwise, an email will be sent to the `from.email`. Partial updates are allowed, but fields that are marked as \"required\" in the `POST` (create) endpoint must not be nil if that field is included in the `PATCH` request. -func (c *ApiService) UpdateSender(params *UpdateSenderParam) (interface{}, error) { - path := "/v3/marketing/senders/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.SenderRequest != nil { - b, err := json.Marshal(*params.SenderRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &Sender{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_senders/docs/CreateSender.md b/rest/api/v3/mc_senders/docs/CreateSender.md deleted file mode 100644 index c1f21b0e..00000000 --- a/rest/api/v3/mc_senders/docs/CreateSender.md +++ /dev/null @@ -1,49 +0,0 @@ -# CreateSender - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateSender**](CreateSender.md#CreateSender) | **Post** /v3/marketing/senders | Create a Sender - - - -## CreateSender - -> Sender CreateSender(ctx, optional) - -Create a Sender - -**This endpoint allows you to create a new Sender.** *You may create up to 100 unique Senders.* Senders are required to be verified before use. If your domain has been authenticated, a new Sender will auto verify on creation. Otherwise an email will be sent to the `from.email`. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateSenderParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**CreateSenderRequest** | [**CreateSenderRequest**](CreateSenderRequest.md) | - -### Return type - -[**Sender**](Sender.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_senders/docs/CreateSenderRequest.md b/rest/api/v3/mc_senders/docs/CreateSenderRequest.md deleted file mode 100644 index 1848e991..00000000 --- a/rest/api/v3/mc_senders/docs/CreateSenderRequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# CreateSenderRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Nickname** | **string** | A nickname for the Sender. Not used for sending. | -**From** | [**CreateSenderRequestFrom**](CreateSenderRequestFrom.md) | | -**ReplyTo** | [**CreateSenderRequestReplyTo**](CreateSenderRequestReplyTo.md) | | -**Address** | **string** | The physical address of the Sender. | -**Address2** | **string** | Additional Sender address information. |[optional] -**City** | **string** | The city of the Sender. | -**State** | **string** | The state of the Sender. |[optional] -**Zip** | **string** | The zipcode of the Sender. |[optional] -**Country** | **string** | The country of the Sender. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_senders/docs/CreateSenderRequestFrom.md b/rest/api/v3/mc_senders/docs/CreateSenderRequestFrom.md deleted file mode 100644 index 14b6faa0..00000000 --- a/rest/api/v3/mc_senders/docs/CreateSenderRequestFrom.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateSenderRequestFrom - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | **string** | The email address from which your recipient will receive emails. | -**Name** | **string** | The name appended to the from email field. Typically your name or company name. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_senders/docs/CreateSenderRequestReplyTo.md b/rest/api/v3/mc_senders/docs/CreateSenderRequestReplyTo.md deleted file mode 100644 index 8f4f6e5e..00000000 --- a/rest/api/v3/mc_senders/docs/CreateSenderRequestReplyTo.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateSenderRequestReplyTo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | **string** | The email address to which your recipient will reply. | -**Name** | **string** | The name appended to the reply to email field. Typically your name or company name. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_senders/docs/DeleteSender.md b/rest/api/v3/mc_senders/docs/DeleteSender.md deleted file mode 100644 index 90499cef..00000000 --- a/rest/api/v3/mc_senders/docs/DeleteSender.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeleteSender - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteSender**](DeleteSender.md#DeleteSender) | **Delete** /v3/marketing/senders/{Id} | Delete a Sender - - - -## DeleteSender - -> DeleteSender(ctx, Idoptional) - -Delete a Sender - -**This endpoint allows you to delete an existing Sender.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **int32** | The unique identifier of the Sender. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteSenderParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_senders/docs/ErrorResponse.md b/rest/api/v3/mc_senders/docs/ErrorResponse.md deleted file mode 100644 index ec2d41f6..00000000 --- a/rest/api/v3/mc_senders/docs/ErrorResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ErrorResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] -**Id** | **string** | When applicable, this property value will be an error ID. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_senders/docs/ErrorResponseErrorsInner.md b/rest/api/v3/mc_senders/docs/ErrorResponseErrorsInner.md deleted file mode 100644 index 5449c685..00000000 --- a/rest/api/v3/mc_senders/docs/ErrorResponseErrorsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ErrorResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | An error message. |[optional] -**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] -**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_senders/docs/GetSender.md b/rest/api/v3/mc_senders/docs/GetSender.md deleted file mode 100644 index 27544663..00000000 --- a/rest/api/v3/mc_senders/docs/GetSender.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetSender - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetSender**](GetSender.md#GetSender) | **Get** /v3/marketing/senders/{Id} | Get a specific Sender - - - -## GetSender - -> Sender GetSender(ctx, Idoptional) - -Get a specific Sender - -**This endpoint allows you to get the details for a specific Sender by `id`.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **int32** | The unique identifier of the Sender. - -### Other Parameters - -Other parameters are passed through a pointer to a GetSenderParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**Sender**](Sender.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_senders/docs/ListSender.md b/rest/api/v3/mc_senders/docs/ListSender.md deleted file mode 100644 index 0490f053..00000000 --- a/rest/api/v3/mc_senders/docs/ListSender.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListSender - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListSender**](ListSender.md#ListSender) | **Get** /v3/marketing/senders | Get a list of all Senders - - - -## ListSender - -> ListSender200Response ListSender(ctx, optional) - -Get a list of all Senders - -**This endpoint allows you to get a list of all your Senders.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListSenderParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListSender200Response**](ListSender200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_senders/docs/ListSender200Response.md b/rest/api/v3/mc_senders/docs/ListSender200Response.md deleted file mode 100644 index d12cf53e..00000000 --- a/rest/api/v3/mc_senders/docs/ListSender200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListSender200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Results** | [**[]Sender**](Sender.md) | An array of Sender objects. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_senders/docs/ResetSenderVerification.md b/rest/api/v3/mc_senders/docs/ResetSenderVerification.md deleted file mode 100644 index 2351b423..00000000 --- a/rest/api/v3/mc_senders/docs/ResetSenderVerification.md +++ /dev/null @@ -1,52 +0,0 @@ -# ResetSenderVerification - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ResetSenderVerification**](ResetSenderVerification.md#ResetSenderVerification) | **Post** /v3/marketing/senders/{Id}/resend_verification | Resend a Sender verification - - - -## ResetSenderVerification - -> ResetSenderVerification(ctx, Idoptional) - -Resend a Sender verification - -**This endpoint allows you to resend the verification request for a specific Sender.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **int32** | The unique identifier of the Sender. - -### Other Parameters - -Other parameters are passed through a pointer to a ResetSenderVerificationParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_senders/docs/Sender.md b/rest/api/v3/mc_senders/docs/Sender.md deleted file mode 100644 index 13276770..00000000 --- a/rest/api/v3/mc_senders/docs/Sender.md +++ /dev/null @@ -1,24 +0,0 @@ -# Sender - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int32** | The unique identifier of the Sender. | -**Nickname** | **string** | A nickname for the Sender. Not used for sending. | -**From** | [**CreateSenderRequestFrom**](CreateSenderRequestFrom.md) | | -**ReplyTo** | [**CreateSenderRequestReplyTo**](CreateSenderRequestReplyTo.md) | | -**Address** | **string** | The physical address of the Sender. | -**Address2** | **string** | Additional Sender address information. |[optional] -**City** | **string** | The city of the Sender. | -**State** | **string** | The state of the Sender. |[optional] -**Zip** | **string** | The zipcode of the Sender. |[optional] -**Country** | **string** | The country of the Sender. | -**Verified** | **bool** | A boolean flag indicating whether the Sender is verified or not. Only verified Senders can be used to send email. | -**Locked** | **bool** | A boolean flag that is `true` when the Sender is associated with a campaign in Draft, Scheduled, or In Progress status. You cannot update or delete a locked Sender. | -**UpdatedAt** | **int32** | The time the Sender was last updated. | -**CreatedAt** | **int32** | The time the Sender was created. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_senders/docs/SenderRequest.md b/rest/api/v3/mc_senders/docs/SenderRequest.md deleted file mode 100644 index 8ca97438..00000000 --- a/rest/api/v3/mc_senders/docs/SenderRequest.md +++ /dev/null @@ -1,19 +0,0 @@ -# SenderRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Nickname** | **string** | A nickname for the Sender. Not used for sending. |[optional] -**From** | [**SenderRequestFrom**](SenderRequestFrom.md) | |[optional] -**ReplyTo** | [**SenderRequestReplyTo**](SenderRequestReplyTo.md) | |[optional] -**Address** | **string** | The physical address of the Sender. |[optional] -**Address2** | **string** | Additional Sender address information. |[optional] -**City** | **string** | The city of the Sender. |[optional] -**State** | **string** | The state of the Sender. |[optional] -**Zip** | **string** | The zipcode of the Sender. |[optional] -**Country** | **string** | The country of the Sender. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_senders/docs/SenderRequestFrom.md b/rest/api/v3/mc_senders/docs/SenderRequestFrom.md deleted file mode 100644 index 8db8be81..00000000 --- a/rest/api/v3/mc_senders/docs/SenderRequestFrom.md +++ /dev/null @@ -1,12 +0,0 @@ -# SenderRequestFrom - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | **string** | The email address from which your recipient will receive emails. |[optional] -**Name** | **string** | The name appended to the from email field. Typically your name or company name. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_senders/docs/SenderRequestReplyTo.md b/rest/api/v3/mc_senders/docs/SenderRequestReplyTo.md deleted file mode 100644 index cfebfa3c..00000000 --- a/rest/api/v3/mc_senders/docs/SenderRequestReplyTo.md +++ /dev/null @@ -1,12 +0,0 @@ -# SenderRequestReplyTo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | **string** | The email address to which your recipient will reply. |[optional] -**Name** | **string** | The name appended to the reply to email field. Typically your name or company name. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_senders/docs/UpdateSender.md b/rest/api/v3/mc_senders/docs/UpdateSender.md deleted file mode 100644 index 2d71e4e0..00000000 --- a/rest/api/v3/mc_senders/docs/UpdateSender.md +++ /dev/null @@ -1,53 +0,0 @@ -# UpdateSender - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateSender**](UpdateSender.md#UpdateSender) | **Patch** /v3/marketing/senders/{Id} | Update a Sender - - - -## UpdateSender - -> Sender UpdateSender(ctx, Idoptional) - -Update a Sender - -**This endpoint allows you to update an existing Sender.** Updates to `from.email` require re-verification. If your domain has been authenticated, a new Sender will auto verify on creation. Otherwise, an email will be sent to the `from.email`. Partial updates are allowed, but fields that are marked as \"required\" in the `POST` (create) endpoint must not be nil if that field is included in the `PATCH` request. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **int32** | The unique identifier of the Sender. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateSenderParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**SenderRequest** | [**SenderRequest**](SenderRequest.md) | - -### Return type - -[**Sender**](Sender.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_senders/model_create_sender_request.go b/rest/api/v3/mc_senders/model_create_sender_request.go deleted file mode 100644 index 5b037483..00000000 --- a/rest/api/v3/mc_senders/model_create_sender_request.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Senders API -* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateSenderRequest struct for CreateSenderRequest -type CreateSenderRequest struct { - // A nickname for the Sender. Not used for sending. - Nickname string `json:"nickname"` - From CreateSenderRequestFrom `json:"from"` - ReplyTo CreateSenderRequestReplyTo `json:"reply_to"` - // The physical address of the Sender. - Address string `json:"address"` - // Additional Sender address information. - Address2 *string `json:"address_2,omitempty"` - // The city of the Sender. - City string `json:"city"` - // The state of the Sender. - State *string `json:"state,omitempty"` - // The zipcode of the Sender. - Zip *string `json:"zip,omitempty"` - // The country of the Sender. - Country string `json:"country"` -} diff --git a/rest/api/v3/mc_senders/model_create_sender_request_from.go b/rest/api/v3/mc_senders/model_create_sender_request_from.go deleted file mode 100644 index 63bdb64e..00000000 --- a/rest/api/v3/mc_senders/model_create_sender_request_from.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Senders API -* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateSenderRequestFrom struct for CreateSenderRequestFrom -type CreateSenderRequestFrom struct { - // The email address from which your recipient will receive emails. - Email string `json:"email"` - // The name appended to the from email field. Typically your name or company name. - Name string `json:"name"` -} diff --git a/rest/api/v3/mc_senders/model_create_sender_request_reply_to.go b/rest/api/v3/mc_senders/model_create_sender_request_reply_to.go deleted file mode 100644 index 82a5abef..00000000 --- a/rest/api/v3/mc_senders/model_create_sender_request_reply_to.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Senders API -* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateSenderRequestReplyTo struct for CreateSenderRequestReplyTo -type CreateSenderRequestReplyTo struct { - // The email address to which your recipient will reply. - Email string `json:"email"` - // The name appended to the reply to email field. Typically your name or company name. - Name *string `json:"name,omitempty"` -} diff --git a/rest/api/v3/mc_senders/model_error_response.go b/rest/api/v3/mc_senders/model_error_response.go deleted file mode 100644 index 3513d637..00000000 --- a/rest/api/v3/mc_senders/model_error_response.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Senders API -* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponse struct for ErrorResponse -type ErrorResponse struct { - Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` - // When applicable, this property value will be an error ID. - Id *string `json:"id,omitempty"` -} diff --git a/rest/api/v3/mc_senders/model_error_response_errors_inner.go b/rest/api/v3/mc_senders/model_error_response_errors_inner.go deleted file mode 100644 index 43267f83..00000000 --- a/rest/api/v3/mc_senders/model_error_response_errors_inner.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Senders API -* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner -type ErrorResponseErrorsInner struct { - // An error message. - Message *string `json:"message,omitempty"` - // When applicable, this property value will be the field that generated the error. - Field *string `json:"field,omitempty"` - // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. - Help *map[string]interface{} `json:"help,omitempty"` -} diff --git a/rest/api/v3/mc_senders/model_list_sender_200_response.go b/rest/api/v3/mc_senders/model_list_sender_200_response.go deleted file mode 100644 index 970767db..00000000 --- a/rest/api/v3/mc_senders/model_list_sender_200_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Senders API -* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSender200Response struct for ListSender200Response -type ListSender200Response struct { - // An array of Sender objects. - Results *[]Sender `json:"results,omitempty"` -} diff --git a/rest/api/v3/mc_senders/model_sender.go b/rest/api/v3/mc_senders/model_sender.go deleted file mode 100644 index b204c704..00000000 --- a/rest/api/v3/mc_senders/model_sender.go +++ /dev/null @@ -1,44 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Senders API -* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Sender struct for Sender -type Sender struct { - // The unique identifier of the Sender. - Id int32 `json:"id"` - // A nickname for the Sender. Not used for sending. - Nickname string `json:"nickname"` - From CreateSenderRequestFrom `json:"from"` - ReplyTo CreateSenderRequestReplyTo `json:"reply_to"` - // The physical address of the Sender. - Address string `json:"address"` - // Additional Sender address information. - Address2 *string `json:"address_2,omitempty"` - // The city of the Sender. - City string `json:"city"` - // The state of the Sender. - State *string `json:"state,omitempty"` - // The zipcode of the Sender. - Zip *string `json:"zip,omitempty"` - // The country of the Sender. - Country string `json:"country"` - // A boolean flag indicating whether the Sender is verified or not. Only verified Senders can be used to send email. - Verified bool `json:"verified"` - // A boolean flag that is `true` when the Sender is associated with a campaign in Draft, Scheduled, or In Progress status. You cannot update or delete a locked Sender. - Locked bool `json:"locked"` - // The time the Sender was last updated. - UpdatedAt int32 `json:"updated_at"` - // The time the Sender was created. - CreatedAt int32 `json:"created_at"` -} diff --git a/rest/api/v3/mc_senders/model_sender_request.go b/rest/api/v3/mc_senders/model_sender_request.go deleted file mode 100644 index 88d80f3b..00000000 --- a/rest/api/v3/mc_senders/model_sender_request.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Senders API -* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SenderRequest struct for SenderRequest -type SenderRequest struct { - // A nickname for the Sender. Not used for sending. - Nickname *string `json:"nickname,omitempty"` - From *SenderRequestFrom `json:"from,omitempty"` - ReplyTo *SenderRequestReplyTo `json:"reply_to,omitempty"` - // The physical address of the Sender. - Address *string `json:"address,omitempty"` - // Additional Sender address information. - Address2 *string `json:"address_2,omitempty"` - // The city of the Sender. - City *string `json:"city,omitempty"` - // The state of the Sender. - State *string `json:"state,omitempty"` - // The zipcode of the Sender. - Zip *string `json:"zip,omitempty"` - // The country of the Sender. - Country *string `json:"country,omitempty"` -} diff --git a/rest/api/v3/mc_senders/model_sender_request_from.go b/rest/api/v3/mc_senders/model_sender_request_from.go deleted file mode 100644 index 618487c8..00000000 --- a/rest/api/v3/mc_senders/model_sender_request_from.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Senders API -* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SenderRequestFrom struct for SenderRequestFrom -type SenderRequestFrom struct { - // The email address from which your recipient will receive emails. - Email *string `json:"email,omitempty"` - // The name appended to the from email field. Typically your name or company name. - Name *string `json:"name,omitempty"` -} diff --git a/rest/api/v3/mc_senders/model_sender_request_reply_to.go b/rest/api/v3/mc_senders/model_sender_request_reply_to.go deleted file mode 100644 index 4b79fc3b..00000000 --- a/rest/api/v3/mc_senders/model_sender_request_reply_to.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Senders API -* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SenderRequestReplyTo struct for SenderRequestReplyTo -type SenderRequestReplyTo struct { - // The email address to which your recipient will reply. - Email *string `json:"email,omitempty"` - // The name appended to the reply to email field. Typically your name or company name. - Name *string `json:"name,omitempty"` -} diff --git a/rest/api/v3/mc_singlesends/.openapi-generator b/rest/api/v3/mc_singlesends/.openapi-generator deleted file mode 100644 index a516b78b..00000000 --- a/rest/api/v3/mc_singlesends/.openapi-generator +++ /dev/null @@ -1,82 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_create_single_send.go -api_delete_scheduled_single_send.go -api_delete_single_send.go -api_delete_single_sends.go -api_duplicate_single_send.go -api_get_single_send.go -api_list_category.go -api_list_single_send.go -api_schedule_single_send.go -api_search_single_send.go -api_service.go -api_update_single_send.go -docs/AbTestSummary.md -docs/CreateSingleSend.md -docs/DeleteScheduledSingleSend.md -docs/DeleteSingleSend.md -docs/DeleteSingleSends.md -docs/DuplicateSingleSend.md -docs/DuplicateSingleSendRequest.md -docs/Editor.md -docs/Editor1.md -docs/GetSingleSend.md -docs/Items.md -docs/ListCategory.md -docs/ListCategory200Response.md -docs/ListSingleSend.md -docs/ListSingleSend200Response.md -docs/ListSingleSend500Response.md -docs/ListSingleSend500ResponseErrorsInner.md -docs/Metadata.md -docs/ScheduleSingleSend.md -docs/ScheduleSingleSend201Response.md -docs/ScheduleSingleSendRequest.md -docs/SearchSingleSend.md -docs/SinglesendRequest.md -docs/SinglesendRequestEmailConfig.md -docs/SinglesendRequestSendTo.md -docs/SinglesendResponse.md -docs/SinglesendResponseEmailConfig.md -docs/SinglesendResponseSendTo.md -docs/SinglesendResponseShort.md -docs/SinglesendResponseWarningsInner.md -docs/SinglesendSchedule.md -docs/SinglesendSearch.md -docs/Status.md -docs/Status1.md -docs/Status2.md -docs/Status3.md -docs/Type.md -docs/UpdateSingleSend.md -docs/WinnerCriteria.md -model_ab_test_summary.go -model_duplicate_single_send_request.go -model_editor.go -model_editor1.go -model_items.go -model_list_category_200_response.go -model_list_single_send_200_response.go -model_list_single_send_500_response.go -model_list_single_send_500_response_errors_inner.go -model_metadata.go -model_schedule_single_send_201_response.go -model_schedule_single_send_request.go -model_singlesend_request.go -model_singlesend_request_email_config.go -model_singlesend_request_send_to.go -model_singlesend_response.go -model_singlesend_response_email_config.go -model_singlesend_response_send_to.go -model_singlesend_response_short.go -model_singlesend_response_warnings_inner.go -model_singlesend_schedule.go -model_singlesend_search.go -model_status.go -model_status1.go -model_status2.go -model_status3.go -model_type.go -model_winner_criteria.go diff --git a/rest/api/v3/mc_singlesends/.openapi-generator-ignore b/rest/api/v3/mc_singlesends/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/mc_singlesends/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/mc_singlesends/README.md b/rest/api/v3/mc_singlesends/README.md deleted file mode 100644 index 86cef7dc..00000000 --- a/rest/api/v3/mc_singlesends/README.md +++ /dev/null @@ -1,103 +0,0 @@ -# Go API client for - -The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. - -A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. - -Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). - -The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:38.227927+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*CreateSingleSend* | [**CreateSingleSend**](docs/CreateSingleSend.md#createsinglesend) | **Post** /v3/marketing/singlesends | Create Single Send -*DeleteScheduledSingleSend* | [**DeleteScheduledSingleSend**](docs/DeleteScheduledSingleSend.md#deletescheduledsinglesend) | **Delete** /v3/marketing/singlesends/{Id}/schedule | Delete Single Send Schedule -*DeleteSingleSend* | [**DeleteSingleSend**](docs/DeleteSingleSend.md#deletesinglesend) | **Delete** /v3/marketing/singlesends/{Id} | Delete Single Send by ID -*DeleteSingleSends* | [**DeleteSingleSends**](docs/DeleteSingleSends.md#deletesinglesends) | **Delete** /v3/marketing/singlesends | Bulk Delete Single Sends -*DuplicateSingleSend* | [**DuplicateSingleSend**](docs/DuplicateSingleSend.md#duplicatesinglesend) | **Post** /v3/marketing/singlesends/{Id} | Duplicate Single Send -*GetSingleSend* | [**GetSingleSend**](docs/GetSingleSend.md#getsinglesend) | **Get** /v3/marketing/singlesends/{Id} | Get Single Send by ID -*ListCategory* | [**ListCategory**](docs/ListCategory.md#listcategory) | **Get** /v3/marketing/singlesends/categories | Get All Categories -*ListSingleSend* | [**ListSingleSend**](docs/ListSingleSend.md#listsinglesend) | **Get** /v3/marketing/singlesends | Get All Single Sends -*ScheduleSingleSend* | [**ScheduleSingleSend**](docs/ScheduleSingleSend.md#schedulesinglesend) | **Put** /v3/marketing/singlesends/{Id}/schedule | Schedule Single Send -*SearchSingleSend* | [**SearchSingleSend**](docs/SearchSingleSend.md#searchsinglesend) | **Post** /v3/marketing/singlesends/search | Get Single Sends Search -*UpdateSingleSend* | [**UpdateSingleSend**](docs/UpdateSingleSend.md#updatesinglesend) | **Patch** /v3/marketing/singlesends/{Id} | Update Single Send - - -## Documentation For Models - - - [AbTestSummary](AbTestSummary.md) - - [DuplicateSingleSendRequest](DuplicateSingleSendRequest.md) - - [Editor](Editor.md) - - [Editor1](Editor1.md) - - [Items](Items.md) - - [ListCategory200Response](ListCategory200Response.md) - - [ListSingleSend200Response](ListSingleSend200Response.md) - - [ListSingleSend500Response](ListSingleSend500Response.md) - - [ListSingleSend500ResponseErrorsInner](ListSingleSend500ResponseErrorsInner.md) - - [Metadata](Metadata.md) - - [ScheduleSingleSend201Response](ScheduleSingleSend201Response.md) - - [ScheduleSingleSendRequest](ScheduleSingleSendRequest.md) - - [SinglesendRequest](SinglesendRequest.md) - - [SinglesendRequestEmailConfig](SinglesendRequestEmailConfig.md) - - [SinglesendRequestSendTo](SinglesendRequestSendTo.md) - - [SinglesendResponse](SinglesendResponse.md) - - [SinglesendResponseEmailConfig](SinglesendResponseEmailConfig.md) - - [SinglesendResponseSendTo](SinglesendResponseSendTo.md) - - [SinglesendResponseShort](SinglesendResponseShort.md) - - [SinglesendResponseWarningsInner](SinglesendResponseWarningsInner.md) - - [SinglesendSchedule](SinglesendSchedule.md) - - [SinglesendSearch](SinglesendSearch.md) - - [Status](Status.md) - - [Status1](Status1.md) - - [Status2](Status2.md) - - [Status3](Status3.md) - - [Type](Type.md) - - [WinnerCriteria](WinnerCriteria.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/mc_singlesends/api_create_single_send.go b/rest/api/v3/mc_singlesends/api_create_single_send.go deleted file mode 100644 index 9a5be671..00000000 --- a/rest/api/v3/mc_singlesends/api_create_single_send.go +++ /dev/null @@ -1,81 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type CreateSingleSendParam struct { - // - SinglesendRequest *SinglesendRequest `json:"SinglesendRequest,omitempty"` -} - -func (params *CreateSingleSendParam) SetSinglesendRequest(SinglesendRequest SinglesendRequest) *CreateSingleSendParam { - params.SinglesendRequest = &SinglesendRequest - return params -} - -// **This endpoint allows you to create a new Single Send.** Please note that if you are migrating from the previous version of Single Sends, you no longer need to pass a template ID with your request to this endpoint. Instead, you will pass all template data in the `email_config` object. This endpoint will create a draft of the Single Send but will not send it or schedule it to be sent. Any `send_at` property value set with this endpoint will prepopulate the Single Send's send date. However, the Single Send will remain an unscheduled draft until it's updated with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI. -func (c *ApiService) CreateSingleSend(params *CreateSingleSendParam) (interface{}, error) { - path := "/v3/marketing/singlesends" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.SinglesendRequest != nil { - b, err := json.Marshal(*params.SinglesendRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &SinglesendResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ListSingleSend500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ListSingleSend500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_singlesends/api_delete_scheduled_single_send.go b/rest/api/v3/mc_singlesends/api_delete_scheduled_single_send.go deleted file mode 100644 index ddfdc500..00000000 --- a/rest/api/v3/mc_singlesends/api_delete_scheduled_single_send.go +++ /dev/null @@ -1,77 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteScheduledSingleSendParam struct { - // - Id *string `json:"id"` -} - -func (params *DeleteScheduledSingleSendParam) SetId(Id string) *DeleteScheduledSingleSendParam { - params.Id = &Id - return params -} - -// **This endpoint allows you to cancel a scheduled Single Send using a Single Send ID.** Making a DELETE request to this endpoint will cancel the scheduled sending of a Single Send. The request will not delete the Single Send itself. Deleting a Single Send can be done by passing a DELETE request to `/marketing/singlesends/{id}`. -func (c *ApiService) DeleteScheduledSingleSend(params *DeleteScheduledSingleSendParam) (interface{}, error) { - path := "/v3/marketing/singlesends/{Id}/schedule" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SinglesendSchedule{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ListSingleSend500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ListSingleSend500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_singlesends/api_delete_single_send.go b/rest/api/v3/mc_singlesends/api_delete_single_send.go deleted file mode 100644 index edbfa155..00000000 --- a/rest/api/v3/mc_singlesends/api_delete_single_send.go +++ /dev/null @@ -1,69 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteSingleSendParam struct { - // - Id *string `json:"id"` -} - -func (params *DeleteSingleSendParam) SetId(Id string) *DeleteSingleSendParam { - params.Id = &Id - return params -} - -// **This endpoint allows you to delete one Single Send using a Single Send ID.** To first retrieve all your Single Sends' IDs, you can make a GET request to the `/marketing/singlensends` endpoint. Please note that a `DELETE` request is permanent, and your Single Send will not be recoverable after deletion. -func (c *ApiService) DeleteSingleSend(params *DeleteSingleSendParam) (interface{}, error) { - path := "/v3/marketing/singlesends/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 404 { - ps := &ListSingleSend500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ListSingleSend500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_singlesends/api_delete_single_sends.go b/rest/api/v3/mc_singlesends/api_delete_single_sends.go deleted file mode 100644 index 93da71a2..00000000 --- a/rest/api/v3/mc_singlesends/api_delete_single_sends.go +++ /dev/null @@ -1,77 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type DeleteSingleSendsParam struct { - // Single Send IDs to delete - Ids *[]string `json:"ids,omitempty"` -} - -func (params *DeleteSingleSendsParam) SetIds(Ids []string) *DeleteSingleSendsParam { - params.Ids = &Ids - return params -} - -// **This endpoint allows you to delete multiple Single Sends using an array of Single Sends IDs.** To first retrieve all your Single Sends' IDs, you can make a GET request to the `/marketing/singlensends` endpoint. Please note that a DELETE request is permanent, and your Single Sends will not be recoverable after deletion. -func (c *ApiService) DeleteSingleSends(params *DeleteSingleSendsParam) (interface{}, error) { - path := "/v3/marketing/singlesends" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Ids != nil { - for _, item := range *params.Ids { - v, err := json.Marshal(item) - - if err != nil { - return nil, err - } - - data.Add("ids", string(v)) - - } - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 404 { - ps := &ListSingleSend500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ListSingleSend500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_singlesends/api_duplicate_single_send.go b/rest/api/v3/mc_singlesends/api_duplicate_single_send.go deleted file mode 100644 index 69f9b94c..00000000 --- a/rest/api/v3/mc_singlesends/api_duplicate_single_send.go +++ /dev/null @@ -1,92 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DuplicateSingleSendParam struct { - // - Id *string `json:"id"` - // - DuplicateSingleSendRequest *DuplicateSingleSendRequest `json:"DuplicateSingleSendRequest,omitempty"` -} - -func (params *DuplicateSingleSendParam) SetId(Id string) *DuplicateSingleSendParam { - params.Id = &Id - return params -} -func (params *DuplicateSingleSendParam) SetDuplicateSingleSendRequest(DuplicateSingleSendRequest DuplicateSingleSendRequest) *DuplicateSingleSendParam { - params.DuplicateSingleSendRequest = &DuplicateSingleSendRequest - return params -} - -// **This endpoint allows you to duplicate an existing Single Send using its Single Send ID.** Duplicating a Single Send is useful when you want to create a Single Send but don't want to start from scratch. Once duplicated, you can update or edit the Single Send by making a PATCH request to the `/marketing/singlesends/{id}` endpoint. If you leave the `name` field blank, your duplicate will be assigned the name of the Single Send it was copied from with the text “Copy of ” prepended to it. The `name` field length is limited to 100 characters, so the end of the new Single Send name, including “Copy of ”, will be trimmed if the name exceeds this limit. -func (c *ApiService) DuplicateSingleSend(params *DuplicateSingleSendParam) (interface{}, error) { - path := "/v3/marketing/singlesends/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.DuplicateSingleSendRequest != nil { - b, err := json.Marshal(*params.DuplicateSingleSendRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &SinglesendResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ListSingleSend500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ListSingleSend500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_singlesends/api_get_single_send.go b/rest/api/v3/mc_singlesends/api_get_single_send.go deleted file mode 100644 index b1ca735e..00000000 --- a/rest/api/v3/mc_singlesends/api_get_single_send.go +++ /dev/null @@ -1,77 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetSingleSendParam struct { - // - Id *string `json:"id"` -} - -func (params *GetSingleSendParam) SetId(Id string) *GetSingleSendParam { - params.Id = &Id - return params -} - -// **This endpoint allows you to retrieve details about one Single Send using a Single Send ID.** You can retrieve all of your Single Sends by making a GET request to the `/marketing/singlesends` endpoint. -func (c *ApiService) GetSingleSend(params *GetSingleSendParam) (interface{}, error) { - path := "/v3/marketing/singlesends/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SinglesendResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ListSingleSend500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ListSingleSend500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_singlesends/api_list_category.go b/rest/api/v3/mc_singlesends/api_list_category.go deleted file mode 100644 index ab3b5169..00000000 --- a/rest/api/v3/mc_singlesends/api_list_category.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListCategoryParam struct { -} - -// **This endpoint allows you to retrieve all the categories associated with your Single Sends.** This endpoint will return your latest 1,000 categories. -func (c *ApiService) ListCategory() (interface{}, error) { - path := "/v3/marketing/singlesends/categories" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListCategory200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ListSingleSend500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_singlesends/api_list_single_send.go b/rest/api/v3/mc_singlesends/api_list_single_send.go deleted file mode 100644 index 816a5ecc..00000000 --- a/rest/api/v3/mc_singlesends/api_list_single_send.go +++ /dev/null @@ -1,78 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListSingleSendParam struct { - // - PageSize *int32 `json:"page_size,omitempty"` - // - PageToken *string `json:"page_token,omitempty"` -} - -func (params *ListSingleSendParam) SetPageSize(PageSize int32) *ListSingleSendParam { - params.PageSize = &PageSize - return params -} -func (params *ListSingleSendParam) SetPageToken(PageToken string) *ListSingleSendParam { - params.PageToken = &PageToken - return params -} - -// **This endpoint allows you to retrieve all your Single Sends.** Returns all of your Single Sends with condensed details about each, including the Single Sends' IDs. For more details about an individual Single Send, pass the Single Send's ID to the `/marketing/singlesends/{id}` endpoint. -func (c *ApiService) ListSingleSend(params *ListSingleSendParam) (interface{}, error) { - path := "/v3/marketing/singlesends" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.PageSize != nil { - data.Set("page_size", fmt.Sprint(*params.PageSize)) - } - if params != nil && params.PageToken != nil { - data.Set("page_token", *params.PageToken) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListSingleSend200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ListSingleSend500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_singlesends/api_schedule_single_send.go b/rest/api/v3/mc_singlesends/api_schedule_single_send.go deleted file mode 100644 index 93697983..00000000 --- a/rest/api/v3/mc_singlesends/api_schedule_single_send.go +++ /dev/null @@ -1,92 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type ScheduleSingleSendParam struct { - // - Id *string `json:"id"` - // - ScheduleSingleSendRequest *ScheduleSingleSendRequest `json:"ScheduleSingleSendRequest,omitempty"` -} - -func (params *ScheduleSingleSendParam) SetId(Id string) *ScheduleSingleSendParam { - params.Id = &Id - return params -} -func (params *ScheduleSingleSendParam) SetScheduleSingleSendRequest(ScheduleSingleSendRequest ScheduleSingleSendRequest) *ScheduleSingleSendParam { - params.ScheduleSingleSendRequest = &ScheduleSingleSendRequest - return params -} - -// **This endpoint allows you to send a Single Send immediately or schedule it to be sent at a later time.** To send your message immediately, set the `send_at` property value to the string `now`. To schedule the Single Send for future delivery, set the `send_at` value to your desired send time in [ISO 8601 date time format](https://www.iso.org/iso-8601-date-and-time-format.html) (`yyyy-MM-ddTHH:mm:ssZ`). -func (c *ApiService) ScheduleSingleSend(params *ScheduleSingleSendParam) (interface{}, error) { - path := "/v3/marketing/singlesends/{Id}/schedule" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.ScheduleSingleSendRequest != nil { - b, err := json.Marshal(*params.ScheduleSingleSendRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &ScheduleSingleSend201Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ListSingleSend500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ListSingleSend500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_singlesends/api_search_single_send.go b/rest/api/v3/mc_singlesends/api_search_single_send.go deleted file mode 100644 index a90ea71e..00000000 --- a/rest/api/v3/mc_singlesends/api_search_single_send.go +++ /dev/null @@ -1,92 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type SearchSingleSendParam struct { - // - PageSize *int32 `json:"page_size,omitempty"` - // - PageToken *string `json:"page_token,omitempty"` - // - SinglesendSearch *SinglesendSearch `json:"SinglesendSearch,omitempty"` -} - -func (params *SearchSingleSendParam) SetPageSize(PageSize int32) *SearchSingleSendParam { - params.PageSize = &PageSize - return params -} -func (params *SearchSingleSendParam) SetPageToken(PageToken string) *SearchSingleSendParam { - params.PageToken = &PageToken - return params -} -func (params *SearchSingleSendParam) SetSinglesendSearch(SinglesendSearch SinglesendSearch) *SearchSingleSendParam { - params.SinglesendSearch = &SinglesendSearch - return params -} - -// **This endpoint allows you to search for Single Sends based on specified criteria.** You can search for Single Sends by passing a combination of values using the `name`, `status`, and `categories` request body fields. For example, if you want to search for all Single Sends that are \"drafts\" or \"scheduled\" and also associated with the category \"shoes,\" your request body may look like the example below. ```javascript { \"status\": [ \"draft\", \"scheduled\" ], \"categories\": [ \"shoes\" ], } ``` -func (c *ApiService) SearchSingleSend(params *SearchSingleSendParam) (interface{}, error) { - path := "/v3/marketing/singlesends/search" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - if params != nil && params.PageSize != nil { - data.Set("page_size", fmt.Sprint(*params.PageSize)) - } - if params != nil && params.PageToken != nil { - data.Set("page_token", *params.PageToken) - } - body := []byte{} - if params != nil && params.SinglesendSearch != nil { - b, err := json.Marshal(*params.SinglesendSearch) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListSingleSend200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ListSingleSend500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_singlesends/api_service.go b/rest/api/v3/mc_singlesends/api_service.go deleted file mode 100644 index dbf3b326..00000000 --- a/rest/api/v3/mc_singlesends/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/mc_singlesends/api_update_single_send.go b/rest/api/v3/mc_singlesends/api_update_single_send.go deleted file mode 100644 index eac06395..00000000 --- a/rest/api/v3/mc_singlesends/api_update_single_send.go +++ /dev/null @@ -1,100 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type UpdateSingleSendParam struct { - // - Id *string `json:"id"` - // - SinglesendRequest *SinglesendRequest `json:"SinglesendRequest,omitempty"` -} - -func (params *UpdateSingleSendParam) SetId(Id string) *UpdateSingleSendParam { - params.Id = &Id - return params -} -func (params *UpdateSingleSendParam) SetSinglesendRequest(SinglesendRequest SinglesendRequest) *UpdateSingleSendParam { - params.SinglesendRequest = &SinglesendRequest - return params -} - -// **This endpoint allows you to update a Single Send using a Single Send ID.** You only need to pass the properties you want to update. Any blank or missing properties will remain unaltered. This endpoint will update a draft of the Single Send but will not send it or schedule it to be sent. Any `send_at` property value set with this endpoint will prepopulate the Single Send's send date. However, the Single Send will remain an unscheduled draft until it's updated with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI. -func (c *ApiService) UpdateSingleSend(params *UpdateSingleSendParam) (interface{}, error) { - path := "/v3/marketing/singlesends/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.SinglesendRequest != nil { - b, err := json.Marshal(*params.SinglesendRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 202 { - ps := &SinglesendResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ListSingleSend500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ListSingleSend500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ListSingleSend500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_singlesends/docs/AbTestSummary.md b/rest/api/v3/mc_singlesends/docs/AbTestSummary.md deleted file mode 100644 index c0c3c316..00000000 --- a/rest/api/v3/mc_singlesends/docs/AbTestSummary.md +++ /dev/null @@ -1,17 +0,0 @@ -# AbTestSummary - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | [**Type**](Type.md) | What differs between the A/B tests | -**WinnerCriteria** | [**WinnerCriteria**](WinnerCriteria.md) | How the winner will be decided | -**TestPercentage** | **int32** | What percentage of your recipient will be included in your A/B testing | -**Duration** | **string** | How long the A/B Testing will last | -**WinningTemplateId** | **string** | Winner of the A/B Test | -**WinnerSelectedAt** | **string** | When the winner was selected | -**ExpirationDate** | **string** | Last day to select an A/B Test Winner | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_singlesends/docs/CreateSingleSend.md b/rest/api/v3/mc_singlesends/docs/CreateSingleSend.md deleted file mode 100644 index 41b0107b..00000000 --- a/rest/api/v3/mc_singlesends/docs/CreateSingleSend.md +++ /dev/null @@ -1,48 +0,0 @@ -# CreateSingleSend - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateSingleSend**](CreateSingleSend.md#CreateSingleSend) | **Post** /v3/marketing/singlesends | Create Single Send - - - -## CreateSingleSend - -> SinglesendResponse CreateSingleSend(ctx, optional) - -Create Single Send - -**This endpoint allows you to create a new Single Send.** Please note that if you are migrating from the previous version of Single Sends, you no longer need to pass a template ID with your request to this endpoint. Instead, you will pass all template data in the `email_config` object. This endpoint will create a draft of the Single Send but will not send it or schedule it to be sent. Any `send_at` property value set with this endpoint will prepopulate the Single Send's send date. However, the Single Send will remain an unscheduled draft until it's updated with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateSingleSendParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**SinglesendRequest** | [**SinglesendRequest**](SinglesendRequest.md) | - -### Return type - -[**SinglesendResponse**](SinglesendResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_singlesends/docs/DeleteScheduledSingleSend.md b/rest/api/v3/mc_singlesends/docs/DeleteScheduledSingleSend.md deleted file mode 100644 index e9d4fd0a..00000000 --- a/rest/api/v3/mc_singlesends/docs/DeleteScheduledSingleSend.md +++ /dev/null @@ -1,51 +0,0 @@ -# DeleteScheduledSingleSend - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteScheduledSingleSend**](DeleteScheduledSingleSend.md#DeleteScheduledSingleSend) | **Delete** /v3/marketing/singlesends/{Id}/schedule | Delete Single Send Schedule - - - -## DeleteScheduledSingleSend - -> SinglesendSchedule DeleteScheduledSingleSend(ctx, Id) - -Delete Single Send Schedule - -**This endpoint allows you to cancel a scheduled Single Send using a Single Send ID.** Making a DELETE request to this endpoint will cancel the scheduled sending of a Single Send. The request will not delete the Single Send itself. Deleting a Single Send can be done by passing a DELETE request to `/marketing/singlesends/{id}`. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteScheduledSingleSendParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**SinglesendSchedule**](SinglesendSchedule.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_singlesends/docs/DeleteSingleSend.md b/rest/api/v3/mc_singlesends/docs/DeleteSingleSend.md deleted file mode 100644 index 9d987dcb..00000000 --- a/rest/api/v3/mc_singlesends/docs/DeleteSingleSend.md +++ /dev/null @@ -1,51 +0,0 @@ -# DeleteSingleSend - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteSingleSend**](DeleteSingleSend.md#DeleteSingleSend) | **Delete** /v3/marketing/singlesends/{Id} | Delete Single Send by ID - - - -## DeleteSingleSend - -> DeleteSingleSend(ctx, Id) - -Delete Single Send by ID - -**This endpoint allows you to delete one Single Send using a Single Send ID.** To first retrieve all your Single Sends' IDs, you can make a GET request to the `/marketing/singlensends` endpoint. Please note that a `DELETE` request is permanent, and your Single Send will not be recoverable after deletion. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteSingleSendParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_singlesends/docs/DeleteSingleSends.md b/rest/api/v3/mc_singlesends/docs/DeleteSingleSends.md deleted file mode 100644 index 80c58b83..00000000 --- a/rest/api/v3/mc_singlesends/docs/DeleteSingleSends.md +++ /dev/null @@ -1,48 +0,0 @@ -# DeleteSingleSends - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteSingleSends**](DeleteSingleSends.md#DeleteSingleSends) | **Delete** /v3/marketing/singlesends | Bulk Delete Single Sends - - - -## DeleteSingleSends - -> DeleteSingleSends(ctx, optional) - -Bulk Delete Single Sends - -**This endpoint allows you to delete multiple Single Sends using an array of Single Sends IDs.** To first retrieve all your Single Sends' IDs, you can make a GET request to the `/marketing/singlensends` endpoint. Please note that a DELETE request is permanent, and your Single Sends will not be recoverable after deletion. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteSingleSendsParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Ids** | **[]string** | Single Send IDs to delete - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_singlesends/docs/DuplicateSingleSend.md b/rest/api/v3/mc_singlesends/docs/DuplicateSingleSend.md deleted file mode 100644 index 6a0272f3..00000000 --- a/rest/api/v3/mc_singlesends/docs/DuplicateSingleSend.md +++ /dev/null @@ -1,52 +0,0 @@ -# DuplicateSingleSend - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DuplicateSingleSend**](DuplicateSingleSend.md#DuplicateSingleSend) | **Post** /v3/marketing/singlesends/{Id} | Duplicate Single Send - - - -## DuplicateSingleSend - -> SinglesendResponse DuplicateSingleSend(ctx, Idoptional) - -Duplicate Single Send - -**This endpoint allows you to duplicate an existing Single Send using its Single Send ID.** Duplicating a Single Send is useful when you want to create a Single Send but don't want to start from scratch. Once duplicated, you can update or edit the Single Send by making a PATCH request to the `/marketing/singlesends/{id}` endpoint. If you leave the `name` field blank, your duplicate will be assigned the name of the Single Send it was copied from with the text “Copy of ” prepended to it. The `name` field length is limited to 100 characters, so the end of the new Single Send name, including “Copy of ”, will be trimmed if the name exceeds this limit. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a DuplicateSingleSendParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**DuplicateSingleSendRequest** | [**DuplicateSingleSendRequest**](DuplicateSingleSendRequest.md) | - -### Return type - -[**SinglesendResponse**](SinglesendResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_singlesends/docs/DuplicateSingleSendRequest.md b/rest/api/v3/mc_singlesends/docs/DuplicateSingleSendRequest.md deleted file mode 100644 index 9b9c44e6..00000000 --- a/rest/api/v3/mc_singlesends/docs/DuplicateSingleSendRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# DuplicateSingleSendRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of the duplicate Single Send. If you choose to leave the name field blank, your duplicate will be assigned the name of the Single Send it was copied from with the text 'Copy of ' prepended to it. The end of the new Single Send name, including 'Copy of ', will be trimmed if the name exceeds the character limit. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_singlesends/docs/Editor.md b/rest/api/v3/mc_singlesends/docs/Editor.md deleted file mode 100644 index 9d170841..00000000 --- a/rest/api/v3/mc_singlesends/docs/Editor.md +++ /dev/null @@ -1,13 +0,0 @@ -# Editor - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**CODE** | string | (value: `"code"`) -**DESIGN** | string | (value: `"design"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_singlesends/docs/Editor1.md b/rest/api/v3/mc_singlesends/docs/Editor1.md deleted file mode 100644 index 2ddc5d89..00000000 --- a/rest/api/v3/mc_singlesends/docs/Editor1.md +++ /dev/null @@ -1,13 +0,0 @@ -# Editor1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**CODE** | string | (value: `"code"`) -**DESIGN** | string | (value: `"design"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_singlesends/docs/GetSingleSend.md b/rest/api/v3/mc_singlesends/docs/GetSingleSend.md deleted file mode 100644 index 0c7434bb..00000000 --- a/rest/api/v3/mc_singlesends/docs/GetSingleSend.md +++ /dev/null @@ -1,51 +0,0 @@ -# GetSingleSend - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetSingleSend**](GetSingleSend.md#GetSingleSend) | **Get** /v3/marketing/singlesends/{Id} | Get Single Send by ID - - - -## GetSingleSend - -> SinglesendResponse GetSingleSend(ctx, Id) - -Get Single Send by ID - -**This endpoint allows you to retrieve details about one Single Send using a Single Send ID.** You can retrieve all of your Single Sends by making a GET request to the `/marketing/singlesends` endpoint. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a GetSingleSendParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**SinglesendResponse**](SinglesendResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_singlesends/docs/Items.md b/rest/api/v3/mc_singlesends/docs/Items.md deleted file mode 100644 index 781c4ec7..00000000 --- a/rest/api/v3/mc_singlesends/docs/Items.md +++ /dev/null @@ -1,14 +0,0 @@ -# Items - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**DRAFT** | string | (value: `"draft"`) -**SCHEDULED** | string | (value: `"scheduled"`) -**TRIGGERED** | string | (value: `"triggered"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_singlesends/docs/ListCategory.md b/rest/api/v3/mc_singlesends/docs/ListCategory.md deleted file mode 100644 index 4f7a81be..00000000 --- a/rest/api/v3/mc_singlesends/docs/ListCategory.md +++ /dev/null @@ -1,44 +0,0 @@ -# ListCategory - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListCategory**](ListCategory.md#ListCategory) | **Get** /v3/marketing/singlesends/categories | Get All Categories - - - -## ListCategory - -> ListCategory200Response ListCategory(ctx, ) - -Get All Categories - -**This endpoint allows you to retrieve all the categories associated with your Single Sends.** This endpoint will return your latest 1,000 categories. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListCategoryParams struct - - -### Return type - -[**ListCategory200Response**](ListCategory200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_singlesends/docs/ListCategory200Response.md b/rest/api/v3/mc_singlesends/docs/ListCategory200Response.md deleted file mode 100644 index 27af5839..00000000 --- a/rest/api/v3/mc_singlesends/docs/ListCategory200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListCategory200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Categories** | **[]string** | list of latest one thousand unique categories associated with all Single Sends in ascending order |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_singlesends/docs/ListSingleSend.md b/rest/api/v3/mc_singlesends/docs/ListSingleSend.md deleted file mode 100644 index fee8c3fb..00000000 --- a/rest/api/v3/mc_singlesends/docs/ListSingleSend.md +++ /dev/null @@ -1,49 +0,0 @@ -# ListSingleSend - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListSingleSend**](ListSingleSend.md#ListSingleSend) | **Get** /v3/marketing/singlesends | Get All Single Sends - - - -## ListSingleSend - -> ListSingleSend200Response ListSingleSend(ctx, optional) - -Get All Single Sends - -**This endpoint allows you to retrieve all your Single Sends.** Returns all of your Single Sends with condensed details about each, including the Single Sends' IDs. For more details about an individual Single Send, pass the Single Send's ID to the `/marketing/singlesends/{id}` endpoint. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListSingleSendParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**PageSize** | **int32** | -**PageToken** | **string** | - -### Return type - -[**ListSingleSend200Response**](ListSingleSend200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_singlesends/docs/ListSingleSend200Response.md b/rest/api/v3/mc_singlesends/docs/ListSingleSend200Response.md deleted file mode 100644 index 8ad91d0e..00000000 --- a/rest/api/v3/mc_singlesends/docs/ListSingleSend200Response.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListSingleSend200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]SinglesendResponseShort**](SinglesendResponseShort.md) | |[optional] -**Metadata** | [**Metadata**](Metadata.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_singlesends/docs/ListSingleSend500Response.md b/rest/api/v3/mc_singlesends/docs/ListSingleSend500Response.md deleted file mode 100644 index a07c4f3a..00000000 --- a/rest/api/v3/mc_singlesends/docs/ListSingleSend500Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListSingleSend500Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ListSingleSend500ResponseErrorsInner**](ListSingleSend500ResponseErrorsInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_singlesends/docs/ListSingleSend500ResponseErrorsInner.md b/rest/api/v3/mc_singlesends/docs/ListSingleSend500ResponseErrorsInner.md deleted file mode 100644 index 24c6f3f9..00000000 --- a/rest/api/v3/mc_singlesends/docs/ListSingleSend500ResponseErrorsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListSingleSend500ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Field** | **string** | |[optional] -**Message** | **string** | |[optional] -**ErrorId** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_singlesends/docs/Metadata.md b/rest/api/v3/mc_singlesends/docs/Metadata.md deleted file mode 100644 index 6121300c..00000000 --- a/rest/api/v3/mc_singlesends/docs/Metadata.md +++ /dev/null @@ -1,14 +0,0 @@ -# Metadata - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Prev** | **string** | |[optional] -**Self** | **string** | |[optional] -**Next** | **string** | |[optional] -**Count** | **int32** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_singlesends/docs/ScheduleSingleSend.md b/rest/api/v3/mc_singlesends/docs/ScheduleSingleSend.md deleted file mode 100644 index 738548c6..00000000 --- a/rest/api/v3/mc_singlesends/docs/ScheduleSingleSend.md +++ /dev/null @@ -1,52 +0,0 @@ -# ScheduleSingleSend - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ScheduleSingleSend**](ScheduleSingleSend.md#ScheduleSingleSend) | **Put** /v3/marketing/singlesends/{Id}/schedule | Schedule Single Send - - - -## ScheduleSingleSend - -> ScheduleSingleSend201Response ScheduleSingleSend(ctx, Idoptional) - -Schedule Single Send - -**This endpoint allows you to send a Single Send immediately or schedule it to be sent at a later time.** To send your message immediately, set the `send_at` property value to the string `now`. To schedule the Single Send for future delivery, set the `send_at` value to your desired send time in [ISO 8601 date time format](https://www.iso.org/iso-8601-date-and-time-format.html) (`yyyy-MM-ddTHH:mm:ssZ`). - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a ScheduleSingleSendParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**ScheduleSingleSendRequest** | [**ScheduleSingleSendRequest**](ScheduleSingleSendRequest.md) | - -### Return type - -[**ScheduleSingleSend201Response**](ScheduleSingleSend201Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_singlesends/docs/ScheduleSingleSend201Response.md b/rest/api/v3/mc_singlesends/docs/ScheduleSingleSend201Response.md deleted file mode 100644 index 565341af..00000000 --- a/rest/api/v3/mc_singlesends/docs/ScheduleSingleSend201Response.md +++ /dev/null @@ -1,12 +0,0 @@ -# ScheduleSingleSend201Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SendAt** | [**time.Time**](time.Time.md) | The ISO 8601 time at which to send the Single Send. This must be in future or the string `now`. SendGrid [Mail Send](https://docs.sendgrid.com/api-reference/mail-send/mail-send) emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via [Marketing Campaigns](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns/). |[optional] -**Status** | [**Status**](Status.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_singlesends/docs/ScheduleSingleSendRequest.md b/rest/api/v3/mc_singlesends/docs/ScheduleSingleSendRequest.md deleted file mode 100644 index 02842731..00000000 --- a/rest/api/v3/mc_singlesends/docs/ScheduleSingleSendRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# ScheduleSingleSendRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SendAt** | [**time.Time**](time.Time.md) | The ISO 8601 time at which to send the Single Send. This must be in future or the string `now`. SendGrid [Mail Send](https://docs.sendgrid.com/api-reference/mail-send/mail-send) emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via [Marketing Campaigns](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns/). | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_singlesends/docs/SearchSingleSend.md b/rest/api/v3/mc_singlesends/docs/SearchSingleSend.md deleted file mode 100644 index cf141ace..00000000 --- a/rest/api/v3/mc_singlesends/docs/SearchSingleSend.md +++ /dev/null @@ -1,50 +0,0 @@ -# SearchSingleSend - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**SearchSingleSend**](SearchSingleSend.md#SearchSingleSend) | **Post** /v3/marketing/singlesends/search | Get Single Sends Search - - - -## SearchSingleSend - -> ListSingleSend200Response SearchSingleSend(ctx, optional) - -Get Single Sends Search - -**This endpoint allows you to search for Single Sends based on specified criteria.** You can search for Single Sends by passing a combination of values using the `name`, `status`, and `categories` request body fields. For example, if you want to search for all Single Sends that are \"drafts\" or \"scheduled\" and also associated with the category \"shoes,\" your request body may look like the example below. ```javascript { \"status\": [ \"draft\", \"scheduled\" ], \"categories\": [ \"shoes\" ], } ``` - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a SearchSingleSendParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**PageSize** | **int32** | -**PageToken** | **string** | -**SinglesendSearch** | [**SinglesendSearch**](SinglesendSearch.md) | - -### Return type - -[**ListSingleSend200Response**](ListSingleSend200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendRequest.md b/rest/api/v3/mc_singlesends/docs/SinglesendRequest.md deleted file mode 100644 index b84a5487..00000000 --- a/rest/api/v3/mc_singlesends/docs/SinglesendRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# SinglesendRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of the Single Send. | -**Categories** | **[]string** | The categories to associate with this Single Send. |[optional] -**SendAt** | [**time.Time**](time.Time.md) | Set this property to an ISO 8601 formatted date-time when you would like to send the Single Send. Please note that any `send_at` property value set with this endpoint will prepopulate the send date in the SendGrid user interface (UI). However, the Single Send will remain an unscheduled draft until it's updated with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI. Additionally, the `now` keyword is a valid `send_at` value only when using the Schedule Single Send endpoint. Setting this property to `now` with this endpoint will cause an error. |[optional] -**SendTo** | [**SinglesendRequestSendTo**](SinglesendRequestSendTo.md) | |[optional] -**EmailConfig** | [**SinglesendRequestEmailConfig**](SinglesendRequestEmailConfig.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendRequestEmailConfig.md b/rest/api/v3/mc_singlesends/docs/SinglesendRequestEmailConfig.md deleted file mode 100644 index 633bd086..00000000 --- a/rest/api/v3/mc_singlesends/docs/SinglesendRequestEmailConfig.md +++ /dev/null @@ -1,20 +0,0 @@ -# SinglesendRequestEmailConfig - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Subject** | **string** | The subject line of the Single Send. Do not include this field when using a `design_id`. |[optional] -**HtmlContent** | **string** | The HTML content of the Single Send. Do not include this field when using a `design_id`. |[optional] -**PlainContent** | **string** | The plain text content of the Single Send. Do not include this field when using a `design_id`. |[optional] -**GeneratePlainContent** | **bool** | If set to `true`, `plain_content` is always generated from `html_content`. If set to false, `plain_content` is not altered. |[optional] [default to true] -**DesignId** | **string** | A `design_id` can be used in place of `html_content`, `plain_content`, and/or `subject`. You can retrieve a design's ID from the [\"List Designs\" endpoint](https://docs.sendgrid.com/api-reference/designs-api/list-designs) or by pulling it from the design's detail page URL in the Marketing Campaigns App. |[optional] -**Editor** | [**Editor**](Editor.md) | The editor — `\"design\"` or `\"code\"` — used to modify the Single Send's design in the Marketing Campaigns App. |[optional] -**SuppressionGroupId** | **int32** | The ID of the Suppression Group to allow recipients to unsubscribe — you must provide this or the `custom_unsubscribe_url`. |[optional] -**CustomUnsubscribeUrl** | **string** | The URL allowing recipients to unsubscribe — you must provide this or the `suppression_group_id`. |[optional] -**SenderId** | **int32** | The ID of the verified Sender. You can retrieve a verified Sender's ID from the [\"Get Verified Senders\" endpoint](https://www.twilio.com/docs/sendgrid/api-reference/sender-verification/get-all-verified-senders) or by pulling it from the Sender's detail page URL in the SendGrid App. |[optional] -**IpPool** | **string** | The name of the IP Pool from which the Single Send emails are sent. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendRequestSendTo.md b/rest/api/v3/mc_singlesends/docs/SinglesendRequestSendTo.md deleted file mode 100644 index f1f2d523..00000000 --- a/rest/api/v3/mc_singlesends/docs/SinglesendRequestSendTo.md +++ /dev/null @@ -1,13 +0,0 @@ -# SinglesendRequestSendTo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ListIds** | **[]string** | The recipient List IDs that will receive the Single Send. |[optional] -**SegmentIds** | **[]string** | The recipient Segment IDs that will receive the Single Send. |[optional] -**All** | **bool** | Set to `true` to send to All Contacts. If set to `false`, at least one `list_ids` or `segment_ids` value must be provided before the Single Send is scheduled to be sent to recipients. |[optional] [default to false] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendResponse.md b/rest/api/v3/mc_singlesends/docs/SinglesendResponse.md deleted file mode 100644 index 95d0cbcf..00000000 --- a/rest/api/v3/mc_singlesends/docs/SinglesendResponse.md +++ /dev/null @@ -1,20 +0,0 @@ -# SinglesendResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | The unique ID for the Single Send. |[optional] -**Name** | **string** | The name of the Single Send. |[optional] -**Status** | [**Status2**](Status2.md) | The current status of the Single Send. The status may be `draft`, `scheduled`, or `triggered`. |[optional] -**Categories** | **[]string** | The categories associated with this Single Send. |[optional] -**SendAt** | [**time.Time**](time.Time.md) | An ISO 8601 formatted date-time when the Single Send is set to be sent. Please note that any `send_at` property value will have no effect while the Single Send `status` is `draft`. You must update the Single Send with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI to schedule it. |[optional] -**SendTo** | [**SinglesendResponseSendTo**](SinglesendResponseSendTo.md) | |[optional] -**UpdatedAt** | [**time.Time**](time.Time.md) | the ISO 8601 time at which the Single Send was last updated. |[optional] -**CreatedAt** | [**time.Time**](time.Time.md) | the ISO 8601 time at which the Single Send was created. |[optional] -**EmailConfig** | [**SinglesendResponseEmailConfig**](SinglesendResponseEmailConfig.md) | |[optional] -**Warnings** | [**[]SinglesendResponseWarningsInner**](SinglesendResponseWarningsInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendResponseEmailConfig.md b/rest/api/v3/mc_singlesends/docs/SinglesendResponseEmailConfig.md deleted file mode 100644 index e9faf1fb..00000000 --- a/rest/api/v3/mc_singlesends/docs/SinglesendResponseEmailConfig.md +++ /dev/null @@ -1,20 +0,0 @@ -# SinglesendResponseEmailConfig - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Subject** | **string** | The subject line of the Single Send. This property is not used when a `design_id` value is set. |[optional] -**HtmlContent** | **string** | The HTML content of the Single Send. This property is not used when a `design_id` value is set. |[optional] -**PlainContent** | **string** | The plain text content of the Single Send. This property is not used when a `design_id` value is set. |[optional] -**GeneratePlainContent** | **bool** | If this property is set to `true`, `plain_content` is always generated from `html_content`. If it's set to false, `plain_content` is not altered. |[optional] [default to true] -**DesignId** | **string** | A `design_id` can be used in place of `html_content`, `plain_content`, and/or `subject`. You can retrieve a design's ID from the [**List Designs** endpoint](https://docs.sendgrid.com/api-reference/designs-api/list-designs) or by pulling it from the design's detail page URL in the Marketing Campaigns App. |[optional] -**Editor** | [**Editor1**](Editor1.md) | The editor, `design` or `code`, used to modify the Single Send's design in the Marketing Campaigns application user interface. |[optional] -**SuppressionGroupId** | **int32** | The ID of the Suppression Group to allow recipients to unsubscribe. You must provide a `suppression_group_id` or the `custom_unsubscribe_url` with your Single Send. |[optional] -**CustomUnsubscribeUrl** | **string** | The URL allowing recipients to unsubscribe. You must provide a `custom_unsubscribe_url` or a `suppression_group_id` with your Single Send. |[optional] -**SenderId** | **int32** | The ID of the verified sender from whom the Single Send will be sent. You can retrieve a verified sender's ID from the [**Get Verified Senders** endpoint](https://www.twilio.com/docs/sendgrid/api-reference/sender-verification/get-all-verified-senders) or by pulling it from the sender's detail page URL in the SendGrid App. |[optional] -**IpPool** | **string** | The name of the IP Pool from which the Single Send emails are sent. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendResponseSendTo.md b/rest/api/v3/mc_singlesends/docs/SinglesendResponseSendTo.md deleted file mode 100644 index d7e33ea8..00000000 --- a/rest/api/v3/mc_singlesends/docs/SinglesendResponseSendTo.md +++ /dev/null @@ -1,13 +0,0 @@ -# SinglesendResponseSendTo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ListIds** | **[]string** | The IDs of each contact list to which the Single Send will be sent. |[optional] -**SegmentIds** | **[]string** | The IDs of each segment to which the Single Send will be sent. |[optional] -**All** | **bool** | If this property is set to `true`, the Single Send will be sent to all of your contacts. If it's set to `false`, at least one `list_ids` or `segment_ids` value must be provided before the Single Send is scheduled to be sent. |[optional] [default to false] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendResponseShort.md b/rest/api/v3/mc_singlesends/docs/SinglesendResponseShort.md deleted file mode 100644 index bfe6a053..00000000 --- a/rest/api/v3/mc_singlesends/docs/SinglesendResponseShort.md +++ /dev/null @@ -1,19 +0,0 @@ -# SinglesendResponseShort - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | | -**Name** | **string** | name of the Single Send | -**Abtest** | [**AbTestSummary**](AbTestSummary.md) | | -**Status** | [**Status3**](Status3.md) | current status of the Single Send | -**Categories** | **[]string** | categories to associate with this Single Send | -**SendAt** | [**time.Time**](time.Time.md) | The ISO 8601 time at which to send the Single Send. This must be in future or the string `now`. SendGrid [Mail Send](https://docs.sendgrid.com/api-reference/mail-send/mail-send) emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via [Marketing Campaigns](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns/). |[optional] -**IsAbtest** | **bool** | true if the Single Send's AB Test functionality has been toggled on | -**UpdatedAt** | [**time.Time**](time.Time.md) | the ISO 8601 time at which the Single Send was last updated | -**CreatedAt** | [**time.Time**](time.Time.md) | the ISO 8601 time at which the Single Send was created | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendResponseWarningsInner.md b/rest/api/v3/mc_singlesends/docs/SinglesendResponseWarningsInner.md deleted file mode 100644 index 15c969c3..00000000 --- a/rest/api/v3/mc_singlesends/docs/SinglesendResponseWarningsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# SinglesendResponseWarningsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | |[optional] -**Field** | **string** | |[optional] -**WarningId** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendSchedule.md b/rest/api/v3/mc_singlesends/docs/SinglesendSchedule.md deleted file mode 100644 index df6d4402..00000000 --- a/rest/api/v3/mc_singlesends/docs/SinglesendSchedule.md +++ /dev/null @@ -1,12 +0,0 @@ -# SinglesendSchedule - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SendAt** | [**time.Time**](time.Time.md) | The ISO 8601 time at which to send the Single Send. This must be in future or the string `now`. SendGrid [Mail Send](https://docs.sendgrid.com/api-reference/mail-send/mail-send) emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via [Marketing Campaigns](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns/). | -**Status** | [**Status1**](Status1.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendSearch.md b/rest/api/v3/mc_singlesends/docs/SinglesendSearch.md deleted file mode 100644 index 79589188..00000000 --- a/rest/api/v3/mc_singlesends/docs/SinglesendSearch.md +++ /dev/null @@ -1,13 +0,0 @@ -# SinglesendSearch - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | leading and trailing wildcard search on name of the Single Send |[optional] -**Status** | [**[]Items**](Items.md) | current status of the Single Send |[optional] -**Categories** | **[]string** | categories to associate with this Single Send, match any single send that has at least one of the categories |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_singlesends/docs/Status.md b/rest/api/v3/mc_singlesends/docs/Status.md deleted file mode 100644 index 533fff83..00000000 --- a/rest/api/v3/mc_singlesends/docs/Status.md +++ /dev/null @@ -1,12 +0,0 @@ -# Status - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**SCHEDULED** | string | (value: `"scheduled"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_singlesends/docs/Status1.md b/rest/api/v3/mc_singlesends/docs/Status1.md deleted file mode 100644 index b19ad21b..00000000 --- a/rest/api/v3/mc_singlesends/docs/Status1.md +++ /dev/null @@ -1,14 +0,0 @@ -# Status1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**DRAFT** | string | (value: `"draft"`) -**SCHEDULED** | string | (value: `"scheduled"`) -**TRIGGERED** | string | (value: `"triggered"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_singlesends/docs/Status2.md b/rest/api/v3/mc_singlesends/docs/Status2.md deleted file mode 100644 index eb4cca4d..00000000 --- a/rest/api/v3/mc_singlesends/docs/Status2.md +++ /dev/null @@ -1,14 +0,0 @@ -# Status2 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**DRAFT** | string | (value: `"draft"`) -**SCHEDULED** | string | (value: `"scheduled"`) -**TRIGGERED** | string | (value: `"triggered"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_singlesends/docs/Status3.md b/rest/api/v3/mc_singlesends/docs/Status3.md deleted file mode 100644 index 1b7a0104..00000000 --- a/rest/api/v3/mc_singlesends/docs/Status3.md +++ /dev/null @@ -1,14 +0,0 @@ -# Status3 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**DRAFT** | string | (value: `"draft"`) -**SCHEDULED** | string | (value: `"scheduled"`) -**TRIGGERED** | string | (value: `"triggered"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_singlesends/docs/Type.md b/rest/api/v3/mc_singlesends/docs/Type.md deleted file mode 100644 index 1ea1cee4..00000000 --- a/rest/api/v3/mc_singlesends/docs/Type.md +++ /dev/null @@ -1,13 +0,0 @@ -# Type - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**SUBJECT** | string | (value: `"subject"`) -**CONTENT** | string | (value: `"content"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_singlesends/docs/UpdateSingleSend.md b/rest/api/v3/mc_singlesends/docs/UpdateSingleSend.md deleted file mode 100644 index 9614a701..00000000 --- a/rest/api/v3/mc_singlesends/docs/UpdateSingleSend.md +++ /dev/null @@ -1,52 +0,0 @@ -# UpdateSingleSend - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateSingleSend**](UpdateSingleSend.md#UpdateSingleSend) | **Patch** /v3/marketing/singlesends/{Id} | Update Single Send - - - -## UpdateSingleSend - -> SinglesendResponse UpdateSingleSend(ctx, Idoptional) - -Update Single Send - -**This endpoint allows you to update a Single Send using a Single Send ID.** You only need to pass the properties you want to update. Any blank or missing properties will remain unaltered. This endpoint will update a draft of the Single Send but will not send it or schedule it to be sent. Any `send_at` property value set with this endpoint will prepopulate the Single Send's send date. However, the Single Send will remain an unscheduled draft until it's updated with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateSingleSendParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**SinglesendRequest** | [**SinglesendRequest**](SinglesendRequest.md) | - -### Return type - -[**SinglesendResponse**](SinglesendResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_singlesends/docs/WinnerCriteria.md b/rest/api/v3/mc_singlesends/docs/WinnerCriteria.md deleted file mode 100644 index d35ce1e3..00000000 --- a/rest/api/v3/mc_singlesends/docs/WinnerCriteria.md +++ /dev/null @@ -1,14 +0,0 @@ -# WinnerCriteria - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**OPEN** | string | (value: `"open"`) -**CLICK** | string | (value: `"click"`) -**MANUAL** | string | (value: `"manual"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_singlesends/model_ab_test_summary.go b/rest/api/v3/mc_singlesends/model_ab_test_summary.go deleted file mode 100644 index c7a67236..00000000 --- a/rest/api/v3/mc_singlesends/model_ab_test_summary.go +++ /dev/null @@ -1,32 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AbTestSummary struct for AbTestSummary -type AbTestSummary struct { - // What differs between the A/B tests - Type Type `json:"type"` - // How the winner will be decided - WinnerCriteria WinnerCriteria `json:"winner_criteria"` - // What percentage of your recipient will be included in your A/B testing - TestPercentage int32 `json:"test_percentage"` - // How long the A/B Testing will last - Duration string `json:"duration"` - // Winner of the A/B Test - WinningTemplateId string `json:"winning_template_id"` - // When the winner was selected - WinnerSelectedAt string `json:"winner_selected_at"` - // Last day to select an A/B Test Winner - ExpirationDate string `json:"expiration_date"` -} diff --git a/rest/api/v3/mc_singlesends/model_duplicate_single_send_request.go b/rest/api/v3/mc_singlesends/model_duplicate_single_send_request.go deleted file mode 100644 index 48f96a53..00000000 --- a/rest/api/v3/mc_singlesends/model_duplicate_single_send_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DuplicateSingleSendRequest struct for DuplicateSingleSendRequest -type DuplicateSingleSendRequest struct { - // The name of the duplicate Single Send. If you choose to leave the name field blank, your duplicate will be assigned the name of the Single Send it was copied from with the text 'Copy of ' prepended to it. The end of the new Single Send name, including 'Copy of ', will be trimmed if the name exceeds the character limit. - Name *string `json:"name,omitempty"` -} diff --git a/rest/api/v3/mc_singlesends/model_editor.go b/rest/api/v3/mc_singlesends/model_editor.go deleted file mode 100644 index d498173d..00000000 --- a/rest/api/v3/mc_singlesends/model_editor.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Editor the model 'Editor' -type Editor string - -// List of Editor -const ( - EDITOR_CODE Editor = "code" - EDITOR_DESIGN Editor = "design" -) diff --git a/rest/api/v3/mc_singlesends/model_editor1.go b/rest/api/v3/mc_singlesends/model_editor1.go deleted file mode 100644 index b5e0aff7..00000000 --- a/rest/api/v3/mc_singlesends/model_editor1.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Editor1 the model 'Editor1' -type Editor1 string - -// List of Editor1 -const ( - EDITOR1_CODE Editor1 = "code" - EDITOR1_DESIGN Editor1 = "design" -) diff --git a/rest/api/v3/mc_singlesends/model_items.go b/rest/api/v3/mc_singlesends/model_items.go deleted file mode 100644 index cb49393e..00000000 --- a/rest/api/v3/mc_singlesends/model_items.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Items the model 'Items' -type Items string - -// List of Items -const ( - ITEMS_DRAFT Items = "draft" - ITEMS_SCHEDULED Items = "scheduled" - ITEMS_TRIGGERED Items = "triggered" -) diff --git a/rest/api/v3/mc_singlesends/model_list_category_200_response.go b/rest/api/v3/mc_singlesends/model_list_category_200_response.go deleted file mode 100644 index 53e5017a..00000000 --- a/rest/api/v3/mc_singlesends/model_list_category_200_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListCategory200Response struct for ListCategory200Response -type ListCategory200Response struct { - // list of latest one thousand unique categories associated with all Single Sends in ascending order - Categories *[]string `json:"categories,omitempty"` -} diff --git a/rest/api/v3/mc_singlesends/model_list_single_send_200_response.go b/rest/api/v3/mc_singlesends/model_list_single_send_200_response.go deleted file mode 100644 index 655bd91e..00000000 --- a/rest/api/v3/mc_singlesends/model_list_single_send_200_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSingleSend200Response struct for ListSingleSend200Response -type ListSingleSend200Response struct { - Result *[]SinglesendResponseShort `json:"result,omitempty"` - Metadata *Metadata `json:"_metadata,omitempty"` -} diff --git a/rest/api/v3/mc_singlesends/model_list_single_send_500_response.go b/rest/api/v3/mc_singlesends/model_list_single_send_500_response.go deleted file mode 100644 index 4475e149..00000000 --- a/rest/api/v3/mc_singlesends/model_list_single_send_500_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSingleSend500Response struct for ListSingleSend500Response -type ListSingleSend500Response struct { - Errors *[]ListSingleSend500ResponseErrorsInner `json:"errors,omitempty"` -} diff --git a/rest/api/v3/mc_singlesends/model_list_single_send_500_response_errors_inner.go b/rest/api/v3/mc_singlesends/model_list_single_send_500_response_errors_inner.go deleted file mode 100644 index 00fae477..00000000 --- a/rest/api/v3/mc_singlesends/model_list_single_send_500_response_errors_inner.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSingleSend500ResponseErrorsInner struct for ListSingleSend500ResponseErrorsInner -type ListSingleSend500ResponseErrorsInner struct { - Field *string `json:"field,omitempty"` - Message *string `json:"message,omitempty"` - ErrorId *string `json:"error_id,omitempty"` -} diff --git a/rest/api/v3/mc_singlesends/model_metadata.go b/rest/api/v3/mc_singlesends/model_metadata.go deleted file mode 100644 index 56fb60e7..00000000 --- a/rest/api/v3/mc_singlesends/model_metadata.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Metadata struct for Metadata -type Metadata struct { - Prev *string `json:"prev,omitempty"` - Self *string `json:"self,omitempty"` - Next *string `json:"next,omitempty"` - Count *int32 `json:"count,omitempty"` -} diff --git a/rest/api/v3/mc_singlesends/model_schedule_single_send_201_response.go b/rest/api/v3/mc_singlesends/model_schedule_single_send_201_response.go deleted file mode 100644 index 01d2c672..00000000 --- a/rest/api/v3/mc_singlesends/model_schedule_single_send_201_response.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "time" -) - -// ScheduleSingleSend201Response struct for ScheduleSingleSend201Response -type ScheduleSingleSend201Response struct { - // The ISO 8601 time at which to send the Single Send. This must be in future or the string `now`. SendGrid [Mail Send](https://docs.sendgrid.com/api-reference/mail-send/mail-send) emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via [Marketing Campaigns](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns/). - SendAt *time.Time `json:"send_at,omitempty"` - Status *Status `json:"status,omitempty"` -} diff --git a/rest/api/v3/mc_singlesends/model_schedule_single_send_request.go b/rest/api/v3/mc_singlesends/model_schedule_single_send_request.go deleted file mode 100644 index cf2c6448..00000000 --- a/rest/api/v3/mc_singlesends/model_schedule_single_send_request.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "time" -) - -// ScheduleSingleSendRequest struct for ScheduleSingleSendRequest -type ScheduleSingleSendRequest struct { - // The ISO 8601 time at which to send the Single Send. This must be in future or the string `now`. SendGrid [Mail Send](https://docs.sendgrid.com/api-reference/mail-send/mail-send) emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via [Marketing Campaigns](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns/). - SendAt time.Time `json:"send_at"` -} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_request.go b/rest/api/v3/mc_singlesends/model_singlesend_request.go deleted file mode 100644 index 790d1be9..00000000 --- a/rest/api/v3/mc_singlesends/model_singlesend_request.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "time" -) - -// SinglesendRequest struct for SinglesendRequest -type SinglesendRequest struct { - // The name of the Single Send. - Name string `json:"name"` - // The categories to associate with this Single Send. - Categories *[]string `json:"categories,omitempty"` - // Set this property to an ISO 8601 formatted date-time when you would like to send the Single Send. Please note that any `send_at` property value set with this endpoint will prepopulate the send date in the SendGrid user interface (UI). However, the Single Send will remain an unscheduled draft until it's updated with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI. Additionally, the `now` keyword is a valid `send_at` value only when using the Schedule Single Send endpoint. Setting this property to `now` with this endpoint will cause an error. - SendAt *time.Time `json:"send_at,omitempty"` - SendTo *SinglesendRequestSendTo `json:"send_to,omitempty"` - EmailConfig *SinglesendRequestEmailConfig `json:"email_config,omitempty"` -} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_request_email_config.go b/rest/api/v3/mc_singlesends/model_singlesend_request_email_config.go deleted file mode 100644 index 666324db..00000000 --- a/rest/api/v3/mc_singlesends/model_singlesend_request_email_config.go +++ /dev/null @@ -1,38 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SinglesendRequestEmailConfig struct for SinglesendRequestEmailConfig -type SinglesendRequestEmailConfig struct { - // The subject line of the Single Send. Do not include this field when using a `design_id`. - Subject *string `json:"subject,omitempty"` - // The HTML content of the Single Send. Do not include this field when using a `design_id`. - HtmlContent *string `json:"html_content,omitempty"` - // The plain text content of the Single Send. Do not include this field when using a `design_id`. - PlainContent *string `json:"plain_content,omitempty"` - // If set to `true`, `plain_content` is always generated from `html_content`. If set to false, `plain_content` is not altered. - GeneratePlainContent *bool `json:"generate_plain_content,omitempty"` - // A `design_id` can be used in place of `html_content`, `plain_content`, and/or `subject`. You can retrieve a design's ID from the [\"List Designs\" endpoint](https://docs.sendgrid.com/api-reference/designs-api/list-designs) or by pulling it from the design's detail page URL in the Marketing Campaigns App. - DesignId *string `json:"design_id,omitempty"` - // The editor — `\"design\"` or `\"code\"` — used to modify the Single Send's design in the Marketing Campaigns App. - Editor *Editor `json:"editor,omitempty"` - // The ID of the Suppression Group to allow recipients to unsubscribe — you must provide this or the `custom_unsubscribe_url`. - SuppressionGroupId *int32 `json:"suppression_group_id,omitempty"` - // The URL allowing recipients to unsubscribe — you must provide this or the `suppression_group_id`. - CustomUnsubscribeUrl *string `json:"custom_unsubscribe_url,omitempty"` - // The ID of the verified Sender. You can retrieve a verified Sender's ID from the [\"Get Verified Senders\" endpoint](https://www.twilio.com/docs/sendgrid/api-reference/sender-verification/get-all-verified-senders) or by pulling it from the Sender's detail page URL in the SendGrid App. - SenderId *int32 `json:"sender_id,omitempty"` - // The name of the IP Pool from which the Single Send emails are sent. - IpPool *string `json:"ip_pool,omitempty"` -} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_request_send_to.go b/rest/api/v3/mc_singlesends/model_singlesend_request_send_to.go deleted file mode 100644 index 5de4bf4b..00000000 --- a/rest/api/v3/mc_singlesends/model_singlesend_request_send_to.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SinglesendRequestSendTo struct for SinglesendRequestSendTo -type SinglesendRequestSendTo struct { - // The recipient List IDs that will receive the Single Send. - ListIds *[]string `json:"list_ids,omitempty"` - // The recipient Segment IDs that will receive the Single Send. - SegmentIds *[]string `json:"segment_ids,omitempty"` - // Set to `true` to send to All Contacts. If set to `false`, at least one `list_ids` or `segment_ids` value must be provided before the Single Send is scheduled to be sent to recipients. - All *bool `json:"all,omitempty"` -} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_response.go b/rest/api/v3/mc_singlesends/model_singlesend_response.go deleted file mode 100644 index 580d2fe2..00000000 --- a/rest/api/v3/mc_singlesends/model_singlesend_response.go +++ /dev/null @@ -1,39 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "time" -) - -// SinglesendResponse struct for SinglesendResponse -type SinglesendResponse struct { - // The unique ID for the Single Send. - Id *string `json:"id,omitempty"` - // The name of the Single Send. - Name *string `json:"name,omitempty"` - // The current status of the Single Send. The status may be `draft`, `scheduled`, or `triggered`. - Status *Status2 `json:"status,omitempty"` - // The categories associated with this Single Send. - Categories *[]string `json:"categories,omitempty"` - // An ISO 8601 formatted date-time when the Single Send is set to be sent. Please note that any `send_at` property value will have no effect while the Single Send `status` is `draft`. You must update the Single Send with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI to schedule it. - SendAt *time.Time `json:"send_at,omitempty"` - SendTo *SinglesendResponseSendTo `json:"send_to,omitempty"` - // the ISO 8601 time at which the Single Send was last updated. - UpdatedAt *time.Time `json:"updated_at,omitempty"` - // the ISO 8601 time at which the Single Send was created. - CreatedAt *time.Time `json:"created_at,omitempty"` - EmailConfig *SinglesendResponseEmailConfig `json:"email_config,omitempty"` - Warnings *[]SinglesendResponseWarningsInner `json:"warnings,omitempty"` -} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_response_email_config.go b/rest/api/v3/mc_singlesends/model_singlesend_response_email_config.go deleted file mode 100644 index 678c3ac1..00000000 --- a/rest/api/v3/mc_singlesends/model_singlesend_response_email_config.go +++ /dev/null @@ -1,38 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SinglesendResponseEmailConfig struct for SinglesendResponseEmailConfig -type SinglesendResponseEmailConfig struct { - // The subject line of the Single Send. This property is not used when a `design_id` value is set. - Subject *string `json:"subject,omitempty"` - // The HTML content of the Single Send. This property is not used when a `design_id` value is set. - HtmlContent *string `json:"html_content,omitempty"` - // The plain text content of the Single Send. This property is not used when a `design_id` value is set. - PlainContent *string `json:"plain_content,omitempty"` - // If this property is set to `true`, `plain_content` is always generated from `html_content`. If it's set to false, `plain_content` is not altered. - GeneratePlainContent *bool `json:"generate_plain_content,omitempty"` - // A `design_id` can be used in place of `html_content`, `plain_content`, and/or `subject`. You can retrieve a design's ID from the [**List Designs** endpoint](https://docs.sendgrid.com/api-reference/designs-api/list-designs) or by pulling it from the design's detail page URL in the Marketing Campaigns App. - DesignId *string `json:"design_id,omitempty"` - // The editor, `design` or `code`, used to modify the Single Send's design in the Marketing Campaigns application user interface. - Editor *Editor1 `json:"editor,omitempty"` - // The ID of the Suppression Group to allow recipients to unsubscribe. You must provide a `suppression_group_id` or the `custom_unsubscribe_url` with your Single Send. - SuppressionGroupId *int32 `json:"suppression_group_id,omitempty"` - // The URL allowing recipients to unsubscribe. You must provide a `custom_unsubscribe_url` or a `suppression_group_id` with your Single Send. - CustomUnsubscribeUrl *string `json:"custom_unsubscribe_url,omitempty"` - // The ID of the verified sender from whom the Single Send will be sent. You can retrieve a verified sender's ID from the [**Get Verified Senders** endpoint](https://www.twilio.com/docs/sendgrid/api-reference/sender-verification/get-all-verified-senders) or by pulling it from the sender's detail page URL in the SendGrid App. - SenderId *int32 `json:"sender_id,omitempty"` - // The name of the IP Pool from which the Single Send emails are sent. - IpPool *string `json:"ip_pool,omitempty"` -} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_response_send_to.go b/rest/api/v3/mc_singlesends/model_singlesend_response_send_to.go deleted file mode 100644 index fee100a5..00000000 --- a/rest/api/v3/mc_singlesends/model_singlesend_response_send_to.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SinglesendResponseSendTo struct for SinglesendResponseSendTo -type SinglesendResponseSendTo struct { - // The IDs of each contact list to which the Single Send will be sent. - ListIds *[]string `json:"list_ids,omitempty"` - // The IDs of each segment to which the Single Send will be sent. - SegmentIds *[]string `json:"segment_ids,omitempty"` - // If this property is set to `true`, the Single Send will be sent to all of your contacts. If it's set to `false`, at least one `list_ids` or `segment_ids` value must be provided before the Single Send is scheduled to be sent. - All *bool `json:"all,omitempty"` -} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_response_short.go b/rest/api/v3/mc_singlesends/model_singlesend_response_short.go deleted file mode 100644 index dcf0ed8f..00000000 --- a/rest/api/v3/mc_singlesends/model_singlesend_response_short.go +++ /dev/null @@ -1,38 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "time" -) - -// SinglesendResponseShort struct for SinglesendResponseShort -type SinglesendResponseShort struct { - Id string `json:"id"` - // name of the Single Send - Name string `json:"name"` - Abtest AbTestSummary `json:"abtest"` - // current status of the Single Send - Status Status3 `json:"status"` - // categories to associate with this Single Send - Categories []string `json:"categories"` - // The ISO 8601 time at which to send the Single Send. This must be in future or the string `now`. SendGrid [Mail Send](https://docs.sendgrid.com/api-reference/mail-send/mail-send) emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via [Marketing Campaigns](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns/). - SendAt *time.Time `json:"send_at,omitempty"` - // true if the Single Send's AB Test functionality has been toggled on - IsAbtest bool `json:"is_abtest"` - // the ISO 8601 time at which the Single Send was last updated - UpdatedAt time.Time `json:"updated_at"` - // the ISO 8601 time at which the Single Send was created - CreatedAt time.Time `json:"created_at"` -} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_response_warnings_inner.go b/rest/api/v3/mc_singlesends/model_singlesend_response_warnings_inner.go deleted file mode 100644 index 7a9ce910..00000000 --- a/rest/api/v3/mc_singlesends/model_singlesend_response_warnings_inner.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SinglesendResponseWarningsInner struct for SinglesendResponseWarningsInner -type SinglesendResponseWarningsInner struct { - Message *string `json:"message,omitempty"` - Field *string `json:"field,omitempty"` - WarningId *string `json:"warning_id,omitempty"` -} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_schedule.go b/rest/api/v3/mc_singlesends/model_singlesend_schedule.go deleted file mode 100644 index b0902355..00000000 --- a/rest/api/v3/mc_singlesends/model_singlesend_schedule.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "time" -) - -// SinglesendSchedule struct for SinglesendSchedule -type SinglesendSchedule struct { - // The ISO 8601 time at which to send the Single Send. This must be in future or the string `now`. SendGrid [Mail Send](https://docs.sendgrid.com/api-reference/mail-send/mail-send) emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via [Marketing Campaigns](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns/). - SendAt time.Time `json:"send_at"` - Status *Status1 `json:"status,omitempty"` -} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_search.go b/rest/api/v3/mc_singlesends/model_singlesend_search.go deleted file mode 100644 index c4576308..00000000 --- a/rest/api/v3/mc_singlesends/model_singlesend_search.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SinglesendSearch struct for SinglesendSearch -type SinglesendSearch struct { - // leading and trailing wildcard search on name of the Single Send - Name *string `json:"name,omitempty"` - // current status of the Single Send - Status *[]Items `json:"status,omitempty"` - // categories to associate with this Single Send, match any single send that has at least one of the categories - Categories *[]string `json:"categories,omitempty"` -} diff --git a/rest/api/v3/mc_singlesends/model_status.go b/rest/api/v3/mc_singlesends/model_status.go deleted file mode 100644 index 7e88d91f..00000000 --- a/rest/api/v3/mc_singlesends/model_status.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Status the model 'Status' -type Status string - -// List of Status -const ( - STATUS_SCHEDULED Status = "scheduled" -) diff --git a/rest/api/v3/mc_singlesends/model_status1.go b/rest/api/v3/mc_singlesends/model_status1.go deleted file mode 100644 index 90636c6e..00000000 --- a/rest/api/v3/mc_singlesends/model_status1.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Status1 the model 'Status1' -type Status1 string - -// List of Status1 -const ( - STATUS1_DRAFT Status1 = "draft" - STATUS1_SCHEDULED Status1 = "scheduled" - STATUS1_TRIGGERED Status1 = "triggered" -) diff --git a/rest/api/v3/mc_singlesends/model_status2.go b/rest/api/v3/mc_singlesends/model_status2.go deleted file mode 100644 index 42c16a05..00000000 --- a/rest/api/v3/mc_singlesends/model_status2.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Status2 the model 'Status2' -type Status2 string - -// List of Status2 -const ( - STATUS2_DRAFT Status2 = "draft" - STATUS2_SCHEDULED Status2 = "scheduled" - STATUS2_TRIGGERED Status2 = "triggered" -) diff --git a/rest/api/v3/mc_singlesends/model_status3.go b/rest/api/v3/mc_singlesends/model_status3.go deleted file mode 100644 index 7caa1f9d..00000000 --- a/rest/api/v3/mc_singlesends/model_status3.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Status3 the model 'Status3' -type Status3 string - -// List of Status3 -const ( - STATUS3_DRAFT Status3 = "draft" - STATUS3_SCHEDULED Status3 = "scheduled" - STATUS3_TRIGGERED Status3 = "triggered" -) diff --git a/rest/api/v3/mc_singlesends/model_type.go b/rest/api/v3/mc_singlesends/model_type.go deleted file mode 100644 index a2fc86e3..00000000 --- a/rest/api/v3/mc_singlesends/model_type.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Type the model 'Type' -type Type string - -// List of Type -const ( - TYPE_SUBJECT Type = "subject" - TYPE_CONTENT Type = "content" -) diff --git a/rest/api/v3/mc_singlesends/model_winner_criteria.go b/rest/api/v3/mc_singlesends/model_winner_criteria.go deleted file mode 100644 index 069e7c0f..00000000 --- a/rest/api/v3/mc_singlesends/model_winner_criteria.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Single Sends API -* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// WinnerCriteria the model 'WinnerCriteria' -type WinnerCriteria string - -// List of WinnerCriteria -const ( - WINNERCRITERIA_OPEN WinnerCriteria = "open" - WINNERCRITERIA_CLICK WinnerCriteria = "click" - WINNERCRITERIA_MANUAL WinnerCriteria = "manual" -) diff --git a/rest/api/v3/mc_stats/.openapi-generator b/rest/api/v3/mc_stats/.openapi-generator deleted file mode 100644 index 206bfd5c..00000000 --- a/rest/api/v3/mc_stats/.openapi-generator +++ /dev/null @@ -1,60 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_export_automation_stat.go -api_export_single_send_stat.go -api_get_automation_stat.go -api_get_single_send_stat.go -api_list_automation_stat.go -api_list_click_tracking_stat.go -api_list_single_send_stat.go -api_list_single_send_tracking_stat.go -api_service.go -docs/AbPhase.md -docs/AbPhase1.md -docs/AbPhaseId.md -docs/AggregatedBy.md -docs/AutmoationsLinkStatsResponse.md -docs/AutmoationsLinkStatsResponseResultsInner.md -docs/AutomationsResponse.md -docs/AutomationsResponseResultsInner.md -docs/ErrorResponse.md -docs/ErrorResponseErrorsInner.md -docs/ExportAutomationStat.md -docs/ExportSingleSendStat.md -docs/GetAutomationStat.md -docs/GetSingleSendStat.md -docs/Items.md -docs/Items1.md -docs/Items2.md -docs/LinkTrackingMetadata.md -docs/ListAutomationStat.md -docs/ListClickTrackingStat.md -docs/ListSingleSendStat.md -docs/ListSingleSendTrackingStat.md -docs/Metadata.md -docs/Metrics.md -docs/SinglesendsLinkStatsResponse.md -docs/SinglesendsLinkStatsResponseResultsInner.md -docs/SinglesendsResponse.md -docs/SinglesendsResponseResultsInner.md -model_ab_phase.go -model_ab_phase1.go -model_ab_phase_id.go -model_aggregated_by.go -model_autmoations_link_stats_response.go -model_autmoations_link_stats_response_results_inner.go -model_automations_response.go -model_automations_response_results_inner.go -model_error_response.go -model_error_response_errors_inner.go -model_items.go -model_items1.go -model_items2.go -model_link_tracking_metadata.go -model_metadata.go -model_metrics.go -model_singlesends_link_stats_response.go -model_singlesends_link_stats_response_results_inner.go -model_singlesends_response.go -model_singlesends_response_results_inner.go diff --git a/rest/api/v3/mc_stats/.openapi-generator-ignore b/rest/api/v3/mc_stats/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/mc_stats/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/mc_stats/README.md b/rest/api/v3/mc_stats/README.md deleted file mode 100644 index 52d3873e..00000000 --- a/rest/api/v3/mc_stats/README.md +++ /dev/null @@ -1,88 +0,0 @@ -# Go API client for - -The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). - -This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:38.248502+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*ExportAutomationStat* | [**ExportAutomationStat**](docs/ExportAutomationStat.md#exportautomationstat) | **Get** /v3/marketing/stats/automations/export | Export Single Send Stats -*ExportSingleSendStat* | [**ExportSingleSendStat**](docs/ExportSingleSendStat.md#exportsinglesendstat) | **Get** /v3/marketing/stats/singlesends/export | Export Single Send Stats -*GetAutomationStat* | [**GetAutomationStat**](docs/GetAutomationStat.md#getautomationstat) | **Get** /v3/marketing/stats/automations/{Id} | Get Automation Stats by ID -*GetSingleSendStat* | [**GetSingleSendStat**](docs/GetSingleSendStat.md#getsinglesendstat) | **Get** /v3/marketing/stats/singlesends/{Id} | Get Single Send Stats by ID -*ListAutomationStat* | [**ListAutomationStat**](docs/ListAutomationStat.md#listautomationstat) | **Get** /v3/marketing/stats/automations | Get All Automation Stats -*ListClickTrackingStat* | [**ListClickTrackingStat**](docs/ListClickTrackingStat.md#listclicktrackingstat) | **Get** /v3/marketing/stats/automations/{Id}/links | Get Automation Click Tracking Stats by ID -*ListSingleSendStat* | [**ListSingleSendStat**](docs/ListSingleSendStat.md#listsinglesendstat) | **Get** /v3/marketing/stats/singlesends | Get All Single Sends Stats -*ListSingleSendTrackingStat* | [**ListSingleSendTrackingStat**](docs/ListSingleSendTrackingStat.md#listsinglesendtrackingstat) | **Get** /v3/marketing/stats/singlesends/{Id}/links | Get Single Send Click Tracking Stats by ID - - -## Documentation For Models - - - [AbPhase](AbPhase.md) - - [AbPhase1](AbPhase1.md) - - [AbPhaseId](AbPhaseId.md) - - [AggregatedBy](AggregatedBy.md) - - [AutmoationsLinkStatsResponse](AutmoationsLinkStatsResponse.md) - - [AutmoationsLinkStatsResponseResultsInner](AutmoationsLinkStatsResponseResultsInner.md) - - [AutomationsResponse](AutomationsResponse.md) - - [AutomationsResponseResultsInner](AutomationsResponseResultsInner.md) - - [ErrorResponse](ErrorResponse.md) - - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) - - [Items](Items.md) - - [Items1](Items1.md) - - [Items2](Items2.md) - - [LinkTrackingMetadata](LinkTrackingMetadata.md) - - [Metadata](Metadata.md) - - [Metrics](Metrics.md) - - [SinglesendsLinkStatsResponse](SinglesendsLinkStatsResponse.md) - - [SinglesendsLinkStatsResponseResultsInner](SinglesendsLinkStatsResponseResultsInner.md) - - [SinglesendsResponse](SinglesendsResponse.md) - - [SinglesendsResponseResultsInner](SinglesendsResponseResultsInner.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/mc_stats/api_export_automation_stat.go b/rest/api/v3/mc_stats/api_export_automation_stat.go deleted file mode 100644 index 0aa79127..00000000 --- a/rest/api/v3/mc_stats/api_export_automation_stat.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ExportAutomationStatParam struct { - // The IDs of Single Sends for which to export stats. - Ids *[]string `json:"ids,omitempty"` - // The [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_timezones) string representing the timezone in which the stats are to be presented; i.e. `\"America/Chicago\"`. This parameter changes the timezone format only; it does not alter which stats are returned. - Timezone *string `json:"timezone,omitempty"` -} - -func (params *ExportAutomationStatParam) SetIds(Ids []string) *ExportAutomationStatParam { - params.Ids = &Ids - return params -} -func (params *ExportAutomationStatParam) SetTimezone(Timezone string) *ExportAutomationStatParam { - params.Timezone = &Timezone - return params -} - -// **This endpoint allows you to export Single Send stats as .CSV data**. You can specify one Single Send or many: include as many Single Send IDs as you need, separating them with commas, as the value of the `ids` query string parameter. The data is returned as plain text response but in .CSV format, so your application making the call can present the information in whatever way is most appropriate, or just save the data as a .csv file. -func (c *ApiService) ExportAutomationStat(params *ExportAutomationStatParam) (interface{}, error) { - path := "/v3/marketing/stats/automations/export" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Ids != nil { - for _, item := range *params.Ids { - v, err := json.Marshal(item) - - if err != nil { - return nil, err - } - - data.Add("ids", string(v)) - - } - } - if params != nil && params.Timezone != nil { - data.Set("timezone", *params.Timezone) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - s := "" - ps := &s - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_stats/api_export_single_send_stat.go b/rest/api/v3/mc_stats/api_export_single_send_stat.go deleted file mode 100644 index 422431a0..00000000 --- a/rest/api/v3/mc_stats/api_export_single_send_stat.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ExportSingleSendStatParam struct { - // The IDs of Single Sends for which to export stats. - Ids *[]string `json:"ids,omitempty"` - // The [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_timezones) string representing the timezone in which the stats are to be presented; i.e. `\"America/Chicago\"`. This parameter changes the timezone format only; it does not alter which stats are returned. - Timezone *string `json:"timezone,omitempty"` -} - -func (params *ExportSingleSendStatParam) SetIds(Ids []string) *ExportSingleSendStatParam { - params.Ids = &Ids - return params -} -func (params *ExportSingleSendStatParam) SetTimezone(Timezone string) *ExportSingleSendStatParam { - params.Timezone = &Timezone - return params -} - -// **This endpoint allows you to export Single Send stats as .CSV data**. You can specify one Single Send or many: include as many Single Send IDs as you need, separating them with commas, as the value of the `ids` query string parameter. The data is returned as plain text response but in .CSV format, so your application making the call can present the information in whatever way is most appropriate, or just save the data as a .csv file. -func (c *ApiService) ExportSingleSendStat(params *ExportSingleSendStatParam) (interface{}, error) { - path := "/v3/marketing/stats/singlesends/export" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Ids != nil { - for _, item := range *params.Ids { - v, err := json.Marshal(item) - - if err != nil { - return nil, err - } - - data.Add("ids", string(v)) - - } - } - if params != nil && params.Timezone != nil { - data.Set("timezone", *params.Timezone) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - s := "" - ps := &s - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_stats/api_get_automation_stat.go b/rest/api/v3/mc_stats/api_get_automation_stat.go deleted file mode 100644 index 67abaff7..00000000 --- a/rest/api/v3/mc_stats/api_get_automation_stat.go +++ /dev/null @@ -1,161 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type GetAutomationStatParam struct { - // The ID of the Automation for which you want to retrieve statistics. - Id *string `json:"id"` - // Automations can have multiple steps. Including `step_id` as a `group_by` metric allows further granularity of stats. - GroupBy *[]Items `json:"group_by,omitempty"` - // Comma-separated list of `step_ids` that you want the link stats for. - StepIds *[]string `json:"step_ids,omitempty"` - // Dictates how the stats are time-sliced. Currently, `\"total\"` and `\"day\"` are supported. - AggregatedBy *AggregatedBy `json:"aggregated_by,omitempty"` - // Format: `YYYY-MM-DD`. If this parameter is included, the stats' start date is included in the search. - StartDate *string `json:"start_date,omitempty"` - // Format: `YYYY-MM-DD`.If this parameter is included, the stats' end date is included in the search. - EndDate *string `json:"end_date,omitempty"` - // [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_timezones) string representing the timezone in which the stats are to be presented, e.g., \"America/Chicago\". - Timezone *string `json:"timezone,omitempty"` - // The number of elements you want returned on each page. - PageSize *int32 `json:"page_size,omitempty"` - // The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. - PageToken *string `json:"page_token,omitempty"` -} - -func (params *GetAutomationStatParam) SetId(Id string) *GetAutomationStatParam { - params.Id = &Id - return params -} -func (params *GetAutomationStatParam) SetGroupBy(GroupBy []Items) *GetAutomationStatParam { - params.GroupBy = &GroupBy - return params -} -func (params *GetAutomationStatParam) SetStepIds(StepIds []string) *GetAutomationStatParam { - params.StepIds = &StepIds - return params -} -func (params *GetAutomationStatParam) SetAggregatedBy(AggregatedBy AggregatedBy) *GetAutomationStatParam { - params.AggregatedBy = &AggregatedBy - return params -} -func (params *GetAutomationStatParam) SetStartDate(StartDate string) *GetAutomationStatParam { - params.StartDate = &StartDate - return params -} -func (params *GetAutomationStatParam) SetEndDate(EndDate string) *GetAutomationStatParam { - params.EndDate = &EndDate - return params -} -func (params *GetAutomationStatParam) SetTimezone(Timezone string) *GetAutomationStatParam { - params.Timezone = &Timezone - return params -} -func (params *GetAutomationStatParam) SetPageSize(PageSize int32) *GetAutomationStatParam { - params.PageSize = &PageSize - return params -} -func (params *GetAutomationStatParam) SetPageToken(PageToken string) *GetAutomationStatParam { - params.PageToken = &PageToken - return params -} - -// **This endpoint allows you to retrieve stats for a single Automation using its ID.** Multiple Automation IDs can be retrieved using the \"Get All Automation Stats\" endpoint. Once you have an ID, this endpoint will return detailed stats for the single automation specified. You may constrain the stats returned using the `start_date` and `end_date` query string parameters. You can also use the `group_by` and `aggregated_by` query string parameters to further refine the stats returned. -func (c *ApiService) GetAutomationStat(params *GetAutomationStatParam) (interface{}, error) { - path := "/v3/marketing/stats/automations/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.GroupBy != nil { - for _, item := range *params.GroupBy { - v, err := json.Marshal(item) - - if err != nil { - return nil, err - } - - data.Add("group_by", string(v)) - - } - } - if params != nil && params.StepIds != nil { - for _, item := range *params.StepIds { - v, err := json.Marshal(item) - - if err != nil { - return nil, err - } - - data.Add("step_ids", string(v)) - - } - } - if params != nil && params.AggregatedBy != nil { - data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) - } - if params != nil && params.StartDate != nil { - data.Set("start_date", fmt.Sprint(*params.StartDate)) - } - if params != nil && params.EndDate != nil { - data.Set("end_date", fmt.Sprint(*params.EndDate)) - } - if params != nil && params.Timezone != nil { - data.Set("timezone", *params.Timezone) - } - if params != nil && params.PageSize != nil { - data.Set("page_size", fmt.Sprint(*params.PageSize)) - } - if params != nil && params.PageToken != nil { - data.Set("page_token", *params.PageToken) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &AutomationsResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_stats/api_get_single_send_stat.go b/rest/api/v3/mc_stats/api_get_single_send_stat.go deleted file mode 100644 index f9e8a3f2..00000000 --- a/rest/api/v3/mc_stats/api_get_single_send_stat.go +++ /dev/null @@ -1,143 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type GetSingleSendStatParam struct { - // The ID of Single Send for which you want to retrieve stats. - Id *string `json:"id"` - // Dictates how the stats are time-sliced. Currently, `\"total\"` and `\"day\"` are supported. - AggregatedBy *AggregatedBy `json:"aggregated_by,omitempty"` - // Format: `YYYY-MM-DD`. If this parameter is included, the stats' start date is included in the search. - StartDate *string `json:"start_date,omitempty"` - // Format: `YYYY-MM-DD`.If this parameter is included, the stats' end date is included in the search. - EndDate *string `json:"end_date,omitempty"` - // [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_timezones) string representing the timezone in which the stats are to be presented, e.g., \"America/Chicago\". - Timezone *string `json:"timezone,omitempty"` - // The number of elements you want returned on each page. - PageSize *int32 `json:"page_size,omitempty"` - // The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. - PageToken *string `json:"page_token,omitempty"` - // A/B Single Sends have multiple variation IDs and phase IDs. Including these additional fields allows further granularity of stats by these fields. - GroupBy *[]Items1 `json:"group_by,omitempty"` -} - -func (params *GetSingleSendStatParam) SetId(Id string) *GetSingleSendStatParam { - params.Id = &Id - return params -} -func (params *GetSingleSendStatParam) SetAggregatedBy(AggregatedBy AggregatedBy) *GetSingleSendStatParam { - params.AggregatedBy = &AggregatedBy - return params -} -func (params *GetSingleSendStatParam) SetStartDate(StartDate string) *GetSingleSendStatParam { - params.StartDate = &StartDate - return params -} -func (params *GetSingleSendStatParam) SetEndDate(EndDate string) *GetSingleSendStatParam { - params.EndDate = &EndDate - return params -} -func (params *GetSingleSendStatParam) SetTimezone(Timezone string) *GetSingleSendStatParam { - params.Timezone = &Timezone - return params -} -func (params *GetSingleSendStatParam) SetPageSize(PageSize int32) *GetSingleSendStatParam { - params.PageSize = &PageSize - return params -} -func (params *GetSingleSendStatParam) SetPageToken(PageToken string) *GetSingleSendStatParam { - params.PageToken = &PageToken - return params -} -func (params *GetSingleSendStatParam) SetGroupBy(GroupBy []Items1) *GetSingleSendStatParam { - params.GroupBy = &GroupBy - return params -} - -// **This endpoint allows you to retrieve stats for an individual Single Send using a Single Send ID.** Multiple Single Send IDs can be retrieved using the \"Get All Single Sends Stats\" endpoint. Once you have an ID, this endpoint will return detailed stats for the Single Send specified. You may constrain the stats returned using the `start_date` and `end_date` query string parameters. You can also use the `group_by` and `aggregated_by` query string parameters to further refine the stats returned. -func (c *ApiService) GetSingleSendStat(params *GetSingleSendStatParam) (interface{}, error) { - path := "/v3/marketing/stats/singlesends/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.AggregatedBy != nil { - data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) - } - if params != nil && params.StartDate != nil { - data.Set("start_date", fmt.Sprint(*params.StartDate)) - } - if params != nil && params.EndDate != nil { - data.Set("end_date", fmt.Sprint(*params.EndDate)) - } - if params != nil && params.Timezone != nil { - data.Set("timezone", *params.Timezone) - } - if params != nil && params.PageSize != nil { - data.Set("page_size", fmt.Sprint(*params.PageSize)) - } - if params != nil && params.PageToken != nil { - data.Set("page_token", *params.PageToken) - } - if params != nil && params.GroupBy != nil { - for _, item := range *params.GroupBy { - v, err := json.Marshal(item) - - if err != nil { - return nil, err - } - - data.Add("group_by", string(v)) - - } - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SinglesendsResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_stats/api_list_automation_stat.go b/rest/api/v3/mc_stats/api_list_automation_stat.go deleted file mode 100644 index 9b2af6a5..00000000 --- a/rest/api/v3/mc_stats/api_list_automation_stat.go +++ /dev/null @@ -1,96 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListAutomationStatParam struct { - // This endpoint returns all automation IDs if no `automation_ids` are specified. - AutomationIds *[]string `json:"automation_ids,omitempty"` - // The number of elements you want returned on each page. - PageSize *int32 `json:"page_size,omitempty"` - // The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. - PageToken *string `json:"page_token,omitempty"` -} - -func (params *ListAutomationStatParam) SetAutomationIds(AutomationIds []string) *ListAutomationStatParam { - params.AutomationIds = &AutomationIds - return params -} -func (params *ListAutomationStatParam) SetPageSize(PageSize int32) *ListAutomationStatParam { - params.PageSize = &PageSize - return params -} -func (params *ListAutomationStatParam) SetPageToken(PageToken string) *ListAutomationStatParam { - params.PageToken = &PageToken - return params -} - -// **This endpoint allows you to retrieve stats for all your Automations.** By default, all of your Automations will be returned, but you can specify a selection by passing in a comma-separated list of Automation IDs as the value of the query string parameter `automation_ids`. Responses are paginated. You can limit the number of responses returned per batch using the `page_size` query string parameter. The default is 25, but you can specify a value between 1 and 50. You can retrieve a specific page of responses with the `page_token` query string parameter. -func (c *ApiService) ListAutomationStat(params *ListAutomationStatParam) (interface{}, error) { - path := "/v3/marketing/stats/automations" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.AutomationIds != nil { - for _, item := range *params.AutomationIds { - v, err := json.Marshal(item) - - if err != nil { - return nil, err - } - - data.Add("automation_ids", string(v)) - - } - } - if params != nil && params.PageSize != nil { - data.Set("page_size", fmt.Sprint(*params.PageSize)) - } - if params != nil && params.PageToken != nil { - data.Set("page_token", *params.PageToken) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &AutomationsResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_stats/api_list_click_tracking_stat.go b/rest/api/v3/mc_stats/api_list_click_tracking_stat.go deleted file mode 100644 index bb4436ae..00000000 --- a/rest/api/v3/mc_stats/api_list_click_tracking_stat.go +++ /dev/null @@ -1,133 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type ListClickTrackingStatParam struct { - // The ID of the Automation you want to get click tracking stats for. - Id *string `json:"id"` - // Automations can have multiple steps. Including `step_id` as a `group_by` metric allows further granularity of stats. - GroupBy *[]Items `json:"group_by,omitempty"` - // Comma-separated list of `step_ids` that you want the link stats for. - StepIds *[]string `json:"step_ids,omitempty"` - // The number of elements you want returned on each page. - PageSize *int32 `json:"page_size,omitempty"` - // The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. - PageToken *string `json:"page_token,omitempty"` -} - -func (params *ListClickTrackingStatParam) SetId(Id string) *ListClickTrackingStatParam { - params.Id = &Id - return params -} -func (params *ListClickTrackingStatParam) SetGroupBy(GroupBy []Items) *ListClickTrackingStatParam { - params.GroupBy = &GroupBy - return params -} -func (params *ListClickTrackingStatParam) SetStepIds(StepIds []string) *ListClickTrackingStatParam { - params.StepIds = &StepIds - return params -} -func (params *ListClickTrackingStatParam) SetPageSize(PageSize int32) *ListClickTrackingStatParam { - params.PageSize = &PageSize - return params -} -func (params *ListClickTrackingStatParam) SetPageToken(PageToken string) *ListClickTrackingStatParam { - params.PageToken = &PageToken - return params -} - -// **This endpoint lets you retrieve click-tracking stats for a single Automation**. The stats returned list the URLs embedded in your Automation and the number of clicks each one received. -func (c *ApiService) ListClickTrackingStat(params *ListClickTrackingStatParam) (interface{}, error) { - path := "/v3/marketing/stats/automations/{Id}/links" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.GroupBy != nil { - for _, item := range *params.GroupBy { - v, err := json.Marshal(item) - - if err != nil { - return nil, err - } - - data.Add("group_by", string(v)) - - } - } - if params != nil && params.StepIds != nil { - for _, item := range *params.StepIds { - v, err := json.Marshal(item) - - if err != nil { - return nil, err - } - - data.Add("step_ids", string(v)) - - } - } - if params != nil && params.PageSize != nil { - data.Set("page_size", fmt.Sprint(*params.PageSize)) - } - if params != nil && params.PageToken != nil { - data.Set("page_token", *params.PageToken) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &AutmoationsLinkStatsResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_stats/api_list_single_send_stat.go b/rest/api/v3/mc_stats/api_list_single_send_stat.go deleted file mode 100644 index 8a0c5327..00000000 --- a/rest/api/v3/mc_stats/api_list_single_send_stat.go +++ /dev/null @@ -1,96 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListSingleSendStatParam struct { - // This endpoint returns all Single Send IDs if no IDs are included in `singlesend_ids`. - SinglesendIds *[]string `json:"singlesend_ids,omitempty"` - // The number of elements you want returned on each page. - PageSize *int32 `json:"page_size,omitempty"` - // The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. - PageToken *string `json:"page_token,omitempty"` -} - -func (params *ListSingleSendStatParam) SetSinglesendIds(SinglesendIds []string) *ListSingleSendStatParam { - params.SinglesendIds = &SinglesendIds - return params -} -func (params *ListSingleSendStatParam) SetPageSize(PageSize int32) *ListSingleSendStatParam { - params.PageSize = &PageSize - return params -} -func (params *ListSingleSendStatParam) SetPageToken(PageToken string) *ListSingleSendStatParam { - params.PageToken = &PageToken - return params -} - -// **This endpoint allows you to retrieve stats for all your Single Sends.** By default, all of your Single Sends will be returned, but you can specify a selection by passing in a comma-separated list of Single Send IDs as the value of the query string parameter `singlesend_ids`. Responses are paginated. You can limit the number of responses returned per batch using the `page_size` query string parameter. The default is 25, but you specify a value between 1 and 50. You can retrieve a specific page of responses with the `page_token` query string parameter. -func (c *ApiService) ListSingleSendStat(params *ListSingleSendStatParam) (interface{}, error) { - path := "/v3/marketing/stats/singlesends" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.SinglesendIds != nil { - for _, item := range *params.SinglesendIds { - v, err := json.Marshal(item) - - if err != nil { - return nil, err - } - - data.Add("singlesend_ids", string(v)) - - } - } - if params != nil && params.PageSize != nil { - data.Set("page_size", fmt.Sprint(*params.PageSize)) - } - if params != nil && params.PageToken != nil { - data.Set("page_token", *params.PageToken) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SinglesendsResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_stats/api_list_single_send_tracking_stat.go b/rest/api/v3/mc_stats/api_list_single_send_tracking_stat.go deleted file mode 100644 index 72c9937a..00000000 --- a/rest/api/v3/mc_stats/api_list_single_send_tracking_stat.go +++ /dev/null @@ -1,133 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type ListSingleSendTrackingStatParam struct { - // The ID of Single Send for which you want to retrieve link stats. - Id *string `json:"id"` - // The number of elements you want returned on each page. - PageSize *int32 `json:"page_size,omitempty"` - // The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. - PageToken *string `json:"page_token,omitempty"` - // A/B Single Sends have multiple variation IDs and phase IDs. Including these additional fields allows further granularity of stats by these fields. - GroupBy *[]Items2 `json:"group_by,omitempty"` - // - AbVariationId *string `json:"ab_variation_id,omitempty"` - // - AbPhaseId *AbPhaseId `json:"ab_phase_id,omitempty"` -} - -func (params *ListSingleSendTrackingStatParam) SetId(Id string) *ListSingleSendTrackingStatParam { - params.Id = &Id - return params -} -func (params *ListSingleSendTrackingStatParam) SetPageSize(PageSize int32) *ListSingleSendTrackingStatParam { - params.PageSize = &PageSize - return params -} -func (params *ListSingleSendTrackingStatParam) SetPageToken(PageToken string) *ListSingleSendTrackingStatParam { - params.PageToken = &PageToken - return params -} -func (params *ListSingleSendTrackingStatParam) SetGroupBy(GroupBy []Items2) *ListSingleSendTrackingStatParam { - params.GroupBy = &GroupBy - return params -} -func (params *ListSingleSendTrackingStatParam) SetAbVariationId(AbVariationId string) *ListSingleSendTrackingStatParam { - params.AbVariationId = &AbVariationId - return params -} -func (params *ListSingleSendTrackingStatParam) SetAbPhaseId(AbPhaseId AbPhaseId) *ListSingleSendTrackingStatParam { - params.AbPhaseId = &AbPhaseId - return params -} - -// **This endpoint lets you retrieve click-tracking stats for one Single Send**. The stats returned list the URLs embedded in the specified Single Send and the number of clicks each one received. -func (c *ApiService) ListSingleSendTrackingStat(params *ListSingleSendTrackingStatParam) (interface{}, error) { - path := "/v3/marketing/stats/singlesends/{Id}/links" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.PageSize != nil { - data.Set("page_size", fmt.Sprint(*params.PageSize)) - } - if params != nil && params.PageToken != nil { - data.Set("page_token", *params.PageToken) - } - if params != nil && params.GroupBy != nil { - for _, item := range *params.GroupBy { - v, err := json.Marshal(item) - - if err != nil { - return nil, err - } - - data.Add("group_by", string(v)) - - } - } - if params != nil && params.AbVariationId != nil { - data.Set("ab_variation_id", *params.AbVariationId) - } - if params != nil && params.AbPhaseId != nil { - data.Set("ab_phase_id", fmt.Sprint(*params.AbPhaseId)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SinglesendsLinkStatsResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_stats/api_service.go b/rest/api/v3/mc_stats/api_service.go deleted file mode 100644 index 913b3580..00000000 --- a/rest/api/v3/mc_stats/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/mc_stats/docs/AbPhase.md b/rest/api/v3/mc_stats/docs/AbPhase.md deleted file mode 100644 index db2402b9..00000000 --- a/rest/api/v3/mc_stats/docs/AbPhase.md +++ /dev/null @@ -1,14 +0,0 @@ -# AbPhase - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**SEND** | string | (value: `"send"`) -**TEST** | string | (value: `"test"`) -**ALL** | string | (value: `"all"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_stats/docs/AbPhase1.md b/rest/api/v3/mc_stats/docs/AbPhase1.md deleted file mode 100644 index 2c5a9fdc..00000000 --- a/rest/api/v3/mc_stats/docs/AbPhase1.md +++ /dev/null @@ -1,14 +0,0 @@ -# AbPhase1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**SEND** | string | (value: `"send"`) -**TEST** | string | (value: `"test"`) -**ALL** | string | (value: `"all"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_stats/docs/AbPhaseId.md b/rest/api/v3/mc_stats/docs/AbPhaseId.md deleted file mode 100644 index 8ce3a5ed..00000000 --- a/rest/api/v3/mc_stats/docs/AbPhaseId.md +++ /dev/null @@ -1,13 +0,0 @@ -# AbPhaseId - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**TEST** | string | (value: `"test"`) -**SEND** | string | (value: `"send"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_stats/docs/AggregatedBy.md b/rest/api/v3/mc_stats/docs/AggregatedBy.md deleted file mode 100644 index 5de3ca2f..00000000 --- a/rest/api/v3/mc_stats/docs/AggregatedBy.md +++ /dev/null @@ -1,13 +0,0 @@ -# AggregatedBy - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**DAY** | string | (value: `"day"`) -**TOTAL** | string | (value: `"total"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_stats/docs/AutmoationsLinkStatsResponse.md b/rest/api/v3/mc_stats/docs/AutmoationsLinkStatsResponse.md deleted file mode 100644 index 7efaf2f3..00000000 --- a/rest/api/v3/mc_stats/docs/AutmoationsLinkStatsResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# AutmoationsLinkStatsResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Results** | [**[]AutmoationsLinkStatsResponseResultsInner**](AutmoationsLinkStatsResponseResultsInner.md) | | -**TotalClicks** | **int32** | | -**Metadata** | [**LinkTrackingMetadata**](LinkTrackingMetadata.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_stats/docs/AutmoationsLinkStatsResponseResultsInner.md b/rest/api/v3/mc_stats/docs/AutmoationsLinkStatsResponseResultsInner.md deleted file mode 100644 index ba1436ce..00000000 --- a/rest/api/v3/mc_stats/docs/AutmoationsLinkStatsResponseResultsInner.md +++ /dev/null @@ -1,14 +0,0 @@ -# AutmoationsLinkStatsResponseResultsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Url** | **string** | This is the URL of the link clicked. If `{{custom_fields}}` are part of the URL, they will be included. | -**UrlLocation** | **int32** | This is the location of the link clicked in each Automation step. Links are located according to their position within the message; the topmost link has index `0`. |[optional] -**StepId** | **string** | This is the ID of the step if the stats were requested to be grouped by `step_id`. | -**Clicks** | **int32** | The number of clicks on this particular link. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_stats/docs/AutomationsResponse.md b/rest/api/v3/mc_stats/docs/AutomationsResponse.md deleted file mode 100644 index 856db55d..00000000 --- a/rest/api/v3/mc_stats/docs/AutomationsResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# AutomationsResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Results** | [**[]AutomationsResponseResultsInner**](AutomationsResponseResultsInner.md) | | -**Metadata** | [**Metadata**](Metadata.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_stats/docs/AutomationsResponseResultsInner.md b/rest/api/v3/mc_stats/docs/AutomationsResponseResultsInner.md deleted file mode 100644 index 204c3c2e..00000000 --- a/rest/api/v3/mc_stats/docs/AutomationsResponseResultsInner.md +++ /dev/null @@ -1,14 +0,0 @@ -# AutomationsResponseResultsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | This is the ID of the Automation you are requesting stats for. | -**Aggregation** | **string** | This describes the time unit to which the stat is rolled up. It is based on the `aggregated_by` parameter included in the request. It can be \"total\" or the date (in YYYY-MM-DD format) the stats are for. |[default to "total"] -**StepId** | **string** | This is the ID of the step if the stats were requested to be grouped by `step_id`. |[default to "all"] -**Stats** | [**Metrics**](Metrics.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_stats/docs/ErrorResponse.md b/rest/api/v3/mc_stats/docs/ErrorResponse.md deleted file mode 100644 index ec2d41f6..00000000 --- a/rest/api/v3/mc_stats/docs/ErrorResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ErrorResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] -**Id** | **string** | When applicable, this property value will be an error ID. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_stats/docs/ErrorResponseErrorsInner.md b/rest/api/v3/mc_stats/docs/ErrorResponseErrorsInner.md deleted file mode 100644 index 5449c685..00000000 --- a/rest/api/v3/mc_stats/docs/ErrorResponseErrorsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ErrorResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | An error message. |[optional] -**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] -**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_stats/docs/ExportAutomationStat.md b/rest/api/v3/mc_stats/docs/ExportAutomationStat.md deleted file mode 100644 index 71980e81..00000000 --- a/rest/api/v3/mc_stats/docs/ExportAutomationStat.md +++ /dev/null @@ -1,49 +0,0 @@ -# ExportAutomationStat - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ExportAutomationStat**](ExportAutomationStat.md#ExportAutomationStat) | **Get** /v3/marketing/stats/automations/export | Export Single Send Stats - - - -## ExportAutomationStat - -> string ExportAutomationStat(ctx, optional) - -Export Single Send Stats - -**This endpoint allows you to export Single Send stats as .CSV data**. You can specify one Single Send or many: include as many Single Send IDs as you need, separating them with commas, as the value of the `ids` query string parameter. The data is returned as plain text response but in .CSV format, so your application making the call can present the information in whatever way is most appropriate, or just save the data as a .csv file. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ExportAutomationStatParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Ids** | **[]string** | The IDs of Single Sends for which to export stats. -**Timezone** | **string** | The [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_timezones) string representing the timezone in which the stats are to be presented; i.e. `\"America/Chicago\"`. This parameter changes the timezone format only; it does not alter which stats are returned. - -### Return type - -**string** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_stats/docs/ExportSingleSendStat.md b/rest/api/v3/mc_stats/docs/ExportSingleSendStat.md deleted file mode 100644 index e2a8a528..00000000 --- a/rest/api/v3/mc_stats/docs/ExportSingleSendStat.md +++ /dev/null @@ -1,49 +0,0 @@ -# ExportSingleSendStat - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ExportSingleSendStat**](ExportSingleSendStat.md#ExportSingleSendStat) | **Get** /v3/marketing/stats/singlesends/export | Export Single Send Stats - - - -## ExportSingleSendStat - -> string ExportSingleSendStat(ctx, optional) - -Export Single Send Stats - -**This endpoint allows you to export Single Send stats as .CSV data**. You can specify one Single Send or many: include as many Single Send IDs as you need, separating them with commas, as the value of the `ids` query string parameter. The data is returned as plain text response but in .CSV format, so your application making the call can present the information in whatever way is most appropriate, or just save the data as a .csv file. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ExportSingleSendStatParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Ids** | **[]string** | The IDs of Single Sends for which to export stats. -**Timezone** | **string** | The [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_timezones) string representing the timezone in which the stats are to be presented; i.e. `\"America/Chicago\"`. This parameter changes the timezone format only; it does not alter which stats are returned. - -### Return type - -**string** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_stats/docs/GetAutomationStat.md b/rest/api/v3/mc_stats/docs/GetAutomationStat.md deleted file mode 100644 index e97b64e5..00000000 --- a/rest/api/v3/mc_stats/docs/GetAutomationStat.md +++ /dev/null @@ -1,59 +0,0 @@ -# GetAutomationStat - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetAutomationStat**](GetAutomationStat.md#GetAutomationStat) | **Get** /v3/marketing/stats/automations/{Id} | Get Automation Stats by ID - - - -## GetAutomationStat - -> AutomationsResponse GetAutomationStat(ctx, Idoptional) - -Get Automation Stats by ID - -**This endpoint allows you to retrieve stats for a single Automation using its ID.** Multiple Automation IDs can be retrieved using the \"Get All Automation Stats\" endpoint. Once you have an ID, this endpoint will return detailed stats for the single automation specified. You may constrain the stats returned using the `start_date` and `end_date` query string parameters. You can also use the `group_by` and `aggregated_by` query string parameters to further refine the stats returned. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of the Automation for which you want to retrieve statistics. - -### Other Parameters - -Other parameters are passed through a pointer to a GetAutomationStatParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**GroupBy** | [**[]Items**](Items.md) | Automations can have multiple steps. Including `step_id` as a `group_by` metric allows further granularity of stats. -**StepIds** | **[]string** | Comma-separated list of `step_ids` that you want the link stats for. -**AggregatedBy** | [**AggregatedBy**](AggregatedByAggregatedBy.md) | Dictates how the stats are time-sliced. Currently, `\"total\"` and `\"day\"` are supported. -**StartDate** | **string** | Format: `YYYY-MM-DD`. If this parameter is included, the stats' start date is included in the search. -**EndDate** | **string** | Format: `YYYY-MM-DD`.If this parameter is included, the stats' end date is included in the search. -**Timezone** | **string** | [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_timezones) string representing the timezone in which the stats are to be presented, e.g., \"America/Chicago\". -**PageSize** | **int32** | The number of elements you want returned on each page. -**PageToken** | **string** | The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. - -### Return type - -[**AutomationsResponse**](AutomationsResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_stats/docs/GetSingleSendStat.md b/rest/api/v3/mc_stats/docs/GetSingleSendStat.md deleted file mode 100644 index 59fa7e2c..00000000 --- a/rest/api/v3/mc_stats/docs/GetSingleSendStat.md +++ /dev/null @@ -1,58 +0,0 @@ -# GetSingleSendStat - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetSingleSendStat**](GetSingleSendStat.md#GetSingleSendStat) | **Get** /v3/marketing/stats/singlesends/{Id} | Get Single Send Stats by ID - - - -## GetSingleSendStat - -> SinglesendsResponse GetSingleSendStat(ctx, Idoptional) - -Get Single Send Stats by ID - -**This endpoint allows you to retrieve stats for an individual Single Send using a Single Send ID.** Multiple Single Send IDs can be retrieved using the \"Get All Single Sends Stats\" endpoint. Once you have an ID, this endpoint will return detailed stats for the Single Send specified. You may constrain the stats returned using the `start_date` and `end_date` query string parameters. You can also use the `group_by` and `aggregated_by` query string parameters to further refine the stats returned. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of Single Send for which you want to retrieve stats. - -### Other Parameters - -Other parameters are passed through a pointer to a GetSingleSendStatParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**AggregatedBy** | [**AggregatedBy**](AggregatedByAggregatedBy.md) | Dictates how the stats are time-sliced. Currently, `\"total\"` and `\"day\"` are supported. -**StartDate** | **string** | Format: `YYYY-MM-DD`. If this parameter is included, the stats' start date is included in the search. -**EndDate** | **string** | Format: `YYYY-MM-DD`.If this parameter is included, the stats' end date is included in the search. -**Timezone** | **string** | [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_timezones) string representing the timezone in which the stats are to be presented, e.g., \"America/Chicago\". -**PageSize** | **int32** | The number of elements you want returned on each page. -**PageToken** | **string** | The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. -**GroupBy** | [**[]Items1**](Items1.md) | A/B Single Sends have multiple variation IDs and phase IDs. Including these additional fields allows further granularity of stats by these fields. - -### Return type - -[**SinglesendsResponse**](SinglesendsResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_stats/docs/Items.md b/rest/api/v3/mc_stats/docs/Items.md deleted file mode 100644 index a670ab6d..00000000 --- a/rest/api/v3/mc_stats/docs/Items.md +++ /dev/null @@ -1,12 +0,0 @@ -# Items - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**STEP_ID** | string | (value: `"step_id"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_stats/docs/Items1.md b/rest/api/v3/mc_stats/docs/Items1.md deleted file mode 100644 index b9d5f118..00000000 --- a/rest/api/v3/mc_stats/docs/Items1.md +++ /dev/null @@ -1,13 +0,0 @@ -# Items1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**VARIATION** | string | (value: `"ab_variation"`) -**PHASE** | string | (value: `"ab_phase"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_stats/docs/Items2.md b/rest/api/v3/mc_stats/docs/Items2.md deleted file mode 100644 index 5ef14d6d..00000000 --- a/rest/api/v3/mc_stats/docs/Items2.md +++ /dev/null @@ -1,13 +0,0 @@ -# Items2 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**VARIATION** | string | (value: `"ab_variation"`) -**PHASE** | string | (value: `"ab_phase"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_stats/docs/LinkTrackingMetadata.md b/rest/api/v3/mc_stats/docs/LinkTrackingMetadata.md deleted file mode 100644 index 200bf168..00000000 --- a/rest/api/v3/mc_stats/docs/LinkTrackingMetadata.md +++ /dev/null @@ -1,14 +0,0 @@ -# LinkTrackingMetadata - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Prev** | **string** | The URL of the previous page of results. If this field isn't present, you're at the start of the list. |[optional] -**Self** | **string** | The URL of the current page of results. |[optional] -**Next** | **string** | The URL of the next page of results. If this field isn't present, you're at the end of the list. |[optional] -**Count** | **float32** | The number of items in the entire list, i.e., across all pages. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_stats/docs/ListAutomationStat.md b/rest/api/v3/mc_stats/docs/ListAutomationStat.md deleted file mode 100644 index 7bb19791..00000000 --- a/rest/api/v3/mc_stats/docs/ListAutomationStat.md +++ /dev/null @@ -1,50 +0,0 @@ -# ListAutomationStat - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListAutomationStat**](ListAutomationStat.md#ListAutomationStat) | **Get** /v3/marketing/stats/automations | Get All Automation Stats - - - -## ListAutomationStat - -> AutomationsResponse ListAutomationStat(ctx, optional) - -Get All Automation Stats - -**This endpoint allows you to retrieve stats for all your Automations.** By default, all of your Automations will be returned, but you can specify a selection by passing in a comma-separated list of Automation IDs as the value of the query string parameter `automation_ids`. Responses are paginated. You can limit the number of responses returned per batch using the `page_size` query string parameter. The default is 25, but you can specify a value between 1 and 50. You can retrieve a specific page of responses with the `page_token` query string parameter. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListAutomationStatParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**AutomationIds** | **[]string** | This endpoint returns all automation IDs if no `automation_ids` are specified. -**PageSize** | **int32** | The number of elements you want returned on each page. -**PageToken** | **string** | The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. - -### Return type - -[**AutomationsResponse**](AutomationsResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_stats/docs/ListClickTrackingStat.md b/rest/api/v3/mc_stats/docs/ListClickTrackingStat.md deleted file mode 100644 index 48466b6f..00000000 --- a/rest/api/v3/mc_stats/docs/ListClickTrackingStat.md +++ /dev/null @@ -1,55 +0,0 @@ -# ListClickTrackingStat - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListClickTrackingStat**](ListClickTrackingStat.md#ListClickTrackingStat) | **Get** /v3/marketing/stats/automations/{Id}/links | Get Automation Click Tracking Stats by ID - - - -## ListClickTrackingStat - -> AutmoationsLinkStatsResponse ListClickTrackingStat(ctx, Idoptional) - -Get Automation Click Tracking Stats by ID - -**This endpoint lets you retrieve click-tracking stats for a single Automation**. The stats returned list the URLs embedded in your Automation and the number of clicks each one received. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of the Automation you want to get click tracking stats for. - -### Other Parameters - -Other parameters are passed through a pointer to a ListClickTrackingStatParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**GroupBy** | [**[]Items**](Items.md) | Automations can have multiple steps. Including `step_id` as a `group_by` metric allows further granularity of stats. -**StepIds** | **[]string** | Comma-separated list of `step_ids` that you want the link stats for. -**PageSize** | **int32** | The number of elements you want returned on each page. -**PageToken** | **string** | The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. - -### Return type - -[**AutmoationsLinkStatsResponse**](AutmoationsLinkStatsResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_stats/docs/ListSingleSendStat.md b/rest/api/v3/mc_stats/docs/ListSingleSendStat.md deleted file mode 100644 index 43d4841b..00000000 --- a/rest/api/v3/mc_stats/docs/ListSingleSendStat.md +++ /dev/null @@ -1,50 +0,0 @@ -# ListSingleSendStat - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListSingleSendStat**](ListSingleSendStat.md#ListSingleSendStat) | **Get** /v3/marketing/stats/singlesends | Get All Single Sends Stats - - - -## ListSingleSendStat - -> SinglesendsResponse ListSingleSendStat(ctx, optional) - -Get All Single Sends Stats - -**This endpoint allows you to retrieve stats for all your Single Sends.** By default, all of your Single Sends will be returned, but you can specify a selection by passing in a comma-separated list of Single Send IDs as the value of the query string parameter `singlesend_ids`. Responses are paginated. You can limit the number of responses returned per batch using the `page_size` query string parameter. The default is 25, but you specify a value between 1 and 50. You can retrieve a specific page of responses with the `page_token` query string parameter. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListSingleSendStatParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**SinglesendIds** | **[]string** | This endpoint returns all Single Send IDs if no IDs are included in `singlesend_ids`. -**PageSize** | **int32** | The number of elements you want returned on each page. -**PageToken** | **string** | The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. - -### Return type - -[**SinglesendsResponse**](SinglesendsResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_stats/docs/ListSingleSendTrackingStat.md b/rest/api/v3/mc_stats/docs/ListSingleSendTrackingStat.md deleted file mode 100644 index 8c831e70..00000000 --- a/rest/api/v3/mc_stats/docs/ListSingleSendTrackingStat.md +++ /dev/null @@ -1,56 +0,0 @@ -# ListSingleSendTrackingStat - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListSingleSendTrackingStat**](ListSingleSendTrackingStat.md#ListSingleSendTrackingStat) | **Get** /v3/marketing/stats/singlesends/{Id}/links | Get Single Send Click Tracking Stats by ID - - - -## ListSingleSendTrackingStat - -> SinglesendsLinkStatsResponse ListSingleSendTrackingStat(ctx, Idoptional) - -Get Single Send Click Tracking Stats by ID - -**This endpoint lets you retrieve click-tracking stats for one Single Send**. The stats returned list the URLs embedded in the specified Single Send and the number of clicks each one received. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of Single Send for which you want to retrieve link stats. - -### Other Parameters - -Other parameters are passed through a pointer to a ListSingleSendTrackingStatParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**PageSize** | **int32** | The number of elements you want returned on each page. -**PageToken** | **string** | The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. -**GroupBy** | [**[]Items2**](Items2.md) | A/B Single Sends have multiple variation IDs and phase IDs. Including these additional fields allows further granularity of stats by these fields. -**AbVariationId** | **string** | -**AbPhaseId** | [**AbPhaseId**](AbPhaseIdAbPhaseId.md) | - -### Return type - -[**SinglesendsLinkStatsResponse**](SinglesendsLinkStatsResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_stats/docs/Metadata.md b/rest/api/v3/mc_stats/docs/Metadata.md deleted file mode 100644 index 79ca153c..00000000 --- a/rest/api/v3/mc_stats/docs/Metadata.md +++ /dev/null @@ -1,14 +0,0 @@ -# Metadata - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Prev** | **string** | The URL of the previous page of results. If this field isn't present, you're at the start of the list. |[optional] -**Self** | **string** | The URL of the current page of results. |[optional] -**Next** | **string** | The URL of the next page of results. If this field isn't present, you're at the end of the list. |[optional] -**Count** | **float32** | The number of items in the entire list, i.e., across all pages. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_stats/docs/Metrics.md b/rest/api/v3/mc_stats/docs/Metrics.md deleted file mode 100644 index 029b2ac5..00000000 --- a/rest/api/v3/mc_stats/docs/Metrics.md +++ /dev/null @@ -1,22 +0,0 @@ -# Metrics - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**BounceDrops** | **int32** | | -**Bounces** | **int32** | | -**Clicks** | **int32** | | -**Delivered** | **int32** | | -**InvalidEmails** | **int32** | | -**Opens** | **int32** | | -**Requests** | **int32** | | -**SpamReportDrops** | **int32** | | -**SpamReports** | **int32** | | -**UniqueClicks** | **int32** | | -**UniqueOpens** | **int32** | | -**Unsubscribes** | **int32** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_stats/docs/SinglesendsLinkStatsResponse.md b/rest/api/v3/mc_stats/docs/SinglesendsLinkStatsResponse.md deleted file mode 100644 index e6d5eb4f..00000000 --- a/rest/api/v3/mc_stats/docs/SinglesendsLinkStatsResponse.md +++ /dev/null @@ -1,13 +0,0 @@ -# SinglesendsLinkStatsResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Results** | [**[]SinglesendsLinkStatsResponseResultsInner**](SinglesendsLinkStatsResponseResultsInner.md) | This is the index of the link's location in the email contents. | -**Metadata** | [**LinkTrackingMetadata**](LinkTrackingMetadata.md) | | -**TotalClicks** | **int32** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_stats/docs/SinglesendsLinkStatsResponseResultsInner.md b/rest/api/v3/mc_stats/docs/SinglesendsLinkStatsResponseResultsInner.md deleted file mode 100644 index 4d8176d8..00000000 --- a/rest/api/v3/mc_stats/docs/SinglesendsLinkStatsResponseResultsInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# SinglesendsLinkStatsResponseResultsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Url** | **string** | This is the URL of the link clicked. If `{{custom_fields}}` are part of the URL, they will be included. | -**UrlLocation** | **int32** | This is the location of the link clicked in each Single Send A/B variation, or in the Single Send itself if there are no variations. Links are numbered from the top down; the topmost link is index `0`. |[optional] -**AbVariation** | **string** | This is the A/B variation of the Single Send stat returned. It is set to `\"all\"` if the `ab_variation` query parameter was not set in the request and `group_by` doesn't contain `ab_variation`. | -**AbPhase** | [**AbPhase1**](AbPhase1.md) | This is the A/B phase of the Single Send stat returned. If the `ab_phase` query parameter was not provided, it will return `\"all\"`. | -**Clicks** | **int32** | the number of clicks on this particular link | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_stats/docs/SinglesendsResponse.md b/rest/api/v3/mc_stats/docs/SinglesendsResponse.md deleted file mode 100644 index 057df7b1..00000000 --- a/rest/api/v3/mc_stats/docs/SinglesendsResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# SinglesendsResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Results** | [**[]SinglesendsResponseResultsInner**](SinglesendsResponseResultsInner.md) | | -**Metadata** | [**Metadata**](Metadata.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_stats/docs/SinglesendsResponseResultsInner.md b/rest/api/v3/mc_stats/docs/SinglesendsResponseResultsInner.md deleted file mode 100644 index 319301d6..00000000 --- a/rest/api/v3/mc_stats/docs/SinglesendsResponseResultsInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# SinglesendsResponseResultsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | This is the ID of the Single Send you require stats for. | -**AbVariation** | **string** | This is the A/B variation of the Single Send stat returned. If the `group_by` parameter doesn't include `ab_variation` in the request, then the value is \"all\". |[default to "a14dcc63-d651-4c57-9826-4a3705f5c78d"] -**AbPhase** | [**AbPhase**](AbPhase.md) | This is the A/B phase of the Single Send stat returned. If the `group_by` parameter doesn't include `ab_phase` in the request, then the value is \"all\". | -**Aggregation** | **string** | This describes the time unit to which the stat is rolled up. It is based on the `aggregated_by` parameter included in the request. It can be \"total\" or the date (in YYYY-MM-DD format) the stats are for. |[optional] [default to "total"] -**Stats** | [**Metrics**](Metrics.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_stats/model_ab_phase.go b/rest/api/v3/mc_stats/model_ab_phase.go deleted file mode 100644 index 4b242ec7..00000000 --- a/rest/api/v3/mc_stats/model_ab_phase.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AbPhase the model 'AbPhase' -type AbPhase string - -// List of AbPhase -const ( - ABPHASE_SEND AbPhase = "send" - ABPHASE_TEST AbPhase = "test" - ABPHASE_ALL AbPhase = "all" -) diff --git a/rest/api/v3/mc_stats/model_ab_phase1.go b/rest/api/v3/mc_stats/model_ab_phase1.go deleted file mode 100644 index d2ead496..00000000 --- a/rest/api/v3/mc_stats/model_ab_phase1.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AbPhase1 the model 'AbPhase1' -type AbPhase1 string - -// List of AbPhase1 -const ( - ABPHASE1_SEND AbPhase1 = "send" - ABPHASE1_TEST AbPhase1 = "test" - ABPHASE1_ALL AbPhase1 = "all" -) diff --git a/rest/api/v3/mc_stats/model_ab_phase_id.go b/rest/api/v3/mc_stats/model_ab_phase_id.go deleted file mode 100644 index ef008051..00000000 --- a/rest/api/v3/mc_stats/model_ab_phase_id.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AbPhaseId the model 'AbPhaseId' -type AbPhaseId string - -// List of AbPhaseId -const ( - ABPHASEID_TEST AbPhaseId = "test" - ABPHASEID_SEND AbPhaseId = "send" -) diff --git a/rest/api/v3/mc_stats/model_aggregated_by.go b/rest/api/v3/mc_stats/model_aggregated_by.go deleted file mode 100644 index 9a5f47ea..00000000 --- a/rest/api/v3/mc_stats/model_aggregated_by.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AggregatedBy the model 'AggregatedBy' -type AggregatedBy string - -// List of AggregatedBy -const ( - AGGREGATEDBY_DAY AggregatedBy = "day" - AGGREGATEDBY_TOTAL AggregatedBy = "total" -) diff --git a/rest/api/v3/mc_stats/model_autmoations_link_stats_response.go b/rest/api/v3/mc_stats/model_autmoations_link_stats_response.go deleted file mode 100644 index eb0f0456..00000000 --- a/rest/api/v3/mc_stats/model_autmoations_link_stats_response.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AutmoationsLinkStatsResponse struct for AutmoationsLinkStatsResponse -type AutmoationsLinkStatsResponse struct { - // - Results []AutmoationsLinkStatsResponseResultsInner `json:"results"` - TotalClicks int32 `json:"total_clicks"` - Metadata LinkTrackingMetadata `json:"_metadata"` -} diff --git a/rest/api/v3/mc_stats/model_autmoations_link_stats_response_results_inner.go b/rest/api/v3/mc_stats/model_autmoations_link_stats_response_results_inner.go deleted file mode 100644 index dd2efae5..00000000 --- a/rest/api/v3/mc_stats/model_autmoations_link_stats_response_results_inner.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AutmoationsLinkStatsResponseResultsInner struct for AutmoationsLinkStatsResponseResultsInner -type AutmoationsLinkStatsResponseResultsInner struct { - // This is the URL of the link clicked. If `{{custom_fields}}` are part of the URL, they will be included. - Url string `json:"url"` - // This is the location of the link clicked in each Automation step. Links are located according to their position within the message; the topmost link has index `0`. - UrlLocation *int32 `json:"url_location,omitempty"` - // This is the ID of the step if the stats were requested to be grouped by `step_id`. - StepId string `json:"step_id"` - // The number of clicks on this particular link. - Clicks int32 `json:"clicks"` -} diff --git a/rest/api/v3/mc_stats/model_automations_response.go b/rest/api/v3/mc_stats/model_automations_response.go deleted file mode 100644 index 6ac11cde..00000000 --- a/rest/api/v3/mc_stats/model_automations_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AutomationsResponse struct for AutomationsResponse -type AutomationsResponse struct { - Results []AutomationsResponseResultsInner `json:"results"` - Metadata *Metadata `json:"_metadata,omitempty"` -} diff --git a/rest/api/v3/mc_stats/model_automations_response_results_inner.go b/rest/api/v3/mc_stats/model_automations_response_results_inner.go deleted file mode 100644 index 18bfe774..00000000 --- a/rest/api/v3/mc_stats/model_automations_response_results_inner.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AutomationsResponseResultsInner struct for AutomationsResponseResultsInner -type AutomationsResponseResultsInner struct { - // This is the ID of the Automation you are requesting stats for. - Id string `json:"id"` - // This describes the time unit to which the stat is rolled up. It is based on the `aggregated_by` parameter included in the request. It can be \"total\" or the date (in YYYY-MM-DD format) the stats are for. - Aggregation string `json:"aggregation"` - // This is the ID of the step if the stats were requested to be grouped by `step_id`. - StepId string `json:"step_id"` - Stats *Metrics `json:"stats,omitempty"` -} diff --git a/rest/api/v3/mc_stats/model_error_response.go b/rest/api/v3/mc_stats/model_error_response.go deleted file mode 100644 index 523ed1d3..00000000 --- a/rest/api/v3/mc_stats/model_error_response.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponse struct for ErrorResponse -type ErrorResponse struct { - Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` - // When applicable, this property value will be an error ID. - Id *string `json:"id,omitempty"` -} diff --git a/rest/api/v3/mc_stats/model_error_response_errors_inner.go b/rest/api/v3/mc_stats/model_error_response_errors_inner.go deleted file mode 100644 index 7e65ce73..00000000 --- a/rest/api/v3/mc_stats/model_error_response_errors_inner.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner -type ErrorResponseErrorsInner struct { - // An error message. - Message *string `json:"message,omitempty"` - // When applicable, this property value will be the field that generated the error. - Field *string `json:"field,omitempty"` - // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. - Help *map[string]interface{} `json:"help,omitempty"` -} diff --git a/rest/api/v3/mc_stats/model_items.go b/rest/api/v3/mc_stats/model_items.go deleted file mode 100644 index bc42ad0a..00000000 --- a/rest/api/v3/mc_stats/model_items.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Items the model 'Items' -type Items string - -// List of Items -const ( - ITEMS_STEP_ID Items = "step_id" -) diff --git a/rest/api/v3/mc_stats/model_items1.go b/rest/api/v3/mc_stats/model_items1.go deleted file mode 100644 index 7f1fba4f..00000000 --- a/rest/api/v3/mc_stats/model_items1.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Items1 the model 'Items1' -type Items1 string - -// List of Items1 -const ( - ITEMS1_VARIATION Items1 = "ab_variation" - ITEMS1_PHASE Items1 = "ab_phase" -) diff --git a/rest/api/v3/mc_stats/model_items2.go b/rest/api/v3/mc_stats/model_items2.go deleted file mode 100644 index 686f84b8..00000000 --- a/rest/api/v3/mc_stats/model_items2.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Items2 the model 'Items2' -type Items2 string - -// List of Items2 -const ( - ITEMS2_VARIATION Items2 = "ab_variation" - ITEMS2_PHASE Items2 = "ab_phase" -) diff --git a/rest/api/v3/mc_stats/model_link_tracking_metadata.go b/rest/api/v3/mc_stats/model_link_tracking_metadata.go deleted file mode 100644 index e5ba7a4e..00000000 --- a/rest/api/v3/mc_stats/model_link_tracking_metadata.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// LinkTrackingMetadata struct for LinkTrackingMetadata -type LinkTrackingMetadata struct { - // The URL of the previous page of results. If this field isn't present, you're at the start of the list. - Prev *string `json:"prev,omitempty"` - // The URL of the current page of results. - Self *string `json:"self,omitempty"` - // The URL of the next page of results. If this field isn't present, you're at the end of the list. - Next *string `json:"next,omitempty"` - // The number of items in the entire list, i.e., across all pages. - Count *float32 `json:"count,omitempty"` -} diff --git a/rest/api/v3/mc_stats/model_metadata.go b/rest/api/v3/mc_stats/model_metadata.go deleted file mode 100644 index 25cdeaa3..00000000 --- a/rest/api/v3/mc_stats/model_metadata.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Metadata struct for Metadata -type Metadata struct { - // The URL of the previous page of results. If this field isn't present, you're at the start of the list. - Prev *string `json:"prev,omitempty"` - // The URL of the current page of results. - Self *string `json:"self,omitempty"` - // The URL of the next page of results. If this field isn't present, you're at the end of the list. - Next *string `json:"next,omitempty"` - // The number of items in the entire list, i.e., across all pages. - Count *float32 `json:"count,omitempty"` -} diff --git a/rest/api/v3/mc_stats/model_metrics.go b/rest/api/v3/mc_stats/model_metrics.go deleted file mode 100644 index 1242dc27..00000000 --- a/rest/api/v3/mc_stats/model_metrics.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Metrics struct for Metrics -type Metrics struct { - BounceDrops int32 `json:"bounce_drops"` - Bounces int32 `json:"bounces"` - Clicks int32 `json:"clicks"` - Delivered int32 `json:"delivered"` - InvalidEmails int32 `json:"invalid_emails"` - Opens int32 `json:"opens"` - Requests int32 `json:"requests"` - SpamReportDrops int32 `json:"spam_report_drops"` - SpamReports int32 `json:"spam_reports"` - UniqueClicks int32 `json:"unique_clicks"` - UniqueOpens int32 `json:"unique_opens"` - Unsubscribes int32 `json:"unsubscribes"` -} diff --git a/rest/api/v3/mc_stats/model_singlesends_link_stats_response.go b/rest/api/v3/mc_stats/model_singlesends_link_stats_response.go deleted file mode 100644 index a5c9989d..00000000 --- a/rest/api/v3/mc_stats/model_singlesends_link_stats_response.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SinglesendsLinkStatsResponse struct for SinglesendsLinkStatsResponse -type SinglesendsLinkStatsResponse struct { - // This is the index of the link's location in the email contents. - Results []SinglesendsLinkStatsResponseResultsInner `json:"results"` - Metadata LinkTrackingMetadata `json:"_metadata"` - TotalClicks *int32 `json:"total_clicks,omitempty"` -} diff --git a/rest/api/v3/mc_stats/model_singlesends_link_stats_response_results_inner.go b/rest/api/v3/mc_stats/model_singlesends_link_stats_response_results_inner.go deleted file mode 100644 index b07590ac..00000000 --- a/rest/api/v3/mc_stats/model_singlesends_link_stats_response_results_inner.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SinglesendsLinkStatsResponseResultsInner struct for SinglesendsLinkStatsResponseResultsInner -type SinglesendsLinkStatsResponseResultsInner struct { - // This is the URL of the link clicked. If `{{custom_fields}}` are part of the URL, they will be included. - Url string `json:"url"` - // This is the location of the link clicked in each Single Send A/B variation, or in the Single Send itself if there are no variations. Links are numbered from the top down; the topmost link is index `0`. - UrlLocation *int32 `json:"url_location,omitempty"` - // This is the A/B variation of the Single Send stat returned. It is set to `\"all\"` if the `ab_variation` query parameter was not set in the request and `group_by` doesn't contain `ab_variation`. - AbVariation string `json:"ab_variation"` - // This is the A/B phase of the Single Send stat returned. If the `ab_phase` query parameter was not provided, it will return `\"all\"`. - AbPhase AbPhase1 `json:"ab_phase"` - // the number of clicks on this particular link - Clicks int32 `json:"clicks"` -} diff --git a/rest/api/v3/mc_stats/model_singlesends_response.go b/rest/api/v3/mc_stats/model_singlesends_response.go deleted file mode 100644 index 6dcecd1e..00000000 --- a/rest/api/v3/mc_stats/model_singlesends_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SinglesendsResponse struct for SinglesendsResponse -type SinglesendsResponse struct { - Results []SinglesendsResponseResultsInner `json:"results"` - Metadata Metadata `json:"_metadata"` -} diff --git a/rest/api/v3/mc_stats/model_singlesends_response_results_inner.go b/rest/api/v3/mc_stats/model_singlesends_response_results_inner.go deleted file mode 100644 index 98b52187..00000000 --- a/rest/api/v3/mc_stats/model_singlesends_response_results_inner.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Statistics API -* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SinglesendsResponseResultsInner struct for SinglesendsResponseResultsInner -type SinglesendsResponseResultsInner struct { - // This is the ID of the Single Send you require stats for. - Id string `json:"id"` - // This is the A/B variation of the Single Send stat returned. If the `group_by` parameter doesn't include `ab_variation` in the request, then the value is \"all\". - AbVariation string `json:"ab_variation"` - // This is the A/B phase of the Single Send stat returned. If the `group_by` parameter doesn't include `ab_phase` in the request, then the value is \"all\". - AbPhase AbPhase `json:"ab_phase"` - // This describes the time unit to which the stat is rolled up. It is based on the `aggregated_by` parameter included in the request. It can be \"total\" or the date (in YYYY-MM-DD format) the stats are for. - Aggregation *string `json:"aggregation,omitempty"` - Stats *Metrics `json:"stats,omitempty"` -} diff --git a/rest/api/v3/mc_test/.openapi-generator b/rest/api/v3/mc_test/.openapi-generator deleted file mode 100644 index 183fa1b4..00000000 --- a/rest/api/v3/mc_test/.openapi-generator +++ /dev/null @@ -1,12 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_send_test_marketing_email.go -api_service.go -docs/ErrorResponse.md -docs/ErrorResponseErrorsInner.md -docs/SendTestMarketingEmail.md -docs/SendTestMarketingEmailRequest.md -model_error_response.go -model_error_response_errors_inner.go -model_send_test_marketing_email_request.go diff --git a/rest/api/v3/mc_test/.openapi-generator-ignore b/rest/api/v3/mc_test/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/mc_test/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/mc_test/README.md b/rest/api/v3/mc_test/README.md deleted file mode 100644 index 144c10fe..00000000 --- a/rest/api/v3/mc_test/README.md +++ /dev/null @@ -1,62 +0,0 @@ -# Go API client for - -The Twilio SendGrid Test Email API allows you to test a marketing email by first sending it to a list of up to 10 email addresses before pushing to a contact list or segment. With this feature, you can test the layout and content of your message in multiple email clients and with multiple recipients to see how it will function in a real-world scenario. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:38.260054+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*SendTestMarketingEmail* | [**SendTestMarketingEmail**](docs/SendTestMarketingEmail.md#sendtestmarketingemail) | **Post** /v3/marketing/test/send_email | Send a Test Marketing Email - - -## Documentation For Models - - - [ErrorResponse](ErrorResponse.md) - - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) - - [SendTestMarketingEmailRequest](SendTestMarketingEmailRequest.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/mc_test/api_send_test_marketing_email.go b/rest/api/v3/mc_test/api_send_test_marketing_email.go deleted file mode 100644 index 75e09147..00000000 --- a/rest/api/v3/mc_test/api_send_test_marketing_email.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Send Test Email API -* The Twilio SendGrid Test Email API allows you to test a marketing email by first sending it to a list of up to 10 email addresses before pushing to a contact list or segment. With this feature, you can test the layout and content of your message in multiple email clients and with multiple recipients to see how it will function in a real-world scenario. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type SendTestMarketingEmailParam struct { - // - SendTestMarketingEmailRequest *SendTestMarketingEmailRequest `json:"SendTestMarketingEmailRequest,omitempty"` -} - -func (params *SendTestMarketingEmailParam) SetSendTestMarketingEmailRequest(SendTestMarketingEmailRequest SendTestMarketingEmailRequest) *SendTestMarketingEmailParam { - params.SendTestMarketingEmailRequest = &SendTestMarketingEmailRequest - return params -} - -// **This endpoint allows you to send a test marketing email to a list of email addresses**. Before sending a marketing message, you can test it using this endpoint. You may specify up to **10 contacts** in the `emails` request body field. You must also specify a `template_id` and include either a `from_address` or `sender_id`. You can manage your templates with the [Twilio SendGrid App](https://mc.sendgrid.com/dynamic-templates) or the [Transactional Templates API](https://docs.sendgrid.com/api-reference/transactional-templates). > Please note that this endpoint works with Dynamic Transactional Templates only. Legacy Transactional Templates will not be delivered. For more information about managing Dynamic Transactional Templates, see [How to Send Email with Dynamic Transactional Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/). You can also test your Single Sends in the [Twilio SendGrid Marketing Campaigns UI](https://mc.sendgrid.com/single-sends). -func (c *ApiService) SendTestMarketingEmail(params *SendTestMarketingEmailParam) (interface{}, error) { - path := "/v3/marketing/test/send_email" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.SendTestMarketingEmailRequest != nil { - b, err := json.Marshal(*params.SendTestMarketingEmailRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 202 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/mc_test/api_service.go b/rest/api/v3/mc_test/api_service.go deleted file mode 100644 index 352104a5..00000000 --- a/rest/api/v3/mc_test/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Send Test Email API -* The Twilio SendGrid Test Email API allows you to test a marketing email by first sending it to a list of up to 10 email addresses before pushing to a contact list or segment. With this feature, you can test the layout and content of your message in multiple email clients and with multiple recipients to see how it will function in a real-world scenario. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/mc_test/docs/ErrorResponse.md b/rest/api/v3/mc_test/docs/ErrorResponse.md deleted file mode 100644 index ec2d41f6..00000000 --- a/rest/api/v3/mc_test/docs/ErrorResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ErrorResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] -**Id** | **string** | When applicable, this property value will be an error ID. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_test/docs/ErrorResponseErrorsInner.md b/rest/api/v3/mc_test/docs/ErrorResponseErrorsInner.md deleted file mode 100644 index 5449c685..00000000 --- a/rest/api/v3/mc_test/docs/ErrorResponseErrorsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ErrorResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | An error message. |[optional] -**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] -**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_test/docs/SendTestMarketingEmail.md b/rest/api/v3/mc_test/docs/SendTestMarketingEmail.md deleted file mode 100644 index 11a3daf9..00000000 --- a/rest/api/v3/mc_test/docs/SendTestMarketingEmail.md +++ /dev/null @@ -1,48 +0,0 @@ -# SendTestMarketingEmail - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**SendTestMarketingEmail**](SendTestMarketingEmail.md#SendTestMarketingEmail) | **Post** /v3/marketing/test/send_email | Send a Test Marketing Email - - - -## SendTestMarketingEmail - -> map[string]interface{} SendTestMarketingEmail(ctx, optional) - -Send a Test Marketing Email - -**This endpoint allows you to send a test marketing email to a list of email addresses**. Before sending a marketing message, you can test it using this endpoint. You may specify up to **10 contacts** in the `emails` request body field. You must also specify a `template_id` and include either a `from_address` or `sender_id`. You can manage your templates with the [Twilio SendGrid App](https://mc.sendgrid.com/dynamic-templates) or the [Transactional Templates API](https://docs.sendgrid.com/api-reference/transactional-templates). > Please note that this endpoint works with Dynamic Transactional Templates only. Legacy Transactional Templates will not be delivered. For more information about managing Dynamic Transactional Templates, see [How to Send Email with Dynamic Transactional Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/). You can also test your Single Sends in the [Twilio SendGrid Marketing Campaigns UI](https://mc.sendgrid.com/single-sends). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a SendTestMarketingEmailParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**SendTestMarketingEmailRequest** | [**SendTestMarketingEmailRequest**](SendTestMarketingEmailRequest.md) | - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/mc_test/docs/SendTestMarketingEmailRequest.md b/rest/api/v3/mc_test/docs/SendTestMarketingEmailRequest.md deleted file mode 100644 index 930d86ba..00000000 --- a/rest/api/v3/mc_test/docs/SendTestMarketingEmailRequest.md +++ /dev/null @@ -1,17 +0,0 @@ -# SendTestMarketingEmailRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**TemplateId** | **string** | The ID of the template that you would like to use. If you use a template that contains a subject and content (either text or HTML), then those values specified at the personalizations or message level will not be used. | -**VersionIdOverride** | **string** | You can override the active template with an alternative template version by passing the version ID in this field. If this field is blank, the active template version will be used. |[optional] -**SenderId** | **int32** | This ID must belong to a verified sender. Alternatively, you may supply a `from_address` email. |[optional] -**CustomUnsubscribeUrl** | **string** | A custom unsubscribe URL. |[optional] -**SuppressionGroupId** | **int32** | |[optional] -**Emails** | **[]string** | An array of email addresses you want to send the test message to. | -**FromAddress** | **string** | You can either specify this address or specify a verified sender ID. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/mc_test/model_error_response.go b/rest/api/v3/mc_test/model_error_response.go deleted file mode 100644 index db9a301c..00000000 --- a/rest/api/v3/mc_test/model_error_response.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Send Test Email API -* The Twilio SendGrid Test Email API allows you to test a marketing email by first sending it to a list of up to 10 email addresses before pushing to a contact list or segment. With this feature, you can test the layout and content of your message in multiple email clients and with multiple recipients to see how it will function in a real-world scenario. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponse struct for ErrorResponse -type ErrorResponse struct { - Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` - // When applicable, this property value will be an error ID. - Id *string `json:"id,omitempty"` -} diff --git a/rest/api/v3/mc_test/model_error_response_errors_inner.go b/rest/api/v3/mc_test/model_error_response_errors_inner.go deleted file mode 100644 index 9c7eb834..00000000 --- a/rest/api/v3/mc_test/model_error_response_errors_inner.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Send Test Email API -* The Twilio SendGrid Test Email API allows you to test a marketing email by first sending it to a list of up to 10 email addresses before pushing to a contact list or segment. With this feature, you can test the layout and content of your message in multiple email clients and with multiple recipients to see how it will function in a real-world scenario. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner -type ErrorResponseErrorsInner struct { - // An error message. - Message *string `json:"message,omitempty"` - // When applicable, this property value will be the field that generated the error. - Field *string `json:"field,omitempty"` - // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. - Help *map[string]interface{} `json:"help,omitempty"` -} diff --git a/rest/api/v3/mc_test/model_send_test_marketing_email_request.go b/rest/api/v3/mc_test/model_send_test_marketing_email_request.go deleted file mode 100644 index 79bf2781..00000000 --- a/rest/api/v3/mc_test/model_send_test_marketing_email_request.go +++ /dev/null @@ -1,31 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Marketing Campaigns Send Test Email API -* The Twilio SendGrid Test Email API allows you to test a marketing email by first sending it to a list of up to 10 email addresses before pushing to a contact list or segment. With this feature, you can test the layout and content of your message in multiple email clients and with multiple recipients to see how it will function in a real-world scenario. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SendTestMarketingEmailRequest struct for SendTestMarketingEmailRequest -type SendTestMarketingEmailRequest struct { - // The ID of the template that you would like to use. If you use a template that contains a subject and content (either text or HTML), then those values specified at the personalizations or message level will not be used. - TemplateId string `json:"template_id"` - // You can override the active template with an alternative template version by passing the version ID in this field. If this field is blank, the active template version will be used. - VersionIdOverride *string `json:"version_id_override,omitempty"` - // This ID must belong to a verified sender. Alternatively, you may supply a `from_address` email. - SenderId *int32 `json:"sender_id,omitempty"` - // A custom unsubscribe URL. - CustomUnsubscribeUrl *string `json:"custom_unsubscribe_url,omitempty"` - SuppressionGroupId *int32 `json:"suppression_group_id,omitempty"` - // An array of email addresses you want to send the test message to. - Emails []string `json:"emails"` - // You can either specify this address or specify a verified sender ID. - FromAddress *string `json:"from_address,omitempty"` -} diff --git a/rest/api/v3/partner/.openapi-generator b/rest/api/v3/partner/.openapi-generator deleted file mode 100644 index c8d64e7c..00000000 --- a/rest/api/v3/partner/.openapi-generator +++ /dev/null @@ -1,10 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_list_partner_setting.go -api_service.go -docs/ListPartnerSetting.md -docs/ListPartnerSetting200Response.md -docs/ListPartnerSetting200ResponseResultInner.md -model_list_partner_setting_200_response.go -model_list_partner_setting_200_response_result_inner.go diff --git a/rest/api/v3/partner/.openapi-generator-ignore b/rest/api/v3/partner/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/partner/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/partner/README.md b/rest/api/v3/partner/README.md deleted file mode 100644 index ad6b3a73..00000000 --- a/rest/api/v3/partner/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# Go API client for - -The Twilio SendGrid Partner Settings API allows you to integrate your SendGrid account with our partners to increase your SendGrid experience and functionality. For more information about our partners and how you can begin integrating with them, please visit our [Partners page](https://sendgrid.com/partners/marketplace/). - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:38.278044+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*ListPartnerSetting* | [**ListPartnerSetting**](docs/ListPartnerSetting.md#listpartnersetting) | **Get** /v3/partner_settings | Returns a list of all partner settings. - - -## Documentation For Models - - - [ListPartnerSetting200Response](ListPartnerSetting200Response.md) - - [ListPartnerSetting200ResponseResultInner](ListPartnerSetting200ResponseResultInner.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/partner/api_list_partner_setting.go b/rest/api/v3/partner/api_list_partner_setting.go deleted file mode 100644 index 77ec2a94..00000000 --- a/rest/api/v3/partner/api_list_partner_setting.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Partner API -* The Twilio SendGrid Partner Settings API allows you to integrate your SendGrid account with our partners to increase your SendGrid experience and functionality. For more information about our partners and how you can begin integrating with them, please visit our [Partners page](https://sendgrid.com/partners/marketplace/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListPartnerSettingParam struct { - // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. - Limit *int32 `json:"limit,omitempty"` - // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. - Offset *int32 `json:"offset,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListPartnerSettingParam) SetLimit(Limit int32) *ListPartnerSettingParam { - params.Limit = &Limit - return params -} -func (params *ListPartnerSettingParam) SetOffset(Offset int32) *ListPartnerSettingParam { - params.Offset = &Offset - return params -} -func (params *ListPartnerSettingParam) SetOnbehalfof(Onbehalfof string) *ListPartnerSettingParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a paginated list of all partner settings that you can enable.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items.' -func (c *ApiService) ListPartnerSetting(params *ListPartnerSettingParam) (interface{}, error) { - path := "/v3/partner_settings" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListPartnerSetting200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/partner/api_service.go b/rest/api/v3/partner/api_service.go deleted file mode 100644 index f4bf0ab0..00000000 --- a/rest/api/v3/partner/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Partner API -* The Twilio SendGrid Partner Settings API allows you to integrate your SendGrid account with our partners to increase your SendGrid experience and functionality. For more information about our partners and how you can begin integrating with them, please visit our [Partners page](https://sendgrid.com/partners/marketplace/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/partner/docs/ListPartnerSetting.md b/rest/api/v3/partner/docs/ListPartnerSetting.md deleted file mode 100644 index c8a2675b..00000000 --- a/rest/api/v3/partner/docs/ListPartnerSetting.md +++ /dev/null @@ -1,50 +0,0 @@ -# ListPartnerSetting - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListPartnerSetting**](ListPartnerSetting.md#ListPartnerSetting) | **Get** /v3/partner_settings | Returns a list of all partner settings. - - - -## ListPartnerSetting - -> ListPartnerSetting200Response ListPartnerSetting(ctx, optional) - -Returns a list of all partner settings. - -**This endpoint allows you to retrieve a paginated list of all partner settings that you can enable.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items.' - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListPartnerSettingParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. -**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListPartnerSetting200Response**](ListPartnerSetting200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/partner/docs/ListPartnerSetting200Response.md b/rest/api/v3/partner/docs/ListPartnerSetting200Response.md deleted file mode 100644 index ab110ce2..00000000 --- a/rest/api/v3/partner/docs/ListPartnerSetting200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListPartnerSetting200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]ListPartnerSetting200ResponseResultInner**](ListPartnerSetting200ResponseResultInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/partner/docs/ListPartnerSetting200ResponseResultInner.md b/rest/api/v3/partner/docs/ListPartnerSetting200ResponseResultInner.md deleted file mode 100644 index 92854890..00000000 --- a/rest/api/v3/partner/docs/ListPartnerSetting200ResponseResultInner.md +++ /dev/null @@ -1,14 +0,0 @@ -# ListPartnerSetting200ResponseResultInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Title** | **string** | The title of the partner. | -**Enabled** | **bool** | Indicates if this partner setting has been enabled. | -**Name** | **string** | The name of the partner setting. | -**Description** | **string** | A description of this partner setting. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/partner/model_list_partner_setting_200_response.go b/rest/api/v3/partner/model_list_partner_setting_200_response.go deleted file mode 100644 index f4ad199e..00000000 --- a/rest/api/v3/partner/model_list_partner_setting_200_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Partner API -* The Twilio SendGrid Partner Settings API allows you to integrate your SendGrid account with our partners to increase your SendGrid experience and functionality. For more information about our partners and how you can begin integrating with them, please visit our [Partners page](https://sendgrid.com/partners/marketplace/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListPartnerSetting200Response struct for ListPartnerSetting200Response -type ListPartnerSetting200Response struct { - Result *[]ListPartnerSetting200ResponseResultInner `json:"result,omitempty"` -} diff --git a/rest/api/v3/partner/model_list_partner_setting_200_response_result_inner.go b/rest/api/v3/partner/model_list_partner_setting_200_response_result_inner.go deleted file mode 100644 index 7aa81206..00000000 --- a/rest/api/v3/partner/model_list_partner_setting_200_response_result_inner.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Partner API -* The Twilio SendGrid Partner Settings API allows you to integrate your SendGrid account with our partners to increase your SendGrid experience and functionality. For more information about our partners and how you can begin integrating with them, please visit our [Partners page](https://sendgrid.com/partners/marketplace/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListPartnerSetting200ResponseResultInner struct for ListPartnerSetting200ResponseResultInner -type ListPartnerSetting200ResponseResultInner struct { - // The title of the partner. - Title string `json:"title"` - // Indicates if this partner setting has been enabled. - Enabled bool `json:"enabled"` - // The name of the partner setting. - Name string `json:"name"` - // A description of this partner setting. - Description string `json:"description"` -} diff --git a/rest/api/v3/recipients_data_erasure/.openapi-generator b/rest/api/v3/recipients_data_erasure/.openapi-generator deleted file mode 100644 index 8b7eb0f8..00000000 --- a/rest/api/v3/recipients_data_erasure/.openapi-generator +++ /dev/null @@ -1,12 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_erase_recipient_email_data.go -api_service.go -docs/EraseRecipientEmailData.md -docs/RecipientsDataErasureEraseRecipientsRequest.md -docs/RecipientsDataErasureErrorV1.md -docs/RecipientsDataErasureJobId.md -model_recipients_data_erasure_erase_recipients_request.go -model_recipients_data_erasure_error_v1.go -model_recipients_data_erasure_job_id.go diff --git a/rest/api/v3/recipients_data_erasure/.openapi-generator-ignore b/rest/api/v3/recipients_data_erasure/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/recipients_data_erasure/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/recipients_data_erasure/README.md b/rest/api/v3/recipients_data_erasure/README.md deleted file mode 100644 index f53e7d9c..00000000 --- a/rest/api/v3/recipients_data_erasure/README.md +++ /dev/null @@ -1,62 +0,0 @@ -# Go API client for - -The Recipients' Data Erasure API allows Twilio SendGrid customers to delete their own customers' personal data from the Twilio SendGrid Platform. The use of this API facilitates the self-service removal of email personal data from the Twilio SendGrid platform and will enable customers to comply with various obligatory data privacy regulations. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:38.290288+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*EraseRecipientEmailData* | [**EraseRecipientEmailData**](docs/EraseRecipientEmailData.md#eraserecipientemaildata) | **Post** /v3/recipients/erasejob | Erase recipients' email data - - -## Documentation For Models - - - [RecipientsDataErasureEraseRecipientsRequest](RecipientsDataErasureEraseRecipientsRequest.md) - - [RecipientsDataErasureErrorV1](RecipientsDataErasureErrorV1.md) - - [RecipientsDataErasureJobId](RecipientsDataErasureJobId.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/recipients_data_erasure/api_erase_recipient_email_data.go b/rest/api/v3/recipients_data_erasure/api_erase_recipient_email_data.go deleted file mode 100644 index 4c9d7c8b..00000000 --- a/rest/api/v3/recipients_data_erasure/api_erase_recipient_email_data.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Recipients' Data Erasure API -* The Recipients' Data Erasure API allows Twilio SendGrid customers to delete their own customers' personal data from the Twilio SendGrid Platform. The use of this API facilitates the self-service removal of email personal data from the Twilio SendGrid platform and will enable customers to comply with various obligatory data privacy regulations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type EraseRecipientEmailDataParam struct { - // - RecipientsDataErasureEraseRecipientsRequest *RecipientsDataErasureEraseRecipientsRequest `json:"RecipientsDataErasureEraseRecipientsRequest"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *EraseRecipientEmailDataParam) SetRecipientsDataErasureEraseRecipientsRequest(RecipientsDataErasureEraseRecipientsRequest RecipientsDataErasureEraseRecipientsRequest) *EraseRecipientEmailDataParam { - params.RecipientsDataErasureEraseRecipientsRequest = &RecipientsDataErasureEraseRecipientsRequest - return params -} -func (params *EraseRecipientEmailDataParam) SetOnbehalfof(Onbehalfof string) *EraseRecipientEmailDataParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This operation allows you to delete your recipients' personal email data** The Delete Recipients' Email Data operation accepts a list of 5,000 `email_addresses` or a total payload size of 256Kb per request, whichever comes first. Upon a successful request with this operation, SendGrid will run a search on the email addresses provided against the SendGrid system to identify matches. SendGrid will then delete all personal data associated with the matched users such as the recipients' names, email addresses, subject lines, categories, and IP addresses. All email addresses are filtered for uniqueness and tested for structural validity—any invalid addresses will be returned in an error response. Please note that recipient data is deleted for the account making the request only—deletions do not cascade from a parent account to its Subusers' recipients. To delete a Subuser's recipients' data, you can use the `on-behalf-of` header. -func (c *ApiService) EraseRecipientEmailData(params *EraseRecipientEmailDataParam) (interface{}, error) { - path := "/v3/recipients/erasejob" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.RecipientsDataErasureEraseRecipientsRequest != nil { - b, err := json.Marshal(*params.RecipientsDataErasureEraseRecipientsRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 202 { - ps := &RecipientsDataErasureJobId{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/recipients_data_erasure/api_service.go b/rest/api/v3/recipients_data_erasure/api_service.go deleted file mode 100644 index b823caa4..00000000 --- a/rest/api/v3/recipients_data_erasure/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Recipients' Data Erasure API -* The Recipients' Data Erasure API allows Twilio SendGrid customers to delete their own customers' personal data from the Twilio SendGrid Platform. The use of this API facilitates the self-service removal of email personal data from the Twilio SendGrid platform and will enable customers to comply with various obligatory data privacy regulations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/recipients_data_erasure/docs/EraseRecipientEmailData.md b/rest/api/v3/recipients_data_erasure/docs/EraseRecipientEmailData.md deleted file mode 100644 index ef961a3d..00000000 --- a/rest/api/v3/recipients_data_erasure/docs/EraseRecipientEmailData.md +++ /dev/null @@ -1,48 +0,0 @@ -# EraseRecipientEmailData - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**EraseRecipientEmailData**](EraseRecipientEmailData.md#EraseRecipientEmailData) | **Post** /v3/recipients/erasejob | Erase recipients' email data - - - -## EraseRecipientEmailData - -> RecipientsDataErasureJobId EraseRecipientEmailData(ctx, RecipientsDataErasureEraseRecipientsRequestoptional) - -Erase recipients' email data - -**This operation allows you to delete your recipients' personal email data** The Delete Recipients' Email Data operation accepts a list of 5,000 `email_addresses` or a total payload size of 256Kb per request, whichever comes first. Upon a successful request with this operation, SendGrid will run a search on the email addresses provided against the SendGrid system to identify matches. SendGrid will then delete all personal data associated with the matched users such as the recipients' names, email addresses, subject lines, categories, and IP addresses. All email addresses are filtered for uniqueness and tested for structural validity—any invalid addresses will be returned in an error response. Please note that recipient data is deleted for the account making the request only—deletions do not cascade from a parent account to its Subusers' recipients. To delete a Subuser's recipients' data, you can use the `on-behalf-of` header. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a EraseRecipientEmailDataParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**RecipientsDataErasureJobId**](RecipientsDataErasureJobId.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureEraseRecipientsRequest.md b/rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureEraseRecipientsRequest.md deleted file mode 100644 index fed050d6..00000000 --- a/rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureEraseRecipientsRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# RecipientsDataErasureEraseRecipientsRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**EmailAddresses** | **[]string** | List of unique recipient email addresses whose PII will be erased. You may include a maximum of 5,000 addresses or a maximum payload size of 256Kb, whichever comes first. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureErrorV1.md b/rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureErrorV1.md deleted file mode 100644 index 2f32e4f2..00000000 --- a/rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureErrorV1.md +++ /dev/null @@ -1,12 +0,0 @@ -# RecipientsDataErasureErrorV1 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | The message representing the error from the API | -**Field** | **string** | The field associated with the error | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureJobId.md b/rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureJobId.md deleted file mode 100644 index 6e21073b..00000000 --- a/rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureJobId.md +++ /dev/null @@ -1,11 +0,0 @@ -# RecipientsDataErasureJobId - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**JobId** | **string** | The job ID associated with the data erasure request. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_erase_recipients_request.go b/rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_erase_recipients_request.go deleted file mode 100644 index d2ce724b..00000000 --- a/rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_erase_recipients_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Recipients' Data Erasure API -* The Recipients' Data Erasure API allows Twilio SendGrid customers to delete their own customers' personal data from the Twilio SendGrid Platform. The use of this API facilitates the self-service removal of email personal data from the Twilio SendGrid platform and will enable customers to comply with various obligatory data privacy regulations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// RecipientsDataErasureEraseRecipientsRequest struct for RecipientsDataErasureEraseRecipientsRequest -type RecipientsDataErasureEraseRecipientsRequest struct { - // List of unique recipient email addresses whose PII will be erased. You may include a maximum of 5,000 addresses or a maximum payload size of 256Kb, whichever comes first. - EmailAddresses []string `json:"email_addresses"` -} diff --git a/rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_error_v1.go b/rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_error_v1.go deleted file mode 100644 index 80864193..00000000 --- a/rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_error_v1.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Recipients' Data Erasure API -* The Recipients' Data Erasure API allows Twilio SendGrid customers to delete their own customers' personal data from the Twilio SendGrid Platform. The use of this API facilitates the self-service removal of email personal data from the Twilio SendGrid platform and will enable customers to comply with various obligatory data privacy regulations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// RecipientsDataErasureErrorV1 struct for RecipientsDataErasureErrorV1 -type RecipientsDataErasureErrorV1 struct { - // The message representing the error from the API - Message string `json:"message"` - // The field associated with the error - Field string `json:"field"` -} diff --git a/rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_job_id.go b/rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_job_id.go deleted file mode 100644 index c8a68be1..00000000 --- a/rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_job_id.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Recipients' Data Erasure API -* The Recipients' Data Erasure API allows Twilio SendGrid customers to delete their own customers' personal data from the Twilio SendGrid Platform. The use of this API facilitates the self-service removal of email personal data from the Twilio SendGrid platform and will enable customers to comply with various obligatory data privacy regulations. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// RecipientsDataErasureJobId struct for RecipientsDataErasureJobId -type RecipientsDataErasureJobId struct { - // The job ID associated with the data erasure request. - JobId string `json:"job_id"` -} diff --git a/rest/api/v3/reverse_dns/.openapi-generator b/rest/api/v3/reverse_dns/.openapi-generator deleted file mode 100644 index f0d48023..00000000 --- a/rest/api/v3/reverse_dns/.openapi-generator +++ /dev/null @@ -1,40 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_delete_reverse_dns.go -api_get_reverse_dns.go -api_list_reverse_dns.go -api_service.go -api_set_up_reverse_dns.go -api_validate_reverse_dns.go -docs/DeleteReverseDns.md -docs/GetReverseDns.md -docs/ListReverseDns.md -docs/ReverseDns.md -docs/ReverseDnsARecord.md -docs/ReverseDnsUsersInner.md -docs/SetUpReverseDns.md -docs/SetUpReverseDnsRequest.md -docs/Valid.md -docs/Valid1.md -docs/ValidateReverseDns.md -docs/ValidateReverseDns200Response.md -docs/ValidateReverseDns200ResponseValidationResults.md -docs/ValidateReverseDns200ResponseValidationResultsARecord.md -docs/ValidateReverseDns404Response.md -docs/ValidateReverseDns404ResponseErrorsInner.md -docs/ValidateReverseDns500Response.md -docs/ValidateReverseDns500ResponseErrorsInner.md -model_reverse_dns.go -model_reverse_dns_a_record.go -model_reverse_dns_users_inner.go -model_set_up_reverse_dns_request.go -model_valid.go -model_valid1.go -model_validate_reverse_dns_200_response.go -model_validate_reverse_dns_200_response_validation_results.go -model_validate_reverse_dns_200_response_validation_results_a_record.go -model_validate_reverse_dns_404_response.go -model_validate_reverse_dns_404_response_errors_inner.go -model_validate_reverse_dns_500_response.go -model_validate_reverse_dns_500_response_errors_inner.go diff --git a/rest/api/v3/reverse_dns/.openapi-generator-ignore b/rest/api/v3/reverse_dns/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/reverse_dns/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/reverse_dns/README.md b/rest/api/v3/reverse_dns/README.md deleted file mode 100644 index 919ed684..00000000 --- a/rest/api/v3/reverse_dns/README.md +++ /dev/null @@ -1,84 +0,0 @@ -# Go API client for - -The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. - -When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. - -Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. - -You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). - -See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:38.355717+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DeleteReverseDns* | [**DeleteReverseDns**](docs/DeleteReverseDns.md#deletereversedns) | **Delete** /v3/whitelabel/ips/{Id} | Delete a reverse DNS record -*GetReverseDns* | [**GetReverseDns**](docs/GetReverseDns.md#getreversedns) | **Get** /v3/whitelabel/ips/{Id} | Retrieve a reverse DNS record -*ListReverseDns* | [**ListReverseDns**](docs/ListReverseDns.md#listreversedns) | **Get** /v3/whitelabel/ips | Retrieve all reverse DNS records -*SetUpReverseDns* | [**SetUpReverseDns**](docs/SetUpReverseDns.md#setupreversedns) | **Post** /v3/whitelabel/ips | Set up reverse DNS -*ValidateReverseDns* | [**ValidateReverseDns**](docs/ValidateReverseDns.md#validatereversedns) | **Post** /v3/whitelabel/ips/{Id}/validate | Validate a reverse DNS record - - -## Documentation For Models - - - [ReverseDns](ReverseDns.md) - - [ReverseDnsARecord](ReverseDnsARecord.md) - - [ReverseDnsUsersInner](ReverseDnsUsersInner.md) - - [SetUpReverseDnsRequest](SetUpReverseDnsRequest.md) - - [Valid](Valid.md) - - [Valid1](Valid1.md) - - [ValidateReverseDns200Response](ValidateReverseDns200Response.md) - - [ValidateReverseDns200ResponseValidationResults](ValidateReverseDns200ResponseValidationResults.md) - - [ValidateReverseDns200ResponseValidationResultsARecord](ValidateReverseDns200ResponseValidationResultsARecord.md) - - [ValidateReverseDns404Response](ValidateReverseDns404Response.md) - - [ValidateReverseDns404ResponseErrorsInner](ValidateReverseDns404ResponseErrorsInner.md) - - [ValidateReverseDns500Response](ValidateReverseDns500Response.md) - - [ValidateReverseDns500ResponseErrorsInner](ValidateReverseDns500ResponseErrorsInner.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/reverse_dns/api_delete_reverse_dns.go b/rest/api/v3/reverse_dns/api_delete_reverse_dns.go deleted file mode 100644 index 56ffbf5f..00000000 --- a/rest/api/v3/reverse_dns/api_delete_reverse_dns.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Reverse DNS API -* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteReverseDnsParam struct { - // The ID of the reverse DNS record that you would like to retrieve. - Id *string `json:"id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *DeleteReverseDnsParam) SetId(Id string) *DeleteReverseDnsParam { - params.Id = &Id - return params -} -func (params *DeleteReverseDnsParam) SetOnbehalfof(Onbehalfof string) *DeleteReverseDnsParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to delete a reverse DNS record.** A call to this endpoint will respond with a 204 status code if the deletion was successful. You can retrieve the IDs associated with all your reverse DNS records using the \"Retrieve all reverse DNS records\" endpoint. -func (c *ApiService) DeleteReverseDns(params *DeleteReverseDnsParam) (interface{}, error) { - path := "/v3/whitelabel/ips/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/reverse_dns/api_get_reverse_dns.go b/rest/api/v3/reverse_dns/api_get_reverse_dns.go deleted file mode 100644 index cc27c2d5..00000000 --- a/rest/api/v3/reverse_dns/api_get_reverse_dns.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Reverse DNS API -* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetReverseDnsParam struct { - // The ID of the reverse DNS record that you would like to retrieve. - Id *string `json:"id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetReverseDnsParam) SetId(Id string) *GetReverseDnsParam { - params.Id = &Id - return params -} -func (params *GetReverseDnsParam) SetOnbehalfof(Onbehalfof string) *GetReverseDnsParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a reverse DNS record.** You can retrieve the IDs associated with all your reverse DNS records using the \"Retrieve all reverse DNS records\" endpoint. -func (c *ApiService) GetReverseDns(params *GetReverseDnsParam) (interface{}, error) { - path := "/v3/whitelabel/ips/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ReverseDns{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/reverse_dns/api_list_reverse_dns.go b/rest/api/v3/reverse_dns/api_list_reverse_dns.go deleted file mode 100644 index d992d44f..00000000 --- a/rest/api/v3/reverse_dns/api_list_reverse_dns.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Reverse DNS API -* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListReverseDnsParam struct { - // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. - Limit *int32 `json:"limit,omitempty"` - // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. - Offset *int32 `json:"offset,omitempty"` - // The IP address segment that you'd like to use in a prefix search. - Ip *string `json:"ip,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListReverseDnsParam) SetLimit(Limit int32) *ListReverseDnsParam { - params.Limit = &Limit - return params -} -func (params *ListReverseDnsParam) SetOffset(Offset int32) *ListReverseDnsParam { - params.Offset = &Offset - return params -} -func (params *ListReverseDnsParam) SetIp(Ip string) *ListReverseDnsParam { - params.Ip = &Ip - return params -} -func (params *ListReverseDnsParam) SetOnbehalfof(Onbehalfof string) *ListReverseDnsParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a paginated list of all the Reverse DNS records created by this account.** You may include a search key by using the `ip` query string parameter. This enables you to perform a prefix search for a given IP segment (e.g., `?ip=\"192.\"`). You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. -func (c *ApiService) ListReverseDns(params *ListReverseDnsParam) (interface{}, error) { - path := "/v3/whitelabel/ips" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - if params != nil && params.Ip != nil { - data.Set("ip", *params.Ip) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]ReverseDns{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/reverse_dns/api_service.go b/rest/api/v3/reverse_dns/api_service.go deleted file mode 100644 index 6e1bfe2b..00000000 --- a/rest/api/v3/reverse_dns/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Reverse DNS API -* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/reverse_dns/api_set_up_reverse_dns.go b/rest/api/v3/reverse_dns/api_set_up_reverse_dns.go deleted file mode 100644 index 0750077e..00000000 --- a/rest/api/v3/reverse_dns/api_set_up_reverse_dns.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Reverse DNS API -* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type SetUpReverseDnsParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - SetUpReverseDnsRequest *SetUpReverseDnsRequest `json:"SetUpReverseDnsRequest,omitempty"` -} - -func (params *SetUpReverseDnsParam) SetOnbehalfof(Onbehalfof string) *SetUpReverseDnsParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *SetUpReverseDnsParam) SetSetUpReverseDnsRequest(SetUpReverseDnsRequest SetUpReverseDnsRequest) *SetUpReverseDnsParam { - params.SetUpReverseDnsRequest = &SetUpReverseDnsRequest - return params -} - -// **This endpoint allows you to set up reverse DNS.** -func (c *ApiService) SetUpReverseDns(params *SetUpReverseDnsParam) (interface{}, error) { - path := "/v3/whitelabel/ips" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.SetUpReverseDnsRequest != nil { - b, err := json.Marshal(*params.SetUpReverseDnsRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &ReverseDns{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/reverse_dns/api_validate_reverse_dns.go b/rest/api/v3/reverse_dns/api_validate_reverse_dns.go deleted file mode 100644 index 0bd75a48..00000000 --- a/rest/api/v3/reverse_dns/api_validate_reverse_dns.go +++ /dev/null @@ -1,86 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Reverse DNS API -* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type ValidateReverseDnsParam struct { - // The ID of the reverse DNS record that you would like to validate. - Id *string `json:"id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ValidateReverseDnsParam) SetId(Id string) *ValidateReverseDnsParam { - params.Id = &Id - return params -} -func (params *ValidateReverseDnsParam) SetOnbehalfof(Onbehalfof string) *ValidateReverseDnsParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to validate a reverse DNS record.** Always check the `valid` property of the response’s `validation_results.a_record` object. This field will indicate whether it was possible to validate the reverse DNS record. If the `validation_results.a_record.valid` is `false`, this indicates only that Twilio SendGrid could not determine the validity your reverse DNS record — it may still be valid. If validity couldn’t be determined, you can check the value of `validation_results.a_record.reason` to find out why. You can retrieve the IDs associated with all your reverse DNS records using the \"Retrieve all reverse DNS records\" endpoint. -func (c *ApiService) ValidateReverseDns(params *ValidateReverseDnsParam) (interface{}, error) { - path := "/v3/whitelabel/ips/{Id}/validate" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ValidateReverseDns200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ValidateReverseDns404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ValidateReverseDns500Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/reverse_dns/docs/DeleteReverseDns.md b/rest/api/v3/reverse_dns/docs/DeleteReverseDns.md deleted file mode 100644 index 13f51043..00000000 --- a/rest/api/v3/reverse_dns/docs/DeleteReverseDns.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeleteReverseDns - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteReverseDns**](DeleteReverseDns.md#DeleteReverseDns) | **Delete** /v3/whitelabel/ips/{Id} | Delete a reverse DNS record - - - -## DeleteReverseDns - -> map[string]interface{} DeleteReverseDns(ctx, Idoptional) - -Delete a reverse DNS record - -**This endpoint allows you to delete a reverse DNS record.** A call to this endpoint will respond with a 204 status code if the deletion was successful. You can retrieve the IDs associated with all your reverse DNS records using the \"Retrieve all reverse DNS records\" endpoint. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of the reverse DNS record that you would like to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteReverseDnsParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/reverse_dns/docs/GetReverseDns.md b/rest/api/v3/reverse_dns/docs/GetReverseDns.md deleted file mode 100644 index c54a9054..00000000 --- a/rest/api/v3/reverse_dns/docs/GetReverseDns.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetReverseDns - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetReverseDns**](GetReverseDns.md#GetReverseDns) | **Get** /v3/whitelabel/ips/{Id} | Retrieve a reverse DNS record - - - -## GetReverseDns - -> ReverseDns GetReverseDns(ctx, Idoptional) - -Retrieve a reverse DNS record - -**This endpoint allows you to retrieve a reverse DNS record.** You can retrieve the IDs associated with all your reverse DNS records using the \"Retrieve all reverse DNS records\" endpoint. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of the reverse DNS record that you would like to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a GetReverseDnsParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ReverseDns**](ReverseDns.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/reverse_dns/docs/ListReverseDns.md b/rest/api/v3/reverse_dns/docs/ListReverseDns.md deleted file mode 100644 index 28c28b73..00000000 --- a/rest/api/v3/reverse_dns/docs/ListReverseDns.md +++ /dev/null @@ -1,51 +0,0 @@ -# ListReverseDns - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListReverseDns**](ListReverseDns.md#ListReverseDns) | **Get** /v3/whitelabel/ips | Retrieve all reverse DNS records - - - -## ListReverseDns - -> []ReverseDns ListReverseDns(ctx, optional) - -Retrieve all reverse DNS records - -**This endpoint allows you to retrieve a paginated list of all the Reverse DNS records created by this account.** You may include a search key by using the `ip` query string parameter. This enables you to perform a prefix search for a given IP segment (e.g., `?ip=\"192.\"`). You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListReverseDnsParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. -**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. -**Ip** | **string** | The IP address segment that you'd like to use in a prefix search. -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**[]ReverseDns**](ReverseDns.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/reverse_dns/docs/ReverseDns.md b/rest/api/v3/reverse_dns/docs/ReverseDns.md deleted file mode 100644 index 0e3e4d96..00000000 --- a/rest/api/v3/reverse_dns/docs/ReverseDns.md +++ /dev/null @@ -1,20 +0,0 @@ -# ReverseDns - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int32** | The ID of the Reverse DNS. | -**Ip** | **string** | The IP address that this Reverse DNS was created for. | -**Rdns** | **string** | The reverse DNS record for the IP address. This points to the Reverse DNS subdomain. | -**Users** | [**[]ReverseDnsUsersInner**](ReverseDnsUsersInner.md) | The users who are able to send mail from the IP address. | -**Subdomain** | **string** | The subdomain created for this reverse DNS. This is where the rDNS record points. |[optional] -**Domain** | **string** | The root, or sending, domain. | -**Valid** | **bool** | Indicates if this is a valid Reverse DNS. | -**Legacy** | **bool** | Indicates if this Reverse DNS was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new Reverse DNS if you need to update it. | -**LastValidationAttemptAt** | **int32** | A Unix epoch timestamp representing the last time of a validation attempt. |[optional] -**ARecord** | [**ReverseDnsARecord**](ReverseDnsARecord.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/reverse_dns/docs/ReverseDnsARecord.md b/rest/api/v3/reverse_dns/docs/ReverseDnsARecord.md deleted file mode 100644 index e0c2fb73..00000000 --- a/rest/api/v3/reverse_dns/docs/ReverseDnsARecord.md +++ /dev/null @@ -1,14 +0,0 @@ -# ReverseDnsARecord - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Valid** | **bool** | Indicates if the a_record is valid. | -**Type** | **string** | The type of DNS record. | -**Host** | **string** | This is the web address that will be mapped to the IP address. | -**Data** | **string** | The IP address being set up with Reverse DNS. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/reverse_dns/docs/ReverseDnsUsersInner.md b/rest/api/v3/reverse_dns/docs/ReverseDnsUsersInner.md deleted file mode 100644 index f28c8202..00000000 --- a/rest/api/v3/reverse_dns/docs/ReverseDnsUsersInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ReverseDnsUsersInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Username** | **string** | The username of a user who can send mail from the IP address. | -**UserId** | **int32** | The ID of a user who can send mail from the IP address. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/reverse_dns/docs/SetUpReverseDns.md b/rest/api/v3/reverse_dns/docs/SetUpReverseDns.md deleted file mode 100644 index dbf9cdd7..00000000 --- a/rest/api/v3/reverse_dns/docs/SetUpReverseDns.md +++ /dev/null @@ -1,49 +0,0 @@ -# SetUpReverseDns - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**SetUpReverseDns**](SetUpReverseDns.md#SetUpReverseDns) | **Post** /v3/whitelabel/ips | Set up reverse DNS - - - -## SetUpReverseDns - -> ReverseDns SetUpReverseDns(ctx, optional) - -Set up reverse DNS - -**This endpoint allows you to set up reverse DNS.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a SetUpReverseDnsParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**SetUpReverseDnsRequest** | [**SetUpReverseDnsRequest**](SetUpReverseDnsRequest.md) | - -### Return type - -[**ReverseDns**](ReverseDns.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/reverse_dns/docs/SetUpReverseDnsRequest.md b/rest/api/v3/reverse_dns/docs/SetUpReverseDnsRequest.md deleted file mode 100644 index c0e04d6b..00000000 --- a/rest/api/v3/reverse_dns/docs/SetUpReverseDnsRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# SetUpReverseDnsRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Ip** | **string** | The IP address for which you want to set up reverse DNS. | -**Subdomain** | **string** | The subdomain that will be used to send emails from the IP address. This should be the same as the subdomain used to set up an authenticated domain. |[optional] -**Domain** | **string** | The root, or sending, domain that will be used to send message from the IP address. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/reverse_dns/docs/Valid.md b/rest/api/v3/reverse_dns/docs/Valid.md deleted file mode 100644 index 2addd0e7..00000000 --- a/rest/api/v3/reverse_dns/docs/Valid.md +++ /dev/null @@ -1,13 +0,0 @@ -# Valid - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**TRUE** | bool | (value: `true`) -**FALSE** | bool | (value: `false`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/reverse_dns/docs/Valid1.md b/rest/api/v3/reverse_dns/docs/Valid1.md deleted file mode 100644 index bca4d56b..00000000 --- a/rest/api/v3/reverse_dns/docs/Valid1.md +++ /dev/null @@ -1,13 +0,0 @@ -# Valid1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**TRUE** | bool | (value: `true`) -**FALSE** | bool | (value: `false`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/reverse_dns/docs/ValidateReverseDns.md b/rest/api/v3/reverse_dns/docs/ValidateReverseDns.md deleted file mode 100644 index fa170b18..00000000 --- a/rest/api/v3/reverse_dns/docs/ValidateReverseDns.md +++ /dev/null @@ -1,52 +0,0 @@ -# ValidateReverseDns - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ValidateReverseDns**](ValidateReverseDns.md#ValidateReverseDns) | **Post** /v3/whitelabel/ips/{Id}/validate | Validate a reverse DNS record - - - -## ValidateReverseDns - -> ValidateReverseDns200Response ValidateReverseDns(ctx, Idoptional) - -Validate a reverse DNS record - -**This endpoint allows you to validate a reverse DNS record.** Always check the `valid` property of the response’s `validation_results.a_record` object. This field will indicate whether it was possible to validate the reverse DNS record. If the `validation_results.a_record.valid` is `false`, this indicates only that Twilio SendGrid could not determine the validity your reverse DNS record — it may still be valid. If validity couldn’t be determined, you can check the value of `validation_results.a_record.reason` to find out why. You can retrieve the IDs associated with all your reverse DNS records using the \"Retrieve all reverse DNS records\" endpoint. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of the reverse DNS record that you would like to validate. - -### Other Parameters - -Other parameters are passed through a pointer to a ValidateReverseDnsParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ValidateReverseDns200Response**](ValidateReverseDns200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/reverse_dns/docs/ValidateReverseDns200Response.md b/rest/api/v3/reverse_dns/docs/ValidateReverseDns200Response.md deleted file mode 100644 index 5ca8da4c..00000000 --- a/rest/api/v3/reverse_dns/docs/ValidateReverseDns200Response.md +++ /dev/null @@ -1,13 +0,0 @@ -# ValidateReverseDns200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int32** | The ID of the reverse DNS record. | -**Valid** | [**Valid**](Valid.md) | Indicates if the reverse DNS record is valid. | -**ValidationResults** | [**ValidateReverseDns200ResponseValidationResults**](ValidateReverseDns200ResponseValidationResults.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/reverse_dns/docs/ValidateReverseDns200ResponseValidationResults.md b/rest/api/v3/reverse_dns/docs/ValidateReverseDns200ResponseValidationResults.md deleted file mode 100644 index 4cb2f1ed..00000000 --- a/rest/api/v3/reverse_dns/docs/ValidateReverseDns200ResponseValidationResults.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValidateReverseDns200ResponseValidationResults - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ARecord** | [**ValidateReverseDns200ResponseValidationResultsARecord**](ValidateReverseDns200ResponseValidationResultsARecord.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/reverse_dns/docs/ValidateReverseDns200ResponseValidationResultsARecord.md b/rest/api/v3/reverse_dns/docs/ValidateReverseDns200ResponseValidationResultsARecord.md deleted file mode 100644 index 4ed45863..00000000 --- a/rest/api/v3/reverse_dns/docs/ValidateReverseDns200ResponseValidationResultsARecord.md +++ /dev/null @@ -1,12 +0,0 @@ -# ValidateReverseDns200ResponseValidationResultsARecord - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Valid** | [**Valid1**](Valid1.md) | Indicates if the reverse DNS record could be validated. | -**Reason** | **string** | The reason the reverse DNS record could not be validated. Is `null` if the reverse DNS record was validated. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/reverse_dns/docs/ValidateReverseDns404Response.md b/rest/api/v3/reverse_dns/docs/ValidateReverseDns404Response.md deleted file mode 100644 index 18de5e6c..00000000 --- a/rest/api/v3/reverse_dns/docs/ValidateReverseDns404Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValidateReverseDns404Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ValidateReverseDns404ResponseErrorsInner**](ValidateReverseDns404ResponseErrorsInner.md) | The error messages for the failed validation. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/reverse_dns/docs/ValidateReverseDns404ResponseErrorsInner.md b/rest/api/v3/reverse_dns/docs/ValidateReverseDns404ResponseErrorsInner.md deleted file mode 100644 index ec8b260a..00000000 --- a/rest/api/v3/reverse_dns/docs/ValidateReverseDns404ResponseErrorsInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValidateReverseDns404ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | A message describing why the reverse DNS could not be validated. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/reverse_dns/docs/ValidateReverseDns500Response.md b/rest/api/v3/reverse_dns/docs/ValidateReverseDns500Response.md deleted file mode 100644 index 62f027dc..00000000 --- a/rest/api/v3/reverse_dns/docs/ValidateReverseDns500Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValidateReverseDns500Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ValidateReverseDns500ResponseErrorsInner**](ValidateReverseDns500ResponseErrorsInner.md) | The error messages for the failed validation. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/reverse_dns/docs/ValidateReverseDns500ResponseErrorsInner.md b/rest/api/v3/reverse_dns/docs/ValidateReverseDns500ResponseErrorsInner.md deleted file mode 100644 index 214fa0ca..00000000 --- a/rest/api/v3/reverse_dns/docs/ValidateReverseDns500ResponseErrorsInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# ValidateReverseDns500ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | A message describing why the IP whitelabel could not be validated. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/reverse_dns/model_reverse_dns.go b/rest/api/v3/reverse_dns/model_reverse_dns.go deleted file mode 100644 index 7c91cd7f..00000000 --- a/rest/api/v3/reverse_dns/model_reverse_dns.go +++ /dev/null @@ -1,37 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Reverse DNS API -* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ReverseDns struct for ReverseDns -type ReverseDns struct { - // The ID of the Reverse DNS. - Id int32 `json:"id"` - // The IP address that this Reverse DNS was created for. - Ip string `json:"ip"` - // The reverse DNS record for the IP address. This points to the Reverse DNS subdomain. - Rdns string `json:"rdns"` - // The users who are able to send mail from the IP address. - Users []ReverseDnsUsersInner `json:"users"` - // The subdomain created for this reverse DNS. This is where the rDNS record points. - Subdomain *string `json:"subdomain,omitempty"` - // The root, or sending, domain. - Domain string `json:"domain"` - // Indicates if this is a valid Reverse DNS. - Valid bool `json:"valid"` - // Indicates if this Reverse DNS was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new Reverse DNS if you need to update it. - Legacy bool `json:"legacy"` - // A Unix epoch timestamp representing the last time of a validation attempt. - LastValidationAttemptAt *int32 `json:"last_validation_attempt_at,omitempty"` - ARecord ReverseDnsARecord `json:"a_record"` -} diff --git a/rest/api/v3/reverse_dns/model_reverse_dns_a_record.go b/rest/api/v3/reverse_dns/model_reverse_dns_a_record.go deleted file mode 100644 index 646a9624..00000000 --- a/rest/api/v3/reverse_dns/model_reverse_dns_a_record.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Reverse DNS API -* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ReverseDnsARecord struct for ReverseDnsARecord -type ReverseDnsARecord struct { - // Indicates if the a_record is valid. - Valid bool `json:"valid"` - // The type of DNS record. - Type string `json:"type"` - // This is the web address that will be mapped to the IP address. - Host string `json:"host"` - // The IP address being set up with Reverse DNS. - Data string `json:"data"` -} diff --git a/rest/api/v3/reverse_dns/model_reverse_dns_users_inner.go b/rest/api/v3/reverse_dns/model_reverse_dns_users_inner.go deleted file mode 100644 index 6b6ee09c..00000000 --- a/rest/api/v3/reverse_dns/model_reverse_dns_users_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Reverse DNS API -* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ReverseDnsUsersInner struct for ReverseDnsUsersInner -type ReverseDnsUsersInner struct { - // The username of a user who can send mail from the IP address. - Username string `json:"username"` - // The ID of a user who can send mail from the IP address. - UserId int32 `json:"user_id"` -} diff --git a/rest/api/v3/reverse_dns/model_set_up_reverse_dns_request.go b/rest/api/v3/reverse_dns/model_set_up_reverse_dns_request.go deleted file mode 100644 index 9cdc1c22..00000000 --- a/rest/api/v3/reverse_dns/model_set_up_reverse_dns_request.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Reverse DNS API -* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SetUpReverseDnsRequest struct for SetUpReverseDnsRequest -type SetUpReverseDnsRequest struct { - // The IP address for which you want to set up reverse DNS. - Ip string `json:"ip"` - // The subdomain that will be used to send emails from the IP address. This should be the same as the subdomain used to set up an authenticated domain. - Subdomain *string `json:"subdomain,omitempty"` - // The root, or sending, domain that will be used to send message from the IP address. - Domain string `json:"domain"` -} diff --git a/rest/api/v3/reverse_dns/model_valid.go b/rest/api/v3/reverse_dns/model_valid.go deleted file mode 100644 index 5a8ea14f..00000000 --- a/rest/api/v3/reverse_dns/model_valid.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Reverse DNS API -* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Valid the model 'Valid' -type Valid bool - -// List of Valid -const ( - VALID_TRUE Valid = true - VALID_FALSE Valid = false -) diff --git a/rest/api/v3/reverse_dns/model_valid1.go b/rest/api/v3/reverse_dns/model_valid1.go deleted file mode 100644 index b4e28b4a..00000000 --- a/rest/api/v3/reverse_dns/model_valid1.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Reverse DNS API -* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Valid1 the model 'Valid1' -type Valid1 bool - -// List of Valid1 -const ( - VALID1_TRUE Valid1 = true - VALID1_FALSE Valid1 = false -) diff --git a/rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response.go b/rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response.go deleted file mode 100644 index f44812f5..00000000 --- a/rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Reverse DNS API -* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ValidateReverseDns200Response struct for ValidateReverseDns200Response -type ValidateReverseDns200Response struct { - // The ID of the reverse DNS record. - Id int32 `json:"id"` - // Indicates if the reverse DNS record is valid. - Valid Valid `json:"valid"` - ValidationResults ValidateReverseDns200ResponseValidationResults `json:"validation_results"` -} diff --git a/rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response_validation_results.go b/rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response_validation_results.go deleted file mode 100644 index 9859bcfc..00000000 --- a/rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response_validation_results.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Reverse DNS API -* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ValidateReverseDns200ResponseValidationResults The specific results of the validation. -type ValidateReverseDns200ResponseValidationResults struct { - ARecord *ValidateReverseDns200ResponseValidationResultsARecord `json:"a_record,omitempty"` -} diff --git a/rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response_validation_results_a_record.go b/rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response_validation_results_a_record.go deleted file mode 100644 index 30a88911..00000000 --- a/rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response_validation_results_a_record.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Reverse DNS API -* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ValidateReverseDns200ResponseValidationResultsARecord struct for ValidateReverseDns200ResponseValidationResultsARecord -type ValidateReverseDns200ResponseValidationResultsARecord struct { - // Indicates if the reverse DNS record could be validated. - Valid Valid1 `json:"valid"` - // The reason the reverse DNS record could not be validated. Is `null` if the reverse DNS record was validated. - Reason string `json:"reason"` -} diff --git a/rest/api/v3/reverse_dns/model_validate_reverse_dns_404_response.go b/rest/api/v3/reverse_dns/model_validate_reverse_dns_404_response.go deleted file mode 100644 index f1d7b077..00000000 --- a/rest/api/v3/reverse_dns/model_validate_reverse_dns_404_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Reverse DNS API -* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ValidateReverseDns404Response struct for ValidateReverseDns404Response -type ValidateReverseDns404Response struct { - // The error messages for the failed validation. - Errors []ValidateReverseDns404ResponseErrorsInner `json:"errors"` -} diff --git a/rest/api/v3/reverse_dns/model_validate_reverse_dns_404_response_errors_inner.go b/rest/api/v3/reverse_dns/model_validate_reverse_dns_404_response_errors_inner.go deleted file mode 100644 index c214310b..00000000 --- a/rest/api/v3/reverse_dns/model_validate_reverse_dns_404_response_errors_inner.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Reverse DNS API -* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ValidateReverseDns404ResponseErrorsInner struct for ValidateReverseDns404ResponseErrorsInner -type ValidateReverseDns404ResponseErrorsInner struct { - // A message describing why the reverse DNS could not be validated. - Message string `json:"message"` -} diff --git a/rest/api/v3/reverse_dns/model_validate_reverse_dns_500_response.go b/rest/api/v3/reverse_dns/model_validate_reverse_dns_500_response.go deleted file mode 100644 index 61e3fc40..00000000 --- a/rest/api/v3/reverse_dns/model_validate_reverse_dns_500_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Reverse DNS API -* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ValidateReverseDns500Response struct for ValidateReverseDns500Response -type ValidateReverseDns500Response struct { - // The error messages for the failed validation. - Errors []ValidateReverseDns500ResponseErrorsInner `json:"errors"` -} diff --git a/rest/api/v3/reverse_dns/model_validate_reverse_dns_500_response_errors_inner.go b/rest/api/v3/reverse_dns/model_validate_reverse_dns_500_response_errors_inner.go deleted file mode 100644 index 0e85cc78..00000000 --- a/rest/api/v3/reverse_dns/model_validate_reverse_dns_500_response_errors_inner.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Reverse DNS API -* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ValidateReverseDns500ResponseErrorsInner struct for ValidateReverseDns500ResponseErrorsInner -type ValidateReverseDns500ResponseErrorsInner struct { - // A message describing why the IP whitelabel could not be validated. - Message string `json:"message"` -} diff --git a/rest/api/v3/scheduled_sends/.openapi-generator b/rest/api/v3/scheduled_sends/.openapi-generator deleted file mode 100644 index 093be41e..00000000 --- a/rest/api/v3/scheduled_sends/.openapi-generator +++ /dev/null @@ -1,32 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_create_scheduled_send.go -api_delete_scheduled_send.go -api_get_scheduled_send.go -api_list_scheduled_send.go -api_service.go -api_update_scheduled_send.go -docs/CancelOrPauseAScheduledSendRequest.md -docs/CreateScheduledSend.md -docs/DeleteScheduledSend.md -docs/ErrorResponse.md -docs/ErrorResponseErrorsInner.md -docs/GetScheduledSend.md -docs/ListScheduledSend.md -docs/MailBatchId.md -docs/ScheduledSendStatus.md -docs/Status.md -docs/Status1.md -docs/Status2.md -docs/UpdateScheduledSend.md -docs/UpdateScheduledSendRequest.md -model_cancel_or_pause_a_scheduled_send_request.go -model_error_response.go -model_error_response_errors_inner.go -model_mail_batch_id.go -model_scheduled_send_status.go -model_status.go -model_status1.go -model_status2.go -model_update_scheduled_send_request.go diff --git a/rest/api/v3/scheduled_sends/.openapi-generator-ignore b/rest/api/v3/scheduled_sends/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/scheduled_sends/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/scheduled_sends/README.md b/rest/api/v3/scheduled_sends/README.md deleted file mode 100644 index 8e5fda8b..00000000 --- a/rest/api/v3/scheduled_sends/README.md +++ /dev/null @@ -1,82 +0,0 @@ -# Go API client for - -The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. - -A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. - -See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. - -See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. - -When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. - -When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:38.398420+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*CreateScheduledSend* | [**CreateScheduledSend**](docs/CreateScheduledSend.md#createscheduledsend) | **Post** /v3/user/scheduled_sends | Cancel or pause a scheduled send -*DeleteScheduledSend* | [**DeleteScheduledSend**](docs/DeleteScheduledSend.md#deletescheduledsend) | **Delete** /v3/user/scheduled_sends/{BatchId} | Delete a cancellation or pause from a scheduled send -*GetScheduledSend* | [**GetScheduledSend**](docs/GetScheduledSend.md#getscheduledsend) | **Get** /v3/user/scheduled_sends/{BatchId} | Retrieve scheduled send -*ListScheduledSend* | [**ListScheduledSend**](docs/ListScheduledSend.md#listscheduledsend) | **Get** /v3/user/scheduled_sends | Retrieve all scheduled sends -*UpdateScheduledSend* | [**UpdateScheduledSend**](docs/UpdateScheduledSend.md#updatescheduledsend) | **Patch** /v3/user/scheduled_sends/{BatchId} | Update a scheduled send - - -## Documentation For Models - - - [CancelOrPauseAScheduledSendRequest](CancelOrPauseAScheduledSendRequest.md) - - [ErrorResponse](ErrorResponse.md) - - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) - - [MailBatchId](MailBatchId.md) - - [ScheduledSendStatus](ScheduledSendStatus.md) - - [Status](Status.md) - - [Status1](Status1.md) - - [Status2](Status2.md) - - [UpdateScheduledSendRequest](UpdateScheduledSendRequest.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/scheduled_sends/api_create_scheduled_send.go b/rest/api/v3/scheduled_sends/api_create_scheduled_send.go deleted file mode 100644 index 28f448e2..00000000 --- a/rest/api/v3/scheduled_sends/api_create_scheduled_send.go +++ /dev/null @@ -1,106 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scheduled Sends API -* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type CreateScheduledSendParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - CancelOrPauseAScheduledSendRequest *CancelOrPauseAScheduledSendRequest `json:"CancelOrPauseAScheduledSendRequest,omitempty"` -} - -func (params *CreateScheduledSendParam) SetOnbehalfof(Onbehalfof string) *CreateScheduledSendParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *CreateScheduledSendParam) SetCancelOrPauseAScheduledSendRequest(CancelOrPauseAScheduledSendRequest CancelOrPauseAScheduledSendRequest) *CreateScheduledSendParam { - params.CancelOrPauseAScheduledSendRequest = &CancelOrPauseAScheduledSendRequest - return params -} - -// **This endpoint allows you to cancel or pause a scheduled send associated with a `batch_id`.** Passing this endpoint a `batch_id` and status will cancel or pause the scheduled send. Once a scheduled send is set to `pause` or `cancel` you must use the \"Update a scheduled send\" endpoint to change its status or the \"Delete a cancellation or pause from a scheduled send\" endpoint to remove the status. Passing a status change to a scheduled send that has already been paused or cancelled will result in a `400` level status code. If the maximum number of cancellations/pauses are added to a send, a `400` level status code will be returned. -func (c *ApiService) CreateScheduledSend(params *CreateScheduledSendParam) (interface{}, error) { - path := "/v3/user/scheduled_sends" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.CancelOrPauseAScheduledSendRequest != nil { - b, err := json.Marshal(*params.CancelOrPauseAScheduledSendRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &ScheduledSendStatus{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/scheduled_sends/api_delete_scheduled_send.go b/rest/api/v3/scheduled_sends/api_delete_scheduled_send.go deleted file mode 100644 index d0e0a053..00000000 --- a/rest/api/v3/scheduled_sends/api_delete_scheduled_send.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scheduled Sends API -* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteScheduledSendParam struct { - // - BatchId *string `json:"batch_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *DeleteScheduledSendParam) SetBatchId(BatchId string) *DeleteScheduledSendParam { - params.BatchId = &BatchId - return params -} -func (params *DeleteScheduledSendParam) SetOnbehalfof(Onbehalfof string) *DeleteScheduledSendParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to delete the cancellation/pause of a scheduled send.** Scheduled sends cancelled less than 10 minutes before the scheduled time are not guaranteed to be cancelled. -func (c *ApiService) DeleteScheduledSend(params *DeleteScheduledSendParam) (interface{}, error) { - path := "/v3/user/scheduled_sends/{BatchId}" - if params != nil && params.BatchId != nil { - path = strings.Replace(path, "{"+"BatchId"+"}", *params.BatchId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/scheduled_sends/api_get_scheduled_send.go b/rest/api/v3/scheduled_sends/api_get_scheduled_send.go deleted file mode 100644 index 50d75e8d..00000000 --- a/rest/api/v3/scheduled_sends/api_get_scheduled_send.go +++ /dev/null @@ -1,102 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scheduled Sends API -* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetScheduledSendParam struct { - // - BatchId *string `json:"batch_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetScheduledSendParam) SetBatchId(BatchId string) *GetScheduledSendParam { - params.BatchId = &BatchId - return params -} -func (params *GetScheduledSendParam) SetOnbehalfof(Onbehalfof string) *GetScheduledSendParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve the cancel/paused scheduled send information for a specific `batch_id`.** -func (c *ApiService) GetScheduledSend(params *GetScheduledSendParam) (interface{}, error) { - path := "/v3/user/scheduled_sends/{BatchId}" - if params != nil && params.BatchId != nil { - path = strings.Replace(path, "{"+"BatchId"+"}", *params.BatchId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]ScheduledSendStatus{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/scheduled_sends/api_list_scheduled_send.go b/rest/api/v3/scheduled_sends/api_list_scheduled_send.go deleted file mode 100644 index 0f6aad68..00000000 --- a/rest/api/v3/scheduled_sends/api_list_scheduled_send.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scheduled Sends API -* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListScheduledSendParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListScheduledSendParam) SetOnbehalfof(Onbehalfof string) *ListScheduledSendParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve all cancelled and paused scheduled send information.** This endpoint will return only the scheduled sends that are associated with a `batch_id`. If you have scheduled a send using the `/mail/send` endpoint and the `send_at` field but no `batch_id`, the send will be scheduled for delivery; however, it will not be returned by this endpoint. For this reason, you should assign a `batch_id` to any scheduled send you may need to pause or cancel in the future. -func (c *ApiService) ListScheduledSend(params *ListScheduledSendParam) (interface{}, error) { - path := "/v3/user/scheduled_sends" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]ScheduledSendStatus{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/scheduled_sends/api_service.go b/rest/api/v3/scheduled_sends/api_service.go deleted file mode 100644 index e86bc8be..00000000 --- a/rest/api/v3/scheduled_sends/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scheduled Sends API -* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/scheduled_sends/api_update_scheduled_send.go b/rest/api/v3/scheduled_sends/api_update_scheduled_send.go deleted file mode 100644 index 7ef85975..00000000 --- a/rest/api/v3/scheduled_sends/api_update_scheduled_send.go +++ /dev/null @@ -1,109 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scheduled Sends API -* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type UpdateScheduledSendParam struct { - // - BatchId *string `json:"batch_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - UpdateScheduledSendRequest *UpdateScheduledSendRequest `json:"UpdateScheduledSendRequest,omitempty"` -} - -func (params *UpdateScheduledSendParam) SetBatchId(BatchId string) *UpdateScheduledSendParam { - params.BatchId = &BatchId - return params -} -func (params *UpdateScheduledSendParam) SetOnbehalfof(Onbehalfof string) *UpdateScheduledSendParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateScheduledSendParam) SetUpdateScheduledSendRequest(UpdateScheduledSendRequest UpdateScheduledSendRequest) *UpdateScheduledSendParam { - params.UpdateScheduledSendRequest = &UpdateScheduledSendRequest - return params -} - -// **This endpoint allows you to update the status of a scheduled send for the given `batch_id`.** If you have already set a `cancel` or `pause` status on a scheduled send using the \"Cancel or pause a scheduled send\" endpoint, you can update it's status using this endpoint. Attempting to update a status once it has been set with the \"Cancel or pause a scheduled send\" endpoint will result in a `400` error. -func (c *ApiService) UpdateScheduledSend(params *UpdateScheduledSendParam) (interface{}, error) { - path := "/v3/user/scheduled_sends/{BatchId}" - if params != nil && params.BatchId != nil { - path = strings.Replace(path, "{"+"BatchId"+"}", *params.BatchId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateScheduledSendRequest != nil { - b, err := json.Marshal(*params.UpdateScheduledSendRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/scheduled_sends/docs/CancelOrPauseAScheduledSendRequest.md b/rest/api/v3/scheduled_sends/docs/CancelOrPauseAScheduledSendRequest.md deleted file mode 100644 index 1c192628..00000000 --- a/rest/api/v3/scheduled_sends/docs/CancelOrPauseAScheduledSendRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# CancelOrPauseAScheduledSendRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**BatchId** | **string** | The batch ID is the identifier that your scheduled mail sends share. | -**Status** | [**Status**](Status.md) | The status of the send you would like to implement. This can be pause or cancel. To delete a pause or cancel status see DELETE /v3/user/scheduled_sends/{batch_id} | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/scheduled_sends/docs/CreateScheduledSend.md b/rest/api/v3/scheduled_sends/docs/CreateScheduledSend.md deleted file mode 100644 index e72ddd5b..00000000 --- a/rest/api/v3/scheduled_sends/docs/CreateScheduledSend.md +++ /dev/null @@ -1,49 +0,0 @@ -# CreateScheduledSend - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateScheduledSend**](CreateScheduledSend.md#CreateScheduledSend) | **Post** /v3/user/scheduled_sends | Cancel or pause a scheduled send - - - -## CreateScheduledSend - -> ScheduledSendStatus CreateScheduledSend(ctx, optional) - -Cancel or pause a scheduled send - -**This endpoint allows you to cancel or pause a scheduled send associated with a `batch_id`.** Passing this endpoint a `batch_id` and status will cancel or pause the scheduled send. Once a scheduled send is set to `pause` or `cancel` you must use the \"Update a scheduled send\" endpoint to change its status or the \"Delete a cancellation or pause from a scheduled send\" endpoint to remove the status. Passing a status change to a scheduled send that has already been paused or cancelled will result in a `400` level status code. If the maximum number of cancellations/pauses are added to a send, a `400` level status code will be returned. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateScheduledSendParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**CancelOrPauseAScheduledSendRequest** | [**CancelOrPauseAScheduledSendRequest**](CancelOrPauseAScheduledSendRequest.md) | - -### Return type - -[**ScheduledSendStatus**](ScheduledSendStatus.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/scheduled_sends/docs/DeleteScheduledSend.md b/rest/api/v3/scheduled_sends/docs/DeleteScheduledSend.md deleted file mode 100644 index 1d198b9d..00000000 --- a/rest/api/v3/scheduled_sends/docs/DeleteScheduledSend.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeleteScheduledSend - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteScheduledSend**](DeleteScheduledSend.md#DeleteScheduledSend) | **Delete** /v3/user/scheduled_sends/{BatchId} | Delete a cancellation or pause from a scheduled send - - - -## DeleteScheduledSend - -> DeleteScheduledSend(ctx, BatchIdoptional) - -Delete a cancellation or pause from a scheduled send - -**This endpoint allows you to delete the cancellation/pause of a scheduled send.** Scheduled sends cancelled less than 10 minutes before the scheduled time are not guaranteed to be cancelled. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**BatchId** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteScheduledSendParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/scheduled_sends/docs/ErrorResponse.md b/rest/api/v3/scheduled_sends/docs/ErrorResponse.md deleted file mode 100644 index ec2d41f6..00000000 --- a/rest/api/v3/scheduled_sends/docs/ErrorResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ErrorResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] -**Id** | **string** | When applicable, this property value will be an error ID. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/scheduled_sends/docs/ErrorResponseErrorsInner.md b/rest/api/v3/scheduled_sends/docs/ErrorResponseErrorsInner.md deleted file mode 100644 index 5449c685..00000000 --- a/rest/api/v3/scheduled_sends/docs/ErrorResponseErrorsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ErrorResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | An error message. |[optional] -**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] -**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/scheduled_sends/docs/GetScheduledSend.md b/rest/api/v3/scheduled_sends/docs/GetScheduledSend.md deleted file mode 100644 index 1f9e8925..00000000 --- a/rest/api/v3/scheduled_sends/docs/GetScheduledSend.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetScheduledSend - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetScheduledSend**](GetScheduledSend.md#GetScheduledSend) | **Get** /v3/user/scheduled_sends/{BatchId} | Retrieve scheduled send - - - -## GetScheduledSend - -> []ScheduledSendStatus GetScheduledSend(ctx, BatchIdoptional) - -Retrieve scheduled send - -**This endpoint allows you to retrieve the cancel/paused scheduled send information for a specific `batch_id`.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**BatchId** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a GetScheduledSendParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**[]ScheduledSendStatus**](ScheduledSendStatus.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/scheduled_sends/docs/ListScheduledSend.md b/rest/api/v3/scheduled_sends/docs/ListScheduledSend.md deleted file mode 100644 index e6fbb8fe..00000000 --- a/rest/api/v3/scheduled_sends/docs/ListScheduledSend.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListScheduledSend - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListScheduledSend**](ListScheduledSend.md#ListScheduledSend) | **Get** /v3/user/scheduled_sends | Retrieve all scheduled sends - - - -## ListScheduledSend - -> []ScheduledSendStatus ListScheduledSend(ctx, optional) - -Retrieve all scheduled sends - -**This endpoint allows you to retrieve all cancelled and paused scheduled send information.** This endpoint will return only the scheduled sends that are associated with a `batch_id`. If you have scheduled a send using the `/mail/send` endpoint and the `send_at` field but no `batch_id`, the send will be scheduled for delivery; however, it will not be returned by this endpoint. For this reason, you should assign a `batch_id` to any scheduled send you may need to pause or cancel in the future. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListScheduledSendParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**[]ScheduledSendStatus**](ScheduledSendStatus.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/scheduled_sends/docs/MailBatchId.md b/rest/api/v3/scheduled_sends/docs/MailBatchId.md deleted file mode 100644 index 9537317a..00000000 --- a/rest/api/v3/scheduled_sends/docs/MailBatchId.md +++ /dev/null @@ -1,11 +0,0 @@ -# MailBatchId - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**BatchId** | **string** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/scheduled_sends/docs/ScheduledSendStatus.md b/rest/api/v3/scheduled_sends/docs/ScheduledSendStatus.md deleted file mode 100644 index c5498cc4..00000000 --- a/rest/api/v3/scheduled_sends/docs/ScheduledSendStatus.md +++ /dev/null @@ -1,12 +0,0 @@ -# ScheduledSendStatus - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**BatchId** | **string** | | -**Status** | [**Status2**](Status2.md) | The status of the scheduled send. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/scheduled_sends/docs/Status.md b/rest/api/v3/scheduled_sends/docs/Status.md deleted file mode 100644 index 8a3e53e1..00000000 --- a/rest/api/v3/scheduled_sends/docs/Status.md +++ /dev/null @@ -1,13 +0,0 @@ -# Status - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**PAUSE** | string | (value: `"pause"`) -**CANCEL** | string | (value: `"cancel"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/scheduled_sends/docs/Status1.md b/rest/api/v3/scheduled_sends/docs/Status1.md deleted file mode 100644 index 0dcc9ff0..00000000 --- a/rest/api/v3/scheduled_sends/docs/Status1.md +++ /dev/null @@ -1,13 +0,0 @@ -# Status1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**CANCEL** | string | (value: `"cancel"`) -**PAUSE** | string | (value: `"pause"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/scheduled_sends/docs/Status2.md b/rest/api/v3/scheduled_sends/docs/Status2.md deleted file mode 100644 index 5c7d4c92..00000000 --- a/rest/api/v3/scheduled_sends/docs/Status2.md +++ /dev/null @@ -1,13 +0,0 @@ -# Status2 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**CANCEL** | string | (value: `"cancel"`) -**PAUSE** | string | (value: `"pause"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/scheduled_sends/docs/UpdateScheduledSend.md b/rest/api/v3/scheduled_sends/docs/UpdateScheduledSend.md deleted file mode 100644 index 7b28ab5a..00000000 --- a/rest/api/v3/scheduled_sends/docs/UpdateScheduledSend.md +++ /dev/null @@ -1,53 +0,0 @@ -# UpdateScheduledSend - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateScheduledSend**](UpdateScheduledSend.md#UpdateScheduledSend) | **Patch** /v3/user/scheduled_sends/{BatchId} | Update a scheduled send - - - -## UpdateScheduledSend - -> UpdateScheduledSend(ctx, BatchIdoptional) - -Update a scheduled send - -**This endpoint allows you to update the status of a scheduled send for the given `batch_id`.** If you have already set a `cancel` or `pause` status on a scheduled send using the \"Cancel or pause a scheduled send\" endpoint, you can update it's status using this endpoint. Attempting to update a status once it has been set with the \"Cancel or pause a scheduled send\" endpoint will result in a `400` error. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**BatchId** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateScheduledSendParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**UpdateScheduledSendRequest** | [**UpdateScheduledSendRequest**](UpdateScheduledSendRequest.md) | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/scheduled_sends/docs/UpdateScheduledSendRequest.md b/rest/api/v3/scheduled_sends/docs/UpdateScheduledSendRequest.md deleted file mode 100644 index a01e9aa8..00000000 --- a/rest/api/v3/scheduled_sends/docs/UpdateScheduledSendRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateScheduledSendRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Status** | [**Status1**](Status1.md) | The status you would like the scheduled send to have. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/scheduled_sends/model_cancel_or_pause_a_scheduled_send_request.go b/rest/api/v3/scheduled_sends/model_cancel_or_pause_a_scheduled_send_request.go deleted file mode 100644 index 6e635983..00000000 --- a/rest/api/v3/scheduled_sends/model_cancel_or_pause_a_scheduled_send_request.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scheduled Sends API -* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CancelOrPauseAScheduledSendRequest struct for CancelOrPauseAScheduledSendRequest -type CancelOrPauseAScheduledSendRequest struct { - // The batch ID is the identifier that your scheduled mail sends share. - BatchId string `json:"batch_id"` - // The status of the send you would like to implement. This can be pause or cancel. To delete a pause or cancel status see DELETE /v3/user/scheduled_sends/{batch_id} - Status Status `json:"status"` -} diff --git a/rest/api/v3/scheduled_sends/model_error_response.go b/rest/api/v3/scheduled_sends/model_error_response.go deleted file mode 100644 index 894e8251..00000000 --- a/rest/api/v3/scheduled_sends/model_error_response.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scheduled Sends API -* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponse struct for ErrorResponse -type ErrorResponse struct { - Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` - // When applicable, this property value will be an error ID. - Id *string `json:"id,omitempty"` -} diff --git a/rest/api/v3/scheduled_sends/model_error_response_errors_inner.go b/rest/api/v3/scheduled_sends/model_error_response_errors_inner.go deleted file mode 100644 index 341c7d99..00000000 --- a/rest/api/v3/scheduled_sends/model_error_response_errors_inner.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scheduled Sends API -* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner -type ErrorResponseErrorsInner struct { - // An error message. - Message *string `json:"message,omitempty"` - // When applicable, this property value will be the field that generated the error. - Field *string `json:"field,omitempty"` - // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. - Help *map[string]interface{} `json:"help,omitempty"` -} diff --git a/rest/api/v3/scheduled_sends/model_mail_batch_id.go b/rest/api/v3/scheduled_sends/model_mail_batch_id.go deleted file mode 100644 index dbd323c8..00000000 --- a/rest/api/v3/scheduled_sends/model_mail_batch_id.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scheduled Sends API -* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// MailBatchId struct for MailBatchId -type MailBatchId struct { - BatchId string `json:"batch_id"` -} diff --git a/rest/api/v3/scheduled_sends/model_scheduled_send_status.go b/rest/api/v3/scheduled_sends/model_scheduled_send_status.go deleted file mode 100644 index d6fe3d8f..00000000 --- a/rest/api/v3/scheduled_sends/model_scheduled_send_status.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scheduled Sends API -* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ScheduledSendStatus struct for ScheduledSendStatus -type ScheduledSendStatus struct { - BatchId string `json:"batch_id"` - // The status of the scheduled send. - Status Status2 `json:"status"` -} diff --git a/rest/api/v3/scheduled_sends/model_status.go b/rest/api/v3/scheduled_sends/model_status.go deleted file mode 100644 index d31bbe05..00000000 --- a/rest/api/v3/scheduled_sends/model_status.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scheduled Sends API -* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Status the model 'Status' -type Status string - -// List of Status -const ( - STATUS_PAUSE Status = "pause" - STATUS_CANCEL Status = "cancel" -) diff --git a/rest/api/v3/scheduled_sends/model_status1.go b/rest/api/v3/scheduled_sends/model_status1.go deleted file mode 100644 index c43f388d..00000000 --- a/rest/api/v3/scheduled_sends/model_status1.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scheduled Sends API -* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Status1 the model 'Status1' -type Status1 string - -// List of Status1 -const ( - STATUS1_CANCEL Status1 = "cancel" - STATUS1_PAUSE Status1 = "pause" -) diff --git a/rest/api/v3/scheduled_sends/model_status2.go b/rest/api/v3/scheduled_sends/model_status2.go deleted file mode 100644 index 96ac6a91..00000000 --- a/rest/api/v3/scheduled_sends/model_status2.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scheduled Sends API -* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Status2 the model 'Status2' -type Status2 string - -// List of Status2 -const ( - STATUS2_CANCEL Status2 = "cancel" - STATUS2_PAUSE Status2 = "pause" -) diff --git a/rest/api/v3/scheduled_sends/model_update_scheduled_send_request.go b/rest/api/v3/scheduled_sends/model_update_scheduled_send_request.go deleted file mode 100644 index fb8b4ac2..00000000 --- a/rest/api/v3/scheduled_sends/model_update_scheduled_send_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scheduled Sends API -* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateScheduledSendRequest struct for UpdateScheduledSendRequest -type UpdateScheduledSendRequest struct { - // The status you would like the scheduled send to have. - Status Status1 `json:"status"` -} diff --git a/rest/api/v3/scopes/.openapi-generator b/rest/api/v3/scopes/.openapi-generator deleted file mode 100644 index cb628b4c..00000000 --- a/rest/api/v3/scopes/.openapi-generator +++ /dev/null @@ -1,29 +0,0 @@ -.openapi-generator -README.md -api_approve_scope_request.go -api_deny_scope_request.go -api_list_scope.go -api_list_scope_request.go -api_service.go -docs/ApproveScopeRequest.md -docs/ApproveScopeRequest200Response.md -docs/DenyScopeRequest.md -docs/DenyScopeRequest404Response.md -docs/DenyScopeRequest404ResponseErrorsInner.md -docs/ErrorResponse.md -docs/ErrorResponseErrorsInner.md -docs/ListScope.md -docs/ListScope200Response.md -docs/ListScope401Response.md -docs/ListScope401ResponseErrorsInner.md -docs/ListScopeRequest.md -docs/ListScopeRequest200ResponseInner.md -model_approve_scope_request_200_response.go -model_deny_scope_request_404_response.go -model_deny_scope_request_404_response_errors_inner.go -model_error_response.go -model_error_response_errors_inner.go -model_list_scope_200_response.go -model_list_scope_401_response.go -model_list_scope_401_response_errors_inner.go -model_list_scope_request_200_response_inner.go diff --git a/rest/api/v3/scopes/.openapi-generator-ignore b/rest/api/v3/scopes/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/scopes/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/scopes/README.md b/rest/api/v3/scopes/README.md deleted file mode 100644 index 5529b125..00000000 --- a/rest/api/v3/scopes/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# Go API client for - -The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:38.426976+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*ApproveScopeRequest* | [**ApproveScopeRequest**](docs/ApproveScopeRequest.md#approvescoperequest) | **Patch** /v3/scopes/requests/{RequestId}/approve | Approve access request -*DenyScopeRequest* | [**DenyScopeRequest**](docs/DenyScopeRequest.md#denyscoperequest) | **Delete** /v3/scopes/requests/{RequestId} | Deny access request -*ListScope* | [**ListScope**](docs/ListScope.md#listscope) | **Get** /v3/scopes | Retrieve a list of scopes for which this user has access. -*ListScopeRequest* | [**ListScopeRequest**](docs/ListScopeRequest.md#listscoperequest) | **Get** /v3/scopes/requests | Retrieve access requests - - -## Documentation For Models - - - [ApproveScopeRequest200Response](ApproveScopeRequest200Response.md) - - [DenyScopeRequest404Response](DenyScopeRequest404Response.md) - - [DenyScopeRequest404ResponseErrorsInner](DenyScopeRequest404ResponseErrorsInner.md) - - [ErrorResponse](ErrorResponse.md) - - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) - - [ListScope200Response](ListScope200Response.md) - - [ListScope401Response](ListScope401Response.md) - - [ListScope401ResponseErrorsInner](ListScope401ResponseErrorsInner.md) - - [ListScopeRequest200ResponseInner](ListScopeRequest200ResponseInner.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/scopes/api_approve_scope_request.go b/rest/api/v3/scopes/api_approve_scope_request.go deleted file mode 100644 index 936bcf6e..00000000 --- a/rest/api/v3/scopes/api_approve_scope_request.go +++ /dev/null @@ -1,77 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scopes API -* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type ApproveScopeRequestParam struct { - // The ID of the request that you want to approve. - RequestId *string `json:"request_id"` -} - -func (params *ApproveScopeRequestParam) SetRequestId(RequestId string) *ApproveScopeRequestParam { - params.RequestId = &RequestId - return params -} - -// **This endpoint allows you to approve an access attempt.** **Note:** Only teammate admins may approve another teammate’s access request. -func (c *ApiService) ApproveScopeRequest(params *ApproveScopeRequestParam) (interface{}, error) { - path := "/v3/scopes/requests/{RequestId}/approve" - if params != nil && params.RequestId != nil { - path = strings.Replace(path, "{"+"RequestId"+"}", *params.RequestId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ApproveScopeRequest200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &DenyScopeRequest404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/scopes/api_deny_scope_request.go b/rest/api/v3/scopes/api_deny_scope_request.go deleted file mode 100644 index defeab0b..00000000 --- a/rest/api/v3/scopes/api_deny_scope_request.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scopes API -* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DenyScopeRequestParam struct { - // The ID of the request that you want to deny. - RequestId *string `json:"request_id"` -} - -func (params *DenyScopeRequestParam) SetRequestId(RequestId string) *DenyScopeRequestParam { - params.RequestId = &RequestId - return params -} - -// **This endpoint allows you to deny an attempt to access your account.** **Note:** Only teammate admins may delete a teammate's access request. -func (c *ApiService) DenyScopeRequest(params *DenyScopeRequestParam) (interface{}, error) { - path := "/v3/scopes/requests/{RequestId}" - if params != nil && params.RequestId != nil { - path = strings.Replace(path, "{"+"RequestId"+"}", *params.RequestId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 404 { - ps := &DenyScopeRequest404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/scopes/api_list_scope.go b/rest/api/v3/scopes/api_list_scope.go deleted file mode 100644 index a49b89f7..00000000 --- a/rest/api/v3/scopes/api_list_scope.go +++ /dev/null @@ -1,91 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scopes API -* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListScopeParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListScopeParam) SetOnbehalfof(Onbehalfof string) *ListScopeParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint returns a list of all scopes that this user has access to.** API Keys are used to authenticate with [SendGrid's v3 API](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/authorization). API Keys may be assigned certain permissions, or scopes, that limit which API endpoints they are able to access. This endpoint returns all the scopes assigned to the key you use to authenticate with it. To retrieve the scopes assigned to another key, you can pass an API key ID to the \"Retrieve an existing API key\" endpoint. For a more detailed explanation of how you can use API Key permissions, please visit our [API Keys documentation](https://sendgrid.com/docs/ui/account-and-settings/api-keys/). -func (c *ApiService) ListScope(params *ListScopeParam) (interface{}, error) { - path := "/v3/scopes" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListScope200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ListScope401Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/scopes/api_list_scope_request.go b/rest/api/v3/scopes/api_list_scope_request.go deleted file mode 100644 index 41c1f4be..00000000 --- a/rest/api/v3/scopes/api_list_scope_request.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scopes API -* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListScopeRequestParam struct { - // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. - Limit *int32 `json:"limit,omitempty"` - // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. - Offset *int32 `json:"offset,omitempty"` -} - -func (params *ListScopeRequestParam) SetLimit(Limit int32) *ListScopeRequestParam { - params.Limit = &Limit - return params -} -func (params *ListScopeRequestParam) SetOffset(Offset int32) *ListScopeRequestParam { - params.Offset = &Offset - return params -} - -// **This endpoint allows you to retrieve a paginated list of all recent access requests.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. -func (c *ApiService) ListScopeRequest(params *ListScopeRequestParam) (interface{}, error) { - path := "/v3/scopes/requests" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]ListScopeRequest200ResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/scopes/api_service.go b/rest/api/v3/scopes/api_service.go deleted file mode 100644 index bc846141..00000000 --- a/rest/api/v3/scopes/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scopes API -* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/scopes/docs/ApproveScopeRequest.md b/rest/api/v3/scopes/docs/ApproveScopeRequest.md deleted file mode 100644 index 2b701325..00000000 --- a/rest/api/v3/scopes/docs/ApproveScopeRequest.md +++ /dev/null @@ -1,51 +0,0 @@ -# ApproveScopeRequest - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ApproveScopeRequest**](ApproveScopeRequest.md#ApproveScopeRequest) | **Patch** /v3/scopes/requests/{RequestId}/approve | Approve access request - - - -## ApproveScopeRequest - -> ApproveScopeRequest200Response ApproveScopeRequest(ctx, RequestId) - -Approve access request - -**This endpoint allows you to approve an access attempt.** **Note:** Only teammate admins may approve another teammate’s access request. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**RequestId** | **string** | The ID of the request that you want to approve. - -### Other Parameters - -Other parameters are passed through a pointer to a ApproveScopeRequestParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**ApproveScopeRequest200Response**](ApproveScopeRequest200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/scopes/docs/ApproveScopeRequest200Response.md b/rest/api/v3/scopes/docs/ApproveScopeRequest200Response.md deleted file mode 100644 index 99c4ce7e..00000000 --- a/rest/api/v3/scopes/docs/ApproveScopeRequest200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ApproveScopeRequest200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ScopeGroupName** | **string** | name of feature teammate will be given access to |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/scopes/docs/DenyScopeRequest.md b/rest/api/v3/scopes/docs/DenyScopeRequest.md deleted file mode 100644 index 56947c47..00000000 --- a/rest/api/v3/scopes/docs/DenyScopeRequest.md +++ /dev/null @@ -1,51 +0,0 @@ -# DenyScopeRequest - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DenyScopeRequest**](DenyScopeRequest.md#DenyScopeRequest) | **Delete** /v3/scopes/requests/{RequestId} | Deny access request - - - -## DenyScopeRequest - -> DenyScopeRequest(ctx, RequestId) - -Deny access request - -**This endpoint allows you to deny an attempt to access your account.** **Note:** Only teammate admins may delete a teammate's access request. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**RequestId** | **string** | The ID of the request that you want to deny. - -### Other Parameters - -Other parameters are passed through a pointer to a DenyScopeRequestParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/scopes/docs/DenyScopeRequest404Response.md b/rest/api/v3/scopes/docs/DenyScopeRequest404Response.md deleted file mode 100644 index 4a41f9dd..00000000 --- a/rest/api/v3/scopes/docs/DenyScopeRequest404Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# DenyScopeRequest404Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]DenyScopeRequest404ResponseErrorsInner**](DenyScopeRequest404ResponseErrorsInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/scopes/docs/DenyScopeRequest404ResponseErrorsInner.md b/rest/api/v3/scopes/docs/DenyScopeRequest404ResponseErrorsInner.md deleted file mode 100644 index 6f6d4c6a..00000000 --- a/rest/api/v3/scopes/docs/DenyScopeRequest404ResponseErrorsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# DenyScopeRequest404ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | |[optional] -**Field** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/scopes/docs/ErrorResponse.md b/rest/api/v3/scopes/docs/ErrorResponse.md deleted file mode 100644 index ec2d41f6..00000000 --- a/rest/api/v3/scopes/docs/ErrorResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ErrorResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] -**Id** | **string** | When applicable, this property value will be an error ID. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/scopes/docs/ErrorResponseErrorsInner.md b/rest/api/v3/scopes/docs/ErrorResponseErrorsInner.md deleted file mode 100644 index 5449c685..00000000 --- a/rest/api/v3/scopes/docs/ErrorResponseErrorsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ErrorResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | An error message. |[optional] -**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] -**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/scopes/docs/ListScope.md b/rest/api/v3/scopes/docs/ListScope.md deleted file mode 100644 index 01d7815e..00000000 --- a/rest/api/v3/scopes/docs/ListScope.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListScope - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListScope**](ListScope.md#ListScope) | **Get** /v3/scopes | Retrieve a list of scopes for which this user has access. - - - -## ListScope - -> ListScope200Response ListScope(ctx, optional) - -Retrieve a list of scopes for which this user has access. - -**This endpoint returns a list of all scopes that this user has access to.** API Keys are used to authenticate with [SendGrid's v3 API](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/authorization). API Keys may be assigned certain permissions, or scopes, that limit which API endpoints they are able to access. This endpoint returns all the scopes assigned to the key you use to authenticate with it. To retrieve the scopes assigned to another key, you can pass an API key ID to the \"Retrieve an existing API key\" endpoint. For a more detailed explanation of how you can use API Key permissions, please visit our [API Keys documentation](https://sendgrid.com/docs/ui/account-and-settings/api-keys/). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListScopeParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListScope200Response**](ListScope200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/scopes/docs/ListScope200Response.md b/rest/api/v3/scopes/docs/ListScope200Response.md deleted file mode 100644 index d21786da..00000000 --- a/rest/api/v3/scopes/docs/ListScope200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListScope200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Scopes** | **[]string** | The list of scopes for which this user has access. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/scopes/docs/ListScope401Response.md b/rest/api/v3/scopes/docs/ListScope401Response.md deleted file mode 100644 index 0ee64c00..00000000 --- a/rest/api/v3/scopes/docs/ListScope401Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListScope401Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ListScope401ResponseErrorsInner**](ListScope401ResponseErrorsInner.md) | This 401 response indicates that the user making the call doesn't have the authorization to view the list of scopes. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/scopes/docs/ListScope401ResponseErrorsInner.md b/rest/api/v3/scopes/docs/ListScope401ResponseErrorsInner.md deleted file mode 100644 index 533dc68c..00000000 --- a/rest/api/v3/scopes/docs/ListScope401ResponseErrorsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListScope401ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Field** | **string** | This empty field is returned instead of the list of scopes if the user making the call doesn't have the authorization required. |[optional] -**Message** | **string** | Explains why the scopes cannot be returned. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/scopes/docs/ListScopeRequest.md b/rest/api/v3/scopes/docs/ListScopeRequest.md deleted file mode 100644 index 9af40e3c..00000000 --- a/rest/api/v3/scopes/docs/ListScopeRequest.md +++ /dev/null @@ -1,49 +0,0 @@ -# ListScopeRequest - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListScopeRequest**](ListScopeRequest.md#ListScopeRequest) | **Get** /v3/scopes/requests | Retrieve access requests - - - -## ListScopeRequest - -> []ListScopeRequest200ResponseInner ListScopeRequest(ctx, optional) - -Retrieve access requests - -**This endpoint allows you to retrieve a paginated list of all recent access requests.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListScopeRequestParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. -**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. - -### Return type - -[**[]ListScopeRequest200ResponseInner**](ListScopeRequest200ResponseInner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/scopes/docs/ListScopeRequest200ResponseInner.md b/rest/api/v3/scopes/docs/ListScopeRequest200ResponseInner.md deleted file mode 100644 index 10495fad..00000000 --- a/rest/api/v3/scopes/docs/ListScopeRequest200ResponseInner.md +++ /dev/null @@ -1,16 +0,0 @@ -# ListScopeRequest200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int32** | Request ID |[optional] -**ScopeGroupName** | **string** | Name of group of scopes associated to page teammate is requesting access to |[optional] -**Username** | **string** | Teammate's username |[optional] -**Email** | **string** | Teammate's email |[optional] -**FirstName** | **string** | Teammate's first name |[optional] -**LastName** | **string** | Teammate's last name |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/scopes/model_approve_scope_request_200_response.go b/rest/api/v3/scopes/model_approve_scope_request_200_response.go deleted file mode 100644 index 38fd571e..00000000 --- a/rest/api/v3/scopes/model_approve_scope_request_200_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scopes API -* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ApproveScopeRequest200Response struct for ApproveScopeRequest200Response -type ApproveScopeRequest200Response struct { - // name of feature teammate will be given access to - ScopeGroupName *string `json:"scope_group_name,omitempty"` -} diff --git a/rest/api/v3/scopes/model_deny_scope_request_404_response.go b/rest/api/v3/scopes/model_deny_scope_request_404_response.go deleted file mode 100644 index 0117edee..00000000 --- a/rest/api/v3/scopes/model_deny_scope_request_404_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scopes API -* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DenyScopeRequest404Response struct for DenyScopeRequest404Response -type DenyScopeRequest404Response struct { - Errors *[]DenyScopeRequest404ResponseErrorsInner `json:"errors,omitempty"` -} diff --git a/rest/api/v3/scopes/model_deny_scope_request_404_response_errors_inner.go b/rest/api/v3/scopes/model_deny_scope_request_404_response_errors_inner.go deleted file mode 100644 index b2801e34..00000000 --- a/rest/api/v3/scopes/model_deny_scope_request_404_response_errors_inner.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scopes API -* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DenyScopeRequest404ResponseErrorsInner struct for DenyScopeRequest404ResponseErrorsInner -type DenyScopeRequest404ResponseErrorsInner struct { - Message *string `json:"message,omitempty"` - Field *string `json:"field,omitempty"` -} diff --git a/rest/api/v3/scopes/model_error_response.go b/rest/api/v3/scopes/model_error_response.go deleted file mode 100644 index 4adefcdf..00000000 --- a/rest/api/v3/scopes/model_error_response.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scopes API -* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponse struct for ErrorResponse -type ErrorResponse struct { - Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` - // When applicable, this property value will be an error ID. - Id *string `json:"id,omitempty"` -} diff --git a/rest/api/v3/scopes/model_error_response_errors_inner.go b/rest/api/v3/scopes/model_error_response_errors_inner.go deleted file mode 100644 index de2012d0..00000000 --- a/rest/api/v3/scopes/model_error_response_errors_inner.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scopes API -* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner -type ErrorResponseErrorsInner struct { - // An error message. - Message *string `json:"message,omitempty"` - // When applicable, this property value will be the field that generated the error. - Field *string `json:"field,omitempty"` - // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. - Help *map[string]interface{} `json:"help,omitempty"` -} diff --git a/rest/api/v3/scopes/model_list_scope_200_response.go b/rest/api/v3/scopes/model_list_scope_200_response.go deleted file mode 100644 index f9c8775e..00000000 --- a/rest/api/v3/scopes/model_list_scope_200_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scopes API -* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListScope200Response struct for ListScope200Response -type ListScope200Response struct { - // The list of scopes for which this user has access. - Scopes []string `json:"scopes"` -} diff --git a/rest/api/v3/scopes/model_list_scope_401_response.go b/rest/api/v3/scopes/model_list_scope_401_response.go deleted file mode 100644 index bb9109ba..00000000 --- a/rest/api/v3/scopes/model_list_scope_401_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scopes API -* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListScope401Response struct for ListScope401Response -type ListScope401Response struct { - // This 401 response indicates that the user making the call doesn't have the authorization to view the list of scopes. - Errors []ListScope401ResponseErrorsInner `json:"errors"` -} diff --git a/rest/api/v3/scopes/model_list_scope_401_response_errors_inner.go b/rest/api/v3/scopes/model_list_scope_401_response_errors_inner.go deleted file mode 100644 index 82cec172..00000000 --- a/rest/api/v3/scopes/model_list_scope_401_response_errors_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scopes API -* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListScope401ResponseErrorsInner struct for ListScope401ResponseErrorsInner -type ListScope401ResponseErrorsInner struct { - // This empty field is returned instead of the list of scopes if the user making the call doesn't have the authorization required. - Field *string `json:"field,omitempty"` - // Explains why the scopes cannot be returned. - Message string `json:"message"` -} diff --git a/rest/api/v3/scopes/model_list_scope_request_200_response_inner.go b/rest/api/v3/scopes/model_list_scope_request_200_response_inner.go deleted file mode 100644 index 5392887d..00000000 --- a/rest/api/v3/scopes/model_list_scope_request_200_response_inner.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Scopes API -* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListScopeRequest200ResponseInner struct for ListScopeRequest200ResponseInner -type ListScopeRequest200ResponseInner struct { - // Request ID - Id *int32 `json:"id,omitempty"` - // Name of group of scopes associated to page teammate is requesting access to - ScopeGroupName *string `json:"scope_group_name,omitempty"` - // Teammate's username - Username *string `json:"username,omitempty"` - // Teammate's email - Email *string `json:"email,omitempty"` - // Teammate's first name - FirstName *string `json:"first_name,omitempty"` - // Teammate's last name - LastName *string `json:"last_name,omitempty"` -} diff --git a/rest/api/v3/seq/.openapi-generator b/rest/api/v3/seq/.openapi-generator deleted file mode 100644 index b6d3b5df..00000000 --- a/rest/api/v3/seq/.openapi-generator +++ /dev/null @@ -1,17 +0,0 @@ -.openapi-generator -README.md -api_list_engagement_quality_score.go -api_list_subuser_engagement_quality_score.go -api_service.go -docs/ListEngagementQualityScore.md -docs/ListSubuserEngagementQualityScore.md -docs/SeqError.md -docs/SeqMetadata.md -docs/SeqMetadataNextParams.md -docs/SeqMetrics.md -docs/SeqScore.md -model_seq_error.go -model_seq_metadata.go -model_seq_metadata_next_params.go -model_seq_metrics.go -model_seq_score.go diff --git a/rest/api/v3/seq/.openapi-generator-ignore b/rest/api/v3/seq/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/seq/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/seq/README.md b/rest/api/v3/seq/README.md deleted file mode 100644 index 5f881d84..00000000 --- a/rest/api/v3/seq/README.md +++ /dev/null @@ -1,71 +0,0 @@ -# Go API client for - -The SendGrid Engagement Quality (SEQ) API allows you to retrieve metrics that define the quality of your email program. - -An SEQ score is correlated with: -- The quality of the data in a sender’s program. -- How “wanted” the sender's email is by their recipients. - -Because “wanted” email and deliverability are closely related, a higher SEQ metric is correlated with greater deliverability. This means the higher your SEQ score, the more likely you are to land in your recipients' inboxes. See the SEQ Overview page to understand SEQ, how it's calculated, and how you can address your score. The SEQ endpoints allow you to retrieve your scores and scores for your Subusers. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:38.422950+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*ListEngagementQualityScore* | [**ListEngagementQualityScore**](docs/ListEngagementQualityScore.md#listengagementqualityscore) | **Get** /v3/engagementquality/scores | Get Engagement Quality Scores -*ListSubuserEngagementQualityScore* | [**ListSubuserEngagementQualityScore**](docs/ListSubuserEngagementQualityScore.md#listsubuserengagementqualityscore) | **Get** /v3/engagementquality/subusers/scores | Get Subusers' Engagement Quality Scores - - -## Documentation For Models - - - [SeqError](SeqError.md) - - [SeqMetadata](SeqMetadata.md) - - [SeqMetadataNextParams](SeqMetadataNextParams.md) - - [SeqMetrics](SeqMetrics.md) - - [SeqScore](SeqScore.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/seq/api_list_engagement_quality_score.go b/rest/api/v3/seq/api_list_engagement_quality_score.go deleted file mode 100644 index c79118dd..00000000 --- a/rest/api/v3/seq/api_list_engagement_quality_score.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Engagement Quality API -* The SendGrid Engagement Quality (SEQ) API allows you to retrieve metrics that define the quality of your email program. An SEQ score is correlated with: - The quality of the data in a sender’s program. - How “wanted” the sender's email is by their recipients. Because “wanted” email and deliverability are closely related, a higher SEQ metric is correlated with greater deliverability. This means the higher your SEQ score, the more likely you are to land in your recipients' inboxes. See the SEQ Overview page to understand SEQ, how it's calculated, and how you can address your score. The SEQ endpoints allow you to retrieve your scores and scores for your Subusers. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "fmt" - "net/http" - "net/url" -) - -type ListEngagementQualityScoreParam struct { - // The starting date in YYYY-MM-DD format (UTC) for which you want to retrieve scores. - From *string `json:"from"` - // The ending date in YYYY-MM-DD format (UTC) for which you want to retrieve scores. - To *string `json:"to"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListEngagementQualityScoreParam) SetFrom(From string) *ListEngagementQualityScoreParam { - params.From = &From - return params -} -func (params *ListEngagementQualityScoreParam) SetTo(To string) *ListEngagementQualityScoreParam { - params.To = &To - return params -} -func (params *ListEngagementQualityScoreParam) SetOnbehalfof(Onbehalfof string) *ListEngagementQualityScoreParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This operation allows you to retrieve your SendGrid Engagement Quality (SEQ) scores for a specified date range**. A successful request with this API operation will return either a `200` or `202` response. ### 202 This operation returns a `202` response when SendGrid does not yet have scores available for the specified date range. Scores are calculated asynchronously from requests to this endpoint. This means a score may be available for the specified date at a later time, but a score is not available at the time of your API request. ### 200 A 200 response will include all available scores beginning on the `from` and ending on the `to` dates specified. The `score` and `metrics` properties will be omitted from the response for any days in which the user is not eligible to receive a score. The `score` property represents a user's overall engagement quality. The `metrics` property provides additional scores for the input categories that contribute to that overall score. All scores range from `1` to `5` with a higher number representing better engagement quality. See [**SendGrid Engagement Quality Overview**](https://docs.sendgrid.com/api-reference/sendgrid-engagement-quality-api/overview) for more information -func (c *ApiService) ListEngagementQualityScore(params *ListEngagementQualityScoreParam) (interface{}, error) { - path := "/v3/engagementquality/scores" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.From != nil { - data.Set("from", fmt.Sprint(*params.From)) - } - if params != nil && params.To != nil { - data.Set("to", fmt.Sprint(*params.To)) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/seq/api_list_subuser_engagement_quality_score.go b/rest/api/v3/seq/api_list_subuser_engagement_quality_score.go deleted file mode 100644 index 82ff9ce6..00000000 --- a/rest/api/v3/seq/api_list_subuser_engagement_quality_score.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Engagement Quality API -* The SendGrid Engagement Quality (SEQ) API allows you to retrieve metrics that define the quality of your email program. An SEQ score is correlated with: - The quality of the data in a sender’s program. - How “wanted” the sender's email is by their recipients. Because “wanted” email and deliverability are closely related, a higher SEQ metric is correlated with greater deliverability. This means the higher your SEQ score, the more likely you are to land in your recipients' inboxes. See the SEQ Overview page to understand SEQ, how it's calculated, and how you can address your score. The SEQ endpoints allow you to retrieve your scores and scores for your Subusers. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "fmt" - "net/http" - "net/url" -) - -type ListSubuserEngagementQualityScoreParam struct { - // The date in YYYY-MM-DD format (UTC) for which you want to retrieve a SendGrid Engagement Quality score. - Date *string `json:"date"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // Specifies the number of results to be returned by the API. This parameter can be used to limit the results returned or in combination with the `after_key` parameter to iterate through paginated results. - Limit *int32 `json:"limit,omitempty"` - // Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. - AfterKey *int32 `json:"after_key,omitempty"` -} - -func (params *ListSubuserEngagementQualityScoreParam) SetDate(Date string) *ListSubuserEngagementQualityScoreParam { - params.Date = &Date - return params -} -func (params *ListSubuserEngagementQualityScoreParam) SetOnbehalfof(Onbehalfof string) *ListSubuserEngagementQualityScoreParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *ListSubuserEngagementQualityScoreParam) SetLimit(Limit int32) *ListSubuserEngagementQualityScoreParam { - params.Limit = &Limit - return params -} -func (params *ListSubuserEngagementQualityScoreParam) SetAfterKey(AfterKey int32) *ListSubuserEngagementQualityScoreParam { - params.AfterKey = &AfterKey - return params -} - -// **This operation allows you to retrieve SendGrid Engagement Quality (SEQ) scores for your Subusers or customer accounts for a specific date.** A successful request with this API operation will return either a `200` or `202` response. ### 202 This operation returns a `202` response when SendGrid does not yet have scores available for the specified date range. Scores are calculated asynchronously from requests to this endpoint. This means a score may be available for the specified date at a later time, but a score is not available at the time of your API request. ### 200 A `200` response will include scores for all Subusers or customer accounts belonging to the requesting parent or reseller account. The `score` and `metrics` properties will be omitted from the response if a Subuser or customer account is not eligible to receive a score for the specified date. The `score` property represents a Subuser or customer account's overall engagement quality. The `metrics` property provides additional scores for the input categories that contribute to that overall score. All scores range from `1` to `5` with a higher number representing better engagement quality. See [**SendGrid Engagement Quality Overview**](https://docs.sendgrid.com/api-reference/sendgrid-engagement-quality-api/overview) for more information -func (c *ApiService) ListSubuserEngagementQualityScore(params *ListSubuserEngagementQualityScoreParam) (interface{}, error) { - path := "/v3/engagementquality/subusers/scores" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Date != nil { - data.Set("date", fmt.Sprint(*params.Date)) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.AfterKey != nil { - data.Set("after_key", fmt.Sprint(*params.AfterKey)) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/seq/api_service.go b/rest/api/v3/seq/api_service.go deleted file mode 100644 index 5a7df229..00000000 --- a/rest/api/v3/seq/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Engagement Quality API -* The SendGrid Engagement Quality (SEQ) API allows you to retrieve metrics that define the quality of your email program. An SEQ score is correlated with: - The quality of the data in a sender’s program. - How “wanted” the sender's email is by their recipients. Because “wanted” email and deliverability are closely related, a higher SEQ metric is correlated with greater deliverability. This means the higher your SEQ score, the more likely you are to land in your recipients' inboxes. See the SEQ Overview page to understand SEQ, how it's calculated, and how you can address your score. The SEQ endpoints allow you to retrieve your scores and scores for your Subusers. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/seq/docs/ListEngagementQualityScore.md b/rest/api/v3/seq/docs/ListEngagementQualityScore.md deleted file mode 100644 index 468dac7f..00000000 --- a/rest/api/v3/seq/docs/ListEngagementQualityScore.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListEngagementQualityScore - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListEngagementQualityScore**](ListEngagementQualityScore.md#ListEngagementQualityScore) | **Get** /v3/engagementquality/scores | Get Engagement Quality Scores - - - -## ListEngagementQualityScore - -> interface{} ListEngagementQualityScore(ctx, FromTooptional) - -Get Engagement Quality Scores - -**This operation allows you to retrieve your SendGrid Engagement Quality (SEQ) scores for a specified date range**. A successful request with this API operation will return either a `200` or `202` response. ### 202 This operation returns a `202` response when SendGrid does not yet have scores available for the specified date range. Scores are calculated asynchronously from requests to this endpoint. This means a score may be available for the specified date at a later time, but a score is not available at the time of your API request. ### 200 A 200 response will include all available scores beginning on the `from` and ending on the `to` dates specified. The `score` and `metrics` properties will be omitted from the response for any days in which the user is not eligible to receive a score. The `score` property represents a user's overall engagement quality. The `metrics` property provides additional scores for the input categories that contribute to that overall score. All scores range from `1` to `5` with a higher number representing better engagement quality. See [**SendGrid Engagement Quality Overview**](https://docs.sendgrid.com/api-reference/sendgrid-engagement-quality-api/overview) for more information - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListEngagementQualityScoreParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -**interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/seq/docs/ListSubuserEngagementQualityScore.md b/rest/api/v3/seq/docs/ListSubuserEngagementQualityScore.md deleted file mode 100644 index 7f22b452..00000000 --- a/rest/api/v3/seq/docs/ListSubuserEngagementQualityScore.md +++ /dev/null @@ -1,50 +0,0 @@ -# ListSubuserEngagementQualityScore - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListSubuserEngagementQualityScore**](ListSubuserEngagementQualityScore.md#ListSubuserEngagementQualityScore) | **Get** /v3/engagementquality/subusers/scores | Get Subusers' Engagement Quality Scores - - - -## ListSubuserEngagementQualityScore - -> interface{} ListSubuserEngagementQualityScore(ctx, Dateoptional) - -Get Subusers' Engagement Quality Scores - -**This operation allows you to retrieve SendGrid Engagement Quality (SEQ) scores for your Subusers or customer accounts for a specific date.** A successful request with this API operation will return either a `200` or `202` response. ### 202 This operation returns a `202` response when SendGrid does not yet have scores available for the specified date range. Scores are calculated asynchronously from requests to this endpoint. This means a score may be available for the specified date at a later time, but a score is not available at the time of your API request. ### 200 A `200` response will include scores for all Subusers or customer accounts belonging to the requesting parent or reseller account. The `score` and `metrics` properties will be omitted from the response if a Subuser or customer account is not eligible to receive a score for the specified date. The `score` property represents a Subuser or customer account's overall engagement quality. The `metrics` property provides additional scores for the input categories that contribute to that overall score. All scores range from `1` to `5` with a higher number representing better engagement quality. See [**SendGrid Engagement Quality Overview**](https://docs.sendgrid.com/api-reference/sendgrid-engagement-quality-api/overview) for more information - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListSubuserEngagementQualityScoreParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**Limit** | **int32** | Specifies the number of results to be returned by the API. This parameter can be used to limit the results returned or in combination with the `after_key` parameter to iterate through paginated results. -**AfterKey** | **int32** | Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. - -### Return type - -**interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/seq/docs/SeqError.md b/rest/api/v3/seq/docs/SeqError.md deleted file mode 100644 index a36145cf..00000000 --- a/rest/api/v3/seq/docs/SeqError.md +++ /dev/null @@ -1,12 +0,0 @@ -# SeqError - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] -**Message** | **string** | An error message. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/seq/docs/SeqMetadata.md b/rest/api/v3/seq/docs/SeqMetadata.md deleted file mode 100644 index f13d51d3..00000000 --- a/rest/api/v3/seq/docs/SeqMetadata.md +++ /dev/null @@ -1,11 +0,0 @@ -# SeqMetadata - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**NextParams** | [**SeqMetadataNextParams**](SeqMetadataNextParams.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/seq/docs/SeqMetadataNextParams.md b/rest/api/v3/seq/docs/SeqMetadataNextParams.md deleted file mode 100644 index a361a0e5..00000000 --- a/rest/api/v3/seq/docs/SeqMetadataNextParams.md +++ /dev/null @@ -1,11 +0,0 @@ -# SeqMetadataNextParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AfterKey** | **string** | The `after_key` property represents the last processed key. If the `after_key` property is `null`, there are no more entries available. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/seq/docs/SeqMetrics.md b/rest/api/v3/seq/docs/SeqMetrics.md deleted file mode 100644 index 13404179..00000000 --- a/rest/api/v3/seq/docs/SeqMetrics.md +++ /dev/null @@ -1,15 +0,0 @@ -# SeqMetrics - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**EngagementRecency** | **float32** | Indicates whether or not you are sending to an engaged audience. Engagement recency is determined by factors such as how regularly your messages are being opened and clicked. Your score will range from `1` to `5` with a higher score representing better engagement quality. | -**OpenRate** | **float32** | Indicates the degree to which your audience is opening your messages. Your score will range from `1` to `5` with a higher score representing a better open rate and better engagement quality. | -**BounceClassification** | **float32** | Indicates the degree to which mailbox providers are rejecting your mail due to reputation issues or content that looks like spam. Your score is calculated based on a ratio of these specific types of bounces to your total processed email. Your score will range from `1` to `5` with a higher score representing a lower percentage of bounces and better engagement quality. | -**BounceRate** | **float32** | Indicates if you are attempting to send too many messages to addresses that don't exist. This score is determined by calculating your permanent bounces (bounces to invalid mailboxes). Your score will range from `1` to `5` with a higher score representing fewer bounces and better engagement quality. | -**SpamRate** | **float32** | Indicates if your messages are generating excessive spam complaints from recipients. This score is determined by calculating the number of recipients who open your mail and then mark it as spam. Your score will range from `1` to `5` with a higher score representing fewer spam reports and better engagement quality. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/seq/docs/SeqScore.md b/rest/api/v3/seq/docs/SeqScore.md deleted file mode 100644 index 84b13574..00000000 --- a/rest/api/v3/seq/docs/SeqScore.md +++ /dev/null @@ -1,15 +0,0 @@ -# SeqScore - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**UserId** | **string** | The user identifier associated with this score. | -**Username** | **string** | The username associated with this score. |[optional] -**Date** | **string** | The date (UTC) for which this score was calculated. |[optional] -**Score** | **float32** | Your SendGrid Engagement Quality Score. The `score` property will be omitted when a score is unknown. A score may be unknown if you have not turned on [open tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking) and/or your account or Subuser has not sent at least 1,000 messages during the previous 30 days. |[optional] -**Metrics** | [**SeqMetrics**](SeqMetrics.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/seq/model_seq_error.go b/rest/api/v3/seq/model_seq_error.go deleted file mode 100644 index 1494de42..00000000 --- a/rest/api/v3/seq/model_seq_error.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Engagement Quality API -* The SendGrid Engagement Quality (SEQ) API allows you to retrieve metrics that define the quality of your email program. An SEQ score is correlated with: - The quality of the data in a sender’s program. - How “wanted” the sender's email is by their recipients. Because “wanted” email and deliverability are closely related, a higher SEQ metric is correlated with greater deliverability. This means the higher your SEQ score, the more likely you are to land in your recipients' inboxes. See the SEQ Overview page to understand SEQ, how it's calculated, and how you can address your score. The SEQ endpoints allow you to retrieve your scores and scores for your Subusers. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SeqError This object contains error details -type SeqError struct { - // When applicable, this property value will be the field that generated the error. - Field *string `json:"field,omitempty"` - // An error message. - Message string `json:"message"` -} diff --git a/rest/api/v3/seq/model_seq_metadata.go b/rest/api/v3/seq/model_seq_metadata.go deleted file mode 100644 index 91510ac6..00000000 --- a/rest/api/v3/seq/model_seq_metadata.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Engagement Quality API -* The SendGrid Engagement Quality (SEQ) API allows you to retrieve metrics that define the quality of your email program. An SEQ score is correlated with: - The quality of the data in a sender’s program. - How “wanted” the sender's email is by their recipients. Because “wanted” email and deliverability are closely related, a higher SEQ metric is correlated with greater deliverability. This means the higher your SEQ score, the more likely you are to land in your recipients' inboxes. See the SEQ Overview page to understand SEQ, how it's calculated, and how you can address your score. The SEQ endpoints allow you to retrieve your scores and scores for your Subusers. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SeqMetadata This object contains response metadata. The presence of the `after_key` property in the metadata indicates that some items are still outstanding and have not been retrieved. You can use the `after_key` value to retrieve additional items with another request. -type SeqMetadata struct { - NextParams *SeqMetadataNextParams `json:"next_params,omitempty"` -} diff --git a/rest/api/v3/seq/model_seq_metadata_next_params.go b/rest/api/v3/seq/model_seq_metadata_next_params.go deleted file mode 100644 index 0016951c..00000000 --- a/rest/api/v3/seq/model_seq_metadata_next_params.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Engagement Quality API -* The SendGrid Engagement Quality (SEQ) API allows you to retrieve metrics that define the quality of your email program. An SEQ score is correlated with: - The quality of the data in a sender’s program. - How “wanted” the sender's email is by their recipients. Because “wanted” email and deliverability are closely related, a higher SEQ metric is correlated with greater deliverability. This means the higher your SEQ score, the more likely you are to land in your recipients' inboxes. See the SEQ Overview page to understand SEQ, how it's calculated, and how you can address your score. The SEQ endpoints allow you to retrieve your scores and scores for your Subusers. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SeqMetadataNextParams struct for SeqMetadataNextParams -type SeqMetadataNextParams struct { - // The `after_key` property represents the last processed key. If the `after_key` property is `null`, there are no more entries available. - AfterKey *string `json:"after_key,omitempty"` -} diff --git a/rest/api/v3/seq/model_seq_metrics.go b/rest/api/v3/seq/model_seq_metrics.go deleted file mode 100644 index 21ef4bb5..00000000 --- a/rest/api/v3/seq/model_seq_metrics.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Engagement Quality API -* The SendGrid Engagement Quality (SEQ) API allows you to retrieve metrics that define the quality of your email program. An SEQ score is correlated with: - The quality of the data in a sender’s program. - How “wanted” the sender's email is by their recipients. Because “wanted” email and deliverability are closely related, a higher SEQ metric is correlated with greater deliverability. This means the higher your SEQ score, the more likely you are to land in your recipients' inboxes. See the SEQ Overview page to understand SEQ, how it's calculated, and how you can address your score. The SEQ endpoints allow you to retrieve your scores and scores for your Subusers. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SeqMetrics A collection of metrics representing your engagement score across multiple indicators such as your open rate, spam rate, and bounce rate. Each metric is assigned a score from `1` to `5` with a higher score representing better engagement quality for that particular metric. The `metrics` property will be omitted when a score is unknown. A score may be unknown if you have not turned on [open tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking) and/or your account or Subuser has not sent at least 1,000 messages during the previous 30 days. -type SeqMetrics struct { - // Indicates whether or not you are sending to an engaged audience. Engagement recency is determined by factors such as how regularly your messages are being opened and clicked. Your score will range from `1` to `5` with a higher score representing better engagement quality. - EngagementRecency float32 `json:"engagement_recency"` - // Indicates the degree to which your audience is opening your messages. Your score will range from `1` to `5` with a higher score representing a better open rate and better engagement quality. - OpenRate float32 `json:"open_rate"` - // Indicates the degree to which mailbox providers are rejecting your mail due to reputation issues or content that looks like spam. Your score is calculated based on a ratio of these specific types of bounces to your total processed email. Your score will range from `1` to `5` with a higher score representing a lower percentage of bounces and better engagement quality. - BounceClassification float32 `json:"bounce_classification"` - // Indicates if you are attempting to send too many messages to addresses that don't exist. This score is determined by calculating your permanent bounces (bounces to invalid mailboxes). Your score will range from `1` to `5` with a higher score representing fewer bounces and better engagement quality. - BounceRate float32 `json:"bounce_rate"` - // Indicates if your messages are generating excessive spam complaints from recipients. This score is determined by calculating the number of recipients who open your mail and then mark it as spam. Your score will range from `1` to `5` with a higher score representing fewer spam reports and better engagement quality. - SpamRate float32 `json:"spam_rate"` -} diff --git a/rest/api/v3/seq/model_seq_score.go b/rest/api/v3/seq/model_seq_score.go deleted file mode 100644 index 04818407..00000000 --- a/rest/api/v3/seq/model_seq_score.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Engagement Quality API -* The SendGrid Engagement Quality (SEQ) API allows you to retrieve metrics that define the quality of your email program. An SEQ score is correlated with: - The quality of the data in a sender’s program. - How “wanted” the sender's email is by their recipients. Because “wanted” email and deliverability are closely related, a higher SEQ metric is correlated with greater deliverability. This means the higher your SEQ score, the more likely you are to land in your recipients' inboxes. See the SEQ Overview page to understand SEQ, how it's calculated, and how you can address your score. The SEQ endpoints allow you to retrieve your scores and scores for your Subusers. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SeqScore A user's SendGrid Engagement Quality (SEQ) score for a specified date. Your SEQ score is determined by measuring several key metrics including your open rate, spam rate, and engagement recency. Your overall score allows you to quickly assess how your email program is performing at a high level. You will receive a score from `1` to `5` with a higher number representing better engagement quality. See the `metrics` property to understand how your program is performing across the input categories that determine your overall score. -type SeqScore struct { - // The user identifier associated with this score. - UserId string `json:"user_id"` - // The username associated with this score. - Username *string `json:"username,omitempty"` - // The date (UTC) for which this score was calculated. - Date *string `json:"date,omitempty"` - // Your SendGrid Engagement Quality Score. The `score` property will be omitted when a score is unknown. A score may be unknown if you have not turned on [open tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking) and/or your account or Subuser has not sent at least 1,000 messages during the previous 30 days. - Score *float32 `json:"score,omitempty"` - Metrics *SeqMetrics `json:"metrics,omitempty"` -} diff --git a/rest/api/v3/sso/.openapi-generator b/rest/api/v3/sso/.openapi-generator deleted file mode 100644 index 9f986e00..00000000 --- a/rest/api/v3/sso/.openapi-generator +++ /dev/null @@ -1,64 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_create_sso_certificate.go -api_create_sso_integration.go -api_create_sso_teammate.go -api_delete_sso_certificate.go -api_delete_sso_integration.go -api_get_sso_certificate.go -api_get_sso_integration.go -api_list_sso_integration.go -api_list_sso_integration_certificate.go -api_service.go -api_update_sso_certificate.go -api_update_sso_integration.go -api_update_sso_teammate.go -docs/CreateSsoCertificate.md -docs/CreateSsoCertificateRequest.md -docs/CreateSsoIntegration.md -docs/CreateSsoTeammate.md -docs/DeleteSsoCertificate.md -docs/DeleteSsoIntegration.md -docs/GetSsoCertificate.md -docs/GetSsoIntegration.md -docs/ListSsoIntegration.md -docs/ListSsoIntegrationCertificate.md -docs/PatchSsoTeammates200.md -docs/PermissionType.md -docs/PermissionType1.md -docs/Persona.md -docs/PostPatchIntegrationRequest.md -docs/PostSsoTeammates201.md -docs/PostSsoTeammatesRequest.md -docs/SsoCertificateBody.md -docs/SsoErrorResponseInner.md -docs/SsoIntegration.md -docs/SsoTeammatesBaseRequestProps.md -docs/SsoTeammatesBaseRequestPropsSubuserAccessInner.md -docs/SsoTeammatesBaseResponseProps.md -docs/SsoTeammatesRestrictedSubuserResponseProps.md -docs/SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md -docs/UpdateSsoCertificate.md -docs/UpdateSsoCertificateRequest.md -docs/UpdateSsoIntegration.md -docs/UpdateSsoTeammate.md -docs/UserType.md -model_create_sso_certificate_request.go -model_patch_sso_teammates200.go -model_permission_type.go -model_permission_type1.go -model_persona.go -model_post_patch_integration_request.go -model_post_sso_teammates201.go -model_post_sso_teammates_request.go -model_sso_certificate_body.go -model_sso_error_response_inner.go -model_sso_integration.go -model_sso_teammates_base_request_props.go -model_sso_teammates_base_request_props_subuser_access_inner.go -model_sso_teammates_base_response_props.go -model_sso_teammates_restricted_subuser_response_props.go -model_sso_teammates_restricted_subuser_response_props_subuser_access_inner.go -model_update_sso_certificate_request.go -model_user_type.go diff --git a/rest/api/v3/sso/.openapi-generator-ignore b/rest/api/v3/sso/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/sso/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/sso/README.md b/rest/api/v3/sso/README.md deleted file mode 100644 index 731a302f..00000000 --- a/rest/api/v3/sso/README.md +++ /dev/null @@ -1,94 +0,0 @@ -# Go API client for - -The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). - -The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. - -The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. - -The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T13:25:44.437973+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*CreateSsoCertificate* | [**CreateSsoCertificate**](docs/CreateSsoCertificate.md#createssocertificate) | **Post** /v3/sso/certificates | Create an SSO Certificate -*CreateSsoIntegration* | [**CreateSsoIntegration**](docs/CreateSsoIntegration.md#createssointegration) | **Post** /v3/sso/integrations | Create an SSO Integration -*CreateSsoTeammate* | [**CreateSsoTeammate**](docs/CreateSsoTeammate.md#createssoteammate) | **Post** /v3/sso/teammates | Create an SSO Teammate. -*DeleteSsoCertificate* | [**DeleteSsoCertificate**](docs/DeleteSsoCertificate.md#deletessocertificate) | **Delete** /v3/sso/certificates/{CertId} | Delete an SSO Certificate -*DeleteSsoIntegration* | [**DeleteSsoIntegration**](docs/DeleteSsoIntegration.md#deletessointegration) | **Delete** /v3/sso/integrations/{Id} | Delete an SSO Integration -*GetSsoCertificate* | [**GetSsoCertificate**](docs/GetSsoCertificate.md#getssocertificate) | **Get** /v3/sso/certificates/{CertId} | Get an SSO Certificate -*GetSsoIntegration* | [**GetSsoIntegration**](docs/GetSsoIntegration.md#getssointegration) | **Get** /v3/sso/integrations/{Id} | Get an SSO Integration -*ListSsoIntegration* | [**ListSsoIntegration**](docs/ListSsoIntegration.md#listssointegration) | **Get** /v3/sso/integrations | Get All SSO Integrations -*ListSsoIntegrationCertificate* | [**ListSsoIntegrationCertificate**](docs/ListSsoIntegrationCertificate.md#listssointegrationcertificate) | **Get** /v3/sso/integrations/{IntegrationId}/certificates | Get All SSO Certificates by Integration -*UpdateSsoCertificate* | [**UpdateSsoCertificate**](docs/UpdateSsoCertificate.md#updatessocertificate) | **Patch** /v3/sso/certificates/{CertId} | Update SSO Certificate -*UpdateSsoIntegration* | [**UpdateSsoIntegration**](docs/UpdateSsoIntegration.md#updatessointegration) | **Patch** /v3/sso/integrations/{Id} | Update an SSO Integration -*UpdateSsoTeammate* | [**UpdateSsoTeammate**](docs/UpdateSsoTeammate.md#updatessoteammate) | **Patch** /v3/sso/teammates/{Username} | Edit an SSO Teammate - - -## Documentation For Models - - - [CreateSsoCertificateRequest](CreateSsoCertificateRequest.md) - - [PatchSsoTeammates200](PatchSsoTeammates200.md) - - [PermissionType](PermissionType.md) - - [PermissionType1](PermissionType1.md) - - [Persona](Persona.md) - - [PostPatchIntegrationRequest](PostPatchIntegrationRequest.md) - - [PostSsoTeammates201](PostSsoTeammates201.md) - - [PostSsoTeammatesRequest](PostSsoTeammatesRequest.md) - - [SsoCertificateBody](SsoCertificateBody.md) - - [SsoErrorResponseInner](SsoErrorResponseInner.md) - - [SsoIntegration](SsoIntegration.md) - - [SsoTeammatesBaseRequestProps](SsoTeammatesBaseRequestProps.md) - - [SsoTeammatesBaseRequestPropsSubuserAccessInner](SsoTeammatesBaseRequestPropsSubuserAccessInner.md) - - [SsoTeammatesBaseResponseProps](SsoTeammatesBaseResponseProps.md) - - [SsoTeammatesRestrictedSubuserResponseProps](SsoTeammatesRestrictedSubuserResponseProps.md) - - [SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner](SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md) - - [UpdateSsoCertificateRequest](UpdateSsoCertificateRequest.md) - - [UserType](UserType.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/sso/api_create_sso_certificate.go b/rest/api/v3/sso/api_create_sso_certificate.go deleted file mode 100644 index f23bc4dd..00000000 --- a/rest/api/v3/sso/api_create_sso_certificate.go +++ /dev/null @@ -1,104 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" -) - -type CreateSsoCertificateParam struct { - // - CreateSsoCertificateRequest *CreateSsoCertificateRequest `json:"CreateSsoCertificateRequest,omitempty"` -} - -func (params *CreateSsoCertificateParam) SetCreateSsoCertificateRequest(CreateSsoCertificateRequest CreateSsoCertificateRequest) *CreateSsoCertificateParam { - params.CreateSsoCertificateRequest = &CreateSsoCertificateRequest - return params -} - -// **This endpoint allows you to create an SSO certificate.** -func (c *ApiService) CreateSsoCertificate(params *CreateSsoCertificateParam) (interface{}, error) { - path := "/v3/sso/certificates" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.CreateSsoCertificateRequest != nil { - b, err := json.Marshal(*params.CreateSsoCertificateRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SsoCertificateBody{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 429 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/sso/api_create_sso_integration.go b/rest/api/v3/sso/api_create_sso_integration.go deleted file mode 100644 index 2113b4f5..00000000 --- a/rest/api/v3/sso/api_create_sso_integration.go +++ /dev/null @@ -1,104 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" -) - -type CreateSsoIntegrationParam struct { - // - PostPatchIntegrationRequest *PostPatchIntegrationRequest `json:"PostPatchIntegrationRequest,omitempty"` -} - -func (params *CreateSsoIntegrationParam) SetPostPatchIntegrationRequest(PostPatchIntegrationRequest PostPatchIntegrationRequest) *CreateSsoIntegrationParam { - params.PostPatchIntegrationRequest = &PostPatchIntegrationRequest - return params -} - -// **This endpoint allows you to create an SSO integration.** -func (c *ApiService) CreateSsoIntegration(params *CreateSsoIntegrationParam) (interface{}, error) { - path := "/v3/sso/integrations" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.PostPatchIntegrationRequest != nil { - b, err := json.Marshal(*params.PostPatchIntegrationRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SsoIntegration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 429 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/sso/api_create_sso_teammate.go b/rest/api/v3/sso/api_create_sso_teammate.go deleted file mode 100644 index ac3f8c9b..00000000 --- a/rest/api/v3/sso/api_create_sso_teammate.go +++ /dev/null @@ -1,104 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" -) - -type CreateSsoTeammateParam struct { - // - PostSsoTeammatesRequest *PostSsoTeammatesRequest `json:"PostSsoTeammatesRequest,omitempty"` -} - -func (params *CreateSsoTeammateParam) SetPostSsoTeammatesRequest(PostSsoTeammatesRequest PostSsoTeammatesRequest) *CreateSsoTeammateParam { - params.PostSsoTeammatesRequest = &PostSsoTeammatesRequest - return params -} - -// **This endpoint allows you to create an SSO Teammate.** The email address provided for the Teammate will also function as the Teammate's username. Once created, the Teammate's email address cannot be changed. ### Scopes When creating a Teammate, you will assign it permissions or scopes. These scopes determine which actions the Teammate can perform and which features they can access. Scopes are provided with one of three properties passed to this endpoint: `is_admin`, `scopes`, and `persona`. You can make a Teammate an administrator by setting `is_admin` to `true`. Administrators will have all scopes assigned to them. Alternatively, you can assign a `persona` to the teammate, which will assign them a block of permissions commonly required for that type of user. See the \"Persona scopes\" section of [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions#persona-scopes) for a list of permsissions granted by persona. Lastly, you can assign individual permissions with the `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of scopes that can be assigned to a Teammate. ### Subuser access SendGrid Teammates may be assigned access to one or more Subusers. Subusers function like SendGrid sub-accounts with their own resources. See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. When assigning Subuser access to a Teammate, you may set the `has_restricted_subuser_access` property to `true` to constrain the Teammate so that they can operate only on behalf of the Subusers to which they are assigned. You may further set the level of access the Teammate has to each Subuser with the `subuser_access` property. -func (c *ApiService) CreateSsoTeammate(params *CreateSsoTeammateParam) (interface{}, error) { - path := "/v3/sso/teammates" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.PostSsoTeammatesRequest != nil { - b, err := json.Marshal(*params.PostSsoTeammatesRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &PostSsoTeammates201{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 429 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/sso/api_delete_sso_certificate.go b/rest/api/v3/sso/api_delete_sso_certificate.go deleted file mode 100644 index 4deeb0a5..00000000 --- a/rest/api/v3/sso/api_delete_sso_certificate.go +++ /dev/null @@ -1,100 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" - - "strings" -) - -type DeleteSsoCertificateParam struct { - // - CertId *string `json:"cert_id"` -} - -func (params *DeleteSsoCertificateParam) SetCertId(CertId string) *DeleteSsoCertificateParam { - params.CertId = &CertId - return params -} - -// **This endpoint allows you to delete an SSO certificate.** You can retrieve a certificate's ID from the response provided by the \"Get All SSO Integrations\" endpoint. -func (c *ApiService) DeleteSsoCertificate(params *DeleteSsoCertificateParam) (interface{}, error) { - path := "/v3/sso/certificates/{CertId}" - if params != nil && params.CertId != nil { - path = strings.Replace(path, "{"+"CertId"+"}", *params.CertId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SsoCertificateBody{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 429 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/sso/api_delete_sso_integration.go b/rest/api/v3/sso/api_delete_sso_integration.go deleted file mode 100644 index fd63f994..00000000 --- a/rest/api/v3/sso/api_delete_sso_integration.go +++ /dev/null @@ -1,92 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" - - "strings" -) - -type DeleteSsoIntegrationParam struct { - // - Id *string `json:"id"` -} - -func (params *DeleteSsoIntegrationParam) SetId(Id string) *DeleteSsoIntegrationParam { - params.Id = &Id - return params -} - -// **This endpoint allows you to delete an IdP configuration by ID.** You can retrieve the IDs for your configurations from the response provided by the \"Get All SSO Integrations\" endpoint. -func (c *ApiService) DeleteSsoIntegration(params *DeleteSsoIntegrationParam) (interface{}, error) { - path := "/v3/sso/integrations/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 400 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 429 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/sso/api_get_sso_certificate.go b/rest/api/v3/sso/api_get_sso_certificate.go deleted file mode 100644 index 81234a78..00000000 --- a/rest/api/v3/sso/api_get_sso_certificate.go +++ /dev/null @@ -1,100 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" - - "strings" -) - -type GetSsoCertificateParam struct { - // - CertId *string `json:"cert_id"` -} - -func (params *GetSsoCertificateParam) SetCertId(CertId string) *GetSsoCertificateParam { - params.CertId = &CertId - return params -} - -// **This endpoint allows you to retrieve an individual SSO certificate.** -func (c *ApiService) GetSsoCertificate(params *GetSsoCertificateParam) (interface{}, error) { - path := "/v3/sso/certificates/{CertId}" - if params != nil && params.CertId != nil { - path = strings.Replace(path, "{"+"CertId"+"}", *params.CertId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SsoCertificateBody{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 429 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/sso/api_get_sso_integration.go b/rest/api/v3/sso/api_get_sso_integration.go deleted file mode 100644 index 4ada401b..00000000 --- a/rest/api/v3/sso/api_get_sso_integration.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" - - "strings" -) - -type GetSsoIntegrationParam struct { - // - Id *string `json:"id"` - // If this parameter is set to `true`, the response will include the `completed_integration` field. - Si *bool `json:"si,omitempty"` -} - -func (params *GetSsoIntegrationParam) SetId(Id string) *GetSsoIntegrationParam { - params.Id = &Id - return params -} -func (params *GetSsoIntegrationParam) SetSi(Si bool) *GetSsoIntegrationParam { - params.Si = &Si - return params -} - -// **This endpoint allows you to retrieve an SSO integration by ID.** You can retrieve the IDs for your configurations from the response provided by the \"Get All SSO Integrations\" endpoint. -func (c *ApiService) GetSsoIntegration(params *GetSsoIntegrationParam) (interface{}, error) { - path := "/v3/sso/integrations/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Si != nil { - data.Set("si", fmt.Sprint(*params.Si)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SsoIntegration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 429 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/sso/api_list_sso_integration.go b/rest/api/v3/sso/api_list_sso_integration.go deleted file mode 100644 index 9e89db77..00000000 --- a/rest/api/v3/sso/api_list_sso_integration.go +++ /dev/null @@ -1,100 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" -) - -type ListSsoIntegrationParam struct { - // If this parameter is set to `true`, the response will include the `completed_integration` field. - Si *bool `json:"si,omitempty"` -} - -func (params *ListSsoIntegrationParam) SetSi(Si bool) *ListSsoIntegrationParam { - params.Si = &Si - return params -} - -// **This endpoint allows you to retrieve all SSO integrations tied to your Twilio SendGrid account.** The IDs returned by this endpoint can be used by the APIs additional endpoints to modify your SSO integrations. -func (c *ApiService) ListSsoIntegration(params *ListSsoIntegrationParam) (interface{}, error) { - path := "/v3/sso/integrations" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Si != nil { - data.Set("si", fmt.Sprint(*params.Si)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]SsoIntegration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 429 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/sso/api_list_sso_integration_certificate.go b/rest/api/v3/sso/api_list_sso_integration_certificate.go deleted file mode 100644 index 4086e929..00000000 --- a/rest/api/v3/sso/api_list_sso_integration_certificate.go +++ /dev/null @@ -1,100 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" - - "strings" -) - -type ListSsoIntegrationCertificateParam struct { - // An ID that matches a certificate to a specific IdP integration. - IntegrationId *string `json:"integration_id"` -} - -func (params *ListSsoIntegrationCertificateParam) SetIntegrationId(IntegrationId string) *ListSsoIntegrationCertificateParam { - params.IntegrationId = &IntegrationId - return params -} - -// **This endpoint allows you to retrieve all your IdP configurations by configuration ID.** The `integration_id` expected by this endpoint is the `id` returned in the response by the \"Get All SSO Integrations\" endpoint. -func (c *ApiService) ListSsoIntegrationCertificate(params *ListSsoIntegrationCertificateParam) (interface{}, error) { - path := "/v3/sso/integrations/{IntegrationId}/certificates" - if params != nil && params.IntegrationId != nil { - path = strings.Replace(path, "{"+"IntegrationId"+"}", *params.IntegrationId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]SsoCertificateBody{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 429 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/sso/api_service.go b/rest/api/v3/sso/api_service.go deleted file mode 100644 index 1564dab4..00000000 --- a/rest/api/v3/sso/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/sso/api_update_sso_certificate.go b/rest/api/v3/sso/api_update_sso_certificate.go deleted file mode 100644 index 58803890..00000000 --- a/rest/api/v3/sso/api_update_sso_certificate.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" - - "strings" -) - -type UpdateSsoCertificateParam struct { - // - CertId *string `json:"cert_id"` - // - UpdateSsoCertificateRequest *UpdateSsoCertificateRequest `json:"UpdateSsoCertificateRequest,omitempty"` -} - -func (params *UpdateSsoCertificateParam) SetCertId(CertId string) *UpdateSsoCertificateParam { - params.CertId = &CertId - return params -} -func (params *UpdateSsoCertificateParam) SetUpdateSsoCertificateRequest(UpdateSsoCertificateRequest UpdateSsoCertificateRequest) *UpdateSsoCertificateParam { - params.UpdateSsoCertificateRequest = &UpdateSsoCertificateRequest - return params -} - -// **This endpoint allows you to update an existing certificate by ID.** You can retrieve a certificate's ID from the response provided by the \"Get All SSO Integrations\" endpoint. -func (c *ApiService) UpdateSsoCertificate(params *UpdateSsoCertificateParam) (interface{}, error) { - path := "/v3/sso/certificates/{CertId}" - if params != nil && params.CertId != nil { - path = strings.Replace(path, "{"+"CertId"+"}", *params.CertId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateSsoCertificateRequest != nil { - b, err := json.Marshal(*params.UpdateSsoCertificateRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SsoCertificateBody{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 429 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/sso/api_update_sso_integration.go b/rest/api/v3/sso/api_update_sso_integration.go deleted file mode 100644 index 5a8f9639..00000000 --- a/rest/api/v3/sso/api_update_sso_integration.go +++ /dev/null @@ -1,125 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" - - "strings" -) - -type UpdateSsoIntegrationParam struct { - // - Id *string `json:"id"` - // If this parameter is set to `true`, the response will include the `completed_integration` field. - Si *bool `json:"si,omitempty"` - // - PostPatchIntegrationRequest *PostPatchIntegrationRequest `json:"PostPatchIntegrationRequest,omitempty"` -} - -func (params *UpdateSsoIntegrationParam) SetId(Id string) *UpdateSsoIntegrationParam { - params.Id = &Id - return params -} -func (params *UpdateSsoIntegrationParam) SetSi(Si bool) *UpdateSsoIntegrationParam { - params.Si = &Si - return params -} -func (params *UpdateSsoIntegrationParam) SetPostPatchIntegrationRequest(PostPatchIntegrationRequest PostPatchIntegrationRequest) *UpdateSsoIntegrationParam { - params.PostPatchIntegrationRequest = &PostPatchIntegrationRequest - return params -} - -// **This endpoint allows you to modify an exisiting SSO integration.** You can retrieve the IDs for your configurations from the response provided by the \"Get All SSO Integrations\" endpoint. -func (c *ApiService) UpdateSsoIntegration(params *UpdateSsoIntegrationParam) (interface{}, error) { - path := "/v3/sso/integrations/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - if params != nil && params.Si != nil { - data.Set("si", fmt.Sprint(*params.Si)) - } - body := []byte{} - if params != nil && params.PostPatchIntegrationRequest != nil { - b, err := json.Marshal(*params.PostPatchIntegrationRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SsoIntegration{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 429 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/sso/api_update_sso_teammate.go b/rest/api/v3/sso/api_update_sso_teammate.go deleted file mode 100644 index af816bea..00000000 --- a/rest/api/v3/sso/api_update_sso_teammate.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/url" - - "strings" -) - -type UpdateSsoTeammateParam struct { - // Set this parameter to the Teammate's email address. This address must be the same address assigned to the Teammate in your IdP. - Username *string `json:"username"` - // - Body *SsoTeammatesBaseRequestProps `json:"body,omitempty"` -} - -func (params *UpdateSsoTeammateParam) SetUsername(Username string) *UpdateSsoTeammateParam { - params.Username = &Username - return params -} -func (params *UpdateSsoTeammateParam) SetBody(Body SsoTeammatesBaseRequestProps) *UpdateSsoTeammateParam { - params.Body = &Body - return params -} - -// **This endpoint allows you to modify an existing SSO Teammate.** Only the parent user and Teammates with admin permissions can update another Teammate's permissions. ### Scopes When updating a Teammate, you will assign it permissions or scopes. These scopes determine which actions the Teammate can perform and which features they can access. Scopes are provided with one of three properties passed to this endpoint: `is_admin`, `scopes`, and `persona`. You can make a Teammate an administrator by setting `is_admin` to `true`. Administrators will have all scopes assigned to them. Alternatively, you can assign a `persona` to the teammate, which will assign them a block of permissions commonly required for that type of user. See the \"Persona scopes\" section of [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions#persona-scopes) for a list of permsissions granted by persona. Lastly, you can assign individual permissions with the `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of scopes that can be assigned to a Teammate. ### Subuser access SendGrid Teammates may be assigned access to one or more Subusers. Subusers function like SendGrid sub-accounts with their own resources. See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. When assigning Subuser access to a Teammate, you may set the `has_restricted_subuser_access` property to `true` to constrain the Teammate so that they can operate only on behalf of the Subusers to which they are assigned. You may further set the level of access the Teammate has to each Subuser with the `subuser_access` property. -func (c *ApiService) UpdateSsoTeammate(params *UpdateSsoTeammateParam) (interface{}, error) { - path := "/v3/sso/teammates/{Username}" - if params != nil && params.Username != nil { - path = strings.Replace(path, "{"+"Username"+"}", *params.Username, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.Body != nil { - b, err := json.Marshal(*params.Body) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &PatchSsoTeammates200{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 429 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &[]SsoErrorResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/sso/docs/CreateSsoCertificate.md b/rest/api/v3/sso/docs/CreateSsoCertificate.md deleted file mode 100644 index 0f1b57e1..00000000 --- a/rest/api/v3/sso/docs/CreateSsoCertificate.md +++ /dev/null @@ -1,48 +0,0 @@ -# CreateSsoCertificate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateSsoCertificate**](CreateSsoCertificate.md#CreateSsoCertificate) | **Post** /v3/sso/certificates | Create an SSO Certificate - - - -## CreateSsoCertificate - -> SsoCertificateBody CreateSsoCertificate(ctx, optional) - -Create an SSO Certificate - -**This endpoint allows you to create an SSO certificate.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateSsoCertificateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**CreateSsoCertificateRequest** | [**CreateSsoCertificateRequest**](CreateSsoCertificateRequest.md) | - -### Return type - -[**SsoCertificateBody**](SsoCertificateBody.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/sso/docs/CreateSsoCertificateRequest.md b/rest/api/v3/sso/docs/CreateSsoCertificateRequest.md deleted file mode 100644 index ff047454..00000000 --- a/rest/api/v3/sso/docs/CreateSsoCertificateRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateSsoCertificateRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**PublicCertificate** | **string** | This public certificate allows SendGrid to verify that SAML requests it receives are signed by an IdP that it recognizes. | -**Enabled** | **bool** | Indicates if the certificate is enabled. |[optional] -**IntegrationId** | **string** | An ID that matches a certificate to a specific IdP integration. This is the `id` returned by the \"Get All SSO Integrations\" endpoint. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/CreateSsoIntegration.md b/rest/api/v3/sso/docs/CreateSsoIntegration.md deleted file mode 100644 index cc6926e3..00000000 --- a/rest/api/v3/sso/docs/CreateSsoIntegration.md +++ /dev/null @@ -1,48 +0,0 @@ -# CreateSsoIntegration - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateSsoIntegration**](CreateSsoIntegration.md#CreateSsoIntegration) | **Post** /v3/sso/integrations | Create an SSO Integration - - - -## CreateSsoIntegration - -> SsoIntegration CreateSsoIntegration(ctx, optional) - -Create an SSO Integration - -**This endpoint allows you to create an SSO integration.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateSsoIntegrationParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**PostPatchIntegrationRequest** | [**PostPatchIntegrationRequest**](PostPatchIntegrationRequest.md) | - -### Return type - -[**SsoIntegration**](SsoIntegration.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/sso/docs/CreateSsoTeammate.md b/rest/api/v3/sso/docs/CreateSsoTeammate.md deleted file mode 100644 index 98907b69..00000000 --- a/rest/api/v3/sso/docs/CreateSsoTeammate.md +++ /dev/null @@ -1,48 +0,0 @@ -# CreateSsoTeammate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateSsoTeammate**](CreateSsoTeammate.md#CreateSsoTeammate) | **Post** /v3/sso/teammates | Create an SSO Teammate. - - - -## CreateSsoTeammate - -> PostSsoTeammates201 CreateSsoTeammate(ctx, optional) - -Create an SSO Teammate. - -**This endpoint allows you to create an SSO Teammate.** The email address provided for the Teammate will also function as the Teammate's username. Once created, the Teammate's email address cannot be changed. ### Scopes When creating a Teammate, you will assign it permissions or scopes. These scopes determine which actions the Teammate can perform and which features they can access. Scopes are provided with one of three properties passed to this endpoint: `is_admin`, `scopes`, and `persona`. You can make a Teammate an administrator by setting `is_admin` to `true`. Administrators will have all scopes assigned to them. Alternatively, you can assign a `persona` to the teammate, which will assign them a block of permissions commonly required for that type of user. See the \"Persona scopes\" section of [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions#persona-scopes) for a list of permsissions granted by persona. Lastly, you can assign individual permissions with the `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of scopes that can be assigned to a Teammate. ### Subuser access SendGrid Teammates may be assigned access to one or more Subusers. Subusers function like SendGrid sub-accounts with their own resources. See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. When assigning Subuser access to a Teammate, you may set the `has_restricted_subuser_access` property to `true` to constrain the Teammate so that they can operate only on behalf of the Subusers to which they are assigned. You may further set the level of access the Teammate has to each Subuser with the `subuser_access` property. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateSsoTeammateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**PostSsoTeammatesRequest** | [**PostSsoTeammatesRequest**](PostSsoTeammatesRequest.md) | - -### Return type - -[**PostSsoTeammates201**](PostSsoTeammates201.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/sso/docs/DeleteSsoCertificate.md b/rest/api/v3/sso/docs/DeleteSsoCertificate.md deleted file mode 100644 index 27eba6d0..00000000 --- a/rest/api/v3/sso/docs/DeleteSsoCertificate.md +++ /dev/null @@ -1,51 +0,0 @@ -# DeleteSsoCertificate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteSsoCertificate**](DeleteSsoCertificate.md#DeleteSsoCertificate) | **Delete** /v3/sso/certificates/{CertId} | Delete an SSO Certificate - - - -## DeleteSsoCertificate - -> SsoCertificateBody DeleteSsoCertificate(ctx, CertId) - -Delete an SSO Certificate - -**This endpoint allows you to delete an SSO certificate.** You can retrieve a certificate's ID from the response provided by the \"Get All SSO Integrations\" endpoint. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**CertId** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteSsoCertificateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**SsoCertificateBody**](SsoCertificateBody.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/sso/docs/DeleteSsoIntegration.md b/rest/api/v3/sso/docs/DeleteSsoIntegration.md deleted file mode 100644 index d9961b65..00000000 --- a/rest/api/v3/sso/docs/DeleteSsoIntegration.md +++ /dev/null @@ -1,51 +0,0 @@ -# DeleteSsoIntegration - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteSsoIntegration**](DeleteSsoIntegration.md#DeleteSsoIntegration) | **Delete** /v3/sso/integrations/{Id} | Delete an SSO Integration - - - -## DeleteSsoIntegration - -> DeleteSsoIntegration(ctx, Id) - -Delete an SSO Integration - -**This endpoint allows you to delete an IdP configuration by ID.** You can retrieve the IDs for your configurations from the response provided by the \"Get All SSO Integrations\" endpoint. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteSsoIntegrationParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/sso/docs/GetSsoCertificate.md b/rest/api/v3/sso/docs/GetSsoCertificate.md deleted file mode 100644 index e6ecfde7..00000000 --- a/rest/api/v3/sso/docs/GetSsoCertificate.md +++ /dev/null @@ -1,51 +0,0 @@ -# GetSsoCertificate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetSsoCertificate**](GetSsoCertificate.md#GetSsoCertificate) | **Get** /v3/sso/certificates/{CertId} | Get an SSO Certificate - - - -## GetSsoCertificate - -> SsoCertificateBody GetSsoCertificate(ctx, CertId) - -Get an SSO Certificate - -**This endpoint allows you to retrieve an individual SSO certificate.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**CertId** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a GetSsoCertificateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**SsoCertificateBody**](SsoCertificateBody.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/sso/docs/GetSsoIntegration.md b/rest/api/v3/sso/docs/GetSsoIntegration.md deleted file mode 100644 index ea49cd71..00000000 --- a/rest/api/v3/sso/docs/GetSsoIntegration.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetSsoIntegration - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetSsoIntegration**](GetSsoIntegration.md#GetSsoIntegration) | **Get** /v3/sso/integrations/{Id} | Get an SSO Integration - - - -## GetSsoIntegration - -> SsoIntegration GetSsoIntegration(ctx, Idoptional) - -Get an SSO Integration - -**This endpoint allows you to retrieve an SSO integration by ID.** You can retrieve the IDs for your configurations from the response provided by the \"Get All SSO Integrations\" endpoint. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a GetSsoIntegrationParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Si** | **bool** | If this parameter is set to `true`, the response will include the `completed_integration` field. - -### Return type - -[**SsoIntegration**](SsoIntegration.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/sso/docs/ListSsoIntegration.md b/rest/api/v3/sso/docs/ListSsoIntegration.md deleted file mode 100644 index 8082cbe7..00000000 --- a/rest/api/v3/sso/docs/ListSsoIntegration.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListSsoIntegration - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListSsoIntegration**](ListSsoIntegration.md#ListSsoIntegration) | **Get** /v3/sso/integrations | Get All SSO Integrations - - - -## ListSsoIntegration - -> []SsoIntegration ListSsoIntegration(ctx, optional) - -Get All SSO Integrations - -**This endpoint allows you to retrieve all SSO integrations tied to your Twilio SendGrid account.** The IDs returned by this endpoint can be used by the APIs additional endpoints to modify your SSO integrations. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListSsoIntegrationParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Si** | **bool** | If this parameter is set to `true`, the response will include the `completed_integration` field. - -### Return type - -[**[]SsoIntegration**](SsoIntegration.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/sso/docs/ListSsoIntegrationCertificate.md b/rest/api/v3/sso/docs/ListSsoIntegrationCertificate.md deleted file mode 100644 index 526ad85d..00000000 --- a/rest/api/v3/sso/docs/ListSsoIntegrationCertificate.md +++ /dev/null @@ -1,51 +0,0 @@ -# ListSsoIntegrationCertificate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListSsoIntegrationCertificate**](ListSsoIntegrationCertificate.md#ListSsoIntegrationCertificate) | **Get** /v3/sso/integrations/{IntegrationId}/certificates | Get All SSO Certificates by Integration - - - -## ListSsoIntegrationCertificate - -> []SsoCertificateBody ListSsoIntegrationCertificate(ctx, IntegrationId) - -Get All SSO Certificates by Integration - -**This endpoint allows you to retrieve all your IdP configurations by configuration ID.** The `integration_id` expected by this endpoint is the `id` returned in the response by the \"Get All SSO Integrations\" endpoint. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**IntegrationId** | **string** | An ID that matches a certificate to a specific IdP integration. - -### Other Parameters - -Other parameters are passed through a pointer to a ListSsoIntegrationCertificateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**[]SsoCertificateBody**](SsoCertificateBody.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/sso/docs/PatchSsoTeammates200.md b/rest/api/v3/sso/docs/PatchSsoTeammates200.md deleted file mode 100644 index b1b277d5..00000000 --- a/rest/api/v3/sso/docs/PatchSsoTeammates200.md +++ /dev/null @@ -1,29 +0,0 @@ -# PatchSsoTeammates200 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Address** | **string** | The Teammate's street address. |[optional] -**Address2** | **string** | The Teammate's apartment number, suite number, or other secondary address information that is not part of the physical street address. |[optional] -**City** | **string** | The Teammate's city. |[optional] -**Company** | **string** | The Teammate's company name. |[optional] -**Country** | **string** | The Teammate's country of residence. |[optional] -**Username** | **string** | The Teammate's username. This property is set to the Teammate's email address. |[optional] -**Phone** | **string** | The Teammate's phone number. |[optional] -**State** | **string** | The Teammate's state or province. |[optional] -**UserType** | [**UserType**](UserType.md) | A Teammate can be an `admin`, `owner`, or `teammate`. Each role is associated with the scope of the Teammate's permissions. |[optional] -**Website** | **string** | A website associated with the Teammate. |[optional] -**Zip** | **string** | The Teammate's zip code. |[optional] -**FirstName** | **string** | The Teammate's first name. |[optional] -**LastName** | **string** | The Teammate's last name. |[optional] -**Email** | **string** | Teammate's email address. This email address also functions as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. |[optional] -**IsAdmin** | **bool** | Indicates if the Teammate has administrator permissions. When set to `true`, the Teammate is an admin. |[optional] -**IsSso** | **bool** | Indicates how the Teammate authenticates with SendGrid. When set to `true`, the Teammate will access SendGrid via SSO and their IdP. When set to `false`, the Teammate will authenticate directly with SendGrid via a username and password. |[optional] -**Scopes** | **[]string** | The permissions or scopes currently assigned to the Teammate. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. |[optional] -**HasRestrictedSubuserAccess** | **bool** | When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. |[optional] -**SubuserAccess** | [**[]SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner**](SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md) | Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/PermissionType.md b/rest/api/v3/sso/docs/PermissionType.md deleted file mode 100644 index da44f853..00000000 --- a/rest/api/v3/sso/docs/PermissionType.md +++ /dev/null @@ -1,13 +0,0 @@ -# PermissionType - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**ADMIN** | string | (value: `"admin"`) -**RESTRICTED** | string | (value: `"restricted"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/PermissionType1.md b/rest/api/v3/sso/docs/PermissionType1.md deleted file mode 100644 index 5fa3bbb8..00000000 --- a/rest/api/v3/sso/docs/PermissionType1.md +++ /dev/null @@ -1,13 +0,0 @@ -# PermissionType1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**ADMIN** | string | (value: `"admin"`) -**RESTRICTED** | string | (value: `"restricted"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/Persona.md b/rest/api/v3/sso/docs/Persona.md deleted file mode 100644 index a422b3d2..00000000 --- a/rest/api/v3/sso/docs/Persona.md +++ /dev/null @@ -1,15 +0,0 @@ -# Persona - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**ACCOUNTANT** | string | (value: `"accountant"`) -**DEVELOPER** | string | (value: `"developer"`) -**MARKETER** | string | (value: `"marketer"`) -**OBSERVER** | string | (value: `"observer"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/PostPatchIntegrationRequest.md b/rest/api/v3/sso/docs/PostPatchIntegrationRequest.md deleted file mode 100644 index 813db37b..00000000 --- a/rest/api/v3/sso/docs/PostPatchIntegrationRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# PostPatchIntegrationRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of your integration. This name can be anything that makes sense for your organization (eg. Twilio SendGrid) | -**Enabled** | **bool** | Indicates if the integration is enabled. | -**SigninUrl** | **string** | The IdP's SAML POST endpoint. This endpoint should receive requests and initiate an SSO login flow. This is called the \"Embed Link\" in the Twilio SendGrid UI. | -**SignoutUrl** | **string** | This URL is relevant only for an IdP-initiated authentication flow. If a user authenticates from their IdP, this URL will return them to their IdP when logging out. | -**EntityId** | **string** | An identifier provided by your IdP to identify Twilio SendGrid in the SAML interaction. This is called the \"SAML Issuer ID\" in the Twilio SendGrid UI. | -**CompletedIntegration** | **bool** | Indicates if the integration is complete. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/PostSsoTeammates201.md b/rest/api/v3/sso/docs/PostSsoTeammates201.md deleted file mode 100644 index 90d13d83..00000000 --- a/rest/api/v3/sso/docs/PostSsoTeammates201.md +++ /dev/null @@ -1,18 +0,0 @@ -# PostSsoTeammates201 - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FirstName** | **string** | The Teammate's first name. |[optional] -**LastName** | **string** | The Teammate's last name. |[optional] -**Email** | **string** | Teammate's email address. This email address also functions as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. |[optional] -**IsAdmin** | **bool** | Indicates if the Teammate has administrator permissions. When set to `true`, the Teammate is an admin. |[optional] -**IsSso** | **bool** | Indicates how the Teammate authenticates with SendGrid. When set to `true`, the Teammate will access SendGrid via SSO and their IdP. When set to `false`, the Teammate will authenticate directly with SendGrid via a username and password. |[optional] -**Scopes** | **[]string** | The permissions or scopes currently assigned to the Teammate. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. |[optional] -**HasRestrictedSubuserAccess** | **bool** | When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. |[optional] -**SubuserAccess** | [**[]SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner**](SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md) | Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/PostSsoTeammatesRequest.md b/rest/api/v3/sso/docs/PostSsoTeammatesRequest.md deleted file mode 100644 index ef110ee3..00000000 --- a/rest/api/v3/sso/docs/PostSsoTeammatesRequest.md +++ /dev/null @@ -1,18 +0,0 @@ -# PostSsoTeammatesRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | **string** | Set this property to the Teammate's email address. This email address will also function as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. | -**FirstName** | **string** | Set this property to the Teammate's first name. | -**LastName** | **string** | Set this property to the Teammate's last name. | -**IsAdmin** | **bool** | Set this property to `true` if the Teammate has admin permissions. You should not include the `scopes` or `persona` properties when setting the `is_admin` property to `true`—an admin will be allocated all scopes. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of scopes. |[optional] -**Persona** | [**Persona**](Persona.md) | A persona represents a group of permissions often required by a type of Teammate such as a developer or marketer. Assigning a persona allows you to allocate a group of pre-defined permissions rather than assigning each scope individually. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of the scopes assigned to each persona. |[optional] -**Scopes** | **[]string** | Add or remove permissions from a Teammate using this `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this propety in the request when using the `persona` property or when setting the `is_admin` property to `true`—assigning a `persona` or setting `is_admin` to `true` will allocate a group of permissions to the Teammate. |[optional] -**HasRestrictedSubuserAccess** | **bool** | Set this property to `true` to give the Teammate permissions to operate only on behalf of a Subuser. This property value must be `true` if the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. If this property is set to `true`, you cannot specify individual `scopes`, assign a `persona`, or set `is_admin` to `true`—a Teammate cannot specify scopes for the parent account and have restricted Subuser access. |[optional] -**SubuserAccess** | [**[]SsoTeammatesBaseRequestPropsSubuserAccessInner**](SsoTeammatesBaseRequestPropsSubuserAccessInner.md) | Specify which Subusers the Teammate may access and act on behalf of with this property. If this property is populated, you must set the `has_restricted_subuser_access` property to `true`. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/SsoCertificateBody.md b/rest/api/v3/sso/docs/SsoCertificateBody.md deleted file mode 100644 index 68cb6289..00000000 --- a/rest/api/v3/sso/docs/SsoCertificateBody.md +++ /dev/null @@ -1,15 +0,0 @@ -# SsoCertificateBody - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**PublicCertificate** | **string** | This certificate is used by Twilio SendGrid to verify that SAML requests are coming from Okta. This is called the X509 certificate in the Twilio SendGrid UI. |[optional] -**Id** | **float32** | A unique ID assigned to the certificate by SendGrid. |[optional] -**NotBefore** | **float32** | A unix timestamp (e.g., 1603915954) that indicates the time before which the certificate is not valid. |[optional] -**NotAfter** | **float32** | A unix timestamp (e.g., 1603915954) that indicates the time after which the certificate is no longer valid. |[optional] -**IntergrationId** | **string** | An ID that matches a certificate to a specific IdP integration. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/SsoErrorResponseInner.md b/rest/api/v3/sso/docs/SsoErrorResponseInner.md deleted file mode 100644 index df959452..00000000 --- a/rest/api/v3/sso/docs/SsoErrorResponseInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# SsoErrorResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | |[optional] -**Field** | **string** | |[optional] -**ErrorId** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/SsoIntegration.md b/rest/api/v3/sso/docs/SsoIntegration.md deleted file mode 100644 index aa5f45f8..00000000 --- a/rest/api/v3/sso/docs/SsoIntegration.md +++ /dev/null @@ -1,20 +0,0 @@ -# SsoIntegration - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of your integration. This name can be anything that makes sense for your organization (eg. Twilio SendGrid) | -**Enabled** | **bool** | Indicates if the integration is enabled. | -**SigninUrl** | **string** | The IdP's SAML POST endpoint. This endpoint should receive requests and initiate an SSO login flow. This is called the \"Embed Link\" in the Twilio SendGrid UI. | -**SignoutUrl** | **string** | This URL is relevant only for an IdP-initiated authentication flow. If a user authenticates from their IdP, this URL will return them to their IdP when logging out. | -**EntityId** | **string** | An identifier provided by your IdP to identify Twilio SendGrid in the SAML interaction. This is called the \"SAML Issuer ID\" in the Twilio SendGrid UI. | -**CompletedIntegration** | **bool** | Indicates if the integration is complete. |[optional] -**LastUpdated** | **float32** | A timestamp representing the last time the configuration was modified. | -**Id** | **string** | A unique ID assigned to the configuration by SendGrid. |[optional] -**SingleSignonUrl** | **string** | The URL where your IdP should POST its SAML response. This is the Twilio SendGrid URL that is responsible for receiving and parsing a SAML assertion. This is the same URL as the Audience URL when using SendGrid. |[optional] -**AudienceUrl** | **string** | The URL where your IdP should POST its SAML response. This is the Twilio SendGrid URL that is responsible for receiving and parsing a SAML assertion. This is the same URL as the Single Sign-On URL when using SendGrid. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/SsoTeammatesBaseRequestProps.md b/rest/api/v3/sso/docs/SsoTeammatesBaseRequestProps.md deleted file mode 100644 index fcededd9..00000000 --- a/rest/api/v3/sso/docs/SsoTeammatesBaseRequestProps.md +++ /dev/null @@ -1,17 +0,0 @@ -# SsoTeammatesBaseRequestProps - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FirstName** | **string** | Set this property to the Teammate's first name. | -**LastName** | **string** | Set this property to the Teammate's last name. | -**IsAdmin** | **bool** | Set this property to `true` if the Teammate has admin permissions. You should not include the `scopes` or `persona` properties when setting the `is_admin` property to `true`—an admin will be allocated all scopes. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of scopes. |[optional] -**Persona** | [**Persona**](Persona.md) | A persona represents a group of permissions often required by a type of Teammate such as a developer or marketer. Assigning a persona allows you to allocate a group of pre-defined permissions rather than assigning each scope individually. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of the scopes assigned to each persona. |[optional] -**Scopes** | **[]string** | Add or remove permissions from a Teammate using this `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this propety in the request when using the `persona` property or when setting the `is_admin` property to `true`—assigning a `persona` or setting `is_admin` to `true` will allocate a group of permissions to the Teammate. |[optional] -**HasRestrictedSubuserAccess** | **bool** | Set this property to `true` to give the Teammate permissions to operate only on behalf of a Subuser. This property value must be `true` if the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. If this property is set to `true`, you cannot specify individual `scopes`, assign a `persona`, or set `is_admin` to `true`—a Teammate cannot specify scopes for the parent account and have restricted Subuser access. |[optional] -**SubuserAccess** | [**[]SsoTeammatesBaseRequestPropsSubuserAccessInner**](SsoTeammatesBaseRequestPropsSubuserAccessInner.md) | Specify which Subusers the Teammate may access and act on behalf of with this property. If this property is populated, you must set the `has_restricted_subuser_access` property to `true`. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/SsoTeammatesBaseRequestPropsSubuserAccessInner.md b/rest/api/v3/sso/docs/SsoTeammatesBaseRequestPropsSubuserAccessInner.md deleted file mode 100644 index 80c452b4..00000000 --- a/rest/api/v3/sso/docs/SsoTeammatesBaseRequestPropsSubuserAccessInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# SsoTeammatesBaseRequestPropsSubuserAccessInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int32** | Set this property to the ID of a Subuser to which the Teammate should have access. You can retrieve Subuser IDs from the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/). | -**PermissionType** | [**PermissionType**](PermissionType.md) | Grant the level of access the Teammate should have to the specified Subuser with this property. This property value may be either `admin` or `restricted`. When set to `restricted`, the Teammate has only the permissions assigned in the `scopes` property. | -**Scopes** | **[]string** | Add or remove permissions that the Teammate can access on behalf of the Subuser. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this property in the request when the `permission_type` property is set to `admin`—administrators have full access to the specified Subuser. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/SsoTeammatesBaseResponseProps.md b/rest/api/v3/sso/docs/SsoTeammatesBaseResponseProps.md deleted file mode 100644 index a2de9c35..00000000 --- a/rest/api/v3/sso/docs/SsoTeammatesBaseResponseProps.md +++ /dev/null @@ -1,16 +0,0 @@ -# SsoTeammatesBaseResponseProps - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FirstName** | **string** | The Teammate's first name. |[optional] -**LastName** | **string** | The Teammate's last name. |[optional] -**Email** | **string** | Teammate's email address. This email address also functions as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. |[optional] -**IsAdmin** | **bool** | Indicates if the Teammate has administrator permissions. When set to `true`, the Teammate is an admin. |[optional] -**IsSso** | **bool** | Indicates how the Teammate authenticates with SendGrid. When set to `true`, the Teammate will access SendGrid via SSO and their IdP. When set to `false`, the Teammate will authenticate directly with SendGrid via a username and password. |[optional] -**Scopes** | **[]string** | The permissions or scopes currently assigned to the Teammate. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponseProps.md b/rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponseProps.md deleted file mode 100644 index a22ffc8f..00000000 --- a/rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponseProps.md +++ /dev/null @@ -1,12 +0,0 @@ -# SsoTeammatesRestrictedSubuserResponseProps - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**HasRestrictedSubuserAccess** | **bool** | When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. |[optional] -**SubuserAccess** | [**[]SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner**](SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md) | Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md b/rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md deleted file mode 100644 index c7c93940..00000000 --- a/rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md +++ /dev/null @@ -1,16 +0,0 @@ -# SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int32** | The ID of a Subuser to which the Teammate has access. You can retrieve Subuser IDs from the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/). |[optional] -**Username** | **string** | The username of a Subuser to which the Teammate has access. |[optional] -**Email** | **string** | The email address of a Subuser to which the Teammate has access. |[optional] -**Disabled** | **bool** | Indicates if the Subuser is active for the SendGrid account. |[optional] -**PermissionType** | [**PermissionType1**](PermissionType1.md) | The level of access the Teammate has to the specified Subuser. This property value may be either `admin` or `restricted`. When is property is set to `restricted`, the Teammate has only the permissions assigned in the `scopes` property. |[optional] -**Scopes** | **[]string** | The permissions or scopes that the Teammate can access on behalf of the Subuser. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/UpdateSsoCertificate.md b/rest/api/v3/sso/docs/UpdateSsoCertificate.md deleted file mode 100644 index 0873a139..00000000 --- a/rest/api/v3/sso/docs/UpdateSsoCertificate.md +++ /dev/null @@ -1,52 +0,0 @@ -# UpdateSsoCertificate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateSsoCertificate**](UpdateSsoCertificate.md#UpdateSsoCertificate) | **Patch** /v3/sso/certificates/{CertId} | Update SSO Certificate - - - -## UpdateSsoCertificate - -> SsoCertificateBody UpdateSsoCertificate(ctx, CertIdoptional) - -Update SSO Certificate - -**This endpoint allows you to update an existing certificate by ID.** You can retrieve a certificate's ID from the response provided by the \"Get All SSO Integrations\" endpoint. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**CertId** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateSsoCertificateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**UpdateSsoCertificateRequest** | [**UpdateSsoCertificateRequest**](UpdateSsoCertificateRequest.md) | - -### Return type - -[**SsoCertificateBody**](SsoCertificateBody.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/sso/docs/UpdateSsoCertificateRequest.md b/rest/api/v3/sso/docs/UpdateSsoCertificateRequest.md deleted file mode 100644 index 6155b47c..00000000 --- a/rest/api/v3/sso/docs/UpdateSsoCertificateRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# UpdateSsoCertificateRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**PublicCertificate** | **string** | This public certificate allows SendGrid to verify that SAML requests it receives are signed by an IdP that it recognizes. |[optional] -**Enabled** | **bool** | Indicates whether or not the certificate is enabled. |[optional] -**IntegrationId** | **string** | An ID that matches a certificate to a specific IdP integration. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/docs/UpdateSsoIntegration.md b/rest/api/v3/sso/docs/UpdateSsoIntegration.md deleted file mode 100644 index c6e31fe7..00000000 --- a/rest/api/v3/sso/docs/UpdateSsoIntegration.md +++ /dev/null @@ -1,53 +0,0 @@ -# UpdateSsoIntegration - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateSsoIntegration**](UpdateSsoIntegration.md#UpdateSsoIntegration) | **Patch** /v3/sso/integrations/{Id} | Update an SSO Integration - - - -## UpdateSsoIntegration - -> SsoIntegration UpdateSsoIntegration(ctx, Idoptional) - -Update an SSO Integration - -**This endpoint allows you to modify an exisiting SSO integration.** You can retrieve the IDs for your configurations from the response provided by the \"Get All SSO Integrations\" endpoint. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateSsoIntegrationParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Si** | **bool** | If this parameter is set to `true`, the response will include the `completed_integration` field. -**PostPatchIntegrationRequest** | [**PostPatchIntegrationRequest**](PostPatchIntegrationRequest.md) | - -### Return type - -[**SsoIntegration**](SsoIntegration.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/sso/docs/UpdateSsoTeammate.md b/rest/api/v3/sso/docs/UpdateSsoTeammate.md deleted file mode 100644 index cc802214..00000000 --- a/rest/api/v3/sso/docs/UpdateSsoTeammate.md +++ /dev/null @@ -1,52 +0,0 @@ -# UpdateSsoTeammate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateSsoTeammate**](UpdateSsoTeammate.md#UpdateSsoTeammate) | **Patch** /v3/sso/teammates/{Username} | Edit an SSO Teammate - - - -## UpdateSsoTeammate - -> PatchSsoTeammates200 UpdateSsoTeammate(ctx, Usernameoptional) - -Edit an SSO Teammate - -**This endpoint allows you to modify an existing SSO Teammate.** Only the parent user and Teammates with admin permissions can update another Teammate's permissions. ### Scopes When updating a Teammate, you will assign it permissions or scopes. These scopes determine which actions the Teammate can perform and which features they can access. Scopes are provided with one of three properties passed to this endpoint: `is_admin`, `scopes`, and `persona`. You can make a Teammate an administrator by setting `is_admin` to `true`. Administrators will have all scopes assigned to them. Alternatively, you can assign a `persona` to the teammate, which will assign them a block of permissions commonly required for that type of user. See the \"Persona scopes\" section of [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions#persona-scopes) for a list of permsissions granted by persona. Lastly, you can assign individual permissions with the `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of scopes that can be assigned to a Teammate. ### Subuser access SendGrid Teammates may be assigned access to one or more Subusers. Subusers function like SendGrid sub-accounts with their own resources. See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. When assigning Subuser access to a Teammate, you may set the `has_restricted_subuser_access` property to `true` to constrain the Teammate so that they can operate only on behalf of the Subusers to which they are assigned. You may further set the level of access the Teammate has to each Subuser with the `subuser_access` property. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Username** | **string** | Set this parameter to the Teammate's email address. This address must be the same address assigned to the Teammate in your IdP. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateSsoTeammateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Body** | **SsoTeammatesBaseRequestProps** | - -### Return type - -[**PatchSsoTeammates200**](PatchSsoTeammates200.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/sso/docs/UserType.md b/rest/api/v3/sso/docs/UserType.md deleted file mode 100644 index f9f8db1d..00000000 --- a/rest/api/v3/sso/docs/UserType.md +++ /dev/null @@ -1,14 +0,0 @@ -# UserType - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**ADMIN** | string | (value: `"admin"`) -**OWNER** | string | (value: `"owner"`) -**TEAMMATE** | string | (value: `"teammate"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/sso/model_create_sso_certificate_request.go b/rest/api/v3/sso/model_create_sso_certificate_request.go deleted file mode 100644 index da1fc7ba..00000000 --- a/rest/api/v3/sso/model_create_sso_certificate_request.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateSsoCertificateRequest -type CreateSsoCertificateRequest struct { - // This public certificate allows SendGrid to verify that SAML requests it receives are signed by an IdP that it recognizes. - PublicCertificate string `json:"public_certificate"` - // Indicates if the certificate is enabled. - Enabled *bool `json:"enabled,omitempty"` - // An ID that matches a certificate to a specific IdP integration. This is the `id` returned by the \"Get All SSO Integrations\" endpoint. - IntegrationId string `json:"integration_id"` -} diff --git a/rest/api/v3/sso/model_patch_sso_teammates200.go b/rest/api/v3/sso/model_patch_sso_teammates200.go deleted file mode 100644 index 0031305b..00000000 --- a/rest/api/v3/sso/model_patch_sso_teammates200.go +++ /dev/null @@ -1,56 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// PatchSsoTeammates200 Successful SSO Teammates PATCH response. -type PatchSsoTeammates200 struct { - // The Teammate's street address. - Address *string `json:"address,omitempty"` - // The Teammate's apartment number, suite number, or other secondary address information that is not part of the physical street address. - Address2 *string `json:"address2,omitempty"` - // The Teammate's city. - City *string `json:"city,omitempty"` - // The Teammate's company name. - Company *string `json:"company,omitempty"` - // The Teammate's country of residence. - Country *string `json:"country,omitempty"` - // The Teammate's username. This property is set to the Teammate's email address. - Username *string `json:"username,omitempty"` - // The Teammate's phone number. - Phone *string `json:"phone,omitempty"` - // The Teammate's state or province. - State *string `json:"state,omitempty"` - // A Teammate can be an `admin`, `owner`, or `teammate`. Each role is associated with the scope of the Teammate's permissions. - UserType *UserType `json:"user_type,omitempty"` - // A website associated with the Teammate. - Website *string `json:"website,omitempty"` - // The Teammate's zip code. - Zip *string `json:"zip,omitempty"` - // The Teammate's first name. - FirstName *string `json:"first_name,omitempty"` - // The Teammate's last name. - LastName *string `json:"last_name,omitempty"` - // Teammate's email address. This email address also functions as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. - Email *string `json:"email,omitempty"` - // Indicates if the Teammate has administrator permissions. When set to `true`, the Teammate is an admin. - IsAdmin *bool `json:"is_admin,omitempty"` - // Indicates how the Teammate authenticates with SendGrid. When set to `true`, the Teammate will access SendGrid via SSO and their IdP. When set to `false`, the Teammate will authenticate directly with SendGrid via a username and password. - IsSso *bool `json:"is_sso,omitempty"` - // The permissions or scopes currently assigned to the Teammate. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. - Scopes *[]string `json:"scopes,omitempty"` - // When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. - HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"` - // Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. - SubuserAccess *[]SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner `json:"subuser_access,omitempty"` -} diff --git a/rest/api/v3/sso/model_permission_type.go b/rest/api/v3/sso/model_permission_type.go deleted file mode 100644 index c496f95f..00000000 --- a/rest/api/v3/sso/model_permission_type.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// PermissionType the model 'PermissionType' -type PermissionType string - -// List of PermissionType -const ( - PERMISSIONTYPE_ADMIN PermissionType = "admin" - PERMISSIONTYPE_RESTRICTED PermissionType = "restricted" -) diff --git a/rest/api/v3/sso/model_permission_type1.go b/rest/api/v3/sso/model_permission_type1.go deleted file mode 100644 index 03271a27..00000000 --- a/rest/api/v3/sso/model_permission_type1.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// PermissionType1 the model 'PermissionType1' -type PermissionType1 string - -// List of PermissionType1 -const ( - PERMISSIONTYPE1_ADMIN PermissionType1 = "admin" - PERMISSIONTYPE1_RESTRICTED PermissionType1 = "restricted" -) diff --git a/rest/api/v3/sso/model_persona.go b/rest/api/v3/sso/model_persona.go deleted file mode 100644 index bbd9d832..00000000 --- a/rest/api/v3/sso/model_persona.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Persona the model 'Persona' -type Persona string - -// List of Persona -const ( - PERSONA_ACCOUNTANT Persona = "accountant" - PERSONA_DEVELOPER Persona = "developer" - PERSONA_MARKETER Persona = "marketer" - PERSONA_OBSERVER Persona = "observer" -) diff --git a/rest/api/v3/sso/model_post_patch_integration_request.go b/rest/api/v3/sso/model_post_patch_integration_request.go deleted file mode 100644 index 6cdedd95..00000000 --- a/rest/api/v3/sso/model_post_patch_integration_request.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// PostPatchIntegrationRequest struct for PostPatchIntegrationRequest -type PostPatchIntegrationRequest struct { - // The name of your integration. This name can be anything that makes sense for your organization (eg. Twilio SendGrid) - Name string `json:"name"` - // Indicates if the integration is enabled. - Enabled bool `json:"enabled"` - // The IdP's SAML POST endpoint. This endpoint should receive requests and initiate an SSO login flow. This is called the \"Embed Link\" in the Twilio SendGrid UI. - SigninUrl string `json:"signin_url"` - // This URL is relevant only for an IdP-initiated authentication flow. If a user authenticates from their IdP, this URL will return them to their IdP when logging out. - SignoutUrl string `json:"signout_url"` - // An identifier provided by your IdP to identify Twilio SendGrid in the SAML interaction. This is called the \"SAML Issuer ID\" in the Twilio SendGrid UI. - EntityId string `json:"entity_id"` - // Indicates if the integration is complete. - CompletedIntegration *bool `json:"completed_integration,omitempty"` -} diff --git a/rest/api/v3/sso/model_post_sso_teammates201.go b/rest/api/v3/sso/model_post_sso_teammates201.go deleted file mode 100644 index 5863ff95..00000000 --- a/rest/api/v3/sso/model_post_sso_teammates201.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// PostSsoTeammates201 Successful SSO Teammates POST Response. -type PostSsoTeammates201 struct { - // The Teammate's first name. - FirstName *string `json:"first_name,omitempty"` - // The Teammate's last name. - LastName *string `json:"last_name,omitempty"` - // Teammate's email address. This email address also functions as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. - Email *string `json:"email,omitempty"` - // Indicates if the Teammate has administrator permissions. When set to `true`, the Teammate is an admin. - IsAdmin *bool `json:"is_admin,omitempty"` - // Indicates how the Teammate authenticates with SendGrid. When set to `true`, the Teammate will access SendGrid via SSO and their IdP. When set to `false`, the Teammate will authenticate directly with SendGrid via a username and password. - IsSso *bool `json:"is_sso,omitempty"` - // The permissions or scopes currently assigned to the Teammate. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. - Scopes *[]string `json:"scopes,omitempty"` - // When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. - HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"` - // Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. - SubuserAccess *[]SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner `json:"subuser_access,omitempty"` -} diff --git a/rest/api/v3/sso/model_post_sso_teammates_request.go b/rest/api/v3/sso/model_post_sso_teammates_request.go deleted file mode 100644 index 5f4e5543..00000000 --- a/rest/api/v3/sso/model_post_sso_teammates_request.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// PostSsoTeammatesRequest struct for PostSsoTeammatesRequest -type PostSsoTeammatesRequest struct { - // Set this property to the Teammate's email address. This email address will also function as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. - Email string `json:"email"` - // Set this property to the Teammate's first name. - FirstName string `json:"first_name"` - // Set this property to the Teammate's last name. - LastName string `json:"last_name"` - // Set this property to `true` if the Teammate has admin permissions. You should not include the `scopes` or `persona` properties when setting the `is_admin` property to `true`—an admin will be allocated all scopes. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of scopes. - IsAdmin *bool `json:"is_admin,omitempty"` - // A persona represents a group of permissions often required by a type of Teammate such as a developer or marketer. Assigning a persona allows you to allocate a group of pre-defined permissions rather than assigning each scope individually. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of the scopes assigned to each persona. - Persona *Persona `json:"persona,omitempty"` - // Add or remove permissions from a Teammate using this `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this propety in the request when using the `persona` property or when setting the `is_admin` property to `true`—assigning a `persona` or setting `is_admin` to `true` will allocate a group of permissions to the Teammate. - Scopes *[]string `json:"scopes,omitempty"` - // Set this property to `true` to give the Teammate permissions to operate only on behalf of a Subuser. This property value must be `true` if the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. If this property is set to `true`, you cannot specify individual `scopes`, assign a `persona`, or set `is_admin` to `true`—a Teammate cannot specify scopes for the parent account and have restricted Subuser access. - HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"` - // Specify which Subusers the Teammate may access and act on behalf of with this property. If this property is populated, you must set the `has_restricted_subuser_access` property to `true`. - SubuserAccess *[]SsoTeammatesBaseRequestPropsSubuserAccessInner `json:"subuser_access,omitempty"` -} diff --git a/rest/api/v3/sso/model_sso_certificate_body.go b/rest/api/v3/sso/model_sso_certificate_body.go deleted file mode 100644 index 1a001b81..00000000 --- a/rest/api/v3/sso/model_sso_certificate_body.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SsoCertificateBody struct for SsoCertificateBody -type SsoCertificateBody struct { - // This certificate is used by Twilio SendGrid to verify that SAML requests are coming from Okta. This is called the X509 certificate in the Twilio SendGrid UI. - PublicCertificate *string `json:"public_certificate,omitempty"` - // A unique ID assigned to the certificate by SendGrid. - Id *float32 `json:"id,omitempty"` - // A unix timestamp (e.g., 1603915954) that indicates the time before which the certificate is not valid. - NotBefore *float32 `json:"not_before,omitempty"` - // A unix timestamp (e.g., 1603915954) that indicates the time after which the certificate is no longer valid. - NotAfter *float32 `json:"not_after,omitempty"` - // An ID that matches a certificate to a specific IdP integration. - IntergrationId *string `json:"intergration_id,omitempty"` -} diff --git a/rest/api/v3/sso/model_sso_error_response_inner.go b/rest/api/v3/sso/model_sso_error_response_inner.go deleted file mode 100644 index 17711b3d..00000000 --- a/rest/api/v3/sso/model_sso_error_response_inner.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SsoErrorResponseInner struct for SsoErrorResponseInner -type SsoErrorResponseInner struct { - Message *string `json:"message,omitempty"` - Field *string `json:"field,omitempty"` - ErrorId *string `json:"error_id,omitempty"` -} diff --git a/rest/api/v3/sso/model_sso_integration.go b/rest/api/v3/sso/model_sso_integration.go deleted file mode 100644 index 888e08da..00000000 --- a/rest/api/v3/sso/model_sso_integration.go +++ /dev/null @@ -1,38 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SsoIntegration struct for SsoIntegration -type SsoIntegration struct { - // The name of your integration. This name can be anything that makes sense for your organization (eg. Twilio SendGrid) - Name string `json:"name"` - // Indicates if the integration is enabled. - Enabled bool `json:"enabled"` - // The IdP's SAML POST endpoint. This endpoint should receive requests and initiate an SSO login flow. This is called the \"Embed Link\" in the Twilio SendGrid UI. - SigninUrl string `json:"signin_url"` - // This URL is relevant only for an IdP-initiated authentication flow. If a user authenticates from their IdP, this URL will return them to their IdP when logging out. - SignoutUrl string `json:"signout_url"` - // An identifier provided by your IdP to identify Twilio SendGrid in the SAML interaction. This is called the \"SAML Issuer ID\" in the Twilio SendGrid UI. - EntityId string `json:"entity_id"` - // Indicates if the integration is complete. - CompletedIntegration *bool `json:"completed_integration,omitempty"` - // A timestamp representing the last time the configuration was modified. - LastUpdated float32 `json:"last_updated"` - // A unique ID assigned to the configuration by SendGrid. - Id *string `json:"id,omitempty"` - // The URL where your IdP should POST its SAML response. This is the Twilio SendGrid URL that is responsible for receiving and parsing a SAML assertion. This is the same URL as the Audience URL when using SendGrid. - SingleSignonUrl *string `json:"single_signon_url,omitempty"` - // The URL where your IdP should POST its SAML response. This is the Twilio SendGrid URL that is responsible for receiving and parsing a SAML assertion. This is the same URL as the Single Sign-On URL when using SendGrid. - AudienceUrl *string `json:"audience_url,omitempty"` -} diff --git a/rest/api/v3/sso/model_sso_teammates_base_request_props.go b/rest/api/v3/sso/model_sso_teammates_base_request_props.go deleted file mode 100644 index 8fd3ef6d..00000000 --- a/rest/api/v3/sso/model_sso_teammates_base_request_props.go +++ /dev/null @@ -1,32 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SsoTeammatesBaseRequestProps struct for SsoTeammatesBaseRequestProps -type SsoTeammatesBaseRequestProps struct { - // Set this property to the Teammate's first name. - FirstName string `json:"first_name"` - // Set this property to the Teammate's last name. - LastName string `json:"last_name"` - // Set this property to `true` if the Teammate has admin permissions. You should not include the `scopes` or `persona` properties when setting the `is_admin` property to `true`—an admin will be allocated all scopes. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of scopes. - IsAdmin *bool `json:"is_admin,omitempty"` - // A persona represents a group of permissions often required by a type of Teammate such as a developer or marketer. Assigning a persona allows you to allocate a group of pre-defined permissions rather than assigning each scope individually. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of the scopes assigned to each persona. - Persona *Persona `json:"persona,omitempty"` - // Add or remove permissions from a Teammate using this `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this propety in the request when using the `persona` property or when setting the `is_admin` property to `true`—assigning a `persona` or setting `is_admin` to `true` will allocate a group of permissions to the Teammate. - Scopes *[]string `json:"scopes,omitempty"` - // Set this property to `true` to give the Teammate permissions to operate only on behalf of a Subuser. This property value must be `true` if the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. If this property is set to `true`, you cannot specify individual `scopes`, assign a `persona`, or set `is_admin` to `true`—a Teammate cannot specify scopes for the parent account and have restricted Subuser access. - HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"` - // Specify which Subusers the Teammate may access and act on behalf of with this property. If this property is populated, you must set the `has_restricted_subuser_access` property to `true`. - SubuserAccess *[]SsoTeammatesBaseRequestPropsSubuserAccessInner `json:"subuser_access,omitempty"` -} diff --git a/rest/api/v3/sso/model_sso_teammates_base_request_props_subuser_access_inner.go b/rest/api/v3/sso/model_sso_teammates_base_request_props_subuser_access_inner.go deleted file mode 100644 index 6a9499bd..00000000 --- a/rest/api/v3/sso/model_sso_teammates_base_request_props_subuser_access_inner.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SsoTeammatesBaseRequestPropsSubuserAccessInner An array of Subusers to which the Teammate should have access. -type SsoTeammatesBaseRequestPropsSubuserAccessInner struct { - // Set this property to the ID of a Subuser to which the Teammate should have access. You can retrieve Subuser IDs from the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/). - Id int32 `json:"id"` - // Grant the level of access the Teammate should have to the specified Subuser with this property. This property value may be either `admin` or `restricted`. When set to `restricted`, the Teammate has only the permissions assigned in the `scopes` property. - PermissionType PermissionType `json:"permission_type"` - // Add or remove permissions that the Teammate can access on behalf of the Subuser. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this property in the request when the `permission_type` property is set to `admin`—administrators have full access to the specified Subuser. - Scopes *[]string `json:"scopes,omitempty"` -} diff --git a/rest/api/v3/sso/model_sso_teammates_base_response_props.go b/rest/api/v3/sso/model_sso_teammates_base_response_props.go deleted file mode 100644 index ca10b302..00000000 --- a/rest/api/v3/sso/model_sso_teammates_base_response_props.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SsoTeammatesBaseResponseProps struct for SsoTeammatesBaseResponseProps -type SsoTeammatesBaseResponseProps struct { - // The Teammate's first name. - FirstName *string `json:"first_name,omitempty"` - // The Teammate's last name. - LastName *string `json:"last_name,omitempty"` - // Teammate's email address. This email address also functions as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. - Email *string `json:"email,omitempty"` - // Indicates if the Teammate has administrator permissions. When set to `true`, the Teammate is an admin. - IsAdmin *bool `json:"is_admin,omitempty"` - // Indicates how the Teammate authenticates with SendGrid. When set to `true`, the Teammate will access SendGrid via SSO and their IdP. When set to `false`, the Teammate will authenticate directly with SendGrid via a username and password. - IsSso *bool `json:"is_sso,omitempty"` - // The permissions or scopes currently assigned to the Teammate. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. - Scopes *[]string `json:"scopes,omitempty"` -} diff --git a/rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props.go b/rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props.go deleted file mode 100644 index 4570072d..00000000 --- a/rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SsoTeammatesRestrictedSubuserResponseProps struct for SsoTeammatesRestrictedSubuserResponseProps -type SsoTeammatesRestrictedSubuserResponseProps struct { - // When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. - HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"` - // Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. - SubuserAccess *[]SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner `json:"subuser_access,omitempty"` -} diff --git a/rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props_subuser_access_inner.go b/rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props_subuser_access_inner.go deleted file mode 100644 index 9d151365..00000000 --- a/rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props_subuser_access_inner.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner An array of Subusers to which the Teammate has access. -type SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner struct { - // The ID of a Subuser to which the Teammate has access. You can retrieve Subuser IDs from the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/). - Id *int32 `json:"id,omitempty"` - // The username of a Subuser to which the Teammate has access. - Username *string `json:"username,omitempty"` - // The email address of a Subuser to which the Teammate has access. - Email *string `json:"email,omitempty"` - // Indicates if the Subuser is active for the SendGrid account. - Disabled *bool `json:"disabled,omitempty"` - // The level of access the Teammate has to the specified Subuser. This property value may be either `admin` or `restricted`. When is property is set to `restricted`, the Teammate has only the permissions assigned in the `scopes` property. - PermissionType *PermissionType1 `json:"permission_type,omitempty"` - // The permissions or scopes that the Teammate can access on behalf of the Subuser. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. - Scopes *[]string `json:"scopes,omitempty"` -} diff --git a/rest/api/v3/sso/model_update_sso_certificate_request.go b/rest/api/v3/sso/model_update_sso_certificate_request.go deleted file mode 100644 index fd83330d..00000000 --- a/rest/api/v3/sso/model_update_sso_certificate_request.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateSsoCertificateRequest struct for UpdateSsoCertificateRequest -type UpdateSsoCertificateRequest struct { - // This public certificate allows SendGrid to verify that SAML requests it receives are signed by an IdP that it recognizes. - PublicCertificate *string `json:"public_certificate,omitempty"` - // Indicates whether or not the certificate is enabled. - Enabled *bool `json:"enabled,omitempty"` - // An ID that matches a certificate to a specific IdP integration. - IntegrationId *string `json:"integration_id,omitempty"` -} diff --git a/rest/api/v3/sso/model_user_type.go b/rest/api/v3/sso/model_user_type.go deleted file mode 100644 index 3042c84a..00000000 --- a/rest/api/v3/sso/model_user_type.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Single Sign-On API -* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UserType the model 'UserType' -type UserType string - -// List of UserType -const ( - USERTYPE_ADMIN UserType = "admin" - USERTYPE_OWNER UserType = "owner" - USERTYPE_TEAMMATE UserType = "teammate" -) diff --git a/rest/api/v3/stats/.openapi-generator b/rest/api/v3/stats/.openapi-generator deleted file mode 100644 index 4e237e34..00000000 --- a/rest/api/v3/stats/.openapi-generator +++ /dev/null @@ -1,80 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_get_client_stat.go -api_list_browser_stat.go -api_list_category.go -api_list_category_stat.go -api_list_category_stat_sum.go -api_list_client_stat.go -api_list_device_stat.go -api_list_geo_stat.go -api_list_mailbox_provider_stat.go -api_list_stat.go -api_service.go -docs/AdvancedStatsClicks.md -docs/AdvancedStatsClicksOpens.md -docs/AdvancedStatsMailboxProvider.md -docs/AdvancedStatsOpens.md -docs/AggregatedBy.md -docs/AggregatedBy1.md -docs/AggregatedBy2.md -docs/AggregatedBy3.md -docs/CategoryStats.md -docs/CategoryStatsStatsInner.md -docs/CategoryStatsStatsInnerMetrics.md -docs/ClientType.md -docs/Country.md -docs/GetClientStat.md -docs/ListBrowserStat.md -docs/ListBrowserStat200ResponseInner.md -docs/ListBrowserStat200ResponseInnerStatsInner.md -docs/ListCategory.md -docs/ListCategory200ResponseInner.md -docs/ListCategory400Response.md -docs/ListCategory400ResponseErrorsInner.md -docs/ListCategoryStat.md -docs/ListCategoryStatSum.md -docs/ListClientStat.md -docs/ListClientStat200ResponseInner.md -docs/ListClientStat200ResponseInnerStatsInner.md -docs/ListDeviceStat.md -docs/ListGeoStat.md -docs/ListGeoStat200ResponseInner.md -docs/ListGeoStat200ResponseInnerStatsInner.md -docs/ListMailboxProviderStat.md -docs/ListMailboxProviderStat200ResponseInner.md -docs/ListMailboxProviderStat200ResponseInnerStatsInner.md -docs/ListStat.md -docs/ListStat200ResponseInner.md -docs/ListStat200ResponseInnerStatsInner.md -docs/SortByDirection.md -docs/StatsAdvancedGlobalStats.md -model_advanced_stats_clicks.go -model_advanced_stats_clicks_opens.go -model_advanced_stats_mailbox_provider.go -model_advanced_stats_opens.go -model_aggregated_by.go -model_aggregated_by1.go -model_aggregated_by2.go -model_aggregated_by3.go -model_category_stats.go -model_category_stats_stats_inner.go -model_category_stats_stats_inner_metrics.go -model_client_type.go -model_country.go -model_list_browser_stat_200_response_inner.go -model_list_browser_stat_200_response_inner_stats_inner.go -model_list_category_200_response_inner.go -model_list_category_400_response.go -model_list_category_400_response_errors_inner.go -model_list_client_stat_200_response_inner.go -model_list_client_stat_200_response_inner_stats_inner.go -model_list_geo_stat_200_response_inner.go -model_list_geo_stat_200_response_inner_stats_inner.go -model_list_mailbox_provider_stat_200_response_inner.go -model_list_mailbox_provider_stat_200_response_inner_stats_inner.go -model_list_stat_200_response_inner.go -model_list_stat_200_response_inner_stats_inner.go -model_sort_by_direction.go -model_stats_advanced_global_stats.go diff --git a/rest/api/v3/stats/.openapi-generator-ignore b/rest/api/v3/stats/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/stats/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/stats/README.md b/rest/api/v3/stats/README.md deleted file mode 100644 index dd7596bf..00000000 --- a/rest/api/v3/stats/README.md +++ /dev/null @@ -1,104 +0,0 @@ -# Go API client for - -The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. - -Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. - -SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. - -Category statistics are available for the previous thirteen months only. - -See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T13:25:44.471509+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*GetClientStat* | [**GetClientStat**](docs/GetClientStat.md#getclientstat) | **Get** /v3/clients/{ClientType}/stats | Retrieve stats by a specific client type. -*ListBrowserStat* | [**ListBrowserStat**](docs/ListBrowserStat.md#listbrowserstat) | **Get** /v3/browsers/stats | Retrieve email statistics by browser. -*ListCategory* | [**ListCategory**](docs/ListCategory.md#listcategory) | **Get** /v3/categories | Retrieve all categories -*ListCategoryStat* | [**ListCategoryStat**](docs/ListCategoryStat.md#listcategorystat) | **Get** /v3/categories/stats | Retrieve Email Statistics for Categories -*ListCategoryStatSum* | [**ListCategoryStatSum**](docs/ListCategoryStatSum.md#listcategorystatsum) | **Get** /v3/categories/stats/sums | Retrieve sums of email stats for each category. -*ListClientStat* | [**ListClientStat**](docs/ListClientStat.md#listclientstat) | **Get** /v3/clients/stats | Retrieve email statistics by client type. -*ListDeviceStat* | [**ListDeviceStat**](docs/ListDeviceStat.md#listdevicestat) | **Get** /v3/devices/stats | Retrieve email statistics by device type. -*ListGeoStat* | [**ListGeoStat**](docs/ListGeoStat.md#listgeostat) | **Get** /v3/geo/stats | Retrieve email statistics by country and state/province. -*ListMailboxProviderStat* | [**ListMailboxProviderStat**](docs/ListMailboxProviderStat.md#listmailboxproviderstat) | **Get** /v3/mailbox_providers/stats | Retrieve email statistics by mailbox provider. -*ListStat* | [**ListStat**](docs/ListStat.md#liststat) | **Get** /v3/stats | Retrieve global email statistics - - -## Documentation For Models - - - [AdvancedStatsClicks](AdvancedStatsClicks.md) - - [AdvancedStatsClicksOpens](AdvancedStatsClicksOpens.md) - - [AdvancedStatsMailboxProvider](AdvancedStatsMailboxProvider.md) - - [AdvancedStatsOpens](AdvancedStatsOpens.md) - - [AggregatedBy](AggregatedBy.md) - - [AggregatedBy1](AggregatedBy1.md) - - [AggregatedBy2](AggregatedBy2.md) - - [AggregatedBy3](AggregatedBy3.md) - - [CategoryStats](CategoryStats.md) - - [CategoryStatsStatsInner](CategoryStatsStatsInner.md) - - [CategoryStatsStatsInnerMetrics](CategoryStatsStatsInnerMetrics.md) - - [ClientType](ClientType.md) - - [Country](Country.md) - - [ListBrowserStat200ResponseInner](ListBrowserStat200ResponseInner.md) - - [ListBrowserStat200ResponseInnerStatsInner](ListBrowserStat200ResponseInnerStatsInner.md) - - [ListCategory200ResponseInner](ListCategory200ResponseInner.md) - - [ListCategory400Response](ListCategory400Response.md) - - [ListCategory400ResponseErrorsInner](ListCategory400ResponseErrorsInner.md) - - [ListClientStat200ResponseInner](ListClientStat200ResponseInner.md) - - [ListClientStat200ResponseInnerStatsInner](ListClientStat200ResponseInnerStatsInner.md) - - [ListGeoStat200ResponseInner](ListGeoStat200ResponseInner.md) - - [ListGeoStat200ResponseInnerStatsInner](ListGeoStat200ResponseInnerStatsInner.md) - - [ListMailboxProviderStat200ResponseInner](ListMailboxProviderStat200ResponseInner.md) - - [ListMailboxProviderStat200ResponseInnerStatsInner](ListMailboxProviderStat200ResponseInnerStatsInner.md) - - [ListStat200ResponseInner](ListStat200ResponseInner.md) - - [ListStat200ResponseInnerStatsInner](ListStat200ResponseInnerStatsInner.md) - - [SortByDirection](SortByDirection.md) - - [StatsAdvancedGlobalStats](StatsAdvancedGlobalStats.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/stats/api_get_client_stat.go b/rest/api/v3/stats/api_get_client_stat.go deleted file mode 100644 index 8289a1c3..00000000 --- a/rest/api/v3/stats/api_get_client_stat.go +++ /dev/null @@ -1,98 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" - - "strings" -) - -type GetClientStatParam struct { - // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. - StartDate *string `json:"start_date"` - // Specifies the type of client to retrieve stats for. Must be either \"phone\", \"tablet\", \"webmail\", or \"desktop\". - ClientType *ClientType `json:"client_type"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. - EndDate *string `json:"end_date,omitempty"` - // How to group the statistics. Must be either \"day\", \"week\", or \"month\". - AggregatedBy *AggregatedBy2 `json:"aggregated_by,omitempty"` -} - -func (params *GetClientStatParam) SetStartDate(StartDate string) *GetClientStatParam { - params.StartDate = &StartDate - return params -} -func (params *GetClientStatParam) SetClientType(ClientType ClientType) *GetClientStatParam { - params.ClientType = &ClientType - return params -} -func (params *GetClientStatParam) SetOnbehalfof(Onbehalfof string) *GetClientStatParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *GetClientStatParam) SetEndDate(EndDate string) *GetClientStatParam { - params.EndDate = &EndDate - return params -} -func (params *GetClientStatParam) SetAggregatedBy(AggregatedBy AggregatedBy2) *GetClientStatParam { - params.AggregatedBy = &AggregatedBy - return params -} - -// **This endpoint allows you to retrieve your email statistics segmented by a specific client type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. ### Available Client Types - phone - tablet - webmail - desktop Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). -func (c *ApiService) GetClientStat(params *GetClientStatParam) (interface{}, error) { - path := "/v3/clients/{ClientType}/stats" - if params != nil && params.ClientType != nil { - path = strings.Replace(path, "{"+"ClientType"+"}", fmt.Sprint(*params.ClientType), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.StartDate != nil { - data.Set("start_date", *params.StartDate) - } - if params != nil && params.EndDate != nil { - data.Set("end_date", *params.EndDate) - } - if params != nil && params.AggregatedBy != nil { - data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]ListClientStat200ResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/stats/api_list_browser_stat.go b/rest/api/v3/stats/api_list_browser_stat.go deleted file mode 100644 index 3e84d689..00000000 --- a/rest/api/v3/stats/api_list_browser_stat.go +++ /dev/null @@ -1,114 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" -) - -type ListBrowserStatParam struct { - // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. - StartDate *string `json:"start_date"` - // The browsers to get statistics for. You can include up to 10 different browsers by including this parameter multiple times. - Browsers *string `json:"browsers,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // The number of results to return. - Limit *int32 `json:"limit,omitempty"` - // The point in the list to begin retrieving results. - Offset *int32 `json:"offset,omitempty"` - // How to group the statistics. Must be either \"day\", \"week\", or \"month\". - AggregatedBy *AggregatedBy3 `json:"aggregated_by,omitempty"` - // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. - EndDate *string `json:"end_date,omitempty"` -} - -func (params *ListBrowserStatParam) SetStartDate(StartDate string) *ListBrowserStatParam { - params.StartDate = &StartDate - return params -} -func (params *ListBrowserStatParam) SetBrowsers(Browsers string) *ListBrowserStatParam { - params.Browsers = &Browsers - return params -} -func (params *ListBrowserStatParam) SetOnbehalfof(Onbehalfof string) *ListBrowserStatParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *ListBrowserStatParam) SetLimit(Limit int32) *ListBrowserStatParam { - params.Limit = &Limit - return params -} -func (params *ListBrowserStatParam) SetOffset(Offset int32) *ListBrowserStatParam { - params.Offset = &Offset - return params -} -func (params *ListBrowserStatParam) SetAggregatedBy(AggregatedBy AggregatedBy3) *ListBrowserStatParam { - params.AggregatedBy = &AggregatedBy - return params -} -func (params *ListBrowserStatParam) SetEndDate(EndDate string) *ListBrowserStatParam { - params.EndDate = &EndDate - return params -} - -// **This endpoint allows you to retrieve your email statistics segmented by browser type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). -func (c *ApiService) ListBrowserStat(params *ListBrowserStatParam) (interface{}, error) { - path := "/v3/browsers/stats" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.StartDate != nil { - data.Set("start_date", *params.StartDate) - } - if params != nil && params.Browsers != nil { - data.Set("browsers", *params.Browsers) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - if params != nil && params.AggregatedBy != nil { - data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) - } - if params != nil && params.EndDate != nil { - data.Set("end_date", *params.EndDate) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]ListBrowserStat200ResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/stats/api_list_category.go b/rest/api/v3/stats/api_list_category.go deleted file mode 100644 index 9805977a..00000000 --- a/rest/api/v3/stats/api_list_category.go +++ /dev/null @@ -1,95 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" -) - -type ListCategoryParam struct { - // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. - Limit *int32 `json:"limit,omitempty"` - // Allows you to perform a prefix search on this particular category. - Category *string `json:"category,omitempty"` - // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. - Offset *int32 `json:"offset,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListCategoryParam) SetLimit(Limit int32) *ListCategoryParam { - params.Limit = &Limit - return params -} -func (params *ListCategoryParam) SetCategory(Category string) *ListCategoryParam { - params.Category = &Category - return params -} -func (params *ListCategoryParam) SetOffset(Offset int32) *ListCategoryParam { - params.Offset = &Offset - return params -} -func (params *ListCategoryParam) SetOnbehalfof(Onbehalfof string) *ListCategoryParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a paginated list of all of your categories.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. -func (c *ApiService) ListCategory(params *ListCategoryParam) (interface{}, error) { - path := "/v3/categories" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Category != nil { - data.Set("category", *params.Category) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]ListCategory200ResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ListCategory400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/stats/api_list_category_stat.go b/rest/api/v3/stats/api_list_category_stat.go deleted file mode 100644 index 442d45f9..00000000 --- a/rest/api/v3/stats/api_list_category_stat.go +++ /dev/null @@ -1,96 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" -) - -type ListCategoryStatParam struct { - // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD - StartDate *string `json:"start_date"` - // The individual categories that you want to retrieve statistics for. You may include up to 10 different categories. - Categories *string `json:"categories"` - // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. - EndDate *string `json:"end_date,omitempty"` - // How to group the statistics. Must be either \"day\", \"week\", or \"month\". - AggregatedBy *AggregatedBy `json:"aggregated_by,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListCategoryStatParam) SetStartDate(StartDate string) *ListCategoryStatParam { - params.StartDate = &StartDate - return params -} -func (params *ListCategoryStatParam) SetCategories(Categories string) *ListCategoryStatParam { - params.Categories = &Categories - return params -} -func (params *ListCategoryStatParam) SetEndDate(EndDate string) *ListCategoryStatParam { - params.EndDate = &EndDate - return params -} -func (params *ListCategoryStatParam) SetAggregatedBy(AggregatedBy AggregatedBy) *ListCategoryStatParam { - params.AggregatedBy = &AggregatedBy - return params -} -func (params *ListCategoryStatParam) SetOnbehalfof(Onbehalfof string) *ListCategoryStatParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve all of your email statistics for each of your categories.** If you do not define any query parameters, this endpoint will return a sum for each category in groups of 10. -func (c *ApiService) ListCategoryStat(params *ListCategoryStatParam) (interface{}, error) { - path := "/v3/categories/stats" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.StartDate != nil { - data.Set("start_date", *params.StartDate) - } - if params != nil && params.Categories != nil { - data.Set("categories", *params.Categories) - } - if params != nil && params.EndDate != nil { - data.Set("end_date", *params.EndDate) - } - if params != nil && params.AggregatedBy != nil { - data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]CategoryStats{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/stats/api_list_category_stat_sum.go b/rest/api/v3/stats/api_list_category_stat_sum.go deleted file mode 100644 index 02c40c28..00000000 --- a/rest/api/v3/stats/api_list_category_stat_sum.go +++ /dev/null @@ -1,123 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" -) - -type ListCategoryStatSumParam struct { - // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. - StartDate *string `json:"start_date"` - // The metric that you want to sort by. Must be a single metric. - SortByMetric *string `json:"sort_by_metric,omitempty"` - // The direction you want to sort. - SortByDirection *SortByDirection `json:"sort_by_direction,omitempty"` - // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. - EndDate *string `json:"end_date,omitempty"` - // Limits the number of results returned. - Limit *int32 `json:"limit,omitempty"` - // The point in the list to begin retrieving results. - Offset *int32 `json:"offset,omitempty"` - // How to group the statistics. Must be either \"day\", \"week\", or \"month\". - AggregatedBy *AggregatedBy1 `json:"aggregated_by,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListCategoryStatSumParam) SetStartDate(StartDate string) *ListCategoryStatSumParam { - params.StartDate = &StartDate - return params -} -func (params *ListCategoryStatSumParam) SetSortByMetric(SortByMetric string) *ListCategoryStatSumParam { - params.SortByMetric = &SortByMetric - return params -} -func (params *ListCategoryStatSumParam) SetSortByDirection(SortByDirection SortByDirection) *ListCategoryStatSumParam { - params.SortByDirection = &SortByDirection - return params -} -func (params *ListCategoryStatSumParam) SetEndDate(EndDate string) *ListCategoryStatSumParam { - params.EndDate = &EndDate - return params -} -func (params *ListCategoryStatSumParam) SetLimit(Limit int32) *ListCategoryStatSumParam { - params.Limit = &Limit - return params -} -func (params *ListCategoryStatSumParam) SetOffset(Offset int32) *ListCategoryStatSumParam { - params.Offset = &Offset - return params -} -func (params *ListCategoryStatSumParam) SetAggregatedBy(AggregatedBy AggregatedBy1) *ListCategoryStatSumParam { - params.AggregatedBy = &AggregatedBy - return params -} -func (params *ListCategoryStatSumParam) SetOnbehalfof(Onbehalfof string) *ListCategoryStatSumParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve the total sum of each email statistic for every category over the given date range.** If you do not define any query parameters, this endpoint will return a sum for each category in groups of 10. -func (c *ApiService) ListCategoryStatSum(params *ListCategoryStatSumParam) (interface{}, error) { - path := "/v3/categories/stats/sums" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.StartDate != nil { - data.Set("start_date", *params.StartDate) - } - if params != nil && params.SortByMetric != nil { - data.Set("sort_by_metric", *params.SortByMetric) - } - if params != nil && params.SortByDirection != nil { - data.Set("sort_by_direction", fmt.Sprint(*params.SortByDirection)) - } - if params != nil && params.EndDate != nil { - data.Set("end_date", *params.EndDate) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - if params != nil && params.AggregatedBy != nil { - data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &CategoryStats{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/stats/api_list_client_stat.go b/rest/api/v3/stats/api_list_client_stat.go deleted file mode 100644 index f663bac0..00000000 --- a/rest/api/v3/stats/api_list_client_stat.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" -) - -type ListClientStatParam struct { - // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. - StartDate *string `json:"start_date"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. - EndDate *string `json:"end_date,omitempty"` - // How to group the statistics. Must be either \"day\", \"week\", or \"month\". - AggregatedBy *AggregatedBy2 `json:"aggregated_by,omitempty"` -} - -func (params *ListClientStatParam) SetStartDate(StartDate string) *ListClientStatParam { - params.StartDate = &StartDate - return params -} -func (params *ListClientStatParam) SetOnbehalfof(Onbehalfof string) *ListClientStatParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *ListClientStatParam) SetEndDate(EndDate string) *ListClientStatParam { - params.EndDate = &EndDate - return params -} -func (params *ListClientStatParam) SetAggregatedBy(AggregatedBy AggregatedBy2) *ListClientStatParam { - params.AggregatedBy = &AggregatedBy - return params -} - -// **This endpoint allows you to retrieve your email statistics segmented by client type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). -func (c *ApiService) ListClientStat(params *ListClientStatParam) (interface{}, error) { - path := "/v3/clients/stats" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.StartDate != nil { - data.Set("start_date", *params.StartDate) - } - if params != nil && params.EndDate != nil { - data.Set("end_date", *params.EndDate) - } - if params != nil && params.AggregatedBy != nil { - data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]ListClientStat200ResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/stats/api_list_device_stat.go b/rest/api/v3/stats/api_list_device_stat.go deleted file mode 100644 index 24bc46a2..00000000 --- a/rest/api/v3/stats/api_list_device_stat.go +++ /dev/null @@ -1,105 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" -) - -type ListDeviceStatParam struct { - // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. - StartDate *string `json:"start_date"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // The number of results to return. - Limit *int32 `json:"limit,omitempty"` - // The point in the list to begin retrieving results. - Offset *int32 `json:"offset,omitempty"` - // How to group the statistics. Must be either \"day\", \"week\", or \"month\". - AggregatedBy *AggregatedBy3 `json:"aggregated_by,omitempty"` - // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. - EndDate *string `json:"end_date,omitempty"` -} - -func (params *ListDeviceStatParam) SetStartDate(StartDate string) *ListDeviceStatParam { - params.StartDate = &StartDate - return params -} -func (params *ListDeviceStatParam) SetOnbehalfof(Onbehalfof string) *ListDeviceStatParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *ListDeviceStatParam) SetLimit(Limit int32) *ListDeviceStatParam { - params.Limit = &Limit - return params -} -func (params *ListDeviceStatParam) SetOffset(Offset int32) *ListDeviceStatParam { - params.Offset = &Offset - return params -} -func (params *ListDeviceStatParam) SetAggregatedBy(AggregatedBy AggregatedBy3) *ListDeviceStatParam { - params.AggregatedBy = &AggregatedBy - return params -} -func (params *ListDeviceStatParam) SetEndDate(EndDate string) *ListDeviceStatParam { - params.EndDate = &EndDate - return params -} - -// **This endpoint allows you to retrieve your email statistics segmented by the device type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. ## Available Device Types | **Device** | **Description** | **Example** | |---|---|---| | Desktop | Email software on desktop computer. | I.E., Outlook, Sparrow, or Apple Mail. | | Webmail | A web-based email client. | I.E., Yahoo, Google, AOL, or Outlook.com. | | Phone | A smart phone. | iPhone, Android, Blackberry, etc. | Tablet | A tablet computer. | iPad, android based tablet, etc. | | Other | An unrecognized device. | Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). -func (c *ApiService) ListDeviceStat(params *ListDeviceStatParam) (interface{}, error) { - path := "/v3/devices/stats" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.StartDate != nil { - data.Set("start_date", *params.StartDate) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - if params != nil && params.AggregatedBy != nil { - data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) - } - if params != nil && params.EndDate != nil { - data.Set("end_date", *params.EndDate) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]ListClientStat200ResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/stats/api_list_geo_stat.go b/rest/api/v3/stats/api_list_geo_stat.go deleted file mode 100644 index 083560d2..00000000 --- a/rest/api/v3/stats/api_list_geo_stat.go +++ /dev/null @@ -1,114 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" -) - -type ListGeoStatParam struct { - // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. - StartDate *string `json:"start_date"` - // The country you would like to see statistics for. Currently only supported for US and CA. - Country *Country `json:"country,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // The number of results to return. - Limit *int32 `json:"limit,omitempty"` - // The point in the list to begin retrieving results. - Offset *int32 `json:"offset,omitempty"` - // How to group the statistics. Must be either \"day\", \"week\", or \"month\". - AggregatedBy *AggregatedBy3 `json:"aggregated_by,omitempty"` - // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. - EndDate *string `json:"end_date,omitempty"` -} - -func (params *ListGeoStatParam) SetStartDate(StartDate string) *ListGeoStatParam { - params.StartDate = &StartDate - return params -} -func (params *ListGeoStatParam) SetCountry(Country Country) *ListGeoStatParam { - params.Country = &Country - return params -} -func (params *ListGeoStatParam) SetOnbehalfof(Onbehalfof string) *ListGeoStatParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *ListGeoStatParam) SetLimit(Limit int32) *ListGeoStatParam { - params.Limit = &Limit - return params -} -func (params *ListGeoStatParam) SetOffset(Offset int32) *ListGeoStatParam { - params.Offset = &Offset - return params -} -func (params *ListGeoStatParam) SetAggregatedBy(AggregatedBy AggregatedBy3) *ListGeoStatParam { - params.AggregatedBy = &AggregatedBy - return params -} -func (params *ListGeoStatParam) SetEndDate(EndDate string) *ListGeoStatParam { - params.EndDate = &EndDate - return params -} - -// **This endpoint allows you to retrieve your email statistics segmented by country and state/province.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [User Guide](https://wwww.twilio.com/docs/sendgrid/ui/analytics-and-reporting/stats-overview). -func (c *ApiService) ListGeoStat(params *ListGeoStatParam) (interface{}, error) { - path := "/v3/geo/stats" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.StartDate != nil { - data.Set("start_date", *params.StartDate) - } - if params != nil && params.Country != nil { - data.Set("country", fmt.Sprint(*params.Country)) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - if params != nil && params.AggregatedBy != nil { - data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) - } - if params != nil && params.EndDate != nil { - data.Set("end_date", *params.EndDate) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]ListGeoStat200ResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/stats/api_list_mailbox_provider_stat.go b/rest/api/v3/stats/api_list_mailbox_provider_stat.go deleted file mode 100644 index 98436deb..00000000 --- a/rest/api/v3/stats/api_list_mailbox_provider_stat.go +++ /dev/null @@ -1,114 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" -) - -type ListMailboxProviderStatParam struct { - // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. - StartDate *string `json:"start_date"` - // The mail box providers to get statistics for. You can include up to 10 by including this parameter multiple times. - MailboxProviders *string `json:"mailbox_providers,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // The number of results to return. - Limit *int32 `json:"limit,omitempty"` - // The point in the list to begin retrieving results. - Offset *int32 `json:"offset,omitempty"` - // How to group the statistics. Must be either \"day\", \"week\", or \"month\". - AggregatedBy *AggregatedBy3 `json:"aggregated_by,omitempty"` - // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. - EndDate *string `json:"end_date,omitempty"` -} - -func (params *ListMailboxProviderStatParam) SetStartDate(StartDate string) *ListMailboxProviderStatParam { - params.StartDate = &StartDate - return params -} -func (params *ListMailboxProviderStatParam) SetMailboxProviders(MailboxProviders string) *ListMailboxProviderStatParam { - params.MailboxProviders = &MailboxProviders - return params -} -func (params *ListMailboxProviderStatParam) SetOnbehalfof(Onbehalfof string) *ListMailboxProviderStatParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *ListMailboxProviderStatParam) SetLimit(Limit int32) *ListMailboxProviderStatParam { - params.Limit = &Limit - return params -} -func (params *ListMailboxProviderStatParam) SetOffset(Offset int32) *ListMailboxProviderStatParam { - params.Offset = &Offset - return params -} -func (params *ListMailboxProviderStatParam) SetAggregatedBy(AggregatedBy AggregatedBy3) *ListMailboxProviderStatParam { - params.AggregatedBy = &AggregatedBy - return params -} -func (params *ListMailboxProviderStatParam) SetEndDate(EndDate string) *ListMailboxProviderStatParam { - params.EndDate = &EndDate - return params -} - -// **This endpoint allows you to retrieve your email statistics segmented by recipient mailbox provider.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). -func (c *ApiService) ListMailboxProviderStat(params *ListMailboxProviderStatParam) (interface{}, error) { - path := "/v3/mailbox_providers/stats" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.StartDate != nil { - data.Set("start_date", *params.StartDate) - } - if params != nil && params.MailboxProviders != nil { - data.Set("mailbox_providers", *params.MailboxProviders) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - if params != nil && params.AggregatedBy != nil { - data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) - } - if params != nil && params.EndDate != nil { - data.Set("end_date", *params.EndDate) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]ListMailboxProviderStat200ResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/stats/api_list_stat.go b/rest/api/v3/stats/api_list_stat.go deleted file mode 100644 index 9b0f05e8..00000000 --- a/rest/api/v3/stats/api_list_stat.go +++ /dev/null @@ -1,105 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/url" -) - -type ListStatParam struct { - // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. - StartDate *string `json:"start_date"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // The number of results to return. - Limit *int32 `json:"limit,omitempty"` - // The point in the list to begin retrieving results. - Offset *int32 `json:"offset,omitempty"` - // How to group the statistics. Must be either \"day\", \"week\", or \"month\". - AggregatedBy *AggregatedBy3 `json:"aggregated_by,omitempty"` - // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. - EndDate *string `json:"end_date,omitempty"` -} - -func (params *ListStatParam) SetStartDate(StartDate string) *ListStatParam { - params.StartDate = &StartDate - return params -} -func (params *ListStatParam) SetOnbehalfof(Onbehalfof string) *ListStatParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *ListStatParam) SetLimit(Limit int32) *ListStatParam { - params.Limit = &Limit - return params -} -func (params *ListStatParam) SetOffset(Offset int32) *ListStatParam { - params.Offset = &Offset - return params -} -func (params *ListStatParam) SetAggregatedBy(AggregatedBy AggregatedBy3) *ListStatParam { - params.AggregatedBy = &AggregatedBy - return params -} -func (params *ListStatParam) SetEndDate(EndDate string) *ListStatParam { - params.EndDate = &EndDate - return params -} - -// **This endpoint allows you to retrieve all of your global email statistics between a given date range.** Parent accounts can see either aggregated stats for the parent account or aggregated stats for a subuser specified in the `on-behalf-of` header. Subuser accounts will see only their own stats. -func (c *ApiService) ListStat(params *ListStatParam) (interface{}, error) { - path := "/v3/stats" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.StartDate != nil { - data.Set("start_date", *params.StartDate) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - if params != nil && params.AggregatedBy != nil { - data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) - } - if params != nil && params.EndDate != nil { - data.Set("end_date", *params.EndDate) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]ListStat200ResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return nil, nil -} diff --git a/rest/api/v3/stats/api_service.go b/rest/api/v3/stats/api_service.go deleted file mode 100644 index 29d8f9f5..00000000 --- a/rest/api/v3/stats/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/stats/docs/AdvancedStatsClicks.md b/rest/api/v3/stats/docs/AdvancedStatsClicks.md deleted file mode 100644 index 3f2f87ae..00000000 --- a/rest/api/v3/stats/docs/AdvancedStatsClicks.md +++ /dev/null @@ -1,12 +0,0 @@ -# AdvancedStatsClicks - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Clicks** | **int32** | The number of links that were clicked in your emails. |[optional] -**UniqueClicks** | **int32** | The number of unique recipients who clicked links in your emails. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/AdvancedStatsClicksOpens.md b/rest/api/v3/stats/docs/AdvancedStatsClicksOpens.md deleted file mode 100644 index 38d8c2e1..00000000 --- a/rest/api/v3/stats/docs/AdvancedStatsClicksOpens.md +++ /dev/null @@ -1,14 +0,0 @@ -# AdvancedStatsClicksOpens - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Clicks** | **int32** | The number of links that were clicked in your emails. |[optional] -**UniqueClicks** | **int32** | The number of unique recipients who clicked links in your emails. |[optional] -**Opens** | **int32** | The total number of times your emails were opened by recipients. |[optional] -**UniqueOpens** | **int32** | The number of unique recipients who opened your emails. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/AdvancedStatsMailboxProvider.md b/rest/api/v3/stats/docs/AdvancedStatsMailboxProvider.md deleted file mode 100644 index 403c4943..00000000 --- a/rest/api/v3/stats/docs/AdvancedStatsMailboxProvider.md +++ /dev/null @@ -1,18 +0,0 @@ -# AdvancedStatsMailboxProvider - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Blocks** | **int32** | The number of emails that were not allowed to be delivered by ISPs. |[optional] -**Bounces** | **int32** | The number of emails that bounced instead of being delivered. |[optional] -**Deferred** | **int32** | The number of emails that temporarily could not be delivered. |[optional] -**Delivered** | **int32** | The number of emails SendGrid was able to confirm were actually delivered to a recipient. |[optional] -**Drops** | **int32** | The number of emails that were not delivered due to the recipient email address being on a suppression list. |[optional] -**Requests** | **int32** | The number of emails that were requested to be delivered. |[optional] -**Processed** | **int32** | Requests from your website, application, or mail client via SMTP Relay or the Web API that SendGrid processed. |[optional] -**SpamReports** | **int32** | The number of recipients who marked your email as spam. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/AdvancedStatsOpens.md b/rest/api/v3/stats/docs/AdvancedStatsOpens.md deleted file mode 100644 index ebab3e99..00000000 --- a/rest/api/v3/stats/docs/AdvancedStatsOpens.md +++ /dev/null @@ -1,12 +0,0 @@ -# AdvancedStatsOpens - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Opens** | **int32** | The total number of times your emails were opened by recipients. |[optional] -**UniqueOpens** | **int32** | The number of unique recipients who opened your emails. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/AggregatedBy.md b/rest/api/v3/stats/docs/AggregatedBy.md deleted file mode 100644 index 96f02c9f..00000000 --- a/rest/api/v3/stats/docs/AggregatedBy.md +++ /dev/null @@ -1,14 +0,0 @@ -# AggregatedBy - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**DAY** | string | (value: `"day"`) -**WEEK** | string | (value: `"week"`) -**MONTH** | string | (value: `"month"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/AggregatedBy1.md b/rest/api/v3/stats/docs/AggregatedBy1.md deleted file mode 100644 index b34f829d..00000000 --- a/rest/api/v3/stats/docs/AggregatedBy1.md +++ /dev/null @@ -1,14 +0,0 @@ -# AggregatedBy1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**DAY** | string | (value: `"day"`) -**WEEK** | string | (value: `"week"`) -**MONTH** | string | (value: `"month"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/AggregatedBy2.md b/rest/api/v3/stats/docs/AggregatedBy2.md deleted file mode 100644 index 9bf04eed..00000000 --- a/rest/api/v3/stats/docs/AggregatedBy2.md +++ /dev/null @@ -1,14 +0,0 @@ -# AggregatedBy2 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**DAY** | string | (value: `"day"`) -**WEEK** | string | (value: `"week"`) -**MONTH** | string | (value: `"month"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/AggregatedBy3.md b/rest/api/v3/stats/docs/AggregatedBy3.md deleted file mode 100644 index 7504b230..00000000 --- a/rest/api/v3/stats/docs/AggregatedBy3.md +++ /dev/null @@ -1,14 +0,0 @@ -# AggregatedBy3 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**DAY** | string | (value: `"day"`) -**WEEK** | string | (value: `"week"`) -**MONTH** | string | (value: `"month"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/CategoryStats.md b/rest/api/v3/stats/docs/CategoryStats.md deleted file mode 100644 index 2b136fe2..00000000 --- a/rest/api/v3/stats/docs/CategoryStats.md +++ /dev/null @@ -1,12 +0,0 @@ -# CategoryStats - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Date** | **string** | The date the statistics were gathered. | -**Stats** | [**[]CategoryStatsStatsInner**](CategoryStatsStatsInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/CategoryStatsStatsInner.md b/rest/api/v3/stats/docs/CategoryStatsStatsInner.md deleted file mode 100644 index 9c188e0c..00000000 --- a/rest/api/v3/stats/docs/CategoryStatsStatsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# CategoryStatsStatsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Metrics** | [**CategoryStatsStatsInnerMetrics**](CategoryStatsStatsInnerMetrics.md) | |[optional] -**Name** | **string** | The name of the category. |[optional] -**Type** | **string** | How you are segmenting your statistics. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/CategoryStatsStatsInnerMetrics.md b/rest/api/v3/stats/docs/CategoryStatsStatsInnerMetrics.md deleted file mode 100644 index 8129c1f4..00000000 --- a/rest/api/v3/stats/docs/CategoryStatsStatsInnerMetrics.md +++ /dev/null @@ -1,26 +0,0 @@ -# CategoryStatsStatsInnerMetrics - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Blocks** | **int32** | The number of emails that were not allowed to be delivered by ISPs. | -**BounceDrops** | **int32** | The number of emails that were dropped because of a bounce. | -**Bounces** | **int32** | The number of emails that bounced instead of being delivered. | -**Clicks** | **int32** | The number of links that were clicked. | -**Deferred** | **int32** | The number of emails that temporarily could not be delivered. | -**Delivered** | **int32** | The number of emails SendGrid was able to confirm were actually delivered to a recipient. | -**InvalidEmails** | **int32** | The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. | -**Opens** | **int32** | The total number of times your emails were opened by recipients. | -**Processed** | **int32** | Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. | -**Requests** | **int32** | The number of emails that were requested to be delivered. | -**SpamReportDrops** | **int32** | The number of emails that were dropped due to a recipient previously marking your emails as spam. | -**SpamReports** | **int32** | The number of recipients who marked your email as spam. | -**UniqueClicks** | **int32** | The number of unique recipients who clicked links in your emails. | -**UniqueOpens** | **int32** | The number of unique recipients who opened your emails. | -**UnsubscribeDrops** | **int32** | The number of emails dropped due to a recipient unsubscribing from your emails. | -**Unsubscribes** | **int32** | The number of recipients who unsubscribed from your emails. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/ClientType.md b/rest/api/v3/stats/docs/ClientType.md deleted file mode 100644 index 8a7f8487..00000000 --- a/rest/api/v3/stats/docs/ClientType.md +++ /dev/null @@ -1,15 +0,0 @@ -# ClientType - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**PHONE** | string | (value: `"phone"`) -**TABLET** | string | (value: `"tablet"`) -**WEBMAIL** | string | (value: `"webmail"`) -**DESKTOP** | string | (value: `"desktop"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/Country.md b/rest/api/v3/stats/docs/Country.md deleted file mode 100644 index 00c5f179..00000000 --- a/rest/api/v3/stats/docs/Country.md +++ /dev/null @@ -1,13 +0,0 @@ -# Country - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**US** | string | (value: `"US"`) -**CA** | string | (value: `"CA"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/GetClientStat.md b/rest/api/v3/stats/docs/GetClientStat.md deleted file mode 100644 index bdd7639d..00000000 --- a/rest/api/v3/stats/docs/GetClientStat.md +++ /dev/null @@ -1,54 +0,0 @@ -# GetClientStat - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetClientStat**](GetClientStat.md#GetClientStat) | **Get** /v3/clients/{ClientType}/stats | Retrieve stats by a specific client type. - - - -## GetClientStat - -> []ListClientStat200ResponseInner GetClientStat(ctx, StartDateClientTypeoptional) - -Retrieve stats by a specific client type. - -**This endpoint allows you to retrieve your email statistics segmented by a specific client type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. ### Available Client Types - phone - tablet - webmail - desktop Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**ClientType** | [**ClientType**](ClientType.md) | Specifies the type of client to retrieve stats for. Must be either \"phone\", \"tablet\", \"webmail\", or \"desktop\". - -### Other Parameters - -Other parameters are passed through a pointer to a GetClientStatParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. -**AggregatedBy** | [**AggregatedBy2**](AggregatedBy2AggregatedBy2.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". - -### Return type - -[**[]ListClientStat200ResponseInner**](ListClientStat200ResponseInner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/stats/docs/ListBrowserStat.md b/rest/api/v3/stats/docs/ListBrowserStat.md deleted file mode 100644 index 00b5d584..00000000 --- a/rest/api/v3/stats/docs/ListBrowserStat.md +++ /dev/null @@ -1,53 +0,0 @@ -# ListBrowserStat - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListBrowserStat**](ListBrowserStat.md#ListBrowserStat) | **Get** /v3/browsers/stats | Retrieve email statistics by browser. - - - -## ListBrowserStat - -> []ListBrowserStat200ResponseInner ListBrowserStat(ctx, StartDateoptional) - -Retrieve email statistics by browser. - -**This endpoint allows you to retrieve your email statistics segmented by browser type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListBrowserStatParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Browsers** | **string** | The browsers to get statistics for. You can include up to 10 different browsers by including this parameter multiple times. -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**Limit** | **int32** | The number of results to return. -**Offset** | **int32** | The point in the list to begin retrieving results. -**AggregatedBy** | [**AggregatedBy3**](AggregatedBy3AggregatedBy3.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". -**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. - -### Return type - -[**[]ListBrowserStat200ResponseInner**](ListBrowserStat200ResponseInner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/stats/docs/ListBrowserStat200ResponseInner.md b/rest/api/v3/stats/docs/ListBrowserStat200ResponseInner.md deleted file mode 100644 index b4f98ab1..00000000 --- a/rest/api/v3/stats/docs/ListBrowserStat200ResponseInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListBrowserStat200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Date** | **string** | The date that the statistics were gathered. |[optional] -**Stats** | [**[]ListBrowserStat200ResponseInnerStatsInner**](ListBrowserStat200ResponseInnerStatsInner.md) | The list of statistics. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/ListBrowserStat200ResponseInnerStatsInner.md b/rest/api/v3/stats/docs/ListBrowserStat200ResponseInnerStatsInner.md deleted file mode 100644 index 42ea5d07..00000000 --- a/rest/api/v3/stats/docs/ListBrowserStat200ResponseInnerStatsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListBrowserStat200ResponseInnerStatsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | The type of segmentation. |[optional] -**Name** | **string** | The name of the specific segmentation. |[optional] -**Metrics** | [**AdvancedStatsClicks**](AdvancedStatsClicks.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/ListCategory.md b/rest/api/v3/stats/docs/ListCategory.md deleted file mode 100644 index 02a75cbb..00000000 --- a/rest/api/v3/stats/docs/ListCategory.md +++ /dev/null @@ -1,51 +0,0 @@ -# ListCategory - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListCategory**](ListCategory.md#ListCategory) | **Get** /v3/categories | Retrieve all categories - - - -## ListCategory - -> []ListCategory200ResponseInner ListCategory(ctx, optional) - -Retrieve all categories - -**This endpoint allows you to retrieve a paginated list of all of your categories.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListCategoryParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. -**Category** | **string** | Allows you to perform a prefix search on this particular category. -**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**[]ListCategory200ResponseInner**](ListCategory200ResponseInner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/stats/docs/ListCategory200ResponseInner.md b/rest/api/v3/stats/docs/ListCategory200ResponseInner.md deleted file mode 100644 index 528bed33..00000000 --- a/rest/api/v3/stats/docs/ListCategory200ResponseInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListCategory200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Category** | **string** | A category used to group emails by broad topic. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/ListCategory400Response.md b/rest/api/v3/stats/docs/ListCategory400Response.md deleted file mode 100644 index 1163a96f..00000000 --- a/rest/api/v3/stats/docs/ListCategory400Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListCategory400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ListCategory400ResponseErrorsInner**](ListCategory400ResponseErrorsInner.md) | The error returned. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/ListCategory400ResponseErrorsInner.md b/rest/api/v3/stats/docs/ListCategory400ResponseErrorsInner.md deleted file mode 100644 index 413c97ee..00000000 --- a/rest/api/v3/stats/docs/ListCategory400ResponseErrorsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListCategory400ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Field** | **string** | | -**Message** | **string** | A message explaining why your categories could not be retrieved. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/ListCategoryStat.md b/rest/api/v3/stats/docs/ListCategoryStat.md deleted file mode 100644 index 715c2215..00000000 --- a/rest/api/v3/stats/docs/ListCategoryStat.md +++ /dev/null @@ -1,50 +0,0 @@ -# ListCategoryStat - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListCategoryStat**](ListCategoryStat.md#ListCategoryStat) | **Get** /v3/categories/stats | Retrieve Email Statistics for Categories - - - -## ListCategoryStat - -> []CategoryStats ListCategoryStat(ctx, StartDateCategoriesoptional) - -Retrieve Email Statistics for Categories - -**This endpoint allows you to retrieve all of your email statistics for each of your categories.** If you do not define any query parameters, this endpoint will return a sum for each category in groups of 10. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListCategoryStatParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. -**AggregatedBy** | [**AggregatedBy**](AggregatedByAggregatedBy.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**[]CategoryStats**](CategoryStats.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/stats/docs/ListCategoryStatSum.md b/rest/api/v3/stats/docs/ListCategoryStatSum.md deleted file mode 100644 index 18067fc6..00000000 --- a/rest/api/v3/stats/docs/ListCategoryStatSum.md +++ /dev/null @@ -1,54 +0,0 @@ -# ListCategoryStatSum - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListCategoryStatSum**](ListCategoryStatSum.md#ListCategoryStatSum) | **Get** /v3/categories/stats/sums | Retrieve sums of email stats for each category. - - - -## ListCategoryStatSum - -> CategoryStats ListCategoryStatSum(ctx, StartDateoptional) - -Retrieve sums of email stats for each category. - -**This endpoint allows you to retrieve the total sum of each email statistic for every category over the given date range.** If you do not define any query parameters, this endpoint will return a sum for each category in groups of 10. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListCategoryStatSumParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**SortByMetric** | **string** | The metric that you want to sort by. Must be a single metric. -**SortByDirection** | [**SortByDirection**](SortByDirectionSortByDirection.md) | The direction you want to sort. -**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. -**Limit** | **int32** | Limits the number of results returned. -**Offset** | **int32** | The point in the list to begin retrieving results. -**AggregatedBy** | [**AggregatedBy1**](AggregatedBy1AggregatedBy1.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**CategoryStats**](CategoryStats.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/stats/docs/ListClientStat.md b/rest/api/v3/stats/docs/ListClientStat.md deleted file mode 100644 index 12cd3294..00000000 --- a/rest/api/v3/stats/docs/ListClientStat.md +++ /dev/null @@ -1,50 +0,0 @@ -# ListClientStat - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListClientStat**](ListClientStat.md#ListClientStat) | **Get** /v3/clients/stats | Retrieve email statistics by client type. - - - -## ListClientStat - -> []ListClientStat200ResponseInner ListClientStat(ctx, StartDateoptional) - -Retrieve email statistics by client type. - -**This endpoint allows you to retrieve your email statistics segmented by client type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListClientStatParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. -**AggregatedBy** | [**AggregatedBy2**](AggregatedBy2AggregatedBy2.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". - -### Return type - -[**[]ListClientStat200ResponseInner**](ListClientStat200ResponseInner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/stats/docs/ListClientStat200ResponseInner.md b/rest/api/v3/stats/docs/ListClientStat200ResponseInner.md deleted file mode 100644 index dfc7e624..00000000 --- a/rest/api/v3/stats/docs/ListClientStat200ResponseInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListClientStat200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Date** | **string** | The date that the statistics were gathered. |[optional] -**Stats** | [**[]ListClientStat200ResponseInnerStatsInner**](ListClientStat200ResponseInnerStatsInner.md) | The list of statistics. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/ListClientStat200ResponseInnerStatsInner.md b/rest/api/v3/stats/docs/ListClientStat200ResponseInnerStatsInner.md deleted file mode 100644 index c065ab77..00000000 --- a/rest/api/v3/stats/docs/ListClientStat200ResponseInnerStatsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListClientStat200ResponseInnerStatsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | The type of segmentation. |[optional] -**Name** | **string** | The name of the specific segmentation. |[optional] -**Metrics** | [**AdvancedStatsOpens**](AdvancedStatsOpens.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/ListDeviceStat.md b/rest/api/v3/stats/docs/ListDeviceStat.md deleted file mode 100644 index e3f910f4..00000000 --- a/rest/api/v3/stats/docs/ListDeviceStat.md +++ /dev/null @@ -1,52 +0,0 @@ -# ListDeviceStat - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListDeviceStat**](ListDeviceStat.md#ListDeviceStat) | **Get** /v3/devices/stats | Retrieve email statistics by device type. - - - -## ListDeviceStat - -> []ListClientStat200ResponseInner ListDeviceStat(ctx, StartDateoptional) - -Retrieve email statistics by device type. - -**This endpoint allows you to retrieve your email statistics segmented by the device type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. ## Available Device Types | **Device** | **Description** | **Example** | |---|---|---| | Desktop | Email software on desktop computer. | I.E., Outlook, Sparrow, or Apple Mail. | | Webmail | A web-based email client. | I.E., Yahoo, Google, AOL, or Outlook.com. | | Phone | A smart phone. | iPhone, Android, Blackberry, etc. | Tablet | A tablet computer. | iPad, android based tablet, etc. | | Other | An unrecognized device. | Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListDeviceStatParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**Limit** | **int32** | The number of results to return. -**Offset** | **int32** | The point in the list to begin retrieving results. -**AggregatedBy** | [**AggregatedBy3**](AggregatedBy3AggregatedBy3.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". -**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. - -### Return type - -[**[]ListClientStat200ResponseInner**](ListClientStat200ResponseInner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/stats/docs/ListGeoStat.md b/rest/api/v3/stats/docs/ListGeoStat.md deleted file mode 100644 index 3c66f64e..00000000 --- a/rest/api/v3/stats/docs/ListGeoStat.md +++ /dev/null @@ -1,53 +0,0 @@ -# ListGeoStat - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListGeoStat**](ListGeoStat.md#ListGeoStat) | **Get** /v3/geo/stats | Retrieve email statistics by country and state/province. - - - -## ListGeoStat - -> []ListGeoStat200ResponseInner ListGeoStat(ctx, StartDateoptional) - -Retrieve email statistics by country and state/province. - -**This endpoint allows you to retrieve your email statistics segmented by country and state/province.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [User Guide](https://wwww.twilio.com/docs/sendgrid/ui/analytics-and-reporting/stats-overview). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListGeoStatParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Country** | [**Country**](CountryCountry.md) | The country you would like to see statistics for. Currently only supported for US and CA. -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**Limit** | **int32** | The number of results to return. -**Offset** | **int32** | The point in the list to begin retrieving results. -**AggregatedBy** | [**AggregatedBy3**](AggregatedBy3AggregatedBy3.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". -**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. - -### Return type - -[**[]ListGeoStat200ResponseInner**](ListGeoStat200ResponseInner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/stats/docs/ListGeoStat200ResponseInner.md b/rest/api/v3/stats/docs/ListGeoStat200ResponseInner.md deleted file mode 100644 index b8b712fe..00000000 --- a/rest/api/v3/stats/docs/ListGeoStat200ResponseInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListGeoStat200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Date** | **string** | The date that the statistics were gathered. |[optional] -**Stats** | [**[]ListGeoStat200ResponseInnerStatsInner**](ListGeoStat200ResponseInnerStatsInner.md) | The list of statistics. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/ListGeoStat200ResponseInnerStatsInner.md b/rest/api/v3/stats/docs/ListGeoStat200ResponseInnerStatsInner.md deleted file mode 100644 index 059cb893..00000000 --- a/rest/api/v3/stats/docs/ListGeoStat200ResponseInnerStatsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListGeoStat200ResponseInnerStatsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | The type of segmentation. |[optional] -**Name** | **string** | The name of the specific segmentation. |[optional] -**Metrics** | [**AdvancedStatsClicksOpens**](AdvancedStatsClicksOpens.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/ListMailboxProviderStat.md b/rest/api/v3/stats/docs/ListMailboxProviderStat.md deleted file mode 100644 index 6500d3a7..00000000 --- a/rest/api/v3/stats/docs/ListMailboxProviderStat.md +++ /dev/null @@ -1,53 +0,0 @@ -# ListMailboxProviderStat - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListMailboxProviderStat**](ListMailboxProviderStat.md#ListMailboxProviderStat) | **Get** /v3/mailbox_providers/stats | Retrieve email statistics by mailbox provider. - - - -## ListMailboxProviderStat - -> []ListMailboxProviderStat200ResponseInner ListMailboxProviderStat(ctx, StartDateoptional) - -Retrieve email statistics by mailbox provider. - -**This endpoint allows you to retrieve your email statistics segmented by recipient mailbox provider.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListMailboxProviderStatParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**MailboxProviders** | **string** | The mail box providers to get statistics for. You can include up to 10 by including this parameter multiple times. -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**Limit** | **int32** | The number of results to return. -**Offset** | **int32** | The point in the list to begin retrieving results. -**AggregatedBy** | [**AggregatedBy3**](AggregatedBy3AggregatedBy3.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". -**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. - -### Return type - -[**[]ListMailboxProviderStat200ResponseInner**](ListMailboxProviderStat200ResponseInner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInner.md b/rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInner.md deleted file mode 100644 index 0e9cf740..00000000 --- a/rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListMailboxProviderStat200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Date** | **string** | The date that the statistics were gathered. |[optional] -**Stats** | [**[]ListMailboxProviderStat200ResponseInnerStatsInner**](ListMailboxProviderStat200ResponseInnerStatsInner.md) | The list of statistics. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInnerStatsInner.md b/rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInnerStatsInner.md deleted file mode 100644 index 73748c49..00000000 --- a/rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInnerStatsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListMailboxProviderStat200ResponseInnerStatsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | The type of segmentation. |[optional] -**Name** | **string** | The name of the specific segmentation. |[optional] -**Metrics** | [**AdvancedStatsMailboxProvider**](AdvancedStatsMailboxProvider.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/ListStat.md b/rest/api/v3/stats/docs/ListStat.md deleted file mode 100644 index b0afdd99..00000000 --- a/rest/api/v3/stats/docs/ListStat.md +++ /dev/null @@ -1,52 +0,0 @@ -# ListStat - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListStat**](ListStat.md#ListStat) | **Get** /v3/stats | Retrieve global email statistics - - - -## ListStat - -> []ListStat200ResponseInner ListStat(ctx, StartDateoptional) - -Retrieve global email statistics - -**This endpoint allows you to retrieve all of your global email statistics between a given date range.** Parent accounts can see either aggregated stats for the parent account or aggregated stats for a subuser specified in the `on-behalf-of` header. Subuser accounts will see only their own stats. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListStatParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**Limit** | **int32** | The number of results to return. -**Offset** | **int32** | The point in the list to begin retrieving results. -**AggregatedBy** | [**AggregatedBy3**](AggregatedBy3AggregatedBy3.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". -**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. - -### Return type - -[**[]ListStat200ResponseInner**](ListStat200ResponseInner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/stats/docs/ListStat200ResponseInner.md b/rest/api/v3/stats/docs/ListStat200ResponseInner.md deleted file mode 100644 index e510d3d0..00000000 --- a/rest/api/v3/stats/docs/ListStat200ResponseInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListStat200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Date** | **string** | The date the stats were gathered. | -**Stats** | [**[]ListStat200ResponseInnerStatsInner**](ListStat200ResponseInnerStatsInner.md) | The individual email activity stats. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/ListStat200ResponseInnerStatsInner.md b/rest/api/v3/stats/docs/ListStat200ResponseInnerStatsInner.md deleted file mode 100644 index 7cfd11e2..00000000 --- a/rest/api/v3/stats/docs/ListStat200ResponseInnerStatsInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListStat200ResponseInnerStatsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Metrics** | [**StatsAdvancedGlobalStats**](StatsAdvancedGlobalStats.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/SortByDirection.md b/rest/api/v3/stats/docs/SortByDirection.md deleted file mode 100644 index 0431e9a0..00000000 --- a/rest/api/v3/stats/docs/SortByDirection.md +++ /dev/null @@ -1,13 +0,0 @@ -# SortByDirection - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**DESC** | string | (value: `"desc"`) -**ASC** | string | (value: `"asc"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/docs/StatsAdvancedGlobalStats.md b/rest/api/v3/stats/docs/StatsAdvancedGlobalStats.md deleted file mode 100644 index cf8ff1d7..00000000 --- a/rest/api/v3/stats/docs/StatsAdvancedGlobalStats.md +++ /dev/null @@ -1,26 +0,0 @@ -# StatsAdvancedGlobalStats - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Clicks** | **int32** | The number of links that were clicked in your emails. |[optional] -**UniqueClicks** | **int32** | The number of unique recipients who clicked links in your emails. |[optional] -**Opens** | **int32** | The total number of times your emails were opened by recipients. |[optional] -**UniqueOpens** | **int32** | The number of unique recipients who opened your emails. |[optional] -**Blocks** | **int32** | The number of emails that were not allowed to be delivered by ISPs. |[optional] -**BounceDrops** | **int32** | The number of emails that were dropped because of a bounce. |[optional] -**Bounces** | **int32** | The number of emails that bounced instead of being delivered. |[optional] -**Deferred** | **int32** | The number of emails that temporarily could not be delivered. |[optional] -**Delivered** | **int32** | The number of emails SendGrid was able to confirm were actually delivered to a recipient. |[optional] -**InvalidEmails** | **int32** | The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. |[optional] -**Processed** | **int32** | Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. |[optional] -**Requests** | **int32** | The number of emails that were requested to be delivered. |[optional] -**SpamReportDrops** | **int32** | The number of emails that were dropped due to a recipient previously marking your emails as spam. |[optional] -**SpamReports** | **int32** | The number of recipients who marked your email as spam. |[optional] -**UnsubscribeDrops** | **int32** | The number of emails dropped due to a recipient unsubscribing from your emails. |[optional] -**Unsubscribes** | **int32** | The number of recipients who unsubscribed from your emails. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/stats/model_advanced_stats_clicks.go b/rest/api/v3/stats/model_advanced_stats_clicks.go deleted file mode 100644 index e26aca54..00000000 --- a/rest/api/v3/stats/model_advanced_stats_clicks.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AdvancedStatsClicks The individual events and their stats. -type AdvancedStatsClicks struct { - // The number of links that were clicked in your emails. - Clicks *int32 `json:"clicks,omitempty"` - // The number of unique recipients who clicked links in your emails. - UniqueClicks *int32 `json:"unique_clicks,omitempty"` -} diff --git a/rest/api/v3/stats/model_advanced_stats_clicks_opens.go b/rest/api/v3/stats/model_advanced_stats_clicks_opens.go deleted file mode 100644 index a8a339f8..00000000 --- a/rest/api/v3/stats/model_advanced_stats_clicks_opens.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AdvancedStatsClicksOpens The individual events and their stats. -type AdvancedStatsClicksOpens struct { - // The number of links that were clicked in your emails. - Clicks *int32 `json:"clicks,omitempty"` - // The number of unique recipients who clicked links in your emails. - UniqueClicks *int32 `json:"unique_clicks,omitempty"` - // The total number of times your emails were opened by recipients. - Opens *int32 `json:"opens,omitempty"` - // The number of unique recipients who opened your emails. - UniqueOpens *int32 `json:"unique_opens,omitempty"` -} diff --git a/rest/api/v3/stats/model_advanced_stats_mailbox_provider.go b/rest/api/v3/stats/model_advanced_stats_mailbox_provider.go deleted file mode 100644 index ee75f598..00000000 --- a/rest/api/v3/stats/model_advanced_stats_mailbox_provider.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AdvancedStatsMailboxProvider The individual events and their stats. -type AdvancedStatsMailboxProvider struct { - // The number of emails that were not allowed to be delivered by ISPs. - Blocks *int32 `json:"blocks,omitempty"` - // The number of emails that bounced instead of being delivered. - Bounces *int32 `json:"bounces,omitempty"` - // The number of emails that temporarily could not be delivered. - Deferred *int32 `json:"deferred,omitempty"` - // The number of emails SendGrid was able to confirm were actually delivered to a recipient. - Delivered *int32 `json:"delivered,omitempty"` - // The number of emails that were not delivered due to the recipient email address being on a suppression list. - Drops *int32 `json:"drops,omitempty"` - // The number of emails that were requested to be delivered. - Requests *int32 `json:"requests,omitempty"` - // Requests from your website, application, or mail client via SMTP Relay or the Web API that SendGrid processed. - Processed *int32 `json:"processed,omitempty"` - // The number of recipients who marked your email as spam. - SpamReports *int32 `json:"spam_reports,omitempty"` -} diff --git a/rest/api/v3/stats/model_advanced_stats_opens.go b/rest/api/v3/stats/model_advanced_stats_opens.go deleted file mode 100644 index 8af689e0..00000000 --- a/rest/api/v3/stats/model_advanced_stats_opens.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AdvancedStatsOpens The individual events and their stats. -type AdvancedStatsOpens struct { - // The total number of times your emails were opened by recipients. - Opens *int32 `json:"opens,omitempty"` - // The number of unique recipients who opened your emails. - UniqueOpens *int32 `json:"unique_opens,omitempty"` -} diff --git a/rest/api/v3/stats/model_aggregated_by.go b/rest/api/v3/stats/model_aggregated_by.go deleted file mode 100644 index 7030e628..00000000 --- a/rest/api/v3/stats/model_aggregated_by.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AggregatedBy the model 'AggregatedBy' -type AggregatedBy string - -// List of AggregatedBy -const ( - AGGREGATEDBY_DAY AggregatedBy = "day" - AGGREGATEDBY_WEEK AggregatedBy = "week" - AGGREGATEDBY_MONTH AggregatedBy = "month" -) diff --git a/rest/api/v3/stats/model_aggregated_by1.go b/rest/api/v3/stats/model_aggregated_by1.go deleted file mode 100644 index 1d03db31..00000000 --- a/rest/api/v3/stats/model_aggregated_by1.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AggregatedBy1 the model 'AggregatedBy1' -type AggregatedBy1 string - -// List of AggregatedBy1 -const ( - AGGREGATEDBY1_DAY AggregatedBy1 = "day" - AGGREGATEDBY1_WEEK AggregatedBy1 = "week" - AGGREGATEDBY1_MONTH AggregatedBy1 = "month" -) diff --git a/rest/api/v3/stats/model_aggregated_by2.go b/rest/api/v3/stats/model_aggregated_by2.go deleted file mode 100644 index d9a0ac73..00000000 --- a/rest/api/v3/stats/model_aggregated_by2.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AggregatedBy2 the model 'AggregatedBy2' -type AggregatedBy2 string - -// List of AggregatedBy2 -const ( - AGGREGATEDBY2_DAY AggregatedBy2 = "day" - AGGREGATEDBY2_WEEK AggregatedBy2 = "week" - AGGREGATEDBY2_MONTH AggregatedBy2 = "month" -) diff --git a/rest/api/v3/stats/model_aggregated_by3.go b/rest/api/v3/stats/model_aggregated_by3.go deleted file mode 100644 index f5d4b9e4..00000000 --- a/rest/api/v3/stats/model_aggregated_by3.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AggregatedBy3 the model 'AggregatedBy3' -type AggregatedBy3 string - -// List of AggregatedBy3 -const ( - AGGREGATEDBY3_DAY AggregatedBy3 = "day" - AGGREGATEDBY3_WEEK AggregatedBy3 = "week" - AGGREGATEDBY3_MONTH AggregatedBy3 = "month" -) diff --git a/rest/api/v3/stats/model_category_stats.go b/rest/api/v3/stats/model_category_stats.go deleted file mode 100644 index 67f280ca..00000000 --- a/rest/api/v3/stats/model_category_stats.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CategoryStats struct for CategoryStats -type CategoryStats struct { - // The date the statistics were gathered. - Date string `json:"date"` - Stats *[]CategoryStatsStatsInner `json:"stats,omitempty"` -} diff --git a/rest/api/v3/stats/model_category_stats_stats_inner.go b/rest/api/v3/stats/model_category_stats_stats_inner.go deleted file mode 100644 index 9484fa58..00000000 --- a/rest/api/v3/stats/model_category_stats_stats_inner.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CategoryStatsStatsInner struct for CategoryStatsStatsInner -type CategoryStatsStatsInner struct { - Metrics *CategoryStatsStatsInnerMetrics `json:"metrics,omitempty"` - // The name of the category. - Name *string `json:"name,omitempty"` - // How you are segmenting your statistics. - Type string `json:"type"` -} diff --git a/rest/api/v3/stats/model_category_stats_stats_inner_metrics.go b/rest/api/v3/stats/model_category_stats_stats_inner_metrics.go deleted file mode 100644 index 99765698..00000000 --- a/rest/api/v3/stats/model_category_stats_stats_inner_metrics.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CategoryStatsStatsInnerMetrics struct for CategoryStatsStatsInnerMetrics -type CategoryStatsStatsInnerMetrics struct { - // The number of emails that were not allowed to be delivered by ISPs. - Blocks int32 `json:"blocks"` - // The number of emails that were dropped because of a bounce. - BounceDrops int32 `json:"bounce_drops"` - // The number of emails that bounced instead of being delivered. - Bounces int32 `json:"bounces"` - // The number of links that were clicked. - Clicks int32 `json:"clicks"` - // The number of emails that temporarily could not be delivered. - Deferred int32 `json:"deferred"` - // The number of emails SendGrid was able to confirm were actually delivered to a recipient. - Delivered int32 `json:"delivered"` - // The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. - InvalidEmails int32 `json:"invalid_emails"` - // The total number of times your emails were opened by recipients. - Opens int32 `json:"opens"` - // Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. - Processed int32 `json:"processed"` - // The number of emails that were requested to be delivered. - Requests int32 `json:"requests"` - // The number of emails that were dropped due to a recipient previously marking your emails as spam. - SpamReportDrops int32 `json:"spam_report_drops"` - // The number of recipients who marked your email as spam. - SpamReports int32 `json:"spam_reports"` - // The number of unique recipients who clicked links in your emails. - UniqueClicks int32 `json:"unique_clicks"` - // The number of unique recipients who opened your emails. - UniqueOpens int32 `json:"unique_opens"` - // The number of emails dropped due to a recipient unsubscribing from your emails. - UnsubscribeDrops int32 `json:"unsubscribe_drops"` - // The number of recipients who unsubscribed from your emails. - Unsubscribes int32 `json:"unsubscribes"` -} diff --git a/rest/api/v3/stats/model_client_type.go b/rest/api/v3/stats/model_client_type.go deleted file mode 100644 index 3c36ab04..00000000 --- a/rest/api/v3/stats/model_client_type.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ClientType the model 'ClientType' -type ClientType string - -// List of ClientType -const ( - CLIENTTYPE_PHONE ClientType = "phone" - CLIENTTYPE_TABLET ClientType = "tablet" - CLIENTTYPE_WEBMAIL ClientType = "webmail" - CLIENTTYPE_DESKTOP ClientType = "desktop" -) diff --git a/rest/api/v3/stats/model_country.go b/rest/api/v3/stats/model_country.go deleted file mode 100644 index 867da48a..00000000 --- a/rest/api/v3/stats/model_country.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Country the model 'Country' -type Country string - -// List of Country -const ( - COUNTRY_US Country = "US" - COUNTRY_CA Country = "CA" -) diff --git a/rest/api/v3/stats/model_list_browser_stat_200_response_inner.go b/rest/api/v3/stats/model_list_browser_stat_200_response_inner.go deleted file mode 100644 index 6abdbd78..00000000 --- a/rest/api/v3/stats/model_list_browser_stat_200_response_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListBrowserStat200ResponseInner struct for ListBrowserStat200ResponseInner -type ListBrowserStat200ResponseInner struct { - // The date that the statistics were gathered. - Date *string `json:"date,omitempty"` - // The list of statistics. - Stats *[]ListBrowserStat200ResponseInnerStatsInner `json:"stats,omitempty"` -} diff --git a/rest/api/v3/stats/model_list_browser_stat_200_response_inner_stats_inner.go b/rest/api/v3/stats/model_list_browser_stat_200_response_inner_stats_inner.go deleted file mode 100644 index b33842eb..00000000 --- a/rest/api/v3/stats/model_list_browser_stat_200_response_inner_stats_inner.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListBrowserStat200ResponseInnerStatsInner struct for ListBrowserStat200ResponseInnerStatsInner -type ListBrowserStat200ResponseInnerStatsInner struct { - // The type of segmentation. - Type *string `json:"type,omitempty"` - // The name of the specific segmentation. - Name *string `json:"name,omitempty"` - Metrics *AdvancedStatsClicks `json:"metrics,omitempty"` -} diff --git a/rest/api/v3/stats/model_list_category_200_response_inner.go b/rest/api/v3/stats/model_list_category_200_response_inner.go deleted file mode 100644 index 8b6aa73d..00000000 --- a/rest/api/v3/stats/model_list_category_200_response_inner.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListCategory200ResponseInner struct for ListCategory200ResponseInner -type ListCategory200ResponseInner struct { - // A category used to group emails by broad topic. - Category string `json:"category"` -} diff --git a/rest/api/v3/stats/model_list_category_400_response.go b/rest/api/v3/stats/model_list_category_400_response.go deleted file mode 100644 index 1ddd6eb7..00000000 --- a/rest/api/v3/stats/model_list_category_400_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListCategory400Response struct for ListCategory400Response -type ListCategory400Response struct { - // The error returned. - Errors *[]ListCategory400ResponseErrorsInner `json:"errors,omitempty"` -} diff --git a/rest/api/v3/stats/model_list_category_400_response_errors_inner.go b/rest/api/v3/stats/model_list_category_400_response_errors_inner.go deleted file mode 100644 index 33dbbfe5..00000000 --- a/rest/api/v3/stats/model_list_category_400_response_errors_inner.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListCategory400ResponseErrorsInner struct for ListCategory400ResponseErrorsInner -type ListCategory400ResponseErrorsInner struct { - Field string `json:"field"` - // A message explaining why your categories could not be retrieved. - Message string `json:"message"` -} diff --git a/rest/api/v3/stats/model_list_client_stat_200_response_inner.go b/rest/api/v3/stats/model_list_client_stat_200_response_inner.go deleted file mode 100644 index f7f802fd..00000000 --- a/rest/api/v3/stats/model_list_client_stat_200_response_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListClientStat200ResponseInner struct for ListClientStat200ResponseInner -type ListClientStat200ResponseInner struct { - // The date that the statistics were gathered. - Date *string `json:"date,omitempty"` - // The list of statistics. - Stats *[]ListClientStat200ResponseInnerStatsInner `json:"stats,omitempty"` -} diff --git a/rest/api/v3/stats/model_list_client_stat_200_response_inner_stats_inner.go b/rest/api/v3/stats/model_list_client_stat_200_response_inner_stats_inner.go deleted file mode 100644 index fc6e6ec6..00000000 --- a/rest/api/v3/stats/model_list_client_stat_200_response_inner_stats_inner.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListClientStat200ResponseInnerStatsInner struct for ListClientStat200ResponseInnerStatsInner -type ListClientStat200ResponseInnerStatsInner struct { - // The type of segmentation. - Type *string `json:"type,omitempty"` - // The name of the specific segmentation. - Name *string `json:"name,omitempty"` - Metrics *AdvancedStatsOpens `json:"metrics,omitempty"` -} diff --git a/rest/api/v3/stats/model_list_geo_stat_200_response_inner.go b/rest/api/v3/stats/model_list_geo_stat_200_response_inner.go deleted file mode 100644 index 2c097da9..00000000 --- a/rest/api/v3/stats/model_list_geo_stat_200_response_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListGeoStat200ResponseInner struct for ListGeoStat200ResponseInner -type ListGeoStat200ResponseInner struct { - // The date that the statistics were gathered. - Date *string `json:"date,omitempty"` - // The list of statistics. - Stats *[]ListGeoStat200ResponseInnerStatsInner `json:"stats,omitempty"` -} diff --git a/rest/api/v3/stats/model_list_geo_stat_200_response_inner_stats_inner.go b/rest/api/v3/stats/model_list_geo_stat_200_response_inner_stats_inner.go deleted file mode 100644 index 0b755f7e..00000000 --- a/rest/api/v3/stats/model_list_geo_stat_200_response_inner_stats_inner.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListGeoStat200ResponseInnerStatsInner struct for ListGeoStat200ResponseInnerStatsInner -type ListGeoStat200ResponseInnerStatsInner struct { - // The type of segmentation. - Type *string `json:"type,omitempty"` - // The name of the specific segmentation. - Name *string `json:"name,omitempty"` - Metrics *AdvancedStatsClicksOpens `json:"metrics,omitempty"` -} diff --git a/rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner.go b/rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner.go deleted file mode 100644 index 94550611..00000000 --- a/rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListMailboxProviderStat200ResponseInner struct for ListMailboxProviderStat200ResponseInner -type ListMailboxProviderStat200ResponseInner struct { - // The date that the statistics were gathered. - Date *string `json:"date,omitempty"` - // The list of statistics. - Stats *[]ListMailboxProviderStat200ResponseInnerStatsInner `json:"stats,omitempty"` -} diff --git a/rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner_stats_inner.go b/rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner_stats_inner.go deleted file mode 100644 index 049a1771..00000000 --- a/rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner_stats_inner.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListMailboxProviderStat200ResponseInnerStatsInner struct for ListMailboxProviderStat200ResponseInnerStatsInner -type ListMailboxProviderStat200ResponseInnerStatsInner struct { - // The type of segmentation. - Type *string `json:"type,omitempty"` - // The name of the specific segmentation. - Name *string `json:"name,omitempty"` - Metrics *AdvancedStatsMailboxProvider `json:"metrics,omitempty"` -} diff --git a/rest/api/v3/stats/model_list_stat_200_response_inner.go b/rest/api/v3/stats/model_list_stat_200_response_inner.go deleted file mode 100644 index ff32341b..00000000 --- a/rest/api/v3/stats/model_list_stat_200_response_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListStat200ResponseInner struct for ListStat200ResponseInner -type ListStat200ResponseInner struct { - // The date the stats were gathered. - Date string `json:"date"` - // The individual email activity stats. - Stats []ListStat200ResponseInnerStatsInner `json:"stats"` -} diff --git a/rest/api/v3/stats/model_list_stat_200_response_inner_stats_inner.go b/rest/api/v3/stats/model_list_stat_200_response_inner_stats_inner.go deleted file mode 100644 index 5ff7e17f..00000000 --- a/rest/api/v3/stats/model_list_stat_200_response_inner_stats_inner.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListStat200ResponseInnerStatsInner struct for ListStat200ResponseInnerStatsInner -type ListStat200ResponseInnerStatsInner struct { - Metrics *StatsAdvancedGlobalStats `json:"metrics,omitempty"` -} diff --git a/rest/api/v3/stats/model_sort_by_direction.go b/rest/api/v3/stats/model_sort_by_direction.go deleted file mode 100644 index 83900dd5..00000000 --- a/rest/api/v3/stats/model_sort_by_direction.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SortByDirection the model 'SortByDirection' -type SortByDirection string - -// List of SortByDirection -const ( - SORTBYDIRECTION_DESC SortByDirection = "desc" - SORTBYDIRECTION_ASC SortByDirection = "asc" -) diff --git a/rest/api/v3/stats/model_stats_advanced_global_stats.go b/rest/api/v3/stats/model_stats_advanced_global_stats.go deleted file mode 100644 index 1a7151de..00000000 --- a/rest/api/v3/stats/model_stats_advanced_global_stats.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Statistics API -* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// StatsAdvancedGlobalStats struct for StatsAdvancedGlobalStats -type StatsAdvancedGlobalStats struct { - // The number of links that were clicked in your emails. - Clicks *int32 `json:"clicks,omitempty"` - // The number of unique recipients who clicked links in your emails. - UniqueClicks *int32 `json:"unique_clicks,omitempty"` - // The total number of times your emails were opened by recipients. - Opens *int32 `json:"opens,omitempty"` - // The number of unique recipients who opened your emails. - UniqueOpens *int32 `json:"unique_opens,omitempty"` - // The number of emails that were not allowed to be delivered by ISPs. - Blocks *int32 `json:"blocks,omitempty"` - // The number of emails that were dropped because of a bounce. - BounceDrops *int32 `json:"bounce_drops,omitempty"` - // The number of emails that bounced instead of being delivered. - Bounces *int32 `json:"bounces,omitempty"` - // The number of emails that temporarily could not be delivered. - Deferred *int32 `json:"deferred,omitempty"` - // The number of emails SendGrid was able to confirm were actually delivered to a recipient. - Delivered *int32 `json:"delivered,omitempty"` - // The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. - InvalidEmails *int32 `json:"invalid_emails,omitempty"` - // Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. - Processed *int32 `json:"processed,omitempty"` - // The number of emails that were requested to be delivered. - Requests *int32 `json:"requests,omitempty"` - // The number of emails that were dropped due to a recipient previously marking your emails as spam. - SpamReportDrops *int32 `json:"spam_report_drops,omitempty"` - // The number of recipients who marked your email as spam. - SpamReports *int32 `json:"spam_reports,omitempty"` - // The number of emails dropped due to a recipient unsubscribing from your emails. - UnsubscribeDrops *int32 `json:"unsubscribe_drops,omitempty"` - // The number of recipients who unsubscribed from your emails. - Unsubscribes *int32 `json:"unsubscribes,omitempty"` -} diff --git a/rest/api/v3/subusers/.openapi-generator b/rest/api/v3/subusers/.openapi-generator deleted file mode 100644 index 93ad55b9..00000000 --- a/rest/api/v3/subusers/.openapi-generator +++ /dev/null @@ -1,96 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_create_subuser.go -api_delete_subuser.go -api_get_subuser_credit.go -api_list_monthly_stat.go -api_list_reputation.go -api_list_stat.go -api_list_stat_sum.go -api_list_subuser.go -api_list_subuser_monthly_stat.go -api_service.go -api_update_subuser.go -api_update_subuser_credit.go -api_update_subuser_ip.go -api_update_subuser_remaining_credit.go -api_update_subuser_website_access.go -docs/AggregatedBy.md -docs/CategoryStats.md -docs/CategoryStatsStatsInner.md -docs/CategoryStatsStatsInnerMetrics.md -docs/CreateSubuser.md -docs/CreateSubuserRequest.md -docs/DeleteSubuser.md -docs/ErrorResponse.md -docs/ErrorResponseErrorsInner.md -docs/GetSubuserCredit.md -docs/ListMonthlyStat.md -docs/ListReputation.md -docs/ListReputation200ResponseInner.md -docs/ListStat.md -docs/ListStatSum.md -docs/ListSubuser.md -docs/ListSubuserMonthlyStat.md -docs/Region.md -docs/Region1.md -docs/Region2.md -docs/Region3.md -docs/ResetFrequency.md -docs/ResetFrequency1.md -docs/SortByDirection.md -docs/SortByDirection1.md -docs/SortByDirection2.md -docs/SortByMetric.md -docs/Subuser.md -docs/SubuserCredits.md -docs/SubuserCreditsRequest.md -docs/SubuserPost.md -docs/SubuserPostCreditAllocation.md -docs/SubuserStats.md -docs/SubuserStatsStatsInner.md -docs/SubuserStatsStatsInnerMetrics.md -docs/Type.md -docs/Type1.md -docs/UpdateSubuser.md -docs/UpdateSubuserCredit.md -docs/UpdateSubuserIp.md -docs/UpdateSubuserIp200Response.md -docs/UpdateSubuserRemainingCredit.md -docs/UpdateSubuserRemainingCreditRequest.md -docs/UpdateSubuserRequest.md -docs/UpdateSubuserWebsiteAccess.md -docs/UpdateSubuserWebsiteAccessRequest.md -model_aggregated_by.go -model_category_stats.go -model_category_stats_stats_inner.go -model_category_stats_stats_inner_metrics.go -model_create_subuser_request.go -model_error_response.go -model_error_response_errors_inner.go -model_list_reputation_200_response_inner.go -model_region.go -model_region1.go -model_region2.go -model_region3.go -model_reset_frequency.go -model_reset_frequency1.go -model_sort_by_direction.go -model_sort_by_direction1.go -model_sort_by_direction2.go -model_sort_by_metric.go -model_subuser.go -model_subuser_credits.go -model_subuser_credits_request.go -model_subuser_post.go -model_subuser_post_credit_allocation.go -model_subuser_stats.go -model_subuser_stats_stats_inner.go -model_subuser_stats_stats_inner_metrics.go -model_type.go -model_type1.go -model_update_subuser_ip_200_response.go -model_update_subuser_remaining_credit_request.go -model_update_subuser_request.go -model_update_subuser_website_access_request.go diff --git a/rest/api/v3/subusers/.openapi-generator-ignore b/rest/api/v3/subusers/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/subusers/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/subusers/README.md b/rest/api/v3/subusers/README.md deleted file mode 100644 index 43572810..00000000 --- a/rest/api/v3/subusers/README.md +++ /dev/null @@ -1,106 +0,0 @@ -# Go API client for - -The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. - -You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:38.481145+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*CreateSubuser* | [**CreateSubuser**](docs/CreateSubuser.md#createsubuser) | **Post** /v3/subusers | Create Subuser -*DeleteSubuser* | [**DeleteSubuser**](docs/DeleteSubuser.md#deletesubuser) | **Delete** /v3/subusers/{SubuserName} | Delete a subuser -*GetSubuserCredit* | [**GetSubuserCredit**](docs/GetSubuserCredit.md#getsubusercredit) | **Get** /v3/subusers/{SubuserName}/credits | Get the Credits for a Subuser -*ListMonthlyStat* | [**ListMonthlyStat**](docs/ListMonthlyStat.md#listmonthlystat) | **Get** /v3/subusers/stats/monthly | Retrieve monthly stats for all subusers -*ListReputation* | [**ListReputation**](docs/ListReputation.md#listreputation) | **Get** /v3/subusers/reputations | Retrieve Subuser Reputations -*ListStat* | [**ListStat**](docs/ListStat.md#liststat) | **Get** /v3/subusers/stats | Retrieve email statistics for your subusers. -*ListStatSum* | [**ListStatSum**](docs/ListStatSum.md#liststatsum) | **Get** /v3/subusers/stats/sums | Retrieve the totals for each email statistic metric for all subusers. -*ListSubuser* | [**ListSubuser**](docs/ListSubuser.md#listsubuser) | **Get** /v3/subusers | List all Subusers -*ListSubuserMonthlyStat* | [**ListSubuserMonthlyStat**](docs/ListSubuserMonthlyStat.md#listsubusermonthlystat) | **Get** /v3/subusers/{SubuserName}/stats/monthly | Retrieve the monthly email statistics for a single subuser -*UpdateSubuser* | [**UpdateSubuser**](docs/UpdateSubuser.md#updatesubuser) | **Patch** /v3/subusers/{SubuserName} | Enable/disable a subuser -*UpdateSubuserCredit* | [**UpdateSubuserCredit**](docs/UpdateSubuserCredit.md#updatesubusercredit) | **Put** /v3/subusers/{SubuserName}/credits | Update the Credits for a Subuser -*UpdateSubuserIp* | [**UpdateSubuserIp**](docs/UpdateSubuserIp.md#updatesubuserip) | **Put** /v3/subusers/{SubuserName}/ips | Update IPs assigned to a subuser -*UpdateSubuserRemainingCredit* | [**UpdateSubuserRemainingCredit**](docs/UpdateSubuserRemainingCredit.md#updatesubuserremainingcredit) | **Patch** /v3/subusers/{SubuserName}/credits/remaining | Update the remaining credits for a Subuser -*UpdateSubuserWebsiteAccess* | [**UpdateSubuserWebsiteAccess**](docs/UpdateSubuserWebsiteAccess.md#updatesubuserwebsiteaccess) | **Patch** /v3/subusers/{SubuserName}/website_access | Enable/Disable website access for a Subuser - - -## Documentation For Models - - - [AggregatedBy](AggregatedBy.md) - - [CategoryStats](CategoryStats.md) - - [CategoryStatsStatsInner](CategoryStatsStatsInner.md) - - [CategoryStatsStatsInnerMetrics](CategoryStatsStatsInnerMetrics.md) - - [CreateSubuserRequest](CreateSubuserRequest.md) - - [ErrorResponse](ErrorResponse.md) - - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) - - [ListReputation200ResponseInner](ListReputation200ResponseInner.md) - - [Region](Region.md) - - [Region1](Region1.md) - - [Region2](Region2.md) - - [Region3](Region3.md) - - [ResetFrequency](ResetFrequency.md) - - [ResetFrequency1](ResetFrequency1.md) - - [SortByDirection](SortByDirection.md) - - [SortByDirection1](SortByDirection1.md) - - [SortByDirection2](SortByDirection2.md) - - [SortByMetric](SortByMetric.md) - - [Subuser](Subuser.md) - - [SubuserCredits](SubuserCredits.md) - - [SubuserCreditsRequest](SubuserCreditsRequest.md) - - [SubuserPost](SubuserPost.md) - - [SubuserPostCreditAllocation](SubuserPostCreditAllocation.md) - - [SubuserStats](SubuserStats.md) - - [SubuserStatsStatsInner](SubuserStatsStatsInner.md) - - [SubuserStatsStatsInnerMetrics](SubuserStatsStatsInnerMetrics.md) - - [Type](Type.md) - - [Type1](Type1.md) - - [UpdateSubuserIp200Response](UpdateSubuserIp200Response.md) - - [UpdateSubuserRemainingCreditRequest](UpdateSubuserRemainingCreditRequest.md) - - [UpdateSubuserRequest](UpdateSubuserRequest.md) - - [UpdateSubuserWebsiteAccessRequest](UpdateSubuserWebsiteAccessRequest.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/subusers/api_create_subuser.go b/rest/api/v3/subusers/api_create_subuser.go deleted file mode 100644 index af6449b6..00000000 --- a/rest/api/v3/subusers/api_create_subuser.go +++ /dev/null @@ -1,97 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type CreateSubuserParam struct { - // - CreateSubuserRequest *CreateSubuserRequest `json:"CreateSubuserRequest,omitempty"` -} - -func (params *CreateSubuserParam) SetCreateSubuserRequest(CreateSubuserRequest CreateSubuserRequest) *CreateSubuserParam { - params.CreateSubuserRequest = &CreateSubuserRequest - return params -} - -// **This endpoint allows you to create a new subuser.** -func (c *ApiService) CreateSubuser(params *CreateSubuserParam) (interface{}, error) { - path := "/v3/subusers" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.CreateSubuserRequest != nil { - b, err := json.Marshal(*params.CreateSubuserRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SubuserPost{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/subusers/api_delete_subuser.go b/rest/api/v3/subusers/api_delete_subuser.go deleted file mode 100644 index 25dd98f0..00000000 --- a/rest/api/v3/subusers/api_delete_subuser.go +++ /dev/null @@ -1,69 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteSubuserParam struct { - // The username of the Subuser. - SubuserName *string `json:"subuser_name"` -} - -func (params *DeleteSubuserParam) SetSubuserName(SubuserName string) *DeleteSubuserParam { - params.SubuserName = &SubuserName - return params -} - -// **This endpoint allows you to delete a subuser.** This is a permanent action. Once deleted, a subuser cannot be retrieved. -func (c *ApiService) DeleteSubuser(params *DeleteSubuserParam) (interface{}, error) { - path := "/v3/subusers/{SubuserName}" - if params != nil && params.SubuserName != nil { - path = strings.Replace(path, "{"+"SubuserName"+"}", *params.SubuserName, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/subusers/api_get_subuser_credit.go b/rest/api/v3/subusers/api_get_subuser_credit.go deleted file mode 100644 index 21b2685d..00000000 --- a/rest/api/v3/subusers/api_get_subuser_credit.go +++ /dev/null @@ -1,69 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetSubuserCreditParam struct { - // The username of the Subuser. - SubuserName *string `json:"subuser_name"` -} - -func (params *GetSubuserCreditParam) SetSubuserName(SubuserName string) *GetSubuserCreditParam { - params.SubuserName = &SubuserName - return params -} - -// **This endpoint allows you to retrieve a Credits overview for a Subuser.** -func (c *ApiService) GetSubuserCredit(params *GetSubuserCreditParam) (interface{}, error) { - path := "/v3/subusers/{SubuserName}/credits" - if params != nil && params.SubuserName != nil { - path = strings.Replace(path, "{"+"SubuserName"+"}", *params.SubuserName, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SubuserCredits{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/subusers/api_list_monthly_stat.go b/rest/api/v3/subusers/api_list_monthly_stat.go deleted file mode 100644 index 59b2be2a..00000000 --- a/rest/api/v3/subusers/api_list_monthly_stat.go +++ /dev/null @@ -1,106 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListMonthlyStatParam struct { - // The date of the month to retrieve statistics for. Must be formatted YYYY-MM-DD - Date *string `json:"date"` - // A substring search of your subusers. - Subuser *string `json:"subuser,omitempty"` - // The metric that you want to sort by. Metrics that you can sort by are: `blocks`, `bounces`, `clicks`, `delivered`, `opens`, `requests`, `unique_clicks`, `unique_opens`, and `unsubscribes`.' - SortByMetric *SortByMetric `json:"sort_by_metric,omitempty"` - // The direction you want to sort. - SortByDirection *SortByDirection1 `json:"sort_by_direction,omitempty"` - // Optional field to limit the number of results returned. - Limit *int32 `json:"limit,omitempty"` - // Optional beginning point in the list to retrieve from. - Offset *int32 `json:"offset,omitempty"` -} - -func (params *ListMonthlyStatParam) SetDate(Date string) *ListMonthlyStatParam { - params.Date = &Date - return params -} -func (params *ListMonthlyStatParam) SetSubuser(Subuser string) *ListMonthlyStatParam { - params.Subuser = &Subuser - return params -} -func (params *ListMonthlyStatParam) SetSortByMetric(SortByMetric SortByMetric) *ListMonthlyStatParam { - params.SortByMetric = &SortByMetric - return params -} -func (params *ListMonthlyStatParam) SetSortByDirection(SortByDirection SortByDirection1) *ListMonthlyStatParam { - params.SortByDirection = &SortByDirection - return params -} -func (params *ListMonthlyStatParam) SetLimit(Limit int32) *ListMonthlyStatParam { - params.Limit = &Limit - return params -} -func (params *ListMonthlyStatParam) SetOffset(Offset int32) *ListMonthlyStatParam { - params.Offset = &Offset - return params -} - -// **This endpoint allows you to retrieve the monthly email statistics for all subusers over the given date range.** When using the `sort_by_metric` to sort your stats by a specific metric, you can not sort by the following metrics: `bounce_drops`, `deferred`, `invalid_emails`, `processed`, `spam_report_drops`, `spam_reports`, or `unsubscribe_drops`. -func (c *ApiService) ListMonthlyStat(params *ListMonthlyStatParam) (interface{}, error) { - path := "/v3/subusers/stats/monthly" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Date != nil { - data.Set("date", *params.Date) - } - if params != nil && params.Subuser != nil { - data.Set("subuser", *params.Subuser) - } - if params != nil && params.SortByMetric != nil { - data.Set("sort_by_metric", fmt.Sprint(*params.SortByMetric)) - } - if params != nil && params.SortByDirection != nil { - data.Set("sort_by_direction", fmt.Sprint(*params.SortByDirection)) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SubuserStats{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/subusers/api_list_reputation.go b/rest/api/v3/subusers/api_list_reputation.go deleted file mode 100644 index 7596a15b..00000000 --- a/rest/api/v3/subusers/api_list_reputation.go +++ /dev/null @@ -1,60 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListReputationParam struct { - // - Usernames *string `json:"usernames,omitempty"` -} - -func (params *ListReputationParam) SetUsernames(Usernames string) *ListReputationParam { - params.Usernames = &Usernames - return params -} - -// **This endpoint allows you to request the reputations for your subusers.** Subuser sender reputations give a good idea how well a sender is doing with regards to how recipients and recipient servers react to the mail that is being received. When a bounce, spam report, or other negative action happens on a sent email, it will affect your sender rating. -func (c *ApiService) ListReputation(params *ListReputationParam) (interface{}, error) { - path := "/v3/subusers/reputations" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Usernames != nil { - data.Set("usernames", *params.Usernames) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]ListReputation200ResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/subusers/api_list_stat.go b/rest/api/v3/subusers/api_list_stat.go deleted file mode 100644 index b321a419..00000000 --- a/rest/api/v3/subusers/api_list_stat.go +++ /dev/null @@ -1,106 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListStatParam struct { - // The subuser you want to retrieve statistics for. You may include this parameter up to 10 times to retrieve statistics for multiple subusers. - Subusers *string `json:"subusers"` - // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. - StartDate *string `json:"start_date"` - // Limits the number of results returned per page. - Limit *int32 `json:"limit,omitempty"` - // The point in the list to begin retrieving results from. - Offset *int32 `json:"offset,omitempty"` - // How to group the statistics. Must be either \"day\", \"week\", or \"month\". - AggregatedBy *AggregatedBy `json:"aggregated_by,omitempty"` - // The end date of the statistics to retrieve. Defaults to today. - EndDate *string `json:"end_date,omitempty"` -} - -func (params *ListStatParam) SetSubusers(Subusers string) *ListStatParam { - params.Subusers = &Subusers - return params -} -func (params *ListStatParam) SetStartDate(StartDate string) *ListStatParam { - params.StartDate = &StartDate - return params -} -func (params *ListStatParam) SetLimit(Limit int32) *ListStatParam { - params.Limit = &Limit - return params -} -func (params *ListStatParam) SetOffset(Offset int32) *ListStatParam { - params.Offset = &Offset - return params -} -func (params *ListStatParam) SetAggregatedBy(AggregatedBy AggregatedBy) *ListStatParam { - params.AggregatedBy = &AggregatedBy - return params -} -func (params *ListStatParam) SetEndDate(EndDate string) *ListStatParam { - params.EndDate = &EndDate - return params -} - -// **This endpoint allows you to retrieve the email statistics for the given subusers.** You may retrieve statistics for up to 10 different subusers by including an additional _subusers_ parameter for each additional subuser. -func (c *ApiService) ListStat(params *ListStatParam) (interface{}, error) { - path := "/v3/subusers/stats" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Subusers != nil { - data.Set("subusers", *params.Subusers) - } - if params != nil && params.StartDate != nil { - data.Set("start_date", *params.StartDate) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - if params != nil && params.AggregatedBy != nil { - data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) - } - if params != nil && params.EndDate != nil { - data.Set("end_date", *params.EndDate) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]CategoryStats{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/subusers/api_list_stat_sum.go b/rest/api/v3/subusers/api_list_stat_sum.go deleted file mode 100644 index 3ebaae68..00000000 --- a/rest/api/v3/subusers/api_list_stat_sum.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListStatSumParam struct { - // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. - StartDate *string `json:"start_date"` - // The direction you want to sort. - SortByDirection *SortByDirection2 `json:"sort_by_direction,omitempty"` - // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. - EndDate *string `json:"end_date,omitempty"` - // Limits the number of results returned per page. - Limit *int32 `json:"limit,omitempty"` - // The point in the list to begin retrieving results from. - Offset *int32 `json:"offset,omitempty"` - // How to group the statistics. Defaults to today. Must follow format YYYY-MM-DD. - AggregatedBy *string `json:"aggregated_by,omitempty"` - // The metric that you want to sort by. Must be a single metric. - SortByMetric *string `json:"sort_by_metric,omitempty"` -} - -func (params *ListStatSumParam) SetStartDate(StartDate string) *ListStatSumParam { - params.StartDate = &StartDate - return params -} -func (params *ListStatSumParam) SetSortByDirection(SortByDirection SortByDirection2) *ListStatSumParam { - params.SortByDirection = &SortByDirection - return params -} -func (params *ListStatSumParam) SetEndDate(EndDate string) *ListStatSumParam { - params.EndDate = &EndDate - return params -} -func (params *ListStatSumParam) SetLimit(Limit int32) *ListStatSumParam { - params.Limit = &Limit - return params -} -func (params *ListStatSumParam) SetOffset(Offset int32) *ListStatSumParam { - params.Offset = &Offset - return params -} -func (params *ListStatSumParam) SetAggregatedBy(AggregatedBy string) *ListStatSumParam { - params.AggregatedBy = &AggregatedBy - return params -} -func (params *ListStatSumParam) SetSortByMetric(SortByMetric string) *ListStatSumParam { - params.SortByMetric = &SortByMetric - return params -} - -// **This endpoint allows you to retrieve the total sums of each email statistic metric for all subusers over the given date range.** -func (c *ApiService) ListStatSum(params *ListStatSumParam) (interface{}, error) { - path := "/v3/subusers/stats/sums" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.StartDate != nil { - data.Set("start_date", *params.StartDate) - } - if params != nil && params.SortByDirection != nil { - data.Set("sort_by_direction", fmt.Sprint(*params.SortByDirection)) - } - if params != nil && params.EndDate != nil { - data.Set("end_date", *params.EndDate) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - if params != nil && params.AggregatedBy != nil { - data.Set("aggregated_by", *params.AggregatedBy) - } - if params != nil && params.SortByMetric != nil { - data.Set("sort_by_metric", *params.SortByMetric) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &CategoryStats{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/subusers/api_list_subuser.go b/rest/api/v3/subusers/api_list_subuser.go deleted file mode 100644 index 80d7f2db..00000000 --- a/rest/api/v3/subusers/api_list_subuser.go +++ /dev/null @@ -1,105 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListSubuserParam struct { - // The username of this subuser. - Username *string `json:"username,omitempty"` - // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. - Limit *int32 `json:"limit,omitempty"` - // Filter for Subusers in this region. If not provided, all Subusers will be returned. All users can also be explicitly requested by using the filter `all`. Users who are not pinned to a region will be displayed as `global`. - Region *Region `json:"region,omitempty"` - // Optional flag to include the regions of the Subusers in the response. If not provided, the region will be omitted from the response. - IncludeRegion *bool `json:"include_region,omitempty"` - // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. - Offset *int32 `json:"offset,omitempty"` -} - -func (params *ListSubuserParam) SetUsername(Username string) *ListSubuserParam { - params.Username = &Username - return params -} -func (params *ListSubuserParam) SetLimit(Limit int32) *ListSubuserParam { - params.Limit = &Limit - return params -} -func (params *ListSubuserParam) SetRegion(Region Region) *ListSubuserParam { - params.Region = &Region - return params -} -func (params *ListSubuserParam) SetIncludeRegion(IncludeRegion bool) *ListSubuserParam { - params.IncludeRegion = &IncludeRegion - return params -} -func (params *ListSubuserParam) SetOffset(Offset int32) *ListSubuserParam { - params.Offset = &Offset - return params -} - -// **This endpoint allows you to retrieve a paginated list of all your subusers.** You can use the `username` query parameter to filter the list for specific subusers. You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. -func (c *ApiService) ListSubuser(params *ListSubuserParam) (interface{}, error) { - path := "/v3/subusers" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Username != nil { - data.Set("username", *params.Username) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Region != nil { - data.Set("region", fmt.Sprint(*params.Region)) - } - if params != nil && params.IncludeRegion != nil { - data.Set("include_region", fmt.Sprint(*params.IncludeRegion)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]Subuser{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/subusers/api_list_subuser_monthly_stat.go b/rest/api/v3/subusers/api_list_subuser_monthly_stat.go deleted file mode 100644 index 77173b30..00000000 --- a/rest/api/v3/subusers/api_list_subuser_monthly_stat.go +++ /dev/null @@ -1,108 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type ListSubuserMonthlyStatParam struct { - // The date of the month to retrieve statistics for. Must be formatted YYYY-MM-DD - Date *string `json:"date"` - // The username of the Subuser. - SubuserName *string `json:"subuser_name"` - // The metric that you want to sort by. Metrics that you can sort by are: `blocks`, `bounces`, `clicks`, `delivered`, `opens`, `requests`, `unique_clicks`, `unique_opens`, and `unsubscribes`.' - SortByMetric *string `json:"sort_by_metric,omitempty"` - // The direction you want to sort. - SortByDirection *SortByDirection `json:"sort_by_direction,omitempty"` - // Optional field to limit the number of results returned. - Limit *int32 `json:"limit,omitempty"` - // Optional beginning point in the list to retrieve from. - Offset *int32 `json:"offset,omitempty"` -} - -func (params *ListSubuserMonthlyStatParam) SetDate(Date string) *ListSubuserMonthlyStatParam { - params.Date = &Date - return params -} -func (params *ListSubuserMonthlyStatParam) SetSubuserName(SubuserName string) *ListSubuserMonthlyStatParam { - params.SubuserName = &SubuserName - return params -} -func (params *ListSubuserMonthlyStatParam) SetSortByMetric(SortByMetric string) *ListSubuserMonthlyStatParam { - params.SortByMetric = &SortByMetric - return params -} -func (params *ListSubuserMonthlyStatParam) SetSortByDirection(SortByDirection SortByDirection) *ListSubuserMonthlyStatParam { - params.SortByDirection = &SortByDirection - return params -} -func (params *ListSubuserMonthlyStatParam) SetLimit(Limit int32) *ListSubuserMonthlyStatParam { - params.Limit = &Limit - return params -} -func (params *ListSubuserMonthlyStatParam) SetOffset(Offset int32) *ListSubuserMonthlyStatParam { - params.Offset = &Offset - return params -} - -// **This endpoint allows you to retrive the monthly email statistics for a specific subuser.** When using the `sort_by_metric` to sort your stats by a specific metric, you can not sort by the following metrics: `bounce_drops`, `deferred`, `invalid_emails`, `processed`, `spam_report_drops`, `spam_reports`, or `unsubscribe_drops`. -func (c *ApiService) ListSubuserMonthlyStat(params *ListSubuserMonthlyStatParam) (interface{}, error) { - path := "/v3/subusers/{SubuserName}/stats/monthly" - if params != nil && params.SubuserName != nil { - path = strings.Replace(path, "{"+"SubuserName"+"}", *params.SubuserName, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Date != nil { - data.Set("date", *params.Date) - } - if params != nil && params.SortByMetric != nil { - data.Set("sort_by_metric", *params.SortByMetric) - } - if params != nil && params.SortByDirection != nil { - data.Set("sort_by_direction", fmt.Sprint(*params.SortByDirection)) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SubuserStats{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/subusers/api_service.go b/rest/api/v3/subusers/api_service.go deleted file mode 100644 index 7169b7eb..00000000 --- a/rest/api/v3/subusers/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/subusers/api_update_subuser.go b/rest/api/v3/subusers/api_update_subuser.go deleted file mode 100644 index 584c4b4f..00000000 --- a/rest/api/v3/subusers/api_update_subuser.go +++ /dev/null @@ -1,100 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type UpdateSubuserParam struct { - // The username of the Subuser. - SubuserName *string `json:"subuser_name"` - // - UpdateSubuserRequest *UpdateSubuserRequest `json:"UpdateSubuserRequest,omitempty"` -} - -func (params *UpdateSubuserParam) SetSubuserName(SubuserName string) *UpdateSubuserParam { - params.SubuserName = &SubuserName - return params -} -func (params *UpdateSubuserParam) SetUpdateSubuserRequest(UpdateSubuserRequest UpdateSubuserRequest) *UpdateSubuserParam { - params.UpdateSubuserRequest = &UpdateSubuserRequest - return params -} - -// **This endpoint allows you to enable or disable a subuser.** -func (c *ApiService) UpdateSubuser(params *UpdateSubuserParam) (interface{}, error) { - path := "/v3/subusers/{SubuserName}" - if params != nil && params.SubuserName != nil { - path = strings.Replace(path, "{"+"SubuserName"+"}", *params.SubuserName, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateSubuserRequest != nil { - b, err := json.Marshal(*params.UpdateSubuserRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/subusers/api_update_subuser_credit.go b/rest/api/v3/subusers/api_update_subuser_credit.go deleted file mode 100644 index 147331bb..00000000 --- a/rest/api/v3/subusers/api_update_subuser_credit.go +++ /dev/null @@ -1,84 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type UpdateSubuserCreditParam struct { - // The username of the Subuser. - SubuserName *string `json:"subuser_name"` - // - SubuserCreditsRequest *SubuserCreditsRequest `json:"SubuserCreditsRequest"` -} - -func (params *UpdateSubuserCreditParam) SetSubuserName(SubuserName string) *UpdateSubuserCreditParam { - params.SubuserName = &SubuserName - return params -} -func (params *UpdateSubuserCreditParam) SetSubuserCreditsRequest(SubuserCreditsRequest SubuserCreditsRequest) *UpdateSubuserCreditParam { - params.SubuserCreditsRequest = &SubuserCreditsRequest - return params -} - -// **This endpoint allows you to update the Credits for a Subuser.** -func (c *ApiService) UpdateSubuserCredit(params *UpdateSubuserCreditParam) (interface{}, error) { - path := "/v3/subusers/{SubuserName}/credits" - if params != nil && params.SubuserName != nil { - path = strings.Replace(path, "{"+"SubuserName"+"}", *params.SubuserName, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.SubuserCreditsRequest != nil { - b, err := json.Marshal(*params.SubuserCreditsRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SubuserCredits{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/subusers/api_update_subuser_ip.go b/rest/api/v3/subusers/api_update_subuser_ip.go deleted file mode 100644 index 6ebf7a43..00000000 --- a/rest/api/v3/subusers/api_update_subuser_ip.go +++ /dev/null @@ -1,84 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type UpdateSubuserIpParam struct { - // The username of the Subuser. - SubuserName *string `json:"subuser_name"` - // - RequestBody *[]string `json:"request_body,omitempty"` -} - -func (params *UpdateSubuserIpParam) SetSubuserName(SubuserName string) *UpdateSubuserIpParam { - params.SubuserName = &SubuserName - return params -} -func (params *UpdateSubuserIpParam) SetRequestBody(RequestBody []string) *UpdateSubuserIpParam { - params.RequestBody = &RequestBody - return params -} - -// **This endpoint allows you update your subusers' assigned IP.** Each subuser should be assigned to an IP address from which all of this subuser's mail will be sent. Often, this is the same IP as the parent account, but each subuser can have one or more of their own IP addresses as well. More information: * [How to request more IPs](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) * [Setup Reverse DNS](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) -func (c *ApiService) UpdateSubuserIp(params *UpdateSubuserIpParam) (interface{}, error) { - path := "/v3/subusers/{SubuserName}/ips" - if params != nil && params.SubuserName != nil { - path = strings.Replace(path, "{"+"SubuserName"+"}", *params.SubuserName, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.RequestBody != nil { - b, err := json.Marshal(*params.RequestBody) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &UpdateSubuserIp200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/subusers/api_update_subuser_remaining_credit.go b/rest/api/v3/subusers/api_update_subuser_remaining_credit.go deleted file mode 100644 index ffdfed87..00000000 --- a/rest/api/v3/subusers/api_update_subuser_remaining_credit.go +++ /dev/null @@ -1,84 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type UpdateSubuserRemainingCreditParam struct { - // The username of the Subuser. - SubuserName *string `json:"subuser_name"` - // - UpdateSubuserRemainingCreditRequest *UpdateSubuserRemainingCreditRequest `json:"UpdateSubuserRemainingCreditRequest"` -} - -func (params *UpdateSubuserRemainingCreditParam) SetSubuserName(SubuserName string) *UpdateSubuserRemainingCreditParam { - params.SubuserName = &SubuserName - return params -} -func (params *UpdateSubuserRemainingCreditParam) SetUpdateSubuserRemainingCreditRequest(UpdateSubuserRemainingCreditRequest UpdateSubuserRemainingCreditRequest) *UpdateSubuserRemainingCreditParam { - params.UpdateSubuserRemainingCreditRequest = &UpdateSubuserRemainingCreditRequest - return params -} - -// **This endpoint allows you to update the remaining credits for a Subuser.** -func (c *ApiService) UpdateSubuserRemainingCredit(params *UpdateSubuserRemainingCreditParam) (interface{}, error) { - path := "/v3/subusers/{SubuserName}/credits/remaining" - if params != nil && params.SubuserName != nil { - path = strings.Replace(path, "{"+"SubuserName"+"}", *params.SubuserName, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateSubuserRemainingCreditRequest != nil { - b, err := json.Marshal(*params.UpdateSubuserRemainingCreditRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SubuserCredits{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/subusers/api_update_subuser_website_access.go b/rest/api/v3/subusers/api_update_subuser_website_access.go deleted file mode 100644 index 621d8e7b..00000000 --- a/rest/api/v3/subusers/api_update_subuser_website_access.go +++ /dev/null @@ -1,76 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type UpdateSubuserWebsiteAccessParam struct { - // - SubuserName *string `json:"subuser_name"` - // - UpdateSubuserWebsiteAccessRequest *UpdateSubuserWebsiteAccessRequest `json:"UpdateSubuserWebsiteAccessRequest,omitempty"` -} - -func (params *UpdateSubuserWebsiteAccessParam) SetSubuserName(SubuserName string) *UpdateSubuserWebsiteAccessParam { - params.SubuserName = &SubuserName - return params -} -func (params *UpdateSubuserWebsiteAccessParam) SetUpdateSubuserWebsiteAccessRequest(UpdateSubuserWebsiteAccessRequest UpdateSubuserWebsiteAccessRequest) *UpdateSubuserWebsiteAccessParam { - params.UpdateSubuserWebsiteAccessRequest = &UpdateSubuserWebsiteAccessRequest - return params -} - -// Enable/Disable website access for a Subuser, while still preserving email send functionality. -func (c *ApiService) UpdateSubuserWebsiteAccess(params *UpdateSubuserWebsiteAccessParam) (interface{}, error) { - path := "/v3/subusers/{SubuserName}/website_access" - if params != nil && params.SubuserName != nil { - path = strings.Replace(path, "{"+"SubuserName"+"}", *params.SubuserName, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateSubuserWebsiteAccessRequest != nil { - b, err := json.Marshal(*params.UpdateSubuserWebsiteAccessRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/subusers/docs/AggregatedBy.md b/rest/api/v3/subusers/docs/AggregatedBy.md deleted file mode 100644 index 96f02c9f..00000000 --- a/rest/api/v3/subusers/docs/AggregatedBy.md +++ /dev/null @@ -1,14 +0,0 @@ -# AggregatedBy - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**DAY** | string | (value: `"day"`) -**WEEK** | string | (value: `"week"`) -**MONTH** | string | (value: `"month"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/CategoryStats.md b/rest/api/v3/subusers/docs/CategoryStats.md deleted file mode 100644 index 2b136fe2..00000000 --- a/rest/api/v3/subusers/docs/CategoryStats.md +++ /dev/null @@ -1,12 +0,0 @@ -# CategoryStats - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Date** | **string** | The date the statistics were gathered. | -**Stats** | [**[]CategoryStatsStatsInner**](CategoryStatsStatsInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/CategoryStatsStatsInner.md b/rest/api/v3/subusers/docs/CategoryStatsStatsInner.md deleted file mode 100644 index 9c188e0c..00000000 --- a/rest/api/v3/subusers/docs/CategoryStatsStatsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# CategoryStatsStatsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Metrics** | [**CategoryStatsStatsInnerMetrics**](CategoryStatsStatsInnerMetrics.md) | |[optional] -**Name** | **string** | The name of the category. |[optional] -**Type** | **string** | How you are segmenting your statistics. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/CategoryStatsStatsInnerMetrics.md b/rest/api/v3/subusers/docs/CategoryStatsStatsInnerMetrics.md deleted file mode 100644 index 8129c1f4..00000000 --- a/rest/api/v3/subusers/docs/CategoryStatsStatsInnerMetrics.md +++ /dev/null @@ -1,26 +0,0 @@ -# CategoryStatsStatsInnerMetrics - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Blocks** | **int32** | The number of emails that were not allowed to be delivered by ISPs. | -**BounceDrops** | **int32** | The number of emails that were dropped because of a bounce. | -**Bounces** | **int32** | The number of emails that bounced instead of being delivered. | -**Clicks** | **int32** | The number of links that were clicked. | -**Deferred** | **int32** | The number of emails that temporarily could not be delivered. | -**Delivered** | **int32** | The number of emails SendGrid was able to confirm were actually delivered to a recipient. | -**InvalidEmails** | **int32** | The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. | -**Opens** | **int32** | The total number of times your emails were opened by recipients. | -**Processed** | **int32** | Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. | -**Requests** | **int32** | The number of emails that were requested to be delivered. | -**SpamReportDrops** | **int32** | The number of emails that were dropped due to a recipient previously marking your emails as spam. | -**SpamReports** | **int32** | The number of recipients who marked your email as spam. | -**UniqueClicks** | **int32** | The number of unique recipients who clicked links in your emails. | -**UniqueOpens** | **int32** | The number of unique recipients who opened your emails. | -**UnsubscribeDrops** | **int32** | The number of emails dropped due to a recipient unsubscribing from your emails. | -**Unsubscribes** | **int32** | The number of recipients who unsubscribed from your emails. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/CreateSubuser.md b/rest/api/v3/subusers/docs/CreateSubuser.md deleted file mode 100644 index 9c47f779..00000000 --- a/rest/api/v3/subusers/docs/CreateSubuser.md +++ /dev/null @@ -1,48 +0,0 @@ -# CreateSubuser - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateSubuser**](CreateSubuser.md#CreateSubuser) | **Post** /v3/subusers | Create Subuser - - - -## CreateSubuser - -> SubuserPost CreateSubuser(ctx, optional) - -Create Subuser - -**This endpoint allows you to create a new subuser.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateSubuserParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**CreateSubuserRequest** | [**CreateSubuserRequest**](CreateSubuserRequest.md) | - -### Return type - -[**SubuserPost**](SubuserPost.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/subusers/docs/CreateSubuserRequest.md b/rest/api/v3/subusers/docs/CreateSubuserRequest.md deleted file mode 100644 index c8f80d78..00000000 --- a/rest/api/v3/subusers/docs/CreateSubuserRequest.md +++ /dev/null @@ -1,16 +0,0 @@ -# CreateSubuserRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Username** | **string** | The username for this subuser. | -**Email** | **string** | The email address of the subuser. | -**Password** | **string** | The password this subuser will use when logging into SendGrid. | -**Ips** | **[]string** | The IP addresses that should be assigned to this subuser. | -**Region** | [**Region1**](Region1.md) | The region this Subuser should be assigned to. Can be `global` or `eu`. (Regional email is in Public Beta and requires SendGrid Pro plan or above.). |[optional] -**IncludeRegion** | **bool** | A flag that determines if the Subuser's region should be returned in the response. (Regional email is in Public Beta and requires SendGrid Pro plan or above.) |[optional] [default to false] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/DeleteSubuser.md b/rest/api/v3/subusers/docs/DeleteSubuser.md deleted file mode 100644 index 5be2931f..00000000 --- a/rest/api/v3/subusers/docs/DeleteSubuser.md +++ /dev/null @@ -1,51 +0,0 @@ -# DeleteSubuser - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteSubuser**](DeleteSubuser.md#DeleteSubuser) | **Delete** /v3/subusers/{SubuserName} | Delete a subuser - - - -## DeleteSubuser - -> map[string]interface{} DeleteSubuser(ctx, SubuserName) - -Delete a subuser - -**This endpoint allows you to delete a subuser.** This is a permanent action. Once deleted, a subuser cannot be retrieved. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**SubuserName** | **string** | The username of the Subuser. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteSubuserParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/subusers/docs/ErrorResponse.md b/rest/api/v3/subusers/docs/ErrorResponse.md deleted file mode 100644 index ec2d41f6..00000000 --- a/rest/api/v3/subusers/docs/ErrorResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ErrorResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] -**Id** | **string** | When applicable, this property value will be an error ID. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/ErrorResponseErrorsInner.md b/rest/api/v3/subusers/docs/ErrorResponseErrorsInner.md deleted file mode 100644 index 5449c685..00000000 --- a/rest/api/v3/subusers/docs/ErrorResponseErrorsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ErrorResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | An error message. |[optional] -**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] -**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/GetSubuserCredit.md b/rest/api/v3/subusers/docs/GetSubuserCredit.md deleted file mode 100644 index 8690a1fc..00000000 --- a/rest/api/v3/subusers/docs/GetSubuserCredit.md +++ /dev/null @@ -1,51 +0,0 @@ -# GetSubuserCredit - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetSubuserCredit**](GetSubuserCredit.md#GetSubuserCredit) | **Get** /v3/subusers/{SubuserName}/credits | Get the Credits for a Subuser - - - -## GetSubuserCredit - -> SubuserCredits GetSubuserCredit(ctx, SubuserName) - -Get the Credits for a Subuser - -**This endpoint allows you to retrieve a Credits overview for a Subuser.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**SubuserName** | **string** | The username of the Subuser. - -### Other Parameters - -Other parameters are passed through a pointer to a GetSubuserCreditParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**SubuserCredits**](SubuserCredits.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/subusers/docs/ListMonthlyStat.md b/rest/api/v3/subusers/docs/ListMonthlyStat.md deleted file mode 100644 index ae4d42d6..00000000 --- a/rest/api/v3/subusers/docs/ListMonthlyStat.md +++ /dev/null @@ -1,52 +0,0 @@ -# ListMonthlyStat - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListMonthlyStat**](ListMonthlyStat.md#ListMonthlyStat) | **Get** /v3/subusers/stats/monthly | Retrieve monthly stats for all subusers - - - -## ListMonthlyStat - -> SubuserStats ListMonthlyStat(ctx, Dateoptional) - -Retrieve monthly stats for all subusers - -**This endpoint allows you to retrieve the monthly email statistics for all subusers over the given date range.** When using the `sort_by_metric` to sort your stats by a specific metric, you can not sort by the following metrics: `bounce_drops`, `deferred`, `invalid_emails`, `processed`, `spam_report_drops`, `spam_reports`, or `unsubscribe_drops`. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListMonthlyStatParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Subuser** | **string** | A substring search of your subusers. -**SortByMetric** | [**SortByMetric**](SortByMetricSortByMetric.md) | The metric that you want to sort by. Metrics that you can sort by are: `blocks`, `bounces`, `clicks`, `delivered`, `opens`, `requests`, `unique_clicks`, `unique_opens`, and `unsubscribes`.' -**SortByDirection** | [**SortByDirection1**](SortByDirection1SortByDirection1.md) | The direction you want to sort. -**Limit** | **int32** | Optional field to limit the number of results returned. -**Offset** | **int32** | Optional beginning point in the list to retrieve from. - -### Return type - -[**SubuserStats**](SubuserStats.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/subusers/docs/ListReputation.md b/rest/api/v3/subusers/docs/ListReputation.md deleted file mode 100644 index 1142829c..00000000 --- a/rest/api/v3/subusers/docs/ListReputation.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListReputation - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListReputation**](ListReputation.md#ListReputation) | **Get** /v3/subusers/reputations | Retrieve Subuser Reputations - - - -## ListReputation - -> []ListReputation200ResponseInner ListReputation(ctx, optional) - -Retrieve Subuser Reputations - -**This endpoint allows you to request the reputations for your subusers.** Subuser sender reputations give a good idea how well a sender is doing with regards to how recipients and recipient servers react to the mail that is being received. When a bounce, spam report, or other negative action happens on a sent email, it will affect your sender rating. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListReputationParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Usernames** | **string** | - -### Return type - -[**[]ListReputation200ResponseInner**](ListReputation200ResponseInner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/subusers/docs/ListReputation200ResponseInner.md b/rest/api/v3/subusers/docs/ListReputation200ResponseInner.md deleted file mode 100644 index c2d0ef07..00000000 --- a/rest/api/v3/subusers/docs/ListReputation200ResponseInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListReputation200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Reputation** | **float32** | The sender reputation this subuser has attained. | -**Username** | **string** | The subuser that has this reputation. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/ListStat.md b/rest/api/v3/subusers/docs/ListStat.md deleted file mode 100644 index 16c65e17..00000000 --- a/rest/api/v3/subusers/docs/ListStat.md +++ /dev/null @@ -1,51 +0,0 @@ -# ListStat - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListStat**](ListStat.md#ListStat) | **Get** /v3/subusers/stats | Retrieve email statistics for your subusers. - - - -## ListStat - -> []CategoryStats ListStat(ctx, SubusersStartDateoptional) - -Retrieve email statistics for your subusers. - -**This endpoint allows you to retrieve the email statistics for the given subusers.** You may retrieve statistics for up to 10 different subusers by including an additional _subusers_ parameter for each additional subuser. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListStatParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Limit** | **int32** | Limits the number of results returned per page. -**Offset** | **int32** | The point in the list to begin retrieving results from. -**AggregatedBy** | [**AggregatedBy**](AggregatedByAggregatedBy.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". -**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. - -### Return type - -[**[]CategoryStats**](CategoryStats.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/subusers/docs/ListStatSum.md b/rest/api/v3/subusers/docs/ListStatSum.md deleted file mode 100644 index 8d801458..00000000 --- a/rest/api/v3/subusers/docs/ListStatSum.md +++ /dev/null @@ -1,53 +0,0 @@ -# ListStatSum - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListStatSum**](ListStatSum.md#ListStatSum) | **Get** /v3/subusers/stats/sums | Retrieve the totals for each email statistic metric for all subusers. - - - -## ListStatSum - -> CategoryStats ListStatSum(ctx, StartDateoptional) - -Retrieve the totals for each email statistic metric for all subusers. - -**This endpoint allows you to retrieve the total sums of each email statistic metric for all subusers over the given date range.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListStatSumParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**SortByDirection** | [**SortByDirection2**](SortByDirection2SortByDirection2.md) | The direction you want to sort. -**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. -**Limit** | **int32** | Limits the number of results returned per page. -**Offset** | **int32** | The point in the list to begin retrieving results from. -**AggregatedBy** | **string** | How to group the statistics. Defaults to today. Must follow format YYYY-MM-DD. -**SortByMetric** | **string** | The metric that you want to sort by. Must be a single metric. - -### Return type - -[**CategoryStats**](CategoryStats.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/subusers/docs/ListSubuser.md b/rest/api/v3/subusers/docs/ListSubuser.md deleted file mode 100644 index 679e08de..00000000 --- a/rest/api/v3/subusers/docs/ListSubuser.md +++ /dev/null @@ -1,52 +0,0 @@ -# ListSubuser - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListSubuser**](ListSubuser.md#ListSubuser) | **Get** /v3/subusers | List all Subusers - - - -## ListSubuser - -> []Subuser ListSubuser(ctx, optional) - -List all Subusers - -**This endpoint allows you to retrieve a paginated list of all your subusers.** You can use the `username` query parameter to filter the list for specific subusers. You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListSubuserParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Username** | **string** | The username of this subuser. -**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. -**Region** | [**Region**](RegionRegion.md) | Filter for Subusers in this region. If not provided, all Subusers will be returned. All users can also be explicitly requested by using the filter `all`. Users who are not pinned to a region will be displayed as `global`. -**IncludeRegion** | **bool** | Optional flag to include the regions of the Subusers in the response. If not provided, the region will be omitted from the response. -**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. - -### Return type - -[**[]Subuser**](Subuser.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/subusers/docs/ListSubuserMonthlyStat.md b/rest/api/v3/subusers/docs/ListSubuserMonthlyStat.md deleted file mode 100644 index 039a19c5..00000000 --- a/rest/api/v3/subusers/docs/ListSubuserMonthlyStat.md +++ /dev/null @@ -1,55 +0,0 @@ -# ListSubuserMonthlyStat - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListSubuserMonthlyStat**](ListSubuserMonthlyStat.md#ListSubuserMonthlyStat) | **Get** /v3/subusers/{SubuserName}/stats/monthly | Retrieve the monthly email statistics for a single subuser - - - -## ListSubuserMonthlyStat - -> SubuserStats ListSubuserMonthlyStat(ctx, DateSubuserNameoptional) - -Retrieve the monthly email statistics for a single subuser - -**This endpoint allows you to retrive the monthly email statistics for a specific subuser.** When using the `sort_by_metric` to sort your stats by a specific metric, you can not sort by the following metrics: `bounce_drops`, `deferred`, `invalid_emails`, `processed`, `spam_report_drops`, `spam_reports`, or `unsubscribe_drops`. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**SubuserName** | **string** | The username of the Subuser. - -### Other Parameters - -Other parameters are passed through a pointer to a ListSubuserMonthlyStatParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**SortByMetric** | **string** | The metric that you want to sort by. Metrics that you can sort by are: `blocks`, `bounces`, `clicks`, `delivered`, `opens`, `requests`, `unique_clicks`, `unique_opens`, and `unsubscribes`.' -**SortByDirection** | [**SortByDirection**](SortByDirectionSortByDirection.md) | The direction you want to sort. -**Limit** | **int32** | Optional field to limit the number of results returned. -**Offset** | **int32** | Optional beginning point in the list to retrieve from. - -### Return type - -[**SubuserStats**](SubuserStats.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/subusers/docs/Region.md b/rest/api/v3/subusers/docs/Region.md deleted file mode 100644 index 5c815839..00000000 --- a/rest/api/v3/subusers/docs/Region.md +++ /dev/null @@ -1,14 +0,0 @@ -# Region - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**ALL** | string | (value: `"all"`) -**GLOBAL** | string | (value: `"global"`) -**EU** | string | (value: `"eu"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/Region1.md b/rest/api/v3/subusers/docs/Region1.md deleted file mode 100644 index 53994edc..00000000 --- a/rest/api/v3/subusers/docs/Region1.md +++ /dev/null @@ -1,13 +0,0 @@ -# Region1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**GLOBAL** | string | (value: `"global"`) -**EU** | string | (value: `"eu"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/Region2.md b/rest/api/v3/subusers/docs/Region2.md deleted file mode 100644 index d5a099ad..00000000 --- a/rest/api/v3/subusers/docs/Region2.md +++ /dev/null @@ -1,13 +0,0 @@ -# Region2 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**GLOBAL** | string | (value: `"global"`) -**EU** | string | (value: `"eu"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/Region3.md b/rest/api/v3/subusers/docs/Region3.md deleted file mode 100644 index 32404c8e..00000000 --- a/rest/api/v3/subusers/docs/Region3.md +++ /dev/null @@ -1,13 +0,0 @@ -# Region3 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**GLOBAL** | string | (value: `"global"`) -**EU** | string | (value: `"eu"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/ResetFrequency.md b/rest/api/v3/subusers/docs/ResetFrequency.md deleted file mode 100644 index 9b705ddc..00000000 --- a/rest/api/v3/subusers/docs/ResetFrequency.md +++ /dev/null @@ -1,14 +0,0 @@ -# ResetFrequency - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**MONTHLY** | string | (value: `"monthly"`) -**WEEKLY** | string | (value: `"weekly"`) -**DAILY** | string | (value: `"daily"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/ResetFrequency1.md b/rest/api/v3/subusers/docs/ResetFrequency1.md deleted file mode 100644 index 1b6e357e..00000000 --- a/rest/api/v3/subusers/docs/ResetFrequency1.md +++ /dev/null @@ -1,14 +0,0 @@ -# ResetFrequency1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**MONTHLY** | string | (value: `"monthly"`) -**WEEKLY** | string | (value: `"weekly"`) -**DAILY** | string | (value: `"daily"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/SortByDirection.md b/rest/api/v3/subusers/docs/SortByDirection.md deleted file mode 100644 index 0431e9a0..00000000 --- a/rest/api/v3/subusers/docs/SortByDirection.md +++ /dev/null @@ -1,13 +0,0 @@ -# SortByDirection - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**DESC** | string | (value: `"desc"`) -**ASC** | string | (value: `"asc"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/SortByDirection1.md b/rest/api/v3/subusers/docs/SortByDirection1.md deleted file mode 100644 index aa9dabea..00000000 --- a/rest/api/v3/subusers/docs/SortByDirection1.md +++ /dev/null @@ -1,13 +0,0 @@ -# SortByDirection1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**DESC** | string | (value: `"desc"`) -**ASC** | string | (value: `"asc"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/SortByDirection2.md b/rest/api/v3/subusers/docs/SortByDirection2.md deleted file mode 100644 index a25d133f..00000000 --- a/rest/api/v3/subusers/docs/SortByDirection2.md +++ /dev/null @@ -1,13 +0,0 @@ -# SortByDirection2 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**DESC** | string | (value: `"desc"`) -**ASC** | string | (value: `"asc"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/SortByMetric.md b/rest/api/v3/subusers/docs/SortByMetric.md deleted file mode 100644 index d58e068d..00000000 --- a/rest/api/v3/subusers/docs/SortByMetric.md +++ /dev/null @@ -1,20 +0,0 @@ -# SortByMetric - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**BLOCKS** | string | (value: `"blocks"`) -**BOUNCES** | string | (value: `"bounces"`) -**CLICKS** | string | (value: `"clicks"`) -**DELIVERED** | string | (value: `"delivered"`) -**OPENS** | string | (value: `"opens"`) -**REQUESTS** | string | (value: `"requests"`) -**UNIQUE_CLICKS** | string | (value: `"unique_clicks"`) -**UNIQUE_OPENS** | string | (value: `"unique_opens"`) -**UNSUBSCRIBES** | string | (value: `"unsubscribes"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/Subuser.md b/rest/api/v3/subusers/docs/Subuser.md deleted file mode 100644 index 5730bdb1..00000000 --- a/rest/api/v3/subusers/docs/Subuser.md +++ /dev/null @@ -1,15 +0,0 @@ -# Subuser - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Disabled** | **bool** | Whether or not the user is enabled or disabled. | -**Id** | **float32** | The ID of this subuser. | -**Username** | **string** | The name by which this subuser will be referred. | -**Email** | **string** | The email address to contact this subuser. | -**Region** | [**Region2**](Region2.md) | The region this Subuser is assigned to. This property is returned only if the `include_region` parameter was included and set to `true` in the API request. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/SubuserCredits.md b/rest/api/v3/subusers/docs/SubuserCredits.md deleted file mode 100644 index 5d6b18a9..00000000 --- a/rest/api/v3/subusers/docs/SubuserCredits.md +++ /dev/null @@ -1,15 +0,0 @@ -# SubuserCredits - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | [**Type**](Type.md) | Type determines how credits are reset for a Subuser. `unlimited` indicates that there is no limit to the Subuser's credits. `recurring` indicates that the credits for the Subuser are reset according to the frequency determined by `reset_frequency`. `nonrecurring` indicates that there is no recurring schedule to reset credits and resets must be done on an ad hoc basis. | -**ResetFrequency** | [**ResetFrequency**](ResetFrequency.md) | The frequency with which a Subuser's credits are reset if `type` is set to `recurring`, otherwise `null`. | -**Remain** | **int32** | Total number of remaining credits. `remain` is `null` if the reset `type` for the Subuser's credits is set to `unlimited`. | -**Total** | **int32** | Total number of allowable credits. `total` is `null` if the reset `type` for the Subuser's credits is set to `unlimited` or `nonrecurring`. | -**Used** | **int32** | Total number of used credits. `used` is `null` if the reset `type` for the Subuser's credits is set to `unlimited` or `nonrecurring`. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/SubuserCreditsRequest.md b/rest/api/v3/subusers/docs/SubuserCreditsRequest.md deleted file mode 100644 index 0ab5910a..00000000 --- a/rest/api/v3/subusers/docs/SubuserCreditsRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# SubuserCreditsRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | [**Type1**](Type1.md) | Type determines how credits are reset for a Subuser. `unlimited` indicates that there is no limit to the Subuser's credits. `recurring` indicates that the credits for the Subuser are reset according to the frequency determined by `reset_frequency`. `nonrecurring` indicates that there is no recurring schedule to reset credits and resets must be done on an ad hoc basis. | -**ResetFrequency** | [**ResetFrequency1**](ResetFrequency1.md) | The frequency with which a Subuser's credits are reset if `type` is set to `recurring`. Do _not_ include `reset_frequency` if you choose a reset `type` value of `unlimited` or `nonrecurring`. |[optional] -**Total** | **int32** | Total number of credits to which the Subuser is to be reset. If `type` is `nonrecurring` then the Subuser's credits will be reset to `total` on a one-time basis. If `type` is `recurring` then the Subuser's credits will be reset to `total` every time a reset is scheduled in accordance with the `reset_frequency`. Do _not_ include `total` if you choose a reset `type` value of `unlimited`. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/SubuserPost.md b/rest/api/v3/subusers/docs/SubuserPost.md deleted file mode 100644 index 8abc4df3..00000000 --- a/rest/api/v3/subusers/docs/SubuserPost.md +++ /dev/null @@ -1,15 +0,0 @@ -# SubuserPost - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Username** | **string** | The username of the subuser. | -**UserId** | **float32** | The user ID for this subuser. | -**Email** | **string** | The email address for this subuser. | -**CreditAllocation** | [**SubuserPostCreditAllocation**](SubuserPostCreditAllocation.md) | |[optional] -**Region** | [**Region3**](Region3.md) | The region this Subuser is assigned to. The property is returned only if the `include_region` parameter is included and set to `true` in the API request. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/SubuserPostCreditAllocation.md b/rest/api/v3/subusers/docs/SubuserPostCreditAllocation.md deleted file mode 100644 index fa1e529e..00000000 --- a/rest/api/v3/subusers/docs/SubuserPostCreditAllocation.md +++ /dev/null @@ -1,11 +0,0 @@ -# SubuserPostCreditAllocation - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/SubuserStats.md b/rest/api/v3/subusers/docs/SubuserStats.md deleted file mode 100644 index 5ca5f9fb..00000000 --- a/rest/api/v3/subusers/docs/SubuserStats.md +++ /dev/null @@ -1,12 +0,0 @@ -# SubuserStats - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Date** | **string** | The date the statistics were gathered. |[optional] -**Stats** | [**[]SubuserStatsStatsInner**](SubuserStatsStatsInner.md) | The list of statistics. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/SubuserStatsStatsInner.md b/rest/api/v3/subusers/docs/SubuserStatsStatsInner.md deleted file mode 100644 index 55735232..00000000 --- a/rest/api/v3/subusers/docs/SubuserStatsStatsInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# SubuserStatsStatsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FirstName** | **string** | The first name of the subuser. |[optional] -**LastName** | **string** | The last name of the subuser. |[optional] -**Metrics** | [**SubuserStatsStatsInnerMetrics**](SubuserStatsStatsInnerMetrics.md) | |[optional] -**Name** | **string** | The username of the subuser. |[optional] -**Type** | **string** | The type of account. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/SubuserStatsStatsInnerMetrics.md b/rest/api/v3/subusers/docs/SubuserStatsStatsInnerMetrics.md deleted file mode 100644 index 1c7f2071..00000000 --- a/rest/api/v3/subusers/docs/SubuserStatsStatsInnerMetrics.md +++ /dev/null @@ -1,26 +0,0 @@ -# SubuserStatsStatsInnerMetrics - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Blocks** | **int32** | The number of emails that were not allowed to be delivered by ISPs. |[optional] -**BounceDrops** | **int32** | The number of emails that were dropped because of a bounce. |[optional] -**Bounces** | **int32** | The number of emails that bounced instead of being delivered. |[optional] -**Clicks** | **int32** | The number of links that were clicked in your emails. |[optional] -**Deferred** | **int32** | The number of emails that temporarily could not be delivered. |[optional] -**Delivered** | **int32** | The number of emails SendGrid was able to confirm were actually delivered to a recipient. |[optional] -**InvalidEmails** | **int32** | The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. |[optional] -**Opens** | **int32** | The total number of times your emails were opened by recipients. |[optional] -**Processed** | **int32** | Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. |[optional] -**Requests** | **int32** | The number of emails that were requested to be delivered. |[optional] -**SpamReportDrops** | **int32** | The number of emails that were dropped due to a recipient previously marking your emails as spam. |[optional] -**SpamReports** | **int32** | The number of recipients who marked your email as spam. |[optional] -**UniqueClicks** | **int32** | The number of unique recipients who clicked links in your emails. |[optional] -**UniqueOpens** | **int32** | The number of unique recipients who opened your emails. |[optional] -**UnsubscribeDrops** | **int32** | The number of emails dropped due to a recipient unsubscribing from your emails. |[optional] -**Unsubscribes** | **int32** | The number of recipients who unsubscribed from your emails. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/Type.md b/rest/api/v3/subusers/docs/Type.md deleted file mode 100644 index 0a33c4cf..00000000 --- a/rest/api/v3/subusers/docs/Type.md +++ /dev/null @@ -1,14 +0,0 @@ -# Type - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**UNLIMITED** | string | (value: `"unlimited"`) -**RECURRING** | string | (value: `"recurring"`) -**NONRECURRING** | string | (value: `"nonrecurring"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/Type1.md b/rest/api/v3/subusers/docs/Type1.md deleted file mode 100644 index 929d624f..00000000 --- a/rest/api/v3/subusers/docs/Type1.md +++ /dev/null @@ -1,14 +0,0 @@ -# Type1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**UNLIMITED** | string | (value: `"unlimited"`) -**RECURRING** | string | (value: `"recurring"`) -**NONRECURRING** | string | (value: `"nonrecurring"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/UpdateSubuser.md b/rest/api/v3/subusers/docs/UpdateSubuser.md deleted file mode 100644 index 37171280..00000000 --- a/rest/api/v3/subusers/docs/UpdateSubuser.md +++ /dev/null @@ -1,52 +0,0 @@ -# UpdateSubuser - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateSubuser**](UpdateSubuser.md#UpdateSubuser) | **Patch** /v3/subusers/{SubuserName} | Enable/disable a subuser - - - -## UpdateSubuser - -> map[string]interface{} UpdateSubuser(ctx, SubuserNameoptional) - -Enable/disable a subuser - -**This endpoint allows you to enable or disable a subuser.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**SubuserName** | **string** | The username of the Subuser. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateSubuserParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**UpdateSubuserRequest** | [**UpdateSubuserRequest**](UpdateSubuserRequest.md) | - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/subusers/docs/UpdateSubuserCredit.md b/rest/api/v3/subusers/docs/UpdateSubuserCredit.md deleted file mode 100644 index 7c5088c3..00000000 --- a/rest/api/v3/subusers/docs/UpdateSubuserCredit.md +++ /dev/null @@ -1,51 +0,0 @@ -# UpdateSubuserCredit - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateSubuserCredit**](UpdateSubuserCredit.md#UpdateSubuserCredit) | **Put** /v3/subusers/{SubuserName}/credits | Update the Credits for a Subuser - - - -## UpdateSubuserCredit - -> SubuserCredits UpdateSubuserCredit(ctx, SubuserNameSubuserCreditsRequest) - -Update the Credits for a Subuser - -**This endpoint allows you to update the Credits for a Subuser.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**SubuserName** | **string** | The username of the Subuser. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateSubuserCreditParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**SubuserCredits**](SubuserCredits.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/subusers/docs/UpdateSubuserIp.md b/rest/api/v3/subusers/docs/UpdateSubuserIp.md deleted file mode 100644 index 402e272e..00000000 --- a/rest/api/v3/subusers/docs/UpdateSubuserIp.md +++ /dev/null @@ -1,52 +0,0 @@ -# UpdateSubuserIp - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateSubuserIp**](UpdateSubuserIp.md#UpdateSubuserIp) | **Put** /v3/subusers/{SubuserName}/ips | Update IPs assigned to a subuser - - - -## UpdateSubuserIp - -> UpdateSubuserIp200Response UpdateSubuserIp(ctx, SubuserNameoptional) - -Update IPs assigned to a subuser - -**This endpoint allows you update your subusers' assigned IP.** Each subuser should be assigned to an IP address from which all of this subuser's mail will be sent. Often, this is the same IP as the parent account, but each subuser can have one or more of their own IP addresses as well. More information: * [How to request more IPs](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) * [Setup Reverse DNS](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**SubuserName** | **string** | The username of the Subuser. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateSubuserIpParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**RequestBody** | **[]string** | - -### Return type - -[**UpdateSubuserIp200Response**](UpdateSubuserIp200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/subusers/docs/UpdateSubuserIp200Response.md b/rest/api/v3/subusers/docs/UpdateSubuserIp200Response.md deleted file mode 100644 index fe663d5f..00000000 --- a/rest/api/v3/subusers/docs/UpdateSubuserIp200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateSubuserIp200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Ips** | **[]string** | The IP addresses that are assigned to the subuser. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/UpdateSubuserRemainingCredit.md b/rest/api/v3/subusers/docs/UpdateSubuserRemainingCredit.md deleted file mode 100644 index a1a8923d..00000000 --- a/rest/api/v3/subusers/docs/UpdateSubuserRemainingCredit.md +++ /dev/null @@ -1,51 +0,0 @@ -# UpdateSubuserRemainingCredit - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateSubuserRemainingCredit**](UpdateSubuserRemainingCredit.md#UpdateSubuserRemainingCredit) | **Patch** /v3/subusers/{SubuserName}/credits/remaining | Update the remaining credits for a Subuser - - - -## UpdateSubuserRemainingCredit - -> SubuserCredits UpdateSubuserRemainingCredit(ctx, SubuserNameUpdateSubuserRemainingCreditRequest) - -Update the remaining credits for a Subuser - -**This endpoint allows you to update the remaining credits for a Subuser.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**SubuserName** | **string** | The username of the Subuser. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateSubuserRemainingCreditParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -[**SubuserCredits**](SubuserCredits.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/subusers/docs/UpdateSubuserRemainingCreditRequest.md b/rest/api/v3/subusers/docs/UpdateSubuserRemainingCreditRequest.md deleted file mode 100644 index 4431ec58..00000000 --- a/rest/api/v3/subusers/docs/UpdateSubuserRemainingCreditRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateSubuserRemainingCreditRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AllocationUpdate** | **int32** | The number of credits to add to or subtract from the current remaining credits for the Subuser. Use a positive number to increase the remaining credits or a negative number to reduce the remaining credits. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/UpdateSubuserRequest.md b/rest/api/v3/subusers/docs/UpdateSubuserRequest.md deleted file mode 100644 index 2a1081ef..00000000 --- a/rest/api/v3/subusers/docs/UpdateSubuserRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateSubuserRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Disabled** | **bool** | Whether or not this subuser is disabled. `true` means disabled, `false` means enabled. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/docs/UpdateSubuserWebsiteAccess.md b/rest/api/v3/subusers/docs/UpdateSubuserWebsiteAccess.md deleted file mode 100644 index fdbf5ff8..00000000 --- a/rest/api/v3/subusers/docs/UpdateSubuserWebsiteAccess.md +++ /dev/null @@ -1,52 +0,0 @@ -# UpdateSubuserWebsiteAccess - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateSubuserWebsiteAccess**](UpdateSubuserWebsiteAccess.md#UpdateSubuserWebsiteAccess) | **Patch** /v3/subusers/{SubuserName}/website_access | Enable/Disable website access for a Subuser - - - -## UpdateSubuserWebsiteAccess - -> map[string]interface{} UpdateSubuserWebsiteAccess(ctx, SubuserNameoptional) - -Enable/Disable website access for a Subuser - -Enable/Disable website access for a Subuser, while still preserving email send functionality. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**SubuserName** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateSubuserWebsiteAccessParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**UpdateSubuserWebsiteAccessRequest** | [**UpdateSubuserWebsiteAccessRequest**](UpdateSubuserWebsiteAccessRequest.md) | - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/subusers/docs/UpdateSubuserWebsiteAccessRequest.md b/rest/api/v3/subusers/docs/UpdateSubuserWebsiteAccessRequest.md deleted file mode 100644 index a187eb06..00000000 --- a/rest/api/v3/subusers/docs/UpdateSubuserWebsiteAccessRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateSubuserWebsiteAccessRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Disabled** | **bool** | Whether or not to disable website access to the Subuser. `true` means disabled, `false` means enabled. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/subusers/model_aggregated_by.go b/rest/api/v3/subusers/model_aggregated_by.go deleted file mode 100644 index 5542cabd..00000000 --- a/rest/api/v3/subusers/model_aggregated_by.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AggregatedBy the model 'AggregatedBy' -type AggregatedBy string - -// List of AggregatedBy -const ( - AGGREGATEDBY_DAY AggregatedBy = "day" - AGGREGATEDBY_WEEK AggregatedBy = "week" - AGGREGATEDBY_MONTH AggregatedBy = "month" -) diff --git a/rest/api/v3/subusers/model_category_stats.go b/rest/api/v3/subusers/model_category_stats.go deleted file mode 100644 index 1d14ce55..00000000 --- a/rest/api/v3/subusers/model_category_stats.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CategoryStats struct for CategoryStats -type CategoryStats struct { - // The date the statistics were gathered. - Date string `json:"date"` - Stats *[]CategoryStatsStatsInner `json:"stats,omitempty"` -} diff --git a/rest/api/v3/subusers/model_category_stats_stats_inner.go b/rest/api/v3/subusers/model_category_stats_stats_inner.go deleted file mode 100644 index 00fba759..00000000 --- a/rest/api/v3/subusers/model_category_stats_stats_inner.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CategoryStatsStatsInner struct for CategoryStatsStatsInner -type CategoryStatsStatsInner struct { - Metrics *CategoryStatsStatsInnerMetrics `json:"metrics,omitempty"` - // The name of the category. - Name *string `json:"name,omitempty"` - // How you are segmenting your statistics. - Type string `json:"type"` -} diff --git a/rest/api/v3/subusers/model_category_stats_stats_inner_metrics.go b/rest/api/v3/subusers/model_category_stats_stats_inner_metrics.go deleted file mode 100644 index a7d50efe..00000000 --- a/rest/api/v3/subusers/model_category_stats_stats_inner_metrics.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CategoryStatsStatsInnerMetrics struct for CategoryStatsStatsInnerMetrics -type CategoryStatsStatsInnerMetrics struct { - // The number of emails that were not allowed to be delivered by ISPs. - Blocks int32 `json:"blocks"` - // The number of emails that were dropped because of a bounce. - BounceDrops int32 `json:"bounce_drops"` - // The number of emails that bounced instead of being delivered. - Bounces int32 `json:"bounces"` - // The number of links that were clicked. - Clicks int32 `json:"clicks"` - // The number of emails that temporarily could not be delivered. - Deferred int32 `json:"deferred"` - // The number of emails SendGrid was able to confirm were actually delivered to a recipient. - Delivered int32 `json:"delivered"` - // The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. - InvalidEmails int32 `json:"invalid_emails"` - // The total number of times your emails were opened by recipients. - Opens int32 `json:"opens"` - // Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. - Processed int32 `json:"processed"` - // The number of emails that were requested to be delivered. - Requests int32 `json:"requests"` - // The number of emails that were dropped due to a recipient previously marking your emails as spam. - SpamReportDrops int32 `json:"spam_report_drops"` - // The number of recipients who marked your email as spam. - SpamReports int32 `json:"spam_reports"` - // The number of unique recipients who clicked links in your emails. - UniqueClicks int32 `json:"unique_clicks"` - // The number of unique recipients who opened your emails. - UniqueOpens int32 `json:"unique_opens"` - // The number of emails dropped due to a recipient unsubscribing from your emails. - UnsubscribeDrops int32 `json:"unsubscribe_drops"` - // The number of recipients who unsubscribed from your emails. - Unsubscribes int32 `json:"unsubscribes"` -} diff --git a/rest/api/v3/subusers/model_create_subuser_request.go b/rest/api/v3/subusers/model_create_subuser_request.go deleted file mode 100644 index 5839b599..00000000 --- a/rest/api/v3/subusers/model_create_subuser_request.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateSubuserRequest struct for CreateSubuserRequest -type CreateSubuserRequest struct { - // The username for this subuser. - Username string `json:"username"` - // The email address of the subuser. - Email string `json:"email"` - // The password this subuser will use when logging into SendGrid. - Password string `json:"password"` - // The IP addresses that should be assigned to this subuser. - Ips []string `json:"ips"` - // The region this Subuser should be assigned to. Can be `global` or `eu`. (Regional email is in Public Beta and requires SendGrid Pro plan or above.). - Region *Region1 `json:"region,omitempty"` - // A flag that determines if the Subuser's region should be returned in the response. (Regional email is in Public Beta and requires SendGrid Pro plan or above.) - IncludeRegion *bool `json:"include_region,omitempty"` -} diff --git a/rest/api/v3/subusers/model_error_response.go b/rest/api/v3/subusers/model_error_response.go deleted file mode 100644 index c2d757e4..00000000 --- a/rest/api/v3/subusers/model_error_response.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponse struct for ErrorResponse -type ErrorResponse struct { - Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` - // When applicable, this property value will be an error ID. - Id *string `json:"id,omitempty"` -} diff --git a/rest/api/v3/subusers/model_error_response_errors_inner.go b/rest/api/v3/subusers/model_error_response_errors_inner.go deleted file mode 100644 index 2d3ef35d..00000000 --- a/rest/api/v3/subusers/model_error_response_errors_inner.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner -type ErrorResponseErrorsInner struct { - // An error message. - Message *string `json:"message,omitempty"` - // When applicable, this property value will be the field that generated the error. - Field *string `json:"field,omitempty"` - // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. - Help *map[string]interface{} `json:"help,omitempty"` -} diff --git a/rest/api/v3/subusers/model_list_reputation_200_response_inner.go b/rest/api/v3/subusers/model_list_reputation_200_response_inner.go deleted file mode 100644 index 1f50f157..00000000 --- a/rest/api/v3/subusers/model_list_reputation_200_response_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListReputation200ResponseInner struct for ListReputation200ResponseInner -type ListReputation200ResponseInner struct { - // The sender reputation this subuser has attained. - Reputation float32 `json:"reputation"` - // The subuser that has this reputation. - Username string `json:"username"` -} diff --git a/rest/api/v3/subusers/model_region.go b/rest/api/v3/subusers/model_region.go deleted file mode 100644 index b7956176..00000000 --- a/rest/api/v3/subusers/model_region.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Region the model 'Region' -type Region string - -// List of Region -const ( - REGION_ALL Region = "all" - REGION_GLOBAL Region = "global" - REGION_EU Region = "eu" -) diff --git a/rest/api/v3/subusers/model_region1.go b/rest/api/v3/subusers/model_region1.go deleted file mode 100644 index 4bd4d938..00000000 --- a/rest/api/v3/subusers/model_region1.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Region1 the model 'Region1' -type Region1 string - -// List of Region1 -const ( - REGION1_GLOBAL Region1 = "global" - REGION1_EU Region1 = "eu" -) diff --git a/rest/api/v3/subusers/model_region2.go b/rest/api/v3/subusers/model_region2.go deleted file mode 100644 index 5ae5093e..00000000 --- a/rest/api/v3/subusers/model_region2.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Region2 the model 'Region2' -type Region2 string - -// List of Region2 -const ( - REGION2_GLOBAL Region2 = "global" - REGION2_EU Region2 = "eu" -) diff --git a/rest/api/v3/subusers/model_region3.go b/rest/api/v3/subusers/model_region3.go deleted file mode 100644 index 8a827cdc..00000000 --- a/rest/api/v3/subusers/model_region3.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Region3 the model 'Region3' -type Region3 string - -// List of Region3 -const ( - REGION3_GLOBAL Region3 = "global" - REGION3_EU Region3 = "eu" -) diff --git a/rest/api/v3/subusers/model_reset_frequency.go b/rest/api/v3/subusers/model_reset_frequency.go deleted file mode 100644 index e5725d07..00000000 --- a/rest/api/v3/subusers/model_reset_frequency.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ResetFrequency the model 'ResetFrequency' -type ResetFrequency string - -// List of ResetFrequency -const ( - RESETFREQUENCY_MONTHLY ResetFrequency = "monthly" - RESETFREQUENCY_WEEKLY ResetFrequency = "weekly" - RESETFREQUENCY_DAILY ResetFrequency = "daily" -) diff --git a/rest/api/v3/subusers/model_reset_frequency1.go b/rest/api/v3/subusers/model_reset_frequency1.go deleted file mode 100644 index 2f9b7e5d..00000000 --- a/rest/api/v3/subusers/model_reset_frequency1.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ResetFrequency1 the model 'ResetFrequency1' -type ResetFrequency1 string - -// List of ResetFrequency1 -const ( - RESETFREQUENCY1_MONTHLY ResetFrequency1 = "monthly" - RESETFREQUENCY1_WEEKLY ResetFrequency1 = "weekly" - RESETFREQUENCY1_DAILY ResetFrequency1 = "daily" -) diff --git a/rest/api/v3/subusers/model_sort_by_direction.go b/rest/api/v3/subusers/model_sort_by_direction.go deleted file mode 100644 index f0372919..00000000 --- a/rest/api/v3/subusers/model_sort_by_direction.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SortByDirection the model 'SortByDirection' -type SortByDirection string - -// List of SortByDirection -const ( - SORTBYDIRECTION_DESC SortByDirection = "desc" - SORTBYDIRECTION_ASC SortByDirection = "asc" -) diff --git a/rest/api/v3/subusers/model_sort_by_direction1.go b/rest/api/v3/subusers/model_sort_by_direction1.go deleted file mode 100644 index 3eb12c50..00000000 --- a/rest/api/v3/subusers/model_sort_by_direction1.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SortByDirection1 the model 'SortByDirection1' -type SortByDirection1 string - -// List of SortByDirection1 -const ( - SORTBYDIRECTION1_DESC SortByDirection1 = "desc" - SORTBYDIRECTION1_ASC SortByDirection1 = "asc" -) diff --git a/rest/api/v3/subusers/model_sort_by_direction2.go b/rest/api/v3/subusers/model_sort_by_direction2.go deleted file mode 100644 index cb54d9bf..00000000 --- a/rest/api/v3/subusers/model_sort_by_direction2.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SortByDirection2 the model 'SortByDirection2' -type SortByDirection2 string - -// List of SortByDirection2 -const ( - SORTBYDIRECTION2_DESC SortByDirection2 = "desc" - SORTBYDIRECTION2_ASC SortByDirection2 = "asc" -) diff --git a/rest/api/v3/subusers/model_sort_by_metric.go b/rest/api/v3/subusers/model_sort_by_metric.go deleted file mode 100644 index 9a400ccb..00000000 --- a/rest/api/v3/subusers/model_sort_by_metric.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SortByMetric the model 'SortByMetric' -type SortByMetric string - -// List of SortByMetric -const ( - SORTBYMETRIC_BLOCKS SortByMetric = "blocks" - SORTBYMETRIC_BOUNCES SortByMetric = "bounces" - SORTBYMETRIC_CLICKS SortByMetric = "clicks" - SORTBYMETRIC_DELIVERED SortByMetric = "delivered" - SORTBYMETRIC_OPENS SortByMetric = "opens" - SORTBYMETRIC_REQUESTS SortByMetric = "requests" - SORTBYMETRIC_UNIQUE_CLICKS SortByMetric = "unique_clicks" - SORTBYMETRIC_UNIQUE_OPENS SortByMetric = "unique_opens" - SORTBYMETRIC_UNSUBSCRIBES SortByMetric = "unsubscribes" -) diff --git a/rest/api/v3/subusers/model_subuser.go b/rest/api/v3/subusers/model_subuser.go deleted file mode 100644 index a5128a1a..00000000 --- a/rest/api/v3/subusers/model_subuser.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Subuser struct for Subuser -type Subuser struct { - // Whether or not the user is enabled or disabled. - Disabled bool `json:"disabled"` - // The ID of this subuser. - Id float32 `json:"id"` - // The name by which this subuser will be referred. - Username string `json:"username"` - // The email address to contact this subuser. - Email string `json:"email"` - // The region this Subuser is assigned to. This property is returned only if the `include_region` parameter was included and set to `true` in the API request. - Region *Region2 `json:"region,omitempty"` -} diff --git a/rest/api/v3/subusers/model_subuser_credits.go b/rest/api/v3/subusers/model_subuser_credits.go deleted file mode 100644 index e3b6597d..00000000 --- a/rest/api/v3/subusers/model_subuser_credits.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SubuserCredits struct for SubuserCredits -type SubuserCredits struct { - // Type determines how credits are reset for a Subuser. `unlimited` indicates that there is no limit to the Subuser's credits. `recurring` indicates that the credits for the Subuser are reset according to the frequency determined by `reset_frequency`. `nonrecurring` indicates that there is no recurring schedule to reset credits and resets must be done on an ad hoc basis. - Type Type `json:"type"` - // The frequency with which a Subuser's credits are reset if `type` is set to `recurring`, otherwise `null`. - ResetFrequency ResetFrequency `json:"reset_frequency"` - // Total number of remaining credits. `remain` is `null` if the reset `type` for the Subuser's credits is set to `unlimited`. - Remain int32 `json:"remain"` - // Total number of allowable credits. `total` is `null` if the reset `type` for the Subuser's credits is set to `unlimited` or `nonrecurring`. - Total int32 `json:"total"` - // Total number of used credits. `used` is `null` if the reset `type` for the Subuser's credits is set to `unlimited` or `nonrecurring`. - Used int32 `json:"used"` -} diff --git a/rest/api/v3/subusers/model_subuser_credits_request.go b/rest/api/v3/subusers/model_subuser_credits_request.go deleted file mode 100644 index 4eadc773..00000000 --- a/rest/api/v3/subusers/model_subuser_credits_request.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SubuserCreditsRequest struct for SubuserCreditsRequest -type SubuserCreditsRequest struct { - // Type determines how credits are reset for a Subuser. `unlimited` indicates that there is no limit to the Subuser's credits. `recurring` indicates that the credits for the Subuser are reset according to the frequency determined by `reset_frequency`. `nonrecurring` indicates that there is no recurring schedule to reset credits and resets must be done on an ad hoc basis. - Type Type1 `json:"type"` - // The frequency with which a Subuser's credits are reset if `type` is set to `recurring`. Do _not_ include `reset_frequency` if you choose a reset `type` value of `unlimited` or `nonrecurring`. - ResetFrequency *ResetFrequency1 `json:"reset_frequency,omitempty"` - // Total number of credits to which the Subuser is to be reset. If `type` is `nonrecurring` then the Subuser's credits will be reset to `total` on a one-time basis. If `type` is `recurring` then the Subuser's credits will be reset to `total` every time a reset is scheduled in accordance with the `reset_frequency`. Do _not_ include `total` if you choose a reset `type` value of `unlimited`. - Total *int32 `json:"total,omitempty"` -} diff --git a/rest/api/v3/subusers/model_subuser_post.go b/rest/api/v3/subusers/model_subuser_post.go deleted file mode 100644 index f1a55390..00000000 --- a/rest/api/v3/subusers/model_subuser_post.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SubuserPost struct for SubuserPost -type SubuserPost struct { - // The username of the subuser. - Username string `json:"username"` - // The user ID for this subuser. - UserId float32 `json:"user_id"` - // The email address for this subuser. - Email string `json:"email"` - CreditAllocation *SubuserPostCreditAllocation `json:"credit_allocation,omitempty"` - // The region this Subuser is assigned to. The property is returned only if the `include_region` parameter is included and set to `true` in the API request. - Region *Region3 `json:"region,omitempty"` -} diff --git a/rest/api/v3/subusers/model_subuser_post_credit_allocation.go b/rest/api/v3/subusers/model_subuser_post_credit_allocation.go deleted file mode 100644 index 6f6fb157..00000000 --- a/rest/api/v3/subusers/model_subuser_post_credit_allocation.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SubuserPostCreditAllocation struct for SubuserPostCreditAllocation -type SubuserPostCreditAllocation struct { - Type *string `json:"type,omitempty"` -} diff --git a/rest/api/v3/subusers/model_subuser_stats.go b/rest/api/v3/subusers/model_subuser_stats.go deleted file mode 100644 index 3d1b6cd6..00000000 --- a/rest/api/v3/subusers/model_subuser_stats.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SubuserStats struct for SubuserStats -type SubuserStats struct { - // The date the statistics were gathered. - Date *string `json:"date,omitempty"` - // The list of statistics. - Stats *[]SubuserStatsStatsInner `json:"stats,omitempty"` -} diff --git a/rest/api/v3/subusers/model_subuser_stats_stats_inner.go b/rest/api/v3/subusers/model_subuser_stats_stats_inner.go deleted file mode 100644 index 19e47dfd..00000000 --- a/rest/api/v3/subusers/model_subuser_stats_stats_inner.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SubuserStatsStatsInner struct for SubuserStatsStatsInner -type SubuserStatsStatsInner struct { - // The first name of the subuser. - FirstName *string `json:"first_name,omitempty"` - // The last name of the subuser. - LastName *string `json:"last_name,omitempty"` - Metrics *SubuserStatsStatsInnerMetrics `json:"metrics,omitempty"` - // The username of the subuser. - Name *string `json:"name,omitempty"` - // The type of account. - Type *string `json:"type,omitempty"` -} diff --git a/rest/api/v3/subusers/model_subuser_stats_stats_inner_metrics.go b/rest/api/v3/subusers/model_subuser_stats_stats_inner_metrics.go deleted file mode 100644 index cd7afbe9..00000000 --- a/rest/api/v3/subusers/model_subuser_stats_stats_inner_metrics.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SubuserStatsStatsInnerMetrics struct for SubuserStatsStatsInnerMetrics -type SubuserStatsStatsInnerMetrics struct { - // The number of emails that were not allowed to be delivered by ISPs. - Blocks *int32 `json:"blocks,omitempty"` - // The number of emails that were dropped because of a bounce. - BounceDrops *int32 `json:"bounce_drops,omitempty"` - // The number of emails that bounced instead of being delivered. - Bounces *int32 `json:"bounces,omitempty"` - // The number of links that were clicked in your emails. - Clicks *int32 `json:"clicks,omitempty"` - // The number of emails that temporarily could not be delivered. - Deferred *int32 `json:"deferred,omitempty"` - // The number of emails SendGrid was able to confirm were actually delivered to a recipient. - Delivered *int32 `json:"delivered,omitempty"` - // The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. - InvalidEmails *int32 `json:"invalid_emails,omitempty"` - // The total number of times your emails were opened by recipients. - Opens *int32 `json:"opens,omitempty"` - // Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. - Processed *int32 `json:"processed,omitempty"` - // The number of emails that were requested to be delivered. - Requests *int32 `json:"requests,omitempty"` - // The number of emails that were dropped due to a recipient previously marking your emails as spam. - SpamReportDrops *int32 `json:"spam_report_drops,omitempty"` - // The number of recipients who marked your email as spam. - SpamReports *int32 `json:"spam_reports,omitempty"` - // The number of unique recipients who clicked links in your emails. - UniqueClicks *int32 `json:"unique_clicks,omitempty"` - // The number of unique recipients who opened your emails. - UniqueOpens *int32 `json:"unique_opens,omitempty"` - // The number of emails dropped due to a recipient unsubscribing from your emails. - UnsubscribeDrops *int32 `json:"unsubscribe_drops,omitempty"` - // The number of recipients who unsubscribed from your emails. - Unsubscribes *int32 `json:"unsubscribes,omitempty"` -} diff --git a/rest/api/v3/subusers/model_type.go b/rest/api/v3/subusers/model_type.go deleted file mode 100644 index c7460304..00000000 --- a/rest/api/v3/subusers/model_type.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Type the model 'Type' -type Type string - -// List of Type -const ( - TYPE_UNLIMITED Type = "unlimited" - TYPE_RECURRING Type = "recurring" - TYPE_NONRECURRING Type = "nonrecurring" -) diff --git a/rest/api/v3/subusers/model_type1.go b/rest/api/v3/subusers/model_type1.go deleted file mode 100644 index 0cdf19ad..00000000 --- a/rest/api/v3/subusers/model_type1.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Type1 the model 'Type1' -type Type1 string - -// List of Type1 -const ( - TYPE1_UNLIMITED Type1 = "unlimited" - TYPE1_RECURRING Type1 = "recurring" - TYPE1_NONRECURRING Type1 = "nonrecurring" -) diff --git a/rest/api/v3/subusers/model_update_subuser_ip_200_response.go b/rest/api/v3/subusers/model_update_subuser_ip_200_response.go deleted file mode 100644 index 6f8d30ae..00000000 --- a/rest/api/v3/subusers/model_update_subuser_ip_200_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateSubuserIp200Response struct for UpdateSubuserIp200Response -type UpdateSubuserIp200Response struct { - // The IP addresses that are assigned to the subuser. - Ips *[]string `json:"ips,omitempty"` -} diff --git a/rest/api/v3/subusers/model_update_subuser_remaining_credit_request.go b/rest/api/v3/subusers/model_update_subuser_remaining_credit_request.go deleted file mode 100644 index 68f81f3c..00000000 --- a/rest/api/v3/subusers/model_update_subuser_remaining_credit_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateSubuserRemainingCreditRequest struct for UpdateSubuserRemainingCreditRequest -type UpdateSubuserRemainingCreditRequest struct { - // The number of credits to add to or subtract from the current remaining credits for the Subuser. Use a positive number to increase the remaining credits or a negative number to reduce the remaining credits. - AllocationUpdate int32 `json:"allocation_update"` -} diff --git a/rest/api/v3/subusers/model_update_subuser_request.go b/rest/api/v3/subusers/model_update_subuser_request.go deleted file mode 100644 index c4bbc99a..00000000 --- a/rest/api/v3/subusers/model_update_subuser_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateSubuserRequest struct for UpdateSubuserRequest -type UpdateSubuserRequest struct { - // Whether or not this subuser is disabled. `true` means disabled, `false` means enabled. - Disabled *bool `json:"disabled,omitempty"` -} diff --git a/rest/api/v3/subusers/model_update_subuser_website_access_request.go b/rest/api/v3/subusers/model_update_subuser_website_access_request.go deleted file mode 100644 index 7af0aac6..00000000 --- a/rest/api/v3/subusers/model_update_subuser_website_access_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Subusers -* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateSubuserWebsiteAccessRequest struct for UpdateSubuserWebsiteAccessRequest -type UpdateSubuserWebsiteAccessRequest struct { - // Whether or not to disable website access to the Subuser. `true` means disabled, `false` means enabled. - Disabled *bool `json:"disabled,omitempty"` -} diff --git a/rest/api/v3/suppressions/.openapi-generator b/rest/api/v3/suppressions/.openapi-generator deleted file mode 100644 index 532d098b..00000000 --- a/rest/api/v3/suppressions/.openapi-generator +++ /dev/null @@ -1,136 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_add_suppression_to_asm_group.go -api_creat_asm_group.go -api_create_global_suppression.go -api_delete_asm_group.go -api_delete_global_suppression.go -api_delete_invalid_email.go -api_delete_invalid_emails.go -api_delete_spam_report.go -api_delete_spam_reports.go -api_delete_suppression_block.go -api_delete_suppression_blocks.go -api_delete_suppression_bounce.go -api_delete_suppression_bounces.go -api_delete_suppression_from_asm_group.go -api_get_asm_group.go -api_get_asm_suppression.go -api_get_global_suppression.go -api_get_invalid_email.go -api_get_spam_report.go -api_get_suppression_block.go -api_get_suppression_bounces.go -api_get_suppression_bounces_classifications.go -api_list_asm_group.go -api_list_asm_suppression.go -api_list_global_suppression.go -api_list_invalid_email.go -api_list_spam_report.go -api_list_suppression_block.go -api_list_suppression_bounces.go -api_list_suppression_bounces_classifications.go -api_list_suppression_from_asm_group.go -api_search_suppression_from_asm_group.go -api_service.go -api_update_asm_group.go -docs/Accept.md -docs/Accept1.md -docs/AddSuppressionToAsmGroup.md -docs/AddSuppressionToAsmGroup201Response.md -docs/BlocksResponseInner.md -docs/BounceResponse.md -docs/Classification.md -docs/Classification1.md -docs/CreatAsmGroup.md -docs/CreatAsmGroup201Response.md -docs/CreateGlobalSuppression.md -docs/CreateGlobalSuppression201Response.md -docs/DeleteAsmGroup.md -docs/DeleteGlobalSuppression.md -docs/DeleteInvalidEmail.md -docs/DeleteInvalidEmails.md -docs/DeleteInvalidEmailsRequest.md -docs/DeleteSpamReport.md -docs/DeleteSpamReports.md -docs/DeleteSpamReportsRequest.md -docs/DeleteSuppressionBlock.md -docs/DeleteSuppressionBlocks.md -docs/DeleteSuppressionBlocksRequest.md -docs/DeleteSuppressionBounce.md -docs/DeleteSuppressionBounces.md -docs/DeleteSuppressionBouncesRequest.md -docs/DeleteSuppressionFromAsmGroup.md -docs/ErrorResponse.md -docs/ErrorResponseErrorsInner.md -docs/GetAsmGroup.md -docs/GetAsmGroup200Response.md -docs/GetAsmSuppression.md -docs/GetAsmSuppression200Response.md -docs/GetAsmSuppression200ResponseSuppressionsInner.md -docs/GetGlobalSuppression.md -docs/GetInvalidEmail.md -docs/GetSpamReport.md -docs/GetSuppressionBlock.md -docs/GetSuppressionBounces.md -docs/GetSuppressionBouncesClassifications.md -docs/GetSuppressionBouncesClassifications200Response.md -docs/GetSuppressionBouncesClassifications200ResponseResultInner.md -docs/GetSuppressionBouncesClassifications200ResponseResultInnerStatsInner.md -docs/InvalidEmail.md -docs/ListAsmGroup.md -docs/ListAsmSuppression.md -docs/ListAsmSuppression200ResponseInner.md -docs/ListGlobalSuppression.md -docs/ListGlobalSuppression200ResponseInner.md -docs/ListInvalidEmail.md -docs/ListSpamReport.md -docs/ListSuppressionBlock.md -docs/ListSuppressionBounces.md -docs/ListSuppressionBouncesClassifications.md -docs/ListSuppressionBouncesClassifications200Response.md -docs/ListSuppressionBouncesClassifications200ResponseResultInner.md -docs/ListSuppressionBouncesClassifications200ResponseResultInnerStatsInner.md -docs/ListSuppressionFromAsmGroup.md -docs/RetrieveAGlobalSuppressionResponse.md -docs/SearchSuppressionFromAsmGroup.md -docs/SpamReportsResponseInner.md -docs/SuppressionGroup.md -docs/SuppressionGroupRequestBaseProps.md -docs/SuppressionsRequest.md -docs/UpdateAsmGroup.md -docs/UpdateAsmGroupRequest.md -model_accept.go -model_accept1.go -model_add_suppression_to_asm_group_201_response.go -model_blocks_response_inner.go -model_bounce_response.go -model_classification.go -model_classification1.go -model_creat_asm_group_201_response.go -model_create_global_suppression_201_response.go -model_delete_invalid_emails_request.go -model_delete_spam_reports_request.go -model_delete_suppression_blocks_request.go -model_delete_suppression_bounces_request.go -model_error_response.go -model_error_response_errors_inner.go -model_get_asm_group_200_response.go -model_get_asm_suppression_200_response.go -model_get_asm_suppression_200_response_suppressions_inner.go -model_get_suppression_bounces_classifications_200_response.go -model_get_suppression_bounces_classifications_200_response_result_inner.go -model_get_suppression_bounces_classifications_200_response_result_inner_stats_inner.go -model_invalid_email.go -model_list_asm_suppression_200_response_inner.go -model_list_global_suppression_200_response_inner.go -model_list_suppression_bounces_classifications_200_response.go -model_list_suppression_bounces_classifications_200_response_result_inner.go -model_list_suppression_bounces_classifications_200_response_result_inner_stats_inner.go -model_retrieve_a_global_suppression_response.go -model_spam_reports_response_inner.go -model_suppression_group.go -model_suppression_group_request_base_props.go -model_suppressions_request.go -model_update_asm_group_request.go diff --git a/rest/api/v3/suppressions/.openapi-generator-ignore b/rest/api/v3/suppressions/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/suppressions/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/suppressions/README.md b/rest/api/v3/suppressions/README.md deleted file mode 100644 index 20aeaa70..00000000 --- a/rest/api/v3/suppressions/README.md +++ /dev/null @@ -1,130 +0,0 @@ -# Go API client for - -The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. - -You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. - -SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. - -See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:38.487214+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AddSuppressionToAsmGroup* | [**AddSuppressionToAsmGroup**](docs/AddSuppressionToAsmGroup.md#addsuppressiontoasmgroup) | **Post** /v3/asm/groups/{GroupId}/suppressions | Add suppressions to a suppression group -*CreatAsmGroup* | [**CreatAsmGroup**](docs/CreatAsmGroup.md#creatasmgroup) | **Post** /v3/asm/groups | Create a new suppression group -*CreateGlobalSuppression* | [**CreateGlobalSuppression**](docs/CreateGlobalSuppression.md#createglobalsuppression) | **Post** /v3/asm/suppressions/global | Add recipient addresses to the global suppression group. -*DeleteAsmGroup* | [**DeleteAsmGroup**](docs/DeleteAsmGroup.md#deleteasmgroup) | **Delete** /v3/asm/groups/{GroupId} | Delete a Suppression Group -*DeleteGlobalSuppression* | [**DeleteGlobalSuppression**](docs/DeleteGlobalSuppression.md#deleteglobalsuppression) | **Delete** /v3/asm/suppressions/global/{Email} | Delete a Global Suppression -*DeleteInvalidEmail* | [**DeleteInvalidEmail**](docs/DeleteInvalidEmail.md#deleteinvalidemail) | **Delete** /v3/suppression/invalid_emails/{Email} | Delete a specific invalid email -*DeleteInvalidEmails* | [**DeleteInvalidEmails**](docs/DeleteInvalidEmails.md#deleteinvalidemails) | **Delete** /v3/suppression/invalid_emails | Delete invalid emails -*DeleteSpamReport* | [**DeleteSpamReport**](docs/DeleteSpamReport.md#deletespamreport) | **Delete** /v3/suppression/spam_reports/{Email} | Delete a specific spam report -*DeleteSpamReports* | [**DeleteSpamReports**](docs/DeleteSpamReports.md#deletespamreports) | **Delete** /v3/suppression/spam_reports | Delete spam reports -*DeleteSuppressionBlock* | [**DeleteSuppressionBlock**](docs/DeleteSuppressionBlock.md#deletesuppressionblock) | **Delete** /v3/suppression/blocks/{Email} | Delete a specific block -*DeleteSuppressionBlocks* | [**DeleteSuppressionBlocks**](docs/DeleteSuppressionBlocks.md#deletesuppressionblocks) | **Delete** /v3/suppression/blocks | Delete blocks -*DeleteSuppressionBounce* | [**DeleteSuppressionBounce**](docs/DeleteSuppressionBounce.md#deletesuppressionbounce) | **Delete** /v3/suppression/bounces/{Email} | Delete a bounce -*DeleteSuppressionBounces* | [**DeleteSuppressionBounces**](docs/DeleteSuppressionBounces.md#deletesuppressionbounces) | **Delete** /v3/suppression/bounces | Delete bounces -*DeleteSuppressionFromAsmGroup* | [**DeleteSuppressionFromAsmGroup**](docs/DeleteSuppressionFromAsmGroup.md#deletesuppressionfromasmgroup) | **Delete** /v3/asm/groups/{GroupId}/suppressions/{Email} | Delete a suppression from a suppression group -*GetAsmGroup* | [**GetAsmGroup**](docs/GetAsmGroup.md#getasmgroup) | **Get** /v3/asm/groups/{GroupId} | Get information on a single suppression group. -*GetAsmSuppression* | [**GetAsmSuppression**](docs/GetAsmSuppression.md#getasmsuppression) | **Get** /v3/asm/suppressions/{Email} | Retrieve all suppression groups for an email address -*GetGlobalSuppression* | [**GetGlobalSuppression**](docs/GetGlobalSuppression.md#getglobalsuppression) | **Get** /v3/asm/suppressions/global/{Email} | Retrieve a Global Suppression -*GetInvalidEmail* | [**GetInvalidEmail**](docs/GetInvalidEmail.md#getinvalidemail) | **Get** /v3/suppression/invalid_emails/{Email} | Retrieve a specific invalid email -*GetSpamReport* | [**GetSpamReport**](docs/GetSpamReport.md#getspamreport) | **Get** /v3/suppression/spam_reports/{Email} | Retrieve a specific spam report -*GetSuppressionBlock* | [**GetSuppressionBlock**](docs/GetSuppressionBlock.md#getsuppressionblock) | **Get** /v3/suppression/blocks/{Email} | Retrieve a specific block -*GetSuppressionBounces* | [**GetSuppressionBounces**](docs/GetSuppressionBounces.md#getsuppressionbounces) | **Get** /v3/suppression/bounces/{Email} | Retrieve a Bounce -*GetSuppressionBouncesClassifications* | [**GetSuppressionBouncesClassifications**](docs/GetSuppressionBouncesClassifications.md#getsuppressionbouncesclassifications) | **Get** /v3/suppression/bounces/classifications/{Classification} | Retrieve bounce classification over time by domain stats -*ListAsmGroup* | [**ListAsmGroup**](docs/ListAsmGroup.md#listasmgroup) | **Get** /v3/asm/groups | Retrieve all suppression groups associated with the user. -*ListAsmSuppression* | [**ListAsmSuppression**](docs/ListAsmSuppression.md#listasmsuppression) | **Get** /v3/asm/suppressions | Retrieve all suppressions -*ListGlobalSuppression* | [**ListGlobalSuppression**](docs/ListGlobalSuppression.md#listglobalsuppression) | **Get** /v3/suppression/unsubscribes | Retrieve all global suppressions -*ListInvalidEmail* | [**ListInvalidEmail**](docs/ListInvalidEmail.md#listinvalidemail) | **Get** /v3/suppression/invalid_emails | Retrieve all invalid emails -*ListSpamReport* | [**ListSpamReport**](docs/ListSpamReport.md#listspamreport) | **Get** /v3/suppression/spam_reports | Retrieve all spam reports -*ListSuppressionBlock* | [**ListSuppressionBlock**](docs/ListSuppressionBlock.md#listsuppressionblock) | **Get** /v3/suppression/blocks | Retrieve all blocks -*ListSuppressionBounces* | [**ListSuppressionBounces**](docs/ListSuppressionBounces.md#listsuppressionbounces) | **Get** /v3/suppression/bounces | Retrieve all bounces -*ListSuppressionBouncesClassifications* | [**ListSuppressionBouncesClassifications**](docs/ListSuppressionBouncesClassifications.md#listsuppressionbouncesclassifications) | **Get** /v3/suppression/bounces/classifications | Retrieve bounce classification totals -*ListSuppressionFromAsmGroup* | [**ListSuppressionFromAsmGroup**](docs/ListSuppressionFromAsmGroup.md#listsuppressionfromasmgroup) | **Get** /v3/asm/groups/{GroupId}/suppressions | Retrieve all suppressions for a suppression group -*SearchSuppressionFromAsmGroup* | [**SearchSuppressionFromAsmGroup**](docs/SearchSuppressionFromAsmGroup.md#searchsuppressionfromasmgroup) | **Post** /v3/asm/groups/{GroupId}/suppressions/search | Search for suppressions within a group -*UpdateAsmGroup* | [**UpdateAsmGroup**](docs/UpdateAsmGroup.md#updateasmgroup) | **Patch** /v3/asm/groups/{GroupId} | Update a suppression group. - - -## Documentation For Models - - - [Accept](Accept.md) - - [Accept1](Accept1.md) - - [AddSuppressionToAsmGroup201Response](AddSuppressionToAsmGroup201Response.md) - - [BlocksResponseInner](BlocksResponseInner.md) - - [BounceResponse](BounceResponse.md) - - [Classification](Classification.md) - - [Classification1](Classification1.md) - - [CreatAsmGroup201Response](CreatAsmGroup201Response.md) - - [CreateGlobalSuppression201Response](CreateGlobalSuppression201Response.md) - - [DeleteInvalidEmailsRequest](DeleteInvalidEmailsRequest.md) - - [DeleteSpamReportsRequest](DeleteSpamReportsRequest.md) - - [DeleteSuppressionBlocksRequest](DeleteSuppressionBlocksRequest.md) - - [DeleteSuppressionBouncesRequest](DeleteSuppressionBouncesRequest.md) - - [ErrorResponse](ErrorResponse.md) - - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) - - [GetAsmGroup200Response](GetAsmGroup200Response.md) - - [GetAsmSuppression200Response](GetAsmSuppression200Response.md) - - [GetAsmSuppression200ResponseSuppressionsInner](GetAsmSuppression200ResponseSuppressionsInner.md) - - [GetSuppressionBouncesClassifications200Response](GetSuppressionBouncesClassifications200Response.md) - - [GetSuppressionBouncesClassifications200ResponseResultInner](GetSuppressionBouncesClassifications200ResponseResultInner.md) - - [GetSuppressionBouncesClassifications200ResponseResultInnerStatsInner](GetSuppressionBouncesClassifications200ResponseResultInnerStatsInner.md) - - [InvalidEmail](InvalidEmail.md) - - [ListAsmSuppression200ResponseInner](ListAsmSuppression200ResponseInner.md) - - [ListGlobalSuppression200ResponseInner](ListGlobalSuppression200ResponseInner.md) - - [ListSuppressionBouncesClassifications200Response](ListSuppressionBouncesClassifications200Response.md) - - [ListSuppressionBouncesClassifications200ResponseResultInner](ListSuppressionBouncesClassifications200ResponseResultInner.md) - - [ListSuppressionBouncesClassifications200ResponseResultInnerStatsInner](ListSuppressionBouncesClassifications200ResponseResultInnerStatsInner.md) - - [RetrieveAGlobalSuppressionResponse](RetrieveAGlobalSuppressionResponse.md) - - [SpamReportsResponseInner](SpamReportsResponseInner.md) - - [SuppressionGroup](SuppressionGroup.md) - - [SuppressionGroupRequestBaseProps](SuppressionGroupRequestBaseProps.md) - - [SuppressionsRequest](SuppressionsRequest.md) - - [UpdateAsmGroupRequest](UpdateAsmGroupRequest.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/suppressions/api_add_suppression_to_asm_group.go b/rest/api/v3/suppressions/api_add_suppression_to_asm_group.go deleted file mode 100644 index f8d9279f..00000000 --- a/rest/api/v3/suppressions/api_add_suppression_to_asm_group.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type AddSuppressionToAsmGroupParam struct { - // The id of the unsubscribe group that you are adding suppressions to. - GroupId *string `json:"group_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - SuppressionsRequest *SuppressionsRequest `json:"SuppressionsRequest,omitempty"` -} - -func (params *AddSuppressionToAsmGroupParam) SetGroupId(GroupId string) *AddSuppressionToAsmGroupParam { - params.GroupId = &GroupId - return params -} -func (params *AddSuppressionToAsmGroupParam) SetOnbehalfof(Onbehalfof string) *AddSuppressionToAsmGroupParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *AddSuppressionToAsmGroupParam) SetSuppressionsRequest(SuppressionsRequest SuppressionsRequest) *AddSuppressionToAsmGroupParam { - params.SuppressionsRequest = &SuppressionsRequest - return params -} - -// **This endpoint allows you to add email addresses to an unsubscribe group.** If you attempt to add suppressions to a group that has been deleted or does not exist, the suppressions will be added to the global suppressions list. -func (c *ApiService) AddSuppressionToAsmGroup(params *AddSuppressionToAsmGroupParam) (interface{}, error) { - path := "/v3/asm/groups/{GroupId}/suppressions" - if params != nil && params.GroupId != nil { - path = strings.Replace(path, "{"+"GroupId"+"}", *params.GroupId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.SuppressionsRequest != nil { - b, err := json.Marshal(*params.SuppressionsRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &AddSuppressionToAsmGroup201Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_creat_asm_group.go b/rest/api/v3/suppressions/api_creat_asm_group.go deleted file mode 100644 index 10c213c7..00000000 --- a/rest/api/v3/suppressions/api_creat_asm_group.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type CreatAsmGroupParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - SuppressionGroupRequestBaseProps *SuppressionGroupRequestBaseProps `json:"SuppressionGroupRequestBaseProps,omitempty"` -} - -func (params *CreatAsmGroupParam) SetOnbehalfof(Onbehalfof string) *CreatAsmGroupParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *CreatAsmGroupParam) SetSuppressionGroupRequestBaseProps(SuppressionGroupRequestBaseProps SuppressionGroupRequestBaseProps) *CreatAsmGroupParam { - params.SuppressionGroupRequestBaseProps = &SuppressionGroupRequestBaseProps - return params -} - -// **This endpoint allows you to create a new suppression group.** To add an email address to the suppression group, [create a Suppression](https://docs.sendgrid.com/api-reference/suppressions-suppressions/add-suppressions-to-a-suppression-group). -func (c *ApiService) CreatAsmGroup(params *CreatAsmGroupParam) (interface{}, error) { - path := "/v3/asm/groups" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.SuppressionGroupRequestBaseProps != nil { - b, err := json.Marshal(*params.SuppressionGroupRequestBaseProps) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &CreatAsmGroup201Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_create_global_suppression.go b/rest/api/v3/suppressions/api_create_global_suppression.go deleted file mode 100644 index 694ac461..00000000 --- a/rest/api/v3/suppressions/api_create_global_suppression.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type CreateGlobalSuppressionParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - SuppressionsRequest *SuppressionsRequest `json:"SuppressionsRequest,omitempty"` -} - -func (params *CreateGlobalSuppressionParam) SetOnbehalfof(Onbehalfof string) *CreateGlobalSuppressionParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *CreateGlobalSuppressionParam) SetSuppressionsRequest(SuppressionsRequest SuppressionsRequest) *CreateGlobalSuppressionParam { - params.SuppressionsRequest = &SuppressionsRequest - return params -} - -// **This endpoint allows you to add one or more email addresses to the global suppressions group.** -func (c *ApiService) CreateGlobalSuppression(params *CreateGlobalSuppressionParam) (interface{}, error) { - path := "/v3/asm/suppressions/global" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.SuppressionsRequest != nil { - b, err := json.Marshal(*params.SuppressionsRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &CreateGlobalSuppression201Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_delete_asm_group.go b/rest/api/v3/suppressions/api_delete_asm_group.go deleted file mode 100644 index 21d06268..00000000 --- a/rest/api/v3/suppressions/api_delete_asm_group.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteAsmGroupParam struct { - // The ID of the suppression group you would like to retrieve. - GroupId *string `json:"group_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *DeleteAsmGroupParam) SetGroupId(GroupId string) *DeleteAsmGroupParam { - params.GroupId = &GroupId - return params -} -func (params *DeleteAsmGroupParam) SetOnbehalfof(Onbehalfof string) *DeleteAsmGroupParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to delete a suppression group.** If a recipient uses the \"one-click unsubscribe\" option on an email associated with a deleted group, that recipient will be added to the global suppression list. Deleting a suppression group will remove the suppression, meaning email will once again be sent to the previously suppressed addresses. This should be avoided unless a recipient indicates they wish to receive email from you again. You can use our [bypass filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) to deliver messages to otherwise suppressed addresses when exceptions are required. -func (c *ApiService) DeleteAsmGroup(params *DeleteAsmGroupParam) (interface{}, error) { - path := "/v3/asm/groups/{GroupId}" - if params != nil && params.GroupId != nil { - path = strings.Replace(path, "{"+"GroupId"+"}", *params.GroupId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_delete_global_suppression.go b/rest/api/v3/suppressions/api_delete_global_suppression.go deleted file mode 100644 index 466d5123..00000000 --- a/rest/api/v3/suppressions/api_delete_global_suppression.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteGlobalSuppressionParam struct { - // The email address of the global suppression you want to retrieve. Or, if you want to check if an email address is on the global suppressions list, enter that email address here. - Email *string `json:"email"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *DeleteGlobalSuppressionParam) SetEmail(Email string) *DeleteGlobalSuppressionParam { - params.Email = &Email - return params -} -func (params *DeleteGlobalSuppressionParam) SetOnbehalfof(Onbehalfof string) *DeleteGlobalSuppressionParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to remove an email address from the global suppressions group.** Deleting a suppression group will remove the suppression, meaning email will once again be sent to the previously suppressed addresses. This should be avoided unless a recipient indicates they wish to receive email from you again. You can use our [bypass filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) to deliver messages to otherwise suppressed addresses when exceptions are required. -func (c *ApiService) DeleteGlobalSuppression(params *DeleteGlobalSuppressionParam) (interface{}, error) { - path := "/v3/asm/suppressions/global/{Email}" - if params != nil && params.Email != nil { - path = strings.Replace(path, "{"+"Email"+"}", *params.Email, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_delete_invalid_email.go b/rest/api/v3/suppressions/api_delete_invalid_email.go deleted file mode 100644 index ab59106b..00000000 --- a/rest/api/v3/suppressions/api_delete_invalid_email.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteInvalidEmailParam struct { - // The specific email address of the invalid email entry that you want to retrieve. - Email *string `json:"email"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *DeleteInvalidEmailParam) SetEmail(Email string) *DeleteInvalidEmailParam { - params.Email = &Email - return params -} -func (params *DeleteInvalidEmailParam) SetOnbehalfof(Onbehalfof string) *DeleteInvalidEmailParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to remove a specific email address from the invalid email address list.** -func (c *ApiService) DeleteInvalidEmail(params *DeleteInvalidEmailParam) (interface{}, error) { - path := "/v3/suppression/invalid_emails/{Email}" - if params != nil && params.Email != nil { - path = strings.Replace(path, "{"+"Email"+"}", *params.Email, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_delete_invalid_emails.go b/rest/api/v3/suppressions/api_delete_invalid_emails.go deleted file mode 100644 index ae87c5c9..00000000 --- a/rest/api/v3/suppressions/api_delete_invalid_emails.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type DeleteInvalidEmailsParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - DeleteInvalidEmailsRequest *DeleteInvalidEmailsRequest `json:"DeleteInvalidEmailsRequest,omitempty"` -} - -func (params *DeleteInvalidEmailsParam) SetOnbehalfof(Onbehalfof string) *DeleteInvalidEmailsParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *DeleteInvalidEmailsParam) SetDeleteInvalidEmailsRequest(DeleteInvalidEmailsRequest DeleteInvalidEmailsRequest) *DeleteInvalidEmailsParam { - params.DeleteInvalidEmailsRequest = &DeleteInvalidEmailsRequest - return params -} - -// **This endpoint allows you to remove email addresses from your invalid email address list.** There are two options for deleting invalid email addresses: 1) You can delete all invalid email addresses by setting `delete_all` to true in the request body. 2) You can delete some invalid email addresses by specifying certain addresses in an array in the request body. -func (c *ApiService) DeleteInvalidEmails(params *DeleteInvalidEmailsParam) (interface{}, error) { - path := "/v3/suppression/invalid_emails" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.DeleteInvalidEmailsRequest != nil { - b, err := json.Marshal(*params.DeleteInvalidEmailsRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_delete_spam_report.go b/rest/api/v3/suppressions/api_delete_spam_report.go deleted file mode 100644 index 683c6510..00000000 --- a/rest/api/v3/suppressions/api_delete_spam_report.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteSpamReportParam struct { - // The email address of a specific spam report that you want to retrieve. - Email *string `json:"email"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *DeleteSpamReportParam) SetEmail(Email string) *DeleteSpamReportParam { - params.Email = &Email - return params -} -func (params *DeleteSpamReportParam) SetOnbehalfof(Onbehalfof string) *DeleteSpamReportParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to delete a specific spam report by email address.** Deleting a spam report will remove the suppression, meaning email will once again be sent to the previously suppressed address. This should be avoided unless a recipient indicates they wish to receive email from you again. You can use our [bypass filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) to deliver messages to otherwise suppressed addresses when exceptions are required. -func (c *ApiService) DeleteSpamReport(params *DeleteSpamReportParam) (interface{}, error) { - path := "/v3/suppression/spam_reports/{Email}" - if params != nil && params.Email != nil { - path = strings.Replace(path, "{"+"Email"+"}", *params.Email, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_delete_spam_reports.go b/rest/api/v3/suppressions/api_delete_spam_reports.go deleted file mode 100644 index e48b1a4b..00000000 --- a/rest/api/v3/suppressions/api_delete_spam_reports.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type DeleteSpamReportsParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - DeleteSpamReportsRequest *DeleteSpamReportsRequest `json:"DeleteSpamReportsRequest,omitempty"` -} - -func (params *DeleteSpamReportsParam) SetOnbehalfof(Onbehalfof string) *DeleteSpamReportsParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *DeleteSpamReportsParam) SetDeleteSpamReportsRequest(DeleteSpamReportsRequest DeleteSpamReportsRequest) *DeleteSpamReportsParam { - params.DeleteSpamReportsRequest = &DeleteSpamReportsRequest - return params -} - -// **This endpoint allows you to delete your spam reports.** Deleting a spam report will remove the suppression, meaning email will once again be sent to the previously suppressed address. This should be avoided unless a recipient indicates they wish to receive email from you again. You can use our [bypass filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) to deliver messages to otherwise suppressed addresses when exceptions are required. There are two options for deleting spam reports: 1. You can delete all spam reports by setting the `delete_all` field to `true` in the request body. 2. You can delete a list of select spam reports by specifying the email addresses in the `emails` array of the request body. -func (c *ApiService) DeleteSpamReports(params *DeleteSpamReportsParam) (interface{}, error) { - path := "/v3/suppression/spam_reports" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.DeleteSpamReportsRequest != nil { - b, err := json.Marshal(*params.DeleteSpamReportsRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_delete_suppression_block.go b/rest/api/v3/suppressions/api_delete_suppression_block.go deleted file mode 100644 index 0f4fbe1f..00000000 --- a/rest/api/v3/suppressions/api_delete_suppression_block.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteSuppressionBlockParam struct { - // The email address of the specific block. - Email *string `json:"email"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *DeleteSuppressionBlockParam) SetEmail(Email string) *DeleteSuppressionBlockParam { - params.Email = &Email - return params -} -func (params *DeleteSuppressionBlockParam) SetOnbehalfof(Onbehalfof string) *DeleteSuppressionBlockParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to delete a specific email address from your blocks list.** -func (c *ApiService) DeleteSuppressionBlock(params *DeleteSuppressionBlockParam) (interface{}, error) { - path := "/v3/suppression/blocks/{Email}" - if params != nil && params.Email != nil { - path = strings.Replace(path, "{"+"Email"+"}", *params.Email, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_delete_suppression_blocks.go b/rest/api/v3/suppressions/api_delete_suppression_blocks.go deleted file mode 100644 index d6e57975..00000000 --- a/rest/api/v3/suppressions/api_delete_suppression_blocks.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type DeleteSuppressionBlocksParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - DeleteSuppressionBlocksRequest *DeleteSuppressionBlocksRequest `json:"DeleteSuppressionBlocksRequest,omitempty"` -} - -func (params *DeleteSuppressionBlocksParam) SetOnbehalfof(Onbehalfof string) *DeleteSuppressionBlocksParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *DeleteSuppressionBlocksParam) SetDeleteSuppressionBlocksRequest(DeleteSuppressionBlocksRequest DeleteSuppressionBlocksRequest) *DeleteSuppressionBlocksParam { - params.DeleteSuppressionBlocksRequest = &DeleteSuppressionBlocksRequest - return params -} - -// **This endpoint allows you to delete all email addresses on your blocks list.** There are two options for deleting blocked emails: 1. You can delete all blocked emails by setting `delete_all` to `true` in the request body. 2. You can delete a selection of blocked emails by specifying the email addresses in the `emails` array of the request body. -func (c *ApiService) DeleteSuppressionBlocks(params *DeleteSuppressionBlocksParam) (interface{}, error) { - path := "/v3/suppression/blocks" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.DeleteSuppressionBlocksRequest != nil { - b, err := json.Marshal(*params.DeleteSuppressionBlocksRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_delete_suppression_bounce.go b/rest/api/v3/suppressions/api_delete_suppression_bounce.go deleted file mode 100644 index e231d827..00000000 --- a/rest/api/v3/suppressions/api_delete_suppression_bounce.go +++ /dev/null @@ -1,78 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteSuppressionBounceParam struct { - // The email address you would like to remove from the bounce list. - Email *string `json:"email"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *DeleteSuppressionBounceParam) SetEmail(Email string) *DeleteSuppressionBounceParam { - params.Email = &Email - return params -} -func (params *DeleteSuppressionBounceParam) SetOnbehalfof(Onbehalfof string) *DeleteSuppressionBounceParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to remove an email address from your bounce list.** -func (c *ApiService) DeleteSuppressionBounce(params *DeleteSuppressionBounceParam) (interface{}, error) { - path := "/v3/suppression/bounces/{Email}" - if params != nil && params.Email != nil { - path = strings.Replace(path, "{"+"Email"+"}", *params.Email, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_delete_suppression_bounces.go b/rest/api/v3/suppressions/api_delete_suppression_bounces.go deleted file mode 100644 index 625a49eb..00000000 --- a/rest/api/v3/suppressions/api_delete_suppression_bounces.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type DeleteSuppressionBouncesParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - DeleteSuppressionBouncesRequest *DeleteSuppressionBouncesRequest `json:"DeleteSuppressionBouncesRequest,omitempty"` -} - -func (params *DeleteSuppressionBouncesParam) SetOnbehalfof(Onbehalfof string) *DeleteSuppressionBouncesParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *DeleteSuppressionBouncesParam) SetDeleteSuppressionBouncesRequest(DeleteSuppressionBouncesRequest DeleteSuppressionBouncesRequest) *DeleteSuppressionBouncesParam { - params.DeleteSuppressionBouncesRequest = &DeleteSuppressionBouncesRequest - return params -} - -// **This endpoint allows you to delete all emails on your bounces list.** There are two options for deleting bounced emails: 1. You can delete all bounced emails by setting `delete_all` to `true` in the request body. 2. You can delete a selection of bounced emails by specifying the email addresses in the `emails` array of the request body. **WARNING:** You can not have both `emails` and `delete_all` set. -func (c *ApiService) DeleteSuppressionBounces(params *DeleteSuppressionBouncesParam) (interface{}, error) { - path := "/v3/suppression/bounces" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.DeleteSuppressionBouncesRequest != nil { - b, err := json.Marshal(*params.DeleteSuppressionBouncesRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_delete_suppression_from_asm_group.go b/rest/api/v3/suppressions/api_delete_suppression_from_asm_group.go deleted file mode 100644 index e7616089..00000000 --- a/rest/api/v3/suppressions/api_delete_suppression_from_asm_group.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "net/http" - "net/url" - - "strings" -) - -type DeleteSuppressionFromAsmGroupParam struct { - // The id of the suppression group that you are removing an email address from. - GroupId *string `json:"group_id"` - // The email address that you want to remove from the suppression group. - Email *string `json:"email"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *DeleteSuppressionFromAsmGroupParam) SetGroupId(GroupId string) *DeleteSuppressionFromAsmGroupParam { - params.GroupId = &GroupId - return params -} -func (params *DeleteSuppressionFromAsmGroupParam) SetEmail(Email string) *DeleteSuppressionFromAsmGroupParam { - params.Email = &Email - return params -} -func (params *DeleteSuppressionFromAsmGroupParam) SetOnbehalfof(Onbehalfof string) *DeleteSuppressionFromAsmGroupParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to remove a suppressed email address from the given suppression group.** Removing an address will remove the suppression, meaning email will once again be sent to the previously suppressed addresses. This should be avoided unless a recipient indicates they wish to receive email from you again. You can use our [bypass filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) to deliver messages to otherwise suppressed addresses when exceptions are required. -func (c *ApiService) DeleteSuppressionFromAsmGroup(params *DeleteSuppressionFromAsmGroupParam) (interface{}, error) { - path := "/v3/asm/groups/{GroupId}/suppressions/{Email}" - if params != nil && params.GroupId != nil { - path = strings.Replace(path, "{"+"GroupId"+"}", *params.GroupId, -1) - } - if params != nil && params.Email != nil { - path = strings.Replace(path, "{"+"Email"+"}", *params.Email, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_get_asm_group.go b/rest/api/v3/suppressions/api_get_asm_group.go deleted file mode 100644 index c6a8320a..00000000 --- a/rest/api/v3/suppressions/api_get_asm_group.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetAsmGroupParam struct { - // The ID of the suppression group you would like to retrieve. - GroupId *string `json:"group_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetAsmGroupParam) SetGroupId(GroupId string) *GetAsmGroupParam { - params.GroupId = &GroupId - return params -} -func (params *GetAsmGroupParam) SetOnbehalfof(Onbehalfof string) *GetAsmGroupParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a single suppression group.** -func (c *ApiService) GetAsmGroup(params *GetAsmGroupParam) (interface{}, error) { - path := "/v3/asm/groups/{GroupId}" - if params != nil && params.GroupId != nil { - path = strings.Replace(path, "{"+"GroupId"+"}", *params.GroupId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &GetAsmGroup200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_get_asm_suppression.go b/rest/api/v3/suppressions/api_get_asm_suppression.go deleted file mode 100644 index 0ad69eb2..00000000 --- a/rest/api/v3/suppressions/api_get_asm_suppression.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetAsmSuppressionParam struct { - // The email address that you want to search suppression groups for. - Email *string `json:"email"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetAsmSuppressionParam) SetEmail(Email string) *GetAsmSuppressionParam { - params.Email = &Email - return params -} -func (params *GetAsmSuppressionParam) SetOnbehalfof(Onbehalfof string) *GetAsmSuppressionParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint returns a list of all groups from which the given email address has been unsubscribed.** -func (c *ApiService) GetAsmSuppression(params *GetAsmSuppressionParam) (interface{}, error) { - path := "/v3/asm/suppressions/{Email}" - if params != nil && params.Email != nil { - path = strings.Replace(path, "{"+"Email"+"}", *params.Email, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &GetAsmSuppression200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_get_global_suppression.go b/rest/api/v3/suppressions/api_get_global_suppression.go deleted file mode 100644 index 42864c0d..00000000 --- a/rest/api/v3/suppressions/api_get_global_suppression.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetGlobalSuppressionParam struct { - // The email address of the global suppression you want to retrieve. Or, if you want to check if an email address is on the global suppressions list, enter that email address here. - Email *string `json:"email"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetGlobalSuppressionParam) SetEmail(Email string) *GetGlobalSuppressionParam { - params.Email = &Email - return params -} -func (params *GetGlobalSuppressionParam) SetOnbehalfof(Onbehalfof string) *GetGlobalSuppressionParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a global suppression. You can also use this endpoint to confirm if an email address is already globally suppresed.** If the email address you include in the URL path parameter `{email}` is already globally suppressed, the response will include that email address. If the address you enter for `{email}` is not globally suppressed, an empty JSON object `{}` will be returned. -func (c *ApiService) GetGlobalSuppression(params *GetGlobalSuppressionParam) (interface{}, error) { - path := "/v3/asm/suppressions/global/{Email}" - if params != nil && params.Email != nil { - path = strings.Replace(path, "{"+"Email"+"}", *params.Email, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &RetrieveAGlobalSuppressionResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_get_invalid_email.go b/rest/api/v3/suppressions/api_get_invalid_email.go deleted file mode 100644 index 912f049e..00000000 --- a/rest/api/v3/suppressions/api_get_invalid_email.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetInvalidEmailParam struct { - // The specific email address of the invalid email entry that you want to retrieve. - Email *string `json:"email"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetInvalidEmailParam) SetEmail(Email string) *GetInvalidEmailParam { - params.Email = &Email - return params -} -func (params *GetInvalidEmailParam) SetOnbehalfof(Onbehalfof string) *GetInvalidEmailParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a specific invalid email addresses.** -func (c *ApiService) GetInvalidEmail(params *GetInvalidEmailParam) (interface{}, error) { - path := "/v3/suppression/invalid_emails/{Email}" - if params != nil && params.Email != nil { - path = strings.Replace(path, "{"+"Email"+"}", *params.Email, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]InvalidEmail{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_get_spam_report.go b/rest/api/v3/suppressions/api_get_spam_report.go deleted file mode 100644 index d82e92f2..00000000 --- a/rest/api/v3/suppressions/api_get_spam_report.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetSpamReportParam struct { - // The email address of a specific spam report that you want to retrieve. - Email *string `json:"email"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetSpamReportParam) SetEmail(Email string) *GetSpamReportParam { - params.Email = &Email - return params -} -func (params *GetSpamReportParam) SetOnbehalfof(Onbehalfof string) *GetSpamReportParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a specific spam report by email address.** -func (c *ApiService) GetSpamReport(params *GetSpamReportParam) (interface{}, error) { - path := "/v3/suppression/spam_reports/{Email}" - if params != nil && params.Email != nil { - path = strings.Replace(path, "{"+"Email"+"}", *params.Email, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]SpamReportsResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_get_suppression_block.go b/rest/api/v3/suppressions/api_get_suppression_block.go deleted file mode 100644 index 54164d34..00000000 --- a/rest/api/v3/suppressions/api_get_suppression_block.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetSuppressionBlockParam struct { - // The email address of the specific block. - Email *string `json:"email"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetSuppressionBlockParam) SetEmail(Email string) *GetSuppressionBlockParam { - params.Email = &Email - return params -} -func (params *GetSuppressionBlockParam) SetOnbehalfof(Onbehalfof string) *GetSuppressionBlockParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a specific email address from your blocks list.** -func (c *ApiService) GetSuppressionBlock(params *GetSuppressionBlockParam) (interface{}, error) { - path := "/v3/suppression/blocks/{Email}" - if params != nil && params.Email != nil { - path = strings.Replace(path, "{"+"Email"+"}", *params.Email, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]BlocksResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_get_suppression_bounces.go b/rest/api/v3/suppressions/api_get_suppression_bounces.go deleted file mode 100644 index 4e3dcbbe..00000000 --- a/rest/api/v3/suppressions/api_get_suppression_bounces.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetSuppressionBouncesParam struct { - // The email address of the specific bounce you would like to retrieve - Email *string `json:"email"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetSuppressionBouncesParam) SetEmail(Email string) *GetSuppressionBouncesParam { - params.Email = &Email - return params -} -func (params *GetSuppressionBouncesParam) SetOnbehalfof(Onbehalfof string) *GetSuppressionBouncesParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a specific bounce by email address.** -func (c *ApiService) GetSuppressionBounces(params *GetSuppressionBouncesParam) (interface{}, error) { - path := "/v3/suppression/bounces/{Email}" - if params != nil && params.Email != nil { - path = strings.Replace(path, "{"+"Email"+"}", *params.Email, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]BounceResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_get_suppression_bounces_classifications.go b/rest/api/v3/suppressions/api_get_suppression_bounces_classifications.go deleted file mode 100644 index 83e51175..00000000 --- a/rest/api/v3/suppressions/api_get_suppression_bounces_classifications.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type GetSuppressionBouncesClassificationsParam struct { - // Specifies the content type to be returned by this endpoint. You can choose to receive CSV-formatted data by passing \"text/csv\" in the header. - Accept *Accept1 `json:"Accept"` - // The classification you want to filter by. Possible values are: `Content`, `Frequency or Volume Too High`, `Invalid Address`, `Mailbox Unavailable`, `Reputation`, `Technical Failure`, `Unclassified`. - Classification *Classification1 `json:"classification"` - // The start of the time range, in YYYY-MM-DD format, when a bounce was created (inclusive). - StartDate *string `json:"start_date,omitempty"` - // The end of the time range, in YYYY-MM-DD format, when a bounce was created (inclusive). - EndDate *string `json:"end_date,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetSuppressionBouncesClassificationsParam) SetAccept(Accept Accept1) *GetSuppressionBouncesClassificationsParam { - params.Accept = &Accept - return params -} -func (params *GetSuppressionBouncesClassificationsParam) SetClassification(Classification Classification1) *GetSuppressionBouncesClassificationsParam { - params.Classification = &Classification - return params -} -func (params *GetSuppressionBouncesClassificationsParam) SetStartDate(StartDate string) *GetSuppressionBouncesClassificationsParam { - params.StartDate = &StartDate - return params -} -func (params *GetSuppressionBouncesClassificationsParam) SetEndDate(EndDate string) *GetSuppressionBouncesClassificationsParam { - params.EndDate = &EndDate - return params -} -func (params *GetSuppressionBouncesClassificationsParam) SetOnbehalfof(Onbehalfof string) *GetSuppressionBouncesClassificationsParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// This endpoint will return the number of bounces for the classification specified in descending order for each day. You can retrieve the bounce classification totals in CSV format by specifying `\"text/csv\"` in the Accept header. -func (c *ApiService) GetSuppressionBouncesClassifications(params *GetSuppressionBouncesClassificationsParam) (interface{}, error) { - path := "/v3/suppression/bounces/classifications/{Classification}" - if params != nil && params.Classification != nil { - path = strings.Replace(path, "{"+"Classification"+"}", fmt.Sprint(*params.Classification), -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.StartDate != nil { - data.Set("start_date", *params.StartDate) - } - if params != nil && params.EndDate != nil { - data.Set("end_date", *params.EndDate) - } - - if params != nil && params.Accept != nil { - headers["Accept"] = *params.Accept - } - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &GetSuppressionBouncesClassifications200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_list_asm_group.go b/rest/api/v3/suppressions/api_list_asm_group.go deleted file mode 100644 index c662d163..00000000 --- a/rest/api/v3/suppressions/api_list_asm_group.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListAsmGroupParam struct { - // The ID of the suppression group(s) you want to retrieve. - Id *int32 `json:"id,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListAsmGroupParam) SetId(Id int32) *ListAsmGroupParam { - params.Id = &Id - return params -} -func (params *ListAsmGroupParam) SetOnbehalfof(Onbehalfof string) *ListAsmGroupParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a list of all suppression groups created by this user.** This endpoint can also return information for multiple group IDs that you include in your request. To add a group ID to your request, simply append `?id=123456&id=123456`, with the appropriate group IDs. -func (c *ApiService) ListAsmGroup(params *ListAsmGroupParam) (interface{}, error) { - path := "/v3/asm/groups" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Id != nil { - data.Set("id", fmt.Sprint(*params.Id)) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]SuppressionGroup{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_list_asm_suppression.go b/rest/api/v3/suppressions/api_list_asm_suppression.go deleted file mode 100644 index ef4e42e8..00000000 --- a/rest/api/v3/suppressions/api_list_asm_suppression.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListAsmSuppressionParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListAsmSuppressionParam) SetOnbehalfof(Onbehalfof string) *ListAsmSuppressionParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a list of all suppressions.** -func (c *ApiService) ListAsmSuppression(params *ListAsmSuppressionParam) (interface{}, error) { - path := "/v3/asm/suppressions" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]ListAsmSuppression200ResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_list_global_suppression.go b/rest/api/v3/suppressions/api_list_global_suppression.go deleted file mode 100644 index c80e48d8..00000000 --- a/rest/api/v3/suppressions/api_list_global_suppression.go +++ /dev/null @@ -1,106 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListGlobalSuppressionParam struct { - // Refers start of the time range in unix timestamp when an unsubscribe email was created (inclusive). - StartTime *int32 `json:"start_time,omitempty"` - // Refers end of the time range in unix timestamp when an unsubscribe email was created (inclusive). - EndTime *int32 `json:"end_time,omitempty"` - // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. The maximum page size for this endpoint is 500 items per page. - Limit *int32 `json:"limit,omitempty"` - // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. - Offset *int32 `json:"offset,omitempty"` - // Specifies which records to return based on the records' associated email addresses. For example, `sales` returns records with email addresses that start with 'sales', such as `salesdepartment@example.com` or `sales@example.com`. You can also use `%25` as a wildcard. For example, `%25market` returns records containing email addresses with the string 'market' anywhere in the email address, and `%25market%25tree` returns records containing email addresses with the string 'market' followed by the string 'tree'. Any reserved characters should be [percent-encoded](https://en.wikipedia.org/wiki/Percent-encoding#Reserved_characters), e.g., the `@` symbol should be encoded as `%40`. - Email *string `json:"email,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListGlobalSuppressionParam) SetStartTime(StartTime int32) *ListGlobalSuppressionParam { - params.StartTime = &StartTime - return params -} -func (params *ListGlobalSuppressionParam) SetEndTime(EndTime int32) *ListGlobalSuppressionParam { - params.EndTime = &EndTime - return params -} -func (params *ListGlobalSuppressionParam) SetLimit(Limit int32) *ListGlobalSuppressionParam { - params.Limit = &Limit - return params -} -func (params *ListGlobalSuppressionParam) SetOffset(Offset int32) *ListGlobalSuppressionParam { - params.Offset = &Offset - return params -} -func (params *ListGlobalSuppressionParam) SetEmail(Email string) *ListGlobalSuppressionParam { - params.Email = &Email - return params -} -func (params *ListGlobalSuppressionParam) SetOnbehalfof(Onbehalfof string) *ListGlobalSuppressionParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a paginated list of all email address that are globally suppressed.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. -func (c *ApiService) ListGlobalSuppression(params *ListGlobalSuppressionParam) (interface{}, error) { - path := "/v3/suppression/unsubscribes" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.StartTime != nil { - data.Set("start_time", fmt.Sprint(*params.StartTime)) - } - if params != nil && params.EndTime != nil { - data.Set("end_time", fmt.Sprint(*params.EndTime)) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - if params != nil && params.Email != nil { - data.Set("email", *params.Email) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]ListGlobalSuppression200ResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_list_invalid_email.go b/rest/api/v3/suppressions/api_list_invalid_email.go deleted file mode 100644 index 7a90d146..00000000 --- a/rest/api/v3/suppressions/api_list_invalid_email.go +++ /dev/null @@ -1,106 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListInvalidEmailParam struct { - // Refers start of the time range in unix timestamp when an invalid email was created (inclusive). - StartTime *int32 `json:"start_time,omitempty"` - // Refers end of the time range in unix timestamp when an invalid email was created (inclusive). - EndTime *int32 `json:"end_time,omitempty"` - // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. The maximum page size for this endpoint is 500 items per page. - Limit *int32 `json:"limit,omitempty"` - // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. - Offset *int32 `json:"offset,omitempty"` - // This parameter allows you to filter results by email address. Only invalid addresses matching an address passed in this parameter will be returned. - Email *string `json:"email,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListInvalidEmailParam) SetStartTime(StartTime int32) *ListInvalidEmailParam { - params.StartTime = &StartTime - return params -} -func (params *ListInvalidEmailParam) SetEndTime(EndTime int32) *ListInvalidEmailParam { - params.EndTime = &EndTime - return params -} -func (params *ListInvalidEmailParam) SetLimit(Limit int32) *ListInvalidEmailParam { - params.Limit = &Limit - return params -} -func (params *ListInvalidEmailParam) SetOffset(Offset int32) *ListInvalidEmailParam { - params.Offset = &Offset - return params -} -func (params *ListInvalidEmailParam) SetEmail(Email string) *ListInvalidEmailParam { - params.Email = &Email - return params -} -func (params *ListInvalidEmailParam) SetOnbehalfof(Onbehalfof string) *ListInvalidEmailParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a paginated list of all invalid email addresses.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. -func (c *ApiService) ListInvalidEmail(params *ListInvalidEmailParam) (interface{}, error) { - path := "/v3/suppression/invalid_emails" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.StartTime != nil { - data.Set("start_time", fmt.Sprint(*params.StartTime)) - } - if params != nil && params.EndTime != nil { - data.Set("end_time", fmt.Sprint(*params.EndTime)) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - if params != nil && params.Email != nil { - data.Set("email", *params.Email) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]InvalidEmail{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_list_spam_report.go b/rest/api/v3/suppressions/api_list_spam_report.go deleted file mode 100644 index bd68b13d..00000000 --- a/rest/api/v3/suppressions/api_list_spam_report.go +++ /dev/null @@ -1,106 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListSpamReportParam struct { - // The start of the time range when a spam report was created (inclusive). This is a unix timestamp. - StartTime *int32 `json:"start_time,omitempty"` - // The end of the time range when a spam report was created (inclusive). This is a unix timestamp. - EndTime *int32 `json:"end_time,omitempty"` - // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. The maximum page size for this endpoint is 500 items per page. - Limit *int32 `json:"limit,omitempty"` - // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. - Offset *int32 `json:"offset,omitempty"` - // Specifies which records to return based on the records' associated email addresses. For example, `sales` returns records with email addresses that start with 'sales', such as `salesdepartment@example.com` or `sales@example.com`. You can also use `%25` as a wildcard. For example, `%25market` returns records containing email addresses with the string 'market' anywhere in the email address, and `%25market%25tree` returns records containing email addresses with the string 'market' followed by the string 'tree'. Any reserved characters should be [percent-encoded](https://en.wikipedia.org/wiki/Percent-encoding#Reserved_characters), e.g., the `@` symbol should be encoded as `%40`. - Email *string `json:"email,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListSpamReportParam) SetStartTime(StartTime int32) *ListSpamReportParam { - params.StartTime = &StartTime - return params -} -func (params *ListSpamReportParam) SetEndTime(EndTime int32) *ListSpamReportParam { - params.EndTime = &EndTime - return params -} -func (params *ListSpamReportParam) SetLimit(Limit int32) *ListSpamReportParam { - params.Limit = &Limit - return params -} -func (params *ListSpamReportParam) SetOffset(Offset int32) *ListSpamReportParam { - params.Offset = &Offset - return params -} -func (params *ListSpamReportParam) SetEmail(Email string) *ListSpamReportParam { - params.Email = &Email - return params -} -func (params *ListSpamReportParam) SetOnbehalfof(Onbehalfof string) *ListSpamReportParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a paginated list of all spam reports.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. -func (c *ApiService) ListSpamReport(params *ListSpamReportParam) (interface{}, error) { - path := "/v3/suppression/spam_reports" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.StartTime != nil { - data.Set("start_time", fmt.Sprint(*params.StartTime)) - } - if params != nil && params.EndTime != nil { - data.Set("end_time", fmt.Sprint(*params.EndTime)) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - if params != nil && params.Email != nil { - data.Set("email", *params.Email) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]SpamReportsResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_list_suppression_block.go b/rest/api/v3/suppressions/api_list_suppression_block.go deleted file mode 100644 index 1ac6612a..00000000 --- a/rest/api/v3/suppressions/api_list_suppression_block.go +++ /dev/null @@ -1,106 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListSuppressionBlockParam struct { - // The start of the time range when a blocked email was created (inclusive). This is a unix timestamp. - StartTime *int32 `json:"start_time,omitempty"` - // The end of the time range when a blocked email was created (inclusive). This is a unix timestamp. - EndTime *int32 `json:"end_time,omitempty"` - // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. The maximum page size for this endpoint is 500 items per page. - Limit *int32 `json:"limit,omitempty"` - // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. - Offset *int32 `json:"offset,omitempty"` - // Specifies which records to return based on the records' associated email addresses. For example, `sales` returns records with email addresses that start with 'sales', such as `salesdepartment@example.com` or `sales@example.com`. You can also use `%25` as a wildcard. For example, `%25market` returns records containing email addresses with the string 'market' anywhere in the email address, and `%25market%25tree` returns records containing email addresses with the string 'market' followed by the string 'tree'. Any reserved characters should be [percent-encoded](https://en.wikipedia.org/wiki/Percent-encoding#Reserved_characters), e.g., the `@` symbol should be encoded as `%40`. - Email *string `json:"email,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListSuppressionBlockParam) SetStartTime(StartTime int32) *ListSuppressionBlockParam { - params.StartTime = &StartTime - return params -} -func (params *ListSuppressionBlockParam) SetEndTime(EndTime int32) *ListSuppressionBlockParam { - params.EndTime = &EndTime - return params -} -func (params *ListSuppressionBlockParam) SetLimit(Limit int32) *ListSuppressionBlockParam { - params.Limit = &Limit - return params -} -func (params *ListSuppressionBlockParam) SetOffset(Offset int32) *ListSuppressionBlockParam { - params.Offset = &Offset - return params -} -func (params *ListSuppressionBlockParam) SetEmail(Email string) *ListSuppressionBlockParam { - params.Email = &Email - return params -} -func (params *ListSuppressionBlockParam) SetOnbehalfof(Onbehalfof string) *ListSuppressionBlockParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a paginated list of all email addresses that are currently on your blocks list.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. -func (c *ApiService) ListSuppressionBlock(params *ListSuppressionBlockParam) (interface{}, error) { - path := "/v3/suppression/blocks" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.StartTime != nil { - data.Set("start_time", fmt.Sprint(*params.StartTime)) - } - if params != nil && params.EndTime != nil { - data.Set("end_time", fmt.Sprint(*params.EndTime)) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - if params != nil && params.Email != nil { - data.Set("email", *params.Email) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]BlocksResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_list_suppression_bounces.go b/rest/api/v3/suppressions/api_list_suppression_bounces.go deleted file mode 100644 index 62aad4c5..00000000 --- a/rest/api/v3/suppressions/api_list_suppression_bounces.go +++ /dev/null @@ -1,123 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListSuppressionBouncesParam struct { - // - Accept *string `json:"Accept"` - // Refers start of the time range in unix timestamp when a bounce was created (inclusive). - StartTime *int32 `json:"start_time,omitempty"` - // Refers end of the time range in unix timestamp when a bounce was created (inclusive). - EndTime *int32 `json:"end_time,omitempty"` - // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. The maximum page size for this endpoint is 500 items per page. - Limit *int32 `json:"limit,omitempty"` - // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. - Offset *int32 `json:"offset,omitempty"` - // Specifies which records to return based on the records' associated email addresses. For example, `sales` returns records with email addresses that start with 'sales', such as `salesdepartment@example.com` or `sales@example.com`. You can also use `%25` as a wildcard. For example, `%25market` returns records containing email addresses with the string 'market' anywhere in the email address, and `%25market%25tree` returns records containing email addresses with the string 'market' followed by the string 'tree'. Any reserved characters should be [percent-encoded](https://en.wikipedia.org/wiki/Percent-encoding#Reserved_characters), e.g., the `@` symbol should be encoded as `%40`. - Email *string `json:"email,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListSuppressionBouncesParam) SetAccept(Accept string) *ListSuppressionBouncesParam { - params.Accept = &Accept - return params -} -func (params *ListSuppressionBouncesParam) SetStartTime(StartTime int32) *ListSuppressionBouncesParam { - params.StartTime = &StartTime - return params -} -func (params *ListSuppressionBouncesParam) SetEndTime(EndTime int32) *ListSuppressionBouncesParam { - params.EndTime = &EndTime - return params -} -func (params *ListSuppressionBouncesParam) SetLimit(Limit int32) *ListSuppressionBouncesParam { - params.Limit = &Limit - return params -} -func (params *ListSuppressionBouncesParam) SetOffset(Offset int32) *ListSuppressionBouncesParam { - params.Offset = &Offset - return params -} -func (params *ListSuppressionBouncesParam) SetEmail(Email string) *ListSuppressionBouncesParam { - params.Email = &Email - return params -} -func (params *ListSuppressionBouncesParam) SetOnbehalfof(Onbehalfof string) *ListSuppressionBouncesParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a paginated list of all your bounces.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. -func (c *ApiService) ListSuppressionBounces(params *ListSuppressionBouncesParam) (interface{}, error) { - path := "/v3/suppression/bounces" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.StartTime != nil { - data.Set("start_time", fmt.Sprint(*params.StartTime)) - } - if params != nil && params.EndTime != nil { - data.Set("end_time", fmt.Sprint(*params.EndTime)) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - if params != nil && params.Email != nil { - data.Set("email", *params.Email) - } - - if params != nil && params.Accept != nil { - headers["Accept"] = *params.Accept - } - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]BounceResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_list_suppression_bounces_classifications.go b/rest/api/v3/suppressions/api_list_suppression_bounces_classifications.go deleted file mode 100644 index 532ad53d..00000000 --- a/rest/api/v3/suppressions/api_list_suppression_bounces_classifications.go +++ /dev/null @@ -1,95 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListSuppressionBouncesClassificationsParam struct { - // Specifies the content type to be returned by this endpoint. You can choose to receive CSV-formatted data by passing \"text/csv\" in the header. - Accept *Accept `json:"Accept"` - // The start of the time range, in YYYY-MM-DD format, when a bounce was created (inclusive). - StartDate *string `json:"start_date,omitempty"` - // The end of the time range, in YYYY-MM-DD format, when a bounce was created (inclusive). - EndDate *string `json:"end_date,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListSuppressionBouncesClassificationsParam) SetAccept(Accept Accept) *ListSuppressionBouncesClassificationsParam { - params.Accept = &Accept - return params -} -func (params *ListSuppressionBouncesClassificationsParam) SetStartDate(StartDate string) *ListSuppressionBouncesClassificationsParam { - params.StartDate = &StartDate - return params -} -func (params *ListSuppressionBouncesClassificationsParam) SetEndDate(EndDate string) *ListSuppressionBouncesClassificationsParam { - params.EndDate = &EndDate - return params -} -func (params *ListSuppressionBouncesClassificationsParam) SetOnbehalfof(Onbehalfof string) *ListSuppressionBouncesClassificationsParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// This endpoint will return the total number of bounces by classification in descending order for each day. You can retrieve the bounce classification totals in CSV format by specifying `\"text/csv\"` in the Accept header. -func (c *ApiService) ListSuppressionBouncesClassifications(params *ListSuppressionBouncesClassificationsParam) (interface{}, error) { - path := "/v3/suppression/bounces/classifications" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.StartDate != nil { - data.Set("start_date", *params.StartDate) - } - if params != nil && params.EndDate != nil { - data.Set("end_date", *params.EndDate) - } - - if params != nil && params.Accept != nil { - headers["Accept"] = *params.Accept - } - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListSuppressionBouncesClassifications200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_list_suppression_from_asm_group.go b/rest/api/v3/suppressions/api_list_suppression_from_asm_group.go deleted file mode 100644 index 84f461c2..00000000 --- a/rest/api/v3/suppressions/api_list_suppression_from_asm_group.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type ListSuppressionFromAsmGroupParam struct { - // The id of the unsubscribe group that you are adding suppressions to. - GroupId *string `json:"group_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListSuppressionFromAsmGroupParam) SetGroupId(GroupId string) *ListSuppressionFromAsmGroupParam { - params.GroupId = &GroupId - return params -} -func (params *ListSuppressionFromAsmGroupParam) SetOnbehalfof(Onbehalfof string) *ListSuppressionFromAsmGroupParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve all suppressed email addresses belonging to the given group.** -func (c *ApiService) ListSuppressionFromAsmGroup(params *ListSuppressionFromAsmGroupParam) (interface{}, error) { - path := "/v3/asm/groups/{GroupId}/suppressions" - if params != nil && params.GroupId != nil { - path = strings.Replace(path, "{"+"GroupId"+"}", *params.GroupId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]string{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_search_suppression_from_asm_group.go b/rest/api/v3/suppressions/api_search_suppression_from_asm_group.go deleted file mode 100644 index 26ec9d3b..00000000 --- a/rest/api/v3/suppressions/api_search_suppression_from_asm_group.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type SearchSuppressionFromAsmGroupParam struct { - // The ID of the suppression group that you would like to search. - GroupId *string `json:"group_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - SuppressionsRequest *SuppressionsRequest `json:"SuppressionsRequest,omitempty"` -} - -func (params *SearchSuppressionFromAsmGroupParam) SetGroupId(GroupId string) *SearchSuppressionFromAsmGroupParam { - params.GroupId = &GroupId - return params -} -func (params *SearchSuppressionFromAsmGroupParam) SetOnbehalfof(Onbehalfof string) *SearchSuppressionFromAsmGroupParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *SearchSuppressionFromAsmGroupParam) SetSuppressionsRequest(SuppressionsRequest SuppressionsRequest) *SearchSuppressionFromAsmGroupParam { - params.SuppressionsRequest = &SuppressionsRequest - return params -} - -// **This endpoint allows you to search a suppression group for multiple suppressions.** When given a list of email addresses and a group ID, this endpoint will only return the email addresses that have been unsubscribed from the given group. -func (c *ApiService) SearchSuppressionFromAsmGroup(params *SearchSuppressionFromAsmGroupParam) (interface{}, error) { - path := "/v3/asm/groups/{GroupId}/suppressions/search" - if params != nil && params.GroupId != nil { - path = strings.Replace(path, "{"+"GroupId"+"}", *params.GroupId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.SuppressionsRequest != nil { - b, err := json.Marshal(*params.SuppressionsRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]string{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/api_service.go b/rest/api/v3/suppressions/api_service.go deleted file mode 100644 index 883efe71..00000000 --- a/rest/api/v3/suppressions/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/suppressions/api_update_asm_group.go b/rest/api/v3/suppressions/api_update_asm_group.go deleted file mode 100644 index b3a4101d..00000000 --- a/rest/api/v3/suppressions/api_update_asm_group.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type UpdateAsmGroupParam struct { - // The ID of the suppression group you would like to retrieve. - GroupId *string `json:"group_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - UpdateAsmGroupRequest *UpdateAsmGroupRequest `json:"UpdateAsmGroupRequest,omitempty"` -} - -func (params *UpdateAsmGroupParam) SetGroupId(GroupId string) *UpdateAsmGroupParam { - params.GroupId = &GroupId - return params -} -func (params *UpdateAsmGroupParam) SetOnbehalfof(Onbehalfof string) *UpdateAsmGroupParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateAsmGroupParam) SetUpdateAsmGroupRequest(UpdateAsmGroupRequest UpdateAsmGroupRequest) *UpdateAsmGroupParam { - params.UpdateAsmGroupRequest = &UpdateAsmGroupRequest - return params -} - -// **This endpoint allows you to update or change a suppression group.** -func (c *ApiService) UpdateAsmGroup(params *UpdateAsmGroupParam) (interface{}, error) { - path := "/v3/asm/groups/{GroupId}" - if params != nil && params.GroupId != nil { - path = strings.Replace(path, "{"+"GroupId"+"}", *params.GroupId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateAsmGroupRequest != nil { - b, err := json.Marshal(*params.UpdateAsmGroupRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &SuppressionGroup{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/suppressions/docs/Accept.md b/rest/api/v3/suppressions/docs/Accept.md deleted file mode 100644 index 06470518..00000000 --- a/rest/api/v3/suppressions/docs/Accept.md +++ /dev/null @@ -1,13 +0,0 @@ -# Accept - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**APPLICATION_JSON** | string | (value: `"application/json"`) -**TEXT_CSV** | string | (value: `"text/csv"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/Accept1.md b/rest/api/v3/suppressions/docs/Accept1.md deleted file mode 100644 index dd00f8c0..00000000 --- a/rest/api/v3/suppressions/docs/Accept1.md +++ /dev/null @@ -1,13 +0,0 @@ -# Accept1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**APPLICATION_JSON** | string | (value: `"application/json"`) -**TEXT_CSV** | string | (value: `"text/csv"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/AddSuppressionToAsmGroup.md b/rest/api/v3/suppressions/docs/AddSuppressionToAsmGroup.md deleted file mode 100644 index 65f59631..00000000 --- a/rest/api/v3/suppressions/docs/AddSuppressionToAsmGroup.md +++ /dev/null @@ -1,53 +0,0 @@ -# AddSuppressionToAsmGroup - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddSuppressionToAsmGroup**](AddSuppressionToAsmGroup.md#AddSuppressionToAsmGroup) | **Post** /v3/asm/groups/{GroupId}/suppressions | Add suppressions to a suppression group - - - -## AddSuppressionToAsmGroup - -> AddSuppressionToAsmGroup201Response AddSuppressionToAsmGroup(ctx, GroupIdoptional) - -Add suppressions to a suppression group - -**This endpoint allows you to add email addresses to an unsubscribe group.** If you attempt to add suppressions to a group that has been deleted or does not exist, the suppressions will be added to the global suppressions list. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**GroupId** | **string** | The id of the unsubscribe group that you are adding suppressions to. - -### Other Parameters - -Other parameters are passed through a pointer to a AddSuppressionToAsmGroupParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**SuppressionsRequest** | [**SuppressionsRequest**](SuppressionsRequest.md) | - -### Return type - -[**AddSuppressionToAsmGroup201Response**](AddSuppressionToAsmGroup201Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/AddSuppressionToAsmGroup201Response.md b/rest/api/v3/suppressions/docs/AddSuppressionToAsmGroup201Response.md deleted file mode 100644 index 7173843a..00000000 --- a/rest/api/v3/suppressions/docs/AddSuppressionToAsmGroup201Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# AddSuppressionToAsmGroup201Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**RecipientEmails** | **[]string** | The email addresses you added to the unsubscribe group |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/BlocksResponseInner.md b/rest/api/v3/suppressions/docs/BlocksResponseInner.md deleted file mode 100644 index 349c63e4..00000000 --- a/rest/api/v3/suppressions/docs/BlocksResponseInner.md +++ /dev/null @@ -1,14 +0,0 @@ -# BlocksResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Created** | **int32** | A Unix timestamp indicating when the email address was added to the blocks list. | -**Email** | **string** | The email address that was added to the block list. | -**Reason** | **string** | An explanation for the reason of the block. | -**Status** | **string** | The status of the block. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/BounceResponse.md b/rest/api/v3/suppressions/docs/BounceResponse.md deleted file mode 100644 index c280365a..00000000 --- a/rest/api/v3/suppressions/docs/BounceResponse.md +++ /dev/null @@ -1,14 +0,0 @@ -# BounceResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Created** | **float32** | The unix timestamp for when the bounce record was created at SendGrid. |[optional] -**Email** | **string** | The email address that was added to the bounce list. |[optional] -**Reason** | **string** | The reason for the bounce. This typically will be a bounce code, an enhanced code, and a description. |[optional] -**Status** | **string** | Enhanced SMTP bounce response |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/Classification.md b/rest/api/v3/suppressions/docs/Classification.md deleted file mode 100644 index 4607f8be..00000000 --- a/rest/api/v3/suppressions/docs/Classification.md +++ /dev/null @@ -1,18 +0,0 @@ -# Classification - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**CONTENT** | string | (value: `"Content"`) -**FREQUENCY_OR_VOLUME_TOO_HIGH** | string | (value: `"Frequency or Volume Too High"`) -**INVALID_ADDRESS** | string | (value: `"Invalid Address"`) -**MAILBOX_UNAVAILABLE** | string | (value: `"Mailbox Unavailable"`) -**REPUTATION** | string | (value: `"Reputation"`) -**TECHNICAL_FAILURE** | string | (value: `"Technical Failure"`) -**UNCLASSIFIED** | string | (value: `"Unclassified"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/Classification1.md b/rest/api/v3/suppressions/docs/Classification1.md deleted file mode 100644 index 4957da27..00000000 --- a/rest/api/v3/suppressions/docs/Classification1.md +++ /dev/null @@ -1,18 +0,0 @@ -# Classification1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**CONTENT** | string | (value: `"Content"`) -**FREQUENCY_OR_VOLUME_TOO_HIGH** | string | (value: `"Frequency or Volume Too High"`) -**INVALID_ADDRESS** | string | (value: `"Invalid Address"`) -**MAILBOX_UNAVAILABLE** | string | (value: `"Mailbox Unavailable"`) -**REPUTATION** | string | (value: `"Reputation"`) -**TECHNICAL_FAILURE** | string | (value: `"Technical Failure"`) -**UNCLASSIFIED** | string | (value: `"Unclassified"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/CreatAsmGroup.md b/rest/api/v3/suppressions/docs/CreatAsmGroup.md deleted file mode 100644 index 2861b52c..00000000 --- a/rest/api/v3/suppressions/docs/CreatAsmGroup.md +++ /dev/null @@ -1,49 +0,0 @@ -# CreatAsmGroup - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreatAsmGroup**](CreatAsmGroup.md#CreatAsmGroup) | **Post** /v3/asm/groups | Create a new suppression group - - - -## CreatAsmGroup - -> CreatAsmGroup201Response CreatAsmGroup(ctx, optional) - -Create a new suppression group - -**This endpoint allows you to create a new suppression group.** To add an email address to the suppression group, [create a Suppression](https://docs.sendgrid.com/api-reference/suppressions-suppressions/add-suppressions-to-a-suppression-group). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreatAsmGroupParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**SuppressionGroupRequestBaseProps** | [**SuppressionGroupRequestBaseProps**](SuppressionGroupRequestBaseProps.md) | - -### Return type - -[**CreatAsmGroup201Response**](CreatAsmGroup201Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/CreatAsmGroup201Response.md b/rest/api/v3/suppressions/docs/CreatAsmGroup201Response.md deleted file mode 100644 index 31c38829..00000000 --- a/rest/api/v3/suppressions/docs/CreatAsmGroup201Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# CreatAsmGroup201Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int32** | The ID of the suppression group. | -**Name** | **string** | The name of the suppression group. | -**Description** | **string** | A brief description of the suppression group. | -**IsDefault** | **bool** | Indicates if this is the default suppression group. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/CreateGlobalSuppression.md b/rest/api/v3/suppressions/docs/CreateGlobalSuppression.md deleted file mode 100644 index f69ddb90..00000000 --- a/rest/api/v3/suppressions/docs/CreateGlobalSuppression.md +++ /dev/null @@ -1,49 +0,0 @@ -# CreateGlobalSuppression - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateGlobalSuppression**](CreateGlobalSuppression.md#CreateGlobalSuppression) | **Post** /v3/asm/suppressions/global | Add recipient addresses to the global suppression group. - - - -## CreateGlobalSuppression - -> CreateGlobalSuppression201Response CreateGlobalSuppression(ctx, optional) - -Add recipient addresses to the global suppression group. - -**This endpoint allows you to add one or more email addresses to the global suppressions group.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateGlobalSuppressionParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**SuppressionsRequest** | [**SuppressionsRequest**](SuppressionsRequest.md) | - -### Return type - -[**CreateGlobalSuppression201Response**](CreateGlobalSuppression201Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/CreateGlobalSuppression201Response.md b/rest/api/v3/suppressions/docs/CreateGlobalSuppression201Response.md deleted file mode 100644 index f279687c..00000000 --- a/rest/api/v3/suppressions/docs/CreateGlobalSuppression201Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateGlobalSuppression201Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**RecipientEmails** | **[]string** | The email addresses that are globally suppressed | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/DeleteAsmGroup.md b/rest/api/v3/suppressions/docs/DeleteAsmGroup.md deleted file mode 100644 index 8f25cada..00000000 --- a/rest/api/v3/suppressions/docs/DeleteAsmGroup.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeleteAsmGroup - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteAsmGroup**](DeleteAsmGroup.md#DeleteAsmGroup) | **Delete** /v3/asm/groups/{GroupId} | Delete a Suppression Group - - - -## DeleteAsmGroup - -> map[string]interface{} DeleteAsmGroup(ctx, GroupIdoptional) - -Delete a Suppression Group - -**This endpoint allows you to delete a suppression group.** If a recipient uses the \"one-click unsubscribe\" option on an email associated with a deleted group, that recipient will be added to the global suppression list. Deleting a suppression group will remove the suppression, meaning email will once again be sent to the previously suppressed addresses. This should be avoided unless a recipient indicates they wish to receive email from you again. You can use our [bypass filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) to deliver messages to otherwise suppressed addresses when exceptions are required. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**GroupId** | **string** | The ID of the suppression group you would like to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteAsmGroupParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/DeleteGlobalSuppression.md b/rest/api/v3/suppressions/docs/DeleteGlobalSuppression.md deleted file mode 100644 index c71936c8..00000000 --- a/rest/api/v3/suppressions/docs/DeleteGlobalSuppression.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeleteGlobalSuppression - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteGlobalSuppression**](DeleteGlobalSuppression.md#DeleteGlobalSuppression) | **Delete** /v3/asm/suppressions/global/{Email} | Delete a Global Suppression - - - -## DeleteGlobalSuppression - -> map[string]interface{} DeleteGlobalSuppression(ctx, Emailoptional) - -Delete a Global Suppression - -**This endpoint allows you to remove an email address from the global suppressions group.** Deleting a suppression group will remove the suppression, meaning email will once again be sent to the previously suppressed addresses. This should be avoided unless a recipient indicates they wish to receive email from you again. You can use our [bypass filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) to deliver messages to otherwise suppressed addresses when exceptions are required. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Email** | **string** | The email address of the global suppression you want to retrieve. Or, if you want to check if an email address is on the global suppressions list, enter that email address here. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteGlobalSuppressionParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/DeleteInvalidEmail.md b/rest/api/v3/suppressions/docs/DeleteInvalidEmail.md deleted file mode 100644 index 32607cde..00000000 --- a/rest/api/v3/suppressions/docs/DeleteInvalidEmail.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeleteInvalidEmail - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteInvalidEmail**](DeleteInvalidEmail.md#DeleteInvalidEmail) | **Delete** /v3/suppression/invalid_emails/{Email} | Delete a specific invalid email - - - -## DeleteInvalidEmail - -> map[string]interface{} DeleteInvalidEmail(ctx, Emailoptional) - -Delete a specific invalid email - -**This endpoint allows you to remove a specific email address from the invalid email address list.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Email** | **string** | The specific email address of the invalid email entry that you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteInvalidEmailParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/DeleteInvalidEmails.md b/rest/api/v3/suppressions/docs/DeleteInvalidEmails.md deleted file mode 100644 index 3bdd0c7d..00000000 --- a/rest/api/v3/suppressions/docs/DeleteInvalidEmails.md +++ /dev/null @@ -1,49 +0,0 @@ -# DeleteInvalidEmails - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteInvalidEmails**](DeleteInvalidEmails.md#DeleteInvalidEmails) | **Delete** /v3/suppression/invalid_emails | Delete invalid emails - - - -## DeleteInvalidEmails - -> map[string]interface{} DeleteInvalidEmails(ctx, optional) - -Delete invalid emails - -**This endpoint allows you to remove email addresses from your invalid email address list.** There are two options for deleting invalid email addresses: 1) You can delete all invalid email addresses by setting `delete_all` to true in the request body. 2) You can delete some invalid email addresses by specifying certain addresses in an array in the request body. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteInvalidEmailsParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**DeleteInvalidEmailsRequest** | [**DeleteInvalidEmailsRequest**](DeleteInvalidEmailsRequest.md) | - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/DeleteInvalidEmailsRequest.md b/rest/api/v3/suppressions/docs/DeleteInvalidEmailsRequest.md deleted file mode 100644 index d771148d..00000000 --- a/rest/api/v3/suppressions/docs/DeleteInvalidEmailsRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# DeleteInvalidEmailsRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DeleteAll** | **bool** | Indicates if you want to remove all email address from the invalid emails list. |[optional] -**Emails** | **[]string** | The list of specific email addresses that you want to remove. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/DeleteSpamReport.md b/rest/api/v3/suppressions/docs/DeleteSpamReport.md deleted file mode 100644 index 65e304e1..00000000 --- a/rest/api/v3/suppressions/docs/DeleteSpamReport.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeleteSpamReport - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteSpamReport**](DeleteSpamReport.md#DeleteSpamReport) | **Delete** /v3/suppression/spam_reports/{Email} | Delete a specific spam report - - - -## DeleteSpamReport - -> map[string]interface{} DeleteSpamReport(ctx, Emailoptional) - -Delete a specific spam report - -**This endpoint allows you to delete a specific spam report by email address.** Deleting a spam report will remove the suppression, meaning email will once again be sent to the previously suppressed address. This should be avoided unless a recipient indicates they wish to receive email from you again. You can use our [bypass filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) to deliver messages to otherwise suppressed addresses when exceptions are required. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Email** | **string** | The email address of a specific spam report that you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteSpamReportParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/DeleteSpamReports.md b/rest/api/v3/suppressions/docs/DeleteSpamReports.md deleted file mode 100644 index c69b9089..00000000 --- a/rest/api/v3/suppressions/docs/DeleteSpamReports.md +++ /dev/null @@ -1,49 +0,0 @@ -# DeleteSpamReports - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteSpamReports**](DeleteSpamReports.md#DeleteSpamReports) | **Delete** /v3/suppression/spam_reports | Delete spam reports - - - -## DeleteSpamReports - -> map[string]interface{} DeleteSpamReports(ctx, optional) - -Delete spam reports - -**This endpoint allows you to delete your spam reports.** Deleting a spam report will remove the suppression, meaning email will once again be sent to the previously suppressed address. This should be avoided unless a recipient indicates they wish to receive email from you again. You can use our [bypass filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) to deliver messages to otherwise suppressed addresses when exceptions are required. There are two options for deleting spam reports: 1. You can delete all spam reports by setting the `delete_all` field to `true` in the request body. 2. You can delete a list of select spam reports by specifying the email addresses in the `emails` array of the request body. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteSpamReportsParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**DeleteSpamReportsRequest** | [**DeleteSpamReportsRequest**](DeleteSpamReportsRequest.md) | - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/DeleteSpamReportsRequest.md b/rest/api/v3/suppressions/docs/DeleteSpamReportsRequest.md deleted file mode 100644 index 011e92fe..00000000 --- a/rest/api/v3/suppressions/docs/DeleteSpamReportsRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# DeleteSpamReportsRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DeleteAll** | **bool** | Indicates if you want to delete all email addresses on the spam report list. |[optional] -**Emails** | **[]string** | A list of specific email addresses that you want to remove from the spam report list. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/DeleteSuppressionBlock.md b/rest/api/v3/suppressions/docs/DeleteSuppressionBlock.md deleted file mode 100644 index d4a67bd9..00000000 --- a/rest/api/v3/suppressions/docs/DeleteSuppressionBlock.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeleteSuppressionBlock - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteSuppressionBlock**](DeleteSuppressionBlock.md#DeleteSuppressionBlock) | **Delete** /v3/suppression/blocks/{Email} | Delete a specific block - - - -## DeleteSuppressionBlock - -> map[string]interface{} DeleteSuppressionBlock(ctx, Emailoptional) - -Delete a specific block - -**This endpoint allows you to delete a specific email address from your blocks list.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Email** | **string** | The email address of the specific block. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteSuppressionBlockParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/DeleteSuppressionBlocks.md b/rest/api/v3/suppressions/docs/DeleteSuppressionBlocks.md deleted file mode 100644 index 928134cf..00000000 --- a/rest/api/v3/suppressions/docs/DeleteSuppressionBlocks.md +++ /dev/null @@ -1,49 +0,0 @@ -# DeleteSuppressionBlocks - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteSuppressionBlocks**](DeleteSuppressionBlocks.md#DeleteSuppressionBlocks) | **Delete** /v3/suppression/blocks | Delete blocks - - - -## DeleteSuppressionBlocks - -> map[string]interface{} DeleteSuppressionBlocks(ctx, optional) - -Delete blocks - -**This endpoint allows you to delete all email addresses on your blocks list.** There are two options for deleting blocked emails: 1. You can delete all blocked emails by setting `delete_all` to `true` in the request body. 2. You can delete a selection of blocked emails by specifying the email addresses in the `emails` array of the request body. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteSuppressionBlocksParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**DeleteSuppressionBlocksRequest** | [**DeleteSuppressionBlocksRequest**](DeleteSuppressionBlocksRequest.md) | - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/DeleteSuppressionBlocksRequest.md b/rest/api/v3/suppressions/docs/DeleteSuppressionBlocksRequest.md deleted file mode 100644 index 7f4cf8a5..00000000 --- a/rest/api/v3/suppressions/docs/DeleteSuppressionBlocksRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# DeleteSuppressionBlocksRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DeleteAll** | **bool** | Indicates if you want to delete all blocked email addresses. |[optional] -**Emails** | **[]string** | The specific blocked email addresses that you want to delete. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/DeleteSuppressionBounce.md b/rest/api/v3/suppressions/docs/DeleteSuppressionBounce.md deleted file mode 100644 index 90f5ba3b..00000000 --- a/rest/api/v3/suppressions/docs/DeleteSuppressionBounce.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeleteSuppressionBounce - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteSuppressionBounce**](DeleteSuppressionBounce.md#DeleteSuppressionBounce) | **Delete** /v3/suppression/bounces/{Email} | Delete a bounce - - - -## DeleteSuppressionBounce - -> map[string]interface{} DeleteSuppressionBounce(ctx, Emailoptional) - -Delete a bounce - -**This endpoint allows you to remove an email address from your bounce list.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Email** | **string** | The email address you would like to remove from the bounce list. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteSuppressionBounceParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/DeleteSuppressionBounces.md b/rest/api/v3/suppressions/docs/DeleteSuppressionBounces.md deleted file mode 100644 index 85ae6f31..00000000 --- a/rest/api/v3/suppressions/docs/DeleteSuppressionBounces.md +++ /dev/null @@ -1,49 +0,0 @@ -# DeleteSuppressionBounces - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteSuppressionBounces**](DeleteSuppressionBounces.md#DeleteSuppressionBounces) | **Delete** /v3/suppression/bounces | Delete bounces - - - -## DeleteSuppressionBounces - -> DeleteSuppressionBounces(ctx, optional) - -Delete bounces - -**This endpoint allows you to delete all emails on your bounces list.** There are two options for deleting bounced emails: 1. You can delete all bounced emails by setting `delete_all` to `true` in the request body. 2. You can delete a selection of bounced emails by specifying the email addresses in the `emails` array of the request body. **WARNING:** You can not have both `emails` and `delete_all` set. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteSuppressionBouncesParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**DeleteSuppressionBouncesRequest** | [**DeleteSuppressionBouncesRequest**](DeleteSuppressionBouncesRequest.md) | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/DeleteSuppressionBouncesRequest.md b/rest/api/v3/suppressions/docs/DeleteSuppressionBouncesRequest.md deleted file mode 100644 index a8546713..00000000 --- a/rest/api/v3/suppressions/docs/DeleteSuppressionBouncesRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# DeleteSuppressionBouncesRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DeleteAll** | **bool** | This parameter allows you to delete **every** email in your bounce list. This should not be used with the emails parameter. |[optional] -**Emails** | **[]string** | Delete multiple emails from your bounce list at the same time. This should not be used with the delete_all parameter. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/DeleteSuppressionFromAsmGroup.md b/rest/api/v3/suppressions/docs/DeleteSuppressionFromAsmGroup.md deleted file mode 100644 index 0470a605..00000000 --- a/rest/api/v3/suppressions/docs/DeleteSuppressionFromAsmGroup.md +++ /dev/null @@ -1,53 +0,0 @@ -# DeleteSuppressionFromAsmGroup - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteSuppressionFromAsmGroup**](DeleteSuppressionFromAsmGroup.md#DeleteSuppressionFromAsmGroup) | **Delete** /v3/asm/groups/{GroupId}/suppressions/{Email} | Delete a suppression from a suppression group - - - -## DeleteSuppressionFromAsmGroup - -> DeleteSuppressionFromAsmGroup(ctx, GroupIdEmailoptional) - -Delete a suppression from a suppression group - -**This endpoint allows you to remove a suppressed email address from the given suppression group.** Removing an address will remove the suppression, meaning email will once again be sent to the previously suppressed addresses. This should be avoided unless a recipient indicates they wish to receive email from you again. You can use our [bypass filters](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) to deliver messages to otherwise suppressed addresses when exceptions are required. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**GroupId** | **string** | The id of the suppression group that you are removing an email address from. -**Email** | **string** | The email address that you want to remove from the suppression group. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteSuppressionFromAsmGroupParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/ErrorResponse.md b/rest/api/v3/suppressions/docs/ErrorResponse.md deleted file mode 100644 index ec2d41f6..00000000 --- a/rest/api/v3/suppressions/docs/ErrorResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ErrorResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] -**Id** | **string** | When applicable, this property value will be an error ID. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/ErrorResponseErrorsInner.md b/rest/api/v3/suppressions/docs/ErrorResponseErrorsInner.md deleted file mode 100644 index 5449c685..00000000 --- a/rest/api/v3/suppressions/docs/ErrorResponseErrorsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ErrorResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | An error message. |[optional] -**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] -**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/GetAsmGroup.md b/rest/api/v3/suppressions/docs/GetAsmGroup.md deleted file mode 100644 index 07fbfb13..00000000 --- a/rest/api/v3/suppressions/docs/GetAsmGroup.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetAsmGroup - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetAsmGroup**](GetAsmGroup.md#GetAsmGroup) | **Get** /v3/asm/groups/{GroupId} | Get information on a single suppression group. - - - -## GetAsmGroup - -> GetAsmGroup200Response GetAsmGroup(ctx, GroupIdoptional) - -Get information on a single suppression group. - -**This endpoint allows you to retrieve a single suppression group.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**GroupId** | **string** | The ID of the suppression group you would like to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a GetAsmGroupParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**GetAsmGroup200Response**](GetAsmGroup200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/GetAsmGroup200Response.md b/rest/api/v3/suppressions/docs/GetAsmGroup200Response.md deleted file mode 100644 index 18fe7dbe..00000000 --- a/rest/api/v3/suppressions/docs/GetAsmGroup200Response.md +++ /dev/null @@ -1,16 +0,0 @@ -# GetAsmGroup200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of your suppression group. Required when creating a group. |[optional] -**Description** | **string** | A brief description of your suppression group. Required when creating a group. |[optional] -**IsDefault** | **bool** | Indicates if you would like this to be your default suppression group. |[optional] -**Id** | **int32** | The ID of the suppression group. | -**Unsubscribes** | **int32** | The number of unsubscribes, or suppressions, in this group. |[optional] -**LastEmailSentAt** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/GetAsmSuppression.md b/rest/api/v3/suppressions/docs/GetAsmSuppression.md deleted file mode 100644 index 0aba233d..00000000 --- a/rest/api/v3/suppressions/docs/GetAsmSuppression.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetAsmSuppression - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetAsmSuppression**](GetAsmSuppression.md#GetAsmSuppression) | **Get** /v3/asm/suppressions/{Email} | Retrieve all suppression groups for an email address - - - -## GetAsmSuppression - -> GetAsmSuppression200Response GetAsmSuppression(ctx, Emailoptional) - -Retrieve all suppression groups for an email address - -**This endpoint returns a list of all groups from which the given email address has been unsubscribed.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Email** | **string** | The email address that you want to search suppression groups for. - -### Other Parameters - -Other parameters are passed through a pointer to a GetAsmSuppressionParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**GetAsmSuppression200Response**](GetAsmSuppression200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/GetAsmSuppression200Response.md b/rest/api/v3/suppressions/docs/GetAsmSuppression200Response.md deleted file mode 100644 index 6b7200b6..00000000 --- a/rest/api/v3/suppressions/docs/GetAsmSuppression200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetAsmSuppression200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Suppressions** | [**[]GetAsmSuppression200ResponseSuppressionsInner**](GetAsmSuppression200ResponseSuppressionsInner.md) | The array of suppression groups. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/GetAsmSuppression200ResponseSuppressionsInner.md b/rest/api/v3/suppressions/docs/GetAsmSuppression200ResponseSuppressionsInner.md deleted file mode 100644 index c4187116..00000000 --- a/rest/api/v3/suppressions/docs/GetAsmSuppression200ResponseSuppressionsInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# GetAsmSuppression200ResponseSuppressionsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Description** | **string** | The description of the suppression group. | -**Id** | **int32** | The id of the suppression group. | -**IsDefault** | **bool** | Indicates if the suppression group is set as the default. | -**Name** | **string** | The name of the suppression group. | -**Suppressed** | **bool** | Indicates if the given email address is suppressed for this group. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/GetGlobalSuppression.md b/rest/api/v3/suppressions/docs/GetGlobalSuppression.md deleted file mode 100644 index 768fd0a5..00000000 --- a/rest/api/v3/suppressions/docs/GetGlobalSuppression.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetGlobalSuppression - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetGlobalSuppression**](GetGlobalSuppression.md#GetGlobalSuppression) | **Get** /v3/asm/suppressions/global/{Email} | Retrieve a Global Suppression - - - -## GetGlobalSuppression - -> RetrieveAGlobalSuppressionResponse GetGlobalSuppression(ctx, Emailoptional) - -Retrieve a Global Suppression - -**This endpoint allows you to retrieve a global suppression. You can also use this endpoint to confirm if an email address is already globally suppresed.** If the email address you include in the URL path parameter `{email}` is already globally suppressed, the response will include that email address. If the address you enter for `{email}` is not globally suppressed, an empty JSON object `{}` will be returned. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Email** | **string** | The email address of the global suppression you want to retrieve. Or, if you want to check if an email address is on the global suppressions list, enter that email address here. - -### Other Parameters - -Other parameters are passed through a pointer to a GetGlobalSuppressionParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**RetrieveAGlobalSuppressionResponse**](RetrieveAGlobalSuppressionResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/GetInvalidEmail.md b/rest/api/v3/suppressions/docs/GetInvalidEmail.md deleted file mode 100644 index 37d5ad25..00000000 --- a/rest/api/v3/suppressions/docs/GetInvalidEmail.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetInvalidEmail - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetInvalidEmail**](GetInvalidEmail.md#GetInvalidEmail) | **Get** /v3/suppression/invalid_emails/{Email} | Retrieve a specific invalid email - - - -## GetInvalidEmail - -> []InvalidEmail GetInvalidEmail(ctx, Emailoptional) - -Retrieve a specific invalid email - -**This endpoint allows you to retrieve a specific invalid email addresses.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Email** | **string** | The specific email address of the invalid email entry that you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a GetInvalidEmailParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**[]InvalidEmail**](InvalidEmail.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/GetSpamReport.md b/rest/api/v3/suppressions/docs/GetSpamReport.md deleted file mode 100644 index 4eafa262..00000000 --- a/rest/api/v3/suppressions/docs/GetSpamReport.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetSpamReport - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetSpamReport**](GetSpamReport.md#GetSpamReport) | **Get** /v3/suppression/spam_reports/{Email} | Retrieve a specific spam report - - - -## GetSpamReport - -> []SpamReportsResponseInner GetSpamReport(ctx, Emailoptional) - -Retrieve a specific spam report - -**This endpoint allows you to retrieve a specific spam report by email address.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Email** | **string** | The email address of a specific spam report that you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a GetSpamReportParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**[]SpamReportsResponseInner**](SpamReportsResponseInner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/GetSuppressionBlock.md b/rest/api/v3/suppressions/docs/GetSuppressionBlock.md deleted file mode 100644 index c721b827..00000000 --- a/rest/api/v3/suppressions/docs/GetSuppressionBlock.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetSuppressionBlock - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetSuppressionBlock**](GetSuppressionBlock.md#GetSuppressionBlock) | **Get** /v3/suppression/blocks/{Email} | Retrieve a specific block - - - -## GetSuppressionBlock - -> []BlocksResponseInner GetSuppressionBlock(ctx, Emailoptional) - -Retrieve a specific block - -**This endpoint allows you to retrieve a specific email address from your blocks list.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Email** | **string** | The email address of the specific block. - -### Other Parameters - -Other parameters are passed through a pointer to a GetSuppressionBlockParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**[]BlocksResponseInner**](BlocksResponseInner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/GetSuppressionBounces.md b/rest/api/v3/suppressions/docs/GetSuppressionBounces.md deleted file mode 100644 index a886c47e..00000000 --- a/rest/api/v3/suppressions/docs/GetSuppressionBounces.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetSuppressionBounces - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetSuppressionBounces**](GetSuppressionBounces.md#GetSuppressionBounces) | **Get** /v3/suppression/bounces/{Email} | Retrieve a Bounce - - - -## GetSuppressionBounces - -> []BounceResponse GetSuppressionBounces(ctx, Emailoptional) - -Retrieve a Bounce - -**This endpoint allows you to retrieve a specific bounce by email address.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Email** | **string** | The email address of the specific bounce you would like to retrieve - -### Other Parameters - -Other parameters are passed through a pointer to a GetSuppressionBouncesParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**[]BounceResponse**](BounceResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications.md b/rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications.md deleted file mode 100644 index 1e5c6ce4..00000000 --- a/rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications.md +++ /dev/null @@ -1,54 +0,0 @@ -# GetSuppressionBouncesClassifications - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetSuppressionBouncesClassifications**](GetSuppressionBouncesClassifications.md#GetSuppressionBouncesClassifications) | **Get** /v3/suppression/bounces/classifications/{Classification} | Retrieve bounce classification over time by domain stats - - - -## GetSuppressionBouncesClassifications - -> GetSuppressionBouncesClassifications200Response GetSuppressionBouncesClassifications(ctx, AcceptClassificationoptional) - -Retrieve bounce classification over time by domain stats - -This endpoint will return the number of bounces for the classification specified in descending order for each day. You can retrieve the bounce classification totals in CSV format by specifying `\"text/csv\"` in the Accept header. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Classification** | [**Classification1**](Classification1.md) | The classification you want to filter by. Possible values are: `Content`, `Frequency or Volume Too High`, `Invalid Address`, `Mailbox Unavailable`, `Reputation`, `Technical Failure`, `Unclassified`. - -### Other Parameters - -Other parameters are passed through a pointer to a GetSuppressionBouncesClassificationsParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**StartDate** | **string** | The start of the time range, in YYYY-MM-DD format, when a bounce was created (inclusive). -**EndDate** | **string** | The end of the time range, in YYYY-MM-DD format, when a bounce was created (inclusive). -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**GetSuppressionBouncesClassifications200Response**](GetSuppressionBouncesClassifications200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications200Response.md b/rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications200Response.md deleted file mode 100644 index 56413bb1..00000000 --- a/rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSuppressionBouncesClassifications200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]GetSuppressionBouncesClassifications200ResponseResultInner**](GetSuppressionBouncesClassifications200ResponseResultInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications200ResponseResultInner.md b/rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications200ResponseResultInner.md deleted file mode 100644 index 07b1614f..00000000 --- a/rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications200ResponseResultInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetSuppressionBouncesClassifications200ResponseResultInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Date** | **string** | |[optional] -**Stats** | [**[]GetSuppressionBouncesClassifications200ResponseResultInnerStatsInner**](GetSuppressionBouncesClassifications200ResponseResultInnerStatsInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications200ResponseResultInnerStatsInner.md b/rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications200ResponseResultInnerStatsInner.md deleted file mode 100644 index 53831fc1..00000000 --- a/rest/api/v3/suppressions/docs/GetSuppressionBouncesClassifications200ResponseResultInnerStatsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetSuppressionBouncesClassifications200ResponseResultInnerStatsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Domain** | **string** | |[optional] -**Count** | **int32** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/InvalidEmail.md b/rest/api/v3/suppressions/docs/InvalidEmail.md deleted file mode 100644 index 38ad5a18..00000000 --- a/rest/api/v3/suppressions/docs/InvalidEmail.md +++ /dev/null @@ -1,13 +0,0 @@ -# InvalidEmail - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Created** | **int32** | A Unix timestamp indicating when the email address was added to the invalid emails list. |[optional] -**Email** | **string** | The email address that was marked as invalid. |[optional] -**Reason** | **string** | The reason that the email address was marked as invalid. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/ListAsmGroup.md b/rest/api/v3/suppressions/docs/ListAsmGroup.md deleted file mode 100644 index 010f9e27..00000000 --- a/rest/api/v3/suppressions/docs/ListAsmGroup.md +++ /dev/null @@ -1,49 +0,0 @@ -# ListAsmGroup - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListAsmGroup**](ListAsmGroup.md#ListAsmGroup) | **Get** /v3/asm/groups | Retrieve all suppression groups associated with the user. - - - -## ListAsmGroup - -> []SuppressionGroup ListAsmGroup(ctx, optional) - -Retrieve all suppression groups associated with the user. - -**This endpoint allows you to retrieve a list of all suppression groups created by this user.** This endpoint can also return information for multiple group IDs that you include in your request. To add a group ID to your request, simply append `?id=123456&id=123456`, with the appropriate group IDs. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListAsmGroupParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Id** | **int32** | The ID of the suppression group(s) you want to retrieve. -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**[]SuppressionGroup**](SuppressionGroup.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/ListAsmSuppression.md b/rest/api/v3/suppressions/docs/ListAsmSuppression.md deleted file mode 100644 index 44ad904e..00000000 --- a/rest/api/v3/suppressions/docs/ListAsmSuppression.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListAsmSuppression - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListAsmSuppression**](ListAsmSuppression.md#ListAsmSuppression) | **Get** /v3/asm/suppressions | Retrieve all suppressions - - - -## ListAsmSuppression - -> []ListAsmSuppression200ResponseInner ListAsmSuppression(ctx, optional) - -Retrieve all suppressions - -**This endpoint allows you to retrieve a list of all suppressions.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListAsmSuppressionParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**[]ListAsmSuppression200ResponseInner**](ListAsmSuppression200ResponseInner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/ListAsmSuppression200ResponseInner.md b/rest/api/v3/suppressions/docs/ListAsmSuppression200ResponseInner.md deleted file mode 100644 index dbaa90e4..00000000 --- a/rest/api/v3/suppressions/docs/ListAsmSuppression200ResponseInner.md +++ /dev/null @@ -1,14 +0,0 @@ -# ListAsmSuppression200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | **string** | The email address that was suppressed. | -**GroupId** | **int32** | The id of the suppression group that this email address belongs to. | -**GroupName** | **string** | The name of the suppression group that this email address belongs to. | -**CreatedAt** | **int32** | A UNIX timestamp indicating when the suppression was created. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/ListGlobalSuppression.md b/rest/api/v3/suppressions/docs/ListGlobalSuppression.md deleted file mode 100644 index 0988f9e7..00000000 --- a/rest/api/v3/suppressions/docs/ListGlobalSuppression.md +++ /dev/null @@ -1,53 +0,0 @@ -# ListGlobalSuppression - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListGlobalSuppression**](ListGlobalSuppression.md#ListGlobalSuppression) | **Get** /v3/suppression/unsubscribes | Retrieve all global suppressions - - - -## ListGlobalSuppression - -> []ListGlobalSuppression200ResponseInner ListGlobalSuppression(ctx, optional) - -Retrieve all global suppressions - -**This endpoint allows you to retrieve a paginated list of all email address that are globally suppressed.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListGlobalSuppressionParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**StartTime** | **int32** | Refers start of the time range in unix timestamp when an unsubscribe email was created (inclusive). -**EndTime** | **int32** | Refers end of the time range in unix timestamp when an unsubscribe email was created (inclusive). -**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. The maximum page size for this endpoint is 500 items per page. -**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. -**Email** | **string** | Specifies which records to return based on the records' associated email addresses. For example, `sales` returns records with email addresses that start with 'sales', such as `salesdepartment@example.com` or `sales@example.com`. You can also use `%25` as a wildcard. For example, `%25market` returns records containing email addresses with the string 'market' anywhere in the email address, and `%25market%25tree` returns records containing email addresses with the string 'market' followed by the string 'tree'. Any reserved characters should be [percent-encoded](https://en.wikipedia.org/wiki/Percent-encoding#Reserved_characters), e.g., the `@` symbol should be encoded as `%40`. -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**[]ListGlobalSuppression200ResponseInner**](ListGlobalSuppression200ResponseInner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/ListGlobalSuppression200ResponseInner.md b/rest/api/v3/suppressions/docs/ListGlobalSuppression200ResponseInner.md deleted file mode 100644 index 320a8bba..00000000 --- a/rest/api/v3/suppressions/docs/ListGlobalSuppression200ResponseInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListGlobalSuppression200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Created** | **int32** | A Unix timestamp indicating when the recipient was added to the global suppression list. | -**Email** | **string** | The email address of the recipient who is globally suppressed. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/ListInvalidEmail.md b/rest/api/v3/suppressions/docs/ListInvalidEmail.md deleted file mode 100644 index 645fd8d9..00000000 --- a/rest/api/v3/suppressions/docs/ListInvalidEmail.md +++ /dev/null @@ -1,53 +0,0 @@ -# ListInvalidEmail - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListInvalidEmail**](ListInvalidEmail.md#ListInvalidEmail) | **Get** /v3/suppression/invalid_emails | Retrieve all invalid emails - - - -## ListInvalidEmail - -> []InvalidEmail ListInvalidEmail(ctx, optional) - -Retrieve all invalid emails - -**This endpoint allows you to retrieve a paginated list of all invalid email addresses.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListInvalidEmailParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**StartTime** | **int32** | Refers start of the time range in unix timestamp when an invalid email was created (inclusive). -**EndTime** | **int32** | Refers end of the time range in unix timestamp when an invalid email was created (inclusive). -**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. The maximum page size for this endpoint is 500 items per page. -**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. -**Email** | **string** | This parameter allows you to filter results by email address. Only invalid addresses matching an address passed in this parameter will be returned. -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**[]InvalidEmail**](InvalidEmail.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/ListSpamReport.md b/rest/api/v3/suppressions/docs/ListSpamReport.md deleted file mode 100644 index 02471e3b..00000000 --- a/rest/api/v3/suppressions/docs/ListSpamReport.md +++ /dev/null @@ -1,53 +0,0 @@ -# ListSpamReport - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListSpamReport**](ListSpamReport.md#ListSpamReport) | **Get** /v3/suppression/spam_reports | Retrieve all spam reports - - - -## ListSpamReport - -> []SpamReportsResponseInner ListSpamReport(ctx, optional) - -Retrieve all spam reports - -**This endpoint allows you to retrieve a paginated list of all spam reports.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListSpamReportParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**StartTime** | **int32** | The start of the time range when a spam report was created (inclusive). This is a unix timestamp. -**EndTime** | **int32** | The end of the time range when a spam report was created (inclusive). This is a unix timestamp. -**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. The maximum page size for this endpoint is 500 items per page. -**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. -**Email** | **string** | Specifies which records to return based on the records' associated email addresses. For example, `sales` returns records with email addresses that start with 'sales', such as `salesdepartment@example.com` or `sales@example.com`. You can also use `%25` as a wildcard. For example, `%25market` returns records containing email addresses with the string 'market' anywhere in the email address, and `%25market%25tree` returns records containing email addresses with the string 'market' followed by the string 'tree'. Any reserved characters should be [percent-encoded](https://en.wikipedia.org/wiki/Percent-encoding#Reserved_characters), e.g., the `@` symbol should be encoded as `%40`. -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**[]SpamReportsResponseInner**](SpamReportsResponseInner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/ListSuppressionBlock.md b/rest/api/v3/suppressions/docs/ListSuppressionBlock.md deleted file mode 100644 index 8880af05..00000000 --- a/rest/api/v3/suppressions/docs/ListSuppressionBlock.md +++ /dev/null @@ -1,53 +0,0 @@ -# ListSuppressionBlock - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListSuppressionBlock**](ListSuppressionBlock.md#ListSuppressionBlock) | **Get** /v3/suppression/blocks | Retrieve all blocks - - - -## ListSuppressionBlock - -> []BlocksResponseInner ListSuppressionBlock(ctx, optional) - -Retrieve all blocks - -**This endpoint allows you to retrieve a paginated list of all email addresses that are currently on your blocks list.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListSuppressionBlockParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**StartTime** | **int32** | The start of the time range when a blocked email was created (inclusive). This is a unix timestamp. -**EndTime** | **int32** | The end of the time range when a blocked email was created (inclusive). This is a unix timestamp. -**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. The maximum page size for this endpoint is 500 items per page. -**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. -**Email** | **string** | Specifies which records to return based on the records' associated email addresses. For example, `sales` returns records with email addresses that start with 'sales', such as `salesdepartment@example.com` or `sales@example.com`. You can also use `%25` as a wildcard. For example, `%25market` returns records containing email addresses with the string 'market' anywhere in the email address, and `%25market%25tree` returns records containing email addresses with the string 'market' followed by the string 'tree'. Any reserved characters should be [percent-encoded](https://en.wikipedia.org/wiki/Percent-encoding#Reserved_characters), e.g., the `@` symbol should be encoded as `%40`. -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**[]BlocksResponseInner**](BlocksResponseInner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/ListSuppressionBounces.md b/rest/api/v3/suppressions/docs/ListSuppressionBounces.md deleted file mode 100644 index f4a1b4d5..00000000 --- a/rest/api/v3/suppressions/docs/ListSuppressionBounces.md +++ /dev/null @@ -1,53 +0,0 @@ -# ListSuppressionBounces - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListSuppressionBounces**](ListSuppressionBounces.md#ListSuppressionBounces) | **Get** /v3/suppression/bounces | Retrieve all bounces - - - -## ListSuppressionBounces - -> []BounceResponse ListSuppressionBounces(ctx, Acceptoptional) - -Retrieve all bounces - -**This endpoint allows you to retrieve a paginated list of all your bounces.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListSuppressionBouncesParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**StartTime** | **int32** | Refers start of the time range in unix timestamp when a bounce was created (inclusive). -**EndTime** | **int32** | Refers end of the time range in unix timestamp when a bounce was created (inclusive). -**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. The maximum page size for this endpoint is 500 items per page. -**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. -**Email** | **string** | Specifies which records to return based on the records' associated email addresses. For example, `sales` returns records with email addresses that start with 'sales', such as `salesdepartment@example.com` or `sales@example.com`. You can also use `%25` as a wildcard. For example, `%25market` returns records containing email addresses with the string 'market' anywhere in the email address, and `%25market%25tree` returns records containing email addresses with the string 'market' followed by the string 'tree'. Any reserved characters should be [percent-encoded](https://en.wikipedia.org/wiki/Percent-encoding#Reserved_characters), e.g., the `@` symbol should be encoded as `%40`. -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**[]BounceResponse**](BounceResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications.md b/rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications.md deleted file mode 100644 index e8eb6786..00000000 --- a/rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications.md +++ /dev/null @@ -1,50 +0,0 @@ -# ListSuppressionBouncesClassifications - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListSuppressionBouncesClassifications**](ListSuppressionBouncesClassifications.md#ListSuppressionBouncesClassifications) | **Get** /v3/suppression/bounces/classifications | Retrieve bounce classification totals - - - -## ListSuppressionBouncesClassifications - -> ListSuppressionBouncesClassifications200Response ListSuppressionBouncesClassifications(ctx, Acceptoptional) - -Retrieve bounce classification totals - -This endpoint will return the total number of bounces by classification in descending order for each day. You can retrieve the bounce classification totals in CSV format by specifying `\"text/csv\"` in the Accept header. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListSuppressionBouncesClassificationsParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**StartDate** | **string** | The start of the time range, in YYYY-MM-DD format, when a bounce was created (inclusive). -**EndDate** | **string** | The end of the time range, in YYYY-MM-DD format, when a bounce was created (inclusive). -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListSuppressionBouncesClassifications200Response**](ListSuppressionBouncesClassifications200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications200Response.md b/rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications200Response.md deleted file mode 100644 index 32dd2843..00000000 --- a/rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListSuppressionBouncesClassifications200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]ListSuppressionBouncesClassifications200ResponseResultInner**](ListSuppressionBouncesClassifications200ResponseResultInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications200ResponseResultInner.md b/rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications200ResponseResultInner.md deleted file mode 100644 index 6bcb64f5..00000000 --- a/rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications200ResponseResultInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListSuppressionBouncesClassifications200ResponseResultInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Date** | **string** | |[optional] -**Stats** | [**[]ListSuppressionBouncesClassifications200ResponseResultInnerStatsInner**](ListSuppressionBouncesClassifications200ResponseResultInnerStatsInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications200ResponseResultInnerStatsInner.md b/rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications200ResponseResultInnerStatsInner.md deleted file mode 100644 index 17c6caf2..00000000 --- a/rest/api/v3/suppressions/docs/ListSuppressionBouncesClassifications200ResponseResultInnerStatsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListSuppressionBouncesClassifications200ResponseResultInnerStatsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Classification** | [**Classification**](Classification.md) | |[optional] -**Count** | **int32** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/ListSuppressionFromAsmGroup.md b/rest/api/v3/suppressions/docs/ListSuppressionFromAsmGroup.md deleted file mode 100644 index 7aa31499..00000000 --- a/rest/api/v3/suppressions/docs/ListSuppressionFromAsmGroup.md +++ /dev/null @@ -1,52 +0,0 @@ -# ListSuppressionFromAsmGroup - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListSuppressionFromAsmGroup**](ListSuppressionFromAsmGroup.md#ListSuppressionFromAsmGroup) | **Get** /v3/asm/groups/{GroupId}/suppressions | Retrieve all suppressions for a suppression group - - - -## ListSuppressionFromAsmGroup - -> []string ListSuppressionFromAsmGroup(ctx, GroupIdoptional) - -Retrieve all suppressions for a suppression group - -**This endpoint allows you to retrieve all suppressed email addresses belonging to the given group.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**GroupId** | **string** | The id of the unsubscribe group that you are adding suppressions to. - -### Other Parameters - -Other parameters are passed through a pointer to a ListSuppressionFromAsmGroupParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -**[]string** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/RetrieveAGlobalSuppressionResponse.md b/rest/api/v3/suppressions/docs/RetrieveAGlobalSuppressionResponse.md deleted file mode 100644 index f4aa0680..00000000 --- a/rest/api/v3/suppressions/docs/RetrieveAGlobalSuppressionResponse.md +++ /dev/null @@ -1,11 +0,0 @@ -# RetrieveAGlobalSuppressionResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**RecipientEmail** | **string** | The email address that is globally suppressed. This will be an empty object if the email address you included in your call is not globally suppressed. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/SearchSuppressionFromAsmGroup.md b/rest/api/v3/suppressions/docs/SearchSuppressionFromAsmGroup.md deleted file mode 100644 index a626bb5c..00000000 --- a/rest/api/v3/suppressions/docs/SearchSuppressionFromAsmGroup.md +++ /dev/null @@ -1,53 +0,0 @@ -# SearchSuppressionFromAsmGroup - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**SearchSuppressionFromAsmGroup**](SearchSuppressionFromAsmGroup.md#SearchSuppressionFromAsmGroup) | **Post** /v3/asm/groups/{GroupId}/suppressions/search | Search for suppressions within a group - - - -## SearchSuppressionFromAsmGroup - -> []string SearchSuppressionFromAsmGroup(ctx, GroupIdoptional) - -Search for suppressions within a group - -**This endpoint allows you to search a suppression group for multiple suppressions.** When given a list of email addresses and a group ID, this endpoint will only return the email addresses that have been unsubscribed from the given group. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**GroupId** | **string** | The ID of the suppression group that you would like to search. - -### Other Parameters - -Other parameters are passed through a pointer to a SearchSuppressionFromAsmGroupParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**SuppressionsRequest** | [**SuppressionsRequest**](SuppressionsRequest.md) | - -### Return type - -**[]string** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/SpamReportsResponseInner.md b/rest/api/v3/suppressions/docs/SpamReportsResponseInner.md deleted file mode 100644 index 5255b8f6..00000000 --- a/rest/api/v3/suppressions/docs/SpamReportsResponseInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# SpamReportsResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Created** | **int32** | A Unix timestamp that indicates when the recipient marked your message as spam. | -**Email** | **string** | The email address of the recipient that marked your message as spam. | -**Ip** | **string** | The IP address that the message was sent from. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/SuppressionGroup.md b/rest/api/v3/suppressions/docs/SuppressionGroup.md deleted file mode 100644 index ec5a5d8d..00000000 --- a/rest/api/v3/suppressions/docs/SuppressionGroup.md +++ /dev/null @@ -1,16 +0,0 @@ -# SuppressionGroup - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **float32** | The id of the suppression group. | -**Name** | **string** | The name of the suppression group. Each group created by a user must have a unique name. | -**Description** | **string** | A description of the suppression group. | -**LastEmailSentAt** | **int32** | |[optional] -**IsDefault** | **bool** | Indicates if this is the default suppression group. |[optional] [default to false] -**Unsubscribes** | **int32** | The unsubscribes associated with this group. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/SuppressionGroupRequestBaseProps.md b/rest/api/v3/suppressions/docs/SuppressionGroupRequestBaseProps.md deleted file mode 100644 index 1974035c..00000000 --- a/rest/api/v3/suppressions/docs/SuppressionGroupRequestBaseProps.md +++ /dev/null @@ -1,13 +0,0 @@ -# SuppressionGroupRequestBaseProps - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of your suppression group. Required when creating a group. |[optional] -**Description** | **string** | A brief description of your suppression group. Required when creating a group. |[optional] -**IsDefault** | **bool** | Indicates if you would like this to be your default suppression group. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/SuppressionsRequest.md b/rest/api/v3/suppressions/docs/SuppressionsRequest.md deleted file mode 100644 index daf35b4c..00000000 --- a/rest/api/v3/suppressions/docs/SuppressionsRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# SuppressionsRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**RecipientEmails** | **[]string** | The array of email addresses to add or find. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/docs/UpdateAsmGroup.md b/rest/api/v3/suppressions/docs/UpdateAsmGroup.md deleted file mode 100644 index a64117f5..00000000 --- a/rest/api/v3/suppressions/docs/UpdateAsmGroup.md +++ /dev/null @@ -1,53 +0,0 @@ -# UpdateAsmGroup - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateAsmGroup**](UpdateAsmGroup.md#UpdateAsmGroup) | **Patch** /v3/asm/groups/{GroupId} | Update a suppression group. - - - -## UpdateAsmGroup - -> SuppressionGroup UpdateAsmGroup(ctx, GroupIdoptional) - -Update a suppression group. - -**This endpoint allows you to update or change a suppression group.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**GroupId** | **string** | The ID of the suppression group you would like to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateAsmGroupParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**UpdateAsmGroupRequest** | [**UpdateAsmGroupRequest**](UpdateAsmGroupRequest.md) | - -### Return type - -[**SuppressionGroup**](SuppressionGroup.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/suppressions/docs/UpdateAsmGroupRequest.md b/rest/api/v3/suppressions/docs/UpdateAsmGroupRequest.md deleted file mode 100644 index 35240f0d..00000000 --- a/rest/api/v3/suppressions/docs/UpdateAsmGroupRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# UpdateAsmGroupRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of your suppression group. Required when creating a group. |[optional] -**Description** | **string** | A brief description of your suppression group. Required when creating a group. |[optional] -**IsDefault** | **bool** | Indicates if you would like this to be your default suppression group. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/suppressions/model_accept.go b/rest/api/v3/suppressions/model_accept.go deleted file mode 100644 index e08023dd..00000000 --- a/rest/api/v3/suppressions/model_accept.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Accept the model 'Accept' -type Accept string - -// List of Accept -const ( - ACCEPT_APPLICATION_JSON Accept = "application/json" - ACCEPT_TEXT_CSV Accept = "text/csv" -) diff --git a/rest/api/v3/suppressions/model_accept1.go b/rest/api/v3/suppressions/model_accept1.go deleted file mode 100644 index f70b5a65..00000000 --- a/rest/api/v3/suppressions/model_accept1.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Accept1 the model 'Accept1' -type Accept1 string - -// List of Accept1 -const ( - ACCEPT1_APPLICATION_JSON Accept1 = "application/json" - ACCEPT1_TEXT_CSV Accept1 = "text/csv" -) diff --git a/rest/api/v3/suppressions/model_add_suppression_to_asm_group_201_response.go b/rest/api/v3/suppressions/model_add_suppression_to_asm_group_201_response.go deleted file mode 100644 index c5ebcabf..00000000 --- a/rest/api/v3/suppressions/model_add_suppression_to_asm_group_201_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AddSuppressionToAsmGroup201Response struct for AddSuppressionToAsmGroup201Response -type AddSuppressionToAsmGroup201Response struct { - // The email addresses you added to the unsubscribe group - RecipientEmails *[]string `json:"recipient_emails,omitempty"` -} diff --git a/rest/api/v3/suppressions/model_blocks_response_inner.go b/rest/api/v3/suppressions/model_blocks_response_inner.go deleted file mode 100644 index a906ce03..00000000 --- a/rest/api/v3/suppressions/model_blocks_response_inner.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// BlocksResponseInner struct for BlocksResponseInner -type BlocksResponseInner struct { - // A Unix timestamp indicating when the email address was added to the blocks list. - Created int32 `json:"created"` - // The email address that was added to the block list. - Email string `json:"email"` - // An explanation for the reason of the block. - Reason string `json:"reason"` - // The status of the block. - Status string `json:"status"` -} diff --git a/rest/api/v3/suppressions/model_bounce_response.go b/rest/api/v3/suppressions/model_bounce_response.go deleted file mode 100644 index 6834eb6d..00000000 --- a/rest/api/v3/suppressions/model_bounce_response.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// BounceResponse struct for BounceResponse -type BounceResponse struct { - // The unix timestamp for when the bounce record was created at SendGrid. - Created *float32 `json:"created,omitempty"` - // The email address that was added to the bounce list. - Email *string `json:"email,omitempty"` - // The reason for the bounce. This typically will be a bounce code, an enhanced code, and a description. - Reason *string `json:"reason,omitempty"` - // Enhanced SMTP bounce response - Status *string `json:"status,omitempty"` -} diff --git a/rest/api/v3/suppressions/model_classification.go b/rest/api/v3/suppressions/model_classification.go deleted file mode 100644 index 53bcb61f..00000000 --- a/rest/api/v3/suppressions/model_classification.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Classification the model 'Classification' -type Classification string - -// List of Classification -const ( - CLASSIFICATION_CONTENT Classification = "Content" - CLASSIFICATION_FREQUENCY_OR_VOLUME_TOO_HIGH Classification = "Frequency or Volume Too High" - CLASSIFICATION_INVALID_ADDRESS Classification = "Invalid Address" - CLASSIFICATION_MAILBOX_UNAVAILABLE Classification = "Mailbox Unavailable" - CLASSIFICATION_REPUTATION Classification = "Reputation" - CLASSIFICATION_TECHNICAL_FAILURE Classification = "Technical Failure" - CLASSIFICATION_UNCLASSIFIED Classification = "Unclassified" -) diff --git a/rest/api/v3/suppressions/model_classification1.go b/rest/api/v3/suppressions/model_classification1.go deleted file mode 100644 index 3d9f6e88..00000000 --- a/rest/api/v3/suppressions/model_classification1.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Classification1 the model 'Classification1' -type Classification1 string - -// List of Classification1 -const ( - CLASSIFICATION1_CONTENT Classification1 = "Content" - CLASSIFICATION1_FREQUENCY_OR_VOLUME_TOO_HIGH Classification1 = "Frequency or Volume Too High" - CLASSIFICATION1_INVALID_ADDRESS Classification1 = "Invalid Address" - CLASSIFICATION1_MAILBOX_UNAVAILABLE Classification1 = "Mailbox Unavailable" - CLASSIFICATION1_REPUTATION Classification1 = "Reputation" - CLASSIFICATION1_TECHNICAL_FAILURE Classification1 = "Technical Failure" - CLASSIFICATION1_UNCLASSIFIED Classification1 = "Unclassified" -) diff --git a/rest/api/v3/suppressions/model_creat_asm_group_201_response.go b/rest/api/v3/suppressions/model_creat_asm_group_201_response.go deleted file mode 100644 index 2a685e21..00000000 --- a/rest/api/v3/suppressions/model_creat_asm_group_201_response.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreatAsmGroup201Response struct for CreatAsmGroup201Response -type CreatAsmGroup201Response struct { - // The ID of the suppression group. - Id int32 `json:"id"` - // The name of the suppression group. - Name string `json:"name"` - // A brief description of the suppression group. - Description string `json:"description"` - // Indicates if this is the default suppression group. - IsDefault bool `json:"is_default"` -} diff --git a/rest/api/v3/suppressions/model_create_global_suppression_201_response.go b/rest/api/v3/suppressions/model_create_global_suppression_201_response.go deleted file mode 100644 index df12fc56..00000000 --- a/rest/api/v3/suppressions/model_create_global_suppression_201_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateGlobalSuppression201Response struct for CreateGlobalSuppression201Response -type CreateGlobalSuppression201Response struct { - // The email addresses that are globally suppressed - RecipientEmails []string `json:"recipient_emails"` -} diff --git a/rest/api/v3/suppressions/model_delete_invalid_emails_request.go b/rest/api/v3/suppressions/model_delete_invalid_emails_request.go deleted file mode 100644 index 2fa43185..00000000 --- a/rest/api/v3/suppressions/model_delete_invalid_emails_request.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DeleteInvalidEmailsRequest struct for DeleteInvalidEmailsRequest -type DeleteInvalidEmailsRequest struct { - // Indicates if you want to remove all email address from the invalid emails list. - DeleteAll *bool `json:"delete_all,omitempty"` - // The list of specific email addresses that you want to remove. - Emails *[]string `json:"emails,omitempty"` -} diff --git a/rest/api/v3/suppressions/model_delete_spam_reports_request.go b/rest/api/v3/suppressions/model_delete_spam_reports_request.go deleted file mode 100644 index 9beb9883..00000000 --- a/rest/api/v3/suppressions/model_delete_spam_reports_request.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DeleteSpamReportsRequest struct for DeleteSpamReportsRequest -type DeleteSpamReportsRequest struct { - // Indicates if you want to delete all email addresses on the spam report list. - DeleteAll *bool `json:"delete_all,omitempty"` - // A list of specific email addresses that you want to remove from the spam report list. - Emails *[]string `json:"emails,omitempty"` -} diff --git a/rest/api/v3/suppressions/model_delete_suppression_blocks_request.go b/rest/api/v3/suppressions/model_delete_suppression_blocks_request.go deleted file mode 100644 index 8387a722..00000000 --- a/rest/api/v3/suppressions/model_delete_suppression_blocks_request.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DeleteSuppressionBlocksRequest struct for DeleteSuppressionBlocksRequest -type DeleteSuppressionBlocksRequest struct { - // Indicates if you want to delete all blocked email addresses. - DeleteAll *bool `json:"delete_all,omitempty"` - // The specific blocked email addresses that you want to delete. - Emails *[]string `json:"emails,omitempty"` -} diff --git a/rest/api/v3/suppressions/model_delete_suppression_bounces_request.go b/rest/api/v3/suppressions/model_delete_suppression_bounces_request.go deleted file mode 100644 index 7e8eeea0..00000000 --- a/rest/api/v3/suppressions/model_delete_suppression_bounces_request.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DeleteSuppressionBouncesRequest struct for DeleteSuppressionBouncesRequest -type DeleteSuppressionBouncesRequest struct { - // This parameter allows you to delete **every** email in your bounce list. This should not be used with the emails parameter. - DeleteAll *bool `json:"delete_all,omitempty"` - // Delete multiple emails from your bounce list at the same time. This should not be used with the delete_all parameter. - Emails *[]string `json:"emails,omitempty"` -} diff --git a/rest/api/v3/suppressions/model_error_response.go b/rest/api/v3/suppressions/model_error_response.go deleted file mode 100644 index a6d36320..00000000 --- a/rest/api/v3/suppressions/model_error_response.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponse struct for ErrorResponse -type ErrorResponse struct { - Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` - // When applicable, this property value will be an error ID. - Id *string `json:"id,omitempty"` -} diff --git a/rest/api/v3/suppressions/model_error_response_errors_inner.go b/rest/api/v3/suppressions/model_error_response_errors_inner.go deleted file mode 100644 index a20447e5..00000000 --- a/rest/api/v3/suppressions/model_error_response_errors_inner.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner -type ErrorResponseErrorsInner struct { - // An error message. - Message *string `json:"message,omitempty"` - // When applicable, this property value will be the field that generated the error. - Field *string `json:"field,omitempty"` - // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. - Help *map[string]interface{} `json:"help,omitempty"` -} diff --git a/rest/api/v3/suppressions/model_get_asm_group_200_response.go b/rest/api/v3/suppressions/model_get_asm_group_200_response.go deleted file mode 100644 index bb547531..00000000 --- a/rest/api/v3/suppressions/model_get_asm_group_200_response.go +++ /dev/null @@ -1,29 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetAsmGroup200Response struct for GetAsmGroup200Response -type GetAsmGroup200Response struct { - // The name of your suppression group. Required when creating a group. - Name *string `json:"name,omitempty"` - // A brief description of your suppression group. Required when creating a group. - Description *string `json:"description,omitempty"` - // Indicates if you would like this to be your default suppression group. - IsDefault *bool `json:"is_default,omitempty"` - // The ID of the suppression group. - Id int32 `json:"id"` - // The number of unsubscribes, or suppressions, in this group. - Unsubscribes *int32 `json:"unsubscribes,omitempty"` - LastEmailSentAt *string `json:"last_email_sent_at,omitempty"` -} diff --git a/rest/api/v3/suppressions/model_get_asm_suppression_200_response.go b/rest/api/v3/suppressions/model_get_asm_suppression_200_response.go deleted file mode 100644 index 009b3bdc..00000000 --- a/rest/api/v3/suppressions/model_get_asm_suppression_200_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetAsmSuppression200Response struct for GetAsmSuppression200Response -type GetAsmSuppression200Response struct { - // The array of suppression groups. - Suppressions []GetAsmSuppression200ResponseSuppressionsInner `json:"suppressions"` -} diff --git a/rest/api/v3/suppressions/model_get_asm_suppression_200_response_suppressions_inner.go b/rest/api/v3/suppressions/model_get_asm_suppression_200_response_suppressions_inner.go deleted file mode 100644 index 6edb9094..00000000 --- a/rest/api/v3/suppressions/model_get_asm_suppression_200_response_suppressions_inner.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetAsmSuppression200ResponseSuppressionsInner struct for GetAsmSuppression200ResponseSuppressionsInner -type GetAsmSuppression200ResponseSuppressionsInner struct { - // The description of the suppression group. - Description string `json:"description"` - // The id of the suppression group. - Id int32 `json:"id"` - // Indicates if the suppression group is set as the default. - IsDefault bool `json:"is_default"` - // The name of the suppression group. - Name string `json:"name"` - // Indicates if the given email address is suppressed for this group. - Suppressed bool `json:"suppressed"` -} diff --git a/rest/api/v3/suppressions/model_get_suppression_bounces_classifications_200_response.go b/rest/api/v3/suppressions/model_get_suppression_bounces_classifications_200_response.go deleted file mode 100644 index f20a08bd..00000000 --- a/rest/api/v3/suppressions/model_get_suppression_bounces_classifications_200_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetSuppressionBouncesClassifications200Response struct for GetSuppressionBouncesClassifications200Response -type GetSuppressionBouncesClassifications200Response struct { - Result *[]GetSuppressionBouncesClassifications200ResponseResultInner `json:"result,omitempty"` -} diff --git a/rest/api/v3/suppressions/model_get_suppression_bounces_classifications_200_response_result_inner.go b/rest/api/v3/suppressions/model_get_suppression_bounces_classifications_200_response_result_inner.go deleted file mode 100644 index 9a5bda36..00000000 --- a/rest/api/v3/suppressions/model_get_suppression_bounces_classifications_200_response_result_inner.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetSuppressionBouncesClassifications200ResponseResultInner struct for GetSuppressionBouncesClassifications200ResponseResultInner -type GetSuppressionBouncesClassifications200ResponseResultInner struct { - Date *string `json:"date,omitempty"` - Stats *[]GetSuppressionBouncesClassifications200ResponseResultInnerStatsInner `json:"stats,omitempty"` -} diff --git a/rest/api/v3/suppressions/model_get_suppression_bounces_classifications_200_response_result_inner_stats_inner.go b/rest/api/v3/suppressions/model_get_suppression_bounces_classifications_200_response_result_inner_stats_inner.go deleted file mode 100644 index 2cfe0b26..00000000 --- a/rest/api/v3/suppressions/model_get_suppression_bounces_classifications_200_response_result_inner_stats_inner.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetSuppressionBouncesClassifications200ResponseResultInnerStatsInner struct for GetSuppressionBouncesClassifications200ResponseResultInnerStatsInner -type GetSuppressionBouncesClassifications200ResponseResultInnerStatsInner struct { - Domain *string `json:"domain,omitempty"` - Count *int32 `json:"count,omitempty"` -} diff --git a/rest/api/v3/suppressions/model_invalid_email.go b/rest/api/v3/suppressions/model_invalid_email.go deleted file mode 100644 index 0157a939..00000000 --- a/rest/api/v3/suppressions/model_invalid_email.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// InvalidEmail struct for InvalidEmail -type InvalidEmail struct { - // A Unix timestamp indicating when the email address was added to the invalid emails list. - Created *int32 `json:"created,omitempty"` - // The email address that was marked as invalid. - Email *string `json:"email,omitempty"` - // The reason that the email address was marked as invalid. - Reason *string `json:"reason,omitempty"` -} diff --git a/rest/api/v3/suppressions/model_list_asm_suppression_200_response_inner.go b/rest/api/v3/suppressions/model_list_asm_suppression_200_response_inner.go deleted file mode 100644 index 60015fac..00000000 --- a/rest/api/v3/suppressions/model_list_asm_suppression_200_response_inner.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListAsmSuppression200ResponseInner struct for ListAsmSuppression200ResponseInner -type ListAsmSuppression200ResponseInner struct { - // The email address that was suppressed. - Email string `json:"email"` - // The id of the suppression group that this email address belongs to. - GroupId int32 `json:"group_id"` - // The name of the suppression group that this email address belongs to. - GroupName string `json:"group_name"` - // A UNIX timestamp indicating when the suppression was created. - CreatedAt int32 `json:"created_at"` -} diff --git a/rest/api/v3/suppressions/model_list_global_suppression_200_response_inner.go b/rest/api/v3/suppressions/model_list_global_suppression_200_response_inner.go deleted file mode 100644 index b9b83a4c..00000000 --- a/rest/api/v3/suppressions/model_list_global_suppression_200_response_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListGlobalSuppression200ResponseInner struct for ListGlobalSuppression200ResponseInner -type ListGlobalSuppression200ResponseInner struct { - // A Unix timestamp indicating when the recipient was added to the global suppression list. - Created int32 `json:"created"` - // The email address of the recipient who is globally suppressed. - Email string `json:"email"` -} diff --git a/rest/api/v3/suppressions/model_list_suppression_bounces_classifications_200_response.go b/rest/api/v3/suppressions/model_list_suppression_bounces_classifications_200_response.go deleted file mode 100644 index bafc10de..00000000 --- a/rest/api/v3/suppressions/model_list_suppression_bounces_classifications_200_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSuppressionBouncesClassifications200Response struct for ListSuppressionBouncesClassifications200Response -type ListSuppressionBouncesClassifications200Response struct { - Result *[]ListSuppressionBouncesClassifications200ResponseResultInner `json:"result,omitempty"` -} diff --git a/rest/api/v3/suppressions/model_list_suppression_bounces_classifications_200_response_result_inner.go b/rest/api/v3/suppressions/model_list_suppression_bounces_classifications_200_response_result_inner.go deleted file mode 100644 index b567cb4d..00000000 --- a/rest/api/v3/suppressions/model_list_suppression_bounces_classifications_200_response_result_inner.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSuppressionBouncesClassifications200ResponseResultInner struct for ListSuppressionBouncesClassifications200ResponseResultInner -type ListSuppressionBouncesClassifications200ResponseResultInner struct { - Date *string `json:"date,omitempty"` - Stats *[]ListSuppressionBouncesClassifications200ResponseResultInnerStatsInner `json:"stats,omitempty"` -} diff --git a/rest/api/v3/suppressions/model_list_suppression_bounces_classifications_200_response_result_inner_stats_inner.go b/rest/api/v3/suppressions/model_list_suppression_bounces_classifications_200_response_result_inner_stats_inner.go deleted file mode 100644 index c9fed4cc..00000000 --- a/rest/api/v3/suppressions/model_list_suppression_bounces_classifications_200_response_result_inner_stats_inner.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSuppressionBouncesClassifications200ResponseResultInnerStatsInner struct for ListSuppressionBouncesClassifications200ResponseResultInnerStatsInner -type ListSuppressionBouncesClassifications200ResponseResultInnerStatsInner struct { - Classification *Classification `json:"classification,omitempty"` - Count *int32 `json:"count,omitempty"` -} diff --git a/rest/api/v3/suppressions/model_retrieve_a_global_suppression_response.go b/rest/api/v3/suppressions/model_retrieve_a_global_suppression_response.go deleted file mode 100644 index 3cd524c7..00000000 --- a/rest/api/v3/suppressions/model_retrieve_a_global_suppression_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// RetrieveAGlobalSuppressionResponse struct for RetrieveAGlobalSuppressionResponse -type RetrieveAGlobalSuppressionResponse struct { - // The email address that is globally suppressed. This will be an empty object if the email address you included in your call is not globally suppressed. - RecipientEmail string `json:"recipient_email"` -} diff --git a/rest/api/v3/suppressions/model_spam_reports_response_inner.go b/rest/api/v3/suppressions/model_spam_reports_response_inner.go deleted file mode 100644 index 37df519f..00000000 --- a/rest/api/v3/suppressions/model_spam_reports_response_inner.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SpamReportsResponseInner struct for SpamReportsResponseInner -type SpamReportsResponseInner struct { - // A Unix timestamp that indicates when the recipient marked your message as spam. - Created int32 `json:"created"` - // The email address of the recipient that marked your message as spam. - Email string `json:"email"` - // The IP address that the message was sent from. - Ip string `json:"ip"` -} diff --git a/rest/api/v3/suppressions/model_suppression_group.go b/rest/api/v3/suppressions/model_suppression_group.go deleted file mode 100644 index 390ef4a6..00000000 --- a/rest/api/v3/suppressions/model_suppression_group.go +++ /dev/null @@ -1,29 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SuppressionGroup struct for SuppressionGroup -type SuppressionGroup struct { - // The id of the suppression group. - Id float32 `json:"id"` - // The name of the suppression group. Each group created by a user must have a unique name. - Name string `json:"name"` - // A description of the suppression group. - Description string `json:"description"` - LastEmailSentAt *int32 `json:"last_email_sent_at,omitempty"` - // Indicates if this is the default suppression group. - IsDefault *bool `json:"is_default,omitempty"` - // The unsubscribes associated with this group. - Unsubscribes *int32 `json:"unsubscribes,omitempty"` -} diff --git a/rest/api/v3/suppressions/model_suppression_group_request_base_props.go b/rest/api/v3/suppressions/model_suppression_group_request_base_props.go deleted file mode 100644 index e6afdd18..00000000 --- a/rest/api/v3/suppressions/model_suppression_group_request_base_props.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SuppressionGroupRequestBaseProps struct for SuppressionGroupRequestBaseProps -type SuppressionGroupRequestBaseProps struct { - // The name of your suppression group. Required when creating a group. - Name *string `json:"name,omitempty"` - // A brief description of your suppression group. Required when creating a group. - Description *string `json:"description,omitempty"` - // Indicates if you would like this to be your default suppression group. - IsDefault *bool `json:"is_default,omitempty"` -} diff --git a/rest/api/v3/suppressions/model_suppressions_request.go b/rest/api/v3/suppressions/model_suppressions_request.go deleted file mode 100644 index c38f1bfd..00000000 --- a/rest/api/v3/suppressions/model_suppressions_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SuppressionsRequest struct for SuppressionsRequest -type SuppressionsRequest struct { - // The array of email addresses to add or find. - RecipientEmails []string `json:"recipient_emails"` -} diff --git a/rest/api/v3/suppressions/model_update_asm_group_request.go b/rest/api/v3/suppressions/model_update_asm_group_request.go deleted file mode 100644 index 21982594..00000000 --- a/rest/api/v3/suppressions/model_update_asm_group_request.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Suppressions API -* The Twilio SendGrid Suppressions API allows you to manage your Suppressions or Unsubscribes and Suppression or Unsubscribe groups. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. You can have global suppressions, which represent addresses that have been unsubscribed from all of your emails. You can also have suppression groups, also known as ASM groups, which represent categories or groups of emails that your recipients can unsubscribe from, rather than unsubscribing from all of your messages. SendGrid automatically suppresses emails sent to users for a variety of reasons, including blocks, bounces, invalid email addresses, spam reports, and unsubscribes. SendGrid suppresses these messages to help you maintain the best possible sender reputation by attempting to prevent unwanted mail. You may also add addresses to your suppressions. See [**Suppressions**](https://docs.sendgrid.com/for-developers/sending-email/suppressions) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateAsmGroupRequest struct for UpdateAsmGroupRequest -type UpdateAsmGroupRequest struct { - // The name of your suppression group. Required when creating a group. - Name *string `json:"name,omitempty"` - // A brief description of your suppression group. Required when creating a group. - Description *string `json:"description,omitempty"` - // Indicates if you would like this to be your default suppression group. - IsDefault *bool `json:"is_default,omitempty"` -} diff --git a/rest/api/v3/teammates/.openapi-generator b/rest/api/v3/teammates/.openapi-generator deleted file mode 100644 index 1048799f..00000000 --- a/rest/api/v3/teammates/.openapi-generator +++ /dev/null @@ -1,66 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_delete_pending_teammate.go -api_delete_teammate.go -api_get_teammate.go -api_invite_teammate.go -api_list_pending_teammate.go -api_list_subuser_by_template.go -api_list_teammate.go -api_resend_teammate_invite.go -api_service.go -api_update_teammate.go -docs/DeletePendingTeammate.md -docs/DeleteTeammate.md -docs/GetTeammate.md -docs/GetTeammate200Response.md -docs/InviteTeammate.md -docs/InviteTeammate201Response.md -docs/InviteTeammate400Response.md -docs/InviteTeammate400ResponseErrorsInner.md -docs/InviteTeammateRequest.md -docs/ListPendingTeammate.md -docs/ListPendingTeammate200Response.md -docs/ListPendingTeammate200ResponseResultInner.md -docs/ListSubuserByTemplate.md -docs/ListSubuserByTemplate200Response.md -docs/ListSubuserByTemplate200ResponseMetadata.md -docs/ListSubuserByTemplate200ResponseMetadataNextParams.md -docs/ListSubuserByTemplate200ResponseSubuserAccessInner.md -docs/ListSubuserByTemplate400Response.md -docs/ListSubuserByTemplate400ResponseErrorsInner.md -docs/ListTeammate.md -docs/ListTeammate200Response.md -docs/ListTeammate200ResponseResultInner.md -docs/PermissionType.md -docs/ResendTeammateInvite.md -docs/ResendTeammateInvite200Response.md -docs/UpdateTeammate.md -docs/UpdateTeammate200Response.md -docs/UpdateTeammateRequest.md -docs/UserType.md -docs/UserType1.md -docs/UserType2.md -model_get_teammate_200_response.go -model_invite_teammate_201_response.go -model_invite_teammate_400_response.go -model_invite_teammate_400_response_errors_inner.go -model_invite_teammate_request.go -model_list_pending_teammate_200_response.go -model_list_pending_teammate_200_response_result_inner.go -model_list_subuser_by_template_200_response.go -model_list_subuser_by_template_200_response__metadata.go -model_list_subuser_by_template_200_response__metadata_next_params.go -model_list_subuser_by_template_200_response_subuser_access_inner.go -model_list_subuser_by_template_400_response.go -model_list_subuser_by_template_400_response_errors_inner.go -model_list_teammate_200_response.go -model_list_teammate_200_response_result_inner.go -model_permission_type.go -model_resend_teammate_invite_200_response.go -model_update_teammate_200_response.go -model_update_teammate_request.go -model_user_type.go -model_user_type1.go -model_user_type2.go diff --git a/rest/api/v3/teammates/.openapi-generator-ignore b/rest/api/v3/teammates/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/teammates/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/teammates/README.md b/rest/api/v3/teammates/README.md deleted file mode 100644 index 8f89c763..00000000 --- a/rest/api/v3/teammates/README.md +++ /dev/null @@ -1,89 +0,0 @@ -# Go API client for - -The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:38.449175+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*DeletePendingTeammate* | [**DeletePendingTeammate**](docs/DeletePendingTeammate.md#deletependingteammate) | **Delete** /v3/teammates/pending/{Token} | Delete pending teammate -*DeleteTeammate* | [**DeleteTeammate**](docs/DeleteTeammate.md#deleteteammate) | **Delete** /v3/teammates/{Username} | Delete teammate -*GetTeammate* | [**GetTeammate**](docs/GetTeammate.md#getteammate) | **Get** /v3/teammates/{Username} | Retrieve specific teammate -*InviteTeammate* | [**InviteTeammate**](docs/InviteTeammate.md#inviteteammate) | **Post** /v3/teammates | Invite teammate -*ListPendingTeammate* | [**ListPendingTeammate**](docs/ListPendingTeammate.md#listpendingteammate) | **Get** /v3/teammates/pending | Retrieve all pending teammates -*ListSubuserByTemplate* | [**ListSubuserByTemplate**](docs/ListSubuserByTemplate.md#listsubuserbytemplate) | **Get** /v3/teammates/{TeammateName}/subuser_access | Get Teammate Subuser Access -*ListTeammate* | [**ListTeammate**](docs/ListTeammate.md#listteammate) | **Get** /v3/teammates | Retrieve all teammates -*ResendTeammateInvite* | [**ResendTeammateInvite**](docs/ResendTeammateInvite.md#resendteammateinvite) | **Post** /v3/teammates/pending/{Token}/resend | Resend teammate invite -*UpdateTeammate* | [**UpdateTeammate**](docs/UpdateTeammate.md#updateteammate) | **Patch** /v3/teammates/{Username} | Update teammate's permissions - - -## Documentation For Models - - - [GetTeammate200Response](GetTeammate200Response.md) - - [InviteTeammate201Response](InviteTeammate201Response.md) - - [InviteTeammate400Response](InviteTeammate400Response.md) - - [InviteTeammate400ResponseErrorsInner](InviteTeammate400ResponseErrorsInner.md) - - [InviteTeammateRequest](InviteTeammateRequest.md) - - [ListPendingTeammate200Response](ListPendingTeammate200Response.md) - - [ListPendingTeammate200ResponseResultInner](ListPendingTeammate200ResponseResultInner.md) - - [ListSubuserByTemplate200Response](ListSubuserByTemplate200Response.md) - - [ListSubuserByTemplate200ResponseMetadata](ListSubuserByTemplate200ResponseMetadata.md) - - [ListSubuserByTemplate200ResponseMetadataNextParams](ListSubuserByTemplate200ResponseMetadataNextParams.md) - - [ListSubuserByTemplate200ResponseSubuserAccessInner](ListSubuserByTemplate200ResponseSubuserAccessInner.md) - - [ListSubuserByTemplate400Response](ListSubuserByTemplate400Response.md) - - [ListSubuserByTemplate400ResponseErrorsInner](ListSubuserByTemplate400ResponseErrorsInner.md) - - [ListTeammate200Response](ListTeammate200Response.md) - - [ListTeammate200ResponseResultInner](ListTeammate200ResponseResultInner.md) - - [PermissionType](PermissionType.md) - - [ResendTeammateInvite200Response](ResendTeammateInvite200Response.md) - - [UpdateTeammate200Response](UpdateTeammate200Response.md) - - [UpdateTeammateRequest](UpdateTeammateRequest.md) - - [UserType](UserType.md) - - [UserType1](UserType1.md) - - [UserType2](UserType2.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/teammates/api_delete_pending_teammate.go b/rest/api/v3/teammates/api_delete_pending_teammate.go deleted file mode 100644 index bf4f704f..00000000 --- a/rest/api/v3/teammates/api_delete_pending_teammate.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeletePendingTeammateParam struct { - // The token for the invite you want to delete. - Token *string `json:"token"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *DeletePendingTeammateParam) SetToken(Token string) *DeletePendingTeammateParam { - params.Token = &Token - return params -} -func (params *DeletePendingTeammateParam) SetOnbehalfof(Onbehalfof string) *DeletePendingTeammateParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to delete a pending teammate invite.** -func (c *ApiService) DeletePendingTeammate(params *DeletePendingTeammateParam) (interface{}, error) { - path := "/v3/teammates/pending/{Token}" - if params != nil && params.Token != nil { - path = strings.Replace(path, "{"+"Token"+"}", *params.Token, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 404 { - ps := &InviteTeammate400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/teammates/api_delete_teammate.go b/rest/api/v3/teammates/api_delete_teammate.go deleted file mode 100644 index 62147561..00000000 --- a/rest/api/v3/teammates/api_delete_teammate.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteTeammateParam struct { - // The username of the teammate that you want to retrieve. - Username *string `json:"username"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *DeleteTeammateParam) SetUsername(Username string) *DeleteTeammateParam { - params.Username = &Username - return params -} -func (params *DeleteTeammateParam) SetOnbehalfof(Onbehalfof string) *DeleteTeammateParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to delete a teammate.** **Only the parent user or an admin teammate can delete another teammate.** -func (c *ApiService) DeleteTeammate(params *DeleteTeammateParam) (interface{}, error) { - path := "/v3/teammates/{Username}" - if params != nil && params.Username != nil { - path = strings.Replace(path, "{"+"Username"+"}", *params.Username, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 404 { - ps := &InviteTeammate400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/teammates/api_get_teammate.go b/rest/api/v3/teammates/api_get_teammate.go deleted file mode 100644 index 484b7167..00000000 --- a/rest/api/v3/teammates/api_get_teammate.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetTeammateParam struct { - // The username of the teammate that you want to retrieve. - Username *string `json:"username"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetTeammateParam) SetUsername(Username string) *GetTeammateParam { - params.Username = &Username - return params -} -func (params *GetTeammateParam) SetOnbehalfof(Onbehalfof string) *GetTeammateParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a specific Teammate by username.** You can retrieve the username's for each of your Teammates using the \"Retrieve all Teammates\" endpoint. -func (c *ApiService) GetTeammate(params *GetTeammateParam) (interface{}, error) { - path := "/v3/teammates/{Username}" - if params != nil && params.Username != nil { - path = strings.Replace(path, "{"+"Username"+"}", *params.Username, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &GetTeammate200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/teammates/api_invite_teammate.go b/rest/api/v3/teammates/api_invite_teammate.go deleted file mode 100644 index 13739ee5..00000000 --- a/rest/api/v3/teammates/api_invite_teammate.go +++ /dev/null @@ -1,82 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type InviteTeammateParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - InviteTeammateRequest *InviteTeammateRequest `json:"InviteTeammateRequest,omitempty"` -} - -func (params *InviteTeammateParam) SetOnbehalfof(Onbehalfof string) *InviteTeammateParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *InviteTeammateParam) SetInviteTeammateRequest(InviteTeammateRequest InviteTeammateRequest) *InviteTeammateParam { - params.InviteTeammateRequest = &InviteTeammateRequest - return params -} - -// **This endpoint allows you to invite a Teammate to your account via email.** You can set a Teammate's initial permissions using the `scopes` array in the request body. Teammate's will receive a minimum set of scopes from Twilio SendGrid that are necessary for the Teammate to function. **Note:** A teammate invite will expire after 7 days, but you may resend the invitation at any time to reset the expiration date. -func (c *ApiService) InviteTeammate(params *InviteTeammateParam) (interface{}, error) { - path := "/v3/teammates" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.InviteTeammateRequest != nil { - b, err := json.Marshal(*params.InviteTeammateRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &InviteTeammate201Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &InviteTeammate400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/teammates/api_list_pending_teammate.go b/rest/api/v3/teammates/api_list_pending_teammate.go deleted file mode 100644 index afbc29ea..00000000 --- a/rest/api/v3/teammates/api_list_pending_teammate.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListPendingTeammateParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListPendingTeammateParam) SetOnbehalfof(Onbehalfof string) *ListPendingTeammateParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a list of all pending Teammate invitations.** Each teammate invitation is valid for 7 days. Users may resend the invitation to refresh the expiration date. -func (c *ApiService) ListPendingTeammate(params *ListPendingTeammateParam) (interface{}, error) { - path := "/v3/teammates/pending" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListPendingTeammate200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/teammates/api_list_subuser_by_template.go b/rest/api/v3/teammates/api_list_subuser_by_template.go deleted file mode 100644 index c032f77d..00000000 --- a/rest/api/v3/teammates/api_list_subuser_by_template.go +++ /dev/null @@ -1,122 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" - - "strings" -) - -type ListSubuserByTemplateParam struct { - // The username of the Teammate for whom you want to retrieve Subuser access information. - TeammateName *string `json:"teammate_name"` - // The Subuser ID from which the API request will begin retrieving Subusers. This query parameter can be used in successive API calls to retrieve additional Subusers. - AfterSubuserId *int32 `json:"after_subuser_id,omitempty"` - // Limit the number of Subusers to be returned. The default `limit` is `100` per request. - Limit *int32 `json:"limit,omitempty"` - // A Subuser's username that will be used to filter the returned result. - Username *string `json:"username,omitempty"` -} - -func (params *ListSubuserByTemplateParam) SetTeammateName(TeammateName string) *ListSubuserByTemplateParam { - params.TeammateName = &TeammateName - return params -} -func (params *ListSubuserByTemplateParam) SetAfterSubuserId(AfterSubuserId int32) *ListSubuserByTemplateParam { - params.AfterSubuserId = &AfterSubuserId - return params -} -func (params *ListSubuserByTemplateParam) SetLimit(Limit int32) *ListSubuserByTemplateParam { - params.Limit = &Limit - return params -} -func (params *ListSubuserByTemplateParam) SetUsername(Username string) *ListSubuserByTemplateParam { - params.Username = &Username - return params -} - -// **This operation allows you to retrieve the Subusers that can be accessed by a specified Teammate.** This operation will return the Subusers available to a Teammate, including the scopes available. If the Teammate is an administrator, all Subusers will be returned. -func (c *ApiService) ListSubuserByTemplate(params *ListSubuserByTemplateParam) (interface{}, error) { - path := "/v3/teammates/{TeammateName}/subuser_access" - if params != nil && params.TeammateName != nil { - path = strings.Replace(path, "{"+"TeammateName"+"}", *params.TeammateName, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.AfterSubuserId != nil { - data.Set("after_subuser_id", fmt.Sprint(*params.AfterSubuserId)) - } - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Username != nil { - data.Set("username", *params.Username) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListSubuserByTemplate200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ListSubuserByTemplate400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ListSubuserByTemplate400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ListSubuserByTemplate400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 500 { - ps := &ListSubuserByTemplate400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/teammates/api_list_teammate.go b/rest/api/v3/teammates/api_list_teammate.go deleted file mode 100644 index 0109f5ea..00000000 --- a/rest/api/v3/teammates/api_list_teammate.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListTeammateParam struct { - // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. The maximum page size for this endpoint is 500 items per page. - Limit *int32 `json:"limit,omitempty"` - // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. - Offset *int32 `json:"offset,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListTeammateParam) SetLimit(Limit int32) *ListTeammateParam { - params.Limit = &Limit - return params -} -func (params *ListTeammateParam) SetOffset(Offset int32) *ListTeammateParam { - params.Offset = &Offset - return params -} -func (params *ListTeammateParam) SetOnbehalfof(Onbehalfof string) *ListTeammateParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a paginated list of all current Teammates.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. -func (c *ApiService) ListTeammate(params *ListTeammateParam) (interface{}, error) { - path := "/v3/teammates" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.Offset != nil { - data.Set("offset", fmt.Sprint(*params.Offset)) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListTeammate200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/teammates/api_resend_teammate_invite.go b/rest/api/v3/teammates/api_resend_teammate_invite.go deleted file mode 100644 index f882caae..00000000 --- a/rest/api/v3/teammates/api_resend_teammate_invite.go +++ /dev/null @@ -1,78 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type ResendTeammateInviteParam struct { - // The token for the invite that you want to resend. - Token *string `json:"token"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ResendTeammateInviteParam) SetToken(Token string) *ResendTeammateInviteParam { - params.Token = &Token - return params -} -func (params *ResendTeammateInviteParam) SetOnbehalfof(Onbehalfof string) *ResendTeammateInviteParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to resend a Teammate invitation.** Teammate invitations will expire after 7 days. Resending an invitation will reset the expiration date. -func (c *ApiService) ResendTeammateInvite(params *ResendTeammateInviteParam) (interface{}, error) { - path := "/v3/teammates/pending/{Token}/resend" - if params != nil && params.Token != nil { - path = strings.Replace(path, "{"+"Token"+"}", *params.Token, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ResendTeammateInvite200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &InviteTeammate400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/teammates/api_service.go b/rest/api/v3/teammates/api_service.go deleted file mode 100644 index 9ffc80f5..00000000 --- a/rest/api/v3/teammates/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/teammates/api_update_teammate.go b/rest/api/v3/teammates/api_update_teammate.go deleted file mode 100644 index afc24ee0..00000000 --- a/rest/api/v3/teammates/api_update_teammate.go +++ /dev/null @@ -1,101 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type UpdateTeammateParam struct { - // The username of the teammate that you want to retrieve. - Username *string `json:"username"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - UpdateTeammateRequest *UpdateTeammateRequest `json:"UpdateTeammateRequest,omitempty"` -} - -func (params *UpdateTeammateParam) SetUsername(Username string) *UpdateTeammateParam { - params.Username = &Username - return params -} -func (params *UpdateTeammateParam) SetOnbehalfof(Onbehalfof string) *UpdateTeammateParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateTeammateParam) SetUpdateTeammateRequest(UpdateTeammateRequest UpdateTeammateRequest) *UpdateTeammateParam { - params.UpdateTeammateRequest = &UpdateTeammateRequest - return params -} - -// **This endpoint allows you to update a teammate’s permissions.** To turn a teammate into an admin, the request body should contain an `is_admin` set to `true`. Otherwise, set `is_admin` to `false` and pass in all the scopes that a teammate should have. **Only the parent user or other admin teammates can update another teammate’s permissions.** **Admin users can only update permissions.** -func (c *ApiService) UpdateTeammate(params *UpdateTeammateParam) (interface{}, error) { - path := "/v3/teammates/{Username}" - if params != nil && params.Username != nil { - path = strings.Replace(path, "{"+"Username"+"}", *params.Username, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateTeammateRequest != nil { - b, err := json.Marshal(*params.UpdateTeammateRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &UpdateTeammate200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &InviteTeammate400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &InviteTeammate400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/teammates/docs/DeletePendingTeammate.md b/rest/api/v3/teammates/docs/DeletePendingTeammate.md deleted file mode 100644 index c2dfe25e..00000000 --- a/rest/api/v3/teammates/docs/DeletePendingTeammate.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeletePendingTeammate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeletePendingTeammate**](DeletePendingTeammate.md#DeletePendingTeammate) | **Delete** /v3/teammates/pending/{Token} | Delete pending teammate - - - -## DeletePendingTeammate - -> DeletePendingTeammate(ctx, Tokenoptional) - -Delete pending teammate - -**This endpoint allows you to delete a pending teammate invite.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Token** | **string** | The token for the invite you want to delete. - -### Other Parameters - -Other parameters are passed through a pointer to a DeletePendingTeammateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/teammates/docs/DeleteTeammate.md b/rest/api/v3/teammates/docs/DeleteTeammate.md deleted file mode 100644 index 49d1d4d4..00000000 --- a/rest/api/v3/teammates/docs/DeleteTeammate.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeleteTeammate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteTeammate**](DeleteTeammate.md#DeleteTeammate) | **Delete** /v3/teammates/{Username} | Delete teammate - - - -## DeleteTeammate - -> DeleteTeammate(ctx, Usernameoptional) - -Delete teammate - -**This endpoint allows you to delete a teammate.** **Only the parent user or an admin teammate can delete another teammate.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Username** | **string** | The username of the teammate that you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteTeammateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/teammates/docs/GetTeammate.md b/rest/api/v3/teammates/docs/GetTeammate.md deleted file mode 100644 index 9a3c21dd..00000000 --- a/rest/api/v3/teammates/docs/GetTeammate.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetTeammate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetTeammate**](GetTeammate.md#GetTeammate) | **Get** /v3/teammates/{Username} | Retrieve specific teammate - - - -## GetTeammate - -> GetTeammate200Response GetTeammate(ctx, Usernameoptional) - -Retrieve specific teammate - -**This endpoint allows you to retrieve a specific Teammate by username.** You can retrieve the username's for each of your Teammates using the \"Retrieve all Teammates\" endpoint. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Username** | **string** | The username of the teammate that you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a GetTeammateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**GetTeammate200Response**](GetTeammate200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/teammates/docs/GetTeammate200Response.md b/rest/api/v3/teammates/docs/GetTeammate200Response.md deleted file mode 100644 index 96209510..00000000 --- a/rest/api/v3/teammates/docs/GetTeammate200Response.md +++ /dev/null @@ -1,25 +0,0 @@ -# GetTeammate200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Username** | **string** | Teammate's username |[optional] -**FirstName** | **string** | Teammate's first name |[optional] -**LastName** | **string** | Teammate's last name |[optional] -**Email** | **string** | Teammate's email |[optional] -**Scopes** | **[]interface{}** | Scopes associated to teammate |[optional] -**UserType** | [**UserType1**](UserType1.md) | Indicate the type of user: account owner, teammate admin user, or normal teammate |[optional] -**IsAdmin** | **bool** | Set to true if teammate has admin privileges |[optional] -**Phone** | **string** | (optional) Teammate's phone number |[optional] -**Website** | **string** | (optional) Teammate's website |[optional] -**Address** | **string** | (optional) Teammate's address |[optional] -**Address2** | **string** | (optional) Teammate's address |[optional] -**City** | **string** | (optional) Teammate's city |[optional] -**State** | **string** | (optional) Teammate's state |[optional] -**Zip** | **string** | (optional) Teammate's zip |[optional] -**Country** | **string** | (optional) Teammate's country |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/InviteTeammate.md b/rest/api/v3/teammates/docs/InviteTeammate.md deleted file mode 100644 index c4041719..00000000 --- a/rest/api/v3/teammates/docs/InviteTeammate.md +++ /dev/null @@ -1,49 +0,0 @@ -# InviteTeammate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**InviteTeammate**](InviteTeammate.md#InviteTeammate) | **Post** /v3/teammates | Invite teammate - - - -## InviteTeammate - -> InviteTeammate201Response InviteTeammate(ctx, optional) - -Invite teammate - -**This endpoint allows you to invite a Teammate to your account via email.** You can set a Teammate's initial permissions using the `scopes` array in the request body. Teammate's will receive a minimum set of scopes from Twilio SendGrid that are necessary for the Teammate to function. **Note:** A teammate invite will expire after 7 days, but you may resend the invitation at any time to reset the expiration date. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a InviteTeammateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**InviteTeammateRequest** | [**InviteTeammateRequest**](InviteTeammateRequest.md) | - -### Return type - -[**InviteTeammate201Response**](InviteTeammate201Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/teammates/docs/InviteTeammate201Response.md b/rest/api/v3/teammates/docs/InviteTeammate201Response.md deleted file mode 100644 index 63648c38..00000000 --- a/rest/api/v3/teammates/docs/InviteTeammate201Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# InviteTeammate201Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Token** | **string** | Token to identify invite |[optional] -**Email** | **string** | Teammate's email address |[optional] -**Scopes** | **[]interface{}** | Initial set of permissions to give to teammate if they accept the invite |[optional] -**IsAdmin** | **bool** | Set to true if teammate should have admin privileges |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/InviteTeammate400Response.md b/rest/api/v3/teammates/docs/InviteTeammate400Response.md deleted file mode 100644 index 7d0f0c73..00000000 --- a/rest/api/v3/teammates/docs/InviteTeammate400Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# InviteTeammate400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]InviteTeammate400ResponseErrorsInner**](InviteTeammate400ResponseErrorsInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/InviteTeammate400ResponseErrorsInner.md b/rest/api/v3/teammates/docs/InviteTeammate400ResponseErrorsInner.md deleted file mode 100644 index 6bf97048..00000000 --- a/rest/api/v3/teammates/docs/InviteTeammate400ResponseErrorsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# InviteTeammate400ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | |[optional] -**Field** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/InviteTeammateRequest.md b/rest/api/v3/teammates/docs/InviteTeammateRequest.md deleted file mode 100644 index 5d3912fd..00000000 --- a/rest/api/v3/teammates/docs/InviteTeammateRequest.md +++ /dev/null @@ -1,13 +0,0 @@ -# InviteTeammateRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | **string** | New teammate's email | -**Scopes** | **[]string** | Set to specify list of scopes that teammate should have. Should be empty if teammate is an admin. | -**IsAdmin** | **bool** | Set to true if teammate should be an admin user |[default to false] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/ListPendingTeammate.md b/rest/api/v3/teammates/docs/ListPendingTeammate.md deleted file mode 100644 index 84312df6..00000000 --- a/rest/api/v3/teammates/docs/ListPendingTeammate.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListPendingTeammate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListPendingTeammate**](ListPendingTeammate.md#ListPendingTeammate) | **Get** /v3/teammates/pending | Retrieve all pending teammates - - - -## ListPendingTeammate - -> ListPendingTeammate200Response ListPendingTeammate(ctx, optional) - -Retrieve all pending teammates - -**This endpoint allows you to retrieve a list of all pending Teammate invitations.** Each teammate invitation is valid for 7 days. Users may resend the invitation to refresh the expiration date. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListPendingTeammateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListPendingTeammate200Response**](ListPendingTeammate200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/teammates/docs/ListPendingTeammate200Response.md b/rest/api/v3/teammates/docs/ListPendingTeammate200Response.md deleted file mode 100644 index acaf8ee6..00000000 --- a/rest/api/v3/teammates/docs/ListPendingTeammate200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListPendingTeammate200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]ListPendingTeammate200ResponseResultInner**](ListPendingTeammate200ResponseResultInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/ListPendingTeammate200ResponseResultInner.md b/rest/api/v3/teammates/docs/ListPendingTeammate200ResponseResultInner.md deleted file mode 100644 index e5ea2c9c..00000000 --- a/rest/api/v3/teammates/docs/ListPendingTeammate200ResponseResultInner.md +++ /dev/null @@ -1,15 +0,0 @@ -# ListPendingTeammate200ResponseResultInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | **string** | Email address teammate invite will be sent to |[optional] -**Scopes** | **[]string** | List of permissions to give teammate if they accept |[optional] -**IsAdmin** | **bool** | Set to true to indicate teammate should have the same set of permissions as parent user |[optional] -**Token** | **string** | Invitation token used to identify user |[optional] -**ExpirationDate** | **int32** | timestamp indicates when invite will expire. Expiration is 7 days after invite creation |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/ListSubuserByTemplate.md b/rest/api/v3/teammates/docs/ListSubuserByTemplate.md deleted file mode 100644 index 828e71ce..00000000 --- a/rest/api/v3/teammates/docs/ListSubuserByTemplate.md +++ /dev/null @@ -1,54 +0,0 @@ -# ListSubuserByTemplate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListSubuserByTemplate**](ListSubuserByTemplate.md#ListSubuserByTemplate) | **Get** /v3/teammates/{TeammateName}/subuser_access | Get Teammate Subuser Access - - - -## ListSubuserByTemplate - -> ListSubuserByTemplate200Response ListSubuserByTemplate(ctx, TeammateNameoptional) - -Get Teammate Subuser Access - -**This operation allows you to retrieve the Subusers that can be accessed by a specified Teammate.** This operation will return the Subusers available to a Teammate, including the scopes available. If the Teammate is an administrator, all Subusers will be returned. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**TeammateName** | **string** | The username of the Teammate for whom you want to retrieve Subuser access information. - -### Other Parameters - -Other parameters are passed through a pointer to a ListSubuserByTemplateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**AfterSubuserId** | **int32** | The Subuser ID from which the API request will begin retrieving Subusers. This query parameter can be used in successive API calls to retrieve additional Subusers. -**Limit** | **int32** | Limit the number of Subusers to be returned. The default `limit` is `100` per request. -**Username** | **string** | A Subuser's username that will be used to filter the returned result. - -### Return type - -[**ListSubuserByTemplate200Response**](ListSubuserByTemplate200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/teammates/docs/ListSubuserByTemplate200Response.md b/rest/api/v3/teammates/docs/ListSubuserByTemplate200Response.md deleted file mode 100644 index 491b1817..00000000 --- a/rest/api/v3/teammates/docs/ListSubuserByTemplate200Response.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListSubuserByTemplate200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**HasRestrictedSubuserAccess** | **bool** | When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. |[optional] -**SubuserAccess** | [**[]ListSubuserByTemplate200ResponseSubuserAccessInner**](ListSubuserByTemplate200ResponseSubuserAccessInner.md) | Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. |[optional] -**Metadata** | [**ListSubuserByTemplate200ResponseMetadata**](ListSubuserByTemplate200ResponseMetadata.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadata.md b/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadata.md deleted file mode 100644 index ed90d06a..00000000 --- a/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadata.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListSubuserByTemplate200ResponseMetadata - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**NextParams** | [**ListSubuserByTemplate200ResponseMetadataNextParams**](ListSubuserByTemplate200ResponseMetadataNextParams.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadataNextParams.md b/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadataNextParams.md deleted file mode 100644 index 66b7c05d..00000000 --- a/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadataNextParams.md +++ /dev/null @@ -1,13 +0,0 @@ -# ListSubuserByTemplate200ResponseMetadataNextParams - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Limit** | **int32** | The limit specified in the `limit` query parameter to constrain the number of Subusers returned. |[optional] -**AfterSubuserId** | **int32** | The `after_subuser_id` property represents the last processed Subuser. If the `after_subuser_id` property is `null`, there are no more entries available. |[optional] -**Username** | **string** | The username of a Subuser passed in the `name` query parameter to filter results by username. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseSubuserAccessInner.md b/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseSubuserAccessInner.md deleted file mode 100644 index 2264a516..00000000 --- a/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseSubuserAccessInner.md +++ /dev/null @@ -1,16 +0,0 @@ -# ListSubuserByTemplate200ResponseSubuserAccessInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int32** | The ID of a Subuser to which the Teammate has access. You can retrieve Subuser IDs from the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/). |[optional] -**Username** | **string** | The username of a Subuser to which the Teammate has access. |[optional] -**Email** | **string** | The email address of a Subuser to which the Teammate has access. |[optional] -**Disabled** | **bool** | Indicates if the Subuser is active for the SendGrid account. |[optional] -**PermissionType** | [**PermissionType**](PermissionType.md) | The level of access the Teammate has to the specified Subuser. This property value may be either `admin` or `restricted`. When is property is set to `restricted`, the Teammate has only the permissions assigned in the `scopes` property. |[optional] -**Scopes** | **[]string** | The permissions or scopes that the Teammate can access on behalf of the Subuser. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/ListSubuserByTemplate400Response.md b/rest/api/v3/teammates/docs/ListSubuserByTemplate400Response.md deleted file mode 100644 index cce6bfd0..00000000 --- a/rest/api/v3/teammates/docs/ListSubuserByTemplate400Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListSubuserByTemplate400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ListSubuserByTemplate400ResponseErrorsInner**](ListSubuserByTemplate400ResponseErrorsInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/ListSubuserByTemplate400ResponseErrorsInner.md b/rest/api/v3/teammates/docs/ListSubuserByTemplate400ResponseErrorsInner.md deleted file mode 100644 index e82f043b..00000000 --- a/rest/api/v3/teammates/docs/ListSubuserByTemplate400ResponseErrorsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListSubuserByTemplate400ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | The message representing the error from the API. |[optional] -**Field** | **string** | The field associated with the error. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/ListTeammate.md b/rest/api/v3/teammates/docs/ListTeammate.md deleted file mode 100644 index b2747274..00000000 --- a/rest/api/v3/teammates/docs/ListTeammate.md +++ /dev/null @@ -1,50 +0,0 @@ -# ListTeammate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListTeammate**](ListTeammate.md#ListTeammate) | **Get** /v3/teammates | Retrieve all teammates - - - -## ListTeammate - -> ListTeammate200Response ListTeammate(ctx, optional) - -Retrieve all teammates - -**This endpoint allows you to retrieve a paginated list of all current Teammates.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListTeammateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. The maximum page size for this endpoint is 500 items per page. -**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListTeammate200Response**](ListTeammate200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/teammates/docs/ListTeammate200Response.md b/rest/api/v3/teammates/docs/ListTeammate200Response.md deleted file mode 100644 index 8bbca76d..00000000 --- a/rest/api/v3/teammates/docs/ListTeammate200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListTeammate200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]ListTeammate200ResponseResultInner**](ListTeammate200ResponseResultInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/ListTeammate200ResponseResultInner.md b/rest/api/v3/teammates/docs/ListTeammate200ResponseResultInner.md deleted file mode 100644 index d7a2c068..00000000 --- a/rest/api/v3/teammates/docs/ListTeammate200ResponseResultInner.md +++ /dev/null @@ -1,24 +0,0 @@ -# ListTeammate200ResponseResultInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Username** | **string** | Teammate's username |[optional] -**Email** | **string** | Teammate's email |[optional] -**FirstName** | **string** | Teammate's first name |[optional] -**LastName** | **string** | Teammate's last name |[optional] -**UserType** | [**UserType**](UserType.md) | Indicate the type of user: owner user, teammate admin user, or normal teammate |[optional] -**IsAdmin** | **bool** | Set to true if teammate has admin privileges |[optional] -**Phone** | **string** | (optional) Teammate's phone number |[optional] -**Website** | **string** | (optional) Teammate's website |[optional] -**Address** | **string** | (optional) Teammate's address |[optional] -**Address2** | **string** | (optional) Teammate's address |[optional] -**City** | **string** | (optional) Teammate's city |[optional] -**State** | **string** | (optional) Teammate's state |[optional] -**Zip** | **string** | (optional) Teammate's zip |[optional] -**Country** | **string** | (optional) Teammate's country |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/PermissionType.md b/rest/api/v3/teammates/docs/PermissionType.md deleted file mode 100644 index da44f853..00000000 --- a/rest/api/v3/teammates/docs/PermissionType.md +++ /dev/null @@ -1,13 +0,0 @@ -# PermissionType - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**ADMIN** | string | (value: `"admin"`) -**RESTRICTED** | string | (value: `"restricted"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/ResendTeammateInvite.md b/rest/api/v3/teammates/docs/ResendTeammateInvite.md deleted file mode 100644 index 24f8e42d..00000000 --- a/rest/api/v3/teammates/docs/ResendTeammateInvite.md +++ /dev/null @@ -1,52 +0,0 @@ -# ResendTeammateInvite - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ResendTeammateInvite**](ResendTeammateInvite.md#ResendTeammateInvite) | **Post** /v3/teammates/pending/{Token}/resend | Resend teammate invite - - - -## ResendTeammateInvite - -> ResendTeammateInvite200Response ResendTeammateInvite(ctx, Tokenoptional) - -Resend teammate invite - -**This endpoint allows you to resend a Teammate invitation.** Teammate invitations will expire after 7 days. Resending an invitation will reset the expiration date. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Token** | **string** | The token for the invite that you want to resend. - -### Other Parameters - -Other parameters are passed through a pointer to a ResendTeammateInviteParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ResendTeammateInvite200Response**](ResendTeammateInvite200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/teammates/docs/ResendTeammateInvite200Response.md b/rest/api/v3/teammates/docs/ResendTeammateInvite200Response.md deleted file mode 100644 index c203789a..00000000 --- a/rest/api/v3/teammates/docs/ResendTeammateInvite200Response.md +++ /dev/null @@ -1,14 +0,0 @@ -# ResendTeammateInvite200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Token** | **string** | ID to identify invite |[optional] -**Email** | **string** | Teammate's email address |[optional] -**Scopes** | **[]string** | Initial set of permissions to give to teammate if they accept the invite |[optional] -**IsAdmin** | **bool** | Set to true if teammate should have admin privileges |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/UpdateTeammate.md b/rest/api/v3/teammates/docs/UpdateTeammate.md deleted file mode 100644 index 593e02cd..00000000 --- a/rest/api/v3/teammates/docs/UpdateTeammate.md +++ /dev/null @@ -1,53 +0,0 @@ -# UpdateTeammate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateTeammate**](UpdateTeammate.md#UpdateTeammate) | **Patch** /v3/teammates/{Username} | Update teammate's permissions - - - -## UpdateTeammate - -> UpdateTeammate200Response UpdateTeammate(ctx, Usernameoptional) - -Update teammate's permissions - -**This endpoint allows you to update a teammate’s permissions.** To turn a teammate into an admin, the request body should contain an `is_admin` set to `true`. Otherwise, set `is_admin` to `false` and pass in all the scopes that a teammate should have. **Only the parent user or other admin teammates can update another teammate’s permissions.** **Admin users can only update permissions.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Username** | **string** | The username of the teammate that you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateTeammateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**UpdateTeammateRequest** | [**UpdateTeammateRequest**](UpdateTeammateRequest.md) | - -### Return type - -[**UpdateTeammate200Response**](UpdateTeammate200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/teammates/docs/UpdateTeammate200Response.md b/rest/api/v3/teammates/docs/UpdateTeammate200Response.md deleted file mode 100644 index 65414c2e..00000000 --- a/rest/api/v3/teammates/docs/UpdateTeammate200Response.md +++ /dev/null @@ -1,25 +0,0 @@ -# UpdateTeammate200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Username** | **string** | Teammate's username |[optional] -**FirstName** | **string** | Teammate's first name |[optional] -**LastName** | **string** | Teammate's last name |[optional] -**Email** | **string** | Teammate's email address |[optional] -**Scopes** | **[]string** | Scopes given to teammate |[optional] -**UserType** | [**UserType2**](UserType2.md) | Indicate the type of user: owner user, teammate admin user, or normal teammate |[optional] -**IsAdmin** | **bool** | Set to true if teammate has admin priveleges |[optional] -**Phone** | **string** | (optional) Teammate's phone number |[optional] -**Website** | **string** | (optional) Teammate's website |[optional] -**Address** | **string** | (optional) Teammate's address |[optional] -**Address2** | **string** | (optional) Teammate's address |[optional] -**City** | **string** | (optional) Teammate's city |[optional] -**State** | **string** | (optional) Teammate's state |[optional] -**Zip** | **string** | (optional) Teammate's zip |[optional] -**Country** | **string** | (optional) Teammate's country |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/UpdateTeammateRequest.md b/rest/api/v3/teammates/docs/UpdateTeammateRequest.md deleted file mode 100644 index ca9956e0..00000000 --- a/rest/api/v3/teammates/docs/UpdateTeammateRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# UpdateTeammateRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Scopes** | **[]string** | Provide list of scopes that should be given to teammate. If specifying list of scopes, is_admin should be set to False. | -**IsAdmin** | **bool** | Set to True if this teammate should be promoted to an admin user. If True, scopes should be an empty array. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/UserType.md b/rest/api/v3/teammates/docs/UserType.md deleted file mode 100644 index f9f8db1d..00000000 --- a/rest/api/v3/teammates/docs/UserType.md +++ /dev/null @@ -1,14 +0,0 @@ -# UserType - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**ADMIN** | string | (value: `"admin"`) -**OWNER** | string | (value: `"owner"`) -**TEAMMATE** | string | (value: `"teammate"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/UserType1.md b/rest/api/v3/teammates/docs/UserType1.md deleted file mode 100644 index 008e09e1..00000000 --- a/rest/api/v3/teammates/docs/UserType1.md +++ /dev/null @@ -1,14 +0,0 @@ -# UserType1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**ADMIN** | string | (value: `"admin"`) -**OWNER** | string | (value: `"owner"`) -**TEAMMATE** | string | (value: `"teammate"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/docs/UserType2.md b/rest/api/v3/teammates/docs/UserType2.md deleted file mode 100644 index 59679096..00000000 --- a/rest/api/v3/teammates/docs/UserType2.md +++ /dev/null @@ -1,14 +0,0 @@ -# UserType2 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**ADMIN** | string | (value: `"admin"`) -**OWNER** | string | (value: `"owner"`) -**TEAMMATE** | string | (value: `"teammate"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/teammates/model_get_teammate_200_response.go b/rest/api/v3/teammates/model_get_teammate_200_response.go deleted file mode 100644 index a1c30f71..00000000 --- a/rest/api/v3/teammates/model_get_teammate_200_response.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetTeammate200Response struct for GetTeammate200Response -type GetTeammate200Response struct { - // Teammate's username - Username *string `json:"username,omitempty"` - // Teammate's first name - FirstName *string `json:"first_name,omitempty"` - // Teammate's last name - LastName *string `json:"last_name,omitempty"` - // Teammate's email - Email *string `json:"email,omitempty"` - // Scopes associated to teammate - Scopes *[]interface{} `json:"scopes,omitempty"` - // Indicate the type of user: account owner, teammate admin user, or normal teammate - UserType *UserType1 `json:"user_type,omitempty"` - // Set to true if teammate has admin privileges - IsAdmin *bool `json:"is_admin,omitempty"` - // (optional) Teammate's phone number - Phone *string `json:"phone,omitempty"` - // (optional) Teammate's website - Website *string `json:"website,omitempty"` - // (optional) Teammate's address - Address *string `json:"address,omitempty"` - // (optional) Teammate's address - Address2 *string `json:"address2,omitempty"` - // (optional) Teammate's city - City *string `json:"city,omitempty"` - // (optional) Teammate's state - State *string `json:"state,omitempty"` - // (optional) Teammate's zip - Zip *string `json:"zip,omitempty"` - // (optional) Teammate's country - Country *string `json:"country,omitempty"` -} diff --git a/rest/api/v3/teammates/model_invite_teammate_201_response.go b/rest/api/v3/teammates/model_invite_teammate_201_response.go deleted file mode 100644 index ae183bf4..00000000 --- a/rest/api/v3/teammates/model_invite_teammate_201_response.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// InviteTeammate201Response struct for InviteTeammate201Response -type InviteTeammate201Response struct { - // Token to identify invite - Token *string `json:"token,omitempty"` - // Teammate's email address - Email *string `json:"email,omitempty"` - // Initial set of permissions to give to teammate if they accept the invite - Scopes *[]interface{} `json:"scopes,omitempty"` - // Set to true if teammate should have admin privileges - IsAdmin *bool `json:"is_admin,omitempty"` -} diff --git a/rest/api/v3/teammates/model_invite_teammate_400_response.go b/rest/api/v3/teammates/model_invite_teammate_400_response.go deleted file mode 100644 index f3bd0fd1..00000000 --- a/rest/api/v3/teammates/model_invite_teammate_400_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// InviteTeammate400Response struct for InviteTeammate400Response -type InviteTeammate400Response struct { - Errors *[]InviteTeammate400ResponseErrorsInner `json:"errors,omitempty"` -} diff --git a/rest/api/v3/teammates/model_invite_teammate_400_response_errors_inner.go b/rest/api/v3/teammates/model_invite_teammate_400_response_errors_inner.go deleted file mode 100644 index e21587e5..00000000 --- a/rest/api/v3/teammates/model_invite_teammate_400_response_errors_inner.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// InviteTeammate400ResponseErrorsInner struct for InviteTeammate400ResponseErrorsInner -type InviteTeammate400ResponseErrorsInner struct { - Message *string `json:"message,omitempty"` - Field *string `json:"field,omitempty"` -} diff --git a/rest/api/v3/teammates/model_invite_teammate_request.go b/rest/api/v3/teammates/model_invite_teammate_request.go deleted file mode 100644 index ee0342cd..00000000 --- a/rest/api/v3/teammates/model_invite_teammate_request.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// InviteTeammateRequest struct for InviteTeammateRequest -type InviteTeammateRequest struct { - // New teammate's email - Email string `json:"email"` - // Set to specify list of scopes that teammate should have. Should be empty if teammate is an admin. - Scopes []string `json:"scopes"` - // Set to true if teammate should be an admin user - IsAdmin bool `json:"is_admin"` -} diff --git a/rest/api/v3/teammates/model_list_pending_teammate_200_response.go b/rest/api/v3/teammates/model_list_pending_teammate_200_response.go deleted file mode 100644 index e23aa0d5..00000000 --- a/rest/api/v3/teammates/model_list_pending_teammate_200_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListPendingTeammate200Response struct for ListPendingTeammate200Response -type ListPendingTeammate200Response struct { - Result *[]ListPendingTeammate200ResponseResultInner `json:"result,omitempty"` -} diff --git a/rest/api/v3/teammates/model_list_pending_teammate_200_response_result_inner.go b/rest/api/v3/teammates/model_list_pending_teammate_200_response_result_inner.go deleted file mode 100644 index 2ec83181..00000000 --- a/rest/api/v3/teammates/model_list_pending_teammate_200_response_result_inner.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListPendingTeammate200ResponseResultInner struct for ListPendingTeammate200ResponseResultInner -type ListPendingTeammate200ResponseResultInner struct { - // Email address teammate invite will be sent to - Email *string `json:"email,omitempty"` - // List of permissions to give teammate if they accept - Scopes *[]string `json:"scopes,omitempty"` - // Set to true to indicate teammate should have the same set of permissions as parent user - IsAdmin *bool `json:"is_admin,omitempty"` - // Invitation token used to identify user - Token *string `json:"token,omitempty"` - // timestamp indicates when invite will expire. Expiration is 7 days after invite creation - ExpirationDate *int32 `json:"expiration_date,omitempty"` -} diff --git a/rest/api/v3/teammates/model_list_subuser_by_template_200_response.go b/rest/api/v3/teammates/model_list_subuser_by_template_200_response.go deleted file mode 100644 index 6b55158e..00000000 --- a/rest/api/v3/teammates/model_list_subuser_by_template_200_response.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSubuserByTemplate200Response struct for ListSubuserByTemplate200Response -type ListSubuserByTemplate200Response struct { - // When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. - HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"` - // Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. - SubuserAccess *[]ListSubuserByTemplate200ResponseSubuserAccessInner `json:"subuser_access,omitempty"` - Metadata *ListSubuserByTemplate200ResponseMetadata `json:"_metadata,omitempty"` -} diff --git a/rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata.go b/rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata.go deleted file mode 100644 index 4c207d5e..00000000 --- a/rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSubuserByTemplate200ResponseMetadata This object contains response metadata. The presence of the `after_subuser_id` property in the metadata indicates that some items are still outstanding and have not been retrieved. You can use the `after_subuser_id` value to retrieve additional items with another request. -type ListSubuserByTemplate200ResponseMetadata struct { - NextParams *ListSubuserByTemplate200ResponseMetadataNextParams `json:"next_params,omitempty"` -} diff --git a/rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata_next_params.go b/rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata_next_params.go deleted file mode 100644 index c28bf633..00000000 --- a/rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata_next_params.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSubuserByTemplate200ResponseMetadataNextParams struct for ListSubuserByTemplate200ResponseMetadataNextParams -type ListSubuserByTemplate200ResponseMetadataNextParams struct { - // The limit specified in the `limit` query parameter to constrain the number of Subusers returned. - Limit *int32 `json:"limit,omitempty"` - // The `after_subuser_id` property represents the last processed Subuser. If the `after_subuser_id` property is `null`, there are no more entries available. - AfterSubuserId *int32 `json:"after_subuser_id,omitempty"` - // The username of a Subuser passed in the `name` query parameter to filter results by username. - Username *string `json:"username,omitempty"` -} diff --git a/rest/api/v3/teammates/model_list_subuser_by_template_200_response_subuser_access_inner.go b/rest/api/v3/teammates/model_list_subuser_by_template_200_response_subuser_access_inner.go deleted file mode 100644 index 100906bb..00000000 --- a/rest/api/v3/teammates/model_list_subuser_by_template_200_response_subuser_access_inner.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSubuserByTemplate200ResponseSubuserAccessInner An array of Subusers to which the Teammate has access. -type ListSubuserByTemplate200ResponseSubuserAccessInner struct { - // The ID of a Subuser to which the Teammate has access. You can retrieve Subuser IDs from the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/). - Id *int32 `json:"id,omitempty"` - // The username of a Subuser to which the Teammate has access. - Username *string `json:"username,omitempty"` - // The email address of a Subuser to which the Teammate has access. - Email *string `json:"email,omitempty"` - // Indicates if the Subuser is active for the SendGrid account. - Disabled *bool `json:"disabled,omitempty"` - // The level of access the Teammate has to the specified Subuser. This property value may be either `admin` or `restricted`. When is property is set to `restricted`, the Teammate has only the permissions assigned in the `scopes` property. - PermissionType *PermissionType `json:"permission_type,omitempty"` - // The permissions or scopes that the Teammate can access on behalf of the Subuser. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. - Scopes *[]string `json:"scopes,omitempty"` -} diff --git a/rest/api/v3/teammates/model_list_subuser_by_template_400_response.go b/rest/api/v3/teammates/model_list_subuser_by_template_400_response.go deleted file mode 100644 index a404698d..00000000 --- a/rest/api/v3/teammates/model_list_subuser_by_template_400_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSubuserByTemplate400Response An object containing an array of errors objects. -type ListSubuserByTemplate400Response struct { - Errors *[]ListSubuserByTemplate400ResponseErrorsInner `json:"errors,omitempty"` -} diff --git a/rest/api/v3/teammates/model_list_subuser_by_template_400_response_errors_inner.go b/rest/api/v3/teammates/model_list_subuser_by_template_400_response_errors_inner.go deleted file mode 100644 index 8a442ec9..00000000 --- a/rest/api/v3/teammates/model_list_subuser_by_template_400_response_errors_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListSubuserByTemplate400ResponseErrorsInner struct for ListSubuserByTemplate400ResponseErrorsInner -type ListSubuserByTemplate400ResponseErrorsInner struct { - // The message representing the error from the API. - Message *string `json:"message,omitempty"` - // The field associated with the error. - Field *string `json:"field,omitempty"` -} diff --git a/rest/api/v3/teammates/model_list_teammate_200_response.go b/rest/api/v3/teammates/model_list_teammate_200_response.go deleted file mode 100644 index 09609911..00000000 --- a/rest/api/v3/teammates/model_list_teammate_200_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListTeammate200Response struct for ListTeammate200Response -type ListTeammate200Response struct { - Result *[]ListTeammate200ResponseResultInner `json:"result,omitempty"` -} diff --git a/rest/api/v3/teammates/model_list_teammate_200_response_result_inner.go b/rest/api/v3/teammates/model_list_teammate_200_response_result_inner.go deleted file mode 100644 index c0a8d40c..00000000 --- a/rest/api/v3/teammates/model_list_teammate_200_response_result_inner.go +++ /dev/null @@ -1,46 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListTeammate200ResponseResultInner struct for ListTeammate200ResponseResultInner -type ListTeammate200ResponseResultInner struct { - // Teammate's username - Username *string `json:"username,omitempty"` - // Teammate's email - Email *string `json:"email,omitempty"` - // Teammate's first name - FirstName *string `json:"first_name,omitempty"` - // Teammate's last name - LastName *string `json:"last_name,omitempty"` - // Indicate the type of user: owner user, teammate admin user, or normal teammate - UserType *UserType `json:"user_type,omitempty"` - // Set to true if teammate has admin privileges - IsAdmin *bool `json:"is_admin,omitempty"` - // (optional) Teammate's phone number - Phone *string `json:"phone,omitempty"` - // (optional) Teammate's website - Website *string `json:"website,omitempty"` - // (optional) Teammate's address - Address *string `json:"address,omitempty"` - // (optional) Teammate's address - Address2 *string `json:"address2,omitempty"` - // (optional) Teammate's city - City *string `json:"city,omitempty"` - // (optional) Teammate's state - State *string `json:"state,omitempty"` - // (optional) Teammate's zip - Zip *string `json:"zip,omitempty"` - // (optional) Teammate's country - Country *string `json:"country,omitempty"` -} diff --git a/rest/api/v3/teammates/model_permission_type.go b/rest/api/v3/teammates/model_permission_type.go deleted file mode 100644 index b581984f..00000000 --- a/rest/api/v3/teammates/model_permission_type.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// PermissionType the model 'PermissionType' -type PermissionType string - -// List of PermissionType -const ( - PERMISSIONTYPE_ADMIN PermissionType = "admin" - PERMISSIONTYPE_RESTRICTED PermissionType = "restricted" -) diff --git a/rest/api/v3/teammates/model_resend_teammate_invite_200_response.go b/rest/api/v3/teammates/model_resend_teammate_invite_200_response.go deleted file mode 100644 index a229bfa2..00000000 --- a/rest/api/v3/teammates/model_resend_teammate_invite_200_response.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ResendTeammateInvite200Response struct for ResendTeammateInvite200Response -type ResendTeammateInvite200Response struct { - // ID to identify invite - Token *string `json:"token,omitempty"` - // Teammate's email address - Email *string `json:"email,omitempty"` - // Initial set of permissions to give to teammate if they accept the invite - Scopes *[]string `json:"scopes,omitempty"` - // Set to true if teammate should have admin privileges - IsAdmin *bool `json:"is_admin,omitempty"` -} diff --git a/rest/api/v3/teammates/model_update_teammate_200_response.go b/rest/api/v3/teammates/model_update_teammate_200_response.go deleted file mode 100644 index 37332bfe..00000000 --- a/rest/api/v3/teammates/model_update_teammate_200_response.go +++ /dev/null @@ -1,48 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateTeammate200Response struct for UpdateTeammate200Response -type UpdateTeammate200Response struct { - // Teammate's username - Username *string `json:"username,omitempty"` - // Teammate's first name - FirstName *string `json:"first_name,omitempty"` - // Teammate's last name - LastName *string `json:"last_name,omitempty"` - // Teammate's email address - Email *string `json:"email,omitempty"` - // Scopes given to teammate - Scopes *[]string `json:"scopes,omitempty"` - // Indicate the type of user: owner user, teammate admin user, or normal teammate - UserType *UserType2 `json:"user_type,omitempty"` - // Set to true if teammate has admin priveleges - IsAdmin *bool `json:"is_admin,omitempty"` - // (optional) Teammate's phone number - Phone *string `json:"phone,omitempty"` - // (optional) Teammate's website - Website *string `json:"website,omitempty"` - // (optional) Teammate's address - Address *string `json:"address,omitempty"` - // (optional) Teammate's address - Address2 *string `json:"address2,omitempty"` - // (optional) Teammate's city - City *string `json:"city,omitempty"` - // (optional) Teammate's state - State *string `json:"state,omitempty"` - // (optional) Teammate's zip - Zip *string `json:"zip,omitempty"` - // (optional) Teammate's country - Country *string `json:"country,omitempty"` -} diff --git a/rest/api/v3/teammates/model_update_teammate_request.go b/rest/api/v3/teammates/model_update_teammate_request.go deleted file mode 100644 index a7869ed0..00000000 --- a/rest/api/v3/teammates/model_update_teammate_request.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateTeammateRequest struct for UpdateTeammateRequest -type UpdateTeammateRequest struct { - // Provide list of scopes that should be given to teammate. If specifying list of scopes, is_admin should be set to False. - Scopes []string `json:"scopes"` - // Set to True if this teammate should be promoted to an admin user. If True, scopes should be an empty array. - IsAdmin bool `json:"is_admin"` -} diff --git a/rest/api/v3/teammates/model_user_type.go b/rest/api/v3/teammates/model_user_type.go deleted file mode 100644 index ca06b801..00000000 --- a/rest/api/v3/teammates/model_user_type.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UserType the model 'UserType' -type UserType string - -// List of UserType -const ( - USERTYPE_ADMIN UserType = "admin" - USERTYPE_OWNER UserType = "owner" - USERTYPE_TEAMMATE UserType = "teammate" -) diff --git a/rest/api/v3/teammates/model_user_type1.go b/rest/api/v3/teammates/model_user_type1.go deleted file mode 100644 index 133a3591..00000000 --- a/rest/api/v3/teammates/model_user_type1.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UserType1 the model 'UserType1' -type UserType1 string - -// List of UserType1 -const ( - USERTYPE1_ADMIN UserType1 = "admin" - USERTYPE1_OWNER UserType1 = "owner" - USERTYPE1_TEAMMATE UserType1 = "teammate" -) diff --git a/rest/api/v3/teammates/model_user_type2.go b/rest/api/v3/teammates/model_user_type2.go deleted file mode 100644 index 4dcb15df..00000000 --- a/rest/api/v3/teammates/model_user_type2.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Teammates API -* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UserType2 the model 'UserType2' -type UserType2 string - -// List of UserType2 -const ( - USERTYPE2_ADMIN UserType2 = "admin" - USERTYPE2_OWNER UserType2 = "owner" - USERTYPE2_TEAMMATE UserType2 = "teammate" -) diff --git a/rest/api/v3/templates/.openapi-generator b/rest/api/v3/templates/.openapi-generator deleted file mode 100644 index 1d4b1f66..00000000 --- a/rest/api/v3/templates/.openapi-generator +++ /dev/null @@ -1,66 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_activate_template_version.go -api_create_template.go -api_create_template_version.go -api_delete_template.go -api_delete_template_version.go -api_duplicate_template.go -api_get_template.go -api_get_template_version.go -api_list_template.go -api_service.go -api_update_template.go -api_update_template_version.go -docs/ActivateTemplateVersion.md -docs/Active.md -docs/Active1.md -docs/CreateTemplate.md -docs/CreateTemplateRequest.md -docs/CreateTemplateVersion.md -docs/DeleteTemplate.md -docs/DeleteTemplateVersion.md -docs/DuplicateTemplate.md -docs/DuplicateTemplateRequest.md -docs/Editor.md -docs/Editor1.md -docs/Generation.md -docs/Generation1.md -docs/Generations.md -docs/GetTemplate.md -docs/GetTemplateVersion.md -docs/ListTemplate.md -docs/ListTemplate200Response.md -docs/ListTemplate400Response.md -docs/ListTemplate400ResponseErrorsInner.md -docs/Metadata.md -docs/TransactionalTemplate.md -docs/TransactionalTemplateVersionCreate.md -docs/TransactionalTemplateVersionOutput.md -docs/TransactionalTemplateWarning.md -docs/TransactionalTemplatesTemplateLean.md -docs/TransactionalTemplatesVersionOutputLean.md -docs/UpdateTemplate.md -docs/UpdateTemplateRequest.md -docs/UpdateTemplateVersion.md -model_active.go -model_active1.go -model_create_template_request.go -model_duplicate_template_request.go -model_editor.go -model_editor1.go -model_generation.go -model_generation1.go -model_generations.go -model_list_template_200_response.go -model_list_template_400_response.go -model_list_template_400_response_errors_inner.go -model_metadata.go -model_transactional_template.go -model_transactional_template_version_create.go -model_transactional_template_version_output.go -model_transactional_template_warning.go -model_transactional_templates_template_lean.go -model_transactional_templates_version_output_lean.go -model_update_template_request.go diff --git a/rest/api/v3/templates/.openapi-generator-ignore b/rest/api/v3/templates/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/templates/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/templates/README.md b/rest/api/v3/templates/README.md deleted file mode 100644 index d0132555..00000000 --- a/rest/api/v3/templates/README.md +++ /dev/null @@ -1,93 +0,0 @@ -# Go API client for - -The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. - -This API provides operations to create and manage your templates as well as their versions. - -Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:38.465357+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*ActivateTemplateVersion* | [**ActivateTemplateVersion**](docs/ActivateTemplateVersion.md#activatetemplateversion) | **Post** /v3/templates/{TemplateId}/versions/{VersionId}/activate | Activate a transactional template version. -*CreateTemplate* | [**CreateTemplate**](docs/CreateTemplate.md#createtemplate) | **Post** /v3/templates | Create a transactional template. -*CreateTemplateVersion* | [**CreateTemplateVersion**](docs/CreateTemplateVersion.md#createtemplateversion) | **Post** /v3/templates/{TemplateId}/versions | Create a new transactional template version. -*DeleteTemplate* | [**DeleteTemplate**](docs/DeleteTemplate.md#deletetemplate) | **Delete** /v3/templates/{TemplateId} | Delete a template. -*DeleteTemplateVersion* | [**DeleteTemplateVersion**](docs/DeleteTemplateVersion.md#deletetemplateversion) | **Delete** /v3/templates/{TemplateId}/versions/{VersionId} | Delete a transactional template version. -*DuplicateTemplate* | [**DuplicateTemplate**](docs/DuplicateTemplate.md#duplicatetemplate) | **Post** /v3/templates/{TemplateId} | Duplicate a transactional template. -*GetTemplate* | [**GetTemplate**](docs/GetTemplate.md#gettemplate) | **Get** /v3/templates/{TemplateId} | Retrieve a single transactional template. -*GetTemplateVersion* | [**GetTemplateVersion**](docs/GetTemplateVersion.md#gettemplateversion) | **Get** /v3/templates/{TemplateId}/versions/{VersionId} | Retrieve a specific transactional template version. -*ListTemplate* | [**ListTemplate**](docs/ListTemplate.md#listtemplate) | **Get** /v3/templates | Retrieve paged transactional templates. -*UpdateTemplate* | [**UpdateTemplate**](docs/UpdateTemplate.md#updatetemplate) | **Patch** /v3/templates/{TemplateId} | Edit a transactional template. -*UpdateTemplateVersion* | [**UpdateTemplateVersion**](docs/UpdateTemplateVersion.md#updatetemplateversion) | **Patch** /v3/templates/{TemplateId}/versions/{VersionId} | Edit a transactional template version. - - -## Documentation For Models - - - [Active](Active.md) - - [Active1](Active1.md) - - [CreateTemplateRequest](CreateTemplateRequest.md) - - [DuplicateTemplateRequest](DuplicateTemplateRequest.md) - - [Editor](Editor.md) - - [Editor1](Editor1.md) - - [Generation](Generation.md) - - [Generation1](Generation1.md) - - [Generations](Generations.md) - - [ListTemplate200Response](ListTemplate200Response.md) - - [ListTemplate400Response](ListTemplate400Response.md) - - [ListTemplate400ResponseErrorsInner](ListTemplate400ResponseErrorsInner.md) - - [Metadata](Metadata.md) - - [TransactionalTemplate](TransactionalTemplate.md) - - [TransactionalTemplateVersionCreate](TransactionalTemplateVersionCreate.md) - - [TransactionalTemplateVersionOutput](TransactionalTemplateVersionOutput.md) - - [TransactionalTemplateWarning](TransactionalTemplateWarning.md) - - [TransactionalTemplatesTemplateLean](TransactionalTemplatesTemplateLean.md) - - [TransactionalTemplatesVersionOutputLean](TransactionalTemplatesVersionOutputLean.md) - - [UpdateTemplateRequest](UpdateTemplateRequest.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/templates/api_activate_template_version.go b/rest/api/v3/templates/api_activate_template_version.go deleted file mode 100644 index c1b70608..00000000 --- a/rest/api/v3/templates/api_activate_template_version.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type ActivateTemplateVersionParam struct { - // The ID of the original template - TemplateId *string `json:"template_id"` - // The ID of the template version - VersionId *string `json:"version_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ActivateTemplateVersionParam) SetTemplateId(TemplateId string) *ActivateTemplateVersionParam { - params.TemplateId = &TemplateId - return params -} -func (params *ActivateTemplateVersionParam) SetVersionId(VersionId string) *ActivateTemplateVersionParam { - params.VersionId = &VersionId - return params -} -func (params *ActivateTemplateVersionParam) SetOnbehalfof(Onbehalfof string) *ActivateTemplateVersionParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to activate a version of one of your templates.** -func (c *ApiService) ActivateTemplateVersion(params *ActivateTemplateVersionParam) (interface{}, error) { - path := "/v3/templates/{TemplateId}/versions/{VersionId}/activate" - if params != nil && params.TemplateId != nil { - path = strings.Replace(path, "{"+"TemplateId"+"}", *params.TemplateId, -1) - } - if params != nil && params.VersionId != nil { - path = strings.Replace(path, "{"+"VersionId"+"}", *params.VersionId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &TransactionalTemplateVersionOutput{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/templates/api_create_template.go b/rest/api/v3/templates/api_create_template.go deleted file mode 100644 index 2a686e8c..00000000 --- a/rest/api/v3/templates/api_create_template.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type CreateTemplateParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - CreateTemplateRequest *CreateTemplateRequest `json:"CreateTemplateRequest,omitempty"` -} - -func (params *CreateTemplateParam) SetOnbehalfof(Onbehalfof string) *CreateTemplateParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *CreateTemplateParam) SetCreateTemplateRequest(CreateTemplateRequest CreateTemplateRequest) *CreateTemplateParam { - params.CreateTemplateRequest = &CreateTemplateRequest - return params -} - -// **This endpoint allows you to create a transactional template.** -func (c *ApiService) CreateTemplate(params *CreateTemplateParam) (interface{}, error) { - path := "/v3/templates" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.CreateTemplateRequest != nil { - b, err := json.Marshal(*params.CreateTemplateRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &TransactionalTemplate{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/templates/api_create_template_version.go b/rest/api/v3/templates/api_create_template_version.go deleted file mode 100644 index f0b71f2c..00000000 --- a/rest/api/v3/templates/api_create_template_version.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type CreateTemplateVersionParam struct { - // - TemplateId *string `json:"template_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - TransactionalTemplateVersionCreate *TransactionalTemplateVersionCreate `json:"TransactionalTemplateVersionCreate,omitempty"` -} - -func (params *CreateTemplateVersionParam) SetTemplateId(TemplateId string) *CreateTemplateVersionParam { - params.TemplateId = &TemplateId - return params -} -func (params *CreateTemplateVersionParam) SetOnbehalfof(Onbehalfof string) *CreateTemplateVersionParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *CreateTemplateVersionParam) SetTransactionalTemplateVersionCreate(TransactionalTemplateVersionCreate TransactionalTemplateVersionCreate) *CreateTemplateVersionParam { - params.TransactionalTemplateVersionCreate = &TransactionalTemplateVersionCreate - return params -} - -// **This endpoint allows you to create a new version of a template.** -func (c *ApiService) CreateTemplateVersion(params *CreateTemplateVersionParam) (interface{}, error) { - path := "/v3/templates/{TemplateId}/versions" - if params != nil && params.TemplateId != nil { - path = strings.Replace(path, "{"+"TemplateId"+"}", *params.TemplateId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.TransactionalTemplateVersionCreate != nil { - b, err := json.Marshal(*params.TransactionalTemplateVersionCreate) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &TransactionalTemplateVersionOutput{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/templates/api_delete_template.go b/rest/api/v3/templates/api_delete_template.go deleted file mode 100644 index fc3c83f5..00000000 --- a/rest/api/v3/templates/api_delete_template.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteTemplateParam struct { - // - TemplateId *string `json:"template_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *DeleteTemplateParam) SetTemplateId(TemplateId string) *DeleteTemplateParam { - params.TemplateId = &TemplateId - return params -} -func (params *DeleteTemplateParam) SetOnbehalfof(Onbehalfof string) *DeleteTemplateParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to delete a transactional template.** -func (c *ApiService) DeleteTemplate(params *DeleteTemplateParam) (interface{}, error) { - path := "/v3/templates/{TemplateId}" - if params != nil && params.TemplateId != nil { - path = strings.Replace(path, "{"+"TemplateId"+"}", *params.TemplateId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/templates/api_delete_template_version.go b/rest/api/v3/templates/api_delete_template_version.go deleted file mode 100644 index cb6029dd..00000000 --- a/rest/api/v3/templates/api_delete_template_version.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "net/http" - "net/url" - - "strings" -) - -type DeleteTemplateVersionParam struct { - // The ID of the original template - TemplateId *string `json:"template_id"` - // The ID of the template version - VersionId *string `json:"version_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *DeleteTemplateVersionParam) SetTemplateId(TemplateId string) *DeleteTemplateVersionParam { - params.TemplateId = &TemplateId - return params -} -func (params *DeleteTemplateVersionParam) SetVersionId(VersionId string) *DeleteTemplateVersionParam { - params.VersionId = &VersionId - return params -} -func (params *DeleteTemplateVersionParam) SetOnbehalfof(Onbehalfof string) *DeleteTemplateVersionParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to delete a transactional template version.** -func (c *ApiService) DeleteTemplateVersion(params *DeleteTemplateVersionParam) (interface{}, error) { - path := "/v3/templates/{TemplateId}/versions/{VersionId}" - if params != nil && params.TemplateId != nil { - path = strings.Replace(path, "{"+"TemplateId"+"}", *params.TemplateId, -1) - } - if params != nil && params.VersionId != nil { - path = strings.Replace(path, "{"+"VersionId"+"}", *params.VersionId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/templates/api_duplicate_template.go b/rest/api/v3/templates/api_duplicate_template.go deleted file mode 100644 index 4158f613..00000000 --- a/rest/api/v3/templates/api_duplicate_template.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DuplicateTemplateParam struct { - // - TemplateId *string `json:"template_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - DuplicateTemplateRequest *DuplicateTemplateRequest `json:"DuplicateTemplateRequest,omitempty"` -} - -func (params *DuplicateTemplateParam) SetTemplateId(TemplateId string) *DuplicateTemplateParam { - params.TemplateId = &TemplateId - return params -} -func (params *DuplicateTemplateParam) SetOnbehalfof(Onbehalfof string) *DuplicateTemplateParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *DuplicateTemplateParam) SetDuplicateTemplateRequest(DuplicateTemplateRequest DuplicateTemplateRequest) *DuplicateTemplateParam { - params.DuplicateTemplateRequest = &DuplicateTemplateRequest - return params -} - -// **This endpoint allows you to duplicate a transactional template.** -func (c *ApiService) DuplicateTemplate(params *DuplicateTemplateParam) (interface{}, error) { - path := "/v3/templates/{TemplateId}" - if params != nil && params.TemplateId != nil { - path = strings.Replace(path, "{"+"TemplateId"+"}", *params.TemplateId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.DuplicateTemplateRequest != nil { - b, err := json.Marshal(*params.DuplicateTemplateRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &TransactionalTemplate{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/templates/api_get_template.go b/rest/api/v3/templates/api_get_template.go deleted file mode 100644 index e9de9de8..00000000 --- a/rest/api/v3/templates/api_get_template.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetTemplateParam struct { - // - TemplateId *string `json:"template_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetTemplateParam) SetTemplateId(TemplateId string) *GetTemplateParam { - params.TemplateId = &TemplateId - return params -} -func (params *GetTemplateParam) SetOnbehalfof(Onbehalfof string) *GetTemplateParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a single transactional template.** -func (c *ApiService) GetTemplate(params *GetTemplateParam) (interface{}, error) { - path := "/v3/templates/{TemplateId}" - if params != nil && params.TemplateId != nil { - path = strings.Replace(path, "{"+"TemplateId"+"}", *params.TemplateId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &TransactionalTemplate{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/templates/api_get_template_version.go b/rest/api/v3/templates/api_get_template_version.go deleted file mode 100644 index 4aceeda3..00000000 --- a/rest/api/v3/templates/api_get_template_version.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetTemplateVersionParam struct { - // The ID of the original template - TemplateId *string `json:"template_id"` - // The ID of the template version - VersionId *string `json:"version_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetTemplateVersionParam) SetTemplateId(TemplateId string) *GetTemplateVersionParam { - params.TemplateId = &TemplateId - return params -} -func (params *GetTemplateVersionParam) SetVersionId(VersionId string) *GetTemplateVersionParam { - params.VersionId = &VersionId - return params -} -func (params *GetTemplateVersionParam) SetOnbehalfof(Onbehalfof string) *GetTemplateVersionParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a specific version of a template.** -func (c *ApiService) GetTemplateVersion(params *GetTemplateVersionParam) (interface{}, error) { - path := "/v3/templates/{TemplateId}/versions/{VersionId}" - if params != nil && params.TemplateId != nil { - path = strings.Replace(path, "{"+"TemplateId"+"}", *params.TemplateId, -1) - } - if params != nil && params.VersionId != nil { - path = strings.Replace(path, "{"+"VersionId"+"}", *params.VersionId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &TransactionalTemplateVersionOutput{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/templates/api_list_template.go b/rest/api/v3/templates/api_list_template.go deleted file mode 100644 index 2003a0af..00000000 --- a/rest/api/v3/templates/api_list_template.go +++ /dev/null @@ -1,96 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListTemplateParam struct { - // The number of templates to be returned in each page of results - PageSize *float32 `json:"page_size"` - // Comma-delimited list specifying which generations of templates to return. Options are `legacy`, `dynamic` or `legacy,dynamic`. - Generations *Generations `json:"generations,omitempty"` - // A token corresponding to a specific page of results, as provided by metadata - PageToken *string `json:"page_token,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListTemplateParam) SetPageSize(PageSize float32) *ListTemplateParam { - params.PageSize = &PageSize - return params -} -func (params *ListTemplateParam) SetGenerations(Generations Generations) *ListTemplateParam { - params.Generations = &Generations - return params -} -func (params *ListTemplateParam) SetPageToken(PageToken string) *ListTemplateParam { - params.PageToken = &PageToken - return params -} -func (params *ListTemplateParam) SetOnbehalfof(Onbehalfof string) *ListTemplateParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve all transactional templates.** -func (c *ApiService) ListTemplate(params *ListTemplateParam) (interface{}, error) { - path := "/v3/templates" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.PageSize != nil { - data.Set("page_size", fmt.Sprint(*params.PageSize)) - } - if params != nil && params.Generations != nil { - data.Set("generations", fmt.Sprint(*params.Generations)) - } - if params != nil && params.PageToken != nil { - data.Set("page_token", *params.PageToken) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListTemplate200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &ListTemplate400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/templates/api_service.go b/rest/api/v3/templates/api_service.go deleted file mode 100644 index 3716cd28..00000000 --- a/rest/api/v3/templates/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/templates/api_update_template.go b/rest/api/v3/templates/api_update_template.go deleted file mode 100644 index 430d00fc..00000000 --- a/rest/api/v3/templates/api_update_template.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type UpdateTemplateParam struct { - // - TemplateId *string `json:"template_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - UpdateTemplateRequest *UpdateTemplateRequest `json:"UpdateTemplateRequest,omitempty"` -} - -func (params *UpdateTemplateParam) SetTemplateId(TemplateId string) *UpdateTemplateParam { - params.TemplateId = &TemplateId - return params -} -func (params *UpdateTemplateParam) SetOnbehalfof(Onbehalfof string) *UpdateTemplateParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateTemplateParam) SetUpdateTemplateRequest(UpdateTemplateRequest UpdateTemplateRequest) *UpdateTemplateParam { - params.UpdateTemplateRequest = &UpdateTemplateRequest - return params -} - -// **This endpoint allows you to edit the name of a transactional template.** To edit the template itself, [create a new transactional template version](https://docs.sendgrid.com/api-reference/transactional-templates-versions/create-a-new-transactional-template-version). -func (c *ApiService) UpdateTemplate(params *UpdateTemplateParam) (interface{}, error) { - path := "/v3/templates/{TemplateId}" - if params != nil && params.TemplateId != nil { - path = strings.Replace(path, "{"+"TemplateId"+"}", *params.TemplateId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateTemplateRequest != nil { - b, err := json.Marshal(*params.UpdateTemplateRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &TransactionalTemplate{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/templates/api_update_template_version.go b/rest/api/v3/templates/api_update_template_version.go deleted file mode 100644 index 6ff3eeac..00000000 --- a/rest/api/v3/templates/api_update_template_version.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type UpdateTemplateVersionParam struct { - // The ID of the original template - TemplateId *string `json:"template_id"` - // The ID of the template version - VersionId *string `json:"version_id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - TransactionalTemplateVersionCreate *TransactionalTemplateVersionCreate `json:"TransactionalTemplateVersionCreate,omitempty"` -} - -func (params *UpdateTemplateVersionParam) SetTemplateId(TemplateId string) *UpdateTemplateVersionParam { - params.TemplateId = &TemplateId - return params -} -func (params *UpdateTemplateVersionParam) SetVersionId(VersionId string) *UpdateTemplateVersionParam { - params.VersionId = &VersionId - return params -} -func (params *UpdateTemplateVersionParam) SetOnbehalfof(Onbehalfof string) *UpdateTemplateVersionParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateTemplateVersionParam) SetTransactionalTemplateVersionCreate(TransactionalTemplateVersionCreate TransactionalTemplateVersionCreate) *UpdateTemplateVersionParam { - params.TransactionalTemplateVersionCreate = &TransactionalTemplateVersionCreate - return params -} - -// **This endpoint allows you to edit the content of your template version.** -func (c *ApiService) UpdateTemplateVersion(params *UpdateTemplateVersionParam) (interface{}, error) { - path := "/v3/templates/{TemplateId}/versions/{VersionId}" - if params != nil && params.TemplateId != nil { - path = strings.Replace(path, "{"+"TemplateId"+"}", *params.TemplateId, -1) - } - if params != nil && params.VersionId != nil { - path = strings.Replace(path, "{"+"VersionId"+"}", *params.VersionId, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.TransactionalTemplateVersionCreate != nil { - b, err := json.Marshal(*params.TransactionalTemplateVersionCreate) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &TransactionalTemplateVersionOutput{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/templates/docs/ActivateTemplateVersion.md b/rest/api/v3/templates/docs/ActivateTemplateVersion.md deleted file mode 100644 index 501c4c70..00000000 --- a/rest/api/v3/templates/docs/ActivateTemplateVersion.md +++ /dev/null @@ -1,53 +0,0 @@ -# ActivateTemplateVersion - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ActivateTemplateVersion**](ActivateTemplateVersion.md#ActivateTemplateVersion) | **Post** /v3/templates/{TemplateId}/versions/{VersionId}/activate | Activate a transactional template version. - - - -## ActivateTemplateVersion - -> TransactionalTemplateVersionOutput ActivateTemplateVersion(ctx, TemplateIdVersionIdoptional) - -Activate a transactional template version. - -**This endpoint allows you to activate a version of one of your templates.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**TemplateId** | **string** | The ID of the original template -**VersionId** | **string** | The ID of the template version - -### Other Parameters - -Other parameters are passed through a pointer to a ActivateTemplateVersionParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**TransactionalTemplateVersionOutput**](TransactionalTemplateVersionOutput.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/templates/docs/Active.md b/rest/api/v3/templates/docs/Active.md deleted file mode 100644 index d69716ca..00000000 --- a/rest/api/v3/templates/docs/Active.md +++ /dev/null @@ -1,13 +0,0 @@ -# Active - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**_0** | int32 | (value: `0`) -**_1** | int32 | (value: `1`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/templates/docs/Active1.md b/rest/api/v3/templates/docs/Active1.md deleted file mode 100644 index 4b05d8e0..00000000 --- a/rest/api/v3/templates/docs/Active1.md +++ /dev/null @@ -1,13 +0,0 @@ -# Active1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**_0** | int32 | (value: `0`) -**_1** | int32 | (value: `1`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/templates/docs/CreateTemplate.md b/rest/api/v3/templates/docs/CreateTemplate.md deleted file mode 100644 index ae22f59f..00000000 --- a/rest/api/v3/templates/docs/CreateTemplate.md +++ /dev/null @@ -1,49 +0,0 @@ -# CreateTemplate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateTemplate**](CreateTemplate.md#CreateTemplate) | **Post** /v3/templates | Create a transactional template. - - - -## CreateTemplate - -> TransactionalTemplate CreateTemplate(ctx, optional) - -Create a transactional template. - -**This endpoint allows you to create a transactional template.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateTemplateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**CreateTemplateRequest** | [**CreateTemplateRequest**](CreateTemplateRequest.md) | - -### Return type - -[**TransactionalTemplate**](TransactionalTemplate.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/templates/docs/CreateTemplateRequest.md b/rest/api/v3/templates/docs/CreateTemplateRequest.md deleted file mode 100644 index 3257102d..00000000 --- a/rest/api/v3/templates/docs/CreateTemplateRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# CreateTemplateRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name for the new transactional template. | -**Generation** | [**Generation**](Generation.md) | Defines whether the template supports dynamic replacement. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/templates/docs/CreateTemplateVersion.md b/rest/api/v3/templates/docs/CreateTemplateVersion.md deleted file mode 100644 index e5ba2395..00000000 --- a/rest/api/v3/templates/docs/CreateTemplateVersion.md +++ /dev/null @@ -1,53 +0,0 @@ -# CreateTemplateVersion - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateTemplateVersion**](CreateTemplateVersion.md#CreateTemplateVersion) | **Post** /v3/templates/{TemplateId}/versions | Create a new transactional template version. - - - -## CreateTemplateVersion - -> TransactionalTemplateVersionOutput CreateTemplateVersion(ctx, TemplateIdoptional) - -Create a new transactional template version. - -**This endpoint allows you to create a new version of a template.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**TemplateId** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a CreateTemplateVersionParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**TransactionalTemplateVersionCreate** | [**TransactionalTemplateVersionCreate**](TransactionalTemplateVersionCreate.md) | - -### Return type - -[**TransactionalTemplateVersionOutput**](TransactionalTemplateVersionOutput.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/templates/docs/DeleteTemplate.md b/rest/api/v3/templates/docs/DeleteTemplate.md deleted file mode 100644 index fa5ca8f0..00000000 --- a/rest/api/v3/templates/docs/DeleteTemplate.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeleteTemplate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteTemplate**](DeleteTemplate.md#DeleteTemplate) | **Delete** /v3/templates/{TemplateId} | Delete a template. - - - -## DeleteTemplate - -> map[string]interface{} DeleteTemplate(ctx, TemplateIdoptional) - -Delete a template. - -**This endpoint allows you to delete a transactional template.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**TemplateId** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteTemplateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/templates/docs/DeleteTemplateVersion.md b/rest/api/v3/templates/docs/DeleteTemplateVersion.md deleted file mode 100644 index a0a2bf5c..00000000 --- a/rest/api/v3/templates/docs/DeleteTemplateVersion.md +++ /dev/null @@ -1,53 +0,0 @@ -# DeleteTemplateVersion - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteTemplateVersion**](DeleteTemplateVersion.md#DeleteTemplateVersion) | **Delete** /v3/templates/{TemplateId}/versions/{VersionId} | Delete a transactional template version. - - - -## DeleteTemplateVersion - -> DeleteTemplateVersion(ctx, TemplateIdVersionIdoptional) - -Delete a transactional template version. - -**This endpoint allows you to delete a transactional template version.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**TemplateId** | **string** | The ID of the original template -**VersionId** | **string** | The ID of the template version - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteTemplateVersionParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/templates/docs/DuplicateTemplate.md b/rest/api/v3/templates/docs/DuplicateTemplate.md deleted file mode 100644 index b1ff510b..00000000 --- a/rest/api/v3/templates/docs/DuplicateTemplate.md +++ /dev/null @@ -1,53 +0,0 @@ -# DuplicateTemplate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DuplicateTemplate**](DuplicateTemplate.md#DuplicateTemplate) | **Post** /v3/templates/{TemplateId} | Duplicate a transactional template. - - - -## DuplicateTemplate - -> TransactionalTemplate DuplicateTemplate(ctx, TemplateIdoptional) - -Duplicate a transactional template. - -**This endpoint allows you to duplicate a transactional template.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**TemplateId** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a DuplicateTemplateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**DuplicateTemplateRequest** | [**DuplicateTemplateRequest**](DuplicateTemplateRequest.md) | - -### Return type - -[**TransactionalTemplate**](TransactionalTemplate.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/templates/docs/DuplicateTemplateRequest.md b/rest/api/v3/templates/docs/DuplicateTemplateRequest.md deleted file mode 100644 index 02a361b6..00000000 --- a/rest/api/v3/templates/docs/DuplicateTemplateRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# DuplicateTemplateRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name for the new transactional template. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/templates/docs/Editor.md b/rest/api/v3/templates/docs/Editor.md deleted file mode 100644 index 9d170841..00000000 --- a/rest/api/v3/templates/docs/Editor.md +++ /dev/null @@ -1,13 +0,0 @@ -# Editor - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**CODE** | string | (value: `"code"`) -**DESIGN** | string | (value: `"design"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/templates/docs/Editor1.md b/rest/api/v3/templates/docs/Editor1.md deleted file mode 100644 index 2ddc5d89..00000000 --- a/rest/api/v3/templates/docs/Editor1.md +++ /dev/null @@ -1,13 +0,0 @@ -# Editor1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**CODE** | string | (value: `"code"`) -**DESIGN** | string | (value: `"design"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/templates/docs/Generation.md b/rest/api/v3/templates/docs/Generation.md deleted file mode 100644 index 04e09451..00000000 --- a/rest/api/v3/templates/docs/Generation.md +++ /dev/null @@ -1,13 +0,0 @@ -# Generation - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**LEGACY** | string | (value: `"legacy"`) -**DYNAMIC** | string | (value: `"dynamic"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/templates/docs/Generation1.md b/rest/api/v3/templates/docs/Generation1.md deleted file mode 100644 index 7b1f26b0..00000000 --- a/rest/api/v3/templates/docs/Generation1.md +++ /dev/null @@ -1,13 +0,0 @@ -# Generation1 - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**LEGACY** | string | (value: `"legacy"`) -**DYNAMIC** | string | (value: `"dynamic"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/templates/docs/Generations.md b/rest/api/v3/templates/docs/Generations.md deleted file mode 100644 index 61e985f0..00000000 --- a/rest/api/v3/templates/docs/Generations.md +++ /dev/null @@ -1,14 +0,0 @@ -# Generations - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**LEGACY** | string | (value: `"legacy"`) -**DYNAMIC** | string | (value: `"dynamic"`) -**LEGACYDYNAMIC** | string | (value: `"legacy,dynamic"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/templates/docs/GetTemplate.md b/rest/api/v3/templates/docs/GetTemplate.md deleted file mode 100644 index 6deed867..00000000 --- a/rest/api/v3/templates/docs/GetTemplate.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetTemplate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetTemplate**](GetTemplate.md#GetTemplate) | **Get** /v3/templates/{TemplateId} | Retrieve a single transactional template. - - - -## GetTemplate - -> TransactionalTemplate GetTemplate(ctx, TemplateIdoptional) - -Retrieve a single transactional template. - -**This endpoint allows you to retrieve a single transactional template.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**TemplateId** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a GetTemplateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**TransactionalTemplate**](TransactionalTemplate.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/templates/docs/GetTemplateVersion.md b/rest/api/v3/templates/docs/GetTemplateVersion.md deleted file mode 100644 index 8beed210..00000000 --- a/rest/api/v3/templates/docs/GetTemplateVersion.md +++ /dev/null @@ -1,53 +0,0 @@ -# GetTemplateVersion - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetTemplateVersion**](GetTemplateVersion.md#GetTemplateVersion) | **Get** /v3/templates/{TemplateId}/versions/{VersionId} | Retrieve a specific transactional template version. - - - -## GetTemplateVersion - -> TransactionalTemplateVersionOutput GetTemplateVersion(ctx, TemplateIdVersionIdoptional) - -Retrieve a specific transactional template version. - -**This endpoint allows you to retrieve a specific version of a template.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**TemplateId** | **string** | The ID of the original template -**VersionId** | **string** | The ID of the template version - -### Other Parameters - -Other parameters are passed through a pointer to a GetTemplateVersionParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**TransactionalTemplateVersionOutput**](TransactionalTemplateVersionOutput.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/templates/docs/ListTemplate.md b/rest/api/v3/templates/docs/ListTemplate.md deleted file mode 100644 index f6af7acd..00000000 --- a/rest/api/v3/templates/docs/ListTemplate.md +++ /dev/null @@ -1,50 +0,0 @@ -# ListTemplate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListTemplate**](ListTemplate.md#ListTemplate) | **Get** /v3/templates | Retrieve paged transactional templates. - - - -## ListTemplate - -> ListTemplate200Response ListTemplate(ctx, PageSizeoptional) - -Retrieve paged transactional templates. - -**This endpoint allows you to retrieve all transactional templates.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListTemplateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Generations** | [**Generations**](GenerationsGenerations.md) | Comma-delimited list specifying which generations of templates to return. Options are `legacy`, `dynamic` or `legacy,dynamic`. -**PageToken** | **string** | A token corresponding to a specific page of results, as provided by metadata -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListTemplate200Response**](ListTemplate200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/templates/docs/ListTemplate200Response.md b/rest/api/v3/templates/docs/ListTemplate200Response.md deleted file mode 100644 index 5ec1a162..00000000 --- a/rest/api/v3/templates/docs/ListTemplate200Response.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListTemplate200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]TransactionalTemplatesTemplateLean**](TransactionalTemplatesTemplateLean.md) | |[optional] -**Metadata** | [**Metadata**](Metadata.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/templates/docs/ListTemplate400Response.md b/rest/api/v3/templates/docs/ListTemplate400Response.md deleted file mode 100644 index 006916af..00000000 --- a/rest/api/v3/templates/docs/ListTemplate400Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListTemplate400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ListTemplate400ResponseErrorsInner**](ListTemplate400ResponseErrorsInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/templates/docs/ListTemplate400ResponseErrorsInner.md b/rest/api/v3/templates/docs/ListTemplate400ResponseErrorsInner.md deleted file mode 100644 index a1aaa499..00000000 --- a/rest/api/v3/templates/docs/ListTemplate400ResponseErrorsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListTemplate400ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | |[optional] -**ErrorId** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/templates/docs/Metadata.md b/rest/api/v3/templates/docs/Metadata.md deleted file mode 100644 index 6121300c..00000000 --- a/rest/api/v3/templates/docs/Metadata.md +++ /dev/null @@ -1,14 +0,0 @@ -# Metadata - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Prev** | **string** | |[optional] -**Self** | **string** | |[optional] -**Next** | **string** | |[optional] -**Count** | **int32** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/templates/docs/TransactionalTemplate.md b/rest/api/v3/templates/docs/TransactionalTemplate.md deleted file mode 100644 index 9d4b55ca..00000000 --- a/rest/api/v3/templates/docs/TransactionalTemplate.md +++ /dev/null @@ -1,16 +0,0 @@ -# TransactionalTemplate - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | The ID of the transactional template. | -**Name** | **string** | The name for the transactional template. | -**Generation** | [**Generation1**](Generation1.md) | Defines the generation of the template. | -**UpdatedAt** | **string** | The date and time that this transactional template version was updated. | -**Versions** | [**[]TransactionalTemplatesVersionOutputLean**](TransactionalTemplatesVersionOutputLean.md) | The different versions of this transactional template. |[optional] -**Warning** | [**TransactionalTemplateWarning**](TransactionalTemplateWarning.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/templates/docs/TransactionalTemplateVersionCreate.md b/rest/api/v3/templates/docs/TransactionalTemplateVersionCreate.md deleted file mode 100644 index 958d7c58..00000000 --- a/rest/api/v3/templates/docs/TransactionalTemplateVersionCreate.md +++ /dev/null @@ -1,18 +0,0 @@ -# TransactionalTemplateVersionCreate - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Active** | [**Active**](Active.md) | Set the version as the active version associated with the template (0 is inactive, 1 is active). Only one version of a template can be active. The first version created for a template will automatically be set to Active. |[optional] -**Name** | **string** | Name of the transactional template version. | -**HtmlContent** | **string** | The HTML content of the version. Maximum of 1048576 bytes allowed. |[optional] -**PlainContent** | **string** | Text/plain content of the transactional template version. Maximum of 1048576 bytes allowed. |[optional] [default to ""] -**GeneratePlainContent** | **bool** | If true, plain_content is always generated from html_content. If false, plain_content is not altered. |[optional] [default to true] -**Subject** | **string** | Subject of the new transactional template version. | -**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] -**TestData** | **string** | For dynamic templates only, the mock json data that will be used for template preview and test sends. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/templates/docs/TransactionalTemplateVersionOutput.md b/rest/api/v3/templates/docs/TransactionalTemplateVersionOutput.md deleted file mode 100644 index b2b0e299..00000000 --- a/rest/api/v3/templates/docs/TransactionalTemplateVersionOutput.md +++ /dev/null @@ -1,23 +0,0 @@ -# TransactionalTemplateVersionOutput - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Warnings** | [**[]TransactionalTemplateWarning**](TransactionalTemplateWarning.md) | |[optional] -**Active** | [**Active1**](Active1.md) | Set the version as the active version associated with the template. Only one version of a template can be active. The first version created for a template will automatically be set to Active. |[optional] -**Name** | **string** | Name of the transactional template version. | -**HtmlContent** | **string** | The HTML content of the Design. |[optional] -**PlainContent** | **string** | Plain text content of the Design. |[optional] -**GeneratePlainContent** | **bool** | If true, plain_content is always generated from html_content. If false, plain_content is not altered. |[optional] [default to true] -**Subject** | **string** | Subject of the new transactional template version. | -**Editor** | [**Editor1**](Editor1.md) | The editor used in the UI. |[optional] -**TestData** | **string** | For dynamic templates only, the mock json data that will be used for template preview and test sends. |[optional] -**Id** | **string** | ID of the transactional template version. |[optional] -**TemplateId** | **string** | ID of the transactional template. |[optional] -**UpdatedAt** | **string** | The date and time that this transactional template version was updated. |[optional] -**ThumbnailUrl** | **string** | A Thumbnail preview of the template's html content. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/templates/docs/TransactionalTemplateWarning.md b/rest/api/v3/templates/docs/TransactionalTemplateWarning.md deleted file mode 100644 index 0b22b1bd..00000000 --- a/rest/api/v3/templates/docs/TransactionalTemplateWarning.md +++ /dev/null @@ -1,11 +0,0 @@ -# TransactionalTemplateWarning - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | Warning message for the user |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/templates/docs/TransactionalTemplatesTemplateLean.md b/rest/api/v3/templates/docs/TransactionalTemplatesTemplateLean.md deleted file mode 100644 index 631f5def..00000000 --- a/rest/api/v3/templates/docs/TransactionalTemplatesTemplateLean.md +++ /dev/null @@ -1,15 +0,0 @@ -# TransactionalTemplatesTemplateLean - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | The ID of the transactional template. | -**Name** | **string** | The name for the transactional template. | -**Generation** | [**Generation1**](Generation1.md) | Defines the generation of the template. | -**UpdatedAt** | **string** | The date and time that this transactional template version was updated. | -**Versions** | [**[]TransactionalTemplatesVersionOutputLean**](TransactionalTemplatesVersionOutputLean.md) | The different versions of this transactional template. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/templates/docs/TransactionalTemplatesVersionOutputLean.md b/rest/api/v3/templates/docs/TransactionalTemplatesVersionOutputLean.md deleted file mode 100644 index 0462c525..00000000 --- a/rest/api/v3/templates/docs/TransactionalTemplatesVersionOutputLean.md +++ /dev/null @@ -1,21 +0,0 @@ -# TransactionalTemplatesVersionOutputLean - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | ID of the transactional template version. |[optional] -**TemplateId** | **string** | ID of the transactional template. |[optional] -**Active** | [**Active1**](Active1.md) | Set the version as the active version associated with the template. Only one version of a template can be active. The first version created for a template will automatically be set to Active. |[optional] -**Name** | **string** | Name of the transactional template version. |[optional] -**Subject** | **string** | Subject of the new transactional template version. |[optional] -**UpdatedAt** | **string** | The date and time that this transactional template version was updated. |[optional] -**GeneratePlainContent** | **bool** | If true, plain_content is always generated from html_content. If false, plain_content is not altered. |[optional] [default to true] -**HtmlContent** | **string** | The HTML content of the Design. |[optional] -**PlainContent** | **string** | Plain text content of the Design. |[optional] -**Editor** | [**Editor1**](Editor1.md) | The editor used in the UI. |[optional] -**ThumbnailUrl** | **string** | A Thumbnail preview of the template's html content. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/templates/docs/UpdateTemplate.md b/rest/api/v3/templates/docs/UpdateTemplate.md deleted file mode 100644 index ca71abfb..00000000 --- a/rest/api/v3/templates/docs/UpdateTemplate.md +++ /dev/null @@ -1,53 +0,0 @@ -# UpdateTemplate - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateTemplate**](UpdateTemplate.md#UpdateTemplate) | **Patch** /v3/templates/{TemplateId} | Edit a transactional template. - - - -## UpdateTemplate - -> TransactionalTemplate UpdateTemplate(ctx, TemplateIdoptional) - -Edit a transactional template. - -**This endpoint allows you to edit the name of a transactional template.** To edit the template itself, [create a new transactional template version](https://docs.sendgrid.com/api-reference/transactional-templates-versions/create-a-new-transactional-template-version). - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**TemplateId** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateTemplateParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**UpdateTemplateRequest** | [**UpdateTemplateRequest**](UpdateTemplateRequest.md) | - -### Return type - -[**TransactionalTemplate**](TransactionalTemplate.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/templates/docs/UpdateTemplateRequest.md b/rest/api/v3/templates/docs/UpdateTemplateRequest.md deleted file mode 100644 index beb9d891..00000000 --- a/rest/api/v3/templates/docs/UpdateTemplateRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateTemplateRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of the transactional template. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/templates/docs/UpdateTemplateVersion.md b/rest/api/v3/templates/docs/UpdateTemplateVersion.md deleted file mode 100644 index 79ab9221..00000000 --- a/rest/api/v3/templates/docs/UpdateTemplateVersion.md +++ /dev/null @@ -1,54 +0,0 @@ -# UpdateTemplateVersion - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateTemplateVersion**](UpdateTemplateVersion.md#UpdateTemplateVersion) | **Patch** /v3/templates/{TemplateId}/versions/{VersionId} | Edit a transactional template version. - - - -## UpdateTemplateVersion - -> TransactionalTemplateVersionOutput UpdateTemplateVersion(ctx, TemplateIdVersionIdoptional) - -Edit a transactional template version. - -**This endpoint allows you to edit the content of your template version.** - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**TemplateId** | **string** | The ID of the original template -**VersionId** | **string** | The ID of the template version - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateTemplateVersionParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**TransactionalTemplateVersionCreate** | [**TransactionalTemplateVersionCreate**](TransactionalTemplateVersionCreate.md) | - -### Return type - -[**TransactionalTemplateVersionOutput**](TransactionalTemplateVersionOutput.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/templates/model_active.go b/rest/api/v3/templates/model_active.go deleted file mode 100644 index f2cf3f4c..00000000 --- a/rest/api/v3/templates/model_active.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Active the model 'Active' -type Active int32 - -// List of Active -const ( - ACTIVE__0 Active = 0 - ACTIVE__1 Active = 1 -) diff --git a/rest/api/v3/templates/model_active1.go b/rest/api/v3/templates/model_active1.go deleted file mode 100644 index 063d82be..00000000 --- a/rest/api/v3/templates/model_active1.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Active1 the model 'Active1' -type Active1 int32 - -// List of Active1 -const ( - ACTIVE1__0 Active1 = 0 - ACTIVE1__1 Active1 = 1 -) diff --git a/rest/api/v3/templates/model_create_template_request.go b/rest/api/v3/templates/model_create_template_request.go deleted file mode 100644 index d2dcd300..00000000 --- a/rest/api/v3/templates/model_create_template_request.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateTemplateRequest struct for CreateTemplateRequest -type CreateTemplateRequest struct { - // The name for the new transactional template. - Name string `json:"name"` - // Defines whether the template supports dynamic replacement. - Generation *Generation `json:"generation,omitempty"` -} diff --git a/rest/api/v3/templates/model_duplicate_template_request.go b/rest/api/v3/templates/model_duplicate_template_request.go deleted file mode 100644 index 7b69dd8e..00000000 --- a/rest/api/v3/templates/model_duplicate_template_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DuplicateTemplateRequest struct for DuplicateTemplateRequest -type DuplicateTemplateRequest struct { - // The name for the new transactional template. - Name *string `json:"name,omitempty"` -} diff --git a/rest/api/v3/templates/model_editor.go b/rest/api/v3/templates/model_editor.go deleted file mode 100644 index e4bfb1be..00000000 --- a/rest/api/v3/templates/model_editor.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Editor the model 'Editor' -type Editor string - -// List of Editor -const ( - EDITOR_CODE Editor = "code" - EDITOR_DESIGN Editor = "design" -) diff --git a/rest/api/v3/templates/model_editor1.go b/rest/api/v3/templates/model_editor1.go deleted file mode 100644 index 6fabeaf4..00000000 --- a/rest/api/v3/templates/model_editor1.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Editor1 the model 'Editor1' -type Editor1 string - -// List of Editor1 -const ( - EDITOR1_CODE Editor1 = "code" - EDITOR1_DESIGN Editor1 = "design" -) diff --git a/rest/api/v3/templates/model_generation.go b/rest/api/v3/templates/model_generation.go deleted file mode 100644 index 7056829d..00000000 --- a/rest/api/v3/templates/model_generation.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Generation the model 'Generation' -type Generation string - -// List of Generation -const ( - GENERATION_LEGACY Generation = "legacy" - GENERATION_DYNAMIC Generation = "dynamic" -) diff --git a/rest/api/v3/templates/model_generation1.go b/rest/api/v3/templates/model_generation1.go deleted file mode 100644 index 49ece636..00000000 --- a/rest/api/v3/templates/model_generation1.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Generation1 the model 'Generation1' -type Generation1 string - -// List of Generation1 -const ( - GENERATION1_LEGACY Generation1 = "legacy" - GENERATION1_DYNAMIC Generation1 = "dynamic" -) diff --git a/rest/api/v3/templates/model_generations.go b/rest/api/v3/templates/model_generations.go deleted file mode 100644 index 1c57da46..00000000 --- a/rest/api/v3/templates/model_generations.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Generations the model 'Generations' -type Generations string - -// List of Generations -const ( - GENERATIONS_LEGACY Generations = "legacy" - GENERATIONS_DYNAMIC Generations = "dynamic" - GENERATIONS_LEGACYDYNAMIC Generations = "legacy,dynamic" -) diff --git a/rest/api/v3/templates/model_list_template_200_response.go b/rest/api/v3/templates/model_list_template_200_response.go deleted file mode 100644 index 6cb5f0a0..00000000 --- a/rest/api/v3/templates/model_list_template_200_response.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListTemplate200Response struct for ListTemplate200Response -type ListTemplate200Response struct { - // - Result *[]TransactionalTemplatesTemplateLean `json:"result,omitempty"` - Metadata *Metadata `json:"_metadata,omitempty"` -} diff --git a/rest/api/v3/templates/model_list_template_400_response.go b/rest/api/v3/templates/model_list_template_400_response.go deleted file mode 100644 index b2834d68..00000000 --- a/rest/api/v3/templates/model_list_template_400_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListTemplate400Response struct for ListTemplate400Response -type ListTemplate400Response struct { - Errors *[]ListTemplate400ResponseErrorsInner `json:"errors,omitempty"` -} diff --git a/rest/api/v3/templates/model_list_template_400_response_errors_inner.go b/rest/api/v3/templates/model_list_template_400_response_errors_inner.go deleted file mode 100644 index dd133220..00000000 --- a/rest/api/v3/templates/model_list_template_400_response_errors_inner.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListTemplate400ResponseErrorsInner struct for ListTemplate400ResponseErrorsInner -type ListTemplate400ResponseErrorsInner struct { - Message *string `json:"message,omitempty"` - ErrorId *string `json:"error_id,omitempty"` -} diff --git a/rest/api/v3/templates/model_metadata.go b/rest/api/v3/templates/model_metadata.go deleted file mode 100644 index 20681118..00000000 --- a/rest/api/v3/templates/model_metadata.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Metadata struct for Metadata -type Metadata struct { - Prev *string `json:"prev,omitempty"` - Self *string `json:"self,omitempty"` - Next *string `json:"next,omitempty"` - Count *int32 `json:"count,omitempty"` -} diff --git a/rest/api/v3/templates/model_transactional_template.go b/rest/api/v3/templates/model_transactional_template.go deleted file mode 100644 index 2298d217..00000000 --- a/rest/api/v3/templates/model_transactional_template.go +++ /dev/null @@ -1,29 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// TransactionalTemplate struct for TransactionalTemplate -type TransactionalTemplate struct { - // The ID of the transactional template. - Id string `json:"id"` - // The name for the transactional template. - Name string `json:"name"` - // Defines the generation of the template. - Generation Generation1 `json:"generation"` - // The date and time that this transactional template version was updated. - UpdatedAt string `json:"updated_at"` - // The different versions of this transactional template. - Versions *[]TransactionalTemplatesVersionOutputLean `json:"versions,omitempty"` - Warning *TransactionalTemplateWarning `json:"warning,omitempty"` -} diff --git a/rest/api/v3/templates/model_transactional_template_version_create.go b/rest/api/v3/templates/model_transactional_template_version_create.go deleted file mode 100644 index 876459d7..00000000 --- a/rest/api/v3/templates/model_transactional_template_version_create.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// TransactionalTemplateVersionCreate struct for TransactionalTemplateVersionCreate -type TransactionalTemplateVersionCreate struct { - // Set the version as the active version associated with the template (0 is inactive, 1 is active). Only one version of a template can be active. The first version created for a template will automatically be set to Active. - Active *Active `json:"active,omitempty"` - // Name of the transactional template version. - Name string `json:"name"` - // The HTML content of the version. Maximum of 1048576 bytes allowed. - HtmlContent *string `json:"html_content,omitempty"` - // Text/plain content of the transactional template version. Maximum of 1048576 bytes allowed. - PlainContent *string `json:"plain_content,omitempty"` - // If true, plain_content is always generated from html_content. If false, plain_content is not altered. - GeneratePlainContent *bool `json:"generate_plain_content,omitempty"` - // Subject of the new transactional template version. - Subject string `json:"subject"` - // The editor used in the UI. - Editor *Editor `json:"editor,omitempty"` - // For dynamic templates only, the mock json data that will be used for template preview and test sends. - TestData *string `json:"test_data,omitempty"` -} diff --git a/rest/api/v3/templates/model_transactional_template_version_output.go b/rest/api/v3/templates/model_transactional_template_version_output.go deleted file mode 100644 index 5874ebbe..00000000 --- a/rest/api/v3/templates/model_transactional_template_version_output.go +++ /dev/null @@ -1,43 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// TransactionalTemplateVersionOutput struct for TransactionalTemplateVersionOutput -type TransactionalTemplateVersionOutput struct { - Warnings *[]TransactionalTemplateWarning `json:"warnings,omitempty"` - // Set the version as the active version associated with the template. Only one version of a template can be active. The first version created for a template will automatically be set to Active. - Active *Active1 `json:"active,omitempty"` - // Name of the transactional template version. - Name string `json:"name"` - // The HTML content of the Design. - HtmlContent *string `json:"html_content,omitempty"` - // Plain text content of the Design. - PlainContent *string `json:"plain_content,omitempty"` - // If true, plain_content is always generated from html_content. If false, plain_content is not altered. - GeneratePlainContent *bool `json:"generate_plain_content,omitempty"` - // Subject of the new transactional template version. - Subject string `json:"subject"` - // The editor used in the UI. - Editor *Editor1 `json:"editor,omitempty"` - // For dynamic templates only, the mock json data that will be used for template preview and test sends. - TestData *string `json:"test_data,omitempty"` - // ID of the transactional template version. - Id *string `json:"id,omitempty"` - // ID of the transactional template. - TemplateId *string `json:"template_id,omitempty"` - // The date and time that this transactional template version was updated. - UpdatedAt *string `json:"updated_at,omitempty"` - // A Thumbnail preview of the template's html content. - ThumbnailUrl *string `json:"thumbnail_url,omitempty"` -} diff --git a/rest/api/v3/templates/model_transactional_template_warning.go b/rest/api/v3/templates/model_transactional_template_warning.go deleted file mode 100644 index 3d110410..00000000 --- a/rest/api/v3/templates/model_transactional_template_warning.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// TransactionalTemplateWarning struct for TransactionalTemplateWarning -type TransactionalTemplateWarning struct { - // Warning message for the user - Message *string `json:"message,omitempty"` -} diff --git a/rest/api/v3/templates/model_transactional_templates_template_lean.go b/rest/api/v3/templates/model_transactional_templates_template_lean.go deleted file mode 100644 index eb295990..00000000 --- a/rest/api/v3/templates/model_transactional_templates_template_lean.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// TransactionalTemplatesTemplateLean struct for TransactionalTemplatesTemplateLean -type TransactionalTemplatesTemplateLean struct { - // The ID of the transactional template. - Id string `json:"id"` - // The name for the transactional template. - Name string `json:"name"` - // Defines the generation of the template. - Generation Generation1 `json:"generation"` - // The date and time that this transactional template version was updated. - UpdatedAt string `json:"updated_at"` - // The different versions of this transactional template. - Versions *[]TransactionalTemplatesVersionOutputLean `json:"versions,omitempty"` -} diff --git a/rest/api/v3/templates/model_transactional_templates_version_output_lean.go b/rest/api/v3/templates/model_transactional_templates_version_output_lean.go deleted file mode 100644 index 47f42a36..00000000 --- a/rest/api/v3/templates/model_transactional_templates_version_output_lean.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// TransactionalTemplatesVersionOutputLean struct for TransactionalTemplatesVersionOutputLean -type TransactionalTemplatesVersionOutputLean struct { - // ID of the transactional template version. - Id *string `json:"id,omitempty"` - // ID of the transactional template. - TemplateId *string `json:"template_id,omitempty"` - // Set the version as the active version associated with the template. Only one version of a template can be active. The first version created for a template will automatically be set to Active. - Active *Active1 `json:"active,omitempty"` - // Name of the transactional template version. - Name *string `json:"name,omitempty"` - // Subject of the new transactional template version. - Subject *string `json:"subject,omitempty"` - // The date and time that this transactional template version was updated. - UpdatedAt *string `json:"updated_at,omitempty"` - // If true, plain_content is always generated from html_content. If false, plain_content is not altered. - GeneratePlainContent *bool `json:"generate_plain_content,omitempty"` - // The HTML content of the Design. - HtmlContent *string `json:"html_content,omitempty"` - // Plain text content of the Design. - PlainContent *string `json:"plain_content,omitempty"` - // The editor used in the UI. - Editor *Editor1 `json:"editor,omitempty"` - // A Thumbnail preview of the template's html content. - ThumbnailUrl *string `json:"thumbnail_url,omitempty"` -} diff --git a/rest/api/v3/templates/model_update_template_request.go b/rest/api/v3/templates/model_update_template_request.go deleted file mode 100644 index bb110304..00000000 --- a/rest/api/v3/templates/model_update_template_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Templates API -* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateTemplateRequest struct for UpdateTemplateRequest -type UpdateTemplateRequest struct { - // The name of the transactional template. - Name *string `json:"name,omitempty"` -} diff --git a/rest/api/v3/tracking_settings/.openapi-generator b/rest/api/v3/tracking_settings/.openapi-generator deleted file mode 100644 index dcc5aa65..00000000 --- a/rest/api/v3/tracking_settings/.openapi-generator +++ /dev/null @@ -1,38 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_list_click_tracking_setting.go -api_list_google_analytics_tracking_setting.go -api_list_open_tracking_setting.go -api_list_subscription_tracking_setting.go -api_list_tracking_setting.go -api_service.go -api_update_click_tracking_setting.go -api_update_google_analytics_tracking_setting.go -api_update_open_tracking_setting.go -api_update_subscription_tracking_setting.go -docs/ClickTracking.md -docs/GoogleAnalyticsSettings.md -docs/ListClickTrackingSetting.md -docs/ListGoogleAnalyticsTrackingSetting.md -docs/ListOpenTrackingSetting.md -docs/ListOpenTrackingSetting200Response.md -docs/ListSubscriptionTrackingSetting.md -docs/ListTrackingSetting.md -docs/ListTrackingSetting200Response.md -docs/ListTrackingSetting200ResponseResultInner.md -docs/SubscriptionTrackingSettings.md -docs/UpdateClickTrackingSetting.md -docs/UpdateClickTrackingSettingRequest.md -docs/UpdateGoogleAnalyticsTrackingSetting.md -docs/UpdateOpenTrackingSetting.md -docs/UpdateOpenTrackingSettingRequest.md -docs/UpdateSubscriptionTrackingSetting.md -model_click_tracking.go -model_google_analytics_settings.go -model_list_open_tracking_setting_200_response.go -model_list_tracking_setting_200_response.go -model_list_tracking_setting_200_response_result_inner.go -model_subscription_tracking_settings.go -model_update_click_tracking_setting_request.go -model_update_open_tracking_setting_request.go diff --git a/rest/api/v3/tracking_settings/.openapi-generator-ignore b/rest/api/v3/tracking_settings/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/tracking_settings/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/tracking_settings/README.md b/rest/api/v3/tracking_settings/README.md deleted file mode 100644 index 911353ae..00000000 --- a/rest/api/v3/tracking_settings/README.md +++ /dev/null @@ -1,75 +0,0 @@ -# Go API client for - -The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:38.511849+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*ListClickTrackingSetting* | [**ListClickTrackingSetting**](docs/ListClickTrackingSetting.md#listclicktrackingsetting) | **Get** /v3/tracking_settings/click | Retrieve Click Track Settings -*ListGoogleAnalyticsTrackingSetting* | [**ListGoogleAnalyticsTrackingSetting**](docs/ListGoogleAnalyticsTrackingSetting.md#listgoogleanalyticstrackingsetting) | **Get** /v3/tracking_settings/google_analytics | Retrieve Google Analytics Settings -*ListOpenTrackingSetting* | [**ListOpenTrackingSetting**](docs/ListOpenTrackingSetting.md#listopentrackingsetting) | **Get** /v3/tracking_settings/open | Get Open Tracking Settings -*ListSubscriptionTrackingSetting* | [**ListSubscriptionTrackingSetting**](docs/ListSubscriptionTrackingSetting.md#listsubscriptiontrackingsetting) | **Get** /v3/tracking_settings/subscription | Retrieve Subscription Tracking Settings -*ListTrackingSetting* | [**ListTrackingSetting**](docs/ListTrackingSetting.md#listtrackingsetting) | **Get** /v3/tracking_settings | Retrieve Tracking Settings -*UpdateClickTrackingSetting* | [**UpdateClickTrackingSetting**](docs/UpdateClickTrackingSetting.md#updateclicktrackingsetting) | **Patch** /v3/tracking_settings/click | Update Click Tracking Settings -*UpdateGoogleAnalyticsTrackingSetting* | [**UpdateGoogleAnalyticsTrackingSetting**](docs/UpdateGoogleAnalyticsTrackingSetting.md#updategoogleanalyticstrackingsetting) | **Patch** /v3/tracking_settings/google_analytics | Update Google Analytics Settings -*UpdateOpenTrackingSetting* | [**UpdateOpenTrackingSetting**](docs/UpdateOpenTrackingSetting.md#updateopentrackingsetting) | **Patch** /v3/tracking_settings/open | Update Open Tracking Settings -*UpdateSubscriptionTrackingSetting* | [**UpdateSubscriptionTrackingSetting**](docs/UpdateSubscriptionTrackingSetting.md#updatesubscriptiontrackingsetting) | **Patch** /v3/tracking_settings/subscription | Update Subscription Tracking Settings - - -## Documentation For Models - - - [ClickTracking](ClickTracking.md) - - [GoogleAnalyticsSettings](GoogleAnalyticsSettings.md) - - [ListOpenTrackingSetting200Response](ListOpenTrackingSetting200Response.md) - - [ListTrackingSetting200Response](ListTrackingSetting200Response.md) - - [ListTrackingSetting200ResponseResultInner](ListTrackingSetting200ResponseResultInner.md) - - [SubscriptionTrackingSettings](SubscriptionTrackingSettings.md) - - [UpdateClickTrackingSettingRequest](UpdateClickTrackingSettingRequest.md) - - [UpdateOpenTrackingSettingRequest](UpdateOpenTrackingSettingRequest.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/tracking_settings/api_list_click_tracking_setting.go b/rest/api/v3/tracking_settings/api_list_click_tracking_setting.go deleted file mode 100644 index c2aa40b0..00000000 --- a/rest/api/v3/tracking_settings/api_list_click_tracking_setting.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Tracking Settings API -* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListClickTrackingSettingParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListClickTrackingSettingParam) SetOnbehalfof(Onbehalfof string) *ListClickTrackingSettingParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve your current click tracking setting.** Click Tracking overrides all the links and URLs in your emails and points them to either SendGrid’s servers or the domain with which you branded your link. When a customer clicks a link, SendGrid tracks those [clicks](https://sendgrid.com/docs/glossary/clicks/). Click tracking helps you understand how users are engaging with your communications. SendGrid can track up to 1000 links per email -func (c *ApiService) ListClickTrackingSetting(params *ListClickTrackingSettingParam) (interface{}, error) { - path := "/v3/tracking_settings/click" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ClickTracking{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/tracking_settings/api_list_google_analytics_tracking_setting.go b/rest/api/v3/tracking_settings/api_list_google_analytics_tracking_setting.go deleted file mode 100644 index 0f180a15..00000000 --- a/rest/api/v3/tracking_settings/api_list_google_analytics_tracking_setting.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Tracking Settings API -* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListGoogleAnalyticsTrackingSettingParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListGoogleAnalyticsTrackingSettingParam) SetOnbehalfof(Onbehalfof string) *ListGoogleAnalyticsTrackingSettingParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve your current setting for Google Analytics.** Google Analytics helps you understand how users got to your site and what they're doing there. For more information about using Google Analytics, please refer to [Google’s URL Builder](https://support.google.com/analytics/answer/1033867?hl=en) and their article on [\"Best Practices for Campaign Building\"](https://support.google.com/analytics/answer/1037445). We default the settings to Google’s recommendations. For more information, see [Google Analytics Demystified](https://sendgrid.com/docs/ui/analytics-and-reporting/google-analytics/). -func (c *ApiService) ListGoogleAnalyticsTrackingSetting(params *ListGoogleAnalyticsTrackingSettingParam) (interface{}, error) { - path := "/v3/tracking_settings/google_analytics" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &GoogleAnalyticsSettings{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/tracking_settings/api_list_open_tracking_setting.go b/rest/api/v3/tracking_settings/api_list_open_tracking_setting.go deleted file mode 100644 index 1b2f70b3..00000000 --- a/rest/api/v3/tracking_settings/api_list_open_tracking_setting.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Tracking Settings API -* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListOpenTrackingSettingParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListOpenTrackingSettingParam) SetOnbehalfof(Onbehalfof string) *ListOpenTrackingSettingParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve your current settings for open tracking.** Open Tracking adds an invisible image at the end of the email which can track email opens. If the email recipient has images enabled on their email client, a request to SendGrid’s server for the invisible image is executed and an open event is logged. These events are logged in the Statistics portal, Email Activity interface, and are reported by the Event Webhook. -func (c *ApiService) ListOpenTrackingSetting(params *ListOpenTrackingSettingParam) (interface{}, error) { - path := "/v3/tracking_settings/open" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListOpenTrackingSetting200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/tracking_settings/api_list_subscription_tracking_setting.go b/rest/api/v3/tracking_settings/api_list_subscription_tracking_setting.go deleted file mode 100644 index d4bacca7..00000000 --- a/rest/api/v3/tracking_settings/api_list_subscription_tracking_setting.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Tracking Settings API -* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListSubscriptionTrackingSettingParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListSubscriptionTrackingSettingParam) SetOnbehalfof(Onbehalfof string) *ListSubscriptionTrackingSettingParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve your current settings for subscription tracking.** Subscription tracking adds links to the bottom of your emails that allows your recipients to subscribe to, or unsubscribe from, your emails. -func (c *ApiService) ListSubscriptionTrackingSetting(params *ListSubscriptionTrackingSettingParam) (interface{}, error) { - path := "/v3/tracking_settings/subscription" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SubscriptionTrackingSettings{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/tracking_settings/api_list_tracking_setting.go b/rest/api/v3/tracking_settings/api_list_tracking_setting.go deleted file mode 100644 index 764765fa..00000000 --- a/rest/api/v3/tracking_settings/api_list_tracking_setting.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Tracking Settings API -* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListTrackingSettingParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListTrackingSettingParam) SetOnbehalfof(Onbehalfof string) *ListTrackingSettingParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a list of all tracking settings on your account.** -func (c *ApiService) ListTrackingSetting(params *ListTrackingSettingParam) (interface{}, error) { - path := "/v3/tracking_settings" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListTrackingSetting200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/tracking_settings/api_service.go b/rest/api/v3/tracking_settings/api_service.go deleted file mode 100644 index 66f5e1d2..00000000 --- a/rest/api/v3/tracking_settings/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Tracking Settings API -* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/tracking_settings/api_update_click_tracking_setting.go b/rest/api/v3/tracking_settings/api_update_click_tracking_setting.go deleted file mode 100644 index 87736652..00000000 --- a/rest/api/v3/tracking_settings/api_update_click_tracking_setting.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Tracking Settings API -* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type UpdateClickTrackingSettingParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - UpdateClickTrackingSettingRequest *UpdateClickTrackingSettingRequest `json:"UpdateClickTrackingSettingRequest,omitempty"` -} - -func (params *UpdateClickTrackingSettingParam) SetOnbehalfof(Onbehalfof string) *UpdateClickTrackingSettingParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateClickTrackingSettingParam) SetUpdateClickTrackingSettingRequest(UpdateClickTrackingSettingRequest UpdateClickTrackingSettingRequest) *UpdateClickTrackingSettingParam { - params.UpdateClickTrackingSettingRequest = &UpdateClickTrackingSettingRequest - return params -} - -// **This endpoint allows you to enable or disable your current click tracking setting.** Click Tracking overrides all the links and URLs in your emails and points them to either SendGrid’s servers or the domain with which you branded your link. When a customer clicks a link, SendGrid tracks those [clicks](https://sendgrid.com/docs/glossary/clicks/). Click tracking helps you understand how users are engaging with your communications. SendGrid can track up to 1000 links per email -func (c *ApiService) UpdateClickTrackingSetting(params *UpdateClickTrackingSettingParam) (interface{}, error) { - path := "/v3/tracking_settings/click" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateClickTrackingSettingRequest != nil { - b, err := json.Marshal(*params.UpdateClickTrackingSettingRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ClickTracking{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/tracking_settings/api_update_google_analytics_tracking_setting.go b/rest/api/v3/tracking_settings/api_update_google_analytics_tracking_setting.go deleted file mode 100644 index ee613a5f..00000000 --- a/rest/api/v3/tracking_settings/api_update_google_analytics_tracking_setting.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Tracking Settings API -* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type UpdateGoogleAnalyticsTrackingSettingParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - GoogleAnalyticsSettings *GoogleAnalyticsSettings `json:"GoogleAnalyticsSettings,omitempty"` -} - -func (params *UpdateGoogleAnalyticsTrackingSettingParam) SetOnbehalfof(Onbehalfof string) *UpdateGoogleAnalyticsTrackingSettingParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateGoogleAnalyticsTrackingSettingParam) SetGoogleAnalyticsSettings(GoogleAnalyticsSettings GoogleAnalyticsSettings) *UpdateGoogleAnalyticsTrackingSettingParam { - params.GoogleAnalyticsSettings = &GoogleAnalyticsSettings - return params -} - -// **This endpoint allows you to update your current setting for Google Analytics.** Google Analytics helps you understand how users got to your site and what they're doing there. For more information about using Google Analytics, please refer to [Google’s URL Builder](https://support.google.com/analytics/answer/1033867?hl=en) and their article on [\"Best Practices for Campaign Building\"](https://support.google.com/analytics/answer/1037445). We default the settings to Google’s recommendations. For more information, see [Google Analytics Demystified](https://sendgrid.com/docs/ui/analytics-and-reporting/google-analytics/). -func (c *ApiService) UpdateGoogleAnalyticsTrackingSetting(params *UpdateGoogleAnalyticsTrackingSettingParam) (interface{}, error) { - path := "/v3/tracking_settings/google_analytics" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.GoogleAnalyticsSettings != nil { - b, err := json.Marshal(*params.GoogleAnalyticsSettings) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &GoogleAnalyticsSettings{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/tracking_settings/api_update_open_tracking_setting.go b/rest/api/v3/tracking_settings/api_update_open_tracking_setting.go deleted file mode 100644 index 55deed7c..00000000 --- a/rest/api/v3/tracking_settings/api_update_open_tracking_setting.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Tracking Settings API -* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type UpdateOpenTrackingSettingParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - UpdateOpenTrackingSettingRequest *UpdateOpenTrackingSettingRequest `json:"UpdateOpenTrackingSettingRequest,omitempty"` -} - -func (params *UpdateOpenTrackingSettingParam) SetOnbehalfof(Onbehalfof string) *UpdateOpenTrackingSettingParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateOpenTrackingSettingParam) SetUpdateOpenTrackingSettingRequest(UpdateOpenTrackingSettingRequest UpdateOpenTrackingSettingRequest) *UpdateOpenTrackingSettingParam { - params.UpdateOpenTrackingSettingRequest = &UpdateOpenTrackingSettingRequest - return params -} - -// **This endpoint allows you to update your current settings for open tracking.** Open Tracking adds an invisible image at the end of the email which can track email opens. If the email recipient has images enabled on their email client, a request to SendGrid’s server for the invisible image is executed and an open event is logged. These events are logged in the Statistics portal, Email Activity interface, and are reported by the Event Webhook. -func (c *ApiService) UpdateOpenTrackingSetting(params *UpdateOpenTrackingSettingParam) (interface{}, error) { - path := "/v3/tracking_settings/open" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateOpenTrackingSettingRequest != nil { - b, err := json.Marshal(*params.UpdateOpenTrackingSettingRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListOpenTrackingSetting200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/tracking_settings/api_update_subscription_tracking_setting.go b/rest/api/v3/tracking_settings/api_update_subscription_tracking_setting.go deleted file mode 100644 index ac3f8cee..00000000 --- a/rest/api/v3/tracking_settings/api_update_subscription_tracking_setting.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Tracking Settings API -* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type UpdateSubscriptionTrackingSettingParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - SubscriptionTrackingSettings *SubscriptionTrackingSettings `json:"SubscriptionTrackingSettings,omitempty"` -} - -func (params *UpdateSubscriptionTrackingSettingParam) SetOnbehalfof(Onbehalfof string) *UpdateSubscriptionTrackingSettingParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateSubscriptionTrackingSettingParam) SetSubscriptionTrackingSettings(SubscriptionTrackingSettings SubscriptionTrackingSettings) *UpdateSubscriptionTrackingSettingParam { - params.SubscriptionTrackingSettings = &SubscriptionTrackingSettings - return params -} - -// **This endpoint allows you to update your current settings for subscription tracking.** Subscription tracking adds links to the bottom of your emails that allows your recipients to subscribe to, or unsubscribe from, your emails. -func (c *ApiService) UpdateSubscriptionTrackingSetting(params *UpdateSubscriptionTrackingSettingParam) (interface{}, error) { - path := "/v3/tracking_settings/subscription" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.SubscriptionTrackingSettings != nil { - b, err := json.Marshal(*params.SubscriptionTrackingSettings) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &SubscriptionTrackingSettings{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/tracking_settings/docs/ClickTracking.md b/rest/api/v3/tracking_settings/docs/ClickTracking.md deleted file mode 100644 index 1ed22ee2..00000000 --- a/rest/api/v3/tracking_settings/docs/ClickTracking.md +++ /dev/null @@ -1,12 +0,0 @@ -# ClickTracking - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**EnableText** | **bool** | Indicates if click tracking is enabled for plain text emails. | -**Enabled** | **bool** | Indicates if click tracking is enabled or disabled. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/tracking_settings/docs/GoogleAnalyticsSettings.md b/rest/api/v3/tracking_settings/docs/GoogleAnalyticsSettings.md deleted file mode 100644 index e55f7b45..00000000 --- a/rest/api/v3/tracking_settings/docs/GoogleAnalyticsSettings.md +++ /dev/null @@ -1,16 +0,0 @@ -# GoogleAnalyticsSettings - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enabled** | **bool** | Indicates if Google Analytics is enabled. |[optional] -**UtmCampaign** | **string** | The name of the campaign. |[optional] -**UtmContent** | **string** | Used to differentiate ads |[optional] -**UtmMedium** | **string** | Name of the marketing medium (e.g. \"Email\"). |[optional] -**UtmSource** | **string** | Name of the referrer source. |[optional] -**UtmTerm** | **string** | Any paid keywords. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/tracking_settings/docs/ListClickTrackingSetting.md b/rest/api/v3/tracking_settings/docs/ListClickTrackingSetting.md deleted file mode 100644 index 2437d770..00000000 --- a/rest/api/v3/tracking_settings/docs/ListClickTrackingSetting.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListClickTrackingSetting - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListClickTrackingSetting**](ListClickTrackingSetting.md#ListClickTrackingSetting) | **Get** /v3/tracking_settings/click | Retrieve Click Track Settings - - - -## ListClickTrackingSetting - -> ClickTracking ListClickTrackingSetting(ctx, optional) - -Retrieve Click Track Settings - -**This endpoint allows you to retrieve your current click tracking setting.** Click Tracking overrides all the links and URLs in your emails and points them to either SendGrid’s servers or the domain with which you branded your link. When a customer clicks a link, SendGrid tracks those [clicks](https://sendgrid.com/docs/glossary/clicks/). Click tracking helps you understand how users are engaging with your communications. SendGrid can track up to 1000 links per email - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListClickTrackingSettingParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ClickTracking**](ClickTracking.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/tracking_settings/docs/ListGoogleAnalyticsTrackingSetting.md b/rest/api/v3/tracking_settings/docs/ListGoogleAnalyticsTrackingSetting.md deleted file mode 100644 index fdb71673..00000000 --- a/rest/api/v3/tracking_settings/docs/ListGoogleAnalyticsTrackingSetting.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListGoogleAnalyticsTrackingSetting - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListGoogleAnalyticsTrackingSetting**](ListGoogleAnalyticsTrackingSetting.md#ListGoogleAnalyticsTrackingSetting) | **Get** /v3/tracking_settings/google_analytics | Retrieve Google Analytics Settings - - - -## ListGoogleAnalyticsTrackingSetting - -> GoogleAnalyticsSettings ListGoogleAnalyticsTrackingSetting(ctx, optional) - -Retrieve Google Analytics Settings - -**This endpoint allows you to retrieve your current setting for Google Analytics.** Google Analytics helps you understand how users got to your site and what they're doing there. For more information about using Google Analytics, please refer to [Google’s URL Builder](https://support.google.com/analytics/answer/1033867?hl=en) and their article on [\"Best Practices for Campaign Building\"](https://support.google.com/analytics/answer/1037445). We default the settings to Google’s recommendations. For more information, see [Google Analytics Demystified](https://sendgrid.com/docs/ui/analytics-and-reporting/google-analytics/). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListGoogleAnalyticsTrackingSettingParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**GoogleAnalyticsSettings**](GoogleAnalyticsSettings.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/tracking_settings/docs/ListOpenTrackingSetting.md b/rest/api/v3/tracking_settings/docs/ListOpenTrackingSetting.md deleted file mode 100644 index 958867f9..00000000 --- a/rest/api/v3/tracking_settings/docs/ListOpenTrackingSetting.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListOpenTrackingSetting - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListOpenTrackingSetting**](ListOpenTrackingSetting.md#ListOpenTrackingSetting) | **Get** /v3/tracking_settings/open | Get Open Tracking Settings - - - -## ListOpenTrackingSetting - -> ListOpenTrackingSetting200Response ListOpenTrackingSetting(ctx, optional) - -Get Open Tracking Settings - -**This endpoint allows you to retrieve your current settings for open tracking.** Open Tracking adds an invisible image at the end of the email which can track email opens. If the email recipient has images enabled on their email client, a request to SendGrid’s server for the invisible image is executed and an open event is logged. These events are logged in the Statistics portal, Email Activity interface, and are reported by the Event Webhook. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListOpenTrackingSettingParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListOpenTrackingSetting200Response**](ListOpenTrackingSetting200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/tracking_settings/docs/ListOpenTrackingSetting200Response.md b/rest/api/v3/tracking_settings/docs/ListOpenTrackingSetting200Response.md deleted file mode 100644 index 3a4a7db5..00000000 --- a/rest/api/v3/tracking_settings/docs/ListOpenTrackingSetting200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListOpenTrackingSetting200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enabled** | **bool** | Indicates if open tracking is enabled. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/tracking_settings/docs/ListSubscriptionTrackingSetting.md b/rest/api/v3/tracking_settings/docs/ListSubscriptionTrackingSetting.md deleted file mode 100644 index 12d9be73..00000000 --- a/rest/api/v3/tracking_settings/docs/ListSubscriptionTrackingSetting.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListSubscriptionTrackingSetting - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListSubscriptionTrackingSetting**](ListSubscriptionTrackingSetting.md#ListSubscriptionTrackingSetting) | **Get** /v3/tracking_settings/subscription | Retrieve Subscription Tracking Settings - - - -## ListSubscriptionTrackingSetting - -> SubscriptionTrackingSettings ListSubscriptionTrackingSetting(ctx, optional) - -Retrieve Subscription Tracking Settings - -**This endpoint allows you to retrieve your current settings for subscription tracking.** Subscription tracking adds links to the bottom of your emails that allows your recipients to subscribe to, or unsubscribe from, your emails. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListSubscriptionTrackingSettingParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**SubscriptionTrackingSettings**](SubscriptionTrackingSettings.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/tracking_settings/docs/ListTrackingSetting.md b/rest/api/v3/tracking_settings/docs/ListTrackingSetting.md deleted file mode 100644 index 24b3b155..00000000 --- a/rest/api/v3/tracking_settings/docs/ListTrackingSetting.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListTrackingSetting - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListTrackingSetting**](ListTrackingSetting.md#ListTrackingSetting) | **Get** /v3/tracking_settings | Retrieve Tracking Settings - - - -## ListTrackingSetting - -> ListTrackingSetting200Response ListTrackingSetting(ctx, optional) - -Retrieve Tracking Settings - -**This endpoint allows you to retrieve a list of all tracking settings on your account.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListTrackingSettingParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListTrackingSetting200Response**](ListTrackingSetting200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/tracking_settings/docs/ListTrackingSetting200Response.md b/rest/api/v3/tracking_settings/docs/ListTrackingSetting200Response.md deleted file mode 100644 index 9e49cf92..00000000 --- a/rest/api/v3/tracking_settings/docs/ListTrackingSetting200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListTrackingSetting200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]ListTrackingSetting200ResponseResultInner**](ListTrackingSetting200ResponseResultInner.md) | The list of all tracking settings. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/tracking_settings/docs/ListTrackingSetting200ResponseResultInner.md b/rest/api/v3/tracking_settings/docs/ListTrackingSetting200ResponseResultInner.md deleted file mode 100644 index de2cbab9..00000000 --- a/rest/api/v3/tracking_settings/docs/ListTrackingSetting200ResponseResultInner.md +++ /dev/null @@ -1,14 +0,0 @@ -# ListTrackingSetting200ResponseResultInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | The name of the event being tracked. |[optional] -**Title** | **string** | The title of the tracking setting. |[optional] -**Description** | **string** | A description about the event that is being tracked. |[optional] -**Enabled** | **bool** | Indicates if this tracking setting is currently enabled. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/tracking_settings/docs/SubscriptionTrackingSettings.md b/rest/api/v3/tracking_settings/docs/SubscriptionTrackingSettings.md deleted file mode 100644 index 2d7ac4bb..00000000 --- a/rest/api/v3/tracking_settings/docs/SubscriptionTrackingSettings.md +++ /dev/null @@ -1,16 +0,0 @@ -# SubscriptionTrackingSettings - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enabled** | **bool** | Indicates if subscription tracking is enabled. |[optional] -**HtmlContent** | **string** | The information and HTML for your unsubscribe link. |[optional] -**Landing** | **string** | The HTML that will be displayed on the page that your customers will see after clicking unsubscribe, hosted on SendGrid’s server. |[optional] -**PlainContent** | **string** | The information in plain text for your unsubscribe link. You should have the “<% %>” tag in your content, otherwise the user will have no URL for unsubscribing. |[optional] -**Replace** | **string** | Your custom defined replacement tag for your templates. Use this tag to place your unsubscribe content anywhere in your emailtemplate. |[optional] -**Url** | **string** | The URL where you would like your users sent to unsubscribe. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/tracking_settings/docs/UpdateClickTrackingSetting.md b/rest/api/v3/tracking_settings/docs/UpdateClickTrackingSetting.md deleted file mode 100644 index 78a5a4e5..00000000 --- a/rest/api/v3/tracking_settings/docs/UpdateClickTrackingSetting.md +++ /dev/null @@ -1,49 +0,0 @@ -# UpdateClickTrackingSetting - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateClickTrackingSetting**](UpdateClickTrackingSetting.md#UpdateClickTrackingSetting) | **Patch** /v3/tracking_settings/click | Update Click Tracking Settings - - - -## UpdateClickTrackingSetting - -> ClickTracking UpdateClickTrackingSetting(ctx, optional) - -Update Click Tracking Settings - -**This endpoint allows you to enable or disable your current click tracking setting.** Click Tracking overrides all the links and URLs in your emails and points them to either SendGrid’s servers or the domain with which you branded your link. When a customer clicks a link, SendGrid tracks those [clicks](https://sendgrid.com/docs/glossary/clicks/). Click tracking helps you understand how users are engaging with your communications. SendGrid can track up to 1000 links per email - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateClickTrackingSettingParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**UpdateClickTrackingSettingRequest** | [**UpdateClickTrackingSettingRequest**](UpdateClickTrackingSettingRequest.md) | - -### Return type - -[**ClickTracking**](ClickTracking.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/tracking_settings/docs/UpdateClickTrackingSettingRequest.md b/rest/api/v3/tracking_settings/docs/UpdateClickTrackingSettingRequest.md deleted file mode 100644 index 61b2c708..00000000 --- a/rest/api/v3/tracking_settings/docs/UpdateClickTrackingSettingRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateClickTrackingSettingRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enabled** | **bool** | The setting you want to use for click tracking. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/tracking_settings/docs/UpdateGoogleAnalyticsTrackingSetting.md b/rest/api/v3/tracking_settings/docs/UpdateGoogleAnalyticsTrackingSetting.md deleted file mode 100644 index d3310250..00000000 --- a/rest/api/v3/tracking_settings/docs/UpdateGoogleAnalyticsTrackingSetting.md +++ /dev/null @@ -1,49 +0,0 @@ -# UpdateGoogleAnalyticsTrackingSetting - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateGoogleAnalyticsTrackingSetting**](UpdateGoogleAnalyticsTrackingSetting.md#UpdateGoogleAnalyticsTrackingSetting) | **Patch** /v3/tracking_settings/google_analytics | Update Google Analytics Settings - - - -## UpdateGoogleAnalyticsTrackingSetting - -> GoogleAnalyticsSettings UpdateGoogleAnalyticsTrackingSetting(ctx, optional) - -Update Google Analytics Settings - -**This endpoint allows you to update your current setting for Google Analytics.** Google Analytics helps you understand how users got to your site and what they're doing there. For more information about using Google Analytics, please refer to [Google’s URL Builder](https://support.google.com/analytics/answer/1033867?hl=en) and their article on [\"Best Practices for Campaign Building\"](https://support.google.com/analytics/answer/1037445). We default the settings to Google’s recommendations. For more information, see [Google Analytics Demystified](https://sendgrid.com/docs/ui/analytics-and-reporting/google-analytics/). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateGoogleAnalyticsTrackingSettingParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**GoogleAnalyticsSettings** | [**GoogleAnalyticsSettings**](GoogleAnalyticsSettings.md) | - -### Return type - -[**GoogleAnalyticsSettings**](GoogleAnalyticsSettings.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/tracking_settings/docs/UpdateOpenTrackingSetting.md b/rest/api/v3/tracking_settings/docs/UpdateOpenTrackingSetting.md deleted file mode 100644 index 8e05d80f..00000000 --- a/rest/api/v3/tracking_settings/docs/UpdateOpenTrackingSetting.md +++ /dev/null @@ -1,49 +0,0 @@ -# UpdateOpenTrackingSetting - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateOpenTrackingSetting**](UpdateOpenTrackingSetting.md#UpdateOpenTrackingSetting) | **Patch** /v3/tracking_settings/open | Update Open Tracking Settings - - - -## UpdateOpenTrackingSetting - -> ListOpenTrackingSetting200Response UpdateOpenTrackingSetting(ctx, optional) - -Update Open Tracking Settings - -**This endpoint allows you to update your current settings for open tracking.** Open Tracking adds an invisible image at the end of the email which can track email opens. If the email recipient has images enabled on their email client, a request to SendGrid’s server for the invisible image is executed and an open event is logged. These events are logged in the Statistics portal, Email Activity interface, and are reported by the Event Webhook. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateOpenTrackingSettingParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**UpdateOpenTrackingSettingRequest** | [**UpdateOpenTrackingSettingRequest**](UpdateOpenTrackingSettingRequest.md) | - -### Return type - -[**ListOpenTrackingSetting200Response**](ListOpenTrackingSetting200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/tracking_settings/docs/UpdateOpenTrackingSettingRequest.md b/rest/api/v3/tracking_settings/docs/UpdateOpenTrackingSettingRequest.md deleted file mode 100644 index 0b5d7d38..00000000 --- a/rest/api/v3/tracking_settings/docs/UpdateOpenTrackingSettingRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateOpenTrackingSettingRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enabled** | **bool** | The new status that you want to set for open tracking. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/tracking_settings/docs/UpdateSubscriptionTrackingSetting.md b/rest/api/v3/tracking_settings/docs/UpdateSubscriptionTrackingSetting.md deleted file mode 100644 index 627a0d9f..00000000 --- a/rest/api/v3/tracking_settings/docs/UpdateSubscriptionTrackingSetting.md +++ /dev/null @@ -1,49 +0,0 @@ -# UpdateSubscriptionTrackingSetting - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateSubscriptionTrackingSetting**](UpdateSubscriptionTrackingSetting.md#UpdateSubscriptionTrackingSetting) | **Patch** /v3/tracking_settings/subscription | Update Subscription Tracking Settings - - - -## UpdateSubscriptionTrackingSetting - -> SubscriptionTrackingSettings UpdateSubscriptionTrackingSetting(ctx, optional) - -Update Subscription Tracking Settings - -**This endpoint allows you to update your current settings for subscription tracking.** Subscription tracking adds links to the bottom of your emails that allows your recipients to subscribe to, or unsubscribe from, your emails. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateSubscriptionTrackingSettingParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**SubscriptionTrackingSettings** | [**SubscriptionTrackingSettings**](SubscriptionTrackingSettings.md) | - -### Return type - -[**SubscriptionTrackingSettings**](SubscriptionTrackingSettings.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/tracking_settings/model_click_tracking.go b/rest/api/v3/tracking_settings/model_click_tracking.go deleted file mode 100644 index 6f9e6da9..00000000 --- a/rest/api/v3/tracking_settings/model_click_tracking.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Tracking Settings API -* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ClickTracking struct for ClickTracking -type ClickTracking struct { - // Indicates if click tracking is enabled for plain text emails. - EnableText bool `json:"enable_text"` - // Indicates if click tracking is enabled or disabled. - Enabled bool `json:"enabled"` -} diff --git a/rest/api/v3/tracking_settings/model_google_analytics_settings.go b/rest/api/v3/tracking_settings/model_google_analytics_settings.go deleted file mode 100644 index 26e187e8..00000000 --- a/rest/api/v3/tracking_settings/model_google_analytics_settings.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Tracking Settings API -* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GoogleAnalyticsSettings struct for GoogleAnalyticsSettings -type GoogleAnalyticsSettings struct { - // Indicates if Google Analytics is enabled. - Enabled *bool `json:"enabled,omitempty"` - // The name of the campaign. - UtmCampaign *string `json:"utm_campaign,omitempty"` - // Used to differentiate ads - UtmContent *string `json:"utm_content,omitempty"` - // Name of the marketing medium (e.g. \"Email\"). - UtmMedium *string `json:"utm_medium,omitempty"` - // Name of the referrer source. - UtmSource *string `json:"utm_source,omitempty"` - // Any paid keywords. - UtmTerm *string `json:"utm_term,omitempty"` -} diff --git a/rest/api/v3/tracking_settings/model_list_open_tracking_setting_200_response.go b/rest/api/v3/tracking_settings/model_list_open_tracking_setting_200_response.go deleted file mode 100644 index 84973abc..00000000 --- a/rest/api/v3/tracking_settings/model_list_open_tracking_setting_200_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Tracking Settings API -* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListOpenTrackingSetting200Response struct for ListOpenTrackingSetting200Response -type ListOpenTrackingSetting200Response struct { - // Indicates if open tracking is enabled. - Enabled bool `json:"enabled"` -} diff --git a/rest/api/v3/tracking_settings/model_list_tracking_setting_200_response.go b/rest/api/v3/tracking_settings/model_list_tracking_setting_200_response.go deleted file mode 100644 index 92bad2b6..00000000 --- a/rest/api/v3/tracking_settings/model_list_tracking_setting_200_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Tracking Settings API -* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListTrackingSetting200Response struct for ListTrackingSetting200Response -type ListTrackingSetting200Response struct { - // The list of all tracking settings. - Result *[]ListTrackingSetting200ResponseResultInner `json:"result,omitempty"` -} diff --git a/rest/api/v3/tracking_settings/model_list_tracking_setting_200_response_result_inner.go b/rest/api/v3/tracking_settings/model_list_tracking_setting_200_response_result_inner.go deleted file mode 100644 index 849d497a..00000000 --- a/rest/api/v3/tracking_settings/model_list_tracking_setting_200_response_result_inner.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Tracking Settings API -* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListTrackingSetting200ResponseResultInner struct for ListTrackingSetting200ResponseResultInner -type ListTrackingSetting200ResponseResultInner struct { - // The name of the event being tracked. - Name *string `json:"name,omitempty"` - // The title of the tracking setting. - Title *string `json:"title,omitempty"` - // A description about the event that is being tracked. - Description *string `json:"description,omitempty"` - // Indicates if this tracking setting is currently enabled. - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/rest/api/v3/tracking_settings/model_subscription_tracking_settings.go b/rest/api/v3/tracking_settings/model_subscription_tracking_settings.go deleted file mode 100644 index ba674b35..00000000 --- a/rest/api/v3/tracking_settings/model_subscription_tracking_settings.go +++ /dev/null @@ -1,30 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Tracking Settings API -* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// SubscriptionTrackingSettings struct for SubscriptionTrackingSettings -type SubscriptionTrackingSettings struct { - // Indicates if subscription tracking is enabled. - Enabled *bool `json:"enabled,omitempty"` - // The information and HTML for your unsubscribe link. - HtmlContent *string `json:"html_content,omitempty"` - // The HTML that will be displayed on the page that your customers will see after clicking unsubscribe, hosted on SendGrid’s server. - Landing *string `json:"landing,omitempty"` - // The information in plain text for your unsubscribe link. You should have the “<% %>” tag in your content, otherwise the user will have no URL for unsubscribing. - PlainContent *string `json:"plain_content,omitempty"` - // Your custom defined replacement tag for your templates. Use this tag to place your unsubscribe content anywhere in your emailtemplate. - Replace *string `json:"replace,omitempty"` - // The URL where you would like your users sent to unsubscribe. - Url *string `json:"url,omitempty"` -} diff --git a/rest/api/v3/tracking_settings/model_update_click_tracking_setting_request.go b/rest/api/v3/tracking_settings/model_update_click_tracking_setting_request.go deleted file mode 100644 index b94df6e7..00000000 --- a/rest/api/v3/tracking_settings/model_update_click_tracking_setting_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Tracking Settings API -* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateClickTrackingSettingRequest struct for UpdateClickTrackingSettingRequest -type UpdateClickTrackingSettingRequest struct { - // The setting you want to use for click tracking. - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/rest/api/v3/tracking_settings/model_update_open_tracking_setting_request.go b/rest/api/v3/tracking_settings/model_update_open_tracking_setting_request.go deleted file mode 100644 index b1c1b301..00000000 --- a/rest/api/v3/tracking_settings/model_update_open_tracking_setting_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Tracking Settings API -* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateOpenTrackingSettingRequest struct for UpdateOpenTrackingSettingRequest -type UpdateOpenTrackingSettingRequest struct { - // The new status that you want to set for open tracking. - Enabled *bool `json:"enabled,omitempty"` -} diff --git a/rest/api/v3/user/.openapi-generator b/rest/api/v3/user/.openapi-generator deleted file mode 100644 index 06f331eb..00000000 --- a/rest/api/v3/user/.openapi-generator +++ /dev/null @@ -1,50 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_list_account.go -api_list_credit.go -api_list_email.go -api_list_profile.go -api_list_username.go -api_service.go -api_update_email.go -api_update_password.go -api_update_profile.go -api_update_username.go -docs/ErrorResponse.md -docs/ErrorResponseErrorsInner.md -docs/GETUserAccountResponse.md -docs/GETUserProfileResponse.md -docs/ListAccount.md -docs/ListCredit.md -docs/ListCredit200Response.md -docs/ListEmail.md -docs/ListEmail200Response.md -docs/ListProfile.md -docs/ListUsername.md -docs/ListUsername200Response.md -docs/Type.md -docs/UpdateEmail.md -docs/UpdateEmail200Response.md -docs/UpdateEmailRequest.md -docs/UpdatePassword.md -docs/UpdatePasswordRequest.md -docs/UpdateProfile.md -docs/UpdateUsername.md -docs/UpdateUsername200Response.md -docs/UpdateUsernameRequest.md -docs/UserProfile.md -model_error_response.go -model_error_response_errors_inner.go -model_get_user_account_response.go -model_get_user_profile_response.go -model_list_credit_200_response.go -model_list_email_200_response.go -model_list_username_200_response.go -model_type.go -model_update_email_200_response.go -model_update_email_request.go -model_update_password_request.go -model_update_username_200_response.go -model_update_username_request.go -model_user_profile.go diff --git a/rest/api/v3/user/.openapi-generator-ignore b/rest/api/v3/user/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/user/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/user/README.md b/rest/api/v3/user/README.md deleted file mode 100644 index fdb77310..00000000 --- a/rest/api/v3/user/README.md +++ /dev/null @@ -1,83 +0,0 @@ -# Go API client for - -The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. - -See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:38.549672+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*ListAccount* | [**ListAccount**](docs/ListAccount.md#listaccount) | **Get** /v3/user/account | Get a user's account information. -*ListCredit* | [**ListCredit**](docs/ListCredit.md#listcredit) | **Get** /v3/user/credits | Retrieve your credit balance -*ListEmail* | [**ListEmail**](docs/ListEmail.md#listemail) | **Get** /v3/user/email | Retrieve your account email address -*ListProfile* | [**ListProfile**](docs/ListProfile.md#listprofile) | **Get** /v3/user/profile | Get a user's profile -*ListUsername* | [**ListUsername**](docs/ListUsername.md#listusername) | **Get** /v3/user/username | Retrieve your username -*UpdateEmail* | [**UpdateEmail**](docs/UpdateEmail.md#updateemail) | **Put** /v3/user/email | Update your account email address -*UpdatePassword* | [**UpdatePassword**](docs/UpdatePassword.md#updatepassword) | **Put** /v3/user/password | Update your password -*UpdateProfile* | [**UpdateProfile**](docs/UpdateProfile.md#updateprofile) | **Patch** /v3/user/profile | Update a user's profile -*UpdateUsername* | [**UpdateUsername**](docs/UpdateUsername.md#updateusername) | **Put** /v3/user/username | Update your username - - -## Documentation For Models - - - [ErrorResponse](ErrorResponse.md) - - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) - - [GETUserAccountResponse](GETUserAccountResponse.md) - - [GETUserProfileResponse](GETUserProfileResponse.md) - - [ListCredit200Response](ListCredit200Response.md) - - [ListEmail200Response](ListEmail200Response.md) - - [ListUsername200Response](ListUsername200Response.md) - - [Type](Type.md) - - [UpdateEmail200Response](UpdateEmail200Response.md) - - [UpdateEmailRequest](UpdateEmailRequest.md) - - [UpdatePasswordRequest](UpdatePasswordRequest.md) - - [UpdateUsername200Response](UpdateUsername200Response.md) - - [UpdateUsernameRequest](UpdateUsernameRequest.md) - - [UserProfile](UserProfile.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/user/api_list_account.go b/rest/api/v3/user/api_list_account.go deleted file mode 100644 index 11dcd73e..00000000 --- a/rest/api/v3/user/api_list_account.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid User API -* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListAccountParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListAccountParam) SetOnbehalfof(Onbehalfof string) *ListAccountParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve your user account details.** Your user's account information includes the user's account type and reputation. -func (c *ApiService) ListAccount(params *ListAccountParam) (interface{}, error) { - path := "/v3/user/account" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &GETUserAccountResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/user/api_list_credit.go b/rest/api/v3/user/api_list_credit.go deleted file mode 100644 index 7e3000da..00000000 --- a/rest/api/v3/user/api_list_credit.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid User API -* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListCreditParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListCreditParam) SetOnbehalfof(Onbehalfof string) *ListCreditParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve the current credit balance for your account.** Each account has a credit balance, which is a base number of emails it can send before receiving per-email charges. For more information about credits and billing, see [Billing and Plan details information](https://sendgrid.com/docs/ui/account-and-settings/billing/). -func (c *ApiService) ListCredit(params *ListCreditParam) (interface{}, error) { - path := "/v3/user/credits" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListCredit200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/user/api_list_email.go b/rest/api/v3/user/api_list_email.go deleted file mode 100644 index 3dfa7739..00000000 --- a/rest/api/v3/user/api_list_email.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid User API -* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListEmailParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListEmailParam) SetOnbehalfof(Onbehalfof string) *ListEmailParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve the email address currently on file for your account.** -func (c *ApiService) ListEmail(params *ListEmailParam) (interface{}, error) { - path := "/v3/user/email" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListEmail200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/user/api_list_profile.go b/rest/api/v3/user/api_list_profile.go deleted file mode 100644 index 759caf9d..00000000 --- a/rest/api/v3/user/api_list_profile.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid User API -* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListProfileParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListProfileParam) SetOnbehalfof(Onbehalfof string) *ListProfileParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve your current profile details.** -func (c *ApiService) ListProfile(params *ListProfileParam) (interface{}, error) { - path := "/v3/user/profile" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &GETUserProfileResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/user/api_list_username.go b/rest/api/v3/user/api_list_username.go deleted file mode 100644 index 939fad8c..00000000 --- a/rest/api/v3/user/api_list_username.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid User API -* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListUsernameParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListUsernameParam) SetOnbehalfof(Onbehalfof string) *ListUsernameParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve your current account username.** -func (c *ApiService) ListUsername(params *ListUsernameParam) (interface{}, error) { - path := "/v3/user/username" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListUsername200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/user/api_service.go b/rest/api/v3/user/api_service.go deleted file mode 100644 index 67bbc6b4..00000000 --- a/rest/api/v3/user/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid User API -* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/user/api_update_email.go b/rest/api/v3/user/api_update_email.go deleted file mode 100644 index e8ae9bcd..00000000 --- a/rest/api/v3/user/api_update_email.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid User API -* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type UpdateEmailParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - UpdateEmailRequest *UpdateEmailRequest `json:"UpdateEmailRequest,omitempty"` -} - -func (params *UpdateEmailParam) SetOnbehalfof(Onbehalfof string) *UpdateEmailParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateEmailParam) SetUpdateEmailRequest(UpdateEmailRequest UpdateEmailRequest) *UpdateEmailParam { - params.UpdateEmailRequest = &UpdateEmailRequest - return params -} - -// **This endpoint allows you to update the email address currently on file for your account.** -func (c *ApiService) UpdateEmail(params *UpdateEmailParam) (interface{}, error) { - path := "/v3/user/email" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateEmailRequest != nil { - b, err := json.Marshal(*params.UpdateEmailRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &UpdateEmail200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/user/api_update_password.go b/rest/api/v3/user/api_update_password.go deleted file mode 100644 index 5eb8a292..00000000 --- a/rest/api/v3/user/api_update_password.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid User API -* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type UpdatePasswordParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - UpdatePasswordRequest *UpdatePasswordRequest `json:"UpdatePasswordRequest,omitempty"` -} - -func (params *UpdatePasswordParam) SetOnbehalfof(Onbehalfof string) *UpdatePasswordParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdatePasswordParam) SetUpdatePasswordRequest(UpdatePasswordRequest UpdatePasswordRequest) *UpdatePasswordParam { - params.UpdatePasswordRequest = &UpdatePasswordRequest - return params -} - -// **This endpoint allows you to update your password.** -func (c *ApiService) UpdatePassword(params *UpdatePasswordParam) (interface{}, error) { - path := "/v3/user/password" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdatePasswordRequest != nil { - b, err := json.Marshal(*params.UpdatePasswordRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/user/api_update_profile.go b/rest/api/v3/user/api_update_profile.go deleted file mode 100644 index 3335c111..00000000 --- a/rest/api/v3/user/api_update_profile.go +++ /dev/null @@ -1,82 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid User API -* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type UpdateProfileParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - UserProfile *UserProfile `json:"UserProfile,omitempty"` -} - -func (params *UpdateProfileParam) SetOnbehalfof(Onbehalfof string) *UpdateProfileParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateProfileParam) SetUserProfile(UserProfile UserProfile) *UpdateProfileParam { - params.UserProfile = &UserProfile - return params -} - -// **This endpoint allows you to update your current profile details.** Any one or more of the parameters can be updated via the PATCH `/user/profile` endpoint. You must include at least one when you PATCH. -func (c *ApiService) UpdateProfile(params *UpdateProfileParam) (interface{}, error) { - path := "/v3/user/profile" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UserProfile != nil { - b, err := json.Marshal(*params.UserProfile) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &UserProfile{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/user/api_update_username.go b/rest/api/v3/user/api_update_username.go deleted file mode 100644 index 5b64544d..00000000 --- a/rest/api/v3/user/api_update_username.go +++ /dev/null @@ -1,74 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid User API -* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type UpdateUsernameParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - UpdateUsernameRequest *UpdateUsernameRequest `json:"UpdateUsernameRequest,omitempty"` -} - -func (params *UpdateUsernameParam) SetOnbehalfof(Onbehalfof string) *UpdateUsernameParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateUsernameParam) SetUpdateUsernameRequest(UpdateUsernameRequest UpdateUsernameRequest) *UpdateUsernameParam { - params.UpdateUsernameRequest = &UpdateUsernameRequest - return params -} - -// **This endpoint allows you to update the username for your account.** -func (c *ApiService) UpdateUsername(params *UpdateUsernameParam) (interface{}, error) { - path := "/v3/user/username" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateUsernameRequest != nil { - b, err := json.Marshal(*params.UpdateUsernameRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &UpdateUsername200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/user/docs/ErrorResponse.md b/rest/api/v3/user/docs/ErrorResponse.md deleted file mode 100644 index ec2d41f6..00000000 --- a/rest/api/v3/user/docs/ErrorResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ErrorResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] -**Id** | **string** | When applicable, this property value will be an error ID. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/user/docs/ErrorResponseErrorsInner.md b/rest/api/v3/user/docs/ErrorResponseErrorsInner.md deleted file mode 100644 index 5449c685..00000000 --- a/rest/api/v3/user/docs/ErrorResponseErrorsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ErrorResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | An error message. |[optional] -**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] -**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/user/docs/GETUserAccountResponse.md b/rest/api/v3/user/docs/GETUserAccountResponse.md deleted file mode 100644 index 3c2144b8..00000000 --- a/rest/api/v3/user/docs/GETUserAccountResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# GETUserAccountResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Type** | [**Type**](Type.md) | The type of account for this user. | -**Reputation** | **float32** | The sender reputation for this user. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/user/docs/GETUserProfileResponse.md b/rest/api/v3/user/docs/GETUserProfileResponse.md deleted file mode 100644 index 37a24d1d..00000000 --- a/rest/api/v3/user/docs/GETUserProfileResponse.md +++ /dev/null @@ -1,21 +0,0 @@ -# GETUserProfileResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Address** | **string** | The user's address. | -**Address2** | **string** | The second line of the user's address. |[optional] -**City** | **string** | The user's city. | -**Company** | **string** | The name of the user's company. | -**Country** | **string** | The user's country. | -**FirstName** | **string** | The user's first name. | -**LastName** | **string** | The user's last name. | -**Phone** | **string** | The user's phone number. | -**State** | **string** | The user's state. | -**Website** | **string** | The user's website URL. | -**Zip** | **string** | The user's zip code. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/user/docs/ListAccount.md b/rest/api/v3/user/docs/ListAccount.md deleted file mode 100644 index ca5f15ad..00000000 --- a/rest/api/v3/user/docs/ListAccount.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListAccount - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListAccount**](ListAccount.md#ListAccount) | **Get** /v3/user/account | Get a user's account information. - - - -## ListAccount - -> GETUserAccountResponse ListAccount(ctx, optional) - -Get a user's account information. - -**This endpoint allows you to retrieve your user account details.** Your user's account information includes the user's account type and reputation. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListAccountParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**GETUserAccountResponse**](GETUserAccountResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/user/docs/ListCredit.md b/rest/api/v3/user/docs/ListCredit.md deleted file mode 100644 index 48078ae9..00000000 --- a/rest/api/v3/user/docs/ListCredit.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListCredit - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListCredit**](ListCredit.md#ListCredit) | **Get** /v3/user/credits | Retrieve your credit balance - - - -## ListCredit - -> ListCredit200Response ListCredit(ctx, optional) - -Retrieve your credit balance - -**This endpoint allows you to retrieve the current credit balance for your account.** Each account has a credit balance, which is a base number of emails it can send before receiving per-email charges. For more information about credits and billing, see [Billing and Plan details information](https://sendgrid.com/docs/ui/account-and-settings/billing/). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListCreditParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListCredit200Response**](ListCredit200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/user/docs/ListCredit200Response.md b/rest/api/v3/user/docs/ListCredit200Response.md deleted file mode 100644 index 9a650e21..00000000 --- a/rest/api/v3/user/docs/ListCredit200Response.md +++ /dev/null @@ -1,17 +0,0 @@ -# ListCredit200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Remain** | **int32** | The remaining number of credits available on your account. | -**Total** | **int32** | The total number of credits assigned to your account. | -**Overage** | **int32** | The number of overdrawn credits for your account. | -**Used** | **int32** | The number of credits that you have used. | -**LastReset** | **string** | The date that your credit balance was last reset. | -**NextReset** | **string** | The next date that your credit balance will be reset. | -**ResetFrequency** | **string** | The frequency at which your credit balance will be reset. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/user/docs/ListEmail.md b/rest/api/v3/user/docs/ListEmail.md deleted file mode 100644 index aa5614c1..00000000 --- a/rest/api/v3/user/docs/ListEmail.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListEmail - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListEmail**](ListEmail.md#ListEmail) | **Get** /v3/user/email | Retrieve your account email address - - - -## ListEmail - -> ListEmail200Response ListEmail(ctx, optional) - -Retrieve your account email address - -**This endpoint allows you to retrieve the email address currently on file for your account.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListEmailParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListEmail200Response**](ListEmail200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/user/docs/ListEmail200Response.md b/rest/api/v3/user/docs/ListEmail200Response.md deleted file mode 100644 index a7387a81..00000000 --- a/rest/api/v3/user/docs/ListEmail200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListEmail200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | **string** | The email address currently on file for your account. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/user/docs/ListProfile.md b/rest/api/v3/user/docs/ListProfile.md deleted file mode 100644 index d41f9b32..00000000 --- a/rest/api/v3/user/docs/ListProfile.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListProfile - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListProfile**](ListProfile.md#ListProfile) | **Get** /v3/user/profile | Get a user's profile - - - -## ListProfile - -> GETUserProfileResponse ListProfile(ctx, optional) - -Get a user's profile - -**This endpoint allows you to retrieve your current profile details.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListProfileParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**GETUserProfileResponse**](GETUserProfileResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/user/docs/ListUsername.md b/rest/api/v3/user/docs/ListUsername.md deleted file mode 100644 index e9f91d80..00000000 --- a/rest/api/v3/user/docs/ListUsername.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListUsername - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListUsername**](ListUsername.md#ListUsername) | **Get** /v3/user/username | Retrieve your username - - - -## ListUsername - -> ListUsername200Response ListUsername(ctx, optional) - -Retrieve your username - -**This endpoint allows you to retrieve your current account username.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListUsernameParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListUsername200Response**](ListUsername200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/user/docs/ListUsername200Response.md b/rest/api/v3/user/docs/ListUsername200Response.md deleted file mode 100644 index c1d23200..00000000 --- a/rest/api/v3/user/docs/ListUsername200Response.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListUsername200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Username** | **string** | Your account username. | -**UserId** | **int32** | The user ID for your account. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/user/docs/Type.md b/rest/api/v3/user/docs/Type.md deleted file mode 100644 index 7736c70d..00000000 --- a/rest/api/v3/user/docs/Type.md +++ /dev/null @@ -1,13 +0,0 @@ -# Type - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**FREE** | string | (value: `"free"`) -**PAID** | string | (value: `"paid"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/user/docs/UpdateEmail.md b/rest/api/v3/user/docs/UpdateEmail.md deleted file mode 100644 index aa382b8c..00000000 --- a/rest/api/v3/user/docs/UpdateEmail.md +++ /dev/null @@ -1,49 +0,0 @@ -# UpdateEmail - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateEmail**](UpdateEmail.md#UpdateEmail) | **Put** /v3/user/email | Update your account email address - - - -## UpdateEmail - -> UpdateEmail200Response UpdateEmail(ctx, optional) - -Update your account email address - -**This endpoint allows you to update the email address currently on file for your account.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateEmailParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**UpdateEmailRequest** | [**UpdateEmailRequest**](UpdateEmailRequest.md) | - -### Return type - -[**UpdateEmail200Response**](UpdateEmail200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/user/docs/UpdateEmail200Response.md b/rest/api/v3/user/docs/UpdateEmail200Response.md deleted file mode 100644 index 795960c4..00000000 --- a/rest/api/v3/user/docs/UpdateEmail200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateEmail200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | **string** | The current email address on file for your account. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/user/docs/UpdateEmailRequest.md b/rest/api/v3/user/docs/UpdateEmailRequest.md deleted file mode 100644 index 1cde2463..00000000 --- a/rest/api/v3/user/docs/UpdateEmailRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateEmailRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | **string** | The new email address that you would like to use for your account. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/user/docs/UpdatePassword.md b/rest/api/v3/user/docs/UpdatePassword.md deleted file mode 100644 index d393707f..00000000 --- a/rest/api/v3/user/docs/UpdatePassword.md +++ /dev/null @@ -1,49 +0,0 @@ -# UpdatePassword - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdatePassword**](UpdatePassword.md#UpdatePassword) | **Put** /v3/user/password | Update your password - - - -## UpdatePassword - -> map[string]interface{} UpdatePassword(ctx, optional) - -Update your password - -**This endpoint allows you to update your password.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdatePasswordParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**UpdatePasswordRequest** | [**UpdatePasswordRequest**](UpdatePasswordRequest.md) | - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/user/docs/UpdatePasswordRequest.md b/rest/api/v3/user/docs/UpdatePasswordRequest.md deleted file mode 100644 index a1264921..00000000 --- a/rest/api/v3/user/docs/UpdatePasswordRequest.md +++ /dev/null @@ -1,12 +0,0 @@ -# UpdatePasswordRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**NewPassword** | **string** | The new password you would like to use for your account. | -**OldPassword** | **string** | The old password for your account. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/user/docs/UpdateProfile.md b/rest/api/v3/user/docs/UpdateProfile.md deleted file mode 100644 index b0dc8f42..00000000 --- a/rest/api/v3/user/docs/UpdateProfile.md +++ /dev/null @@ -1,49 +0,0 @@ -# UpdateProfile - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateProfile**](UpdateProfile.md#UpdateProfile) | **Patch** /v3/user/profile | Update a user's profile - - - -## UpdateProfile - -> UserProfile UpdateProfile(ctx, optional) - -Update a user's profile - -**This endpoint allows you to update your current profile details.** Any one or more of the parameters can be updated via the PATCH `/user/profile` endpoint. You must include at least one when you PATCH. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateProfileParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**UserProfile** | [**UserProfile**](UserProfile.md) | - -### Return type - -[**UserProfile**](UserProfile.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/user/docs/UpdateUsername.md b/rest/api/v3/user/docs/UpdateUsername.md deleted file mode 100644 index 96938ac8..00000000 --- a/rest/api/v3/user/docs/UpdateUsername.md +++ /dev/null @@ -1,49 +0,0 @@ -# UpdateUsername - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateUsername**](UpdateUsername.md#UpdateUsername) | **Put** /v3/user/username | Update your username - - - -## UpdateUsername - -> UpdateUsername200Response UpdateUsername(ctx, optional) - -Update your username - -**This endpoint allows you to update the username for your account.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateUsernameParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**UpdateUsernameRequest** | [**UpdateUsernameRequest**](UpdateUsernameRequest.md) | - -### Return type - -[**UpdateUsername200Response**](UpdateUsername200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/user/docs/UpdateUsername200Response.md b/rest/api/v3/user/docs/UpdateUsername200Response.md deleted file mode 100644 index 07ffae6c..00000000 --- a/rest/api/v3/user/docs/UpdateUsername200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateUsername200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Username** | **string** | The current username on file for your account. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/user/docs/UpdateUsernameRequest.md b/rest/api/v3/user/docs/UpdateUsernameRequest.md deleted file mode 100644 index 85e3d52f..00000000 --- a/rest/api/v3/user/docs/UpdateUsernameRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateUsernameRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Username** | **string** | The new username you would like to use for your account. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/user/docs/UserProfile.md b/rest/api/v3/user/docs/UserProfile.md deleted file mode 100644 index bd9d571e..00000000 --- a/rest/api/v3/user/docs/UserProfile.md +++ /dev/null @@ -1,21 +0,0 @@ -# UserProfile - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Address** | **string** | The street address for this user profile. |[optional] -**Address2** | **string** | An optional second line for the street address of this user profile. |[optional] -**City** | **string** | The city for the user profile. |[optional] -**Company** | **string** | That company that this user profile is associated with. |[optional] -**Country** | **string** | Th country of this user profile. |[optional] -**FirstName** | **string** | The first name of the user. |[optional] -**LastName** | **string** | The last name of the user. |[optional] -**Phone** | **string** | The phone number for the user. |[optional] -**State** | **string** | The state for this user. |[optional] -**Website** | **string** | The website associated with this user. |[optional] -**Zip** | **string** | The zip code for this user. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/user/model_error_response.go b/rest/api/v3/user/model_error_response.go deleted file mode 100644 index a7e81b7e..00000000 --- a/rest/api/v3/user/model_error_response.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid User API -* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponse struct for ErrorResponse -type ErrorResponse struct { - Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` - // When applicable, this property value will be an error ID. - Id *string `json:"id,omitempty"` -} diff --git a/rest/api/v3/user/model_error_response_errors_inner.go b/rest/api/v3/user/model_error_response_errors_inner.go deleted file mode 100644 index 623e0242..00000000 --- a/rest/api/v3/user/model_error_response_errors_inner.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid User API -* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner -type ErrorResponseErrorsInner struct { - // An error message. - Message *string `json:"message,omitempty"` - // When applicable, this property value will be the field that generated the error. - Field *string `json:"field,omitempty"` - // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. - Help *map[string]interface{} `json:"help,omitempty"` -} diff --git a/rest/api/v3/user/model_get_user_account_response.go b/rest/api/v3/user/model_get_user_account_response.go deleted file mode 100644 index c910dc5f..00000000 --- a/rest/api/v3/user/model_get_user_account_response.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid User API -* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GETUserAccountResponse struct for GETUserAccountResponse -type GETUserAccountResponse struct { - // The type of account for this user. - Type Type `json:"type"` - // The sender reputation for this user. - Reputation float32 `json:"reputation"` -} diff --git a/rest/api/v3/user/model_get_user_profile_response.go b/rest/api/v3/user/model_get_user_profile_response.go deleted file mode 100644 index ab9bc7d3..00000000 --- a/rest/api/v3/user/model_get_user_profile_response.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid User API -* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GETUserProfileResponse struct for GETUserProfileResponse -type GETUserProfileResponse struct { - // The user's address. - Address string `json:"address"` - // The second line of the user's address. - Address2 *string `json:"address2,omitempty"` - // The user's city. - City string `json:"city"` - // The name of the user's company. - Company string `json:"company"` - // The user's country. - Country string `json:"country"` - // The user's first name. - FirstName string `json:"first_name"` - // The user's last name. - LastName string `json:"last_name"` - // The user's phone number. - Phone string `json:"phone"` - // The user's state. - State string `json:"state"` - // The user's website URL. - Website string `json:"website"` - // The user's zip code. - Zip string `json:"zip"` -} diff --git a/rest/api/v3/user/model_list_credit_200_response.go b/rest/api/v3/user/model_list_credit_200_response.go deleted file mode 100644 index 515d6d5d..00000000 --- a/rest/api/v3/user/model_list_credit_200_response.go +++ /dev/null @@ -1,32 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid User API -* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListCredit200Response struct for ListCredit200Response -type ListCredit200Response struct { - // The remaining number of credits available on your account. - Remain int32 `json:"remain"` - // The total number of credits assigned to your account. - Total int32 `json:"total"` - // The number of overdrawn credits for your account. - Overage int32 `json:"overage"` - // The number of credits that you have used. - Used int32 `json:"used"` - // The date that your credit balance was last reset. - LastReset string `json:"last_reset"` - // The next date that your credit balance will be reset. - NextReset string `json:"next_reset"` - // The frequency at which your credit balance will be reset. - ResetFrequency string `json:"reset_frequency"` -} diff --git a/rest/api/v3/user/model_list_email_200_response.go b/rest/api/v3/user/model_list_email_200_response.go deleted file mode 100644 index d1b39a6e..00000000 --- a/rest/api/v3/user/model_list_email_200_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid User API -* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListEmail200Response struct for ListEmail200Response -type ListEmail200Response struct { - // The email address currently on file for your account. - Email string `json:"email"` -} diff --git a/rest/api/v3/user/model_list_username_200_response.go b/rest/api/v3/user/model_list_username_200_response.go deleted file mode 100644 index b024b8c7..00000000 --- a/rest/api/v3/user/model_list_username_200_response.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid User API -* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListUsername200Response struct for ListUsername200Response -type ListUsername200Response struct { - // Your account username. - Username string `json:"username"` - // The user ID for your account. - UserId int32 `json:"user_id"` -} diff --git a/rest/api/v3/user/model_type.go b/rest/api/v3/user/model_type.go deleted file mode 100644 index aa8dbdd4..00000000 --- a/rest/api/v3/user/model_type.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid User API -* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// Type the model 'Type' -type Type string - -// List of Type -const ( - TYPE_FREE Type = "free" - TYPE_PAID Type = "paid" -) diff --git a/rest/api/v3/user/model_update_email_200_response.go b/rest/api/v3/user/model_update_email_200_response.go deleted file mode 100644 index 12777e4f..00000000 --- a/rest/api/v3/user/model_update_email_200_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid User API -* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateEmail200Response struct for UpdateEmail200Response -type UpdateEmail200Response struct { - // The current email address on file for your account. - Email string `json:"email"` -} diff --git a/rest/api/v3/user/model_update_email_request.go b/rest/api/v3/user/model_update_email_request.go deleted file mode 100644 index b6d70118..00000000 --- a/rest/api/v3/user/model_update_email_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid User API -* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateEmailRequest struct for UpdateEmailRequest -type UpdateEmailRequest struct { - // The new email address that you would like to use for your account. - Email *string `json:"email,omitempty"` -} diff --git a/rest/api/v3/user/model_update_password_request.go b/rest/api/v3/user/model_update_password_request.go deleted file mode 100644 index ed046469..00000000 --- a/rest/api/v3/user/model_update_password_request.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid User API -* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdatePasswordRequest struct for UpdatePasswordRequest -type UpdatePasswordRequest struct { - // The new password you would like to use for your account. - NewPassword string `json:"new_password"` - // The old password for your account. - OldPassword string `json:"old_password"` -} diff --git a/rest/api/v3/user/model_update_username_200_response.go b/rest/api/v3/user/model_update_username_200_response.go deleted file mode 100644 index 455a234c..00000000 --- a/rest/api/v3/user/model_update_username_200_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid User API -* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateUsername200Response struct for UpdateUsername200Response -type UpdateUsername200Response struct { - // The current username on file for your account. - Username string `json:"username"` -} diff --git a/rest/api/v3/user/model_update_username_request.go b/rest/api/v3/user/model_update_username_request.go deleted file mode 100644 index ec922edc..00000000 --- a/rest/api/v3/user/model_update_username_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid User API -* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateUsernameRequest struct for UpdateUsernameRequest -type UpdateUsernameRequest struct { - // The new username you would like to use for your account. - Username *string `json:"username,omitempty"` -} diff --git a/rest/api/v3/user/model_user_profile.go b/rest/api/v3/user/model_user_profile.go deleted file mode 100644 index 9d9ffcf4..00000000 --- a/rest/api/v3/user/model_user_profile.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid User API -* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UserProfile struct for UserProfile -type UserProfile struct { - // The street address for this user profile. - Address *string `json:"address,omitempty"` - // An optional second line for the street address of this user profile. - Address2 *string `json:"address2,omitempty"` - // The city for the user profile. - City *string `json:"city,omitempty"` - // That company that this user profile is associated with. - Company *string `json:"company,omitempty"` - // Th country of this user profile. - Country *string `json:"country,omitempty"` - // The first name of the user. - FirstName *string `json:"first_name,omitempty"` - // The last name of the user. - LastName *string `json:"last_name,omitempty"` - // The phone number for the user. - Phone *string `json:"phone,omitempty"` - // The state for this user. - State *string `json:"state,omitempty"` - // The website associated with this user. - Website *string `json:"website,omitempty"` - // The zip code for this user. - Zip *string `json:"zip,omitempty"` -} diff --git a/rest/api/v3/verified_senders/.openapi-generator b/rest/api/v3/verified_senders/.openapi-generator deleted file mode 100644 index 261ce635..00000000 --- a/rest/api/v3/verified_senders/.openapi-generator +++ /dev/null @@ -1,48 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_create_verified_sender.go -api_delete_verified_sender.go -api_list_verified_sender.go -api_list_verified_sender_domain.go -api_list_verified_sender_steps_completed.go -api_resend_verified_sender.go -api_service.go -api_update_verified_sender.go -api_verify_sender_token.go -docs/CreateVerifiedSender.md -docs/CreateVerifiedSender400Response.md -docs/CreateVerifiedSender400ResponseErrorsInner.md -docs/DeleteVerifiedSender.md -docs/DeleteVerifiedSender403Response.md -docs/DeleteVerifiedSender403ResponseErrorsInner.md -docs/DeleteVerifiedSender404Response.md -docs/ErrorResponse.md -docs/ErrorResponseErrorsInner.md -docs/ListVerifiedSender.md -docs/ListVerifiedSender200Response.md -docs/ListVerifiedSenderDomain.md -docs/ListVerifiedSenderDomain200Response.md -docs/ListVerifiedSenderDomain200ResponseResults.md -docs/ListVerifiedSenderStepsCompleted.md -docs/ListVerifiedSenderStepsCompleted200Response.md -docs/ListVerifiedSenderStepsCompleted200ResponseResults.md -docs/ResendVerifiedSender.md -docs/UpdateVerifiedSender.md -docs/VerifiedSenderRequest.md -docs/VerifiedSenderResponse.md -docs/VerifySenderToken.md -model_create_verified_sender_400_response.go -model_create_verified_sender_400_response_errors_inner.go -model_delete_verified_sender_403_response.go -model_delete_verified_sender_403_response_errors_inner.go -model_delete_verified_sender_404_response.go -model_error_response.go -model_error_response_errors_inner.go -model_list_verified_sender_200_response.go -model_list_verified_sender_domain_200_response.go -model_list_verified_sender_domain_200_response_results.go -model_list_verified_sender_steps_completed_200_response.go -model_list_verified_sender_steps_completed_200_response_results.go -model_verified_sender_request.go -model_verified_sender_response.go diff --git a/rest/api/v3/verified_senders/.openapi-generator-ignore b/rest/api/v3/verified_senders/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/verified_senders/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/verified_senders/README.md b/rest/api/v3/verified_senders/README.md deleted file mode 100644 index 6cd87d8c..00000000 --- a/rest/api/v3/verified_senders/README.md +++ /dev/null @@ -1,84 +0,0 @@ -# Go API client for - -The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. - -You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. - -This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:38.552145+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*CreateVerifiedSender* | [**CreateVerifiedSender**](docs/CreateVerifiedSender.md#createverifiedsender) | **Post** /v3/verified_senders | Create Verified Sender Request -*DeleteVerifiedSender* | [**DeleteVerifiedSender**](docs/DeleteVerifiedSender.md#deleteverifiedsender) | **Delete** /v3/verified_senders/{Id} | Delete Verified Sender -*ListVerifiedSender* | [**ListVerifiedSender**](docs/ListVerifiedSender.md#listverifiedsender) | **Get** /v3/verified_senders | Get All Verified Senders -*ListVerifiedSenderDomain* | [**ListVerifiedSenderDomain**](docs/ListVerifiedSenderDomain.md#listverifiedsenderdomain) | **Get** /v3/verified_senders/domains | Domain Warn List -*ListVerifiedSenderStepsCompleted* | [**ListVerifiedSenderStepsCompleted**](docs/ListVerifiedSenderStepsCompleted.md#listverifiedsenderstepscompleted) | **Get** /v3/verified_senders/steps_completed | Completed Steps -*ResendVerifiedSender* | [**ResendVerifiedSender**](docs/ResendVerifiedSender.md#resendverifiedsender) | **Post** /v3/verified_senders/resend/{Id} | Resend Verified Sender Request -*UpdateVerifiedSender* | [**UpdateVerifiedSender**](docs/UpdateVerifiedSender.md#updateverifiedsender) | **Patch** /v3/verified_senders/{Id} | Edit Verified Sender -*VerifySenderToken* | [**VerifySenderToken**](docs/VerifySenderToken.md#verifysendertoken) | **Get** /v3/verified_senders/verify/{Token} | Verify Sender Request - - -## Documentation For Models - - - [CreateVerifiedSender400Response](CreateVerifiedSender400Response.md) - - [CreateVerifiedSender400ResponseErrorsInner](CreateVerifiedSender400ResponseErrorsInner.md) - - [DeleteVerifiedSender403Response](DeleteVerifiedSender403Response.md) - - [DeleteVerifiedSender403ResponseErrorsInner](DeleteVerifiedSender403ResponseErrorsInner.md) - - [DeleteVerifiedSender404Response](DeleteVerifiedSender404Response.md) - - [ErrorResponse](ErrorResponse.md) - - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) - - [ListVerifiedSender200Response](ListVerifiedSender200Response.md) - - [ListVerifiedSenderDomain200Response](ListVerifiedSenderDomain200Response.md) - - [ListVerifiedSenderDomain200ResponseResults](ListVerifiedSenderDomain200ResponseResults.md) - - [ListVerifiedSenderStepsCompleted200Response](ListVerifiedSenderStepsCompleted200Response.md) - - [ListVerifiedSenderStepsCompleted200ResponseResults](ListVerifiedSenderStepsCompleted200ResponseResults.md) - - [VerifiedSenderRequest](VerifiedSenderRequest.md) - - [VerifiedSenderResponse](VerifiedSenderResponse.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/verified_senders/api_create_verified_sender.go b/rest/api/v3/verified_senders/api_create_verified_sender.go deleted file mode 100644 index 7daeea53..00000000 --- a/rest/api/v3/verified_senders/api_create_verified_sender.go +++ /dev/null @@ -1,97 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Verified Senders API -* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type CreateVerifiedSenderParam struct { - // - VerifiedSenderRequest *VerifiedSenderRequest `json:"VerifiedSenderRequest,omitempty"` -} - -func (params *CreateVerifiedSenderParam) SetVerifiedSenderRequest(VerifiedSenderRequest VerifiedSenderRequest) *CreateVerifiedSenderParam { - params.VerifiedSenderRequest = &VerifiedSenderRequest - return params -} - -// **This endpoint allows you to create a new Sender Identify**. Upon successful submission of a `POST` request to this endpoint, an identity will be created, and a verification email will be sent to the address assigned to the `from_email` field. You must complete the verification process using the sent email to fully verify the sender. If you need to resend the verification email, you can do so with the Resend Verified Sender Request, `/resend/{id}`, endpoint. If you need to authenticate a domain rather than a Single Sender, see the [Domain Authentication API](https://docs.sendgrid.com/api-reference/domain-authentication/authenticate-a-domain). -func (c *ApiService) CreateVerifiedSender(params *CreateVerifiedSenderParam) (interface{}, error) { - path := "/v3/verified_senders" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.VerifiedSenderRequest != nil { - b, err := json.Marshal(*params.VerifiedSenderRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &VerifiedSenderResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &CreateVerifiedSender400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/verified_senders/api_delete_verified_sender.go b/rest/api/v3/verified_senders/api_delete_verified_sender.go deleted file mode 100644 index 84e67ccf..00000000 --- a/rest/api/v3/verified_senders/api_delete_verified_sender.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Verified Senders API -* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteVerifiedSenderParam struct { - // - Id *string `json:"id"` -} - -func (params *DeleteVerifiedSenderParam) SetId(Id string) *DeleteVerifiedSenderParam { - params.Id = &Id - return params -} - -// **This endpoint allows you to delete a Sender Identity**. Pass the `id` assigned to a Sender Identity to this endpoint to delete the Sender Identity from your account. You can retrieve the IDs associated with Sender Identities using the \"Get All Verified Senders\" endpoint. -func (c *ApiService) DeleteVerifiedSender(params *DeleteVerifiedSenderParam) (interface{}, error) { - path := "/v3/verified_senders/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &DeleteVerifiedSender403Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &DeleteVerifiedSender404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/verified_senders/api_list_verified_sender.go b/rest/api/v3/verified_senders/api_list_verified_sender.go deleted file mode 100644 index ec51b58f..00000000 --- a/rest/api/v3/verified_senders/api_list_verified_sender.go +++ /dev/null @@ -1,103 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Verified Senders API -* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListVerifiedSenderParam struct { - // Specifies the number of results to be returned by the API. This parameter can be used to limit the results returned or in combination with the `lastSeenID` parameter to iterate through paginated results. - Limit *float32 `json:"limit,omitempty"` - // Returns senders with an ID number occurring after the passed in ID. In other words, the `lastSeenID` provides a starting point from which SendGrid will iterate to find Sender Identities associated with your account. - LastSeenID *float32 `json:"lastSeenID,omitempty"` - // Returns information about only the Sender Identity passed in the request. - Id *int32 `json:"id,omitempty"` -} - -func (params *ListVerifiedSenderParam) SetLimit(Limit float32) *ListVerifiedSenderParam { - params.Limit = &Limit - return params -} -func (params *ListVerifiedSenderParam) SetLastSeenID(LastSeenID float32) *ListVerifiedSenderParam { - params.LastSeenID = &LastSeenID - return params -} -func (params *ListVerifiedSenderParam) SetId(Id int32) *ListVerifiedSenderParam { - params.Id = &Id - return params -} - -// **This endpoint allows you to retrieve all the Sender Identities associated with an account.** This endpoint will return both verified and unverified senders. You can limit the number of results returned using the `limit`, `lastSeenID`, and `id` query string parameters. * `limit` allows you to specify an exact number of Sender Identities to return. * `lastSeenID` will return senders with an ID number occuring after the passed in ID. In other words, the `lastSeenID` provides a starting point from which SendGrid will iterate to find Sender Identities associated with your account. * `id` will return information about only the Sender Identity passed in the request. -func (c *ApiService) ListVerifiedSender(params *ListVerifiedSenderParam) (interface{}, error) { - path := "/v3/verified_senders" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Limit != nil { - data.Set("limit", fmt.Sprint(*params.Limit)) - } - if params != nil && params.LastSeenID != nil { - data.Set("lastSeenID", fmt.Sprint(*params.LastSeenID)) - } - if params != nil && params.Id != nil { - data.Set("id", fmt.Sprint(*params.Id)) - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListVerifiedSender200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/verified_senders/api_list_verified_sender_domain.go b/rest/api/v3/verified_senders/api_list_verified_sender_domain.go deleted file mode 100644 index 34000f11..00000000 --- a/rest/api/v3/verified_senders/api_list_verified_sender_domain.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Verified Senders API -* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListVerifiedSenderDomainParam struct { -} - -// **This endpoint returns a list of domains known to implement DMARC and categorizes them by failure type — hard failure or soft failure**. Domains listed as hard failures will not deliver mail when used as a [Sender Identity](https://sendgrid.com/docs/for-developers/sending-email/sender-identity/) due to the domain's DMARC policy settings. For example, using a `yahoo.com` email address as a Sender Identity will likely result in the rejection of your mail. For more information about DMARC, see [Everything about DMARC](https://sendgrid.com/docs/ui/sending-email/dmarc/). -func (c *ApiService) ListVerifiedSenderDomain() (interface{}, error) { - path := "/v3/verified_senders/domains" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListVerifiedSenderDomain200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/verified_senders/api_list_verified_sender_steps_completed.go b/rest/api/v3/verified_senders/api_list_verified_sender_steps_completed.go deleted file mode 100644 index 2a6945ab..00000000 --- a/rest/api/v3/verified_senders/api_list_verified_sender_steps_completed.go +++ /dev/null @@ -1,73 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Verified Senders API -* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListVerifiedSenderStepsCompletedParam struct { -} - -// **This endpoint allows you to determine which of SendGrid’s verification processes have been completed for an account**. This endpoint returns boolean values, `true` and `false`, for [Domain Authentication](https://sendgrid.com/docs/for-developers/sending-email/sender-identity/#domain-authentication), `domain_verified`, and [Single Sender Verification](https://sendgrid.com/docs/for-developers/sending-email/sender-identity/#single-sender-verification), `sender_verified`, for the account. An account may have one, both, or neither verification steps completed. If you need to authenticate a domain rather than a Single Sender, see the \"Authenticate a domain\" endpoint. -func (c *ApiService) ListVerifiedSenderStepsCompleted() (interface{}, error) { - path := "/v3/verified_senders/steps_completed" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListVerifiedSenderStepsCompleted200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/verified_senders/api_resend_verified_sender.go b/rest/api/v3/verified_senders/api_resend_verified_sender.go deleted file mode 100644 index 831c5682..00000000 --- a/rest/api/v3/verified_senders/api_resend_verified_sender.go +++ /dev/null @@ -1,93 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Verified Senders API -* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type ResendVerifiedSenderParam struct { - // - Id *string `json:"id"` -} - -func (params *ResendVerifiedSenderParam) SetId(Id string) *ResendVerifiedSenderParam { - params.Id = &Id - return params -} - -// **This endpoint allows you to resend a verification email to a specified Sender Identity**. Passing the `id` assigned to a Sender Identity to this endpoint will resend a verification email to the `from_address` associated with the Sender Identity. This can be useful if someone loses their verification email or needs to have it resent for any other reason. You can retrieve the IDs associated with Sender Identities by passing a \"Get All Verified Senders\" endpoint. -func (c *ApiService) ResendVerifiedSender(params *ResendVerifiedSenderParam) (interface{}, error) { - path := "/v3/verified_senders/resend/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &DeleteVerifiedSender404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &DeleteVerifiedSender404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/verified_senders/api_service.go b/rest/api/v3/verified_senders/api_service.go deleted file mode 100644 index 4ef324e5..00000000 --- a/rest/api/v3/verified_senders/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Verified Senders API -* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/verified_senders/api_update_verified_sender.go b/rest/api/v3/verified_senders/api_update_verified_sender.go deleted file mode 100644 index dd10883a..00000000 --- a/rest/api/v3/verified_senders/api_update_verified_sender.go +++ /dev/null @@ -1,108 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Verified Senders API -* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type UpdateVerifiedSenderParam struct { - // - Id *string `json:"id"` - // - VerifiedSenderRequest *VerifiedSenderRequest `json:"VerifiedSenderRequest,omitempty"` -} - -func (params *UpdateVerifiedSenderParam) SetId(Id string) *UpdateVerifiedSenderParam { - params.Id = &Id - return params -} -func (params *UpdateVerifiedSenderParam) SetVerifiedSenderRequest(VerifiedSenderRequest VerifiedSenderRequest) *UpdateVerifiedSenderParam { - params.VerifiedSenderRequest = &VerifiedSenderRequest - return params -} - -// **This endpoint allows you to update an existing Sender Identity**. Pass the `id` assigned to a Sender Identity to this endpoint as a path parameter. Include any fields you wish to update in the request body in JSON format. You can retrieve the IDs associated with Sender Identities by passing a `GET` request to the Get All Verified Senders endpoint, `/verified_senders`. **Note:** Unlike a `PUT` request, `PATCH` allows you to update only the fields you wish to edit. Fields that are not passed as part of a request will remain unaltered. -func (c *ApiService) UpdateVerifiedSender(params *UpdateVerifiedSenderParam) (interface{}, error) { - path := "/v3/verified_senders/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.VerifiedSenderRequest != nil { - b, err := json.Marshal(*params.VerifiedSenderRequest) - if err != nil { - return nil, err - } - body = b - } - - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &VerifiedSenderResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &CreateVerifiedSender400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &DeleteVerifiedSender404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &DeleteVerifiedSender404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/verified_senders/api_verify_sender_token.go b/rest/api/v3/verified_senders/api_verify_sender_token.go deleted file mode 100644 index 4cd82a33..00000000 --- a/rest/api/v3/verified_senders/api_verify_sender_token.go +++ /dev/null @@ -1,77 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Verified Senders API -* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type VerifySenderTokenParam struct { - // - Token *string `json:"token"` -} - -func (params *VerifySenderTokenParam) SetToken(Token string) *VerifySenderTokenParam { - params.Token = &Token - return params -} - -// **This endpoint allows you to verify a sender requests.** The token is generated by SendGrid and included in a verification email delivered to the address that's pending verification. -func (c *ApiService) VerifySenderToken(params *VerifySenderTokenParam) (interface{}, error) { - path := "/v3/verified_senders/verify/{Token}" - if params != nil && params.Token != nil { - path = strings.Replace(path, "{"+"Token"+"}", *params.Token, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &DeleteVerifiedSender404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/verified_senders/docs/CreateVerifiedSender.md b/rest/api/v3/verified_senders/docs/CreateVerifiedSender.md deleted file mode 100644 index 2d228f45..00000000 --- a/rest/api/v3/verified_senders/docs/CreateVerifiedSender.md +++ /dev/null @@ -1,48 +0,0 @@ -# CreateVerifiedSender - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateVerifiedSender**](CreateVerifiedSender.md#CreateVerifiedSender) | **Post** /v3/verified_senders | Create Verified Sender Request - - - -## CreateVerifiedSender - -> VerifiedSenderResponse CreateVerifiedSender(ctx, optional) - -Create Verified Sender Request - -**This endpoint allows you to create a new Sender Identify**. Upon successful submission of a `POST` request to this endpoint, an identity will be created, and a verification email will be sent to the address assigned to the `from_email` field. You must complete the verification process using the sent email to fully verify the sender. If you need to resend the verification email, you can do so with the Resend Verified Sender Request, `/resend/{id}`, endpoint. If you need to authenticate a domain rather than a Single Sender, see the [Domain Authentication API](https://docs.sendgrid.com/api-reference/domain-authentication/authenticate-a-domain). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateVerifiedSenderParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**VerifiedSenderRequest** | [**VerifiedSenderRequest**](VerifiedSenderRequest.md) | - -### Return type - -[**VerifiedSenderResponse**](VerifiedSenderResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/verified_senders/docs/CreateVerifiedSender400Response.md b/rest/api/v3/verified_senders/docs/CreateVerifiedSender400Response.md deleted file mode 100644 index 600ce1a3..00000000 --- a/rest/api/v3/verified_senders/docs/CreateVerifiedSender400Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateVerifiedSender400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]CreateVerifiedSender400ResponseErrorsInner**](CreateVerifiedSender400ResponseErrorsInner.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/verified_senders/docs/CreateVerifiedSender400ResponseErrorsInner.md b/rest/api/v3/verified_senders/docs/CreateVerifiedSender400ResponseErrorsInner.md deleted file mode 100644 index 490e7921..00000000 --- a/rest/api/v3/verified_senders/docs/CreateVerifiedSender400ResponseErrorsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateVerifiedSender400ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Field** | **string** | |[optional] -**Message** | **string** | | -**ErrorId** | **string** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/verified_senders/docs/DeleteVerifiedSender.md b/rest/api/v3/verified_senders/docs/DeleteVerifiedSender.md deleted file mode 100644 index 64eb0663..00000000 --- a/rest/api/v3/verified_senders/docs/DeleteVerifiedSender.md +++ /dev/null @@ -1,51 +0,0 @@ -# DeleteVerifiedSender - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteVerifiedSender**](DeleteVerifiedSender.md#DeleteVerifiedSender) | **Delete** /v3/verified_senders/{Id} | Delete Verified Sender - - - -## DeleteVerifiedSender - -> map[string]interface{} DeleteVerifiedSender(ctx, Id) - -Delete Verified Sender - -**This endpoint allows you to delete a Sender Identity**. Pass the `id` assigned to a Sender Identity to this endpoint to delete the Sender Identity from your account. You can retrieve the IDs associated with Sender Identities using the \"Get All Verified Senders\" endpoint. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteVerifiedSenderParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/verified_senders/docs/DeleteVerifiedSender403Response.md b/rest/api/v3/verified_senders/docs/DeleteVerifiedSender403Response.md deleted file mode 100644 index 0f07e32b..00000000 --- a/rest/api/v3/verified_senders/docs/DeleteVerifiedSender403Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeleteVerifiedSender403Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]DeleteVerifiedSender403ResponseErrorsInner**](DeleteVerifiedSender403ResponseErrorsInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/verified_senders/docs/DeleteVerifiedSender403ResponseErrorsInner.md b/rest/api/v3/verified_senders/docs/DeleteVerifiedSender403ResponseErrorsInner.md deleted file mode 100644 index 89ece5f2..00000000 --- a/rest/api/v3/verified_senders/docs/DeleteVerifiedSender403ResponseErrorsInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# DeleteVerifiedSender403ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | | -**ErrorId** | **string** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/verified_senders/docs/DeleteVerifiedSender404Response.md b/rest/api/v3/verified_senders/docs/DeleteVerifiedSender404Response.md deleted file mode 100644 index ef2a483c..00000000 --- a/rest/api/v3/verified_senders/docs/DeleteVerifiedSender404Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# DeleteVerifiedSender404Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]DeleteVerifiedSender403ResponseErrorsInner**](DeleteVerifiedSender403ResponseErrorsInner.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/verified_senders/docs/ErrorResponse.md b/rest/api/v3/verified_senders/docs/ErrorResponse.md deleted file mode 100644 index ec2d41f6..00000000 --- a/rest/api/v3/verified_senders/docs/ErrorResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ErrorResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] -**Id** | **string** | When applicable, this property value will be an error ID. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/verified_senders/docs/ErrorResponseErrorsInner.md b/rest/api/v3/verified_senders/docs/ErrorResponseErrorsInner.md deleted file mode 100644 index 5449c685..00000000 --- a/rest/api/v3/verified_senders/docs/ErrorResponseErrorsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ErrorResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | An error message. |[optional] -**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] -**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/verified_senders/docs/ListVerifiedSender.md b/rest/api/v3/verified_senders/docs/ListVerifiedSender.md deleted file mode 100644 index 115a8292..00000000 --- a/rest/api/v3/verified_senders/docs/ListVerifiedSender.md +++ /dev/null @@ -1,50 +0,0 @@ -# ListVerifiedSender - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListVerifiedSender**](ListVerifiedSender.md#ListVerifiedSender) | **Get** /v3/verified_senders | Get All Verified Senders - - - -## ListVerifiedSender - -> ListVerifiedSender200Response ListVerifiedSender(ctx, optional) - -Get All Verified Senders - -**This endpoint allows you to retrieve all the Sender Identities associated with an account.** This endpoint will return both verified and unverified senders. You can limit the number of results returned using the `limit`, `lastSeenID`, and `id` query string parameters. * `limit` allows you to specify an exact number of Sender Identities to return. * `lastSeenID` will return senders with an ID number occuring after the passed in ID. In other words, the `lastSeenID` provides a starting point from which SendGrid will iterate to find Sender Identities associated with your account. * `id` will return information about only the Sender Identity passed in the request. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListVerifiedSenderParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Limit** | **float32** | Specifies the number of results to be returned by the API. This parameter can be used to limit the results returned or in combination with the `lastSeenID` parameter to iterate through paginated results. -**LastSeenID** | **float32** | Returns senders with an ID number occurring after the passed in ID. In other words, the `lastSeenID` provides a starting point from which SendGrid will iterate to find Sender Identities associated with your account. -**Id** | **int32** | Returns information about only the Sender Identity passed in the request. - -### Return type - -[**ListVerifiedSender200Response**](ListVerifiedSender200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/verified_senders/docs/ListVerifiedSender200Response.md b/rest/api/v3/verified_senders/docs/ListVerifiedSender200Response.md deleted file mode 100644 index 6d5bfc9d..00000000 --- a/rest/api/v3/verified_senders/docs/ListVerifiedSender200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListVerifiedSender200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Results** | [**[]VerifiedSenderResponse**](VerifiedSenderResponse.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain.md b/rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain.md deleted file mode 100644 index 1669c7e7..00000000 --- a/rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain.md +++ /dev/null @@ -1,44 +0,0 @@ -# ListVerifiedSenderDomain - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListVerifiedSenderDomain**](ListVerifiedSenderDomain.md#ListVerifiedSenderDomain) | **Get** /v3/verified_senders/domains | Domain Warn List - - - -## ListVerifiedSenderDomain - -> ListVerifiedSenderDomain200Response ListVerifiedSenderDomain(ctx, ) - -Domain Warn List - -**This endpoint returns a list of domains known to implement DMARC and categorizes them by failure type — hard failure or soft failure**. Domains listed as hard failures will not deliver mail when used as a [Sender Identity](https://sendgrid.com/docs/for-developers/sending-email/sender-identity/) due to the domain's DMARC policy settings. For example, using a `yahoo.com` email address as a Sender Identity will likely result in the rejection of your mail. For more information about DMARC, see [Everything about DMARC](https://sendgrid.com/docs/ui/sending-email/dmarc/). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListVerifiedSenderDomainParams struct - - -### Return type - -[**ListVerifiedSenderDomain200Response**](ListVerifiedSenderDomain200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain200Response.md b/rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain200Response.md deleted file mode 100644 index fed32ddc..00000000 --- a/rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListVerifiedSenderDomain200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Results** | [**ListVerifiedSenderDomain200ResponseResults**](ListVerifiedSenderDomain200ResponseResults.md) | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain200ResponseResults.md b/rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain200ResponseResults.md deleted file mode 100644 index 2217409c..00000000 --- a/rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain200ResponseResults.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListVerifiedSenderDomain200ResponseResults - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SoftFailures** | **[]string** | | -**HardFailures** | **[]string** | | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted.md b/rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted.md deleted file mode 100644 index e793dd48..00000000 --- a/rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted.md +++ /dev/null @@ -1,44 +0,0 @@ -# ListVerifiedSenderStepsCompleted - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListVerifiedSenderStepsCompleted**](ListVerifiedSenderStepsCompleted.md#ListVerifiedSenderStepsCompleted) | **Get** /v3/verified_senders/steps_completed | Completed Steps - - - -## ListVerifiedSenderStepsCompleted - -> ListVerifiedSenderStepsCompleted200Response ListVerifiedSenderStepsCompleted(ctx, ) - -Completed Steps - -**This endpoint allows you to determine which of SendGrid’s verification processes have been completed for an account**. This endpoint returns boolean values, `true` and `false`, for [Domain Authentication](https://sendgrid.com/docs/for-developers/sending-email/sender-identity/#domain-authentication), `domain_verified`, and [Single Sender Verification](https://sendgrid.com/docs/for-developers/sending-email/sender-identity/#single-sender-verification), `sender_verified`, for the account. An account may have one, both, or neither verification steps completed. If you need to authenticate a domain rather than a Single Sender, see the \"Authenticate a domain\" endpoint. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListVerifiedSenderStepsCompletedParams struct - - -### Return type - -[**ListVerifiedSenderStepsCompleted200Response**](ListVerifiedSenderStepsCompleted200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted200Response.md b/rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted200Response.md deleted file mode 100644 index 2257b312..00000000 --- a/rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListVerifiedSenderStepsCompleted200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Results** | [**ListVerifiedSenderStepsCompleted200ResponseResults**](ListVerifiedSenderStepsCompleted200ResponseResults.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted200ResponseResults.md b/rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted200ResponseResults.md deleted file mode 100644 index b114a2ad..00000000 --- a/rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted200ResponseResults.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListVerifiedSenderStepsCompleted200ResponseResults - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SenderVerified** | **bool** | |[optional] -**DomainVerified** | **bool** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/verified_senders/docs/ResendVerifiedSender.md b/rest/api/v3/verified_senders/docs/ResendVerifiedSender.md deleted file mode 100644 index d7837503..00000000 --- a/rest/api/v3/verified_senders/docs/ResendVerifiedSender.md +++ /dev/null @@ -1,51 +0,0 @@ -# ResendVerifiedSender - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ResendVerifiedSender**](ResendVerifiedSender.md#ResendVerifiedSender) | **Post** /v3/verified_senders/resend/{Id} | Resend Verified Sender Request - - - -## ResendVerifiedSender - -> map[string]interface{} ResendVerifiedSender(ctx, Id) - -Resend Verified Sender Request - -**This endpoint allows you to resend a verification email to a specified Sender Identity**. Passing the `id` assigned to a Sender Identity to this endpoint will resend a verification email to the `from_address` associated with the Sender Identity. This can be useful if someone loses their verification email or needs to have it resent for any other reason. You can retrieve the IDs associated with Sender Identities by passing a \"Get All Verified Senders\" endpoint. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a ResendVerifiedSenderParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/verified_senders/docs/UpdateVerifiedSender.md b/rest/api/v3/verified_senders/docs/UpdateVerifiedSender.md deleted file mode 100644 index cf10ee97..00000000 --- a/rest/api/v3/verified_senders/docs/UpdateVerifiedSender.md +++ /dev/null @@ -1,52 +0,0 @@ -# UpdateVerifiedSender - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateVerifiedSender**](UpdateVerifiedSender.md#UpdateVerifiedSender) | **Patch** /v3/verified_senders/{Id} | Edit Verified Sender - - - -## UpdateVerifiedSender - -> VerifiedSenderResponse UpdateVerifiedSender(ctx, Idoptional) - -Edit Verified Sender - -**This endpoint allows you to update an existing Sender Identity**. Pass the `id` assigned to a Sender Identity to this endpoint as a path parameter. Include any fields you wish to update in the request body in JSON format. You can retrieve the IDs associated with Sender Identities by passing a `GET` request to the Get All Verified Senders endpoint, `/verified_senders`. **Note:** Unlike a `PUT` request, `PATCH` allows you to update only the fields you wish to edit. Fields that are not passed as part of a request will remain unaltered. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateVerifiedSenderParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**VerifiedSenderRequest** | [**VerifiedSenderRequest**](VerifiedSenderRequest.md) | - -### Return type - -[**VerifiedSenderResponse**](VerifiedSenderResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/verified_senders/docs/VerifiedSenderRequest.md b/rest/api/v3/verified_senders/docs/VerifiedSenderRequest.md deleted file mode 100644 index adb9c1cf..00000000 --- a/rest/api/v3/verified_senders/docs/VerifiedSenderRequest.md +++ /dev/null @@ -1,21 +0,0 @@ -# VerifiedSenderRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Nickname** | **string** | | -**FromEmail** | **string** | | -**FromName** | **string** | |[optional] -**ReplyTo** | **string** | | -**ReplyToName** | **string** | |[optional] -**Address** | **string** | |[optional] -**Address2** | **string** | |[optional] -**State** | **string** | |[optional] -**City** | **string** | |[optional] -**Zip** | **string** | |[optional] -**Country** | **string** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/verified_senders/docs/VerifiedSenderResponse.md b/rest/api/v3/verified_senders/docs/VerifiedSenderResponse.md deleted file mode 100644 index 4a6bf8df..00000000 --- a/rest/api/v3/verified_senders/docs/VerifiedSenderResponse.md +++ /dev/null @@ -1,24 +0,0 @@ -# VerifiedSenderResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **int32** | |[optional] -**Nickname** | **string** | |[optional] -**FromEmail** | **string** | |[optional] -**FromName** | **string** | |[optional] -**ReplyTo** | **string** | |[optional] -**ReplyToName** | **string** | |[optional] -**Address** | **string** | |[optional] -**Address2** | **string** | |[optional] -**State** | **string** | |[optional] -**City** | **string** | |[optional] -**Zip** | **string** | |[optional] -**Country** | **string** | |[optional] -**Verified** | **bool** | |[optional] -**Locked** | **bool** | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/verified_senders/docs/VerifySenderToken.md b/rest/api/v3/verified_senders/docs/VerifySenderToken.md deleted file mode 100644 index 5dec772e..00000000 --- a/rest/api/v3/verified_senders/docs/VerifySenderToken.md +++ /dev/null @@ -1,51 +0,0 @@ -# VerifySenderToken - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**VerifySenderToken**](VerifySenderToken.md#VerifySenderToken) | **Get** /v3/verified_senders/verify/{Token} | Verify Sender Request - - - -## VerifySenderToken - -> VerifySenderToken(ctx, Token) - -Verify Sender Request - -**This endpoint allows you to verify a sender requests.** The token is generated by SendGrid and included in a verification email delivered to the address that's pending verification. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Token** | **string** | - -### Other Parameters - -Other parameters are passed through a pointer to a VerifySenderTokenParams struct - - -Name | Type | Description -------------- | ------------- | ------------- - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/verified_senders/model_create_verified_sender_400_response.go b/rest/api/v3/verified_senders/model_create_verified_sender_400_response.go deleted file mode 100644 index 5b15d971..00000000 --- a/rest/api/v3/verified_senders/model_create_verified_sender_400_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Verified Senders API -* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateVerifiedSender400Response struct for CreateVerifiedSender400Response -type CreateVerifiedSender400Response struct { - Errors []CreateVerifiedSender400ResponseErrorsInner `json:"errors"` -} diff --git a/rest/api/v3/verified_senders/model_create_verified_sender_400_response_errors_inner.go b/rest/api/v3/verified_senders/model_create_verified_sender_400_response_errors_inner.go deleted file mode 100644 index 6682ad11..00000000 --- a/rest/api/v3/verified_senders/model_create_verified_sender_400_response_errors_inner.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Verified Senders API -* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateVerifiedSender400ResponseErrorsInner struct for CreateVerifiedSender400ResponseErrorsInner -type CreateVerifiedSender400ResponseErrorsInner struct { - Field *string `json:"field,omitempty"` - Message string `json:"message"` - ErrorId string `json:"error_id"` -} diff --git a/rest/api/v3/verified_senders/model_delete_verified_sender_403_response.go b/rest/api/v3/verified_senders/model_delete_verified_sender_403_response.go deleted file mode 100644 index 2aa7215f..00000000 --- a/rest/api/v3/verified_senders/model_delete_verified_sender_403_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Verified Senders API -* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DeleteVerifiedSender403Response struct for DeleteVerifiedSender403Response -type DeleteVerifiedSender403Response struct { - Errors *[]DeleteVerifiedSender403ResponseErrorsInner `json:"errors,omitempty"` -} diff --git a/rest/api/v3/verified_senders/model_delete_verified_sender_403_response_errors_inner.go b/rest/api/v3/verified_senders/model_delete_verified_sender_403_response_errors_inner.go deleted file mode 100644 index f3f8a340..00000000 --- a/rest/api/v3/verified_senders/model_delete_verified_sender_403_response_errors_inner.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Verified Senders API -* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DeleteVerifiedSender403ResponseErrorsInner struct for DeleteVerifiedSender403ResponseErrorsInner -type DeleteVerifiedSender403ResponseErrorsInner struct { - Message string `json:"message"` - ErrorId string `json:"error_id"` -} diff --git a/rest/api/v3/verified_senders/model_delete_verified_sender_404_response.go b/rest/api/v3/verified_senders/model_delete_verified_sender_404_response.go deleted file mode 100644 index b25527ed..00000000 --- a/rest/api/v3/verified_senders/model_delete_verified_sender_404_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Verified Senders API -* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// DeleteVerifiedSender404Response struct for DeleteVerifiedSender404Response -type DeleteVerifiedSender404Response struct { - Errors []DeleteVerifiedSender403ResponseErrorsInner `json:"errors"` -} diff --git a/rest/api/v3/verified_senders/model_error_response.go b/rest/api/v3/verified_senders/model_error_response.go deleted file mode 100644 index e607f39f..00000000 --- a/rest/api/v3/verified_senders/model_error_response.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Verified Senders API -* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponse struct for ErrorResponse -type ErrorResponse struct { - Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` - // When applicable, this property value will be an error ID. - Id *string `json:"id,omitempty"` -} diff --git a/rest/api/v3/verified_senders/model_error_response_errors_inner.go b/rest/api/v3/verified_senders/model_error_response_errors_inner.go deleted file mode 100644 index f544f8bb..00000000 --- a/rest/api/v3/verified_senders/model_error_response_errors_inner.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Verified Senders API -* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner -type ErrorResponseErrorsInner struct { - // An error message. - Message *string `json:"message,omitempty"` - // When applicable, this property value will be the field that generated the error. - Field *string `json:"field,omitempty"` - // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. - Help *map[string]interface{} `json:"help,omitempty"` -} diff --git a/rest/api/v3/verified_senders/model_list_verified_sender_200_response.go b/rest/api/v3/verified_senders/model_list_verified_sender_200_response.go deleted file mode 100644 index 3a68dd4b..00000000 --- a/rest/api/v3/verified_senders/model_list_verified_sender_200_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Verified Senders API -* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListVerifiedSender200Response struct for ListVerifiedSender200Response -type ListVerifiedSender200Response struct { - Results *[]VerifiedSenderResponse `json:"results,omitempty"` -} diff --git a/rest/api/v3/verified_senders/model_list_verified_sender_domain_200_response.go b/rest/api/v3/verified_senders/model_list_verified_sender_domain_200_response.go deleted file mode 100644 index 3f77bce9..00000000 --- a/rest/api/v3/verified_senders/model_list_verified_sender_domain_200_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Verified Senders API -* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListVerifiedSenderDomain200Response struct for ListVerifiedSenderDomain200Response -type ListVerifiedSenderDomain200Response struct { - Results ListVerifiedSenderDomain200ResponseResults `json:"results"` -} diff --git a/rest/api/v3/verified_senders/model_list_verified_sender_domain_200_response_results.go b/rest/api/v3/verified_senders/model_list_verified_sender_domain_200_response_results.go deleted file mode 100644 index 703a3515..00000000 --- a/rest/api/v3/verified_senders/model_list_verified_sender_domain_200_response_results.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Verified Senders API -* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListVerifiedSenderDomain200ResponseResults struct for ListVerifiedSenderDomain200ResponseResults -type ListVerifiedSenderDomain200ResponseResults struct { - SoftFailures []string `json:"soft_failures"` - HardFailures []string `json:"hard_failures"` -} diff --git a/rest/api/v3/verified_senders/model_list_verified_sender_steps_completed_200_response.go b/rest/api/v3/verified_senders/model_list_verified_sender_steps_completed_200_response.go deleted file mode 100644 index a252d30c..00000000 --- a/rest/api/v3/verified_senders/model_list_verified_sender_steps_completed_200_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Verified Senders API -* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListVerifiedSenderStepsCompleted200Response struct for ListVerifiedSenderStepsCompleted200Response -type ListVerifiedSenderStepsCompleted200Response struct { - Results *ListVerifiedSenderStepsCompleted200ResponseResults `json:"results,omitempty"` -} diff --git a/rest/api/v3/verified_senders/model_list_verified_sender_steps_completed_200_response_results.go b/rest/api/v3/verified_senders/model_list_verified_sender_steps_completed_200_response_results.go deleted file mode 100644 index 21b54ce8..00000000 --- a/rest/api/v3/verified_senders/model_list_verified_sender_steps_completed_200_response_results.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Verified Senders API -* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListVerifiedSenderStepsCompleted200ResponseResults struct for ListVerifiedSenderStepsCompleted200ResponseResults -type ListVerifiedSenderStepsCompleted200ResponseResults struct { - SenderVerified *bool `json:"sender_verified,omitempty"` - DomainVerified *bool `json:"domain_verified,omitempty"` -} diff --git a/rest/api/v3/verified_senders/model_verified_sender_request.go b/rest/api/v3/verified_senders/model_verified_sender_request.go deleted file mode 100644 index 3dc370c4..00000000 --- a/rest/api/v3/verified_senders/model_verified_sender_request.go +++ /dev/null @@ -1,29 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Verified Senders API -* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// VerifiedSenderRequest struct for VerifiedSenderRequest -type VerifiedSenderRequest struct { - Nickname string `json:"nickname"` - FromEmail string `json:"from_email"` - FromName *string `json:"from_name,omitempty"` - ReplyTo string `json:"reply_to"` - ReplyToName *string `json:"reply_to_name,omitempty"` - Address *string `json:"address,omitempty"` - Address2 *string `json:"address2,omitempty"` - State *string `json:"state,omitempty"` - City *string `json:"city,omitempty"` - Zip *string `json:"zip,omitempty"` - Country *string `json:"country,omitempty"` -} diff --git a/rest/api/v3/verified_senders/model_verified_sender_response.go b/rest/api/v3/verified_senders/model_verified_sender_response.go deleted file mode 100644 index 308efbc6..00000000 --- a/rest/api/v3/verified_senders/model_verified_sender_response.go +++ /dev/null @@ -1,32 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Verified Senders API -* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// VerifiedSenderResponse struct for VerifiedSenderResponse -type VerifiedSenderResponse struct { - Id *int32 `json:"id,omitempty"` - Nickname *string `json:"nickname,omitempty"` - FromEmail *string `json:"from_email,omitempty"` - FromName *string `json:"from_name,omitempty"` - ReplyTo *string `json:"reply_to,omitempty"` - ReplyToName *string `json:"reply_to_name,omitempty"` - Address *string `json:"address,omitempty"` - Address2 *string `json:"address2,omitempty"` - State *string `json:"state,omitempty"` - City *string `json:"city,omitempty"` - Zip *string `json:"zip,omitempty"` - Country *string `json:"country,omitempty"` - Verified *bool `json:"verified,omitempty"` - Locked *bool `json:"locked,omitempty"` -} diff --git a/rest/api/v3/webhooks/.openapi-generator b/rest/api/v3/webhooks/.openapi-generator deleted file mode 100644 index f4bbd6a5..00000000 --- a/rest/api/v3/webhooks/.openapi-generator +++ /dev/null @@ -1,80 +0,0 @@ -.openapi-generator -.openapi-generator-ignore -README.md -api_create_event_webhook.go -api_create_parse_setting.go -api_delete_event_webhook.go -api_delete_parse_setting.go -api_get_event_webhook.go -api_get_parse_setting.go -api_get_signed_event_webhook.go -api_list_event_webhook.go -api_list_parse_setting.go -api_list_parse_static.go -api_service.go -api_test_event_webhook.go -api_update_event_webhook.go -api_update_parse_setting.go -api_update_signed_event_webhook.go -docs/AggregatedBy.md -docs/CreateEventWebhook.md -docs/CreateEventWebhook400Response.md -docs/CreateEventWebhook400ResponseErrorsInner.md -docs/CreateParseSetting.md -docs/DeleteEventWebhook.md -docs/DeleteParseSetting.md -docs/ErrorResponse.md -docs/ErrorResponseErrorsInner.md -docs/EventWebhookAllResponse.md -docs/EventWebhookBaseResponseProps.md -docs/EventWebhookDateResponseProps.md -docs/EventWebhookNoDatesResponse.md -docs/EventWebhookOauthResponseProps.md -docs/EventWebhookRequest.md -docs/EventWebhookSignedResponse.md -docs/EventWebhookSignedResponseProp.md -docs/EventWebhookTestRequest.md -docs/EventWebhookUnsignedResponse.md -docs/GetEventWebhook.md -docs/GetParseSetting.md -docs/GetSignedEventWebhook.md -docs/GetSignedEventWebhook200Response.md -docs/GetSignedEventWebhook404Response.md -docs/GetSignedEventWebhook404ResponseErrorsInner.md -docs/ListEventWebhook.md -docs/ListParseSetting.md -docs/ListParseSetting200Response.md -docs/ListParseStatic.md -docs/ListParseStatic200ResponseInner.md -docs/ListParseStatic200ResponseInnerStatsInner.md -docs/ListParseStatic200ResponseInnerStatsInnerMetrics.md -docs/ParseSetting.md -docs/TestEventWebhook.md -docs/UpdateEventWebhook.md -docs/UpdateParseSetting.md -docs/UpdateSignedEventWebhook.md -docs/UpdateSignedEventWebhookRequest.md -model_aggregated_by.go -model_create_event_webhook_400_response.go -model_create_event_webhook_400_response_errors_inner.go -model_error_response.go -model_error_response_errors_inner.go -model_event_webhook_all_response.go -model_event_webhook_base_response_props.go -model_event_webhook_date_response_props.go -model_event_webhook_no_dates_response.go -model_event_webhook_oauth_response_props.go -model_event_webhook_request.go -model_event_webhook_signed_response.go -model_event_webhook_signed_response_prop.go -model_event_webhook_test_request.go -model_event_webhook_unsigned_response.go -model_get_signed_event_webhook_200_response.go -model_get_signed_event_webhook_404_response.go -model_get_signed_event_webhook_404_response_errors_inner.go -model_list_parse_setting_200_response.go -model_list_parse_static_200_response_inner.go -model_list_parse_static_200_response_inner_stats_inner.go -model_list_parse_static_200_response_inner_stats_inner_metrics.go -model_parse_setting.go -model_update_signed_event_webhook_request.go diff --git a/rest/api/v3/webhooks/.openapi-generator-ignore b/rest/api/v3/webhooks/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rest/api/v3/webhooks/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rest/api/v3/webhooks/README.md b/rest/api/v3/webhooks/README.md deleted file mode 100644 index e7ffa141..00000000 --- a/rest/api/v3/webhooks/README.md +++ /dev/null @@ -1,100 +0,0 @@ -# Go API client for - -The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. - -Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. - -The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. - -## Overview -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. - -- API version: 1.0.0 -- Package version: -- Build date: 2024-10-04T16:57:38.593153+05:30[Asia/Kolkata] -- Build package: com.sendgrid.oai.go.SendgridGoGenerator -For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) - -## Installation - -Install the following dependencies: - -```shell -go get github.com/stretchr/testify/assert -go get golang.org/x/net/context -``` - -Put the package under your project folder and add the following in import: - -```golang -import "./" -``` - -## Documentation for API Endpoints - -All URIs are relative to *https://api.sendgrid.com* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*CreateEventWebhook* | [**CreateEventWebhook**](docs/CreateEventWebhook.md#createeventwebhook) | **Post** /v3/user/webhooks/event/settings | Create a new Event Webhook -*CreateParseSetting* | [**CreateParseSetting**](docs/CreateParseSetting.md#createparsesetting) | **Post** /v3/user/webhooks/parse/settings | Create a parse setting -*DeleteEventWebhook* | [**DeleteEventWebhook**](docs/DeleteEventWebhook.md#deleteeventwebhook) | **Delete** /v3/user/webhooks/event/settings/{Id} | Delete a single Event Webhook by ID. -*DeleteParseSetting* | [**DeleteParseSetting**](docs/DeleteParseSetting.md#deleteparsesetting) | **Delete** /v3/user/webhooks/parse/settings/{Hostname} | Delete a parse setting -*GetEventWebhook* | [**GetEventWebhook**](docs/GetEventWebhook.md#geteventwebhook) | **Get** /v3/user/webhooks/event/settings/{Id} | Get the settings for a single Event Webhook. -*GetParseSetting* | [**GetParseSetting**](docs/GetParseSetting.md#getparsesetting) | **Get** /v3/user/webhooks/parse/settings/{Hostname} | Retrieve a specific parse setting -*GetSignedEventWebhook* | [**GetSignedEventWebhook**](docs/GetSignedEventWebhook.md#getsignedeventwebhook) | **Get** /v3/user/webhooks/event/settings/signed/{Id} | Get Signed Event Webhook's Public Key -*ListEventWebhook* | [**ListEventWebhook**](docs/ListEventWebhook.md#listeventwebhook) | **Get** /v3/user/webhooks/event/settings/all | Retrieve all of your Event Webhooks. -*ListParseSetting* | [**ListParseSetting**](docs/ListParseSetting.md#listparsesetting) | **Get** /v3/user/webhooks/parse/settings | Retrieve all parse settings -*ListParseStatic* | [**ListParseStatic**](docs/ListParseStatic.md#listparsestatic) | **Get** /v3/user/webhooks/parse/stats | Retrieves Inbound Parse Webhook statistics. -*TestEventWebhook* | [**TestEventWebhook**](docs/TestEventWebhook.md#testeventwebhook) | **Post** /v3/user/webhooks/event/test | Test an Event Webhook's settings -*UpdateEventWebhook* | [**UpdateEventWebhook**](docs/UpdateEventWebhook.md#updateeventwebhook) | **Patch** /v3/user/webhooks/event/settings/{Id} | Update a single Event Webhook by ID. -*UpdateParseSetting* | [**UpdateParseSetting**](docs/UpdateParseSetting.md#updateparsesetting) | **Patch** /v3/user/webhooks/parse/settings/{Hostname} | Update a parse setting -*UpdateSignedEventWebhook* | [**UpdateSignedEventWebhook**](docs/UpdateSignedEventWebhook.md#updatesignedeventwebhook) | **Patch** /v3/user/webhooks/event/settings/signed/{Id} | Toggle signature verification for a single Event Webhook by ID - - -## Documentation For Models - - - [AggregatedBy](AggregatedBy.md) - - [CreateEventWebhook400Response](CreateEventWebhook400Response.md) - - [CreateEventWebhook400ResponseErrorsInner](CreateEventWebhook400ResponseErrorsInner.md) - - [ErrorResponse](ErrorResponse.md) - - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) - - [EventWebhookAllResponse](EventWebhookAllResponse.md) - - [EventWebhookBaseResponseProps](EventWebhookBaseResponseProps.md) - - [EventWebhookDateResponseProps](EventWebhookDateResponseProps.md) - - [EventWebhookNoDatesResponse](EventWebhookNoDatesResponse.md) - - [EventWebhookOauthResponseProps](EventWebhookOauthResponseProps.md) - - [EventWebhookRequest](EventWebhookRequest.md) - - [EventWebhookSignedResponse](EventWebhookSignedResponse.md) - - [EventWebhookSignedResponseProp](EventWebhookSignedResponseProp.md) - - [EventWebhookTestRequest](EventWebhookTestRequest.md) - - [EventWebhookUnsignedResponse](EventWebhookUnsignedResponse.md) - - [GetSignedEventWebhook200Response](GetSignedEventWebhook200Response.md) - - [GetSignedEventWebhook404Response](GetSignedEventWebhook404Response.md) - - [GetSignedEventWebhook404ResponseErrorsInner](GetSignedEventWebhook404ResponseErrorsInner.md) - - [ListParseSetting200Response](ListParseSetting200Response.md) - - [ListParseStatic200ResponseInner](ListParseStatic200ResponseInner.md) - - [ListParseStatic200ResponseInnerStatsInner](ListParseStatic200ResponseInnerStatsInner.md) - - [ListParseStatic200ResponseInnerStatsInnerMetrics](ListParseStatic200ResponseInnerStatsInnerMetrics.md) - - [ParseSetting](ParseSetting.md) - - [UpdateSignedEventWebhookRequest](UpdateSignedEventWebhookRequest.md) - - -## Documentation For Authorization - - - -## BearerAuth - -- **Type**: HTTP basic authentication - -Example - -```golang -auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ - UserName: "username", - Password: "password", -}) -r, err := client.Service.Operation(auth, args) -``` - diff --git a/rest/api/v3/webhooks/api_create_event_webhook.go b/rest/api/v3/webhooks/api_create_event_webhook.go deleted file mode 100644 index 6b1ce155..00000000 --- a/rest/api/v3/webhooks/api_create_event_webhook.go +++ /dev/null @@ -1,82 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type CreateEventWebhookParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - EventWebhookRequest *EventWebhookRequest `json:"EventWebhookRequest,omitempty"` -} - -func (params *CreateEventWebhookParam) SetOnbehalfof(Onbehalfof string) *CreateEventWebhookParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *CreateEventWebhookParam) SetEventWebhookRequest(EventWebhookRequest EventWebhookRequest) *CreateEventWebhookParam { - params.EventWebhookRequest = &EventWebhookRequest - return params -} - -// **This endpoint allows you to create a new Event Webhook.** When creating a webhook, you will provide a URL where you want the webhook to send POST requests, and you will select which events you want to receive in those request. See the [**Event Webhook Reference**](https://docs.sendgrid.com/for-developers/tracking-events/event#delivery-events) for details about each event type. ### Webhook identifiers When your webhook is succesfully created, you will receive a webhook `id` in the response returned by this endpoint. You can use that ID to [update the webhook's settings](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook), [delete the webhook](https://docs.sendgrid.com/api-reference/webhooks/delete-an-event-webhook), [enable or disable signature verification for the webhook](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook), and, if signature verification is enabled, [retrieve the webhook's public key](https://docs.sendgrid.com/api-reference/webhooks/get-signed-event-webhooks-public-key). You may also assign an optional friendly name to each of your webhooks. The friendly name is for convenience only and should not be used to programmatically differentiate your webhooks because it does not need to be unique. Use the webhook ID to reliably differentiate among your webhooks. ### OAuth You can optionally configure OAuth verification for your webhook at the time of creation by passing the appropriate values in the `oauth_client_id`, `oauth_client_secret`, and `oauth_token_url` properties. You can enable or disable OAuth for the webhook after creation with the [**Update an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) operation. You may share one OAuth configuration across all your webhooks or create unique credentials for each. See our [webhook security documentation](https://docs.sendgrid.com/for-developers/tracking-events/getting-started-event-webhook-security-features#oauth-20) for details about OAuth and the Event Webhook. ### Signature verification Enabling signature verification for your webhook is a separate process and cannot be done at the time of creation with this endpoint. You can use the webhook ID to [enable or disable signature verification with the endpoint dedicated for that operation](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook). -func (c *ApiService) CreateEventWebhook(params *CreateEventWebhookParam) (interface{}, error) { - path := "/v3/user/webhooks/event/settings" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.EventWebhookRequest != nil { - b, err := json.Marshal(*params.EventWebhookRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &EventWebhookUnsignedResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &CreateEventWebhook400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/webhooks/api_create_parse_setting.go b/rest/api/v3/webhooks/api_create_parse_setting.go deleted file mode 100644 index a0ca6e2e..00000000 --- a/rest/api/v3/webhooks/api_create_parse_setting.go +++ /dev/null @@ -1,98 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type CreateParseSettingParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - ParseSetting *ParseSetting `json:"ParseSetting,omitempty"` -} - -func (params *CreateParseSettingParam) SetOnbehalfof(Onbehalfof string) *CreateParseSettingParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *CreateParseSettingParam) SetParseSetting(ParseSetting ParseSetting) *CreateParseSettingParam { - params.ParseSetting = &ParseSetting - return params -} - -// **This endpoint allows you to create a new inbound parse setting.** Creating an Inbound Parse setting requires two pieces of information: a `url` and a `hostname`. The `hostname` must correspond to a domain authenticated by Twilio SendGrid on your account. If you need to complete domain authentication, you can use the [Twilio SendGrid App](https://app.sendgrid.com/settings/sender_auth) or the **Authenticate a Domain** endpoint. See [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/) for instructions. Any email received by the `hostname` will be parsed when you complete this setup. You must also add a Twilio SendGrid MX record to this domain's DNS records. See [**Setting up the Inbound Parse Webhook**](https://sendgrid.com/docs/for-developers/parsing-email/setting-up-the-inbound-parse-webhook/) for full instructions. The `url` represents a location where the parsed message data will be delivered. Twilio SendGrid will make an HTTP POST request to this `url` with the message data. The `url` must be publicly reachable, and your application must return a `200` status code to signal that the message data has been received. -func (c *ApiService) CreateParseSetting(params *CreateParseSettingParam) (interface{}, error) { - path := "/v3/user/webhooks/parse/settings" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.ParseSetting != nil { - b, err := json.Marshal(*params.ParseSetting) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 201 { - ps := &ParseSetting{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/webhooks/api_delete_event_webhook.go b/rest/api/v3/webhooks/api_delete_event_webhook.go deleted file mode 100644 index 5c2182d8..00000000 --- a/rest/api/v3/webhooks/api_delete_event_webhook.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteEventWebhookParam struct { - // The ID of the Event Webhook you want to retrieve. - Id *string `json:"id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *DeleteEventWebhookParam) SetId(Id string) *DeleteEventWebhookParam { - params.Id = &Id - return params -} -func (params *DeleteEventWebhookParam) SetOnbehalfof(Onbehalfof string) *DeleteEventWebhookParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to delete a single Event Webhook by ID.** Unlike the [**Get an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/get-an-event-webhook) and [**Update an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) endpoints, which will operate on your oldest webhook by `created_date` when you don't provide an ID, this endpoint will return an error if you do not pass it an ID. This behavior prevents customers from unintentionally deleting a webhook. You can retrieve your webhooks' IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. ### Enable or disable the webhook This endpoint will permanently delete the webhook specified. If you instead want to disable a webhook, you can set the `enabled` property to `false` with the [**Update an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) endpoint. -func (c *ApiService) DeleteEventWebhook(params *DeleteEventWebhookParam) (interface{}, error) { - path := "/v3/user/webhooks/event/settings/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 404 { - ps := &GetSignedEventWebhook404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/webhooks/api_delete_parse_setting.go b/rest/api/v3/webhooks/api_delete_parse_setting.go deleted file mode 100644 index f153aa53..00000000 --- a/rest/api/v3/webhooks/api_delete_parse_setting.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type DeleteParseSettingParam struct { - // The hostname associated with the inbound parse setting that you would like to retrieve. - Hostname *string `json:"hostname"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *DeleteParseSettingParam) SetHostname(Hostname string) *DeleteParseSettingParam { - params.Hostname = &Hostname - return params -} -func (params *DeleteParseSettingParam) SetOnbehalfof(Onbehalfof string) *DeleteParseSettingParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to delete a specific inbound parse setting by hostname.** You can retrieve all your Inbound Parse settings and their associated host names with the \"Retrieve all parse settings\" endpoint. -func (c *ApiService) DeleteParseSetting(params *DeleteParseSettingParam) (interface{}, error) { - path := "/v3/user/webhooks/parse/settings/{Hostname}" - if params != nil && params.Hostname != nil { - path = strings.Replace(path, "{"+"Hostname"+"}", *params.Hostname, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 204 { - ps := &map[string]interface{}{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/webhooks/api_get_event_webhook.go b/rest/api/v3/webhooks/api_get_event_webhook.go deleted file mode 100644 index 0f76419b..00000000 --- a/rest/api/v3/webhooks/api_get_event_webhook.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetEventWebhookParam struct { - // The ID of the Event Webhook you want to retrieve. - Id *string `json:"id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // Use this to include optional fields in the response payload. When this is set to `include=account_status_change`, the `account_status_change` field will be part of the response payload and set to `false` by default. See [Update an event webhook](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) for enabling this webhook notification which lets you subscribe to account status change events related to compliance action taken by SendGrid. - Include *string `json:"include,omitempty"` -} - -func (params *GetEventWebhookParam) SetId(Id string) *GetEventWebhookParam { - params.Id = &Id - return params -} -func (params *GetEventWebhookParam) SetOnbehalfof(Onbehalfof string) *GetEventWebhookParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *GetEventWebhookParam) SetInclude(Include string) *GetEventWebhookParam { - params.Include = &Include - return params -} - -// **This endpoint allows you to retrieve a single Event Webhook by ID.** If you do not pass a webhook ID to this endpoint, it will return your oldest webhook by `created_date`. This means the default webhook returned by this endpoint when no ID is provided will be the first one you created. This functionality allows customers who do not have multiple webhooks to use this endpoint to retrieve their only webhook, even if they do not supply an ID. If you have multiple webhooks, you can retrieve their IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. ### Event settings Your webhook will be returned with all of its settings, which include the events that will be included in the POST request by the webhook and the URL where they will be sent. If an event type is marked as `true`, the event webhook will send information about that event type. See the [**Event Webhook Reference**](https://docs.sendgrid.com/for-developers/tracking-events/event#delivery-events) for details about each event type. ### Signature verification The `public_key` property will be returned only for webhooks with signature verification enabled. ### OAuth You may share one OAuth configuration across all your webhooks or create unique credentials for each. The OAuth properties will be returned only for webhooks with OAuth configured. -func (c *ApiService) GetEventWebhook(params *GetEventWebhookParam) (interface{}, error) { - path := "/v3/user/webhooks/event/settings/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Include != nil { - data.Set("include", *params.Include) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &EventWebhookNoDatesResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &GetSignedEventWebhook404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/webhooks/api_get_parse_setting.go b/rest/api/v3/webhooks/api_get_parse_setting.go deleted file mode 100644 index 5b1b3f9e..00000000 --- a/rest/api/v3/webhooks/api_get_parse_setting.go +++ /dev/null @@ -1,94 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetParseSettingParam struct { - // The hostname associated with the inbound parse setting that you would like to retrieve. - Hostname *string `json:"hostname"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetParseSettingParam) SetHostname(Hostname string) *GetParseSettingParam { - params.Hostname = &Hostname - return params -} -func (params *GetParseSettingParam) SetOnbehalfof(Onbehalfof string) *GetParseSettingParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve a specific inbound parse setting by hostname.** You can retrieve all your Inbound Parse settings and their associated host names with the \"Retrieve all parse settings\" endpoint. -func (c *ApiService) GetParseSetting(params *GetParseSettingParam) (interface{}, error) { - path := "/v3/user/webhooks/parse/settings/{Hostname}" - if params != nil && params.Hostname != nil { - path = strings.Replace(path, "{"+"Hostname"+"}", *params.Hostname, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ParseSetting{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/webhooks/api_get_signed_event_webhook.go b/rest/api/v3/webhooks/api_get_signed_event_webhook.go deleted file mode 100644 index 0bd97803..00000000 --- a/rest/api/v3/webhooks/api_get_signed_event_webhook.go +++ /dev/null @@ -1,78 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type GetSignedEventWebhookParam struct { - // The ID of the Event Webhook you want to retrieve. - Id *string `json:"id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *GetSignedEventWebhookParam) SetId(Id string) *GetSignedEventWebhookParam { - params.Id = &Id - return params -} -func (params *GetSignedEventWebhookParam) SetOnbehalfof(Onbehalfof string) *GetSignedEventWebhookParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve the public key for a single Event Webhook by ID.** If you do not pass a webhook ID to this endpoint, it will return the public key for your oldest webhook by `created_date`. This means the default key returned by this endpoint when no ID is provided will be for the first webhook you created. This functionality allows customers who do not have multiple webhooks to use this endpoint to retrieve their only webhook's public key, even if they do not supply an ID. If you have multiple webhooks, you can retrieve their IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. Once you have enabled signature verification for a webhook, you will need the public key provided to verify the signatures on requests coming from Twilio SendGrid. You can use the webhook ID to [enable or disable signature verification with the endpoint dedicated for that operation](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook). For more information about cryptographically signing the Event Webhook, see [**Getting Started with the Event Webhook Security Features**](https://sendgrid.com/docs/for-developers/tracking-events/getting-started-event-webhook-security-features). -func (c *ApiService) GetSignedEventWebhook(params *GetSignedEventWebhookParam) (interface{}, error) { - path := "/v3/user/webhooks/event/settings/signed/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &GetSignedEventWebhook200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &GetSignedEventWebhook404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/webhooks/api_list_event_webhook.go b/rest/api/v3/webhooks/api_list_event_webhook.go deleted file mode 100644 index 16889f64..00000000 --- a/rest/api/v3/webhooks/api_list_event_webhook.go +++ /dev/null @@ -1,69 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListEventWebhookParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // Use this to include optional fields in the response payload. When this is set to `include=account_status_change`, the `account_status_change` field will be part of the response payload and set to `false` by default. See [Update an event webhook](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) for enabling this webhook notification which lets you subscribe to account status change events related to compliance action taken by SendGrid. - Include *string `json:"include,omitempty"` -} - -func (params *ListEventWebhookParam) SetOnbehalfof(Onbehalfof string) *ListEventWebhookParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *ListEventWebhookParam) SetInclude(Include string) *ListEventWebhookParam { - params.Include = &Include - return params -} - -// **This endpoint allows you to retrieve all of your Event Webhooks.** Each webhook will be returned as an object in the `webhooks` array with the webhook's configuration details and ID. You can use a webhook's ID to [update the webhook's settings](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook), [delete the webhook](https://docs.sendgrid.com/api-reference/webhooks/delete-an-event-webhook), [enable or disable signature verification for the webhook](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook), and, if signature verification is enabled, [retrieve the webhook's public key](https://docs.sendgrid.com/api-reference/webhooks/get-signed-event-webhooks-public-key) when signature verification is enabled. ### Event settings Each webhook's settings determine which events will be included in the POST request by the webhook and the URL where the request will be sent. See the [**Event Webhook Reference**](https://docs.sendgrid.com/for-developers/tracking-events/event#delivery-events) for details about each event type. ### Signature verification The `public_key` property will be returned only for webhooks with signature verification enabled. ### OAuth You may share one OAuth configuration across all your webhooks or create unique credentials for each. The OAuth properties will be returned only for webhooks with OAuth configured. -func (c *ApiService) ListEventWebhook(params *ListEventWebhookParam) (interface{}, error) { - path := "/v3/user/webhooks/event/settings/all" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Include != nil { - data.Set("include", *params.Include) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &EventWebhookAllResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/webhooks/api_list_parse_setting.go b/rest/api/v3/webhooks/api_list_parse_setting.go deleted file mode 100644 index 0925578e..00000000 --- a/rest/api/v3/webhooks/api_list_parse_setting.go +++ /dev/null @@ -1,83 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type ListParseSettingParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListParseSettingParam) SetOnbehalfof(Onbehalfof string) *ListParseSettingParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve all of your current inbound parse settings.** -func (c *ApiService) ListParseSetting(params *ListParseSettingParam) (interface{}, error) { - path := "/v3/user/webhooks/parse/settings" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ListParseSetting200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/webhooks/api_list_parse_static.go b/rest/api/v3/webhooks/api_list_parse_static.go deleted file mode 100644 index e717caae..00000000 --- a/rest/api/v3/webhooks/api_list_parse_static.go +++ /dev/null @@ -1,106 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "fmt" - "net/http" - "net/url" -) - -type ListParseStaticParam struct { - // The starting date of the statistics you want to retrieve. Must be in the format YYYY-MM-DD - StartDate *string `json:"start_date"` - // The number of statistics to return on each page. - Limit *string `json:"limit,omitempty"` - // The number of statistics to skip. - Offset *string `json:"offset,omitempty"` - // How you would like the statistics to by grouped. - AggregatedBy *AggregatedBy `json:"aggregated_by,omitempty"` - // The end date of the statistics you want to retrieve. Must be in the format YYYY-MM-DD - EndDate *string `json:"end_date,omitempty"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` -} - -func (params *ListParseStaticParam) SetStartDate(StartDate string) *ListParseStaticParam { - params.StartDate = &StartDate - return params -} -func (params *ListParseStaticParam) SetLimit(Limit string) *ListParseStaticParam { - params.Limit = &Limit - return params -} -func (params *ListParseStaticParam) SetOffset(Offset string) *ListParseStaticParam { - params.Offset = &Offset - return params -} -func (params *ListParseStaticParam) SetAggregatedBy(AggregatedBy AggregatedBy) *ListParseStaticParam { - params.AggregatedBy = &AggregatedBy - return params -} -func (params *ListParseStaticParam) SetEndDate(EndDate string) *ListParseStaticParam { - params.EndDate = &EndDate - return params -} -func (params *ListParseStaticParam) SetOnbehalfof(Onbehalfof string) *ListParseStaticParam { - params.Onbehalfof = &Onbehalfof - return params -} - -// **This endpoint allows you to retrieve the statistics for your Parse Webhook usage.** SendGrid's Inbound Parse Webhook allows you to parse the contents and attachments of incoming emails. The Parse API can then POST the parsed emails to a URL that you specify. The Inbound Parse Webhook cannot parse messages greater than 30MB in size, including all attachments. There are a number of pre-made integrations for the SendGrid Parse Webhook which make processing events easy. You can find these integrations in the [Library Index](https://docs.sendgrid.com/for-developers/sending-email/libraries#webhook-libraries). -func (c *ApiService) ListParseStatic(params *ListParseStaticParam) (interface{}, error) { - path := "/v3/user/webhooks/parse/stats" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/x-www-form-urlencoded", - } - - if params != nil && params.StartDate != nil { - data.Set("start_date", *params.StartDate) - } - if params != nil && params.Limit != nil { - data.Set("limit", *params.Limit) - } - if params != nil && params.Offset != nil { - data.Set("offset", *params.Offset) - } - if params != nil && params.AggregatedBy != nil { - data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) - } - if params != nil && params.EndDate != nil { - data.Set("end_date", *params.EndDate) - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &[]ListParseStatic200ResponseInner{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/webhooks/api_service.go b/rest/api/v3/webhooks/api_service.go deleted file mode 100644 index a92477c0..00000000 --- a/rest/api/v3/webhooks/api_service.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - sendgrid "github.com/sendgrid/sendgrid-go/client" -) - -type ApiService struct { - baseURL string - requestHandler *sendgrid.RequestHandler -} - -func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { - return &ApiService{ - requestHandler: requestHandler, - baseURL: "https://api.sendgrid.com", - } -} - -func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { - return NewApiService(sendgrid.NewRequestHandler(client)) -} diff --git a/rest/api/v3/webhooks/api_test_event_webhook.go b/rest/api/v3/webhooks/api_test_event_webhook.go deleted file mode 100644 index acb1e0dc..00000000 --- a/rest/api/v3/webhooks/api_test_event_webhook.go +++ /dev/null @@ -1,66 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" -) - -type TestEventWebhookParam struct { - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - EventWebhookTestRequest *EventWebhookTestRequest `json:"EventWebhookTestRequest,omitempty"` -} - -func (params *TestEventWebhookParam) SetOnbehalfof(Onbehalfof string) *TestEventWebhookParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *TestEventWebhookParam) SetEventWebhookTestRequest(EventWebhookTestRequest EventWebhookTestRequest) *TestEventWebhookParam { - params.EventWebhookTestRequest = &EventWebhookTestRequest - return params -} - -// **This endpoint allows you to test an Event Webhook.** Retry logic for this endpoint differs from other endpoints, which use a rolling 24-hour retry. This endpoint will make a POST request with a fake event notification to a URL you provide. This allows you to verify that you have properly configured the webhook before sending real data to your URL. ### Test OAuth configuration To test your OAuth configuration, you must include the necessary OAuth properties: `oauth_client_id`, `oauth_client_secret`, and `oauth_token_url`. If the webhook you are testing already has OAuth credentials saved, you will provide only the `oauth_client_id` and `oauth_token_url`—we will pull the secret for you. If you are testing a new set of OAuth credentials that have not been saved with SendGrid, you must provide all three property values. You can retrieve a previously saved `oauth_client_id` and `oauth_token_url` from the [**Get an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/get-an-event-webhook) endpoint; however, for security reasons, SendGrid will not provide your `oauth_client_secret`. -func (c *ApiService) TestEventWebhook(params *TestEventWebhookParam) (interface{}, error) { - path := "/v3/user/webhooks/event/test" - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.EventWebhookTestRequest != nil { - b, err := json.Marshal(*params.EventWebhookTestRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/webhooks/api_update_event_webhook.go b/rest/api/v3/webhooks/api_update_event_webhook.go deleted file mode 100644 index 1a49d592..00000000 --- a/rest/api/v3/webhooks/api_update_event_webhook.go +++ /dev/null @@ -1,110 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type UpdateEventWebhookParam struct { - // The ID of the Event Webhook you want to retrieve. - Id *string `json:"id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // Use this to include optional fields in the response payload. When this is set to `include=account_status_change`, the `account_status_change` field will be part of the response payload and set to `false` by default. See [Update an event webhook](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) for enabling this webhook notification which lets you subscribe to account status change events related to compliance action taken by SendGrid. - Include *string `json:"include,omitempty"` - // - EventWebhookRequest *EventWebhookRequest `json:"EventWebhookRequest,omitempty"` -} - -func (params *UpdateEventWebhookParam) SetId(Id string) *UpdateEventWebhookParam { - params.Id = &Id - return params -} -func (params *UpdateEventWebhookParam) SetOnbehalfof(Onbehalfof string) *UpdateEventWebhookParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateEventWebhookParam) SetInclude(Include string) *UpdateEventWebhookParam { - params.Include = &Include - return params -} -func (params *UpdateEventWebhookParam) SetEventWebhookRequest(EventWebhookRequest EventWebhookRequest) *UpdateEventWebhookParam { - params.EventWebhookRequest = &EventWebhookRequest - return params -} - -// **This endpoint allows you to update a single Event Webhook by ID.** If you do not pass a webhook ID to this endpoint, it will update and return your oldest webhook by `created_date`. This means the default webhook updated by this endpoint when no ID is provided will be the first one you created. This functionality allows customers who do not have multiple webhooks to use this endpoint to update their only webhook, even if they do not supply an ID. If you have multiple webhooks, you can retrieve their IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. ### Enable or disable the webhook You can set the `enabled` property to `true` to enable the webhook or `false` to disable it. Disabling a webhook will not delete it from your account, but it will prevent the webhook from sending events to your designated URL. ### URL A webhook's URL is the endpoint where you want the webhook to send POST requests containing event data. No more than one webhook may be configured to send to the same URL. SendGrid will return an error if you attempt to set a URL for a webhook that is already in use by the user on another webhook. ### Event settings If an event type is marked as `true`, the event webhook will send information about that event type. See the [**Event Webhook Reference**](https://docs.sendgrid.com/for-developers/tracking-events/event#delivery-events) for details about each event type. ### Webhook identifiers You may assign an optional friendly name to each of your webhooks. The friendly name is for convenience only and should not be used to programmatically differentiate your webhooks because it does not need to be unique. ### OAuth You can configure OAuth for your webhook by passing the required values to this endpoint in the `oauth_client_id`, `oauth_client_secret`, and `oauth_token_url` properties. To disable OAuth, pass an empty string to this endpoint for each of the OAuth properties. You may share one OAuth configuration across all your webhooks or create unique credentials for each. See our [webhook security documentation](https://docs.sendgrid.com/for-developers/tracking-events/getting-started-event-webhook-security-features#oauth-20) for more detailed information about OAuth and the Event Webhook. ### Signature verification Enabling signature verification for your webhook is a separate process and cannot be done with this endpoint. You can use the webhook ID to [enable or disable signature verification with the endpoint dedicated for that operation](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook). -func (c *ApiService) UpdateEventWebhook(params *UpdateEventWebhookParam) (interface{}, error) { - path := "/v3/user/webhooks/event/settings/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - if params != nil && params.Include != nil { - data.Set("include", *params.Include) - } - body := []byte{} - if params != nil && params.EventWebhookRequest != nil { - b, err := json.Marshal(*params.EventWebhookRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &EventWebhookUnsignedResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 400 { - ps := &CreateEventWebhook400Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &GetSignedEventWebhook404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/webhooks/api_update_parse_setting.go b/rest/api/v3/webhooks/api_update_parse_setting.go deleted file mode 100644 index f4537108..00000000 --- a/rest/api/v3/webhooks/api_update_parse_setting.go +++ /dev/null @@ -1,109 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type UpdateParseSettingParam struct { - // The hostname associated with the inbound parse setting that you would like to retrieve. - Hostname *string `json:"hostname"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - ParseSetting *ParseSetting `json:"ParseSetting,omitempty"` -} - -func (params *UpdateParseSettingParam) SetHostname(Hostname string) *UpdateParseSettingParam { - params.Hostname = &Hostname - return params -} -func (params *UpdateParseSettingParam) SetOnbehalfof(Onbehalfof string) *UpdateParseSettingParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateParseSettingParam) SetParseSetting(ParseSetting ParseSetting) *UpdateParseSettingParam { - params.ParseSetting = &ParseSetting - return params -} - -// **This endpoint allows you to update a specific inbound parse setting by hostname.** You can retrieve all your Inbound Parse settings and their associated host names with the \"Retrieve all parse settings\" endpoint. -func (c *ApiService) UpdateParseSetting(params *UpdateParseSettingParam) (interface{}, error) { - path := "/v3/user/webhooks/parse/settings/{Hostname}" - if params != nil && params.Hostname != nil { - path = strings.Replace(path, "{"+"Hostname"+"}", *params.Hostname, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.ParseSetting != nil { - b, err := json.Marshal(*params.ParseSetting) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &ParseSetting{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 401 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 403 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &ErrorResponse{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/webhooks/api_update_signed_event_webhook.go b/rest/api/v3/webhooks/api_update_signed_event_webhook.go deleted file mode 100644 index 1e962925..00000000 --- a/rest/api/v3/webhooks/api_update_signed_event_webhook.go +++ /dev/null @@ -1,93 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "encoding/json" - "net/http" - "net/url" - - "strings" -) - -type UpdateSignedEventWebhookParam struct { - // The ID of the Event Webhook you want to retrieve. - Id *string `json:"id"` - // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - Onbehalfof *string `json:"on-behalf-of,omitempty"` - // - UpdateSignedEventWebhookRequest *UpdateSignedEventWebhookRequest `json:"UpdateSignedEventWebhookRequest,omitempty"` -} - -func (params *UpdateSignedEventWebhookParam) SetId(Id string) *UpdateSignedEventWebhookParam { - params.Id = &Id - return params -} -func (params *UpdateSignedEventWebhookParam) SetOnbehalfof(Onbehalfof string) *UpdateSignedEventWebhookParam { - params.Onbehalfof = &Onbehalfof - return params -} -func (params *UpdateSignedEventWebhookParam) SetUpdateSignedEventWebhookRequest(UpdateSignedEventWebhookRequest UpdateSignedEventWebhookRequest) *UpdateSignedEventWebhookParam { - params.UpdateSignedEventWebhookRequest = &UpdateSignedEventWebhookRequest - return params -} - -// **This endpoint allows you to enable or disable signature verification for a single Event Webhook by ID.** If you do not pass a webhook ID to this endpoint, it will enable signature verification for your oldest webhook by `created_date`. This means the default webhook operated on by this endpoint when no ID is provided will be the first one you created. This functionality allows customers who do not have multiple webhooks to enable or disable signature verifiction for their only webhook, even if they do not supply an ID. If you have multiple webhooks, you can retrieve their IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. This endpoint accepts a single boolean request property, `enabled`, that can be set `true` or `false` to enable or disable signature verification. This endpoint will return the public key required to verify Twilio SendGrid signatures if it is enabled or an empty string if signing is disabled. You can also retrieve your public key using the [**Get an Event Webhook's Public Key**](https://docs.sendgrid.com/api-reference/webhooks/get-signed-event-webhooks-public-key) endpoint. For more information about cryptographically signing the Event Webhook, see [**Getting Started with the Event Webhook Security Features**](https://sendgrid.com/docs/for-developers/tracking-events/getting-started-event-webhook-security-features). -func (c *ApiService) UpdateSignedEventWebhook(params *UpdateSignedEventWebhookParam) (interface{}, error) { - path := "/v3/user/webhooks/event/settings/signed/{Id}" - if params != nil && params.Id != nil { - path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) - } - - data := url.Values{} - headers := map[string]interface{}{ - "Content-Type": "application/json", - } - - body := []byte{} - if params != nil && params.UpdateSignedEventWebhookRequest != nil { - b, err := json.Marshal(*params.UpdateSignedEventWebhookRequest) - if err != nil { - return nil, err - } - body = b - } - - if params != nil && params.Onbehalfof != nil { - headers["on-behalf-of"] = *params.Onbehalfof - } - resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) - if err != nil { - return nil, err - } - - defer resp.Body.Close() - if resp.StatusCode == 200 { - ps := &GetSignedEventWebhook200Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - if resp.StatusCode == 404 { - ps := &GetSignedEventWebhook404Response{} - if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { - return nil, err - } - - return ps, err - } - return http.Response{Status: resp.Status, StatusCode: resp.StatusCode, Body: resp.Body}, nil -} diff --git a/rest/api/v3/webhooks/docs/AggregatedBy.md b/rest/api/v3/webhooks/docs/AggregatedBy.md deleted file mode 100644 index 96f02c9f..00000000 --- a/rest/api/v3/webhooks/docs/AggregatedBy.md +++ /dev/null @@ -1,14 +0,0 @@ -# AggregatedBy - -## Enum - -Name | Type | Notes ------------- | ------------- | ------------- -**DAY** | string | (value: `"day"`) -**WEEK** | string | (value: `"week"`) -**MONTH** | string | (value: `"month"`) - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/webhooks/docs/CreateEventWebhook.md b/rest/api/v3/webhooks/docs/CreateEventWebhook.md deleted file mode 100644 index b14e0354..00000000 --- a/rest/api/v3/webhooks/docs/CreateEventWebhook.md +++ /dev/null @@ -1,49 +0,0 @@ -# CreateEventWebhook - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateEventWebhook**](CreateEventWebhook.md#CreateEventWebhook) | **Post** /v3/user/webhooks/event/settings | Create a new Event Webhook - - - -## CreateEventWebhook - -> EventWebhookUnsignedResponse CreateEventWebhook(ctx, optional) - -Create a new Event Webhook - -**This endpoint allows you to create a new Event Webhook.** When creating a webhook, you will provide a URL where you want the webhook to send POST requests, and you will select which events you want to receive in those request. See the [**Event Webhook Reference**](https://docs.sendgrid.com/for-developers/tracking-events/event#delivery-events) for details about each event type. ### Webhook identifiers When your webhook is succesfully created, you will receive a webhook `id` in the response returned by this endpoint. You can use that ID to [update the webhook's settings](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook), [delete the webhook](https://docs.sendgrid.com/api-reference/webhooks/delete-an-event-webhook), [enable or disable signature verification for the webhook](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook), and, if signature verification is enabled, [retrieve the webhook's public key](https://docs.sendgrid.com/api-reference/webhooks/get-signed-event-webhooks-public-key). You may also assign an optional friendly name to each of your webhooks. The friendly name is for convenience only and should not be used to programmatically differentiate your webhooks because it does not need to be unique. Use the webhook ID to reliably differentiate among your webhooks. ### OAuth You can optionally configure OAuth verification for your webhook at the time of creation by passing the appropriate values in the `oauth_client_id`, `oauth_client_secret`, and `oauth_token_url` properties. You can enable or disable OAuth for the webhook after creation with the [**Update an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) operation. You may share one OAuth configuration across all your webhooks or create unique credentials for each. See our [webhook security documentation](https://docs.sendgrid.com/for-developers/tracking-events/getting-started-event-webhook-security-features#oauth-20) for details about OAuth and the Event Webhook. ### Signature verification Enabling signature verification for your webhook is a separate process and cannot be done at the time of creation with this endpoint. You can use the webhook ID to [enable or disable signature verification with the endpoint dedicated for that operation](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateEventWebhookParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**EventWebhookRequest** | [**EventWebhookRequest**](EventWebhookRequest.md) | - -### Return type - -[**EventWebhookUnsignedResponse**](EventWebhookUnsignedResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/webhooks/docs/CreateEventWebhook400Response.md b/rest/api/v3/webhooks/docs/CreateEventWebhook400Response.md deleted file mode 100644 index 36edd9c5..00000000 --- a/rest/api/v3/webhooks/docs/CreateEventWebhook400Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# CreateEventWebhook400Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]CreateEventWebhook400ResponseErrorsInner**](CreateEventWebhook400ResponseErrorsInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/webhooks/docs/CreateEventWebhook400ResponseErrorsInner.md b/rest/api/v3/webhooks/docs/CreateEventWebhook400ResponseErrorsInner.md deleted file mode 100644 index d41fff3d..00000000 --- a/rest/api/v3/webhooks/docs/CreateEventWebhook400ResponseErrorsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# CreateEventWebhook400ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | The ID of a Webhook that exists on your account that is already configured to send events to the endpoint URL you provided. |[optional] -**Message** | **string** | Error message. |[optional] -**Url** | **string** | The URL that is already configured as a Webhook endpoint for one of your existing Webhooks. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/webhooks/docs/CreateParseSetting.md b/rest/api/v3/webhooks/docs/CreateParseSetting.md deleted file mode 100644 index 75e24a9f..00000000 --- a/rest/api/v3/webhooks/docs/CreateParseSetting.md +++ /dev/null @@ -1,49 +0,0 @@ -# CreateParseSetting - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateParseSetting**](CreateParseSetting.md#CreateParseSetting) | **Post** /v3/user/webhooks/parse/settings | Create a parse setting - - - -## CreateParseSetting - -> ParseSetting CreateParseSetting(ctx, optional) - -Create a parse setting - -**This endpoint allows you to create a new inbound parse setting.** Creating an Inbound Parse setting requires two pieces of information: a `url` and a `hostname`. The `hostname` must correspond to a domain authenticated by Twilio SendGrid on your account. If you need to complete domain authentication, you can use the [Twilio SendGrid App](https://app.sendgrid.com/settings/sender_auth) or the **Authenticate a Domain** endpoint. See [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/) for instructions. Any email received by the `hostname` will be parsed when you complete this setup. You must also add a Twilio SendGrid MX record to this domain's DNS records. See [**Setting up the Inbound Parse Webhook**](https://sendgrid.com/docs/for-developers/parsing-email/setting-up-the-inbound-parse-webhook/) for full instructions. The `url` represents a location where the parsed message data will be delivered. Twilio SendGrid will make an HTTP POST request to this `url` with the message data. The `url` must be publicly reachable, and your application must return a `200` status code to signal that the message data has been received. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a CreateParseSettingParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**ParseSetting** | [**ParseSetting**](ParseSetting.md) | - -### Return type - -[**ParseSetting**](ParseSetting.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/webhooks/docs/DeleteEventWebhook.md b/rest/api/v3/webhooks/docs/DeleteEventWebhook.md deleted file mode 100644 index 135249c7..00000000 --- a/rest/api/v3/webhooks/docs/DeleteEventWebhook.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeleteEventWebhook - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteEventWebhook**](DeleteEventWebhook.md#DeleteEventWebhook) | **Delete** /v3/user/webhooks/event/settings/{Id} | Delete a single Event Webhook by ID. - - - -## DeleteEventWebhook - -> DeleteEventWebhook(ctx, Idoptional) - -Delete a single Event Webhook by ID. - -**This endpoint allows you to delete a single Event Webhook by ID.** Unlike the [**Get an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/get-an-event-webhook) and [**Update an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) endpoints, which will operate on your oldest webhook by `created_date` when you don't provide an ID, this endpoint will return an error if you do not pass it an ID. This behavior prevents customers from unintentionally deleting a webhook. You can retrieve your webhooks' IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. ### Enable or disable the webhook This endpoint will permanently delete the webhook specified. If you instead want to disable a webhook, you can set the `enabled` property to `false` with the [**Update an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) endpoint. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of the Event Webhook you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteEventWebhookParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/webhooks/docs/DeleteParseSetting.md b/rest/api/v3/webhooks/docs/DeleteParseSetting.md deleted file mode 100644 index 5bdf1dc3..00000000 --- a/rest/api/v3/webhooks/docs/DeleteParseSetting.md +++ /dev/null @@ -1,52 +0,0 @@ -# DeleteParseSetting - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteParseSetting**](DeleteParseSetting.md#DeleteParseSetting) | **Delete** /v3/user/webhooks/parse/settings/{Hostname} | Delete a parse setting - - - -## DeleteParseSetting - -> map[string]interface{} DeleteParseSetting(ctx, Hostnameoptional) - -Delete a parse setting - -**This endpoint allows you to delete a specific inbound parse setting by hostname.** You can retrieve all your Inbound Parse settings and their associated host names with the \"Retrieve all parse settings\" endpoint. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Hostname** | **string** | The hostname associated with the inbound parse setting that you would like to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a DeleteParseSettingParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -**map[string]interface{}** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/webhooks/docs/ErrorResponse.md b/rest/api/v3/webhooks/docs/ErrorResponse.md deleted file mode 100644 index ec2d41f6..00000000 --- a/rest/api/v3/webhooks/docs/ErrorResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ErrorResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] -**Id** | **string** | When applicable, this property value will be an error ID. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/webhooks/docs/ErrorResponseErrorsInner.md b/rest/api/v3/webhooks/docs/ErrorResponseErrorsInner.md deleted file mode 100644 index 5449c685..00000000 --- a/rest/api/v3/webhooks/docs/ErrorResponseErrorsInner.md +++ /dev/null @@ -1,13 +0,0 @@ -# ErrorResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | An error message. |[optional] -**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] -**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/webhooks/docs/EventWebhookAllResponse.md b/rest/api/v3/webhooks/docs/EventWebhookAllResponse.md deleted file mode 100644 index fd85723d..00000000 --- a/rest/api/v3/webhooks/docs/EventWebhookAllResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# EventWebhookAllResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MaxAllowed** | **float32** | The maximum number of Event Webhooks you can have enabled under your current Twilio SendGrid plan. See the [Twilio SendGrid pricing page](https://sendgrid.com/pricing) for more information about the features available with each plan. |[optional] -**Webhooks** | [**[]EventWebhookSignedResponse**](EventWebhookSignedResponse.md) | An array of Event Webhook objects. Each object represents one of your webhooks and contains its configuration settings, including which events it is set to send in the POST request, the URL where it will send those events, and the webhook's ID. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/webhooks/docs/EventWebhookBaseResponseProps.md b/rest/api/v3/webhooks/docs/EventWebhookBaseResponseProps.md deleted file mode 100644 index 31b021d3..00000000 --- a/rest/api/v3/webhooks/docs/EventWebhookBaseResponseProps.md +++ /dev/null @@ -1,26 +0,0 @@ -# EventWebhookBaseResponseProps - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enabled** | **bool** | Indicates if the Event Webhook is enabled. |[optional] -**Url** | **string** | The URL where SendGrid will send event data. |[optional] -**AccountStatusChange** | **bool** | Indicates if the webhook is configured to send account status change events related to compliance action taken by SendGrid. |[optional] -**GroupResubscribe** | **bool** | Indicates if the webhook is configured to send group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] -**Delivered** | **bool** | Indicates if the webhook is configured to send delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. |[optional] -**GroupUnsubscribe** | **bool** | Indicates if the webhook is configured to send group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] -**SpamReport** | **bool** | Indicates if the webhook is configured to send spam report events. Spam reports occur when recipients mark a message as spam. |[optional] -**Bounce** | **bool** | Indicates if the webhook is configured to send bounce events. A bounce occurs when a receiving server could not or would not accept a message. |[optional] -**Deferred** | **bool** | Indicates if the webhook is configured to send deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. |[optional] -**Unsubscribe** | **bool** | Indicates if the webhook is configured to send unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] -**Processed** | **bool** | Indicates if the webhook is configured to send processed events. Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered. |[optional] -**Open** | **bool** | Indicates if the webhook is configured to send open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. |[optional] -**Click** | **bool** | Indicates if the webhook is configured to send click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. |[optional] -**Dropped** | **bool** | Indicates if the webhook is configured to send dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. |[optional] -**FriendlyName** | **string** | An optional friendly name assigned to the Event Webhook to help you differentiate it. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. |[optional] -**Id** | **string** | A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/webhooks/docs/EventWebhookDateResponseProps.md b/rest/api/v3/webhooks/docs/EventWebhookDateResponseProps.md deleted file mode 100644 index e6c48f23..00000000 --- a/rest/api/v3/webhooks/docs/EventWebhookDateResponseProps.md +++ /dev/null @@ -1,12 +0,0 @@ -# EventWebhookDateResponseProps - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CreatedDate** | [**time.Time**](time.Time.md) | An ISO 8601 timestamp in UTC timezone when the Event Webhook was created. If a Webhook's `created_date` is `null`, it is a [legacy Event Webook](https://www.twilio.com/en-us/changelog/event-webhooks), which means it is your oldest Webhook. |[optional] -**UpdatedDate** | [**time.Time**](time.Time.md) | An ISO 8601 timestamp in UTC timezone when the Event Webhook was last modified. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/webhooks/docs/EventWebhookNoDatesResponse.md b/rest/api/v3/webhooks/docs/EventWebhookNoDatesResponse.md deleted file mode 100644 index 3da1ae81..00000000 --- a/rest/api/v3/webhooks/docs/EventWebhookNoDatesResponse.md +++ /dev/null @@ -1,29 +0,0 @@ -# EventWebhookNoDatesResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enabled** | **bool** | Indicates if the Event Webhook is enabled. |[optional] -**Url** | **string** | The URL where SendGrid will send event data. |[optional] -**AccountStatusChange** | **bool** | Indicates if the webhook is configured to send account status change events related to compliance action taken by SendGrid. |[optional] -**GroupResubscribe** | **bool** | Indicates if the webhook is configured to send group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] -**Delivered** | **bool** | Indicates if the webhook is configured to send delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. |[optional] -**GroupUnsubscribe** | **bool** | Indicates if the webhook is configured to send group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] -**SpamReport** | **bool** | Indicates if the webhook is configured to send spam report events. Spam reports occur when recipients mark a message as spam. |[optional] -**Bounce** | **bool** | Indicates if the webhook is configured to send bounce events. A bounce occurs when a receiving server could not or would not accept a message. |[optional] -**Deferred** | **bool** | Indicates if the webhook is configured to send deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. |[optional] -**Unsubscribe** | **bool** | Indicates if the webhook is configured to send unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] -**Processed** | **bool** | Indicates if the webhook is configured to send processed events. Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered. |[optional] -**Open** | **bool** | Indicates if the webhook is configured to send open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. |[optional] -**Click** | **bool** | Indicates if the webhook is configured to send click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. |[optional] -**Dropped** | **bool** | Indicates if the webhook is configured to send dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. |[optional] -**FriendlyName** | **string** | An optional friendly name assigned to the Event Webhook to help you differentiate it. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. |[optional] -**Id** | **string** | A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. |[optional] -**OauthClientId** | **string** | The OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token. |[optional] -**OauthTokenUrl** | **string** | The URL where SendGrid sends the OAuth client ID and client secret to generate an access token. This should be your OAuth server or service provider. |[optional] -**PublicKey** | **string** | The public key you can use to verify the SendGrid signature. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/webhooks/docs/EventWebhookOauthResponseProps.md b/rest/api/v3/webhooks/docs/EventWebhookOauthResponseProps.md deleted file mode 100644 index fc98cdca..00000000 --- a/rest/api/v3/webhooks/docs/EventWebhookOauthResponseProps.md +++ /dev/null @@ -1,12 +0,0 @@ -# EventWebhookOauthResponseProps - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**OauthClientId** | **string** | The OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token. |[optional] -**OauthTokenUrl** | **string** | The URL where SendGrid sends the OAuth client ID and client secret to generate an access token. This should be your OAuth server or service provider. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/webhooks/docs/EventWebhookRequest.md b/rest/api/v3/webhooks/docs/EventWebhookRequest.md deleted file mode 100644 index 26906ee3..00000000 --- a/rest/api/v3/webhooks/docs/EventWebhookRequest.md +++ /dev/null @@ -1,27 +0,0 @@ -# EventWebhookRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enabled** | **bool** | Set this property to `true` to enable the Event Webhook or `false` to disable it. |[optional] -**Url** | **string** | Set this property to the URL where you want the Event Webhook to send event data. | -**GroupResubscribe** | **bool** | Set this property to `true` to receive group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] -**Delivered** | **bool** | Set this property to `true` to receive delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. |[optional] -**GroupUnsubscribe** | **bool** | Set this property to `true` to receive group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] -**SpamReport** | **bool** | Set this property to `true` to receive spam report events. Spam reports occur when recipients mark a message as spam. |[optional] -**Bounce** | **bool** | Set this property to `true` to receive bounce events. A bounce occurs when a receiving server could not or would not accept a message. |[optional] -**Deferred** | **bool** | Set this property to `true` to receive deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. |[optional] -**Unsubscribe** | **bool** | Set this property to `true` to receive unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] -**Processed** | **bool** | Set this property to `true` to receive processed events. Processed events occur when a message has been received by Twilio SendGrid and the message is ready to be delivered. |[optional] -**Open** | **bool** | Set this property to `true` to receive open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. |[optional] -**Click** | **bool** | Set this property to `true` to receive click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. |[optional] -**Dropped** | **bool** | Set this property to `true` to receive dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. |[optional] -**FriendlyName** | **string** | Optionally set this property to a friendly name for the Event Webhook. A friendly name may be assigned to each of your webhooks to help you differentiate them. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. |[optional] -**OauthClientId** | **string** | Set this property to the OAuth client ID that SendGrid will pass to your OAuth server or service provider to generate an OAuth access token. When passing data in this property, you must also include the `oauth_token_url` property. |[optional] -**OauthClientSecret** | **string** | Set this property to the OAuth client secret that SendGrid will pass to your OAuth server or service provider to generate an OAuth access token. This secret is needed only once to create an access token. SendGrid will store the secret, allowing you to update your client ID and Token URL without passing the secret to SendGrid again. When passing data in this field, you must also include the `oauth_client_id` and `oauth_token_url` properties. |[optional] -**OauthTokenUrl** | **string** | Set this property to the URL where SendGrid will send the OAuth client ID and client secret to generate an OAuth access token. This should be your OAuth server or service provider. When passing data in this field, you must also include the `oauth_client_id` property. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/webhooks/docs/EventWebhookSignedResponse.md b/rest/api/v3/webhooks/docs/EventWebhookSignedResponse.md deleted file mode 100644 index 089b485e..00000000 --- a/rest/api/v3/webhooks/docs/EventWebhookSignedResponse.md +++ /dev/null @@ -1,31 +0,0 @@ -# EventWebhookSignedResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enabled** | **bool** | Indicates if the Event Webhook is enabled. |[optional] -**Url** | **string** | The URL where SendGrid will send event data. |[optional] -**AccountStatusChange** | **bool** | Indicates if the webhook is configured to send account status change events related to compliance action taken by SendGrid. |[optional] -**GroupResubscribe** | **bool** | Indicates if the webhook is configured to send group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] -**Delivered** | **bool** | Indicates if the webhook is configured to send delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. |[optional] -**GroupUnsubscribe** | **bool** | Indicates if the webhook is configured to send group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] -**SpamReport** | **bool** | Indicates if the webhook is configured to send spam report events. Spam reports occur when recipients mark a message as spam. |[optional] -**Bounce** | **bool** | Indicates if the webhook is configured to send bounce events. A bounce occurs when a receiving server could not or would not accept a message. |[optional] -**Deferred** | **bool** | Indicates if the webhook is configured to send deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. |[optional] -**Unsubscribe** | **bool** | Indicates if the webhook is configured to send unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] -**Processed** | **bool** | Indicates if the webhook is configured to send processed events. Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered. |[optional] -**Open** | **bool** | Indicates if the webhook is configured to send open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. |[optional] -**Click** | **bool** | Indicates if the webhook is configured to send click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. |[optional] -**Dropped** | **bool** | Indicates if the webhook is configured to send dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. |[optional] -**FriendlyName** | **string** | An optional friendly name assigned to the Event Webhook to help you differentiate it. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. |[optional] -**Id** | **string** | A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. |[optional] -**CreatedDate** | [**time.Time**](time.Time.md) | An ISO 8601 timestamp in UTC timezone when the Event Webhook was created. If a Webhook's `created_date` is `null`, it is a [legacy Event Webook](https://www.twilio.com/en-us/changelog/event-webhooks), which means it is your oldest Webhook. |[optional] -**UpdatedDate** | [**time.Time**](time.Time.md) | An ISO 8601 timestamp in UTC timezone when the Event Webhook was last modified. |[optional] -**OauthClientId** | **string** | The OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token. |[optional] -**OauthTokenUrl** | **string** | The URL where SendGrid sends the OAuth client ID and client secret to generate an access token. This should be your OAuth server or service provider. |[optional] -**PublicKey** | **string** | The public key you can use to verify the SendGrid signature. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/webhooks/docs/EventWebhookSignedResponseProp.md b/rest/api/v3/webhooks/docs/EventWebhookSignedResponseProp.md deleted file mode 100644 index dfdae0d7..00000000 --- a/rest/api/v3/webhooks/docs/EventWebhookSignedResponseProp.md +++ /dev/null @@ -1,11 +0,0 @@ -# EventWebhookSignedResponseProp - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**PublicKey** | **string** | The public key you can use to verify the SendGrid signature. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/webhooks/docs/EventWebhookTestRequest.md b/rest/api/v3/webhooks/docs/EventWebhookTestRequest.md deleted file mode 100644 index f09ac2de..00000000 --- a/rest/api/v3/webhooks/docs/EventWebhookTestRequest.md +++ /dev/null @@ -1,15 +0,0 @@ -# EventWebhookTestRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | The ID of the Event Webhook you want to retrieve. |[optional] -**Url** | **string** | The URL where you would like the test notification to be sent. | -**OauthClientId** | **string** | The client ID Twilio SendGrid sends to your OAuth server or service provider to generate an OAuth access token. When passing data in this property, you must also include the `oauth_token_url` property. |[optional] -**OauthClientSecret** | **string** | The `oauth_client_secret` is needed only once to create an access token. SendGrid will store this secret, allowing you to update your Client ID and Token URL without passing the secret to SendGrid again. When passing data in this field, you must also include the `oauth_client_id` and `oauth_token_url` properties. |[optional] -**OauthTokenUrl** | **string** | The URL where Twilio SendGrid sends the Client ID and Client Secret to generate an access token. This should be your OAuth server or service provider. When passing data in this field, you must also include the `oauth_client_id` property. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/webhooks/docs/EventWebhookUnsignedResponse.md b/rest/api/v3/webhooks/docs/EventWebhookUnsignedResponse.md deleted file mode 100644 index e2e3a0d8..00000000 --- a/rest/api/v3/webhooks/docs/EventWebhookUnsignedResponse.md +++ /dev/null @@ -1,30 +0,0 @@ -# EventWebhookUnsignedResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enabled** | **bool** | Indicates if the Event Webhook is enabled. |[optional] -**Url** | **string** | The URL where SendGrid will send event data. |[optional] -**AccountStatusChange** | **bool** | Indicates if the webhook is configured to send account status change events related to compliance action taken by SendGrid. |[optional] -**GroupResubscribe** | **bool** | Indicates if the webhook is configured to send group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] -**Delivered** | **bool** | Indicates if the webhook is configured to send delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. |[optional] -**GroupUnsubscribe** | **bool** | Indicates if the webhook is configured to send group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] -**SpamReport** | **bool** | Indicates if the webhook is configured to send spam report events. Spam reports occur when recipients mark a message as spam. |[optional] -**Bounce** | **bool** | Indicates if the webhook is configured to send bounce events. A bounce occurs when a receiving server could not or would not accept a message. |[optional] -**Deferred** | **bool** | Indicates if the webhook is configured to send deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. |[optional] -**Unsubscribe** | **bool** | Indicates if the webhook is configured to send unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] -**Processed** | **bool** | Indicates if the webhook is configured to send processed events. Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered. |[optional] -**Open** | **bool** | Indicates if the webhook is configured to send open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. |[optional] -**Click** | **bool** | Indicates if the webhook is configured to send click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. |[optional] -**Dropped** | **bool** | Indicates if the webhook is configured to send dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. |[optional] -**FriendlyName** | **string** | An optional friendly name assigned to the Event Webhook to help you differentiate it. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. |[optional] -**Id** | **string** | A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. |[optional] -**CreatedDate** | [**time.Time**](time.Time.md) | An ISO 8601 timestamp in UTC timezone when the Event Webhook was created. If a Webhook's `created_date` is `null`, it is a [legacy Event Webook](https://www.twilio.com/en-us/changelog/event-webhooks), which means it is your oldest Webhook. |[optional] -**UpdatedDate** | [**time.Time**](time.Time.md) | An ISO 8601 timestamp in UTC timezone when the Event Webhook was last modified. |[optional] -**OauthClientId** | **string** | The OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token. |[optional] -**OauthTokenUrl** | **string** | The URL where SendGrid sends the OAuth client ID and client secret to generate an access token. This should be your OAuth server or service provider. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/webhooks/docs/GetEventWebhook.md b/rest/api/v3/webhooks/docs/GetEventWebhook.md deleted file mode 100644 index db760440..00000000 --- a/rest/api/v3/webhooks/docs/GetEventWebhook.md +++ /dev/null @@ -1,53 +0,0 @@ -# GetEventWebhook - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetEventWebhook**](GetEventWebhook.md#GetEventWebhook) | **Get** /v3/user/webhooks/event/settings/{Id} | Get the settings for a single Event Webhook. - - - -## GetEventWebhook - -> EventWebhookNoDatesResponse GetEventWebhook(ctx, Idoptional) - -Get the settings for a single Event Webhook. - -**This endpoint allows you to retrieve a single Event Webhook by ID.** If you do not pass a webhook ID to this endpoint, it will return your oldest webhook by `created_date`. This means the default webhook returned by this endpoint when no ID is provided will be the first one you created. This functionality allows customers who do not have multiple webhooks to use this endpoint to retrieve their only webhook, even if they do not supply an ID. If you have multiple webhooks, you can retrieve their IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. ### Event settings Your webhook will be returned with all of its settings, which include the events that will be included in the POST request by the webhook and the URL where they will be sent. If an event type is marked as `true`, the event webhook will send information about that event type. See the [**Event Webhook Reference**](https://docs.sendgrid.com/for-developers/tracking-events/event#delivery-events) for details about each event type. ### Signature verification The `public_key` property will be returned only for webhooks with signature verification enabled. ### OAuth You may share one OAuth configuration across all your webhooks or create unique credentials for each. The OAuth properties will be returned only for webhooks with OAuth configured. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of the Event Webhook you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a GetEventWebhookParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**Include** | **string** | Use this to include optional fields in the response payload. When this is set to `include=account_status_change`, the `account_status_change` field will be part of the response payload and set to `false` by default. See [Update an event webhook](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) for enabling this webhook notification which lets you subscribe to account status change events related to compliance action taken by SendGrid. - -### Return type - -[**EventWebhookNoDatesResponse**](EventWebhookNoDatesResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/webhooks/docs/GetParseSetting.md b/rest/api/v3/webhooks/docs/GetParseSetting.md deleted file mode 100644 index 7350f622..00000000 --- a/rest/api/v3/webhooks/docs/GetParseSetting.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetParseSetting - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetParseSetting**](GetParseSetting.md#GetParseSetting) | **Get** /v3/user/webhooks/parse/settings/{Hostname} | Retrieve a specific parse setting - - - -## GetParseSetting - -> ParseSetting GetParseSetting(ctx, Hostnameoptional) - -Retrieve a specific parse setting - -**This endpoint allows you to retrieve a specific inbound parse setting by hostname.** You can retrieve all your Inbound Parse settings and their associated host names with the \"Retrieve all parse settings\" endpoint. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Hostname** | **string** | The hostname associated with the inbound parse setting that you would like to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a GetParseSettingParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ParseSetting**](ParseSetting.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/webhooks/docs/GetSignedEventWebhook.md b/rest/api/v3/webhooks/docs/GetSignedEventWebhook.md deleted file mode 100644 index bef22a2c..00000000 --- a/rest/api/v3/webhooks/docs/GetSignedEventWebhook.md +++ /dev/null @@ -1,52 +0,0 @@ -# GetSignedEventWebhook - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**GetSignedEventWebhook**](GetSignedEventWebhook.md#GetSignedEventWebhook) | **Get** /v3/user/webhooks/event/settings/signed/{Id} | Get Signed Event Webhook's Public Key - - - -## GetSignedEventWebhook - -> GetSignedEventWebhook200Response GetSignedEventWebhook(ctx, Idoptional) - -Get Signed Event Webhook's Public Key - -**This endpoint allows you to retrieve the public key for a single Event Webhook by ID.** If you do not pass a webhook ID to this endpoint, it will return the public key for your oldest webhook by `created_date`. This means the default key returned by this endpoint when no ID is provided will be for the first webhook you created. This functionality allows customers who do not have multiple webhooks to use this endpoint to retrieve their only webhook's public key, even if they do not supply an ID. If you have multiple webhooks, you can retrieve their IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. Once you have enabled signature verification for a webhook, you will need the public key provided to verify the signatures on requests coming from Twilio SendGrid. You can use the webhook ID to [enable or disable signature verification with the endpoint dedicated for that operation](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook). For more information about cryptographically signing the Event Webhook, see [**Getting Started with the Event Webhook Security Features**](https://sendgrid.com/docs/for-developers/tracking-events/getting-started-event-webhook-security-features). - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of the Event Webhook you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a GetSignedEventWebhookParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**GetSignedEventWebhook200Response**](GetSignedEventWebhook200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/webhooks/docs/GetSignedEventWebhook200Response.md b/rest/api/v3/webhooks/docs/GetSignedEventWebhook200Response.md deleted file mode 100644 index d6c88517..00000000 --- a/rest/api/v3/webhooks/docs/GetSignedEventWebhook200Response.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetSignedEventWebhook200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. |[optional] -**PublicKey** | **string** | The public key you can use to verify the Twilio SendGrid signature. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/webhooks/docs/GetSignedEventWebhook404Response.md b/rest/api/v3/webhooks/docs/GetSignedEventWebhook404Response.md deleted file mode 100644 index 61619203..00000000 --- a/rest/api/v3/webhooks/docs/GetSignedEventWebhook404Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSignedEventWebhook404Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Errors** | [**[]GetSignedEventWebhook404ResponseErrorsInner**](GetSignedEventWebhook404ResponseErrorsInner.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/webhooks/docs/GetSignedEventWebhook404ResponseErrorsInner.md b/rest/api/v3/webhooks/docs/GetSignedEventWebhook404ResponseErrorsInner.md deleted file mode 100644 index 4dc38426..00000000 --- a/rest/api/v3/webhooks/docs/GetSignedEventWebhook404ResponseErrorsInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# GetSignedEventWebhook404ResponseErrorsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Message** | **string** | Error message. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/webhooks/docs/ListEventWebhook.md b/rest/api/v3/webhooks/docs/ListEventWebhook.md deleted file mode 100644 index d6193762..00000000 --- a/rest/api/v3/webhooks/docs/ListEventWebhook.md +++ /dev/null @@ -1,49 +0,0 @@ -# ListEventWebhook - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListEventWebhook**](ListEventWebhook.md#ListEventWebhook) | **Get** /v3/user/webhooks/event/settings/all | Retrieve all of your Event Webhooks. - - - -## ListEventWebhook - -> EventWebhookAllResponse ListEventWebhook(ctx, optional) - -Retrieve all of your Event Webhooks. - -**This endpoint allows you to retrieve all of your Event Webhooks.** Each webhook will be returned as an object in the `webhooks` array with the webhook's configuration details and ID. You can use a webhook's ID to [update the webhook's settings](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook), [delete the webhook](https://docs.sendgrid.com/api-reference/webhooks/delete-an-event-webhook), [enable or disable signature verification for the webhook](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook), and, if signature verification is enabled, [retrieve the webhook's public key](https://docs.sendgrid.com/api-reference/webhooks/get-signed-event-webhooks-public-key) when signature verification is enabled. ### Event settings Each webhook's settings determine which events will be included in the POST request by the webhook and the URL where the request will be sent. See the [**Event Webhook Reference**](https://docs.sendgrid.com/for-developers/tracking-events/event#delivery-events) for details about each event type. ### Signature verification The `public_key` property will be returned only for webhooks with signature verification enabled. ### OAuth You may share one OAuth configuration across all your webhooks or create unique credentials for each. The OAuth properties will be returned only for webhooks with OAuth configured. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListEventWebhookParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**Include** | **string** | Use this to include optional fields in the response payload. When this is set to `include=account_status_change`, the `account_status_change` field will be part of the response payload and set to `false` by default. See [Update an event webhook](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) for enabling this webhook notification which lets you subscribe to account status change events related to compliance action taken by SendGrid. - -### Return type - -[**EventWebhookAllResponse**](EventWebhookAllResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/webhooks/docs/ListParseSetting.md b/rest/api/v3/webhooks/docs/ListParseSetting.md deleted file mode 100644 index 919d1c50..00000000 --- a/rest/api/v3/webhooks/docs/ListParseSetting.md +++ /dev/null @@ -1,48 +0,0 @@ -# ListParseSetting - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListParseSetting**](ListParseSetting.md#ListParseSetting) | **Get** /v3/user/webhooks/parse/settings | Retrieve all parse settings - - - -## ListParseSetting - -> ListParseSetting200Response ListParseSetting(ctx, optional) - -Retrieve all parse settings - -**This endpoint allows you to retrieve all of your current inbound parse settings.** - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListParseSettingParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**ListParseSetting200Response**](ListParseSetting200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/webhooks/docs/ListParseSetting200Response.md b/rest/api/v3/webhooks/docs/ListParseSetting200Response.md deleted file mode 100644 index b6777bb0..00000000 --- a/rest/api/v3/webhooks/docs/ListParseSetting200Response.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListParseSetting200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Result** | [**[]ParseSetting**](ParseSetting.md) | The list of your current inbound parse settings. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/webhooks/docs/ListParseStatic.md b/rest/api/v3/webhooks/docs/ListParseStatic.md deleted file mode 100644 index 7da90539..00000000 --- a/rest/api/v3/webhooks/docs/ListParseStatic.md +++ /dev/null @@ -1,52 +0,0 @@ -# ListParseStatic - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListParseStatic**](ListParseStatic.md#ListParseStatic) | **Get** /v3/user/webhooks/parse/stats | Retrieves Inbound Parse Webhook statistics. - - - -## ListParseStatic - -> []ListParseStatic200ResponseInner ListParseStatic(ctx, StartDateoptional) - -Retrieves Inbound Parse Webhook statistics. - -**This endpoint allows you to retrieve the statistics for your Parse Webhook usage.** SendGrid's Inbound Parse Webhook allows you to parse the contents and attachments of incoming emails. The Parse API can then POST the parsed emails to a URL that you specify. The Inbound Parse Webhook cannot parse messages greater than 30MB in size, including all attachments. There are a number of pre-made integrations for the SendGrid Parse Webhook which make processing events easy. You can find these integrations in the [Library Index](https://docs.sendgrid.com/for-developers/sending-email/libraries#webhook-libraries). - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a ListParseStaticParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Limit** | **string** | The number of statistics to return on each page. -**Offset** | **string** | The number of statistics to skip. -**AggregatedBy** | [**AggregatedBy**](AggregatedByAggregatedBy.md) | How you would like the statistics to by grouped. -**EndDate** | **string** | The end date of the statistics you want to retrieve. Must be in the format YYYY-MM-DD -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. - -### Return type - -[**[]ListParseStatic200ResponseInner**](ListParseStatic200ResponseInner.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/webhooks/docs/ListParseStatic200ResponseInner.md b/rest/api/v3/webhooks/docs/ListParseStatic200ResponseInner.md deleted file mode 100644 index 71c9d470..00000000 --- a/rest/api/v3/webhooks/docs/ListParseStatic200ResponseInner.md +++ /dev/null @@ -1,12 +0,0 @@ -# ListParseStatic200ResponseInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Date** | **string** | The date that the stats were collected. | -**Stats** | [**[]ListParseStatic200ResponseInnerStatsInner**](ListParseStatic200ResponseInnerStatsInner.md) | The Parse Webhook usage statistics. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/webhooks/docs/ListParseStatic200ResponseInnerStatsInner.md b/rest/api/v3/webhooks/docs/ListParseStatic200ResponseInnerStatsInner.md deleted file mode 100644 index 31d9441c..00000000 --- a/rest/api/v3/webhooks/docs/ListParseStatic200ResponseInnerStatsInner.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListParseStatic200ResponseInnerStatsInner - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Metrics** | [**ListParseStatic200ResponseInnerStatsInnerMetrics**](ListParseStatic200ResponseInnerStatsInnerMetrics.md) | |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/webhooks/docs/ListParseStatic200ResponseInnerStatsInnerMetrics.md b/rest/api/v3/webhooks/docs/ListParseStatic200ResponseInnerStatsInnerMetrics.md deleted file mode 100644 index a0648924..00000000 --- a/rest/api/v3/webhooks/docs/ListParseStatic200ResponseInnerStatsInnerMetrics.md +++ /dev/null @@ -1,11 +0,0 @@ -# ListParseStatic200ResponseInnerStatsInnerMetrics - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Received** | **float32** | The number of emails received and parsed by the Parse Webhook. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/webhooks/docs/ParseSetting.md b/rest/api/v3/webhooks/docs/ParseSetting.md deleted file mode 100644 index 344e4bf8..00000000 --- a/rest/api/v3/webhooks/docs/ParseSetting.md +++ /dev/null @@ -1,14 +0,0 @@ -# ParseSetting - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Url** | **string** | The public URL where you would like SendGrid to POST the data parsed from your email. Any emails sent with the given hostname provided (whose MX records have been updated to point to SendGrid) will be parsed and POSTed to this URL. |[optional] -**Hostname** | **string** | A specific and unique domain or subdomain that you have created to use exclusively to parse your incoming email. For example, `parse.yourdomain.com`. |[optional] -**SpamCheck** | **bool** | Indicates if you would like SendGrid to check the content parsed from your emails for spam before POSTing them to your domain. |[optional] -**SendRaw** | **bool** | Indicates if you would like SendGrid to post the original MIME-type content of your parsed email. When this parameter is set to `true`, SendGrid will send a JSON payload of the content of your email. |[optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/webhooks/docs/TestEventWebhook.md b/rest/api/v3/webhooks/docs/TestEventWebhook.md deleted file mode 100644 index 86581df0..00000000 --- a/rest/api/v3/webhooks/docs/TestEventWebhook.md +++ /dev/null @@ -1,49 +0,0 @@ -# TestEventWebhook - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**TestEventWebhook**](TestEventWebhook.md#TestEventWebhook) | **Post** /v3/user/webhooks/event/test | Test an Event Webhook's settings - - - -## TestEventWebhook - -> TestEventWebhook(ctx, optional) - -Test an Event Webhook's settings - -**This endpoint allows you to test an Event Webhook.** Retry logic for this endpoint differs from other endpoints, which use a rolling 24-hour retry. This endpoint will make a POST request with a fake event notification to a URL you provide. This allows you to verify that you have properly configured the webhook before sending real data to your URL. ### Test OAuth configuration To test your OAuth configuration, you must include the necessary OAuth properties: `oauth_client_id`, `oauth_client_secret`, and `oauth_token_url`. If the webhook you are testing already has OAuth credentials saved, you will provide only the `oauth_client_id` and `oauth_token_url`—we will pull the secret for you. If you are testing a new set of OAuth credentials that have not been saved with SendGrid, you must provide all three property values. You can retrieve a previously saved `oauth_client_id` and `oauth_token_url` from the [**Get an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/get-an-event-webhook) endpoint; however, for security reasons, SendGrid will not provide your `oauth_client_secret`. - -### Path Parameters - -This endpoint does not need any path parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a TestEventWebhookParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**EventWebhookTestRequest** | [**EventWebhookTestRequest**](EventWebhookTestRequest.md) | - -### Return type - - (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/webhooks/docs/UpdateEventWebhook.md b/rest/api/v3/webhooks/docs/UpdateEventWebhook.md deleted file mode 100644 index 005976c1..00000000 --- a/rest/api/v3/webhooks/docs/UpdateEventWebhook.md +++ /dev/null @@ -1,54 +0,0 @@ -# UpdateEventWebhook - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateEventWebhook**](UpdateEventWebhook.md#UpdateEventWebhook) | **Patch** /v3/user/webhooks/event/settings/{Id} | Update a single Event Webhook by ID. - - - -## UpdateEventWebhook - -> EventWebhookUnsignedResponse UpdateEventWebhook(ctx, Idoptional) - -Update a single Event Webhook by ID. - -**This endpoint allows you to update a single Event Webhook by ID.** If you do not pass a webhook ID to this endpoint, it will update and return your oldest webhook by `created_date`. This means the default webhook updated by this endpoint when no ID is provided will be the first one you created. This functionality allows customers who do not have multiple webhooks to use this endpoint to update their only webhook, even if they do not supply an ID. If you have multiple webhooks, you can retrieve their IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. ### Enable or disable the webhook You can set the `enabled` property to `true` to enable the webhook or `false` to disable it. Disabling a webhook will not delete it from your account, but it will prevent the webhook from sending events to your designated URL. ### URL A webhook's URL is the endpoint where you want the webhook to send POST requests containing event data. No more than one webhook may be configured to send to the same URL. SendGrid will return an error if you attempt to set a URL for a webhook that is already in use by the user on another webhook. ### Event settings If an event type is marked as `true`, the event webhook will send information about that event type. See the [**Event Webhook Reference**](https://docs.sendgrid.com/for-developers/tracking-events/event#delivery-events) for details about each event type. ### Webhook identifiers You may assign an optional friendly name to each of your webhooks. The friendly name is for convenience only and should not be used to programmatically differentiate your webhooks because it does not need to be unique. ### OAuth You can configure OAuth for your webhook by passing the required values to this endpoint in the `oauth_client_id`, `oauth_client_secret`, and `oauth_token_url` properties. To disable OAuth, pass an empty string to this endpoint for each of the OAuth properties. You may share one OAuth configuration across all your webhooks or create unique credentials for each. See our [webhook security documentation](https://docs.sendgrid.com/for-developers/tracking-events/getting-started-event-webhook-security-features#oauth-20) for more detailed information about OAuth and the Event Webhook. ### Signature verification Enabling signature verification for your webhook is a separate process and cannot be done with this endpoint. You can use the webhook ID to [enable or disable signature verification with the endpoint dedicated for that operation](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook). - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of the Event Webhook you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateEventWebhookParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**Include** | **string** | Use this to include optional fields in the response payload. When this is set to `include=account_status_change`, the `account_status_change` field will be part of the response payload and set to `false` by default. See [Update an event webhook](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) for enabling this webhook notification which lets you subscribe to account status change events related to compliance action taken by SendGrid. -**EventWebhookRequest** | [**EventWebhookRequest**](EventWebhookRequest.md) | - -### Return type - -[**EventWebhookUnsignedResponse**](EventWebhookUnsignedResponse.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/webhooks/docs/UpdateParseSetting.md b/rest/api/v3/webhooks/docs/UpdateParseSetting.md deleted file mode 100644 index ae9e970e..00000000 --- a/rest/api/v3/webhooks/docs/UpdateParseSetting.md +++ /dev/null @@ -1,53 +0,0 @@ -# UpdateParseSetting - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateParseSetting**](UpdateParseSetting.md#UpdateParseSetting) | **Patch** /v3/user/webhooks/parse/settings/{Hostname} | Update a parse setting - - - -## UpdateParseSetting - -> ParseSetting UpdateParseSetting(ctx, Hostnameoptional) - -Update a parse setting - -**This endpoint allows you to update a specific inbound parse setting by hostname.** You can retrieve all your Inbound Parse settings and their associated host names with the \"Retrieve all parse settings\" endpoint. - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Hostname** | **string** | The hostname associated with the inbound parse setting that you would like to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateParseSettingParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**ParseSetting** | [**ParseSetting**](ParseSetting.md) | - -### Return type - -[**ParseSetting**](ParseSetting.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/webhooks/docs/UpdateSignedEventWebhook.md b/rest/api/v3/webhooks/docs/UpdateSignedEventWebhook.md deleted file mode 100644 index 8fa6e5d7..00000000 --- a/rest/api/v3/webhooks/docs/UpdateSignedEventWebhook.md +++ /dev/null @@ -1,53 +0,0 @@ -# UpdateSignedEventWebhook - -All URIs are relative to *https://api.sendgrid.com* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**UpdateSignedEventWebhook**](UpdateSignedEventWebhook.md#UpdateSignedEventWebhook) | **Patch** /v3/user/webhooks/event/settings/signed/{Id} | Toggle signature verification for a single Event Webhook by ID - - - -## UpdateSignedEventWebhook - -> GetSignedEventWebhook200Response UpdateSignedEventWebhook(ctx, Idoptional) - -Toggle signature verification for a single Event Webhook by ID - -**This endpoint allows you to enable or disable signature verification for a single Event Webhook by ID.** If you do not pass a webhook ID to this endpoint, it will enable signature verification for your oldest webhook by `created_date`. This means the default webhook operated on by this endpoint when no ID is provided will be the first one you created. This functionality allows customers who do not have multiple webhooks to enable or disable signature verifiction for their only webhook, even if they do not supply an ID. If you have multiple webhooks, you can retrieve their IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. This endpoint accepts a single boolean request property, `enabled`, that can be set `true` or `false` to enable or disable signature verification. This endpoint will return the public key required to verify Twilio SendGrid signatures if it is enabled or an empty string if signing is disabled. You can also retrieve your public key using the [**Get an Event Webhook's Public Key**](https://docs.sendgrid.com/api-reference/webhooks/get-signed-event-webhooks-public-key) endpoint. For more information about cryptographically signing the Event Webhook, see [**Getting Started with the Event Webhook Security Features**](https://sendgrid.com/docs/for-developers/tracking-events/getting-started-event-webhook-security-features). - -### Path Parameters - - -Name | Type | Description -------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**Id** | **string** | The ID of the Event Webhook you want to retrieve. - -### Other Parameters - -Other parameters are passed through a pointer to a UpdateSignedEventWebhookParams struct - - -Name | Type | Description -------------- | ------------- | ------------- -**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. -**UpdateSignedEventWebhookRequest** | [**UpdateSignedEventWebhookRequest**](UpdateSignedEventWebhookRequest.md) | - -### Return type - -[**GetSignedEventWebhook200Response**](GetSignedEventWebhook200Response.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/rest/api/v3/webhooks/docs/UpdateSignedEventWebhookRequest.md b/rest/api/v3/webhooks/docs/UpdateSignedEventWebhookRequest.md deleted file mode 100644 index d2364a21..00000000 --- a/rest/api/v3/webhooks/docs/UpdateSignedEventWebhookRequest.md +++ /dev/null @@ -1,11 +0,0 @@ -# UpdateSignedEventWebhookRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Enabled** | **bool** | Enable or disable the webhook by setting this property to `true` or `false`, respectively. | - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/rest/api/v3/webhooks/model_aggregated_by.go b/rest/api/v3/webhooks/model_aggregated_by.go deleted file mode 100644 index 32a394b9..00000000 --- a/rest/api/v3/webhooks/model_aggregated_by.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// AggregatedBy the model 'AggregatedBy' -type AggregatedBy string - -// List of AggregatedBy -const ( - AGGREGATEDBY_DAY AggregatedBy = "day" - AGGREGATEDBY_WEEK AggregatedBy = "week" - AGGREGATEDBY_MONTH AggregatedBy = "month" -) diff --git a/rest/api/v3/webhooks/model_create_event_webhook_400_response.go b/rest/api/v3/webhooks/model_create_event_webhook_400_response.go deleted file mode 100644 index d6e50ac2..00000000 --- a/rest/api/v3/webhooks/model_create_event_webhook_400_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateEventWebhook400Response struct for CreateEventWebhook400Response -type CreateEventWebhook400Response struct { - Errors *[]CreateEventWebhook400ResponseErrorsInner `json:"errors,omitempty"` -} diff --git a/rest/api/v3/webhooks/model_create_event_webhook_400_response_errors_inner.go b/rest/api/v3/webhooks/model_create_event_webhook_400_response_errors_inner.go deleted file mode 100644 index 74a5296f..00000000 --- a/rest/api/v3/webhooks/model_create_event_webhook_400_response_errors_inner.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// CreateEventWebhook400ResponseErrorsInner struct for CreateEventWebhook400ResponseErrorsInner -type CreateEventWebhook400ResponseErrorsInner struct { - // The ID of a Webhook that exists on your account that is already configured to send events to the endpoint URL you provided. - Id *string `json:"id,omitempty"` - // Error message. - Message *string `json:"message,omitempty"` - // The URL that is already configured as a Webhook endpoint for one of your existing Webhooks. - Url *string `json:"url,omitempty"` -} diff --git a/rest/api/v3/webhooks/model_error_response.go b/rest/api/v3/webhooks/model_error_response.go deleted file mode 100644 index ee43ea98..00000000 --- a/rest/api/v3/webhooks/model_error_response.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponse struct for ErrorResponse -type ErrorResponse struct { - Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` - // When applicable, this property value will be an error ID. - Id *string `json:"id,omitempty"` -} diff --git a/rest/api/v3/webhooks/model_error_response_errors_inner.go b/rest/api/v3/webhooks/model_error_response_errors_inner.go deleted file mode 100644 index a946dccd..00000000 --- a/rest/api/v3/webhooks/model_error_response_errors_inner.go +++ /dev/null @@ -1,24 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner -type ErrorResponseErrorsInner struct { - // An error message. - Message *string `json:"message,omitempty"` - // When applicable, this property value will be the field that generated the error. - Field *string `json:"field,omitempty"` - // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. - Help *map[string]interface{} `json:"help,omitempty"` -} diff --git a/rest/api/v3/webhooks/model_event_webhook_all_response.go b/rest/api/v3/webhooks/model_event_webhook_all_response.go deleted file mode 100644 index 88a98136..00000000 --- a/rest/api/v3/webhooks/model_event_webhook_all_response.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// EventWebhookAllResponse struct for EventWebhookAllResponse -type EventWebhookAllResponse struct { - // The maximum number of Event Webhooks you can have enabled under your current Twilio SendGrid plan. See the [Twilio SendGrid pricing page](https://sendgrid.com/pricing) for more information about the features available with each plan. - MaxAllowed *float32 `json:"max_allowed,omitempty"` - // An array of Event Webhook objects. Each object represents one of your webhooks and contains its configuration settings, including which events it is set to send in the POST request, the URL where it will send those events, and the webhook's ID. - Webhooks *[]EventWebhookSignedResponse `json:"webhooks,omitempty"` -} diff --git a/rest/api/v3/webhooks/model_event_webhook_base_response_props.go b/rest/api/v3/webhooks/model_event_webhook_base_response_props.go deleted file mode 100644 index 54cc937e..00000000 --- a/rest/api/v3/webhooks/model_event_webhook_base_response_props.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// EventWebhookBaseResponseProps struct for EventWebhookBaseResponseProps -type EventWebhookBaseResponseProps struct { - // Indicates if the Event Webhook is enabled. - Enabled *bool `json:"enabled,omitempty"` - // The URL where SendGrid will send event data. - Url *string `json:"url,omitempty"` - // Indicates if the webhook is configured to send account status change events related to compliance action taken by SendGrid. - AccountStatusChange *bool `json:"account_status_change,omitempty"` - // Indicates if the webhook is configured to send group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. - GroupResubscribe *bool `json:"group_resubscribe,omitempty"` - // Indicates if the webhook is configured to send delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. - Delivered *bool `json:"delivered,omitempty"` - // Indicates if the webhook is configured to send group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. - GroupUnsubscribe *bool `json:"group_unsubscribe,omitempty"` - // Indicates if the webhook is configured to send spam report events. Spam reports occur when recipients mark a message as spam. - SpamReport *bool `json:"spam_report,omitempty"` - // Indicates if the webhook is configured to send bounce events. A bounce occurs when a receiving server could not or would not accept a message. - Bounce *bool `json:"bounce,omitempty"` - // Indicates if the webhook is configured to send deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. - Deferred *bool `json:"deferred,omitempty"` - // Indicates if the webhook is configured to send unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. - Unsubscribe *bool `json:"unsubscribe,omitempty"` - // Indicates if the webhook is configured to send processed events. Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered. - Processed *bool `json:"processed,omitempty"` - // Indicates if the webhook is configured to send open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. - Open *bool `json:"open,omitempty"` - // Indicates if the webhook is configured to send click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. - Click *bool `json:"click,omitempty"` - // Indicates if the webhook is configured to send dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. - Dropped *bool `json:"dropped,omitempty"` - // An optional friendly name assigned to the Event Webhook to help you differentiate it. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. - FriendlyName *string `json:"friendly_name,omitempty"` - // A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. - Id *string `json:"id,omitempty"` -} diff --git a/rest/api/v3/webhooks/model_event_webhook_date_response_props.go b/rest/api/v3/webhooks/model_event_webhook_date_response_props.go deleted file mode 100644 index b848c4ae..00000000 --- a/rest/api/v3/webhooks/model_event_webhook_date_response_props.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "time" -) - -// EventWebhookDateResponseProps struct for EventWebhookDateResponseProps -type EventWebhookDateResponseProps struct { - // An ISO 8601 timestamp in UTC timezone when the Event Webhook was created. If a Webhook's `created_date` is `null`, it is a [legacy Event Webook](https://www.twilio.com/en-us/changelog/event-webhooks), which means it is your oldest Webhook. - CreatedDate *time.Time `json:"created_date,omitempty"` - // An ISO 8601 timestamp in UTC timezone when the Event Webhook was last modified. - UpdatedDate *time.Time `json:"updated_date,omitempty"` -} diff --git a/rest/api/v3/webhooks/model_event_webhook_no_dates_response.go b/rest/api/v3/webhooks/model_event_webhook_no_dates_response.go deleted file mode 100644 index 1b91692a..00000000 --- a/rest/api/v3/webhooks/model_event_webhook_no_dates_response.go +++ /dev/null @@ -1,56 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// EventWebhookNoDatesResponse struct for EventWebhookNoDatesResponse -type EventWebhookNoDatesResponse struct { - // Indicates if the Event Webhook is enabled. - Enabled *bool `json:"enabled,omitempty"` - // The URL where SendGrid will send event data. - Url *string `json:"url,omitempty"` - // Indicates if the webhook is configured to send account status change events related to compliance action taken by SendGrid. - AccountStatusChange *bool `json:"account_status_change,omitempty"` - // Indicates if the webhook is configured to send group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. - GroupResubscribe *bool `json:"group_resubscribe,omitempty"` - // Indicates if the webhook is configured to send delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. - Delivered *bool `json:"delivered,omitempty"` - // Indicates if the webhook is configured to send group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. - GroupUnsubscribe *bool `json:"group_unsubscribe,omitempty"` - // Indicates if the webhook is configured to send spam report events. Spam reports occur when recipients mark a message as spam. - SpamReport *bool `json:"spam_report,omitempty"` - // Indicates if the webhook is configured to send bounce events. A bounce occurs when a receiving server could not or would not accept a message. - Bounce *bool `json:"bounce,omitempty"` - // Indicates if the webhook is configured to send deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. - Deferred *bool `json:"deferred,omitempty"` - // Indicates if the webhook is configured to send unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. - Unsubscribe *bool `json:"unsubscribe,omitempty"` - // Indicates if the webhook is configured to send processed events. Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered. - Processed *bool `json:"processed,omitempty"` - // Indicates if the webhook is configured to send open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. - Open *bool `json:"open,omitempty"` - // Indicates if the webhook is configured to send click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. - Click *bool `json:"click,omitempty"` - // Indicates if the webhook is configured to send dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. - Dropped *bool `json:"dropped,omitempty"` - // An optional friendly name assigned to the Event Webhook to help you differentiate it. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. - FriendlyName *string `json:"friendly_name,omitempty"` - // A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. - Id *string `json:"id,omitempty"` - // The OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token. - OauthClientId *string `json:"oauth_client_id,omitempty"` - // The URL where SendGrid sends the OAuth client ID and client secret to generate an access token. This should be your OAuth server or service provider. - OauthTokenUrl *string `json:"oauth_token_url,omitempty"` - // The public key you can use to verify the SendGrid signature. - PublicKey *string `json:"public_key,omitempty"` -} diff --git a/rest/api/v3/webhooks/model_event_webhook_oauth_response_props.go b/rest/api/v3/webhooks/model_event_webhook_oauth_response_props.go deleted file mode 100644 index b57aa7d3..00000000 --- a/rest/api/v3/webhooks/model_event_webhook_oauth_response_props.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// EventWebhookOauthResponseProps struct for EventWebhookOauthResponseProps -type EventWebhookOauthResponseProps struct { - // The OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token. - OauthClientId *string `json:"oauth_client_id,omitempty"` - // The URL where SendGrid sends the OAuth client ID and client secret to generate an access token. This should be your OAuth server or service provider. - OauthTokenUrl *string `json:"oauth_token_url,omitempty"` -} diff --git a/rest/api/v3/webhooks/model_event_webhook_request.go b/rest/api/v3/webhooks/model_event_webhook_request.go deleted file mode 100644 index 352f8866..00000000 --- a/rest/api/v3/webhooks/model_event_webhook_request.go +++ /dev/null @@ -1,52 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// EventWebhookRequest struct for EventWebhookRequest -type EventWebhookRequest struct { - // Set this property to `true` to enable the Event Webhook or `false` to disable it. - Enabled *bool `json:"enabled,omitempty"` - // Set this property to the URL where you want the Event Webhook to send event data. - Url string `json:"url"` - // Set this property to `true` to receive group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. - GroupResubscribe *bool `json:"group_resubscribe,omitempty"` - // Set this property to `true` to receive delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. - Delivered *bool `json:"delivered,omitempty"` - // Set this property to `true` to receive group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. - GroupUnsubscribe *bool `json:"group_unsubscribe,omitempty"` - // Set this property to `true` to receive spam report events. Spam reports occur when recipients mark a message as spam. - SpamReport *bool `json:"spam_report,omitempty"` - // Set this property to `true` to receive bounce events. A bounce occurs when a receiving server could not or would not accept a message. - Bounce *bool `json:"bounce,omitempty"` - // Set this property to `true` to receive deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. - Deferred *bool `json:"deferred,omitempty"` - // Set this property to `true` to receive unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. - Unsubscribe *bool `json:"unsubscribe,omitempty"` - // Set this property to `true` to receive processed events. Processed events occur when a message has been received by Twilio SendGrid and the message is ready to be delivered. - Processed *bool `json:"processed,omitempty"` - // Set this property to `true` to receive open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. - Open *bool `json:"open,omitempty"` - // Set this property to `true` to receive click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. - Click *bool `json:"click,omitempty"` - // Set this property to `true` to receive dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. - Dropped *bool `json:"dropped,omitempty"` - // Optionally set this property to a friendly name for the Event Webhook. A friendly name may be assigned to each of your webhooks to help you differentiate them. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. - FriendlyName *string `json:"friendly_name,omitempty"` - // Set this property to the OAuth client ID that SendGrid will pass to your OAuth server or service provider to generate an OAuth access token. When passing data in this property, you must also include the `oauth_token_url` property. - OauthClientId *string `json:"oauth_client_id,omitempty"` - // Set this property to the OAuth client secret that SendGrid will pass to your OAuth server or service provider to generate an OAuth access token. This secret is needed only once to create an access token. SendGrid will store the secret, allowing you to update your client ID and Token URL without passing the secret to SendGrid again. When passing data in this field, you must also include the `oauth_client_id` and `oauth_token_url` properties. - OauthClientSecret *string `json:"oauth_client_secret,omitempty"` - // Set this property to the URL where SendGrid will send the OAuth client ID and client secret to generate an OAuth access token. This should be your OAuth server or service provider. When passing data in this field, you must also include the `oauth_client_id` property. - OauthTokenUrl *string `json:"oauth_token_url,omitempty"` -} diff --git a/rest/api/v3/webhooks/model_event_webhook_signed_response.go b/rest/api/v3/webhooks/model_event_webhook_signed_response.go deleted file mode 100644 index b867cfff..00000000 --- a/rest/api/v3/webhooks/model_event_webhook_signed_response.go +++ /dev/null @@ -1,64 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "time" -) - -// EventWebhookSignedResponse struct for EventWebhookSignedResponse -type EventWebhookSignedResponse struct { - // Indicates if the Event Webhook is enabled. - Enabled *bool `json:"enabled,omitempty"` - // The URL where SendGrid will send event data. - Url *string `json:"url,omitempty"` - // Indicates if the webhook is configured to send account status change events related to compliance action taken by SendGrid. - AccountStatusChange *bool `json:"account_status_change,omitempty"` - // Indicates if the webhook is configured to send group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. - GroupResubscribe *bool `json:"group_resubscribe,omitempty"` - // Indicates if the webhook is configured to send delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. - Delivered *bool `json:"delivered,omitempty"` - // Indicates if the webhook is configured to send group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. - GroupUnsubscribe *bool `json:"group_unsubscribe,omitempty"` - // Indicates if the webhook is configured to send spam report events. Spam reports occur when recipients mark a message as spam. - SpamReport *bool `json:"spam_report,omitempty"` - // Indicates if the webhook is configured to send bounce events. A bounce occurs when a receiving server could not or would not accept a message. - Bounce *bool `json:"bounce,omitempty"` - // Indicates if the webhook is configured to send deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. - Deferred *bool `json:"deferred,omitempty"` - // Indicates if the webhook is configured to send unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. - Unsubscribe *bool `json:"unsubscribe,omitempty"` - // Indicates if the webhook is configured to send processed events. Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered. - Processed *bool `json:"processed,omitempty"` - // Indicates if the webhook is configured to send open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. - Open *bool `json:"open,omitempty"` - // Indicates if the webhook is configured to send click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. - Click *bool `json:"click,omitempty"` - // Indicates if the webhook is configured to send dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. - Dropped *bool `json:"dropped,omitempty"` - // An optional friendly name assigned to the Event Webhook to help you differentiate it. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. - FriendlyName *string `json:"friendly_name,omitempty"` - // A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. - Id *string `json:"id,omitempty"` - // An ISO 8601 timestamp in UTC timezone when the Event Webhook was created. If a Webhook's `created_date` is `null`, it is a [legacy Event Webook](https://www.twilio.com/en-us/changelog/event-webhooks), which means it is your oldest Webhook. - CreatedDate *time.Time `json:"created_date,omitempty"` - // An ISO 8601 timestamp in UTC timezone when the Event Webhook was last modified. - UpdatedDate *time.Time `json:"updated_date,omitempty"` - // The OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token. - OauthClientId *string `json:"oauth_client_id,omitempty"` - // The URL where SendGrid sends the OAuth client ID and client secret to generate an access token. This should be your OAuth server or service provider. - OauthTokenUrl *string `json:"oauth_token_url,omitempty"` - // The public key you can use to verify the SendGrid signature. - PublicKey *string `json:"public_key,omitempty"` -} diff --git a/rest/api/v3/webhooks/model_event_webhook_signed_response_prop.go b/rest/api/v3/webhooks/model_event_webhook_signed_response_prop.go deleted file mode 100644 index 6751471b..00000000 --- a/rest/api/v3/webhooks/model_event_webhook_signed_response_prop.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// EventWebhookSignedResponseProp struct for EventWebhookSignedResponseProp -type EventWebhookSignedResponseProp struct { - // The public key you can use to verify the SendGrid signature. - PublicKey *string `json:"public_key,omitempty"` -} diff --git a/rest/api/v3/webhooks/model_event_webhook_test_request.go b/rest/api/v3/webhooks/model_event_webhook_test_request.go deleted file mode 100644 index 402bed8c..00000000 --- a/rest/api/v3/webhooks/model_event_webhook_test_request.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// EventWebhookTestRequest struct for EventWebhookTestRequest -type EventWebhookTestRequest struct { - // The ID of the Event Webhook you want to retrieve. - Id *string `json:"id,omitempty"` - // The URL where you would like the test notification to be sent. - Url string `json:"url"` - // The client ID Twilio SendGrid sends to your OAuth server or service provider to generate an OAuth access token. When passing data in this property, you must also include the `oauth_token_url` property. - OauthClientId *string `json:"oauth_client_id,omitempty"` - // The `oauth_client_secret` is needed only once to create an access token. SendGrid will store this secret, allowing you to update your Client ID and Token URL without passing the secret to SendGrid again. When passing data in this field, you must also include the `oauth_client_id` and `oauth_token_url` properties. - OauthClientSecret *string `json:"oauth_client_secret,omitempty"` - // The URL where Twilio SendGrid sends the Client ID and Client Secret to generate an access token. This should be your OAuth server or service provider. When passing data in this field, you must also include the `oauth_client_id` property. - OauthTokenUrl *string `json:"oauth_token_url,omitempty"` -} diff --git a/rest/api/v3/webhooks/model_event_webhook_unsigned_response.go b/rest/api/v3/webhooks/model_event_webhook_unsigned_response.go deleted file mode 100644 index 9739fa46..00000000 --- a/rest/api/v3/webhooks/model_event_webhook_unsigned_response.go +++ /dev/null @@ -1,62 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -import ( - "time" -) - -// EventWebhookUnsignedResponse struct for EventWebhookUnsignedResponse -type EventWebhookUnsignedResponse struct { - // Indicates if the Event Webhook is enabled. - Enabled *bool `json:"enabled,omitempty"` - // The URL where SendGrid will send event data. - Url *string `json:"url,omitempty"` - // Indicates if the webhook is configured to send account status change events related to compliance action taken by SendGrid. - AccountStatusChange *bool `json:"account_status_change,omitempty"` - // Indicates if the webhook is configured to send group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. - GroupResubscribe *bool `json:"group_resubscribe,omitempty"` - // Indicates if the webhook is configured to send delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. - Delivered *bool `json:"delivered,omitempty"` - // Indicates if the webhook is configured to send group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. - GroupUnsubscribe *bool `json:"group_unsubscribe,omitempty"` - // Indicates if the webhook is configured to send spam report events. Spam reports occur when recipients mark a message as spam. - SpamReport *bool `json:"spam_report,omitempty"` - // Indicates if the webhook is configured to send bounce events. A bounce occurs when a receiving server could not or would not accept a message. - Bounce *bool `json:"bounce,omitempty"` - // Indicates if the webhook is configured to send deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. - Deferred *bool `json:"deferred,omitempty"` - // Indicates if the webhook is configured to send unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. - Unsubscribe *bool `json:"unsubscribe,omitempty"` - // Indicates if the webhook is configured to send processed events. Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered. - Processed *bool `json:"processed,omitempty"` - // Indicates if the webhook is configured to send open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. - Open *bool `json:"open,omitempty"` - // Indicates if the webhook is configured to send click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. - Click *bool `json:"click,omitempty"` - // Indicates if the webhook is configured to send dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. - Dropped *bool `json:"dropped,omitempty"` - // An optional friendly name assigned to the Event Webhook to help you differentiate it. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. - FriendlyName *string `json:"friendly_name,omitempty"` - // A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. - Id *string `json:"id,omitempty"` - // An ISO 8601 timestamp in UTC timezone when the Event Webhook was created. If a Webhook's `created_date` is `null`, it is a [legacy Event Webook](https://www.twilio.com/en-us/changelog/event-webhooks), which means it is your oldest Webhook. - CreatedDate *time.Time `json:"created_date,omitempty"` - // An ISO 8601 timestamp in UTC timezone when the Event Webhook was last modified. - UpdatedDate *time.Time `json:"updated_date,omitempty"` - // The OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token. - OauthClientId *string `json:"oauth_client_id,omitempty"` - // The URL where SendGrid sends the OAuth client ID and client secret to generate an access token. This should be your OAuth server or service provider. - OauthTokenUrl *string `json:"oauth_token_url,omitempty"` -} diff --git a/rest/api/v3/webhooks/model_get_signed_event_webhook_200_response.go b/rest/api/v3/webhooks/model_get_signed_event_webhook_200_response.go deleted file mode 100644 index 0282f0ed..00000000 --- a/rest/api/v3/webhooks/model_get_signed_event_webhook_200_response.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetSignedEventWebhook200Response struct for GetSignedEventWebhook200Response -type GetSignedEventWebhook200Response struct { - // A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. - Id *string `json:"id,omitempty"` - // The public key you can use to verify the Twilio SendGrid signature. - PublicKey *string `json:"public_key,omitempty"` -} diff --git a/rest/api/v3/webhooks/model_get_signed_event_webhook_404_response.go b/rest/api/v3/webhooks/model_get_signed_event_webhook_404_response.go deleted file mode 100644 index 162dcb9b..00000000 --- a/rest/api/v3/webhooks/model_get_signed_event_webhook_404_response.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetSignedEventWebhook404Response struct for GetSignedEventWebhook404Response -type GetSignedEventWebhook404Response struct { - Errors *[]GetSignedEventWebhook404ResponseErrorsInner `json:"errors,omitempty"` -} diff --git a/rest/api/v3/webhooks/model_get_signed_event_webhook_404_response_errors_inner.go b/rest/api/v3/webhooks/model_get_signed_event_webhook_404_response_errors_inner.go deleted file mode 100644 index 9c83f2aa..00000000 --- a/rest/api/v3/webhooks/model_get_signed_event_webhook_404_response_errors_inner.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// GetSignedEventWebhook404ResponseErrorsInner struct for GetSignedEventWebhook404ResponseErrorsInner -type GetSignedEventWebhook404ResponseErrorsInner struct { - // Error message. - Message *string `json:"message,omitempty"` -} diff --git a/rest/api/v3/webhooks/model_list_parse_setting_200_response.go b/rest/api/v3/webhooks/model_list_parse_setting_200_response.go deleted file mode 100644 index 29e79746..00000000 --- a/rest/api/v3/webhooks/model_list_parse_setting_200_response.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListParseSetting200Response struct for ListParseSetting200Response -type ListParseSetting200Response struct { - // The list of your current inbound parse settings. - Result *[]ParseSetting `json:"result,omitempty"` -} diff --git a/rest/api/v3/webhooks/model_list_parse_static_200_response_inner.go b/rest/api/v3/webhooks/model_list_parse_static_200_response_inner.go deleted file mode 100644 index 2ed8fae6..00000000 --- a/rest/api/v3/webhooks/model_list_parse_static_200_response_inner.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListParseStatic200ResponseInner struct for ListParseStatic200ResponseInner -type ListParseStatic200ResponseInner struct { - // The date that the stats were collected. - Date string `json:"date"` - // The Parse Webhook usage statistics. - Stats []ListParseStatic200ResponseInnerStatsInner `json:"stats"` -} diff --git a/rest/api/v3/webhooks/model_list_parse_static_200_response_inner_stats_inner.go b/rest/api/v3/webhooks/model_list_parse_static_200_response_inner_stats_inner.go deleted file mode 100644 index 5a2cc1ad..00000000 --- a/rest/api/v3/webhooks/model_list_parse_static_200_response_inner_stats_inner.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListParseStatic200ResponseInnerStatsInner struct for ListParseStatic200ResponseInnerStatsInner -type ListParseStatic200ResponseInnerStatsInner struct { - Metrics *ListParseStatic200ResponseInnerStatsInnerMetrics `json:"metrics,omitempty"` -} diff --git a/rest/api/v3/webhooks/model_list_parse_static_200_response_inner_stats_inner_metrics.go b/rest/api/v3/webhooks/model_list_parse_static_200_response_inner_stats_inner_metrics.go deleted file mode 100644 index 929a73b4..00000000 --- a/rest/api/v3/webhooks/model_list_parse_static_200_response_inner_stats_inner_metrics.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ListParseStatic200ResponseInnerStatsInnerMetrics struct for ListParseStatic200ResponseInnerStatsInnerMetrics -type ListParseStatic200ResponseInnerStatsInnerMetrics struct { - // The number of emails received and parsed by the Parse Webhook. - Received float32 `json:"received"` -} diff --git a/rest/api/v3/webhooks/model_parse_setting.go b/rest/api/v3/webhooks/model_parse_setting.go deleted file mode 100644 index 44d9eddf..00000000 --- a/rest/api/v3/webhooks/model_parse_setting.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// ParseSetting struct for ParseSetting -type ParseSetting struct { - // The public URL where you would like SendGrid to POST the data parsed from your email. Any emails sent with the given hostname provided (whose MX records have been updated to point to SendGrid) will be parsed and POSTed to this URL. - Url *string `json:"url,omitempty"` - // A specific and unique domain or subdomain that you have created to use exclusively to parse your incoming email. For example, `parse.yourdomain.com`. - Hostname *string `json:"hostname,omitempty"` - // Indicates if you would like SendGrid to check the content parsed from your emails for spam before POSTing them to your domain. - SpamCheck *bool `json:"spam_check,omitempty"` - // Indicates if you would like SendGrid to post the original MIME-type content of your parsed email. When this parameter is set to `true`, SendGrid will send a JSON payload of the content of your email. - SendRaw *bool `json:"send_raw,omitempty"` -} diff --git a/rest/api/v3/webhooks/model_update_signed_event_webhook_request.go b/rest/api/v3/webhooks/model_update_signed_event_webhook_request.go deleted file mode 100644 index c3d5ecaa..00000000 --- a/rest/api/v3/webhooks/model_update_signed_event_webhook_request.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -* This code was generated by -* -* SENDGRID-OAI-GENERATOR -* -* Twilio SendGrid Webhook Configuration API -* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. -* -* NOTE: This class is auto generated by OpenAPI Generator. -* https://openapi-generator.tech -* Do not edit the class manually. - */ - -package openapi - -// UpdateSignedEventWebhookRequest struct for UpdateSignedEventWebhookRequest -type UpdateSignedEventWebhookRequest struct { - // Enable or disable the webhook by setting this property to `true` or `false`, respectively. - Enabled bool `json:"enabled"` -} From 3f10519b0b7f196d68c4ac3fb57df6f4ce3fdc95 Mon Sep 17 00:00:00 2001 From: Shubham Tiwari Date: Fri, 4 Oct 2024 18:30:19 +0530 Subject: [PATCH 16/16] chore: add rest folder --- .gitignore | 1 + rest/api/v3/account_provisioning/README.md | 87 +++++++++ .../api_authenticate_account.go | 52 +++++ .../api_create_account.go | 74 +++++++ .../api_delete_account.go | 52 +++++ .../api_get_account_state.go | 61 ++++++ .../account_provisioning/api_list_account.go | 70 +++++++ .../api_list_account_offering.go | 61 ++++++ .../account_provisioning/api_list_offering.go | 49 +++++ .../v3/account_provisioning/api_service.go | 34 ++++ .../api_update_account_offering.go | 76 ++++++++ .../api_update_account_state.go | 68 +++++++ .../account_provisioning/docs/AccountList.md | 12 ++ .../docs/AccountProvisioningAccount.md | 12 ++ .../docs/AccountProvisioningAccountId.md | 11 ++ .../docs/AccountProvisioningCatalog.md | 11 ++ .../docs/AccountProvisioningOfferingList.md | 11 ++ .../docs/AccountProvisioningOfferingV1.md | 13 ++ .../docs/AccountProvisioningPagination.md | 12 ++ .../docs/AccountProvisioningProfile.md | 17 ++ .../docs/AccountProvisioningStateRead.md | 11 ++ .../docs/AccountProvisioningStateWrite.md | 11 ++ .../docs/AuthenticateAccount.md | 51 +++++ .../account_provisioning/docs/CatalogEntry.md | 12 ++ .../docs/CatalogEntryEntitlements.md | 14 ++ .../docs/CreateAccount.md | 48 +++++ .../docs/CreateAccountParams.md | 12 ++ .../docs/DeleteAccount.md | 51 +++++ .../docs/ErrorResponse.md | 13 ++ .../docs/GetAccountState.md | 51 +++++ .../account_provisioning/docs/ListAccount.md | 49 +++++ .../docs/ListAccountOffering.md | 51 +++++ .../account_provisioning/docs/ListOffering.md | 44 +++++ .../docs/OfferingsToAdd.md | 11 ++ .../api/v3/account_provisioning/docs/State.md | 16 ++ .../v3/account_provisioning/docs/State1.md | 13 ++ rest/api/v3/account_provisioning/docs/Type.md | 13 ++ .../docs/UpdateAccountOffering.md | 51 +++++ .../docs/UpdateAccountState.md | 51 +++++ .../model_account_list.go | 21 ++ .../model_account_provisioning_account.go | 26 +++ .../model_account_provisioning_account_id.go | 20 ++ .../model_account_provisioning_catalog.go | 19 ++ ...odel_account_provisioning_offering_list.go | 19 ++ .../model_account_provisioning_offering_v1.go | 24 +++ .../model_account_provisioning_pagination.go | 21 ++ .../model_account_provisioning_profile.go | 32 +++ .../model_account_provisioning_state_read.go | 20 ++ .../model_account_provisioning_state_write.go | 20 ++ .../model_catalog_entry.go | 20 ++ .../model_catalog_entry_entitlements.go | 26 +++ .../model_create_account_params.go | 21 ++ .../model_error_response.go | 24 +++ .../model_offerings_to_add.go | 20 ++ .../v3/account_provisioning/model_state.go | 26 +++ .../v3/account_provisioning/model_state1.go | 23 +++ .../api/v3/account_provisioning/model_type.go | 23 +++ rest/api/v3/alerts/README.md | 77 ++++++++ rest/api/v3/alerts/api_create_alert.go | 82 ++++++++ rest/api/v3/alerts/api_delete_alert.go | 62 ++++++ rest/api/v3/alerts/api_get_alert.go | 71 +++++++ rest/api/v3/alerts/api_list_alert.go | 59 ++++++ rest/api/v3/alerts/api_service.go | 34 ++++ rest/api/v3/alerts/api_update_alert.go | 86 ++++++++ rest/api/v3/alerts/docs/CreateAlert.md | 49 +++++ .../v3/alerts/docs/CreateAlert201Response.md | 17 ++ rest/api/v3/alerts/docs/CreateAlertRequest.md | 14 ++ rest/api/v3/alerts/docs/DeleteAlert.md | 52 +++++ rest/api/v3/alerts/docs/ErrorResponse.md | 12 ++ .../alerts/docs/ErrorResponseErrorsInner.md | 13 ++ rest/api/v3/alerts/docs/GetAlert.md | 52 +++++ .../api/v3/alerts/docs/GetAlert200Response.md | 17 ++ rest/api/v3/alerts/docs/ListAlert.md | 48 +++++ .../alerts/docs/ListAlert200ResponseInner.md | 17 ++ rest/api/v3/alerts/docs/Type.md | 13 ++ rest/api/v3/alerts/docs/Type1.md | 13 ++ rest/api/v3/alerts/docs/Type2.md | 13 ++ rest/api/v3/alerts/docs/Type3.md | 13 ++ rest/api/v3/alerts/docs/UpdateAlert.md | 53 +++++ .../v3/alerts/docs/UpdateAlert200Response.md | 17 ++ rest/api/v3/alerts/docs/UpdateAlertRequest.md | 13 ++ .../alerts/model_create_alert_201_response.go | 32 +++ .../v3/alerts/model_create_alert_request.go | 26 +++ rest/api/v3/alerts/model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ .../v3/alerts/model_get_alert_200_response.go | 32 +++ .../model_list_alert_200_response_inner.go | 32 +++ rest/api/v3/alerts/model_type.go | 23 +++ rest/api/v3/alerts/model_type1.go | 23 +++ rest/api/v3/alerts/model_type2.go | 23 +++ rest/api/v3/alerts/model_type3.go | 23 +++ .../alerts/model_update_alert_200_response.go | 32 +++ .../v3/alerts/model_update_alert_request.go | 24 +++ rest/api/v3/api_keys/README.md | 76 ++++++++ rest/api/v3/api_keys/api_create_api_key.go | 106 ++++++++++ rest/api/v3/api_keys/api_delete_api_key.go | 94 +++++++++ rest/api/v3/api_keys/api_get_api_key.go | 102 ++++++++++ rest/api/v3/api_keys/api_list_api_key.go | 94 +++++++++ rest/api/v3/api_keys/api_service.go | 34 ++++ rest/api/v3/api_keys/api_update_api_key.go | 117 +++++++++++ .../v3/api_keys/api_update_api_key_name.go | 117 +++++++++++ rest/api/v3/api_keys/docs/ApiKeyResponse.md | 12 ++ .../v3/api_keys/docs/ApiKeyScopesResponse.md | 13 ++ rest/api/v3/api_keys/docs/CreateApiKey.md | 49 +++++ .../api_keys/docs/CreateApiKey201Response.md | 14 ++ .../v3/api_keys/docs/CreateApiKeyRequest.md | 12 ++ rest/api/v3/api_keys/docs/DeleteApiKey.md | 52 +++++ rest/api/v3/api_keys/docs/ErrorResponse.md | 12 ++ .../api_keys/docs/ErrorResponseErrorsInner.md | 13 ++ rest/api/v3/api_keys/docs/GetApiKey.md | 52 +++++ .../v3/api_keys/docs/GetApiKey200Response.md | 11 ++ rest/api/v3/api_keys/docs/ListApiKey.md | 49 +++++ .../v3/api_keys/docs/ListApiKey200Response.md | 11 ++ rest/api/v3/api_keys/docs/UpdateApiKey.md | 53 +++++ rest/api/v3/api_keys/docs/UpdateApiKeyName.md | 53 +++++ .../api_keys/docs/UpdateApiKeyNameRequest.md | 11 ++ .../v3/api_keys/docs/UpdateApiKeyRequest.md | 12 ++ .../api/v3/api_keys/model_api_key_response.go | 22 +++ .../api_keys/model_api_key_scopes_response.go | 24 +++ .../model_create_api_key_201_response.go | 22 +++ .../api_keys/model_create_api_key_request.go | 22 +++ rest/api/v3/api_keys/model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ .../model_get_api_key_200_response.go | 19 ++ .../model_list_api_key_200_response.go | 19 ++ .../model_update_api_key_name_request.go | 20 ++ .../api_keys/model_update_api_key_request.go | 20 ++ rest/api/v3/domain_authentication/README.md | 103 ++++++++++ .../api_add_ip_to_authenticated_domain.go | 86 ++++++++ .../api_associate_subuser_with_domain.go | 77 ++++++++ ..._associate_subuser_with_domain_multiple.go | 77 ++++++++ .../api_authenticate_domain.go | 74 +++++++ .../api_delete_authenticated_domain.go | 70 +++++++ ...api_delete_ip_from_authenticated_domain.go | 80 ++++++++ ...ssociate_authenticated_domain_from_user.go | 60 ++++++ .../api_disassociate_subuser_from_domain.go | 72 +++++++ .../api_email_dns_record.go | 65 +++++++ .../api_get_authenticated_domain.go | 70 +++++++ ...list_all_authenticated_domain_with_user.go | 60 ++++++ .../api_list_authenticated_domain.go | 106 ++++++++++ ...api_list_authenticated_domain_with_user.go | 60 ++++++ .../api_list_default_authenticated_domain.go | 69 +++++++ .../v3/domain_authentication/api_service.go | 34 ++++ .../api_update_authenticated_domain.go | 85 ++++++++ .../api_validate_authenticated_domain.go | 79 ++++++++ .../docs/AddIpToAuthenticatedDomain.md | 53 +++++ .../docs/AddIpToAuthenticatedDomainRequest.md | 11 ++ .../docs/AssociateSubuserWithDomain.md | 52 +++++ .../AssociateSubuserWithDomainMultiple.md | 52 +++++ .../docs/AssociateSubuserWithDomainRequest.md | 11 ++ .../docs/AuthenticateDomain.md | 49 +++++ .../docs/AuthenticateDomainRequest.md | 19 ++ .../docs/AuthenticatedDomain.md | 22 +++ .../docs/AuthenticatedDomainSpf.md | 22 +++ .../docs/AuthenticatedDomainSpfDns.md | 14 ++ .../docs/AuthenticatedDomainSpfDnsDkim.md | 14 ++ .../AuthenticatedDomainSpfDnsDomainSpf.md | 14 ++ .../AuthenticatedDomainSpfDnsMailServer.md | 14 ++ .../AuthenticatedDomainSpfDnsSubdomainSpf.md | 14 ++ .../docs/DeleteAuthenticatedDomain.md | 52 +++++ .../docs/DeleteIpFromAuthenticatedDomain.md | 53 +++++ ...DisassociateAuthenticatedDomainFromUser.md | 48 +++++ .../docs/DisassociateSubuserFromDomain.md | 52 +++++ .../docs/EmailDnsRecord.md | 48 +++++ .../docs/EmailDnsRecord400Response.md | 11 ++ .../docs/EmailDnsRecord400ResponseErrors.md | 12 ++ .../docs/EmailDnsRecordRequest.md | 14 ++ .../docs/GetAuthenticatedDomain.md | 52 +++++ .../ListAllAuthenticatedDomainWithUser.md | 47 +++++ ...enticatedDomainWithUser200ResponseInner.md | 22 +++ ...icatedDomainWithUser200ResponseInnerDns.md | 13 ++ ...dDomainWithUser200ResponseInnerDnsDkim1.md | 14 ++ ...ainWithUser200ResponseInnerDnsMailCname.md | 14 ++ .../docs/ListAuthenticatedDomain.md | 53 +++++ .../docs/ListAuthenticatedDomainWithUser.md | 47 +++++ .../docs/ListDefaultAuthenticatedDomain.md | 49 +++++ .../docs/UpdateAuthenticatedDomain.md | 53 +++++ .../docs/UpdateAuthenticatedDomainRequest.md | 12 ++ .../docs/ValidateAuthenticatedDomain.md | 52 +++++ .../ValidateAuthenticatedDomain200Response.md | 13 ++ ...catedDomain200ResponseValidationResults.md | 14 ++ ...Domain200ResponseValidationResultsDkim1.md | 12 ++ ...in200ResponseValidationResultsMailCname.md | 12 ++ ...edDomain200ResponseValidationResultsSpf.md | 12 ++ .../ValidateAuthenticatedDomain500Response.md | 11 ++ ...thenticatedDomain500ResponseErrorsInner.md | 11 ++ ..._add_ip_to_authenticated_domain_request.go | 20 ++ ...l_associate_subuser_with_domain_request.go | 20 ++ .../model_authenticate_domain_request.go | 36 ++++ .../model_authenticated_domain.go | 41 ++++ .../model_authenticated_domain_spf.go | 41 ++++ .../model_authenticated_domain_spf_dns.go | 22 +++ ...model_authenticated_domain_spf_dns_dkim.go | 26 +++ ...authenticated_domain_spf_dns_domain_spf.go | 26 +++ ...uthenticated_domain_spf_dns_mail_server.go | 26 +++ ...henticated_domain_spf_dns_subdomain_spf.go | 26 +++ .../model_email_dns_record_400_response.go | 19 ++ ...el_email_dns_record_400_response_errors.go | 20 ++ .../model_email_dns_record_request.go | 26 +++ ...ted_domain_with_user_200_response_inner.go | 41 ++++ ...domain_with_user_200_response_inner_dns.go | 21 ++ ..._with_user_200_response_inner_dns_dkim1.go | 26 +++ ..._user_200_response_inner_dns_mail_cname.go | 26 +++ ...del_update_authenticated_domain_request.go | 22 +++ ...idate_authenticated_domain_200_response.go | 23 +++ ..._domain_200_response_validation_results.go | 22 +++ ...n_200_response_validation_results_dkim1.go | 21 ++ ..._response_validation_results_mail_cname.go | 22 +++ ...ain_200_response_validation_results_spf.go | 21 ++ ...idate_authenticated_domain_500_response.go | 19 ++ ...icated_domain_500_response_errors_inner.go | 20 ++ rest/api/v3/email_activity/README.md | 89 +++++++++ .../api/v3/email_activity/api_download_csv.go | 77 ++++++++ rest/api/v3/email_activity/api_get_message.go | 85 ++++++++ .../api/v3/email_activity/api_list_message.go | 86 ++++++++ rest/api/v3/email_activity/api_request_csv.go | 84 ++++++++ rest/api/v3/email_activity/api_service.go | 34 ++++ .../api/v3/email_activity/docs/AbbvMessage.md | 18 ++ rest/api/v3/email_activity/docs/BounceType.md | 13 ++ .../api/v3/email_activity/docs/BounceType1.md | 13 ++ .../api/v3/email_activity/docs/DownloadCsv.md | 51 +++++ .../docs/DownloadCsv200Response.md | 12 ++ .../docs/EmailActivityResponseBaseProps.md | 15 ++ rest/api/v3/email_activity/docs/Event.md | 18 ++ rest/api/v3/email_activity/docs/EventName.md | 22 +++ rest/api/v3/email_activity/docs/EventName1.md | 22 +++ rest/api/v3/email_activity/docs/GetMessage.md | 51 +++++ .../docs/GetMessage404Response.md | 11 ++ .../docs/GetMessage404ResponseErrorsInner.md | 12 ++ .../api/v3/email_activity/docs/ListMessage.md | 48 +++++ .../docs/ListMessage200Response.md | 11 ++ .../docs/ListMessage400Response.md | 11 ++ .../docs/ListMessage400ResponseErrorsInner.md | 11 ++ .../docs/ListMessage429Response.md | 11 ++ .../docs/ListMessage429ResponseErrorsInner.md | 11 ++ rest/api/v3/email_activity/docs/Message.md | 25 +++ .../v3/email_activity/docs/OutboundIpType.md | 13 ++ .../v3/email_activity/docs/OutboundIpType1.md | 13 ++ rest/api/v3/email_activity/docs/RequestCsv.md | 48 +++++ .../docs/RequestCsv202Response.md | 12 ++ rest/api/v3/email_activity/docs/Status.md | 14 ++ rest/api/v3/email_activity/docs/Status1.md | 14 ++ rest/api/v3/email_activity/docs/Status2.md | 12 ++ rest/api/v3/email_activity/docs/Status3.md | 14 ++ .../v3/email_activity/model_abbv__message.go | 27 +++ .../v3/email_activity/model_bounce_type.go | 23 +++ .../v3/email_activity/model_bounce_type1.go | 23 +++ .../model_download_csv_200_response.go | 22 +++ ...odel_email_activity_response_base_props.go | 28 +++ rest/api/v3/email_activity/model_event.go | 34 ++++ .../api/v3/email_activity/model_event_name.go | 32 +++ .../v3/email_activity/model_event_name1.go | 32 +++ .../model_get_message_404_response.go | 19 ++ ...l_get_message_404_response_errors_inner.go | 20 ++ .../model_list_message_200_response.go | 19 ++ .../model_list_message_400_response.go | 19 ++ ..._list_message_400_response_errors_inner.go | 19 ++ .../model_list_message_429_response.go | 19 ++ ..._list_message_429_response_errors_inner.go | 19 ++ rest/api/v3/email_activity/model_message.go | 48 +++++ .../email_activity/model_outbound_ip_type.go | 23 +++ .../email_activity/model_outbound_ip_type1.go | 23 +++ .../model_request_csv_202_response.go | 20 ++ rest/api/v3/email_activity/model_status.go | 24 +++ rest/api/v3/email_activity/model_status1.go | 24 +++ rest/api/v3/email_activity/model_status2.go | 22 +++ rest/api/v3/email_activity/model_status3.go | 24 +++ rest/api/v3/email_validation/README.md | 94 +++++++++ .../api_get_email_job_for_verification.go | 77 ++++++++ .../api_get_validations_email_jobs.go | 65 +++++++ .../api_list_email_job_for_verification.go | 81 ++++++++ rest/api/v3/email_validation/api_service.go | 34 ++++ .../v3/email_validation/api_validate_email.go | 65 +++++++ .../v3/email_validation/docs/ErrorResponse.md | 12 ++ .../docs/ErrorResponseErrorsInner.md | 13 ++ rest/api/v3/email_validation/docs/FileType.md | 13 ++ .../docs/GetEmailJobForVerification.md | 51 +++++ .../docs/GetValidationsEmailJobs.md | 44 +++++ .../GetValidationsEmailJobs200Response.md | 11 ++ ...idationsEmailJobs200ResponseResultInner.md | 14 ++ ...GetValidationsEmailJobsJobId200Response.md | 11 ++ ...idationsEmailJobsJobId200ResponseResult.md | 18 ++ ...ilJobsJobId200ResponseResultErrorsInner.md | 11 ++ .../docs/ListEmailJobForVerification.md | 48 +++++ .../ListEmailJobForVerificationRequest.md | 11 ++ .../PutValidationsEmailJobs200Response.md | 13 ++ ...sEmailJobs200ResponseUploadHeadersInner.md | 12 ++ rest/api/v3/email_validation/docs/Status.md | 17 ++ rest/api/v3/email_validation/docs/Status1.md | 17 ++ .../v3/email_validation/docs/ValidateEmail.md | 48 +++++ .../docs/ValidateEmail200Response.md | 11 ++ .../docs/ValidateEmail200ResponseResult.md | 19 ++ .../ValidateEmail200ResponseResultChecks.md | 13 ++ ...eEmail200ResponseResultChecksAdditional.md | 12 ++ ...idateEmail200ResponseResultChecksDomain.md | 13 ++ ...teEmail200ResponseResultChecksLocalPart.md | 11 ++ .../docs/ValidateEmailRequest.md | 12 ++ rest/api/v3/email_validation/docs/Verdict.md | 14 ++ .../email_validation/model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ .../v3/email_validation/model_file_type.go | 23 +++ ..._get_validations_email_jobs200_response.go | 20 ++ ...ons_email_jobs200_response_result_inner.go | 26 +++ ...lidations_email_jobs_job_id200_response.go | 19 ++ ...ns_email_jobs_job_id200_response_result.go | 34 ++++ ..._job_id200_response_result_errors_inner.go | 20 ++ ...list_email_job_for_verification_request.go | 20 ++ ..._put_validations_email_jobs200_response.go | 24 +++ ...l_jobs200_response_upload_headers_inner.go | 22 +++ rest/api/v3/email_validation/model_status.go | 27 +++ rest/api/v3/email_validation/model_status1.go | 27 +++ .../model_validate_email_200_response.go | 19 ++ ...odel_validate_email_200_response_result.go | 35 ++++ ...lidate_email_200_response_result_checks.go | 21 ++ ...l_200_response_result_checks_additional.go | 22 +++ ...email_200_response_result_checks_domain.go | 24 +++ ...l_200_response_result_checks_local_part.go | 20 ++ .../model_validate_email_request.go | 22 +++ rest/api/v3/email_validation/model_verdict.go | 24 +++ rest/api/v3/enforced_tls/README.md | 68 +++++++ .../api_list_enforced_tls_setting.go | 83 ++++++++ rest/api/v3/enforced_tls/api_service.go | 34 ++++ .../api_update_enforced_tls_setting.go | 98 ++++++++++ .../docs/EnforcedTlsRequestResponse.md | 13 ++ .../api/v3/enforced_tls/docs/ErrorResponse.md | 12 ++ .../docs/ErrorResponseErrorsInner.md | 13 ++ .../docs/ListEnforcedTlsSetting.md | 48 +++++ .../docs/UpdateEnforcedTlsSetting.md | 49 +++++ rest/api/v3/enforced_tls/docs/Version.md | 14 ++ .../model_enforced_tls_request_response.go | 24 +++ .../v3/enforced_tls/model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ rest/api/v3/enforced_tls/model_version.go | 24 +++ rest/api/v3/integrations/README.md | 94 +++++++++ .../v3/integrations/api_add_integration.go | 89 +++++++++ .../v3/integrations/api_delete_integration.go | 93 +++++++++ .../api_find_integration_by_id.go | 85 ++++++++ .../api_get_integrations_by_user.go | 65 +++++++ rest/api/v3/integrations/api_service.go | 34 ++++ .../v3/integrations/api_update_integration.go | 108 ++++++++++ .../v3/integrations/docs/AddIntegration.md | 47 +++++ .../docs/AddIntegration400Response.md | 11 ++ .../v3/integrations/docs/DeleteIntegration.md | 47 +++++ .../docs/DeleteIntegration400Response.md | 11 ++ .../docs/DeleteIntegration404Response.md | 11 ++ rest/api/v3/integrations/docs/Destination.md | 12 ++ rest/api/v3/integrations/docs/Destination1.md | 12 ++ rest/api/v3/integrations/docs/Destination2.md | 12 ++ rest/api/v3/integrations/docs/Destination3.md | 12 ++ .../v3/integrations/docs/DestinationRegion.md | 13 ++ .../integrations/docs/DestinationRegion1.md | 13 ++ .../integrations/docs/DestinationRegion2.md | 13 ++ .../integrations/docs/FindIntegrationById.md | 51 +++++ rest/api/v3/integrations/docs/Forbidden.md | 11 ++ .../docs/GetIntegrationsByUser.md | 44 +++++ .../docs/GetIntegrationsByUser200Response.md | 11 ++ .../docs/GetIntegrationsByUser403Response.md | 11 ++ .../docs/GetIntegrationsByUser500Response.md | 11 ++ rest/api/v3/integrations/docs/Id.md | 11 ++ rest/api/v3/integrations/docs/Integration.md | 16 ++ .../integrations/docs/IntegrationFilters.md | 11 ++ .../v3/integrations/docs/IntegrationInput.md | 14 ++ .../docs/IntegrationInputFilters.md | 11 ++ .../docs/IntegrationInputProperties.md | 12 ++ .../integrations/docs/IntegrationNotFound.md | 11 ++ .../v3/integrations/docs/IntegrationPatch.md | 14 ++ .../docs/IntegrationPatchFilters.md | 11 ++ .../docs/IntegrationPatchProperties.md | 12 ++ .../docs/IntegrationProperties.md | 12 ++ .../api/v3/integrations/docs/InternalError.md | 11 ++ .../integrations/docs/InvalidDeleteRequest.md | 12 ++ .../v3/integrations/docs/InvalidRequest.md | 12 ++ rest/api/v3/integrations/docs/Items.md | 23 +++ rest/api/v3/integrations/docs/Items1.md | 23 +++ rest/api/v3/integrations/docs/Items2.md | 23 +++ .../v3/integrations/docs/UpdateIntegration.md | 51 +++++ .../model_add_integration_400_response.go | 19 ++ .../model_delete_integration_400_response.go | 19 ++ .../model_delete_integration_404_response.go | 19 ++ rest/api/v3/integrations/model_destination.go | 22 +++ .../api/v3/integrations/model_destination1.go | 22 +++ .../api/v3/integrations/model_destination2.go | 22 +++ .../api/v3/integrations/model_destination3.go | 22 +++ .../integrations/model_destination_region.go | 23 +++ .../integrations/model_destination_region1.go | 23 +++ .../integrations/model_destination_region2.go | 23 +++ rest/api/v3/integrations/model_forbidden.go | 20 ++ ...l_get_integrations_by_user_200_response.go | 19 ++ ...l_get_integrations_by_user_403_response.go | 19 ++ ...l_get_integrations_by_user_500_response.go | 19 ++ rest/api/v3/integrations/model_id.go | 19 ++ rest/api/v3/integrations/model_integration.go | 28 +++ .../integrations/model_integration_filters.go | 20 ++ .../integrations/model_integration_input.go | 24 +++ .../model_integration_input_filters.go | 20 ++ .../model_integration_input_properties.go | 22 +++ .../model_integration_not_found.go | 20 ++ .../integrations/model_integration_patch.go | 24 +++ .../model_integration_patch_filters.go | 20 ++ .../model_integration_patch_properties.go | 22 +++ .../model_integration_properties.go | 22 +++ .../v3/integrations/model_internal_error.go | 20 ++ .../model_invalid_delete_request.go | 22 +++ .../v3/integrations/model_invalid_request.go | 22 +++ rest/api/v3/integrations/model_items.go | 33 ++++ rest/api/v3/integrations/model_items1.go | 33 ++++ rest/api/v3/integrations/model_items2.go | 33 ++++ rest/api/v3/ip_access_management/README.md | 79 ++++++++ .../api_add_ip_to_allow_list.go | 98 ++++++++++ .../api_delete_allowed_ip.go | 70 +++++++ .../api_delete_allowed_ips.go | 98 ++++++++++ .../api_get_allowed_ip.go | 70 +++++++ .../api_list_access_activity.go | 94 +++++++++ .../api_list_allowed_ip.go | 83 ++++++++ .../v3/ip_access_management/api_service.go | 34 ++++ .../docs/AddIpToAllowList.md | 49 +++++ .../docs/AddIpToAllowListRequest.md | 11 ++ .../docs/AddIpToAllowListRequestIpsInner.md | 11 ++ .../docs/DeleteAllowedIp.md | 52 +++++ .../docs/DeleteAllowedIps.md | 49 +++++ .../docs/DeleteAllowedIpsRequest.md | 11 ++ .../docs/ErrorResponse.md | 12 ++ .../docs/ErrorResponseErrorsInner.md | 13 ++ .../ip_access_management/docs/GetAllowedIp.md | 52 +++++ .../docs/IpAccessManagement2xx.md | 11 ++ .../docs/IpAccessManagement2xxResultInner.md | 14 ++ .../docs/ListAccessActivity.md | 49 +++++ .../docs/ListAccessActivity200Response.md | 11 ++ ...istAccessActivity200ResponseResultInner.md | 16 ++ .../docs/ListAllowedIp.md | 48 +++++ .../model_add_ip_to_allow_list_request.go | 20 ++ ..._add_ip_to_allow_list_request_ips_inner.go | 20 ++ .../model_delete_allowed_ips_request.go | 20 ++ .../model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ .../model_ip_access_management2xx.go | 20 ++ ...el_ip_access_management2xx_result_inner.go | 26 +++ ...model_list_access_activity_200_response.go | 20 ++ ...cess_activity_200_response_result_inner.go | 30 +++ rest/api/v3/ip_address_management/README.md | 118 +++++++++++ .../v3/ip_address_management/api_add_ip.go | 89 +++++++++ .../api_add_ips_to_ip_pool.go | 100 ++++++++++ .../api_add_sub_users_to_ip.go | 100 ++++++++++ .../api_create_ip_pool.go | 89 +++++++++ .../api_delete_ip_pool.go | 77 ++++++++ .../api_delete_ips_from_ip_pool.go | 92 +++++++++ .../api_delete_sub_users_from_ip.go | 92 +++++++++ .../v3/ip_address_management/api_get_ip.go | 85 ++++++++ .../ip_address_management/api_get_ip_pool.go | 85 ++++++++ .../v3/ip_address_management/api_list_ip.go | 184 ++++++++++++++++++ .../api_list_ip_assigned_to_ip_pool.go | 103 ++++++++++ .../ip_address_management/api_list_ip_pool.go | 121 ++++++++++++ .../api_list_sub_user_assigned_to_ip.go | 94 +++++++++ .../v3/ip_address_management/api_service.go | 34 ++++ .../v3/ip_address_management/api_update_ip.go | 100 ++++++++++ .../api_update_ip_pool.go | 100 ++++++++++ .../v3/ip_address_management/docs/AddIp.md | 48 +++++ .../docs/AddIp201Response.md | 15 ++ .../docs/AddIpRequest.md | 15 ++ .../docs/AddIpsToIpPool.md | 52 +++++ .../docs/AddIpsToIpPool200Response.md | 13 ++ .../docs/AddIpsToIpPoolRequest.md | 11 ++ .../docs/AddSubUsersToIp.md | 52 +++++ .../docs/AddSubUsersToIp200Response.md | 12 ++ .../docs/AddSubUsersToIpRequest.md | 11 ++ .../docs/CreateIpPool.md | 48 +++++ .../docs/CreateIpPool201Response.md | 13 ++ .../docs/CreateIpPoolRequest.md | 12 ++ .../docs/DeleteIpPool.md | 51 +++++ .../docs/DeleteIpsFromIpPool.md | 52 +++++ .../docs/DeleteIpsFromIpPoolRequest.md | 11 ++ .../docs/DeleteSubUsersFromIp.md | 52 +++++ .../docs/DeleteSubUsersFromIpRequest.md | 11 ++ .../v3/ip_address_management/docs/GetIp.md | 48 +++++ .../docs/GetIp200Response.md | 19 ++ .../docs/GetIp200ResponsePoolsInner.md | 12 ++ .../ip_address_management/docs/GetIpPool.md | 48 +++++ .../docs/GetIpPool200Response.md | 15 ++ ...etIpPool200ResponseIpCountByRegionInner.md | 12 ++ .../docs/IpAddressManagementErrorResponse.md | 11 ++ ...dressManagementErrorResponseErrorsInner.md | 12 ++ .../v3/ip_address_management/docs/Items.md | 13 ++ .../v3/ip_address_management/docs/ListIp.md | 59 ++++++ .../docs/ListIp200Response.md | 12 ++ .../docs/ListIp200ResponseMetadata.md | 11 ++ .../ListIp200ResponseMetadataNextParams.md | 22 +++ .../docs/ListIp200ResponseResultInner.md | 19 ++ .../ListIp200ResponseResultInnerPoolsInner.md | 12 ++ .../docs/ListIpAssignedToIpPool.md | 50 +++++ .../docs/ListIpAssignedToIpPool200Response.md | 12 ++ ...stIpAssignedToIpPool200ResponseMetadata.md | 11 ++ ...edToIpPool200ResponseMetadataNextParams.md | 13 ++ ...pAssignedToIpPool200ResponseResultInner.md | 13 ++ .../ip_address_management/docs/ListIpPool.md | 52 +++++ .../docs/ListIpPool200Response.md | 12 ++ .../docs/ListIpPool200ResponseMetadata.md | 11 ++ ...ListIpPool200ResponseMetadataNextParams.md | 15 ++ .../docs/ListIpPool200ResponseResultInner.md | 15 ++ .../docs/ListSubUserAssignedToIp.md | 49 +++++ .../ListSubUserAssignedToIp200Response.md | 12 ++ ...tSubUserAssignedToIp200ResponseMetadata.md | 11 ++ ...signedToIp200ResponseMetadataNextParams.md | 12 ++ .../v3/ip_address_management/docs/Region.md | 13 ++ .../v3/ip_address_management/docs/Region1.md | 14 ++ .../v3/ip_address_management/docs/Region2.md | 13 ++ .../v3/ip_address_management/docs/Region3.md | 13 ++ .../v3/ip_address_management/docs/Region4.md | 14 ++ .../v3/ip_address_management/docs/Region5.md | 13 ++ .../v3/ip_address_management/docs/Region6.md | 13 ++ .../v3/ip_address_management/docs/Region7.md | 14 ++ .../v3/ip_address_management/docs/UpdateIp.md | 52 +++++ .../docs/UpdateIp200Response.md | 14 ++ .../docs/UpdateIpPool.md | 52 +++++ .../docs/UpdateIpPool200Response.md | 12 ++ .../docs/UpdateIpPoolRequest.md | 11 ++ .../docs/UpdateIpRequest.md | 13 ++ .../model_add_ip_201_response.go | 28 +++ .../model_add_ip_request.go | 28 +++ .../model_add_ips_to_ip_pool_200_response.go | 24 +++ .../model_add_ips_to_ip_pool_request.go | 20 ++ .../model_add_sub_users_to_ip_200_response.go | 22 +++ .../model_add_sub_users_to_ip_request.go | 20 ++ .../model_create_ip_pool_201_response.go | 24 +++ .../model_create_ip_pool_request.go | 22 +++ .../model_delete_ips_from_ip_pool_request.go | 20 ++ .../model_delete_sub_users_from_ip_request.go | 20 ++ .../model_get_ip_200_response.go | 36 ++++ .../model_get_ip_200_response_pools_inner.go | 22 +++ .../model_get_ip_pool_200_response.go | 28 +++ ...l_200_response_ip_count_by_region_inner.go | 22 +++ ...el_ip_address_management_error_response.go | 20 ++ ..._management_error_response_errors_inner.go | 22 +++ .../v3/ip_address_management/model_items.go | 23 +++ .../model_list_ip_200_response.go | 20 ++ .../model_list_ip_200_response__metadata.go | 19 ++ ...t_ip_200_response__metadata_next_params.go | 42 ++++ ...model_list_ip_200_response_result_inner.go | 36 ++++ ...p_200_response_result_inner_pools_inner.go | 22 +++ ...ist_ip_assigned_to_ip_pool_200_response.go | 20 ++ ...igned_to_ip_pool_200_response__metadata.go | 19 ++ ...pool_200_response__metadata_next_params.go | 24 +++ ...ed_to_ip_pool_200_response_result_inner.go | 24 +++ .../model_list_ip_pool_200_response.go | 20 ++ ...del_list_ip_pool_200_response__metadata.go | 19 ++ ...pool_200_response__metadata_next_params.go | 28 +++ ..._list_ip_pool_200_response_result_inner.go | 28 +++ ...st_sub_user_assigned_to_ip_200_response.go | 21 ++ ...r_assigned_to_ip_200_response__metadata.go | 19 ++ ...o_ip_200_response__metadata_next_params.go | 22 +++ .../v3/ip_address_management/model_region.go | 23 +++ .../v3/ip_address_management/model_region1.go | 24 +++ .../v3/ip_address_management/model_region2.go | 23 +++ .../v3/ip_address_management/model_region3.go | 23 +++ .../v3/ip_address_management/model_region4.go | 24 +++ .../v3/ip_address_management/model_region5.go | 23 +++ .../v3/ip_address_management/model_region6.go | 23 +++ .../v3/ip_address_management/model_region7.go | 24 +++ .../model_update_ip_200_response.go | 26 +++ .../model_update_ip_pool_200_response.go | 22 +++ .../model_update_ip_pool_request.go | 20 ++ .../model_update_ip_request.go | 24 +++ rest/api/v3/ip_warmup/README.md | 76 ++++++++ rest/api/v3/ip_warmup/api_get_warm_up_ip.go | 69 +++++++ rest/api/v3/ip_warmup/api_list_warm_up_ip.go | 49 +++++ rest/api/v3/ip_warmup/api_service.go | 34 ++++ rest/api/v3/ip_warmup/api_stop_ip_warm_up.go | 69 +++++++ rest/api/v3/ip_warmup/api_warm_up_ip.go | 73 +++++++ rest/api/v3/ip_warmup/docs/GetWarmUpIp.md | 51 +++++ .../ip_warmup/docs/GetWarmUpIp404Response.md | 11 ++ .../docs/GetWarmUpIp404ResponseErrorsInner.md | 12 ++ .../api/v3/ip_warmup/docs/IpWarmup200Inner.md | 12 ++ rest/api/v3/ip_warmup/docs/ListWarmUpIp.md | 44 +++++ rest/api/v3/ip_warmup/docs/StopIpWarmUp.md | 51 +++++ .../ip_warmup/docs/StopIpWarmUp404Response.md | 11 ++ .../StopIpWarmUp404ResponseErrorsInner.md | 12 ++ rest/api/v3/ip_warmup/docs/WarmUpIp.md | 48 +++++ .../v3/ip_warmup/docs/WarmUpIp404Response.md | 11 ++ .../docs/WarmUpIp404ResponseErrorsInner.md | 12 ++ rest/api/v3/ip_warmup/docs/WarmUpIpRequest.md | 11 ++ .../model_get_warm_up_ip_404_response.go | 20 ++ ...et_warm_up_ip_404_response_errors_inner.go | 21 ++ .../v3/ip_warmup/model_ip_warmup200_inner.go | 22 +++ .../model_stop_ip_warm_up_404_response.go | 20 ++ ...op_ip_warm_up_404_response_errors_inner.go | 21 ++ .../model_warm_up_ip_404_response.go | 20 ++ ...el_warm_up_ip_404_response_errors_inner.go | 21 ++ .../v3/ip_warmup/model_warm_up_ip_request.go | 20 ++ rest/api/v3/ips/README.md | 95 +++++++++ rest/api/v3/ips/api_add_ip.go | 73 +++++++ rest/api/v3/ips/api_add_ip_to_ip_pool.go | 84 ++++++++ rest/api/v3/ips/api_create_ip_pool.go | 65 +++++++ rest/api/v3/ips/api_delete_ip_from_ip_pool.go | 78 ++++++++ rest/api/v3/ips/api_delete_ip_pool.go | 69 +++++++ rest/api/v3/ips/api_get_ip.go | 61 ++++++ rest/api/v3/ips/api_get_ip_pool.go | 69 +++++++ rest/api/v3/ips/api_list_assigned_ip.go | 49 +++++ rest/api/v3/ips/api_list_ip.go | 106 ++++++++++ rest/api/v3/ips/api_list_ip_pool.go | 49 +++++ .../api/v3/ips/api_list_remaining_ip_count.go | 49 +++++ rest/api/v3/ips/api_service.go | 34 ++++ rest/api/v3/ips/api_update_ip_pool.go | 84 ++++++++ rest/api/v3/ips/docs/AddIp.md | 48 +++++ rest/api/v3/ips/docs/AddIp201Response.md | 13 ++ .../v3/ips/docs/AddIp201ResponseIpsInner.md | 12 ++ rest/api/v3/ips/docs/AddIpRequest.md | 13 ++ rest/api/v3/ips/docs/AddIpToIpPool.md | 52 +++++ .../v3/ips/docs/AddIpToIpPool201Response.md | 14 ++ .../v3/ips/docs/AddIpToIpPool404Response.md | 11 ++ .../AddIpToIpPool404ResponseErrorsInner.md | 12 ++ rest/api/v3/ips/docs/AddIpToIpPoolRequest.md | 11 ++ rest/api/v3/ips/docs/CreateIpPool.md | 48 +++++ rest/api/v3/ips/docs/CreateIpPoolRequest.md | 11 ++ rest/api/v3/ips/docs/DeleteIpFromIpPool.md | 52 +++++ .../ips/docs/DeleteIpFromIpPool404Response.md | 11 ++ rest/api/v3/ips/docs/DeleteIpPool.md | 51 +++++ .../v3/ips/docs/DeleteIpPool404Response.md | 11 ++ rest/api/v3/ips/docs/ErrorResponse.md | 12 ++ .../v3/ips/docs/ErrorResponseErrorsInner.md | 13 ++ rest/api/v3/ips/docs/GetIp.md | 51 +++++ rest/api/v3/ips/docs/GetIp200Response.md | 17 ++ rest/api/v3/ips/docs/GetIpPool.md | 51 +++++ rest/api/v3/ips/docs/GetIpPool200Response.md | 12 ++ rest/api/v3/ips/docs/GetIpPool404Response.md | 11 ++ .../docs/GetIpPool404ResponseErrorsInner.md | 12 ++ rest/api/v3/ips/docs/IpPools200.md | 11 ++ rest/api/v3/ips/docs/ListAssignedIp.md | 44 +++++ .../docs/ListAssignedIp200ResponseInner.md | 14 ++ rest/api/v3/ips/docs/ListIp.md | 53 +++++ .../api/v3/ips/docs/ListIp200ResponseInner.md | 18 ++ rest/api/v3/ips/docs/ListIpPool.md | 44 +++++ rest/api/v3/ips/docs/ListRemainingIpCount.md | 44 +++++ .../docs/ListRemainingIpCount200Response.md | 11 ++ ...RemainingIpCount200ResponseResultsInner.md | 13 ++ rest/api/v3/ips/docs/SortByDirection.md | 13 ++ rest/api/v3/ips/docs/UpdateIpPool.md | 52 +++++ .../v3/ips/docs/UpdateIpPool404Response.md | 11 ++ .../UpdateIpPool404ResponseErrorsInner.md | 12 ++ rest/api/v3/ips/docs/UpdateIpPoolRequest.md | 11 ++ rest/api/v3/ips/model_add_ip_201_response.go | 24 +++ .../model_add_ip_201_response_ips_inner.go | 22 +++ rest/api/v3/ips/model_add_ip_request.go | 24 +++ .../model_add_ip_to_ip_pool_201_response.go | 26 +++ .../model_add_ip_to_ip_pool_404_response.go | 20 ++ ...ip_to_ip_pool_404_response_errors_inner.go | 21 ++ .../v3/ips/model_add_ip_to_ip_pool_request.go | 20 ++ .../v3/ips/model_create_ip_pool_request.go | 20 ++ ...del_delete_ip_from_ip_pool_404_response.go | 20 ++ .../ips/model_delete_ip_pool_404_response.go | 20 ++ rest/api/v3/ips/model_error_response.go | 21 ++ .../ips/model_error_response_errors_inner.go | 24 +++ rest/api/v3/ips/model_get_ip_200_response.go | 32 +++ .../v3/ips/model_get_ip_pool_200_response.go | 22 +++ .../v3/ips/model_get_ip_pool_404_response.go | 19 ++ ...l_get_ip_pool_404_response_errors_inner.go | 22 +++ rest/api/v3/ips/model_ip_pools200.go | 20 ++ ...del_list_assigned_ip_200_response_inner.go | 26 +++ .../ips/model_list_ip_200_response_inner.go | 34 ++++ ...el_list_remaining_ip_count_200_response.go | 19 ++ ...ing_ip_count_200_response_results_inner.go | 24 +++ rest/api/v3/ips/model_sort_by_direction.go | 23 +++ .../ips/model_update_ip_pool_404_response.go | 19 ++ ...pdate_ip_pool_404_response_errors_inner.go | 21 ++ .../v3/ips/model_update_ip_pool_request.go | 20 ++ rest/api/v3/link_branding/README.md | 98 ++++++++++ ...api_associate_branded_link_with_subuser.go | 77 ++++++++ .../link_branding/api_create_branded_link.go | 74 +++++++ .../link_branding/api_delete_branded_link.go | 71 +++++++ ..._disassociate_branded_link_from_subuser.go | 60 ++++++ .../v3/link_branding/api_get_branded_link.go | 71 +++++++ .../v3/link_branding/api_list_branded_link.go | 70 +++++++ .../api_list_default_branded_link.go | 69 +++++++ .../api_list_subuser_branded_link.go | 60 ++++++ rest/api/v3/link_branding/api_service.go | 34 ++++ .../link_branding/api_update_branded_link.go | 86 ++++++++ .../api_validate_branded_link.go | 79 ++++++++ .../docs/AssociateBrandedLinkWithSubuser.md | 52 +++++ .../AssociateBrandedLinkWithSubuserRequest.md | 11 ++ .../link_branding/docs/CreateBrandedLink.md | 49 +++++ .../docs/CreateBrandedLinkRequest.md | 14 ++ rest/api/v3/link_branding/docs/Default.md | 13 ++ rest/api/v3/link_branding/docs/Default1.md | 13 ++ rest/api/v3/link_branding/docs/Default2.md | 13 ++ .../link_branding/docs/DeleteBrandedLink.md | 52 +++++ .../DisassociateBrandedLinkFromSubuser.md | 47 +++++ .../v3/link_branding/docs/GetBrandedLink.md | 52 +++++ rest/api/v3/link_branding/docs/Legacy.md | 13 ++ .../v3/link_branding/docs/LinkBranding200.md | 19 ++ .../link_branding/docs/LinkBranding200Dns.md | 12 ++ .../docs/LinkBranding200DnsDomainCname.md | 14 ++ .../docs/LinkBranding200DnsOwnerCname.md | 14 ++ .../v3/link_branding/docs/ListBrandedLink.md | 49 +++++ .../docs/ListDefaultBrandedLink.md | 49 +++++ .../docs/ListSubuserBrandedLink.md | 47 +++++ rest/api/v3/link_branding/docs/Region.md | 13 ++ rest/api/v3/link_branding/docs/Type.md | 14 ++ rest/api/v3/link_branding/docs/Type1.md | 14 ++ .../link_branding/docs/UpdateBrandedLink.md | 53 +++++ .../docs/UpdateBrandedLinkRequest.md | 11 ++ rest/api/v3/link_branding/docs/Valid.md | 13 ++ rest/api/v3/link_branding/docs/Valid1.md | 13 ++ rest/api/v3/link_branding/docs/Valid2.md | 13 ++ rest/api/v3/link_branding/docs/Valid3.md | 13 ++ rest/api/v3/link_branding/docs/Valid4.md | 13 ++ rest/api/v3/link_branding/docs/Valid5.md | 13 ++ .../link_branding/docs/ValidateBrandedLink.md | 52 +++++ .../docs/ValidateBrandedLink200Response.md | 13 ++ ...BrandedLink200ResponseValidationResults.md | 12 ++ ...200ResponseValidationResultsDomainCname.md | 12 ++ ...k200ResponseValidationResultsOwnerCname.md | 12 ++ .../docs/ValidateBrandedLink500Response.md | 11 ++ ...lidateBrandedLink500ResponseErrorsInner.md | 11 ++ ...ciate_branded_link_with_subuser_request.go | 20 ++ .../model_create_branded_link_request.go | 26 +++ rest/api/v3/link_branding/model_default.go | 23 +++ rest/api/v3/link_branding/model_default1.go | 23 +++ rest/api/v3/link_branding/model_default2.go | 23 +++ rest/api/v3/link_branding/model_legacy.go | 23 +++ .../link_branding/model_link_branding200.go | 35 ++++ .../model_link_branding200_dns.go | 20 ++ ...model_link_branding200_dns_domain_cname.go | 26 +++ .../model_link_branding200_dns_owner_cname.go | 26 +++ rest/api/v3/link_branding/model_region.go | 23 +++ rest/api/v3/link_branding/model_type.go | 24 +++ rest/api/v3/link_branding/model_type1.go | 24 +++ .../model_update_branded_link_request.go | 20 ++ rest/api/v3/link_branding/model_valid.go | 23 +++ rest/api/v3/link_branding/model_valid1.go | 23 +++ rest/api/v3/link_branding/model_valid2.go | 23 +++ rest/api/v3/link_branding/model_valid3.go | 23 +++ rest/api/v3/link_branding/model_valid4.go | 23 +++ rest/api/v3/link_branding/model_valid5.go | 23 +++ ...odel_validate_branded_link_200_response.go | 23 +++ ...ed_link_200_response_validation_results.go | 20 ++ ...esponse_validation_results_domain_cname.go | 22 +++ ...response_validation_results_owner_cname.go | 22 +++ ...odel_validate_branded_link_500_response.go | 20 ++ ..._branded_link_500_response_errors_inner.go | 20 ++ rest/api/v3/lmc_campaigns/README.md | 88 +++++++++ .../v3/lmc_campaigns/api_create_campaign.go | 90 +++++++++ .../v3/lmc_campaigns/api_delete_campaign.go | 79 ++++++++ rest/api/v3/lmc_campaigns/api_get_campaign.go | 87 +++++++++ .../api_get_scheduled_campaign.go | 79 ++++++++ .../api/v3/lmc_campaigns/api_list_campaign.go | 79 ++++++++ .../v3/lmc_campaigns/api_schedule_campaign.go | 118 +++++++++++ .../api/v3/lmc_campaigns/api_send_campaign.go | 103 ++++++++++ .../lmc_campaigns/api_send_test_campaign.go | 102 ++++++++++ rest/api/v3/lmc_campaigns/api_service.go | 34 ++++ .../lmc_campaigns/api_un_schedule_campaign.go | 79 ++++++++ .../v3/lmc_campaigns/api_update_campaign.go | 118 +++++++++++ .../api_update_scheduled_campaign.go | 110 +++++++++++ .../api/v3/lmc_campaigns/docs/Campaigns2xx.md | 24 +++ .../v3/lmc_campaigns/docs/CreateCampaign.md | 49 +++++ .../v3/lmc_campaigns/docs/DeleteCampaign.md | 52 +++++ rest/api/v3/lmc_campaigns/docs/Editor.md | 13 ++ .../v3/lmc_campaigns/docs/ErrorResponse.md | 12 ++ .../docs/ErrorResponseErrorsInner.md | 13 ++ rest/api/v3/lmc_campaigns/docs/GetCampaign.md | 52 +++++ .../docs/GetCampaign200Response.md | 23 +++ .../docs/GetScheduledCampaign.md | 52 +++++ .../api/v3/lmc_campaigns/docs/ListCampaign.md | 50 +++++ .../docs/ListCampaign200Response.md | 11 ++ .../docs/PostCampaignsRequest.md | 22 +++ .../docs/ScheduleACampaignRequest.md | 11 ++ .../docs/ScheduleACampaignResponse.md | 13 ++ .../v3/lmc_campaigns/docs/ScheduleCampaign.md | 53 +++++ .../docs/SendACampaignResponse.md | 12 ++ .../docs/SendATestCampaignRequest.md | 11 ++ .../api/v3/lmc_campaigns/docs/SendCampaign.md | 52 +++++ .../v3/lmc_campaigns/docs/SendTestCampaign.md | 53 +++++ .../docs/SendTestCampaignRequest.md | 11 ++ rest/api/v3/lmc_campaigns/docs/Status.md | 12 ++ .../lmc_campaigns/docs/UnScheduleCampaign.md | 52 +++++ .../docs/UpdateACampaignRequest.md | 15 ++ .../docs/UpdateAScheduledCampaignRequest.md | 11 ++ .../docs/UpdateAScheduledCampaignResponse.md | 13 ++ .../v3/lmc_campaigns/docs/UpdateCampaign.md | 53 +++++ .../docs/UpdateScheduledCampaign.md | 53 +++++ .../ViewScheduledTimeOfACampaignResponse.md | 11 ++ .../v3/lmc_campaigns/model_campaigns2xx.go | 45 +++++ rest/api/v3/lmc_campaigns/model_editor.go | 23 +++ .../v3/lmc_campaigns/model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ .../model_get_campaign_200_response.go | 31 +++ .../model_list_campaign_200_response.go | 19 ++ .../model_post_campaigns_request.go | 42 ++++ .../model_schedule_a_campaign_request.go | 20 ++ .../model_schedule_a_campaign_response.go | 24 +++ .../model_send_a_campaign_response.go | 20 ++ .../model_send_a_test_campaign_request.go | 19 ++ .../model_send_test_campaign_request.go | 20 ++ rest/api/v3/lmc_campaigns/model_status.go | 22 +++ .../model_update_a_campaign_request.go | 28 +++ ...del_update_a_scheduled_campaign_request.go | 19 ++ ...el_update_a_scheduled_campaign_response.go | 24 +++ ...w_scheduled_time_of_a_campaign_response.go | 19 ++ rest/api/v3/lmc_contactdb/README.md | 134 +++++++++++++ .../api/v3/lmc_contactdb/api_add_recipient.go | 90 +++++++++ .../api_add_recipient_to_contact_db_list.go | 96 +++++++++ .../api_add_recipients_to_contact_db_list.go | 102 ++++++++++ .../api_create_contact_db_list.go | 90 +++++++++ .../lmc_contactdb/api_create_custom_field.go | 82 ++++++++ .../v3/lmc_contactdb/api_create_segment.go | 90 +++++++++ .../api_delete_contact_db_list.go | 111 +++++++++++ .../api_delete_contact_db_lists.go | 82 ++++++++ .../lmc_contactdb/api_delete_custom_field.go | 95 +++++++++ .../v3/lmc_contactdb/api_delete_recipient.go | 94 +++++++++ ...i_delete_recipient_from_contact_db_list.go | 111 +++++++++++ .../v3/lmc_contactdb/api_delete_recipients.go | 90 +++++++++ .../v3/lmc_contactdb/api_delete_segment.go | 111 +++++++++++ rest/api/v3/lmc_contactdb/api_get_billable.go | 67 +++++++ .../lmc_contactdb/api_get_contact_db_list.go | 95 +++++++++ .../v3/lmc_contactdb/api_get_custom_field.go | 95 +++++++++ .../api/v3/lmc_contactdb/api_get_recipient.go | 94 +++++++++ .../lmc_contactdb/api_get_recipient_list.go | 94 +++++++++ rest/api/v3/lmc_contactdb/api_get_segment.go | 95 +++++++++ .../lmc_contactdb/api_list_contact_db_list.go | 59 ++++++ .../v3/lmc_contactdb/api_list_custom_field.go | 67 +++++++ .../v3/lmc_contactdb/api_list_recipient.go | 95 +++++++++ .../lmc_contactdb/api_list_recipient_count.go | 67 +++++++ .../api_list_recipient_for_segment.go | 114 +++++++++++ ...pi_list_recipients_from_contact_db_list.go | 106 ++++++++++ .../lmc_contactdb/api_list_reserved_field.go | 67 +++++++ .../api_list_search_recipient.go | 85 ++++++++ rest/api/v3/lmc_contactdb/api_list_segment.go | 67 +++++++ rest/api/v3/lmc_contactdb/api_list_status.go | 59 ++++++ .../v3/lmc_contactdb/api_search_recipient.go | 65 +++++++ rest/api/v3/lmc_contactdb/api_service.go | 34 ++++ .../api_update_contact_db_list.go | 102 ++++++++++ .../v3/lmc_contactdb/api_update_recipient.go | 90 +++++++++ .../v3/lmc_contactdb/api_update_segment.go | 102 ++++++++++ .../api/v3/lmc_contactdb/docs/AddRecipient.md | 49 +++++ .../docs/AddRecipientRequestInner.md | 14 ++ .../docs/AddRecipientToContactDbList.md | 53 +++++ .../docs/AddRecipientsToContactDbList.md | 53 +++++ rest/api/v3/lmc_contactdb/docs/AndOr.md | 14 ++ .../docs/ContactdbCustomField.md | 12 ++ .../docs/ContactdbCustomFieldId2xx.md | 13 ++ .../docs/ContactdbCustomFieldIdValue.md | 14 ++ .../v3/lmc_contactdb/docs/ContactdbList2xx.md | 13 ++ .../docs/ContactdbRecipient200.md | 11 ++ .../ContactdbRecipient200RecipientsInner.md | 20 ++ .../docs/ContactdbRecipientCount200.md | 11 ++ .../docs/ContactdbRecipientResponse201.md | 16 ++ ...ontactdbRecipientResponse201ErrorsInner.md | 12 ++ .../lmc_contactdb/docs/ContactdbSegments.md | 14 ++ .../docs/ContactdbSegmentsConditions.md | 14 ++ .../docs/ContactdbSegmentsId200.md | 15 ++ .../lmc_contactdb/docs/CreateAListRequest.md | 11 ++ .../lmc_contactdb/docs/CreateContactDbList.md | 49 +++++ .../lmc_contactdb/docs/CreateCustomField.md | 49 +++++ .../docs/CreateCustomFieldRequest.md | 12 ++ .../v3/lmc_contactdb/docs/CreateSegment.md | 49 +++++ .../lmc_contactdb/docs/DeleteContactDbList.md | 54 +++++ .../docs/DeleteContactDbLists.md | 49 +++++ .../v3/lmc_contactdb/docs/DeleteContacts.md | 13 ++ .../lmc_contactdb/docs/DeleteCustomField.md | 52 +++++ .../v3/lmc_contactdb/docs/DeleteRecipient.md | 52 +++++ .../docs/DeleteRecipientFromContactDbList.md | 54 +++++ .../v3/lmc_contactdb/docs/DeleteRecipients.md | 49 +++++ .../v3/lmc_contactdb/docs/DeleteSegment.md | 54 +++++ .../v3/lmc_contactdb/docs/ErrorResponse.md | 12 ++ .../docs/ErrorResponseErrorsInner.md | 13 ++ rest/api/v3/lmc_contactdb/docs/GetBillable.md | 48 +++++ .../v3/lmc_contactdb/docs/GetContactDbList.md | 52 +++++ .../v3/lmc_contactdb/docs/GetCustomField.md | 52 +++++ .../api/v3/lmc_contactdb/docs/GetRecipient.md | 52 +++++ .../v3/lmc_contactdb/docs/GetRecipientList.md | 52 +++++ .../docs/GetRecipientList200Response.md | 11 ++ rest/api/v3/lmc_contactdb/docs/GetSegment.md | 52 +++++ .../docs/ListAllCustomFieldsResponse.md | 11 ++ .../docs/ListAllListsResponse.md | 11 ++ .../docs/ListAllSegmentsResponse.md | 11 ++ .../lmc_contactdb/docs/ListContactDbList.md | 48 +++++ .../v3/lmc_contactdb/docs/ListCustomField.md | 48 +++++ .../v3/lmc_contactdb/docs/ListRecipient.md | 50 +++++ .../lmc_contactdb/docs/ListRecipientCount.md | 48 +++++ .../docs/ListRecipientForSegment.md | 54 +++++ .../docs/ListRecipientsFromContactDbList.md | 54 +++++ ...tRecipientsFromContactDbList200Response.md | 11 ++ .../docs/ListRecipientsOnASegmentResponse.md | 11 ++ .../docs/ListRecipientsResponse.md | 11 ++ .../lmc_contactdb/docs/ListReservedField.md | 48 +++++ .../docs/ListReservedField200Response.md | 11 ++ ...rvedField200ResponseReservedFieldsInner.md | 12 ++ .../lmc_contactdb/docs/ListSearchRecipient.md | 49 +++++ rest/api/v3/lmc_contactdb/docs/ListSegment.md | 48 +++++ rest/api/v3/lmc_contactdb/docs/ListStatus.md | 48 +++++ .../docs/ListStatus200Response.md | 11 ++ .../docs/ListStatus200ResponseStatusInner.md | 12 ++ rest/api/v3/lmc_contactdb/docs/Operator.md | 16 ++ .../v3/lmc_contactdb/docs/SearchRecipient.md | 48 +++++ .../docs/SearchRecipient200Response.md | 12 ++ ...archRecipient200ResponseRecipientsInner.md | 19 ++ ...esponseRecipientsInnerCustomFieldsInner.md | 14 ++ ...seRecipientsInnerCustomFieldsInnerValue.md | 10 + .../docs/SearchRecipientRequest.md | 12 ++ rest/api/v3/lmc_contactdb/docs/Type.md | 14 ++ .../lmc_contactdb/docs/UpdateAListRequest.md | 11 ++ .../lmc_contactdb/docs/UpdateContactDbList.md | 53 +++++ .../docs/UpdateContactDbList200Response.md | 13 ++ .../v3/lmc_contactdb/docs/UpdateRecipient.md | 49 +++++ .../docs/UpdateRecipientRequestInner.md | 13 ++ .../v3/lmc_contactdb/docs/UpdateSegment.md | 53 +++++ .../docs/UpdateSegmentRequest.md | 13 ++ .../model_add_recipient_request_inner.go | 25 +++ rest/api/v3/lmc_contactdb/model_and_or.go | 24 +++ .../model_contactdb_custom_field.go | 22 +++ .../model_contactdb_custom_field_id2xx.go | 24 +++ .../model_contactdb_custom_field_id_value.go | 26 +++ .../lmc_contactdb/model_contactdb_list2xx.go | 24 +++ .../model_contactdb_recipient200.go | 19 ++ ...contactdb_recipient200_recipients_inner.go | 38 ++++ .../model_contactdb_recipient_count200.go | 20 ++ .../model_contactdb_recipient_response201.go | 29 +++ ...ctdb_recipient_response201_errors_inner.go | 20 ++ .../lmc_contactdb/model_contactdb_segments.go | 26 +++ .../model_contactdb_segments_conditions.go | 22 +++ .../model_contactdb_segments_id200.go | 28 +++ .../model_create_a_list_request.go | 19 ++ .../model_create_custom_field_request.go | 20 ++ .../v3/lmc_contactdb/model_delete_contacts.go | 23 +++ .../v3/lmc_contactdb/model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ .../model_get_recipient_list_200_response.go | 19 ++ .../model_list_all_custom_fields_response.go | 19 ++ .../model_list_all_lists_response.go | 19 ++ .../model_list_all_segments_response.go | 19 ++ ...ients_from_contact_db_list_200_response.go | 19 ++ ...l_list_recipients_on_a_segment_response.go | 19 ++ .../model_list_recipients_response.go | 19 ++ .../model_list_reserved_field_200_response.go | 19 ++ ...ield_200_response_reserved_fields_inner.go | 20 ++ .../model_list_status_200_response.go | 19 ++ ...l_list_status_200_response_status_inner.go | 22 +++ rest/api/v3/lmc_contactdb/model_operator.go | 26 +++ .../model_search_recipient_200_response.go | 20 ++ ...recipient_200_response_recipients_inner.go | 27 +++ ...se_recipients_inner_custom_fields_inner.go | 22 +++ ...ipients_inner_custom_fields_inner_value.go | 18 ++ .../model_search_recipient_request.go | 21 ++ rest/api/v3/lmc_contactdb/model_type.go | 24 +++ .../model_update_a_list_request.go | 20 ++ ...del_update_contact_db_list_200_response.go | 24 +++ .../model_update_recipient_request_inner.go | 23 +++ .../model_update_segment_request.go | 23 +++ rest/api/v3/lmc_senders/README.md | 74 +++++++ rest/api/v3/lmc_senders/api_create_sender.go | 82 ++++++++ rest/api/v3/lmc_senders/api_delete_sender.go | 87 +++++++++ rest/api/v3/lmc_senders/api_get_sender.go | 79 ++++++++ rest/api/v3/lmc_senders/api_list_sender.go | 59 ++++++ .../api_reset_sender_verification.go | 87 +++++++++ rest/api/v3/lmc_senders/api_service.go | 34 ++++ rest/api/v3/lmc_senders/api_update_sender.go | 110 +++++++++++ rest/api/v3/lmc_senders/docs/CreateSender.md | 49 +++++ .../docs/CreateSender400Response.md | 11 ++ .../CreateSender400ResponseErrorsInner.md | 12 ++ .../lmc_senders/docs/CreateSenderRequest.md | 19 ++ rest/api/v3/lmc_senders/docs/DeleteSender.md | 52 +++++ rest/api/v3/lmc_senders/docs/GetSender.md | 52 +++++ rest/api/v3/lmc_senders/docs/ListSender.md | 48 +++++ .../lmc_senders/docs/ListSender200Response.md | 11 ++ .../docs/ResetSenderVerification.md | 52 +++++ rest/api/v3/lmc_senders/docs/SenderId.md | 24 +++ .../v3/lmc_senders/docs/SenderIdRequest.md | 19 ++ .../lmc_senders/docs/SenderIdRequestFrom.md | 12 ++ .../docs/SenderIdRequestReplyTo.md | 12 ++ rest/api/v3/lmc_senders/docs/UpdateSender.md | 53 +++++ .../model_create_sender_400_response.go | 19 ++ ...create_sender_400_response_errors_inner.go | 20 ++ .../model_create_sender_request.go | 34 ++++ .../model_list_sender_200_response.go | 19 ++ rest/api/v3/lmc_senders/model_sender_id.go | 44 +++++ .../v3/lmc_senders/model_sender_id_request.go | 34 ++++ .../model_sender_id_request_from.go | 22 +++ .../model_sender_id_request_reply_to.go | 22 +++ rest/api/v3/mail/README.md | 85 ++++++++ rest/api/v3/mail/api_create_mail_batch.go | 107 ++++++++++ rest/api/v3/mail/api_get_mail_batch.go | 99 ++++++++++ rest/api/v3/mail/api_send_mail.go | 122 ++++++++++++ rest/api/v3/mail/api_service.go | 34 ++++ rest/api/v3/mail/docs/ContentEncoding.md | 12 ++ rest/api/v3/mail/docs/CreateMailBatch.md | 48 +++++ rest/api/v3/mail/docs/Disposition.md | 13 ++ rest/api/v3/mail/docs/ErrorResponse.md | 12 ++ .../v3/mail/docs/ErrorResponseErrorsInner.md | 13 ++ rest/api/v3/mail/docs/GetMailBatch.md | 48 +++++ rest/api/v3/mail/docs/MailBatchResponse.md | 11 ++ rest/api/v3/mail/docs/MailFrom.md | 12 ++ rest/api/v3/mail/docs/MailTo.md | 12 ++ rest/api/v3/mail/docs/SendMail.md | 49 +++++ rest/api/v3/mail/docs/SendMailRequest.md | 27 +++ rest/api/v3/mail/docs/SendMailRequestAsm.md | 12 ++ .../docs/SendMailRequestAttachmentsInner.md | 15 ++ .../mail/docs/SendMailRequestContentInner.md | 12 ++ .../mail/docs/SendMailRequestMailSettings.md | 16 ++ ...questMailSettingsBypassBounceManagement.md | 11 ++ ...RequestMailSettingsBypassListManagement.md | 11 ++ ...RequestMailSettingsBypassSpamManagement.md | 11 ++ ...MailSettingsBypassUnsubscribeManagement.md | 11 ++ .../docs/SendMailRequestMailSettingsFooter.md | 13 ++ .../SendMailRequestMailSettingsSandboxMode.md | 11 ++ .../SendMailRequestPersonalizationsInner.md | 20 ++ .../docs/SendMailRequestTrackingSettings.md | 14 ++ ...ailRequestTrackingSettingsClickTracking.md | 12 ++ ...ndMailRequestTrackingSettingsGanalytics.md | 16 ++ ...MailRequestTrackingSettingsOpenTracking.md | 12 ++ ...estTrackingSettingsSubscriptionTracking.md | 14 ++ rest/api/v3/mail/model_content_encoding.go | 22 +++ rest/api/v3/mail/model_disposition.go | 23 +++ rest/api/v3/mail/model_error_response.go | 21 ++ .../mail/model_error_response_errors_inner.go | 24 +++ rest/api/v3/mail/model_mail_batch_response.go | 20 ++ rest/api/v3/mail/model_mail_from.go | 22 +++ rest/api/v3/mail/model_mail_to.go | 22 +++ rest/api/v3/mail/model_send_mail_request.go | 47 +++++ .../v3/mail/model_send_mail_request_asm.go | 22 +++ ...del_send_mail_request_attachments_inner.go | 28 +++ .../model_send_mail_request_content_inner.go | 22 +++ .../model_send_mail_request_mail_settings.go | 24 +++ ..._mail_settings_bypass_bounce_management.go | 20 ++ ...st_mail_settings_bypass_list_management.go | 20 ++ ...st_mail_settings_bypass_spam_management.go | 20 ++ ..._settings_bypass_unsubscribe_management.go | 20 ++ ..._send_mail_request_mail_settings_footer.go | 24 +++ ...mail_request_mail_settings_sandbox_mode.go | 20 ++ ...end_mail_request_personalizations_inner.go | 37 ++++ ...del_send_mail_request_tracking_settings.go | 22 +++ ...equest_tracking_settings_click_tracking.go | 22 +++ ...il_request_tracking_settings_ganalytics.go | 30 +++ ...request_tracking_settings_open_tracking.go | 22 +++ ...tracking_settings_subscription_tracking.go | 26 +++ rest/api/v3/mail_settings/README.md | 86 ++++++++ .../api_list_address_whitelist.go | 59 ++++++ .../v3/mail_settings/api_list_bounce_purge.go | 59 ++++++ rest/api/v3/mail_settings/api_list_footer.go | 59 ++++++ .../mail_settings/api_list_forward_bounce.go | 59 ++++++ .../v3/mail_settings/api_list_forward_spam.go | 59 ++++++ .../v3/mail_settings/api_list_mail_setting.go | 79 ++++++++ .../api/v3/mail_settings/api_list_template.go | 59 ++++++ rest/api/v3/mail_settings/api_service.go | 34 ++++ .../api_update_address_whitelist.go | 74 +++++++ .../mail_settings/api_update_bounce_purge.go | 74 +++++++ .../api/v3/mail_settings/api_update_footer.go | 74 +++++++ .../api_update_forward_bounce.go | 74 +++++++ .../mail_settings/api_update_forward_spam.go | 74 +++++++ .../v3/mail_settings/api_update_template.go | 74 +++++++ .../docs/ListAddressWhitelist.md | 48 +++++ .../v3/mail_settings/docs/ListBouncePurge.md | 48 +++++ rest/api/v3/mail_settings/docs/ListFooter.md | 48 +++++ .../mail_settings/docs/ListForwardBounce.md | 48 +++++ .../v3/mail_settings/docs/ListForwardSpam.md | 48 +++++ .../v3/mail_settings/docs/ListMailSetting.md | 50 +++++ .../docs/ListMailSetting200Response.md | 11 ++ .../ListMailSetting200ResponseResultInner.md | 14 ++ .../api/v3/mail_settings/docs/ListTemplate.md | 48 +++++ .../docs/MailSettingsAddressWhitelabel200.md | 12 ++ .../docs/MailSettingsBouncePurge.md | 13 ++ .../mail_settings/docs/MailSettingsFooter.md | 13 ++ .../docs/MailSettingsForwardBounce.md | 12 ++ .../docs/MailSettingsForwardSpam.md | 12 ++ .../docs/MailSettingsTemplate200.md | 12 ++ .../docs/UpdateAddressWhitelist.md | 49 +++++ .../docs/UpdateAddressWhitelistRequest.md | 12 ++ .../mail_settings/docs/UpdateBouncePurge.md | 49 +++++ .../api/v3/mail_settings/docs/UpdateFooter.md | 49 +++++ .../mail_settings/docs/UpdateForwardBounce.md | 49 +++++ .../mail_settings/docs/UpdateForwardSpam.md | 49 +++++ .../v3/mail_settings/docs/UpdateTemplate.md | 49 +++++ .../docs/UpdateTemplate200Response.md | 12 ++ .../docs/UpdateTemplateRequest.md | 12 ++ .../model_list_mail_setting_200_response.go | 20 ++ ..._mail_setting_200_response_result_inner.go | 26 +++ ...del_mail_settings_address_whitelabel200.go | 22 +++ .../model_mail_settings_bounce_purge.go | 24 +++ .../model_mail_settings_footer.go | 24 +++ .../model_mail_settings_forward_bounce.go | 22 +++ .../model_mail_settings_forward_spam.go | 22 +++ .../model_mail_settings_template200.go | 22 +++ .../model_update_address_whitelist_request.go | 22 +++ .../model_update_template_200_response.go | 22 +++ .../model_update_template_request.go | 22 +++ rest/api/v3/mc_custom_fields/README.md | 78 ++++++++ .../api_create_field_definition.go | 73 +++++++ .../api_delete_field_definition.go | 61 ++++++ .../api_list_field_definition.go | 49 +++++ rest/api/v3/mc_custom_fields/api_service.go | 34 ++++ .../api_update_field_definition.go | 92 +++++++++ .../docs/CreateFieldDefinition.md | 48 +++++ .../docs/CreateFieldDefinition200Response.md | 14 ++ .../docs/CreateFieldDefinition400Response.md | 11 ++ .../docs/CreateFieldDefinitionRequest.md | 12 ++ .../docs/CustomFieldDefinitionsResponse.md | 13 ++ .../docs/CustomFieldsError.md | 14 ++ .../docs/DeleteFieldDefinition.md | 51 +++++ .../api/v3/mc_custom_fields/docs/FieldType.md | 14 ++ .../v3/mc_custom_fields/docs/FieldType1.md | 14 ++ .../v3/mc_custom_fields/docs/FieldType2.md | 14 ++ .../docs/ListFieldDefinition.md | 44 +++++ .../docs/ListFieldDefinition200Response.md | 13 ++ rest/api/v3/mc_custom_fields/docs/Metadata.md | 14 ++ .../ReservedFieldDefinitionsResponseInner.md | 13 ++ .../docs/UpdateFieldDefinition.md | 52 +++++ .../docs/UpdateFieldDefinitionRequest.md | 11 ++ ...el_create_field_definition_200_response.go | 22 +++ ...el_create_field_definition_400_response.go | 19 ++ .../model_create_field_definition_request.go | 20 ++ ...model_custom_field_definitions_response.go | 21 ++ .../model_custom_fields_error.go | 22 +++ .../v3/mc_custom_fields/model_field_type.go | 24 +++ .../v3/mc_custom_fields/model_field_type1.go | 24 +++ .../v3/mc_custom_fields/model_field_type2.go | 24 +++ ...odel_list_field_definition_200_response.go | 21 ++ .../api/v3/mc_custom_fields/model_metadata.go | 22 +++ ...served_field_definitions_response_inner.go | 22 +++ .../model_update_field_definition_request.go | 19 ++ rest/api/v3/mc_designs/README.md | 84 ++++++++ rest/api/v3/mc_designs/api_create_design.go | 73 +++++++ rest/api/v3/mc_designs/api_delete_design.go | 77 ++++++++ .../api/v3/mc_designs/api_duplicate_design.go | 92 +++++++++ .../api_duplicate_pre_built_design.go | 92 +++++++++ rest/api/v3/mc_designs/api_get_design.go | 77 ++++++++ .../v3/mc_designs/api_get_pre_built_design.go | 77 ++++++++ rest/api/v3/mc_designs/api_list_design.go | 79 ++++++++ .../mc_designs/api_list_pre_built_design.go | 79 ++++++++ rest/api/v3/mc_designs/api_service.go | 34 ++++ rest/api/v3/mc_designs/api_update_design.go | 92 +++++++++ rest/api/v3/mc_designs/docs/ApiError.md | 13 ++ rest/api/v3/mc_designs/docs/ApiErrors.md | 11 ++ rest/api/v3/mc_designs/docs/CreateDesign.md | 48 +++++ rest/api/v3/mc_designs/docs/DeleteDesign.md | 51 +++++ .../mc_designs/docs/DesignCommonProperties.md | 15 ++ .../mc_designs/docs/DesignDuplicateInput.md | 12 ++ rest/api/v3/mc_designs/docs/DesignInput.md | 14 ++ rest/api/v3/mc_designs/docs/DesignOutput.md | 14 ++ .../v3/mc_designs/docs/DesignOutputSummary.md | 16 ++ .../api/v3/mc_designs/docs/DuplicateDesign.md | 52 +++++ .../docs/DuplicatePreBuiltDesign.md | 52 +++++ rest/api/v3/mc_designs/docs/Editor.md | 13 ++ rest/api/v3/mc_designs/docs/GetDesign.md | 51 +++++ .../v3/mc_designs/docs/GetPreBuiltDesign.md | 51 +++++ rest/api/v3/mc_designs/docs/ListDesign.md | 50 +++++ .../mc_designs/docs/ListDesign200Response.md | 12 ++ .../v3/mc_designs/docs/ListPreBuiltDesign.md | 50 +++++ rest/api/v3/mc_designs/docs/Metadata.md | 14 ++ rest/api/v3/mc_designs/docs/UpdateDesign.md | 52 +++++ .../v3/mc_designs/docs/UpdateDesignRequest.md | 16 ++ rest/api/v3/mc_designs/model_api_error.go | 21 ++ rest/api/v3/mc_designs/model_api_errors.go | 19 ++ .../model_design_common_properties.go | 28 +++ .../model_design_duplicate_input.go | 22 +++ rest/api/v3/mc_designs/model_design_input.go | 26 +++ rest/api/v3/mc_designs/model_design_output.go | 26 +++ .../mc_designs/model_design_output_summary.go | 30 +++ rest/api/v3/mc_designs/model_editor.go | 23 +++ .../model_list_design_200_response.go | 20 ++ rest/api/v3/mc_designs/model_metadata.go | 22 +++ .../mc_designs/model_update_design_request.go | 30 +++ rest/api/v3/mc_lists/README.md | 81 ++++++++ .../v3/mc_lists/api_create_marketing_list.go | 73 +++++++ rest/api/v3/mc_lists/api_delete_contact.go | 79 ++++++++ .../v3/mc_lists/api_delete_marketing_list.go | 89 +++++++++ .../api/v3/mc_lists/api_get_marketing_list.go | 80 ++++++++ .../api/v3/mc_lists/api_list_contact_count.go | 69 +++++++ .../v3/mc_lists/api_list_marketing_list.go | 70 +++++++ rest/api/v3/mc_lists/api_service.go | 34 ++++ .../v3/mc_lists/api_update_marketing_list.go | 92 +++++++++ rest/api/v3/mc_lists/docs/ContactDetails.md | 35 ++++ .../v3/mc_lists/docs/CreateMarketingList.md | 48 +++++ .../docs/CreateMarketingList400Response.md | 11 ++ .../docs/CreateMarketingListRequest.md | 11 ++ rest/api/v3/mc_lists/docs/DeleteContact.md | 51 +++++ .../mc_lists/docs/DeleteContact202Response.md | 11 ++ .../v3/mc_lists/docs/DeleteMarketingList.md | 52 +++++ .../docs/DeleteMarketingList200Response.md | 11 ++ .../docs/DeleteMarketingList404Response.md | 11 ++ rest/api/v3/mc_lists/docs/Error.md | 14 ++ rest/api/v3/mc_lists/docs/GetMarketingList.md | 52 +++++ .../docs/GetMarketingList200Response.md | 15 ++ rest/api/v3/mc_lists/docs/List.md | 14 ++ rest/api/v3/mc_lists/docs/ListContactCount.md | 51 +++++ .../docs/ListContactCount200Response.md | 12 ++ .../api/v3/mc_lists/docs/ListMarketingList.md | 49 +++++ .../docs/ListMarketingList200Response.md | 12 ++ rest/api/v3/mc_lists/docs/Metadata.md | 14 ++ rest/api/v3/mc_lists/docs/SelfMetadata.md | 11 ++ .../v3/mc_lists/docs/UpdateMarketingList.md | 52 +++++ .../docs/UpdateMarketingListRequest.md | 11 ++ rest/api/v3/mc_lists/model_contact_details.go | 47 +++++ ...odel_create_marketing_list_400_response.go | 19 ++ .../model_create_marketing_list_request.go | 20 ++ .../model_delete_contact_202_response.go | 20 ++ ...odel_delete_marketing_list_200_response.go | 20 ++ ...odel_delete_marketing_list_404_response.go | 19 ++ rest/api/v3/mc_lists/model_error.go | 22 +++ .../model_get_marketing_list_200_response.go | 26 +++ rest/api/v3/mc_lists/model_list.go | 25 +++ .../model_list_contact_count_200_response.go | 20 ++ .../model_list_marketing_list_200_response.go | 20 ++ rest/api/v3/mc_lists/model_metadata.go | 26 +++ rest/api/v3/mc_lists/model_self_metadata.go | 20 ++ .../model_update_marketing_list_request.go | 20 ++ rest/api/v3/mc_segments/README.md | 75 +++++++ rest/api/v3/mc_segments/api_delete_segment.go | 101 ++++++++++ rest/api/v3/mc_segments/api_get_segment.go | 104 ++++++++++ rest/api/v3/mc_segments/api_list_segment.go | 120 ++++++++++++ rest/api/v3/mc_segments/api_service.go | 34 ++++ .../v3/mc_segments/docs/ContactResponse.md | 27 +++ .../docs/ContactResponseCustomFields.md | 12 ++ rest/api/v3/mc_segments/docs/DeleteSegment.md | 51 +++++ rest/api/v3/mc_segments/docs/ErrorResponse.md | 12 ++ .../docs/ErrorResponseErrorsInner.md | 13 ++ rest/api/v3/mc_segments/docs/FullSegment.md | 22 +++ rest/api/v3/mc_segments/docs/GetSegment.md | 52 +++++ .../mc_segments/docs/GetSegment404Response.md | 11 ++ .../docs/GetSegment404ResponseErrorsInner.md | 12 ++ rest/api/v3/mc_segments/docs/ListSegment.md | 50 +++++ .../docs/ListSegment200Response.md | 11 ++ .../docs/ListSegment500Response.md | 11 ++ .../docs/ListSegment500ResponseErrorsInner.md | 11 ++ .../api/v3/mc_segments/docs/SegmentSummary.md | 18 ++ .../api/v3/mc_segments/docs/SegmentWriteV2.md | 13 ++ .../v3/mc_segments/model_contact_response.go | 51 +++++ .../model_contact_response_custom_fields.go | 20 ++ .../v3/mc_segments/model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ rest/api/v3/mc_segments/model_full_segment.go | 43 ++++ .../model_get_segment_404_response.go | 19 ++ ...l_get_segment_404_response_errors_inner.go | 20 ++ .../model_list_segment_200_response.go | 19 ++ .../model_list_segment_500_response.go | 19 ++ ..._list_segment_500_response_errors_inner.go | 19 ++ .../v3/mc_segments/model_segment_summary.go | 35 ++++ .../v3/mc_segments/model_segment_write_v2.go | 24 +++ rest/api/v3/mc_segments_2/README.md | 87 +++++++++ .../v3/mc_segments_2/api_create_segment.go | 81 ++++++++ .../v3/mc_segments_2/api_delete_segment.go | 69 +++++++ rest/api/v3/mc_segments_2/api_get_segment.go | 88 +++++++++ rest/api/v3/mc_segments_2/api_list_segment.go | 104 ++++++++++ .../v3/mc_segments_2/api_refresh_segment.go | 92 +++++++++ rest/api/v3/mc_segments_2/api_service.go | 34 ++++ .../v3/mc_segments_2/api_update_segment.go | 92 +++++++++ .../v3/mc_segments_2/docs/AllSegments200.md | 21 ++ .../v3/mc_segments_2/docs/ContactResponse.md | 27 +++ .../docs/ContactResponseCustomFields.md | 12 ++ .../v3/mc_segments_2/docs/CreateSegment.md | 48 +++++ .../v3/mc_segments_2/docs/DeleteSegment.md | 51 +++++ .../v3/mc_segments_2/docs/ErrorsSegmentV2.md | 11 ++ .../docs/ErrorsSegmentV2ErrorsInner.md | 12 ++ rest/api/v3/mc_segments_2/docs/GetSegment.md | 52 +++++ rest/api/v3/mc_segments_2/docs/ListSegment.md | 50 +++++ rest/api/v3/mc_segments_2/docs/Metadata.md | 14 ++ .../v3/mc_segments_2/docs/RefreshSegment.md | 51 +++++ rest/api/v3/mc_segments_2/docs/Segment2xx.md | 25 +++ .../api/v3/mc_segments_2/docs/SegmentError.md | 11 ++ .../mc_segments_2/docs/SegmentRefresh202.md | 11 ++ .../docs/SegmentRefreshRequest.md | 11 ++ .../docs/SegmentStatusResponse.md | 12 ++ .../v3/mc_segments_2/docs/SegmentUpdate.md | 12 ++ .../v3/mc_segments_2/docs/SegmentWriteV2.md | 13 ++ .../v3/mc_segments_2/docs/UpdateSegment.md | 52 +++++ .../v3/mc_segments_2/model_all_segments200.go | 38 ++++ .../mc_segments_2/model_contact_response.go | 51 +++++ .../model_contact_response_custom_fields.go | 20 ++ .../mc_segments_2/model_errors_segment_v2.go | 19 ++ .../model_errors_segment_v2_errors_inner.go | 22 +++ rest/api/v3/mc_segments_2/model_metadata.go | 22 +++ rest/api/v3/mc_segments_2/model_segment2xx.go | 47 +++++ .../v3/mc_segments_2/model_segment_error.go | 20 ++ .../mc_segments_2/model_segment_refresh202.go | 20 ++ .../model_segment_refresh_request.go | 20 ++ .../model_segment_status_response.go | 22 +++ .../v3/mc_segments_2/model_segment_update.go | 22 +++ .../mc_segments_2/model_segment_write_v2.go | 24 +++ rest/api/v3/mc_senders/README.md | 74 +++++++ rest/api/v3/mc_senders/api_create_sender.go | 98 ++++++++++ rest/api/v3/mc_senders/api_delete_sender.go | 79 ++++++++ rest/api/v3/mc_senders/api_get_sender.go | 79 ++++++++ rest/api/v3/mc_senders/api_list_sender.go | 67 +++++++ .../api_reset_sender_verification.go | 79 ++++++++ rest/api/v3/mc_senders/api_service.go | 34 ++++ rest/api/v3/mc_senders/api_update_sender.go | 110 +++++++++++ rest/api/v3/mc_senders/docs/CreateSender.md | 49 +++++ .../v3/mc_senders/docs/CreateSenderRequest.md | 19 ++ .../docs/CreateSenderRequestFrom.md | 12 ++ .../docs/CreateSenderRequestReplyTo.md | 12 ++ rest/api/v3/mc_senders/docs/DeleteSender.md | 52 +++++ rest/api/v3/mc_senders/docs/ErrorResponse.md | 12 ++ .../docs/ErrorResponseErrorsInner.md | 13 ++ rest/api/v3/mc_senders/docs/GetSender.md | 52 +++++ rest/api/v3/mc_senders/docs/ListSender.md | 48 +++++ .../mc_senders/docs/ListSender200Response.md | 11 ++ .../docs/ResetSenderVerification.md | 52 +++++ rest/api/v3/mc_senders/docs/Sender.md | 24 +++ rest/api/v3/mc_senders/docs/SenderRequest.md | 19 ++ .../v3/mc_senders/docs/SenderRequestFrom.md | 12 ++ .../mc_senders/docs/SenderRequestReplyTo.md | 12 ++ rest/api/v3/mc_senders/docs/UpdateSender.md | 53 +++++ .../mc_senders/model_create_sender_request.go | 34 ++++ .../model_create_sender_request_from.go | 22 +++ .../model_create_sender_request_reply_to.go | 22 +++ .../api/v3/mc_senders/model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ .../model_list_sender_200_response.go | 20 ++ rest/api/v3/mc_senders/model_sender.go | 44 +++++ .../api/v3/mc_senders/model_sender_request.go | 34 ++++ .../mc_senders/model_sender_request_from.go | 22 +++ .../model_sender_request_reply_to.go | 22 +++ rest/api/v3/mc_singlesends/README.md | 103 ++++++++++ .../mc_singlesends/api_create_single_send.go | 81 ++++++++ .../api_delete_scheduled_single_send.go | 77 ++++++++ .../mc_singlesends/api_delete_single_send.go | 69 +++++++ .../mc_singlesends/api_delete_single_sends.go | 77 ++++++++ .../api_duplicate_single_send.go | 92 +++++++++ .../v3/mc_singlesends/api_get_single_send.go | 77 ++++++++ .../v3/mc_singlesends/api_list_category.go | 57 ++++++ .../v3/mc_singlesends/api_list_single_send.go | 78 ++++++++ .../api_schedule_single_send.go | 92 +++++++++ .../mc_singlesends/api_search_single_send.go | 92 +++++++++ rest/api/v3/mc_singlesends/api_service.go | 34 ++++ .../mc_singlesends/api_update_single_send.go | 100 ++++++++++ .../v3/mc_singlesends/docs/AbTestSummary.md | 17 ++ .../mc_singlesends/docs/CreateSingleSend.md | 48 +++++ .../docs/DeleteScheduledSingleSend.md | 51 +++++ .../mc_singlesends/docs/DeleteSingleSend.md | 51 +++++ .../mc_singlesends/docs/DeleteSingleSends.md | 48 +++++ .../docs/DuplicateSingleSend.md | 52 +++++ .../docs/DuplicateSingleSendRequest.md | 11 ++ rest/api/v3/mc_singlesends/docs/Editor.md | 13 ++ rest/api/v3/mc_singlesends/docs/Editor1.md | 13 ++ .../v3/mc_singlesends/docs/GetSingleSend.md | 51 +++++ rest/api/v3/mc_singlesends/docs/Items.md | 14 ++ .../v3/mc_singlesends/docs/ListCategory.md | 44 +++++ .../docs/ListCategory200Response.md | 11 ++ .../v3/mc_singlesends/docs/ListSingleSend.md | 49 +++++ .../docs/ListSingleSend200Response.md | 12 ++ .../docs/ListSingleSend500Response.md | 11 ++ .../ListSingleSend500ResponseErrorsInner.md | 13 ++ rest/api/v3/mc_singlesends/docs/Metadata.md | 14 ++ .../mc_singlesends/docs/ScheduleSingleSend.md | 52 +++++ .../docs/ScheduleSingleSend201Response.md | 12 ++ .../docs/ScheduleSingleSendRequest.md | 11 ++ .../mc_singlesends/docs/SearchSingleSend.md | 50 +++++ .../mc_singlesends/docs/SinglesendRequest.md | 15 ++ .../docs/SinglesendRequestEmailConfig.md | 20 ++ .../docs/SinglesendRequestSendTo.md | 13 ++ .../mc_singlesends/docs/SinglesendResponse.md | 20 ++ .../docs/SinglesendResponseEmailConfig.md | 20 ++ .../docs/SinglesendResponseSendTo.md | 13 ++ .../docs/SinglesendResponseShort.md | 19 ++ .../docs/SinglesendResponseWarningsInner.md | 13 ++ .../mc_singlesends/docs/SinglesendSchedule.md | 12 ++ .../mc_singlesends/docs/SinglesendSearch.md | 13 ++ rest/api/v3/mc_singlesends/docs/Status.md | 12 ++ rest/api/v3/mc_singlesends/docs/Status1.md | 14 ++ rest/api/v3/mc_singlesends/docs/Status2.md | 14 ++ rest/api/v3/mc_singlesends/docs/Status3.md | 14 ++ rest/api/v3/mc_singlesends/docs/Type.md | 13 ++ .../mc_singlesends/docs/UpdateSingleSend.md | 52 +++++ .../v3/mc_singlesends/docs/WinnerCriteria.md | 14 ++ .../mc_singlesends/model_ab_test_summary.go | 32 +++ .../model_duplicate_single_send_request.go | 20 ++ rest/api/v3/mc_singlesends/model_editor.go | 23 +++ rest/api/v3/mc_singlesends/model_editor1.go | 23 +++ rest/api/v3/mc_singlesends/model_items.go | 24 +++ .../model_list_category_200_response.go | 20 ++ .../model_list_single_send_200_response.go | 20 ++ .../model_list_single_send_500_response.go | 19 ++ ...t_single_send_500_response_errors_inner.go | 21 ++ rest/api/v3/mc_singlesends/model_metadata.go | 22 +++ ...model_schedule_single_send_201_response.go | 25 +++ .../model_schedule_single_send_request.go | 24 +++ .../model_singlesend_request.go | 30 +++ .../model_singlesend_request_email_config.go | 38 ++++ .../model_singlesend_request_send_to.go | 24 +++ .../model_singlesend_response.go | 39 ++++ .../model_singlesend_response_email_config.go | 38 ++++ .../model_singlesend_response_send_to.go | 24 +++ .../model_singlesend_response_short.go | 38 ++++ ...odel_singlesend_response_warnings_inner.go | 21 ++ .../model_singlesend_schedule.go | 25 +++ .../mc_singlesends/model_singlesend_search.go | 24 +++ rest/api/v3/mc_singlesends/model_status.go | 22 +++ rest/api/v3/mc_singlesends/model_status1.go | 24 +++ rest/api/v3/mc_singlesends/model_status2.go | 24 +++ rest/api/v3/mc_singlesends/model_status3.go | 24 +++ rest/api/v3/mc_singlesends/model_type.go | 23 +++ .../mc_singlesends/model_winner_criteria.go | 24 +++ rest/api/v3/mc_stats/README.md | 88 +++++++++ .../v3/mc_stats/api_export_automation_stat.go | 79 ++++++++ .../mc_stats/api_export_single_send_stat.go | 79 ++++++++ .../v3/mc_stats/api_get_automation_stat.go | 161 +++++++++++++++ .../v3/mc_stats/api_get_single_send_stat.go | 143 ++++++++++++++ .../v3/mc_stats/api_list_automation_stat.go | 96 +++++++++ .../mc_stats/api_list_click_tracking_stat.go | 133 +++++++++++++ .../v3/mc_stats/api_list_single_send_stat.go | 96 +++++++++ .../api_list_single_send_tracking_stat.go | 133 +++++++++++++ rest/api/v3/mc_stats/api_service.go | 34 ++++ rest/api/v3/mc_stats/docs/AbPhase.md | 14 ++ rest/api/v3/mc_stats/docs/AbPhase1.md | 14 ++ rest/api/v3/mc_stats/docs/AbPhaseId.md | 13 ++ rest/api/v3/mc_stats/docs/AggregatedBy.md | 13 ++ .../docs/AutmoationsLinkStatsResponse.md | 13 ++ ...utmoationsLinkStatsResponseResultsInner.md | 14 ++ .../v3/mc_stats/docs/AutomationsResponse.md | 12 ++ .../docs/AutomationsResponseResultsInner.md | 14 ++ rest/api/v3/mc_stats/docs/ErrorResponse.md | 12 ++ .../mc_stats/docs/ErrorResponseErrorsInner.md | 13 ++ .../v3/mc_stats/docs/ExportAutomationStat.md | 49 +++++ .../v3/mc_stats/docs/ExportSingleSendStat.md | 49 +++++ .../api/v3/mc_stats/docs/GetAutomationStat.md | 59 ++++++ .../api/v3/mc_stats/docs/GetSingleSendStat.md | 58 ++++++ rest/api/v3/mc_stats/docs/Items.md | 12 ++ rest/api/v3/mc_stats/docs/Items1.md | 13 ++ rest/api/v3/mc_stats/docs/Items2.md | 13 ++ .../v3/mc_stats/docs/LinkTrackingMetadata.md | 14 ++ .../v3/mc_stats/docs/ListAutomationStat.md | 50 +++++ .../v3/mc_stats/docs/ListClickTrackingStat.md | 55 ++++++ .../v3/mc_stats/docs/ListSingleSendStat.md | 50 +++++ .../docs/ListSingleSendTrackingStat.md | 56 ++++++ rest/api/v3/mc_stats/docs/Metadata.md | 14 ++ rest/api/v3/mc_stats/docs/Metrics.md | 22 +++ .../docs/SinglesendsLinkStatsResponse.md | 13 ++ ...inglesendsLinkStatsResponseResultsInner.md | 15 ++ .../v3/mc_stats/docs/SinglesendsResponse.md | 12 ++ .../docs/SinglesendsResponseResultsInner.md | 15 ++ rest/api/v3/mc_stats/model_ab_phase.go | 24 +++ rest/api/v3/mc_stats/model_ab_phase1.go | 24 +++ rest/api/v3/mc_stats/model_ab_phase_id.go | 23 +++ rest/api/v3/mc_stats/model_aggregated_by.go | 23 +++ .../model_autmoations_link_stats_response.go | 22 +++ ...tions_link_stats_response_results_inner.go | 26 +++ .../v3/mc_stats/model_automations_response.go | 20 ++ ...odel_automations_response_results_inner.go | 25 +++ rest/api/v3/mc_stats/model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ rest/api/v3/mc_stats/model_items.go | 22 +++ rest/api/v3/mc_stats/model_items1.go | 23 +++ rest/api/v3/mc_stats/model_items2.go | 23 +++ .../mc_stats/model_link_tracking_metadata.go | 26 +++ rest/api/v3/mc_stats/model_metadata.go | 26 +++ rest/api/v3/mc_stats/model_metrics.go | 30 +++ .../model_singlesends_link_stats_response.go | 22 +++ ...sends_link_stats_response_results_inner.go | 28 +++ .../v3/mc_stats/model_singlesends_response.go | 20 ++ ...odel_singlesends_response_results_inner.go | 27 +++ rest/api/v3/mc_test/README.md | 62 ++++++ .../mc_test/api_send_test_marketing_email.go | 73 +++++++ rest/api/v3/mc_test/api_service.go | 34 ++++ rest/api/v3/mc_test/docs/ErrorResponse.md | 12 ++ .../mc_test/docs/ErrorResponseErrorsInner.md | 13 ++ .../v3/mc_test/docs/SendTestMarketingEmail.md | 48 +++++ .../docs/SendTestMarketingEmailRequest.md | 17 ++ rest/api/v3/mc_test/model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ ...model_send_test_marketing_email_request.go | 31 +++ rest/api/v3/partner/README.md | 61 ++++++ .../v3/partner/api_list_partner_setting.go | 79 ++++++++ rest/api/v3/partner/api_service.go | 34 ++++ .../api/v3/partner/docs/ListPartnerSetting.md | 50 +++++ .../docs/ListPartnerSetting200Response.md | 11 ++ ...istPartnerSetting200ResponseResultInner.md | 14 ++ ...model_list_partner_setting_200_response.go | 19 ++ ...rtner_setting_200_response_result_inner.go | 26 +++ rest/api/v3/recipients_data_erasure/README.md | 62 ++++++ .../api_erase_recipient_email_data.go | 74 +++++++ .../v3/recipients_data_erasure/api_service.go | 34 ++++ .../docs/EraseRecipientEmailData.md | 48 +++++ ...pientsDataErasureEraseRecipientsRequest.md | 11 ++ .../docs/RecipientsDataErasureErrorV1.md | 12 ++ .../docs/RecipientsDataErasureJobId.md | 11 ++ ...s_data_erasure_erase_recipients_request.go | 20 ++ .../model_recipients_data_erasure_error_v1.go | 22 +++ .../model_recipients_data_erasure_job_id.go | 20 ++ rest/api/v3/reverse_dns/README.md | 84 ++++++++ .../v3/reverse_dns/api_delete_reverse_dns.go | 70 +++++++ .../api/v3/reverse_dns/api_get_reverse_dns.go | 70 +++++++ .../v3/reverse_dns/api_list_reverse_dns.go | 88 +++++++++ rest/api/v3/reverse_dns/api_service.go | 34 ++++ .../v3/reverse_dns/api_set_up_reverse_dns.go | 74 +++++++ .../reverse_dns/api_validate_reverse_dns.go | 86 ++++++++ .../v3/reverse_dns/docs/DeleteReverseDns.md | 52 +++++ rest/api/v3/reverse_dns/docs/GetReverseDns.md | 52 +++++ .../api/v3/reverse_dns/docs/ListReverseDns.md | 51 +++++ rest/api/v3/reverse_dns/docs/ReverseDns.md | 20 ++ .../v3/reverse_dns/docs/ReverseDnsARecord.md | 14 ++ .../reverse_dns/docs/ReverseDnsUsersInner.md | 12 ++ .../v3/reverse_dns/docs/SetUpReverseDns.md | 49 +++++ .../docs/SetUpReverseDnsRequest.md | 13 ++ rest/api/v3/reverse_dns/docs/Valid.md | 13 ++ rest/api/v3/reverse_dns/docs/Valid1.md | 13 ++ .../v3/reverse_dns/docs/ValidateReverseDns.md | 52 +++++ .../docs/ValidateReverseDns200Response.md | 13 ++ ...eReverseDns200ResponseValidationResults.md | 11 ++ ...eDns200ResponseValidationResultsARecord.md | 12 ++ .../docs/ValidateReverseDns404Response.md | 11 ++ ...alidateReverseDns404ResponseErrorsInner.md | 11 ++ .../docs/ValidateReverseDns500Response.md | 11 ++ ...alidateReverseDns500ResponseErrorsInner.md | 11 ++ rest/api/v3/reverse_dns/model_reverse_dns.go | 37 ++++ .../reverse_dns/model_reverse_dns_a_record.go | 26 +++ .../model_reverse_dns_users_inner.go | 22 +++ .../model_set_up_reverse_dns_request.go | 24 +++ rest/api/v3/reverse_dns/model_valid.go | 23 +++ rest/api/v3/reverse_dns/model_valid1.go | 23 +++ ...model_validate_reverse_dns_200_response.go | 23 +++ ...rse_dns_200_response_validation_results.go | 19 ++ ...00_response_validation_results_a_record.go | 22 +++ ...model_validate_reverse_dns_404_response.go | 20 ++ ...e_reverse_dns_404_response_errors_inner.go | 20 ++ ...model_validate_reverse_dns_500_response.go | 20 ++ ...e_reverse_dns_500_response_errors_inner.go | 20 ++ rest/api/v3/scheduled_sends/README.md | 82 ++++++++ .../api_create_scheduled_send.go | 106 ++++++++++ .../api_delete_scheduled_send.go | 94 +++++++++ .../scheduled_sends/api_get_scheduled_send.go | 102 ++++++++++ .../api_list_scheduled_send.go | 91 +++++++++ rest/api/v3/scheduled_sends/api_service.go | 34 ++++ .../api_update_scheduled_send.go | 109 +++++++++++ .../CancelOrPauseAScheduledSendRequest.md | 12 ++ .../docs/CreateScheduledSend.md | 49 +++++ .../docs/DeleteScheduledSend.md | 52 +++++ .../v3/scheduled_sends/docs/ErrorResponse.md | 12 ++ .../docs/ErrorResponseErrorsInner.md | 13 ++ .../scheduled_sends/docs/GetScheduledSend.md | 52 +++++ .../scheduled_sends/docs/ListScheduledSend.md | 48 +++++ .../v3/scheduled_sends/docs/MailBatchId.md | 11 ++ .../docs/ScheduledSendStatus.md | 12 ++ rest/api/v3/scheduled_sends/docs/Status.md | 13 ++ rest/api/v3/scheduled_sends/docs/Status1.md | 13 ++ rest/api/v3/scheduled_sends/docs/Status2.md | 13 ++ .../docs/UpdateScheduledSend.md | 53 +++++ .../docs/UpdateScheduledSendRequest.md | 11 ++ ...ancel_or_pause_a_scheduled_send_request.go | 22 +++ .../scheduled_sends/model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ .../v3/scheduled_sends/model_mail_batch_id.go | 19 ++ .../model_scheduled_send_status.go | 21 ++ rest/api/v3/scheduled_sends/model_status.go | 23 +++ rest/api/v3/scheduled_sends/model_status1.go | 23 +++ rest/api/v3/scheduled_sends/model_status2.go | 23 +++ .../model_update_scheduled_send_request.go | 20 ++ rest/api/v3/scopes/README.md | 71 +++++++ .../v3/scopes/api_approve_scope_request.go | 77 ++++++++ rest/api/v3/scopes/api_deny_scope_request.go | 61 ++++++ rest/api/v3/scopes/api_list_scope.go | 91 +++++++++ rest/api/v3/scopes/api_list_scope_request.go | 70 +++++++ rest/api/v3/scopes/api_service.go | 34 ++++ .../api/v3/scopes/docs/ApproveScopeRequest.md | 51 +++++ .../docs/ApproveScopeRequest200Response.md | 11 ++ rest/api/v3/scopes/docs/DenyScopeRequest.md | 51 +++++ .../docs/DenyScopeRequest404Response.md | 11 ++ .../DenyScopeRequest404ResponseErrorsInner.md | 12 ++ rest/api/v3/scopes/docs/ErrorResponse.md | 12 ++ .../scopes/docs/ErrorResponseErrorsInner.md | 13 ++ rest/api/v3/scopes/docs/ListScope.md | 48 +++++ .../v3/scopes/docs/ListScope200Response.md | 11 ++ .../v3/scopes/docs/ListScope401Response.md | 11 ++ .../docs/ListScope401ResponseErrorsInner.md | 12 ++ rest/api/v3/scopes/docs/ListScopeRequest.md | 49 +++++ .../docs/ListScopeRequest200ResponseInner.md | 16 ++ ...odel_approve_scope_request_200_response.go | 20 ++ .../model_deny_scope_request_404_response.go | 19 ++ ...scope_request_404_response_errors_inner.go | 20 ++ rest/api/v3/scopes/model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ .../scopes/model_list_scope_200_response.go | 20 ++ .../scopes/model_list_scope_401_response.go | 20 ++ ...el_list_scope_401_response_errors_inner.go | 22 +++ ...l_list_scope_request_200_response_inner.go | 30 +++ rest/api/v3/seq/README.md | 71 +++++++ .../seq/api_list_engagement_quality_score.go | 70 +++++++ ...i_list_subuser_engagement_quality_score.go | 79 ++++++++ rest/api/v3/seq/api_service.go | 34 ++++ .../v3/seq/docs/ListEngagementQualityScore.md | 48 +++++ .../docs/ListSubuserEngagementQualityScore.md | 50 +++++ rest/api/v3/seq/docs/SeqError.md | 12 ++ rest/api/v3/seq/docs/SeqMetadata.md | 11 ++ rest/api/v3/seq/docs/SeqMetadataNextParams.md | 11 ++ rest/api/v3/seq/docs/SeqMetrics.md | 15 ++ rest/api/v3/seq/docs/SeqScore.md | 15 ++ rest/api/v3/seq/model_seq_error.go | 22 +++ rest/api/v3/seq/model_seq_metadata.go | 19 ++ .../v3/seq/model_seq_metadata_next_params.go | 20 ++ rest/api/v3/seq/model_seq_metrics.go | 28 +++ rest/api/v3/seq/model_seq_score.go | 27 +++ rest/api/v3/sso/README.md | 94 +++++++++ rest/api/v3/sso/api_create_sso_certificate.go | 105 ++++++++++ rest/api/v3/sso/api_create_sso_integration.go | 105 ++++++++++ rest/api/v3/sso/api_create_sso_teammate.go | 105 ++++++++++ rest/api/v3/sso/api_delete_sso_certificate.go | 101 ++++++++++ rest/api/v3/sso/api_delete_sso_integration.go | 93 +++++++++ rest/api/v3/sso/api_get_sso_certificate.go | 101 ++++++++++ rest/api/v3/sso/api_get_sso_integration.go | 112 +++++++++++ rest/api/v3/sso/api_list_sso_integration.go | 101 ++++++++++ .../api_list_sso_integration_certificate.go | 101 ++++++++++ rest/api/v3/sso/api_service.go | 34 ++++ rest/api/v3/sso/api_update_sso_certificate.go | 116 +++++++++++ rest/api/v3/sso/api_update_sso_integration.go | 126 ++++++++++++ rest/api/v3/sso/api_update_sso_teammate.go | 116 +++++++++++ rest/api/v3/sso/docs/CreateSsoCertificate.md | 48 +++++ .../sso/docs/CreateSsoCertificateRequest.md | 13 ++ rest/api/v3/sso/docs/CreateSsoIntegration.md | 48 +++++ rest/api/v3/sso/docs/CreateSsoTeammate.md | 48 +++++ rest/api/v3/sso/docs/DeleteSsoCertificate.md | 51 +++++ rest/api/v3/sso/docs/DeleteSsoIntegration.md | 51 +++++ rest/api/v3/sso/docs/GetSsoCertificate.md | 51 +++++ rest/api/v3/sso/docs/GetSsoIntegration.md | 52 +++++ rest/api/v3/sso/docs/ListSsoIntegration.md | 48 +++++ .../sso/docs/ListSsoIntegrationCertificate.md | 51 +++++ rest/api/v3/sso/docs/PatchSsoTeammates200.md | 29 +++ rest/api/v3/sso/docs/PermissionType.md | 13 ++ rest/api/v3/sso/docs/PermissionType1.md | 13 ++ rest/api/v3/sso/docs/Persona.md | 15 ++ .../sso/docs/PostPatchIntegrationRequest.md | 16 ++ rest/api/v3/sso/docs/PostSsoTeammates201.md | 18 ++ .../v3/sso/docs/PostSsoTeammatesRequest.md | 18 ++ rest/api/v3/sso/docs/SsoCertificateBody.md | 15 ++ rest/api/v3/sso/docs/SsoErrorResponseInner.md | 13 ++ rest/api/v3/sso/docs/SsoIntegration.md | 20 ++ .../sso/docs/SsoTeammatesBaseRequestProps.md | 17 ++ ...matesBaseRequestPropsSubuserAccessInner.md | 13 ++ .../sso/docs/SsoTeammatesBaseResponseProps.md | 16 ++ ...TeammatesRestrictedSubuserResponseProps.md | 12 ++ ...dSubuserResponsePropsSubuserAccessInner.md | 16 ++ rest/api/v3/sso/docs/UpdateSsoCertificate.md | 52 +++++ .../sso/docs/UpdateSsoCertificateRequest.md | 13 ++ rest/api/v3/sso/docs/UpdateSsoIntegration.md | 53 +++++ rest/api/v3/sso/docs/UpdateSsoTeammate.md | 52 +++++ rest/api/v3/sso/docs/UserType.md | 14 ++ .../model_create_sso_certificate_request.go | 24 +++ .../v3/sso/model_patch_sso_teammates200.go | 56 ++++++ rest/api/v3/sso/model_permission_type.go | 23 +++ rest/api/v3/sso/model_permission_type1.go | 23 +++ rest/api/v3/sso/model_persona.go | 25 +++ .../model_post_patch_integration_request.go | 30 +++ .../api/v3/sso/model_post_sso_teammates201.go | 34 ++++ .../sso/model_post_sso_teammates_request.go | 34 ++++ rest/api/v3/sso/model_sso_certificate_body.go | 28 +++ .../v3/sso/model_sso_error_response_inner.go | 21 ++ rest/api/v3/sso/model_sso_integration.go | 38 ++++ .../model_sso_teammates_base_request_props.go | 32 +++ ...base_request_props_subuser_access_inner.go | 24 +++ ...model_sso_teammates_base_response_props.go | 30 +++ ...mates_restricted_subuser_response_props.go | 22 +++ ...ser_response_props_subuser_access_inner.go | 30 +++ .../model_update_sso_certificate_request.go | 24 +++ rest/api/v3/sso/model_user_type.go | 24 +++ rest/api/v3/stats/README.md | 104 ++++++++++ rest/api/v3/stats/api_get_client_stat.go | 99 ++++++++++ rest/api/v3/stats/api_list_browser_stat.go | 115 +++++++++++ rest/api/v3/stats/api_list_category.go | 96 +++++++++ rest/api/v3/stats/api_list_category_stat.go | 97 +++++++++ .../v3/stats/api_list_category_stat_sum.go | 124 ++++++++++++ rest/api/v3/stats/api_list_client_stat.go | 88 +++++++++ rest/api/v3/stats/api_list_device_stat.go | 106 ++++++++++ rest/api/v3/stats/api_list_geo_stat.go | 115 +++++++++++ .../stats/api_list_mailbox_provider_stat.go | 115 +++++++++++ rest/api/v3/stats/api_list_stat.go | 106 ++++++++++ rest/api/v3/stats/api_service.go | 34 ++++ rest/api/v3/stats/docs/AdvancedStatsClicks.md | 12 ++ .../v3/stats/docs/AdvancedStatsClicksOpens.md | 14 ++ .../docs/AdvancedStatsMailboxProvider.md | 18 ++ rest/api/v3/stats/docs/AdvancedStatsOpens.md | 12 ++ rest/api/v3/stats/docs/AggregatedBy.md | 14 ++ rest/api/v3/stats/docs/AggregatedBy1.md | 14 ++ rest/api/v3/stats/docs/AggregatedBy2.md | 14 ++ rest/api/v3/stats/docs/AggregatedBy3.md | 14 ++ rest/api/v3/stats/docs/CategoryStats.md | 12 ++ .../v3/stats/docs/CategoryStatsStatsInner.md | 13 ++ .../docs/CategoryStatsStatsInnerMetrics.md | 26 +++ rest/api/v3/stats/docs/ClientType.md | 15 ++ rest/api/v3/stats/docs/Country.md | 13 ++ rest/api/v3/stats/docs/GetClientStat.md | 54 +++++ rest/api/v3/stats/docs/ListBrowserStat.md | 53 +++++ .../docs/ListBrowserStat200ResponseInner.md | 12 ++ ...stBrowserStat200ResponseInnerStatsInner.md | 13 ++ rest/api/v3/stats/docs/ListCategory.md | 51 +++++ .../docs/ListCategory200ResponseInner.md | 11 ++ .../v3/stats/docs/ListCategory400Response.md | 11 ++ .../ListCategory400ResponseErrorsInner.md | 12 ++ rest/api/v3/stats/docs/ListCategoryStat.md | 50 +++++ rest/api/v3/stats/docs/ListCategoryStatSum.md | 54 +++++ rest/api/v3/stats/docs/ListClientStat.md | 50 +++++ .../docs/ListClientStat200ResponseInner.md | 12 ++ ...istClientStat200ResponseInnerStatsInner.md | 13 ++ rest/api/v3/stats/docs/ListDeviceStat.md | 52 +++++ rest/api/v3/stats/docs/ListGeoStat.md | 53 +++++ .../stats/docs/ListGeoStat200ResponseInner.md | 12 ++ .../ListGeoStat200ResponseInnerStatsInner.md | 13 ++ .../v3/stats/docs/ListMailboxProviderStat.md | 53 +++++ ...ListMailboxProviderStat200ResponseInner.md | 12 ++ ...xProviderStat200ResponseInnerStatsInner.md | 13 ++ rest/api/v3/stats/docs/ListStat.md | 52 +++++ .../v3/stats/docs/ListStat200ResponseInner.md | 12 ++ .../ListStat200ResponseInnerStatsInner.md | 11 ++ rest/api/v3/stats/docs/SortByDirection.md | 13 ++ .../v3/stats/docs/StatsAdvancedGlobalStats.md | 26 +++ .../v3/stats/model_advanced_stats_clicks.go | 22 +++ .../model_advanced_stats_clicks_opens.go | 26 +++ .../model_advanced_stats_mailbox_provider.go | 34 ++++ .../v3/stats/model_advanced_stats_opens.go | 22 +++ rest/api/v3/stats/model_aggregated_by.go | 24 +++ rest/api/v3/stats/model_aggregated_by1.go | 24 +++ rest/api/v3/stats/model_aggregated_by2.go | 24 +++ rest/api/v3/stats/model_aggregated_by3.go | 24 +++ rest/api/v3/stats/model_category_stats.go | 21 ++ .../stats/model_category_stats_stats_inner.go | 23 +++ ...odel_category_stats_stats_inner_metrics.go | 50 +++++ rest/api/v3/stats/model_client_type.go | 25 +++ rest/api/v3/stats/model_country.go | 23 +++ ...el_list_browser_stat_200_response_inner.go | 22 +++ ...ser_stat_200_response_inner_stats_inner.go | 23 +++ .../model_list_category_200_response_inner.go | 20 ++ .../stats/model_list_category_400_response.go | 20 ++ ...list_category_400_response_errors_inner.go | 21 ++ ...del_list_client_stat_200_response_inner.go | 22 +++ ...ent_stat_200_response_inner_stats_inner.go | 23 +++ .../model_list_geo_stat_200_response_inner.go | 22 +++ ...geo_stat_200_response_inner_stats_inner.go | 23 +++ ...ailbox_provider_stat_200_response_inner.go | 22 +++ ...der_stat_200_response_inner_stats_inner.go | 23 +++ .../model_list_stat_200_response_inner.go | 22 +++ ...ist_stat_200_response_inner_stats_inner.go | 19 ++ rest/api/v3/stats/model_sort_by_direction.go | 23 +++ .../model_stats_advanced_global_stats.go | 50 +++++ rest/api/v3/subusers/README.md | 106 ++++++++++ rest/api/v3/subusers/api_create_subuser.go | 97 +++++++++ rest/api/v3/subusers/api_delete_subuser.go | 69 +++++++ .../api/v3/subusers/api_get_subuser_credit.go | 69 +++++++ rest/api/v3/subusers/api_list_monthly_stat.go | 106 ++++++++++ rest/api/v3/subusers/api_list_reputation.go | 60 ++++++ rest/api/v3/subusers/api_list_stat.go | 106 ++++++++++ rest/api/v3/subusers/api_list_stat_sum.go | 115 +++++++++++ rest/api/v3/subusers/api_list_subuser.go | 105 ++++++++++ .../subusers/api_list_subuser_monthly_stat.go | 108 ++++++++++ rest/api/v3/subusers/api_service.go | 34 ++++ rest/api/v3/subusers/api_update_subuser.go | 100 ++++++++++ .../v3/subusers/api_update_subuser_credit.go | 84 ++++++++ rest/api/v3/subusers/api_update_subuser_ip.go | 84 ++++++++ .../api_update_subuser_remaining_credit.go | 84 ++++++++ .../api_update_subuser_website_access.go | 76 ++++++++ rest/api/v3/subusers/docs/AggregatedBy.md | 14 ++ rest/api/v3/subusers/docs/CategoryStats.md | 12 ++ .../subusers/docs/CategoryStatsStatsInner.md | 13 ++ .../docs/CategoryStatsStatsInnerMetrics.md | 26 +++ rest/api/v3/subusers/docs/CreateSubuser.md | 48 +++++ .../v3/subusers/docs/CreateSubuserRequest.md | 16 ++ rest/api/v3/subusers/docs/DeleteSubuser.md | 51 +++++ rest/api/v3/subusers/docs/ErrorResponse.md | 12 ++ .../subusers/docs/ErrorResponseErrorsInner.md | 13 ++ rest/api/v3/subusers/docs/GetSubuserCredit.md | 51 +++++ rest/api/v3/subusers/docs/ListMonthlyStat.md | 52 +++++ rest/api/v3/subusers/docs/ListReputation.md | 48 +++++ .../docs/ListReputation200ResponseInner.md | 12 ++ rest/api/v3/subusers/docs/ListStat.md | 51 +++++ rest/api/v3/subusers/docs/ListStatSum.md | 53 +++++ rest/api/v3/subusers/docs/ListSubuser.md | 52 +++++ .../subusers/docs/ListSubuserMonthlyStat.md | 55 ++++++ rest/api/v3/subusers/docs/Region.md | 14 ++ rest/api/v3/subusers/docs/Region1.md | 13 ++ rest/api/v3/subusers/docs/Region2.md | 13 ++ rest/api/v3/subusers/docs/Region3.md | 13 ++ rest/api/v3/subusers/docs/ResetFrequency.md | 14 ++ rest/api/v3/subusers/docs/ResetFrequency1.md | 14 ++ rest/api/v3/subusers/docs/SortByDirection.md | 13 ++ rest/api/v3/subusers/docs/SortByDirection1.md | 13 ++ rest/api/v3/subusers/docs/SortByDirection2.md | 13 ++ rest/api/v3/subusers/docs/SortByMetric.md | 20 ++ rest/api/v3/subusers/docs/Subuser.md | 15 ++ rest/api/v3/subusers/docs/SubuserCredits.md | 15 ++ .../v3/subusers/docs/SubuserCreditsRequest.md | 13 ++ rest/api/v3/subusers/docs/SubuserPost.md | 15 ++ .../docs/SubuserPostCreditAllocation.md | 11 ++ rest/api/v3/subusers/docs/SubuserStats.md | 12 ++ .../subusers/docs/SubuserStatsStatsInner.md | 15 ++ .../docs/SubuserStatsStatsInnerMetrics.md | 26 +++ rest/api/v3/subusers/docs/Type.md | 14 ++ rest/api/v3/subusers/docs/Type1.md | 14 ++ rest/api/v3/subusers/docs/UpdateSubuser.md | 52 +++++ .../v3/subusers/docs/UpdateSubuserCredit.md | 51 +++++ rest/api/v3/subusers/docs/UpdateSubuserIp.md | 52 +++++ .../docs/UpdateSubuserIp200Response.md | 11 ++ .../docs/UpdateSubuserRemainingCredit.md | 51 +++++ .../UpdateSubuserRemainingCreditRequest.md | 11 ++ .../v3/subusers/docs/UpdateSubuserRequest.md | 11 ++ .../docs/UpdateSubuserWebsiteAccess.md | 52 +++++ .../docs/UpdateSubuserWebsiteAccessRequest.md | 11 ++ rest/api/v3/subusers/model_aggregated_by.go | 24 +++ rest/api/v3/subusers/model_category_stats.go | 21 ++ .../model_category_stats_stats_inner.go | 23 +++ ...odel_category_stats_stats_inner_metrics.go | 50 +++++ .../subusers/model_create_subuser_request.go | 30 +++ rest/api/v3/subusers/model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ ...odel_list_reputation_200_response_inner.go | 22 +++ rest/api/v3/subusers/model_region.go | 24 +++ rest/api/v3/subusers/model_region1.go | 23 +++ rest/api/v3/subusers/model_region2.go | 23 +++ rest/api/v3/subusers/model_region3.go | 23 +++ rest/api/v3/subusers/model_reset_frequency.go | 24 +++ .../api/v3/subusers/model_reset_frequency1.go | 24 +++ .../v3/subusers/model_sort_by_direction.go | 23 +++ .../v3/subusers/model_sort_by_direction1.go | 23 +++ .../v3/subusers/model_sort_by_direction2.go | 23 +++ rest/api/v3/subusers/model_sort_by_metric.go | 30 +++ rest/api/v3/subusers/model_subuser.go | 28 +++ rest/api/v3/subusers/model_subuser_credits.go | 28 +++ .../subusers/model_subuser_credits_request.go | 24 +++ rest/api/v3/subusers/model_subuser_post.go | 27 +++ .../model_subuser_post_credit_allocation.go | 19 ++ rest/api/v3/subusers/model_subuser_stats.go | 22 +++ .../model_subuser_stats_stats_inner.go | 27 +++ ...model_subuser_stats_stats_inner_metrics.go | 50 +++++ rest/api/v3/subusers/model_type.go | 24 +++ rest/api/v3/subusers/model_type1.go | 24 +++ .../model_update_subuser_ip_200_response.go | 20 ++ ...update_subuser_remaining_credit_request.go | 20 ++ .../subusers/model_update_subuser_request.go | 20 ++ ...l_update_subuser_website_access_request.go | 20 ++ rest/api/v3/teammates/README.md | 89 +++++++++ .../teammates/api_delete_pending_teammate.go | 70 +++++++ rest/api/v3/teammates/api_delete_teammate.go | 70 +++++++ rest/api/v3/teammates/api_get_teammate.go | 70 +++++++ rest/api/v3/teammates/api_invite_teammate.go | 82 ++++++++ .../v3/teammates/api_list_pending_teammate.go | 59 ++++++ .../teammates/api_list_subuser_by_template.go | 122 ++++++++++++ rest/api/v3/teammates/api_list_teammate.go | 79 ++++++++ .../teammates/api_resend_teammate_invite.go | 78 ++++++++ rest/api/v3/teammates/api_service.go | 34 ++++ rest/api/v3/teammates/api_update_teammate.go | 101 ++++++++++ .../teammates/docs/DeletePendingTeammate.md | 52 +++++ rest/api/v3/teammates/docs/DeleteTeammate.md | 52 +++++ rest/api/v3/teammates/docs/GetTeammate.md | 52 +++++ .../teammates/docs/GetTeammate200Response.md | 25 +++ rest/api/v3/teammates/docs/InviteTeammate.md | 49 +++++ .../docs/InviteTeammate201Response.md | 14 ++ .../docs/InviteTeammate400Response.md | 11 ++ .../InviteTeammate400ResponseErrorsInner.md | 12 ++ .../teammates/docs/InviteTeammateRequest.md | 13 ++ .../v3/teammates/docs/ListPendingTeammate.md | 48 +++++ .../docs/ListPendingTeammate200Response.md | 11 ++ ...stPendingTeammate200ResponseResultInner.md | 15 ++ .../teammates/docs/ListSubuserByTemplate.md | 54 +++++ .../docs/ListSubuserByTemplate200Response.md | 13 ++ ...istSubuserByTemplate200ResponseMetadata.md | 11 ++ ...ByTemplate200ResponseMetadataNextParams.md | 13 ++ ...ByTemplate200ResponseSubuserAccessInner.md | 16 ++ .../docs/ListSubuserByTemplate400Response.md | 11 ++ ...SubuserByTemplate400ResponseErrorsInner.md | 12 ++ rest/api/v3/teammates/docs/ListTeammate.md | 50 +++++ .../teammates/docs/ListTeammate200Response.md | 11 ++ .../ListTeammate200ResponseResultInner.md | 24 +++ rest/api/v3/teammates/docs/PermissionType.md | 13 ++ .../v3/teammates/docs/ResendTeammateInvite.md | 52 +++++ .../docs/ResendTeammateInvite200Response.md | 14 ++ rest/api/v3/teammates/docs/UpdateTeammate.md | 53 +++++ .../docs/UpdateTeammate200Response.md | 25 +++ .../teammates/docs/UpdateTeammateRequest.md | 12 ++ rest/api/v3/teammates/docs/UserType.md | 14 ++ rest/api/v3/teammates/docs/UserType1.md | 14 ++ rest/api/v3/teammates/docs/UserType2.md | 14 ++ .../model_get_teammate_200_response.go | 48 +++++ .../model_invite_teammate_201_response.go | 26 +++ .../model_invite_teammate_400_response.go | 19 ++ ...vite_teammate_400_response_errors_inner.go | 20 ++ .../model_invite_teammate_request.go | 24 +++ ...odel_list_pending_teammate_200_response.go | 19 ++ ...ding_teammate_200_response_result_inner.go | 28 +++ ...l_list_subuser_by_template_200_response.go | 23 +++ ...user_by_template_200_response__metadata.go | 19 ++ ...late_200_response__metadata_next_params.go | 24 +++ ...plate_200_response_subuser_access_inner.go | 30 +++ ...l_list_subuser_by_template_400_response.go | 19 ++ ...r_by_template_400_response_errors_inner.go | 22 +++ .../model_list_teammate_200_response.go | 19 ++ ...list_teammate_200_response_result_inner.go | 46 +++++ .../api/v3/teammates/model_permission_type.go | 23 +++ ...del_resend_teammate_invite_200_response.go | 26 +++ .../model_update_teammate_200_response.go | 48 +++++ .../model_update_teammate_request.go | 22 +++ rest/api/v3/teammates/model_user_type.go | 24 +++ rest/api/v3/teammates/model_user_type1.go | 24 +++ rest/api/v3/teammates/model_user_type2.go | 24 +++ rest/api/v3/templates/README.md | 93 +++++++++ .../api_activate_template_version.go | 79 ++++++++ rest/api/v3/templates/api_create_template.go | 74 +++++++ .../templates/api_create_template_version.go | 85 ++++++++ rest/api/v3/templates/api_delete_template.go | 70 +++++++ .../templates/api_delete_template_version.go | 70 +++++++ .../v3/templates/api_duplicate_template.go | 85 ++++++++ rest/api/v3/templates/api_get_template.go | 70 +++++++ .../v3/templates/api_get_template_version.go | 79 ++++++++ rest/api/v3/templates/api_list_template.go | 96 +++++++++ rest/api/v3/templates/api_service.go | 34 ++++ rest/api/v3/templates/api_update_template.go | 85 ++++++++ .../templates/api_update_template_version.go | 94 +++++++++ .../templates/docs/ActivateTemplateVersion.md | 53 +++++ rest/api/v3/templates/docs/Active.md | 13 ++ rest/api/v3/templates/docs/Active1.md | 13 ++ rest/api/v3/templates/docs/CreateTemplate.md | 49 +++++ .../templates/docs/CreateTemplateRequest.md | 12 ++ .../templates/docs/CreateTemplateVersion.md | 53 +++++ rest/api/v3/templates/docs/DeleteTemplate.md | 52 +++++ .../templates/docs/DeleteTemplateVersion.md | 53 +++++ .../v3/templates/docs/DuplicateTemplate.md | 53 +++++ .../docs/DuplicateTemplateRequest.md | 11 ++ rest/api/v3/templates/docs/Editor.md | 13 ++ rest/api/v3/templates/docs/Editor1.md | 13 ++ rest/api/v3/templates/docs/Generation.md | 13 ++ rest/api/v3/templates/docs/Generation1.md | 13 ++ rest/api/v3/templates/docs/Generations.md | 14 ++ rest/api/v3/templates/docs/GetTemplate.md | 52 +++++ .../v3/templates/docs/GetTemplateVersion.md | 53 +++++ rest/api/v3/templates/docs/ListTemplate.md | 50 +++++ .../templates/docs/ListTemplate200Response.md | 12 ++ .../templates/docs/ListTemplate400Response.md | 11 ++ .../ListTemplate400ResponseErrorsInner.md | 12 ++ rest/api/v3/templates/docs/Metadata.md | 14 ++ .../templates/docs/TransactionalTemplate.md | 16 ++ .../TransactionalTemplateVersionCreate.md | 18 ++ .../TransactionalTemplateVersionOutput.md | 23 +++ .../docs/TransactionalTemplateWarning.md | 11 ++ .../TransactionalTemplatesTemplateLean.md | 15 ++ ...TransactionalTemplatesVersionOutputLean.md | 21 ++ rest/api/v3/templates/docs/UpdateTemplate.md | 53 +++++ .../templates/docs/UpdateTemplateRequest.md | 11 ++ .../templates/docs/UpdateTemplateVersion.md | 54 +++++ rest/api/v3/templates/model_active.go | 23 +++ rest/api/v3/templates/model_active1.go | 23 +++ .../model_create_template_request.go | 22 +++ .../model_duplicate_template_request.go | 20 ++ rest/api/v3/templates/model_editor.go | 23 +++ rest/api/v3/templates/model_editor1.go | 23 +++ rest/api/v3/templates/model_generation.go | 23 +++ rest/api/v3/templates/model_generation1.go | 23 +++ rest/api/v3/templates/model_generations.go | 24 +++ .../model_list_template_200_response.go | 21 ++ .../model_list_template_400_response.go | 19 ++ ...list_template_400_response_errors_inner.go | 20 ++ rest/api/v3/templates/model_metadata.go | 22 +++ .../templates/model_transactional_template.go | 29 +++ ...l_transactional_template_version_create.go | 34 ++++ ...l_transactional_template_version_output.go | 43 ++++ .../model_transactional_template_warning.go | 20 ++ ...l_transactional_templates_template_lean.go | 28 +++ ...sactional_templates_version_output_lean.go | 40 ++++ .../model_update_template_request.go | 20 ++ rest/api/v3/tracking_settings/README.md | 75 +++++++ .../api_list_click_tracking_setting.go | 59 ++++++ ..._list_google_analytics_tracking_setting.go | 59 ++++++ .../api_list_open_tracking_setting.go | 59 ++++++ .../api_list_subscription_tracking_setting.go | 59 ++++++ .../api_list_tracking_setting.go | 59 ++++++ rest/api/v3/tracking_settings/api_service.go | 34 ++++ .../api_update_click_tracking_setting.go | 74 +++++++ ...pdate_google_analytics_tracking_setting.go | 74 +++++++ .../api_update_open_tracking_setting.go | 74 +++++++ ...pi_update_subscription_tracking_setting.go | 74 +++++++ .../tracking_settings/docs/ClickTracking.md | 12 ++ .../docs/GoogleAnalyticsSettings.md | 16 ++ .../docs/ListClickTrackingSetting.md | 48 +++++ .../ListGoogleAnalyticsTrackingSetting.md | 48 +++++ .../docs/ListOpenTrackingSetting.md | 48 +++++ .../ListOpenTrackingSetting200Response.md | 11 ++ .../docs/ListSubscriptionTrackingSetting.md | 48 +++++ .../docs/ListTrackingSetting.md | 48 +++++ .../docs/ListTrackingSetting200Response.md | 11 ++ ...stTrackingSetting200ResponseResultInner.md | 14 ++ .../docs/SubscriptionTrackingSettings.md | 16 ++ .../docs/UpdateClickTrackingSetting.md | 49 +++++ .../docs/UpdateClickTrackingSettingRequest.md | 11 ++ .../UpdateGoogleAnalyticsTrackingSetting.md | 49 +++++ .../docs/UpdateOpenTrackingSetting.md | 49 +++++ .../docs/UpdateOpenTrackingSettingRequest.md | 11 ++ .../docs/UpdateSubscriptionTrackingSetting.md | 49 +++++ .../tracking_settings/model_click_tracking.go | 22 +++ .../model_google_analytics_settings.go | 30 +++ ...list_open_tracking_setting_200_response.go | 20 ++ ...odel_list_tracking_setting_200_response.go | 20 ++ ...cking_setting_200_response_result_inner.go | 26 +++ .../model_subscription_tracking_settings.go | 30 +++ ...l_update_click_tracking_setting_request.go | 20 ++ ...el_update_open_tracking_setting_request.go | 20 ++ rest/api/v3/user/README.md | 83 ++++++++ rest/api/v3/user/api_list_account.go | 59 ++++++ rest/api/v3/user/api_list_credit.go | 59 ++++++ rest/api/v3/user/api_list_email.go | 59 ++++++ rest/api/v3/user/api_list_profile.go | 59 ++++++ rest/api/v3/user/api_list_username.go | 59 ++++++ rest/api/v3/user/api_service.go | 34 ++++ rest/api/v3/user/api_update_email.go | 74 +++++++ rest/api/v3/user/api_update_password.go | 74 +++++++ rest/api/v3/user/api_update_profile.go | 82 ++++++++ rest/api/v3/user/api_update_username.go | 74 +++++++ rest/api/v3/user/docs/ErrorResponse.md | 12 ++ .../v3/user/docs/ErrorResponseErrorsInner.md | 13 ++ .../v3/user/docs/GETUserAccountResponse.md | 12 ++ .../v3/user/docs/GETUserProfileResponse.md | 21 ++ rest/api/v3/user/docs/ListAccount.md | 48 +++++ rest/api/v3/user/docs/ListCredit.md | 48 +++++ .../api/v3/user/docs/ListCredit200Response.md | 17 ++ rest/api/v3/user/docs/ListEmail.md | 48 +++++ rest/api/v3/user/docs/ListEmail200Response.md | 11 ++ rest/api/v3/user/docs/ListProfile.md | 48 +++++ rest/api/v3/user/docs/ListUsername.md | 48 +++++ .../v3/user/docs/ListUsername200Response.md | 12 ++ rest/api/v3/user/docs/Type.md | 13 ++ rest/api/v3/user/docs/UpdateEmail.md | 49 +++++ .../v3/user/docs/UpdateEmail200Response.md | 11 ++ rest/api/v3/user/docs/UpdateEmailRequest.md | 11 ++ rest/api/v3/user/docs/UpdatePassword.md | 49 +++++ .../api/v3/user/docs/UpdatePasswordRequest.md | 12 ++ rest/api/v3/user/docs/UpdateProfile.md | 49 +++++ rest/api/v3/user/docs/UpdateUsername.md | 49 +++++ .../v3/user/docs/UpdateUsername200Response.md | 11 ++ .../api/v3/user/docs/UpdateUsernameRequest.md | 11 ++ rest/api/v3/user/docs/UserProfile.md | 21 ++ rest/api/v3/user/model_error_response.go | 21 ++ .../user/model_error_response_errors_inner.go | 24 +++ .../user/model_get_user_account_response.go | 22 +++ .../user/model_get_user_profile_response.go | 40 ++++ .../v3/user/model_list_credit_200_response.go | 32 +++ .../v3/user/model_list_email_200_response.go | 20 ++ .../user/model_list_username_200_response.go | 22 +++ rest/api/v3/user/model_type.go | 23 +++ .../user/model_update_email_200_response.go | 20 ++ .../api/v3/user/model_update_email_request.go | 20 ++ .../v3/user/model_update_password_request.go | 22 +++ .../model_update_username_200_response.go | 20 ++ .../v3/user/model_update_username_request.go | 20 ++ rest/api/v3/user/model_user_profile.go | 40 ++++ rest/api/v3/verified_senders/README.md | 84 ++++++++ .../api_create_verified_sender.go | 97 +++++++++ .../api_delete_verified_sender.go | 85 ++++++++ .../api_list_verified_sender.go | 103 ++++++++++ .../api_list_verified_sender_domain.go | 73 +++++++ ...pi_list_verified_sender_steps_completed.go | 73 +++++++ .../api_resend_verified_sender.go | 93 +++++++++ rest/api/v3/verified_senders/api_service.go | 34 ++++ .../api_update_verified_sender.go | 108 ++++++++++ .../api_verify_sender_token.go | 77 ++++++++ .../docs/CreateVerifiedSender.md | 48 +++++ .../docs/CreateVerifiedSender400Response.md | 11 ++ ...ateVerifiedSender400ResponseErrorsInner.md | 13 ++ .../docs/DeleteVerifiedSender.md | 51 +++++ .../docs/DeleteVerifiedSender403Response.md | 11 ++ ...eteVerifiedSender403ResponseErrorsInner.md | 12 ++ .../docs/DeleteVerifiedSender404Response.md | 11 ++ .../v3/verified_senders/docs/ErrorResponse.md | 12 ++ .../docs/ErrorResponseErrorsInner.md | 13 ++ .../docs/ListVerifiedSender.md | 50 +++++ .../docs/ListVerifiedSender200Response.md | 11 ++ .../docs/ListVerifiedSenderDomain.md | 44 +++++ .../ListVerifiedSenderDomain200Response.md | 11 ++ ...tVerifiedSenderDomain200ResponseResults.md | 12 ++ .../docs/ListVerifiedSenderStepsCompleted.md | 44 +++++ ...VerifiedSenderStepsCompleted200Response.md | 11 ++ ...dSenderStepsCompleted200ResponseResults.md | 12 ++ .../docs/ResendVerifiedSender.md | 51 +++++ .../docs/UpdateVerifiedSender.md | 52 +++++ .../docs/VerifiedSenderRequest.md | 21 ++ .../docs/VerifiedSenderResponse.md | 24 +++ .../docs/VerifySenderToken.md | 51 +++++ ...del_create_verified_sender_400_response.go | 19 ++ ...rified_sender_400_response_errors_inner.go | 21 ++ ...del_delete_verified_sender_403_response.go | 19 ++ ...rified_sender_403_response_errors_inner.go | 20 ++ ...del_delete_verified_sender_404_response.go | 19 ++ .../verified_senders/model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ ...model_list_verified_sender_200_response.go | 19 ++ ...ist_verified_sender_domain_200_response.go | 19 ++ ...fied_sender_domain_200_response_results.go | 20 ++ ...ied_sender_steps_completed_200_response.go | 19 ++ ...er_steps_completed_200_response_results.go | 20 ++ .../model_verified_sender_request.go | 29 +++ .../model_verified_sender_response.go | 32 +++ rest/api/v3/webhooks/README.md | 100 ++++++++++ .../v3/webhooks/api_create_event_webhook.go | 82 ++++++++ .../v3/webhooks/api_create_parse_setting.go | 98 ++++++++++ .../v3/webhooks/api_delete_event_webhook.go | 70 +++++++ .../v3/webhooks/api_delete_parse_setting.go | 94 +++++++++ rest/api/v3/webhooks/api_get_event_webhook.go | 88 +++++++++ rest/api/v3/webhooks/api_get_parse_setting.go | 94 +++++++++ .../webhooks/api_get_signed_event_webhook.go | 78 ++++++++ .../api/v3/webhooks/api_list_event_webhook.go | 69 +++++++ .../api/v3/webhooks/api_list_parse_setting.go | 83 ++++++++ rest/api/v3/webhooks/api_list_parse_static.go | 106 ++++++++++ rest/api/v3/webhooks/api_service.go | 34 ++++ .../api/v3/webhooks/api_test_event_webhook.go | 66 +++++++ .../v3/webhooks/api_update_event_webhook.go | 110 +++++++++++ .../v3/webhooks/api_update_parse_setting.go | 109 +++++++++++ .../api_update_signed_event_webhook.go | 93 +++++++++ rest/api/v3/webhooks/docs/AggregatedBy.md | 14 ++ .../v3/webhooks/docs/CreateEventWebhook.md | 49 +++++ .../docs/CreateEventWebhook400Response.md | 11 ++ ...reateEventWebhook400ResponseErrorsInner.md | 13 ++ .../v3/webhooks/docs/CreateParseSetting.md | 49 +++++ .../v3/webhooks/docs/DeleteEventWebhook.md | 52 +++++ .../v3/webhooks/docs/DeleteParseSetting.md | 52 +++++ rest/api/v3/webhooks/docs/ErrorResponse.md | 12 ++ .../webhooks/docs/ErrorResponseErrorsInner.md | 13 ++ .../webhooks/docs/EventWebhookAllResponse.md | 12 ++ .../docs/EventWebhookBaseResponseProps.md | 26 +++ .../docs/EventWebhookDateResponseProps.md | 12 ++ .../docs/EventWebhookNoDatesResponse.md | 29 +++ .../docs/EventWebhookOauthResponseProps.md | 12 ++ .../v3/webhooks/docs/EventWebhookRequest.md | 27 +++ .../docs/EventWebhookSignedResponse.md | 31 +++ .../docs/EventWebhookSignedResponseProp.md | 11 ++ .../webhooks/docs/EventWebhookTestRequest.md | 15 ++ .../docs/EventWebhookUnsignedResponse.md | 30 +++ rest/api/v3/webhooks/docs/GetEventWebhook.md | 53 +++++ rest/api/v3/webhooks/docs/GetParseSetting.md | 52 +++++ .../v3/webhooks/docs/GetSignedEventWebhook.md | 52 +++++ .../docs/GetSignedEventWebhook200Response.md | 12 ++ .../docs/GetSignedEventWebhook404Response.md | 11 ++ ...ignedEventWebhook404ResponseErrorsInner.md | 11 ++ rest/api/v3/webhooks/docs/ListEventWebhook.md | 49 +++++ rest/api/v3/webhooks/docs/ListParseSetting.md | 48 +++++ .../docs/ListParseSetting200Response.md | 11 ++ rest/api/v3/webhooks/docs/ListParseStatic.md | 52 +++++ .../docs/ListParseStatic200ResponseInner.md | 12 ++ ...stParseStatic200ResponseInnerStatsInner.md | 11 ++ ...Static200ResponseInnerStatsInnerMetrics.md | 11 ++ rest/api/v3/webhooks/docs/ParseSetting.md | 14 ++ rest/api/v3/webhooks/docs/TestEventWebhook.md | 49 +++++ .../v3/webhooks/docs/UpdateEventWebhook.md | 54 +++++ .../v3/webhooks/docs/UpdateParseSetting.md | 53 +++++ .../webhooks/docs/UpdateSignedEventWebhook.md | 53 +++++ .../docs/UpdateSignedEventWebhookRequest.md | 11 ++ rest/api/v3/webhooks/model_aggregated_by.go | 24 +++ ...model_create_event_webhook_400_response.go | 19 ++ ...event_webhook_400_response_errors_inner.go | 24 +++ rest/api/v3/webhooks/model_error_response.go | 21 ++ .../model_error_response_errors_inner.go | 24 +++ .../model_event_webhook_all_response.go | 22 +++ ...model_event_webhook_base_response_props.go | 50 +++++ ...model_event_webhook_date_response_props.go | 26 +++ .../model_event_webhook_no_dates_response.go | 56 ++++++ ...odel_event_webhook_oauth_response_props.go | 22 +++ .../webhooks/model_event_webhook_request.go | 52 +++++ .../model_event_webhook_signed_response.go | 64 ++++++ ...odel_event_webhook_signed_response_prop.go | 20 ++ .../model_event_webhook_test_request.go | 28 +++ .../model_event_webhook_unsigned_response.go | 62 ++++++ ...l_get_signed_event_webhook_200_response.go | 22 +++ ...l_get_signed_event_webhook_404_response.go | 19 ++ ...event_webhook_404_response_errors_inner.go | 20 ++ .../model_list_parse_setting_200_response.go | 20 ++ ...el_list_parse_static_200_response_inner.go | 22 +++ ...e_static_200_response_inner_stats_inner.go | 19 ++ ..._200_response_inner_stats_inner_metrics.go | 20 ++ rest/api/v3/webhooks/model_parse_setting.go | 26 +++ ...del_update_signed_event_webhook_request.go | 20 ++ sendgrid.go | 15 +- 2156 files changed, 76487 insertions(+), 6 deletions(-) create mode 100644 rest/api/v3/account_provisioning/README.md create mode 100644 rest/api/v3/account_provisioning/api_authenticate_account.go create mode 100644 rest/api/v3/account_provisioning/api_create_account.go create mode 100644 rest/api/v3/account_provisioning/api_delete_account.go create mode 100644 rest/api/v3/account_provisioning/api_get_account_state.go create mode 100644 rest/api/v3/account_provisioning/api_list_account.go create mode 100644 rest/api/v3/account_provisioning/api_list_account_offering.go create mode 100644 rest/api/v3/account_provisioning/api_list_offering.go create mode 100644 rest/api/v3/account_provisioning/api_service.go create mode 100644 rest/api/v3/account_provisioning/api_update_account_offering.go create mode 100644 rest/api/v3/account_provisioning/api_update_account_state.go create mode 100644 rest/api/v3/account_provisioning/docs/AccountList.md create mode 100644 rest/api/v3/account_provisioning/docs/AccountProvisioningAccount.md create mode 100644 rest/api/v3/account_provisioning/docs/AccountProvisioningAccountId.md create mode 100644 rest/api/v3/account_provisioning/docs/AccountProvisioningCatalog.md create mode 100644 rest/api/v3/account_provisioning/docs/AccountProvisioningOfferingList.md create mode 100644 rest/api/v3/account_provisioning/docs/AccountProvisioningOfferingV1.md create mode 100644 rest/api/v3/account_provisioning/docs/AccountProvisioningPagination.md create mode 100644 rest/api/v3/account_provisioning/docs/AccountProvisioningProfile.md create mode 100644 rest/api/v3/account_provisioning/docs/AccountProvisioningStateRead.md create mode 100644 rest/api/v3/account_provisioning/docs/AccountProvisioningStateWrite.md create mode 100644 rest/api/v3/account_provisioning/docs/AuthenticateAccount.md create mode 100644 rest/api/v3/account_provisioning/docs/CatalogEntry.md create mode 100644 rest/api/v3/account_provisioning/docs/CatalogEntryEntitlements.md create mode 100644 rest/api/v3/account_provisioning/docs/CreateAccount.md create mode 100644 rest/api/v3/account_provisioning/docs/CreateAccountParams.md create mode 100644 rest/api/v3/account_provisioning/docs/DeleteAccount.md create mode 100644 rest/api/v3/account_provisioning/docs/ErrorResponse.md create mode 100644 rest/api/v3/account_provisioning/docs/GetAccountState.md create mode 100644 rest/api/v3/account_provisioning/docs/ListAccount.md create mode 100644 rest/api/v3/account_provisioning/docs/ListAccountOffering.md create mode 100644 rest/api/v3/account_provisioning/docs/ListOffering.md create mode 100644 rest/api/v3/account_provisioning/docs/OfferingsToAdd.md create mode 100644 rest/api/v3/account_provisioning/docs/State.md create mode 100644 rest/api/v3/account_provisioning/docs/State1.md create mode 100644 rest/api/v3/account_provisioning/docs/Type.md create mode 100644 rest/api/v3/account_provisioning/docs/UpdateAccountOffering.md create mode 100644 rest/api/v3/account_provisioning/docs/UpdateAccountState.md create mode 100644 rest/api/v3/account_provisioning/model_account_list.go create mode 100644 rest/api/v3/account_provisioning/model_account_provisioning_account.go create mode 100644 rest/api/v3/account_provisioning/model_account_provisioning_account_id.go create mode 100644 rest/api/v3/account_provisioning/model_account_provisioning_catalog.go create mode 100644 rest/api/v3/account_provisioning/model_account_provisioning_offering_list.go create mode 100644 rest/api/v3/account_provisioning/model_account_provisioning_offering_v1.go create mode 100644 rest/api/v3/account_provisioning/model_account_provisioning_pagination.go create mode 100644 rest/api/v3/account_provisioning/model_account_provisioning_profile.go create mode 100644 rest/api/v3/account_provisioning/model_account_provisioning_state_read.go create mode 100644 rest/api/v3/account_provisioning/model_account_provisioning_state_write.go create mode 100644 rest/api/v3/account_provisioning/model_catalog_entry.go create mode 100644 rest/api/v3/account_provisioning/model_catalog_entry_entitlements.go create mode 100644 rest/api/v3/account_provisioning/model_create_account_params.go create mode 100644 rest/api/v3/account_provisioning/model_error_response.go create mode 100644 rest/api/v3/account_provisioning/model_offerings_to_add.go create mode 100644 rest/api/v3/account_provisioning/model_state.go create mode 100644 rest/api/v3/account_provisioning/model_state1.go create mode 100644 rest/api/v3/account_provisioning/model_type.go create mode 100644 rest/api/v3/alerts/README.md create mode 100644 rest/api/v3/alerts/api_create_alert.go create mode 100644 rest/api/v3/alerts/api_delete_alert.go create mode 100644 rest/api/v3/alerts/api_get_alert.go create mode 100644 rest/api/v3/alerts/api_list_alert.go create mode 100644 rest/api/v3/alerts/api_service.go create mode 100644 rest/api/v3/alerts/api_update_alert.go create mode 100644 rest/api/v3/alerts/docs/CreateAlert.md create mode 100644 rest/api/v3/alerts/docs/CreateAlert201Response.md create mode 100644 rest/api/v3/alerts/docs/CreateAlertRequest.md create mode 100644 rest/api/v3/alerts/docs/DeleteAlert.md create mode 100644 rest/api/v3/alerts/docs/ErrorResponse.md create mode 100644 rest/api/v3/alerts/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/alerts/docs/GetAlert.md create mode 100644 rest/api/v3/alerts/docs/GetAlert200Response.md create mode 100644 rest/api/v3/alerts/docs/ListAlert.md create mode 100644 rest/api/v3/alerts/docs/ListAlert200ResponseInner.md create mode 100644 rest/api/v3/alerts/docs/Type.md create mode 100644 rest/api/v3/alerts/docs/Type1.md create mode 100644 rest/api/v3/alerts/docs/Type2.md create mode 100644 rest/api/v3/alerts/docs/Type3.md create mode 100644 rest/api/v3/alerts/docs/UpdateAlert.md create mode 100644 rest/api/v3/alerts/docs/UpdateAlert200Response.md create mode 100644 rest/api/v3/alerts/docs/UpdateAlertRequest.md create mode 100644 rest/api/v3/alerts/model_create_alert_201_response.go create mode 100644 rest/api/v3/alerts/model_create_alert_request.go create mode 100644 rest/api/v3/alerts/model_error_response.go create mode 100644 rest/api/v3/alerts/model_error_response_errors_inner.go create mode 100644 rest/api/v3/alerts/model_get_alert_200_response.go create mode 100644 rest/api/v3/alerts/model_list_alert_200_response_inner.go create mode 100644 rest/api/v3/alerts/model_type.go create mode 100644 rest/api/v3/alerts/model_type1.go create mode 100644 rest/api/v3/alerts/model_type2.go create mode 100644 rest/api/v3/alerts/model_type3.go create mode 100644 rest/api/v3/alerts/model_update_alert_200_response.go create mode 100644 rest/api/v3/alerts/model_update_alert_request.go create mode 100644 rest/api/v3/api_keys/README.md create mode 100644 rest/api/v3/api_keys/api_create_api_key.go create mode 100644 rest/api/v3/api_keys/api_delete_api_key.go create mode 100644 rest/api/v3/api_keys/api_get_api_key.go create mode 100644 rest/api/v3/api_keys/api_list_api_key.go create mode 100644 rest/api/v3/api_keys/api_service.go create mode 100644 rest/api/v3/api_keys/api_update_api_key.go create mode 100644 rest/api/v3/api_keys/api_update_api_key_name.go create mode 100644 rest/api/v3/api_keys/docs/ApiKeyResponse.md create mode 100644 rest/api/v3/api_keys/docs/ApiKeyScopesResponse.md create mode 100644 rest/api/v3/api_keys/docs/CreateApiKey.md create mode 100644 rest/api/v3/api_keys/docs/CreateApiKey201Response.md create mode 100644 rest/api/v3/api_keys/docs/CreateApiKeyRequest.md create mode 100644 rest/api/v3/api_keys/docs/DeleteApiKey.md create mode 100644 rest/api/v3/api_keys/docs/ErrorResponse.md create mode 100644 rest/api/v3/api_keys/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/api_keys/docs/GetApiKey.md create mode 100644 rest/api/v3/api_keys/docs/GetApiKey200Response.md create mode 100644 rest/api/v3/api_keys/docs/ListApiKey.md create mode 100644 rest/api/v3/api_keys/docs/ListApiKey200Response.md create mode 100644 rest/api/v3/api_keys/docs/UpdateApiKey.md create mode 100644 rest/api/v3/api_keys/docs/UpdateApiKeyName.md create mode 100644 rest/api/v3/api_keys/docs/UpdateApiKeyNameRequest.md create mode 100644 rest/api/v3/api_keys/docs/UpdateApiKeyRequest.md create mode 100644 rest/api/v3/api_keys/model_api_key_response.go create mode 100644 rest/api/v3/api_keys/model_api_key_scopes_response.go create mode 100644 rest/api/v3/api_keys/model_create_api_key_201_response.go create mode 100644 rest/api/v3/api_keys/model_create_api_key_request.go create mode 100644 rest/api/v3/api_keys/model_error_response.go create mode 100644 rest/api/v3/api_keys/model_error_response_errors_inner.go create mode 100644 rest/api/v3/api_keys/model_get_api_key_200_response.go create mode 100644 rest/api/v3/api_keys/model_list_api_key_200_response.go create mode 100644 rest/api/v3/api_keys/model_update_api_key_name_request.go create mode 100644 rest/api/v3/api_keys/model_update_api_key_request.go create mode 100644 rest/api/v3/domain_authentication/README.md create mode 100644 rest/api/v3/domain_authentication/api_add_ip_to_authenticated_domain.go create mode 100644 rest/api/v3/domain_authentication/api_associate_subuser_with_domain.go create mode 100644 rest/api/v3/domain_authentication/api_associate_subuser_with_domain_multiple.go create mode 100644 rest/api/v3/domain_authentication/api_authenticate_domain.go create mode 100644 rest/api/v3/domain_authentication/api_delete_authenticated_domain.go create mode 100644 rest/api/v3/domain_authentication/api_delete_ip_from_authenticated_domain.go create mode 100644 rest/api/v3/domain_authentication/api_disassociate_authenticated_domain_from_user.go create mode 100644 rest/api/v3/domain_authentication/api_disassociate_subuser_from_domain.go create mode 100644 rest/api/v3/domain_authentication/api_email_dns_record.go create mode 100644 rest/api/v3/domain_authentication/api_get_authenticated_domain.go create mode 100644 rest/api/v3/domain_authentication/api_list_all_authenticated_domain_with_user.go create mode 100644 rest/api/v3/domain_authentication/api_list_authenticated_domain.go create mode 100644 rest/api/v3/domain_authentication/api_list_authenticated_domain_with_user.go create mode 100644 rest/api/v3/domain_authentication/api_list_default_authenticated_domain.go create mode 100644 rest/api/v3/domain_authentication/api_service.go create mode 100644 rest/api/v3/domain_authentication/api_update_authenticated_domain.go create mode 100644 rest/api/v3/domain_authentication/api_validate_authenticated_domain.go create mode 100644 rest/api/v3/domain_authentication/docs/AddIpToAuthenticatedDomain.md create mode 100644 rest/api/v3/domain_authentication/docs/AddIpToAuthenticatedDomainRequest.md create mode 100644 rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomain.md create mode 100644 rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomainMultiple.md create mode 100644 rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomainRequest.md create mode 100644 rest/api/v3/domain_authentication/docs/AuthenticateDomain.md create mode 100644 rest/api/v3/domain_authentication/docs/AuthenticateDomainRequest.md create mode 100644 rest/api/v3/domain_authentication/docs/AuthenticatedDomain.md create mode 100644 rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpf.md create mode 100644 rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDns.md create mode 100644 rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsDkim.md create mode 100644 rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsDomainSpf.md create mode 100644 rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsMailServer.md create mode 100644 rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsSubdomainSpf.md create mode 100644 rest/api/v3/domain_authentication/docs/DeleteAuthenticatedDomain.md create mode 100644 rest/api/v3/domain_authentication/docs/DeleteIpFromAuthenticatedDomain.md create mode 100644 rest/api/v3/domain_authentication/docs/DisassociateAuthenticatedDomainFromUser.md create mode 100644 rest/api/v3/domain_authentication/docs/DisassociateSubuserFromDomain.md create mode 100644 rest/api/v3/domain_authentication/docs/EmailDnsRecord.md create mode 100644 rest/api/v3/domain_authentication/docs/EmailDnsRecord400Response.md create mode 100644 rest/api/v3/domain_authentication/docs/EmailDnsRecord400ResponseErrors.md create mode 100644 rest/api/v3/domain_authentication/docs/EmailDnsRecordRequest.md create mode 100644 rest/api/v3/domain_authentication/docs/GetAuthenticatedDomain.md create mode 100644 rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser.md create mode 100644 rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInner.md create mode 100644 rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDns.md create mode 100644 rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1.md create mode 100644 rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname.md create mode 100644 rest/api/v3/domain_authentication/docs/ListAuthenticatedDomain.md create mode 100644 rest/api/v3/domain_authentication/docs/ListAuthenticatedDomainWithUser.md create mode 100644 rest/api/v3/domain_authentication/docs/ListDefaultAuthenticatedDomain.md create mode 100644 rest/api/v3/domain_authentication/docs/UpdateAuthenticatedDomain.md create mode 100644 rest/api/v3/domain_authentication/docs/UpdateAuthenticatedDomainRequest.md create mode 100644 rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain.md create mode 100644 rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200Response.md create mode 100644 rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResults.md create mode 100644 rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsDkim1.md create mode 100644 rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsMailCname.md create mode 100644 rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsSpf.md create mode 100644 rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain500Response.md create mode 100644 rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain500ResponseErrorsInner.md create mode 100644 rest/api/v3/domain_authentication/model_add_ip_to_authenticated_domain_request.go create mode 100644 rest/api/v3/domain_authentication/model_associate_subuser_with_domain_request.go create mode 100644 rest/api/v3/domain_authentication/model_authenticate_domain_request.go create mode 100644 rest/api/v3/domain_authentication/model_authenticated_domain.go create mode 100644 rest/api/v3/domain_authentication/model_authenticated_domain_spf.go create mode 100644 rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns.go create mode 100644 rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_dkim.go create mode 100644 rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_domain_spf.go create mode 100644 rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_mail_server.go create mode 100644 rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_subdomain_spf.go create mode 100644 rest/api/v3/domain_authentication/model_email_dns_record_400_response.go create mode 100644 rest/api/v3/domain_authentication/model_email_dns_record_400_response_errors.go create mode 100644 rest/api/v3/domain_authentication/model_email_dns_record_request.go create mode 100644 rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner.go create mode 100644 rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns.go create mode 100644 rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns_dkim1.go create mode 100644 rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns_mail_cname.go create mode 100644 rest/api/v3/domain_authentication/model_update_authenticated_domain_request.go create mode 100644 rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response.go create mode 100644 rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results.go create mode 100644 rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_dkim1.go create mode 100644 rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_mail_cname.go create mode 100644 rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_spf.go create mode 100644 rest/api/v3/domain_authentication/model_validate_authenticated_domain_500_response.go create mode 100644 rest/api/v3/domain_authentication/model_validate_authenticated_domain_500_response_errors_inner.go create mode 100644 rest/api/v3/email_activity/README.md create mode 100644 rest/api/v3/email_activity/api_download_csv.go create mode 100644 rest/api/v3/email_activity/api_get_message.go create mode 100644 rest/api/v3/email_activity/api_list_message.go create mode 100644 rest/api/v3/email_activity/api_request_csv.go create mode 100644 rest/api/v3/email_activity/api_service.go create mode 100644 rest/api/v3/email_activity/docs/AbbvMessage.md create mode 100644 rest/api/v3/email_activity/docs/BounceType.md create mode 100644 rest/api/v3/email_activity/docs/BounceType1.md create mode 100644 rest/api/v3/email_activity/docs/DownloadCsv.md create mode 100644 rest/api/v3/email_activity/docs/DownloadCsv200Response.md create mode 100644 rest/api/v3/email_activity/docs/EmailActivityResponseBaseProps.md create mode 100644 rest/api/v3/email_activity/docs/Event.md create mode 100644 rest/api/v3/email_activity/docs/EventName.md create mode 100644 rest/api/v3/email_activity/docs/EventName1.md create mode 100644 rest/api/v3/email_activity/docs/GetMessage.md create mode 100644 rest/api/v3/email_activity/docs/GetMessage404Response.md create mode 100644 rest/api/v3/email_activity/docs/GetMessage404ResponseErrorsInner.md create mode 100644 rest/api/v3/email_activity/docs/ListMessage.md create mode 100644 rest/api/v3/email_activity/docs/ListMessage200Response.md create mode 100644 rest/api/v3/email_activity/docs/ListMessage400Response.md create mode 100644 rest/api/v3/email_activity/docs/ListMessage400ResponseErrorsInner.md create mode 100644 rest/api/v3/email_activity/docs/ListMessage429Response.md create mode 100644 rest/api/v3/email_activity/docs/ListMessage429ResponseErrorsInner.md create mode 100644 rest/api/v3/email_activity/docs/Message.md create mode 100644 rest/api/v3/email_activity/docs/OutboundIpType.md create mode 100644 rest/api/v3/email_activity/docs/OutboundIpType1.md create mode 100644 rest/api/v3/email_activity/docs/RequestCsv.md create mode 100644 rest/api/v3/email_activity/docs/RequestCsv202Response.md create mode 100644 rest/api/v3/email_activity/docs/Status.md create mode 100644 rest/api/v3/email_activity/docs/Status1.md create mode 100644 rest/api/v3/email_activity/docs/Status2.md create mode 100644 rest/api/v3/email_activity/docs/Status3.md create mode 100644 rest/api/v3/email_activity/model_abbv__message.go create mode 100644 rest/api/v3/email_activity/model_bounce_type.go create mode 100644 rest/api/v3/email_activity/model_bounce_type1.go create mode 100644 rest/api/v3/email_activity/model_download_csv_200_response.go create mode 100644 rest/api/v3/email_activity/model_email_activity_response_base_props.go create mode 100644 rest/api/v3/email_activity/model_event.go create mode 100644 rest/api/v3/email_activity/model_event_name.go create mode 100644 rest/api/v3/email_activity/model_event_name1.go create mode 100644 rest/api/v3/email_activity/model_get_message_404_response.go create mode 100644 rest/api/v3/email_activity/model_get_message_404_response_errors_inner.go create mode 100644 rest/api/v3/email_activity/model_list_message_200_response.go create mode 100644 rest/api/v3/email_activity/model_list_message_400_response.go create mode 100644 rest/api/v3/email_activity/model_list_message_400_response_errors_inner.go create mode 100644 rest/api/v3/email_activity/model_list_message_429_response.go create mode 100644 rest/api/v3/email_activity/model_list_message_429_response_errors_inner.go create mode 100644 rest/api/v3/email_activity/model_message.go create mode 100644 rest/api/v3/email_activity/model_outbound_ip_type.go create mode 100644 rest/api/v3/email_activity/model_outbound_ip_type1.go create mode 100644 rest/api/v3/email_activity/model_request_csv_202_response.go create mode 100644 rest/api/v3/email_activity/model_status.go create mode 100644 rest/api/v3/email_activity/model_status1.go create mode 100644 rest/api/v3/email_activity/model_status2.go create mode 100644 rest/api/v3/email_activity/model_status3.go create mode 100644 rest/api/v3/email_validation/README.md create mode 100644 rest/api/v3/email_validation/api_get_email_job_for_verification.go create mode 100644 rest/api/v3/email_validation/api_get_validations_email_jobs.go create mode 100644 rest/api/v3/email_validation/api_list_email_job_for_verification.go create mode 100644 rest/api/v3/email_validation/api_service.go create mode 100644 rest/api/v3/email_validation/api_validate_email.go create mode 100644 rest/api/v3/email_validation/docs/ErrorResponse.md create mode 100644 rest/api/v3/email_validation/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/email_validation/docs/FileType.md create mode 100644 rest/api/v3/email_validation/docs/GetEmailJobForVerification.md create mode 100644 rest/api/v3/email_validation/docs/GetValidationsEmailJobs.md create mode 100644 rest/api/v3/email_validation/docs/GetValidationsEmailJobs200Response.md create mode 100644 rest/api/v3/email_validation/docs/GetValidationsEmailJobs200ResponseResultInner.md create mode 100644 rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200Response.md create mode 100644 rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200ResponseResult.md create mode 100644 rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200ResponseResultErrorsInner.md create mode 100644 rest/api/v3/email_validation/docs/ListEmailJobForVerification.md create mode 100644 rest/api/v3/email_validation/docs/ListEmailJobForVerificationRequest.md create mode 100644 rest/api/v3/email_validation/docs/PutValidationsEmailJobs200Response.md create mode 100644 rest/api/v3/email_validation/docs/PutValidationsEmailJobs200ResponseUploadHeadersInner.md create mode 100644 rest/api/v3/email_validation/docs/Status.md create mode 100644 rest/api/v3/email_validation/docs/Status1.md create mode 100644 rest/api/v3/email_validation/docs/ValidateEmail.md create mode 100644 rest/api/v3/email_validation/docs/ValidateEmail200Response.md create mode 100644 rest/api/v3/email_validation/docs/ValidateEmail200ResponseResult.md create mode 100644 rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecks.md create mode 100644 rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksAdditional.md create mode 100644 rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksDomain.md create mode 100644 rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksLocalPart.md create mode 100644 rest/api/v3/email_validation/docs/ValidateEmailRequest.md create mode 100644 rest/api/v3/email_validation/docs/Verdict.md create mode 100644 rest/api/v3/email_validation/model_error_response.go create mode 100644 rest/api/v3/email_validation/model_error_response_errors_inner.go create mode 100644 rest/api/v3/email_validation/model_file_type.go create mode 100644 rest/api/v3/email_validation/model_get_validations_email_jobs200_response.go create mode 100644 rest/api/v3/email_validation/model_get_validations_email_jobs200_response_result_inner.go create mode 100644 rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response.go create mode 100644 rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response_result.go create mode 100644 rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response_result_errors_inner.go create mode 100644 rest/api/v3/email_validation/model_list_email_job_for_verification_request.go create mode 100644 rest/api/v3/email_validation/model_put_validations_email_jobs200_response.go create mode 100644 rest/api/v3/email_validation/model_put_validations_email_jobs200_response_upload_headers_inner.go create mode 100644 rest/api/v3/email_validation/model_status.go create mode 100644 rest/api/v3/email_validation/model_status1.go create mode 100644 rest/api/v3/email_validation/model_validate_email_200_response.go create mode 100644 rest/api/v3/email_validation/model_validate_email_200_response_result.go create mode 100644 rest/api/v3/email_validation/model_validate_email_200_response_result_checks.go create mode 100644 rest/api/v3/email_validation/model_validate_email_200_response_result_checks_additional.go create mode 100644 rest/api/v3/email_validation/model_validate_email_200_response_result_checks_domain.go create mode 100644 rest/api/v3/email_validation/model_validate_email_200_response_result_checks_local_part.go create mode 100644 rest/api/v3/email_validation/model_validate_email_request.go create mode 100644 rest/api/v3/email_validation/model_verdict.go create mode 100644 rest/api/v3/enforced_tls/README.md create mode 100644 rest/api/v3/enforced_tls/api_list_enforced_tls_setting.go create mode 100644 rest/api/v3/enforced_tls/api_service.go create mode 100644 rest/api/v3/enforced_tls/api_update_enforced_tls_setting.go create mode 100644 rest/api/v3/enforced_tls/docs/EnforcedTlsRequestResponse.md create mode 100644 rest/api/v3/enforced_tls/docs/ErrorResponse.md create mode 100644 rest/api/v3/enforced_tls/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/enforced_tls/docs/ListEnforcedTlsSetting.md create mode 100644 rest/api/v3/enforced_tls/docs/UpdateEnforcedTlsSetting.md create mode 100644 rest/api/v3/enforced_tls/docs/Version.md create mode 100644 rest/api/v3/enforced_tls/model_enforced_tls_request_response.go create mode 100644 rest/api/v3/enforced_tls/model_error_response.go create mode 100644 rest/api/v3/enforced_tls/model_error_response_errors_inner.go create mode 100644 rest/api/v3/enforced_tls/model_version.go create mode 100644 rest/api/v3/integrations/README.md create mode 100644 rest/api/v3/integrations/api_add_integration.go create mode 100644 rest/api/v3/integrations/api_delete_integration.go create mode 100644 rest/api/v3/integrations/api_find_integration_by_id.go create mode 100644 rest/api/v3/integrations/api_get_integrations_by_user.go create mode 100644 rest/api/v3/integrations/api_service.go create mode 100644 rest/api/v3/integrations/api_update_integration.go create mode 100644 rest/api/v3/integrations/docs/AddIntegration.md create mode 100644 rest/api/v3/integrations/docs/AddIntegration400Response.md create mode 100644 rest/api/v3/integrations/docs/DeleteIntegration.md create mode 100644 rest/api/v3/integrations/docs/DeleteIntegration400Response.md create mode 100644 rest/api/v3/integrations/docs/DeleteIntegration404Response.md create mode 100644 rest/api/v3/integrations/docs/Destination.md create mode 100644 rest/api/v3/integrations/docs/Destination1.md create mode 100644 rest/api/v3/integrations/docs/Destination2.md create mode 100644 rest/api/v3/integrations/docs/Destination3.md create mode 100644 rest/api/v3/integrations/docs/DestinationRegion.md create mode 100644 rest/api/v3/integrations/docs/DestinationRegion1.md create mode 100644 rest/api/v3/integrations/docs/DestinationRegion2.md create mode 100644 rest/api/v3/integrations/docs/FindIntegrationById.md create mode 100644 rest/api/v3/integrations/docs/Forbidden.md create mode 100644 rest/api/v3/integrations/docs/GetIntegrationsByUser.md create mode 100644 rest/api/v3/integrations/docs/GetIntegrationsByUser200Response.md create mode 100644 rest/api/v3/integrations/docs/GetIntegrationsByUser403Response.md create mode 100644 rest/api/v3/integrations/docs/GetIntegrationsByUser500Response.md create mode 100644 rest/api/v3/integrations/docs/Id.md create mode 100644 rest/api/v3/integrations/docs/Integration.md create mode 100644 rest/api/v3/integrations/docs/IntegrationFilters.md create mode 100644 rest/api/v3/integrations/docs/IntegrationInput.md create mode 100644 rest/api/v3/integrations/docs/IntegrationInputFilters.md create mode 100644 rest/api/v3/integrations/docs/IntegrationInputProperties.md create mode 100644 rest/api/v3/integrations/docs/IntegrationNotFound.md create mode 100644 rest/api/v3/integrations/docs/IntegrationPatch.md create mode 100644 rest/api/v3/integrations/docs/IntegrationPatchFilters.md create mode 100644 rest/api/v3/integrations/docs/IntegrationPatchProperties.md create mode 100644 rest/api/v3/integrations/docs/IntegrationProperties.md create mode 100644 rest/api/v3/integrations/docs/InternalError.md create mode 100644 rest/api/v3/integrations/docs/InvalidDeleteRequest.md create mode 100644 rest/api/v3/integrations/docs/InvalidRequest.md create mode 100644 rest/api/v3/integrations/docs/Items.md create mode 100644 rest/api/v3/integrations/docs/Items1.md create mode 100644 rest/api/v3/integrations/docs/Items2.md create mode 100644 rest/api/v3/integrations/docs/UpdateIntegration.md create mode 100644 rest/api/v3/integrations/model_add_integration_400_response.go create mode 100644 rest/api/v3/integrations/model_delete_integration_400_response.go create mode 100644 rest/api/v3/integrations/model_delete_integration_404_response.go create mode 100644 rest/api/v3/integrations/model_destination.go create mode 100644 rest/api/v3/integrations/model_destination1.go create mode 100644 rest/api/v3/integrations/model_destination2.go create mode 100644 rest/api/v3/integrations/model_destination3.go create mode 100644 rest/api/v3/integrations/model_destination_region.go create mode 100644 rest/api/v3/integrations/model_destination_region1.go create mode 100644 rest/api/v3/integrations/model_destination_region2.go create mode 100644 rest/api/v3/integrations/model_forbidden.go create mode 100644 rest/api/v3/integrations/model_get_integrations_by_user_200_response.go create mode 100644 rest/api/v3/integrations/model_get_integrations_by_user_403_response.go create mode 100644 rest/api/v3/integrations/model_get_integrations_by_user_500_response.go create mode 100644 rest/api/v3/integrations/model_id.go create mode 100644 rest/api/v3/integrations/model_integration.go create mode 100644 rest/api/v3/integrations/model_integration_filters.go create mode 100644 rest/api/v3/integrations/model_integration_input.go create mode 100644 rest/api/v3/integrations/model_integration_input_filters.go create mode 100644 rest/api/v3/integrations/model_integration_input_properties.go create mode 100644 rest/api/v3/integrations/model_integration_not_found.go create mode 100644 rest/api/v3/integrations/model_integration_patch.go create mode 100644 rest/api/v3/integrations/model_integration_patch_filters.go create mode 100644 rest/api/v3/integrations/model_integration_patch_properties.go create mode 100644 rest/api/v3/integrations/model_integration_properties.go create mode 100644 rest/api/v3/integrations/model_internal_error.go create mode 100644 rest/api/v3/integrations/model_invalid_delete_request.go create mode 100644 rest/api/v3/integrations/model_invalid_request.go create mode 100644 rest/api/v3/integrations/model_items.go create mode 100644 rest/api/v3/integrations/model_items1.go create mode 100644 rest/api/v3/integrations/model_items2.go create mode 100644 rest/api/v3/ip_access_management/README.md create mode 100644 rest/api/v3/ip_access_management/api_add_ip_to_allow_list.go create mode 100644 rest/api/v3/ip_access_management/api_delete_allowed_ip.go create mode 100644 rest/api/v3/ip_access_management/api_delete_allowed_ips.go create mode 100644 rest/api/v3/ip_access_management/api_get_allowed_ip.go create mode 100644 rest/api/v3/ip_access_management/api_list_access_activity.go create mode 100644 rest/api/v3/ip_access_management/api_list_allowed_ip.go create mode 100644 rest/api/v3/ip_access_management/api_service.go create mode 100644 rest/api/v3/ip_access_management/docs/AddIpToAllowList.md create mode 100644 rest/api/v3/ip_access_management/docs/AddIpToAllowListRequest.md create mode 100644 rest/api/v3/ip_access_management/docs/AddIpToAllowListRequestIpsInner.md create mode 100644 rest/api/v3/ip_access_management/docs/DeleteAllowedIp.md create mode 100644 rest/api/v3/ip_access_management/docs/DeleteAllowedIps.md create mode 100644 rest/api/v3/ip_access_management/docs/DeleteAllowedIpsRequest.md create mode 100644 rest/api/v3/ip_access_management/docs/ErrorResponse.md create mode 100644 rest/api/v3/ip_access_management/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/ip_access_management/docs/GetAllowedIp.md create mode 100644 rest/api/v3/ip_access_management/docs/IpAccessManagement2xx.md create mode 100644 rest/api/v3/ip_access_management/docs/IpAccessManagement2xxResultInner.md create mode 100644 rest/api/v3/ip_access_management/docs/ListAccessActivity.md create mode 100644 rest/api/v3/ip_access_management/docs/ListAccessActivity200Response.md create mode 100644 rest/api/v3/ip_access_management/docs/ListAccessActivity200ResponseResultInner.md create mode 100644 rest/api/v3/ip_access_management/docs/ListAllowedIp.md create mode 100644 rest/api/v3/ip_access_management/model_add_ip_to_allow_list_request.go create mode 100644 rest/api/v3/ip_access_management/model_add_ip_to_allow_list_request_ips_inner.go create mode 100644 rest/api/v3/ip_access_management/model_delete_allowed_ips_request.go create mode 100644 rest/api/v3/ip_access_management/model_error_response.go create mode 100644 rest/api/v3/ip_access_management/model_error_response_errors_inner.go create mode 100644 rest/api/v3/ip_access_management/model_ip_access_management2xx.go create mode 100644 rest/api/v3/ip_access_management/model_ip_access_management2xx_result_inner.go create mode 100644 rest/api/v3/ip_access_management/model_list_access_activity_200_response.go create mode 100644 rest/api/v3/ip_access_management/model_list_access_activity_200_response_result_inner.go create mode 100644 rest/api/v3/ip_address_management/README.md create mode 100644 rest/api/v3/ip_address_management/api_add_ip.go create mode 100644 rest/api/v3/ip_address_management/api_add_ips_to_ip_pool.go create mode 100644 rest/api/v3/ip_address_management/api_add_sub_users_to_ip.go create mode 100644 rest/api/v3/ip_address_management/api_create_ip_pool.go create mode 100644 rest/api/v3/ip_address_management/api_delete_ip_pool.go create mode 100644 rest/api/v3/ip_address_management/api_delete_ips_from_ip_pool.go create mode 100644 rest/api/v3/ip_address_management/api_delete_sub_users_from_ip.go create mode 100644 rest/api/v3/ip_address_management/api_get_ip.go create mode 100644 rest/api/v3/ip_address_management/api_get_ip_pool.go create mode 100644 rest/api/v3/ip_address_management/api_list_ip.go create mode 100644 rest/api/v3/ip_address_management/api_list_ip_assigned_to_ip_pool.go create mode 100644 rest/api/v3/ip_address_management/api_list_ip_pool.go create mode 100644 rest/api/v3/ip_address_management/api_list_sub_user_assigned_to_ip.go create mode 100644 rest/api/v3/ip_address_management/api_service.go create mode 100644 rest/api/v3/ip_address_management/api_update_ip.go create mode 100644 rest/api/v3/ip_address_management/api_update_ip_pool.go create mode 100644 rest/api/v3/ip_address_management/docs/AddIp.md create mode 100644 rest/api/v3/ip_address_management/docs/AddIp201Response.md create mode 100644 rest/api/v3/ip_address_management/docs/AddIpRequest.md create mode 100644 rest/api/v3/ip_address_management/docs/AddIpsToIpPool.md create mode 100644 rest/api/v3/ip_address_management/docs/AddIpsToIpPool200Response.md create mode 100644 rest/api/v3/ip_address_management/docs/AddIpsToIpPoolRequest.md create mode 100644 rest/api/v3/ip_address_management/docs/AddSubUsersToIp.md create mode 100644 rest/api/v3/ip_address_management/docs/AddSubUsersToIp200Response.md create mode 100644 rest/api/v3/ip_address_management/docs/AddSubUsersToIpRequest.md create mode 100644 rest/api/v3/ip_address_management/docs/CreateIpPool.md create mode 100644 rest/api/v3/ip_address_management/docs/CreateIpPool201Response.md create mode 100644 rest/api/v3/ip_address_management/docs/CreateIpPoolRequest.md create mode 100644 rest/api/v3/ip_address_management/docs/DeleteIpPool.md create mode 100644 rest/api/v3/ip_address_management/docs/DeleteIpsFromIpPool.md create mode 100644 rest/api/v3/ip_address_management/docs/DeleteIpsFromIpPoolRequest.md create mode 100644 rest/api/v3/ip_address_management/docs/DeleteSubUsersFromIp.md create mode 100644 rest/api/v3/ip_address_management/docs/DeleteSubUsersFromIpRequest.md create mode 100644 rest/api/v3/ip_address_management/docs/GetIp.md create mode 100644 rest/api/v3/ip_address_management/docs/GetIp200Response.md create mode 100644 rest/api/v3/ip_address_management/docs/GetIp200ResponsePoolsInner.md create mode 100644 rest/api/v3/ip_address_management/docs/GetIpPool.md create mode 100644 rest/api/v3/ip_address_management/docs/GetIpPool200Response.md create mode 100644 rest/api/v3/ip_address_management/docs/GetIpPool200ResponseIpCountByRegionInner.md create mode 100644 rest/api/v3/ip_address_management/docs/IpAddressManagementErrorResponse.md create mode 100644 rest/api/v3/ip_address_management/docs/IpAddressManagementErrorResponseErrorsInner.md create mode 100644 rest/api/v3/ip_address_management/docs/Items.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIp.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIp200Response.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIp200ResponseMetadata.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIp200ResponseMetadataNextParams.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIp200ResponseResultInner.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIp200ResponseResultInnerPoolsInner.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200Response.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseMetadata.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseMetadataNextParams.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseResultInner.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIpPool.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIpPool200Response.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIpPool200ResponseMetadata.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIpPool200ResponseMetadataNextParams.md create mode 100644 rest/api/v3/ip_address_management/docs/ListIpPool200ResponseResultInner.md create mode 100644 rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp.md create mode 100644 rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200Response.md create mode 100644 rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200ResponseMetadata.md create mode 100644 rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200ResponseMetadataNextParams.md create mode 100644 rest/api/v3/ip_address_management/docs/Region.md create mode 100644 rest/api/v3/ip_address_management/docs/Region1.md create mode 100644 rest/api/v3/ip_address_management/docs/Region2.md create mode 100644 rest/api/v3/ip_address_management/docs/Region3.md create mode 100644 rest/api/v3/ip_address_management/docs/Region4.md create mode 100644 rest/api/v3/ip_address_management/docs/Region5.md create mode 100644 rest/api/v3/ip_address_management/docs/Region6.md create mode 100644 rest/api/v3/ip_address_management/docs/Region7.md create mode 100644 rest/api/v3/ip_address_management/docs/UpdateIp.md create mode 100644 rest/api/v3/ip_address_management/docs/UpdateIp200Response.md create mode 100644 rest/api/v3/ip_address_management/docs/UpdateIpPool.md create mode 100644 rest/api/v3/ip_address_management/docs/UpdateIpPool200Response.md create mode 100644 rest/api/v3/ip_address_management/docs/UpdateIpPoolRequest.md create mode 100644 rest/api/v3/ip_address_management/docs/UpdateIpRequest.md create mode 100644 rest/api/v3/ip_address_management/model_add_ip_201_response.go create mode 100644 rest/api/v3/ip_address_management/model_add_ip_request.go create mode 100644 rest/api/v3/ip_address_management/model_add_ips_to_ip_pool_200_response.go create mode 100644 rest/api/v3/ip_address_management/model_add_ips_to_ip_pool_request.go create mode 100644 rest/api/v3/ip_address_management/model_add_sub_users_to_ip_200_response.go create mode 100644 rest/api/v3/ip_address_management/model_add_sub_users_to_ip_request.go create mode 100644 rest/api/v3/ip_address_management/model_create_ip_pool_201_response.go create mode 100644 rest/api/v3/ip_address_management/model_create_ip_pool_request.go create mode 100644 rest/api/v3/ip_address_management/model_delete_ips_from_ip_pool_request.go create mode 100644 rest/api/v3/ip_address_management/model_delete_sub_users_from_ip_request.go create mode 100644 rest/api/v3/ip_address_management/model_get_ip_200_response.go create mode 100644 rest/api/v3/ip_address_management/model_get_ip_200_response_pools_inner.go create mode 100644 rest/api/v3/ip_address_management/model_get_ip_pool_200_response.go create mode 100644 rest/api/v3/ip_address_management/model_get_ip_pool_200_response_ip_count_by_region_inner.go create mode 100644 rest/api/v3/ip_address_management/model_ip_address_management_error_response.go create mode 100644 rest/api/v3/ip_address_management/model_ip_address_management_error_response_errors_inner.go create mode 100644 rest/api/v3/ip_address_management/model_items.go create mode 100644 rest/api/v3/ip_address_management/model_list_ip_200_response.go create mode 100644 rest/api/v3/ip_address_management/model_list_ip_200_response__metadata.go create mode 100644 rest/api/v3/ip_address_management/model_list_ip_200_response__metadata_next_params.go create mode 100644 rest/api/v3/ip_address_management/model_list_ip_200_response_result_inner.go create mode 100644 rest/api/v3/ip_address_management/model_list_ip_200_response_result_inner_pools_inner.go create mode 100644 rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response.go create mode 100644 rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response__metadata.go create mode 100644 rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response__metadata_next_params.go create mode 100644 rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response_result_inner.go create mode 100644 rest/api/v3/ip_address_management/model_list_ip_pool_200_response.go create mode 100644 rest/api/v3/ip_address_management/model_list_ip_pool_200_response__metadata.go create mode 100644 rest/api/v3/ip_address_management/model_list_ip_pool_200_response__metadata_next_params.go create mode 100644 rest/api/v3/ip_address_management/model_list_ip_pool_200_response_result_inner.go create mode 100644 rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response.go create mode 100644 rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response__metadata.go create mode 100644 rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response__metadata_next_params.go create mode 100644 rest/api/v3/ip_address_management/model_region.go create mode 100644 rest/api/v3/ip_address_management/model_region1.go create mode 100644 rest/api/v3/ip_address_management/model_region2.go create mode 100644 rest/api/v3/ip_address_management/model_region3.go create mode 100644 rest/api/v3/ip_address_management/model_region4.go create mode 100644 rest/api/v3/ip_address_management/model_region5.go create mode 100644 rest/api/v3/ip_address_management/model_region6.go create mode 100644 rest/api/v3/ip_address_management/model_region7.go create mode 100644 rest/api/v3/ip_address_management/model_update_ip_200_response.go create mode 100644 rest/api/v3/ip_address_management/model_update_ip_pool_200_response.go create mode 100644 rest/api/v3/ip_address_management/model_update_ip_pool_request.go create mode 100644 rest/api/v3/ip_address_management/model_update_ip_request.go create mode 100644 rest/api/v3/ip_warmup/README.md create mode 100644 rest/api/v3/ip_warmup/api_get_warm_up_ip.go create mode 100644 rest/api/v3/ip_warmup/api_list_warm_up_ip.go create mode 100644 rest/api/v3/ip_warmup/api_service.go create mode 100644 rest/api/v3/ip_warmup/api_stop_ip_warm_up.go create mode 100644 rest/api/v3/ip_warmup/api_warm_up_ip.go create mode 100644 rest/api/v3/ip_warmup/docs/GetWarmUpIp.md create mode 100644 rest/api/v3/ip_warmup/docs/GetWarmUpIp404Response.md create mode 100644 rest/api/v3/ip_warmup/docs/GetWarmUpIp404ResponseErrorsInner.md create mode 100644 rest/api/v3/ip_warmup/docs/IpWarmup200Inner.md create mode 100644 rest/api/v3/ip_warmup/docs/ListWarmUpIp.md create mode 100644 rest/api/v3/ip_warmup/docs/StopIpWarmUp.md create mode 100644 rest/api/v3/ip_warmup/docs/StopIpWarmUp404Response.md create mode 100644 rest/api/v3/ip_warmup/docs/StopIpWarmUp404ResponseErrorsInner.md create mode 100644 rest/api/v3/ip_warmup/docs/WarmUpIp.md create mode 100644 rest/api/v3/ip_warmup/docs/WarmUpIp404Response.md create mode 100644 rest/api/v3/ip_warmup/docs/WarmUpIp404ResponseErrorsInner.md create mode 100644 rest/api/v3/ip_warmup/docs/WarmUpIpRequest.md create mode 100644 rest/api/v3/ip_warmup/model_get_warm_up_ip_404_response.go create mode 100644 rest/api/v3/ip_warmup/model_get_warm_up_ip_404_response_errors_inner.go create mode 100644 rest/api/v3/ip_warmup/model_ip_warmup200_inner.go create mode 100644 rest/api/v3/ip_warmup/model_stop_ip_warm_up_404_response.go create mode 100644 rest/api/v3/ip_warmup/model_stop_ip_warm_up_404_response_errors_inner.go create mode 100644 rest/api/v3/ip_warmup/model_warm_up_ip_404_response.go create mode 100644 rest/api/v3/ip_warmup/model_warm_up_ip_404_response_errors_inner.go create mode 100644 rest/api/v3/ip_warmup/model_warm_up_ip_request.go create mode 100644 rest/api/v3/ips/README.md create mode 100644 rest/api/v3/ips/api_add_ip.go create mode 100644 rest/api/v3/ips/api_add_ip_to_ip_pool.go create mode 100644 rest/api/v3/ips/api_create_ip_pool.go create mode 100644 rest/api/v3/ips/api_delete_ip_from_ip_pool.go create mode 100644 rest/api/v3/ips/api_delete_ip_pool.go create mode 100644 rest/api/v3/ips/api_get_ip.go create mode 100644 rest/api/v3/ips/api_get_ip_pool.go create mode 100644 rest/api/v3/ips/api_list_assigned_ip.go create mode 100644 rest/api/v3/ips/api_list_ip.go create mode 100644 rest/api/v3/ips/api_list_ip_pool.go create mode 100644 rest/api/v3/ips/api_list_remaining_ip_count.go create mode 100644 rest/api/v3/ips/api_service.go create mode 100644 rest/api/v3/ips/api_update_ip_pool.go create mode 100644 rest/api/v3/ips/docs/AddIp.md create mode 100644 rest/api/v3/ips/docs/AddIp201Response.md create mode 100644 rest/api/v3/ips/docs/AddIp201ResponseIpsInner.md create mode 100644 rest/api/v3/ips/docs/AddIpRequest.md create mode 100644 rest/api/v3/ips/docs/AddIpToIpPool.md create mode 100644 rest/api/v3/ips/docs/AddIpToIpPool201Response.md create mode 100644 rest/api/v3/ips/docs/AddIpToIpPool404Response.md create mode 100644 rest/api/v3/ips/docs/AddIpToIpPool404ResponseErrorsInner.md create mode 100644 rest/api/v3/ips/docs/AddIpToIpPoolRequest.md create mode 100644 rest/api/v3/ips/docs/CreateIpPool.md create mode 100644 rest/api/v3/ips/docs/CreateIpPoolRequest.md create mode 100644 rest/api/v3/ips/docs/DeleteIpFromIpPool.md create mode 100644 rest/api/v3/ips/docs/DeleteIpFromIpPool404Response.md create mode 100644 rest/api/v3/ips/docs/DeleteIpPool.md create mode 100644 rest/api/v3/ips/docs/DeleteIpPool404Response.md create mode 100644 rest/api/v3/ips/docs/ErrorResponse.md create mode 100644 rest/api/v3/ips/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/ips/docs/GetIp.md create mode 100644 rest/api/v3/ips/docs/GetIp200Response.md create mode 100644 rest/api/v3/ips/docs/GetIpPool.md create mode 100644 rest/api/v3/ips/docs/GetIpPool200Response.md create mode 100644 rest/api/v3/ips/docs/GetIpPool404Response.md create mode 100644 rest/api/v3/ips/docs/GetIpPool404ResponseErrorsInner.md create mode 100644 rest/api/v3/ips/docs/IpPools200.md create mode 100644 rest/api/v3/ips/docs/ListAssignedIp.md create mode 100644 rest/api/v3/ips/docs/ListAssignedIp200ResponseInner.md create mode 100644 rest/api/v3/ips/docs/ListIp.md create mode 100644 rest/api/v3/ips/docs/ListIp200ResponseInner.md create mode 100644 rest/api/v3/ips/docs/ListIpPool.md create mode 100644 rest/api/v3/ips/docs/ListRemainingIpCount.md create mode 100644 rest/api/v3/ips/docs/ListRemainingIpCount200Response.md create mode 100644 rest/api/v3/ips/docs/ListRemainingIpCount200ResponseResultsInner.md create mode 100644 rest/api/v3/ips/docs/SortByDirection.md create mode 100644 rest/api/v3/ips/docs/UpdateIpPool.md create mode 100644 rest/api/v3/ips/docs/UpdateIpPool404Response.md create mode 100644 rest/api/v3/ips/docs/UpdateIpPool404ResponseErrorsInner.md create mode 100644 rest/api/v3/ips/docs/UpdateIpPoolRequest.md create mode 100644 rest/api/v3/ips/model_add_ip_201_response.go create mode 100644 rest/api/v3/ips/model_add_ip_201_response_ips_inner.go create mode 100644 rest/api/v3/ips/model_add_ip_request.go create mode 100644 rest/api/v3/ips/model_add_ip_to_ip_pool_201_response.go create mode 100644 rest/api/v3/ips/model_add_ip_to_ip_pool_404_response.go create mode 100644 rest/api/v3/ips/model_add_ip_to_ip_pool_404_response_errors_inner.go create mode 100644 rest/api/v3/ips/model_add_ip_to_ip_pool_request.go create mode 100644 rest/api/v3/ips/model_create_ip_pool_request.go create mode 100644 rest/api/v3/ips/model_delete_ip_from_ip_pool_404_response.go create mode 100644 rest/api/v3/ips/model_delete_ip_pool_404_response.go create mode 100644 rest/api/v3/ips/model_error_response.go create mode 100644 rest/api/v3/ips/model_error_response_errors_inner.go create mode 100644 rest/api/v3/ips/model_get_ip_200_response.go create mode 100644 rest/api/v3/ips/model_get_ip_pool_200_response.go create mode 100644 rest/api/v3/ips/model_get_ip_pool_404_response.go create mode 100644 rest/api/v3/ips/model_get_ip_pool_404_response_errors_inner.go create mode 100644 rest/api/v3/ips/model_ip_pools200.go create mode 100644 rest/api/v3/ips/model_list_assigned_ip_200_response_inner.go create mode 100644 rest/api/v3/ips/model_list_ip_200_response_inner.go create mode 100644 rest/api/v3/ips/model_list_remaining_ip_count_200_response.go create mode 100644 rest/api/v3/ips/model_list_remaining_ip_count_200_response_results_inner.go create mode 100644 rest/api/v3/ips/model_sort_by_direction.go create mode 100644 rest/api/v3/ips/model_update_ip_pool_404_response.go create mode 100644 rest/api/v3/ips/model_update_ip_pool_404_response_errors_inner.go create mode 100644 rest/api/v3/ips/model_update_ip_pool_request.go create mode 100644 rest/api/v3/link_branding/README.md create mode 100644 rest/api/v3/link_branding/api_associate_branded_link_with_subuser.go create mode 100644 rest/api/v3/link_branding/api_create_branded_link.go create mode 100644 rest/api/v3/link_branding/api_delete_branded_link.go create mode 100644 rest/api/v3/link_branding/api_disassociate_branded_link_from_subuser.go create mode 100644 rest/api/v3/link_branding/api_get_branded_link.go create mode 100644 rest/api/v3/link_branding/api_list_branded_link.go create mode 100644 rest/api/v3/link_branding/api_list_default_branded_link.go create mode 100644 rest/api/v3/link_branding/api_list_subuser_branded_link.go create mode 100644 rest/api/v3/link_branding/api_service.go create mode 100644 rest/api/v3/link_branding/api_update_branded_link.go create mode 100644 rest/api/v3/link_branding/api_validate_branded_link.go create mode 100644 rest/api/v3/link_branding/docs/AssociateBrandedLinkWithSubuser.md create mode 100644 rest/api/v3/link_branding/docs/AssociateBrandedLinkWithSubuserRequest.md create mode 100644 rest/api/v3/link_branding/docs/CreateBrandedLink.md create mode 100644 rest/api/v3/link_branding/docs/CreateBrandedLinkRequest.md create mode 100644 rest/api/v3/link_branding/docs/Default.md create mode 100644 rest/api/v3/link_branding/docs/Default1.md create mode 100644 rest/api/v3/link_branding/docs/Default2.md create mode 100644 rest/api/v3/link_branding/docs/DeleteBrandedLink.md create mode 100644 rest/api/v3/link_branding/docs/DisassociateBrandedLinkFromSubuser.md create mode 100644 rest/api/v3/link_branding/docs/GetBrandedLink.md create mode 100644 rest/api/v3/link_branding/docs/Legacy.md create mode 100644 rest/api/v3/link_branding/docs/LinkBranding200.md create mode 100644 rest/api/v3/link_branding/docs/LinkBranding200Dns.md create mode 100644 rest/api/v3/link_branding/docs/LinkBranding200DnsDomainCname.md create mode 100644 rest/api/v3/link_branding/docs/LinkBranding200DnsOwnerCname.md create mode 100644 rest/api/v3/link_branding/docs/ListBrandedLink.md create mode 100644 rest/api/v3/link_branding/docs/ListDefaultBrandedLink.md create mode 100644 rest/api/v3/link_branding/docs/ListSubuserBrandedLink.md create mode 100644 rest/api/v3/link_branding/docs/Region.md create mode 100644 rest/api/v3/link_branding/docs/Type.md create mode 100644 rest/api/v3/link_branding/docs/Type1.md create mode 100644 rest/api/v3/link_branding/docs/UpdateBrandedLink.md create mode 100644 rest/api/v3/link_branding/docs/UpdateBrandedLinkRequest.md create mode 100644 rest/api/v3/link_branding/docs/Valid.md create mode 100644 rest/api/v3/link_branding/docs/Valid1.md create mode 100644 rest/api/v3/link_branding/docs/Valid2.md create mode 100644 rest/api/v3/link_branding/docs/Valid3.md create mode 100644 rest/api/v3/link_branding/docs/Valid4.md create mode 100644 rest/api/v3/link_branding/docs/Valid5.md create mode 100644 rest/api/v3/link_branding/docs/ValidateBrandedLink.md create mode 100644 rest/api/v3/link_branding/docs/ValidateBrandedLink200Response.md create mode 100644 rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResults.md create mode 100644 rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResultsDomainCname.md create mode 100644 rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResultsOwnerCname.md create mode 100644 rest/api/v3/link_branding/docs/ValidateBrandedLink500Response.md create mode 100644 rest/api/v3/link_branding/docs/ValidateBrandedLink500ResponseErrorsInner.md create mode 100644 rest/api/v3/link_branding/model_associate_branded_link_with_subuser_request.go create mode 100644 rest/api/v3/link_branding/model_create_branded_link_request.go create mode 100644 rest/api/v3/link_branding/model_default.go create mode 100644 rest/api/v3/link_branding/model_default1.go create mode 100644 rest/api/v3/link_branding/model_default2.go create mode 100644 rest/api/v3/link_branding/model_legacy.go create mode 100644 rest/api/v3/link_branding/model_link_branding200.go create mode 100644 rest/api/v3/link_branding/model_link_branding200_dns.go create mode 100644 rest/api/v3/link_branding/model_link_branding200_dns_domain_cname.go create mode 100644 rest/api/v3/link_branding/model_link_branding200_dns_owner_cname.go create mode 100644 rest/api/v3/link_branding/model_region.go create mode 100644 rest/api/v3/link_branding/model_type.go create mode 100644 rest/api/v3/link_branding/model_type1.go create mode 100644 rest/api/v3/link_branding/model_update_branded_link_request.go create mode 100644 rest/api/v3/link_branding/model_valid.go create mode 100644 rest/api/v3/link_branding/model_valid1.go create mode 100644 rest/api/v3/link_branding/model_valid2.go create mode 100644 rest/api/v3/link_branding/model_valid3.go create mode 100644 rest/api/v3/link_branding/model_valid4.go create mode 100644 rest/api/v3/link_branding/model_valid5.go create mode 100644 rest/api/v3/link_branding/model_validate_branded_link_200_response.go create mode 100644 rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results.go create mode 100644 rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results_domain_cname.go create mode 100644 rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results_owner_cname.go create mode 100644 rest/api/v3/link_branding/model_validate_branded_link_500_response.go create mode 100644 rest/api/v3/link_branding/model_validate_branded_link_500_response_errors_inner.go create mode 100644 rest/api/v3/lmc_campaigns/README.md create mode 100644 rest/api/v3/lmc_campaigns/api_create_campaign.go create mode 100644 rest/api/v3/lmc_campaigns/api_delete_campaign.go create mode 100644 rest/api/v3/lmc_campaigns/api_get_campaign.go create mode 100644 rest/api/v3/lmc_campaigns/api_get_scheduled_campaign.go create mode 100644 rest/api/v3/lmc_campaigns/api_list_campaign.go create mode 100644 rest/api/v3/lmc_campaigns/api_schedule_campaign.go create mode 100644 rest/api/v3/lmc_campaigns/api_send_campaign.go create mode 100644 rest/api/v3/lmc_campaigns/api_send_test_campaign.go create mode 100644 rest/api/v3/lmc_campaigns/api_service.go create mode 100644 rest/api/v3/lmc_campaigns/api_un_schedule_campaign.go create mode 100644 rest/api/v3/lmc_campaigns/api_update_campaign.go create mode 100644 rest/api/v3/lmc_campaigns/api_update_scheduled_campaign.go create mode 100644 rest/api/v3/lmc_campaigns/docs/Campaigns2xx.md create mode 100644 rest/api/v3/lmc_campaigns/docs/CreateCampaign.md create mode 100644 rest/api/v3/lmc_campaigns/docs/DeleteCampaign.md create mode 100644 rest/api/v3/lmc_campaigns/docs/Editor.md create mode 100644 rest/api/v3/lmc_campaigns/docs/ErrorResponse.md create mode 100644 rest/api/v3/lmc_campaigns/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/lmc_campaigns/docs/GetCampaign.md create mode 100644 rest/api/v3/lmc_campaigns/docs/GetCampaign200Response.md create mode 100644 rest/api/v3/lmc_campaigns/docs/GetScheduledCampaign.md create mode 100644 rest/api/v3/lmc_campaigns/docs/ListCampaign.md create mode 100644 rest/api/v3/lmc_campaigns/docs/ListCampaign200Response.md create mode 100644 rest/api/v3/lmc_campaigns/docs/PostCampaignsRequest.md create mode 100644 rest/api/v3/lmc_campaigns/docs/ScheduleACampaignRequest.md create mode 100644 rest/api/v3/lmc_campaigns/docs/ScheduleACampaignResponse.md create mode 100644 rest/api/v3/lmc_campaigns/docs/ScheduleCampaign.md create mode 100644 rest/api/v3/lmc_campaigns/docs/SendACampaignResponse.md create mode 100644 rest/api/v3/lmc_campaigns/docs/SendATestCampaignRequest.md create mode 100644 rest/api/v3/lmc_campaigns/docs/SendCampaign.md create mode 100644 rest/api/v3/lmc_campaigns/docs/SendTestCampaign.md create mode 100644 rest/api/v3/lmc_campaigns/docs/SendTestCampaignRequest.md create mode 100644 rest/api/v3/lmc_campaigns/docs/Status.md create mode 100644 rest/api/v3/lmc_campaigns/docs/UnScheduleCampaign.md create mode 100644 rest/api/v3/lmc_campaigns/docs/UpdateACampaignRequest.md create mode 100644 rest/api/v3/lmc_campaigns/docs/UpdateAScheduledCampaignRequest.md create mode 100644 rest/api/v3/lmc_campaigns/docs/UpdateAScheduledCampaignResponse.md create mode 100644 rest/api/v3/lmc_campaigns/docs/UpdateCampaign.md create mode 100644 rest/api/v3/lmc_campaigns/docs/UpdateScheduledCampaign.md create mode 100644 rest/api/v3/lmc_campaigns/docs/ViewScheduledTimeOfACampaignResponse.md create mode 100644 rest/api/v3/lmc_campaigns/model_campaigns2xx.go create mode 100644 rest/api/v3/lmc_campaigns/model_editor.go create mode 100644 rest/api/v3/lmc_campaigns/model_error_response.go create mode 100644 rest/api/v3/lmc_campaigns/model_error_response_errors_inner.go create mode 100644 rest/api/v3/lmc_campaigns/model_get_campaign_200_response.go create mode 100644 rest/api/v3/lmc_campaigns/model_list_campaign_200_response.go create mode 100644 rest/api/v3/lmc_campaigns/model_post_campaigns_request.go create mode 100644 rest/api/v3/lmc_campaigns/model_schedule_a_campaign_request.go create mode 100644 rest/api/v3/lmc_campaigns/model_schedule_a_campaign_response.go create mode 100644 rest/api/v3/lmc_campaigns/model_send_a_campaign_response.go create mode 100644 rest/api/v3/lmc_campaigns/model_send_a_test_campaign_request.go create mode 100644 rest/api/v3/lmc_campaigns/model_send_test_campaign_request.go create mode 100644 rest/api/v3/lmc_campaigns/model_status.go create mode 100644 rest/api/v3/lmc_campaigns/model_update_a_campaign_request.go create mode 100644 rest/api/v3/lmc_campaigns/model_update_a_scheduled_campaign_request.go create mode 100644 rest/api/v3/lmc_campaigns/model_update_a_scheduled_campaign_response.go create mode 100644 rest/api/v3/lmc_campaigns/model_view_scheduled_time_of_a_campaign_response.go create mode 100644 rest/api/v3/lmc_contactdb/README.md create mode 100644 rest/api/v3/lmc_contactdb/api_add_recipient.go create mode 100644 rest/api/v3/lmc_contactdb/api_add_recipient_to_contact_db_list.go create mode 100644 rest/api/v3/lmc_contactdb/api_add_recipients_to_contact_db_list.go create mode 100644 rest/api/v3/lmc_contactdb/api_create_contact_db_list.go create mode 100644 rest/api/v3/lmc_contactdb/api_create_custom_field.go create mode 100644 rest/api/v3/lmc_contactdb/api_create_segment.go create mode 100644 rest/api/v3/lmc_contactdb/api_delete_contact_db_list.go create mode 100644 rest/api/v3/lmc_contactdb/api_delete_contact_db_lists.go create mode 100644 rest/api/v3/lmc_contactdb/api_delete_custom_field.go create mode 100644 rest/api/v3/lmc_contactdb/api_delete_recipient.go create mode 100644 rest/api/v3/lmc_contactdb/api_delete_recipient_from_contact_db_list.go create mode 100644 rest/api/v3/lmc_contactdb/api_delete_recipients.go create mode 100644 rest/api/v3/lmc_contactdb/api_delete_segment.go create mode 100644 rest/api/v3/lmc_contactdb/api_get_billable.go create mode 100644 rest/api/v3/lmc_contactdb/api_get_contact_db_list.go create mode 100644 rest/api/v3/lmc_contactdb/api_get_custom_field.go create mode 100644 rest/api/v3/lmc_contactdb/api_get_recipient.go create mode 100644 rest/api/v3/lmc_contactdb/api_get_recipient_list.go create mode 100644 rest/api/v3/lmc_contactdb/api_get_segment.go create mode 100644 rest/api/v3/lmc_contactdb/api_list_contact_db_list.go create mode 100644 rest/api/v3/lmc_contactdb/api_list_custom_field.go create mode 100644 rest/api/v3/lmc_contactdb/api_list_recipient.go create mode 100644 rest/api/v3/lmc_contactdb/api_list_recipient_count.go create mode 100644 rest/api/v3/lmc_contactdb/api_list_recipient_for_segment.go create mode 100644 rest/api/v3/lmc_contactdb/api_list_recipients_from_contact_db_list.go create mode 100644 rest/api/v3/lmc_contactdb/api_list_reserved_field.go create mode 100644 rest/api/v3/lmc_contactdb/api_list_search_recipient.go create mode 100644 rest/api/v3/lmc_contactdb/api_list_segment.go create mode 100644 rest/api/v3/lmc_contactdb/api_list_status.go create mode 100644 rest/api/v3/lmc_contactdb/api_search_recipient.go create mode 100644 rest/api/v3/lmc_contactdb/api_service.go create mode 100644 rest/api/v3/lmc_contactdb/api_update_contact_db_list.go create mode 100644 rest/api/v3/lmc_contactdb/api_update_recipient.go create mode 100644 rest/api/v3/lmc_contactdb/api_update_segment.go create mode 100644 rest/api/v3/lmc_contactdb/docs/AddRecipient.md create mode 100644 rest/api/v3/lmc_contactdb/docs/AddRecipientRequestInner.md create mode 100644 rest/api/v3/lmc_contactdb/docs/AddRecipientToContactDbList.md create mode 100644 rest/api/v3/lmc_contactdb/docs/AddRecipientsToContactDbList.md create mode 100644 rest/api/v3/lmc_contactdb/docs/AndOr.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbCustomField.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbCustomFieldId2xx.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbCustomFieldIdValue.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbList2xx.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbRecipient200.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbRecipient200RecipientsInner.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbRecipientCount200.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbRecipientResponse201.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbRecipientResponse201ErrorsInner.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbSegments.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbSegmentsConditions.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ContactdbSegmentsId200.md create mode 100644 rest/api/v3/lmc_contactdb/docs/CreateAListRequest.md create mode 100644 rest/api/v3/lmc_contactdb/docs/CreateContactDbList.md create mode 100644 rest/api/v3/lmc_contactdb/docs/CreateCustomField.md create mode 100644 rest/api/v3/lmc_contactdb/docs/CreateCustomFieldRequest.md create mode 100644 rest/api/v3/lmc_contactdb/docs/CreateSegment.md create mode 100644 rest/api/v3/lmc_contactdb/docs/DeleteContactDbList.md create mode 100644 rest/api/v3/lmc_contactdb/docs/DeleteContactDbLists.md create mode 100644 rest/api/v3/lmc_contactdb/docs/DeleteContacts.md create mode 100644 rest/api/v3/lmc_contactdb/docs/DeleteCustomField.md create mode 100644 rest/api/v3/lmc_contactdb/docs/DeleteRecipient.md create mode 100644 rest/api/v3/lmc_contactdb/docs/DeleteRecipientFromContactDbList.md create mode 100644 rest/api/v3/lmc_contactdb/docs/DeleteRecipients.md create mode 100644 rest/api/v3/lmc_contactdb/docs/DeleteSegment.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ErrorResponse.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/lmc_contactdb/docs/GetBillable.md create mode 100644 rest/api/v3/lmc_contactdb/docs/GetContactDbList.md create mode 100644 rest/api/v3/lmc_contactdb/docs/GetCustomField.md create mode 100644 rest/api/v3/lmc_contactdb/docs/GetRecipient.md create mode 100644 rest/api/v3/lmc_contactdb/docs/GetRecipientList.md create mode 100644 rest/api/v3/lmc_contactdb/docs/GetRecipientList200Response.md create mode 100644 rest/api/v3/lmc_contactdb/docs/GetSegment.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListAllCustomFieldsResponse.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListAllListsResponse.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListAllSegmentsResponse.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListContactDbList.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListCustomField.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListRecipient.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListRecipientCount.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListRecipientForSegment.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListRecipientsFromContactDbList.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListRecipientsFromContactDbList200Response.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListRecipientsOnASegmentResponse.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListRecipientsResponse.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListReservedField.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListReservedField200Response.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListReservedField200ResponseReservedFieldsInner.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListSearchRecipient.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListSegment.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListStatus.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListStatus200Response.md create mode 100644 rest/api/v3/lmc_contactdb/docs/ListStatus200ResponseStatusInner.md create mode 100644 rest/api/v3/lmc_contactdb/docs/Operator.md create mode 100644 rest/api/v3/lmc_contactdb/docs/SearchRecipient.md create mode 100644 rest/api/v3/lmc_contactdb/docs/SearchRecipient200Response.md create mode 100644 rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInner.md create mode 100644 rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInnerCustomFieldsInner.md create mode 100644 rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue.md create mode 100644 rest/api/v3/lmc_contactdb/docs/SearchRecipientRequest.md create mode 100644 rest/api/v3/lmc_contactdb/docs/Type.md create mode 100644 rest/api/v3/lmc_contactdb/docs/UpdateAListRequest.md create mode 100644 rest/api/v3/lmc_contactdb/docs/UpdateContactDbList.md create mode 100644 rest/api/v3/lmc_contactdb/docs/UpdateContactDbList200Response.md create mode 100644 rest/api/v3/lmc_contactdb/docs/UpdateRecipient.md create mode 100644 rest/api/v3/lmc_contactdb/docs/UpdateRecipientRequestInner.md create mode 100644 rest/api/v3/lmc_contactdb/docs/UpdateSegment.md create mode 100644 rest/api/v3/lmc_contactdb/docs/UpdateSegmentRequest.md create mode 100644 rest/api/v3/lmc_contactdb/model_add_recipient_request_inner.go create mode 100644 rest/api/v3/lmc_contactdb/model_and_or.go create mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_custom_field.go create mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_custom_field_id2xx.go create mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_custom_field_id_value.go create mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_list2xx.go create mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_recipient200.go create mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_recipient200_recipients_inner.go create mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_recipient_count200.go create mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_recipient_response201.go create mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_recipient_response201_errors_inner.go create mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_segments.go create mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_segments_conditions.go create mode 100644 rest/api/v3/lmc_contactdb/model_contactdb_segments_id200.go create mode 100644 rest/api/v3/lmc_contactdb/model_create_a_list_request.go create mode 100644 rest/api/v3/lmc_contactdb/model_create_custom_field_request.go create mode 100644 rest/api/v3/lmc_contactdb/model_delete_contacts.go create mode 100644 rest/api/v3/lmc_contactdb/model_error_response.go create mode 100644 rest/api/v3/lmc_contactdb/model_error_response_errors_inner.go create mode 100644 rest/api/v3/lmc_contactdb/model_get_recipient_list_200_response.go create mode 100644 rest/api/v3/lmc_contactdb/model_list_all_custom_fields_response.go create mode 100644 rest/api/v3/lmc_contactdb/model_list_all_lists_response.go create mode 100644 rest/api/v3/lmc_contactdb/model_list_all_segments_response.go create mode 100644 rest/api/v3/lmc_contactdb/model_list_recipients_from_contact_db_list_200_response.go create mode 100644 rest/api/v3/lmc_contactdb/model_list_recipients_on_a_segment_response.go create mode 100644 rest/api/v3/lmc_contactdb/model_list_recipients_response.go create mode 100644 rest/api/v3/lmc_contactdb/model_list_reserved_field_200_response.go create mode 100644 rest/api/v3/lmc_contactdb/model_list_reserved_field_200_response_reserved_fields_inner.go create mode 100644 rest/api/v3/lmc_contactdb/model_list_status_200_response.go create mode 100644 rest/api/v3/lmc_contactdb/model_list_status_200_response_status_inner.go create mode 100644 rest/api/v3/lmc_contactdb/model_operator.go create mode 100644 rest/api/v3/lmc_contactdb/model_search_recipient_200_response.go create mode 100644 rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner.go create mode 100644 rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner_custom_fields_inner.go create mode 100644 rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner_custom_fields_inner_value.go create mode 100644 rest/api/v3/lmc_contactdb/model_search_recipient_request.go create mode 100644 rest/api/v3/lmc_contactdb/model_type.go create mode 100644 rest/api/v3/lmc_contactdb/model_update_a_list_request.go create mode 100644 rest/api/v3/lmc_contactdb/model_update_contact_db_list_200_response.go create mode 100644 rest/api/v3/lmc_contactdb/model_update_recipient_request_inner.go create mode 100644 rest/api/v3/lmc_contactdb/model_update_segment_request.go create mode 100644 rest/api/v3/lmc_senders/README.md create mode 100644 rest/api/v3/lmc_senders/api_create_sender.go create mode 100644 rest/api/v3/lmc_senders/api_delete_sender.go create mode 100644 rest/api/v3/lmc_senders/api_get_sender.go create mode 100644 rest/api/v3/lmc_senders/api_list_sender.go create mode 100644 rest/api/v3/lmc_senders/api_reset_sender_verification.go create mode 100644 rest/api/v3/lmc_senders/api_service.go create mode 100644 rest/api/v3/lmc_senders/api_update_sender.go create mode 100644 rest/api/v3/lmc_senders/docs/CreateSender.md create mode 100644 rest/api/v3/lmc_senders/docs/CreateSender400Response.md create mode 100644 rest/api/v3/lmc_senders/docs/CreateSender400ResponseErrorsInner.md create mode 100644 rest/api/v3/lmc_senders/docs/CreateSenderRequest.md create mode 100644 rest/api/v3/lmc_senders/docs/DeleteSender.md create mode 100644 rest/api/v3/lmc_senders/docs/GetSender.md create mode 100644 rest/api/v3/lmc_senders/docs/ListSender.md create mode 100644 rest/api/v3/lmc_senders/docs/ListSender200Response.md create mode 100644 rest/api/v3/lmc_senders/docs/ResetSenderVerification.md create mode 100644 rest/api/v3/lmc_senders/docs/SenderId.md create mode 100644 rest/api/v3/lmc_senders/docs/SenderIdRequest.md create mode 100644 rest/api/v3/lmc_senders/docs/SenderIdRequestFrom.md create mode 100644 rest/api/v3/lmc_senders/docs/SenderIdRequestReplyTo.md create mode 100644 rest/api/v3/lmc_senders/docs/UpdateSender.md create mode 100644 rest/api/v3/lmc_senders/model_create_sender_400_response.go create mode 100644 rest/api/v3/lmc_senders/model_create_sender_400_response_errors_inner.go create mode 100644 rest/api/v3/lmc_senders/model_create_sender_request.go create mode 100644 rest/api/v3/lmc_senders/model_list_sender_200_response.go create mode 100644 rest/api/v3/lmc_senders/model_sender_id.go create mode 100644 rest/api/v3/lmc_senders/model_sender_id_request.go create mode 100644 rest/api/v3/lmc_senders/model_sender_id_request_from.go create mode 100644 rest/api/v3/lmc_senders/model_sender_id_request_reply_to.go create mode 100644 rest/api/v3/mail/README.md create mode 100644 rest/api/v3/mail/api_create_mail_batch.go create mode 100644 rest/api/v3/mail/api_get_mail_batch.go create mode 100644 rest/api/v3/mail/api_send_mail.go create mode 100644 rest/api/v3/mail/api_service.go create mode 100644 rest/api/v3/mail/docs/ContentEncoding.md create mode 100644 rest/api/v3/mail/docs/CreateMailBatch.md create mode 100644 rest/api/v3/mail/docs/Disposition.md create mode 100644 rest/api/v3/mail/docs/ErrorResponse.md create mode 100644 rest/api/v3/mail/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/mail/docs/GetMailBatch.md create mode 100644 rest/api/v3/mail/docs/MailBatchResponse.md create mode 100644 rest/api/v3/mail/docs/MailFrom.md create mode 100644 rest/api/v3/mail/docs/MailTo.md create mode 100644 rest/api/v3/mail/docs/SendMail.md create mode 100644 rest/api/v3/mail/docs/SendMailRequest.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestAsm.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestAttachmentsInner.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestContentInner.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestMailSettings.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassBounceManagement.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassListManagement.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassSpamManagement.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassUnsubscribeManagement.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestMailSettingsFooter.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestMailSettingsSandboxMode.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestPersonalizationsInner.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestTrackingSettings.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestTrackingSettingsClickTracking.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestTrackingSettingsGanalytics.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestTrackingSettingsOpenTracking.md create mode 100644 rest/api/v3/mail/docs/SendMailRequestTrackingSettingsSubscriptionTracking.md create mode 100644 rest/api/v3/mail/model_content_encoding.go create mode 100644 rest/api/v3/mail/model_disposition.go create mode 100644 rest/api/v3/mail/model_error_response.go create mode 100644 rest/api/v3/mail/model_error_response_errors_inner.go create mode 100644 rest/api/v3/mail/model_mail_batch_response.go create mode 100644 rest/api/v3/mail/model_mail_from.go create mode 100644 rest/api/v3/mail/model_mail_to.go create mode 100644 rest/api/v3/mail/model_send_mail_request.go create mode 100644 rest/api/v3/mail/model_send_mail_request_asm.go create mode 100644 rest/api/v3/mail/model_send_mail_request_attachments_inner.go create mode 100644 rest/api/v3/mail/model_send_mail_request_content_inner.go create mode 100644 rest/api/v3/mail/model_send_mail_request_mail_settings.go create mode 100644 rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_bounce_management.go create mode 100644 rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_list_management.go create mode 100644 rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_spam_management.go create mode 100644 rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_unsubscribe_management.go create mode 100644 rest/api/v3/mail/model_send_mail_request_mail_settings_footer.go create mode 100644 rest/api/v3/mail/model_send_mail_request_mail_settings_sandbox_mode.go create mode 100644 rest/api/v3/mail/model_send_mail_request_personalizations_inner.go create mode 100644 rest/api/v3/mail/model_send_mail_request_tracking_settings.go create mode 100644 rest/api/v3/mail/model_send_mail_request_tracking_settings_click_tracking.go create mode 100644 rest/api/v3/mail/model_send_mail_request_tracking_settings_ganalytics.go create mode 100644 rest/api/v3/mail/model_send_mail_request_tracking_settings_open_tracking.go create mode 100644 rest/api/v3/mail/model_send_mail_request_tracking_settings_subscription_tracking.go create mode 100644 rest/api/v3/mail_settings/README.md create mode 100644 rest/api/v3/mail_settings/api_list_address_whitelist.go create mode 100644 rest/api/v3/mail_settings/api_list_bounce_purge.go create mode 100644 rest/api/v3/mail_settings/api_list_footer.go create mode 100644 rest/api/v3/mail_settings/api_list_forward_bounce.go create mode 100644 rest/api/v3/mail_settings/api_list_forward_spam.go create mode 100644 rest/api/v3/mail_settings/api_list_mail_setting.go create mode 100644 rest/api/v3/mail_settings/api_list_template.go create mode 100644 rest/api/v3/mail_settings/api_service.go create mode 100644 rest/api/v3/mail_settings/api_update_address_whitelist.go create mode 100644 rest/api/v3/mail_settings/api_update_bounce_purge.go create mode 100644 rest/api/v3/mail_settings/api_update_footer.go create mode 100644 rest/api/v3/mail_settings/api_update_forward_bounce.go create mode 100644 rest/api/v3/mail_settings/api_update_forward_spam.go create mode 100644 rest/api/v3/mail_settings/api_update_template.go create mode 100644 rest/api/v3/mail_settings/docs/ListAddressWhitelist.md create mode 100644 rest/api/v3/mail_settings/docs/ListBouncePurge.md create mode 100644 rest/api/v3/mail_settings/docs/ListFooter.md create mode 100644 rest/api/v3/mail_settings/docs/ListForwardBounce.md create mode 100644 rest/api/v3/mail_settings/docs/ListForwardSpam.md create mode 100644 rest/api/v3/mail_settings/docs/ListMailSetting.md create mode 100644 rest/api/v3/mail_settings/docs/ListMailSetting200Response.md create mode 100644 rest/api/v3/mail_settings/docs/ListMailSetting200ResponseResultInner.md create mode 100644 rest/api/v3/mail_settings/docs/ListTemplate.md create mode 100644 rest/api/v3/mail_settings/docs/MailSettingsAddressWhitelabel200.md create mode 100644 rest/api/v3/mail_settings/docs/MailSettingsBouncePurge.md create mode 100644 rest/api/v3/mail_settings/docs/MailSettingsFooter.md create mode 100644 rest/api/v3/mail_settings/docs/MailSettingsForwardBounce.md create mode 100644 rest/api/v3/mail_settings/docs/MailSettingsForwardSpam.md create mode 100644 rest/api/v3/mail_settings/docs/MailSettingsTemplate200.md create mode 100644 rest/api/v3/mail_settings/docs/UpdateAddressWhitelist.md create mode 100644 rest/api/v3/mail_settings/docs/UpdateAddressWhitelistRequest.md create mode 100644 rest/api/v3/mail_settings/docs/UpdateBouncePurge.md create mode 100644 rest/api/v3/mail_settings/docs/UpdateFooter.md create mode 100644 rest/api/v3/mail_settings/docs/UpdateForwardBounce.md create mode 100644 rest/api/v3/mail_settings/docs/UpdateForwardSpam.md create mode 100644 rest/api/v3/mail_settings/docs/UpdateTemplate.md create mode 100644 rest/api/v3/mail_settings/docs/UpdateTemplate200Response.md create mode 100644 rest/api/v3/mail_settings/docs/UpdateTemplateRequest.md create mode 100644 rest/api/v3/mail_settings/model_list_mail_setting_200_response.go create mode 100644 rest/api/v3/mail_settings/model_list_mail_setting_200_response_result_inner.go create mode 100644 rest/api/v3/mail_settings/model_mail_settings_address_whitelabel200.go create mode 100644 rest/api/v3/mail_settings/model_mail_settings_bounce_purge.go create mode 100644 rest/api/v3/mail_settings/model_mail_settings_footer.go create mode 100644 rest/api/v3/mail_settings/model_mail_settings_forward_bounce.go create mode 100644 rest/api/v3/mail_settings/model_mail_settings_forward_spam.go create mode 100644 rest/api/v3/mail_settings/model_mail_settings_template200.go create mode 100644 rest/api/v3/mail_settings/model_update_address_whitelist_request.go create mode 100644 rest/api/v3/mail_settings/model_update_template_200_response.go create mode 100644 rest/api/v3/mail_settings/model_update_template_request.go create mode 100644 rest/api/v3/mc_custom_fields/README.md create mode 100644 rest/api/v3/mc_custom_fields/api_create_field_definition.go create mode 100644 rest/api/v3/mc_custom_fields/api_delete_field_definition.go create mode 100644 rest/api/v3/mc_custom_fields/api_list_field_definition.go create mode 100644 rest/api/v3/mc_custom_fields/api_service.go create mode 100644 rest/api/v3/mc_custom_fields/api_update_field_definition.go create mode 100644 rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition.md create mode 100644 rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition200Response.md create mode 100644 rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition400Response.md create mode 100644 rest/api/v3/mc_custom_fields/docs/CreateFieldDefinitionRequest.md create mode 100644 rest/api/v3/mc_custom_fields/docs/CustomFieldDefinitionsResponse.md create mode 100644 rest/api/v3/mc_custom_fields/docs/CustomFieldsError.md create mode 100644 rest/api/v3/mc_custom_fields/docs/DeleteFieldDefinition.md create mode 100644 rest/api/v3/mc_custom_fields/docs/FieldType.md create mode 100644 rest/api/v3/mc_custom_fields/docs/FieldType1.md create mode 100644 rest/api/v3/mc_custom_fields/docs/FieldType2.md create mode 100644 rest/api/v3/mc_custom_fields/docs/ListFieldDefinition.md create mode 100644 rest/api/v3/mc_custom_fields/docs/ListFieldDefinition200Response.md create mode 100644 rest/api/v3/mc_custom_fields/docs/Metadata.md create mode 100644 rest/api/v3/mc_custom_fields/docs/ReservedFieldDefinitionsResponseInner.md create mode 100644 rest/api/v3/mc_custom_fields/docs/UpdateFieldDefinition.md create mode 100644 rest/api/v3/mc_custom_fields/docs/UpdateFieldDefinitionRequest.md create mode 100644 rest/api/v3/mc_custom_fields/model_create_field_definition_200_response.go create mode 100644 rest/api/v3/mc_custom_fields/model_create_field_definition_400_response.go create mode 100644 rest/api/v3/mc_custom_fields/model_create_field_definition_request.go create mode 100644 rest/api/v3/mc_custom_fields/model_custom_field_definitions_response.go create mode 100644 rest/api/v3/mc_custom_fields/model_custom_fields_error.go create mode 100644 rest/api/v3/mc_custom_fields/model_field_type.go create mode 100644 rest/api/v3/mc_custom_fields/model_field_type1.go create mode 100644 rest/api/v3/mc_custom_fields/model_field_type2.go create mode 100644 rest/api/v3/mc_custom_fields/model_list_field_definition_200_response.go create mode 100644 rest/api/v3/mc_custom_fields/model_metadata.go create mode 100644 rest/api/v3/mc_custom_fields/model_reserved_field_definitions_response_inner.go create mode 100644 rest/api/v3/mc_custom_fields/model_update_field_definition_request.go create mode 100644 rest/api/v3/mc_designs/README.md create mode 100644 rest/api/v3/mc_designs/api_create_design.go create mode 100644 rest/api/v3/mc_designs/api_delete_design.go create mode 100644 rest/api/v3/mc_designs/api_duplicate_design.go create mode 100644 rest/api/v3/mc_designs/api_duplicate_pre_built_design.go create mode 100644 rest/api/v3/mc_designs/api_get_design.go create mode 100644 rest/api/v3/mc_designs/api_get_pre_built_design.go create mode 100644 rest/api/v3/mc_designs/api_list_design.go create mode 100644 rest/api/v3/mc_designs/api_list_pre_built_design.go create mode 100644 rest/api/v3/mc_designs/api_service.go create mode 100644 rest/api/v3/mc_designs/api_update_design.go create mode 100644 rest/api/v3/mc_designs/docs/ApiError.md create mode 100644 rest/api/v3/mc_designs/docs/ApiErrors.md create mode 100644 rest/api/v3/mc_designs/docs/CreateDesign.md create mode 100644 rest/api/v3/mc_designs/docs/DeleteDesign.md create mode 100644 rest/api/v3/mc_designs/docs/DesignCommonProperties.md create mode 100644 rest/api/v3/mc_designs/docs/DesignDuplicateInput.md create mode 100644 rest/api/v3/mc_designs/docs/DesignInput.md create mode 100644 rest/api/v3/mc_designs/docs/DesignOutput.md create mode 100644 rest/api/v3/mc_designs/docs/DesignOutputSummary.md create mode 100644 rest/api/v3/mc_designs/docs/DuplicateDesign.md create mode 100644 rest/api/v3/mc_designs/docs/DuplicatePreBuiltDesign.md create mode 100644 rest/api/v3/mc_designs/docs/Editor.md create mode 100644 rest/api/v3/mc_designs/docs/GetDesign.md create mode 100644 rest/api/v3/mc_designs/docs/GetPreBuiltDesign.md create mode 100644 rest/api/v3/mc_designs/docs/ListDesign.md create mode 100644 rest/api/v3/mc_designs/docs/ListDesign200Response.md create mode 100644 rest/api/v3/mc_designs/docs/ListPreBuiltDesign.md create mode 100644 rest/api/v3/mc_designs/docs/Metadata.md create mode 100644 rest/api/v3/mc_designs/docs/UpdateDesign.md create mode 100644 rest/api/v3/mc_designs/docs/UpdateDesignRequest.md create mode 100644 rest/api/v3/mc_designs/model_api_error.go create mode 100644 rest/api/v3/mc_designs/model_api_errors.go create mode 100644 rest/api/v3/mc_designs/model_design_common_properties.go create mode 100644 rest/api/v3/mc_designs/model_design_duplicate_input.go create mode 100644 rest/api/v3/mc_designs/model_design_input.go create mode 100644 rest/api/v3/mc_designs/model_design_output.go create mode 100644 rest/api/v3/mc_designs/model_design_output_summary.go create mode 100644 rest/api/v3/mc_designs/model_editor.go create mode 100644 rest/api/v3/mc_designs/model_list_design_200_response.go create mode 100644 rest/api/v3/mc_designs/model_metadata.go create mode 100644 rest/api/v3/mc_designs/model_update_design_request.go create mode 100644 rest/api/v3/mc_lists/README.md create mode 100644 rest/api/v3/mc_lists/api_create_marketing_list.go create mode 100644 rest/api/v3/mc_lists/api_delete_contact.go create mode 100644 rest/api/v3/mc_lists/api_delete_marketing_list.go create mode 100644 rest/api/v3/mc_lists/api_get_marketing_list.go create mode 100644 rest/api/v3/mc_lists/api_list_contact_count.go create mode 100644 rest/api/v3/mc_lists/api_list_marketing_list.go create mode 100644 rest/api/v3/mc_lists/api_service.go create mode 100644 rest/api/v3/mc_lists/api_update_marketing_list.go create mode 100644 rest/api/v3/mc_lists/docs/ContactDetails.md create mode 100644 rest/api/v3/mc_lists/docs/CreateMarketingList.md create mode 100644 rest/api/v3/mc_lists/docs/CreateMarketingList400Response.md create mode 100644 rest/api/v3/mc_lists/docs/CreateMarketingListRequest.md create mode 100644 rest/api/v3/mc_lists/docs/DeleteContact.md create mode 100644 rest/api/v3/mc_lists/docs/DeleteContact202Response.md create mode 100644 rest/api/v3/mc_lists/docs/DeleteMarketingList.md create mode 100644 rest/api/v3/mc_lists/docs/DeleteMarketingList200Response.md create mode 100644 rest/api/v3/mc_lists/docs/DeleteMarketingList404Response.md create mode 100644 rest/api/v3/mc_lists/docs/Error.md create mode 100644 rest/api/v3/mc_lists/docs/GetMarketingList.md create mode 100644 rest/api/v3/mc_lists/docs/GetMarketingList200Response.md create mode 100644 rest/api/v3/mc_lists/docs/List.md create mode 100644 rest/api/v3/mc_lists/docs/ListContactCount.md create mode 100644 rest/api/v3/mc_lists/docs/ListContactCount200Response.md create mode 100644 rest/api/v3/mc_lists/docs/ListMarketingList.md create mode 100644 rest/api/v3/mc_lists/docs/ListMarketingList200Response.md create mode 100644 rest/api/v3/mc_lists/docs/Metadata.md create mode 100644 rest/api/v3/mc_lists/docs/SelfMetadata.md create mode 100644 rest/api/v3/mc_lists/docs/UpdateMarketingList.md create mode 100644 rest/api/v3/mc_lists/docs/UpdateMarketingListRequest.md create mode 100644 rest/api/v3/mc_lists/model_contact_details.go create mode 100644 rest/api/v3/mc_lists/model_create_marketing_list_400_response.go create mode 100644 rest/api/v3/mc_lists/model_create_marketing_list_request.go create mode 100644 rest/api/v3/mc_lists/model_delete_contact_202_response.go create mode 100644 rest/api/v3/mc_lists/model_delete_marketing_list_200_response.go create mode 100644 rest/api/v3/mc_lists/model_delete_marketing_list_404_response.go create mode 100644 rest/api/v3/mc_lists/model_error.go create mode 100644 rest/api/v3/mc_lists/model_get_marketing_list_200_response.go create mode 100644 rest/api/v3/mc_lists/model_list.go create mode 100644 rest/api/v3/mc_lists/model_list_contact_count_200_response.go create mode 100644 rest/api/v3/mc_lists/model_list_marketing_list_200_response.go create mode 100644 rest/api/v3/mc_lists/model_metadata.go create mode 100644 rest/api/v3/mc_lists/model_self_metadata.go create mode 100644 rest/api/v3/mc_lists/model_update_marketing_list_request.go create mode 100644 rest/api/v3/mc_segments/README.md create mode 100644 rest/api/v3/mc_segments/api_delete_segment.go create mode 100644 rest/api/v3/mc_segments/api_get_segment.go create mode 100644 rest/api/v3/mc_segments/api_list_segment.go create mode 100644 rest/api/v3/mc_segments/api_service.go create mode 100644 rest/api/v3/mc_segments/docs/ContactResponse.md create mode 100644 rest/api/v3/mc_segments/docs/ContactResponseCustomFields.md create mode 100644 rest/api/v3/mc_segments/docs/DeleteSegment.md create mode 100644 rest/api/v3/mc_segments/docs/ErrorResponse.md create mode 100644 rest/api/v3/mc_segments/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/mc_segments/docs/FullSegment.md create mode 100644 rest/api/v3/mc_segments/docs/GetSegment.md create mode 100644 rest/api/v3/mc_segments/docs/GetSegment404Response.md create mode 100644 rest/api/v3/mc_segments/docs/GetSegment404ResponseErrorsInner.md create mode 100644 rest/api/v3/mc_segments/docs/ListSegment.md create mode 100644 rest/api/v3/mc_segments/docs/ListSegment200Response.md create mode 100644 rest/api/v3/mc_segments/docs/ListSegment500Response.md create mode 100644 rest/api/v3/mc_segments/docs/ListSegment500ResponseErrorsInner.md create mode 100644 rest/api/v3/mc_segments/docs/SegmentSummary.md create mode 100644 rest/api/v3/mc_segments/docs/SegmentWriteV2.md create mode 100644 rest/api/v3/mc_segments/model_contact_response.go create mode 100644 rest/api/v3/mc_segments/model_contact_response_custom_fields.go create mode 100644 rest/api/v3/mc_segments/model_error_response.go create mode 100644 rest/api/v3/mc_segments/model_error_response_errors_inner.go create mode 100644 rest/api/v3/mc_segments/model_full_segment.go create mode 100644 rest/api/v3/mc_segments/model_get_segment_404_response.go create mode 100644 rest/api/v3/mc_segments/model_get_segment_404_response_errors_inner.go create mode 100644 rest/api/v3/mc_segments/model_list_segment_200_response.go create mode 100644 rest/api/v3/mc_segments/model_list_segment_500_response.go create mode 100644 rest/api/v3/mc_segments/model_list_segment_500_response_errors_inner.go create mode 100644 rest/api/v3/mc_segments/model_segment_summary.go create mode 100644 rest/api/v3/mc_segments/model_segment_write_v2.go create mode 100644 rest/api/v3/mc_segments_2/README.md create mode 100644 rest/api/v3/mc_segments_2/api_create_segment.go create mode 100644 rest/api/v3/mc_segments_2/api_delete_segment.go create mode 100644 rest/api/v3/mc_segments_2/api_get_segment.go create mode 100644 rest/api/v3/mc_segments_2/api_list_segment.go create mode 100644 rest/api/v3/mc_segments_2/api_refresh_segment.go create mode 100644 rest/api/v3/mc_segments_2/api_service.go create mode 100644 rest/api/v3/mc_segments_2/api_update_segment.go create mode 100644 rest/api/v3/mc_segments_2/docs/AllSegments200.md create mode 100644 rest/api/v3/mc_segments_2/docs/ContactResponse.md create mode 100644 rest/api/v3/mc_segments_2/docs/ContactResponseCustomFields.md create mode 100644 rest/api/v3/mc_segments_2/docs/CreateSegment.md create mode 100644 rest/api/v3/mc_segments_2/docs/DeleteSegment.md create mode 100644 rest/api/v3/mc_segments_2/docs/ErrorsSegmentV2.md create mode 100644 rest/api/v3/mc_segments_2/docs/ErrorsSegmentV2ErrorsInner.md create mode 100644 rest/api/v3/mc_segments_2/docs/GetSegment.md create mode 100644 rest/api/v3/mc_segments_2/docs/ListSegment.md create mode 100644 rest/api/v3/mc_segments_2/docs/Metadata.md create mode 100644 rest/api/v3/mc_segments_2/docs/RefreshSegment.md create mode 100644 rest/api/v3/mc_segments_2/docs/Segment2xx.md create mode 100644 rest/api/v3/mc_segments_2/docs/SegmentError.md create mode 100644 rest/api/v3/mc_segments_2/docs/SegmentRefresh202.md create mode 100644 rest/api/v3/mc_segments_2/docs/SegmentRefreshRequest.md create mode 100644 rest/api/v3/mc_segments_2/docs/SegmentStatusResponse.md create mode 100644 rest/api/v3/mc_segments_2/docs/SegmentUpdate.md create mode 100644 rest/api/v3/mc_segments_2/docs/SegmentWriteV2.md create mode 100644 rest/api/v3/mc_segments_2/docs/UpdateSegment.md create mode 100644 rest/api/v3/mc_segments_2/model_all_segments200.go create mode 100644 rest/api/v3/mc_segments_2/model_contact_response.go create mode 100644 rest/api/v3/mc_segments_2/model_contact_response_custom_fields.go create mode 100644 rest/api/v3/mc_segments_2/model_errors_segment_v2.go create mode 100644 rest/api/v3/mc_segments_2/model_errors_segment_v2_errors_inner.go create mode 100644 rest/api/v3/mc_segments_2/model_metadata.go create mode 100644 rest/api/v3/mc_segments_2/model_segment2xx.go create mode 100644 rest/api/v3/mc_segments_2/model_segment_error.go create mode 100644 rest/api/v3/mc_segments_2/model_segment_refresh202.go create mode 100644 rest/api/v3/mc_segments_2/model_segment_refresh_request.go create mode 100644 rest/api/v3/mc_segments_2/model_segment_status_response.go create mode 100644 rest/api/v3/mc_segments_2/model_segment_update.go create mode 100644 rest/api/v3/mc_segments_2/model_segment_write_v2.go create mode 100644 rest/api/v3/mc_senders/README.md create mode 100644 rest/api/v3/mc_senders/api_create_sender.go create mode 100644 rest/api/v3/mc_senders/api_delete_sender.go create mode 100644 rest/api/v3/mc_senders/api_get_sender.go create mode 100644 rest/api/v3/mc_senders/api_list_sender.go create mode 100644 rest/api/v3/mc_senders/api_reset_sender_verification.go create mode 100644 rest/api/v3/mc_senders/api_service.go create mode 100644 rest/api/v3/mc_senders/api_update_sender.go create mode 100644 rest/api/v3/mc_senders/docs/CreateSender.md create mode 100644 rest/api/v3/mc_senders/docs/CreateSenderRequest.md create mode 100644 rest/api/v3/mc_senders/docs/CreateSenderRequestFrom.md create mode 100644 rest/api/v3/mc_senders/docs/CreateSenderRequestReplyTo.md create mode 100644 rest/api/v3/mc_senders/docs/DeleteSender.md create mode 100644 rest/api/v3/mc_senders/docs/ErrorResponse.md create mode 100644 rest/api/v3/mc_senders/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/mc_senders/docs/GetSender.md create mode 100644 rest/api/v3/mc_senders/docs/ListSender.md create mode 100644 rest/api/v3/mc_senders/docs/ListSender200Response.md create mode 100644 rest/api/v3/mc_senders/docs/ResetSenderVerification.md create mode 100644 rest/api/v3/mc_senders/docs/Sender.md create mode 100644 rest/api/v3/mc_senders/docs/SenderRequest.md create mode 100644 rest/api/v3/mc_senders/docs/SenderRequestFrom.md create mode 100644 rest/api/v3/mc_senders/docs/SenderRequestReplyTo.md create mode 100644 rest/api/v3/mc_senders/docs/UpdateSender.md create mode 100644 rest/api/v3/mc_senders/model_create_sender_request.go create mode 100644 rest/api/v3/mc_senders/model_create_sender_request_from.go create mode 100644 rest/api/v3/mc_senders/model_create_sender_request_reply_to.go create mode 100644 rest/api/v3/mc_senders/model_error_response.go create mode 100644 rest/api/v3/mc_senders/model_error_response_errors_inner.go create mode 100644 rest/api/v3/mc_senders/model_list_sender_200_response.go create mode 100644 rest/api/v3/mc_senders/model_sender.go create mode 100644 rest/api/v3/mc_senders/model_sender_request.go create mode 100644 rest/api/v3/mc_senders/model_sender_request_from.go create mode 100644 rest/api/v3/mc_senders/model_sender_request_reply_to.go create mode 100644 rest/api/v3/mc_singlesends/README.md create mode 100644 rest/api/v3/mc_singlesends/api_create_single_send.go create mode 100644 rest/api/v3/mc_singlesends/api_delete_scheduled_single_send.go create mode 100644 rest/api/v3/mc_singlesends/api_delete_single_send.go create mode 100644 rest/api/v3/mc_singlesends/api_delete_single_sends.go create mode 100644 rest/api/v3/mc_singlesends/api_duplicate_single_send.go create mode 100644 rest/api/v3/mc_singlesends/api_get_single_send.go create mode 100644 rest/api/v3/mc_singlesends/api_list_category.go create mode 100644 rest/api/v3/mc_singlesends/api_list_single_send.go create mode 100644 rest/api/v3/mc_singlesends/api_schedule_single_send.go create mode 100644 rest/api/v3/mc_singlesends/api_search_single_send.go create mode 100644 rest/api/v3/mc_singlesends/api_service.go create mode 100644 rest/api/v3/mc_singlesends/api_update_single_send.go create mode 100644 rest/api/v3/mc_singlesends/docs/AbTestSummary.md create mode 100644 rest/api/v3/mc_singlesends/docs/CreateSingleSend.md create mode 100644 rest/api/v3/mc_singlesends/docs/DeleteScheduledSingleSend.md create mode 100644 rest/api/v3/mc_singlesends/docs/DeleteSingleSend.md create mode 100644 rest/api/v3/mc_singlesends/docs/DeleteSingleSends.md create mode 100644 rest/api/v3/mc_singlesends/docs/DuplicateSingleSend.md create mode 100644 rest/api/v3/mc_singlesends/docs/DuplicateSingleSendRequest.md create mode 100644 rest/api/v3/mc_singlesends/docs/Editor.md create mode 100644 rest/api/v3/mc_singlesends/docs/Editor1.md create mode 100644 rest/api/v3/mc_singlesends/docs/GetSingleSend.md create mode 100644 rest/api/v3/mc_singlesends/docs/Items.md create mode 100644 rest/api/v3/mc_singlesends/docs/ListCategory.md create mode 100644 rest/api/v3/mc_singlesends/docs/ListCategory200Response.md create mode 100644 rest/api/v3/mc_singlesends/docs/ListSingleSend.md create mode 100644 rest/api/v3/mc_singlesends/docs/ListSingleSend200Response.md create mode 100644 rest/api/v3/mc_singlesends/docs/ListSingleSend500Response.md create mode 100644 rest/api/v3/mc_singlesends/docs/ListSingleSend500ResponseErrorsInner.md create mode 100644 rest/api/v3/mc_singlesends/docs/Metadata.md create mode 100644 rest/api/v3/mc_singlesends/docs/ScheduleSingleSend.md create mode 100644 rest/api/v3/mc_singlesends/docs/ScheduleSingleSend201Response.md create mode 100644 rest/api/v3/mc_singlesends/docs/ScheduleSingleSendRequest.md create mode 100644 rest/api/v3/mc_singlesends/docs/SearchSingleSend.md create mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendRequest.md create mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendRequestEmailConfig.md create mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendRequestSendTo.md create mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendResponse.md create mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendResponseEmailConfig.md create mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendResponseSendTo.md create mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendResponseShort.md create mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendResponseWarningsInner.md create mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendSchedule.md create mode 100644 rest/api/v3/mc_singlesends/docs/SinglesendSearch.md create mode 100644 rest/api/v3/mc_singlesends/docs/Status.md create mode 100644 rest/api/v3/mc_singlesends/docs/Status1.md create mode 100644 rest/api/v3/mc_singlesends/docs/Status2.md create mode 100644 rest/api/v3/mc_singlesends/docs/Status3.md create mode 100644 rest/api/v3/mc_singlesends/docs/Type.md create mode 100644 rest/api/v3/mc_singlesends/docs/UpdateSingleSend.md create mode 100644 rest/api/v3/mc_singlesends/docs/WinnerCriteria.md create mode 100644 rest/api/v3/mc_singlesends/model_ab_test_summary.go create mode 100644 rest/api/v3/mc_singlesends/model_duplicate_single_send_request.go create mode 100644 rest/api/v3/mc_singlesends/model_editor.go create mode 100644 rest/api/v3/mc_singlesends/model_editor1.go create mode 100644 rest/api/v3/mc_singlesends/model_items.go create mode 100644 rest/api/v3/mc_singlesends/model_list_category_200_response.go create mode 100644 rest/api/v3/mc_singlesends/model_list_single_send_200_response.go create mode 100644 rest/api/v3/mc_singlesends/model_list_single_send_500_response.go create mode 100644 rest/api/v3/mc_singlesends/model_list_single_send_500_response_errors_inner.go create mode 100644 rest/api/v3/mc_singlesends/model_metadata.go create mode 100644 rest/api/v3/mc_singlesends/model_schedule_single_send_201_response.go create mode 100644 rest/api/v3/mc_singlesends/model_schedule_single_send_request.go create mode 100644 rest/api/v3/mc_singlesends/model_singlesend_request.go create mode 100644 rest/api/v3/mc_singlesends/model_singlesend_request_email_config.go create mode 100644 rest/api/v3/mc_singlesends/model_singlesend_request_send_to.go create mode 100644 rest/api/v3/mc_singlesends/model_singlesend_response.go create mode 100644 rest/api/v3/mc_singlesends/model_singlesend_response_email_config.go create mode 100644 rest/api/v3/mc_singlesends/model_singlesend_response_send_to.go create mode 100644 rest/api/v3/mc_singlesends/model_singlesend_response_short.go create mode 100644 rest/api/v3/mc_singlesends/model_singlesend_response_warnings_inner.go create mode 100644 rest/api/v3/mc_singlesends/model_singlesend_schedule.go create mode 100644 rest/api/v3/mc_singlesends/model_singlesend_search.go create mode 100644 rest/api/v3/mc_singlesends/model_status.go create mode 100644 rest/api/v3/mc_singlesends/model_status1.go create mode 100644 rest/api/v3/mc_singlesends/model_status2.go create mode 100644 rest/api/v3/mc_singlesends/model_status3.go create mode 100644 rest/api/v3/mc_singlesends/model_type.go create mode 100644 rest/api/v3/mc_singlesends/model_winner_criteria.go create mode 100644 rest/api/v3/mc_stats/README.md create mode 100644 rest/api/v3/mc_stats/api_export_automation_stat.go create mode 100644 rest/api/v3/mc_stats/api_export_single_send_stat.go create mode 100644 rest/api/v3/mc_stats/api_get_automation_stat.go create mode 100644 rest/api/v3/mc_stats/api_get_single_send_stat.go create mode 100644 rest/api/v3/mc_stats/api_list_automation_stat.go create mode 100644 rest/api/v3/mc_stats/api_list_click_tracking_stat.go create mode 100644 rest/api/v3/mc_stats/api_list_single_send_stat.go create mode 100644 rest/api/v3/mc_stats/api_list_single_send_tracking_stat.go create mode 100644 rest/api/v3/mc_stats/api_service.go create mode 100644 rest/api/v3/mc_stats/docs/AbPhase.md create mode 100644 rest/api/v3/mc_stats/docs/AbPhase1.md create mode 100644 rest/api/v3/mc_stats/docs/AbPhaseId.md create mode 100644 rest/api/v3/mc_stats/docs/AggregatedBy.md create mode 100644 rest/api/v3/mc_stats/docs/AutmoationsLinkStatsResponse.md create mode 100644 rest/api/v3/mc_stats/docs/AutmoationsLinkStatsResponseResultsInner.md create mode 100644 rest/api/v3/mc_stats/docs/AutomationsResponse.md create mode 100644 rest/api/v3/mc_stats/docs/AutomationsResponseResultsInner.md create mode 100644 rest/api/v3/mc_stats/docs/ErrorResponse.md create mode 100644 rest/api/v3/mc_stats/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/mc_stats/docs/ExportAutomationStat.md create mode 100644 rest/api/v3/mc_stats/docs/ExportSingleSendStat.md create mode 100644 rest/api/v3/mc_stats/docs/GetAutomationStat.md create mode 100644 rest/api/v3/mc_stats/docs/GetSingleSendStat.md create mode 100644 rest/api/v3/mc_stats/docs/Items.md create mode 100644 rest/api/v3/mc_stats/docs/Items1.md create mode 100644 rest/api/v3/mc_stats/docs/Items2.md create mode 100644 rest/api/v3/mc_stats/docs/LinkTrackingMetadata.md create mode 100644 rest/api/v3/mc_stats/docs/ListAutomationStat.md create mode 100644 rest/api/v3/mc_stats/docs/ListClickTrackingStat.md create mode 100644 rest/api/v3/mc_stats/docs/ListSingleSendStat.md create mode 100644 rest/api/v3/mc_stats/docs/ListSingleSendTrackingStat.md create mode 100644 rest/api/v3/mc_stats/docs/Metadata.md create mode 100644 rest/api/v3/mc_stats/docs/Metrics.md create mode 100644 rest/api/v3/mc_stats/docs/SinglesendsLinkStatsResponse.md create mode 100644 rest/api/v3/mc_stats/docs/SinglesendsLinkStatsResponseResultsInner.md create mode 100644 rest/api/v3/mc_stats/docs/SinglesendsResponse.md create mode 100644 rest/api/v3/mc_stats/docs/SinglesendsResponseResultsInner.md create mode 100644 rest/api/v3/mc_stats/model_ab_phase.go create mode 100644 rest/api/v3/mc_stats/model_ab_phase1.go create mode 100644 rest/api/v3/mc_stats/model_ab_phase_id.go create mode 100644 rest/api/v3/mc_stats/model_aggregated_by.go create mode 100644 rest/api/v3/mc_stats/model_autmoations_link_stats_response.go create mode 100644 rest/api/v3/mc_stats/model_autmoations_link_stats_response_results_inner.go create mode 100644 rest/api/v3/mc_stats/model_automations_response.go create mode 100644 rest/api/v3/mc_stats/model_automations_response_results_inner.go create mode 100644 rest/api/v3/mc_stats/model_error_response.go create mode 100644 rest/api/v3/mc_stats/model_error_response_errors_inner.go create mode 100644 rest/api/v3/mc_stats/model_items.go create mode 100644 rest/api/v3/mc_stats/model_items1.go create mode 100644 rest/api/v3/mc_stats/model_items2.go create mode 100644 rest/api/v3/mc_stats/model_link_tracking_metadata.go create mode 100644 rest/api/v3/mc_stats/model_metadata.go create mode 100644 rest/api/v3/mc_stats/model_metrics.go create mode 100644 rest/api/v3/mc_stats/model_singlesends_link_stats_response.go create mode 100644 rest/api/v3/mc_stats/model_singlesends_link_stats_response_results_inner.go create mode 100644 rest/api/v3/mc_stats/model_singlesends_response.go create mode 100644 rest/api/v3/mc_stats/model_singlesends_response_results_inner.go create mode 100644 rest/api/v3/mc_test/README.md create mode 100644 rest/api/v3/mc_test/api_send_test_marketing_email.go create mode 100644 rest/api/v3/mc_test/api_service.go create mode 100644 rest/api/v3/mc_test/docs/ErrorResponse.md create mode 100644 rest/api/v3/mc_test/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/mc_test/docs/SendTestMarketingEmail.md create mode 100644 rest/api/v3/mc_test/docs/SendTestMarketingEmailRequest.md create mode 100644 rest/api/v3/mc_test/model_error_response.go create mode 100644 rest/api/v3/mc_test/model_error_response_errors_inner.go create mode 100644 rest/api/v3/mc_test/model_send_test_marketing_email_request.go create mode 100644 rest/api/v3/partner/README.md create mode 100644 rest/api/v3/partner/api_list_partner_setting.go create mode 100644 rest/api/v3/partner/api_service.go create mode 100644 rest/api/v3/partner/docs/ListPartnerSetting.md create mode 100644 rest/api/v3/partner/docs/ListPartnerSetting200Response.md create mode 100644 rest/api/v3/partner/docs/ListPartnerSetting200ResponseResultInner.md create mode 100644 rest/api/v3/partner/model_list_partner_setting_200_response.go create mode 100644 rest/api/v3/partner/model_list_partner_setting_200_response_result_inner.go create mode 100644 rest/api/v3/recipients_data_erasure/README.md create mode 100644 rest/api/v3/recipients_data_erasure/api_erase_recipient_email_data.go create mode 100644 rest/api/v3/recipients_data_erasure/api_service.go create mode 100644 rest/api/v3/recipients_data_erasure/docs/EraseRecipientEmailData.md create mode 100644 rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureEraseRecipientsRequest.md create mode 100644 rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureErrorV1.md create mode 100644 rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureJobId.md create mode 100644 rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_erase_recipients_request.go create mode 100644 rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_error_v1.go create mode 100644 rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_job_id.go create mode 100644 rest/api/v3/reverse_dns/README.md create mode 100644 rest/api/v3/reverse_dns/api_delete_reverse_dns.go create mode 100644 rest/api/v3/reverse_dns/api_get_reverse_dns.go create mode 100644 rest/api/v3/reverse_dns/api_list_reverse_dns.go create mode 100644 rest/api/v3/reverse_dns/api_service.go create mode 100644 rest/api/v3/reverse_dns/api_set_up_reverse_dns.go create mode 100644 rest/api/v3/reverse_dns/api_validate_reverse_dns.go create mode 100644 rest/api/v3/reverse_dns/docs/DeleteReverseDns.md create mode 100644 rest/api/v3/reverse_dns/docs/GetReverseDns.md create mode 100644 rest/api/v3/reverse_dns/docs/ListReverseDns.md create mode 100644 rest/api/v3/reverse_dns/docs/ReverseDns.md create mode 100644 rest/api/v3/reverse_dns/docs/ReverseDnsARecord.md create mode 100644 rest/api/v3/reverse_dns/docs/ReverseDnsUsersInner.md create mode 100644 rest/api/v3/reverse_dns/docs/SetUpReverseDns.md create mode 100644 rest/api/v3/reverse_dns/docs/SetUpReverseDnsRequest.md create mode 100644 rest/api/v3/reverse_dns/docs/Valid.md create mode 100644 rest/api/v3/reverse_dns/docs/Valid1.md create mode 100644 rest/api/v3/reverse_dns/docs/ValidateReverseDns.md create mode 100644 rest/api/v3/reverse_dns/docs/ValidateReverseDns200Response.md create mode 100644 rest/api/v3/reverse_dns/docs/ValidateReverseDns200ResponseValidationResults.md create mode 100644 rest/api/v3/reverse_dns/docs/ValidateReverseDns200ResponseValidationResultsARecord.md create mode 100644 rest/api/v3/reverse_dns/docs/ValidateReverseDns404Response.md create mode 100644 rest/api/v3/reverse_dns/docs/ValidateReverseDns404ResponseErrorsInner.md create mode 100644 rest/api/v3/reverse_dns/docs/ValidateReverseDns500Response.md create mode 100644 rest/api/v3/reverse_dns/docs/ValidateReverseDns500ResponseErrorsInner.md create mode 100644 rest/api/v3/reverse_dns/model_reverse_dns.go create mode 100644 rest/api/v3/reverse_dns/model_reverse_dns_a_record.go create mode 100644 rest/api/v3/reverse_dns/model_reverse_dns_users_inner.go create mode 100644 rest/api/v3/reverse_dns/model_set_up_reverse_dns_request.go create mode 100644 rest/api/v3/reverse_dns/model_valid.go create mode 100644 rest/api/v3/reverse_dns/model_valid1.go create mode 100644 rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response.go create mode 100644 rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response_validation_results.go create mode 100644 rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response_validation_results_a_record.go create mode 100644 rest/api/v3/reverse_dns/model_validate_reverse_dns_404_response.go create mode 100644 rest/api/v3/reverse_dns/model_validate_reverse_dns_404_response_errors_inner.go create mode 100644 rest/api/v3/reverse_dns/model_validate_reverse_dns_500_response.go create mode 100644 rest/api/v3/reverse_dns/model_validate_reverse_dns_500_response_errors_inner.go create mode 100644 rest/api/v3/scheduled_sends/README.md create mode 100644 rest/api/v3/scheduled_sends/api_create_scheduled_send.go create mode 100644 rest/api/v3/scheduled_sends/api_delete_scheduled_send.go create mode 100644 rest/api/v3/scheduled_sends/api_get_scheduled_send.go create mode 100644 rest/api/v3/scheduled_sends/api_list_scheduled_send.go create mode 100644 rest/api/v3/scheduled_sends/api_service.go create mode 100644 rest/api/v3/scheduled_sends/api_update_scheduled_send.go create mode 100644 rest/api/v3/scheduled_sends/docs/CancelOrPauseAScheduledSendRequest.md create mode 100644 rest/api/v3/scheduled_sends/docs/CreateScheduledSend.md create mode 100644 rest/api/v3/scheduled_sends/docs/DeleteScheduledSend.md create mode 100644 rest/api/v3/scheduled_sends/docs/ErrorResponse.md create mode 100644 rest/api/v3/scheduled_sends/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/scheduled_sends/docs/GetScheduledSend.md create mode 100644 rest/api/v3/scheduled_sends/docs/ListScheduledSend.md create mode 100644 rest/api/v3/scheduled_sends/docs/MailBatchId.md create mode 100644 rest/api/v3/scheduled_sends/docs/ScheduledSendStatus.md create mode 100644 rest/api/v3/scheduled_sends/docs/Status.md create mode 100644 rest/api/v3/scheduled_sends/docs/Status1.md create mode 100644 rest/api/v3/scheduled_sends/docs/Status2.md create mode 100644 rest/api/v3/scheduled_sends/docs/UpdateScheduledSend.md create mode 100644 rest/api/v3/scheduled_sends/docs/UpdateScheduledSendRequest.md create mode 100644 rest/api/v3/scheduled_sends/model_cancel_or_pause_a_scheduled_send_request.go create mode 100644 rest/api/v3/scheduled_sends/model_error_response.go create mode 100644 rest/api/v3/scheduled_sends/model_error_response_errors_inner.go create mode 100644 rest/api/v3/scheduled_sends/model_mail_batch_id.go create mode 100644 rest/api/v3/scheduled_sends/model_scheduled_send_status.go create mode 100644 rest/api/v3/scheduled_sends/model_status.go create mode 100644 rest/api/v3/scheduled_sends/model_status1.go create mode 100644 rest/api/v3/scheduled_sends/model_status2.go create mode 100644 rest/api/v3/scheduled_sends/model_update_scheduled_send_request.go create mode 100644 rest/api/v3/scopes/README.md create mode 100644 rest/api/v3/scopes/api_approve_scope_request.go create mode 100644 rest/api/v3/scopes/api_deny_scope_request.go create mode 100644 rest/api/v3/scopes/api_list_scope.go create mode 100644 rest/api/v3/scopes/api_list_scope_request.go create mode 100644 rest/api/v3/scopes/api_service.go create mode 100644 rest/api/v3/scopes/docs/ApproveScopeRequest.md create mode 100644 rest/api/v3/scopes/docs/ApproveScopeRequest200Response.md create mode 100644 rest/api/v3/scopes/docs/DenyScopeRequest.md create mode 100644 rest/api/v3/scopes/docs/DenyScopeRequest404Response.md create mode 100644 rest/api/v3/scopes/docs/DenyScopeRequest404ResponseErrorsInner.md create mode 100644 rest/api/v3/scopes/docs/ErrorResponse.md create mode 100644 rest/api/v3/scopes/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/scopes/docs/ListScope.md create mode 100644 rest/api/v3/scopes/docs/ListScope200Response.md create mode 100644 rest/api/v3/scopes/docs/ListScope401Response.md create mode 100644 rest/api/v3/scopes/docs/ListScope401ResponseErrorsInner.md create mode 100644 rest/api/v3/scopes/docs/ListScopeRequest.md create mode 100644 rest/api/v3/scopes/docs/ListScopeRequest200ResponseInner.md create mode 100644 rest/api/v3/scopes/model_approve_scope_request_200_response.go create mode 100644 rest/api/v3/scopes/model_deny_scope_request_404_response.go create mode 100644 rest/api/v3/scopes/model_deny_scope_request_404_response_errors_inner.go create mode 100644 rest/api/v3/scopes/model_error_response.go create mode 100644 rest/api/v3/scopes/model_error_response_errors_inner.go create mode 100644 rest/api/v3/scopes/model_list_scope_200_response.go create mode 100644 rest/api/v3/scopes/model_list_scope_401_response.go create mode 100644 rest/api/v3/scopes/model_list_scope_401_response_errors_inner.go create mode 100644 rest/api/v3/scopes/model_list_scope_request_200_response_inner.go create mode 100644 rest/api/v3/seq/README.md create mode 100644 rest/api/v3/seq/api_list_engagement_quality_score.go create mode 100644 rest/api/v3/seq/api_list_subuser_engagement_quality_score.go create mode 100644 rest/api/v3/seq/api_service.go create mode 100644 rest/api/v3/seq/docs/ListEngagementQualityScore.md create mode 100644 rest/api/v3/seq/docs/ListSubuserEngagementQualityScore.md create mode 100644 rest/api/v3/seq/docs/SeqError.md create mode 100644 rest/api/v3/seq/docs/SeqMetadata.md create mode 100644 rest/api/v3/seq/docs/SeqMetadataNextParams.md create mode 100644 rest/api/v3/seq/docs/SeqMetrics.md create mode 100644 rest/api/v3/seq/docs/SeqScore.md create mode 100644 rest/api/v3/seq/model_seq_error.go create mode 100644 rest/api/v3/seq/model_seq_metadata.go create mode 100644 rest/api/v3/seq/model_seq_metadata_next_params.go create mode 100644 rest/api/v3/seq/model_seq_metrics.go create mode 100644 rest/api/v3/seq/model_seq_score.go create mode 100644 rest/api/v3/sso/README.md create mode 100644 rest/api/v3/sso/api_create_sso_certificate.go create mode 100644 rest/api/v3/sso/api_create_sso_integration.go create mode 100644 rest/api/v3/sso/api_create_sso_teammate.go create mode 100644 rest/api/v3/sso/api_delete_sso_certificate.go create mode 100644 rest/api/v3/sso/api_delete_sso_integration.go create mode 100644 rest/api/v3/sso/api_get_sso_certificate.go create mode 100644 rest/api/v3/sso/api_get_sso_integration.go create mode 100644 rest/api/v3/sso/api_list_sso_integration.go create mode 100644 rest/api/v3/sso/api_list_sso_integration_certificate.go create mode 100644 rest/api/v3/sso/api_service.go create mode 100644 rest/api/v3/sso/api_update_sso_certificate.go create mode 100644 rest/api/v3/sso/api_update_sso_integration.go create mode 100644 rest/api/v3/sso/api_update_sso_teammate.go create mode 100644 rest/api/v3/sso/docs/CreateSsoCertificate.md create mode 100644 rest/api/v3/sso/docs/CreateSsoCertificateRequest.md create mode 100644 rest/api/v3/sso/docs/CreateSsoIntegration.md create mode 100644 rest/api/v3/sso/docs/CreateSsoTeammate.md create mode 100644 rest/api/v3/sso/docs/DeleteSsoCertificate.md create mode 100644 rest/api/v3/sso/docs/DeleteSsoIntegration.md create mode 100644 rest/api/v3/sso/docs/GetSsoCertificate.md create mode 100644 rest/api/v3/sso/docs/GetSsoIntegration.md create mode 100644 rest/api/v3/sso/docs/ListSsoIntegration.md create mode 100644 rest/api/v3/sso/docs/ListSsoIntegrationCertificate.md create mode 100644 rest/api/v3/sso/docs/PatchSsoTeammates200.md create mode 100644 rest/api/v3/sso/docs/PermissionType.md create mode 100644 rest/api/v3/sso/docs/PermissionType1.md create mode 100644 rest/api/v3/sso/docs/Persona.md create mode 100644 rest/api/v3/sso/docs/PostPatchIntegrationRequest.md create mode 100644 rest/api/v3/sso/docs/PostSsoTeammates201.md create mode 100644 rest/api/v3/sso/docs/PostSsoTeammatesRequest.md create mode 100644 rest/api/v3/sso/docs/SsoCertificateBody.md create mode 100644 rest/api/v3/sso/docs/SsoErrorResponseInner.md create mode 100644 rest/api/v3/sso/docs/SsoIntegration.md create mode 100644 rest/api/v3/sso/docs/SsoTeammatesBaseRequestProps.md create mode 100644 rest/api/v3/sso/docs/SsoTeammatesBaseRequestPropsSubuserAccessInner.md create mode 100644 rest/api/v3/sso/docs/SsoTeammatesBaseResponseProps.md create mode 100644 rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponseProps.md create mode 100644 rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md create mode 100644 rest/api/v3/sso/docs/UpdateSsoCertificate.md create mode 100644 rest/api/v3/sso/docs/UpdateSsoCertificateRequest.md create mode 100644 rest/api/v3/sso/docs/UpdateSsoIntegration.md create mode 100644 rest/api/v3/sso/docs/UpdateSsoTeammate.md create mode 100644 rest/api/v3/sso/docs/UserType.md create mode 100644 rest/api/v3/sso/model_create_sso_certificate_request.go create mode 100644 rest/api/v3/sso/model_patch_sso_teammates200.go create mode 100644 rest/api/v3/sso/model_permission_type.go create mode 100644 rest/api/v3/sso/model_permission_type1.go create mode 100644 rest/api/v3/sso/model_persona.go create mode 100644 rest/api/v3/sso/model_post_patch_integration_request.go create mode 100644 rest/api/v3/sso/model_post_sso_teammates201.go create mode 100644 rest/api/v3/sso/model_post_sso_teammates_request.go create mode 100644 rest/api/v3/sso/model_sso_certificate_body.go create mode 100644 rest/api/v3/sso/model_sso_error_response_inner.go create mode 100644 rest/api/v3/sso/model_sso_integration.go create mode 100644 rest/api/v3/sso/model_sso_teammates_base_request_props.go create mode 100644 rest/api/v3/sso/model_sso_teammates_base_request_props_subuser_access_inner.go create mode 100644 rest/api/v3/sso/model_sso_teammates_base_response_props.go create mode 100644 rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props.go create mode 100644 rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props_subuser_access_inner.go create mode 100644 rest/api/v3/sso/model_update_sso_certificate_request.go create mode 100644 rest/api/v3/sso/model_user_type.go create mode 100644 rest/api/v3/stats/README.md create mode 100644 rest/api/v3/stats/api_get_client_stat.go create mode 100644 rest/api/v3/stats/api_list_browser_stat.go create mode 100644 rest/api/v3/stats/api_list_category.go create mode 100644 rest/api/v3/stats/api_list_category_stat.go create mode 100644 rest/api/v3/stats/api_list_category_stat_sum.go create mode 100644 rest/api/v3/stats/api_list_client_stat.go create mode 100644 rest/api/v3/stats/api_list_device_stat.go create mode 100644 rest/api/v3/stats/api_list_geo_stat.go create mode 100644 rest/api/v3/stats/api_list_mailbox_provider_stat.go create mode 100644 rest/api/v3/stats/api_list_stat.go create mode 100644 rest/api/v3/stats/api_service.go create mode 100644 rest/api/v3/stats/docs/AdvancedStatsClicks.md create mode 100644 rest/api/v3/stats/docs/AdvancedStatsClicksOpens.md create mode 100644 rest/api/v3/stats/docs/AdvancedStatsMailboxProvider.md create mode 100644 rest/api/v3/stats/docs/AdvancedStatsOpens.md create mode 100644 rest/api/v3/stats/docs/AggregatedBy.md create mode 100644 rest/api/v3/stats/docs/AggregatedBy1.md create mode 100644 rest/api/v3/stats/docs/AggregatedBy2.md create mode 100644 rest/api/v3/stats/docs/AggregatedBy3.md create mode 100644 rest/api/v3/stats/docs/CategoryStats.md create mode 100644 rest/api/v3/stats/docs/CategoryStatsStatsInner.md create mode 100644 rest/api/v3/stats/docs/CategoryStatsStatsInnerMetrics.md create mode 100644 rest/api/v3/stats/docs/ClientType.md create mode 100644 rest/api/v3/stats/docs/Country.md create mode 100644 rest/api/v3/stats/docs/GetClientStat.md create mode 100644 rest/api/v3/stats/docs/ListBrowserStat.md create mode 100644 rest/api/v3/stats/docs/ListBrowserStat200ResponseInner.md create mode 100644 rest/api/v3/stats/docs/ListBrowserStat200ResponseInnerStatsInner.md create mode 100644 rest/api/v3/stats/docs/ListCategory.md create mode 100644 rest/api/v3/stats/docs/ListCategory200ResponseInner.md create mode 100644 rest/api/v3/stats/docs/ListCategory400Response.md create mode 100644 rest/api/v3/stats/docs/ListCategory400ResponseErrorsInner.md create mode 100644 rest/api/v3/stats/docs/ListCategoryStat.md create mode 100644 rest/api/v3/stats/docs/ListCategoryStatSum.md create mode 100644 rest/api/v3/stats/docs/ListClientStat.md create mode 100644 rest/api/v3/stats/docs/ListClientStat200ResponseInner.md create mode 100644 rest/api/v3/stats/docs/ListClientStat200ResponseInnerStatsInner.md create mode 100644 rest/api/v3/stats/docs/ListDeviceStat.md create mode 100644 rest/api/v3/stats/docs/ListGeoStat.md create mode 100644 rest/api/v3/stats/docs/ListGeoStat200ResponseInner.md create mode 100644 rest/api/v3/stats/docs/ListGeoStat200ResponseInnerStatsInner.md create mode 100644 rest/api/v3/stats/docs/ListMailboxProviderStat.md create mode 100644 rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInner.md create mode 100644 rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInnerStatsInner.md create mode 100644 rest/api/v3/stats/docs/ListStat.md create mode 100644 rest/api/v3/stats/docs/ListStat200ResponseInner.md create mode 100644 rest/api/v3/stats/docs/ListStat200ResponseInnerStatsInner.md create mode 100644 rest/api/v3/stats/docs/SortByDirection.md create mode 100644 rest/api/v3/stats/docs/StatsAdvancedGlobalStats.md create mode 100644 rest/api/v3/stats/model_advanced_stats_clicks.go create mode 100644 rest/api/v3/stats/model_advanced_stats_clicks_opens.go create mode 100644 rest/api/v3/stats/model_advanced_stats_mailbox_provider.go create mode 100644 rest/api/v3/stats/model_advanced_stats_opens.go create mode 100644 rest/api/v3/stats/model_aggregated_by.go create mode 100644 rest/api/v3/stats/model_aggregated_by1.go create mode 100644 rest/api/v3/stats/model_aggregated_by2.go create mode 100644 rest/api/v3/stats/model_aggregated_by3.go create mode 100644 rest/api/v3/stats/model_category_stats.go create mode 100644 rest/api/v3/stats/model_category_stats_stats_inner.go create mode 100644 rest/api/v3/stats/model_category_stats_stats_inner_metrics.go create mode 100644 rest/api/v3/stats/model_client_type.go create mode 100644 rest/api/v3/stats/model_country.go create mode 100644 rest/api/v3/stats/model_list_browser_stat_200_response_inner.go create mode 100644 rest/api/v3/stats/model_list_browser_stat_200_response_inner_stats_inner.go create mode 100644 rest/api/v3/stats/model_list_category_200_response_inner.go create mode 100644 rest/api/v3/stats/model_list_category_400_response.go create mode 100644 rest/api/v3/stats/model_list_category_400_response_errors_inner.go create mode 100644 rest/api/v3/stats/model_list_client_stat_200_response_inner.go create mode 100644 rest/api/v3/stats/model_list_client_stat_200_response_inner_stats_inner.go create mode 100644 rest/api/v3/stats/model_list_geo_stat_200_response_inner.go create mode 100644 rest/api/v3/stats/model_list_geo_stat_200_response_inner_stats_inner.go create mode 100644 rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner.go create mode 100644 rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner_stats_inner.go create mode 100644 rest/api/v3/stats/model_list_stat_200_response_inner.go create mode 100644 rest/api/v3/stats/model_list_stat_200_response_inner_stats_inner.go create mode 100644 rest/api/v3/stats/model_sort_by_direction.go create mode 100644 rest/api/v3/stats/model_stats_advanced_global_stats.go create mode 100644 rest/api/v3/subusers/README.md create mode 100644 rest/api/v3/subusers/api_create_subuser.go create mode 100644 rest/api/v3/subusers/api_delete_subuser.go create mode 100644 rest/api/v3/subusers/api_get_subuser_credit.go create mode 100644 rest/api/v3/subusers/api_list_monthly_stat.go create mode 100644 rest/api/v3/subusers/api_list_reputation.go create mode 100644 rest/api/v3/subusers/api_list_stat.go create mode 100644 rest/api/v3/subusers/api_list_stat_sum.go create mode 100644 rest/api/v3/subusers/api_list_subuser.go create mode 100644 rest/api/v3/subusers/api_list_subuser_monthly_stat.go create mode 100644 rest/api/v3/subusers/api_service.go create mode 100644 rest/api/v3/subusers/api_update_subuser.go create mode 100644 rest/api/v3/subusers/api_update_subuser_credit.go create mode 100644 rest/api/v3/subusers/api_update_subuser_ip.go create mode 100644 rest/api/v3/subusers/api_update_subuser_remaining_credit.go create mode 100644 rest/api/v3/subusers/api_update_subuser_website_access.go create mode 100644 rest/api/v3/subusers/docs/AggregatedBy.md create mode 100644 rest/api/v3/subusers/docs/CategoryStats.md create mode 100644 rest/api/v3/subusers/docs/CategoryStatsStatsInner.md create mode 100644 rest/api/v3/subusers/docs/CategoryStatsStatsInnerMetrics.md create mode 100644 rest/api/v3/subusers/docs/CreateSubuser.md create mode 100644 rest/api/v3/subusers/docs/CreateSubuserRequest.md create mode 100644 rest/api/v3/subusers/docs/DeleteSubuser.md create mode 100644 rest/api/v3/subusers/docs/ErrorResponse.md create mode 100644 rest/api/v3/subusers/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/subusers/docs/GetSubuserCredit.md create mode 100644 rest/api/v3/subusers/docs/ListMonthlyStat.md create mode 100644 rest/api/v3/subusers/docs/ListReputation.md create mode 100644 rest/api/v3/subusers/docs/ListReputation200ResponseInner.md create mode 100644 rest/api/v3/subusers/docs/ListStat.md create mode 100644 rest/api/v3/subusers/docs/ListStatSum.md create mode 100644 rest/api/v3/subusers/docs/ListSubuser.md create mode 100644 rest/api/v3/subusers/docs/ListSubuserMonthlyStat.md create mode 100644 rest/api/v3/subusers/docs/Region.md create mode 100644 rest/api/v3/subusers/docs/Region1.md create mode 100644 rest/api/v3/subusers/docs/Region2.md create mode 100644 rest/api/v3/subusers/docs/Region3.md create mode 100644 rest/api/v3/subusers/docs/ResetFrequency.md create mode 100644 rest/api/v3/subusers/docs/ResetFrequency1.md create mode 100644 rest/api/v3/subusers/docs/SortByDirection.md create mode 100644 rest/api/v3/subusers/docs/SortByDirection1.md create mode 100644 rest/api/v3/subusers/docs/SortByDirection2.md create mode 100644 rest/api/v3/subusers/docs/SortByMetric.md create mode 100644 rest/api/v3/subusers/docs/Subuser.md create mode 100644 rest/api/v3/subusers/docs/SubuserCredits.md create mode 100644 rest/api/v3/subusers/docs/SubuserCreditsRequest.md create mode 100644 rest/api/v3/subusers/docs/SubuserPost.md create mode 100644 rest/api/v3/subusers/docs/SubuserPostCreditAllocation.md create mode 100644 rest/api/v3/subusers/docs/SubuserStats.md create mode 100644 rest/api/v3/subusers/docs/SubuserStatsStatsInner.md create mode 100644 rest/api/v3/subusers/docs/SubuserStatsStatsInnerMetrics.md create mode 100644 rest/api/v3/subusers/docs/Type.md create mode 100644 rest/api/v3/subusers/docs/Type1.md create mode 100644 rest/api/v3/subusers/docs/UpdateSubuser.md create mode 100644 rest/api/v3/subusers/docs/UpdateSubuserCredit.md create mode 100644 rest/api/v3/subusers/docs/UpdateSubuserIp.md create mode 100644 rest/api/v3/subusers/docs/UpdateSubuserIp200Response.md create mode 100644 rest/api/v3/subusers/docs/UpdateSubuserRemainingCredit.md create mode 100644 rest/api/v3/subusers/docs/UpdateSubuserRemainingCreditRequest.md create mode 100644 rest/api/v3/subusers/docs/UpdateSubuserRequest.md create mode 100644 rest/api/v3/subusers/docs/UpdateSubuserWebsiteAccess.md create mode 100644 rest/api/v3/subusers/docs/UpdateSubuserWebsiteAccessRequest.md create mode 100644 rest/api/v3/subusers/model_aggregated_by.go create mode 100644 rest/api/v3/subusers/model_category_stats.go create mode 100644 rest/api/v3/subusers/model_category_stats_stats_inner.go create mode 100644 rest/api/v3/subusers/model_category_stats_stats_inner_metrics.go create mode 100644 rest/api/v3/subusers/model_create_subuser_request.go create mode 100644 rest/api/v3/subusers/model_error_response.go create mode 100644 rest/api/v3/subusers/model_error_response_errors_inner.go create mode 100644 rest/api/v3/subusers/model_list_reputation_200_response_inner.go create mode 100644 rest/api/v3/subusers/model_region.go create mode 100644 rest/api/v3/subusers/model_region1.go create mode 100644 rest/api/v3/subusers/model_region2.go create mode 100644 rest/api/v3/subusers/model_region3.go create mode 100644 rest/api/v3/subusers/model_reset_frequency.go create mode 100644 rest/api/v3/subusers/model_reset_frequency1.go create mode 100644 rest/api/v3/subusers/model_sort_by_direction.go create mode 100644 rest/api/v3/subusers/model_sort_by_direction1.go create mode 100644 rest/api/v3/subusers/model_sort_by_direction2.go create mode 100644 rest/api/v3/subusers/model_sort_by_metric.go create mode 100644 rest/api/v3/subusers/model_subuser.go create mode 100644 rest/api/v3/subusers/model_subuser_credits.go create mode 100644 rest/api/v3/subusers/model_subuser_credits_request.go create mode 100644 rest/api/v3/subusers/model_subuser_post.go create mode 100644 rest/api/v3/subusers/model_subuser_post_credit_allocation.go create mode 100644 rest/api/v3/subusers/model_subuser_stats.go create mode 100644 rest/api/v3/subusers/model_subuser_stats_stats_inner.go create mode 100644 rest/api/v3/subusers/model_subuser_stats_stats_inner_metrics.go create mode 100644 rest/api/v3/subusers/model_type.go create mode 100644 rest/api/v3/subusers/model_type1.go create mode 100644 rest/api/v3/subusers/model_update_subuser_ip_200_response.go create mode 100644 rest/api/v3/subusers/model_update_subuser_remaining_credit_request.go create mode 100644 rest/api/v3/subusers/model_update_subuser_request.go create mode 100644 rest/api/v3/subusers/model_update_subuser_website_access_request.go create mode 100644 rest/api/v3/teammates/README.md create mode 100644 rest/api/v3/teammates/api_delete_pending_teammate.go create mode 100644 rest/api/v3/teammates/api_delete_teammate.go create mode 100644 rest/api/v3/teammates/api_get_teammate.go create mode 100644 rest/api/v3/teammates/api_invite_teammate.go create mode 100644 rest/api/v3/teammates/api_list_pending_teammate.go create mode 100644 rest/api/v3/teammates/api_list_subuser_by_template.go create mode 100644 rest/api/v3/teammates/api_list_teammate.go create mode 100644 rest/api/v3/teammates/api_resend_teammate_invite.go create mode 100644 rest/api/v3/teammates/api_service.go create mode 100644 rest/api/v3/teammates/api_update_teammate.go create mode 100644 rest/api/v3/teammates/docs/DeletePendingTeammate.md create mode 100644 rest/api/v3/teammates/docs/DeleteTeammate.md create mode 100644 rest/api/v3/teammates/docs/GetTeammate.md create mode 100644 rest/api/v3/teammates/docs/GetTeammate200Response.md create mode 100644 rest/api/v3/teammates/docs/InviteTeammate.md create mode 100644 rest/api/v3/teammates/docs/InviteTeammate201Response.md create mode 100644 rest/api/v3/teammates/docs/InviteTeammate400Response.md create mode 100644 rest/api/v3/teammates/docs/InviteTeammate400ResponseErrorsInner.md create mode 100644 rest/api/v3/teammates/docs/InviteTeammateRequest.md create mode 100644 rest/api/v3/teammates/docs/ListPendingTeammate.md create mode 100644 rest/api/v3/teammates/docs/ListPendingTeammate200Response.md create mode 100644 rest/api/v3/teammates/docs/ListPendingTeammate200ResponseResultInner.md create mode 100644 rest/api/v3/teammates/docs/ListSubuserByTemplate.md create mode 100644 rest/api/v3/teammates/docs/ListSubuserByTemplate200Response.md create mode 100644 rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadata.md create mode 100644 rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadataNextParams.md create mode 100644 rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseSubuserAccessInner.md create mode 100644 rest/api/v3/teammates/docs/ListSubuserByTemplate400Response.md create mode 100644 rest/api/v3/teammates/docs/ListSubuserByTemplate400ResponseErrorsInner.md create mode 100644 rest/api/v3/teammates/docs/ListTeammate.md create mode 100644 rest/api/v3/teammates/docs/ListTeammate200Response.md create mode 100644 rest/api/v3/teammates/docs/ListTeammate200ResponseResultInner.md create mode 100644 rest/api/v3/teammates/docs/PermissionType.md create mode 100644 rest/api/v3/teammates/docs/ResendTeammateInvite.md create mode 100644 rest/api/v3/teammates/docs/ResendTeammateInvite200Response.md create mode 100644 rest/api/v3/teammates/docs/UpdateTeammate.md create mode 100644 rest/api/v3/teammates/docs/UpdateTeammate200Response.md create mode 100644 rest/api/v3/teammates/docs/UpdateTeammateRequest.md create mode 100644 rest/api/v3/teammates/docs/UserType.md create mode 100644 rest/api/v3/teammates/docs/UserType1.md create mode 100644 rest/api/v3/teammates/docs/UserType2.md create mode 100644 rest/api/v3/teammates/model_get_teammate_200_response.go create mode 100644 rest/api/v3/teammates/model_invite_teammate_201_response.go create mode 100644 rest/api/v3/teammates/model_invite_teammate_400_response.go create mode 100644 rest/api/v3/teammates/model_invite_teammate_400_response_errors_inner.go create mode 100644 rest/api/v3/teammates/model_invite_teammate_request.go create mode 100644 rest/api/v3/teammates/model_list_pending_teammate_200_response.go create mode 100644 rest/api/v3/teammates/model_list_pending_teammate_200_response_result_inner.go create mode 100644 rest/api/v3/teammates/model_list_subuser_by_template_200_response.go create mode 100644 rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata.go create mode 100644 rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata_next_params.go create mode 100644 rest/api/v3/teammates/model_list_subuser_by_template_200_response_subuser_access_inner.go create mode 100644 rest/api/v3/teammates/model_list_subuser_by_template_400_response.go create mode 100644 rest/api/v3/teammates/model_list_subuser_by_template_400_response_errors_inner.go create mode 100644 rest/api/v3/teammates/model_list_teammate_200_response.go create mode 100644 rest/api/v3/teammates/model_list_teammate_200_response_result_inner.go create mode 100644 rest/api/v3/teammates/model_permission_type.go create mode 100644 rest/api/v3/teammates/model_resend_teammate_invite_200_response.go create mode 100644 rest/api/v3/teammates/model_update_teammate_200_response.go create mode 100644 rest/api/v3/teammates/model_update_teammate_request.go create mode 100644 rest/api/v3/teammates/model_user_type.go create mode 100644 rest/api/v3/teammates/model_user_type1.go create mode 100644 rest/api/v3/teammates/model_user_type2.go create mode 100644 rest/api/v3/templates/README.md create mode 100644 rest/api/v3/templates/api_activate_template_version.go create mode 100644 rest/api/v3/templates/api_create_template.go create mode 100644 rest/api/v3/templates/api_create_template_version.go create mode 100644 rest/api/v3/templates/api_delete_template.go create mode 100644 rest/api/v3/templates/api_delete_template_version.go create mode 100644 rest/api/v3/templates/api_duplicate_template.go create mode 100644 rest/api/v3/templates/api_get_template.go create mode 100644 rest/api/v3/templates/api_get_template_version.go create mode 100644 rest/api/v3/templates/api_list_template.go create mode 100644 rest/api/v3/templates/api_service.go create mode 100644 rest/api/v3/templates/api_update_template.go create mode 100644 rest/api/v3/templates/api_update_template_version.go create mode 100644 rest/api/v3/templates/docs/ActivateTemplateVersion.md create mode 100644 rest/api/v3/templates/docs/Active.md create mode 100644 rest/api/v3/templates/docs/Active1.md create mode 100644 rest/api/v3/templates/docs/CreateTemplate.md create mode 100644 rest/api/v3/templates/docs/CreateTemplateRequest.md create mode 100644 rest/api/v3/templates/docs/CreateTemplateVersion.md create mode 100644 rest/api/v3/templates/docs/DeleteTemplate.md create mode 100644 rest/api/v3/templates/docs/DeleteTemplateVersion.md create mode 100644 rest/api/v3/templates/docs/DuplicateTemplate.md create mode 100644 rest/api/v3/templates/docs/DuplicateTemplateRequest.md create mode 100644 rest/api/v3/templates/docs/Editor.md create mode 100644 rest/api/v3/templates/docs/Editor1.md create mode 100644 rest/api/v3/templates/docs/Generation.md create mode 100644 rest/api/v3/templates/docs/Generation1.md create mode 100644 rest/api/v3/templates/docs/Generations.md create mode 100644 rest/api/v3/templates/docs/GetTemplate.md create mode 100644 rest/api/v3/templates/docs/GetTemplateVersion.md create mode 100644 rest/api/v3/templates/docs/ListTemplate.md create mode 100644 rest/api/v3/templates/docs/ListTemplate200Response.md create mode 100644 rest/api/v3/templates/docs/ListTemplate400Response.md create mode 100644 rest/api/v3/templates/docs/ListTemplate400ResponseErrorsInner.md create mode 100644 rest/api/v3/templates/docs/Metadata.md create mode 100644 rest/api/v3/templates/docs/TransactionalTemplate.md create mode 100644 rest/api/v3/templates/docs/TransactionalTemplateVersionCreate.md create mode 100644 rest/api/v3/templates/docs/TransactionalTemplateVersionOutput.md create mode 100644 rest/api/v3/templates/docs/TransactionalTemplateWarning.md create mode 100644 rest/api/v3/templates/docs/TransactionalTemplatesTemplateLean.md create mode 100644 rest/api/v3/templates/docs/TransactionalTemplatesVersionOutputLean.md create mode 100644 rest/api/v3/templates/docs/UpdateTemplate.md create mode 100644 rest/api/v3/templates/docs/UpdateTemplateRequest.md create mode 100644 rest/api/v3/templates/docs/UpdateTemplateVersion.md create mode 100644 rest/api/v3/templates/model_active.go create mode 100644 rest/api/v3/templates/model_active1.go create mode 100644 rest/api/v3/templates/model_create_template_request.go create mode 100644 rest/api/v3/templates/model_duplicate_template_request.go create mode 100644 rest/api/v3/templates/model_editor.go create mode 100644 rest/api/v3/templates/model_editor1.go create mode 100644 rest/api/v3/templates/model_generation.go create mode 100644 rest/api/v3/templates/model_generation1.go create mode 100644 rest/api/v3/templates/model_generations.go create mode 100644 rest/api/v3/templates/model_list_template_200_response.go create mode 100644 rest/api/v3/templates/model_list_template_400_response.go create mode 100644 rest/api/v3/templates/model_list_template_400_response_errors_inner.go create mode 100644 rest/api/v3/templates/model_metadata.go create mode 100644 rest/api/v3/templates/model_transactional_template.go create mode 100644 rest/api/v3/templates/model_transactional_template_version_create.go create mode 100644 rest/api/v3/templates/model_transactional_template_version_output.go create mode 100644 rest/api/v3/templates/model_transactional_template_warning.go create mode 100644 rest/api/v3/templates/model_transactional_templates_template_lean.go create mode 100644 rest/api/v3/templates/model_transactional_templates_version_output_lean.go create mode 100644 rest/api/v3/templates/model_update_template_request.go create mode 100644 rest/api/v3/tracking_settings/README.md create mode 100644 rest/api/v3/tracking_settings/api_list_click_tracking_setting.go create mode 100644 rest/api/v3/tracking_settings/api_list_google_analytics_tracking_setting.go create mode 100644 rest/api/v3/tracking_settings/api_list_open_tracking_setting.go create mode 100644 rest/api/v3/tracking_settings/api_list_subscription_tracking_setting.go create mode 100644 rest/api/v3/tracking_settings/api_list_tracking_setting.go create mode 100644 rest/api/v3/tracking_settings/api_service.go create mode 100644 rest/api/v3/tracking_settings/api_update_click_tracking_setting.go create mode 100644 rest/api/v3/tracking_settings/api_update_google_analytics_tracking_setting.go create mode 100644 rest/api/v3/tracking_settings/api_update_open_tracking_setting.go create mode 100644 rest/api/v3/tracking_settings/api_update_subscription_tracking_setting.go create mode 100644 rest/api/v3/tracking_settings/docs/ClickTracking.md create mode 100644 rest/api/v3/tracking_settings/docs/GoogleAnalyticsSettings.md create mode 100644 rest/api/v3/tracking_settings/docs/ListClickTrackingSetting.md create mode 100644 rest/api/v3/tracking_settings/docs/ListGoogleAnalyticsTrackingSetting.md create mode 100644 rest/api/v3/tracking_settings/docs/ListOpenTrackingSetting.md create mode 100644 rest/api/v3/tracking_settings/docs/ListOpenTrackingSetting200Response.md create mode 100644 rest/api/v3/tracking_settings/docs/ListSubscriptionTrackingSetting.md create mode 100644 rest/api/v3/tracking_settings/docs/ListTrackingSetting.md create mode 100644 rest/api/v3/tracking_settings/docs/ListTrackingSetting200Response.md create mode 100644 rest/api/v3/tracking_settings/docs/ListTrackingSetting200ResponseResultInner.md create mode 100644 rest/api/v3/tracking_settings/docs/SubscriptionTrackingSettings.md create mode 100644 rest/api/v3/tracking_settings/docs/UpdateClickTrackingSetting.md create mode 100644 rest/api/v3/tracking_settings/docs/UpdateClickTrackingSettingRequest.md create mode 100644 rest/api/v3/tracking_settings/docs/UpdateGoogleAnalyticsTrackingSetting.md create mode 100644 rest/api/v3/tracking_settings/docs/UpdateOpenTrackingSetting.md create mode 100644 rest/api/v3/tracking_settings/docs/UpdateOpenTrackingSettingRequest.md create mode 100644 rest/api/v3/tracking_settings/docs/UpdateSubscriptionTrackingSetting.md create mode 100644 rest/api/v3/tracking_settings/model_click_tracking.go create mode 100644 rest/api/v3/tracking_settings/model_google_analytics_settings.go create mode 100644 rest/api/v3/tracking_settings/model_list_open_tracking_setting_200_response.go create mode 100644 rest/api/v3/tracking_settings/model_list_tracking_setting_200_response.go create mode 100644 rest/api/v3/tracking_settings/model_list_tracking_setting_200_response_result_inner.go create mode 100644 rest/api/v3/tracking_settings/model_subscription_tracking_settings.go create mode 100644 rest/api/v3/tracking_settings/model_update_click_tracking_setting_request.go create mode 100644 rest/api/v3/tracking_settings/model_update_open_tracking_setting_request.go create mode 100644 rest/api/v3/user/README.md create mode 100644 rest/api/v3/user/api_list_account.go create mode 100644 rest/api/v3/user/api_list_credit.go create mode 100644 rest/api/v3/user/api_list_email.go create mode 100644 rest/api/v3/user/api_list_profile.go create mode 100644 rest/api/v3/user/api_list_username.go create mode 100644 rest/api/v3/user/api_service.go create mode 100644 rest/api/v3/user/api_update_email.go create mode 100644 rest/api/v3/user/api_update_password.go create mode 100644 rest/api/v3/user/api_update_profile.go create mode 100644 rest/api/v3/user/api_update_username.go create mode 100644 rest/api/v3/user/docs/ErrorResponse.md create mode 100644 rest/api/v3/user/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/user/docs/GETUserAccountResponse.md create mode 100644 rest/api/v3/user/docs/GETUserProfileResponse.md create mode 100644 rest/api/v3/user/docs/ListAccount.md create mode 100644 rest/api/v3/user/docs/ListCredit.md create mode 100644 rest/api/v3/user/docs/ListCredit200Response.md create mode 100644 rest/api/v3/user/docs/ListEmail.md create mode 100644 rest/api/v3/user/docs/ListEmail200Response.md create mode 100644 rest/api/v3/user/docs/ListProfile.md create mode 100644 rest/api/v3/user/docs/ListUsername.md create mode 100644 rest/api/v3/user/docs/ListUsername200Response.md create mode 100644 rest/api/v3/user/docs/Type.md create mode 100644 rest/api/v3/user/docs/UpdateEmail.md create mode 100644 rest/api/v3/user/docs/UpdateEmail200Response.md create mode 100644 rest/api/v3/user/docs/UpdateEmailRequest.md create mode 100644 rest/api/v3/user/docs/UpdatePassword.md create mode 100644 rest/api/v3/user/docs/UpdatePasswordRequest.md create mode 100644 rest/api/v3/user/docs/UpdateProfile.md create mode 100644 rest/api/v3/user/docs/UpdateUsername.md create mode 100644 rest/api/v3/user/docs/UpdateUsername200Response.md create mode 100644 rest/api/v3/user/docs/UpdateUsernameRequest.md create mode 100644 rest/api/v3/user/docs/UserProfile.md create mode 100644 rest/api/v3/user/model_error_response.go create mode 100644 rest/api/v3/user/model_error_response_errors_inner.go create mode 100644 rest/api/v3/user/model_get_user_account_response.go create mode 100644 rest/api/v3/user/model_get_user_profile_response.go create mode 100644 rest/api/v3/user/model_list_credit_200_response.go create mode 100644 rest/api/v3/user/model_list_email_200_response.go create mode 100644 rest/api/v3/user/model_list_username_200_response.go create mode 100644 rest/api/v3/user/model_type.go create mode 100644 rest/api/v3/user/model_update_email_200_response.go create mode 100644 rest/api/v3/user/model_update_email_request.go create mode 100644 rest/api/v3/user/model_update_password_request.go create mode 100644 rest/api/v3/user/model_update_username_200_response.go create mode 100644 rest/api/v3/user/model_update_username_request.go create mode 100644 rest/api/v3/user/model_user_profile.go create mode 100644 rest/api/v3/verified_senders/README.md create mode 100644 rest/api/v3/verified_senders/api_create_verified_sender.go create mode 100644 rest/api/v3/verified_senders/api_delete_verified_sender.go create mode 100644 rest/api/v3/verified_senders/api_list_verified_sender.go create mode 100644 rest/api/v3/verified_senders/api_list_verified_sender_domain.go create mode 100644 rest/api/v3/verified_senders/api_list_verified_sender_steps_completed.go create mode 100644 rest/api/v3/verified_senders/api_resend_verified_sender.go create mode 100644 rest/api/v3/verified_senders/api_service.go create mode 100644 rest/api/v3/verified_senders/api_update_verified_sender.go create mode 100644 rest/api/v3/verified_senders/api_verify_sender_token.go create mode 100644 rest/api/v3/verified_senders/docs/CreateVerifiedSender.md create mode 100644 rest/api/v3/verified_senders/docs/CreateVerifiedSender400Response.md create mode 100644 rest/api/v3/verified_senders/docs/CreateVerifiedSender400ResponseErrorsInner.md create mode 100644 rest/api/v3/verified_senders/docs/DeleteVerifiedSender.md create mode 100644 rest/api/v3/verified_senders/docs/DeleteVerifiedSender403Response.md create mode 100644 rest/api/v3/verified_senders/docs/DeleteVerifiedSender403ResponseErrorsInner.md create mode 100644 rest/api/v3/verified_senders/docs/DeleteVerifiedSender404Response.md create mode 100644 rest/api/v3/verified_senders/docs/ErrorResponse.md create mode 100644 rest/api/v3/verified_senders/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/verified_senders/docs/ListVerifiedSender.md create mode 100644 rest/api/v3/verified_senders/docs/ListVerifiedSender200Response.md create mode 100644 rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain.md create mode 100644 rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain200Response.md create mode 100644 rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain200ResponseResults.md create mode 100644 rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted.md create mode 100644 rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted200Response.md create mode 100644 rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted200ResponseResults.md create mode 100644 rest/api/v3/verified_senders/docs/ResendVerifiedSender.md create mode 100644 rest/api/v3/verified_senders/docs/UpdateVerifiedSender.md create mode 100644 rest/api/v3/verified_senders/docs/VerifiedSenderRequest.md create mode 100644 rest/api/v3/verified_senders/docs/VerifiedSenderResponse.md create mode 100644 rest/api/v3/verified_senders/docs/VerifySenderToken.md create mode 100644 rest/api/v3/verified_senders/model_create_verified_sender_400_response.go create mode 100644 rest/api/v3/verified_senders/model_create_verified_sender_400_response_errors_inner.go create mode 100644 rest/api/v3/verified_senders/model_delete_verified_sender_403_response.go create mode 100644 rest/api/v3/verified_senders/model_delete_verified_sender_403_response_errors_inner.go create mode 100644 rest/api/v3/verified_senders/model_delete_verified_sender_404_response.go create mode 100644 rest/api/v3/verified_senders/model_error_response.go create mode 100644 rest/api/v3/verified_senders/model_error_response_errors_inner.go create mode 100644 rest/api/v3/verified_senders/model_list_verified_sender_200_response.go create mode 100644 rest/api/v3/verified_senders/model_list_verified_sender_domain_200_response.go create mode 100644 rest/api/v3/verified_senders/model_list_verified_sender_domain_200_response_results.go create mode 100644 rest/api/v3/verified_senders/model_list_verified_sender_steps_completed_200_response.go create mode 100644 rest/api/v3/verified_senders/model_list_verified_sender_steps_completed_200_response_results.go create mode 100644 rest/api/v3/verified_senders/model_verified_sender_request.go create mode 100644 rest/api/v3/verified_senders/model_verified_sender_response.go create mode 100644 rest/api/v3/webhooks/README.md create mode 100644 rest/api/v3/webhooks/api_create_event_webhook.go create mode 100644 rest/api/v3/webhooks/api_create_parse_setting.go create mode 100644 rest/api/v3/webhooks/api_delete_event_webhook.go create mode 100644 rest/api/v3/webhooks/api_delete_parse_setting.go create mode 100644 rest/api/v3/webhooks/api_get_event_webhook.go create mode 100644 rest/api/v3/webhooks/api_get_parse_setting.go create mode 100644 rest/api/v3/webhooks/api_get_signed_event_webhook.go create mode 100644 rest/api/v3/webhooks/api_list_event_webhook.go create mode 100644 rest/api/v3/webhooks/api_list_parse_setting.go create mode 100644 rest/api/v3/webhooks/api_list_parse_static.go create mode 100644 rest/api/v3/webhooks/api_service.go create mode 100644 rest/api/v3/webhooks/api_test_event_webhook.go create mode 100644 rest/api/v3/webhooks/api_update_event_webhook.go create mode 100644 rest/api/v3/webhooks/api_update_parse_setting.go create mode 100644 rest/api/v3/webhooks/api_update_signed_event_webhook.go create mode 100644 rest/api/v3/webhooks/docs/AggregatedBy.md create mode 100644 rest/api/v3/webhooks/docs/CreateEventWebhook.md create mode 100644 rest/api/v3/webhooks/docs/CreateEventWebhook400Response.md create mode 100644 rest/api/v3/webhooks/docs/CreateEventWebhook400ResponseErrorsInner.md create mode 100644 rest/api/v3/webhooks/docs/CreateParseSetting.md create mode 100644 rest/api/v3/webhooks/docs/DeleteEventWebhook.md create mode 100644 rest/api/v3/webhooks/docs/DeleteParseSetting.md create mode 100644 rest/api/v3/webhooks/docs/ErrorResponse.md create mode 100644 rest/api/v3/webhooks/docs/ErrorResponseErrorsInner.md create mode 100644 rest/api/v3/webhooks/docs/EventWebhookAllResponse.md create mode 100644 rest/api/v3/webhooks/docs/EventWebhookBaseResponseProps.md create mode 100644 rest/api/v3/webhooks/docs/EventWebhookDateResponseProps.md create mode 100644 rest/api/v3/webhooks/docs/EventWebhookNoDatesResponse.md create mode 100644 rest/api/v3/webhooks/docs/EventWebhookOauthResponseProps.md create mode 100644 rest/api/v3/webhooks/docs/EventWebhookRequest.md create mode 100644 rest/api/v3/webhooks/docs/EventWebhookSignedResponse.md create mode 100644 rest/api/v3/webhooks/docs/EventWebhookSignedResponseProp.md create mode 100644 rest/api/v3/webhooks/docs/EventWebhookTestRequest.md create mode 100644 rest/api/v3/webhooks/docs/EventWebhookUnsignedResponse.md create mode 100644 rest/api/v3/webhooks/docs/GetEventWebhook.md create mode 100644 rest/api/v3/webhooks/docs/GetParseSetting.md create mode 100644 rest/api/v3/webhooks/docs/GetSignedEventWebhook.md create mode 100644 rest/api/v3/webhooks/docs/GetSignedEventWebhook200Response.md create mode 100644 rest/api/v3/webhooks/docs/GetSignedEventWebhook404Response.md create mode 100644 rest/api/v3/webhooks/docs/GetSignedEventWebhook404ResponseErrorsInner.md create mode 100644 rest/api/v3/webhooks/docs/ListEventWebhook.md create mode 100644 rest/api/v3/webhooks/docs/ListParseSetting.md create mode 100644 rest/api/v3/webhooks/docs/ListParseSetting200Response.md create mode 100644 rest/api/v3/webhooks/docs/ListParseStatic.md create mode 100644 rest/api/v3/webhooks/docs/ListParseStatic200ResponseInner.md create mode 100644 rest/api/v3/webhooks/docs/ListParseStatic200ResponseInnerStatsInner.md create mode 100644 rest/api/v3/webhooks/docs/ListParseStatic200ResponseInnerStatsInnerMetrics.md create mode 100644 rest/api/v3/webhooks/docs/ParseSetting.md create mode 100644 rest/api/v3/webhooks/docs/TestEventWebhook.md create mode 100644 rest/api/v3/webhooks/docs/UpdateEventWebhook.md create mode 100644 rest/api/v3/webhooks/docs/UpdateParseSetting.md create mode 100644 rest/api/v3/webhooks/docs/UpdateSignedEventWebhook.md create mode 100644 rest/api/v3/webhooks/docs/UpdateSignedEventWebhookRequest.md create mode 100644 rest/api/v3/webhooks/model_aggregated_by.go create mode 100644 rest/api/v3/webhooks/model_create_event_webhook_400_response.go create mode 100644 rest/api/v3/webhooks/model_create_event_webhook_400_response_errors_inner.go create mode 100644 rest/api/v3/webhooks/model_error_response.go create mode 100644 rest/api/v3/webhooks/model_error_response_errors_inner.go create mode 100644 rest/api/v3/webhooks/model_event_webhook_all_response.go create mode 100644 rest/api/v3/webhooks/model_event_webhook_base_response_props.go create mode 100644 rest/api/v3/webhooks/model_event_webhook_date_response_props.go create mode 100644 rest/api/v3/webhooks/model_event_webhook_no_dates_response.go create mode 100644 rest/api/v3/webhooks/model_event_webhook_oauth_response_props.go create mode 100644 rest/api/v3/webhooks/model_event_webhook_request.go create mode 100644 rest/api/v3/webhooks/model_event_webhook_signed_response.go create mode 100644 rest/api/v3/webhooks/model_event_webhook_signed_response_prop.go create mode 100644 rest/api/v3/webhooks/model_event_webhook_test_request.go create mode 100644 rest/api/v3/webhooks/model_event_webhook_unsigned_response.go create mode 100644 rest/api/v3/webhooks/model_get_signed_event_webhook_200_response.go create mode 100644 rest/api/v3/webhooks/model_get_signed_event_webhook_404_response.go create mode 100644 rest/api/v3/webhooks/model_get_signed_event_webhook_404_response_errors_inner.go create mode 100644 rest/api/v3/webhooks/model_list_parse_setting_200_response.go create mode 100644 rest/api/v3/webhooks/model_list_parse_static_200_response_inner.go create mode 100644 rest/api/v3/webhooks/model_list_parse_static_200_response_inner_stats_inner.go create mode 100644 rest/api/v3/webhooks/model_list_parse_static_200_response_inner_stats_inner_metrics.go create mode 100644 rest/api/v3/webhooks/model_parse_setting.go create mode 100644 rest/api/v3/webhooks/model_update_signed_event_webhook_request.go diff --git a/.gitignore b/.gitignore index aac0e6fe..9a50edcf 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ sendgrid.env .vscode prism* **/.idea/**/* +**/.openapi-generator* diff --git a/rest/api/v3/account_provisioning/README.md b/rest/api/v3/account_provisioning/README.md new file mode 100644 index 00000000..e04a232d --- /dev/null +++ b/rest/api/v3/account_provisioning/README.md @@ -0,0 +1,87 @@ +# Go API client for + +The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. + +You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:01.491818+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AuthenticateAccount* | [**AuthenticateAccount**](docs/AuthenticateAccount.md#authenticateaccount) | **Post** /v3/partners/accounts/{AccountID}/sso | Authenticate an account with single sign on +*CreateAccount* | [**CreateAccount**](docs/CreateAccount.md#createaccount) | **Post** /v3/partners/accounts | Create an account +*DeleteAccount* | [**DeleteAccount**](docs/DeleteAccount.md#deleteaccount) | **Delete** /v3/partners/accounts/{AccountID} | Delete an account +*GetAccountState* | [**GetAccountState**](docs/GetAccountState.md#getaccountstate) | **Get** /v3/partners/accounts/{AccountID}/state | Get an account's state +*ListAccount* | [**ListAccount**](docs/ListAccount.md#listaccount) | **Get** /v3/partners/accounts | Get all accounts +*ListAccountOffering* | [**ListAccountOffering**](docs/ListAccountOffering.md#listaccountoffering) | **Get** /v3/partners/accounts/{AccountID}/offerings | Get account offerings +*ListOffering* | [**ListOffering**](docs/ListOffering.md#listoffering) | **Get** /v3/partners/offerings | Get all available offerings +*UpdateAccountOffering* | [**UpdateAccountOffering**](docs/UpdateAccountOffering.md#updateaccountoffering) | **Put** /v3/partners/accounts/{AccountID}/offerings | Update account offerings +*UpdateAccountState* | [**UpdateAccountState**](docs/UpdateAccountState.md#updateaccountstate) | **Put** /v3/partners/accounts/{AccountID}/state | Update an account's state + + +## Documentation For Models + + - [AccountList](AccountList.md) + - [AccountProvisioningAccount](AccountProvisioningAccount.md) + - [AccountProvisioningAccountId](AccountProvisioningAccountId.md) + - [AccountProvisioningCatalog](AccountProvisioningCatalog.md) + - [AccountProvisioningOfferingList](AccountProvisioningOfferingList.md) + - [AccountProvisioningOfferingV1](AccountProvisioningOfferingV1.md) + - [AccountProvisioningPagination](AccountProvisioningPagination.md) + - [AccountProvisioningProfile](AccountProvisioningProfile.md) + - [AccountProvisioningStateRead](AccountProvisioningStateRead.md) + - [AccountProvisioningStateWrite](AccountProvisioningStateWrite.md) + - [CatalogEntry](CatalogEntry.md) + - [CatalogEntryEntitlements](CatalogEntryEntitlements.md) + - [CreateAccountParams](CreateAccountParams.md) + - [ErrorResponse](ErrorResponse.md) + - [OfferingsToAdd](OfferingsToAdd.md) + - [State](State.md) + - [State1](State1.md) + - [Type](Type.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/account_provisioning/api_authenticate_account.go b/rest/api/v3/account_provisioning/api_authenticate_account.go new file mode 100644 index 00000000..c933bcdb --- /dev/null +++ b/rest/api/v3/account_provisioning/api_authenticate_account.go @@ -0,0 +1,52 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "net/http" + "net/url" + + "strings" +) + +type AuthenticateAccountParam struct { + // Twilio SendGrid account ID + AccountID *string `json:"accountID"` +} + +func (params *AuthenticateAccountParam) SetAccountID(AccountID string) *AuthenticateAccountParam { + params.AccountID = &AccountID + return params +} + +// Authenticates and logs in a user to Twilio Sendgrid as a specific admin identity configured for SSO by partner. Any additional teammates or subusers will need to log in directly via app.sendgrid.com +func (c *ApiService) AuthenticateAccount(params *AuthenticateAccountParam) (interface{}, error) { + path := "/v3/partners/accounts/{AccountID}/sso" + if params != nil && params.AccountID != nil { + path = strings.Replace(path, "{"+"AccountID"+"}", *params.AccountID, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/account_provisioning/api_create_account.go b/rest/api/v3/account_provisioning/api_create_account.go new file mode 100644 index 00000000..2057dec4 --- /dev/null +++ b/rest/api/v3/account_provisioning/api_create_account.go @@ -0,0 +1,74 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateAccountParam struct { + // + CreateAccountParams *CreateAccountParams `json:"CreateAccountParams"` + // **OPTIONAL** Custom request header provided ONLY for a test account + TTestAccount *string `json:"T-Test-Account,omitempty"` +} + +func (params *CreateAccountParam) SetCreateAccountParams(CreateAccountParams CreateAccountParams) *CreateAccountParam { + params.CreateAccountParams = &CreateAccountParams + return params +} +func (params *CreateAccountParam) SetTTestAccount(TTestAccount string) *CreateAccountParam { + params.TTestAccount = &TTestAccount + return params +} + +// Creates a new account, with specified offering, under the organization. +func (c *ApiService) CreateAccount(params *CreateAccountParam) (interface{}, error) { + path := "/v3/partners/accounts" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateAccountParams != nil { + b, err := json.Marshal(*params.CreateAccountParams) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.TTestAccount != nil { + headers["T-Test-Account"] = *params.TTestAccount + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &AccountProvisioningAccountId{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/account_provisioning/api_delete_account.go b/rest/api/v3/account_provisioning/api_delete_account.go new file mode 100644 index 00000000..7d93af22 --- /dev/null +++ b/rest/api/v3/account_provisioning/api_delete_account.go @@ -0,0 +1,52 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "net/http" + "net/url" + + "strings" +) + +type DeleteAccountParam struct { + // Twilio SendGrid account ID + AccountID *string `json:"accountID"` +} + +func (params *DeleteAccountParam) SetAccountID(AccountID string) *DeleteAccountParam { + params.AccountID = &AccountID + return params +} + +// Delete a specific account under your organization by account ID. Note that this is an **irreversible** action that does the following: - Revokes API Keys and SSO so that the account user cannot log in or access SendGrid data. - Removes all offerings and configured SendGrid resources such as dedicated IPs. - Cancels billing effective immediately. +func (c *ApiService) DeleteAccount(params *DeleteAccountParam) (interface{}, error) { + path := "/v3/partners/accounts/{AccountID}" + if params != nil && params.AccountID != nil { + path = strings.Replace(path, "{"+"AccountID"+"}", *params.AccountID, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/account_provisioning/api_get_account_state.go b/rest/api/v3/account_provisioning/api_get_account_state.go new file mode 100644 index 00000000..89b026f9 --- /dev/null +++ b/rest/api/v3/account_provisioning/api_get_account_state.go @@ -0,0 +1,61 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetAccountStateParam struct { + // Twilio SendGrid account ID + AccountID *string `json:"accountID"` +} + +func (params *GetAccountStateParam) SetAccountID(AccountID string) *GetAccountStateParam { + params.AccountID = &AccountID + return params +} + +// Retrieve the state of the specified account. +func (c *ApiService) GetAccountState(params *GetAccountStateParam) (interface{}, error) { + path := "/v3/partners/accounts/{AccountID}/state" + if params != nil && params.AccountID != nil { + path = strings.Replace(path, "{"+"AccountID"+"}", *params.AccountID, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AccountProvisioningStateRead{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/account_provisioning/api_list_account.go b/rest/api/v3/account_provisioning/api_list_account.go new file mode 100644 index 00000000..5051ca78 --- /dev/null +++ b/rest/api/v3/account_provisioning/api_list_account.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListAccountParam struct { + // The last item successfully retrieved + Offset *string `json:"offset,omitempty"` + // The number of items to return + Limit *int32 `json:"limit,omitempty"` +} + +func (params *ListAccountParam) SetOffset(Offset string) *ListAccountParam { + params.Offset = &Offset + return params +} +func (params *ListAccountParam) SetLimit(Limit int32) *ListAccountParam { + params.Limit = &Limit + return params +} + +// Retrieves all accounts under the organization. +func (c *ApiService) ListAccount(params *ListAccountParam) (interface{}, error) { + path := "/v3/partners/accounts" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Offset != nil { + data.Set("offset", *params.Offset) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AccountList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/account_provisioning/api_list_account_offering.go b/rest/api/v3/account_provisioning/api_list_account_offering.go new file mode 100644 index 00000000..c810415c --- /dev/null +++ b/rest/api/v3/account_provisioning/api_list_account_offering.go @@ -0,0 +1,61 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type ListAccountOfferingParam struct { + // Twilio SendGrid account ID + AccountID *string `json:"accountID"` +} + +func (params *ListAccountOfferingParam) SetAccountID(AccountID string) *ListAccountOfferingParam { + params.AccountID = &AccountID + return params +} + +// Retrieves offering information about the specified account. +func (c *ApiService) ListAccountOffering(params *ListAccountOfferingParam) (interface{}, error) { + path := "/v3/partners/accounts/{AccountID}/offerings" + if params != nil && params.AccountID != nil { + path = strings.Replace(path, "{"+"AccountID"+"}", *params.AccountID, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AccountProvisioningOfferingList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/account_provisioning/api_list_offering.go b/rest/api/v3/account_provisioning/api_list_offering.go new file mode 100644 index 00000000..40a7a358 --- /dev/null +++ b/rest/api/v3/account_provisioning/api_list_offering.go @@ -0,0 +1,49 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListOfferingParam struct { +} + +// Retrieves offerings available under the organization. +func (c *ApiService) ListOffering() (interface{}, error) { + path := "/v3/partners/offerings" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AccountProvisioningCatalog{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/account_provisioning/api_service.go b/rest/api/v3/account_provisioning/api_service.go new file mode 100644 index 00000000..6459d6eb --- /dev/null +++ b/rest/api/v3/account_provisioning/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/account_provisioning/api_update_account_offering.go b/rest/api/v3/account_provisioning/api_update_account_offering.go new file mode 100644 index 00000000..fd0db615 --- /dev/null +++ b/rest/api/v3/account_provisioning/api_update_account_offering.go @@ -0,0 +1,76 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateAccountOfferingParam struct { + // Twilio SendGrid account ID + AccountID *string `json:"accountID"` + // + OfferingsToAdd *OfferingsToAdd `json:"OfferingsToAdd"` +} + +func (params *UpdateAccountOfferingParam) SetAccountID(AccountID string) *UpdateAccountOfferingParam { + params.AccountID = &AccountID + return params +} +func (params *UpdateAccountOfferingParam) SetOfferingsToAdd(OfferingsToAdd OfferingsToAdd) *UpdateAccountOfferingParam { + params.OfferingsToAdd = &OfferingsToAdd + return params +} + +// Changes a package offering for the specified account. Please note that an account can have only one package offering. Also associates one or more add-on offerings such as Marketing Campaigns, Dedicated IP Addresses, and Expert Services to the specified account. +func (c *ApiService) UpdateAccountOffering(params *UpdateAccountOfferingParam) (interface{}, error) { + path := "/v3/partners/accounts/{AccountID}/offerings" + if params != nil && params.AccountID != nil { + path = strings.Replace(path, "{"+"AccountID"+"}", *params.AccountID, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.OfferingsToAdd != nil { + b, err := json.Marshal(*params.OfferingsToAdd) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AccountProvisioningOfferingList{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/account_provisioning/api_update_account_state.go b/rest/api/v3/account_provisioning/api_update_account_state.go new file mode 100644 index 00000000..5d9270dc --- /dev/null +++ b/rest/api/v3/account_provisioning/api_update_account_state.go @@ -0,0 +1,68 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateAccountStateParam struct { + // Twilio SendGrid account ID + AccountID *string `json:"accountID"` + // + AccountProvisioningStateWrite *AccountProvisioningStateWrite `json:"AccountProvisioningStateWrite"` +} + +func (params *UpdateAccountStateParam) SetAccountID(AccountID string) *UpdateAccountStateParam { + params.AccountID = &AccountID + return params +} +func (params *UpdateAccountStateParam) SetAccountProvisioningStateWrite(AccountProvisioningStateWrite AccountProvisioningStateWrite) *UpdateAccountStateParam { + params.AccountProvisioningStateWrite = &AccountProvisioningStateWrite + return params +} + +// Update the state of the specified account. +func (c *ApiService) UpdateAccountState(params *UpdateAccountStateParam) (interface{}, error) { + path := "/v3/partners/accounts/{AccountID}/state" + if params != nil && params.AccountID != nil { + path = strings.Replace(path, "{"+"AccountID"+"}", *params.AccountID, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.AccountProvisioningStateWrite != nil { + b, err := json.Marshal(*params.AccountProvisioningStateWrite) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/account_provisioning/docs/AccountList.md b/rest/api/v3/account_provisioning/docs/AccountList.md new file mode 100644 index 00000000..8ce68222 --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/AccountList.md @@ -0,0 +1,12 @@ +# AccountList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Accounts** | [**[]AccountProvisioningAccount**](AccountProvisioningAccount.md) | List of account objects. |[optional] +**Pages** | [**AccountProvisioningPagination**](AccountProvisioningPagination.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/AccountProvisioningAccount.md b/rest/api/v3/account_provisioning/docs/AccountProvisioningAccount.md new file mode 100644 index 00000000..acb44d9b --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/AccountProvisioningAccount.md @@ -0,0 +1,12 @@ +# AccountProvisioningAccount + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | Twilio SendGrid account ID | +**CreatedAt** | [**time.Time**](time.Time.md) | Timestamp indicating when the account was created. Format is [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/AccountProvisioningAccountId.md b/rest/api/v3/account_provisioning/docs/AccountProvisioningAccountId.md new file mode 100644 index 00000000..47063845 --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/AccountProvisioningAccountId.md @@ -0,0 +1,11 @@ +# AccountProvisioningAccountId + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AccountId** | **string** | Twilio SendGrid account ID | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/AccountProvisioningCatalog.md b/rest/api/v3/account_provisioning/docs/AccountProvisioningCatalog.md new file mode 100644 index 00000000..d0fe779b --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/AccountProvisioningCatalog.md @@ -0,0 +1,11 @@ +# AccountProvisioningCatalog + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Catalog** | [**[]CatalogEntry**](CatalogEntry.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/AccountProvisioningOfferingList.md b/rest/api/v3/account_provisioning/docs/AccountProvisioningOfferingList.md new file mode 100644 index 00000000..7bea6750 --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/AccountProvisioningOfferingList.md @@ -0,0 +1,11 @@ +# AccountProvisioningOfferingList + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Offerings** | [**[]AccountProvisioningOfferingV1**](AccountProvisioningOfferingV1.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/AccountProvisioningOfferingV1.md b/rest/api/v3/account_provisioning/docs/AccountProvisioningOfferingV1.md new file mode 100644 index 00000000..d4da851a --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/AccountProvisioningOfferingV1.md @@ -0,0 +1,13 @@ +# AccountProvisioningOfferingV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the offering | +**Type** | [**Type**](Type.md) | Defines the type of offering (e.g., package or addon). | +**Quantity** | **int64** | Quantity of the specified addon to be added. If offering type is `package`, quantity must be 1. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/AccountProvisioningPagination.md b/rest/api/v3/account_provisioning/docs/AccountProvisioningPagination.md new file mode 100644 index 00000000..1c2e4e18 --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/AccountProvisioningPagination.md @@ -0,0 +1,12 @@ +# AccountProvisioningPagination + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Last** | **string** | The last item returned |[optional] +**Example** | Pointer to **interface{}** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/AccountProvisioningProfile.md b/rest/api/v3/account_provisioning/docs/AccountProvisioningProfile.md new file mode 100644 index 00000000..9f5c6154 --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/AccountProvisioningProfile.md @@ -0,0 +1,17 @@ +# AccountProvisioningProfile + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstName** | **string** | First name of the account holder |[optional] +**LastName** | **string** | Last name of the account holder |[optional] +**CompanyName** | **string** | Company name of the account holder |[optional] +**CompanyWebsite** | **string** | Company website of the account holder |[optional] +**Email** | **string** | Email of the account holder |[optional] +**Phone** | **string** | Phone number with a maximum of fifteen digits formatted using the E.164 standard consisting of [+] [country code] [subscriber number including area code] |[optional] +**Timezone** | **string** | Area/Location as listed in the [IANA Time Zone database](https://www.iana.org/time-zones) |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/AccountProvisioningStateRead.md b/rest/api/v3/account_provisioning/docs/AccountProvisioningStateRead.md new file mode 100644 index 00000000..8d2164df --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/AccountProvisioningStateRead.md @@ -0,0 +1,11 @@ +# AccountProvisioningStateRead + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | [**State**](State.md) | The state of the account (e.g., `activated`, `deactivated`, `suspended`, `banned`, or `indeterminate`) | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/AccountProvisioningStateWrite.md b/rest/api/v3/account_provisioning/docs/AccountProvisioningStateWrite.md new file mode 100644 index 00000000..e0e3fdae --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/AccountProvisioningStateWrite.md @@ -0,0 +1,11 @@ +# AccountProvisioningStateWrite + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**State** | [**State1**](State1.md) | The state of the account (e.g., `activated`, `deactivated`) | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/AuthenticateAccount.md b/rest/api/v3/account_provisioning/docs/AuthenticateAccount.md new file mode 100644 index 00000000..c4d769bc --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/AuthenticateAccount.md @@ -0,0 +1,51 @@ +# AuthenticateAccount + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AuthenticateAccount**](AuthenticateAccount.md#AuthenticateAccount) | **Post** /v3/partners/accounts/{AccountID}/sso | Authenticate an account with single sign on + + + +## AuthenticateAccount + +> AuthenticateAccount(ctx, AccountID) + +Authenticate an account with single sign on + +Authenticates and logs in a user to Twilio Sendgrid as a specific admin identity configured for SSO by partner. Any additional teammates or subusers will need to log in directly via app.sendgrid.com + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountID** | **string** | Twilio SendGrid account ID + +### Other Parameters + +Other parameters are passed through a pointer to a AuthenticateAccountParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/account_provisioning/docs/CatalogEntry.md b/rest/api/v3/account_provisioning/docs/CatalogEntry.md new file mode 100644 index 00000000..b9c58b86 --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/CatalogEntry.md @@ -0,0 +1,12 @@ +# CatalogEntry + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Offering** | [**AccountProvisioningOfferingV1**](AccountProvisioningOfferingV1.md) | |[optional] +**Entitlements** | [**CatalogEntryEntitlements**](CatalogEntryEntitlements.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/CatalogEntryEntitlements.md b/rest/api/v3/account_provisioning/docs/CatalogEntryEntitlements.md new file mode 100644 index 00000000..295aba0e --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/CatalogEntryEntitlements.md @@ -0,0 +1,14 @@ +# CatalogEntryEntitlements + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EmailSendsMaxMonthly** | **int64** | Total number of email sends per month |[optional] +**IpCount** | **int64** | Number of dedicated IPs offered |[optional] +**TeammatesMaxTotal** | **int64** | Total number of teammates allowed |[optional] +**UsersMaxTotal** | **int64** | Total number of subusers allowed |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/CreateAccount.md b/rest/api/v3/account_provisioning/docs/CreateAccount.md new file mode 100644 index 00000000..ecbf0664 --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/CreateAccount.md @@ -0,0 +1,48 @@ +# CreateAccount + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateAccount**](CreateAccount.md#CreateAccount) | **Post** /v3/partners/accounts | Create an account + + + +## CreateAccount + +> AccountProvisioningAccountId CreateAccount(ctx, CreateAccountParamsoptional) + +Create an account + +Creates a new account, with specified offering, under the organization. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateAccountParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**TTestAccount** | **string** | **OPTIONAL** Custom request header provided ONLY for a test account + +### Return type + +[**AccountProvisioningAccountId**](AccountProvisioningAccountId.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/account_provisioning/docs/CreateAccountParams.md b/rest/api/v3/account_provisioning/docs/CreateAccountParams.md new file mode 100644 index 00000000..0770960f --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/CreateAccountParams.md @@ -0,0 +1,12 @@ +# CreateAccountParams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Profile** | [**AccountProvisioningProfile**](AccountProvisioningProfile.md) | |[optional] +**Offerings** | [**[]AccountProvisioningOfferingV1**](AccountProvisioningOfferingV1.md) | List of offering names to assign to account. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/DeleteAccount.md b/rest/api/v3/account_provisioning/docs/DeleteAccount.md new file mode 100644 index 00000000..56c25b9b --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/DeleteAccount.md @@ -0,0 +1,51 @@ +# DeleteAccount + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteAccount**](DeleteAccount.md#DeleteAccount) | **Delete** /v3/partners/accounts/{AccountID} | Delete an account + + + +## DeleteAccount + +> DeleteAccount(ctx, AccountID) + +Delete an account + +Delete a specific account under your organization by account ID. Note that this is an **irreversible** action that does the following: - Revokes API Keys and SSO so that the account user cannot log in or access SendGrid data. - Removes all offerings and configured SendGrid resources such as dedicated IPs. - Cancels billing effective immediately. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountID** | **string** | Twilio SendGrid account ID + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteAccountParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/account_provisioning/docs/ErrorResponse.md b/rest/api/v3/account_provisioning/docs/ErrorResponse.md new file mode 100644 index 00000000..976ef82d --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/ErrorResponse.md @@ -0,0 +1,13 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | The message representing the error from the API. | +**Field** | **string** | The field associated with the error. | +**ErrorId** | **string** | ID representing the error as a unique nubmer. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/GetAccountState.md b/rest/api/v3/account_provisioning/docs/GetAccountState.md new file mode 100644 index 00000000..72f545d0 --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/GetAccountState.md @@ -0,0 +1,51 @@ +# GetAccountState + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetAccountState**](GetAccountState.md#GetAccountState) | **Get** /v3/partners/accounts/{AccountID}/state | Get an account's state + + + +## GetAccountState + +> AccountProvisioningStateRead GetAccountState(ctx, AccountID) + +Get an account's state + +Retrieve the state of the specified account. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountID** | **string** | Twilio SendGrid account ID + +### Other Parameters + +Other parameters are passed through a pointer to a GetAccountStateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**AccountProvisioningStateRead**](AccountProvisioningStateRead.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/account_provisioning/docs/ListAccount.md b/rest/api/v3/account_provisioning/docs/ListAccount.md new file mode 100644 index 00000000..08835e00 --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/ListAccount.md @@ -0,0 +1,49 @@ +# ListAccount + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListAccount**](ListAccount.md#ListAccount) | **Get** /v3/partners/accounts | Get all accounts + + + +## ListAccount + +> AccountList ListAccount(ctx, optional) + +Get all accounts + +Retrieves all accounts under the organization. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListAccountParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Offset** | **string** | The last item successfully retrieved +**Limit** | **int32** | The number of items to return + +### Return type + +[**AccountList**](AccountList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/account_provisioning/docs/ListAccountOffering.md b/rest/api/v3/account_provisioning/docs/ListAccountOffering.md new file mode 100644 index 00000000..dfcc05e9 --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/ListAccountOffering.md @@ -0,0 +1,51 @@ +# ListAccountOffering + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListAccountOffering**](ListAccountOffering.md#ListAccountOffering) | **Get** /v3/partners/accounts/{AccountID}/offerings | Get account offerings + + + +## ListAccountOffering + +> AccountProvisioningOfferingList ListAccountOffering(ctx, AccountID) + +Get account offerings + +Retrieves offering information about the specified account. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountID** | **string** | Twilio SendGrid account ID + +### Other Parameters + +Other parameters are passed through a pointer to a ListAccountOfferingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**AccountProvisioningOfferingList**](AccountProvisioningOfferingList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/account_provisioning/docs/ListOffering.md b/rest/api/v3/account_provisioning/docs/ListOffering.md new file mode 100644 index 00000000..7f8f7f4d --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/ListOffering.md @@ -0,0 +1,44 @@ +# ListOffering + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListOffering**](ListOffering.md#ListOffering) | **Get** /v3/partners/offerings | Get all available offerings + + + +## ListOffering + +> AccountProvisioningCatalog ListOffering(ctx, ) + +Get all available offerings + +Retrieves offerings available under the organization. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListOfferingParams struct + + +### Return type + +[**AccountProvisioningCatalog**](AccountProvisioningCatalog.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/account_provisioning/docs/OfferingsToAdd.md b/rest/api/v3/account_provisioning/docs/OfferingsToAdd.md new file mode 100644 index 00000000..331a737f --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/OfferingsToAdd.md @@ -0,0 +1,11 @@ +# OfferingsToAdd + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Offerings** | [**[]AccountProvisioningOfferingV1**](AccountProvisioningOfferingV1.md) | List of offerings to assign to account. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/State.md b/rest/api/v3/account_provisioning/docs/State.md new file mode 100644 index 00000000..e6eafdea --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/State.md @@ -0,0 +1,16 @@ +# State + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**ACTIVATED** | string | (value: `"activated"`) +**DEACTIVATED** | string | (value: `"deactivated"`) +**SUSPENDED** | string | (value: `"suspended"`) +**BANNED** | string | (value: `"banned"`) +**INDETERMINATE** | string | (value: `"indeterminate"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/State1.md b/rest/api/v3/account_provisioning/docs/State1.md new file mode 100644 index 00000000..ef3ce852 --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/State1.md @@ -0,0 +1,13 @@ +# State1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**ACTIVATED** | string | (value: `"activated"`) +**DEACTIVATED** | string | (value: `"deactivated"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/Type.md b/rest/api/v3/account_provisioning/docs/Type.md new file mode 100644 index 00000000..f07e195a --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/Type.md @@ -0,0 +1,13 @@ +# Type + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**PACKAGE** | string | (value: `"package"`) +**ADDON** | string | (value: `"addon"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/account_provisioning/docs/UpdateAccountOffering.md b/rest/api/v3/account_provisioning/docs/UpdateAccountOffering.md new file mode 100644 index 00000000..2e4299a3 --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/UpdateAccountOffering.md @@ -0,0 +1,51 @@ +# UpdateAccountOffering + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateAccountOffering**](UpdateAccountOffering.md#UpdateAccountOffering) | **Put** /v3/partners/accounts/{AccountID}/offerings | Update account offerings + + + +## UpdateAccountOffering + +> AccountProvisioningOfferingList UpdateAccountOffering(ctx, AccountIDOfferingsToAdd) + +Update account offerings + +Changes a package offering for the specified account. Please note that an account can have only one package offering. Also associates one or more add-on offerings such as Marketing Campaigns, Dedicated IP Addresses, and Expert Services to the specified account. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountID** | **string** | Twilio SendGrid account ID + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateAccountOfferingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**AccountProvisioningOfferingList**](AccountProvisioningOfferingList.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/account_provisioning/docs/UpdateAccountState.md b/rest/api/v3/account_provisioning/docs/UpdateAccountState.md new file mode 100644 index 00000000..c8a82904 --- /dev/null +++ b/rest/api/v3/account_provisioning/docs/UpdateAccountState.md @@ -0,0 +1,51 @@ +# UpdateAccountState + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateAccountState**](UpdateAccountState.md#UpdateAccountState) | **Put** /v3/partners/accounts/{AccountID}/state | Update an account's state + + + +## UpdateAccountState + +> UpdateAccountState(ctx, AccountIDAccountProvisioningStateWrite) + +Update an account's state + +Update the state of the specified account. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AccountID** | **string** | Twilio SendGrid account ID + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateAccountStateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/account_provisioning/model_account_list.go b/rest/api/v3/account_provisioning/model_account_list.go new file mode 100644 index 00000000..59f5e79d --- /dev/null +++ b/rest/api/v3/account_provisioning/model_account_list.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AccountList struct for AccountList +type AccountList struct { + // List of account objects. + Accounts *[]AccountProvisioningAccount `json:"accounts,omitempty"` + Pages *AccountProvisioningPagination `json:"pages,omitempty"` +} diff --git a/rest/api/v3/account_provisioning/model_account_provisioning_account.go b/rest/api/v3/account_provisioning/model_account_provisioning_account.go new file mode 100644 index 00000000..bcbe2fdb --- /dev/null +++ b/rest/api/v3/account_provisioning/model_account_provisioning_account.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "time" +) + +// AccountProvisioningAccount struct for AccountProvisioningAccount +type AccountProvisioningAccount struct { + // Twilio SendGrid account ID + Id string `json:"id"` + // Timestamp indicating when the account was created. Format is [RFC3339](https://datatracker.ietf.org/doc/html/rfc3339) + CreatedAt time.Time `json:"created_at"` +} diff --git a/rest/api/v3/account_provisioning/model_account_provisioning_account_id.go b/rest/api/v3/account_provisioning/model_account_provisioning_account_id.go new file mode 100644 index 00000000..c73f6222 --- /dev/null +++ b/rest/api/v3/account_provisioning/model_account_provisioning_account_id.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AccountProvisioningAccountId struct for AccountProvisioningAccountId +type AccountProvisioningAccountId struct { + // Twilio SendGrid account ID + AccountId string `json:"account_id"` +} diff --git a/rest/api/v3/account_provisioning/model_account_provisioning_catalog.go b/rest/api/v3/account_provisioning/model_account_provisioning_catalog.go new file mode 100644 index 00000000..717c1073 --- /dev/null +++ b/rest/api/v3/account_provisioning/model_account_provisioning_catalog.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AccountProvisioningCatalog struct for AccountProvisioningCatalog +type AccountProvisioningCatalog struct { + Catalog *[]CatalogEntry `json:"catalog,omitempty"` +} diff --git a/rest/api/v3/account_provisioning/model_account_provisioning_offering_list.go b/rest/api/v3/account_provisioning/model_account_provisioning_offering_list.go new file mode 100644 index 00000000..2381fe06 --- /dev/null +++ b/rest/api/v3/account_provisioning/model_account_provisioning_offering_list.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AccountProvisioningOfferingList struct for AccountProvisioningOfferingList +type AccountProvisioningOfferingList struct { + Offerings *[]AccountProvisioningOfferingV1 `json:"offerings,omitempty"` +} diff --git a/rest/api/v3/account_provisioning/model_account_provisioning_offering_v1.go b/rest/api/v3/account_provisioning/model_account_provisioning_offering_v1.go new file mode 100644 index 00000000..e3652f95 --- /dev/null +++ b/rest/api/v3/account_provisioning/model_account_provisioning_offering_v1.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AccountProvisioningOfferingV1 An offering is a package (email infrastructure) or add-on (marketing campaigns, dedicated IP addresses, EASE) that an account can acquire. Each offering has a list of entitlements that indicate the benefits the account receives from the acquisition. +type AccountProvisioningOfferingV1 struct { + // Name of the offering + Name string `json:"name"` + // Defines the type of offering (e.g., package or addon). + Type Type `json:"type"` + // Quantity of the specified addon to be added. If offering type is `package`, quantity must be 1. + Quantity *int64 `json:"quantity,omitempty"` +} diff --git a/rest/api/v3/account_provisioning/model_account_provisioning_pagination.go b/rest/api/v3/account_provisioning/model_account_provisioning_pagination.go new file mode 100644 index 00000000..a4f93bf0 --- /dev/null +++ b/rest/api/v3/account_provisioning/model_account_provisioning_pagination.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AccountProvisioningPagination struct for AccountProvisioningPagination +type AccountProvisioningPagination struct { + // The last item returned + Last *string `json:"last,omitempty"` + Example *interface{} `json:"example,omitempty"` +} diff --git a/rest/api/v3/account_provisioning/model_account_provisioning_profile.go b/rest/api/v3/account_provisioning/model_account_provisioning_profile.go new file mode 100644 index 00000000..c352a637 --- /dev/null +++ b/rest/api/v3/account_provisioning/model_account_provisioning_profile.go @@ -0,0 +1,32 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AccountProvisioningProfile struct for AccountProvisioningProfile +type AccountProvisioningProfile struct { + // First name of the account holder + FirstName *string `json:"first_name,omitempty"` + // Last name of the account holder + LastName *string `json:"last_name,omitempty"` + // Company name of the account holder + CompanyName *string `json:"company_name,omitempty"` + // Company website of the account holder + CompanyWebsite *string `json:"company_website,omitempty"` + // Email of the account holder + Email *string `json:"email,omitempty"` + // Phone number with a maximum of fifteen digits formatted using the E.164 standard consisting of [+] [country code] [subscriber number including area code] + Phone *string `json:"phone,omitempty"` + // Area/Location as listed in the [IANA Time Zone database](https://www.iana.org/time-zones) + Timezone *string `json:"timezone,omitempty"` +} diff --git a/rest/api/v3/account_provisioning/model_account_provisioning_state_read.go b/rest/api/v3/account_provisioning/model_account_provisioning_state_read.go new file mode 100644 index 00000000..84d25d48 --- /dev/null +++ b/rest/api/v3/account_provisioning/model_account_provisioning_state_read.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AccountProvisioningStateRead struct for AccountProvisioningStateRead +type AccountProvisioningStateRead struct { + // The state of the account (e.g., `activated`, `deactivated`, `suspended`, `banned`, or `indeterminate`) + State State `json:"state"` +} diff --git a/rest/api/v3/account_provisioning/model_account_provisioning_state_write.go b/rest/api/v3/account_provisioning/model_account_provisioning_state_write.go new file mode 100644 index 00000000..625284be --- /dev/null +++ b/rest/api/v3/account_provisioning/model_account_provisioning_state_write.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AccountProvisioningStateWrite struct for AccountProvisioningStateWrite +type AccountProvisioningStateWrite struct { + // The state of the account (e.g., `activated`, `deactivated`) + State State1 `json:"state"` +} diff --git a/rest/api/v3/account_provisioning/model_catalog_entry.go b/rest/api/v3/account_provisioning/model_catalog_entry.go new file mode 100644 index 00000000..b488d947 --- /dev/null +++ b/rest/api/v3/account_provisioning/model_catalog_entry.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CatalogEntry struct for CatalogEntry +type CatalogEntry struct { + Offering *AccountProvisioningOfferingV1 `json:"offering,omitempty"` + Entitlements *CatalogEntryEntitlements `json:"entitlements,omitempty"` +} diff --git a/rest/api/v3/account_provisioning/model_catalog_entry_entitlements.go b/rest/api/v3/account_provisioning/model_catalog_entry_entitlements.go new file mode 100644 index 00000000..841d6738 --- /dev/null +++ b/rest/api/v3/account_provisioning/model_catalog_entry_entitlements.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CatalogEntryEntitlements Set of entitlements the specified offering comes with +type CatalogEntryEntitlements struct { + // Total number of email sends per month + EmailSendsMaxMonthly *int64 `json:"email_sends_max_monthly,omitempty"` + // Number of dedicated IPs offered + IpCount *int64 `json:"ip_count,omitempty"` + // Total number of teammates allowed + TeammatesMaxTotal *int64 `json:"teammates_max_total,omitempty"` + // Total number of subusers allowed + UsersMaxTotal *int64 `json:"users_max_total,omitempty"` +} diff --git a/rest/api/v3/account_provisioning/model_create_account_params.go b/rest/api/v3/account_provisioning/model_create_account_params.go new file mode 100644 index 00000000..dd953c68 --- /dev/null +++ b/rest/api/v3/account_provisioning/model_create_account_params.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateAccountParams struct for CreateAccountParams +type CreateAccountParams struct { + Profile *AccountProvisioningProfile `json:"profile,omitempty"` + // List of offering names to assign to account. + Offerings []AccountProvisioningOfferingV1 `json:"offerings"` +} diff --git a/rest/api/v3/account_provisioning/model_error_response.go b/rest/api/v3/account_provisioning/model_error_response.go new file mode 100644 index 00000000..553b37fa --- /dev/null +++ b/rest/api/v3/account_provisioning/model_error_response.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + // The message representing the error from the API. + Message string `json:"message"` + // The field associated with the error. + Field string `json:"field"` + // ID representing the error as a unique nubmer. + ErrorId string `json:"error_id"` +} diff --git a/rest/api/v3/account_provisioning/model_offerings_to_add.go b/rest/api/v3/account_provisioning/model_offerings_to_add.go new file mode 100644 index 00000000..8913aff0 --- /dev/null +++ b/rest/api/v3/account_provisioning/model_offerings_to_add.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// OfferingsToAdd struct for OfferingsToAdd +type OfferingsToAdd struct { + // List of offerings to assign to account. + Offerings []AccountProvisioningOfferingV1 `json:"offerings"` +} diff --git a/rest/api/v3/account_provisioning/model_state.go b/rest/api/v3/account_provisioning/model_state.go new file mode 100644 index 00000000..b9deec05 --- /dev/null +++ b/rest/api/v3/account_provisioning/model_state.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// State the model 'State' +type State string + +// List of State +const ( + STATE_ACTIVATED State = "activated" + STATE_DEACTIVATED State = "deactivated" + STATE_SUSPENDED State = "suspended" + STATE_BANNED State = "banned" + STATE_INDETERMINATE State = "indeterminate" +) diff --git a/rest/api/v3/account_provisioning/model_state1.go b/rest/api/v3/account_provisioning/model_state1.go new file mode 100644 index 00000000..16b6afaf --- /dev/null +++ b/rest/api/v3/account_provisioning/model_state1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// State1 the model 'State1' +type State1 string + +// List of State1 +const ( + STATE1_ACTIVATED State1 = "activated" + STATE1_DEACTIVATED State1 = "deactivated" +) diff --git a/rest/api/v3/account_provisioning/model_type.go b/rest/api/v3/account_provisioning/model_type.go new file mode 100644 index 00000000..8b89c8bf --- /dev/null +++ b/rest/api/v3/account_provisioning/model_type.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Account Provisioning API +* The Twilio SendGrid Account Provisioning API provides a platform for Twilio SendGrid resellers to manage their customer accounts. This API is for companies that have a formal reseller partnership with Twilio SendGrid. You can access Twilio SendGrid sub-account functionality without becoming a reseller. If you require sub-account functionality, see the Twilio [SendGrid Subusers](https://docs.sendgrid.com/ui/account-and-settings/subusers) feature, which is available with [Pro and Premier plans](https://sendgrid.com/pricing/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Type the model 'Type' +type Type string + +// List of Type +const ( + TYPE_PACKAGE Type = "package" + TYPE_ADDON Type = "addon" +) diff --git a/rest/api/v3/alerts/README.md b/rest/api/v3/alerts/README.md new file mode 100644 index 00000000..dac97bea --- /dev/null +++ b/rest/api/v3/alerts/README.md @@ -0,0 +1,77 @@ +# Go API client for + +The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. + +For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:01.491895+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateAlert* | [**CreateAlert**](docs/CreateAlert.md#createalert) | **Post** /v3/alerts | Create a new Alert +*DeleteAlert* | [**DeleteAlert**](docs/DeleteAlert.md#deletealert) | **Delete** /v3/alerts/{AlertId} | Delete an alert +*GetAlert* | [**GetAlert**](docs/GetAlert.md#getalert) | **Get** /v3/alerts/{AlertId} | Retrieve a specific alert +*ListAlert* | [**ListAlert**](docs/ListAlert.md#listalert) | **Get** /v3/alerts | Retrieve all alerts +*UpdateAlert* | [**UpdateAlert**](docs/UpdateAlert.md#updatealert) | **Patch** /v3/alerts/{AlertId} | Update an alert + + +## Documentation For Models + + - [CreateAlert201Response](CreateAlert201Response.md) + - [CreateAlertRequest](CreateAlertRequest.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [GetAlert200Response](GetAlert200Response.md) + - [ListAlert200ResponseInner](ListAlert200ResponseInner.md) + - [Type](Type.md) + - [Type1](Type1.md) + - [Type2](Type2.md) + - [Type3](Type3.md) + - [UpdateAlert200Response](UpdateAlert200Response.md) + - [UpdateAlertRequest](UpdateAlertRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/alerts/api_create_alert.go b/rest/api/v3/alerts/api_create_alert.go new file mode 100644 index 00000000..c6394105 --- /dev/null +++ b/rest/api/v3/alerts/api_create_alert.go @@ -0,0 +1,82 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateAlertParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + CreateAlertRequest *CreateAlertRequest `json:"CreateAlertRequest,omitempty"` +} + +func (params *CreateAlertParam) SetOnbehalfof(Onbehalfof string) *CreateAlertParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateAlertParam) SetCreateAlertRequest(CreateAlertRequest CreateAlertRequest) *CreateAlertParam { + params.CreateAlertRequest = &CreateAlertRequest + return params +} + +// **This endpoint allows you to create a new alert.** +func (c *ApiService) CreateAlert(params *CreateAlertParam) (interface{}, error) { + path := "/v3/alerts" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateAlertRequest != nil { + b, err := json.Marshal(*params.CreateAlertRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &CreateAlert201Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/alerts/api_delete_alert.go b/rest/api/v3/alerts/api_delete_alert.go new file mode 100644 index 00000000..8fd4ccf2 --- /dev/null +++ b/rest/api/v3/alerts/api_delete_alert.go @@ -0,0 +1,62 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "fmt" + "net/http" + "net/url" + + "strings" +) + +type DeleteAlertParam struct { + // The ID of the alert you would like to retrieve. + AlertId *int32 `json:"alert_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteAlertParam) SetAlertId(AlertId int32) *DeleteAlertParam { + params.AlertId = &AlertId + return params +} +func (params *DeleteAlertParam) SetOnbehalfof(Onbehalfof string) *DeleteAlertParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete an alert.** +func (c *ApiService) DeleteAlert(params *DeleteAlertParam) (interface{}, error) { + path := "/v3/alerts/{AlertId}" + if params != nil && params.AlertId != nil { + path = strings.Replace(path, "{"+"AlertId"+"}", fmt.Sprint(*params.AlertId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/alerts/api_get_alert.go b/rest/api/v3/alerts/api_get_alert.go new file mode 100644 index 00000000..2438b7c9 --- /dev/null +++ b/rest/api/v3/alerts/api_get_alert.go @@ -0,0 +1,71 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type GetAlertParam struct { + // The ID of the alert you would like to retrieve. + AlertId *int32 `json:"alert_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetAlertParam) SetAlertId(AlertId int32) *GetAlertParam { + params.AlertId = &AlertId + return params +} +func (params *GetAlertParam) SetOnbehalfof(Onbehalfof string) *GetAlertParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a specific alert.** +func (c *ApiService) GetAlert(params *GetAlertParam) (interface{}, error) { + path := "/v3/alerts/{AlertId}" + if params != nil && params.AlertId != nil { + path = strings.Replace(path, "{"+"AlertId"+"}", fmt.Sprint(*params.AlertId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetAlert200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/alerts/api_list_alert.go b/rest/api/v3/alerts/api_list_alert.go new file mode 100644 index 00000000..15c6a8de --- /dev/null +++ b/rest/api/v3/alerts/api_list_alert.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListAlertParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListAlertParam) SetOnbehalfof(Onbehalfof string) *ListAlertParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve all of your alerts.** +func (c *ApiService) ListAlert(params *ListAlertParam) (interface{}, error) { + path := "/v3/alerts" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListAlert200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/alerts/api_service.go b/rest/api/v3/alerts/api_service.go new file mode 100644 index 00000000..79301822 --- /dev/null +++ b/rest/api/v3/alerts/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/alerts/api_update_alert.go b/rest/api/v3/alerts/api_update_alert.go new file mode 100644 index 00000000..9d3ed489 --- /dev/null +++ b/rest/api/v3/alerts/api_update_alert.go @@ -0,0 +1,86 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type UpdateAlertParam struct { + // The ID of the alert you would like to retrieve. + AlertId *int32 `json:"alert_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateAlertRequest *UpdateAlertRequest `json:"UpdateAlertRequest,omitempty"` +} + +func (params *UpdateAlertParam) SetAlertId(AlertId int32) *UpdateAlertParam { + params.AlertId = &AlertId + return params +} +func (params *UpdateAlertParam) SetOnbehalfof(Onbehalfof string) *UpdateAlertParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateAlertParam) SetUpdateAlertRequest(UpdateAlertRequest UpdateAlertRequest) *UpdateAlertParam { + params.UpdateAlertRequest = &UpdateAlertRequest + return params +} + +// **This endpoint allows you to update an alert.** +func (c *ApiService) UpdateAlert(params *UpdateAlertParam) (interface{}, error) { + path := "/v3/alerts/{AlertId}" + if params != nil && params.AlertId != nil { + path = strings.Replace(path, "{"+"AlertId"+"}", fmt.Sprint(*params.AlertId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateAlertRequest != nil { + b, err := json.Marshal(*params.UpdateAlertRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &UpdateAlert200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/alerts/docs/CreateAlert.md b/rest/api/v3/alerts/docs/CreateAlert.md new file mode 100644 index 00000000..5b8a4c69 --- /dev/null +++ b/rest/api/v3/alerts/docs/CreateAlert.md @@ -0,0 +1,49 @@ +# CreateAlert + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateAlert**](CreateAlert.md#CreateAlert) | **Post** /v3/alerts | Create a new Alert + + + +## CreateAlert + +> CreateAlert201Response CreateAlert(ctx, optional) + +Create a new Alert + +**This endpoint allows you to create a new alert.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateAlertParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**CreateAlertRequest** | [**CreateAlertRequest**](CreateAlertRequest.md) | + +### Return type + +[**CreateAlert201Response**](CreateAlert201Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/alerts/docs/CreateAlert201Response.md b/rest/api/v3/alerts/docs/CreateAlert201Response.md new file mode 100644 index 00000000..8d9fce20 --- /dev/null +++ b/rest/api/v3/alerts/docs/CreateAlert201Response.md @@ -0,0 +1,17 @@ +# CreateAlert201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | **int32** | A Unix timestamp indicating when the alert was created. | +**EmailTo** | **string** | The email address that the alert will be sent to. | +**Frequency** | **string** | If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent. For example, \"daily\", \"weekly\", or \"monthly\". |[optional] +**Id** | **int32** | The ID of the alert. | +**Type** | **string** | The type of alert. | +**UpdatedAt** | **int32** | A Unix timestamp indicating when the alert was last modified. | +**Percentage** | **int32** | If the alert is of type `usage_limit`, this indicates the percentage of email usage that must be reached before the alert will be sent. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/alerts/docs/CreateAlertRequest.md b/rest/api/v3/alerts/docs/CreateAlertRequest.md new file mode 100644 index 00000000..b043fc6a --- /dev/null +++ b/rest/api/v3/alerts/docs/CreateAlertRequest.md @@ -0,0 +1,14 @@ +# CreateAlertRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | [**Type**](Type.md) | The type of alert you want to create. Can be either usage_limit or stats_notification. Example: usage_limit | +**EmailTo** | **string** | The email address the alert will be sent to. Example: test@example.com | +**Frequency** | **string** | Required for stats_notification. How frequently the alert will be sent. Example: daily |[optional] +**Percentage** | **int32** | Required for usage_limit. When this usage threshold is reached, the alert will be sent. Example: 90 |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/alerts/docs/DeleteAlert.md b/rest/api/v3/alerts/docs/DeleteAlert.md new file mode 100644 index 00000000..ba62219b --- /dev/null +++ b/rest/api/v3/alerts/docs/DeleteAlert.md @@ -0,0 +1,52 @@ +# DeleteAlert + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteAlert**](DeleteAlert.md#DeleteAlert) | **Delete** /v3/alerts/{AlertId} | Delete an alert + + + +## DeleteAlert + +> DeleteAlert(ctx, AlertIdoptional) + +Delete an alert + +**This endpoint allows you to delete an alert.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AlertId** | **int32** | The ID of the alert you would like to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteAlertParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/alerts/docs/ErrorResponse.md b/rest/api/v3/alerts/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/alerts/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/alerts/docs/ErrorResponseErrorsInner.md b/rest/api/v3/alerts/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/alerts/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/alerts/docs/GetAlert.md b/rest/api/v3/alerts/docs/GetAlert.md new file mode 100644 index 00000000..345075a6 --- /dev/null +++ b/rest/api/v3/alerts/docs/GetAlert.md @@ -0,0 +1,52 @@ +# GetAlert + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetAlert**](GetAlert.md#GetAlert) | **Get** /v3/alerts/{AlertId} | Retrieve a specific alert + + + +## GetAlert + +> GetAlert200Response GetAlert(ctx, AlertIdoptional) + +Retrieve a specific alert + +**This endpoint allows you to retrieve a specific alert.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AlertId** | **int32** | The ID of the alert you would like to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetAlertParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**GetAlert200Response**](GetAlert200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/alerts/docs/GetAlert200Response.md b/rest/api/v3/alerts/docs/GetAlert200Response.md new file mode 100644 index 00000000..4ea6ac01 --- /dev/null +++ b/rest/api/v3/alerts/docs/GetAlert200Response.md @@ -0,0 +1,17 @@ +# GetAlert200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | **int32** | A Unix timestamp indicating when the alert was created. | +**EmailTo** | **string** | The email address that the alert will be sent to. | +**Frequency** | **string** | If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent. For example: \"daily\", \"weekly\", or \"monthly\". |[optional] +**Id** | **int32** | The ID of the alert. | +**Type** | [**Type2**](Type2.md) | The type of alert. | +**UpdatedAt** | **int32** | A Unix timestamp indicating when the alert was last modified. | +**Percentage** | **int32** | If the alert is of type usage_limit, this indicates the percentage of email usage that must be reached before the alert will be sent. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/alerts/docs/ListAlert.md b/rest/api/v3/alerts/docs/ListAlert.md new file mode 100644 index 00000000..9996e4cd --- /dev/null +++ b/rest/api/v3/alerts/docs/ListAlert.md @@ -0,0 +1,48 @@ +# ListAlert + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListAlert**](ListAlert.md#ListAlert) | **Get** /v3/alerts | Retrieve all alerts + + + +## ListAlert + +> []ListAlert200ResponseInner ListAlert(ctx, optional) + +Retrieve all alerts + +**This endpoint allows you to retrieve all of your alerts.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListAlertParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**[]ListAlert200ResponseInner**](ListAlert200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/alerts/docs/ListAlert200ResponseInner.md b/rest/api/v3/alerts/docs/ListAlert200ResponseInner.md new file mode 100644 index 00000000..a078cc54 --- /dev/null +++ b/rest/api/v3/alerts/docs/ListAlert200ResponseInner.md @@ -0,0 +1,17 @@ +# ListAlert200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | **int32** | A Unix timestamp indicating when the alert was created. | +**EmailTo** | **string** | The email address that the alert will be sent to. | +**Id** | **int32** | The ID of the alert. | +**Percentage** | **int32** | If the alert is of type usage_limit, this indicates the percentage of email usage that must be reached before the alert will be sent. |[optional] +**Type** | [**Type1**](Type1.md) | The type of alert. | +**UpdatedAt** | **int32** | A Unix timestamp indicating when the alert was last modified. |[optional] +**Frequency** | **string** | If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent. For example, \"daily\", \"weekly\", or \"monthly\". |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/alerts/docs/Type.md b/rest/api/v3/alerts/docs/Type.md new file mode 100644 index 00000000..31653d8d --- /dev/null +++ b/rest/api/v3/alerts/docs/Type.md @@ -0,0 +1,13 @@ +# Type + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**STATS_NOTIFICATION** | string | (value: `"stats_notification"`) +**USAGE_LIMIT** | string | (value: `"usage_limit"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/alerts/docs/Type1.md b/rest/api/v3/alerts/docs/Type1.md new file mode 100644 index 00000000..6ae1d3bf --- /dev/null +++ b/rest/api/v3/alerts/docs/Type1.md @@ -0,0 +1,13 @@ +# Type1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**USAGE_LIMIT** | string | (value: `"usage_limit"`) +**STATS_NOTIFICATION** | string | (value: `"stats_notification"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/alerts/docs/Type2.md b/rest/api/v3/alerts/docs/Type2.md new file mode 100644 index 00000000..54da2c21 --- /dev/null +++ b/rest/api/v3/alerts/docs/Type2.md @@ -0,0 +1,13 @@ +# Type2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**USAGE_LIMIT** | string | (value: `"usage_limit"`) +**STATS_NOTIFICATION** | string | (value: `"stats_notification"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/alerts/docs/Type3.md b/rest/api/v3/alerts/docs/Type3.md new file mode 100644 index 00000000..60187fd5 --- /dev/null +++ b/rest/api/v3/alerts/docs/Type3.md @@ -0,0 +1,13 @@ +# Type3 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**USAGE_LIMIT** | string | (value: `"usage_limit"`) +**STATS_NOTIFICATION** | string | (value: `"stats_notification"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/alerts/docs/UpdateAlert.md b/rest/api/v3/alerts/docs/UpdateAlert.md new file mode 100644 index 00000000..85acdfc3 --- /dev/null +++ b/rest/api/v3/alerts/docs/UpdateAlert.md @@ -0,0 +1,53 @@ +# UpdateAlert + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateAlert**](UpdateAlert.md#UpdateAlert) | **Patch** /v3/alerts/{AlertId} | Update an alert + + + +## UpdateAlert + +> UpdateAlert200Response UpdateAlert(ctx, AlertIdoptional) + +Update an alert + +**This endpoint allows you to update an alert.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**AlertId** | **int32** | The ID of the alert you would like to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateAlertParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateAlertRequest** | [**UpdateAlertRequest**](UpdateAlertRequest.md) | + +### Return type + +[**UpdateAlert200Response**](UpdateAlert200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/alerts/docs/UpdateAlert200Response.md b/rest/api/v3/alerts/docs/UpdateAlert200Response.md new file mode 100644 index 00000000..49e6cfb3 --- /dev/null +++ b/rest/api/v3/alerts/docs/UpdateAlert200Response.md @@ -0,0 +1,17 @@ +# UpdateAlert200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | **int32** | A Unix timestamp indicating when the alert was created. | +**EmailTo** | **string** | The email address that the alert will be sent to. | +**Frequency** | **string** | If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent. For example: \"daily\", \"weekly\", or \"monthly\". |[optional] +**Id** | **int32** | The ID of the alert. | +**Type** | [**Type3**](Type3.md) | The type of alert. | +**UpdatedAt** | **int32** | A Unix timestamp indicating when the alert was last modified. | +**Percentage** | **int32** | If the alert is of type usage_limit, this indicates the percentage of email usage that must be reached before the alert will be sent. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/alerts/docs/UpdateAlertRequest.md b/rest/api/v3/alerts/docs/UpdateAlertRequest.md new file mode 100644 index 00000000..1bb4d6f0 --- /dev/null +++ b/rest/api/v3/alerts/docs/UpdateAlertRequest.md @@ -0,0 +1,13 @@ +# UpdateAlertRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EmailTo** | **string** | The new email address you want your alert to be sent to. Example: test@example.com |[optional] +**Frequency** | **string** | The new frequency at which to send the stats_notification alert. Example: monthly |[optional] +**Percentage** | **int32** | The new percentage threshold at which the usage_limit alert will be sent. Example: 90 |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/alerts/model_create_alert_201_response.go b/rest/api/v3/alerts/model_create_alert_201_response.go new file mode 100644 index 00000000..7b4d5d87 --- /dev/null +++ b/rest/api/v3/alerts/model_create_alert_201_response.go @@ -0,0 +1,32 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateAlert201Response struct for CreateAlert201Response +type CreateAlert201Response struct { + // A Unix timestamp indicating when the alert was created. + CreatedAt int32 `json:"created_at"` + // The email address that the alert will be sent to. + EmailTo string `json:"email_to"` + // If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent. For example, \"daily\", \"weekly\", or \"monthly\". + Frequency *string `json:"frequency,omitempty"` + // The ID of the alert. + Id int32 `json:"id"` + // The type of alert. + Type string `json:"type"` + // A Unix timestamp indicating when the alert was last modified. + UpdatedAt int32 `json:"updated_at"` + // If the alert is of type `usage_limit`, this indicates the percentage of email usage that must be reached before the alert will be sent. + Percentage *int32 `json:"percentage,omitempty"` +} diff --git a/rest/api/v3/alerts/model_create_alert_request.go b/rest/api/v3/alerts/model_create_alert_request.go new file mode 100644 index 00000000..a741cf0f --- /dev/null +++ b/rest/api/v3/alerts/model_create_alert_request.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateAlertRequest struct for CreateAlertRequest +type CreateAlertRequest struct { + // The type of alert you want to create. Can be either usage_limit or stats_notification. Example: usage_limit + Type Type `json:"type"` + // The email address the alert will be sent to. Example: test@example.com + EmailTo string `json:"email_to"` + // Required for stats_notification. How frequently the alert will be sent. Example: daily + Frequency *string `json:"frequency,omitempty"` + // Required for usage_limit. When this usage threshold is reached, the alert will be sent. Example: 90 + Percentage *int32 `json:"percentage,omitempty"` +} diff --git a/rest/api/v3/alerts/model_error_response.go b/rest/api/v3/alerts/model_error_response.go new file mode 100644 index 00000000..98b54223 --- /dev/null +++ b/rest/api/v3/alerts/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/alerts/model_error_response_errors_inner.go b/rest/api/v3/alerts/model_error_response_errors_inner.go new file mode 100644 index 00000000..2cbef824 --- /dev/null +++ b/rest/api/v3/alerts/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/alerts/model_get_alert_200_response.go b/rest/api/v3/alerts/model_get_alert_200_response.go new file mode 100644 index 00000000..bc0595ff --- /dev/null +++ b/rest/api/v3/alerts/model_get_alert_200_response.go @@ -0,0 +1,32 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetAlert200Response struct for GetAlert200Response +type GetAlert200Response struct { + // A Unix timestamp indicating when the alert was created. + CreatedAt int32 `json:"created_at"` + // The email address that the alert will be sent to. + EmailTo string `json:"email_to"` + // If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent. For example: \"daily\", \"weekly\", or \"monthly\". + Frequency *string `json:"frequency,omitempty"` + // The ID of the alert. + Id int32 `json:"id"` + // The type of alert. + Type Type2 `json:"type"` + // A Unix timestamp indicating when the alert was last modified. + UpdatedAt int32 `json:"updated_at"` + // If the alert is of type usage_limit, this indicates the percentage of email usage that must be reached before the alert will be sent. + Percentage *int32 `json:"percentage,omitempty"` +} diff --git a/rest/api/v3/alerts/model_list_alert_200_response_inner.go b/rest/api/v3/alerts/model_list_alert_200_response_inner.go new file mode 100644 index 00000000..06751c6c --- /dev/null +++ b/rest/api/v3/alerts/model_list_alert_200_response_inner.go @@ -0,0 +1,32 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListAlert200ResponseInner struct for ListAlert200ResponseInner +type ListAlert200ResponseInner struct { + // A Unix timestamp indicating when the alert was created. + CreatedAt int32 `json:"created_at"` + // The email address that the alert will be sent to. + EmailTo string `json:"email_to"` + // The ID of the alert. + Id int32 `json:"id"` + // If the alert is of type usage_limit, this indicates the percentage of email usage that must be reached before the alert will be sent. + Percentage *int32 `json:"percentage,omitempty"` + // The type of alert. + Type Type1 `json:"type"` + // A Unix timestamp indicating when the alert was last modified. + UpdatedAt *int32 `json:"updated_at,omitempty"` + // If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent. For example, \"daily\", \"weekly\", or \"monthly\". + Frequency *string `json:"frequency,omitempty"` +} diff --git a/rest/api/v3/alerts/model_type.go b/rest/api/v3/alerts/model_type.go new file mode 100644 index 00000000..83d8da9f --- /dev/null +++ b/rest/api/v3/alerts/model_type.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Type the model 'Type' +type Type string + +// List of Type +const ( + TYPE_STATS_NOTIFICATION Type = "stats_notification" + TYPE_USAGE_LIMIT Type = "usage_limit" +) diff --git a/rest/api/v3/alerts/model_type1.go b/rest/api/v3/alerts/model_type1.go new file mode 100644 index 00000000..1c9bb449 --- /dev/null +++ b/rest/api/v3/alerts/model_type1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Type1 the model 'Type1' +type Type1 string + +// List of Type1 +const ( + TYPE1_USAGE_LIMIT Type1 = "usage_limit" + TYPE1_STATS_NOTIFICATION Type1 = "stats_notification" +) diff --git a/rest/api/v3/alerts/model_type2.go b/rest/api/v3/alerts/model_type2.go new file mode 100644 index 00000000..27b77da8 --- /dev/null +++ b/rest/api/v3/alerts/model_type2.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Type2 the model 'Type2' +type Type2 string + +// List of Type2 +const ( + TYPE2_USAGE_LIMIT Type2 = "usage_limit" + TYPE2_STATS_NOTIFICATION Type2 = "stats_notification" +) diff --git a/rest/api/v3/alerts/model_type3.go b/rest/api/v3/alerts/model_type3.go new file mode 100644 index 00000000..25e96e17 --- /dev/null +++ b/rest/api/v3/alerts/model_type3.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Type3 the model 'Type3' +type Type3 string + +// List of Type3 +const ( + TYPE3_USAGE_LIMIT Type3 = "usage_limit" + TYPE3_STATS_NOTIFICATION Type3 = "stats_notification" +) diff --git a/rest/api/v3/alerts/model_update_alert_200_response.go b/rest/api/v3/alerts/model_update_alert_200_response.go new file mode 100644 index 00000000..da9d6c62 --- /dev/null +++ b/rest/api/v3/alerts/model_update_alert_200_response.go @@ -0,0 +1,32 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateAlert200Response struct for UpdateAlert200Response +type UpdateAlert200Response struct { + // A Unix timestamp indicating when the alert was created. + CreatedAt int32 `json:"created_at"` + // The email address that the alert will be sent to. + EmailTo string `json:"email_to"` + // If the alert is of type stats_notification, this indicates how frequently the stats notifications will be sent. For example: \"daily\", \"weekly\", or \"monthly\". + Frequency *string `json:"frequency,omitempty"` + // The ID of the alert. + Id int32 `json:"id"` + // The type of alert. + Type Type3 `json:"type"` + // A Unix timestamp indicating when the alert was last modified. + UpdatedAt int32 `json:"updated_at"` + // If the alert is of type usage_limit, this indicates the percentage of email usage that must be reached before the alert will be sent. + Percentage *int32 `json:"percentage,omitempty"` +} diff --git a/rest/api/v3/alerts/model_update_alert_request.go b/rest/api/v3/alerts/model_update_alert_request.go new file mode 100644 index 00000000..3573cc14 --- /dev/null +++ b/rest/api/v3/alerts/model_update_alert_request.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Alerts API +* The Twilio SendGrid Alerts API allows you to specify an email address to receive notifications regarding your email usage or statistics. You can set up alerts to be sent to a specific email address on a recurring basis, whether for informational purposes or when specific account actions occur. For most alerts, you can choose to have the alert sent to you as needed, hourly, daily, weekly, or monthly. The information contained in your alert will be for the last period of the alert. For example, if you choose weekly for the statistics alert, you will receive the statistics for the last week. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateAlertRequest struct for UpdateAlertRequest +type UpdateAlertRequest struct { + // The new email address you want your alert to be sent to. Example: test@example.com + EmailTo *string `json:"email_to,omitempty"` + // The new frequency at which to send the stats_notification alert. Example: monthly + Frequency *string `json:"frequency,omitempty"` + // The new percentage threshold at which the usage_limit alert will be sent. Example: 90 + Percentage *int32 `json:"percentage,omitempty"` +} diff --git a/rest/api/v3/api_keys/README.md b/rest/api/v3/api_keys/README.md new file mode 100644 index 00000000..010e8385 --- /dev/null +++ b/rest/api/v3/api_keys/README.md @@ -0,0 +1,76 @@ +# Go API client for + +The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. + +To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:01.492228+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateApiKey* | [**CreateApiKey**](docs/CreateApiKey.md#createapikey) | **Post** /v3/api_keys | Create API keys +*DeleteApiKey* | [**DeleteApiKey**](docs/DeleteApiKey.md#deleteapikey) | **Delete** /v3/api_keys/{ApiKeyId} | Delete API keys +*GetApiKey* | [**GetApiKey**](docs/GetApiKey.md#getapikey) | **Get** /v3/api_keys/{ApiKeyId} | Retrieve an existing API Key +*ListApiKey* | [**ListApiKey**](docs/ListApiKey.md#listapikey) | **Get** /v3/api_keys | Retrieve all API Keys belonging to the authenticated user +*UpdateApiKey* | [**UpdateApiKey**](docs/UpdateApiKey.md#updateapikey) | **Put** /v3/api_keys/{ApiKeyId} | Update API key name and scopes +*UpdateApiKeyName* | [**UpdateApiKeyName**](docs/UpdateApiKeyName.md#updateapikeyname) | **Patch** /v3/api_keys/{ApiKeyId} | Update API key name + + +## Documentation For Models + + - [ApiKeyResponse](ApiKeyResponse.md) + - [ApiKeyScopesResponse](ApiKeyScopesResponse.md) + - [CreateApiKey201Response](CreateApiKey201Response.md) + - [CreateApiKeyRequest](CreateApiKeyRequest.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [GetApiKey200Response](GetApiKey200Response.md) + - [ListApiKey200Response](ListApiKey200Response.md) + - [UpdateApiKeyNameRequest](UpdateApiKeyNameRequest.md) + - [UpdateApiKeyRequest](UpdateApiKeyRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/api_keys/api_create_api_key.go b/rest/api/v3/api_keys/api_create_api_key.go new file mode 100644 index 00000000..df1356fe --- /dev/null +++ b/rest/api/v3/api_keys/api_create_api_key.go @@ -0,0 +1,106 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateApiKeyParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + CreateApiKeyRequest *CreateApiKeyRequest `json:"CreateApiKeyRequest,omitempty"` +} + +func (params *CreateApiKeyParam) SetOnbehalfof(Onbehalfof string) *CreateApiKeyParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateApiKeyParam) SetCreateApiKeyRequest(CreateApiKeyRequest CreateApiKeyRequest) *CreateApiKeyParam { + params.CreateApiKeyRequest = &CreateApiKeyRequest + return params +} + +// **This endpoint allows you to create a new API Key for the user.** To create your initial SendGrid API Key, you should [use the SendGrid App](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. A JSON request body containing a `name` property is required when making requests to this endpoint. If the number of maximum keys, 100, is reached, a `403` status will be returned. Though the `name` field is required, it does not need to be unique. A unique API key ID will be generated for each key you create and returned in the response body. It is not necessary to pass a `scopes` field to the API when creating a key, but you should be aware that omitting the `scopes` field from your request will create a key with \"Full Access\" permissions by default. See the [API Key Permissions List](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/authorization) for all available scopes. An API key's scopes can be updated after creation using the \"Update API keys\" endpoint. +func (c *ApiService) CreateApiKey(params *CreateApiKeyParam) (interface{}, error) { + path := "/v3/api_keys" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateApiKeyRequest != nil { + b, err := json.Marshal(*params.CreateApiKeyRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &CreateApiKey201Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/api_keys/api_delete_api_key.go b/rest/api/v3/api_keys/api_delete_api_key.go new file mode 100644 index 00000000..c4751cf3 --- /dev/null +++ b/rest/api/v3/api_keys/api_delete_api_key.go @@ -0,0 +1,94 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteApiKeyParam struct { + // + ApiKeyId *string `json:"api_key_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteApiKeyParam) SetApiKeyId(ApiKeyId string) *DeleteApiKeyParam { + params.ApiKeyId = &ApiKeyId + return params +} +func (params *DeleteApiKeyParam) SetOnbehalfof(Onbehalfof string) *DeleteApiKeyParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to revoke an existing API Key using an `api_key_id`** Authentications using a revoked API Key will fail after after some small propogation delay. If the API Key ID does not exist, a `404` status will be returned. +func (c *ApiService) DeleteApiKey(params *DeleteApiKeyParam) (interface{}, error) { + path := "/v3/api_keys/{ApiKeyId}" + if params != nil && params.ApiKeyId != nil { + path = strings.Replace(path, "{"+"ApiKeyId"+"}", *params.ApiKeyId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/api_keys/api_get_api_key.go b/rest/api/v3/api_keys/api_get_api_key.go new file mode 100644 index 00000000..38922161 --- /dev/null +++ b/rest/api/v3/api_keys/api_get_api_key.go @@ -0,0 +1,102 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetApiKeyParam struct { + // + ApiKeyId *string `json:"api_key_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetApiKeyParam) SetApiKeyId(ApiKeyId string) *GetApiKeyParam { + params.ApiKeyId = &ApiKeyId + return params +} +func (params *GetApiKeyParam) SetOnbehalfof(Onbehalfof string) *GetApiKeyParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a single API key using an `api_key_id`.** The endpoint will return a key's name, ID, and scopes. If the API Key ID does not, exist a `404` status will be returned. See the [API Key Permissions List](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/authorization) for all available scopes. An API key's scopes can be updated after creation using the \"Update API keys\" endpoint. +func (c *ApiService) GetApiKey(params *GetApiKeyParam) (interface{}, error) { + path := "/v3/api_keys/{ApiKeyId}" + if params != nil && params.ApiKeyId != nil { + path = strings.Replace(path, "{"+"ApiKeyId"+"}", *params.ApiKeyId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetApiKey200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/api_keys/api_list_api_key.go b/rest/api/v3/api_keys/api_list_api_key.go new file mode 100644 index 00000000..6e4b719a --- /dev/null +++ b/rest/api/v3/api_keys/api_list_api_key.go @@ -0,0 +1,94 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListApiKeyParam struct { + // + Limit *int32 `json:"limit,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListApiKeyParam) SetLimit(Limit int32) *ListApiKeyParam { + params.Limit = &Limit + return params +} +func (params *ListApiKeyParam) SetOnbehalfof(Onbehalfof string) *ListApiKeyParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve all API Keys that belong to the authenticated user.** A successful response from this API will include all available API keys' names and IDs. For security reasons, there is not a way to retrieve the key itself after it's created. If you lose your API key, you must create a new one. Only the \"Create API keys\" endpoint will return a key to you and only at the time of creation. An `api_key_id` can be used to update or delete the key, as well as retrieve the key's details, such as its scopes. +func (c *ApiService) ListApiKey(params *ListApiKeyParam) (interface{}, error) { + path := "/v3/api_keys" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListApiKey200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/api_keys/api_service.go b/rest/api/v3/api_keys/api_service.go new file mode 100644 index 00000000..24d94ab9 --- /dev/null +++ b/rest/api/v3/api_keys/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/api_keys/api_update_api_key.go b/rest/api/v3/api_keys/api_update_api_key.go new file mode 100644 index 00000000..c256950a --- /dev/null +++ b/rest/api/v3/api_keys/api_update_api_key.go @@ -0,0 +1,117 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateApiKeyParam struct { + // + ApiKeyId *string `json:"api_key_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateApiKeyRequest *UpdateApiKeyRequest `json:"UpdateApiKeyRequest,omitempty"` +} + +func (params *UpdateApiKeyParam) SetApiKeyId(ApiKeyId string) *UpdateApiKeyParam { + params.ApiKeyId = &ApiKeyId + return params +} +func (params *UpdateApiKeyParam) SetOnbehalfof(Onbehalfof string) *UpdateApiKeyParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateApiKeyParam) SetUpdateApiKeyRequest(UpdateApiKeyRequest UpdateApiKeyRequest) *UpdateApiKeyParam { + params.UpdateApiKeyRequest = &UpdateApiKeyRequest + return params +} + +// **This endpoint allows you to update the name and scopes of a given API key.** You must pass this endpoint a JSON request body with a `name` field and a `scopes` array containing at least one scope. The `name` and `scopes` fields will be used to update the key associated with the `api_key_id` in the request URL. If you need to update a key's scopes only, pass the `name` field with the key's existing name; the `name` will not be modified. If you need to update a key's name only, use the \"Update API key name\" endpoint. See the [API Key Permissions List](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/authorization) for all available scopes. +func (c *ApiService) UpdateApiKey(params *UpdateApiKeyParam) (interface{}, error) { + path := "/v3/api_keys/{ApiKeyId}" + if params != nil && params.ApiKeyId != nil { + path = strings.Replace(path, "{"+"ApiKeyId"+"}", *params.ApiKeyId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateApiKeyRequest != nil { + b, err := json.Marshal(*params.UpdateApiKeyRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ApiKeyResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/api_keys/api_update_api_key_name.go b/rest/api/v3/api_keys/api_update_api_key_name.go new file mode 100644 index 00000000..e641c58e --- /dev/null +++ b/rest/api/v3/api_keys/api_update_api_key_name.go @@ -0,0 +1,117 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateApiKeyNameParam struct { + // + ApiKeyId *string `json:"api_key_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateApiKeyNameRequest *UpdateApiKeyNameRequest `json:"UpdateApiKeyNameRequest,omitempty"` +} + +func (params *UpdateApiKeyNameParam) SetApiKeyId(ApiKeyId string) *UpdateApiKeyNameParam { + params.ApiKeyId = &ApiKeyId + return params +} +func (params *UpdateApiKeyNameParam) SetOnbehalfof(Onbehalfof string) *UpdateApiKeyNameParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateApiKeyNameParam) SetUpdateApiKeyNameRequest(UpdateApiKeyNameRequest UpdateApiKeyNameRequest) *UpdateApiKeyNameParam { + params.UpdateApiKeyNameRequest = &UpdateApiKeyNameRequest + return params +} + +// **This endpoint allows you to update the name of an existing API Key.** You must pass this endpoint a JSON request body with a `name` property, which will be used to rename the key associated with the `api_key_id` passed in the URL. +func (c *ApiService) UpdateApiKeyName(params *UpdateApiKeyNameParam) (interface{}, error) { + path := "/v3/api_keys/{ApiKeyId}" + if params != nil && params.ApiKeyId != nil { + path = strings.Replace(path, "{"+"ApiKeyId"+"}", *params.ApiKeyId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateApiKeyNameRequest != nil { + b, err := json.Marshal(*params.UpdateApiKeyNameRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ApiKeyResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/api_keys/docs/ApiKeyResponse.md b/rest/api/v3/api_keys/docs/ApiKeyResponse.md new file mode 100644 index 00000000..2a77ce3f --- /dev/null +++ b/rest/api/v3/api_keys/docs/ApiKeyResponse.md @@ -0,0 +1,12 @@ +# ApiKeyResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiKeyId** | **string** | The ID of your API Key. |[optional] +**Name** | **string** | The name of your API Key. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/api_keys/docs/ApiKeyScopesResponse.md b/rest/api/v3/api_keys/docs/ApiKeyScopesResponse.md new file mode 100644 index 00000000..1e853c9b --- /dev/null +++ b/rest/api/v3/api_keys/docs/ApiKeyScopesResponse.md @@ -0,0 +1,13 @@ +# ApiKeyScopesResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Scopes** | **[]string** | The permissions this API Key has access to. |[optional] +**ApiKeyId** | **string** | The ID of your API Key. |[optional] +**Name** | **string** | The name of your API Key. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/api_keys/docs/CreateApiKey.md b/rest/api/v3/api_keys/docs/CreateApiKey.md new file mode 100644 index 00000000..a51a16ca --- /dev/null +++ b/rest/api/v3/api_keys/docs/CreateApiKey.md @@ -0,0 +1,49 @@ +# CreateApiKey + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateApiKey**](CreateApiKey.md#CreateApiKey) | **Post** /v3/api_keys | Create API keys + + + +## CreateApiKey + +> CreateApiKey201Response CreateApiKey(ctx, optional) + +Create API keys + +**This endpoint allows you to create a new API Key for the user.** To create your initial SendGrid API Key, you should [use the SendGrid App](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. A JSON request body containing a `name` property is required when making requests to this endpoint. If the number of maximum keys, 100, is reached, a `403` status will be returned. Though the `name` field is required, it does not need to be unique. A unique API key ID will be generated for each key you create and returned in the response body. It is not necessary to pass a `scopes` field to the API when creating a key, but you should be aware that omitting the `scopes` field from your request will create a key with \"Full Access\" permissions by default. See the [API Key Permissions List](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/authorization) for all available scopes. An API key's scopes can be updated after creation using the \"Update API keys\" endpoint. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateApiKeyParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**CreateApiKeyRequest** | [**CreateApiKeyRequest**](CreateApiKeyRequest.md) | + +### Return type + +[**CreateApiKey201Response**](CreateApiKey201Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/api_keys/docs/CreateApiKey201Response.md b/rest/api/v3/api_keys/docs/CreateApiKey201Response.md new file mode 100644 index 00000000..e0b7aa07 --- /dev/null +++ b/rest/api/v3/api_keys/docs/CreateApiKey201Response.md @@ -0,0 +1,14 @@ +# CreateApiKey201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ApiKey** | **string** | |[optional] +**ApiKeyId** | **string** | |[optional] +**Name** | **string** | |[optional] +**Scopes** | **[]string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/api_keys/docs/CreateApiKeyRequest.md b/rest/api/v3/api_keys/docs/CreateApiKeyRequest.md new file mode 100644 index 00000000..e9ef1a2c --- /dev/null +++ b/rest/api/v3/api_keys/docs/CreateApiKeyRequest.md @@ -0,0 +1,12 @@ +# CreateApiKeyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name you will use to describe this API Key. | +**Scopes** | **[]string** | The individual permissions that you are giving to this API Key. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/api_keys/docs/DeleteApiKey.md b/rest/api/v3/api_keys/docs/DeleteApiKey.md new file mode 100644 index 00000000..4a144d28 --- /dev/null +++ b/rest/api/v3/api_keys/docs/DeleteApiKey.md @@ -0,0 +1,52 @@ +# DeleteApiKey + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteApiKey**](DeleteApiKey.md#DeleteApiKey) | **Delete** /v3/api_keys/{ApiKeyId} | Delete API keys + + + +## DeleteApiKey + +> DeleteApiKey(ctx, ApiKeyIdoptional) + +Delete API keys + +**This endpoint allows you to revoke an existing API Key using an `api_key_id`** Authentications using a revoked API Key will fail after after some small propogation delay. If the API Key ID does not exist, a `404` status will be returned. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ApiKeyId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteApiKeyParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/api_keys/docs/ErrorResponse.md b/rest/api/v3/api_keys/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/api_keys/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/api_keys/docs/ErrorResponseErrorsInner.md b/rest/api/v3/api_keys/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/api_keys/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/api_keys/docs/GetApiKey.md b/rest/api/v3/api_keys/docs/GetApiKey.md new file mode 100644 index 00000000..053b02e9 --- /dev/null +++ b/rest/api/v3/api_keys/docs/GetApiKey.md @@ -0,0 +1,52 @@ +# GetApiKey + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetApiKey**](GetApiKey.md#GetApiKey) | **Get** /v3/api_keys/{ApiKeyId} | Retrieve an existing API Key + + + +## GetApiKey + +> GetApiKey200Response GetApiKey(ctx, ApiKeyIdoptional) + +Retrieve an existing API Key + +**This endpoint allows you to retrieve a single API key using an `api_key_id`.** The endpoint will return a key's name, ID, and scopes. If the API Key ID does not, exist a `404` status will be returned. See the [API Key Permissions List](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/authorization) for all available scopes. An API key's scopes can be updated after creation using the \"Update API keys\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ApiKeyId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a GetApiKeyParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**GetApiKey200Response**](GetApiKey200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/api_keys/docs/GetApiKey200Response.md b/rest/api/v3/api_keys/docs/GetApiKey200Response.md new file mode 100644 index 00000000..43bebd71 --- /dev/null +++ b/rest/api/v3/api_keys/docs/GetApiKey200Response.md @@ -0,0 +1,11 @@ +# GetApiKey200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ApiKeyScopesResponse**](ApiKeyScopesResponse.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/api_keys/docs/ListApiKey.md b/rest/api/v3/api_keys/docs/ListApiKey.md new file mode 100644 index 00000000..5fd1de6d --- /dev/null +++ b/rest/api/v3/api_keys/docs/ListApiKey.md @@ -0,0 +1,49 @@ +# ListApiKey + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListApiKey**](ListApiKey.md#ListApiKey) | **Get** /v3/api_keys | Retrieve all API Keys belonging to the authenticated user + + + +## ListApiKey + +> ListApiKey200Response ListApiKey(ctx, optional) + +Retrieve all API Keys belonging to the authenticated user + +**This endpoint allows you to retrieve all API Keys that belong to the authenticated user.** A successful response from this API will include all available API keys' names and IDs. For security reasons, there is not a way to retrieve the key itself after it's created. If you lose your API key, you must create a new one. Only the \"Create API keys\" endpoint will return a key to you and only at the time of creation. An `api_key_id` can be used to update or delete the key, as well as retrieve the key's details, such as its scopes. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListApiKeyParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **int32** | +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListApiKey200Response**](ListApiKey200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/api_keys/docs/ListApiKey200Response.md b/rest/api/v3/api_keys/docs/ListApiKey200Response.md new file mode 100644 index 00000000..66bb5c12 --- /dev/null +++ b/rest/api/v3/api_keys/docs/ListApiKey200Response.md @@ -0,0 +1,11 @@ +# ListApiKey200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ApiKeyResponse**](ApiKeyResponse.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/api_keys/docs/UpdateApiKey.md b/rest/api/v3/api_keys/docs/UpdateApiKey.md new file mode 100644 index 00000000..c763c8ac --- /dev/null +++ b/rest/api/v3/api_keys/docs/UpdateApiKey.md @@ -0,0 +1,53 @@ +# UpdateApiKey + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateApiKey**](UpdateApiKey.md#UpdateApiKey) | **Put** /v3/api_keys/{ApiKeyId} | Update API key name and scopes + + + +## UpdateApiKey + +> ApiKeyResponse UpdateApiKey(ctx, ApiKeyIdoptional) + +Update API key name and scopes + +**This endpoint allows you to update the name and scopes of a given API key.** You must pass this endpoint a JSON request body with a `name` field and a `scopes` array containing at least one scope. The `name` and `scopes` fields will be used to update the key associated with the `api_key_id` in the request URL. If you need to update a key's scopes only, pass the `name` field with the key's existing name; the `name` will not be modified. If you need to update a key's name only, use the \"Update API key name\" endpoint. See the [API Key Permissions List](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/authorization) for all available scopes. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ApiKeyId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateApiKeyParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateApiKeyRequest** | [**UpdateApiKeyRequest**](UpdateApiKeyRequest.md) | + +### Return type + +[**ApiKeyResponse**](ApiKeyResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/api_keys/docs/UpdateApiKeyName.md b/rest/api/v3/api_keys/docs/UpdateApiKeyName.md new file mode 100644 index 00000000..84379fe3 --- /dev/null +++ b/rest/api/v3/api_keys/docs/UpdateApiKeyName.md @@ -0,0 +1,53 @@ +# UpdateApiKeyName + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateApiKeyName**](UpdateApiKeyName.md#UpdateApiKeyName) | **Patch** /v3/api_keys/{ApiKeyId} | Update API key name + + + +## UpdateApiKeyName + +> ApiKeyResponse UpdateApiKeyName(ctx, ApiKeyIdoptional) + +Update API key name + +**This endpoint allows you to update the name of an existing API Key.** You must pass this endpoint a JSON request body with a `name` property, which will be used to rename the key associated with the `api_key_id` passed in the URL. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ApiKeyId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateApiKeyNameParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateApiKeyNameRequest** | [**UpdateApiKeyNameRequest**](UpdateApiKeyNameRequest.md) | + +### Return type + +[**ApiKeyResponse**](ApiKeyResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/api_keys/docs/UpdateApiKeyNameRequest.md b/rest/api/v3/api_keys/docs/UpdateApiKeyNameRequest.md new file mode 100644 index 00000000..bf4a4e51 --- /dev/null +++ b/rest/api/v3/api_keys/docs/UpdateApiKeyNameRequest.md @@ -0,0 +1,11 @@ +# UpdateApiKeyNameRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The new name of the API Key. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/api_keys/docs/UpdateApiKeyRequest.md b/rest/api/v3/api_keys/docs/UpdateApiKeyRequest.md new file mode 100644 index 00000000..06c502e3 --- /dev/null +++ b/rest/api/v3/api_keys/docs/UpdateApiKeyRequest.md @@ -0,0 +1,12 @@ +# UpdateApiKeyRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**Scopes** | **[]string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/api_keys/model_api_key_response.go b/rest/api/v3/api_keys/model_api_key_response.go new file mode 100644 index 00000000..32f2fcf9 --- /dev/null +++ b/rest/api/v3/api_keys/model_api_key_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ApiKeyResponse struct for ApiKeyResponse +type ApiKeyResponse struct { + // The ID of your API Key. + ApiKeyId *string `json:"api_key_id,omitempty"` + // The name of your API Key. + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/api_keys/model_api_key_scopes_response.go b/rest/api/v3/api_keys/model_api_key_scopes_response.go new file mode 100644 index 00000000..25d1c7bc --- /dev/null +++ b/rest/api/v3/api_keys/model_api_key_scopes_response.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ApiKeyScopesResponse struct for ApiKeyScopesResponse +type ApiKeyScopesResponse struct { + // The permissions this API Key has access to. + Scopes *[]string `json:"scopes,omitempty"` + // The ID of your API Key. + ApiKeyId *string `json:"api_key_id,omitempty"` + // The name of your API Key. + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/api_keys/model_create_api_key_201_response.go b/rest/api/v3/api_keys/model_create_api_key_201_response.go new file mode 100644 index 00000000..bd196421 --- /dev/null +++ b/rest/api/v3/api_keys/model_create_api_key_201_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateApiKey201Response struct for CreateApiKey201Response +type CreateApiKey201Response struct { + ApiKey *string `json:"api_key,omitempty"` + ApiKeyId *string `json:"api_key_id,omitempty"` + Name *string `json:"name,omitempty"` + Scopes *[]string `json:"scopes,omitempty"` +} diff --git a/rest/api/v3/api_keys/model_create_api_key_request.go b/rest/api/v3/api_keys/model_create_api_key_request.go new file mode 100644 index 00000000..3185d573 --- /dev/null +++ b/rest/api/v3/api_keys/model_create_api_key_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateApiKeyRequest struct for CreateApiKeyRequest +type CreateApiKeyRequest struct { + // The name you will use to describe this API Key. + Name string `json:"name"` + // The individual permissions that you are giving to this API Key. + Scopes *[]string `json:"scopes,omitempty"` +} diff --git a/rest/api/v3/api_keys/model_error_response.go b/rest/api/v3/api_keys/model_error_response.go new file mode 100644 index 00000000..593ee939 --- /dev/null +++ b/rest/api/v3/api_keys/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/api_keys/model_error_response_errors_inner.go b/rest/api/v3/api_keys/model_error_response_errors_inner.go new file mode 100644 index 00000000..909b9fc2 --- /dev/null +++ b/rest/api/v3/api_keys/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/api_keys/model_get_api_key_200_response.go b/rest/api/v3/api_keys/model_get_api_key_200_response.go new file mode 100644 index 00000000..72056608 --- /dev/null +++ b/rest/api/v3/api_keys/model_get_api_key_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetApiKey200Response struct for GetApiKey200Response +type GetApiKey200Response struct { + Result *[]ApiKeyScopesResponse `json:"result,omitempty"` +} diff --git a/rest/api/v3/api_keys/model_list_api_key_200_response.go b/rest/api/v3/api_keys/model_list_api_key_200_response.go new file mode 100644 index 00000000..06fb1c13 --- /dev/null +++ b/rest/api/v3/api_keys/model_list_api_key_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListApiKey200Response struct for ListApiKey200Response +type ListApiKey200Response struct { + Result *[]ApiKeyResponse `json:"result,omitempty"` +} diff --git a/rest/api/v3/api_keys/model_update_api_key_name_request.go b/rest/api/v3/api_keys/model_update_api_key_name_request.go new file mode 100644 index 00000000..6b90e1a1 --- /dev/null +++ b/rest/api/v3/api_keys/model_update_api_key_name_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateApiKeyNameRequest struct for UpdateApiKeyNameRequest +type UpdateApiKeyNameRequest struct { + // The new name of the API Key. + Name string `json:"name"` +} diff --git a/rest/api/v3/api_keys/model_update_api_key_request.go b/rest/api/v3/api_keys/model_update_api_key_request.go new file mode 100644 index 00000000..303efc75 --- /dev/null +++ b/rest/api/v3/api_keys/model_update_api_key_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid API Keys API +* The Twilio SendGrid API Keys API allows you manage your API keys and their settings. Your application, mail client, or website can all use API keys to authenticate access to SendGrid services. To create your initial SendGrid API Key, you should use the [SendGrid application user interface](https://app.sendgrid.com/settings/api_keys). Once you have created a first key with scopes to manage additional API keys, you can use this API for all other key management. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateApiKeyRequest struct for UpdateApiKeyRequest +type UpdateApiKeyRequest struct { + Name string `json:"name"` + Scopes *[]string `json:"scopes,omitempty"` +} diff --git a/rest/api/v3/domain_authentication/README.md b/rest/api/v3/domain_authentication/README.md new file mode 100644 index 00000000..5a105004 --- /dev/null +++ b/rest/api/v3/domain_authentication/README.md @@ -0,0 +1,103 @@ +# Go API client for + +The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. + +Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). + +Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:01.511283+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AddIpToAuthenticatedDomain* | [**AddIpToAuthenticatedDomain**](docs/AddIpToAuthenticatedDomain.md#addiptoauthenticateddomain) | **Post** /v3/whitelabel/domains/{Id}/ips | Add an IP to an authenticated domain +*AssociateSubuserWithDomain* | [**AssociateSubuserWithDomain**](docs/AssociateSubuserWithDomain.md#associatesubuserwithdomain) | **Post** /v3/whitelabel/domains/{DomainId}/subuser | Associate an authenticated domain with a given user. +*AssociateSubuserWithDomainMultiple* | [**AssociateSubuserWithDomainMultiple**](docs/AssociateSubuserWithDomainMultiple.md#associatesubuserwithdomainmultiple) | **Post** /v3/whitelabel/domains/{DomainId}/subuser:add | Associate an authenticated domain with a given user, for up to five domains. +*AuthenticateDomain* | [**AuthenticateDomain**](docs/AuthenticateDomain.md#authenticatedomain) | **Post** /v3/whitelabel/domains | Authenticate a domain +*DeleteAuthenticatedDomain* | [**DeleteAuthenticatedDomain**](docs/DeleteAuthenticatedDomain.md#deleteauthenticateddomain) | **Delete** /v3/whitelabel/domains/{DomainId} | Delete an authenticated domain. +*DeleteIpFromAuthenticatedDomain* | [**DeleteIpFromAuthenticatedDomain**](docs/DeleteIpFromAuthenticatedDomain.md#deleteipfromauthenticateddomain) | **Delete** /v3/whitelabel/domains/{Id}/ips/{Ip} | Remove an IP from an authenticated domain. +*DisassociateAuthenticatedDomainFromUser* | [**DisassociateAuthenticatedDomainFromUser**](docs/DisassociateAuthenticatedDomainFromUser.md#disassociateauthenticateddomainfromuser) | **Delete** /v3/whitelabel/domains/subuser | Disassociate an authenticated domain from a given user. +*DisassociateSubuserFromDomain* | [**DisassociateSubuserFromDomain**](docs/DisassociateSubuserFromDomain.md#disassociatesubuserfromdomain) | **Delete** /v3/whitelabel/domains/{DomainId}/subuser | Disassociate an authenticated domain from a given user for users with up to five associated domains. +*EmailDnsRecord* | [**EmailDnsRecord**](docs/EmailDnsRecord.md#emaildnsrecord) | **Post** /v3/whitelabel/dns/email | Email DNS records to a co-worker +*GetAuthenticatedDomain* | [**GetAuthenticatedDomain**](docs/GetAuthenticatedDomain.md#getauthenticateddomain) | **Get** /v3/whitelabel/domains/{DomainId} | Retrieve an authenticated domain +*ListAllAuthenticatedDomainWithUser* | [**ListAllAuthenticatedDomainWithUser**](docs/ListAllAuthenticatedDomainWithUser.md#listallauthenticateddomainwithuser) | **Get** /v3/whitelabel/domains/subuser/all | List all the authenticated domains associated with the given user. +*ListAuthenticatedDomain* | [**ListAuthenticatedDomain**](docs/ListAuthenticatedDomain.md#listauthenticateddomain) | **Get** /v3/whitelabel/domains | List all authenticated domains +*ListAuthenticatedDomainWithUser* | [**ListAuthenticatedDomainWithUser**](docs/ListAuthenticatedDomainWithUser.md#listauthenticateddomainwithuser) | **Get** /v3/whitelabel/domains/subuser | List the authenticated domain associated with the given user. +*ListDefaultAuthenticatedDomain* | [**ListDefaultAuthenticatedDomain**](docs/ListDefaultAuthenticatedDomain.md#listdefaultauthenticateddomain) | **Get** /v3/whitelabel/domains/default | Get the default authentication +*UpdateAuthenticatedDomain* | [**UpdateAuthenticatedDomain**](docs/UpdateAuthenticatedDomain.md#updateauthenticateddomain) | **Patch** /v3/whitelabel/domains/{DomainId} | Update an authenticated domain +*ValidateAuthenticatedDomain* | [**ValidateAuthenticatedDomain**](docs/ValidateAuthenticatedDomain.md#validateauthenticateddomain) | **Post** /v3/whitelabel/domains/{Id}/validate | Validate a domain authentication. + + +## Documentation For Models + + - [AddIpToAuthenticatedDomainRequest](AddIpToAuthenticatedDomainRequest.md) + - [AssociateSubuserWithDomainRequest](AssociateSubuserWithDomainRequest.md) + - [AuthenticateDomainRequest](AuthenticateDomainRequest.md) + - [AuthenticatedDomain](AuthenticatedDomain.md) + - [AuthenticatedDomainSpf](AuthenticatedDomainSpf.md) + - [AuthenticatedDomainSpfDns](AuthenticatedDomainSpfDns.md) + - [AuthenticatedDomainSpfDnsDkim](AuthenticatedDomainSpfDnsDkim.md) + - [AuthenticatedDomainSpfDnsDomainSpf](AuthenticatedDomainSpfDnsDomainSpf.md) + - [AuthenticatedDomainSpfDnsMailServer](AuthenticatedDomainSpfDnsMailServer.md) + - [AuthenticatedDomainSpfDnsSubdomainSpf](AuthenticatedDomainSpfDnsSubdomainSpf.md) + - [EmailDnsRecord400Response](EmailDnsRecord400Response.md) + - [EmailDnsRecord400ResponseErrors](EmailDnsRecord400ResponseErrors.md) + - [EmailDnsRecordRequest](EmailDnsRecordRequest.md) + - [ListAllAuthenticatedDomainWithUser200ResponseInner](ListAllAuthenticatedDomainWithUser200ResponseInner.md) + - [ListAllAuthenticatedDomainWithUser200ResponseInnerDns](ListAllAuthenticatedDomainWithUser200ResponseInnerDns.md) + - [ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1](ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1.md) + - [ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname](ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname.md) + - [UpdateAuthenticatedDomainRequest](UpdateAuthenticatedDomainRequest.md) + - [ValidateAuthenticatedDomain200Response](ValidateAuthenticatedDomain200Response.md) + - [ValidateAuthenticatedDomain200ResponseValidationResults](ValidateAuthenticatedDomain200ResponseValidationResults.md) + - [ValidateAuthenticatedDomain200ResponseValidationResultsDkim1](ValidateAuthenticatedDomain200ResponseValidationResultsDkim1.md) + - [ValidateAuthenticatedDomain200ResponseValidationResultsMailCname](ValidateAuthenticatedDomain200ResponseValidationResultsMailCname.md) + - [ValidateAuthenticatedDomain200ResponseValidationResultsSpf](ValidateAuthenticatedDomain200ResponseValidationResultsSpf.md) + - [ValidateAuthenticatedDomain500Response](ValidateAuthenticatedDomain500Response.md) + - [ValidateAuthenticatedDomain500ResponseErrorsInner](ValidateAuthenticatedDomain500ResponseErrorsInner.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/domain_authentication/api_add_ip_to_authenticated_domain.go b/rest/api/v3/domain_authentication/api_add_ip_to_authenticated_domain.go new file mode 100644 index 00000000..4a6cd6d0 --- /dev/null +++ b/rest/api/v3/domain_authentication/api_add_ip_to_authenticated_domain.go @@ -0,0 +1,86 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type AddIpToAuthenticatedDomainParam struct { + // ID of the domain to which you are adding an IP + Id *int32 `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + AddIpToAuthenticatedDomainRequest *AddIpToAuthenticatedDomainRequest `json:"AddIpToAuthenticatedDomainRequest,omitempty"` +} + +func (params *AddIpToAuthenticatedDomainParam) SetId(Id int32) *AddIpToAuthenticatedDomainParam { + params.Id = &Id + return params +} +func (params *AddIpToAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *AddIpToAuthenticatedDomainParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *AddIpToAuthenticatedDomainParam) SetAddIpToAuthenticatedDomainRequest(AddIpToAuthenticatedDomainRequest AddIpToAuthenticatedDomainRequest) *AddIpToAuthenticatedDomainParam { + params.AddIpToAuthenticatedDomainRequest = &AddIpToAuthenticatedDomainRequest + return params +} + +// **This endpoint allows you to add an IP address to an authenticated domain.** +func (c *ApiService) AddIpToAuthenticatedDomain(params *AddIpToAuthenticatedDomainParam) (interface{}, error) { + path := "/v3/whitelabel/domains/{Id}/ips" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.AddIpToAuthenticatedDomainRequest != nil { + b, err := json.Marshal(*params.AddIpToAuthenticatedDomainRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AuthenticatedDomainSpf{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/domain_authentication/api_associate_subuser_with_domain.go b/rest/api/v3/domain_authentication/api_associate_subuser_with_domain.go new file mode 100644 index 00000000..b84c9542 --- /dev/null +++ b/rest/api/v3/domain_authentication/api_associate_subuser_with_domain.go @@ -0,0 +1,77 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type AssociateSubuserWithDomainParam struct { + // ID of the authenticated domain to associate with the subuser. + DomainId *int32 `json:"domain_id"` + // + AssociateSubuserWithDomainRequest *AssociateSubuserWithDomainRequest `json:"AssociateSubuserWithDomainRequest,omitempty"` +} + +func (params *AssociateSubuserWithDomainParam) SetDomainId(DomainId int32) *AssociateSubuserWithDomainParam { + params.DomainId = &DomainId + return params +} +func (params *AssociateSubuserWithDomainParam) SetAssociateSubuserWithDomainRequest(AssociateSubuserWithDomainRequest AssociateSubuserWithDomainRequest) *AssociateSubuserWithDomainParam { + params.AssociateSubuserWithDomainRequest = &AssociateSubuserWithDomainRequest + return params +} + +// **This endpoint allows you to associate a specific authenticated domain with a subuser.** Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent's domain. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. [You can associate more than one domain with a subuser using the `v3/whitelabel/domains/{domain_id}/subuser:add` endpoint](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/associate-an-authenticated-domain-with-a-subuser-multiple). +func (c *ApiService) AssociateSubuserWithDomain(params *AssociateSubuserWithDomainParam) (interface{}, error) { + path := "/v3/whitelabel/domains/{DomainId}/subuser" + if params != nil && params.DomainId != nil { + path = strings.Replace(path, "{"+"DomainId"+"}", fmt.Sprint(*params.DomainId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.AssociateSubuserWithDomainRequest != nil { + b, err := json.Marshal(*params.AssociateSubuserWithDomainRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &AuthenticatedDomainSpf{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/domain_authentication/api_associate_subuser_with_domain_multiple.go b/rest/api/v3/domain_authentication/api_associate_subuser_with_domain_multiple.go new file mode 100644 index 00000000..2cb05b45 --- /dev/null +++ b/rest/api/v3/domain_authentication/api_associate_subuser_with_domain_multiple.go @@ -0,0 +1,77 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type AssociateSubuserWithDomainMultipleParam struct { + // ID of the authenticated domain to associate with the subuser. + DomainId *int32 `json:"domain_id"` + // + AssociateSubuserWithDomainRequest *AssociateSubuserWithDomainRequest `json:"AssociateSubuserWithDomainRequest,omitempty"` +} + +func (params *AssociateSubuserWithDomainMultipleParam) SetDomainId(DomainId int32) *AssociateSubuserWithDomainMultipleParam { + params.DomainId = &DomainId + return params +} +func (params *AssociateSubuserWithDomainMultipleParam) SetAssociateSubuserWithDomainRequest(AssociateSubuserWithDomainRequest AssociateSubuserWithDomainRequest) *AssociateSubuserWithDomainMultipleParam { + params.AssociateSubuserWithDomainRequest = &AssociateSubuserWithDomainRequest + return params +} + +// **This endpoint allows you to associate a specific authenticated domain with a subuser. It can be used to associate up to five authenticated domains.** This functionality allows subusers to send mail using their parent's domain. Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. A subuser can have up to five associated authenticated domains. To see the domains that have already been associated with this user, you can [use the API to list the domains currently associated with the subuser](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/list-the-authenticated-domain-associated-with-a-subuser-multiple). When selecting a domain to send email from, SendGrid checks for domains in the following order and chooses the first one that appears in the hierarchy: 1. Domain assigned by the subuser that matches the email's `From` address domain. 2. The subuser's default domain. 3. Domain assigned by the parent user that matches the `From` address domain. 4. Parent user's default domain. 5. sendgrid.net +func (c *ApiService) AssociateSubuserWithDomainMultiple(params *AssociateSubuserWithDomainMultipleParam) (interface{}, error) { + path := "/v3/whitelabel/domains/{DomainId}/subuser:add" + if params != nil && params.DomainId != nil { + path = strings.Replace(path, "{"+"DomainId"+"}", fmt.Sprint(*params.DomainId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.AssociateSubuserWithDomainRequest != nil { + b, err := json.Marshal(*params.AssociateSubuserWithDomainRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &AuthenticatedDomainSpf{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/domain_authentication/api_authenticate_domain.go b/rest/api/v3/domain_authentication/api_authenticate_domain.go new file mode 100644 index 00000000..d06be95e --- /dev/null +++ b/rest/api/v3/domain_authentication/api_authenticate_domain.go @@ -0,0 +1,74 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type AuthenticateDomainParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + AuthenticateDomainRequest *AuthenticateDomainRequest `json:"AuthenticateDomainRequest,omitempty"` +} + +func (params *AuthenticateDomainParam) SetOnbehalfof(Onbehalfof string) *AuthenticateDomainParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *AuthenticateDomainParam) SetAuthenticateDomainRequest(AuthenticateDomainRequest AuthenticateDomainRequest) *AuthenticateDomainParam { + params.AuthenticateDomainRequest = &AuthenticateDomainRequest + return params +} + +// **This endpoint allows you to authenticate a domain.** If you are authenticating a domain for a subuser, you have two options: 1. Use the \"username\" parameter. This allows you to authenticate a domain on behalf of your subuser. This means the subuser is able to see and modify the authenticated domain. 2. Use the Association workflow (see Associate Domain section). This allows you to authenticate a domain created by the parent to a subuser. This means the subuser will default to the assigned domain, but will not be able to see or modify that authenticated domain. However, if the subuser authenticates their own domain it will overwrite the assigned domain. +func (c *ApiService) AuthenticateDomain(params *AuthenticateDomainParam) (interface{}, error) { + path := "/v3/whitelabel/domains" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.AuthenticateDomainRequest != nil { + b, err := json.Marshal(*params.AuthenticateDomainRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &AuthenticatedDomain{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/domain_authentication/api_delete_authenticated_domain.go b/rest/api/v3/domain_authentication/api_delete_authenticated_domain.go new file mode 100644 index 00000000..a70ae056 --- /dev/null +++ b/rest/api/v3/domain_authentication/api_delete_authenticated_domain.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteAuthenticatedDomainParam struct { + // + DomainId *string `json:"domain_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteAuthenticatedDomainParam) SetDomainId(DomainId string) *DeleteAuthenticatedDomainParam { + params.DomainId = &DomainId + return params +} +func (params *DeleteAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *DeleteAuthenticatedDomainParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete an authenticated domain.** +func (c *ApiService) DeleteAuthenticatedDomain(params *DeleteAuthenticatedDomainParam) (interface{}, error) { + path := "/v3/whitelabel/domains/{DomainId}" + if params != nil && params.DomainId != nil { + path = strings.Replace(path, "{"+"DomainId"+"}", *params.DomainId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/domain_authentication/api_delete_ip_from_authenticated_domain.go b/rest/api/v3/domain_authentication/api_delete_ip_from_authenticated_domain.go new file mode 100644 index 00000000..9944cc46 --- /dev/null +++ b/rest/api/v3/domain_authentication/api_delete_ip_from_authenticated_domain.go @@ -0,0 +1,80 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type DeleteIpFromAuthenticatedDomainParam struct { + // ID of the domain to delete the IP from. + Id *int32 `json:"id"` + // IP to remove from the domain. + Ip *string `json:"ip"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteIpFromAuthenticatedDomainParam) SetId(Id int32) *DeleteIpFromAuthenticatedDomainParam { + params.Id = &Id + return params +} +func (params *DeleteIpFromAuthenticatedDomainParam) SetIp(Ip string) *DeleteIpFromAuthenticatedDomainParam { + params.Ip = &Ip + return params +} +func (params *DeleteIpFromAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *DeleteIpFromAuthenticatedDomainParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to remove an IP address from that domain's authentication.** +func (c *ApiService) DeleteIpFromAuthenticatedDomain(params *DeleteIpFromAuthenticatedDomainParam) (interface{}, error) { + path := "/v3/whitelabel/domains/{Id}/ips/{Ip}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) + } + if params != nil && params.Ip != nil { + path = strings.Replace(path, "{"+"Ip"+"}", *params.Ip, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AuthenticatedDomainSpf{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/domain_authentication/api_disassociate_authenticated_domain_from_user.go b/rest/api/v3/domain_authentication/api_disassociate_authenticated_domain_from_user.go new file mode 100644 index 00000000..72c7ebf0 --- /dev/null +++ b/rest/api/v3/domain_authentication/api_disassociate_authenticated_domain_from_user.go @@ -0,0 +1,60 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type DisassociateAuthenticatedDomainFromUserParam struct { + // Username for the subuser to find associated authenticated domain. + Username *string `json:"username,omitempty"` +} + +func (params *DisassociateAuthenticatedDomainFromUserParam) SetUsername(Username string) *DisassociateAuthenticatedDomainFromUserParam { + params.Username = &Username + return params +} + +// **This endpoint allows you to disassociate a specific authenticated domain from a subuser.** Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent's domain. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. Note that if you used the [`/v3/whitelabel/domains/{domain_id}/subuser:add` endpoint](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/associate-an-authenticated-domain-with-a-subuser-multiple) to add multiple domains to the subuser, you should use the [`/v3/whitelabel/domains/{domain_id}/subuser` endpoint](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/disassociate-an-authenticated-domain-from-a-subuser-multiple) to disassociate those domains. +func (c *ApiService) DisassociateAuthenticatedDomainFromUser(params *DisassociateAuthenticatedDomainFromUserParam) (interface{}, error) { + path := "/v3/whitelabel/domains/subuser" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Username != nil { + data.Set("username", *params.Username) + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/domain_authentication/api_disassociate_subuser_from_domain.go b/rest/api/v3/domain_authentication/api_disassociate_subuser_from_domain.go new file mode 100644 index 00000000..c84c69fa --- /dev/null +++ b/rest/api/v3/domain_authentication/api_disassociate_subuser_from_domain.go @@ -0,0 +1,72 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type DisassociateSubuserFromDomainParam struct { + // ID of the authenticated domain to be disassociated with the subuser. + DomainId *int32 `json:"domain_id"` + // Username for the subuser to find associated authenticated domain. + Username *string `json:"username,omitempty"` +} + +func (params *DisassociateSubuserFromDomainParam) SetDomainId(DomainId int32) *DisassociateSubuserFromDomainParam { + params.DomainId = &DomainId + return params +} +func (params *DisassociateSubuserFromDomainParam) SetUsername(Username string) *DisassociateSubuserFromDomainParam { + params.Username = &Username + return params +} + +// **This endpoint allows you to disassociate a specific authenticated domain from a subuser, for users with up to five associated domains.** This functionality allows subusers to send mail using their parent's domain. Authenticated domains can be associated with (i.e. assigned to) subusers kknt, and a subuser can have up to five associated authenticated domains. You can dissociate an authenticated domain from any subuser that has one or more authenticated domains using this endpoint. +func (c *ApiService) DisassociateSubuserFromDomain(params *DisassociateSubuserFromDomainParam) (interface{}, error) { + path := "/v3/whitelabel/domains/{DomainId}/subuser" + if params != nil && params.DomainId != nil { + path = strings.Replace(path, "{"+"DomainId"+"}", fmt.Sprint(*params.DomainId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Username != nil { + data.Set("username", *params.Username) + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/domain_authentication/api_email_dns_record.go b/rest/api/v3/domain_authentication/api_email_dns_record.go new file mode 100644 index 00000000..3c87da0e --- /dev/null +++ b/rest/api/v3/domain_authentication/api_email_dns_record.go @@ -0,0 +1,65 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type EmailDnsRecordParam struct { + // + EmailDnsRecordRequest *EmailDnsRecordRequest `json:"EmailDnsRecordRequest,omitempty"` +} + +func (params *EmailDnsRecordParam) SetEmailDnsRecordRequest(EmailDnsRecordRequest EmailDnsRecordRequest) *EmailDnsRecordParam { + params.EmailDnsRecordRequest = &EmailDnsRecordRequest + return params +} + +// **This endpoint is used to share DNS records with a colleagues** Use this endpoint to send SendGrid-generated DNS record information to a co-worker so they can enter it into your DNS provider to validate your domain and link branding. What type of records are sent will depend on whether you have chosen Automated Security or not. When using Automated Security, SendGrid provides you with three CNAME records. If you turn Automated Security off, you are instead given TXT and MX records. If you pass a `link_id` to this endpoint, the generated email will supply the DNS records necessary to complete [Link Branding](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) setup. If you pass a `domain_id` to this endpoint, the generated email will supply the DNS records needed to complete [Domain Authentication](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Passing both IDs will generate an email with the records needed to complete both setup steps. You can retrieve all your domain IDs from the returned `id` fields for each domain using the \"List all authenticated domains\" endpoint. You can retrieve all of your link IDs using the \"Retrieve all branded links\" endpoint. +func (c *ApiService) EmailDnsRecord(params *EmailDnsRecordParam) (interface{}, error) { + path := "/v3/whitelabel/dns/email" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.EmailDnsRecordRequest != nil { + b, err := json.Marshal(*params.EmailDnsRecordRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &EmailDnsRecord400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/domain_authentication/api_get_authenticated_domain.go b/rest/api/v3/domain_authentication/api_get_authenticated_domain.go new file mode 100644 index 00000000..ea02910f --- /dev/null +++ b/rest/api/v3/domain_authentication/api_get_authenticated_domain.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetAuthenticatedDomainParam struct { + // + DomainId *string `json:"domain_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetAuthenticatedDomainParam) SetDomainId(DomainId string) *GetAuthenticatedDomainParam { + params.DomainId = &DomainId + return params +} +func (params *GetAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *GetAuthenticatedDomainParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a specific authenticated domain.** +func (c *ApiService) GetAuthenticatedDomain(params *GetAuthenticatedDomainParam) (interface{}, error) { + path := "/v3/whitelabel/domains/{DomainId}" + if params != nil && params.DomainId != nil { + path = strings.Replace(path, "{"+"DomainId"+"}", *params.DomainId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AuthenticatedDomain{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/domain_authentication/api_list_all_authenticated_domain_with_user.go b/rest/api/v3/domain_authentication/api_list_all_authenticated_domain_with_user.go new file mode 100644 index 00000000..ba07edd3 --- /dev/null +++ b/rest/api/v3/domain_authentication/api_list_all_authenticated_domain_with_user.go @@ -0,0 +1,60 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListAllAuthenticatedDomainWithUserParam struct { + // Username for the subuser to find associated authenticated domains. + Username *string `json:"username"` +} + +func (params *ListAllAuthenticatedDomainWithUserParam) SetUsername(Username string) *ListAllAuthenticatedDomainWithUserParam { + params.Username = &Username + return params +} + +// **This endpoint allows you to retrieve all of the authenticated domains that have been assigned to a specific subuser.** This functionality allows subusers to send mail using their parent's domain. Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account, and a subuser can have up to five associated domains. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. When selecting a domain to send email from, SendGrid checks for domains in the following order and chooses the first one that appears in the hierarchy: 1. Domain assigned by the subuser that matches the email's `From` address domain. 2. The subuser's default domain. 3. Domain assigned by the parent user that matches the `From` address domain. 4. Parent user's default domain. 5. sendgrid.net +func (c *ApiService) ListAllAuthenticatedDomainWithUser(params *ListAllAuthenticatedDomainWithUserParam) (interface{}, error) { + path := "/v3/whitelabel/domains/subuser/all" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Username != nil { + data.Set("username", *params.Username) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListAllAuthenticatedDomainWithUser200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/domain_authentication/api_list_authenticated_domain.go b/rest/api/v3/domain_authentication/api_list_authenticated_domain.go new file mode 100644 index 00000000..946c626e --- /dev/null +++ b/rest/api/v3/domain_authentication/api_list_authenticated_domain.go @@ -0,0 +1,106 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListAuthenticatedDomainParam struct { + // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. + Limit *int32 `json:"limit,omitempty"` + // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + Offset *int32 `json:"offset,omitempty"` + // Exclude subuser domains from the result. + ExcludeSubusers *bool `json:"exclude_subusers,omitempty"` + // The username associated with an authenticated domain. + Username *string `json:"username,omitempty"` + // Search for authenticated domains. + Domain *string `json:"domain,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListAuthenticatedDomainParam) SetLimit(Limit int32) *ListAuthenticatedDomainParam { + params.Limit = &Limit + return params +} +func (params *ListAuthenticatedDomainParam) SetOffset(Offset int32) *ListAuthenticatedDomainParam { + params.Offset = &Offset + return params +} +func (params *ListAuthenticatedDomainParam) SetExcludeSubusers(ExcludeSubusers bool) *ListAuthenticatedDomainParam { + params.ExcludeSubusers = &ExcludeSubusers + return params +} +func (params *ListAuthenticatedDomainParam) SetUsername(Username string) *ListAuthenticatedDomainParam { + params.Username = &Username + return params +} +func (params *ListAuthenticatedDomainParam) SetDomain(Domain string) *ListAuthenticatedDomainParam { + params.Domain = &Domain + return params +} +func (params *ListAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *ListAuthenticatedDomainParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a paginated list of all domains you have authenticated.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. +func (c *ApiService) ListAuthenticatedDomain(params *ListAuthenticatedDomainParam) (interface{}, error) { + path := "/v3/whitelabel/domains" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + if params != nil && params.ExcludeSubusers != nil { + data.Set("exclude_subusers", fmt.Sprint(*params.ExcludeSubusers)) + } + if params != nil && params.Username != nil { + data.Set("username", *params.Username) + } + if params != nil && params.Domain != nil { + data.Set("domain", *params.Domain) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/domain_authentication/api_list_authenticated_domain_with_user.go b/rest/api/v3/domain_authentication/api_list_authenticated_domain_with_user.go new file mode 100644 index 00000000..75230a0a --- /dev/null +++ b/rest/api/v3/domain_authentication/api_list_authenticated_domain_with_user.go @@ -0,0 +1,60 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListAuthenticatedDomainWithUserParam struct { + // Username for the subuser to find associated authenticated domain. + Username *string `json:"username"` +} + +func (params *ListAuthenticatedDomainWithUserParam) SetUsername(Username string) *ListAuthenticatedDomainWithUserParam { + params.Username = &Username + return params +} + +// **This endpoint allows you to retrieve all of the authenticated domains that have been assigned to a specific subuser.** Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent's domain. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. Note that if you used the [`/v3/whitelabel/domains/{domain_id}/subuser:add` endpoint]( https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/associate-an-authenticated-domain-with-a-subuser-multiple) to add multiple domains to the subuser, you can use the [`/v3/whitelabel/domains/subuser/all` endpoint](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/list-the-authenticated-domain-associated-with-a-subuser-multiple) to list those associated domains. +func (c *ApiService) ListAuthenticatedDomainWithUser(params *ListAuthenticatedDomainWithUserParam) (interface{}, error) { + path := "/v3/whitelabel/domains/subuser" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Username != nil { + data.Set("username", *params.Username) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AuthenticatedDomainSpf{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/domain_authentication/api_list_default_authenticated_domain.go b/rest/api/v3/domain_authentication/api_list_default_authenticated_domain.go new file mode 100644 index 00000000..c99a0584 --- /dev/null +++ b/rest/api/v3/domain_authentication/api_list_default_authenticated_domain.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListDefaultAuthenticatedDomainParam struct { + // The domain to find a default authentication. + Domain *string `json:"domain,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListDefaultAuthenticatedDomainParam) SetDomain(Domain string) *ListDefaultAuthenticatedDomainParam { + params.Domain = &Domain + return params +} +func (params *ListDefaultAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *ListDefaultAuthenticatedDomainParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve the default authentication for a domain.** When creating or updating a domain authentication, you can set the domain as a default. The default domain will be used to send all mail. If you have multiple authenticated domains, the authenticated domain matching the domain of the From address will be used, and the default will be overridden. This endpoint will return a default domain and its details only if a default is set. You are not required to set a default. If you do not set a default domain, this endpoint will return general information about your domain authentication status. +func (c *ApiService) ListDefaultAuthenticatedDomain(params *ListDefaultAuthenticatedDomainParam) (interface{}, error) { + path := "/v3/whitelabel/domains/default" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Domain != nil { + data.Set("domain", *params.Domain) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/domain_authentication/api_service.go b/rest/api/v3/domain_authentication/api_service.go new file mode 100644 index 00000000..bfe66aff --- /dev/null +++ b/rest/api/v3/domain_authentication/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/domain_authentication/api_update_authenticated_domain.go b/rest/api/v3/domain_authentication/api_update_authenticated_domain.go new file mode 100644 index 00000000..50ff1e32 --- /dev/null +++ b/rest/api/v3/domain_authentication/api_update_authenticated_domain.go @@ -0,0 +1,85 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateAuthenticatedDomainParam struct { + // + DomainId *string `json:"domain_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateAuthenticatedDomainRequest *UpdateAuthenticatedDomainRequest `json:"UpdateAuthenticatedDomainRequest,omitempty"` +} + +func (params *UpdateAuthenticatedDomainParam) SetDomainId(DomainId string) *UpdateAuthenticatedDomainParam { + params.DomainId = &DomainId + return params +} +func (params *UpdateAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *UpdateAuthenticatedDomainParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateAuthenticatedDomainParam) SetUpdateAuthenticatedDomainRequest(UpdateAuthenticatedDomainRequest UpdateAuthenticatedDomainRequest) *UpdateAuthenticatedDomainParam { + params.UpdateAuthenticatedDomainRequest = &UpdateAuthenticatedDomainRequest + return params +} + +// **This endpoint allows you to update the settings for an authenticated domain.** +func (c *ApiService) UpdateAuthenticatedDomain(params *UpdateAuthenticatedDomainParam) (interface{}, error) { + path := "/v3/whitelabel/domains/{DomainId}" + if params != nil && params.DomainId != nil { + path = strings.Replace(path, "{"+"DomainId"+"}", *params.DomainId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateAuthenticatedDomainRequest != nil { + b, err := json.Marshal(*params.UpdateAuthenticatedDomainRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/domain_authentication/api_validate_authenticated_domain.go b/rest/api/v3/domain_authentication/api_validate_authenticated_domain.go new file mode 100644 index 00000000..9a19d23d --- /dev/null +++ b/rest/api/v3/domain_authentication/api_validate_authenticated_domain.go @@ -0,0 +1,79 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type ValidateAuthenticatedDomainParam struct { + // ID of the domain to validate. + Id *int32 `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ValidateAuthenticatedDomainParam) SetId(Id int32) *ValidateAuthenticatedDomainParam { + params.Id = &Id + return params +} +func (params *ValidateAuthenticatedDomainParam) SetOnbehalfof(Onbehalfof string) *ValidateAuthenticatedDomainParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to validate an authenticated domain. If it fails, it will return an error message describing why the domain could not be validated.** +func (c *ApiService) ValidateAuthenticatedDomain(params *ValidateAuthenticatedDomainParam) (interface{}, error) { + path := "/v3/whitelabel/domains/{Id}/validate" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ValidateAuthenticatedDomain200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ValidateAuthenticatedDomain500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/domain_authentication/docs/AddIpToAuthenticatedDomain.md b/rest/api/v3/domain_authentication/docs/AddIpToAuthenticatedDomain.md new file mode 100644 index 00000000..cc716fea --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/AddIpToAuthenticatedDomain.md @@ -0,0 +1,53 @@ +# AddIpToAuthenticatedDomain + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddIpToAuthenticatedDomain**](AddIpToAuthenticatedDomain.md#AddIpToAuthenticatedDomain) | **Post** /v3/whitelabel/domains/{Id}/ips | Add an IP to an authenticated domain + + + +## AddIpToAuthenticatedDomain + +> AuthenticatedDomainSpf AddIpToAuthenticatedDomain(ctx, Idoptional) + +Add an IP to an authenticated domain + +**This endpoint allows you to add an IP address to an authenticated domain.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **int32** | ID of the domain to which you are adding an IP + +### Other Parameters + +Other parameters are passed through a pointer to a AddIpToAuthenticatedDomainParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**AddIpToAuthenticatedDomainRequest** | [**AddIpToAuthenticatedDomainRequest**](AddIpToAuthenticatedDomainRequest.md) | + +### Return type + +[**AuthenticatedDomainSpf**](AuthenticatedDomainSpf.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/AddIpToAuthenticatedDomainRequest.md b/rest/api/v3/domain_authentication/docs/AddIpToAuthenticatedDomainRequest.md new file mode 100644 index 00000000..6eba37a6 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/AddIpToAuthenticatedDomainRequest.md @@ -0,0 +1,11 @@ +# AddIpToAuthenticatedDomainRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | IP to associate with the domain. Used for manually specifying IPs for custom SPF. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomain.md b/rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomain.md new file mode 100644 index 00000000..f96c9ebb --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomain.md @@ -0,0 +1,52 @@ +# AssociateSubuserWithDomain + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AssociateSubuserWithDomain**](AssociateSubuserWithDomain.md#AssociateSubuserWithDomain) | **Post** /v3/whitelabel/domains/{DomainId}/subuser | Associate an authenticated domain with a given user. + + + +## AssociateSubuserWithDomain + +> AuthenticatedDomainSpf AssociateSubuserWithDomain(ctx, DomainIdoptional) + +Associate an authenticated domain with a given user. + +**This endpoint allows you to associate a specific authenticated domain with a subuser.** Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent's domain. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. [You can associate more than one domain with a subuser using the `v3/whitelabel/domains/{domain_id}/subuser:add` endpoint](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/associate-an-authenticated-domain-with-a-subuser-multiple). + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**DomainId** | **int32** | ID of the authenticated domain to associate with the subuser. + +### Other Parameters + +Other parameters are passed through a pointer to a AssociateSubuserWithDomainParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**AssociateSubuserWithDomainRequest** | [**AssociateSubuserWithDomainRequest**](AssociateSubuserWithDomainRequest.md) | + +### Return type + +[**AuthenticatedDomainSpf**](AuthenticatedDomainSpf.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomainMultiple.md b/rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomainMultiple.md new file mode 100644 index 00000000..7aec4d78 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomainMultiple.md @@ -0,0 +1,52 @@ +# AssociateSubuserWithDomainMultiple + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AssociateSubuserWithDomainMultiple**](AssociateSubuserWithDomainMultiple.md#AssociateSubuserWithDomainMultiple) | **Post** /v3/whitelabel/domains/{DomainId}/subuser:add | Associate an authenticated domain with a given user, for up to five domains. + + + +## AssociateSubuserWithDomainMultiple + +> AuthenticatedDomainSpf AssociateSubuserWithDomainMultiple(ctx, DomainIdoptional) + +Associate an authenticated domain with a given user, for up to five domains. + +**This endpoint allows you to associate a specific authenticated domain with a subuser. It can be used to associate up to five authenticated domains.** This functionality allows subusers to send mail using their parent's domain. Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. A subuser can have up to five associated authenticated domains. To see the domains that have already been associated with this user, you can [use the API to list the domains currently associated with the subuser](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/list-the-authenticated-domain-associated-with-a-subuser-multiple). When selecting a domain to send email from, SendGrid checks for domains in the following order and chooses the first one that appears in the hierarchy: 1. Domain assigned by the subuser that matches the email's `From` address domain. 2. The subuser's default domain. 3. Domain assigned by the parent user that matches the `From` address domain. 4. Parent user's default domain. 5. sendgrid.net + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**DomainId** | **int32** | ID of the authenticated domain to associate with the subuser. + +### Other Parameters + +Other parameters are passed through a pointer to a AssociateSubuserWithDomainMultipleParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**AssociateSubuserWithDomainRequest** | [**AssociateSubuserWithDomainRequest**](AssociateSubuserWithDomainRequest.md) | + +### Return type + +[**AuthenticatedDomainSpf**](AuthenticatedDomainSpf.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomainRequest.md b/rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomainRequest.md new file mode 100644 index 00000000..ed7c75bf --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/AssociateSubuserWithDomainRequest.md @@ -0,0 +1,11 @@ +# AssociateSubuserWithDomainRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | Username to associate with the authenticated domain. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/AuthenticateDomain.md b/rest/api/v3/domain_authentication/docs/AuthenticateDomain.md new file mode 100644 index 00000000..950f3cce --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/AuthenticateDomain.md @@ -0,0 +1,49 @@ +# AuthenticateDomain + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AuthenticateDomain**](AuthenticateDomain.md#AuthenticateDomain) | **Post** /v3/whitelabel/domains | Authenticate a domain + + + +## AuthenticateDomain + +> AuthenticatedDomain AuthenticateDomain(ctx, optional) + +Authenticate a domain + +**This endpoint allows you to authenticate a domain.** If you are authenticating a domain for a subuser, you have two options: 1. Use the \"username\" parameter. This allows you to authenticate a domain on behalf of your subuser. This means the subuser is able to see and modify the authenticated domain. 2. Use the Association workflow (see Associate Domain section). This allows you to authenticate a domain created by the parent to a subuser. This means the subuser will default to the assigned domain, but will not be able to see or modify that authenticated domain. However, if the subuser authenticates their own domain it will overwrite the assigned domain. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a AuthenticateDomainParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**AuthenticateDomainRequest** | [**AuthenticateDomainRequest**](AuthenticateDomainRequest.md) | + +### Return type + +[**AuthenticatedDomain**](AuthenticatedDomain.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/AuthenticateDomainRequest.md b/rest/api/v3/domain_authentication/docs/AuthenticateDomainRequest.md new file mode 100644 index 00000000..35a69969 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/AuthenticateDomainRequest.md @@ -0,0 +1,19 @@ +# AuthenticateDomainRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Domain** | **string** | Domain being authenticated. | +**Subdomain** | **string** | The subdomain to use for this authenticated domain. |[optional] +**Username** | **string** | The username associated with this domain. |[optional] +**Ips** | **[]string** | The IP addresses that will be included in the custom SPF record for this authenticated domain. |[optional] +**CustomSpf** | **bool** | Specify whether to use a custom SPF or allow SendGrid to manage your SPF. This option is only available to authenticated domains set up for manual security. |[optional] +**Default** | **bool** | Whether to use this authenticated domain as the fallback if no authenticated domains match the sender's domain. |[optional] +**AutomaticSecurity** | **bool** | Whether to allow SendGrid to manage your SPF records, DKIM keys, and DKIM key rotation. |[optional] +**CustomDkimSelector** | **string** | Add a custom DKIM selector. Accepts three letters or numbers. |[optional] +**Region** | **string** | The region of the domain. Allowed values are `global` and `eu`. The default value is `global`. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/AuthenticatedDomain.md b/rest/api/v3/domain_authentication/docs/AuthenticatedDomain.md new file mode 100644 index 00000000..6cd5c65b --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/AuthenticatedDomain.md @@ -0,0 +1,22 @@ +# AuthenticatedDomain + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **float32** | The ID of the authenticated domain. | +**UserId** | **float32** | The ID of the user that this domain is associated with. | +**Subdomain** | **string** | The subdomain to use for this authenticated domain. | +**Domain** | **string** | The domain to be authenticated. | +**Username** | **string** | The username that this domain will be associated with. | +**Ips** | **[]string** | The IPs to be included in the custom SPF record for this authenticated domain. | +**CustomSpf** | **bool** | Indicates whether this authenticated domain uses custom SPF. | +**Default** | **bool** | Indicates if this is the default authenticated domain. | +**Legacy** | **bool** | Indicates if this authenticated domain was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new authenticated domain if you need to update it. | +**AutomaticSecurity** | **bool** | Indicates if this authenticated domain uses automated security. | +**Valid** | **bool** | Indicates if this is a valid authenticated domain. | +**Dns** | [**ListAllAuthenticatedDomainWithUser200ResponseInnerDns**](ListAllAuthenticatedDomainWithUser200ResponseInnerDns.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpf.md b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpf.md new file mode 100644 index 00000000..1f08a00e --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpf.md @@ -0,0 +1,22 @@ +# AuthenticatedDomainSpf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The ID of the authenticated domain. | +**Domain** | **string** | The domain authenticated. | +**Subdomain** | **string** | The subdomain that was used to create this authenticated domain. |[optional] +**Username** | **string** | The username of the account that this authenticated domain is associated with. | +**UserId** | **int32** | The user_id of the account that this authenticated domain is associated with. | +**Ips** | **[]interface{}** | The IP addresses that are included in the SPF record for this authenticated domain. | +**CustomSpf** | **bool** | Indicates if this authenticated domain uses custom SPF. | +**Default** | **bool** | Indicates if this is the default domain. | +**Legacy** | **bool** | Indicates if this authenticated domain was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new authenticated domain if you need to update it. | +**AutomaticSecurity** | **bool** | Indicates if this authenticated domain uses automated security. | +**Valid** | **bool** | Indicates if this is a valid authenticated domain . | +**Dns** | [**AuthenticatedDomainSpfDns**](AuthenticatedDomainSpfDns.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDns.md b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDns.md new file mode 100644 index 00000000..d4eaca8b --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDns.md @@ -0,0 +1,14 @@ +# AuthenticatedDomainSpfDns + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MailServer** | [**AuthenticatedDomainSpfDnsMailServer**](AuthenticatedDomainSpfDnsMailServer.md) | | +**SubdomainSpf** | [**AuthenticatedDomainSpfDnsSubdomainSpf**](AuthenticatedDomainSpfDnsSubdomainSpf.md) | | +**DomainSpf** | [**AuthenticatedDomainSpfDnsDomainSpf**](AuthenticatedDomainSpfDnsDomainSpf.md) | | +**Dkim** | [**AuthenticatedDomainSpfDnsDkim**](AuthenticatedDomainSpfDnsDkim.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsDkim.md b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsDkim.md new file mode 100644 index 00000000..ec37b619 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsDkim.md @@ -0,0 +1,14 @@ +# AuthenticatedDomainSpfDnsDkim + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Host** | **string** | The DNS labels for the DKIM signature. | +**Type** | **string** | The type of data in the DKIM record. | +**Data** | **string** | The DKIM record. | +**Valid** | **bool** | Indicates if the DKIM record is valid. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsDomainSpf.md b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsDomainSpf.md new file mode 100644 index 00000000..f8f4e368 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsDomainSpf.md @@ -0,0 +1,14 @@ +# AuthenticatedDomainSpfDnsDomainSpf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Host** | **string** | The root domain that this SPF record will be used to authenticate. | +**Type** | **string** | The type of data in the SPF record. | +**Data** | **string** | The SPF record. | +**Valid** | **bool** | Indicates if the SPF record is valid. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsMailServer.md b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsMailServer.md new file mode 100644 index 00000000..b50d175b --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsMailServer.md @@ -0,0 +1,14 @@ +# AuthenticatedDomainSpfDnsMailServer + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Host** | **string** | The domain sending the messages. | +**Type** | **string** | They type of DNS record. | +**Data** | **string** | The mail server responsible for accepting messages from the sending domain. | +**Valid** | **bool** | Indicates if this is a valid DNS record. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsSubdomainSpf.md b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsSubdomainSpf.md new file mode 100644 index 00000000..f2665a2a --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/AuthenticatedDomainSpfDnsSubdomainSpf.md @@ -0,0 +1,14 @@ +# AuthenticatedDomainSpfDnsSubdomainSpf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Host** | **string** | The domain that this SPF record will be used to authenticate. | +**Type** | **string** | The type of data in the SPF record. | +**Data** | **string** | The SPF record. | +**Valid** | **bool** | Indicates if this is a valid SPF record. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/DeleteAuthenticatedDomain.md b/rest/api/v3/domain_authentication/docs/DeleteAuthenticatedDomain.md new file mode 100644 index 00000000..eb4c9a6c --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/DeleteAuthenticatedDomain.md @@ -0,0 +1,52 @@ +# DeleteAuthenticatedDomain + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteAuthenticatedDomain**](DeleteAuthenticatedDomain.md#DeleteAuthenticatedDomain) | **Delete** /v3/whitelabel/domains/{DomainId} | Delete an authenticated domain. + + + +## DeleteAuthenticatedDomain + +> map[string]interface{} DeleteAuthenticatedDomain(ctx, DomainIdoptional) + +Delete an authenticated domain. + +**This endpoint allows you to delete an authenticated domain.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**DomainId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteAuthenticatedDomainParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/DeleteIpFromAuthenticatedDomain.md b/rest/api/v3/domain_authentication/docs/DeleteIpFromAuthenticatedDomain.md new file mode 100644 index 00000000..a8b5e6a5 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/DeleteIpFromAuthenticatedDomain.md @@ -0,0 +1,53 @@ +# DeleteIpFromAuthenticatedDomain + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteIpFromAuthenticatedDomain**](DeleteIpFromAuthenticatedDomain.md#DeleteIpFromAuthenticatedDomain) | **Delete** /v3/whitelabel/domains/{Id}/ips/{Ip} | Remove an IP from an authenticated domain. + + + +## DeleteIpFromAuthenticatedDomain + +> AuthenticatedDomainSpf DeleteIpFromAuthenticatedDomain(ctx, IdIpoptional) + +Remove an IP from an authenticated domain. + +**This endpoint allows you to remove an IP address from that domain's authentication.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **int32** | ID of the domain to delete the IP from. +**Ip** | **string** | IP to remove from the domain. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteIpFromAuthenticatedDomainParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**AuthenticatedDomainSpf**](AuthenticatedDomainSpf.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/DisassociateAuthenticatedDomainFromUser.md b/rest/api/v3/domain_authentication/docs/DisassociateAuthenticatedDomainFromUser.md new file mode 100644 index 00000000..ccfdb2ea --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/DisassociateAuthenticatedDomainFromUser.md @@ -0,0 +1,48 @@ +# DisassociateAuthenticatedDomainFromUser + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DisassociateAuthenticatedDomainFromUser**](DisassociateAuthenticatedDomainFromUser.md#DisassociateAuthenticatedDomainFromUser) | **Delete** /v3/whitelabel/domains/subuser | Disassociate an authenticated domain from a given user. + + + +## DisassociateAuthenticatedDomainFromUser + +> map[string]interface{} DisassociateAuthenticatedDomainFromUser(ctx, optional) + +Disassociate an authenticated domain from a given user. + +**This endpoint allows you to disassociate a specific authenticated domain from a subuser.** Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent's domain. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. Note that if you used the [`/v3/whitelabel/domains/{domain_id}/subuser:add` endpoint](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/associate-an-authenticated-domain-with-a-subuser-multiple) to add multiple domains to the subuser, you should use the [`/v3/whitelabel/domains/{domain_id}/subuser` endpoint](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/disassociate-an-authenticated-domain-from-a-subuser-multiple) to disassociate those domains. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a DisassociateAuthenticatedDomainFromUserParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Username** | **string** | Username for the subuser to find associated authenticated domain. + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/DisassociateSubuserFromDomain.md b/rest/api/v3/domain_authentication/docs/DisassociateSubuserFromDomain.md new file mode 100644 index 00000000..beb09018 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/DisassociateSubuserFromDomain.md @@ -0,0 +1,52 @@ +# DisassociateSubuserFromDomain + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DisassociateSubuserFromDomain**](DisassociateSubuserFromDomain.md#DisassociateSubuserFromDomain) | **Delete** /v3/whitelabel/domains/{DomainId}/subuser | Disassociate an authenticated domain from a given user for users with up to five associated domains. + + + +## DisassociateSubuserFromDomain + +> map[string]interface{} DisassociateSubuserFromDomain(ctx, DomainIdoptional) + +Disassociate an authenticated domain from a given user for users with up to five associated domains. + +**This endpoint allows you to disassociate a specific authenticated domain from a subuser, for users with up to five associated domains.** This functionality allows subusers to send mail using their parent's domain. Authenticated domains can be associated with (i.e. assigned to) subusers kknt, and a subuser can have up to five associated authenticated domains. You can dissociate an authenticated domain from any subuser that has one or more authenticated domains using this endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**DomainId** | **int32** | ID of the authenticated domain to be disassociated with the subuser. + +### Other Parameters + +Other parameters are passed through a pointer to a DisassociateSubuserFromDomainParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Username** | **string** | Username for the subuser to find associated authenticated domain. + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/EmailDnsRecord.md b/rest/api/v3/domain_authentication/docs/EmailDnsRecord.md new file mode 100644 index 00000000..6e37810d --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/EmailDnsRecord.md @@ -0,0 +1,48 @@ +# EmailDnsRecord + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**EmailDnsRecord**](EmailDnsRecord.md#EmailDnsRecord) | **Post** /v3/whitelabel/dns/email | Email DNS records to a co-worker + + + +## EmailDnsRecord + +> EmailDnsRecord(ctx, optional) + +Email DNS records to a co-worker + +**This endpoint is used to share DNS records with a colleagues** Use this endpoint to send SendGrid-generated DNS record information to a co-worker so they can enter it into your DNS provider to validate your domain and link branding. What type of records are sent will depend on whether you have chosen Automated Security or not. When using Automated Security, SendGrid provides you with three CNAME records. If you turn Automated Security off, you are instead given TXT and MX records. If you pass a `link_id` to this endpoint, the generated email will supply the DNS records necessary to complete [Link Branding](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) setup. If you pass a `domain_id` to this endpoint, the generated email will supply the DNS records needed to complete [Domain Authentication](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Passing both IDs will generate an email with the records needed to complete both setup steps. You can retrieve all your domain IDs from the returned `id` fields for each domain using the \"List all authenticated domains\" endpoint. You can retrieve all of your link IDs using the \"Retrieve all branded links\" endpoint. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a EmailDnsRecordParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**EmailDnsRecordRequest** | [**EmailDnsRecordRequest**](EmailDnsRecordRequest.md) | + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/EmailDnsRecord400Response.md b/rest/api/v3/domain_authentication/docs/EmailDnsRecord400Response.md new file mode 100644 index 00000000..74634e08 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/EmailDnsRecord400Response.md @@ -0,0 +1,11 @@ +# EmailDnsRecord400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**EmailDnsRecord400ResponseErrors**](EmailDnsRecord400ResponseErrors.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/EmailDnsRecord400ResponseErrors.md b/rest/api/v3/domain_authentication/docs/EmailDnsRecord400ResponseErrors.md new file mode 100644 index 00000000..285e881a --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/EmailDnsRecord400ResponseErrors.md @@ -0,0 +1,12 @@ +# EmailDnsRecord400ResponseErrors + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | **string** | |[optional] +**Field** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/EmailDnsRecordRequest.md b/rest/api/v3/domain_authentication/docs/EmailDnsRecordRequest.md new file mode 100644 index 00000000..f4f61a68 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/EmailDnsRecordRequest.md @@ -0,0 +1,14 @@ +# EmailDnsRecordRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**LinkId** | **int32** | The ID of the branded link. | +**DomainId** | **int32** | The ID of your SendGrid domain record. | +**Email** | **string** | The email address to send the DNS information to. | +**Message** | **string** | A custom text block to include in the email body sent with the records. |[optional] [default to "Please set these DNS records in our hosting solution."] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/GetAuthenticatedDomain.md b/rest/api/v3/domain_authentication/docs/GetAuthenticatedDomain.md new file mode 100644 index 00000000..e472f781 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/GetAuthenticatedDomain.md @@ -0,0 +1,52 @@ +# GetAuthenticatedDomain + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetAuthenticatedDomain**](GetAuthenticatedDomain.md#GetAuthenticatedDomain) | **Get** /v3/whitelabel/domains/{DomainId} | Retrieve an authenticated domain + + + +## GetAuthenticatedDomain + +> AuthenticatedDomain GetAuthenticatedDomain(ctx, DomainIdoptional) + +Retrieve an authenticated domain + +**This endpoint allows you to retrieve a specific authenticated domain.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**DomainId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a GetAuthenticatedDomainParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**AuthenticatedDomain**](AuthenticatedDomain.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser.md b/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser.md new file mode 100644 index 00000000..facdf5b6 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser.md @@ -0,0 +1,47 @@ +# ListAllAuthenticatedDomainWithUser + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListAllAuthenticatedDomainWithUser**](ListAllAuthenticatedDomainWithUser.md#ListAllAuthenticatedDomainWithUser) | **Get** /v3/whitelabel/domains/subuser/all | List all the authenticated domains associated with the given user. + + + +## ListAllAuthenticatedDomainWithUser + +> []ListAllAuthenticatedDomainWithUser200ResponseInner ListAllAuthenticatedDomainWithUser(ctx, Username) + +List all the authenticated domains associated with the given user. + +**This endpoint allows you to retrieve all of the authenticated domains that have been assigned to a specific subuser.** This functionality allows subusers to send mail using their parent's domain. Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account, and a subuser can have up to five associated domains. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. When selecting a domain to send email from, SendGrid checks for domains in the following order and chooses the first one that appears in the hierarchy: 1. Domain assigned by the subuser that matches the email's `From` address domain. 2. The subuser's default domain. 3. Domain assigned by the parent user that matches the `From` address domain. 4. Parent user's default domain. 5. sendgrid.net + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListAllAuthenticatedDomainWithUserParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**[]ListAllAuthenticatedDomainWithUser200ResponseInner**](ListAllAuthenticatedDomainWithUser200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInner.md b/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInner.md new file mode 100644 index 00000000..01be72df --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInner.md @@ -0,0 +1,22 @@ +# ListAllAuthenticatedDomainWithUser200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **float32** | The ID of the authenticated domain. | +**UserId** | **float32** | The ID of the user that this domain is associated with. | +**Subdomain** | **string** | The subdomain to use for this authenticated domain. | +**Domain** | **string** | The domain to be authenticated. | +**Username** | **string** | The username that this domain will be associated with. | +**Ips** | **[]string** | The IPs to be included in the custom SPF record for this authenticated domain. | +**CustomSpf** | **bool** | Indicates whether this authenticated domain uses custom SPF. | +**Default** | **bool** | Indicates if this is the default authenticated domain. | +**Legacy** | **bool** | Indicates if this authenticated domain was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new authenticated domain if you need to update it. | +**AutomaticSecurity** | **bool** | Indicates if this authenticated domain uses automated security. | +**Valid** | **bool** | Indicates if this is a valid authenticated domain. | +**Dns** | [**ListAllAuthenticatedDomainWithUser200ResponseInnerDns**](ListAllAuthenticatedDomainWithUser200ResponseInnerDns.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDns.md b/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDns.md new file mode 100644 index 00000000..52d1114c --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDns.md @@ -0,0 +1,13 @@ +# ListAllAuthenticatedDomainWithUser200ResponseInnerDns + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MailCname** | [**ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname**](ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname.md) | | +**Dkim1** | [**ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1**](ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1.md) | | +**Dkim2** | [**ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1**](ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1.md b/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1.md new file mode 100644 index 00000000..be86cafd --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1.md @@ -0,0 +1,14 @@ +# ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Valid** | **bool** | Indicates if this is a valid DNS record. | +**Type** | **string** | The type of DNS record. | +**Host** | **string** | The domain that this DNS record was created for. | +**Data** | **string** | The DNS record. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname.md b/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname.md new file mode 100644 index 00000000..f15d047a --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname.md @@ -0,0 +1,14 @@ +# ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Valid** | **bool** | Indicates if this is a valid CNAME. | +**Type** | **string** | The type of DNS record. | +**Host** | **string** | The domain that this CNAME is created for. | +**Data** | **string** | The CNAME record. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/ListAuthenticatedDomain.md b/rest/api/v3/domain_authentication/docs/ListAuthenticatedDomain.md new file mode 100644 index 00000000..b8031638 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ListAuthenticatedDomain.md @@ -0,0 +1,53 @@ +# ListAuthenticatedDomain + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListAuthenticatedDomain**](ListAuthenticatedDomain.md#ListAuthenticatedDomain) | **Get** /v3/whitelabel/domains | List all authenticated domains + + + +## ListAuthenticatedDomain + +> []interface{} ListAuthenticatedDomain(ctx, optional) + +List all authenticated domains + +**This endpoint allows you to retrieve a paginated list of all domains you have authenticated.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListAuthenticatedDomainParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. +**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. +**ExcludeSubusers** | **bool** | Exclude subuser domains from the result. +**Username** | **string** | The username associated with an authenticated domain. +**Domain** | **string** | Search for authenticated domains. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**[]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/ListAuthenticatedDomainWithUser.md b/rest/api/v3/domain_authentication/docs/ListAuthenticatedDomainWithUser.md new file mode 100644 index 00000000..18628529 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ListAuthenticatedDomainWithUser.md @@ -0,0 +1,47 @@ +# ListAuthenticatedDomainWithUser + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListAuthenticatedDomainWithUser**](ListAuthenticatedDomainWithUser.md#ListAuthenticatedDomainWithUser) | **Get** /v3/whitelabel/domains/subuser | List the authenticated domain associated with the given user. + + + +## ListAuthenticatedDomainWithUser + +> AuthenticatedDomainSpf ListAuthenticatedDomainWithUser(ctx, Username) + +List the authenticated domain associated with the given user. + +**This endpoint allows you to retrieve all of the authenticated domains that have been assigned to a specific subuser.** Authenticated domains can be associated with (i.e. assigned to) subusers from a parent account. This functionality allows subusers to send mail using their parent's domain. To associate an authenticated domain with a subuser, the parent account must first authenticate and validate the domain. The parent may then associate the authenticated domain via the subuser management tools. Note that if you used the [`/v3/whitelabel/domains/{domain_id}/subuser:add` endpoint]( https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/associate-an-authenticated-domain-with-a-subuser-multiple) to add multiple domains to the subuser, you can use the [`/v3/whitelabel/domains/subuser/all` endpoint](https://www.twilio.com/docs/sendgrid/api-reference/domain-authentication/list-the-authenticated-domain-associated-with-a-subuser-multiple) to list those associated domains. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListAuthenticatedDomainWithUserParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**AuthenticatedDomainSpf**](AuthenticatedDomainSpf.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/ListDefaultAuthenticatedDomain.md b/rest/api/v3/domain_authentication/docs/ListDefaultAuthenticatedDomain.md new file mode 100644 index 00000000..0c23d724 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ListDefaultAuthenticatedDomain.md @@ -0,0 +1,49 @@ +# ListDefaultAuthenticatedDomain + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListDefaultAuthenticatedDomain**](ListDefaultAuthenticatedDomain.md#ListDefaultAuthenticatedDomain) | **Get** /v3/whitelabel/domains/default | Get the default authentication + + + +## ListDefaultAuthenticatedDomain + +> []interface{} ListDefaultAuthenticatedDomain(ctx, optional) + +Get the default authentication + +**This endpoint allows you to retrieve the default authentication for a domain.** When creating or updating a domain authentication, you can set the domain as a default. The default domain will be used to send all mail. If you have multiple authenticated domains, the authenticated domain matching the domain of the From address will be used, and the default will be overridden. This endpoint will return a default domain and its details only if a default is set. You are not required to set a default. If you do not set a default domain, this endpoint will return general information about your domain authentication status. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListDefaultAuthenticatedDomainParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Domain** | **string** | The domain to find a default authentication. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**[]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/UpdateAuthenticatedDomain.md b/rest/api/v3/domain_authentication/docs/UpdateAuthenticatedDomain.md new file mode 100644 index 00000000..aa6feaad --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/UpdateAuthenticatedDomain.md @@ -0,0 +1,53 @@ +# UpdateAuthenticatedDomain + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateAuthenticatedDomain**](UpdateAuthenticatedDomain.md#UpdateAuthenticatedDomain) | **Patch** /v3/whitelabel/domains/{DomainId} | Update an authenticated domain + + + +## UpdateAuthenticatedDomain + +> []interface{} UpdateAuthenticatedDomain(ctx, DomainIdoptional) + +Update an authenticated domain + +**This endpoint allows you to update the settings for an authenticated domain.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**DomainId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateAuthenticatedDomainParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateAuthenticatedDomainRequest** | [**UpdateAuthenticatedDomainRequest**](UpdateAuthenticatedDomainRequest.md) | + +### Return type + +**[]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/UpdateAuthenticatedDomainRequest.md b/rest/api/v3/domain_authentication/docs/UpdateAuthenticatedDomainRequest.md new file mode 100644 index 00000000..99eac6b7 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/UpdateAuthenticatedDomainRequest.md @@ -0,0 +1,12 @@ +# UpdateAuthenticatedDomainRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Default** | **bool** | Indicates whether this is the default authenticated domain. |[optional] [default to false] +**CustomSpf** | **bool** | Indicates whether to generate a custom SPF record for manual security. |[optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain.md b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain.md new file mode 100644 index 00000000..2382aa2a --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain.md @@ -0,0 +1,52 @@ +# ValidateAuthenticatedDomain + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ValidateAuthenticatedDomain**](ValidateAuthenticatedDomain.md#ValidateAuthenticatedDomain) | **Post** /v3/whitelabel/domains/{Id}/validate | Validate a domain authentication. + + + +## ValidateAuthenticatedDomain + +> ValidateAuthenticatedDomain200Response ValidateAuthenticatedDomain(ctx, Idoptional) + +Validate a domain authentication. + +**This endpoint allows you to validate an authenticated domain. If it fails, it will return an error message describing why the domain could not be validated.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **int32** | ID of the domain to validate. + +### Other Parameters + +Other parameters are passed through a pointer to a ValidateAuthenticatedDomainParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ValidateAuthenticatedDomain200Response**](ValidateAuthenticatedDomain200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200Response.md b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200Response.md new file mode 100644 index 00000000..12efc7d9 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200Response.md @@ -0,0 +1,13 @@ +# ValidateAuthenticatedDomain200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The ID of the authenticated domain. |[optional] +**Valid** | **bool** | Indicates if this is a valid authenticated domain. |[optional] +**ValidationResults** | [**ValidateAuthenticatedDomain200ResponseValidationResults**](ValidateAuthenticatedDomain200ResponseValidationResults.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResults.md b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResults.md new file mode 100644 index 00000000..5afcb1d5 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResults.md @@ -0,0 +1,14 @@ +# ValidateAuthenticatedDomain200ResponseValidationResults + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MailCname** | [**ValidateAuthenticatedDomain200ResponseValidationResultsMailCname**](ValidateAuthenticatedDomain200ResponseValidationResultsMailCname.md) | |[optional] +**Dkim1** | [**ValidateAuthenticatedDomain200ResponseValidationResultsDkim1**](ValidateAuthenticatedDomain200ResponseValidationResultsDkim1.md) | |[optional] +**Dkim2** | [**ValidateAuthenticatedDomain200ResponseValidationResultsDkim1**](ValidateAuthenticatedDomain200ResponseValidationResultsDkim1.md) | |[optional] +**Spf** | [**ValidateAuthenticatedDomain200ResponseValidationResultsSpf**](ValidateAuthenticatedDomain200ResponseValidationResultsSpf.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsDkim1.md b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsDkim1.md new file mode 100644 index 00000000..48d7eb03 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsDkim1.md @@ -0,0 +1,12 @@ +# ValidateAuthenticatedDomain200ResponseValidationResultsDkim1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Valid** | **bool** | Indicates if the DNS record is valid. |[optional] +**Reason** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsMailCname.md b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsMailCname.md new file mode 100644 index 00000000..b87534f9 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsMailCname.md @@ -0,0 +1,12 @@ +# ValidateAuthenticatedDomain200ResponseValidationResultsMailCname + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Valid** | **bool** | Indicates if this DNS record is valid. |[optional] +**Reason** | **string** | The reason this record is invalid. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsSpf.md b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsSpf.md new file mode 100644 index 00000000..12ba1b89 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain200ResponseValidationResultsSpf.md @@ -0,0 +1,12 @@ +# ValidateAuthenticatedDomain200ResponseValidationResultsSpf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Valid** | **bool** | Indicates if the SPF record is valid. |[optional] +**Reason** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain500Response.md b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain500Response.md new file mode 100644 index 00000000..47da7002 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain500Response.md @@ -0,0 +1,11 @@ +# ValidateAuthenticatedDomain500Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ValidateAuthenticatedDomain500ResponseErrorsInner**](ValidateAuthenticatedDomain500ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain500ResponseErrorsInner.md b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain500ResponseErrorsInner.md new file mode 100644 index 00000000..ddc1de56 --- /dev/null +++ b/rest/api/v3/domain_authentication/docs/ValidateAuthenticatedDomain500ResponseErrorsInner.md @@ -0,0 +1,11 @@ +# ValidateAuthenticatedDomain500ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | A message explaining the reason for the error. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/domain_authentication/model_add_ip_to_authenticated_domain_request.go b/rest/api/v3/domain_authentication/model_add_ip_to_authenticated_domain_request.go new file mode 100644 index 00000000..618ecd41 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_add_ip_to_authenticated_domain_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIpToAuthenticatedDomainRequest struct for AddIpToAuthenticatedDomainRequest +type AddIpToAuthenticatedDomainRequest struct { + // IP to associate with the domain. Used for manually specifying IPs for custom SPF. + Ip string `json:"ip"` +} diff --git a/rest/api/v3/domain_authentication/model_associate_subuser_with_domain_request.go b/rest/api/v3/domain_authentication/model_associate_subuser_with_domain_request.go new file mode 100644 index 00000000..46d3898a --- /dev/null +++ b/rest/api/v3/domain_authentication/model_associate_subuser_with_domain_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AssociateSubuserWithDomainRequest struct for AssociateSubuserWithDomainRequest +type AssociateSubuserWithDomainRequest struct { + // Username to associate with the authenticated domain. + Username string `json:"username"` +} diff --git a/rest/api/v3/domain_authentication/model_authenticate_domain_request.go b/rest/api/v3/domain_authentication/model_authenticate_domain_request.go new file mode 100644 index 00000000..1896d15f --- /dev/null +++ b/rest/api/v3/domain_authentication/model_authenticate_domain_request.go @@ -0,0 +1,36 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AuthenticateDomainRequest struct for AuthenticateDomainRequest +type AuthenticateDomainRequest struct { + // Domain being authenticated. + Domain string `json:"domain"` + // The subdomain to use for this authenticated domain. + Subdomain *string `json:"subdomain,omitempty"` + // The username associated with this domain. + Username *string `json:"username,omitempty"` + // The IP addresses that will be included in the custom SPF record for this authenticated domain. + Ips *[]string `json:"ips,omitempty"` + // Specify whether to use a custom SPF or allow SendGrid to manage your SPF. This option is only available to authenticated domains set up for manual security. + CustomSpf *bool `json:"custom_spf,omitempty"` + // Whether to use this authenticated domain as the fallback if no authenticated domains match the sender's domain. + Default *bool `json:"default,omitempty"` + // Whether to allow SendGrid to manage your SPF records, DKIM keys, and DKIM key rotation. + AutomaticSecurity *bool `json:"automatic_security,omitempty"` + // Add a custom DKIM selector. Accepts three letters or numbers. + CustomDkimSelector *string `json:"custom_dkim_selector,omitempty"` + // The region of the domain. Allowed values are `global` and `eu`. The default value is `global`. + Region *string `json:"region,omitempty"` +} diff --git a/rest/api/v3/domain_authentication/model_authenticated_domain.go b/rest/api/v3/domain_authentication/model_authenticated_domain.go new file mode 100644 index 00000000..1de91ca9 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_authenticated_domain.go @@ -0,0 +1,41 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AuthenticatedDomain struct for AuthenticatedDomain +type AuthenticatedDomain struct { + // The ID of the authenticated domain. + Id float32 `json:"id"` + // The ID of the user that this domain is associated with. + UserId float32 `json:"user_id"` + // The subdomain to use for this authenticated domain. + Subdomain string `json:"subdomain"` + // The domain to be authenticated. + Domain string `json:"domain"` + // The username that this domain will be associated with. + Username string `json:"username"` + // The IPs to be included in the custom SPF record for this authenticated domain. + Ips []string `json:"ips"` + // Indicates whether this authenticated domain uses custom SPF. + CustomSpf bool `json:"custom_spf"` + // Indicates if this is the default authenticated domain. + Default bool `json:"default"` + // Indicates if this authenticated domain was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new authenticated domain if you need to update it. + Legacy bool `json:"legacy"` + // Indicates if this authenticated domain uses automated security. + AutomaticSecurity bool `json:"automatic_security"` + // Indicates if this is a valid authenticated domain. + Valid bool `json:"valid"` + Dns ListAllAuthenticatedDomainWithUser200ResponseInnerDns `json:"dns"` +} diff --git a/rest/api/v3/domain_authentication/model_authenticated_domain_spf.go b/rest/api/v3/domain_authentication/model_authenticated_domain_spf.go new file mode 100644 index 00000000..8253d6a7 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_authenticated_domain_spf.go @@ -0,0 +1,41 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AuthenticatedDomainSpf struct for AuthenticatedDomainSpf +type AuthenticatedDomainSpf struct { + // The ID of the authenticated domain. + Id int32 `json:"id"` + // The domain authenticated. + Domain string `json:"domain"` + // The subdomain that was used to create this authenticated domain. + Subdomain *string `json:"subdomain,omitempty"` + // The username of the account that this authenticated domain is associated with. + Username string `json:"username"` + // The user_id of the account that this authenticated domain is associated with. + UserId int32 `json:"user_id"` + // The IP addresses that are included in the SPF record for this authenticated domain. + Ips []interface{} `json:"ips"` + // Indicates if this authenticated domain uses custom SPF. + CustomSpf bool `json:"custom_spf"` + // Indicates if this is the default domain. + Default bool `json:"default"` + // Indicates if this authenticated domain was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new authenticated domain if you need to update it. + Legacy bool `json:"legacy"` + // Indicates if this authenticated domain uses automated security. + AutomaticSecurity bool `json:"automatic_security"` + // Indicates if this is a valid authenticated domain . + Valid bool `json:"valid"` + Dns AuthenticatedDomainSpfDns `json:"dns"` +} diff --git a/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns.go b/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns.go new file mode 100644 index 00000000..776411ba --- /dev/null +++ b/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AuthenticatedDomainSpfDns The DNS records for this authenticated domain. +type AuthenticatedDomainSpfDns struct { + MailServer AuthenticatedDomainSpfDnsMailServer `json:"mail_server"` + SubdomainSpf AuthenticatedDomainSpfDnsSubdomainSpf `json:"subdomain_spf"` + DomainSpf AuthenticatedDomainSpfDnsDomainSpf `json:"domain_spf"` + Dkim AuthenticatedDomainSpfDnsDkim `json:"dkim"` +} diff --git a/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_dkim.go b/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_dkim.go new file mode 100644 index 00000000..e7001397 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_dkim.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AuthenticatedDomainSpfDnsDkim The DKIM record for messages sent using this authenticated domain. +type AuthenticatedDomainSpfDnsDkim struct { + // The DNS labels for the DKIM signature. + Host string `json:"host"` + // The type of data in the DKIM record. + Type string `json:"type"` + // The DKIM record. + Data string `json:"data"` + // Indicates if the DKIM record is valid. + Valid bool `json:"valid"` +} diff --git a/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_domain_spf.go b/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_domain_spf.go new file mode 100644 index 00000000..4a5499ee --- /dev/null +++ b/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_domain_spf.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AuthenticatedDomainSpfDnsDomainSpf The SPF record for the root domain. +type AuthenticatedDomainSpfDnsDomainSpf struct { + // The root domain that this SPF record will be used to authenticate. + Host string `json:"host"` + // The type of data in the SPF record. + Type string `json:"type"` + // The SPF record. + Data string `json:"data"` + // Indicates if the SPF record is valid. + Valid bool `json:"valid"` +} diff --git a/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_mail_server.go b/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_mail_server.go new file mode 100644 index 00000000..cd48d541 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_mail_server.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AuthenticatedDomainSpfDnsMailServer Designates which mail server is responsible for accepting messages from a domain. +type AuthenticatedDomainSpfDnsMailServer struct { + // The domain sending the messages. + Host string `json:"host"` + // They type of DNS record. + Type string `json:"type"` + // The mail server responsible for accepting messages from the sending domain. + Data string `json:"data"` + // Indicates if this is a valid DNS record. + Valid bool `json:"valid"` +} diff --git a/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_subdomain_spf.go b/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_subdomain_spf.go new file mode 100644 index 00000000..9b298d28 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_authenticated_domain_spf_dns_subdomain_spf.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AuthenticatedDomainSpfDnsSubdomainSpf The SPF record for the subdomain used to create this authenticated domain. +type AuthenticatedDomainSpfDnsSubdomainSpf struct { + // The domain that this SPF record will be used to authenticate. + Host string `json:"host"` + // The type of data in the SPF record. + Type string `json:"type"` + // The SPF record. + Data string `json:"data"` + // Indicates if this is a valid SPF record. + Valid bool `json:"valid"` +} diff --git a/rest/api/v3/domain_authentication/model_email_dns_record_400_response.go b/rest/api/v3/domain_authentication/model_email_dns_record_400_response.go new file mode 100644 index 00000000..5c9bd4d1 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_email_dns_record_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// EmailDnsRecord400Response struct for EmailDnsRecord400Response +type EmailDnsRecord400Response struct { + Errors *EmailDnsRecord400ResponseErrors `json:"errors,omitempty"` +} diff --git a/rest/api/v3/domain_authentication/model_email_dns_record_400_response_errors.go b/rest/api/v3/domain_authentication/model_email_dns_record_400_response_errors.go new file mode 100644 index 00000000..b694a199 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_email_dns_record_400_response_errors.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// EmailDnsRecord400ResponseErrors struct for EmailDnsRecord400ResponseErrors +type EmailDnsRecord400ResponseErrors struct { + Error *string `json:"error,omitempty"` + Field *string `json:"field,omitempty"` +} diff --git a/rest/api/v3/domain_authentication/model_email_dns_record_request.go b/rest/api/v3/domain_authentication/model_email_dns_record_request.go new file mode 100644 index 00000000..f8ddf111 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_email_dns_record_request.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// EmailDnsRecordRequest struct for EmailDnsRecordRequest +type EmailDnsRecordRequest struct { + // The ID of the branded link. + LinkId int32 `json:"link_id"` + // The ID of your SendGrid domain record. + DomainId int32 `json:"domain_id"` + // The email address to send the DNS information to. + Email string `json:"email"` + // A custom text block to include in the email body sent with the records. + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner.go b/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner.go new file mode 100644 index 00000000..ffc38779 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner.go @@ -0,0 +1,41 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListAllAuthenticatedDomainWithUser200ResponseInner struct for ListAllAuthenticatedDomainWithUser200ResponseInner +type ListAllAuthenticatedDomainWithUser200ResponseInner struct { + // The ID of the authenticated domain. + Id float32 `json:"id"` + // The ID of the user that this domain is associated with. + UserId float32 `json:"user_id"` + // The subdomain to use for this authenticated domain. + Subdomain string `json:"subdomain"` + // The domain to be authenticated. + Domain string `json:"domain"` + // The username that this domain will be associated with. + Username string `json:"username"` + // The IPs to be included in the custom SPF record for this authenticated domain. + Ips []string `json:"ips"` + // Indicates whether this authenticated domain uses custom SPF. + CustomSpf bool `json:"custom_spf"` + // Indicates if this is the default authenticated domain. + Default bool `json:"default"` + // Indicates if this authenticated domain was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new authenticated domain if you need to update it. + Legacy bool `json:"legacy"` + // Indicates if this authenticated domain uses automated security. + AutomaticSecurity bool `json:"automatic_security"` + // Indicates if this is a valid authenticated domain. + Valid bool `json:"valid"` + Dns ListAllAuthenticatedDomainWithUser200ResponseInnerDns `json:"dns"` +} diff --git a/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns.go b/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns.go new file mode 100644 index 00000000..4d4066b6 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListAllAuthenticatedDomainWithUser200ResponseInnerDns The DNS records used to authenticate the sending domain. +type ListAllAuthenticatedDomainWithUser200ResponseInnerDns struct { + MailCname ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname `json:"mail_cname"` + Dkim1 ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1 `json:"dkim1"` + Dkim2 ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1 `json:"dkim2"` +} diff --git a/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns_dkim1.go b/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns_dkim1.go new file mode 100644 index 00000000..527e6c15 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns_dkim1.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1 A DNS record. +type ListAllAuthenticatedDomainWithUser200ResponseInnerDnsDkim1 struct { + // Indicates if this is a valid DNS record. + Valid bool `json:"valid"` + // The type of DNS record. + Type string `json:"type"` + // The domain that this DNS record was created for. + Host string `json:"host"` + // The DNS record. + Data string `json:"data"` +} diff --git a/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns_mail_cname.go b/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns_mail_cname.go new file mode 100644 index 00000000..fe6f1868 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_list_all_authenticated_domain_with_user_200_response_inner_dns_mail_cname.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname The CNAME for your sending domain that points to sendgrid.net. +type ListAllAuthenticatedDomainWithUser200ResponseInnerDnsMailCname struct { + // Indicates if this is a valid CNAME. + Valid bool `json:"valid"` + // The type of DNS record. + Type string `json:"type"` + // The domain that this CNAME is created for. + Host string `json:"host"` + // The CNAME record. + Data string `json:"data"` +} diff --git a/rest/api/v3/domain_authentication/model_update_authenticated_domain_request.go b/rest/api/v3/domain_authentication/model_update_authenticated_domain_request.go new file mode 100644 index 00000000..37075169 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_update_authenticated_domain_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateAuthenticatedDomainRequest struct for UpdateAuthenticatedDomainRequest +type UpdateAuthenticatedDomainRequest struct { + // Indicates whether this is the default authenticated domain. + Default *bool `json:"default,omitempty"` + // Indicates whether to generate a custom SPF record for manual security. + CustomSpf *bool `json:"custom_spf,omitempty"` +} diff --git a/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response.go b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response.go new file mode 100644 index 00000000..8d90293f --- /dev/null +++ b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateAuthenticatedDomain200Response struct for ValidateAuthenticatedDomain200Response +type ValidateAuthenticatedDomain200Response struct { + // The ID of the authenticated domain. + Id *int32 `json:"id,omitempty"` + // Indicates if this is a valid authenticated domain. + Valid *bool `json:"valid,omitempty"` + ValidationResults *ValidateAuthenticatedDomain200ResponseValidationResults `json:"validation_results,omitempty"` +} diff --git a/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results.go b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results.go new file mode 100644 index 00000000..127ec9c9 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateAuthenticatedDomain200ResponseValidationResults The individual DNS records that are checked when validating, including the reason for any invalid DNS records. +type ValidateAuthenticatedDomain200ResponseValidationResults struct { + MailCname *ValidateAuthenticatedDomain200ResponseValidationResultsMailCname `json:"mail_cname,omitempty"` + Dkim1 *ValidateAuthenticatedDomain200ResponseValidationResultsDkim1 `json:"dkim1,omitempty"` + Dkim2 *ValidateAuthenticatedDomain200ResponseValidationResultsDkim1 `json:"dkim2,omitempty"` + Spf *ValidateAuthenticatedDomain200ResponseValidationResultsSpf `json:"spf,omitempty"` +} diff --git a/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_dkim1.go b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_dkim1.go new file mode 100644 index 00000000..9a8df2e2 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_dkim1.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateAuthenticatedDomain200ResponseValidationResultsDkim1 A DNS record for this authenticated domain. +type ValidateAuthenticatedDomain200ResponseValidationResultsDkim1 struct { + // Indicates if the DNS record is valid. + Valid *bool `json:"valid,omitempty"` + Reason *string `json:"reason,omitempty"` +} diff --git a/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_mail_cname.go b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_mail_cname.go new file mode 100644 index 00000000..d7664480 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_mail_cname.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateAuthenticatedDomain200ResponseValidationResultsMailCname The CNAME record for the authenticated domain. +type ValidateAuthenticatedDomain200ResponseValidationResultsMailCname struct { + // Indicates if this DNS record is valid. + Valid *bool `json:"valid,omitempty"` + // The reason this record is invalid. + Reason *string `json:"reason,omitempty"` +} diff --git a/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_spf.go b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_spf.go new file mode 100644 index 00000000..1505eba8 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_200_response_validation_results_spf.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateAuthenticatedDomain200ResponseValidationResultsSpf The SPF record for the authenticated domain. +type ValidateAuthenticatedDomain200ResponseValidationResultsSpf struct { + // Indicates if the SPF record is valid. + Valid *bool `json:"valid,omitempty"` + Reason *string `json:"reason,omitempty"` +} diff --git a/rest/api/v3/domain_authentication/model_validate_authenticated_domain_500_response.go b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_500_response.go new file mode 100644 index 00000000..d3f70be7 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_500_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateAuthenticatedDomain500Response struct for ValidateAuthenticatedDomain500Response +type ValidateAuthenticatedDomain500Response struct { + Errors *[]ValidateAuthenticatedDomain500ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/domain_authentication/model_validate_authenticated_domain_500_response_errors_inner.go b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_500_response_errors_inner.go new file mode 100644 index 00000000..fc47a4c6 --- /dev/null +++ b/rest/api/v3/domain_authentication/model_validate_authenticated_domain_500_response_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Domain Authentication API +* The Twilio SendGrid Domain Authentication API allows you to manage your authenticated domains and their settings. Domain Authentication is a required step when setting up your Twilio SendGrid account because it's essential to ensuring the deliverability of your email. Domain Authentication signals trustworthiness to email inbox providers and your recipients by approving SendGrid to send email on behalf of your domain. For more information, see [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/). Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateAuthenticatedDomain500ResponseErrorsInner struct for ValidateAuthenticatedDomain500ResponseErrorsInner +type ValidateAuthenticatedDomain500ResponseErrorsInner struct { + // A message explaining the reason for the error. + Message string `json:"message"` +} diff --git a/rest/api/v3/email_activity/README.md b/rest/api/v3/email_activity/README.md new file mode 100644 index 00000000..de11c476 --- /dev/null +++ b/rest/api/v3/email_activity/README.md @@ -0,0 +1,89 @@ +# Go API client for + +The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. + +You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. + +See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:01.497877+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DownloadCsv* | [**DownloadCsv**](docs/DownloadCsv.md#downloadcsv) | **Get** /v3/messages/download/{DownloadUuid} | Download CSV +*GetMessage* | [**GetMessage**](docs/GetMessage.md#getmessage) | **Get** /v3/messages/{MsgId} | Filter messages by message ID +*ListMessage* | [**ListMessage**](docs/ListMessage.md#listmessage) | **Get** /v3/messages | Filter all messages +*RequestCsv* | [**RequestCsv**](docs/RequestCsv.md#requestcsv) | **Post** /v3/messages/download | Request CSV + + +## Documentation For Models + + - [AbbvMessage](AbbvMessage.md) + - [BounceType](BounceType.md) + - [BounceType1](BounceType1.md) + - [DownloadCsv200Response](DownloadCsv200Response.md) + - [EmailActivityResponseBaseProps](EmailActivityResponseBaseProps.md) + - [Event](Event.md) + - [EventName](EventName.md) + - [EventName1](EventName1.md) + - [GetMessage404Response](GetMessage404Response.md) + - [GetMessage404ResponseErrorsInner](GetMessage404ResponseErrorsInner.md) + - [ListMessage200Response](ListMessage200Response.md) + - [ListMessage400Response](ListMessage400Response.md) + - [ListMessage400ResponseErrorsInner](ListMessage400ResponseErrorsInner.md) + - [ListMessage429Response](ListMessage429Response.md) + - [ListMessage429ResponseErrorsInner](ListMessage429ResponseErrorsInner.md) + - [Message](Message.md) + - [OutboundIpType](OutboundIpType.md) + - [OutboundIpType1](OutboundIpType1.md) + - [RequestCsv202Response](RequestCsv202Response.md) + - [Status](Status.md) + - [Status1](Status1.md) + - [Status2](Status2.md) + - [Status3](Status3.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/email_activity/api_download_csv.go b/rest/api/v3/email_activity/api_download_csv.go new file mode 100644 index 00000000..4490e27a --- /dev/null +++ b/rest/api/v3/email_activity/api_download_csv.go @@ -0,0 +1,77 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DownloadCsvParam struct { + // UUID used to locate the download csv request entry in the DB. This is the UUID provided in the email sent to the user when their csv file is ready to download + DownloadUuid *string `json:"download_uuid"` +} + +func (params *DownloadCsvParam) SetDownloadUuid(DownloadUuid string) *DownloadCsvParam { + params.DownloadUuid = &DownloadUuid + return params +} + +// **This endpoint will return a presigned URL that can be used to download the CSV that was requested from the \"Request a CSV\" endpoint.** +func (c *ApiService) DownloadCsv(params *DownloadCsvParam) (interface{}, error) { + path := "/v3/messages/download/{DownloadUuid}" + if params != nil && params.DownloadUuid != nil { + path = strings.Replace(path, "{"+"DownloadUuid"+"}", *params.DownloadUuid, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &DownloadCsv200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ListMessage429Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListMessage429Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/email_activity/api_get_message.go b/rest/api/v3/email_activity/api_get_message.go new file mode 100644 index 00000000..e94cfae4 --- /dev/null +++ b/rest/api/v3/email_activity/api_get_message.go @@ -0,0 +1,85 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetMessageParam struct { + // The ID of the message you are requesting details for. + MsgId *string `json:"msg_id"` +} + +func (params *GetMessageParam) SetMsgId(MsgId string) *GetMessageParam { + params.MsgId = &MsgId + return params +} + +// Get all of the details about the specified message. +func (c *ApiService) GetMessage(params *GetMessageParam) (interface{}, error) { + path := "/v3/messages/{MsgId}" + if params != nil && params.MsgId != nil { + path = strings.Replace(path, "{"+"MsgId"+"}", *params.MsgId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &Message{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ListMessage429Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &GetMessage404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &ListMessage429Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/email_activity/api_list_message.go b/rest/api/v3/email_activity/api_list_message.go new file mode 100644 index 00000000..ccb93840 --- /dev/null +++ b/rest/api/v3/email_activity/api_list_message.go @@ -0,0 +1,86 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListMessageParam struct { + // Use the query syntax to filter your email activity. + Query *string `json:"query"` + // The number of messages returned. This parameter must be greater than 0 and less than or equal to 1000 + Limit *float32 `json:"limit,omitempty"` +} + +func (params *ListMessageParam) SetQuery(Query string) *ListMessageParam { + params.Query = &Query + return params +} +func (params *ListMessageParam) SetLimit(Limit float32) *ListMessageParam { + params.Limit = &Limit + return params +} + +// Filter all messages to search your Email Activity. All queries must be [URL encoded](https://meyerweb.com/eric/tools/dencoder/), and use the following format: `query={query_type}=\"{query_content}\"` Once URL encoded, the previous query will look like this: `query=type%3D%22query_content%22` For example, to filter by a specific email, use the following query: `query=to_email%3D%22example%40example.com%22` Visit our [Query Reference section](https://docs.sendgrid.com/for-developers/sending-email/getting-started-email-activity-api#query-reference) to see a full list of basic query types and examples. +func (c *ApiService) ListMessage(params *ListMessageParam) (interface{}, error) { + path := "/v3/messages" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Query != nil { + data.Set("query", *params.Query) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListMessage200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ListMessage400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &ListMessage429Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/email_activity/api_request_csv.go b/rest/api/v3/email_activity/api_request_csv.go new file mode 100644 index 00000000..0cb265cf --- /dev/null +++ b/rest/api/v3/email_activity/api_request_csv.go @@ -0,0 +1,84 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type RequestCsvParam struct { + // Uses a SQL like syntax to indicate which messages to include in the CSV + Query *string `json:"query,omitempty"` +} + +func (params *RequestCsvParam) SetQuery(Query string) *RequestCsvParam { + params.Query = &Query + return params +} + +// This request will kick off a backend process to generate a CSV file. Once generated, the worker will then send an email for the user download the file. The link will expire in 3 days. The CSV will contain the events from the last 30 days, limited to the last 1 million events maximum. This endpoint will be rate limited to 1 request every 12 hours (rate limit may change). This endpoint is similar to the GET Single Message endpoint - the only difference is that /download is added to indicate that this is a CSV download requests but the same query is used to determine what the CSV should contain. +func (c *ApiService) RequestCsv(params *RequestCsvParam) (interface{}, error) { + path := "/v3/messages/download" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Query != nil { + data.Set("query", *params.Query) + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 202 { + ps := &RequestCsv202Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ListMessage429Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &ListMessage429Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListMessage429Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/email_activity/api_service.go b/rest/api/v3/email_activity/api_service.go new file mode 100644 index 00000000..9a929e14 --- /dev/null +++ b/rest/api/v3/email_activity/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/email_activity/docs/AbbvMessage.md b/rest/api/v3/email_activity/docs/AbbvMessage.md new file mode 100644 index 00000000..d5eb580e --- /dev/null +++ b/rest/api/v3/email_activity/docs/AbbvMessage.md @@ -0,0 +1,18 @@ +# AbbvMessage + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FromEmail** | **string** | | +**MsgId** | **string** | | +**Subject** | **string** | | +**ToEmail** | **string** | | +**Status** | [**Status**](Status.md) | | +**OpensCount** | **int32** | | +**ClicksCount** | **int32** | | +**LastEventTime** | **string** | iso 8601 format | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/BounceType.md b/rest/api/v3/email_activity/docs/BounceType.md new file mode 100644 index 00000000..d419a200 --- /dev/null +++ b/rest/api/v3/email_activity/docs/BounceType.md @@ -0,0 +1,13 @@ +# BounceType + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**SOFT** | string | (value: `"soft"`) +**HARD** | string | (value: `"hard"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/BounceType1.md b/rest/api/v3/email_activity/docs/BounceType1.md new file mode 100644 index 00000000..6c717285 --- /dev/null +++ b/rest/api/v3/email_activity/docs/BounceType1.md @@ -0,0 +1,13 @@ +# BounceType1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**SOFT** | string | (value: `"soft"`) +**HARD** | string | (value: `"hard"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/DownloadCsv.md b/rest/api/v3/email_activity/docs/DownloadCsv.md new file mode 100644 index 00000000..e53ea921 --- /dev/null +++ b/rest/api/v3/email_activity/docs/DownloadCsv.md @@ -0,0 +1,51 @@ +# DownloadCsv + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DownloadCsv**](DownloadCsv.md#DownloadCsv) | **Get** /v3/messages/download/{DownloadUuid} | Download CSV + + + +## DownloadCsv + +> DownloadCsv200Response DownloadCsv(ctx, DownloadUuid) + +Download CSV + +**This endpoint will return a presigned URL that can be used to download the CSV that was requested from the \"Request a CSV\" endpoint.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**DownloadUuid** | **string** | UUID used to locate the download csv request entry in the DB. This is the UUID provided in the email sent to the user when their csv file is ready to download + +### Other Parameters + +Other parameters are passed through a pointer to a DownloadCsvParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**DownloadCsv200Response**](DownloadCsv200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/email_activity/docs/DownloadCsv200Response.md b/rest/api/v3/email_activity/docs/DownloadCsv200Response.md new file mode 100644 index 00000000..5a2abcc5 --- /dev/null +++ b/rest/api/v3/email_activity/docs/DownloadCsv200Response.md @@ -0,0 +1,12 @@ +# DownloadCsv200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PresignedUrl** | **string** | A signed link that will allow you to download the CSV file requested by the Request a CSV endpoint. |[optional] +**Csv** | **string** | Returns the aws signed link to the csv file which mako UI should perform a get on to trigger the csv download for the user | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/EmailActivityResponseBaseProps.md b/rest/api/v3/email_activity/docs/EmailActivityResponseBaseProps.md new file mode 100644 index 00000000..9a6546f4 --- /dev/null +++ b/rest/api/v3/email_activity/docs/EmailActivityResponseBaseProps.md @@ -0,0 +1,15 @@ +# EmailActivityResponseBaseProps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FromEmail** | **string** | The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account. |[optional] [default to "test0@example.com"] +**MsgId** | **string** | A unique ID assigned to the message. This ID can be used to retrieve activity data for the specific message. |[optional] +**Subject** | **string** | The email's subject line. |[optional] +**ToEmail** | **string** | The intended recipient's email address. |[optional] +**Status** | [**Status3**](Status3.md) | The message's status. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/Event.md b/rest/api/v3/email_activity/docs/Event.md new file mode 100644 index 00000000..78e02233 --- /dev/null +++ b/rest/api/v3/email_activity/docs/Event.md @@ -0,0 +1,18 @@ +# Event + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EventName** | [**EventName**](EventName.md) | Name of event | +**Processed** | **string** | The date when the event was processed | +**Reason** | **string** | Explanation of what caused the message to be \"bounced\", \"deferred\", or \"blocked\". Usually contains error message from the server - e.g. message from gmail why mail was deferred. |[optional] +**AttemptNum** | **int32** | Used with \"deferred\" events to indicate the attempt number out of 10. One \"deferred\" entry will exists under events array for each time a message was deferred with error message from the server. |[optional] +**Url** | **string** | Used with \"clicked\" event to indicate which url the user clicked. |[optional] +**BounceType** | [**BounceType**](BounceType.md) | Use to distinguish between types of bounces | +**HttpUserAgent** | **string** | Client recipient used to click or open message | +**MxServer** | **string** | The MX server that received the email. For example, mx.gmail.com | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/EventName.md b/rest/api/v3/email_activity/docs/EventName.md new file mode 100644 index 00000000..fc3500e5 --- /dev/null +++ b/rest/api/v3/email_activity/docs/EventName.md @@ -0,0 +1,22 @@ +# EventName + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**BOUNCED** | string | (value: `"bounced"`) +**OPENED** | string | (value: `"opened"`) +**CLICKED** | string | (value: `"clicked"`) +**PROCESSED** | string | (value: `"processed"`) +**DROPPED** | string | (value: `"dropped"`) +**DELIVERED** | string | (value: `"delivered"`) +**DEFERRED** | string | (value: `"deferred"`) +**SPAM_REPORT** | string | (value: `"spam_report"`) +**UNSUBSCRIBE** | string | (value: `"unsubscribe"`) +**GROUP_UNSUBSCRIBE** | string | (value: `"group_unsubscribe"`) +**GROUP_RESUBSCRIBE** | string | (value: `"group_resubscribe"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/EventName1.md b/rest/api/v3/email_activity/docs/EventName1.md new file mode 100644 index 00000000..32f92dff --- /dev/null +++ b/rest/api/v3/email_activity/docs/EventName1.md @@ -0,0 +1,22 @@ +# EventName1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**BOUNCED** | string | (value: `"bounced"`) +**OPENED** | string | (value: `"opened"`) +**CLICKED** | string | (value: `"clicked"`) +**PROCESSED** | string | (value: `"processed"`) +**DROPPED** | string | (value: `"dropped"`) +**DELIVERED** | string | (value: `"delivered"`) +**DEFERRED** | string | (value: `"deferred"`) +**SPAM_REPORT** | string | (value: `"spam_report"`) +**UNSUBSCRIBE** | string | (value: `"unsubscribe"`) +**GROUP_UNSUBSCRIBE** | string | (value: `"group_unsubscribe"`) +**GROUP_RESUBSCRIBE** | string | (value: `"group_resubscribe"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/GetMessage.md b/rest/api/v3/email_activity/docs/GetMessage.md new file mode 100644 index 00000000..aa7a5818 --- /dev/null +++ b/rest/api/v3/email_activity/docs/GetMessage.md @@ -0,0 +1,51 @@ +# GetMessage + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetMessage**](GetMessage.md#GetMessage) | **Get** /v3/messages/{MsgId} | Filter messages by message ID + + + +## GetMessage + +> Message GetMessage(ctx, MsgId) + +Filter messages by message ID + +Get all of the details about the specified message. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**MsgId** | **string** | The ID of the message you are requesting details for. + +### Other Parameters + +Other parameters are passed through a pointer to a GetMessageParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**Message**](Message.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/email_activity/docs/GetMessage404Response.md b/rest/api/v3/email_activity/docs/GetMessage404Response.md new file mode 100644 index 00000000..488a3b4d --- /dev/null +++ b/rest/api/v3/email_activity/docs/GetMessage404Response.md @@ -0,0 +1,11 @@ +# GetMessage404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]GetMessage404ResponseErrorsInner**](GetMessage404ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/GetMessage404ResponseErrorsInner.md b/rest/api/v3/email_activity/docs/GetMessage404ResponseErrorsInner.md new file mode 100644 index 00000000..fd1ec1f1 --- /dev/null +++ b/rest/api/v3/email_activity/docs/GetMessage404ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# GetMessage404ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | |[optional] +**Field** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/ListMessage.md b/rest/api/v3/email_activity/docs/ListMessage.md new file mode 100644 index 00000000..e2438fc5 --- /dev/null +++ b/rest/api/v3/email_activity/docs/ListMessage.md @@ -0,0 +1,48 @@ +# ListMessage + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListMessage**](ListMessage.md#ListMessage) | **Get** /v3/messages | Filter all messages + + + +## ListMessage + +> ListMessage200Response ListMessage(ctx, Queryoptional) + +Filter all messages + +Filter all messages to search your Email Activity. All queries must be [URL encoded](https://meyerweb.com/eric/tools/dencoder/), and use the following format: `query={query_type}=\"{query_content}\"` Once URL encoded, the previous query will look like this: `query=type%3D%22query_content%22` For example, to filter by a specific email, use the following query: `query=to_email%3D%22example%40example.com%22` Visit our [Query Reference section](https://docs.sendgrid.com/for-developers/sending-email/getting-started-email-activity-api#query-reference) to see a full list of basic query types and examples. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListMessageParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **float32** | The number of messages returned. This parameter must be greater than 0 and less than or equal to 1000 + +### Return type + +[**ListMessage200Response**](ListMessage200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/email_activity/docs/ListMessage200Response.md b/rest/api/v3/email_activity/docs/ListMessage200Response.md new file mode 100644 index 00000000..4c8b0b60 --- /dev/null +++ b/rest/api/v3/email_activity/docs/ListMessage200Response.md @@ -0,0 +1,11 @@ +# ListMessage200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Messages** | [**[]AbbvMessage**](AbbvMessage.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/ListMessage400Response.md b/rest/api/v3/email_activity/docs/ListMessage400Response.md new file mode 100644 index 00000000..66b20996 --- /dev/null +++ b/rest/api/v3/email_activity/docs/ListMessage400Response.md @@ -0,0 +1,11 @@ +# ListMessage400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ListMessage400ResponseErrorsInner**](ListMessage400ResponseErrorsInner.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/ListMessage400ResponseErrorsInner.md b/rest/api/v3/email_activity/docs/ListMessage400ResponseErrorsInner.md new file mode 100644 index 00000000..f75aa149 --- /dev/null +++ b/rest/api/v3/email_activity/docs/ListMessage400ResponseErrorsInner.md @@ -0,0 +1,11 @@ +# ListMessage400ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/ListMessage429Response.md b/rest/api/v3/email_activity/docs/ListMessage429Response.md new file mode 100644 index 00000000..5f0af5e3 --- /dev/null +++ b/rest/api/v3/email_activity/docs/ListMessage429Response.md @@ -0,0 +1,11 @@ +# ListMessage429Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ListMessage429ResponseErrorsInner**](ListMessage429ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/ListMessage429ResponseErrorsInner.md b/rest/api/v3/email_activity/docs/ListMessage429ResponseErrorsInner.md new file mode 100644 index 00000000..14d3e696 --- /dev/null +++ b/rest/api/v3/email_activity/docs/ListMessage429ResponseErrorsInner.md @@ -0,0 +1,11 @@ +# ListMessage429ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/Message.md b/rest/api/v3/email_activity/docs/Message.md new file mode 100644 index 00000000..db81f245 --- /dev/null +++ b/rest/api/v3/email_activity/docs/Message.md @@ -0,0 +1,25 @@ +# Message + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FromEmail** | **string** | The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account. |[optional] [default to "test0@example.com"] +**MsgId** | **string** | A unique ID assigned to the message. This ID can be used to retrieve activity data for the specific message. |[optional] +**Subject** | **string** | The email's subject line. |[optional] +**ToEmail** | **string** | The intended recipient's email address. |[optional] +**Status** | [**Status3**](Status3.md) | The message's status. |[optional] +**TemplateId** | **string** | The ID associated with a Twilio SendGrid email template used to format the message. | +**AsmGroupId** | **int32** | The unsubscribe group associated with this email. | +**Teammate** | **string** | Teammate's username | +**ApiKeyId** | **string** | The ID of the API Key used to authenticate the sending request for the message. | +**Events** | [**[]Event**](Event.md) | List of events related to email message | +**OriginatingIp** | **string** | This is the IP of the user who sent the message. | +**Categories** | **[]string** | Categories users associated to the message | +**UniqueArgs** | **string** | JSON hash of key-value pairs associated with the message. |[default to "Null"] +**OutboundIp** | **string** | IP used to send to the remote Mail Transfer Agent. | +**OutboundIpType** | [**OutboundIpType**](OutboundIpType.md) | Whether or not the outbound IP is dedicated vs shared | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/OutboundIpType.md b/rest/api/v3/email_activity/docs/OutboundIpType.md new file mode 100644 index 00000000..0b59274a --- /dev/null +++ b/rest/api/v3/email_activity/docs/OutboundIpType.md @@ -0,0 +1,13 @@ +# OutboundIpType + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DEDICATED** | string | (value: `"dedicated"`) +**SHARED** | string | (value: `"shared"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/OutboundIpType1.md b/rest/api/v3/email_activity/docs/OutboundIpType1.md new file mode 100644 index 00000000..e6261498 --- /dev/null +++ b/rest/api/v3/email_activity/docs/OutboundIpType1.md @@ -0,0 +1,13 @@ +# OutboundIpType1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DEDICATED** | string | (value: `"dedicated"`) +**SHARED** | string | (value: `"shared"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/RequestCsv.md b/rest/api/v3/email_activity/docs/RequestCsv.md new file mode 100644 index 00000000..c18ac4b3 --- /dev/null +++ b/rest/api/v3/email_activity/docs/RequestCsv.md @@ -0,0 +1,48 @@ +# RequestCsv + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**RequestCsv**](RequestCsv.md#RequestCsv) | **Post** /v3/messages/download | Request CSV + + + +## RequestCsv + +> RequestCsv202Response RequestCsv(ctx, optional) + +Request CSV + +This request will kick off a backend process to generate a CSV file. Once generated, the worker will then send an email for the user download the file. The link will expire in 3 days. The CSV will contain the events from the last 30 days, limited to the last 1 million events maximum. This endpoint will be rate limited to 1 request every 12 hours (rate limit may change). This endpoint is similar to the GET Single Message endpoint - the only difference is that /download is added to indicate that this is a CSV download requests but the same query is used to determine what the CSV should contain. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a RequestCsvParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Query** | **string** | Uses a SQL like syntax to indicate which messages to include in the CSV + +### Return type + +[**RequestCsv202Response**](RequestCsv202Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/email_activity/docs/RequestCsv202Response.md b/rest/api/v3/email_activity/docs/RequestCsv202Response.md new file mode 100644 index 00000000..04c55510 --- /dev/null +++ b/rest/api/v3/email_activity/docs/RequestCsv202Response.md @@ -0,0 +1,12 @@ +# RequestCsv202Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | [**Status2**](Status2.md) | |[optional] +**Message** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/Status.md b/rest/api/v3/email_activity/docs/Status.md new file mode 100644 index 00000000..9c0176ea --- /dev/null +++ b/rest/api/v3/email_activity/docs/Status.md @@ -0,0 +1,14 @@ +# Status + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**PROCESSED** | string | (value: `"processed"`) +**DELIVERED** | string | (value: `"delivered"`) +**NOT_DELIVERED** | string | (value: `"not_delivered"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/Status1.md b/rest/api/v3/email_activity/docs/Status1.md new file mode 100644 index 00000000..835d5e5c --- /dev/null +++ b/rest/api/v3/email_activity/docs/Status1.md @@ -0,0 +1,14 @@ +# Status1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**PROCESSED** | string | (value: `"processed"`) +**NOT_DELIVERED** | string | (value: `"not_delivered"`) +**DELIVERED** | string | (value: `"delivered"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/Status2.md b/rest/api/v3/email_activity/docs/Status2.md new file mode 100644 index 00000000..35da3328 --- /dev/null +++ b/rest/api/v3/email_activity/docs/Status2.md @@ -0,0 +1,12 @@ +# Status2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**PENDING** | string | (value: `"pending"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/docs/Status3.md b/rest/api/v3/email_activity/docs/Status3.md new file mode 100644 index 00000000..0cccb107 --- /dev/null +++ b/rest/api/v3/email_activity/docs/Status3.md @@ -0,0 +1,14 @@ +# Status3 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**PROCESSED** | string | (value: `"processed"`) +**DELIVERED** | string | (value: `"delivered"`) +**NOT_DELIVERED** | string | (value: `"not_delivered"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_activity/model_abbv__message.go b/rest/api/v3/email_activity/model_abbv__message.go new file mode 100644 index 00000000..11ab95ae --- /dev/null +++ b/rest/api/v3/email_activity/model_abbv__message.go @@ -0,0 +1,27 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AbbvMessage struct for AbbvMessage +type AbbvMessage struct { + FromEmail string `json:"from_email"` + MsgId string `json:"msg_id"` + Subject string `json:"subject"` + ToEmail string `json:"to_email"` + Status Status `json:"status"` + OpensCount int32 `json:"opens_count"` + ClicksCount int32 `json:"clicks_count"` + // iso 8601 format + LastEventTime string `json:"last_event_time"` +} diff --git a/rest/api/v3/email_activity/model_bounce_type.go b/rest/api/v3/email_activity/model_bounce_type.go new file mode 100644 index 00000000..76c31a7f --- /dev/null +++ b/rest/api/v3/email_activity/model_bounce_type.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// BounceType the model 'BounceType' +type BounceType string + +// List of BounceType +const ( + BOUNCETYPE_SOFT BounceType = "soft" + BOUNCETYPE_HARD BounceType = "hard" +) diff --git a/rest/api/v3/email_activity/model_bounce_type1.go b/rest/api/v3/email_activity/model_bounce_type1.go new file mode 100644 index 00000000..a9c49152 --- /dev/null +++ b/rest/api/v3/email_activity/model_bounce_type1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// BounceType1 the model 'BounceType1' +type BounceType1 string + +// List of BounceType1 +const ( + BOUNCETYPE1_SOFT BounceType1 = "soft" + BOUNCETYPE1_HARD BounceType1 = "hard" +) diff --git a/rest/api/v3/email_activity/model_download_csv_200_response.go b/rest/api/v3/email_activity/model_download_csv_200_response.go new file mode 100644 index 00000000..ee65ebd8 --- /dev/null +++ b/rest/api/v3/email_activity/model_download_csv_200_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DownloadCsv200Response struct for DownloadCsv200Response +type DownloadCsv200Response struct { + // A signed link that will allow you to download the CSV file requested by the Request a CSV endpoint. + PresignedUrl *string `json:"presigned_url,omitempty"` + // Returns the aws signed link to the csv file which mako UI should perform a get on to trigger the csv download for the user + Csv string `json:"csv"` +} diff --git a/rest/api/v3/email_activity/model_email_activity_response_base_props.go b/rest/api/v3/email_activity/model_email_activity_response_base_props.go new file mode 100644 index 00000000..3de2c61d --- /dev/null +++ b/rest/api/v3/email_activity/model_email_activity_response_base_props.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// EmailActivityResponseBaseProps struct for EmailActivityResponseBaseProps +type EmailActivityResponseBaseProps struct { + // The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account. + FromEmail *string `json:"from_email,omitempty"` + // A unique ID assigned to the message. This ID can be used to retrieve activity data for the specific message. + MsgId *string `json:"msg_id,omitempty"` + // The email's subject line. + Subject *string `json:"subject,omitempty"` + // The intended recipient's email address. + ToEmail *string `json:"to_email,omitempty"` + // The message's status. + Status *Status3 `json:"status,omitempty"` +} diff --git a/rest/api/v3/email_activity/model_event.go b/rest/api/v3/email_activity/model_event.go new file mode 100644 index 00000000..1353170d --- /dev/null +++ b/rest/api/v3/email_activity/model_event.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Event struct for Event +type Event struct { + // Name of event + EventName EventName `json:"event_name"` + // The date when the event was processed + Processed string `json:"processed"` + // Explanation of what caused the message to be \"bounced\", \"deferred\", or \"blocked\". Usually contains error message from the server - e.g. message from gmail why mail was deferred. + Reason *string `json:"reason,omitempty"` + // Used with \"deferred\" events to indicate the attempt number out of 10. One \"deferred\" entry will exists under events array for each time a message was deferred with error message from the server. + AttemptNum *int32 `json:"attempt_num,omitempty"` + // Used with \"clicked\" event to indicate which url the user clicked. + Url *string `json:"url,omitempty"` + // Use to distinguish between types of bounces + BounceType BounceType `json:"bounce_type"` + // Client recipient used to click or open message + HttpUserAgent string `json:"http_user_agent"` + // The MX server that received the email. For example, mx.gmail.com + MxServer string `json:"mx_server"` +} diff --git a/rest/api/v3/email_activity/model_event_name.go b/rest/api/v3/email_activity/model_event_name.go new file mode 100644 index 00000000..0756869a --- /dev/null +++ b/rest/api/v3/email_activity/model_event_name.go @@ -0,0 +1,32 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// EventName the model 'EventName' +type EventName string + +// List of EventName +const ( + EVENTNAME_BOUNCED EventName = "bounced" + EVENTNAME_OPENED EventName = "opened" + EVENTNAME_CLICKED EventName = "clicked" + EVENTNAME_PROCESSED EventName = "processed" + EVENTNAME_DROPPED EventName = "dropped" + EVENTNAME_DELIVERED EventName = "delivered" + EVENTNAME_DEFERRED EventName = "deferred" + EVENTNAME_SPAM_REPORT EventName = "spam_report" + EVENTNAME_UNSUBSCRIBE EventName = "unsubscribe" + EVENTNAME_GROUP_UNSUBSCRIBE EventName = "group_unsubscribe" + EVENTNAME_GROUP_RESUBSCRIBE EventName = "group_resubscribe" +) diff --git a/rest/api/v3/email_activity/model_event_name1.go b/rest/api/v3/email_activity/model_event_name1.go new file mode 100644 index 00000000..28041369 --- /dev/null +++ b/rest/api/v3/email_activity/model_event_name1.go @@ -0,0 +1,32 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// EventName1 the model 'EventName1' +type EventName1 string + +// List of EventName1 +const ( + EVENTNAME1_BOUNCED EventName1 = "bounced" + EVENTNAME1_OPENED EventName1 = "opened" + EVENTNAME1_CLICKED EventName1 = "clicked" + EVENTNAME1_PROCESSED EventName1 = "processed" + EVENTNAME1_DROPPED EventName1 = "dropped" + EVENTNAME1_DELIVERED EventName1 = "delivered" + EVENTNAME1_DEFERRED EventName1 = "deferred" + EVENTNAME1_SPAM_REPORT EventName1 = "spam_report" + EVENTNAME1_UNSUBSCRIBE EventName1 = "unsubscribe" + EVENTNAME1_GROUP_UNSUBSCRIBE EventName1 = "group_unsubscribe" + EVENTNAME1_GROUP_RESUBSCRIBE EventName1 = "group_resubscribe" +) diff --git a/rest/api/v3/email_activity/model_get_message_404_response.go b/rest/api/v3/email_activity/model_get_message_404_response.go new file mode 100644 index 00000000..4ba14b45 --- /dev/null +++ b/rest/api/v3/email_activity/model_get_message_404_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetMessage404Response struct for GetMessage404Response +type GetMessage404Response struct { + Errors *[]GetMessage404ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/email_activity/model_get_message_404_response_errors_inner.go b/rest/api/v3/email_activity/model_get_message_404_response_errors_inner.go new file mode 100644 index 00000000..c2a0aa50 --- /dev/null +++ b/rest/api/v3/email_activity/model_get_message_404_response_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetMessage404ResponseErrorsInner struct for GetMessage404ResponseErrorsInner +type GetMessage404ResponseErrorsInner struct { + Message *string `json:"message,omitempty"` + Field *string `json:"field,omitempty"` +} diff --git a/rest/api/v3/email_activity/model_list_message_200_response.go b/rest/api/v3/email_activity/model_list_message_200_response.go new file mode 100644 index 00000000..f66abfe1 --- /dev/null +++ b/rest/api/v3/email_activity/model_list_message_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListMessage200Response struct for ListMessage200Response +type ListMessage200Response struct { + Messages *[]AbbvMessage `json:"messages,omitempty"` +} diff --git a/rest/api/v3/email_activity/model_list_message_400_response.go b/rest/api/v3/email_activity/model_list_message_400_response.go new file mode 100644 index 00000000..2ad9c3ff --- /dev/null +++ b/rest/api/v3/email_activity/model_list_message_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListMessage400Response struct for ListMessage400Response +type ListMessage400Response struct { + Errors []ListMessage400ResponseErrorsInner `json:"errors"` +} diff --git a/rest/api/v3/email_activity/model_list_message_400_response_errors_inner.go b/rest/api/v3/email_activity/model_list_message_400_response_errors_inner.go new file mode 100644 index 00000000..561b7001 --- /dev/null +++ b/rest/api/v3/email_activity/model_list_message_400_response_errors_inner.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListMessage400ResponseErrorsInner struct for ListMessage400ResponseErrorsInner +type ListMessage400ResponseErrorsInner struct { + Message string `json:"message"` +} diff --git a/rest/api/v3/email_activity/model_list_message_429_response.go b/rest/api/v3/email_activity/model_list_message_429_response.go new file mode 100644 index 00000000..46d73b1f --- /dev/null +++ b/rest/api/v3/email_activity/model_list_message_429_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListMessage429Response struct for ListMessage429Response +type ListMessage429Response struct { + Errors *[]ListMessage429ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/email_activity/model_list_message_429_response_errors_inner.go b/rest/api/v3/email_activity/model_list_message_429_response_errors_inner.go new file mode 100644 index 00000000..6d46e6cc --- /dev/null +++ b/rest/api/v3/email_activity/model_list_message_429_response_errors_inner.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListMessage429ResponseErrorsInner struct for ListMessage429ResponseErrorsInner +type ListMessage429ResponseErrorsInner struct { + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/email_activity/model_message.go b/rest/api/v3/email_activity/model_message.go new file mode 100644 index 00000000..dad57509 --- /dev/null +++ b/rest/api/v3/email_activity/model_message.go @@ -0,0 +1,48 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Message struct for Message +type Message struct { + // The 'From' email address used to deliver the message. This address should be a verified sender in your Twilio SendGrid account. + FromEmail *string `json:"from_email,omitempty"` + // A unique ID assigned to the message. This ID can be used to retrieve activity data for the specific message. + MsgId *string `json:"msg_id,omitempty"` + // The email's subject line. + Subject *string `json:"subject,omitempty"` + // The intended recipient's email address. + ToEmail *string `json:"to_email,omitempty"` + // The message's status. + Status *Status3 `json:"status,omitempty"` + // The ID associated with a Twilio SendGrid email template used to format the message. + TemplateId string `json:"template_id"` + // The unsubscribe group associated with this email. + AsmGroupId int32 `json:"asm_group_id"` + // Teammate's username + Teammate string `json:"teammate"` + // The ID of the API Key used to authenticate the sending request for the message. + ApiKeyId string `json:"api_key_id"` + // List of events related to email message + Events []Event `json:"events"` + // This is the IP of the user who sent the message. + OriginatingIp string `json:"originating_ip"` + // Categories users associated to the message + Categories []string `json:"categories"` + // JSON hash of key-value pairs associated with the message. + UniqueArgs string `json:"unique_args"` + // IP used to send to the remote Mail Transfer Agent. + OutboundIp string `json:"outbound_ip"` + // Whether or not the outbound IP is dedicated vs shared + OutboundIpType OutboundIpType `json:"outbound_ip_type"` +} diff --git a/rest/api/v3/email_activity/model_outbound_ip_type.go b/rest/api/v3/email_activity/model_outbound_ip_type.go new file mode 100644 index 00000000..ae6cfae7 --- /dev/null +++ b/rest/api/v3/email_activity/model_outbound_ip_type.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// OutboundIpType the model 'OutboundIpType' +type OutboundIpType string + +// List of OutboundIpType +const ( + OUTBOUNDIPTYPE_DEDICATED OutboundIpType = "dedicated" + OUTBOUNDIPTYPE_SHARED OutboundIpType = "shared" +) diff --git a/rest/api/v3/email_activity/model_outbound_ip_type1.go b/rest/api/v3/email_activity/model_outbound_ip_type1.go new file mode 100644 index 00000000..ad734c10 --- /dev/null +++ b/rest/api/v3/email_activity/model_outbound_ip_type1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// OutboundIpType1 the model 'OutboundIpType1' +type OutboundIpType1 string + +// List of OutboundIpType1 +const ( + OUTBOUNDIPTYPE1_DEDICATED OutboundIpType1 = "dedicated" + OUTBOUNDIPTYPE1_SHARED OutboundIpType1 = "shared" +) diff --git a/rest/api/v3/email_activity/model_request_csv_202_response.go b/rest/api/v3/email_activity/model_request_csv_202_response.go new file mode 100644 index 00000000..567a4c3f --- /dev/null +++ b/rest/api/v3/email_activity/model_request_csv_202_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// RequestCsv202Response struct for RequestCsv202Response +type RequestCsv202Response struct { + Status *Status2 `json:"status,omitempty"` + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/email_activity/model_status.go b/rest/api/v3/email_activity/model_status.go new file mode 100644 index 00000000..5e003d33 --- /dev/null +++ b/rest/api/v3/email_activity/model_status.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status the model 'Status' +type Status string + +// List of Status +const ( + STATUS_PROCESSED Status = "processed" + STATUS_DELIVERED Status = "delivered" + STATUS_NOT_DELIVERED Status = "not_delivered" +) diff --git a/rest/api/v3/email_activity/model_status1.go b/rest/api/v3/email_activity/model_status1.go new file mode 100644 index 00000000..84650532 --- /dev/null +++ b/rest/api/v3/email_activity/model_status1.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status1 the model 'Status1' +type Status1 string + +// List of Status1 +const ( + STATUS1_PROCESSED Status1 = "processed" + STATUS1_NOT_DELIVERED Status1 = "not_delivered" + STATUS1_DELIVERED Status1 = "delivered" +) diff --git a/rest/api/v3/email_activity/model_status2.go b/rest/api/v3/email_activity/model_status2.go new file mode 100644 index 00000000..f54b4277 --- /dev/null +++ b/rest/api/v3/email_activity/model_status2.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status2 the model 'Status2' +type Status2 string + +// List of Status2 +const ( + STATUS2_PENDING Status2 = "pending" +) diff --git a/rest/api/v3/email_activity/model_status3.go b/rest/api/v3/email_activity/model_status3.go new file mode 100644 index 00000000..0bbf51d8 --- /dev/null +++ b/rest/api/v3/email_activity/model_status3.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Activity API +* The Twilio SendGrid Email Activity API allows you to query all of your stored messages, query individual messages, and download a CSV with data about the stored messages. Once retrieved, you can inspect the data associated with your messages to better understand your mail send. For example, you may retrieve all bounced messages or all messages with the same subject line and search for commonalities among them. You must [purchase additional email activity history](https://app.sendgrid.com/settings/billing/addons/email_activity) to gain access to the Email Activity Feed API. See **Getting Started with the Email Activity Feed API** for help building queries and working with this API. You can also work with email activity in the **Activity** section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/email_activity). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status3 the model 'Status3' +type Status3 string + +// List of Status3 +const ( + STATUS3_PROCESSED Status3 = "processed" + STATUS3_DELIVERED Status3 = "delivered" + STATUS3_NOT_DELIVERED Status3 = "not_delivered" +) diff --git a/rest/api/v3/email_validation/README.md b/rest/api/v3/email_validation/README.md new file mode 100644 index 00000000..af6d3899 --- /dev/null +++ b/rest/api/v3/email_validation/README.md @@ -0,0 +1,94 @@ +# Go API client for + +The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. + +Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. + +You can use this API to: +- Indicate to users that the address they have entered into a form is invalid. +- Drop invalid email addresses from your database. +- Suppress invalid email addresses from your sending to decrease your bounce rate. + +See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. + +You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:01.492490+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*GetEmailJobForVerification* | [**GetEmailJobForVerification**](docs/GetEmailJobForVerification.md#getemailjobforverification) | **Get** /v3/validations/email/jobs/{JobId} | This request returns a single Bulk Email Validation Job. +*GetValidationsEmailJobs* | [**GetValidationsEmailJobs**](docs/GetValidationsEmailJobs.md#getvalidationsemailjobs) | **Get** /v3/validations/email/jobs | This request lists all of a user's Bulk Email Validation Jobs. +*ListEmailJobForVerification* | [**ListEmailJobForVerification**](docs/ListEmailJobForVerification.md#listemailjobforverification) | **Put** /v3/validations/email/jobs | Request a presigned URL and headers for Bulk Email Address Validation list upload. +*ValidateEmail* | [**ValidateEmail**](docs/ValidateEmail.md#validateemail) | **Post** /v3/validations/email | Validate an email + + +## Documentation For Models + + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [FileType](FileType.md) + - [GetValidationsEmailJobs200Response](GetValidationsEmailJobs200Response.md) + - [GetValidationsEmailJobs200ResponseResultInner](GetValidationsEmailJobs200ResponseResultInner.md) + - [GetValidationsEmailJobsJobId200Response](GetValidationsEmailJobsJobId200Response.md) + - [GetValidationsEmailJobsJobId200ResponseResult](GetValidationsEmailJobsJobId200ResponseResult.md) + - [GetValidationsEmailJobsJobId200ResponseResultErrorsInner](GetValidationsEmailJobsJobId200ResponseResultErrorsInner.md) + - [ListEmailJobForVerificationRequest](ListEmailJobForVerificationRequest.md) + - [PutValidationsEmailJobs200Response](PutValidationsEmailJobs200Response.md) + - [PutValidationsEmailJobs200ResponseUploadHeadersInner](PutValidationsEmailJobs200ResponseUploadHeadersInner.md) + - [Status](Status.md) + - [Status1](Status1.md) + - [ValidateEmail200Response](ValidateEmail200Response.md) + - [ValidateEmail200ResponseResult](ValidateEmail200ResponseResult.md) + - [ValidateEmail200ResponseResultChecks](ValidateEmail200ResponseResultChecks.md) + - [ValidateEmail200ResponseResultChecksAdditional](ValidateEmail200ResponseResultChecksAdditional.md) + - [ValidateEmail200ResponseResultChecksDomain](ValidateEmail200ResponseResultChecksDomain.md) + - [ValidateEmail200ResponseResultChecksLocalPart](ValidateEmail200ResponseResultChecksLocalPart.md) + - [ValidateEmailRequest](ValidateEmailRequest.md) + - [Verdict](Verdict.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/email_validation/api_get_email_job_for_verification.go b/rest/api/v3/email_validation/api_get_email_job_for_verification.go new file mode 100644 index 00000000..48c691dd --- /dev/null +++ b/rest/api/v3/email_validation/api_get_email_job_for_verification.go @@ -0,0 +1,77 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetEmailJobForVerificationParam struct { + // The ID of the Bulk Email Address Validation Job you wish to retrieve. + JobId *string `json:"job_id"` +} + +func (params *GetEmailJobForVerificationParam) SetJobId(JobId string) *GetEmailJobForVerificationParam { + params.JobId = &JobId + return params +} + +// **This endpoint returns a specific Bulk Email Validation Job. You can use this endpoint to check on the progress of a Job.** +func (c *ApiService) GetEmailJobForVerification(params *GetEmailJobForVerificationParam) (interface{}, error) { + path := "/v3/validations/email/jobs/{JobId}" + if params != nil && params.JobId != nil { + path = strings.Replace(path, "{"+"JobId"+"}", *params.JobId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetValidationsEmailJobsJobId200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/email_validation/api_get_validations_email_jobs.go b/rest/api/v3/email_validation/api_get_validations_email_jobs.go new file mode 100644 index 00000000..d0364ff8 --- /dev/null +++ b/rest/api/v3/email_validation/api_get_validations_email_jobs.go @@ -0,0 +1,65 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type GetValidationsEmailJobsParam struct { +} + +// **This endpoint returns a list of all of a user's Bulk Email Validation Jobs.** +func (c *ApiService) GetValidationsEmailJobs() (interface{}, error) { + path := "/v3/validations/email/jobs" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetValidationsEmailJobs200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/email_validation/api_list_email_job_for_verification.go b/rest/api/v3/email_validation/api_list_email_job_for_verification.go new file mode 100644 index 00000000..5b218b94 --- /dev/null +++ b/rest/api/v3/email_validation/api_list_email_job_for_verification.go @@ -0,0 +1,81 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListEmailJobForVerificationParam struct { + // + ListEmailJobForVerificationRequest *ListEmailJobForVerificationRequest `json:"ListEmailJobForVerificationRequest,omitempty"` +} + +func (params *ListEmailJobForVerificationParam) SetListEmailJobForVerificationRequest(ListEmailJobForVerificationRequest ListEmailJobForVerificationRequest) *ListEmailJobForVerificationParam { + params.ListEmailJobForVerificationRequest = &ListEmailJobForVerificationRequest + return params +} + +// **This endpoint returns a presigned URL and request headers. Use this information to upload a list of email addresses for verification.** Note that in a successful response the `content-type` header value matches the provided `file_type` parameter in the `PUT` request. Once you have an `upload_uri` and the `upload_headers`, you're ready to upload your email address list for verification. For the expected format of the email address list and a sample upload request, see the [Bulk Email Address Validation Overview page](https://www.twilio.com/docs/sendgrid/ui/managing-contacts/email-address-validation/bulk-email-address-validation-overview). +func (c *ApiService) ListEmailJobForVerification(params *ListEmailJobForVerificationParam) (interface{}, error) { + path := "/v3/validations/email/jobs" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.ListEmailJobForVerificationRequest != nil { + b, err := json.Marshal(*params.ListEmailJobForVerificationRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &PutValidationsEmailJobs200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/email_validation/api_service.go b/rest/api/v3/email_validation/api_service.go new file mode 100644 index 00000000..12f01b4a --- /dev/null +++ b/rest/api/v3/email_validation/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/email_validation/api_validate_email.go b/rest/api/v3/email_validation/api_validate_email.go new file mode 100644 index 00000000..2e1ab9b4 --- /dev/null +++ b/rest/api/v3/email_validation/api_validate_email.go @@ -0,0 +1,65 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ValidateEmailParam struct { + // + ValidateEmailRequest *ValidateEmailRequest `json:"ValidateEmailRequest,omitempty"` +} + +func (params *ValidateEmailParam) SetValidateEmailRequest(ValidateEmailRequest ValidateEmailRequest) *ValidateEmailParam { + params.ValidateEmailRequest = &ValidateEmailRequest + return params +} + +// **This endpoint allows you to validate an email address.** +func (c *ApiService) ValidateEmail(params *ValidateEmailParam) (interface{}, error) { + path := "/v3/validations/email" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.ValidateEmailRequest != nil { + b, err := json.Marshal(*params.ValidateEmailRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ValidateEmail200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/email_validation/docs/ErrorResponse.md b/rest/api/v3/email_validation/docs/ErrorResponse.md new file mode 100644 index 00000000..7e5e23ed --- /dev/null +++ b/rest/api/v3/email_validation/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | ID representing the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/ErrorResponseErrorsInner.md b/rest/api/v3/email_validation/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..f2c33b2a --- /dev/null +++ b/rest/api/v3/email_validation/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | The message representing the error from the API. | +**Field** | **string** | The field associated with the error. |[optional] +**Help** | **map[string]interface{}** | Helper text or docs for troubleshooting. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/FileType.md b/rest/api/v3/email_validation/docs/FileType.md new file mode 100644 index 00000000..0108ebdf --- /dev/null +++ b/rest/api/v3/email_validation/docs/FileType.md @@ -0,0 +1,13 @@ +# FileType + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**CSV** | string | (value: `"csv"`) +**ZIP** | string | (value: `"zip"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/GetEmailJobForVerification.md b/rest/api/v3/email_validation/docs/GetEmailJobForVerification.md new file mode 100644 index 00000000..0184c450 --- /dev/null +++ b/rest/api/v3/email_validation/docs/GetEmailJobForVerification.md @@ -0,0 +1,51 @@ +# GetEmailJobForVerification + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetEmailJobForVerification**](GetEmailJobForVerification.md#GetEmailJobForVerification) | **Get** /v3/validations/email/jobs/{JobId} | This request returns a single Bulk Email Validation Job. + + + +## GetEmailJobForVerification + +> GetValidationsEmailJobsJobId200Response GetEmailJobForVerification(ctx, JobId) + +This request returns a single Bulk Email Validation Job. + +**This endpoint returns a specific Bulk Email Validation Job. You can use this endpoint to check on the progress of a Job.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**JobId** | **string** | The ID of the Bulk Email Address Validation Job you wish to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetEmailJobForVerificationParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**GetValidationsEmailJobsJobId200Response**](GetValidationsEmailJobsJobId200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/email_validation/docs/GetValidationsEmailJobs.md b/rest/api/v3/email_validation/docs/GetValidationsEmailJobs.md new file mode 100644 index 00000000..65bc01db --- /dev/null +++ b/rest/api/v3/email_validation/docs/GetValidationsEmailJobs.md @@ -0,0 +1,44 @@ +# GetValidationsEmailJobs + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetValidationsEmailJobs**](GetValidationsEmailJobs.md#GetValidationsEmailJobs) | **Get** /v3/validations/email/jobs | This request lists all of a user's Bulk Email Validation Jobs. + + + +## GetValidationsEmailJobs + +> GetValidationsEmailJobs200Response GetValidationsEmailJobs(ctx, ) + +This request lists all of a user's Bulk Email Validation Jobs. + +**This endpoint returns a list of all of a user's Bulk Email Validation Jobs.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a GetValidationsEmailJobsParams struct + + +### Return type + +[**GetValidationsEmailJobs200Response**](GetValidationsEmailJobs200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/email_validation/docs/GetValidationsEmailJobs200Response.md b/rest/api/v3/email_validation/docs/GetValidationsEmailJobs200Response.md new file mode 100644 index 00000000..6005e09e --- /dev/null +++ b/rest/api/v3/email_validation/docs/GetValidationsEmailJobs200Response.md @@ -0,0 +1,11 @@ +# GetValidationsEmailJobs200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]GetValidationsEmailJobs200ResponseResultInner**](GetValidationsEmailJobs200ResponseResultInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/GetValidationsEmailJobs200ResponseResultInner.md b/rest/api/v3/email_validation/docs/GetValidationsEmailJobs200ResponseResultInner.md new file mode 100644 index 00000000..9f39fef1 --- /dev/null +++ b/rest/api/v3/email_validation/docs/GetValidationsEmailJobs200ResponseResultInner.md @@ -0,0 +1,14 @@ +# GetValidationsEmailJobs200ResponseResultInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The unique ID of the Bulk Email Address Validation Job. |[optional] +**Status** | [**Status**](Status.md) | The status of the Bulk Email Address Validation Job. |[optional] +**StartedAt** | **float32** | The ISO8601 timestamp when the Job was created. This is the time at which the upload request was sent to the `upload_uri`. |[optional] +**FinishedAt** | **float32** | The ISO8601 timestamp when the Job was finished. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200Response.md b/rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200Response.md new file mode 100644 index 00000000..62a5383d --- /dev/null +++ b/rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200Response.md @@ -0,0 +1,11 @@ +# GetValidationsEmailJobsJobId200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**GetValidationsEmailJobsJobId200ResponseResult**](GetValidationsEmailJobsJobId200ResponseResult.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200ResponseResult.md b/rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200ResponseResult.md new file mode 100644 index 00000000..d9c9395f --- /dev/null +++ b/rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200ResponseResult.md @@ -0,0 +1,18 @@ +# GetValidationsEmailJobsJobId200ResponseResult + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The unique ID of the Bulk Email Address Validation Job. |[optional] +**Status** | [**Status1**](Status1.md) | The status of the Bulk Email Address Validation Job. |[optional] +**Segments** | **float32** | The total number of segments in the Bulk Email Address Validation Job. There are 1,500 email addresses per segment. The value is `0` until the Job `status` is `Processing`. |[optional] +**SegmentsProcessed** | **float32** | The number of segments processed at the time of the request. 100 segments process in parallel at a time. |[optional] +**IsDownloadAvailable** | **bool** | Boolean indicating whether the results CSV file is available for download. |[optional] +**StartedAt** | **float32** | The ISO8601 timestamp when the Job was created. This is the time at which the upload request was sent to the `upload_uri`. |[optional] +**FinishedAt** | **float32** | The ISO8601 timestamp when the Job was finished. |[optional] +**Errors** | [**[]GetValidationsEmailJobsJobId200ResponseResultErrorsInner**](GetValidationsEmailJobsJobId200ResponseResultErrorsInner.md) | Array containing error messages related to the Bulk Email Address Validation Job. Array is empty if no errors ocurred. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200ResponseResultErrorsInner.md b/rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200ResponseResultErrorsInner.md new file mode 100644 index 00000000..0d5492ae --- /dev/null +++ b/rest/api/v3/email_validation/docs/GetValidationsEmailJobsJobId200ResponseResultErrorsInner.md @@ -0,0 +1,11 @@ +# GetValidationsEmailJobsJobId200ResponseResultErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | Description of the error encountered during execution of the Bulk Email Address Validation Job. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/ListEmailJobForVerification.md b/rest/api/v3/email_validation/docs/ListEmailJobForVerification.md new file mode 100644 index 00000000..6cd0053d --- /dev/null +++ b/rest/api/v3/email_validation/docs/ListEmailJobForVerification.md @@ -0,0 +1,48 @@ +# ListEmailJobForVerification + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListEmailJobForVerification**](ListEmailJobForVerification.md#ListEmailJobForVerification) | **Put** /v3/validations/email/jobs | Request a presigned URL and headers for Bulk Email Address Validation list upload. + + + +## ListEmailJobForVerification + +> PutValidationsEmailJobs200Response ListEmailJobForVerification(ctx, optional) + +Request a presigned URL and headers for Bulk Email Address Validation list upload. + +**This endpoint returns a presigned URL and request headers. Use this information to upload a list of email addresses for verification.** Note that in a successful response the `content-type` header value matches the provided `file_type` parameter in the `PUT` request. Once you have an `upload_uri` and the `upload_headers`, you're ready to upload your email address list for verification. For the expected format of the email address list and a sample upload request, see the [Bulk Email Address Validation Overview page](https://www.twilio.com/docs/sendgrid/ui/managing-contacts/email-address-validation/bulk-email-address-validation-overview). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListEmailJobForVerificationParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**ListEmailJobForVerificationRequest** | [**ListEmailJobForVerificationRequest**](ListEmailJobForVerificationRequest.md) | + +### Return type + +[**PutValidationsEmailJobs200Response**](PutValidationsEmailJobs200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/email_validation/docs/ListEmailJobForVerificationRequest.md b/rest/api/v3/email_validation/docs/ListEmailJobForVerificationRequest.md new file mode 100644 index 00000000..a3d4fb06 --- /dev/null +++ b/rest/api/v3/email_validation/docs/ListEmailJobForVerificationRequest.md @@ -0,0 +1,11 @@ +# ListEmailJobForVerificationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FileType** | [**FileType**](FileType.md) | The format of the file you wish to upload. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/PutValidationsEmailJobs200Response.md b/rest/api/v3/email_validation/docs/PutValidationsEmailJobs200Response.md new file mode 100644 index 00000000..7caf2bcc --- /dev/null +++ b/rest/api/v3/email_validation/docs/PutValidationsEmailJobs200Response.md @@ -0,0 +1,13 @@ +# PutValidationsEmailJobs200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**JobId** | **string** | The unique ID of the Bulk Email Address Validation Job. |[optional] +**UploadUri** | **string** | The URI to use for the request to upload your list of email addresses. |[optional] +**UploadHeaders** | [**[]PutValidationsEmailJobs200ResponseUploadHeadersInner**](PutValidationsEmailJobs200ResponseUploadHeadersInner.md) | Array containing headers and header values. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/PutValidationsEmailJobs200ResponseUploadHeadersInner.md b/rest/api/v3/email_validation/docs/PutValidationsEmailJobs200ResponseUploadHeadersInner.md new file mode 100644 index 00000000..96781e62 --- /dev/null +++ b/rest/api/v3/email_validation/docs/PutValidationsEmailJobs200ResponseUploadHeadersInner.md @@ -0,0 +1,12 @@ +# PutValidationsEmailJobs200ResponseUploadHeadersInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Header** | **string** | The name of the header that must be included in the upload request. |[optional] +**Value** | **string** | The value of the header that must be included in the upload request. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/Status.md b/rest/api/v3/email_validation/docs/Status.md new file mode 100644 index 00000000..3915e79c --- /dev/null +++ b/rest/api/v3/email_validation/docs/Status.md @@ -0,0 +1,17 @@ +# Status + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**INITIATED** | string | (value: `"Initiated"`) +**QUEUED** | string | (value: `"Queued"`) +**READY** | string | (value: `"Ready"`) +**PROCESSING** | string | (value: `"Processing"`) +**DONE** | string | (value: `"Done"`) +**ERROR** | string | (value: `"Error"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/Status1.md b/rest/api/v3/email_validation/docs/Status1.md new file mode 100644 index 00000000..a6d983e9 --- /dev/null +++ b/rest/api/v3/email_validation/docs/Status1.md @@ -0,0 +1,17 @@ +# Status1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**INITIATED** | string | (value: `"Initiated"`) +**QUEUED** | string | (value: `"Queued"`) +**READY** | string | (value: `"Ready"`) +**PROCESSING** | string | (value: `"Processing"`) +**DONE** | string | (value: `"Done"`) +**ERROR** | string | (value: `"Error"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/ValidateEmail.md b/rest/api/v3/email_validation/docs/ValidateEmail.md new file mode 100644 index 00000000..6d217df2 --- /dev/null +++ b/rest/api/v3/email_validation/docs/ValidateEmail.md @@ -0,0 +1,48 @@ +# ValidateEmail + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ValidateEmail**](ValidateEmail.md#ValidateEmail) | **Post** /v3/validations/email | Validate an email + + + +## ValidateEmail + +> ValidateEmail200Response ValidateEmail(ctx, optional) + +Validate an email + +**This endpoint allows you to validate an email address.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ValidateEmailParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**ValidateEmailRequest** | [**ValidateEmailRequest**](ValidateEmailRequest.md) | + +### Return type + +[**ValidateEmail200Response**](ValidateEmail200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/email_validation/docs/ValidateEmail200Response.md b/rest/api/v3/email_validation/docs/ValidateEmail200Response.md new file mode 100644 index 00000000..1fe2612e --- /dev/null +++ b/rest/api/v3/email_validation/docs/ValidateEmail200Response.md @@ -0,0 +1,11 @@ +# ValidateEmail200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**ValidateEmail200ResponseResult**](ValidateEmail200ResponseResult.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResult.md b/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResult.md new file mode 100644 index 00000000..1de44347 --- /dev/null +++ b/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResult.md @@ -0,0 +1,19 @@ +# ValidateEmail200ResponseResult + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email being validated | +**Verdict** | [**Verdict**](Verdict.md) | A generic classification of whether or not the email address is valid. | +**Score** | **float32** | A numeric representation of the email validity. | +**Local** | **string** | The local part of the email address. | +**Host** | **string** | The domain of the email address. | +**Suggestion** | **string** | A suggested correction in the event of domain name typos (e.g., gmial.com) |[optional] +**Checks** | [**ValidateEmail200ResponseResultChecks**](ValidateEmail200ResponseResultChecks.md) | | +**Source** | **string** | The source of the validation, as per the API request. |[optional] +**IpAddress** | **string** | The IP address associated with this email. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecks.md b/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecks.md new file mode 100644 index 00000000..d664bcf0 --- /dev/null +++ b/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecks.md @@ -0,0 +1,13 @@ +# ValidateEmail200ResponseResultChecks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Domain** | [**ValidateEmail200ResponseResultChecksDomain**](ValidateEmail200ResponseResultChecksDomain.md) | | +**LocalPart** | [**ValidateEmail200ResponseResultChecksLocalPart**](ValidateEmail200ResponseResultChecksLocalPart.md) | | +**Additional** | [**ValidateEmail200ResponseResultChecksAdditional**](ValidateEmail200ResponseResultChecksAdditional.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksAdditional.md b/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksAdditional.md new file mode 100644 index 00000000..ff503099 --- /dev/null +++ b/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksAdditional.md @@ -0,0 +1,12 @@ +# ValidateEmail200ResponseResultChecksAdditional + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**HasKnownBounces** | **bool** | Whether email sent to this address from your account has bounced. | +**HasSuspectedBounces** | **bool** | Whether our model predicts that the email address might bounce. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksDomain.md b/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksDomain.md new file mode 100644 index 00000000..3d2d75b3 --- /dev/null +++ b/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksDomain.md @@ -0,0 +1,13 @@ +# ValidateEmail200ResponseResultChecksDomain + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**HasValidAddressSyntax** | **bool** | Whether the email address syntax is valid. | +**HasMxOrARecord** | **bool** | Whether the email has appropriate DNS records to deliver a message. | +**IsSuspectedDisposableAddress** | **bool** | Whether the domain appears to be from a disposable email address service. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksLocalPart.md b/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksLocalPart.md new file mode 100644 index 00000000..7219d6de --- /dev/null +++ b/rest/api/v3/email_validation/docs/ValidateEmail200ResponseResultChecksLocalPart.md @@ -0,0 +1,11 @@ +# ValidateEmail200ResponseResultChecksLocalPart + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsSuspectedRoleAddress** | **bool** | Whether the local part of email appears to be a role or group (e.g., hr, admin) | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/ValidateEmailRequest.md b/rest/api/v3/email_validation/docs/ValidateEmailRequest.md new file mode 100644 index 00000000..404db498 --- /dev/null +++ b/rest/api/v3/email_validation/docs/ValidateEmailRequest.md @@ -0,0 +1,12 @@ +# ValidateEmailRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address that you want to validate. | +**Source** | **string** | A one-word classifier for where this validation originated. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/docs/Verdict.md b/rest/api/v3/email_validation/docs/Verdict.md new file mode 100644 index 00000000..5f6dae14 --- /dev/null +++ b/rest/api/v3/email_validation/docs/Verdict.md @@ -0,0 +1,14 @@ +# Verdict + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**VALID** | string | (value: `"Valid"`) +**RISKY** | string | (value: `"Risky"`) +**INVALID** | string | (value: `"Invalid"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/email_validation/model_error_response.go b/rest/api/v3/email_validation/model_error_response.go new file mode 100644 index 00000000..0471f1b6 --- /dev/null +++ b/rest/api/v3/email_validation/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // ID representing the error. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/email_validation/model_error_response_errors_inner.go b/rest/api/v3/email_validation/model_error_response_errors_inner.go new file mode 100644 index 00000000..363c1a49 --- /dev/null +++ b/rest/api/v3/email_validation/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // The message representing the error from the API. + Message string `json:"message"` + // The field associated with the error. + Field *string `json:"field,omitempty"` + // Helper text or docs for troubleshooting. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/email_validation/model_file_type.go b/rest/api/v3/email_validation/model_file_type.go new file mode 100644 index 00000000..9326cdd5 --- /dev/null +++ b/rest/api/v3/email_validation/model_file_type.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// FileType the model 'FileType' +type FileType string + +// List of FileType +const ( + FILETYPE_CSV FileType = "csv" + FILETYPE_ZIP FileType = "zip" +) diff --git a/rest/api/v3/email_validation/model_get_validations_email_jobs200_response.go b/rest/api/v3/email_validation/model_get_validations_email_jobs200_response.go new file mode 100644 index 00000000..435a4a34 --- /dev/null +++ b/rest/api/v3/email_validation/model_get_validations_email_jobs200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetValidationsEmailJobs200Response struct for GetValidationsEmailJobs200Response +type GetValidationsEmailJobs200Response struct { + // + Result *[]GetValidationsEmailJobs200ResponseResultInner `json:"result,omitempty"` +} diff --git a/rest/api/v3/email_validation/model_get_validations_email_jobs200_response_result_inner.go b/rest/api/v3/email_validation/model_get_validations_email_jobs200_response_result_inner.go new file mode 100644 index 00000000..8e1859d9 --- /dev/null +++ b/rest/api/v3/email_validation/model_get_validations_email_jobs200_response_result_inner.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetValidationsEmailJobs200ResponseResultInner struct for GetValidationsEmailJobs200ResponseResultInner +type GetValidationsEmailJobs200ResponseResultInner struct { + // The unique ID of the Bulk Email Address Validation Job. + Id *string `json:"id,omitempty"` + // The status of the Bulk Email Address Validation Job. + Status *Status `json:"status,omitempty"` + // The ISO8601 timestamp when the Job was created. This is the time at which the upload request was sent to the `upload_uri`. + StartedAt *float32 `json:"started_at,omitempty"` + // The ISO8601 timestamp when the Job was finished. + FinishedAt *float32 `json:"finished_at,omitempty"` +} diff --git a/rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response.go b/rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response.go new file mode 100644 index 00000000..d7625423 --- /dev/null +++ b/rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetValidationsEmailJobsJobId200Response struct for GetValidationsEmailJobsJobId200Response +type GetValidationsEmailJobsJobId200Response struct { + Result *GetValidationsEmailJobsJobId200ResponseResult `json:"result,omitempty"` +} diff --git a/rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response_result.go b/rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response_result.go new file mode 100644 index 00000000..0f6d9761 --- /dev/null +++ b/rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response_result.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetValidationsEmailJobsJobId200ResponseResult +type GetValidationsEmailJobsJobId200ResponseResult struct { + // The unique ID of the Bulk Email Address Validation Job. + Id *string `json:"id,omitempty"` + // The status of the Bulk Email Address Validation Job. + Status *Status1 `json:"status,omitempty"` + // The total number of segments in the Bulk Email Address Validation Job. There are 1,500 email addresses per segment. The value is `0` until the Job `status` is `Processing`. + Segments *float32 `json:"segments,omitempty"` + // The number of segments processed at the time of the request. 100 segments process in parallel at a time. + SegmentsProcessed *float32 `json:"segments_processed,omitempty"` + // Boolean indicating whether the results CSV file is available for download. + IsDownloadAvailable *bool `json:"is_download_available,omitempty"` + // The ISO8601 timestamp when the Job was created. This is the time at which the upload request was sent to the `upload_uri`. + StartedAt *float32 `json:"started_at,omitempty"` + // The ISO8601 timestamp when the Job was finished. + FinishedAt *float32 `json:"finished_at,omitempty"` + // Array containing error messages related to the Bulk Email Address Validation Job. Array is empty if no errors ocurred. + Errors *[]GetValidationsEmailJobsJobId200ResponseResultErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response_result_errors_inner.go b/rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response_result_errors_inner.go new file mode 100644 index 00000000..db8ee837 --- /dev/null +++ b/rest/api/v3/email_validation/model_get_validations_email_jobs_job_id200_response_result_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetValidationsEmailJobsJobId200ResponseResultErrorsInner struct for GetValidationsEmailJobsJobId200ResponseResultErrorsInner +type GetValidationsEmailJobsJobId200ResponseResultErrorsInner struct { + // Description of the error encountered during execution of the Bulk Email Address Validation Job. + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/email_validation/model_list_email_job_for_verification_request.go b/rest/api/v3/email_validation/model_list_email_job_for_verification_request.go new file mode 100644 index 00000000..6ec08c9a --- /dev/null +++ b/rest/api/v3/email_validation/model_list_email_job_for_verification_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListEmailJobForVerificationRequest struct for ListEmailJobForVerificationRequest +type ListEmailJobForVerificationRequest struct { + // The format of the file you wish to upload. + FileType FileType `json:"file_type"` +} diff --git a/rest/api/v3/email_validation/model_put_validations_email_jobs200_response.go b/rest/api/v3/email_validation/model_put_validations_email_jobs200_response.go new file mode 100644 index 00000000..3c8bfba2 --- /dev/null +++ b/rest/api/v3/email_validation/model_put_validations_email_jobs200_response.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// PutValidationsEmailJobs200Response struct for PutValidationsEmailJobs200Response +type PutValidationsEmailJobs200Response struct { + // The unique ID of the Bulk Email Address Validation Job. + JobId *string `json:"job_id,omitempty"` + // The URI to use for the request to upload your list of email addresses. + UploadUri *string `json:"upload_uri,omitempty"` + // Array containing headers and header values. + UploadHeaders *[]PutValidationsEmailJobs200ResponseUploadHeadersInner `json:"upload_headers,omitempty"` +} diff --git a/rest/api/v3/email_validation/model_put_validations_email_jobs200_response_upload_headers_inner.go b/rest/api/v3/email_validation/model_put_validations_email_jobs200_response_upload_headers_inner.go new file mode 100644 index 00000000..5763532e --- /dev/null +++ b/rest/api/v3/email_validation/model_put_validations_email_jobs200_response_upload_headers_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// PutValidationsEmailJobs200ResponseUploadHeadersInner struct for PutValidationsEmailJobs200ResponseUploadHeadersInner +type PutValidationsEmailJobs200ResponseUploadHeadersInner struct { + // The name of the header that must be included in the upload request. + Header *string `json:"header,omitempty"` + // The value of the header that must be included in the upload request. + Value *string `json:"value,omitempty"` +} diff --git a/rest/api/v3/email_validation/model_status.go b/rest/api/v3/email_validation/model_status.go new file mode 100644 index 00000000..c92c4771 --- /dev/null +++ b/rest/api/v3/email_validation/model_status.go @@ -0,0 +1,27 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status the model 'Status' +type Status string + +// List of Status +const ( + STATUS_INITIATED Status = "Initiated" + STATUS_QUEUED Status = "Queued" + STATUS_READY Status = "Ready" + STATUS_PROCESSING Status = "Processing" + STATUS_DONE Status = "Done" + STATUS_ERROR Status = "Error" +) diff --git a/rest/api/v3/email_validation/model_status1.go b/rest/api/v3/email_validation/model_status1.go new file mode 100644 index 00000000..eb3f76b1 --- /dev/null +++ b/rest/api/v3/email_validation/model_status1.go @@ -0,0 +1,27 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status1 the model 'Status1' +type Status1 string + +// List of Status1 +const ( + STATUS1_INITIATED Status1 = "Initiated" + STATUS1_QUEUED Status1 = "Queued" + STATUS1_READY Status1 = "Ready" + STATUS1_PROCESSING Status1 = "Processing" + STATUS1_DONE Status1 = "Done" + STATUS1_ERROR Status1 = "Error" +) diff --git a/rest/api/v3/email_validation/model_validate_email_200_response.go b/rest/api/v3/email_validation/model_validate_email_200_response.go new file mode 100644 index 00000000..bd91dd02 --- /dev/null +++ b/rest/api/v3/email_validation/model_validate_email_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateEmail200Response struct for ValidateEmail200Response +type ValidateEmail200Response struct { + Result ValidateEmail200ResponseResult `json:"result"` +} diff --git a/rest/api/v3/email_validation/model_validate_email_200_response_result.go b/rest/api/v3/email_validation/model_validate_email_200_response_result.go new file mode 100644 index 00000000..44356b58 --- /dev/null +++ b/rest/api/v3/email_validation/model_validate_email_200_response_result.go @@ -0,0 +1,35 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateEmail200ResponseResult struct for ValidateEmail200ResponseResult +type ValidateEmail200ResponseResult struct { + // The email being validated + Email string `json:"email"` + // A generic classification of whether or not the email address is valid. + Verdict Verdict `json:"verdict"` + // A numeric representation of the email validity. + Score float32 `json:"score"` + // The local part of the email address. + Local string `json:"local"` + // The domain of the email address. + Host string `json:"host"` + // A suggested correction in the event of domain name typos (e.g., gmial.com) + Suggestion *string `json:"suggestion,omitempty"` + Checks ValidateEmail200ResponseResultChecks `json:"checks"` + // The source of the validation, as per the API request. + Source *string `json:"source,omitempty"` + // The IP address associated with this email. + IpAddress string `json:"ip_address"` +} diff --git a/rest/api/v3/email_validation/model_validate_email_200_response_result_checks.go b/rest/api/v3/email_validation/model_validate_email_200_response_result_checks.go new file mode 100644 index 00000000..5238ab2c --- /dev/null +++ b/rest/api/v3/email_validation/model_validate_email_200_response_result_checks.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateEmail200ResponseResultChecks Granular checks for email address validity. +type ValidateEmail200ResponseResultChecks struct { + Domain ValidateEmail200ResponseResultChecksDomain `json:"domain"` + LocalPart ValidateEmail200ResponseResultChecksLocalPart `json:"local_part"` + Additional ValidateEmail200ResponseResultChecksAdditional `json:"additional"` +} diff --git a/rest/api/v3/email_validation/model_validate_email_200_response_result_checks_additional.go b/rest/api/v3/email_validation/model_validate_email_200_response_result_checks_additional.go new file mode 100644 index 00000000..a805b2f6 --- /dev/null +++ b/rest/api/v3/email_validation/model_validate_email_200_response_result_checks_additional.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateEmail200ResponseResultChecksAdditional Additional checks on the email address. +type ValidateEmail200ResponseResultChecksAdditional struct { + // Whether email sent to this address from your account has bounced. + HasKnownBounces bool `json:"has_known_bounces"` + // Whether our model predicts that the email address might bounce. + HasSuspectedBounces bool `json:"has_suspected_bounces"` +} diff --git a/rest/api/v3/email_validation/model_validate_email_200_response_result_checks_domain.go b/rest/api/v3/email_validation/model_validate_email_200_response_result_checks_domain.go new file mode 100644 index 00000000..2effd822 --- /dev/null +++ b/rest/api/v3/email_validation/model_validate_email_200_response_result_checks_domain.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateEmail200ResponseResultChecksDomain Checks on the domain portion of the email address. +type ValidateEmail200ResponseResultChecksDomain struct { + // Whether the email address syntax is valid. + HasValidAddressSyntax bool `json:"has_valid_address_syntax"` + // Whether the email has appropriate DNS records to deliver a message. + HasMxOrARecord bool `json:"has_mx_or_a_record"` + // Whether the domain appears to be from a disposable email address service. + IsSuspectedDisposableAddress bool `json:"is_suspected_disposable_address"` +} diff --git a/rest/api/v3/email_validation/model_validate_email_200_response_result_checks_local_part.go b/rest/api/v3/email_validation/model_validate_email_200_response_result_checks_local_part.go new file mode 100644 index 00000000..2290db2a --- /dev/null +++ b/rest/api/v3/email_validation/model_validate_email_200_response_result_checks_local_part.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateEmail200ResponseResultChecksLocalPart Checks on the local part of the email address. +type ValidateEmail200ResponseResultChecksLocalPart struct { + // Whether the local part of email appears to be a role or group (e.g., hr, admin) + IsSuspectedRoleAddress bool `json:"is_suspected_role_address"` +} diff --git a/rest/api/v3/email_validation/model_validate_email_request.go b/rest/api/v3/email_validation/model_validate_email_request.go new file mode 100644 index 00000000..f8f03693 --- /dev/null +++ b/rest/api/v3/email_validation/model_validate_email_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateEmailRequest struct for ValidateEmailRequest +type ValidateEmailRequest struct { + // The email address that you want to validate. + Email string `json:"email"` + // A one-word classifier for where this validation originated. + Source *string `json:"source,omitempty"` +} diff --git a/rest/api/v3/email_validation/model_verdict.go b/rest/api/v3/email_validation/model_verdict.go new file mode 100644 index 00000000..d7fdf767 --- /dev/null +++ b/rest/api/v3/email_validation/model_verdict.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Email Address Validation API +* The Twilio SendGrid Email Address Validation API provides real-time detailed information on the validity of email addresses. You can integrate this validation process into your platform's signup form and customize the best use of email address validation for your use case. Email Address Validation is available to [Email API Pro and Premier level accounts](https://sendgrid.com/pricing) only. Prior to upgrading your account to Pro or Premier, you will not see the option to create an Email Validation API key. An Email Validation API key is separate from and in addition to your other keys, including Full Access API keys. You can use this API to: - Indicate to users that the address they have entered into a form is invalid. - Drop invalid email addresses from your database. - Suppress invalid email addresses from your sending to decrease your bounce rate. See [**Email Address Validation**](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation) for more information. You can also view your Email Validation results and metrics in the Validation section of the [Twilio SendGrid application user interface](https://docs.sendgrid.com/ui/managing-contacts/email-address-validation). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Verdict the model 'Verdict' +type Verdict string + +// List of Verdict +const ( + VERDICT_VALID Verdict = "Valid" + VERDICT_RISKY Verdict = "Risky" + VERDICT_INVALID Verdict = "Invalid" +) diff --git a/rest/api/v3/enforced_tls/README.md b/rest/api/v3/enforced_tls/README.md new file mode 100644 index 00000000..5ce51635 --- /dev/null +++ b/rest/api/v3/enforced_tls/README.md @@ -0,0 +1,68 @@ +# Go API client for + +The Twilio SendGrid Enforced TLS API allows you to specify whether or not the recipient of your mail send is required to support TLS or have a valid certificate. + +Twilio SendGrid sends all emails with [Opportunistic TLS](https://sendgrid.com/blog/myth-opportunistic-tls-email-privacy/) by default, meaning email is sent with TLS, and if the recipient's inbox provider does not accept the TLS encryption, we then send the message unencrypted. + +You can optionally choose to enforce TLS encryption, meaning that if the recipient's inbox provider does not accept the TLS encryption, Twilio SendGrid drops the message and sends a block event with the message, “TLS required but not supported” as the description. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:01.490412+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ListEnforcedTlsSetting* | [**ListEnforcedTlsSetting**](docs/ListEnforcedTlsSetting.md#listenforcedtlssetting) | **Get** /v3/user/settings/enforced_tls | Retrieve current Enforced TLS settings. +*UpdateEnforcedTlsSetting* | [**UpdateEnforcedTlsSetting**](docs/UpdateEnforcedTlsSetting.md#updateenforcedtlssetting) | **Patch** /v3/user/settings/enforced_tls | Update Enforced TLS settings + + +## Documentation For Models + + - [EnforcedTlsRequestResponse](EnforcedTlsRequestResponse.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [Version](Version.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/enforced_tls/api_list_enforced_tls_setting.go b/rest/api/v3/enforced_tls/api_list_enforced_tls_setting.go new file mode 100644 index 00000000..7c633a58 --- /dev/null +++ b/rest/api/v3/enforced_tls/api_list_enforced_tls_setting.go @@ -0,0 +1,83 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Enforced TLS API +* The Twilio SendGrid Enforced TLS API allows you to specify whether or not the recipient of your mail send is required to support TLS or have a valid certificate. Twilio SendGrid sends all emails with [Opportunistic TLS](https://sendgrid.com/blog/myth-opportunistic-tls-email-privacy/) by default, meaning email is sent with TLS, and if the recipient's inbox provider does not accept the TLS encryption, we then send the message unencrypted. You can optionally choose to enforce TLS encryption, meaning that if the recipient's inbox provider does not accept the TLS encryption, Twilio SendGrid drops the message and sends a block event with the message, “TLS required but not supported” as the description. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListEnforcedTlsSettingParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListEnforcedTlsSettingParam) SetOnbehalfof(Onbehalfof string) *ListEnforcedTlsSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve your current Enforced TLS settings.** The Enforced TLS settings specify whether or not the recipient is required to support TLS or have a valid certificate. If either `require_tls` or `require_valid_cert` is set to `true`, the recipient must support TLS 1.1 or higher or have a valid certificate. If these conditions are not met, Twilio SendGrid will drop the message and send a block event with “TLS required but not supported” as the description. +func (c *ApiService) ListEnforcedTlsSetting(params *ListEnforcedTlsSettingParam) (interface{}, error) { + path := "/v3/user/settings/enforced_tls" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &EnforcedTlsRequestResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/enforced_tls/api_service.go b/rest/api/v3/enforced_tls/api_service.go new file mode 100644 index 00000000..b52f212f --- /dev/null +++ b/rest/api/v3/enforced_tls/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Enforced TLS API +* The Twilio SendGrid Enforced TLS API allows you to specify whether or not the recipient of your mail send is required to support TLS or have a valid certificate. Twilio SendGrid sends all emails with [Opportunistic TLS](https://sendgrid.com/blog/myth-opportunistic-tls-email-privacy/) by default, meaning email is sent with TLS, and if the recipient's inbox provider does not accept the TLS encryption, we then send the message unencrypted. You can optionally choose to enforce TLS encryption, meaning that if the recipient's inbox provider does not accept the TLS encryption, Twilio SendGrid drops the message and sends a block event with the message, “TLS required but not supported” as the description. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/enforced_tls/api_update_enforced_tls_setting.go b/rest/api/v3/enforced_tls/api_update_enforced_tls_setting.go new file mode 100644 index 00000000..1b43aa93 --- /dev/null +++ b/rest/api/v3/enforced_tls/api_update_enforced_tls_setting.go @@ -0,0 +1,98 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Enforced TLS API +* The Twilio SendGrid Enforced TLS API allows you to specify whether or not the recipient of your mail send is required to support TLS or have a valid certificate. Twilio SendGrid sends all emails with [Opportunistic TLS](https://sendgrid.com/blog/myth-opportunistic-tls-email-privacy/) by default, meaning email is sent with TLS, and if the recipient's inbox provider does not accept the TLS encryption, we then send the message unencrypted. You can optionally choose to enforce TLS encryption, meaning that if the recipient's inbox provider does not accept the TLS encryption, Twilio SendGrid drops the message and sends a block event with the message, “TLS required but not supported” as the description. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type UpdateEnforcedTlsSettingParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + EnforcedTlsRequestResponse *EnforcedTlsRequestResponse `json:"EnforcedTlsRequestResponse,omitempty"` +} + +func (params *UpdateEnforcedTlsSettingParam) SetOnbehalfof(Onbehalfof string) *UpdateEnforcedTlsSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateEnforcedTlsSettingParam) SetEnforcedTlsRequestResponse(EnforcedTlsRequestResponse EnforcedTlsRequestResponse) *UpdateEnforcedTlsSettingParam { + params.EnforcedTlsRequestResponse = &EnforcedTlsRequestResponse + return params +} + +// **This endpoint allows you to update your Enforced TLS settings.** To require TLS from recipients, set `require_tls` to `true`. If either `require_tls` or `require_valid_cert` is set to `true`, the recipient must support TLS 1.1 or higher or have a valid certificate. If these conditions are not met, Twilio SendGrid will drop the message and send a block event with “TLS required but not supported” as the description. +func (c *ApiService) UpdateEnforcedTlsSetting(params *UpdateEnforcedTlsSettingParam) (interface{}, error) { + path := "/v3/user/settings/enforced_tls" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.EnforcedTlsRequestResponse != nil { + b, err := json.Marshal(*params.EnforcedTlsRequestResponse) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &EnforcedTlsRequestResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/enforced_tls/docs/EnforcedTlsRequestResponse.md b/rest/api/v3/enforced_tls/docs/EnforcedTlsRequestResponse.md new file mode 100644 index 00000000..afa34268 --- /dev/null +++ b/rest/api/v3/enforced_tls/docs/EnforcedTlsRequestResponse.md @@ -0,0 +1,13 @@ +# EnforcedTlsRequestResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RequireTls** | **bool** | Indicates if you want to require your recipients to support TLS. |[optional] +**RequireValidCert** | **bool** | Indicates if you want to require your recipients to have a valid certificate. |[optional] +**Version** | [**Version**](Version.md) | The minimum required TLS certificate version. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/enforced_tls/docs/ErrorResponse.md b/rest/api/v3/enforced_tls/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/enforced_tls/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/enforced_tls/docs/ErrorResponseErrorsInner.md b/rest/api/v3/enforced_tls/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/enforced_tls/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/enforced_tls/docs/ListEnforcedTlsSetting.md b/rest/api/v3/enforced_tls/docs/ListEnforcedTlsSetting.md new file mode 100644 index 00000000..43d636d3 --- /dev/null +++ b/rest/api/v3/enforced_tls/docs/ListEnforcedTlsSetting.md @@ -0,0 +1,48 @@ +# ListEnforcedTlsSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListEnforcedTlsSetting**](ListEnforcedTlsSetting.md#ListEnforcedTlsSetting) | **Get** /v3/user/settings/enforced_tls | Retrieve current Enforced TLS settings. + + + +## ListEnforcedTlsSetting + +> EnforcedTlsRequestResponse ListEnforcedTlsSetting(ctx, optional) + +Retrieve current Enforced TLS settings. + +**This endpoint allows you to retrieve your current Enforced TLS settings.** The Enforced TLS settings specify whether or not the recipient is required to support TLS or have a valid certificate. If either `require_tls` or `require_valid_cert` is set to `true`, the recipient must support TLS 1.1 or higher or have a valid certificate. If these conditions are not met, Twilio SendGrid will drop the message and send a block event with “TLS required but not supported” as the description. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListEnforcedTlsSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**EnforcedTlsRequestResponse**](EnforcedTlsRequestResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/enforced_tls/docs/UpdateEnforcedTlsSetting.md b/rest/api/v3/enforced_tls/docs/UpdateEnforcedTlsSetting.md new file mode 100644 index 00000000..958bc070 --- /dev/null +++ b/rest/api/v3/enforced_tls/docs/UpdateEnforcedTlsSetting.md @@ -0,0 +1,49 @@ +# UpdateEnforcedTlsSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateEnforcedTlsSetting**](UpdateEnforcedTlsSetting.md#UpdateEnforcedTlsSetting) | **Patch** /v3/user/settings/enforced_tls | Update Enforced TLS settings + + + +## UpdateEnforcedTlsSetting + +> EnforcedTlsRequestResponse UpdateEnforcedTlsSetting(ctx, optional) + +Update Enforced TLS settings + +**This endpoint allows you to update your Enforced TLS settings.** To require TLS from recipients, set `require_tls` to `true`. If either `require_tls` or `require_valid_cert` is set to `true`, the recipient must support TLS 1.1 or higher or have a valid certificate. If these conditions are not met, Twilio SendGrid will drop the message and send a block event with “TLS required but not supported” as the description. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateEnforcedTlsSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**EnforcedTlsRequestResponse** | [**EnforcedTlsRequestResponse**](EnforcedTlsRequestResponse.md) | + +### Return type + +[**EnforcedTlsRequestResponse**](EnforcedTlsRequestResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/enforced_tls/docs/Version.md b/rest/api/v3/enforced_tls/docs/Version.md new file mode 100644 index 00000000..0dff80c4 --- /dev/null +++ b/rest/api/v3/enforced_tls/docs/Version.md @@ -0,0 +1,14 @@ +# Version + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**_1_DOT_1** | float32 | (value: `1.1`) +**_1_DOT_2** | float32 | (value: `1.2`) +**_1_DOT_3** | float32 | (value: `1.3`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/enforced_tls/model_enforced_tls_request_response.go b/rest/api/v3/enforced_tls/model_enforced_tls_request_response.go new file mode 100644 index 00000000..7788c006 --- /dev/null +++ b/rest/api/v3/enforced_tls/model_enforced_tls_request_response.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Enforced TLS API +* The Twilio SendGrid Enforced TLS API allows you to specify whether or not the recipient of your mail send is required to support TLS or have a valid certificate. Twilio SendGrid sends all emails with [Opportunistic TLS](https://sendgrid.com/blog/myth-opportunistic-tls-email-privacy/) by default, meaning email is sent with TLS, and if the recipient's inbox provider does not accept the TLS encryption, we then send the message unencrypted. You can optionally choose to enforce TLS encryption, meaning that if the recipient's inbox provider does not accept the TLS encryption, Twilio SendGrid drops the message and sends a block event with the message, “TLS required but not supported” as the description. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// EnforcedTlsRequestResponse struct for EnforcedTlsRequestResponse +type EnforcedTlsRequestResponse struct { + // Indicates if you want to require your recipients to support TLS. + RequireTls *bool `json:"require_tls,omitempty"` + // Indicates if you want to require your recipients to have a valid certificate. + RequireValidCert *bool `json:"require_valid_cert,omitempty"` + // The minimum required TLS certificate version. + Version *Version `json:"version,omitempty"` +} diff --git a/rest/api/v3/enforced_tls/model_error_response.go b/rest/api/v3/enforced_tls/model_error_response.go new file mode 100644 index 00000000..5c54a419 --- /dev/null +++ b/rest/api/v3/enforced_tls/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Enforced TLS API +* The Twilio SendGrid Enforced TLS API allows you to specify whether or not the recipient of your mail send is required to support TLS or have a valid certificate. Twilio SendGrid sends all emails with [Opportunistic TLS](https://sendgrid.com/blog/myth-opportunistic-tls-email-privacy/) by default, meaning email is sent with TLS, and if the recipient's inbox provider does not accept the TLS encryption, we then send the message unencrypted. You can optionally choose to enforce TLS encryption, meaning that if the recipient's inbox provider does not accept the TLS encryption, Twilio SendGrid drops the message and sends a block event with the message, “TLS required but not supported” as the description. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/enforced_tls/model_error_response_errors_inner.go b/rest/api/v3/enforced_tls/model_error_response_errors_inner.go new file mode 100644 index 00000000..f31a0e09 --- /dev/null +++ b/rest/api/v3/enforced_tls/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Enforced TLS API +* The Twilio SendGrid Enforced TLS API allows you to specify whether or not the recipient of your mail send is required to support TLS or have a valid certificate. Twilio SendGrid sends all emails with [Opportunistic TLS](https://sendgrid.com/blog/myth-opportunistic-tls-email-privacy/) by default, meaning email is sent with TLS, and if the recipient's inbox provider does not accept the TLS encryption, we then send the message unencrypted. You can optionally choose to enforce TLS encryption, meaning that if the recipient's inbox provider does not accept the TLS encryption, Twilio SendGrid drops the message and sends a block event with the message, “TLS required but not supported” as the description. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/enforced_tls/model_version.go b/rest/api/v3/enforced_tls/model_version.go new file mode 100644 index 00000000..731e1719 --- /dev/null +++ b/rest/api/v3/enforced_tls/model_version.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Enforced TLS API +* The Twilio SendGrid Enforced TLS API allows you to specify whether or not the recipient of your mail send is required to support TLS or have a valid certificate. Twilio SendGrid sends all emails with [Opportunistic TLS](https://sendgrid.com/blog/myth-opportunistic-tls-email-privacy/) by default, meaning email is sent with TLS, and if the recipient's inbox provider does not accept the TLS encryption, we then send the message unencrypted. You can optionally choose to enforce TLS encryption, meaning that if the recipient's inbox provider does not accept the TLS encryption, Twilio SendGrid drops the message and sends a block event with the message, “TLS required but not supported” as the description. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Version the model 'Version' +type Version float32 + +// List of Version +const ( + VERSION__1_DOT_1 Version = 1.1 + VERSION__1_DOT_2 Version = 1.2 + VERSION__1_DOT_3 Version = 1.3 +) diff --git a/rest/api/v3/integrations/README.md b/rest/api/v3/integrations/README.md new file mode 100644 index 00000000..a7aafef9 --- /dev/null +++ b/rest/api/v3/integrations/README.md @@ -0,0 +1,94 @@ +# Go API client for + +Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:01.495372+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AddIntegration* | [**AddIntegration**](docs/AddIntegration.md#addintegration) | **Post** /v3/marketing/integrations | CreateIntegration +*DeleteIntegration* | [**DeleteIntegration**](docs/DeleteIntegration.md#deleteintegration) | **Delete** /v3/marketing/integrations | DeleteBulkIntegration +*FindIntegrationById* | [**FindIntegrationById**](docs/FindIntegrationById.md#findintegrationbyid) | **Get** /v3/marketing/integrations/{Id} | GetIntegration +*GetIntegrationsByUser* | [**GetIntegrationsByUser**](docs/GetIntegrationsByUser.md#getintegrationsbyuser) | **Get** /v3/marketing/integrations | ListIntegration +*UpdateIntegration* | [**UpdateIntegration**](docs/UpdateIntegration.md#updateintegration) | **Patch** /v3/marketing/integrations/{Id} | UpdateIntegration + + +## Documentation For Models + + - [AddIntegration400Response](AddIntegration400Response.md) + - [DeleteIntegration400Response](DeleteIntegration400Response.md) + - [DeleteIntegration404Response](DeleteIntegration404Response.md) + - [Destination](Destination.md) + - [Destination1](Destination1.md) + - [Destination2](Destination2.md) + - [Destination3](Destination3.md) + - [DestinationRegion](DestinationRegion.md) + - [DestinationRegion1](DestinationRegion1.md) + - [DestinationRegion2](DestinationRegion2.md) + - [Forbidden](Forbidden.md) + - [GetIntegrationsByUser200Response](GetIntegrationsByUser200Response.md) + - [GetIntegrationsByUser403Response](GetIntegrationsByUser403Response.md) + - [GetIntegrationsByUser500Response](GetIntegrationsByUser500Response.md) + - [Id](Id.md) + - [Integration](Integration.md) + - [IntegrationFilters](IntegrationFilters.md) + - [IntegrationInput](IntegrationInput.md) + - [IntegrationInputFilters](IntegrationInputFilters.md) + - [IntegrationInputProperties](IntegrationInputProperties.md) + - [IntegrationNotFound](IntegrationNotFound.md) + - [IntegrationPatch](IntegrationPatch.md) + - [IntegrationPatchFilters](IntegrationPatchFilters.md) + - [IntegrationPatchProperties](IntegrationPatchProperties.md) + - [IntegrationProperties](IntegrationProperties.md) + - [InternalError](InternalError.md) + - [InvalidDeleteRequest](InvalidDeleteRequest.md) + - [InvalidRequest](InvalidRequest.md) + - [Items](Items.md) + - [Items1](Items1.md) + - [Items2](Items2.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/integrations/api_add_integration.go b/rest/api/v3/integrations/api_add_integration.go new file mode 100644 index 00000000..618c0140 --- /dev/null +++ b/rest/api/v3/integrations/api_add_integration.go @@ -0,0 +1,89 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type AddIntegrationParam struct { + // + IntegrationInput *IntegrationInput `json:"IntegrationInput"` +} + +func (params *AddIntegrationParam) SetIntegrationInput(IntegrationInput IntegrationInput) *AddIntegrationParam { + params.IntegrationInput = &IntegrationInput + return params +} + +// This endpoint creates an Integration for email event forwarding. Each Integration has a maximum number of allowed Integration instances per user. For example, users can create up to 10 Segment Integrations. +func (c *ApiService) AddIntegration(params *AddIntegrationParam) (interface{}, error) { + path := "/v3/marketing/integrations" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.IntegrationInput != nil { + b, err := json.Marshal(*params.IntegrationInput) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &Integration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &AddIntegration400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &GetIntegrationsByUser403Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &GetIntegrationsByUser500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/integrations/api_delete_integration.go b/rest/api/v3/integrations/api_delete_integration.go new file mode 100644 index 00000000..8d429939 --- /dev/null +++ b/rest/api/v3/integrations/api_delete_integration.go @@ -0,0 +1,93 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type DeleteIntegrationParam struct { + // Comma-delimited Integration IDs for the Integrations to delete. + Ids *[]Id `json:"ids"` +} + +func (params *DeleteIntegrationParam) SetIds(Ids []Id) *DeleteIntegrationParam { + params.Ids = &Ids + return params +} + +// This endpoint deletes Integrations. +func (c *ApiService) DeleteIntegration(params *DeleteIntegrationParam) (interface{}, error) { + path := "/v3/marketing/integrations" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Ids != nil { + for _, item := range *params.Ids { + v, err := json.Marshal(item) + + if err != nil { + return nil, err + } + + data.Add("ids", string(v)) + + } + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &DeleteIntegration400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &GetIntegrationsByUser403Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &DeleteIntegration404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &GetIntegrationsByUser500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/integrations/api_find_integration_by_id.go b/rest/api/v3/integrations/api_find_integration_by_id.go new file mode 100644 index 00000000..0d44a223 --- /dev/null +++ b/rest/api/v3/integrations/api_find_integration_by_id.go @@ -0,0 +1,85 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type FindIntegrationByIdParam struct { + // The ID of the Integration you would like to retrieve. + Id *string `json:"id"` +} + +func (params *FindIntegrationByIdParam) SetId(Id string) *FindIntegrationByIdParam { + params.Id = &Id + return params +} + +// This endpoint returns the data for a specific Integration. +func (c *ApiService) FindIntegrationById(params *FindIntegrationByIdParam) (interface{}, error) { + path := "/v3/marketing/integrations/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &Integration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &GetIntegrationsByUser403Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &DeleteIntegration404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &GetIntegrationsByUser500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/integrations/api_get_integrations_by_user.go b/rest/api/v3/integrations/api_get_integrations_by_user.go new file mode 100644 index 00000000..ce3f797f --- /dev/null +++ b/rest/api/v3/integrations/api_get_integrations_by_user.go @@ -0,0 +1,65 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type GetIntegrationsByUserParam struct { +} + +// This endpoint returns all the Integrations for the user making this call. +func (c *ApiService) GetIntegrationsByUser() (interface{}, error) { + path := "/v3/marketing/integrations" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetIntegrationsByUser200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &GetIntegrationsByUser403Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &GetIntegrationsByUser500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/integrations/api_service.go b/rest/api/v3/integrations/api_service.go new file mode 100644 index 00000000..6a43a8ff --- /dev/null +++ b/rest/api/v3/integrations/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/integrations/api_update_integration.go b/rest/api/v3/integrations/api_update_integration.go new file mode 100644 index 00000000..26c0fb32 --- /dev/null +++ b/rest/api/v3/integrations/api_update_integration.go @@ -0,0 +1,108 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateIntegrationParam struct { + // The ID of the Integration you would like to update. + Id *string `json:"id"` + // + IntegrationPatch *IntegrationPatch `json:"IntegrationPatch"` +} + +func (params *UpdateIntegrationParam) SetId(Id string) *UpdateIntegrationParam { + params.Id = &Id + return params +} +func (params *UpdateIntegrationParam) SetIntegrationPatch(IntegrationPatch IntegrationPatch) *UpdateIntegrationParam { + params.IntegrationPatch = &IntegrationPatch + return params +} + +// This endpoint updates an existing Integration. +func (c *ApiService) UpdateIntegration(params *UpdateIntegrationParam) (interface{}, error) { + path := "/v3/marketing/integrations/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.IntegrationPatch != nil { + b, err := json.Marshal(*params.IntegrationPatch) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &Integration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &AddIntegration400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &GetIntegrationsByUser403Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &DeleteIntegration404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &GetIntegrationsByUser500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/integrations/docs/AddIntegration.md b/rest/api/v3/integrations/docs/AddIntegration.md new file mode 100644 index 00000000..ffe11319 --- /dev/null +++ b/rest/api/v3/integrations/docs/AddIntegration.md @@ -0,0 +1,47 @@ +# AddIntegration + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddIntegration**](AddIntegration.md#AddIntegration) | **Post** /v3/marketing/integrations | CreateIntegration + + + +## AddIntegration + +> Integration AddIntegration(ctx, IntegrationInput) + +CreateIntegration + +This endpoint creates an Integration for email event forwarding. Each Integration has a maximum number of allowed Integration instances per user. For example, users can create up to 10 Segment Integrations. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a AddIntegrationParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**Integration**](Integration.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/integrations/docs/AddIntegration400Response.md b/rest/api/v3/integrations/docs/AddIntegration400Response.md new file mode 100644 index 00000000..c08231ce --- /dev/null +++ b/rest/api/v3/integrations/docs/AddIntegration400Response.md @@ -0,0 +1,11 @@ +# AddIntegration400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]InvalidRequest**](InvalidRequest.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/DeleteIntegration.md b/rest/api/v3/integrations/docs/DeleteIntegration.md new file mode 100644 index 00000000..730e43f0 --- /dev/null +++ b/rest/api/v3/integrations/docs/DeleteIntegration.md @@ -0,0 +1,47 @@ +# DeleteIntegration + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteIntegration**](DeleteIntegration.md#DeleteIntegration) | **Delete** /v3/marketing/integrations | DeleteBulkIntegration + + + +## DeleteIntegration + +> DeleteIntegration(ctx, Ids) + +DeleteBulkIntegration + +This endpoint deletes Integrations. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteIntegrationParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/integrations/docs/DeleteIntegration400Response.md b/rest/api/v3/integrations/docs/DeleteIntegration400Response.md new file mode 100644 index 00000000..52a6707f --- /dev/null +++ b/rest/api/v3/integrations/docs/DeleteIntegration400Response.md @@ -0,0 +1,11 @@ +# DeleteIntegration400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]InvalidDeleteRequest**](InvalidDeleteRequest.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/DeleteIntegration404Response.md b/rest/api/v3/integrations/docs/DeleteIntegration404Response.md new file mode 100644 index 00000000..ab33a208 --- /dev/null +++ b/rest/api/v3/integrations/docs/DeleteIntegration404Response.md @@ -0,0 +1,11 @@ +# DeleteIntegration404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]IntegrationNotFound**](IntegrationNotFound.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/Destination.md b/rest/api/v3/integrations/docs/Destination.md new file mode 100644 index 00000000..e0a69331 --- /dev/null +++ b/rest/api/v3/integrations/docs/Destination.md @@ -0,0 +1,12 @@ +# Destination + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**SEGMENT** | string | (value: `"Segment"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/Destination1.md b/rest/api/v3/integrations/docs/Destination1.md new file mode 100644 index 00000000..eeff58b5 --- /dev/null +++ b/rest/api/v3/integrations/docs/Destination1.md @@ -0,0 +1,12 @@ +# Destination1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**SEGMENT** | string | (value: `"Segment"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/Destination2.md b/rest/api/v3/integrations/docs/Destination2.md new file mode 100644 index 00000000..6c18c7f8 --- /dev/null +++ b/rest/api/v3/integrations/docs/Destination2.md @@ -0,0 +1,12 @@ +# Destination2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**SEGMENT** | string | (value: `"Segment"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/Destination3.md b/rest/api/v3/integrations/docs/Destination3.md new file mode 100644 index 00000000..bfbae361 --- /dev/null +++ b/rest/api/v3/integrations/docs/Destination3.md @@ -0,0 +1,12 @@ +# Destination3 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**SEGMENT** | string | (value: `"Segment"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/DestinationRegion.md b/rest/api/v3/integrations/docs/DestinationRegion.md new file mode 100644 index 00000000..1a56b3c2 --- /dev/null +++ b/rest/api/v3/integrations/docs/DestinationRegion.md @@ -0,0 +1,13 @@ +# DestinationRegion + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**EU** | string | (value: `"EU"`) +**US** | string | (value: `"US"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/DestinationRegion1.md b/rest/api/v3/integrations/docs/DestinationRegion1.md new file mode 100644 index 00000000..42ac76a4 --- /dev/null +++ b/rest/api/v3/integrations/docs/DestinationRegion1.md @@ -0,0 +1,13 @@ +# DestinationRegion1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**EU** | string | (value: `"EU"`) +**US** | string | (value: `"US"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/DestinationRegion2.md b/rest/api/v3/integrations/docs/DestinationRegion2.md new file mode 100644 index 00000000..b79835bb --- /dev/null +++ b/rest/api/v3/integrations/docs/DestinationRegion2.md @@ -0,0 +1,13 @@ +# DestinationRegion2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**EU** | string | (value: `"EU"`) +**US** | string | (value: `"US"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/FindIntegrationById.md b/rest/api/v3/integrations/docs/FindIntegrationById.md new file mode 100644 index 00000000..3f19621a --- /dev/null +++ b/rest/api/v3/integrations/docs/FindIntegrationById.md @@ -0,0 +1,51 @@ +# FindIntegrationById + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**FindIntegrationById**](FindIntegrationById.md#FindIntegrationById) | **Get** /v3/marketing/integrations/{Id} | GetIntegration + + + +## FindIntegrationById + +> Integration FindIntegrationById(ctx, Id) + +GetIntegration + +This endpoint returns the data for a specific Integration. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the Integration you would like to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a FindIntegrationByIdParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**Integration**](Integration.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/integrations/docs/Forbidden.md b/rest/api/v3/integrations/docs/Forbidden.md new file mode 100644 index 00000000..1852697e --- /dev/null +++ b/rest/api/v3/integrations/docs/Forbidden.md @@ -0,0 +1,11 @@ +# Forbidden + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | The error message tells you the cause of failure. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/GetIntegrationsByUser.md b/rest/api/v3/integrations/docs/GetIntegrationsByUser.md new file mode 100644 index 00000000..c692ef46 --- /dev/null +++ b/rest/api/v3/integrations/docs/GetIntegrationsByUser.md @@ -0,0 +1,44 @@ +# GetIntegrationsByUser + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetIntegrationsByUser**](GetIntegrationsByUser.md#GetIntegrationsByUser) | **Get** /v3/marketing/integrations | ListIntegration + + + +## GetIntegrationsByUser + +> GetIntegrationsByUser200Response GetIntegrationsByUser(ctx, ) + +ListIntegration + +This endpoint returns all the Integrations for the user making this call. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a GetIntegrationsByUserParams struct + + +### Return type + +[**GetIntegrationsByUser200Response**](GetIntegrationsByUser200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/integrations/docs/GetIntegrationsByUser200Response.md b/rest/api/v3/integrations/docs/GetIntegrationsByUser200Response.md new file mode 100644 index 00000000..511b87d8 --- /dev/null +++ b/rest/api/v3/integrations/docs/GetIntegrationsByUser200Response.md @@ -0,0 +1,11 @@ +# GetIntegrationsByUser200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]Integration**](Integration.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/GetIntegrationsByUser403Response.md b/rest/api/v3/integrations/docs/GetIntegrationsByUser403Response.md new file mode 100644 index 00000000..59d7a833 --- /dev/null +++ b/rest/api/v3/integrations/docs/GetIntegrationsByUser403Response.md @@ -0,0 +1,11 @@ +# GetIntegrationsByUser403Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]Forbidden**](Forbidden.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/GetIntegrationsByUser500Response.md b/rest/api/v3/integrations/docs/GetIntegrationsByUser500Response.md new file mode 100644 index 00000000..6d5d7f88 --- /dev/null +++ b/rest/api/v3/integrations/docs/GetIntegrationsByUser500Response.md @@ -0,0 +1,11 @@ +# GetIntegrationsByUser500Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]InternalError**](InternalError.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/Id.md b/rest/api/v3/integrations/docs/Id.md new file mode 100644 index 00000000..67dc46d0 --- /dev/null +++ b/rest/api/v3/integrations/docs/Id.md @@ -0,0 +1,11 @@ +# Id + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IntegrationId** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/Integration.md b/rest/api/v3/integrations/docs/Integration.md new file mode 100644 index 00000000..a3645110 --- /dev/null +++ b/rest/api/v3/integrations/docs/Integration.md @@ -0,0 +1,16 @@ +# Integration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IntegrationId** | **string** | The unique ID of an Integration. |[optional] +**UserId** | **string** | Your Twilio SendGrid account ID. |[optional] +**Filters** | [**IntegrationFilters**](IntegrationFilters.md) | |[optional] +**Properties** | [**IntegrationProperties**](IntegrationProperties.md) | |[optional] +**Label** | **string** | The nickname for the Integration. |[optional] [default to "Untitled Integration"] +**Destination** | [**Destination3**](Destination3.md) | The third-party application you would like to forward your events to. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/IntegrationFilters.md b/rest/api/v3/integrations/docs/IntegrationFilters.md new file mode 100644 index 00000000..17812e6e --- /dev/null +++ b/rest/api/v3/integrations/docs/IntegrationFilters.md @@ -0,0 +1,11 @@ +# IntegrationFilters + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EmailEvents** | [**[]Items2**](Items2.md) | The possible SendGrid email event types for event forwarding. Specify all the email event types that you would like to forward to the Integration's destination. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/IntegrationInput.md b/rest/api/v3/integrations/docs/IntegrationInput.md new file mode 100644 index 00000000..0d6fa829 --- /dev/null +++ b/rest/api/v3/integrations/docs/IntegrationInput.md @@ -0,0 +1,14 @@ +# IntegrationInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Destination** | [**Destination2**](Destination2.md) | The third-party application you would like to forward your events to. | +**Filters** | [**IntegrationInputFilters**](IntegrationInputFilters.md) | | +**Properties** | [**IntegrationInputProperties**](IntegrationInputProperties.md) | | +**Label** | **string** | The nickname for the Integration. |[optional] [default to "Untitled Integration"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/IntegrationInputFilters.md b/rest/api/v3/integrations/docs/IntegrationInputFilters.md new file mode 100644 index 00000000..dc1ebf0f --- /dev/null +++ b/rest/api/v3/integrations/docs/IntegrationInputFilters.md @@ -0,0 +1,11 @@ +# IntegrationInputFilters + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EmailEvents** | [**[]Items1**](Items1.md) | The possible SendGrid email event types for event forwarding. Specify all the email event types that you would like to forward to the Integration's destination. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/IntegrationInputProperties.md b/rest/api/v3/integrations/docs/IntegrationInputProperties.md new file mode 100644 index 00000000..5e56f5d6 --- /dev/null +++ b/rest/api/v3/integrations/docs/IntegrationInputProperties.md @@ -0,0 +1,12 @@ +# IntegrationInputProperties + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**WriteKey** | **string** | The write key provided by the Segment Source you'd like to have events forwarded to. Must be between 6 and 51 characters. | +**DestinationRegion** | [**DestinationRegion1**](DestinationRegion1.md) | The workspace region where the Segment Source write key lives. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/IntegrationNotFound.md b/rest/api/v3/integrations/docs/IntegrationNotFound.md new file mode 100644 index 00000000..dc5cbacf --- /dev/null +++ b/rest/api/v3/integrations/docs/IntegrationNotFound.md @@ -0,0 +1,11 @@ +# IntegrationNotFound + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | The error message tells you the cause of failure. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/IntegrationPatch.md b/rest/api/v3/integrations/docs/IntegrationPatch.md new file mode 100644 index 00000000..bf974d8c --- /dev/null +++ b/rest/api/v3/integrations/docs/IntegrationPatch.md @@ -0,0 +1,14 @@ +# IntegrationPatch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Destination** | [**Destination1**](Destination1.md) | The third-party application you would like to forward your email events to. |[optional] +**Filters** | [**IntegrationPatchFilters**](IntegrationPatchFilters.md) | |[optional] +**Properties** | [**IntegrationPatchProperties**](IntegrationPatchProperties.md) | |[optional] +**Label** | **string** | The nickname for the Integration. |[optional] [default to "Untitled Integration"] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/IntegrationPatchFilters.md b/rest/api/v3/integrations/docs/IntegrationPatchFilters.md new file mode 100644 index 00000000..4feb447e --- /dev/null +++ b/rest/api/v3/integrations/docs/IntegrationPatchFilters.md @@ -0,0 +1,11 @@ +# IntegrationPatchFilters + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EmailEvents** | [**[]Items**](Items.md) | The possible SendGrid email event types for event forwarding. Specify all the email event types that you would like to forward to the Integration's destination. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/IntegrationPatchProperties.md b/rest/api/v3/integrations/docs/IntegrationPatchProperties.md new file mode 100644 index 00000000..2ef4f33f --- /dev/null +++ b/rest/api/v3/integrations/docs/IntegrationPatchProperties.md @@ -0,0 +1,12 @@ +# IntegrationPatchProperties + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**WriteKey** | **string** | The write key provided by the Segment Source you'd like to have events forwarded to. Must be between 6 and 51 characters. |[optional] +**DestinationRegion** | [**DestinationRegion**](DestinationRegion.md) | The workspace region where the Segment Source write key lives. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/IntegrationProperties.md b/rest/api/v3/integrations/docs/IntegrationProperties.md new file mode 100644 index 00000000..9ddebe9b --- /dev/null +++ b/rest/api/v3/integrations/docs/IntegrationProperties.md @@ -0,0 +1,12 @@ +# IntegrationProperties + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**WriteKey** | **string** | The write key provided by the Segment Source you'd like to have events forwarded to. Must be between 6 and 51 characters. |[optional] +**DestinationRegion** | [**DestinationRegion2**](DestinationRegion2.md) | The workspace region where the Segment Source write key lives. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/InternalError.md b/rest/api/v3/integrations/docs/InternalError.md new file mode 100644 index 00000000..46bca29a --- /dev/null +++ b/rest/api/v3/integrations/docs/InternalError.md @@ -0,0 +1,11 @@ +# InternalError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | The error message tells you the cause of failure. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/InvalidDeleteRequest.md b/rest/api/v3/integrations/docs/InvalidDeleteRequest.md new file mode 100644 index 00000000..0a26bf26 --- /dev/null +++ b/rest/api/v3/integrations/docs/InvalidDeleteRequest.md @@ -0,0 +1,12 @@ +# InvalidDeleteRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | The error message tells you the cause of failure. |[optional] +**Parameter** | **string** | The parameter shows more information about where the error is. The number in the brackets is the invalid ID indexed. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/InvalidRequest.md b/rest/api/v3/integrations/docs/InvalidRequest.md new file mode 100644 index 00000000..2058d058 --- /dev/null +++ b/rest/api/v3/integrations/docs/InvalidRequest.md @@ -0,0 +1,12 @@ +# InvalidRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | The error message tells you the cause of validation failure(s), separated by commas if there are multiple failures. |[optional] +**Field** | **string** | The field shows more information on where the error is when available. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/Items.md b/rest/api/v3/integrations/docs/Items.md new file mode 100644 index 00000000..31a64e99 --- /dev/null +++ b/rest/api/v3/integrations/docs/Items.md @@ -0,0 +1,23 @@ +# Items + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DROP** | string | (value: `"drop"`) +**PROCESSED** | string | (value: `"processed"`) +**DEFERRED** | string | (value: `"deferred"`) +**GROUP_UNSUBSCRIBE** | string | (value: `"group_unsubscribe"`) +**BOUNCE** | string | (value: `"bounce"`) +**DELIVERED** | string | (value: `"delivered"`) +**CLICK** | string | (value: `"click"`) +**UNSUBSCRIBE** | string | (value: `"unsubscribe"`) +**OPEN** | string | (value: `"open"`) +**GROUP_RESUBSCRIBE** | string | (value: `"group_resubscribe"`) +**SPAMREPORT** | string | (value: `"spamreport"`) +**MACHINE_OPENED** | string | (value: `"machine_opened"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/Items1.md b/rest/api/v3/integrations/docs/Items1.md new file mode 100644 index 00000000..70d35e3a --- /dev/null +++ b/rest/api/v3/integrations/docs/Items1.md @@ -0,0 +1,23 @@ +# Items1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DROP** | string | (value: `"drop"`) +**PROCESSED** | string | (value: `"processed"`) +**DEFERRED** | string | (value: `"deferred"`) +**GROUP_UNSUBSCRIBE** | string | (value: `"group_unsubscribe"`) +**BOUNCE** | string | (value: `"bounce"`) +**DELIVERED** | string | (value: `"delivered"`) +**CLICK** | string | (value: `"click"`) +**UNSUBSCRIBE** | string | (value: `"unsubscribe"`) +**OPEN** | string | (value: `"open"`) +**GROUP_RESUBSCRIBE** | string | (value: `"group_resubscribe"`) +**SPAMREPORT** | string | (value: `"spamreport"`) +**MACHINE_OPENED** | string | (value: `"machine_opened"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/Items2.md b/rest/api/v3/integrations/docs/Items2.md new file mode 100644 index 00000000..07701e8f --- /dev/null +++ b/rest/api/v3/integrations/docs/Items2.md @@ -0,0 +1,23 @@ +# Items2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DROP** | string | (value: `"drop"`) +**PROCESSED** | string | (value: `"processed"`) +**DEFERRED** | string | (value: `"deferred"`) +**GROUP_UNSUBSCRIBE** | string | (value: `"group_unsubscribe"`) +**BOUNCE** | string | (value: `"bounce"`) +**DELIVERED** | string | (value: `"delivered"`) +**CLICK** | string | (value: `"click"`) +**UNSUBSCRIBE** | string | (value: `"unsubscribe"`) +**OPEN** | string | (value: `"open"`) +**GROUP_RESUBSCRIBE** | string | (value: `"group_resubscribe"`) +**SPAMREPORT** | string | (value: `"spamreport"`) +**MACHINE_OPENED** | string | (value: `"machine_opened"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/integrations/docs/UpdateIntegration.md b/rest/api/v3/integrations/docs/UpdateIntegration.md new file mode 100644 index 00000000..f3fb79c2 --- /dev/null +++ b/rest/api/v3/integrations/docs/UpdateIntegration.md @@ -0,0 +1,51 @@ +# UpdateIntegration + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateIntegration**](UpdateIntegration.md#UpdateIntegration) | **Patch** /v3/marketing/integrations/{Id} | UpdateIntegration + + + +## UpdateIntegration + +> Integration UpdateIntegration(ctx, IdIntegrationPatch) + +UpdateIntegration + +This endpoint updates an existing Integration. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the Integration you would like to update. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateIntegrationParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**Integration**](Integration.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/integrations/model_add_integration_400_response.go b/rest/api/v3/integrations/model_add_integration_400_response.go new file mode 100644 index 00000000..ad8e53b3 --- /dev/null +++ b/rest/api/v3/integrations/model_add_integration_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIntegration400Response struct for AddIntegration400Response +type AddIntegration400Response struct { + Errors *[]InvalidRequest `json:"errors,omitempty"` +} diff --git a/rest/api/v3/integrations/model_delete_integration_400_response.go b/rest/api/v3/integrations/model_delete_integration_400_response.go new file mode 100644 index 00000000..81d15a69 --- /dev/null +++ b/rest/api/v3/integrations/model_delete_integration_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteIntegration400Response struct for DeleteIntegration400Response +type DeleteIntegration400Response struct { + Errors *[]InvalidDeleteRequest `json:"errors,omitempty"` +} diff --git a/rest/api/v3/integrations/model_delete_integration_404_response.go b/rest/api/v3/integrations/model_delete_integration_404_response.go new file mode 100644 index 00000000..990eeba8 --- /dev/null +++ b/rest/api/v3/integrations/model_delete_integration_404_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteIntegration404Response struct for DeleteIntegration404Response +type DeleteIntegration404Response struct { + Errors *[]IntegrationNotFound `json:"errors,omitempty"` +} diff --git a/rest/api/v3/integrations/model_destination.go b/rest/api/v3/integrations/model_destination.go new file mode 100644 index 00000000..133a8563 --- /dev/null +++ b/rest/api/v3/integrations/model_destination.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Destination The third-party application you would like to forward your email events to. +type Destination string + +// List of Destination +const ( + DESTINATION_SEGMENT Destination = "Segment" +) diff --git a/rest/api/v3/integrations/model_destination1.go b/rest/api/v3/integrations/model_destination1.go new file mode 100644 index 00000000..4350d666 --- /dev/null +++ b/rest/api/v3/integrations/model_destination1.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Destination1 the model 'Destination1' +type Destination1 string + +// List of Destination1 +const ( + DESTINATION1_SEGMENT Destination1 = "Segment" +) diff --git a/rest/api/v3/integrations/model_destination2.go b/rest/api/v3/integrations/model_destination2.go new file mode 100644 index 00000000..f888e2ef --- /dev/null +++ b/rest/api/v3/integrations/model_destination2.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Destination2 the model 'Destination2' +type Destination2 string + +// List of Destination2 +const ( + DESTINATION2_SEGMENT Destination2 = "Segment" +) diff --git a/rest/api/v3/integrations/model_destination3.go b/rest/api/v3/integrations/model_destination3.go new file mode 100644 index 00000000..7ef311db --- /dev/null +++ b/rest/api/v3/integrations/model_destination3.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Destination3 the model 'Destination3' +type Destination3 string + +// List of Destination3 +const ( + DESTINATION3_SEGMENT Destination3 = "Segment" +) diff --git a/rest/api/v3/integrations/model_destination_region.go b/rest/api/v3/integrations/model_destination_region.go new file mode 100644 index 00000000..b972f4cc --- /dev/null +++ b/rest/api/v3/integrations/model_destination_region.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DestinationRegion the model 'DestinationRegion' +type DestinationRegion string + +// List of DestinationRegion +const ( + DESTINATIONREGION_EU DestinationRegion = "EU" + DESTINATIONREGION_US DestinationRegion = "US" +) diff --git a/rest/api/v3/integrations/model_destination_region1.go b/rest/api/v3/integrations/model_destination_region1.go new file mode 100644 index 00000000..fe5b5c33 --- /dev/null +++ b/rest/api/v3/integrations/model_destination_region1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DestinationRegion1 the model 'DestinationRegion1' +type DestinationRegion1 string + +// List of DestinationRegion1 +const ( + DESTINATIONREGION1_EU DestinationRegion1 = "EU" + DESTINATIONREGION1_US DestinationRegion1 = "US" +) diff --git a/rest/api/v3/integrations/model_destination_region2.go b/rest/api/v3/integrations/model_destination_region2.go new file mode 100644 index 00000000..85079c07 --- /dev/null +++ b/rest/api/v3/integrations/model_destination_region2.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DestinationRegion2 the model 'DestinationRegion2' +type DestinationRegion2 string + +// List of DestinationRegion2 +const ( + DESTINATIONREGION2_EU DestinationRegion2 = "EU" + DESTINATIONREGION2_US DestinationRegion2 = "US" +) diff --git a/rest/api/v3/integrations/model_forbidden.go b/rest/api/v3/integrations/model_forbidden.go new file mode 100644 index 00000000..9e941266 --- /dev/null +++ b/rest/api/v3/integrations/model_forbidden.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Forbidden struct for Forbidden +type Forbidden struct { + // The error message tells you the cause of failure. + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/integrations/model_get_integrations_by_user_200_response.go b/rest/api/v3/integrations/model_get_integrations_by_user_200_response.go new file mode 100644 index 00000000..f7421247 --- /dev/null +++ b/rest/api/v3/integrations/model_get_integrations_by_user_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetIntegrationsByUser200Response struct for GetIntegrationsByUser200Response +type GetIntegrationsByUser200Response struct { + Result *[]Integration `json:"result,omitempty"` +} diff --git a/rest/api/v3/integrations/model_get_integrations_by_user_403_response.go b/rest/api/v3/integrations/model_get_integrations_by_user_403_response.go new file mode 100644 index 00000000..c0b4cf0a --- /dev/null +++ b/rest/api/v3/integrations/model_get_integrations_by_user_403_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetIntegrationsByUser403Response struct for GetIntegrationsByUser403Response +type GetIntegrationsByUser403Response struct { + Errors *[]Forbidden `json:"errors,omitempty"` +} diff --git a/rest/api/v3/integrations/model_get_integrations_by_user_500_response.go b/rest/api/v3/integrations/model_get_integrations_by_user_500_response.go new file mode 100644 index 00000000..c315cb2b --- /dev/null +++ b/rest/api/v3/integrations/model_get_integrations_by_user_500_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetIntegrationsByUser500Response struct for GetIntegrationsByUser500Response +type GetIntegrationsByUser500Response struct { + Errors *[]InternalError `json:"errors,omitempty"` +} diff --git a/rest/api/v3/integrations/model_id.go b/rest/api/v3/integrations/model_id.go new file mode 100644 index 00000000..e5ddf078 --- /dev/null +++ b/rest/api/v3/integrations/model_id.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Id The unique ID of an Integration. +type Id struct { + IntegrationId *string `json:"integration_id,omitempty"` +} diff --git a/rest/api/v3/integrations/model_integration.go b/rest/api/v3/integrations/model_integration.go new file mode 100644 index 00000000..82d04c57 --- /dev/null +++ b/rest/api/v3/integrations/model_integration.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Integration struct for Integration +type Integration struct { + // The unique ID of an Integration. + IntegrationId *string `json:"integration_id,omitempty"` + // Your Twilio SendGrid account ID. + UserId *string `json:"user_id,omitempty"` + Filters *IntegrationFilters `json:"filters,omitempty"` + Properties *IntegrationProperties `json:"properties,omitempty"` + // The nickname for the Integration. + Label *string `json:"label,omitempty"` + // The third-party application you would like to forward your events to. + Destination *Destination3 `json:"destination,omitempty"` +} diff --git a/rest/api/v3/integrations/model_integration_filters.go b/rest/api/v3/integrations/model_integration_filters.go new file mode 100644 index 00000000..fbf2911c --- /dev/null +++ b/rest/api/v3/integrations/model_integration_filters.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IntegrationFilters The configurable filters for SendGrid to destination email event forwarding. +type IntegrationFilters struct { + // The possible SendGrid email event types for event forwarding. Specify all the email event types that you would like to forward to the Integration's destination. + EmailEvents *[]Items2 `json:"email_events,omitempty"` +} diff --git a/rest/api/v3/integrations/model_integration_input.go b/rest/api/v3/integrations/model_integration_input.go new file mode 100644 index 00000000..032d394b --- /dev/null +++ b/rest/api/v3/integrations/model_integration_input.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IntegrationInput struct for IntegrationInput +type IntegrationInput struct { + // The third-party application you would like to forward your events to. + Destination Destination2 `json:"destination"` + Filters IntegrationInputFilters `json:"filters"` + Properties IntegrationInputProperties `json:"properties"` + // The nickname for the Integration. + Label *string `json:"label,omitempty"` +} diff --git a/rest/api/v3/integrations/model_integration_input_filters.go b/rest/api/v3/integrations/model_integration_input_filters.go new file mode 100644 index 00000000..15f01bb0 --- /dev/null +++ b/rest/api/v3/integrations/model_integration_input_filters.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IntegrationInputFilters The configurable filters for SendGrid to destination email event forwarding. +type IntegrationInputFilters struct { + // The possible SendGrid email event types for event forwarding. Specify all the email event types that you would like to forward to the Integration's destination. + EmailEvents []Items1 `json:"email_events"` +} diff --git a/rest/api/v3/integrations/model_integration_input_properties.go b/rest/api/v3/integrations/model_integration_input_properties.go new file mode 100644 index 00000000..b4c3a181 --- /dev/null +++ b/rest/api/v3/integrations/model_integration_input_properties.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IntegrationInputProperties The properties of an Integration required to send events to a specific third-party application. +type IntegrationInputProperties struct { + // The write key provided by the Segment Source you'd like to have events forwarded to. Must be between 6 and 51 characters. + WriteKey string `json:"write_key"` + // The workspace region where the Segment Source write key lives. + DestinationRegion DestinationRegion1 `json:"destination_region"` +} diff --git a/rest/api/v3/integrations/model_integration_not_found.go b/rest/api/v3/integrations/model_integration_not_found.go new file mode 100644 index 00000000..ae903136 --- /dev/null +++ b/rest/api/v3/integrations/model_integration_not_found.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IntegrationNotFound struct for IntegrationNotFound +type IntegrationNotFound struct { + // The error message tells you the cause of failure. + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/integrations/model_integration_patch.go b/rest/api/v3/integrations/model_integration_patch.go new file mode 100644 index 00000000..0f43f1a8 --- /dev/null +++ b/rest/api/v3/integrations/model_integration_patch.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IntegrationPatch struct for IntegrationPatch +type IntegrationPatch struct { + // The third-party application you would like to forward your email events to. + Destination *Destination1 `json:"destination,omitempty"` + Filters *IntegrationPatchFilters `json:"filters,omitempty"` + Properties *IntegrationPatchProperties `json:"properties,omitempty"` + // The nickname for the Integration. + Label *string `json:"label,omitempty"` +} diff --git a/rest/api/v3/integrations/model_integration_patch_filters.go b/rest/api/v3/integrations/model_integration_patch_filters.go new file mode 100644 index 00000000..0ded71fd --- /dev/null +++ b/rest/api/v3/integrations/model_integration_patch_filters.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IntegrationPatchFilters The configurable filters for SendGrid to destination email event forwarding. +type IntegrationPatchFilters struct { + // The possible SendGrid email event types for event forwarding. Specify all the email event types that you would like to forward to the Integration's destination. + EmailEvents *[]Items `json:"email_events,omitempty"` +} diff --git a/rest/api/v3/integrations/model_integration_patch_properties.go b/rest/api/v3/integrations/model_integration_patch_properties.go new file mode 100644 index 00000000..f8fd78c1 --- /dev/null +++ b/rest/api/v3/integrations/model_integration_patch_properties.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IntegrationPatchProperties The properties of an Integration required to send events to a specific third-party application. +type IntegrationPatchProperties struct { + // The write key provided by the Segment Source you'd like to have events forwarded to. Must be between 6 and 51 characters. + WriteKey *string `json:"write_key,omitempty"` + // The workspace region where the Segment Source write key lives. + DestinationRegion *DestinationRegion `json:"destination_region,omitempty"` +} diff --git a/rest/api/v3/integrations/model_integration_properties.go b/rest/api/v3/integrations/model_integration_properties.go new file mode 100644 index 00000000..822fec09 --- /dev/null +++ b/rest/api/v3/integrations/model_integration_properties.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IntegrationProperties The properties of an Integration required to send events to a specific third-party application. +type IntegrationProperties struct { + // The write key provided by the Segment Source you'd like to have events forwarded to. Must be between 6 and 51 characters. + WriteKey *string `json:"write_key,omitempty"` + // The workspace region where the Segment Source write key lives. + DestinationRegion *DestinationRegion2 `json:"destination_region,omitempty"` +} diff --git a/rest/api/v3/integrations/model_internal_error.go b/rest/api/v3/integrations/model_internal_error.go new file mode 100644 index 00000000..34b072b8 --- /dev/null +++ b/rest/api/v3/integrations/model_internal_error.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// InternalError struct for InternalError +type InternalError struct { + // The error message tells you the cause of failure. + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/integrations/model_invalid_delete_request.go b/rest/api/v3/integrations/model_invalid_delete_request.go new file mode 100644 index 00000000..6adbbc72 --- /dev/null +++ b/rest/api/v3/integrations/model_invalid_delete_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// InvalidDeleteRequest struct for InvalidDeleteRequest +type InvalidDeleteRequest struct { + // The error message tells you the cause of failure. + Message *string `json:"message,omitempty"` + // The parameter shows more information about where the error is. The number in the brackets is the invalid ID indexed. + Parameter *string `json:"parameter,omitempty"` +} diff --git a/rest/api/v3/integrations/model_invalid_request.go b/rest/api/v3/integrations/model_invalid_request.go new file mode 100644 index 00000000..9fae34ad --- /dev/null +++ b/rest/api/v3/integrations/model_invalid_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// InvalidRequest struct for InvalidRequest +type InvalidRequest struct { + // The error message tells you the cause of validation failure(s), separated by commas if there are multiple failures. + Message *string `json:"message,omitempty"` + // The field shows more information on where the error is when available. + Field *string `json:"field,omitempty"` +} diff --git a/rest/api/v3/integrations/model_items.go b/rest/api/v3/integrations/model_items.go new file mode 100644 index 00000000..c90149eb --- /dev/null +++ b/rest/api/v3/integrations/model_items.go @@ -0,0 +1,33 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Items the model 'Items' +type Items string + +// List of Items +const ( + ITEMS_DROP Items = "drop" + ITEMS_PROCESSED Items = "processed" + ITEMS_DEFERRED Items = "deferred" + ITEMS_GROUP_UNSUBSCRIBE Items = "group_unsubscribe" + ITEMS_BOUNCE Items = "bounce" + ITEMS_DELIVERED Items = "delivered" + ITEMS_CLICK Items = "click" + ITEMS_UNSUBSCRIBE Items = "unsubscribe" + ITEMS_OPEN Items = "open" + ITEMS_GROUP_RESUBSCRIBE Items = "group_resubscribe" + ITEMS_SPAMREPORT Items = "spamreport" + ITEMS_MACHINE_OPENED Items = "machine_opened" +) diff --git a/rest/api/v3/integrations/model_items1.go b/rest/api/v3/integrations/model_items1.go new file mode 100644 index 00000000..ff8a80da --- /dev/null +++ b/rest/api/v3/integrations/model_items1.go @@ -0,0 +1,33 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Items1 the model 'Items1' +type Items1 string + +// List of Items1 +const ( + ITEMS1_DROP Items1 = "drop" + ITEMS1_PROCESSED Items1 = "processed" + ITEMS1_DEFERRED Items1 = "deferred" + ITEMS1_GROUP_UNSUBSCRIBE Items1 = "group_unsubscribe" + ITEMS1_BOUNCE Items1 = "bounce" + ITEMS1_DELIVERED Items1 = "delivered" + ITEMS1_CLICK Items1 = "click" + ITEMS1_UNSUBSCRIBE Items1 = "unsubscribe" + ITEMS1_OPEN Items1 = "open" + ITEMS1_GROUP_RESUBSCRIBE Items1 = "group_resubscribe" + ITEMS1_SPAMREPORT Items1 = "spamreport" + ITEMS1_MACHINE_OPENED Items1 = "machine_opened" +) diff --git a/rest/api/v3/integrations/model_items2.go b/rest/api/v3/integrations/model_items2.go new file mode 100644 index 00000000..1cb6e646 --- /dev/null +++ b/rest/api/v3/integrations/model_items2.go @@ -0,0 +1,33 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Integrations API +* Integrations allows you to connect your SendGrid applications with third-party services and forward SendGrid email events to those external applications. Currently, Integrations supports event forwarding to [Segment](https://segment.com/docs). You can use this API to create, delete, view, and update your Integrations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Items2 the model 'Items2' +type Items2 string + +// List of Items2 +const ( + ITEMS2_DROP Items2 = "drop" + ITEMS2_PROCESSED Items2 = "processed" + ITEMS2_DEFERRED Items2 = "deferred" + ITEMS2_GROUP_UNSUBSCRIBE Items2 = "group_unsubscribe" + ITEMS2_BOUNCE Items2 = "bounce" + ITEMS2_DELIVERED Items2 = "delivered" + ITEMS2_CLICK Items2 = "click" + ITEMS2_UNSUBSCRIBE Items2 = "unsubscribe" + ITEMS2_OPEN Items2 = "open" + ITEMS2_GROUP_RESUBSCRIBE Items2 = "group_resubscribe" + ITEMS2_SPAMREPORT Items2 = "spamreport" + ITEMS2_MACHINE_OPENED Items2 = "machine_opened" +) diff --git a/rest/api/v3/ip_access_management/README.md b/rest/api/v3/ip_access_management/README.md new file mode 100644 index 00000000..3636ea94 --- /dev/null +++ b/rest/api/v3/ip_access_management/README.md @@ -0,0 +1,79 @@ +# Go API client for + +IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. + +There is no limit to the number of IP addresses that you can allow. + +It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. + +See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:01.499792+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AddIpToAllowList* | [**AddIpToAllowList**](docs/AddIpToAllowList.md#addiptoallowlist) | **Post** /v3/access_settings/whitelist | Add one or more IPs to the allow list +*DeleteAllowedIp* | [**DeleteAllowedIp**](docs/DeleteAllowedIp.md#deleteallowedip) | **Delete** /v3/access_settings/whitelist/{RuleId} | Remove a specific IP from the allowed list +*DeleteAllowedIps* | [**DeleteAllowedIps**](docs/DeleteAllowedIps.md#deleteallowedips) | **Delete** /v3/access_settings/whitelist | Remove one or more IPs from the allow list +*GetAllowedIp* | [**GetAllowedIp**](docs/GetAllowedIp.md#getallowedip) | **Get** /v3/access_settings/whitelist/{RuleId} | Retrieve a specific allowed IP +*ListAccessActivity* | [**ListAccessActivity**](docs/ListAccessActivity.md#listaccessactivity) | **Get** /v3/access_settings/activity | Retrieve all recent access attempts +*ListAllowedIp* | [**ListAllowedIp**](docs/ListAllowedIp.md#listallowedip) | **Get** /v3/access_settings/whitelist | Retrieve a list of currently allowed IPs + + +## Documentation For Models + + - [AddIpToAllowListRequest](AddIpToAllowListRequest.md) + - [AddIpToAllowListRequestIpsInner](AddIpToAllowListRequestIpsInner.md) + - [DeleteAllowedIpsRequest](DeleteAllowedIpsRequest.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [IpAccessManagement2xx](IpAccessManagement2xx.md) + - [IpAccessManagement2xxResultInner](IpAccessManagement2xxResultInner.md) + - [ListAccessActivity200Response](ListAccessActivity200Response.md) + - [ListAccessActivity200ResponseResultInner](ListAccessActivity200ResponseResultInner.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/ip_access_management/api_add_ip_to_allow_list.go b/rest/api/v3/ip_access_management/api_add_ip_to_allow_list.go new file mode 100644 index 00000000..7e402244 --- /dev/null +++ b/rest/api/v3/ip_access_management/api_add_ip_to_allow_list.go @@ -0,0 +1,98 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type AddIpToAllowListParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + AddIpToAllowListRequest *AddIpToAllowListRequest `json:"AddIpToAllowListRequest,omitempty"` +} + +func (params *AddIpToAllowListParam) SetOnbehalfof(Onbehalfof string) *AddIpToAllowListParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *AddIpToAllowListParam) SetAddIpToAllowListRequest(AddIpToAllowListRequest AddIpToAllowListRequest) *AddIpToAllowListParam { + params.AddIpToAllowListRequest = &AddIpToAllowListRequest + return params +} + +// **This endpoint allows you to add one or more allowed IP addresses.** To allow one or more IP addresses, pass them to this endpoint in an array. Once an IP address is added to your allow list, it will be assigned an `id` that can be used to remove the address. You can retrieve the ID associated with an IP using the \"Retrieve a list of currently allowed IPs\" endpoint. +func (c *ApiService) AddIpToAllowList(params *AddIpToAllowListParam) (interface{}, error) { + path := "/v3/access_settings/whitelist" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.AddIpToAllowListRequest != nil { + b, err := json.Marshal(*params.AddIpToAllowListRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &IpAccessManagement2xx{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ip_access_management/api_delete_allowed_ip.go b/rest/api/v3/ip_access_management/api_delete_allowed_ip.go new file mode 100644 index 00000000..9691fb48 --- /dev/null +++ b/rest/api/v3/ip_access_management/api_delete_allowed_ip.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteAllowedIpParam struct { + // The ID of the allowed IP address that you want to retrieve. + RuleId *string `json:"rule_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteAllowedIpParam) SetRuleId(RuleId string) *DeleteAllowedIpParam { + params.RuleId = &RuleId + return params +} +func (params *DeleteAllowedIpParam) SetOnbehalfof(Onbehalfof string) *DeleteAllowedIpParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to remove a specific IP address from your list of allowed addresses.** When removing a specific IP address from your list, you must include the ID in your call. You can retrieve the IDs associated with your allowed IP addresses using the \"Retrieve a list of currently allowed IPs\" endpoint. +func (c *ApiService) DeleteAllowedIp(params *DeleteAllowedIpParam) (interface{}, error) { + path := "/v3/access_settings/whitelist/{RuleId}" + if params != nil && params.RuleId != nil { + path = strings.Replace(path, "{"+"RuleId"+"}", *params.RuleId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ip_access_management/api_delete_allowed_ips.go b/rest/api/v3/ip_access_management/api_delete_allowed_ips.go new file mode 100644 index 00000000..83fb95f5 --- /dev/null +++ b/rest/api/v3/ip_access_management/api_delete_allowed_ips.go @@ -0,0 +1,98 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type DeleteAllowedIpsParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + DeleteAllowedIpsRequest *DeleteAllowedIpsRequest `json:"DeleteAllowedIpsRequest,omitempty"` +} + +func (params *DeleteAllowedIpsParam) SetOnbehalfof(Onbehalfof string) *DeleteAllowedIpsParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *DeleteAllowedIpsParam) SetDeleteAllowedIpsRequest(DeleteAllowedIpsRequest DeleteAllowedIpsRequest) *DeleteAllowedIpsParam { + params.DeleteAllowedIpsRequest = &DeleteAllowedIpsRequest + return params +} + +// **This endpoint allows you to remove one or more IP addresses from your list of allowed addresses.** To remove one or more IP addresses, pass this endpoint an array containing the ID(s) associated with the IP(s) you intend to remove. You can retrieve the IDs associated with your allowed IP addresses using the \"Retrieve a list of currently allowed IPs\" endpoint. It is possible to remove your own IP address, which will block access to your account. You will need to submit a [support ticket](https://sendgrid.com/docs/ui/account-and-settings/support/) if this happens. For this reason, it is important to double check that you are removing only the IPs you intend to remove when using this endpoint. +func (c *ApiService) DeleteAllowedIps(params *DeleteAllowedIpsParam) (interface{}, error) { + path := "/v3/access_settings/whitelist" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.DeleteAllowedIpsRequest != nil { + b, err := json.Marshal(*params.DeleteAllowedIpsRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ip_access_management/api_get_allowed_ip.go b/rest/api/v3/ip_access_management/api_get_allowed_ip.go new file mode 100644 index 00000000..bbe20e9c --- /dev/null +++ b/rest/api/v3/ip_access_management/api_get_allowed_ip.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetAllowedIpParam struct { + // The ID of the allowed IP address that you want to retrieve. + RuleId *string `json:"rule_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetAllowedIpParam) SetRuleId(RuleId string) *GetAllowedIpParam { + params.RuleId = &RuleId + return params +} +func (params *GetAllowedIpParam) SetOnbehalfof(Onbehalfof string) *GetAllowedIpParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retreive a specific IP address that has been allowed to access your account.** You must include the ID for the specific IP address you want to retrieve in your call. You can retrieve the IDs associated with your allowed IP addresses using the \"Retrieve a list of currently allowed IPs\" endpoint. +func (c *ApiService) GetAllowedIp(params *GetAllowedIpParam) (interface{}, error) { + path := "/v3/access_settings/whitelist/{RuleId}" + if params != nil && params.RuleId != nil { + path = strings.Replace(path, "{"+"RuleId"+"}", *params.RuleId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &IpAccessManagement2xx{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ip_access_management/api_list_access_activity.go b/rest/api/v3/ip_access_management/api_list_access_activity.go new file mode 100644 index 00000000..1a9acf1a --- /dev/null +++ b/rest/api/v3/ip_access_management/api_list_access_activity.go @@ -0,0 +1,94 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListAccessActivityParam struct { + // Limits the number of IPs to return. + Limit *int32 `json:"limit,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListAccessActivityParam) SetLimit(Limit int32) *ListAccessActivityParam { + params.Limit = &Limit + return params +} +func (params *ListAccessActivityParam) SetOnbehalfof(Onbehalfof string) *ListAccessActivityParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a list of all of the IP addresses that recently attempted to access your account either through the User Interface or the API.** +func (c *ApiService) ListAccessActivity(params *ListAccessActivityParam) (interface{}, error) { + path := "/v3/access_settings/activity" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListAccessActivity200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ip_access_management/api_list_allowed_ip.go b/rest/api/v3/ip_access_management/api_list_allowed_ip.go new file mode 100644 index 00000000..f9dc1611 --- /dev/null +++ b/rest/api/v3/ip_access_management/api_list_allowed_ip.go @@ -0,0 +1,83 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListAllowedIpParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListAllowedIpParam) SetOnbehalfof(Onbehalfof string) *ListAllowedIpParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a list of IP addresses that are currently allowed to access your account.** Each IP address returned to you will have `created_at` and `updated_at` dates. Each IP will also be associated with an `id` that can be used to remove the address from your allow list. +func (c *ApiService) ListAllowedIp(params *ListAllowedIpParam) (interface{}, error) { + path := "/v3/access_settings/whitelist" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &IpAccessManagement2xx{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ip_access_management/api_service.go b/rest/api/v3/ip_access_management/api_service.go new file mode 100644 index 00000000..d43663e0 --- /dev/null +++ b/rest/api/v3/ip_access_management/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/ip_access_management/docs/AddIpToAllowList.md b/rest/api/v3/ip_access_management/docs/AddIpToAllowList.md new file mode 100644 index 00000000..71f14dd1 --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/AddIpToAllowList.md @@ -0,0 +1,49 @@ +# AddIpToAllowList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddIpToAllowList**](AddIpToAllowList.md#AddIpToAllowList) | **Post** /v3/access_settings/whitelist | Add one or more IPs to the allow list + + + +## AddIpToAllowList + +> IpAccessManagement2xx AddIpToAllowList(ctx, optional) + +Add one or more IPs to the allow list + +**This endpoint allows you to add one or more allowed IP addresses.** To allow one or more IP addresses, pass them to this endpoint in an array. Once an IP address is added to your allow list, it will be assigned an `id` that can be used to remove the address. You can retrieve the ID associated with an IP using the \"Retrieve a list of currently allowed IPs\" endpoint. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a AddIpToAllowListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**AddIpToAllowListRequest** | [**AddIpToAllowListRequest**](AddIpToAllowListRequest.md) | + +### Return type + +[**IpAccessManagement2xx**](IpAccessManagement2xx.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_access_management/docs/AddIpToAllowListRequest.md b/rest/api/v3/ip_access_management/docs/AddIpToAllowListRequest.md new file mode 100644 index 00000000..f4318398 --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/AddIpToAllowListRequest.md @@ -0,0 +1,11 @@ +# AddIpToAllowListRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ips** | [**[]AddIpToAllowListRequestIpsInner**](AddIpToAllowListRequestIpsInner.md) | An array containing the IP(s) you want to allow. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_access_management/docs/AddIpToAllowListRequestIpsInner.md b/rest/api/v3/ip_access_management/docs/AddIpToAllowListRequestIpsInner.md new file mode 100644 index 00000000..7f0dc81f --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/AddIpToAllowListRequestIpsInner.md @@ -0,0 +1,11 @@ +# AddIpToAllowListRequestIpsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | An IP address that you want to allow. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_access_management/docs/DeleteAllowedIp.md b/rest/api/v3/ip_access_management/docs/DeleteAllowedIp.md new file mode 100644 index 00000000..64cf1795 --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/DeleteAllowedIp.md @@ -0,0 +1,52 @@ +# DeleteAllowedIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteAllowedIp**](DeleteAllowedIp.md#DeleteAllowedIp) | **Delete** /v3/access_settings/whitelist/{RuleId} | Remove a specific IP from the allowed list + + + +## DeleteAllowedIp + +> map[string]interface{} DeleteAllowedIp(ctx, RuleIdoptional) + +Remove a specific IP from the allowed list + +**This endpoint allows you to remove a specific IP address from your list of allowed addresses.** When removing a specific IP address from your list, you must include the ID in your call. You can retrieve the IDs associated with your allowed IP addresses using the \"Retrieve a list of currently allowed IPs\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RuleId** | **string** | The ID of the allowed IP address that you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteAllowedIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_access_management/docs/DeleteAllowedIps.md b/rest/api/v3/ip_access_management/docs/DeleteAllowedIps.md new file mode 100644 index 00000000..ffe7222a --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/DeleteAllowedIps.md @@ -0,0 +1,49 @@ +# DeleteAllowedIps + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteAllowedIps**](DeleteAllowedIps.md#DeleteAllowedIps) | **Delete** /v3/access_settings/whitelist | Remove one or more IPs from the allow list + + + +## DeleteAllowedIps + +> map[string]interface{} DeleteAllowedIps(ctx, optional) + +Remove one or more IPs from the allow list + +**This endpoint allows you to remove one or more IP addresses from your list of allowed addresses.** To remove one or more IP addresses, pass this endpoint an array containing the ID(s) associated with the IP(s) you intend to remove. You can retrieve the IDs associated with your allowed IP addresses using the \"Retrieve a list of currently allowed IPs\" endpoint. It is possible to remove your own IP address, which will block access to your account. You will need to submit a [support ticket](https://sendgrid.com/docs/ui/account-and-settings/support/) if this happens. For this reason, it is important to double check that you are removing only the IPs you intend to remove when using this endpoint. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteAllowedIpsParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**DeleteAllowedIpsRequest** | [**DeleteAllowedIpsRequest**](DeleteAllowedIpsRequest.md) | + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_access_management/docs/DeleteAllowedIpsRequest.md b/rest/api/v3/ip_access_management/docs/DeleteAllowedIpsRequest.md new file mode 100644 index 00000000..9c466261 --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/DeleteAllowedIpsRequest.md @@ -0,0 +1,11 @@ +# DeleteAllowedIpsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ids** | **[]int32** | An array of the IDs of the IP address that you want to remove from your allow list. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_access_management/docs/ErrorResponse.md b/rest/api/v3/ip_access_management/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_access_management/docs/ErrorResponseErrorsInner.md b/rest/api/v3/ip_access_management/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_access_management/docs/GetAllowedIp.md b/rest/api/v3/ip_access_management/docs/GetAllowedIp.md new file mode 100644 index 00000000..4ea75448 --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/GetAllowedIp.md @@ -0,0 +1,52 @@ +# GetAllowedIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetAllowedIp**](GetAllowedIp.md#GetAllowedIp) | **Get** /v3/access_settings/whitelist/{RuleId} | Retrieve a specific allowed IP + + + +## GetAllowedIp + +> IpAccessManagement2xx GetAllowedIp(ctx, RuleIdoptional) + +Retrieve a specific allowed IP + +**This endpoint allows you to retreive a specific IP address that has been allowed to access your account.** You must include the ID for the specific IP address you want to retrieve in your call. You can retrieve the IDs associated with your allowed IP addresses using the \"Retrieve a list of currently allowed IPs\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RuleId** | **string** | The ID of the allowed IP address that you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetAllowedIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**IpAccessManagement2xx**](IpAccessManagement2xx.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_access_management/docs/IpAccessManagement2xx.md b/rest/api/v3/ip_access_management/docs/IpAccessManagement2xx.md new file mode 100644 index 00000000..5391826f --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/IpAccessManagement2xx.md @@ -0,0 +1,11 @@ +# IpAccessManagement2xx + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]IpAccessManagement2xxResultInner**](IpAccessManagement2xxResultInner.md) | An array listing one or more of your allowed IPs. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_access_management/docs/IpAccessManagement2xxResultInner.md b/rest/api/v3/ip_access_management/docs/IpAccessManagement2xxResultInner.md new file mode 100644 index 00000000..853651fa --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/IpAccessManagement2xxResultInner.md @@ -0,0 +1,14 @@ +# IpAccessManagement2xxResultInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The ID of the allowed IP. |[optional] +**Ip** | **string** | The allowed IP. |[optional] +**CreatedAt** | **int32** | A Unix timestamp indicating when the IP was added to the allow list. |[optional] +**UpdatedAt** | **int32** | A Unix timestamp indicating when the IPs allow status was most recently updated. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_access_management/docs/ListAccessActivity.md b/rest/api/v3/ip_access_management/docs/ListAccessActivity.md new file mode 100644 index 00000000..ef433ccb --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/ListAccessActivity.md @@ -0,0 +1,49 @@ +# ListAccessActivity + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListAccessActivity**](ListAccessActivity.md#ListAccessActivity) | **Get** /v3/access_settings/activity | Retrieve all recent access attempts + + + +## ListAccessActivity + +> ListAccessActivity200Response ListAccessActivity(ctx, optional) + +Retrieve all recent access attempts + +**This endpoint allows you to retrieve a list of all of the IP addresses that recently attempted to access your account either through the User Interface or the API.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListAccessActivityParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **int32** | Limits the number of IPs to return. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListAccessActivity200Response**](ListAccessActivity200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_access_management/docs/ListAccessActivity200Response.md b/rest/api/v3/ip_access_management/docs/ListAccessActivity200Response.md new file mode 100644 index 00000000..b78a8525 --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/ListAccessActivity200Response.md @@ -0,0 +1,11 @@ +# ListAccessActivity200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ListAccessActivity200ResponseResultInner**](ListAccessActivity200ResponseResultInner.md) | An array containing the IPs that recently attempted to access your account. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_access_management/docs/ListAccessActivity200ResponseResultInner.md b/rest/api/v3/ip_access_management/docs/ListAccessActivity200ResponseResultInner.md new file mode 100644 index 00000000..8ca798d0 --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/ListAccessActivity200ResponseResultInner.md @@ -0,0 +1,16 @@ +# ListAccessActivity200ResponseResultInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Allowed** | **bool** | Indicates if the IP address was granted access to the account. | +**AuthMethod** | **string** | The authentication method used when attempting access. | +**FirstAt** | **int32** | A Unix timestamp indicating when the first access attempt was made. | +**Ip** | **string** | The IP addressed used during the access attempt. | +**LastAt** | **int32** | A Unix timestamp indicating when the most recent access attempt was made | +**Location** | **string** | The geographic location from which the access attempt originated. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_access_management/docs/ListAllowedIp.md b/rest/api/v3/ip_access_management/docs/ListAllowedIp.md new file mode 100644 index 00000000..00008876 --- /dev/null +++ b/rest/api/v3/ip_access_management/docs/ListAllowedIp.md @@ -0,0 +1,48 @@ +# ListAllowedIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListAllowedIp**](ListAllowedIp.md#ListAllowedIp) | **Get** /v3/access_settings/whitelist | Retrieve a list of currently allowed IPs + + + +## ListAllowedIp + +> IpAccessManagement2xx ListAllowedIp(ctx, optional) + +Retrieve a list of currently allowed IPs + +**This endpoint allows you to retrieve a list of IP addresses that are currently allowed to access your account.** Each IP address returned to you will have `created_at` and `updated_at` dates. Each IP will also be associated with an `id` that can be used to remove the address from your allow list. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListAllowedIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**IpAccessManagement2xx**](IpAccessManagement2xx.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_access_management/model_add_ip_to_allow_list_request.go b/rest/api/v3/ip_access_management/model_add_ip_to_allow_list_request.go new file mode 100644 index 00000000..023d725d --- /dev/null +++ b/rest/api/v3/ip_access_management/model_add_ip_to_allow_list_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIpToAllowListRequest struct for AddIpToAllowListRequest +type AddIpToAllowListRequest struct { + // An array containing the IP(s) you want to allow. + Ips []AddIpToAllowListRequestIpsInner `json:"ips"` +} diff --git a/rest/api/v3/ip_access_management/model_add_ip_to_allow_list_request_ips_inner.go b/rest/api/v3/ip_access_management/model_add_ip_to_allow_list_request_ips_inner.go new file mode 100644 index 00000000..34ad310c --- /dev/null +++ b/rest/api/v3/ip_access_management/model_add_ip_to_allow_list_request_ips_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIpToAllowListRequestIpsInner struct for AddIpToAllowListRequestIpsInner +type AddIpToAllowListRequestIpsInner struct { + // An IP address that you want to allow. + Ip string `json:"ip"` +} diff --git a/rest/api/v3/ip_access_management/model_delete_allowed_ips_request.go b/rest/api/v3/ip_access_management/model_delete_allowed_ips_request.go new file mode 100644 index 00000000..ceba5206 --- /dev/null +++ b/rest/api/v3/ip_access_management/model_delete_allowed_ips_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteAllowedIpsRequest struct for DeleteAllowedIpsRequest +type DeleteAllowedIpsRequest struct { + // An array of the IDs of the IP address that you want to remove from your allow list. + Ids *[]int32 `json:"ids,omitempty"` +} diff --git a/rest/api/v3/ip_access_management/model_error_response.go b/rest/api/v3/ip_access_management/model_error_response.go new file mode 100644 index 00000000..025b609b --- /dev/null +++ b/rest/api/v3/ip_access_management/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/ip_access_management/model_error_response_errors_inner.go b/rest/api/v3/ip_access_management/model_error_response_errors_inner.go new file mode 100644 index 00000000..02c85e55 --- /dev/null +++ b/rest/api/v3/ip_access_management/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/ip_access_management/model_ip_access_management2xx.go b/rest/api/v3/ip_access_management/model_ip_access_management2xx.go new file mode 100644 index 00000000..868be517 --- /dev/null +++ b/rest/api/v3/ip_access_management/model_ip_access_management2xx.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IpAccessManagement2xx struct for IpAccessManagement2xx +type IpAccessManagement2xx struct { + // An array listing one or more of your allowed IPs. + Result *[]IpAccessManagement2xxResultInner `json:"result,omitempty"` +} diff --git a/rest/api/v3/ip_access_management/model_ip_access_management2xx_result_inner.go b/rest/api/v3/ip_access_management/model_ip_access_management2xx_result_inner.go new file mode 100644 index 00000000..ea547bb2 --- /dev/null +++ b/rest/api/v3/ip_access_management/model_ip_access_management2xx_result_inner.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IpAccessManagement2xxResultInner struct for IpAccessManagement2xxResultInner +type IpAccessManagement2xxResultInner struct { + // The ID of the allowed IP. + Id *int32 `json:"id,omitempty"` + // The allowed IP. + Ip *string `json:"ip,omitempty"` + // A Unix timestamp indicating when the IP was added to the allow list. + CreatedAt *int32 `json:"created_at,omitempty"` + // A Unix timestamp indicating when the IPs allow status was most recently updated. + UpdatedAt *int32 `json:"updated_at,omitempty"` +} diff --git a/rest/api/v3/ip_access_management/model_list_access_activity_200_response.go b/rest/api/v3/ip_access_management/model_list_access_activity_200_response.go new file mode 100644 index 00000000..f39f3d16 --- /dev/null +++ b/rest/api/v3/ip_access_management/model_list_access_activity_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListAccessActivity200Response struct for ListAccessActivity200Response +type ListAccessActivity200Response struct { + // An array containing the IPs that recently attempted to access your account. + Result []ListAccessActivity200ResponseResultInner `json:"result"` +} diff --git a/rest/api/v3/ip_access_management/model_list_access_activity_200_response_result_inner.go b/rest/api/v3/ip_access_management/model_list_access_activity_200_response_result_inner.go new file mode 100644 index 00000000..b1a28ff3 --- /dev/null +++ b/rest/api/v3/ip_access_management/model_list_access_activity_200_response_result_inner.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Access Management API +* IP Twilio SendGrid IP Access Management API allows you to control which IP addresses can be used to access your account, either through the SendGrid application user interface or the API. There is no limit to the number of IP addresses that you can allow. It is possible to remove your own IP address from your list of allowed addresses, thus blocking your own access to your account. While we are able to restore your access, we do require thorough proof of your identify and ownership of your account. We take the security of your account very seriously and wish to prevent any 'bad actors' from maliciously gaining access to your account. Your current IP is clearly displayed to help prevent you from accidentally removing it from the allowed addresses. See [**IP Access Management**](https://docs.sendgrid.com/ui/account-and-settings/ip-access-management) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListAccessActivity200ResponseResultInner struct for ListAccessActivity200ResponseResultInner +type ListAccessActivity200ResponseResultInner struct { + // Indicates if the IP address was granted access to the account. + Allowed bool `json:"allowed"` + // The authentication method used when attempting access. + AuthMethod string `json:"auth_method"` + // A Unix timestamp indicating when the first access attempt was made. + FirstAt int32 `json:"first_at"` + // The IP addressed used during the access attempt. + Ip string `json:"ip"` + // A Unix timestamp indicating when the most recent access attempt was made + LastAt int32 `json:"last_at"` + // The geographic location from which the access attempt originated. + Location string `json:"location"` +} diff --git a/rest/api/v3/ip_address_management/README.md b/rest/api/v3/ip_address_management/README.md new file mode 100644 index 00000000..33791ae1 --- /dev/null +++ b/rest/api/v3/ip_address_management/README.md @@ -0,0 +1,118 @@ +# Go API client for + +The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:01.519876+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AddIp* | [**AddIp**](docs/AddIp.md#addip) | **Post** /v3/send_ips/ips | Add a Twilio SendGrid IP Address +*AddIpsToIpPool* | [**AddIpsToIpPool**](docs/AddIpsToIpPool.md#addipstoippool) | **Post** /v3/send_ips/pools/{Poolid}/ips:batchAdd | Add a Batch of IPs to an IP Pool +*AddSubUsersToIp* | [**AddSubUsersToIp**](docs/AddSubUsersToIp.md#addsubuserstoip) | **Post** /v3/send_ips/ips/{Ip}/subusers:batchAdd | Assign a Batch of Subusers to an IP +*CreateIpPool* | [**CreateIpPool**](docs/CreateIpPool.md#createippool) | **Post** /v3/send_ips/pools | Create an IP Pool with a Name and IP Assignments +*DeleteIpPool* | [**DeleteIpPool**](docs/DeleteIpPool.md#deleteippool) | **Delete** /v3/send_ips/pools/{Poolid} | Delete IP Pool +*DeleteIpsFromIpPool* | [**DeleteIpsFromIpPool**](docs/DeleteIpsFromIpPool.md#deleteipsfromippool) | **Post** /v3/send_ips/pools/{Poolid}/ips:batchDelete | Delete a Batch of IPs from an IP Pool +*DeleteSubUsersFromIp* | [**DeleteSubUsersFromIp**](docs/DeleteSubUsersFromIp.md#deletesubusersfromip) | **Post** /v3/send_ips/ips/{Ip}/subusers:batchDelete | Delete a Batch of Subusers from an IP +*GetIp* | [**GetIp**](docs/GetIp.md#getip) | **Get** /v3/send_ips/ips/{Ip} | Get Details for an IP Address +*GetIpPool* | [**GetIpPool**](docs/GetIpPool.md#getippool) | **Get** /v3/send_ips/pools/{Poolid} | Get Details for an IP Pool +*ListIp* | [**ListIp**](docs/ListIp.md#listip) | **Get** /v3/send_ips/ips | Get a List of all IP Addresses on your Account +*ListIpAssignedToIpPool* | [**ListIpAssignedToIpPool**](docs/ListIpAssignedToIpPool.md#listipassignedtoippool) | **Get** /v3/send_ips/pools/{Poolid}/ips | Get IPs Assigned to an IP Pool +*ListIpPool* | [**ListIpPool**](docs/ListIpPool.md#listippool) | **Get** /v3/send_ips/pools | GET all IP Pools that have Associated IPs +*ListSubUserAssignedToIp* | [**ListSubUserAssignedToIp**](docs/ListSubUserAssignedToIp.md#listsubuserassignedtoip) | **Get** /v3/send_ips/ips/{Ip}/subusers | Get a List of Subusers Assigned to an IP +*UpdateIp* | [**UpdateIp**](docs/UpdateIp.md#updateip) | **Patch** /v3/send_ips/ips/{Ip} | Update Details for an IP Address +*UpdateIpPool* | [**UpdateIpPool**](docs/UpdateIpPool.md#updateippool) | **Put** /v3/send_ips/pools/{Poolid} | Update an IP Pool Name + + +## Documentation For Models + + - [AddIp201Response](AddIp201Response.md) + - [AddIpRequest](AddIpRequest.md) + - [AddIpsToIpPool200Response](AddIpsToIpPool200Response.md) + - [AddIpsToIpPoolRequest](AddIpsToIpPoolRequest.md) + - [AddSubUsersToIp200Response](AddSubUsersToIp200Response.md) + - [AddSubUsersToIpRequest](AddSubUsersToIpRequest.md) + - [CreateIpPool201Response](CreateIpPool201Response.md) + - [CreateIpPoolRequest](CreateIpPoolRequest.md) + - [DeleteIpsFromIpPoolRequest](DeleteIpsFromIpPoolRequest.md) + - [DeleteSubUsersFromIpRequest](DeleteSubUsersFromIpRequest.md) + - [GetIp200Response](GetIp200Response.md) + - [GetIp200ResponsePoolsInner](GetIp200ResponsePoolsInner.md) + - [GetIpPool200Response](GetIpPool200Response.md) + - [GetIpPool200ResponseIpCountByRegionInner](GetIpPool200ResponseIpCountByRegionInner.md) + - [IpAddressManagementErrorResponse](IpAddressManagementErrorResponse.md) + - [IpAddressManagementErrorResponseErrorsInner](IpAddressManagementErrorResponseErrorsInner.md) + - [Items](Items.md) + - [ListIp200Response](ListIp200Response.md) + - [ListIp200ResponseMetadata](ListIp200ResponseMetadata.md) + - [ListIp200ResponseMetadataNextParams](ListIp200ResponseMetadataNextParams.md) + - [ListIp200ResponseResultInner](ListIp200ResponseResultInner.md) + - [ListIp200ResponseResultInnerPoolsInner](ListIp200ResponseResultInnerPoolsInner.md) + - [ListIpAssignedToIpPool200Response](ListIpAssignedToIpPool200Response.md) + - [ListIpAssignedToIpPool200ResponseMetadata](ListIpAssignedToIpPool200ResponseMetadata.md) + - [ListIpAssignedToIpPool200ResponseMetadataNextParams](ListIpAssignedToIpPool200ResponseMetadataNextParams.md) + - [ListIpAssignedToIpPool200ResponseResultInner](ListIpAssignedToIpPool200ResponseResultInner.md) + - [ListIpPool200Response](ListIpPool200Response.md) + - [ListIpPool200ResponseMetadata](ListIpPool200ResponseMetadata.md) + - [ListIpPool200ResponseMetadataNextParams](ListIpPool200ResponseMetadataNextParams.md) + - [ListIpPool200ResponseResultInner](ListIpPool200ResponseResultInner.md) + - [ListSubUserAssignedToIp200Response](ListSubUserAssignedToIp200Response.md) + - [ListSubUserAssignedToIp200ResponseMetadata](ListSubUserAssignedToIp200ResponseMetadata.md) + - [ListSubUserAssignedToIp200ResponseMetadataNextParams](ListSubUserAssignedToIp200ResponseMetadataNextParams.md) + - [Region](Region.md) + - [Region1](Region1.md) + - [Region2](Region2.md) + - [Region3](Region3.md) + - [Region4](Region4.md) + - [Region5](Region5.md) + - [Region6](Region6.md) + - [Region7](Region7.md) + - [UpdateIp200Response](UpdateIp200Response.md) + - [UpdateIpPool200Response](UpdateIpPool200Response.md) + - [UpdateIpPoolRequest](UpdateIpPoolRequest.md) + - [UpdateIpRequest](UpdateIpRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/ip_address_management/api_add_ip.go b/rest/api/v3/ip_address_management/api_add_ip.go new file mode 100644 index 00000000..d54f9095 --- /dev/null +++ b/rest/api/v3/ip_address_management/api_add_ip.go @@ -0,0 +1,89 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type AddIpParam struct { + // + AddIpRequest *AddIpRequest `json:"AddIpRequest,omitempty"` +} + +func (params *AddIpParam) SetAddIpRequest(AddIpRequest AddIpRequest) *AddIpParam { + params.AddIpRequest = &AddIpRequest + return params +} + +// This operation adds a Twilio SendGrid IP address to your account. You can also assign up to 100 Subusers to the IP address at creation. +func (c *ApiService) AddIp(params *AddIpParam) (interface{}, error) { + path := "/v3/send_ips/ips" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.AddIpRequest != nil { + b, err := json.Marshal(*params.AddIpRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &AddIp201Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ip_address_management/api_add_ips_to_ip_pool.go b/rest/api/v3/ip_address_management/api_add_ips_to_ip_pool.go new file mode 100644 index 00000000..fac88fba --- /dev/null +++ b/rest/api/v3/ip_address_management/api_add_ips_to_ip_pool.go @@ -0,0 +1,100 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type AddIpsToIpPoolParam struct { + // Specifies the unique ID for an IP Pool. + Poolid *string `json:"poolid"` + // + AddIpsToIpPoolRequest *AddIpsToIpPoolRequest `json:"AddIpsToIpPoolRequest,omitempty"` +} + +func (params *AddIpsToIpPoolParam) SetPoolid(Poolid string) *AddIpsToIpPoolParam { + params.Poolid = &Poolid + return params +} +func (params *AddIpsToIpPoolParam) SetAddIpsToIpPoolRequest(AddIpsToIpPoolRequest AddIpsToIpPoolRequest) *AddIpsToIpPoolParam { + params.AddIpsToIpPoolRequest = &AddIpsToIpPoolRequest + return params +} + +// This operation appends a batch of IPs to an IP Pool. This operation requires all IP assignments to succeed. If any IP assignments fail, this endpoint will return an error. +func (c *ApiService) AddIpsToIpPool(params *AddIpsToIpPoolParam) (interface{}, error) { + path := "/v3/send_ips/pools/{Poolid}/ips:batchAdd" + if params != nil && params.Poolid != nil { + path = strings.Replace(path, "{"+"Poolid"+"}", *params.Poolid, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.AddIpsToIpPoolRequest != nil { + b, err := json.Marshal(*params.AddIpsToIpPoolRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AddIpsToIpPool200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ip_address_management/api_add_sub_users_to_ip.go b/rest/api/v3/ip_address_management/api_add_sub_users_to_ip.go new file mode 100644 index 00000000..9d7ee407 --- /dev/null +++ b/rest/api/v3/ip_address_management/api_add_sub_users_to_ip.go @@ -0,0 +1,100 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type AddSubUsersToIpParam struct { + // The `ip` path parameter specifies an IP address to make the request against. + Ip *string `json:"ip"` + // + AddSubUsersToIpRequest *AddSubUsersToIpRequest `json:"AddSubUsersToIpRequest,omitempty"` +} + +func (params *AddSubUsersToIpParam) SetIp(Ip string) *AddSubUsersToIpParam { + params.Ip = &Ip + return params +} +func (params *AddSubUsersToIpParam) SetAddSubUsersToIpRequest(AddSubUsersToIpRequest AddSubUsersToIpRequest) *AddSubUsersToIpParam { + params.AddSubUsersToIpRequest = &AddSubUsersToIpRequest + return params +} + +// This operation appends a batch of Subusers to a specified IP address. This endpoint requires all Subuser assignments to succeed. If a Subuser assignment fails, this endpoint will return an error. +func (c *ApiService) AddSubUsersToIp(params *AddSubUsersToIpParam) (interface{}, error) { + path := "/v3/send_ips/ips/{Ip}/subusers:batchAdd" + if params != nil && params.Ip != nil { + path = strings.Replace(path, "{"+"Ip"+"}", *params.Ip, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.AddSubUsersToIpRequest != nil { + b, err := json.Marshal(*params.AddSubUsersToIpRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AddSubUsersToIp200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ip_address_management/api_create_ip_pool.go b/rest/api/v3/ip_address_management/api_create_ip_pool.go new file mode 100644 index 00000000..bffe9a8a --- /dev/null +++ b/rest/api/v3/ip_address_management/api_create_ip_pool.go @@ -0,0 +1,89 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateIpPoolParam struct { + // + CreateIpPoolRequest *CreateIpPoolRequest `json:"CreateIpPoolRequest,omitempty"` +} + +func (params *CreateIpPoolParam) SetCreateIpPoolRequest(CreateIpPoolRequest CreateIpPoolRequest) *CreateIpPoolParam { + params.CreateIpPoolRequest = &CreateIpPoolRequest + return params +} + +// This operation will create a named IP Pool and associate specified IP addresses with the newly created Pool. This operation requires all IP assignments to succeed. If any IP assignments fail, this endpoint will return an error and the Pool will not be created. Each IP Pool may have a maximum of 100 assigned IP addresses. +func (c *ApiService) CreateIpPool(params *CreateIpPoolParam) (interface{}, error) { + path := "/v3/send_ips/pools" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateIpPoolRequest != nil { + b, err := json.Marshal(*params.CreateIpPoolRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &CreateIpPool201Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ip_address_management/api_delete_ip_pool.go b/rest/api/v3/ip_address_management/api_delete_ip_pool.go new file mode 100644 index 00000000..9f6ac8c1 --- /dev/null +++ b/rest/api/v3/ip_address_management/api_delete_ip_pool.go @@ -0,0 +1,77 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteIpPoolParam struct { + // Specifies the unique ID for an IP Pool. + Poolid *string `json:"poolid"` +} + +func (params *DeleteIpPoolParam) SetPoolid(Poolid string) *DeleteIpPoolParam { + params.Poolid = &Poolid + return params +} + +// This operation deletes an IP Pool and unassigns all IP addresses associated with the Pool. IP addresses associated with the deleted Pool will remain in your account. +func (c *ApiService) DeleteIpPool(params *DeleteIpPoolParam) (interface{}, error) { + path := "/v3/send_ips/pools/{Poolid}" + if params != nil && params.Poolid != nil { + path = strings.Replace(path, "{"+"Poolid"+"}", *params.Poolid, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ip_address_management/api_delete_ips_from_ip_pool.go b/rest/api/v3/ip_address_management/api_delete_ips_from_ip_pool.go new file mode 100644 index 00000000..95bb7bc8 --- /dev/null +++ b/rest/api/v3/ip_address_management/api_delete_ips_from_ip_pool.go @@ -0,0 +1,92 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteIpsFromIpPoolParam struct { + // Specifies the unique ID for an IP Pool. + Poolid *string `json:"poolid"` + // + DeleteIpsFromIpPoolRequest *DeleteIpsFromIpPoolRequest `json:"DeleteIpsFromIpPoolRequest,omitempty"` +} + +func (params *DeleteIpsFromIpPoolParam) SetPoolid(Poolid string) *DeleteIpsFromIpPoolParam { + params.Poolid = &Poolid + return params +} +func (params *DeleteIpsFromIpPoolParam) SetDeleteIpsFromIpPoolRequest(DeleteIpsFromIpPoolRequest DeleteIpsFromIpPoolRequest) *DeleteIpsFromIpPoolParam { + params.DeleteIpsFromIpPoolRequest = &DeleteIpsFromIpPoolRequest + return params +} + +// This operation removes a batch of IPs from an IP Pool. All IPs associated with the Pool will be unassigned from the deleted Pool. However, this operation does not remove the IPs from your account. +func (c *ApiService) DeleteIpsFromIpPool(params *DeleteIpsFromIpPoolParam) (interface{}, error) { + path := "/v3/send_ips/pools/{Poolid}/ips:batchDelete" + if params != nil && params.Poolid != nil { + path = strings.Replace(path, "{"+"Poolid"+"}", *params.Poolid, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.DeleteIpsFromIpPoolRequest != nil { + b, err := json.Marshal(*params.DeleteIpsFromIpPoolRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ip_address_management/api_delete_sub_users_from_ip.go b/rest/api/v3/ip_address_management/api_delete_sub_users_from_ip.go new file mode 100644 index 00000000..aef499b7 --- /dev/null +++ b/rest/api/v3/ip_address_management/api_delete_sub_users_from_ip.go @@ -0,0 +1,92 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteSubUsersFromIpParam struct { + // The `ip` path parameter specifies an IP address to make the request against. + Ip *string `json:"ip"` + // + DeleteSubUsersFromIpRequest *DeleteSubUsersFromIpRequest `json:"DeleteSubUsersFromIpRequest,omitempty"` +} + +func (params *DeleteSubUsersFromIpParam) SetIp(Ip string) *DeleteSubUsersFromIpParam { + params.Ip = &Ip + return params +} +func (params *DeleteSubUsersFromIpParam) SetDeleteSubUsersFromIpRequest(DeleteSubUsersFromIpRequest DeleteSubUsersFromIpRequest) *DeleteSubUsersFromIpParam { + params.DeleteSubUsersFromIpRequest = &DeleteSubUsersFromIpRequest + return params +} + +// This operation removes a batch of Subusers from a specified IP address. +func (c *ApiService) DeleteSubUsersFromIp(params *DeleteSubUsersFromIpParam) (interface{}, error) { + path := "/v3/send_ips/ips/{Ip}/subusers:batchDelete" + if params != nil && params.Ip != nil { + path = strings.Replace(path, "{"+"Ip"+"}", *params.Ip, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.DeleteSubUsersFromIpRequest != nil { + b, err := json.Marshal(*params.DeleteSubUsersFromIpRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ip_address_management/api_get_ip.go b/rest/api/v3/ip_address_management/api_get_ip.go new file mode 100644 index 00000000..5a87786b --- /dev/null +++ b/rest/api/v3/ip_address_management/api_get_ip.go @@ -0,0 +1,85 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type GetIpParam struct { + // Boolean indicating whether or not to return the IP Pool's region information in the response. + IncludeRegion *bool `json:"include_region,omitempty"` +} + +func (params *GetIpParam) SetIncludeRegion(IncludeRegion bool) *GetIpParam { + params.IncludeRegion = &IncludeRegion + return params +} + +// This operation returns details for a specified IP address. Details include whether the IP is assigned to a parent account, set to warm up automatically, which Pools the IP is associated with, when the IP was added and modified, whether the IP is leased, and whether the IP is enabled. Note that this operation will not return Subuser information associated with the IP. To retrieve Subuser information, use the \"Get a List of Subusers Assigned to an IP\" endpoint. +func (c *ApiService) GetIp(params *GetIpParam) (interface{}, error) { + path := "/v3/send_ips/ips/{Ip}" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.IncludeRegion != nil { + data.Set("include_region", fmt.Sprint(*params.IncludeRegion)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetIp200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ip_address_management/api_get_ip_pool.go b/rest/api/v3/ip_address_management/api_get_ip_pool.go new file mode 100644 index 00000000..a3272515 --- /dev/null +++ b/rest/api/v3/ip_address_management/api_get_ip_pool.go @@ -0,0 +1,85 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type GetIpPoolParam struct { + // Boolean indicating whether or not to return the IP Pool's region information in the response. + IncludeRegion *bool `json:"include_region,omitempty"` +} + +func (params *GetIpPoolParam) SetIncludeRegion(IncludeRegion bool) *GetIpPoolParam { + params.IncludeRegion = &IncludeRegion + return params +} + +// This operation will return the details for a specified IP Pool, including the Pool's name, ID, a sample list of the IPs associated with the Pool, and the total number of IPs belonging to the Pool. A maximum of 10 IPs will be returned per IP Pool by default. To retrieve additional IP addresses associated with a Pool, use the \"Get IPs Assigned to an IP Pool\" operation. +func (c *ApiService) GetIpPool(params *GetIpPoolParam) (interface{}, error) { + path := "/v3/send_ips/pools/{Poolid}" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.IncludeRegion != nil { + data.Set("include_region", fmt.Sprint(*params.IncludeRegion)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetIpPool200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ip_address_management/api_list_ip.go b/rest/api/v3/ip_address_management/api_list_ip.go new file mode 100644 index 00000000..252b5f80 --- /dev/null +++ b/rest/api/v3/ip_address_management/api_list_ip.go @@ -0,0 +1,184 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListIpParam struct { + // Specifies an IP address. The `ip` query parameter can be used to filter results by IP address. + Ip *string `json:"ip,omitempty"` + // Specifies the number of results to be returned by the API. This parameter can be used in combination with the `before_key` or `after_key` parameters to iterate through paginated results. + Limit *int32 `json:"limit,omitempty"` + // Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. + AfterKey *int32 `json:"after_key,omitempty"` + // Specifies which items to be returned by the API. When the `before_key` is specified, the API will return items beginning from the first item before the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. + BeforeKey *string `json:"before_key,omitempty"` + // Indicates whether an IP address is leased from Twilio SendGrid. If `false`, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account. + IsLeased *bool `json:"is_leased,omitempty"` + // Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. + IsEnabled *bool `json:"is_enabled,omitempty"` + // A parent must be assigned to an IP address before the parent can send mail from the IP and before the address can be assigned to an IP pool. Set this parameter value to true to allow the parent to send mail from the IP and make the IP eligible for IP pool assignment using the IP pool endpoints. + IsParentAssigned *bool `json:"is_parent_assigned,omitempty"` + // Specifies the unique ID for an IP Pool. When included, only IP addresses belonging to the specified Pool will be returned. + Pool *string `json:"pool,omitempty"` + // The `start_added_at` and `end_added_at` parameters are used to set a time window. IP addresses that were added to your account in the specified time window will be returned. The `start_added_at` parameter sets the beginning of the time window. + StartAddedAt *int32 `json:"start_added_at,omitempty"` + // The `start_added_at` and `end_added_at` parameters are used to set a time window. IP addresses that were added to your account in the specified time window will be returned. The `end_added_at` parameter sets the end of the time window. + EndAddedAt *int32 `json:"end_added_at,omitempty"` + // Allowed values are `all`, `eu`, and `us`. If you provide a specific region, results will include all pools that have at least one IP in the filtered region. If `all`, pools with at least one IP (regardless of region) will be returned. If the `region` filter is not provided, the query returns all pools, including empty ones. + Region *Region7 `json:"region,omitempty"` + // Boolean indicating whether or not to return the IP Pool's region information in the response. + IncludeRegion *bool `json:"include_region,omitempty"` +} + +func (params *ListIpParam) SetIp(Ip string) *ListIpParam { + params.Ip = &Ip + return params +} +func (params *ListIpParam) SetLimit(Limit int32) *ListIpParam { + params.Limit = &Limit + return params +} +func (params *ListIpParam) SetAfterKey(AfterKey int32) *ListIpParam { + params.AfterKey = &AfterKey + return params +} +func (params *ListIpParam) SetBeforeKey(BeforeKey string) *ListIpParam { + params.BeforeKey = &BeforeKey + return params +} +func (params *ListIpParam) SetIsLeased(IsLeased bool) *ListIpParam { + params.IsLeased = &IsLeased + return params +} +func (params *ListIpParam) SetIsEnabled(IsEnabled bool) *ListIpParam { + params.IsEnabled = &IsEnabled + return params +} +func (params *ListIpParam) SetIsParentAssigned(IsParentAssigned bool) *ListIpParam { + params.IsParentAssigned = &IsParentAssigned + return params +} +func (params *ListIpParam) SetPool(Pool string) *ListIpParam { + params.Pool = &Pool + return params +} +func (params *ListIpParam) SetStartAddedAt(StartAddedAt int32) *ListIpParam { + params.StartAddedAt = &StartAddedAt + return params +} +func (params *ListIpParam) SetEndAddedAt(EndAddedAt int32) *ListIpParam { + params.EndAddedAt = &EndAddedAt + return params +} +func (params *ListIpParam) SetRegion(Region Region7) *ListIpParam { + params.Region = &Region + return params +} +func (params *ListIpParam) SetIncludeRegion(IncludeRegion bool) *ListIpParam { + params.IncludeRegion = &IncludeRegion + return params +} + +// This operation returns a list of all IP addresses associated with your account. A sample of IP details is returned with each IP, including which Pools the IP is associated with, whether the IP is set to warm up automatically, and when the IP was last updated. ### Limitations The `is_parent_assigned` parameter and `pool` parameter cannot be used at the same time. By definition, an IP cannot be assigned to a Pool if it is not first enabled. You can use either the `before_key` or `after_key` in combination with the `limit` parameter to iterate through paginated results but not both. +func (c *ApiService) ListIp(params *ListIpParam) (interface{}, error) { + path := "/v3/send_ips/ips" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Ip != nil { + data.Set("ip", *params.Ip) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.AfterKey != nil { + data.Set("after_key", fmt.Sprint(*params.AfterKey)) + } + if params != nil && params.BeforeKey != nil { + data.Set("before_key", *params.BeforeKey) + } + if params != nil && params.IsLeased != nil { + data.Set("is_leased", fmt.Sprint(*params.IsLeased)) + } + if params != nil && params.IsEnabled != nil { + data.Set("is_enabled", fmt.Sprint(*params.IsEnabled)) + } + if params != nil && params.IsParentAssigned != nil { + data.Set("is_parent_assigned", fmt.Sprint(*params.IsParentAssigned)) + } + if params != nil && params.Pool != nil { + data.Set("pool", *params.Pool) + } + if params != nil && params.StartAddedAt != nil { + data.Set("start_added_at", fmt.Sprint(*params.StartAddedAt)) + } + if params != nil && params.EndAddedAt != nil { + data.Set("end_added_at", fmt.Sprint(*params.EndAddedAt)) + } + if params != nil && params.Region != nil { + data.Set("region", fmt.Sprint(*params.Region)) + } + if params != nil && params.IncludeRegion != nil { + data.Set("include_region", fmt.Sprint(*params.IncludeRegion)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListIp200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ip_address_management/api_list_ip_assigned_to_ip_pool.go b/rest/api/v3/ip_address_management/api_list_ip_assigned_to_ip_pool.go new file mode 100644 index 00000000..243f5a8f --- /dev/null +++ b/rest/api/v3/ip_address_management/api_list_ip_assigned_to_ip_pool.go @@ -0,0 +1,103 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListIpAssignedToIpPoolParam struct { + // Specifies the number of results to be returned by the API. This parameter can be used in combination with the `before_key` or `after_key` parameters to iterate through paginated results. + Limit *int32 `json:"limit,omitempty"` + // Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. + AfterKey *int32 `json:"after_key,omitempty"` + // Boolean indicating whether or not to return the IP Pool's region information in the response. + IncludeRegion *bool `json:"include_region,omitempty"` +} + +func (params *ListIpAssignedToIpPoolParam) SetLimit(Limit int32) *ListIpAssignedToIpPoolParam { + params.Limit = &Limit + return params +} +func (params *ListIpAssignedToIpPoolParam) SetAfterKey(AfterKey int32) *ListIpAssignedToIpPoolParam { + params.AfterKey = &AfterKey + return params +} +func (params *ListIpAssignedToIpPoolParam) SetIncludeRegion(IncludeRegion bool) *ListIpAssignedToIpPoolParam { + params.IncludeRegion = &IncludeRegion + return params +} + +// This operation returns the IP addresses that are assigned to the specified IP pool. +func (c *ApiService) ListIpAssignedToIpPool(params *ListIpAssignedToIpPoolParam) (interface{}, error) { + path := "/v3/send_ips/pools/{Poolid}/ips" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.AfterKey != nil { + data.Set("after_key", fmt.Sprint(*params.AfterKey)) + } + if params != nil && params.IncludeRegion != nil { + data.Set("include_region", fmt.Sprint(*params.IncludeRegion)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListIpAssignedToIpPool200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ip_address_management/api_list_ip_pool.go b/rest/api/v3/ip_address_management/api_list_ip_pool.go new file mode 100644 index 00000000..25f87117 --- /dev/null +++ b/rest/api/v3/ip_address_management/api_list_ip_pool.go @@ -0,0 +1,121 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListIpPoolParam struct { + // Specifies the number of results to be returned by the API. This parameter can be used in combination with the `before_key` or `after_key` parameters to iterate through paginated results. + Limit *int32 `json:"limit,omitempty"` + // Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. + AfterKey *int32 `json:"after_key,omitempty"` + // Specifies an IP address. The `ip` query parameter can be used to filter results by IP address. + Ip *string `json:"ip,omitempty"` + // Allowed values are `all`, `eu`, and `us`. If you provide a specific region, results will include all pools that have at least one IP in the filtered region. If `all`, pools with at least one IP (regardless of region) will be returned. If the `region` filter is not provided, the query returns all pools, including empty ones. + Region *Region7 `json:"region,omitempty"` + // Boolean indicating whether or not to return the IP Pool's region information in the response. + IncludeRegion *bool `json:"include_region,omitempty"` +} + +func (params *ListIpPoolParam) SetLimit(Limit int32) *ListIpPoolParam { + params.Limit = &Limit + return params +} +func (params *ListIpPoolParam) SetAfterKey(AfterKey int32) *ListIpPoolParam { + params.AfterKey = &AfterKey + return params +} +func (params *ListIpPoolParam) SetIp(Ip string) *ListIpPoolParam { + params.Ip = &Ip + return params +} +func (params *ListIpPoolParam) SetRegion(Region Region7) *ListIpPoolParam { + params.Region = &Region + return params +} +func (params *ListIpPoolParam) SetIncludeRegion(IncludeRegion bool) *ListIpPoolParam { + params.IncludeRegion = &IncludeRegion + return params +} + +// This operation returns a list of your IP Pools and a sample of each Pools' associated IP addresses. A maximum of 10 IPs will be returned per IP Pool by default. To retrieve additional IP addresses associated with a Pool, use the \"Get IPs Assigned to an IP Pool\" operation. Each user may have a maximum of 100 IP Pools. +func (c *ApiService) ListIpPool(params *ListIpPoolParam) (interface{}, error) { + path := "/v3/send_ips/pools" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.AfterKey != nil { + data.Set("after_key", fmt.Sprint(*params.AfterKey)) + } + if params != nil && params.Ip != nil { + data.Set("ip", *params.Ip) + } + if params != nil && params.Region != nil { + data.Set("region", fmt.Sprint(*params.Region)) + } + if params != nil && params.IncludeRegion != nil { + data.Set("include_region", fmt.Sprint(*params.IncludeRegion)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListIpPool200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ip_address_management/api_list_sub_user_assigned_to_ip.go b/rest/api/v3/ip_address_management/api_list_sub_user_assigned_to_ip.go new file mode 100644 index 00000000..b185c82c --- /dev/null +++ b/rest/api/v3/ip_address_management/api_list_sub_user_assigned_to_ip.go @@ -0,0 +1,94 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListSubUserAssignedToIpParam struct { + // Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. + AfterKey *int32 `json:"after_key,omitempty"` + // Specifies the number of results to be returned by the API. This parameter can be used in combination with the `after_key` parameters to iterate through paginated results. The maximum limit is 100. + Limit *int32 `json:"limit,omitempty"` +} + +func (params *ListSubUserAssignedToIpParam) SetAfterKey(AfterKey int32) *ListSubUserAssignedToIpParam { + params.AfterKey = &AfterKey + return params +} +func (params *ListSubUserAssignedToIpParam) SetLimit(Limit int32) *ListSubUserAssignedToIpParam { + params.Limit = &Limit + return params +} + +// This operation returns a list of Subuser IDs that have been assigned the specified IP address. To retrieve more information about the returned Subusers, use the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/list-all-subusers). You can use the `after_key` and `limit` query parameters to iterate through paginated results. The maximum limit is 100, meaning you may retrieve up to 100 Subusers per request. If the `after_key` in the API response is not null, there are more Subusers assigned to the IP address than those returned in the request. You can repeat the request with the non-null `after_key` value and the same limit to retrieve the next group of Subusers. +func (c *ApiService) ListSubUserAssignedToIp(params *ListSubUserAssignedToIpParam) (interface{}, error) { + path := "/v3/send_ips/ips/{Ip}/subusers" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.AfterKey != nil { + data.Set("after_key", fmt.Sprint(*params.AfterKey)) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListSubUserAssignedToIp200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ip_address_management/api_service.go b/rest/api/v3/ip_address_management/api_service.go new file mode 100644 index 00000000..b08b7968 --- /dev/null +++ b/rest/api/v3/ip_address_management/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/ip_address_management/api_update_ip.go b/rest/api/v3/ip_address_management/api_update_ip.go new file mode 100644 index 00000000..cc6d1c65 --- /dev/null +++ b/rest/api/v3/ip_address_management/api_update_ip.go @@ -0,0 +1,100 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateIpParam struct { + // The `ip` path parameter specifies an IP address to make the request against. + Ip *string `json:"ip"` + // + UpdateIpRequest *UpdateIpRequest `json:"UpdateIpRequest,omitempty"` +} + +func (params *UpdateIpParam) SetIp(Ip string) *UpdateIpParam { + params.Ip = &Ip + return params +} +func (params *UpdateIpParam) SetUpdateIpRequest(UpdateIpRequest UpdateIpRequest) *UpdateIpParam { + params.UpdateIpRequest = &UpdateIpRequest + return params +} + +// This operation updates an IP address's settings, including whether the IP is set to warm up automatically, if the IP is assigned by a parent account, and whether the IP is enabled or disabled. The request body must include at least one of the `is_auto_warmup`, `is_parent_assigned`, or `is_enabled` fields. +func (c *ApiService) UpdateIp(params *UpdateIpParam) (interface{}, error) { + path := "/v3/send_ips/ips/{Ip}" + if params != nil && params.Ip != nil { + path = strings.Replace(path, "{"+"Ip"+"}", *params.Ip, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateIpRequest != nil { + b, err := json.Marshal(*params.UpdateIpRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &UpdateIp200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ip_address_management/api_update_ip_pool.go b/rest/api/v3/ip_address_management/api_update_ip_pool.go new file mode 100644 index 00000000..37f9a59d --- /dev/null +++ b/rest/api/v3/ip_address_management/api_update_ip_pool.go @@ -0,0 +1,100 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateIpPoolParam struct { + // Specifies the unique ID for an IP Pool. + Poolid *string `json:"poolid"` + // + UpdateIpPoolRequest *UpdateIpPoolRequest `json:"UpdateIpPoolRequest,omitempty"` +} + +func (params *UpdateIpPoolParam) SetPoolid(Poolid string) *UpdateIpPoolParam { + params.Poolid = &Poolid + return params +} +func (params *UpdateIpPoolParam) SetUpdateIpPoolRequest(UpdateIpPoolRequest UpdateIpPoolRequest) *UpdateIpPoolParam { + params.UpdateIpPoolRequest = &UpdateIpPoolRequest + return params +} + +// This operation will rename an IP Pool. An IP Pool name cannot start with a dot/period (.) or space. +func (c *ApiService) UpdateIpPool(params *UpdateIpPoolParam) (interface{}, error) { + path := "/v3/send_ips/pools/{Poolid}" + if params != nil && params.Poolid != nil { + path = strings.Replace(path, "{"+"Poolid"+"}", *params.Poolid, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateIpPoolRequest != nil { + b, err := json.Marshal(*params.UpdateIpPoolRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &UpdateIpPool200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &IpAddressManagementErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ip_address_management/docs/AddIp.md b/rest/api/v3/ip_address_management/docs/AddIp.md new file mode 100644 index 00000000..9a9abe96 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/AddIp.md @@ -0,0 +1,48 @@ +# AddIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddIp**](AddIp.md#AddIp) | **Post** /v3/send_ips/ips | Add a Twilio SendGrid IP Address + + + +## AddIp + +> AddIp201Response AddIp(ctx, optional) + +Add a Twilio SendGrid IP Address + +This operation adds a Twilio SendGrid IP address to your account. You can also assign up to 100 Subusers to the IP address at creation. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a AddIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**AddIpRequest** | [**AddIpRequest**](AddIpRequest.md) | + +### Return type + +[**AddIp201Response**](AddIp201Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/AddIp201Response.md b/rest/api/v3/ip_address_management/docs/AddIp201Response.md new file mode 100644 index 00000000..dd163214 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/AddIp201Response.md @@ -0,0 +1,15 @@ +# AddIp201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | The IP address that was added to your account. |[optional] +**IsAutoWarmup** | **bool** | Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). This parameter is returned only if the IP address is set to automatically warm up. |[optional] +**IsParentAssigned** | **bool** | Indicates if a parent on the account is able to send email from the IP address. |[optional] +**Subusers** | **[]string** | An array of Subuser IDs the IP address was assigned to. |[optional] +**Region** | [**Region2**](Region2.md) | The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/AddIpRequest.md b/rest/api/v3/ip_address_management/docs/AddIpRequest.md new file mode 100644 index 00000000..55d0e7b0 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/AddIpRequest.md @@ -0,0 +1,15 @@ +# AddIpRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsAutoWarmup** | **bool** | Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). | +**IsParentAssigned** | **bool** | Indicates if a parent on the account is able to send email from the IP address. | +**Subusers** | **[]string** | An array of Subuser IDs the IP address will be assigned to. |[optional] +**Region** | [**Region3**](Region3.md) | The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. |[optional] +**IncludeRegion** | **bool** | Boolean indicating whether or not to return the IP address's region information in the response. |[optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/AddIpsToIpPool.md b/rest/api/v3/ip_address_management/docs/AddIpsToIpPool.md new file mode 100644 index 00000000..a04565b8 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/AddIpsToIpPool.md @@ -0,0 +1,52 @@ +# AddIpsToIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddIpsToIpPool**](AddIpsToIpPool.md#AddIpsToIpPool) | **Post** /v3/send_ips/pools/{Poolid}/ips:batchAdd | Add a Batch of IPs to an IP Pool + + + +## AddIpsToIpPool + +> AddIpsToIpPool200Response AddIpsToIpPool(ctx, Poolidoptional) + +Add a Batch of IPs to an IP Pool + +This operation appends a batch of IPs to an IP Pool. This operation requires all IP assignments to succeed. If any IP assignments fail, this endpoint will return an error. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Poolid** | **string** | Specifies the unique ID for an IP Pool. + +### Other Parameters + +Other parameters are passed through a pointer to a AddIpsToIpPoolParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**AddIpsToIpPoolRequest** | [**AddIpsToIpPoolRequest**](AddIpsToIpPoolRequest.md) | + +### Return type + +[**AddIpsToIpPool200Response**](AddIpsToIpPool200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/AddIpsToIpPool200Response.md b/rest/api/v3/ip_address_management/docs/AddIpsToIpPool200Response.md new file mode 100644 index 00000000..b7c91aa0 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/AddIpsToIpPool200Response.md @@ -0,0 +1,13 @@ +# AddIpsToIpPool200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the IP Pool. |[optional] +**Id** | **string** | The unique ID of the IP Pool. |[optional] +**Ips** | **[]string** | An array of IP addresses assigned to the IP Pool. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/AddIpsToIpPoolRequest.md b/rest/api/v3/ip_address_management/docs/AddIpsToIpPoolRequest.md new file mode 100644 index 00000000..179f44fa --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/AddIpsToIpPoolRequest.md @@ -0,0 +1,11 @@ +# AddIpsToIpPoolRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ips** | **[]string** | An array of IP addresses to assign to the specified IP Pool. All assignments must succeed. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/AddSubUsersToIp.md b/rest/api/v3/ip_address_management/docs/AddSubUsersToIp.md new file mode 100644 index 00000000..bfbe9f17 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/AddSubUsersToIp.md @@ -0,0 +1,52 @@ +# AddSubUsersToIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddSubUsersToIp**](AddSubUsersToIp.md#AddSubUsersToIp) | **Post** /v3/send_ips/ips/{Ip}/subusers:batchAdd | Assign a Batch of Subusers to an IP + + + +## AddSubUsersToIp + +> AddSubUsersToIp200Response AddSubUsersToIp(ctx, Ipoptional) + +Assign a Batch of Subusers to an IP + +This operation appends a batch of Subusers to a specified IP address. This endpoint requires all Subuser assignments to succeed. If a Subuser assignment fails, this endpoint will return an error. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Ip** | **string** | The `ip` path parameter specifies an IP address to make the request against. + +### Other Parameters + +Other parameters are passed through a pointer to a AddSubUsersToIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**AddSubUsersToIpRequest** | [**AddSubUsersToIpRequest**](AddSubUsersToIpRequest.md) | + +### Return type + +[**AddSubUsersToIp200Response**](AddSubUsersToIp200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/AddSubUsersToIp200Response.md b/rest/api/v3/ip_address_management/docs/AddSubUsersToIp200Response.md new file mode 100644 index 00000000..735f87af --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/AddSubUsersToIp200Response.md @@ -0,0 +1,12 @@ +# AddSubUsersToIp200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | The IP address the Subusers were assigned to. |[optional] +**Subusers** | **[]string** | An array of Subuser IDs that were assigned to the specified IP address. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/AddSubUsersToIpRequest.md b/rest/api/v3/ip_address_management/docs/AddSubUsersToIpRequest.md new file mode 100644 index 00000000..cdfb8a0d --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/AddSubUsersToIpRequest.md @@ -0,0 +1,11 @@ +# AddSubUsersToIpRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Subusers** | **[]string** | An array of Subuser IDs to be assigned to the specified IP address. All Subuser assignments must succeed. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/CreateIpPool.md b/rest/api/v3/ip_address_management/docs/CreateIpPool.md new file mode 100644 index 00000000..a047e28f --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/CreateIpPool.md @@ -0,0 +1,48 @@ +# CreateIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateIpPool**](CreateIpPool.md#CreateIpPool) | **Post** /v3/send_ips/pools | Create an IP Pool with a Name and IP Assignments + + + +## CreateIpPool + +> CreateIpPool201Response CreateIpPool(ctx, optional) + +Create an IP Pool with a Name and IP Assignments + +This operation will create a named IP Pool and associate specified IP addresses with the newly created Pool. This operation requires all IP assignments to succeed. If any IP assignments fail, this endpoint will return an error and the Pool will not be created. Each IP Pool may have a maximum of 100 assigned IP addresses. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateIpPoolParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**CreateIpPoolRequest** | [**CreateIpPoolRequest**](CreateIpPoolRequest.md) | + +### Return type + +[**CreateIpPool201Response**](CreateIpPool201Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/CreateIpPool201Response.md b/rest/api/v3/ip_address_management/docs/CreateIpPool201Response.md new file mode 100644 index 00000000..0e1723bd --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/CreateIpPool201Response.md @@ -0,0 +1,13 @@ +# CreateIpPool201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name assigned to the IP Pool. |[optional] +**Id** | **string** | The unique ID of the IP Pool. |[optional] +**Ips** | **[]string** | An array of IP addresses assigned to the IP Pool. All assignments must succeed. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/CreateIpPoolRequest.md b/rest/api/v3/ip_address_management/docs/CreateIpPoolRequest.md new file mode 100644 index 00000000..77aa2295 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/CreateIpPoolRequest.md @@ -0,0 +1,12 @@ +# CreateIpPoolRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name to assign to the IP Pool. An IP Pool name cannot begin with a space or period. | +**Ips** | **[]string** | An array of IP addresses to assign to the IP Pool. All assignments must succeed. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/DeleteIpPool.md b/rest/api/v3/ip_address_management/docs/DeleteIpPool.md new file mode 100644 index 00000000..ddfe136d --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/DeleteIpPool.md @@ -0,0 +1,51 @@ +# DeleteIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteIpPool**](DeleteIpPool.md#DeleteIpPool) | **Delete** /v3/send_ips/pools/{Poolid} | Delete IP Pool + + + +## DeleteIpPool + +> DeleteIpPool(ctx, Poolid) + +Delete IP Pool + +This operation deletes an IP Pool and unassigns all IP addresses associated with the Pool. IP addresses associated with the deleted Pool will remain in your account. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Poolid** | **string** | Specifies the unique ID for an IP Pool. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteIpPoolParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/DeleteIpsFromIpPool.md b/rest/api/v3/ip_address_management/docs/DeleteIpsFromIpPool.md new file mode 100644 index 00000000..0d7f751b --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/DeleteIpsFromIpPool.md @@ -0,0 +1,52 @@ +# DeleteIpsFromIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteIpsFromIpPool**](DeleteIpsFromIpPool.md#DeleteIpsFromIpPool) | **Post** /v3/send_ips/pools/{Poolid}/ips:batchDelete | Delete a Batch of IPs from an IP Pool + + + +## DeleteIpsFromIpPool + +> DeleteIpsFromIpPool(ctx, Poolidoptional) + +Delete a Batch of IPs from an IP Pool + +This operation removes a batch of IPs from an IP Pool. All IPs associated with the Pool will be unassigned from the deleted Pool. However, this operation does not remove the IPs from your account. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Poolid** | **string** | Specifies the unique ID for an IP Pool. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteIpsFromIpPoolParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**DeleteIpsFromIpPoolRequest** | [**DeleteIpsFromIpPoolRequest**](DeleteIpsFromIpPoolRequest.md) | + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/DeleteIpsFromIpPoolRequest.md b/rest/api/v3/ip_address_management/docs/DeleteIpsFromIpPoolRequest.md new file mode 100644 index 00000000..61bb0a31 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/DeleteIpsFromIpPoolRequest.md @@ -0,0 +1,11 @@ +# DeleteIpsFromIpPoolRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ips** | **[]string** | An array of IP addresses to remove from the specified IP Pool. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/DeleteSubUsersFromIp.md b/rest/api/v3/ip_address_management/docs/DeleteSubUsersFromIp.md new file mode 100644 index 00000000..811d1638 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/DeleteSubUsersFromIp.md @@ -0,0 +1,52 @@ +# DeleteSubUsersFromIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSubUsersFromIp**](DeleteSubUsersFromIp.md#DeleteSubUsersFromIp) | **Post** /v3/send_ips/ips/{Ip}/subusers:batchDelete | Delete a Batch of Subusers from an IP + + + +## DeleteSubUsersFromIp + +> DeleteSubUsersFromIp(ctx, Ipoptional) + +Delete a Batch of Subusers from an IP + +This operation removes a batch of Subusers from a specified IP address. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Ip** | **string** | The `ip` path parameter specifies an IP address to make the request against. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSubUsersFromIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**DeleteSubUsersFromIpRequest** | [**DeleteSubUsersFromIpRequest**](DeleteSubUsersFromIpRequest.md) | + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/DeleteSubUsersFromIpRequest.md b/rest/api/v3/ip_address_management/docs/DeleteSubUsersFromIpRequest.md new file mode 100644 index 00000000..f8017d53 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/DeleteSubUsersFromIpRequest.md @@ -0,0 +1,11 @@ +# DeleteSubUsersFromIpRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Subusers** | **[]string** | An array of Subuser IDs to be removed from the specified IP address. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/GetIp.md b/rest/api/v3/ip_address_management/docs/GetIp.md new file mode 100644 index 00000000..e911a0d5 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/GetIp.md @@ -0,0 +1,48 @@ +# GetIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetIp**](GetIp.md#GetIp) | **Get** /v3/send_ips/ips/{Ip} | Get Details for an IP Address + + + +## GetIp + +> GetIp200Response GetIp(ctx, optional) + +Get Details for an IP Address + +This operation returns details for a specified IP address. Details include whether the IP is assigned to a parent account, set to warm up automatically, which Pools the IP is associated with, when the IP was added and modified, whether the IP is leased, and whether the IP is enabled. Note that this operation will not return Subuser information associated with the IP. To retrieve Subuser information, use the \"Get a List of Subusers Assigned to an IP\" endpoint. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a GetIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**IncludeRegion** | **bool** | Boolean indicating whether or not to return the IP Pool's region information in the response. + +### Return type + +[**GetIp200Response**](GetIp200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/GetIp200Response.md b/rest/api/v3/ip_address_management/docs/GetIp200Response.md new file mode 100644 index 00000000..92877de3 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/GetIp200Response.md @@ -0,0 +1,19 @@ +# GetIp200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | The IP address specified in the request. |[optional] +**IsParentAssigned** | **bool** | Indicates if a parent on the account is able to send email from the IP address. |[optional] +**IsAutoWarmup** | **bool** | Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). |[optional] +**Pools** | [**[]GetIp200ResponsePoolsInner**](GetIp200ResponsePoolsInner.md) | An array of IP Pools the IP address is assigned to. |[optional] +**AddedAt** | **int32** | A timestamp indicating when the IP address was added to your account. |[optional] +**UpdatedAt** | Pointer to **int32** | A timestamp indicating when the IP was last updated. | +**IsEnabled** | Pointer to **bool** | Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. | +**IsLeased** | **bool** | Indicates whether an IP address is leased from Twilio SendGrid. If `false`, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account. |[optional] +**Region** | **string** | The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. Possible values are `us` or `eu`. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/GetIp200ResponsePoolsInner.md b/rest/api/v3/ip_address_management/docs/GetIp200ResponsePoolsInner.md new file mode 100644 index 00000000..4dff4853 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/GetIp200ResponsePoolsInner.md @@ -0,0 +1,12 @@ +# GetIp200ResponsePoolsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The ID of the IP Pool. |[optional] +**Name** | **string** | The name of the IP Pool. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/GetIpPool.md b/rest/api/v3/ip_address_management/docs/GetIpPool.md new file mode 100644 index 00000000..efbc6181 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/GetIpPool.md @@ -0,0 +1,48 @@ +# GetIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetIpPool**](GetIpPool.md#GetIpPool) | **Get** /v3/send_ips/pools/{Poolid} | Get Details for an IP Pool + + + +## GetIpPool + +> GetIpPool200Response GetIpPool(ctx, optional) + +Get Details for an IP Pool + +This operation will return the details for a specified IP Pool, including the Pool's name, ID, a sample list of the IPs associated with the Pool, and the total number of IPs belonging to the Pool. A maximum of 10 IPs will be returned per IP Pool by default. To retrieve additional IP addresses associated with a Pool, use the \"Get IPs Assigned to an IP Pool\" operation. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a GetIpPoolParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**IncludeRegion** | **bool** | Boolean indicating whether or not to return the IP Pool's region information in the response. + +### Return type + +[**GetIpPool200Response**](GetIpPool200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/GetIpPool200Response.md b/rest/api/v3/ip_address_management/docs/GetIpPool200Response.md new file mode 100644 index 00000000..38fffdf5 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/GetIpPool200Response.md @@ -0,0 +1,15 @@ +# GetIpPool200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the IP Pool. |[optional] +**Id** | **string** | The unique ID of the IP Pool. |[optional] +**IpsPreview** | **[]string** | A sample list of IP addresses associated with the IP Pool. The sample is limited to 10 results. |[optional] +**TotalIpCount** | **int32** | The total number of IP addresses in the IP Pool. An IP Pool can have a maximum of 100 associated IP addresses. |[optional] +**IpCountByRegion** | [**[]GetIpPool200ResponseIpCountByRegionInner**](GetIpPool200ResponseIpCountByRegionInner.md) | The total number of IP addresses by region. this object is only returned if the `include_region` parameter is included and set to `true` in the API request. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/GetIpPool200ResponseIpCountByRegionInner.md b/rest/api/v3/ip_address_management/docs/GetIpPool200ResponseIpCountByRegionInner.md new file mode 100644 index 00000000..287c899e --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/GetIpPool200ResponseIpCountByRegionInner.md @@ -0,0 +1,12 @@ +# GetIpPool200ResponseIpCountByRegionInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Region** | [**Region5**](Region5.md) | The region associated with the number of IPs listed in the `count` property. |[optional] +**Count** | **int32** | The number of IP addresses in the pool that are assigned to the region specified in the `region` property for this count. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/IpAddressManagementErrorResponse.md b/rest/api/v3/ip_address_management/docs/IpAddressManagementErrorResponse.md new file mode 100644 index 00000000..dcf00eaf --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/IpAddressManagementErrorResponse.md @@ -0,0 +1,11 @@ +# IpAddressManagementErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]IpAddressManagementErrorResponseErrorsInner**](IpAddressManagementErrorResponseErrorsInner.md) | An array of error objects. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/IpAddressManagementErrorResponseErrorsInner.md b/rest/api/v3/ip_address_management/docs/IpAddressManagementErrorResponseErrorsInner.md new file mode 100644 index 00000000..ce08001a --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/IpAddressManagementErrorResponseErrorsInner.md @@ -0,0 +1,12 @@ +# IpAddressManagementErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | Indicates which field caused the error. This may be an empty string if no specific field is responsible for the error. |[optional] +**Message** | **string** | An error-specific message that provides more information about the error's cause. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/Items.md b/rest/api/v3/ip_address_management/docs/Items.md new file mode 100644 index 00000000..fb3e88bd --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/Items.md @@ -0,0 +1,13 @@ +# Items + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**EU** | string | (value: `"eu"`) +**US** | string | (value: `"us"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListIp.md b/rest/api/v3/ip_address_management/docs/ListIp.md new file mode 100644 index 00000000..4386ce78 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIp.md @@ -0,0 +1,59 @@ +# ListIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListIp**](ListIp.md#ListIp) | **Get** /v3/send_ips/ips | Get a List of all IP Addresses on your Account + + + +## ListIp + +> ListIp200Response ListIp(ctx, optional) + +Get a List of all IP Addresses on your Account + +This operation returns a list of all IP addresses associated with your account. A sample of IP details is returned with each IP, including which Pools the IP is associated with, whether the IP is set to warm up automatically, and when the IP was last updated. ### Limitations The `is_parent_assigned` parameter and `pool` parameter cannot be used at the same time. By definition, an IP cannot be assigned to a Pool if it is not first enabled. You can use either the `before_key` or `after_key` in combination with the `limit` parameter to iterate through paginated results but not both. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Ip** | **string** | Specifies an IP address. The `ip` query parameter can be used to filter results by IP address. +**Limit** | **int32** | Specifies the number of results to be returned by the API. This parameter can be used in combination with the `before_key` or `after_key` parameters to iterate through paginated results. +**AfterKey** | **int32** | Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. +**BeforeKey** | **string** | Specifies which items to be returned by the API. When the `before_key` is specified, the API will return items beginning from the first item before the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. +**IsLeased** | **bool** | Indicates whether an IP address is leased from Twilio SendGrid. If `false`, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account. +**IsEnabled** | **bool** | Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. +**IsParentAssigned** | **bool** | A parent must be assigned to an IP address before the parent can send mail from the IP and before the address can be assigned to an IP pool. Set this parameter value to true to allow the parent to send mail from the IP and make the IP eligible for IP pool assignment using the IP pool endpoints. +**Pool** | **string** | Specifies the unique ID for an IP Pool. When included, only IP addresses belonging to the specified Pool will be returned. +**StartAddedAt** | **int32** | The `start_added_at` and `end_added_at` parameters are used to set a time window. IP addresses that were added to your account in the specified time window will be returned. The `start_added_at` parameter sets the beginning of the time window. +**EndAddedAt** | **int32** | The `start_added_at` and `end_added_at` parameters are used to set a time window. IP addresses that were added to your account in the specified time window will be returned. The `end_added_at` parameter sets the end of the time window. +**Region** | [**Region7**](Region7Region7.md) | Allowed values are `all`, `eu`, and `us`. If you provide a specific region, results will include all pools that have at least one IP in the filtered region. If `all`, pools with at least one IP (regardless of region) will be returned. If the `region` filter is not provided, the query returns all pools, including empty ones. +**IncludeRegion** | **bool** | Boolean indicating whether or not to return the IP Pool's region information in the response. + +### Return type + +[**ListIp200Response**](ListIp200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/ListIp200Response.md b/rest/api/v3/ip_address_management/docs/ListIp200Response.md new file mode 100644 index 00000000..d4e0057c --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIp200Response.md @@ -0,0 +1,12 @@ +# ListIp200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ListIp200ResponseResultInner**](ListIp200ResponseResultInner.md) | |[optional] +**Metadata** | [**ListIp200ResponseMetadata**](ListIp200ResponseMetadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListIp200ResponseMetadata.md b/rest/api/v3/ip_address_management/docs/ListIp200ResponseMetadata.md new file mode 100644 index 00000000..025e9096 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIp200ResponseMetadata.md @@ -0,0 +1,11 @@ +# ListIp200ResponseMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NextParams** | [**ListIp200ResponseMetadataNextParams**](ListIp200ResponseMetadataNextParams.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListIp200ResponseMetadataNextParams.md b/rest/api/v3/ip_address_management/docs/ListIp200ResponseMetadataNextParams.md new file mode 100644 index 00000000..5b3f6867 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIp200ResponseMetadataNextParams.md @@ -0,0 +1,22 @@ +# ListIp200ResponseMetadataNextParams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AfterKey** | Pointer to **string** | Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `after_key` cannot be used in combination with the `before_key` parameter. | +**BeforeKey** | Pointer to **string** | Specifies which items to be returned by the API. When the `before_key` is specified, the API will return items beginning from the first item before the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `before_key` cannot be used in combination with the `after_key` parameter. | +**Ip** | **string** | The IP address specified in the request with the `ip` query parameter. This parameter is returned only when an IP is included in the request. |[optional] +**IsLeased** | **bool** | Indicates whether an IP address is leased from Twilio SendGrid. If `false`, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account. This parameter is returned only if the IP address is leased. |[optional] +**IsEnabled** | **bool** | Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. This parameter is returned only if the IP address is enabled. |[optional] +**IsParentAssigned** | **bool** | Indicates if a parent on the account is able to send email from the IP address. This parameter is returned only if the IP address is parent assigned. |[optional] +**Pool** | **string** | The IP Pool ID specified in the request with the `pool` query parameter. This parameter is returned only when an IP Pool is included in the request. |[optional] +**StartAddedAt** | **string** | The beginning of the time window specified in the request with the `start_added_at` query parameter. This parameter is returned only when the `start_added_at` parameter is included in the request. |[optional] +**EndAddedAt** | **string** | The end of the time window specified in the request with the `end_added_at` query parameter. This parameter is returned only when the `end_added_at` parameter is included in the request. |[optional] +**Limit** | **string** | The number of items returned in the request. This parameter is returned only when a `limit` is set using the `limit` query parameter in the request. |[optional] +**Region** | [**Region1**](Region1.md) | The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request, |[optional] +**IncludeRegion** | **string** | Indicates whether or not to include the IP address's region. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListIp200ResponseResultInner.md b/rest/api/v3/ip_address_management/docs/ListIp200ResponseResultInner.md new file mode 100644 index 00000000..f5afc216 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIp200ResponseResultInner.md @@ -0,0 +1,19 @@ +# ListIp200ResponseResultInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | An IP address on your account. |[optional] +**Pools** | [**[]ListIp200ResponseResultInnerPoolsInner**](ListIp200ResponseResultInnerPoolsInner.md) | An array of IP Pools the IP address is assigned to. |[optional] +**IsAutoWarmup** | **bool** | Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). |[optional] +**IsParentAssigned** | Pointer to **bool** | Indicates if a parent on the account is able to send email from the IP address. This parameter will be returned only if the request was made by the parent account. | +**UpdatedAt** | Pointer to **int32** | A timestamp indicating when the IP was last updated. | +**IsEnabled** | Pointer to **bool** | Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. | +**IsLeased** | **bool** | Indicates whether an IP address is leased from Twilio SendGrid. If `false`, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account. |[optional] +**AddedAt** | **int32** | A timestamp representing when the IP address was added to your account. |[optional] +**Region** | [**Region**](Region.md) | The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListIp200ResponseResultInnerPoolsInner.md b/rest/api/v3/ip_address_management/docs/ListIp200ResponseResultInnerPoolsInner.md new file mode 100644 index 00000000..2457686e --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIp200ResponseResultInnerPoolsInner.md @@ -0,0 +1,12 @@ +# ListIp200ResponseResultInnerPoolsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the IP Pool. |[optional] +**Id** | **string** | The unique ID of the IP Pool. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool.md b/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool.md new file mode 100644 index 00000000..27120fb3 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool.md @@ -0,0 +1,50 @@ +# ListIpAssignedToIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListIpAssignedToIpPool**](ListIpAssignedToIpPool.md#ListIpAssignedToIpPool) | **Get** /v3/send_ips/pools/{Poolid}/ips | Get IPs Assigned to an IP Pool + + + +## ListIpAssignedToIpPool + +> ListIpAssignedToIpPool200Response ListIpAssignedToIpPool(ctx, optional) + +Get IPs Assigned to an IP Pool + +This operation returns the IP addresses that are assigned to the specified IP pool. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListIpAssignedToIpPoolParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **int32** | Specifies the number of results to be returned by the API. This parameter can be used in combination with the `before_key` or `after_key` parameters to iterate through paginated results. +**AfterKey** | **int32** | Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. +**IncludeRegion** | **bool** | Boolean indicating whether or not to return the IP Pool's region information in the response. + +### Return type + +[**ListIpAssignedToIpPool200Response**](ListIpAssignedToIpPool200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200Response.md b/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200Response.md new file mode 100644 index 00000000..6bbf46ba --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200Response.md @@ -0,0 +1,12 @@ +# ListIpAssignedToIpPool200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ListIpAssignedToIpPool200ResponseResultInner**](ListIpAssignedToIpPool200ResponseResultInner.md) | |[optional] +**Metadata** | [**ListIpAssignedToIpPool200ResponseMetadata**](ListIpAssignedToIpPool200ResponseMetadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseMetadata.md b/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseMetadata.md new file mode 100644 index 00000000..f8890c12 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseMetadata.md @@ -0,0 +1,11 @@ +# ListIpAssignedToIpPool200ResponseMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NextParams** | [**ListIpAssignedToIpPool200ResponseMetadataNextParams**](ListIpAssignedToIpPool200ResponseMetadataNextParams.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseMetadataNextParams.md b/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseMetadataNextParams.md new file mode 100644 index 00000000..1988a996 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseMetadataNextParams.md @@ -0,0 +1,13 @@ +# ListIpAssignedToIpPool200ResponseMetadataNextParams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AfterKey** | Pointer to **string** | Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `after_key` cannot be used in combination with the `before_key` parameter. | +**Limit** | **string** | The `limit` specified in the request. This parameter will be included only if it was specified in the request. This is not the default limit enforced by the API. |[optional] +**IncludeRegion** | **string** | Indicates whether or not to include the IP address's region. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseResultInner.md b/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseResultInner.md new file mode 100644 index 00000000..d8ffe910 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIpAssignedToIpPool200ResponseResultInner.md @@ -0,0 +1,13 @@ +# ListIpAssignedToIpPool200ResponseResultInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | An IP address assigned to the IP Pool. |[optional] +**Region** | [**Region6**](Region6.md) | The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. |[optional] +**Pools** | [**[]ListIp200ResponseResultInnerPoolsInner**](ListIp200ResponseResultInnerPoolsInner.md) | IP Pools the IP address is assigned to. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListIpPool.md b/rest/api/v3/ip_address_management/docs/ListIpPool.md new file mode 100644 index 00000000..e49c30f6 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIpPool.md @@ -0,0 +1,52 @@ +# ListIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListIpPool**](ListIpPool.md#ListIpPool) | **Get** /v3/send_ips/pools | GET all IP Pools that have Associated IPs + + + +## ListIpPool + +> ListIpPool200Response ListIpPool(ctx, optional) + +GET all IP Pools that have Associated IPs + +This operation returns a list of your IP Pools and a sample of each Pools' associated IP addresses. A maximum of 10 IPs will be returned per IP Pool by default. To retrieve additional IP addresses associated with a Pool, use the \"Get IPs Assigned to an IP Pool\" operation. Each user may have a maximum of 100 IP Pools. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListIpPoolParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **int32** | Specifies the number of results to be returned by the API. This parameter can be used in combination with the `before_key` or `after_key` parameters to iterate through paginated results. +**AfterKey** | **int32** | Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. +**Ip** | **string** | Specifies an IP address. The `ip` query parameter can be used to filter results by IP address. +**Region** | [**Region7**](Region7Region7.md) | Allowed values are `all`, `eu`, and `us`. If you provide a specific region, results will include all pools that have at least one IP in the filtered region. If `all`, pools with at least one IP (regardless of region) will be returned. If the `region` filter is not provided, the query returns all pools, including empty ones. +**IncludeRegion** | **bool** | Boolean indicating whether or not to return the IP Pool's region information in the response. + +### Return type + +[**ListIpPool200Response**](ListIpPool200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/ListIpPool200Response.md b/rest/api/v3/ip_address_management/docs/ListIpPool200Response.md new file mode 100644 index 00000000..30b278aa --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIpPool200Response.md @@ -0,0 +1,12 @@ +# ListIpPool200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ListIpPool200ResponseResultInner**](ListIpPool200ResponseResultInner.md) | |[optional] +**Metadata** | [**ListIpPool200ResponseMetadata**](ListIpPool200ResponseMetadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListIpPool200ResponseMetadata.md b/rest/api/v3/ip_address_management/docs/ListIpPool200ResponseMetadata.md new file mode 100644 index 00000000..33136f18 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIpPool200ResponseMetadata.md @@ -0,0 +1,11 @@ +# ListIpPool200ResponseMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NextParams** | [**ListIpPool200ResponseMetadataNextParams**](ListIpPool200ResponseMetadataNextParams.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListIpPool200ResponseMetadataNextParams.md b/rest/api/v3/ip_address_management/docs/ListIpPool200ResponseMetadataNextParams.md new file mode 100644 index 00000000..b59951d5 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIpPool200ResponseMetadataNextParams.md @@ -0,0 +1,15 @@ +# ListIpPool200ResponseMetadataNextParams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AfterKey** | Pointer to **string** | Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `after_key` cannot be used in combination with the `before_key` parameter. | +**Ip** | **string** | The IP address specified in the request. This parameter will be returned only if it was specified in the request. |[optional] +**Limit** | **string** | The `limit` specified in the request. This parameter will be included only if it was specified in the request. This is not the default limit enforced by the API. |[optional] +**Region** | [**Region4**](Region4.md) | The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. |[optional] +**IncludeRegion** | **string** | Indicates whether or not to include the IP address's region. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListIpPool200ResponseResultInner.md b/rest/api/v3/ip_address_management/docs/ListIpPool200ResponseResultInner.md new file mode 100644 index 00000000..f8b44a23 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListIpPool200ResponseResultInner.md @@ -0,0 +1,15 @@ +# ListIpPool200ResponseResultInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the IP Pool. |[optional] +**Id** | **string** | The unique ID of the IP Pool. |[optional] +**Regions** | [**[]Items**](Items.md) | An array of the unique regions of all the IP addresses returned within the IP pool. |[optional] +**IpsPreview** | **[]string** | A sample list of IP addresses associated with the IP Pool. The sample is limited to 10 results. |[optional] +**TotalIpCount** | **int32** | The total number of IP addresses in the IP Pool. An IP Pool can have a maximum of 100 associated IP addresses. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp.md b/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp.md new file mode 100644 index 00000000..e672cdd2 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp.md @@ -0,0 +1,49 @@ +# ListSubUserAssignedToIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSubUserAssignedToIp**](ListSubUserAssignedToIp.md#ListSubUserAssignedToIp) | **Get** /v3/send_ips/ips/{Ip}/subusers | Get a List of Subusers Assigned to an IP + + + +## ListSubUserAssignedToIp + +> ListSubUserAssignedToIp200Response ListSubUserAssignedToIp(ctx, optional) + +Get a List of Subusers Assigned to an IP + +This operation returns a list of Subuser IDs that have been assigned the specified IP address. To retrieve more information about the returned Subusers, use the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/list-all-subusers). You can use the `after_key` and `limit` query parameters to iterate through paginated results. The maximum limit is 100, meaning you may retrieve up to 100 Subusers per request. If the `after_key` in the API response is not null, there are more Subusers assigned to the IP address than those returned in the request. You can repeat the request with the non-null `after_key` value and the same limit to retrieve the next group of Subusers. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSubUserAssignedToIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**AfterKey** | **int32** | Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. +**Limit** | **int32** | Specifies the number of results to be returned by the API. This parameter can be used in combination with the `after_key` parameters to iterate through paginated results. The maximum limit is 100. + +### Return type + +[**ListSubUserAssignedToIp200Response**](ListSubUserAssignedToIp200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200Response.md b/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200Response.md new file mode 100644 index 00000000..df5554fb --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200Response.md @@ -0,0 +1,12 @@ +# ListSubUserAssignedToIp200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | **[]string** | An array of Subuser IDs that have been assigned the specified IP address. |[optional] +**Metadata** | [**ListSubUserAssignedToIp200ResponseMetadata**](ListSubUserAssignedToIp200ResponseMetadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200ResponseMetadata.md b/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200ResponseMetadata.md new file mode 100644 index 00000000..05e6ef0a --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200ResponseMetadata.md @@ -0,0 +1,11 @@ +# ListSubUserAssignedToIp200ResponseMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NextParams** | [**ListSubUserAssignedToIp200ResponseMetadataNextParams**](ListSubUserAssignedToIp200ResponseMetadataNextParams.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200ResponseMetadataNextParams.md b/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200ResponseMetadataNextParams.md new file mode 100644 index 00000000..36b362e5 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/ListSubUserAssignedToIp200ResponseMetadataNextParams.md @@ -0,0 +1,12 @@ +# ListSubUserAssignedToIp200ResponseMetadataNextParams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AfterKey** | Pointer to **string** | Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `after_key` cannot be used in combination with the `before_key` parameter. | +**Limit** | **string** | The `limit` specified in the request. This parameter will be included only if it was specified in the request. This is not the default limit enforced by the API. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/Region.md b/rest/api/v3/ip_address_management/docs/Region.md new file mode 100644 index 00000000..e861b3d5 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/Region.md @@ -0,0 +1,13 @@ +# Region + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**EU** | string | (value: `"eu"`) +**US** | string | (value: `"us"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/Region1.md b/rest/api/v3/ip_address_management/docs/Region1.md new file mode 100644 index 00000000..ca0566cb --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/Region1.md @@ -0,0 +1,14 @@ +# Region1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**ALL** | string | (value: `"all"`) +**US** | string | (value: `"us"`) +**EU** | string | (value: `"eu"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/Region2.md b/rest/api/v3/ip_address_management/docs/Region2.md new file mode 100644 index 00000000..09a272e0 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/Region2.md @@ -0,0 +1,13 @@ +# Region2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**EU** | string | (value: `"eu"`) +**US** | string | (value: `"us"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/Region3.md b/rest/api/v3/ip_address_management/docs/Region3.md new file mode 100644 index 00000000..c39c27e1 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/Region3.md @@ -0,0 +1,13 @@ +# Region3 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**EU** | string | (value: `"eu"`) +**US** | string | (value: `"us"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/Region4.md b/rest/api/v3/ip_address_management/docs/Region4.md new file mode 100644 index 00000000..928b038b --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/Region4.md @@ -0,0 +1,14 @@ +# Region4 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**ALL** | string | (value: `"all"`) +**US** | string | (value: `"us"`) +**EU** | string | (value: `"eu"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/Region5.md b/rest/api/v3/ip_address_management/docs/Region5.md new file mode 100644 index 00000000..2e619fff --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/Region5.md @@ -0,0 +1,13 @@ +# Region5 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**US** | string | (value: `"us"`) +**EU** | string | (value: `"eu"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/Region6.md b/rest/api/v3/ip_address_management/docs/Region6.md new file mode 100644 index 00000000..9a492375 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/Region6.md @@ -0,0 +1,13 @@ +# Region6 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**EU** | string | (value: `"eu"`) +**US** | string | (value: `"us"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/Region7.md b/rest/api/v3/ip_address_management/docs/Region7.md new file mode 100644 index 00000000..c7db2ec2 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/Region7.md @@ -0,0 +1,14 @@ +# Region7 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**ALL** | string | (value: `"all"`) +**EU** | string | (value: `"eu"`) +**US** | string | (value: `"us"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/UpdateIp.md b/rest/api/v3/ip_address_management/docs/UpdateIp.md new file mode 100644 index 00000000..4dffc656 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/UpdateIp.md @@ -0,0 +1,52 @@ +# UpdateIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateIp**](UpdateIp.md#UpdateIp) | **Patch** /v3/send_ips/ips/{Ip} | Update Details for an IP Address + + + +## UpdateIp + +> UpdateIp200Response UpdateIp(ctx, Ipoptional) + +Update Details for an IP Address + +This operation updates an IP address's settings, including whether the IP is set to warm up automatically, if the IP is assigned by a parent account, and whether the IP is enabled or disabled. The request body must include at least one of the `is_auto_warmup`, `is_parent_assigned`, or `is_enabled` fields. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Ip** | **string** | The `ip` path parameter specifies an IP address to make the request against. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**UpdateIpRequest** | [**UpdateIpRequest**](UpdateIpRequest.md) | + +### Return type + +[**UpdateIp200Response**](UpdateIp200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/UpdateIp200Response.md b/rest/api/v3/ip_address_management/docs/UpdateIp200Response.md new file mode 100644 index 00000000..ed2bc116 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/UpdateIp200Response.md @@ -0,0 +1,14 @@ +# UpdateIp200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | The IP address that was updated. |[optional] +**IsAutoWarmup** | **bool** | Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). |[optional] +**IsParentAssigned** | **bool** | Indicates if a parent on the account is able to send email from the IP address. This parameter is returned only if the IP address is parent assigned. |[optional] +**IsEnabled** | **bool** | An array of Subuser IDs the IP address was assigned to. This parameter is returned only if the IP address is enabled. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/UpdateIpPool.md b/rest/api/v3/ip_address_management/docs/UpdateIpPool.md new file mode 100644 index 00000000..ab0e11fd --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/UpdateIpPool.md @@ -0,0 +1,52 @@ +# UpdateIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateIpPool**](UpdateIpPool.md#UpdateIpPool) | **Put** /v3/send_ips/pools/{Poolid} | Update an IP Pool Name + + + +## UpdateIpPool + +> UpdateIpPool200Response UpdateIpPool(ctx, Poolidoptional) + +Update an IP Pool Name + +This operation will rename an IP Pool. An IP Pool name cannot start with a dot/period (.) or space. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Poolid** | **string** | Specifies the unique ID for an IP Pool. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateIpPoolParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**UpdateIpPoolRequest** | [**UpdateIpPoolRequest**](UpdateIpPoolRequest.md) | + +### Return type + +[**UpdateIpPool200Response**](UpdateIpPool200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json, application/xml + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_address_management/docs/UpdateIpPool200Response.md b/rest/api/v3/ip_address_management/docs/UpdateIpPool200Response.md new file mode 100644 index 00000000..787fe0cc --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/UpdateIpPool200Response.md @@ -0,0 +1,12 @@ +# UpdateIpPool200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name assigned to the IP Pool. |[optional] +**Id** | **string** | The unique ID of the IP Pool. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/UpdateIpPoolRequest.md b/rest/api/v3/ip_address_management/docs/UpdateIpPoolRequest.md new file mode 100644 index 00000000..30357410 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/UpdateIpPoolRequest.md @@ -0,0 +1,11 @@ +# UpdateIpPoolRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name to assign to the IP Pool. An IP Pool name cannot begin with a space or period. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/docs/UpdateIpRequest.md b/rest/api/v3/ip_address_management/docs/UpdateIpRequest.md new file mode 100644 index 00000000..a3c255d2 --- /dev/null +++ b/rest/api/v3/ip_address_management/docs/UpdateIpRequest.md @@ -0,0 +1,13 @@ +# UpdateIpRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**IsAutoWarmup** | **bool** | Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). |[optional] +**IsParentAssigned** | **bool** | Indicates if a parent on the account is able to send email from the IP address. |[optional] +**IsEnabled** | **bool** | Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_address_management/model_add_ip_201_response.go b/rest/api/v3/ip_address_management/model_add_ip_201_response.go new file mode 100644 index 00000000..7efdcac8 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_add_ip_201_response.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIp201Response struct for AddIp201Response +type AddIp201Response struct { + // The IP address that was added to your account. + Ip *string `json:"ip,omitempty"` + // Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). This parameter is returned only if the IP address is set to automatically warm up. + IsAutoWarmup *bool `json:"is_auto_warmup,omitempty"` + // Indicates if a parent on the account is able to send email from the IP address. + IsParentAssigned *bool `json:"is_parent_assigned,omitempty"` + // An array of Subuser IDs the IP address was assigned to. + Subusers *[]string `json:"subusers,omitempty"` + // The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. + Region *Region2 `json:"region,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_add_ip_request.go b/rest/api/v3/ip_address_management/model_add_ip_request.go new file mode 100644 index 00000000..919d2b8a --- /dev/null +++ b/rest/api/v3/ip_address_management/model_add_ip_request.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIpRequest struct for AddIpRequest +type AddIpRequest struct { + // Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). + IsAutoWarmup bool `json:"is_auto_warmup"` + // Indicates if a parent on the account is able to send email from the IP address. + IsParentAssigned bool `json:"is_parent_assigned"` + // An array of Subuser IDs the IP address will be assigned to. + Subusers *[]string `json:"subusers,omitempty"` + // The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. + Region *Region3 `json:"region,omitempty"` + // Boolean indicating whether or not to return the IP address's region information in the response. + IncludeRegion *bool `json:"include_region,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_add_ips_to_ip_pool_200_response.go b/rest/api/v3/ip_address_management/model_add_ips_to_ip_pool_200_response.go new file mode 100644 index 00000000..98259263 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_add_ips_to_ip_pool_200_response.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIpsToIpPool200Response struct for AddIpsToIpPool200Response +type AddIpsToIpPool200Response struct { + // The name of the IP Pool. + Name *string `json:"name,omitempty"` + // The unique ID of the IP Pool. + Id *string `json:"id,omitempty"` + // An array of IP addresses assigned to the IP Pool. + Ips *[]string `json:"ips,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_add_ips_to_ip_pool_request.go b/rest/api/v3/ip_address_management/model_add_ips_to_ip_pool_request.go new file mode 100644 index 00000000..e6bc299e --- /dev/null +++ b/rest/api/v3/ip_address_management/model_add_ips_to_ip_pool_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIpsToIpPoolRequest struct for AddIpsToIpPoolRequest +type AddIpsToIpPoolRequest struct { + // An array of IP addresses to assign to the specified IP Pool. All assignments must succeed. + Ips []string `json:"ips"` +} diff --git a/rest/api/v3/ip_address_management/model_add_sub_users_to_ip_200_response.go b/rest/api/v3/ip_address_management/model_add_sub_users_to_ip_200_response.go new file mode 100644 index 00000000..c565c49b --- /dev/null +++ b/rest/api/v3/ip_address_management/model_add_sub_users_to_ip_200_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddSubUsersToIp200Response struct for AddSubUsersToIp200Response +type AddSubUsersToIp200Response struct { + // The IP address the Subusers were assigned to. + Ip *string `json:"ip,omitempty"` + // An array of Subuser IDs that were assigned to the specified IP address. + Subusers *[]string `json:"subusers,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_add_sub_users_to_ip_request.go b/rest/api/v3/ip_address_management/model_add_sub_users_to_ip_request.go new file mode 100644 index 00000000..72670bf6 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_add_sub_users_to_ip_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddSubUsersToIpRequest struct for AddSubUsersToIpRequest +type AddSubUsersToIpRequest struct { + // An array of Subuser IDs to be assigned to the specified IP address. All Subuser assignments must succeed. + Subusers []string `json:"subusers"` +} diff --git a/rest/api/v3/ip_address_management/model_create_ip_pool_201_response.go b/rest/api/v3/ip_address_management/model_create_ip_pool_201_response.go new file mode 100644 index 00000000..8fa8d726 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_create_ip_pool_201_response.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateIpPool201Response struct for CreateIpPool201Response +type CreateIpPool201Response struct { + // The name assigned to the IP Pool. + Name *string `json:"name,omitempty"` + // The unique ID of the IP Pool. + Id *string `json:"id,omitempty"` + // An array of IP addresses assigned to the IP Pool. All assignments must succeed. + Ips *[]string `json:"ips,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_create_ip_pool_request.go b/rest/api/v3/ip_address_management/model_create_ip_pool_request.go new file mode 100644 index 00000000..c702be5a --- /dev/null +++ b/rest/api/v3/ip_address_management/model_create_ip_pool_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateIpPoolRequest struct for CreateIpPoolRequest +type CreateIpPoolRequest struct { + // The name to assign to the IP Pool. An IP Pool name cannot begin with a space or period. + Name string `json:"name"` + // An array of IP addresses to assign to the IP Pool. All assignments must succeed. + Ips *[]string `json:"ips,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_delete_ips_from_ip_pool_request.go b/rest/api/v3/ip_address_management/model_delete_ips_from_ip_pool_request.go new file mode 100644 index 00000000..f61bee66 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_delete_ips_from_ip_pool_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteIpsFromIpPoolRequest struct for DeleteIpsFromIpPoolRequest +type DeleteIpsFromIpPoolRequest struct { + // An array of IP addresses to remove from the specified IP Pool. + Ips []string `json:"ips"` +} diff --git a/rest/api/v3/ip_address_management/model_delete_sub_users_from_ip_request.go b/rest/api/v3/ip_address_management/model_delete_sub_users_from_ip_request.go new file mode 100644 index 00000000..b558ec05 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_delete_sub_users_from_ip_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteSubUsersFromIpRequest struct for DeleteSubUsersFromIpRequest +type DeleteSubUsersFromIpRequest struct { + // An array of Subuser IDs to be removed from the specified IP address. + Subusers []string `json:"subusers"` +} diff --git a/rest/api/v3/ip_address_management/model_get_ip_200_response.go b/rest/api/v3/ip_address_management/model_get_ip_200_response.go new file mode 100644 index 00000000..e9e90214 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_get_ip_200_response.go @@ -0,0 +1,36 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetIp200Response struct for GetIp200Response +type GetIp200Response struct { + // The IP address specified in the request. + Ip *string `json:"ip,omitempty"` + // Indicates if a parent on the account is able to send email from the IP address. + IsParentAssigned *bool `json:"is_parent_assigned,omitempty"` + // Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). + IsAutoWarmup *bool `json:"is_auto_warmup,omitempty"` + // An array of IP Pools the IP address is assigned to. + Pools *[]GetIp200ResponsePoolsInner `json:"pools,omitempty"` + // A timestamp indicating when the IP address was added to your account. + AddedAt *int32 `json:"added_at,omitempty"` + // A timestamp indicating when the IP was last updated. + UpdatedAt *int32 `json:"updated_at,omitempty"` + // Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. + IsEnabled *bool `json:"is_enabled,omitempty"` + // Indicates whether an IP address is leased from Twilio SendGrid. If `false`, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account. + IsLeased *bool `json:"is_leased,omitempty"` + // The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. Possible values are `us` or `eu`. + Region *string `json:"region,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_get_ip_200_response_pools_inner.go b/rest/api/v3/ip_address_management/model_get_ip_200_response_pools_inner.go new file mode 100644 index 00000000..36e7d5ee --- /dev/null +++ b/rest/api/v3/ip_address_management/model_get_ip_200_response_pools_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetIp200ResponsePoolsInner struct for GetIp200ResponsePoolsInner +type GetIp200ResponsePoolsInner struct { + // The ID of the IP Pool. + Id *string `json:"id,omitempty"` + // The name of the IP Pool. + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_get_ip_pool_200_response.go b/rest/api/v3/ip_address_management/model_get_ip_pool_200_response.go new file mode 100644 index 00000000..cd1b5410 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_get_ip_pool_200_response.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetIpPool200Response struct for GetIpPool200Response +type GetIpPool200Response struct { + // The name of the IP Pool. + Name *string `json:"name,omitempty"` + // The unique ID of the IP Pool. + Id *string `json:"id,omitempty"` + // A sample list of IP addresses associated with the IP Pool. The sample is limited to 10 results. + IpsPreview *[]string `json:"ips_preview,omitempty"` + // The total number of IP addresses in the IP Pool. An IP Pool can have a maximum of 100 associated IP addresses. + TotalIpCount *int32 `json:"total_ip_count,omitempty"` + // The total number of IP addresses by region. this object is only returned if the `include_region` parameter is included and set to `true` in the API request. + IpCountByRegion *[]GetIpPool200ResponseIpCountByRegionInner `json:"ip_count_by_region,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_get_ip_pool_200_response_ip_count_by_region_inner.go b/rest/api/v3/ip_address_management/model_get_ip_pool_200_response_ip_count_by_region_inner.go new file mode 100644 index 00000000..e16b374a --- /dev/null +++ b/rest/api/v3/ip_address_management/model_get_ip_pool_200_response_ip_count_by_region_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetIpPool200ResponseIpCountByRegionInner struct for GetIpPool200ResponseIpCountByRegionInner +type GetIpPool200ResponseIpCountByRegionInner struct { + // The region associated with the number of IPs listed in the `count` property. + Region *Region5 `json:"region,omitempty"` + // The number of IP addresses in the pool that are assigned to the region specified in the `region` property for this count. + Count *int32 `json:"count,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_ip_address_management_error_response.go b/rest/api/v3/ip_address_management/model_ip_address_management_error_response.go new file mode 100644 index 00000000..a9104eff --- /dev/null +++ b/rest/api/v3/ip_address_management/model_ip_address_management_error_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IpAddressManagementErrorResponse IP Address Management Error Response Schema +type IpAddressManagementErrorResponse struct { + // An array of error objects. + Errors *[]IpAddressManagementErrorResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_ip_address_management_error_response_errors_inner.go b/rest/api/v3/ip_address_management/model_ip_address_management_error_response_errors_inner.go new file mode 100644 index 00000000..731e72c3 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_ip_address_management_error_response_errors_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IpAddressManagementErrorResponseErrorsInner struct for IpAddressManagementErrorResponseErrorsInner +type IpAddressManagementErrorResponseErrorsInner struct { + // Indicates which field caused the error. This may be an empty string if no specific field is responsible for the error. + Field *string `json:"field,omitempty"` + // An error-specific message that provides more information about the error's cause. + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_items.go b/rest/api/v3/ip_address_management/model_items.go new file mode 100644 index 00000000..87d3f404 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_items.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Items the model 'Items' +type Items string + +// List of Items +const ( + ITEMS_EU Items = "eu" + ITEMS_US Items = "us" +) diff --git a/rest/api/v3/ip_address_management/model_list_ip_200_response.go b/rest/api/v3/ip_address_management/model_list_ip_200_response.go new file mode 100644 index 00000000..9ad4f44c --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_ip_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListIp200Response struct for ListIp200Response +type ListIp200Response struct { + Result *[]ListIp200ResponseResultInner `json:"result,omitempty"` + Metadata *ListIp200ResponseMetadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_ip_200_response__metadata.go b/rest/api/v3/ip_address_management/model_list_ip_200_response__metadata.go new file mode 100644 index 00000000..6607e47c --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_ip_200_response__metadata.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListIp200ResponseMetadata struct for ListIp200ResponseMetadata +type ListIp200ResponseMetadata struct { + NextParams *ListIp200ResponseMetadataNextParams `json:"next_params,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_ip_200_response__metadata_next_params.go b/rest/api/v3/ip_address_management/model_list_ip_200_response__metadata_next_params.go new file mode 100644 index 00000000..51a639b8 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_ip_200_response__metadata_next_params.go @@ -0,0 +1,42 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListIp200ResponseMetadataNextParams struct for ListIp200ResponseMetadataNextParams +type ListIp200ResponseMetadataNextParams struct { + // Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `after_key` cannot be used in combination with the `before_key` parameter. + AfterKey *string `json:"after_key,omitempty"` + // Specifies which items to be returned by the API. When the `before_key` is specified, the API will return items beginning from the first item before the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `before_key` cannot be used in combination with the `after_key` parameter. + BeforeKey *string `json:"before_key,omitempty"` + // The IP address specified in the request with the `ip` query parameter. This parameter is returned only when an IP is included in the request. + Ip *string `json:"ip,omitempty"` + // Indicates whether an IP address is leased from Twilio SendGrid. If `false`, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account. This parameter is returned only if the IP address is leased. + IsLeased *bool `json:"is_leased,omitempty"` + // Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. This parameter is returned only if the IP address is enabled. + IsEnabled *bool `json:"is_enabled,omitempty"` + // Indicates if a parent on the account is able to send email from the IP address. This parameter is returned only if the IP address is parent assigned. + IsParentAssigned *bool `json:"is_parent_assigned,omitempty"` + // The IP Pool ID specified in the request with the `pool` query parameter. This parameter is returned only when an IP Pool is included in the request. + Pool *string `json:"pool,omitempty"` + // The beginning of the time window specified in the request with the `start_added_at` query parameter. This parameter is returned only when the `start_added_at` parameter is included in the request. + StartAddedAt *string `json:"start_added_at,omitempty"` + // The end of the time window specified in the request with the `end_added_at` query parameter. This parameter is returned only when the `end_added_at` parameter is included in the request. + EndAddedAt *string `json:"end_added_at,omitempty"` + // The number of items returned in the request. This parameter is returned only when a `limit` is set using the `limit` query parameter in the request. + Limit *string `json:"limit,omitempty"` + // The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request, + Region *Region1 `json:"region,omitempty"` + // Indicates whether or not to include the IP address's region. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. + IncludeRegion *string `json:"include_region,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_ip_200_response_result_inner.go b/rest/api/v3/ip_address_management/model_list_ip_200_response_result_inner.go new file mode 100644 index 00000000..594cf786 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_ip_200_response_result_inner.go @@ -0,0 +1,36 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListIp200ResponseResultInner struct for ListIp200ResponseResultInner +type ListIp200ResponseResultInner struct { + // An IP address on your account. + Ip *string `json:"ip,omitempty"` + // An array of IP Pools the IP address is assigned to. + Pools *[]ListIp200ResponseResultInnerPoolsInner `json:"pools,omitempty"` + // Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). + IsAutoWarmup *bool `json:"is_auto_warmup,omitempty"` + // Indicates if a parent on the account is able to send email from the IP address. This parameter will be returned only if the request was made by the parent account. + IsParentAssigned *bool `json:"is_parent_assigned,omitempty"` + // A timestamp indicating when the IP was last updated. + UpdatedAt *int32 `json:"updated_at,omitempty"` + // Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. + IsEnabled *bool `json:"is_enabled,omitempty"` + // Indicates whether an IP address is leased from Twilio SendGrid. If `false`, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account. + IsLeased *bool `json:"is_leased,omitempty"` + // A timestamp representing when the IP address was added to your account. + AddedAt *int32 `json:"added_at,omitempty"` + // The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. + Region *Region `json:"region,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_ip_200_response_result_inner_pools_inner.go b/rest/api/v3/ip_address_management/model_list_ip_200_response_result_inner_pools_inner.go new file mode 100644 index 00000000..c16d1584 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_ip_200_response_result_inner_pools_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListIp200ResponseResultInnerPoolsInner struct for ListIp200ResponseResultInnerPoolsInner +type ListIp200ResponseResultInnerPoolsInner struct { + // The name of the IP Pool. + Name *string `json:"name,omitempty"` + // The unique ID of the IP Pool. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response.go b/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response.go new file mode 100644 index 00000000..9ba7de72 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListIpAssignedToIpPool200Response struct for ListIpAssignedToIpPool200Response +type ListIpAssignedToIpPool200Response struct { + Result *[]ListIpAssignedToIpPool200ResponseResultInner `json:"result,omitempty"` + Metadata *ListIpAssignedToIpPool200ResponseMetadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response__metadata.go b/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response__metadata.go new file mode 100644 index 00000000..4ba29e47 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response__metadata.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListIpAssignedToIpPool200ResponseMetadata struct for ListIpAssignedToIpPool200ResponseMetadata +type ListIpAssignedToIpPool200ResponseMetadata struct { + NextParams *ListIpAssignedToIpPool200ResponseMetadataNextParams `json:"next_params,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response__metadata_next_params.go b/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response__metadata_next_params.go new file mode 100644 index 00000000..2849251f --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response__metadata_next_params.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListIpAssignedToIpPool200ResponseMetadataNextParams A collection of fields that can be used to work the endpoint. +type ListIpAssignedToIpPool200ResponseMetadataNextParams struct { + // Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `after_key` cannot be used in combination with the `before_key` parameter. + AfterKey *string `json:"after_key,omitempty"` + // The `limit` specified in the request. This parameter will be included only if it was specified in the request. This is not the default limit enforced by the API. + Limit *string `json:"limit,omitempty"` + // Indicates whether or not to include the IP address's region. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. + IncludeRegion *string `json:"include_region,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response_result_inner.go b/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response_result_inner.go new file mode 100644 index 00000000..29a22c36 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_ip_assigned_to_ip_pool_200_response_result_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListIpAssignedToIpPool200ResponseResultInner struct for ListIpAssignedToIpPool200ResponseResultInner +type ListIpAssignedToIpPool200ResponseResultInner struct { + // An IP address assigned to the IP Pool. + Ip *string `json:"ip,omitempty"` + // The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. + Region *Region6 `json:"region,omitempty"` + // IP Pools the IP address is assigned to. + Pools *[]ListIp200ResponseResultInnerPoolsInner `json:"pools,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_ip_pool_200_response.go b/rest/api/v3/ip_address_management/model_list_ip_pool_200_response.go new file mode 100644 index 00000000..8e432462 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_ip_pool_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListIpPool200Response struct for ListIpPool200Response +type ListIpPool200Response struct { + Result *[]ListIpPool200ResponseResultInner `json:"result,omitempty"` + Metadata *ListIpPool200ResponseMetadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_ip_pool_200_response__metadata.go b/rest/api/v3/ip_address_management/model_list_ip_pool_200_response__metadata.go new file mode 100644 index 00000000..1d7363c6 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_ip_pool_200_response__metadata.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListIpPool200ResponseMetadata struct for ListIpPool200ResponseMetadata +type ListIpPool200ResponseMetadata struct { + NextParams *ListIpPool200ResponseMetadataNextParams `json:"next_params,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_ip_pool_200_response__metadata_next_params.go b/rest/api/v3/ip_address_management/model_list_ip_pool_200_response__metadata_next_params.go new file mode 100644 index 00000000..7b965b61 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_ip_pool_200_response__metadata_next_params.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListIpPool200ResponseMetadataNextParams A collection of fields that can be used to work the endpoint. +type ListIpPool200ResponseMetadataNextParams struct { + // Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `after_key` cannot be used in combination with the `before_key` parameter. + AfterKey *string `json:"after_key,omitempty"` + // The IP address specified in the request. This parameter will be returned only if it was specified in the request. + Ip *string `json:"ip,omitempty"` + // The `limit` specified in the request. This parameter will be included only if it was specified in the request. This is not the default limit enforced by the API. + Limit *string `json:"limit,omitempty"` + // The region to which the IP address is assigned. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. + Region *Region4 `json:"region,omitempty"` + // Indicates whether or not to include the IP address's region. This property will only be returned if the `include_region` query parameter is included and set to `true` as part of the API request. + IncludeRegion *string `json:"include_region,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_ip_pool_200_response_result_inner.go b/rest/api/v3/ip_address_management/model_list_ip_pool_200_response_result_inner.go new file mode 100644 index 00000000..002e0453 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_ip_pool_200_response_result_inner.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListIpPool200ResponseResultInner struct for ListIpPool200ResponseResultInner +type ListIpPool200ResponseResultInner struct { + // The name of the IP Pool. + Name *string `json:"name,omitempty"` + // The unique ID of the IP Pool. + Id *string `json:"id,omitempty"` + // An array of the unique regions of all the IP addresses returned within the IP pool. + Regions *[]Items `json:"regions,omitempty"` + // A sample list of IP addresses associated with the IP Pool. The sample is limited to 10 results. + IpsPreview *[]string `json:"ips_preview,omitempty"` + // The total number of IP addresses in the IP Pool. An IP Pool can have a maximum of 100 associated IP addresses. + TotalIpCount *int32 `json:"total_ip_count,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response.go b/rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response.go new file mode 100644 index 00000000..90af39cf --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSubUserAssignedToIp200Response struct for ListSubUserAssignedToIp200Response +type ListSubUserAssignedToIp200Response struct { + // An array of Subuser IDs that have been assigned the specified IP address. + Result *[]string `json:"result,omitempty"` + Metadata *ListSubUserAssignedToIp200ResponseMetadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response__metadata.go b/rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response__metadata.go new file mode 100644 index 00000000..5b8c875a --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response__metadata.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSubUserAssignedToIp200ResponseMetadata struct for ListSubUserAssignedToIp200ResponseMetadata +type ListSubUserAssignedToIp200ResponseMetadata struct { + NextParams *ListSubUserAssignedToIp200ResponseMetadataNextParams `json:"next_params,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response__metadata_next_params.go b/rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response__metadata_next_params.go new file mode 100644 index 00000000..4f1dad9c --- /dev/null +++ b/rest/api/v3/ip_address_management/model_list_sub_user_assigned_to_ip_200_response__metadata_next_params.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSubUserAssignedToIp200ResponseMetadataNextParams A collection of fields that can be used to work the endpoint. +type ListSubUserAssignedToIp200ResponseMetadataNextParams struct { + // Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. The `after_key` cannot be used in combination with the `before_key` parameter. + AfterKey *string `json:"after_key,omitempty"` + // The `limit` specified in the request. This parameter will be included only if it was specified in the request. This is not the default limit enforced by the API. + Limit *string `json:"limit,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_region.go b/rest/api/v3/ip_address_management/model_region.go new file mode 100644 index 00000000..5821628d --- /dev/null +++ b/rest/api/v3/ip_address_management/model_region.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Region the model 'Region' +type Region string + +// List of Region +const ( + REGION_EU Region = "eu" + REGION_US Region = "us" +) diff --git a/rest/api/v3/ip_address_management/model_region1.go b/rest/api/v3/ip_address_management/model_region1.go new file mode 100644 index 00000000..a6404f11 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_region1.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Region1 the model 'Region1' +type Region1 string + +// List of Region1 +const ( + REGION1_ALL Region1 = "all" + REGION1_US Region1 = "us" + REGION1_EU Region1 = "eu" +) diff --git a/rest/api/v3/ip_address_management/model_region2.go b/rest/api/v3/ip_address_management/model_region2.go new file mode 100644 index 00000000..ec82c157 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_region2.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Region2 the model 'Region2' +type Region2 string + +// List of Region2 +const ( + REGION2_EU Region2 = "eu" + REGION2_US Region2 = "us" +) diff --git a/rest/api/v3/ip_address_management/model_region3.go b/rest/api/v3/ip_address_management/model_region3.go new file mode 100644 index 00000000..ea2e6c10 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_region3.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Region3 the model 'Region3' +type Region3 string + +// List of Region3 +const ( + REGION3_EU Region3 = "eu" + REGION3_US Region3 = "us" +) diff --git a/rest/api/v3/ip_address_management/model_region4.go b/rest/api/v3/ip_address_management/model_region4.go new file mode 100644 index 00000000..9ccd77db --- /dev/null +++ b/rest/api/v3/ip_address_management/model_region4.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Region4 the model 'Region4' +type Region4 string + +// List of Region4 +const ( + REGION4_ALL Region4 = "all" + REGION4_US Region4 = "us" + REGION4_EU Region4 = "eu" +) diff --git a/rest/api/v3/ip_address_management/model_region5.go b/rest/api/v3/ip_address_management/model_region5.go new file mode 100644 index 00000000..888ec48e --- /dev/null +++ b/rest/api/v3/ip_address_management/model_region5.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Region5 the model 'Region5' +type Region5 string + +// List of Region5 +const ( + REGION5_US Region5 = "us" + REGION5_EU Region5 = "eu" +) diff --git a/rest/api/v3/ip_address_management/model_region6.go b/rest/api/v3/ip_address_management/model_region6.go new file mode 100644 index 00000000..df05d87e --- /dev/null +++ b/rest/api/v3/ip_address_management/model_region6.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Region6 the model 'Region6' +type Region6 string + +// List of Region6 +const ( + REGION6_EU Region6 = "eu" + REGION6_US Region6 = "us" +) diff --git a/rest/api/v3/ip_address_management/model_region7.go b/rest/api/v3/ip_address_management/model_region7.go new file mode 100644 index 00000000..e6136ec0 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_region7.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Region7 the model 'Region7' +type Region7 string + +// List of Region7 +const ( + REGION7_ALL Region7 = "all" + REGION7_EU Region7 = "eu" + REGION7_US Region7 = "us" +) diff --git a/rest/api/v3/ip_address_management/model_update_ip_200_response.go b/rest/api/v3/ip_address_management/model_update_ip_200_response.go new file mode 100644 index 00000000..de980353 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_update_ip_200_response.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateIp200Response struct for UpdateIp200Response +type UpdateIp200Response struct { + // The IP address that was updated. + Ip *string `json:"ip,omitempty"` + // Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). + IsAutoWarmup *bool `json:"is_auto_warmup,omitempty"` + // Indicates if a parent on the account is able to send email from the IP address. This parameter is returned only if the IP address is parent assigned. + IsParentAssigned *bool `json:"is_parent_assigned,omitempty"` + // An array of Subuser IDs the IP address was assigned to. This parameter is returned only if the IP address is enabled. + IsEnabled *bool `json:"is_enabled,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_update_ip_pool_200_response.go b/rest/api/v3/ip_address_management/model_update_ip_pool_200_response.go new file mode 100644 index 00000000..53bb550b --- /dev/null +++ b/rest/api/v3/ip_address_management/model_update_ip_pool_200_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateIpPool200Response struct for UpdateIpPool200Response +type UpdateIpPool200Response struct { + // The name assigned to the IP Pool. + Name *string `json:"name,omitempty"` + // The unique ID of the IP Pool. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/ip_address_management/model_update_ip_pool_request.go b/rest/api/v3/ip_address_management/model_update_ip_pool_request.go new file mode 100644 index 00000000..28600e4e --- /dev/null +++ b/rest/api/v3/ip_address_management/model_update_ip_pool_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateIpPoolRequest struct for UpdateIpPoolRequest +type UpdateIpPoolRequest struct { + // The name to assign to the IP Pool. An IP Pool name cannot begin with a space or period. + Name string `json:"name"` +} diff --git a/rest/api/v3/ip_address_management/model_update_ip_request.go b/rest/api/v3/ip_address_management/model_update_ip_request.go new file mode 100644 index 00000000..1d627eb2 --- /dev/null +++ b/rest/api/v3/ip_address_management/model_update_ip_request.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address Management API +* The Twilio SendGrid IP Address Management API combines functionality that was previously split between the Twilio SendGrid [IP Address API](https://docs.sendgrid.com/api-reference/ip-address) and [IP Pools API](https://docs.sendgrid.com/api-reference/ip-pools). This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateIpRequest struct for UpdateIpRequest +type UpdateIpRequest struct { + // Indicates if the IP address is set to automatically [warmup](https://docs.sendgrid.com/ui/sending-email/warming-up-an-ip-address). + IsAutoWarmup *bool `json:"is_auto_warmup,omitempty"` + // Indicates if a parent on the account is able to send email from the IP address. + IsParentAssigned *bool `json:"is_parent_assigned,omitempty"` + // Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is `null` for Twilio SendGrid IP addresses. + IsEnabled *bool `json:"is_enabled,omitempty"` +} diff --git a/rest/api/v3/ip_warmup/README.md b/rest/api/v3/ip_warmup/README.md new file mode 100644 index 00000000..3658d1ab --- /dev/null +++ b/rest/api/v3/ip_warmup/README.md @@ -0,0 +1,76 @@ +# Go API client for + +The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. + +SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. + +See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. + +You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:01.498963+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*GetWarmUpIp* | [**GetWarmUpIp**](docs/GetWarmUpIp.md#getwarmupip) | **Get** /v3/ips/warmup/{IpAddress} | Retrieve the warmup status for a specific IP address +*ListWarmUpIp* | [**ListWarmUpIp**](docs/ListWarmUpIp.md#listwarmupip) | **Get** /v3/ips/warmup | Retrieve all IPs currently in warmup +*StopIpWarmUp* | [**StopIpWarmUp**](docs/StopIpWarmUp.md#stopipwarmup) | **Delete** /v3/ips/warmup/{IpAddress} | Stop warming up an IP address +*WarmUpIp* | [**WarmUpIp**](docs/WarmUpIp.md#warmupip) | **Post** /v3/ips/warmup | Start warming up an IP address + + +## Documentation For Models + + - [GetWarmUpIp404Response](GetWarmUpIp404Response.md) + - [GetWarmUpIp404ResponseErrorsInner](GetWarmUpIp404ResponseErrorsInner.md) + - [IpWarmup200Inner](IpWarmup200Inner.md) + - [StopIpWarmUp404Response](StopIpWarmUp404Response.md) + - [StopIpWarmUp404ResponseErrorsInner](StopIpWarmUp404ResponseErrorsInner.md) + - [WarmUpIp404Response](WarmUpIp404Response.md) + - [WarmUpIp404ResponseErrorsInner](WarmUpIp404ResponseErrorsInner.md) + - [WarmUpIpRequest](WarmUpIpRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/ip_warmup/api_get_warm_up_ip.go b/rest/api/v3/ip_warmup/api_get_warm_up_ip.go new file mode 100644 index 00000000..59cc809c --- /dev/null +++ b/rest/api/v3/ip_warmup/api_get_warm_up_ip.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Warmup API +* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetWarmUpIpParam struct { + // The IP address that you want to retrieve the warmup status for. + IpAddress *string `json:"ip_address"` +} + +func (params *GetWarmUpIpParam) SetIpAddress(IpAddress string) *GetWarmUpIpParam { + params.IpAddress = &IpAddress + return params +} + +// **This endpoint allows you to retrieve the warmup status for a specific IP address.** You can retrieve all of your warming IPs using the \"Retrieve all IPs currently in warmup\" endpoint. +func (c *ApiService) GetWarmUpIp(params *GetWarmUpIpParam) (interface{}, error) { + path := "/v3/ips/warmup/{IpAddress}" + if params != nil && params.IpAddress != nil { + path = strings.Replace(path, "{"+"IpAddress"+"}", *params.IpAddress, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]IpWarmup200Inner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &GetWarmUpIp404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ip_warmup/api_list_warm_up_ip.go b/rest/api/v3/ip_warmup/api_list_warm_up_ip.go new file mode 100644 index 00000000..d5c3a84d --- /dev/null +++ b/rest/api/v3/ip_warmup/api_list_warm_up_ip.go @@ -0,0 +1,49 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Warmup API +* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListWarmUpIpParam struct { +} + +// **This endpoint allows you to retrieve all of your IP addresses that are currently warming up.** +func (c *ApiService) ListWarmUpIp() (interface{}, error) { + path := "/v3/ips/warmup" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]IpWarmup200Inner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ip_warmup/api_service.go b/rest/api/v3/ip_warmup/api_service.go new file mode 100644 index 00000000..53f0581d --- /dev/null +++ b/rest/api/v3/ip_warmup/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Warmup API +* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/ip_warmup/api_stop_ip_warm_up.go b/rest/api/v3/ip_warmup/api_stop_ip_warm_up.go new file mode 100644 index 00000000..a907c869 --- /dev/null +++ b/rest/api/v3/ip_warmup/api_stop_ip_warm_up.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Warmup API +* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type StopIpWarmUpParam struct { + // The IP address that you want to retrieve the warmup status for. + IpAddress *string `json:"ip_address"` +} + +func (params *StopIpWarmUpParam) SetIpAddress(IpAddress string) *StopIpWarmUpParam { + params.IpAddress = &IpAddress + return params +} + +// **This endpoint allows you to remove an IP address from warmup mode.** Your request will return a 204 status code if the specified IP was successfully removed from warmup mode. To retrieve details of the IP’s warmup status *before* removing it from warmup mode, call the \"Retrieve the warmpup status for a specific IP address\" endpoint. +func (c *ApiService) StopIpWarmUp(params *StopIpWarmUpParam) (interface{}, error) { + path := "/v3/ips/warmup/{IpAddress}" + if params != nil && params.IpAddress != nil { + path = strings.Replace(path, "{"+"IpAddress"+"}", *params.IpAddress, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &StopIpWarmUp404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ip_warmup/api_warm_up_ip.go b/rest/api/v3/ip_warmup/api_warm_up_ip.go new file mode 100644 index 00000000..9e0947f8 --- /dev/null +++ b/rest/api/v3/ip_warmup/api_warm_up_ip.go @@ -0,0 +1,73 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Warmup API +* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type WarmUpIpParam struct { + // + WarmUpIpRequest *WarmUpIpRequest `json:"WarmUpIpRequest,omitempty"` +} + +func (params *WarmUpIpParam) SetWarmUpIpRequest(WarmUpIpRequest WarmUpIpRequest) *WarmUpIpParam { + params.WarmUpIpRequest = &WarmUpIpRequest + return params +} + +// **This endpoint allows you to put an IP address into warmup mode.** +func (c *ApiService) WarmUpIp(params *WarmUpIpParam) (interface{}, error) { + path := "/v3/ips/warmup" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.WarmUpIpRequest != nil { + b, err := json.Marshal(*params.WarmUpIpRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]IpWarmup200Inner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &WarmUpIp404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ip_warmup/docs/GetWarmUpIp.md b/rest/api/v3/ip_warmup/docs/GetWarmUpIp.md new file mode 100644 index 00000000..0339c3f5 --- /dev/null +++ b/rest/api/v3/ip_warmup/docs/GetWarmUpIp.md @@ -0,0 +1,51 @@ +# GetWarmUpIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetWarmUpIp**](GetWarmUpIp.md#GetWarmUpIp) | **Get** /v3/ips/warmup/{IpAddress} | Retrieve the warmup status for a specific IP address + + + +## GetWarmUpIp + +> []IpWarmup200Inner GetWarmUpIp(ctx, IpAddress) + +Retrieve the warmup status for a specific IP address + +**This endpoint allows you to retrieve the warmup status for a specific IP address.** You can retrieve all of your warming IPs using the \"Retrieve all IPs currently in warmup\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**IpAddress** | **string** | The IP address that you want to retrieve the warmup status for. + +### Other Parameters + +Other parameters are passed through a pointer to a GetWarmUpIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**[]IpWarmup200Inner**](IpWarmup200Inner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_warmup/docs/GetWarmUpIp404Response.md b/rest/api/v3/ip_warmup/docs/GetWarmUpIp404Response.md new file mode 100644 index 00000000..9126d1b7 --- /dev/null +++ b/rest/api/v3/ip_warmup/docs/GetWarmUpIp404Response.md @@ -0,0 +1,11 @@ +# GetWarmUpIp404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]GetWarmUpIp404ResponseErrorsInner**](GetWarmUpIp404ResponseErrorsInner.md) | The errors that were encountered. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_warmup/docs/GetWarmUpIp404ResponseErrorsInner.md b/rest/api/v3/ip_warmup/docs/GetWarmUpIp404ResponseErrorsInner.md new file mode 100644 index 00000000..64076c11 --- /dev/null +++ b/rest/api/v3/ip_warmup/docs/GetWarmUpIp404ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# GetWarmUpIp404ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | |[optional] +**Message** | **string** | A message explaining why the warmup status could not be retrieved. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_warmup/docs/IpWarmup200Inner.md b/rest/api/v3/ip_warmup/docs/IpWarmup200Inner.md new file mode 100644 index 00000000..7a2a6aa0 --- /dev/null +++ b/rest/api/v3/ip_warmup/docs/IpWarmup200Inner.md @@ -0,0 +1,12 @@ +# IpWarmup200Inner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | The IP address. | +**StartDate** | **int32** | A Unix timestamp indicating when the IP address entered warmup mode. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_warmup/docs/ListWarmUpIp.md b/rest/api/v3/ip_warmup/docs/ListWarmUpIp.md new file mode 100644 index 00000000..5944ebf3 --- /dev/null +++ b/rest/api/v3/ip_warmup/docs/ListWarmUpIp.md @@ -0,0 +1,44 @@ +# ListWarmUpIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListWarmUpIp**](ListWarmUpIp.md#ListWarmUpIp) | **Get** /v3/ips/warmup | Retrieve all IPs currently in warmup + + + +## ListWarmUpIp + +> []IpWarmup200Inner ListWarmUpIp(ctx, ) + +Retrieve all IPs currently in warmup + +**This endpoint allows you to retrieve all of your IP addresses that are currently warming up.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListWarmUpIpParams struct + + +### Return type + +[**[]IpWarmup200Inner**](IpWarmup200Inner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_warmup/docs/StopIpWarmUp.md b/rest/api/v3/ip_warmup/docs/StopIpWarmUp.md new file mode 100644 index 00000000..e8b5e45b --- /dev/null +++ b/rest/api/v3/ip_warmup/docs/StopIpWarmUp.md @@ -0,0 +1,51 @@ +# StopIpWarmUp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**StopIpWarmUp**](StopIpWarmUp.md#StopIpWarmUp) | **Delete** /v3/ips/warmup/{IpAddress} | Stop warming up an IP address + + + +## StopIpWarmUp + +> map[string]interface{} StopIpWarmUp(ctx, IpAddress) + +Stop warming up an IP address + +**This endpoint allows you to remove an IP address from warmup mode.** Your request will return a 204 status code if the specified IP was successfully removed from warmup mode. To retrieve details of the IP’s warmup status *before* removing it from warmup mode, call the \"Retrieve the warmpup status for a specific IP address\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**IpAddress** | **string** | The IP address that you want to retrieve the warmup status for. + +### Other Parameters + +Other parameters are passed through a pointer to a StopIpWarmUpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_warmup/docs/StopIpWarmUp404Response.md b/rest/api/v3/ip_warmup/docs/StopIpWarmUp404Response.md new file mode 100644 index 00000000..2d45e893 --- /dev/null +++ b/rest/api/v3/ip_warmup/docs/StopIpWarmUp404Response.md @@ -0,0 +1,11 @@ +# StopIpWarmUp404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]StopIpWarmUp404ResponseErrorsInner**](StopIpWarmUp404ResponseErrorsInner.md) | The errors that were encountered. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_warmup/docs/StopIpWarmUp404ResponseErrorsInner.md b/rest/api/v3/ip_warmup/docs/StopIpWarmUp404ResponseErrorsInner.md new file mode 100644 index 00000000..e3f1a0e8 --- /dev/null +++ b/rest/api/v3/ip_warmup/docs/StopIpWarmUp404ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# StopIpWarmUp404ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | |[optional] +**Message** | **string** | A message explaining why the IP couldn't be removed from warmup. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_warmup/docs/WarmUpIp.md b/rest/api/v3/ip_warmup/docs/WarmUpIp.md new file mode 100644 index 00000000..336117c8 --- /dev/null +++ b/rest/api/v3/ip_warmup/docs/WarmUpIp.md @@ -0,0 +1,48 @@ +# WarmUpIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**WarmUpIp**](WarmUpIp.md#WarmUpIp) | **Post** /v3/ips/warmup | Start warming up an IP address + + + +## WarmUpIp + +> []IpWarmup200Inner WarmUpIp(ctx, optional) + +Start warming up an IP address + +**This endpoint allows you to put an IP address into warmup mode.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a WarmUpIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**WarmUpIpRequest** | [**WarmUpIpRequest**](WarmUpIpRequest.md) | + +### Return type + +[**[]IpWarmup200Inner**](IpWarmup200Inner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ip_warmup/docs/WarmUpIp404Response.md b/rest/api/v3/ip_warmup/docs/WarmUpIp404Response.md new file mode 100644 index 00000000..7c3164cf --- /dev/null +++ b/rest/api/v3/ip_warmup/docs/WarmUpIp404Response.md @@ -0,0 +1,11 @@ +# WarmUpIp404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]WarmUpIp404ResponseErrorsInner**](WarmUpIp404ResponseErrorsInner.md) | The errors that were encountered. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_warmup/docs/WarmUpIp404ResponseErrorsInner.md b/rest/api/v3/ip_warmup/docs/WarmUpIp404ResponseErrorsInner.md new file mode 100644 index 00000000..82a7d9bc --- /dev/null +++ b/rest/api/v3/ip_warmup/docs/WarmUpIp404ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# WarmUpIp404ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | |[optional] +**Message** | **string** | A message explaining why the IP couldn't entered into warmup mode. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_warmup/docs/WarmUpIpRequest.md b/rest/api/v3/ip_warmup/docs/WarmUpIpRequest.md new file mode 100644 index 00000000..c929749a --- /dev/null +++ b/rest/api/v3/ip_warmup/docs/WarmUpIpRequest.md @@ -0,0 +1,11 @@ +# WarmUpIpRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | The IP address that you want to begin warming up. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ip_warmup/model_get_warm_up_ip_404_response.go b/rest/api/v3/ip_warmup/model_get_warm_up_ip_404_response.go new file mode 100644 index 00000000..f61bd268 --- /dev/null +++ b/rest/api/v3/ip_warmup/model_get_warm_up_ip_404_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Warmup API +* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetWarmUpIp404Response struct for GetWarmUpIp404Response +type GetWarmUpIp404Response struct { + // The errors that were encountered. + Errors *[]GetWarmUpIp404ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/ip_warmup/model_get_warm_up_ip_404_response_errors_inner.go b/rest/api/v3/ip_warmup/model_get_warm_up_ip_404_response_errors_inner.go new file mode 100644 index 00000000..a8376a66 --- /dev/null +++ b/rest/api/v3/ip_warmup/model_get_warm_up_ip_404_response_errors_inner.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Warmup API +* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetWarmUpIp404ResponseErrorsInner struct for GetWarmUpIp404ResponseErrorsInner +type GetWarmUpIp404ResponseErrorsInner struct { + Field *string `json:"field,omitempty"` + // A message explaining why the warmup status could not be retrieved. + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/ip_warmup/model_ip_warmup200_inner.go b/rest/api/v3/ip_warmup/model_ip_warmup200_inner.go new file mode 100644 index 00000000..f25f10fe --- /dev/null +++ b/rest/api/v3/ip_warmup/model_ip_warmup200_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Warmup API +* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IpWarmup200Inner struct for IpWarmup200Inner +type IpWarmup200Inner struct { + // The IP address. + Ip string `json:"ip"` + // A Unix timestamp indicating when the IP address entered warmup mode. + StartDate int32 `json:"start_date"` +} diff --git a/rest/api/v3/ip_warmup/model_stop_ip_warm_up_404_response.go b/rest/api/v3/ip_warmup/model_stop_ip_warm_up_404_response.go new file mode 100644 index 00000000..040be57a --- /dev/null +++ b/rest/api/v3/ip_warmup/model_stop_ip_warm_up_404_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Warmup API +* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// StopIpWarmUp404Response struct for StopIpWarmUp404Response +type StopIpWarmUp404Response struct { + // The errors that were encountered. + Errors *[]StopIpWarmUp404ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/ip_warmup/model_stop_ip_warm_up_404_response_errors_inner.go b/rest/api/v3/ip_warmup/model_stop_ip_warm_up_404_response_errors_inner.go new file mode 100644 index 00000000..050ce700 --- /dev/null +++ b/rest/api/v3/ip_warmup/model_stop_ip_warm_up_404_response_errors_inner.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Warmup API +* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// StopIpWarmUp404ResponseErrorsInner struct for StopIpWarmUp404ResponseErrorsInner +type StopIpWarmUp404ResponseErrorsInner struct { + Field *string `json:"field,omitempty"` + // A message explaining why the IP couldn't be removed from warmup. + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/ip_warmup/model_warm_up_ip_404_response.go b/rest/api/v3/ip_warmup/model_warm_up_ip_404_response.go new file mode 100644 index 00000000..64719fc9 --- /dev/null +++ b/rest/api/v3/ip_warmup/model_warm_up_ip_404_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Warmup API +* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// WarmUpIp404Response struct for WarmUpIp404Response +type WarmUpIp404Response struct { + // The errors that were encountered. + Errors *[]WarmUpIp404ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/ip_warmup/model_warm_up_ip_404_response_errors_inner.go b/rest/api/v3/ip_warmup/model_warm_up_ip_404_response_errors_inner.go new file mode 100644 index 00000000..745260ae --- /dev/null +++ b/rest/api/v3/ip_warmup/model_warm_up_ip_404_response_errors_inner.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Warmup API +* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// WarmUpIp404ResponseErrorsInner struct for WarmUpIp404ResponseErrorsInner +type WarmUpIp404ResponseErrorsInner struct { + Field *string `json:"field,omitempty"` + // A message explaining why the IP couldn't entered into warmup mode. + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/ip_warmup/model_warm_up_ip_request.go b/rest/api/v3/ip_warmup/model_warm_up_ip_request.go new file mode 100644 index 00000000..ac2c2bf4 --- /dev/null +++ b/rest/api/v3/ip_warmup/model_warm_up_ip_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Warmup API +* The Twilio SendGrid IP Warm Up API allows you to gradually increasing the volume of mail sent with a dedicated IP address according to a predetermined schedule. This gradual process helps to establish a reputation with ISPs (Internet Service Providers) as a legitimate email sender. SendGrid can automatically warm up dedicated IP addresses by limiting the amount of mail that can be sent through them per hour. The limit is determined by how long the IP address has been warming up. See the [warmup schedule](https://sendgrid.com/docs/ui/sending-email/warming-up-an-ip-address/#automated-ip-warmup-hourly-send-schedule) to learn how SendGrid limits your email traffic for IPs in warmup. You can also choose to use Twilio SendGrid's automated IP warmup for any of your IPs from the **IP Addresses** settings menu in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/ip_addresses). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// WarmUpIpRequest struct for WarmUpIpRequest +type WarmUpIpRequest struct { + // The IP address that you want to begin warming up. + Ip *string `json:"ip,omitempty"` +} diff --git a/rest/api/v3/ips/README.md b/rest/api/v3/ips/README.md new file mode 100644 index 00000000..6ee5f096 --- /dev/null +++ b/rest/api/v3/ips/README.md @@ -0,0 +1,95 @@ +# Go API client for + +The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:01.517402+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AddIp* | [**AddIp**](docs/AddIp.md#addip) | **Post** /v3/ips | Add IPs +*AddIpToIpPool* | [**AddIpToIpPool**](docs/AddIpToIpPool.md#addiptoippool) | **Post** /v3/ips/pools/{PoolName}/ips | Add an IP address to a pool +*CreateIpPool* | [**CreateIpPool**](docs/CreateIpPool.md#createippool) | **Post** /v3/ips/pools | Create an IP pool +*DeleteIpFromIpPool* | [**DeleteIpFromIpPool**](docs/DeleteIpFromIpPool.md#deleteipfromippool) | **Delete** /v3/ips/pools/{PoolName}/ips/{Ip} | Remove an IP address from a pool +*DeleteIpPool* | [**DeleteIpPool**](docs/DeleteIpPool.md#deleteippool) | **Delete** /v3/ips/pools/{PoolName} | Delete an IP pool +*GetIp* | [**GetIp**](docs/GetIp.md#getip) | **Get** /v3/ips/{IpAddress} | Retrieve all IP pools an IP address belongs to +*GetIpPool* | [**GetIpPool**](docs/GetIpPool.md#getippool) | **Get** /v3/ips/pools/{PoolName} | Retrieve all the IPs in a specified pool +*ListAssignedIp* | [**ListAssignedIp**](docs/ListAssignedIp.md#listassignedip) | **Get** /v3/ips/assigned | Retrieve all assigned IPs +*ListIp* | [**ListIp**](docs/ListIp.md#listip) | **Get** /v3/ips | Retrieve all IP addresses +*ListIpPool* | [**ListIpPool**](docs/ListIpPool.md#listippool) | **Get** /v3/ips/pools | Retrieve all IP pools +*ListRemainingIpCount* | [**ListRemainingIpCount**](docs/ListRemainingIpCount.md#listremainingipcount) | **Get** /v3/ips/remaining | Get remaining IPs count +*UpdateIpPool* | [**UpdateIpPool**](docs/UpdateIpPool.md#updateippool) | **Put** /v3/ips/pools/{PoolName} | Rename an IP pool + + +## Documentation For Models + + - [AddIp201Response](AddIp201Response.md) + - [AddIp201ResponseIpsInner](AddIp201ResponseIpsInner.md) + - [AddIpRequest](AddIpRequest.md) + - [AddIpToIpPool201Response](AddIpToIpPool201Response.md) + - [AddIpToIpPool404Response](AddIpToIpPool404Response.md) + - [AddIpToIpPool404ResponseErrorsInner](AddIpToIpPool404ResponseErrorsInner.md) + - [AddIpToIpPoolRequest](AddIpToIpPoolRequest.md) + - [CreateIpPoolRequest](CreateIpPoolRequest.md) + - [DeleteIpFromIpPool404Response](DeleteIpFromIpPool404Response.md) + - [DeleteIpPool404Response](DeleteIpPool404Response.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [GetIp200Response](GetIp200Response.md) + - [GetIpPool200Response](GetIpPool200Response.md) + - [GetIpPool404Response](GetIpPool404Response.md) + - [GetIpPool404ResponseErrorsInner](GetIpPool404ResponseErrorsInner.md) + - [IpPools200](IpPools200.md) + - [ListAssignedIp200ResponseInner](ListAssignedIp200ResponseInner.md) + - [ListIp200ResponseInner](ListIp200ResponseInner.md) + - [ListRemainingIpCount200Response](ListRemainingIpCount200Response.md) + - [ListRemainingIpCount200ResponseResultsInner](ListRemainingIpCount200ResponseResultsInner.md) + - [SortByDirection](SortByDirection.md) + - [UpdateIpPool404Response](UpdateIpPool404Response.md) + - [UpdateIpPool404ResponseErrorsInner](UpdateIpPool404ResponseErrorsInner.md) + - [UpdateIpPoolRequest](UpdateIpPoolRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/ips/api_add_ip.go b/rest/api/v3/ips/api_add_ip.go new file mode 100644 index 00000000..aa9d16b6 --- /dev/null +++ b/rest/api/v3/ips/api_add_ip.go @@ -0,0 +1,73 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type AddIpParam struct { + // + AddIpRequest *AddIpRequest `json:"AddIpRequest,omitempty"` +} + +func (params *AddIpParam) SetAddIpRequest(AddIpRequest AddIpRequest) *AddIpParam { + params.AddIpRequest = &AddIpRequest + return params +} + +// **This endpoint is for adding a(n) IP Address(es) to your account.** +func (c *ApiService) AddIp(params *AddIpParam) (interface{}, error) { + path := "/v3/ips" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.AddIpRequest != nil { + b, err := json.Marshal(*params.AddIpRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &AddIp201Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ips/api_add_ip_to_ip_pool.go b/rest/api/v3/ips/api_add_ip_to_ip_pool.go new file mode 100644 index 00000000..4c78e14c --- /dev/null +++ b/rest/api/v3/ips/api_add_ip_to_ip_pool.go @@ -0,0 +1,84 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type AddIpToIpPoolParam struct { + // The name of the IP pool you want to add the address to. If the name contains spaces, they must be URL encoded (e.g., \"Test Pool\" becomes \"Test%20Pool\"). + PoolName *string `json:"pool_name"` + // + AddIpToIpPoolRequest *AddIpToIpPoolRequest `json:"AddIpToIpPoolRequest,omitempty"` +} + +func (params *AddIpToIpPoolParam) SetPoolName(PoolName string) *AddIpToIpPoolParam { + params.PoolName = &PoolName + return params +} +func (params *AddIpToIpPoolParam) SetAddIpToIpPoolRequest(AddIpToIpPoolRequest AddIpToIpPoolRequest) *AddIpToIpPoolParam { + params.AddIpToIpPoolRequest = &AddIpToIpPoolRequest + return params +} + +// **This endpoint allows you to add an IP address to an IP pool.** You can add the same IP address to multiple pools. It may take up to 60 seconds for your IP address to be added to a pool after your request is made. Before you can add an IP to a pool, you need to activate it in your SendGrid account: 1. Log into your SendGrid account. 1. Navigate to **Settings** and then select **IP Addresses**. 1. Find the IP address you want to activate and then click **Edit**. 1. Check **Allow my account to send mail using this IP address**. 1. Click **Save**. You can retrieve all of your available IP addresses from the \"Retrieve all IP addresses\" endpoint. +func (c *ApiService) AddIpToIpPool(params *AddIpToIpPoolParam) (interface{}, error) { + path := "/v3/ips/pools/{PoolName}/ips" + if params != nil && params.PoolName != nil { + path = strings.Replace(path, "{"+"PoolName"+"}", *params.PoolName, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.AddIpToIpPoolRequest != nil { + b, err := json.Marshal(*params.AddIpToIpPoolRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &AddIpToIpPool201Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &AddIpToIpPool404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ips/api_create_ip_pool.go b/rest/api/v3/ips/api_create_ip_pool.go new file mode 100644 index 00000000..997942be --- /dev/null +++ b/rest/api/v3/ips/api_create_ip_pool.go @@ -0,0 +1,65 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateIpPoolParam struct { + // + CreateIpPoolRequest *CreateIpPoolRequest `json:"CreateIpPoolRequest,omitempty"` +} + +func (params *CreateIpPoolParam) SetCreateIpPoolRequest(CreateIpPoolRequest CreateIpPoolRequest) *CreateIpPoolParam { + params.CreateIpPoolRequest = &CreateIpPoolRequest + return params +} + +// **This endpoint allows you to create an IP pool.** Before you can create an IP pool, you need to activate the IP in your SendGrid account: 1. Log into your SendGrid account. 1. Navigate to **Settings** and then select **IP Addresses**. 1. Find the IP address you want to activate and then click **Edit**. 1. Check **Allow my account to send mail using this IP address**. 1. Click **Save**. +func (c *ApiService) CreateIpPool(params *CreateIpPoolParam) (interface{}, error) { + path := "/v3/ips/pools" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateIpPoolRequest != nil { + b, err := json.Marshal(*params.CreateIpPoolRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &IpPools200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ips/api_delete_ip_from_ip_pool.go b/rest/api/v3/ips/api_delete_ip_from_ip_pool.go new file mode 100644 index 00000000..4588b006 --- /dev/null +++ b/rest/api/v3/ips/api_delete_ip_from_ip_pool.go @@ -0,0 +1,78 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteIpFromIpPoolParam struct { + // The name of the IP pool that you are removing the IP address from. + PoolName *string `json:"pool_name"` + // The IP address that you wish to remove. + Ip *string `json:"ip"` +} + +func (params *DeleteIpFromIpPoolParam) SetPoolName(PoolName string) *DeleteIpFromIpPoolParam { + params.PoolName = &PoolName + return params +} +func (params *DeleteIpFromIpPoolParam) SetIp(Ip string) *DeleteIpFromIpPoolParam { + params.Ip = &Ip + return params +} + +// **This endpoint allows you to remove an IP address from an IP pool.** +func (c *ApiService) DeleteIpFromIpPool(params *DeleteIpFromIpPoolParam) (interface{}, error) { + path := "/v3/ips/pools/{PoolName}/ips/{Ip}" + if params != nil && params.PoolName != nil { + path = strings.Replace(path, "{"+"PoolName"+"}", *params.PoolName, -1) + } + if params != nil && params.Ip != nil { + path = strings.Replace(path, "{"+"Ip"+"}", *params.Ip, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &DeleteIpFromIpPool404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ips/api_delete_ip_pool.go b/rest/api/v3/ips/api_delete_ip_pool.go new file mode 100644 index 00000000..8284146e --- /dev/null +++ b/rest/api/v3/ips/api_delete_ip_pool.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteIpPoolParam struct { + // The name of the IP pool that you want to retrieve the IP addresses for. + PoolName *string `json:"pool_name"` +} + +func (params *DeleteIpPoolParam) SetPoolName(PoolName string) *DeleteIpPoolParam { + params.PoolName = &PoolName + return params +} + +// **This endpoint allows you to delete an IP pool.** +func (c *ApiService) DeleteIpPool(params *DeleteIpPoolParam) (interface{}, error) { + path := "/v3/ips/pools/{PoolName}" + if params != nil && params.PoolName != nil { + path = strings.Replace(path, "{"+"PoolName"+"}", *params.PoolName, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &DeleteIpPool404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ips/api_get_ip.go b/rest/api/v3/ips/api_get_ip.go new file mode 100644 index 00000000..da116eb4 --- /dev/null +++ b/rest/api/v3/ips/api_get_ip.go @@ -0,0 +1,61 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetIpParam struct { + // The IP address you are retrieving the IP pools for. + IpAddress *string `json:"ip_address"` +} + +func (params *GetIpParam) SetIpAddress(IpAddress string) *GetIpParam { + params.IpAddress = &IpAddress + return params +} + +// **This endpoint allows you to see which IP pools a particular IP address has been added to.** The same IP address can be added to multiple IP pools. A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is based on the aggregate performance of all the senders who use it. +func (c *ApiService) GetIp(params *GetIpParam) (interface{}, error) { + path := "/v3/ips/{IpAddress}" + if params != nil && params.IpAddress != nil { + path = strings.Replace(path, "{"+"IpAddress"+"}", *params.IpAddress, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetIp200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ips/api_get_ip_pool.go b/rest/api/v3/ips/api_get_ip_pool.go new file mode 100644 index 00000000..89c54266 --- /dev/null +++ b/rest/api/v3/ips/api_get_ip_pool.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetIpPoolParam struct { + // The name of the IP pool that you want to retrieve the IP addresses for. + PoolName *string `json:"pool_name"` +} + +func (params *GetIpPoolParam) SetPoolName(PoolName string) *GetIpPoolParam { + params.PoolName = &PoolName + return params +} + +// **This endpoint allows you to get all of the IP addresses that are in a specific IP pool.** +func (c *ApiService) GetIpPool(params *GetIpPoolParam) (interface{}, error) { + path := "/v3/ips/pools/{PoolName}" + if params != nil && params.PoolName != nil { + path = strings.Replace(path, "{"+"PoolName"+"}", *params.PoolName, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetIpPool200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &GetIpPool404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ips/api_list_assigned_ip.go b/rest/api/v3/ips/api_list_assigned_ip.go new file mode 100644 index 00000000..2fc20788 --- /dev/null +++ b/rest/api/v3/ips/api_list_assigned_ip.go @@ -0,0 +1,49 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListAssignedIpParam struct { +} + +// **This endpoint allows you to retrieve only assigned IP addresses.** A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is based on the aggregate performance of all the senders who use it. +func (c *ApiService) ListAssignedIp() (interface{}, error) { + path := "/v3/ips/assigned" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListAssignedIp200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ips/api_list_ip.go b/rest/api/v3/ips/api_list_ip.go new file mode 100644 index 00000000..1837af8b --- /dev/null +++ b/rest/api/v3/ips/api_list_ip.go @@ -0,0 +1,106 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListIpParam struct { + // The IP address to get + Ip *string `json:"ip,omitempty"` + // Should we exclude reverse DNS records (whitelabels)? + ExcludeWhitelabels *bool `json:"exclude_whitelabels,omitempty"` + // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. + Limit *int32 `json:"limit,omitempty"` + // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + Offset *int32 `json:"offset,omitempty"` + // The subuser you are requesting for. + Subuser *string `json:"subuser,omitempty"` + // The direction to sort the results. + SortByDirection *SortByDirection `json:"sort_by_direction,omitempty"` +} + +func (params *ListIpParam) SetIp(Ip string) *ListIpParam { + params.Ip = &Ip + return params +} +func (params *ListIpParam) SetExcludeWhitelabels(ExcludeWhitelabels bool) *ListIpParam { + params.ExcludeWhitelabels = &ExcludeWhitelabels + return params +} +func (params *ListIpParam) SetLimit(Limit int32) *ListIpParam { + params.Limit = &Limit + return params +} +func (params *ListIpParam) SetOffset(Offset int32) *ListIpParam { + params.Offset = &Offset + return params +} +func (params *ListIpParam) SetSubuser(Subuser string) *ListIpParam { + params.Subuser = &Subuser + return params +} +func (params *ListIpParam) SetSortByDirection(SortByDirection SortByDirection) *ListIpParam { + params.SortByDirection = &SortByDirection + return params +} + +// **This endpoint allows you to retrieve a paginated list of all assigned and unassigned IPs.** Response includes warm up status, pools, assigned subusers, and reverse DNS info. The start_date field corresponds to when warmup started for that IP. A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is determined by the aggregate performance of all email traffic sent from it. You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. +func (c *ApiService) ListIp(params *ListIpParam) (interface{}, error) { + path := "/v3/ips" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Ip != nil { + data.Set("ip", *params.Ip) + } + if params != nil && params.ExcludeWhitelabels != nil { + data.Set("exclude_whitelabels", fmt.Sprint(*params.ExcludeWhitelabels)) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + if params != nil && params.Subuser != nil { + data.Set("subuser", *params.Subuser) + } + if params != nil && params.SortByDirection != nil { + data.Set("sort_by_direction", fmt.Sprint(*params.SortByDirection)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListIp200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ips/api_list_ip_pool.go b/rest/api/v3/ips/api_list_ip_pool.go new file mode 100644 index 00000000..3f400732 --- /dev/null +++ b/rest/api/v3/ips/api_list_ip_pool.go @@ -0,0 +1,49 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListIpPoolParam struct { +} + +// **This endpoint allows you to get all of your IP pools.** +func (c *ApiService) ListIpPool() (interface{}, error) { + path := "/v3/ips/pools" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]IpPools200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ips/api_list_remaining_ip_count.go b/rest/api/v3/ips/api_list_remaining_ip_count.go new file mode 100644 index 00000000..20a0a88c --- /dev/null +++ b/rest/api/v3/ips/api_list_remaining_ip_count.go @@ -0,0 +1,49 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListRemainingIpCountParam struct { +} + +// **This endpoint gets amount of IP Addresses that can still be created during a given period and the price of those IPs.** +func (c *ApiService) ListRemainingIpCount() (interface{}, error) { + path := "/v3/ips/remaining" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListRemainingIpCount200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ips/api_service.go b/rest/api/v3/ips/api_service.go new file mode 100644 index 00000000..63970833 --- /dev/null +++ b/rest/api/v3/ips/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/ips/api_update_ip_pool.go b/rest/api/v3/ips/api_update_ip_pool.go new file mode 100644 index 00000000..1dfd77a5 --- /dev/null +++ b/rest/api/v3/ips/api_update_ip_pool.go @@ -0,0 +1,84 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateIpPoolParam struct { + // The name of the IP pool that you want to retrieve the IP addresses for. + PoolName *string `json:"pool_name"` + // + UpdateIpPoolRequest *UpdateIpPoolRequest `json:"UpdateIpPoolRequest,omitempty"` +} + +func (params *UpdateIpPoolParam) SetPoolName(PoolName string) *UpdateIpPoolParam { + params.PoolName = &PoolName + return params +} +func (params *UpdateIpPoolParam) SetUpdateIpPoolRequest(UpdateIpPoolRequest UpdateIpPoolRequest) *UpdateIpPoolParam { + params.UpdateIpPoolRequest = &UpdateIpPoolRequest + return params +} + +// **This endpoint allows you to update the name of an IP pool.** +func (c *ApiService) UpdateIpPool(params *UpdateIpPoolParam) (interface{}, error) { + path := "/v3/ips/pools/{PoolName}" + if params != nil && params.PoolName != nil { + path = strings.Replace(path, "{"+"PoolName"+"}", *params.PoolName, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateIpPoolRequest != nil { + b, err := json.Marshal(*params.UpdateIpPoolRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &IpPools200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &UpdateIpPool404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/ips/docs/AddIp.md b/rest/api/v3/ips/docs/AddIp.md new file mode 100644 index 00000000..ec934377 --- /dev/null +++ b/rest/api/v3/ips/docs/AddIp.md @@ -0,0 +1,48 @@ +# AddIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddIp**](AddIp.md#AddIp) | **Post** /v3/ips | Add IPs + + + +## AddIp + +> AddIp201Response AddIp(ctx, optional) + +Add IPs + +**This endpoint is for adding a(n) IP Address(es) to your account.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a AddIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**AddIpRequest** | [**AddIpRequest**](AddIpRequest.md) | + +### Return type + +[**AddIp201Response**](AddIp201Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ips/docs/AddIp201Response.md b/rest/api/v3/ips/docs/AddIp201Response.md new file mode 100644 index 00000000..f62ecfe0 --- /dev/null +++ b/rest/api/v3/ips/docs/AddIp201Response.md @@ -0,0 +1,13 @@ +# AddIp201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ips** | [**[]AddIp201ResponseIpsInner**](AddIp201ResponseIpsInner.md) | List of IP objects. | +**RemainingIps** | **int32** | The number of IPs that can still be added to the user. | +**Warmup** | **bool** | Whether or not the IPs are being warmed up. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/AddIp201ResponseIpsInner.md b/rest/api/v3/ips/docs/AddIp201ResponseIpsInner.md new file mode 100644 index 00000000..511cef97 --- /dev/null +++ b/rest/api/v3/ips/docs/AddIp201ResponseIpsInner.md @@ -0,0 +1,12 @@ +# AddIp201ResponseIpsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | IP added to account. | +**Subusers** | **[]string** | Array of usernames assigned a send IP. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/AddIpRequest.md b/rest/api/v3/ips/docs/AddIpRequest.md new file mode 100644 index 00000000..1db399db --- /dev/null +++ b/rest/api/v3/ips/docs/AddIpRequest.md @@ -0,0 +1,13 @@ +# AddIpRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Count** | **int32** | The amount of IPs to add to the account. | +**Subusers** | **[]string** | Array of usernames to be assigned a send IP. |[optional] +**Warmup** | **bool** | Whether or not to warmup the IPs being added. |[optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/AddIpToIpPool.md b/rest/api/v3/ips/docs/AddIpToIpPool.md new file mode 100644 index 00000000..77559a2a --- /dev/null +++ b/rest/api/v3/ips/docs/AddIpToIpPool.md @@ -0,0 +1,52 @@ +# AddIpToIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddIpToIpPool**](AddIpToIpPool.md#AddIpToIpPool) | **Post** /v3/ips/pools/{PoolName}/ips | Add an IP address to a pool + + + +## AddIpToIpPool + +> AddIpToIpPool201Response AddIpToIpPool(ctx, PoolNameoptional) + +Add an IP address to a pool + +**This endpoint allows you to add an IP address to an IP pool.** You can add the same IP address to multiple pools. It may take up to 60 seconds for your IP address to be added to a pool after your request is made. Before you can add an IP to a pool, you need to activate it in your SendGrid account: 1. Log into your SendGrid account. 1. Navigate to **Settings** and then select **IP Addresses**. 1. Find the IP address you want to activate and then click **Edit**. 1. Check **Allow my account to send mail using this IP address**. 1. Click **Save**. You can retrieve all of your available IP addresses from the \"Retrieve all IP addresses\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**PoolName** | **string** | The name of the IP pool you want to add the address to. If the name contains spaces, they must be URL encoded (e.g., \"Test Pool\" becomes \"Test%20Pool\"). + +### Other Parameters + +Other parameters are passed through a pointer to a AddIpToIpPoolParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**AddIpToIpPoolRequest** | [**AddIpToIpPoolRequest**](AddIpToIpPoolRequest.md) | + +### Return type + +[**AddIpToIpPool201Response**](AddIpToIpPool201Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ips/docs/AddIpToIpPool201Response.md b/rest/api/v3/ips/docs/AddIpToIpPool201Response.md new file mode 100644 index 00000000..1121a789 --- /dev/null +++ b/rest/api/v3/ips/docs/AddIpToIpPool201Response.md @@ -0,0 +1,14 @@ +# AddIpToIpPool201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | The IP address. | +**Pools** | **[]string** | The IP pools that this IP address has been added to. | +**StartDate** | **int32** | A Unix timestamp indicating when the warmup process began for the added IP address. | +**Warmup** | **bool** | Indicates if the IP address is in warmup. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/AddIpToIpPool404Response.md b/rest/api/v3/ips/docs/AddIpToIpPool404Response.md new file mode 100644 index 00000000..ad57ab01 --- /dev/null +++ b/rest/api/v3/ips/docs/AddIpToIpPool404Response.md @@ -0,0 +1,11 @@ +# AddIpToIpPool404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]AddIpToIpPool404ResponseErrorsInner**](AddIpToIpPool404ResponseErrorsInner.md) | The error returned. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/AddIpToIpPool404ResponseErrorsInner.md b/rest/api/v3/ips/docs/AddIpToIpPool404ResponseErrorsInner.md new file mode 100644 index 00000000..8c076206 --- /dev/null +++ b/rest/api/v3/ips/docs/AddIpToIpPool404ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# AddIpToIpPool404ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | |[optional] +**Message** | **string** | A message explaining why the IP address could not be added to the IP Pool. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/AddIpToIpPoolRequest.md b/rest/api/v3/ips/docs/AddIpToIpPoolRequest.md new file mode 100644 index 00000000..71990c86 --- /dev/null +++ b/rest/api/v3/ips/docs/AddIpToIpPoolRequest.md @@ -0,0 +1,11 @@ +# AddIpToIpPoolRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | The IP address that you want to add to the named pool. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/CreateIpPool.md b/rest/api/v3/ips/docs/CreateIpPool.md new file mode 100644 index 00000000..53cb6ad9 --- /dev/null +++ b/rest/api/v3/ips/docs/CreateIpPool.md @@ -0,0 +1,48 @@ +# CreateIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateIpPool**](CreateIpPool.md#CreateIpPool) | **Post** /v3/ips/pools | Create an IP pool + + + +## CreateIpPool + +> IpPools200 CreateIpPool(ctx, optional) + +Create an IP pool + +**This endpoint allows you to create an IP pool.** Before you can create an IP pool, you need to activate the IP in your SendGrid account: 1. Log into your SendGrid account. 1. Navigate to **Settings** and then select **IP Addresses**. 1. Find the IP address you want to activate and then click **Edit**. 1. Check **Allow my account to send mail using this IP address**. 1. Click **Save**. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateIpPoolParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**CreateIpPoolRequest** | [**CreateIpPoolRequest**](CreateIpPoolRequest.md) | + +### Return type + +[**IpPools200**](IpPools200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ips/docs/CreateIpPoolRequest.md b/rest/api/v3/ips/docs/CreateIpPoolRequest.md new file mode 100644 index 00000000..22c450a9 --- /dev/null +++ b/rest/api/v3/ips/docs/CreateIpPoolRequest.md @@ -0,0 +1,11 @@ +# CreateIpPoolRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of your new IP pool. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/DeleteIpFromIpPool.md b/rest/api/v3/ips/docs/DeleteIpFromIpPool.md new file mode 100644 index 00000000..0f701fa8 --- /dev/null +++ b/rest/api/v3/ips/docs/DeleteIpFromIpPool.md @@ -0,0 +1,52 @@ +# DeleteIpFromIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteIpFromIpPool**](DeleteIpFromIpPool.md#DeleteIpFromIpPool) | **Delete** /v3/ips/pools/{PoolName}/ips/{Ip} | Remove an IP address from a pool + + + +## DeleteIpFromIpPool + +> map[string]interface{} DeleteIpFromIpPool(ctx, PoolNameIp) + +Remove an IP address from a pool + +**This endpoint allows you to remove an IP address from an IP pool.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**PoolName** | **string** | The name of the IP pool that you are removing the IP address from. +**Ip** | **string** | The IP address that you wish to remove. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteIpFromIpPoolParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ips/docs/DeleteIpFromIpPool404Response.md b/rest/api/v3/ips/docs/DeleteIpFromIpPool404Response.md new file mode 100644 index 00000000..de7496d3 --- /dev/null +++ b/rest/api/v3/ips/docs/DeleteIpFromIpPool404Response.md @@ -0,0 +1,11 @@ +# DeleteIpFromIpPool404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | **string** | An error explaining why the IP address could not be removed from the IP pool. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/DeleteIpPool.md b/rest/api/v3/ips/docs/DeleteIpPool.md new file mode 100644 index 00000000..1afd2aee --- /dev/null +++ b/rest/api/v3/ips/docs/DeleteIpPool.md @@ -0,0 +1,51 @@ +# DeleteIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteIpPool**](DeleteIpPool.md#DeleteIpPool) | **Delete** /v3/ips/pools/{PoolName} | Delete an IP pool + + + +## DeleteIpPool + +> map[string]interface{} DeleteIpPool(ctx, PoolName) + +Delete an IP pool + +**This endpoint allows you to delete an IP pool.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**PoolName** | **string** | The name of the IP pool that you want to retrieve the IP addresses for. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteIpPoolParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ips/docs/DeleteIpPool404Response.md b/rest/api/v3/ips/docs/DeleteIpPool404Response.md new file mode 100644 index 00000000..667bd47e --- /dev/null +++ b/rest/api/v3/ips/docs/DeleteIpPool404Response.md @@ -0,0 +1,11 @@ +# DeleteIpPool404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | **string** | An error explaining why the pool could not be deleted. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/ErrorResponse.md b/rest/api/v3/ips/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/ips/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/ErrorResponseErrorsInner.md b/rest/api/v3/ips/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/ips/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/GetIp.md b/rest/api/v3/ips/docs/GetIp.md new file mode 100644 index 00000000..c9ea8a87 --- /dev/null +++ b/rest/api/v3/ips/docs/GetIp.md @@ -0,0 +1,51 @@ +# GetIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetIp**](GetIp.md#GetIp) | **Get** /v3/ips/{IpAddress} | Retrieve all IP pools an IP address belongs to + + + +## GetIp + +> GetIp200Response GetIp(ctx, IpAddress) + +Retrieve all IP pools an IP address belongs to + +**This endpoint allows you to see which IP pools a particular IP address has been added to.** The same IP address can be added to multiple IP pools. A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is based on the aggregate performance of all the senders who use it. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**IpAddress** | **string** | The IP address you are retrieving the IP pools for. + +### Other Parameters + +Other parameters are passed through a pointer to a GetIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**GetIp200Response**](GetIp200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ips/docs/GetIp200Response.md b/rest/api/v3/ips/docs/GetIp200Response.md new file mode 100644 index 00000000..34637db0 --- /dev/null +++ b/rest/api/v3/ips/docs/GetIp200Response.md @@ -0,0 +1,17 @@ +# GetIp200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | The IP address. | +**Subusers** | **[]string** | The subusers that can send email using this IP address. | +**Rdns** | **string** | The reverse DNS record for this IP address. | +**Pools** | **[]string** | The list of IP pools that this IP address belongs to. | +**Warmup** | **bool** | Indicates if this IP address is currently warming up. | +**StartDate** | **int32** | The date that the IP address was entered into warmup. | +**Whitelabeled** | **bool** | Indicates if this IP address is associated with a reverse DNS record. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/GetIpPool.md b/rest/api/v3/ips/docs/GetIpPool.md new file mode 100644 index 00000000..8cd51783 --- /dev/null +++ b/rest/api/v3/ips/docs/GetIpPool.md @@ -0,0 +1,51 @@ +# GetIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetIpPool**](GetIpPool.md#GetIpPool) | **Get** /v3/ips/pools/{PoolName} | Retrieve all the IPs in a specified pool + + + +## GetIpPool + +> GetIpPool200Response GetIpPool(ctx, PoolName) + +Retrieve all the IPs in a specified pool + +**This endpoint allows you to get all of the IP addresses that are in a specific IP pool.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**PoolName** | **string** | The name of the IP pool that you want to retrieve the IP addresses for. + +### Other Parameters + +Other parameters are passed through a pointer to a GetIpPoolParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**GetIpPool200Response**](GetIpPool200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ips/docs/GetIpPool200Response.md b/rest/api/v3/ips/docs/GetIpPool200Response.md new file mode 100644 index 00000000..6f59aa12 --- /dev/null +++ b/rest/api/v3/ips/docs/GetIpPool200Response.md @@ -0,0 +1,12 @@ +# GetIpPool200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PoolName** | **string** | The name of the IP pool. |[optional] +**Ips** | **[]string** | The IP addresses that belong to this pool. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/GetIpPool404Response.md b/rest/api/v3/ips/docs/GetIpPool404Response.md new file mode 100644 index 00000000..6e2dcd12 --- /dev/null +++ b/rest/api/v3/ips/docs/GetIpPool404Response.md @@ -0,0 +1,11 @@ +# GetIpPool404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]GetIpPool404ResponseErrorsInner**](GetIpPool404ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/GetIpPool404ResponseErrorsInner.md b/rest/api/v3/ips/docs/GetIpPool404ResponseErrorsInner.md new file mode 100644 index 00000000..03472198 --- /dev/null +++ b/rest/api/v3/ips/docs/GetIpPool404ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# GetIpPool404ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | The name of the error. |[optional] +**Message** | **string** | A message explaining why the IP addresses could not be listed. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/IpPools200.md b/rest/api/v3/ips/docs/IpPools200.md new file mode 100644 index 00000000..4fcf9926 --- /dev/null +++ b/rest/api/v3/ips/docs/IpPools200.md @@ -0,0 +1,11 @@ +# IpPools200 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the IP pool. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/ListAssignedIp.md b/rest/api/v3/ips/docs/ListAssignedIp.md new file mode 100644 index 00000000..1aed835b --- /dev/null +++ b/rest/api/v3/ips/docs/ListAssignedIp.md @@ -0,0 +1,44 @@ +# ListAssignedIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListAssignedIp**](ListAssignedIp.md#ListAssignedIp) | **Get** /v3/ips/assigned | Retrieve all assigned IPs + + + +## ListAssignedIp + +> []ListAssignedIp200ResponseInner ListAssignedIp(ctx, ) + +Retrieve all assigned IPs + +**This endpoint allows you to retrieve only assigned IP addresses.** A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is based on the aggregate performance of all the senders who use it. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListAssignedIpParams struct + + +### Return type + +[**[]ListAssignedIp200ResponseInner**](ListAssignedIp200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ips/docs/ListAssignedIp200ResponseInner.md b/rest/api/v3/ips/docs/ListAssignedIp200ResponseInner.md new file mode 100644 index 00000000..0992bd04 --- /dev/null +++ b/rest/api/v3/ips/docs/ListAssignedIp200ResponseInner.md @@ -0,0 +1,14 @@ +# ListAssignedIp200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | The IP address. | +**Pools** | **[]string** | The IP pools that this IP address has been added to. | +**Warmup** | **bool** | Indicates if this IP address is currently warming up. | +**StartDate** | **int32** | The start date that this IP address was entered into warmup. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/ListIp.md b/rest/api/v3/ips/docs/ListIp.md new file mode 100644 index 00000000..29d02acc --- /dev/null +++ b/rest/api/v3/ips/docs/ListIp.md @@ -0,0 +1,53 @@ +# ListIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListIp**](ListIp.md#ListIp) | **Get** /v3/ips | Retrieve all IP addresses + + + +## ListIp + +> []ListIp200ResponseInner ListIp(ctx, optional) + +Retrieve all IP addresses + +**This endpoint allows you to retrieve a paginated list of all assigned and unassigned IPs.** Response includes warm up status, pools, assigned subusers, and reverse DNS info. The start_date field corresponds to when warmup started for that IP. A single IP address or a range of IP addresses may be dedicated to an account in order to send email for multiple domains. The reputation of this IP is determined by the aggregate performance of all email traffic sent from it. You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Ip** | **string** | The IP address to get +**ExcludeWhitelabels** | **bool** | Should we exclude reverse DNS records (whitelabels)? +**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. +**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. +**Subuser** | **string** | The subuser you are requesting for. +**SortByDirection** | [**SortByDirection**](SortByDirectionSortByDirection.md) | The direction to sort the results. + +### Return type + +[**[]ListIp200ResponseInner**](ListIp200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ips/docs/ListIp200ResponseInner.md b/rest/api/v3/ips/docs/ListIp200ResponseInner.md new file mode 100644 index 00000000..7b8e15a9 --- /dev/null +++ b/rest/api/v3/ips/docs/ListIp200ResponseInner.md @@ -0,0 +1,18 @@ +# ListIp200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | An IP address. | +**Subusers** | **[]string** | The subusers that are able to send email from this IP. | +**Rdns** | **string** | The reverse DNS record for this IP address. |[optional] +**Pools** | **[]string** | The IP pools that this IP has been added to. | +**Warmup** | **bool** | Indicates if this IP address is currently warming up. | +**StartDate** | **float32** | The date that the IP address was entered into warmup. | +**Whitelabeled** | **bool** | Indicates if this IP address is associated with a reverse DNS record. | +**AssignedAt** | **int32** | The date that the IP address was assigned to the user. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/ListIpPool.md b/rest/api/v3/ips/docs/ListIpPool.md new file mode 100644 index 00000000..56fc7cf8 --- /dev/null +++ b/rest/api/v3/ips/docs/ListIpPool.md @@ -0,0 +1,44 @@ +# ListIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListIpPool**](ListIpPool.md#ListIpPool) | **Get** /v3/ips/pools | Retrieve all IP pools + + + +## ListIpPool + +> []IpPools200 ListIpPool(ctx, ) + +Retrieve all IP pools + +**This endpoint allows you to get all of your IP pools.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListIpPoolParams struct + + +### Return type + +[**[]IpPools200**](IpPools200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ips/docs/ListRemainingIpCount.md b/rest/api/v3/ips/docs/ListRemainingIpCount.md new file mode 100644 index 00000000..f3df4a93 --- /dev/null +++ b/rest/api/v3/ips/docs/ListRemainingIpCount.md @@ -0,0 +1,44 @@ +# ListRemainingIpCount + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListRemainingIpCount**](ListRemainingIpCount.md#ListRemainingIpCount) | **Get** /v3/ips/remaining | Get remaining IPs count + + + +## ListRemainingIpCount + +> ListRemainingIpCount200Response ListRemainingIpCount(ctx, ) + +Get remaining IPs count + +**This endpoint gets amount of IP Addresses that can still be created during a given period and the price of those IPs.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListRemainingIpCountParams struct + + +### Return type + +[**ListRemainingIpCount200Response**](ListRemainingIpCount200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ips/docs/ListRemainingIpCount200Response.md b/rest/api/v3/ips/docs/ListRemainingIpCount200Response.md new file mode 100644 index 00000000..8496c11d --- /dev/null +++ b/rest/api/v3/ips/docs/ListRemainingIpCount200Response.md @@ -0,0 +1,11 @@ +# ListRemainingIpCount200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | [**[]ListRemainingIpCount200ResponseResultsInner**](ListRemainingIpCount200ResponseResultsInner.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/ListRemainingIpCount200ResponseResultsInner.md b/rest/api/v3/ips/docs/ListRemainingIpCount200ResponseResultsInner.md new file mode 100644 index 00000000..2eddbb09 --- /dev/null +++ b/rest/api/v3/ips/docs/ListRemainingIpCount200ResponseResultsInner.md @@ -0,0 +1,13 @@ +# ListRemainingIpCount200ResponseResultsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Remaining** | **int32** | The number of IPs that can still be added to the user. | +**Period** | **string** | The length of time until user can add more IPs. | +**PricePerIp** | **float32** | The current cost to add an IP. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/SortByDirection.md b/rest/api/v3/ips/docs/SortByDirection.md new file mode 100644 index 00000000..0431e9a0 --- /dev/null +++ b/rest/api/v3/ips/docs/SortByDirection.md @@ -0,0 +1,13 @@ +# SortByDirection + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DESC** | string | (value: `"desc"`) +**ASC** | string | (value: `"asc"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/UpdateIpPool.md b/rest/api/v3/ips/docs/UpdateIpPool.md new file mode 100644 index 00000000..8f766155 --- /dev/null +++ b/rest/api/v3/ips/docs/UpdateIpPool.md @@ -0,0 +1,52 @@ +# UpdateIpPool + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateIpPool**](UpdateIpPool.md#UpdateIpPool) | **Put** /v3/ips/pools/{PoolName} | Rename an IP pool + + + +## UpdateIpPool + +> IpPools200 UpdateIpPool(ctx, PoolNameoptional) + +Rename an IP pool + +**This endpoint allows you to update the name of an IP pool.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**PoolName** | **string** | The name of the IP pool that you want to retrieve the IP addresses for. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateIpPoolParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**UpdateIpPoolRequest** | [**UpdateIpPoolRequest**](UpdateIpPoolRequest.md) | + +### Return type + +[**IpPools200**](IpPools200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/ips/docs/UpdateIpPool404Response.md b/rest/api/v3/ips/docs/UpdateIpPool404Response.md new file mode 100644 index 00000000..e3c5d6d7 --- /dev/null +++ b/rest/api/v3/ips/docs/UpdateIpPool404Response.md @@ -0,0 +1,11 @@ +# UpdateIpPool404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]UpdateIpPool404ResponseErrorsInner**](UpdateIpPool404ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/UpdateIpPool404ResponseErrorsInner.md b/rest/api/v3/ips/docs/UpdateIpPool404ResponseErrorsInner.md new file mode 100644 index 00000000..58d029a9 --- /dev/null +++ b/rest/api/v3/ips/docs/UpdateIpPool404ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# UpdateIpPool404ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | |[optional] +**Message** | **string** | A message explaining why the name of your IP pool could not be updated. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/docs/UpdateIpPoolRequest.md b/rest/api/v3/ips/docs/UpdateIpPoolRequest.md new file mode 100644 index 00000000..dff93b64 --- /dev/null +++ b/rest/api/v3/ips/docs/UpdateIpPoolRequest.md @@ -0,0 +1,11 @@ +# UpdateIpPoolRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The new name for your IP pool. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/ips/model_add_ip_201_response.go b/rest/api/v3/ips/model_add_ip_201_response.go new file mode 100644 index 00000000..ac46d11c --- /dev/null +++ b/rest/api/v3/ips/model_add_ip_201_response.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIp201Response struct for AddIp201Response +type AddIp201Response struct { + // List of IP objects. + Ips []AddIp201ResponseIpsInner `json:"ips"` + // The number of IPs that can still be added to the user. + RemainingIps int32 `json:"remaining_ips"` + // Whether or not the IPs are being warmed up. + Warmup bool `json:"warmup"` +} diff --git a/rest/api/v3/ips/model_add_ip_201_response_ips_inner.go b/rest/api/v3/ips/model_add_ip_201_response_ips_inner.go new file mode 100644 index 00000000..e69af04a --- /dev/null +++ b/rest/api/v3/ips/model_add_ip_201_response_ips_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIp201ResponseIpsInner struct for AddIp201ResponseIpsInner +type AddIp201ResponseIpsInner struct { + // IP added to account. + Ip string `json:"ip"` + // Array of usernames assigned a send IP. + Subusers []string `json:"subusers"` +} diff --git a/rest/api/v3/ips/model_add_ip_request.go b/rest/api/v3/ips/model_add_ip_request.go new file mode 100644 index 00000000..4a68e8ca --- /dev/null +++ b/rest/api/v3/ips/model_add_ip_request.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIpRequest struct for AddIpRequest +type AddIpRequest struct { + // The amount of IPs to add to the account. + Count int32 `json:"count"` + // Array of usernames to be assigned a send IP. + Subusers *[]string `json:"subusers,omitempty"` + // Whether or not to warmup the IPs being added. + Warmup *bool `json:"warmup,omitempty"` +} diff --git a/rest/api/v3/ips/model_add_ip_to_ip_pool_201_response.go b/rest/api/v3/ips/model_add_ip_to_ip_pool_201_response.go new file mode 100644 index 00000000..dbbb205e --- /dev/null +++ b/rest/api/v3/ips/model_add_ip_to_ip_pool_201_response.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIpToIpPool201Response struct for AddIpToIpPool201Response +type AddIpToIpPool201Response struct { + // The IP address. + Ip string `json:"ip"` + // The IP pools that this IP address has been added to. + Pools []string `json:"pools"` + // A Unix timestamp indicating when the warmup process began for the added IP address. + StartDate int32 `json:"start_date"` + // Indicates if the IP address is in warmup. + Warmup bool `json:"warmup"` +} diff --git a/rest/api/v3/ips/model_add_ip_to_ip_pool_404_response.go b/rest/api/v3/ips/model_add_ip_to_ip_pool_404_response.go new file mode 100644 index 00000000..a0333b44 --- /dev/null +++ b/rest/api/v3/ips/model_add_ip_to_ip_pool_404_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIpToIpPool404Response struct for AddIpToIpPool404Response +type AddIpToIpPool404Response struct { + // The error returned. + Errors *[]AddIpToIpPool404ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/ips/model_add_ip_to_ip_pool_404_response_errors_inner.go b/rest/api/v3/ips/model_add_ip_to_ip_pool_404_response_errors_inner.go new file mode 100644 index 00000000..eccc086a --- /dev/null +++ b/rest/api/v3/ips/model_add_ip_to_ip_pool_404_response_errors_inner.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIpToIpPool404ResponseErrorsInner struct for AddIpToIpPool404ResponseErrorsInner +type AddIpToIpPool404ResponseErrorsInner struct { + Field *string `json:"field,omitempty"` + // A message explaining why the IP address could not be added to the IP Pool. + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/ips/model_add_ip_to_ip_pool_request.go b/rest/api/v3/ips/model_add_ip_to_ip_pool_request.go new file mode 100644 index 00000000..4ab23abf --- /dev/null +++ b/rest/api/v3/ips/model_add_ip_to_ip_pool_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddIpToIpPoolRequest struct for AddIpToIpPoolRequest +type AddIpToIpPoolRequest struct { + // The IP address that you want to add to the named pool. + Ip *string `json:"ip,omitempty"` +} diff --git a/rest/api/v3/ips/model_create_ip_pool_request.go b/rest/api/v3/ips/model_create_ip_pool_request.go new file mode 100644 index 00000000..03bc175b --- /dev/null +++ b/rest/api/v3/ips/model_create_ip_pool_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateIpPoolRequest struct for CreateIpPoolRequest +type CreateIpPoolRequest struct { + // The name of your new IP pool. + Name string `json:"name"` +} diff --git a/rest/api/v3/ips/model_delete_ip_from_ip_pool_404_response.go b/rest/api/v3/ips/model_delete_ip_from_ip_pool_404_response.go new file mode 100644 index 00000000..c07d37d5 --- /dev/null +++ b/rest/api/v3/ips/model_delete_ip_from_ip_pool_404_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteIpFromIpPool404Response struct for DeleteIpFromIpPool404Response +type DeleteIpFromIpPool404Response struct { + // An error explaining why the IP address could not be removed from the IP pool. + Error *string `json:"error,omitempty"` +} diff --git a/rest/api/v3/ips/model_delete_ip_pool_404_response.go b/rest/api/v3/ips/model_delete_ip_pool_404_response.go new file mode 100644 index 00000000..e44f5d7a --- /dev/null +++ b/rest/api/v3/ips/model_delete_ip_pool_404_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteIpPool404Response struct for DeleteIpPool404Response +type DeleteIpPool404Response struct { + // An error explaining why the pool could not be deleted. + Error *string `json:"error,omitempty"` +} diff --git a/rest/api/v3/ips/model_error_response.go b/rest/api/v3/ips/model_error_response.go new file mode 100644 index 00000000..56fbd3ec --- /dev/null +++ b/rest/api/v3/ips/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/ips/model_error_response_errors_inner.go b/rest/api/v3/ips/model_error_response_errors_inner.go new file mode 100644 index 00000000..40c6b644 --- /dev/null +++ b/rest/api/v3/ips/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/ips/model_get_ip_200_response.go b/rest/api/v3/ips/model_get_ip_200_response.go new file mode 100644 index 00000000..e04eb406 --- /dev/null +++ b/rest/api/v3/ips/model_get_ip_200_response.go @@ -0,0 +1,32 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetIp200Response struct for GetIp200Response +type GetIp200Response struct { + // The IP address. + Ip string `json:"ip"` + // The subusers that can send email using this IP address. + Subusers []string `json:"subusers"` + // The reverse DNS record for this IP address. + Rdns string `json:"rdns"` + // The list of IP pools that this IP address belongs to. + Pools []string `json:"pools"` + // Indicates if this IP address is currently warming up. + Warmup bool `json:"warmup"` + // The date that the IP address was entered into warmup. + StartDate int32 `json:"start_date"` + // Indicates if this IP address is associated with a reverse DNS record. + Whitelabeled bool `json:"whitelabeled"` +} diff --git a/rest/api/v3/ips/model_get_ip_pool_200_response.go b/rest/api/v3/ips/model_get_ip_pool_200_response.go new file mode 100644 index 00000000..e76d06e5 --- /dev/null +++ b/rest/api/v3/ips/model_get_ip_pool_200_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetIpPool200Response struct for GetIpPool200Response +type GetIpPool200Response struct { + // The name of the IP pool. + PoolName *string `json:"pool_name,omitempty"` + // The IP addresses that belong to this pool. + Ips *[]string `json:"ips,omitempty"` +} diff --git a/rest/api/v3/ips/model_get_ip_pool_404_response.go b/rest/api/v3/ips/model_get_ip_pool_404_response.go new file mode 100644 index 00000000..d6bf3c53 --- /dev/null +++ b/rest/api/v3/ips/model_get_ip_pool_404_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetIpPool404Response struct for GetIpPool404Response +type GetIpPool404Response struct { + Errors *[]GetIpPool404ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/ips/model_get_ip_pool_404_response_errors_inner.go b/rest/api/v3/ips/model_get_ip_pool_404_response_errors_inner.go new file mode 100644 index 00000000..2478d7b8 --- /dev/null +++ b/rest/api/v3/ips/model_get_ip_pool_404_response_errors_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetIpPool404ResponseErrorsInner struct for GetIpPool404ResponseErrorsInner +type GetIpPool404ResponseErrorsInner struct { + // The name of the error. + Field *string `json:"field,omitempty"` + // A message explaining why the IP addresses could not be listed. + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/ips/model_ip_pools200.go b/rest/api/v3/ips/model_ip_pools200.go new file mode 100644 index 00000000..5e4936fb --- /dev/null +++ b/rest/api/v3/ips/model_ip_pools200.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// IpPools200 struct for IpPools200 +type IpPools200 struct { + // The name of the IP pool. + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/ips/model_list_assigned_ip_200_response_inner.go b/rest/api/v3/ips/model_list_assigned_ip_200_response_inner.go new file mode 100644 index 00000000..bdeb0205 --- /dev/null +++ b/rest/api/v3/ips/model_list_assigned_ip_200_response_inner.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListAssignedIp200ResponseInner struct for ListAssignedIp200ResponseInner +type ListAssignedIp200ResponseInner struct { + // The IP address. + Ip string `json:"ip"` + // The IP pools that this IP address has been added to. + Pools []string `json:"pools"` + // Indicates if this IP address is currently warming up. + Warmup bool `json:"warmup"` + // The start date that this IP address was entered into warmup. + StartDate int32 `json:"start_date"` +} diff --git a/rest/api/v3/ips/model_list_ip_200_response_inner.go b/rest/api/v3/ips/model_list_ip_200_response_inner.go new file mode 100644 index 00000000..bed4a8f8 --- /dev/null +++ b/rest/api/v3/ips/model_list_ip_200_response_inner.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListIp200ResponseInner struct for ListIp200ResponseInner +type ListIp200ResponseInner struct { + // An IP address. + Ip string `json:"ip"` + // The subusers that are able to send email from this IP. + Subusers []string `json:"subusers"` + // The reverse DNS record for this IP address. + Rdns *string `json:"rdns,omitempty"` + // The IP pools that this IP has been added to. + Pools []string `json:"pools"` + // Indicates if this IP address is currently warming up. + Warmup bool `json:"warmup"` + // The date that the IP address was entered into warmup. + StartDate float32 `json:"start_date"` + // Indicates if this IP address is associated with a reverse DNS record. + Whitelabeled bool `json:"whitelabeled"` + // The date that the IP address was assigned to the user. + AssignedAt int32 `json:"assigned_at"` +} diff --git a/rest/api/v3/ips/model_list_remaining_ip_count_200_response.go b/rest/api/v3/ips/model_list_remaining_ip_count_200_response.go new file mode 100644 index 00000000..4bdd5881 --- /dev/null +++ b/rest/api/v3/ips/model_list_remaining_ip_count_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListRemainingIpCount200Response struct for ListRemainingIpCount200Response +type ListRemainingIpCount200Response struct { + Results []ListRemainingIpCount200ResponseResultsInner `json:"results"` +} diff --git a/rest/api/v3/ips/model_list_remaining_ip_count_200_response_results_inner.go b/rest/api/v3/ips/model_list_remaining_ip_count_200_response_results_inner.go new file mode 100644 index 00000000..ec67dd2f --- /dev/null +++ b/rest/api/v3/ips/model_list_remaining_ip_count_200_response_results_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListRemainingIpCount200ResponseResultsInner struct for ListRemainingIpCount200ResponseResultsInner +type ListRemainingIpCount200ResponseResultsInner struct { + // The number of IPs that can still be added to the user. + Remaining int32 `json:"remaining"` + // The length of time until user can add more IPs. + Period string `json:"period"` + // The current cost to add an IP. + PricePerIp float32 `json:"price_per_ip"` +} diff --git a/rest/api/v3/ips/model_sort_by_direction.go b/rest/api/v3/ips/model_sort_by_direction.go new file mode 100644 index 00000000..0e012a7d --- /dev/null +++ b/rest/api/v3/ips/model_sort_by_direction.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SortByDirection the model 'SortByDirection' +type SortByDirection string + +// List of SortByDirection +const ( + SORTBYDIRECTION_DESC SortByDirection = "desc" + SORTBYDIRECTION_ASC SortByDirection = "asc" +) diff --git a/rest/api/v3/ips/model_update_ip_pool_404_response.go b/rest/api/v3/ips/model_update_ip_pool_404_response.go new file mode 100644 index 00000000..9fca7b4c --- /dev/null +++ b/rest/api/v3/ips/model_update_ip_pool_404_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateIpPool404Response struct for UpdateIpPool404Response +type UpdateIpPool404Response struct { + Errors *[]UpdateIpPool404ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/ips/model_update_ip_pool_404_response_errors_inner.go b/rest/api/v3/ips/model_update_ip_pool_404_response_errors_inner.go new file mode 100644 index 00000000..906137fd --- /dev/null +++ b/rest/api/v3/ips/model_update_ip_pool_404_response_errors_inner.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateIpPool404ResponseErrorsInner struct for UpdateIpPool404ResponseErrorsInner +type UpdateIpPool404ResponseErrorsInner struct { + Field *string `json:"field,omitempty"` + // A message explaining why the name of your IP pool could not be updated. + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/ips/model_update_ip_pool_request.go b/rest/api/v3/ips/model_update_ip_pool_request.go new file mode 100644 index 00000000..766187d9 --- /dev/null +++ b/rest/api/v3/ips/model_update_ip_pool_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid IP Address API +* The Twilio SendGrid IP Address API allows you to add and manage dedicated IP addresses and IP Pools for your SendGrid account and Subusers. If you are sending any significant amount of email, SendGrid typically suggests sending from dedicated IPs. It's also best to send marketing and transactional emails from separate IP addresses. In order to do this, you'll need to set up IP Pools, which are groups of dedicated IP addresses you define to send particular types of messages. See the [**Dedicated IP Addresses**](https://docs.sendgrid.com/ui/account-and-settings/dedicated-ip-addresses) for more information about obtaining and allocating IPs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateIpPoolRequest struct for UpdateIpPoolRequest +type UpdateIpPoolRequest struct { + // The new name for your IP pool. + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/link_branding/README.md b/rest/api/v3/link_branding/README.md new file mode 100644 index 00000000..9a652498 --- /dev/null +++ b/rest/api/v3/link_branding/README.md @@ -0,0 +1,98 @@ +# Go API client for + +The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. + +You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. + + See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:01.493812+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AssociateBrandedLinkWithSubuser* | [**AssociateBrandedLinkWithSubuser**](docs/AssociateBrandedLinkWithSubuser.md#associatebrandedlinkwithsubuser) | **Post** /v3/whitelabel/links/{LinkId}/subuser | Associate a branded link with a subuser +*CreateBrandedLink* | [**CreateBrandedLink**](docs/CreateBrandedLink.md#createbrandedlink) | **Post** /v3/whitelabel/links | Create a branded link +*DeleteBrandedLink* | [**DeleteBrandedLink**](docs/DeleteBrandedLink.md#deletebrandedlink) | **Delete** /v3/whitelabel/links/{Id} | Delete a branded link +*DisassociateBrandedLinkFromSubuser* | [**DisassociateBrandedLinkFromSubuser**](docs/DisassociateBrandedLinkFromSubuser.md#disassociatebrandedlinkfromsubuser) | **Delete** /v3/whitelabel/links/subuser | Disassociate a branded link from a subuser +*GetBrandedLink* | [**GetBrandedLink**](docs/GetBrandedLink.md#getbrandedlink) | **Get** /v3/whitelabel/links/{Id} | Retrieve a branded link +*ListBrandedLink* | [**ListBrandedLink**](docs/ListBrandedLink.md#listbrandedlink) | **Get** /v3/whitelabel/links | Retrieve all branded links +*ListDefaultBrandedLink* | [**ListDefaultBrandedLink**](docs/ListDefaultBrandedLink.md#listdefaultbrandedlink) | **Get** /v3/whitelabel/links/default | Retrieve the default branded link +*ListSubuserBrandedLink* | [**ListSubuserBrandedLink**](docs/ListSubuserBrandedLink.md#listsubuserbrandedlink) | **Get** /v3/whitelabel/links/subuser | Retrieve a subuser's branded link +*UpdateBrandedLink* | [**UpdateBrandedLink**](docs/UpdateBrandedLink.md#updatebrandedlink) | **Patch** /v3/whitelabel/links/{Id} | Update a branded link +*ValidateBrandedLink* | [**ValidateBrandedLink**](docs/ValidateBrandedLink.md#validatebrandedlink) | **Post** /v3/whitelabel/links/{Id}/validate | Validate a branded link + + +## Documentation For Models + + - [AssociateBrandedLinkWithSubuserRequest](AssociateBrandedLinkWithSubuserRequest.md) + - [CreateBrandedLinkRequest](CreateBrandedLinkRequest.md) + - [Default](Default.md) + - [Default1](Default1.md) + - [Default2](Default2.md) + - [Legacy](Legacy.md) + - [LinkBranding200](LinkBranding200.md) + - [LinkBranding200Dns](LinkBranding200Dns.md) + - [LinkBranding200DnsDomainCname](LinkBranding200DnsDomainCname.md) + - [LinkBranding200DnsOwnerCname](LinkBranding200DnsOwnerCname.md) + - [Region](Region.md) + - [Type](Type.md) + - [Type1](Type1.md) + - [UpdateBrandedLinkRequest](UpdateBrandedLinkRequest.md) + - [Valid](Valid.md) + - [Valid1](Valid1.md) + - [Valid2](Valid2.md) + - [Valid3](Valid3.md) + - [Valid4](Valid4.md) + - [Valid5](Valid5.md) + - [ValidateBrandedLink200Response](ValidateBrandedLink200Response.md) + - [ValidateBrandedLink200ResponseValidationResults](ValidateBrandedLink200ResponseValidationResults.md) + - [ValidateBrandedLink200ResponseValidationResultsDomainCname](ValidateBrandedLink200ResponseValidationResultsDomainCname.md) + - [ValidateBrandedLink200ResponseValidationResultsOwnerCname](ValidateBrandedLink200ResponseValidationResultsOwnerCname.md) + - [ValidateBrandedLink500Response](ValidateBrandedLink500Response.md) + - [ValidateBrandedLink500ResponseErrorsInner](ValidateBrandedLink500ResponseErrorsInner.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/link_branding/api_associate_branded_link_with_subuser.go b/rest/api/v3/link_branding/api_associate_branded_link_with_subuser.go new file mode 100644 index 00000000..a591fa8d --- /dev/null +++ b/rest/api/v3/link_branding/api_associate_branded_link_with_subuser.go @@ -0,0 +1,77 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type AssociateBrandedLinkWithSubuserParam struct { + // The ID of the branded link you want to associate. + LinkId *int32 `json:"link_id"` + // + AssociateBrandedLinkWithSubuserRequest *AssociateBrandedLinkWithSubuserRequest `json:"AssociateBrandedLinkWithSubuserRequest,omitempty"` +} + +func (params *AssociateBrandedLinkWithSubuserParam) SetLinkId(LinkId int32) *AssociateBrandedLinkWithSubuserParam { + params.LinkId = &LinkId + return params +} +func (params *AssociateBrandedLinkWithSubuserParam) SetAssociateBrandedLinkWithSubuserRequest(AssociateBrandedLinkWithSubuserRequest AssociateBrandedLinkWithSubuserRequest) *AssociateBrandedLinkWithSubuserParam { + params.AssociateBrandedLinkWithSubuserRequest = &AssociateBrandedLinkWithSubuserRequest + return params +} + +// **This endpoint allows you to associate a branded link with a subuser account.** Link branding can be associated with subusers from the parent account. This functionality allows subusers to send mail using their parent's link branding. To associate link branding, the parent account must first create a branded link and validate it. The parent may then associate that branded link with a subuser via the API or the [Subuser Management page of the Twilio SendGrid App](https://app.sendgrid.com/settings/subusers). +func (c *ApiService) AssociateBrandedLinkWithSubuser(params *AssociateBrandedLinkWithSubuserParam) (interface{}, error) { + path := "/v3/whitelabel/links/{LinkId}/subuser" + if params != nil && params.LinkId != nil { + path = strings.Replace(path, "{"+"LinkId"+"}", fmt.Sprint(*params.LinkId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.AssociateBrandedLinkWithSubuserRequest != nil { + b, err := json.Marshal(*params.AssociateBrandedLinkWithSubuserRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &LinkBranding200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/link_branding/api_create_branded_link.go b/rest/api/v3/link_branding/api_create_branded_link.go new file mode 100644 index 00000000..589fc3e6 --- /dev/null +++ b/rest/api/v3/link_branding/api_create_branded_link.go @@ -0,0 +1,74 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateBrandedLinkParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + CreateBrandedLinkRequest *CreateBrandedLinkRequest `json:"CreateBrandedLinkRequest,omitempty"` +} + +func (params *CreateBrandedLinkParam) SetOnbehalfof(Onbehalfof string) *CreateBrandedLinkParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateBrandedLinkParam) SetCreateBrandedLinkRequest(CreateBrandedLinkRequest CreateBrandedLinkRequest) *CreateBrandedLinkParam { + params.CreateBrandedLinkRequest = &CreateBrandedLinkRequest + return params +} + +// **This endpoint allows you to create a new branded link.** To create the link branding, supply the root domain and, optionally, the subdomain — these go into separate fields in your request body. The root domain should match your FROM email address. If you provide a subdomain, it must be different from the subdomain you used for authenticating your domain. You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. +func (c *ApiService) CreateBrandedLink(params *CreateBrandedLinkParam) (interface{}, error) { + path := "/v3/whitelabel/links" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateBrandedLinkRequest != nil { + b, err := json.Marshal(*params.CreateBrandedLinkRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &LinkBranding200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/link_branding/api_delete_branded_link.go b/rest/api/v3/link_branding/api_delete_branded_link.go new file mode 100644 index 00000000..e2828ad1 --- /dev/null +++ b/rest/api/v3/link_branding/api_delete_branded_link.go @@ -0,0 +1,71 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type DeleteBrandedLinkParam struct { + // The ID of the branded link you want to retrieve. + Id *int32 `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteBrandedLinkParam) SetId(Id int32) *DeleteBrandedLinkParam { + params.Id = &Id + return params +} +func (params *DeleteBrandedLinkParam) SetOnbehalfof(Onbehalfof string) *DeleteBrandedLinkParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete a branded link.** Your request will receive a response with a 204 status code if the deletion was successful. The call does not return the link's details, so if you wish to record these make sure you call the \"Retrieve a branded link\" endpoint *before* you request its deletion. You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. +func (c *ApiService) DeleteBrandedLink(params *DeleteBrandedLinkParam) (interface{}, error) { + path := "/v3/whitelabel/links/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/link_branding/api_disassociate_branded_link_from_subuser.go b/rest/api/v3/link_branding/api_disassociate_branded_link_from_subuser.go new file mode 100644 index 00000000..989ae8b5 --- /dev/null +++ b/rest/api/v3/link_branding/api_disassociate_branded_link_from_subuser.go @@ -0,0 +1,60 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type DisassociateBrandedLinkFromSubuserParam struct { + // The username of the subuser account that you want to disassociate a branded link from. + Username *string `json:"username"` +} + +func (params *DisassociateBrandedLinkFromSubuserParam) SetUsername(Username string) *DisassociateBrandedLinkFromSubuserParam { + params.Username = &Username + return params +} + +// **This endpoint allows you to take a branded link away from a subuser.** Link branding can be associated with subusers from the parent account. This functionality allows subusers to send mail using their parent's link branding. To associate link branding, the parent account must first create a branded link and validate it. The parent may then associate that branded link with a subuser via the API or the [Subuser Management page of the Twilio SendGrid App](https://app.sendgrid.com/settings/subusers). Your request will receive a response with a 204 status code if the disassociation was successful. +func (c *ApiService) DisassociateBrandedLinkFromSubuser(params *DisassociateBrandedLinkFromSubuserParam) (interface{}, error) { + path := "/v3/whitelabel/links/subuser" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Username != nil { + data.Set("username", *params.Username) + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/link_branding/api_get_branded_link.go b/rest/api/v3/link_branding/api_get_branded_link.go new file mode 100644 index 00000000..b9ea2c56 --- /dev/null +++ b/rest/api/v3/link_branding/api_get_branded_link.go @@ -0,0 +1,71 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type GetBrandedLinkParam struct { + // The ID of the branded link you want to retrieve. + Id *int32 `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetBrandedLinkParam) SetId(Id int32) *GetBrandedLinkParam { + params.Id = &Id + return params +} +func (params *GetBrandedLinkParam) SetOnbehalfof(Onbehalfof string) *GetBrandedLinkParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a specific branded link by providing its ID.** You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. +func (c *ApiService) GetBrandedLink(params *GetBrandedLinkParam) (interface{}, error) { + path := "/v3/whitelabel/links/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &LinkBranding200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/link_branding/api_list_branded_link.go b/rest/api/v3/link_branding/api_list_branded_link.go new file mode 100644 index 00000000..3e20f45b --- /dev/null +++ b/rest/api/v3/link_branding/api_list_branded_link.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListBrandedLinkParam struct { + // Limits the number of results returned per page. + Limit *int32 `json:"limit,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListBrandedLinkParam) SetLimit(Limit int32) *ListBrandedLinkParam { + params.Limit = &Limit + return params +} +func (params *ListBrandedLinkParam) SetOnbehalfof(Onbehalfof string) *ListBrandedLinkParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve all branded links**. You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. +func (c *ApiService) ListBrandedLink(params *ListBrandedLinkParam) (interface{}, error) { + path := "/v3/whitelabel/links" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]LinkBranding200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/link_branding/api_list_default_branded_link.go b/rest/api/v3/link_branding/api_list_default_branded_link.go new file mode 100644 index 00000000..fe1d6d67 --- /dev/null +++ b/rest/api/v3/link_branding/api_list_default_branded_link.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListDefaultBrandedLinkParam struct { + // The domain to match against when finding the default branded link. + Domain *string `json:"domain,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListDefaultBrandedLinkParam) SetDomain(Domain string) *ListDefaultBrandedLinkParam { + params.Domain = &Domain + return params +} +func (params *ListDefaultBrandedLinkParam) SetOnbehalfof(Onbehalfof string) *ListDefaultBrandedLinkParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve the default branded link.** The default branded link is the actual URL to be used when sending messages. If you have more than one branded link, the default is determined by the following order: * The validated branded link marked as `default` (set when you call the \"Create a branded link\" endpoint or by calling the \"Update a branded link\" endpoint on an existing link) * Legacy branded links (migrated from the whitelabel wizard) * Default SendGrid-branded links (i.e., `100.ct.sendgrid.net`) You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. +func (c *ApiService) ListDefaultBrandedLink(params *ListDefaultBrandedLinkParam) (interface{}, error) { + path := "/v3/whitelabel/links/default" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Domain != nil { + data.Set("domain", *params.Domain) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &LinkBranding200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/link_branding/api_list_subuser_branded_link.go b/rest/api/v3/link_branding/api_list_subuser_branded_link.go new file mode 100644 index 00000000..0e4a686d --- /dev/null +++ b/rest/api/v3/link_branding/api_list_subuser_branded_link.go @@ -0,0 +1,60 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListSubuserBrandedLinkParam struct { + // The username of the subuser to retrieve associated branded links for. + Username *string `json:"username"` +} + +func (params *ListSubuserBrandedLinkParam) SetUsername(Username string) *ListSubuserBrandedLinkParam { + params.Username = &Username + return params +} + +// **This endpoint allows you to retrieve the branded link associated with a subuser.** Link branding can be associated with subusers from the parent account. This functionality allows subusers to send mail using their parent's link branding. To associate link branding, the parent account must first create a branded link and then validate it. The parent may then associate that branded link with a subuser via the API or the [Subuser Management page of the Twilio SendGrid App](https://app.sendgrid.com/settings/subusers). +func (c *ApiService) ListSubuserBrandedLink(params *ListSubuserBrandedLinkParam) (interface{}, error) { + path := "/v3/whitelabel/links/subuser" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Username != nil { + data.Set("username", *params.Username) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &LinkBranding200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/link_branding/api_service.go b/rest/api/v3/link_branding/api_service.go new file mode 100644 index 00000000..53680fb0 --- /dev/null +++ b/rest/api/v3/link_branding/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/link_branding/api_update_branded_link.go b/rest/api/v3/link_branding/api_update_branded_link.go new file mode 100644 index 00000000..454bb0f4 --- /dev/null +++ b/rest/api/v3/link_branding/api_update_branded_link.go @@ -0,0 +1,86 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type UpdateBrandedLinkParam struct { + // The ID of the branded link you want to retrieve. + Id *int32 `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateBrandedLinkRequest *UpdateBrandedLinkRequest `json:"UpdateBrandedLinkRequest,omitempty"` +} + +func (params *UpdateBrandedLinkParam) SetId(Id int32) *UpdateBrandedLinkParam { + params.Id = &Id + return params +} +func (params *UpdateBrandedLinkParam) SetOnbehalfof(Onbehalfof string) *UpdateBrandedLinkParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateBrandedLinkParam) SetUpdateBrandedLinkRequest(UpdateBrandedLinkRequest UpdateBrandedLinkRequest) *UpdateBrandedLinkParam { + params.UpdateBrandedLinkRequest = &UpdateBrandedLinkRequest + return params +} + +// **This endpoint allows you to update a specific branded link. You can use this endpoint to change a branded link's default status.** You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. +func (c *ApiService) UpdateBrandedLink(params *UpdateBrandedLinkParam) (interface{}, error) { + path := "/v3/whitelabel/links/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateBrandedLinkRequest != nil { + b, err := json.Marshal(*params.UpdateBrandedLinkRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &LinkBranding200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/link_branding/api_validate_branded_link.go b/rest/api/v3/link_branding/api_validate_branded_link.go new file mode 100644 index 00000000..df9d7896 --- /dev/null +++ b/rest/api/v3/link_branding/api_validate_branded_link.go @@ -0,0 +1,79 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type ValidateBrandedLinkParam struct { + // The ID of the branded link that you want to validate. + Id *int32 `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ValidateBrandedLinkParam) SetId(Id int32) *ValidateBrandedLinkParam { + params.Id = &Id + return params +} +func (params *ValidateBrandedLinkParam) SetOnbehalfof(Onbehalfof string) *ValidateBrandedLinkParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to validate a branded link.** You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. +func (c *ApiService) ValidateBrandedLink(params *ValidateBrandedLinkParam) (interface{}, error) { + path := "/v3/whitelabel/links/{Id}/validate" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ValidateBrandedLink200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ValidateBrandedLink500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/link_branding/docs/AssociateBrandedLinkWithSubuser.md b/rest/api/v3/link_branding/docs/AssociateBrandedLinkWithSubuser.md new file mode 100644 index 00000000..f15454e0 --- /dev/null +++ b/rest/api/v3/link_branding/docs/AssociateBrandedLinkWithSubuser.md @@ -0,0 +1,52 @@ +# AssociateBrandedLinkWithSubuser + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AssociateBrandedLinkWithSubuser**](AssociateBrandedLinkWithSubuser.md#AssociateBrandedLinkWithSubuser) | **Post** /v3/whitelabel/links/{LinkId}/subuser | Associate a branded link with a subuser + + + +## AssociateBrandedLinkWithSubuser + +> LinkBranding200 AssociateBrandedLinkWithSubuser(ctx, LinkIdoptional) + +Associate a branded link with a subuser + +**This endpoint allows you to associate a branded link with a subuser account.** Link branding can be associated with subusers from the parent account. This functionality allows subusers to send mail using their parent's link branding. To associate link branding, the parent account must first create a branded link and validate it. The parent may then associate that branded link with a subuser via the API or the [Subuser Management page of the Twilio SendGrid App](https://app.sendgrid.com/settings/subusers). + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**LinkId** | **int32** | The ID of the branded link you want to associate. + +### Other Parameters + +Other parameters are passed through a pointer to a AssociateBrandedLinkWithSubuserParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**AssociateBrandedLinkWithSubuserRequest** | [**AssociateBrandedLinkWithSubuserRequest**](AssociateBrandedLinkWithSubuserRequest.md) | + +### Return type + +[**LinkBranding200**](LinkBranding200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/link_branding/docs/AssociateBrandedLinkWithSubuserRequest.md b/rest/api/v3/link_branding/docs/AssociateBrandedLinkWithSubuserRequest.md new file mode 100644 index 00000000..09cd138a --- /dev/null +++ b/rest/api/v3/link_branding/docs/AssociateBrandedLinkWithSubuserRequest.md @@ -0,0 +1,11 @@ +# AssociateBrandedLinkWithSubuserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | The username of the subuser account that you want to associate the branded link with. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/CreateBrandedLink.md b/rest/api/v3/link_branding/docs/CreateBrandedLink.md new file mode 100644 index 00000000..46b12fea --- /dev/null +++ b/rest/api/v3/link_branding/docs/CreateBrandedLink.md @@ -0,0 +1,49 @@ +# CreateBrandedLink + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateBrandedLink**](CreateBrandedLink.md#CreateBrandedLink) | **Post** /v3/whitelabel/links | Create a branded link + + + +## CreateBrandedLink + +> LinkBranding200 CreateBrandedLink(ctx, optional) + +Create a branded link + +**This endpoint allows you to create a new branded link.** To create the link branding, supply the root domain and, optionally, the subdomain — these go into separate fields in your request body. The root domain should match your FROM email address. If you provide a subdomain, it must be different from the subdomain you used for authenticating your domain. You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateBrandedLinkParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**CreateBrandedLinkRequest** | [**CreateBrandedLinkRequest**](CreateBrandedLinkRequest.md) | + +### Return type + +[**LinkBranding200**](LinkBranding200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/link_branding/docs/CreateBrandedLinkRequest.md b/rest/api/v3/link_branding/docs/CreateBrandedLinkRequest.md new file mode 100644 index 00000000..1f9c4806 --- /dev/null +++ b/rest/api/v3/link_branding/docs/CreateBrandedLinkRequest.md @@ -0,0 +1,14 @@ +# CreateBrandedLinkRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Domain** | **string** | The root domain for the subdomain that you are creating the link branding for. This should match your FROM email address. | +**Subdomain** | **string** | The subdomain to create the link branding for. Must be different from the subdomain you used for authenticating your domain. |[optional] +**Default** | [**Default**](Default.md) | Indicates if you want to use this link branding as the default or fallback. When setting a new default, the existing default link branding will have its default status removed automatically. |[optional] +**Region** | [**Region**](Region.md) | The region of the IP address. Can be `eu` or `us`. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/Default.md b/rest/api/v3/link_branding/docs/Default.md new file mode 100644 index 00000000..d28299bf --- /dev/null +++ b/rest/api/v3/link_branding/docs/Default.md @@ -0,0 +1,13 @@ +# Default + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TRUE** | bool | (value: `true`) +**FALSE** | bool | (value: `false`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/Default1.md b/rest/api/v3/link_branding/docs/Default1.md new file mode 100644 index 00000000..5c6f9287 --- /dev/null +++ b/rest/api/v3/link_branding/docs/Default1.md @@ -0,0 +1,13 @@ +# Default1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TRUE** | bool | (value: `true`) +**FALSE** | bool | (value: `false`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/Default2.md b/rest/api/v3/link_branding/docs/Default2.md new file mode 100644 index 00000000..41b408e4 --- /dev/null +++ b/rest/api/v3/link_branding/docs/Default2.md @@ -0,0 +1,13 @@ +# Default2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TRUE** | bool | (value: `true`) +**FALSE** | bool | (value: `false`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/DeleteBrandedLink.md b/rest/api/v3/link_branding/docs/DeleteBrandedLink.md new file mode 100644 index 00000000..994d7546 --- /dev/null +++ b/rest/api/v3/link_branding/docs/DeleteBrandedLink.md @@ -0,0 +1,52 @@ +# DeleteBrandedLink + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteBrandedLink**](DeleteBrandedLink.md#DeleteBrandedLink) | **Delete** /v3/whitelabel/links/{Id} | Delete a branded link + + + +## DeleteBrandedLink + +> map[string]interface{} DeleteBrandedLink(ctx, Idoptional) + +Delete a branded link + +**This endpoint allows you to delete a branded link.** Your request will receive a response with a 204 status code if the deletion was successful. The call does not return the link's details, so if you wish to record these make sure you call the \"Retrieve a branded link\" endpoint *before* you request its deletion. You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **int32** | The ID of the branded link you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteBrandedLinkParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/link_branding/docs/DisassociateBrandedLinkFromSubuser.md b/rest/api/v3/link_branding/docs/DisassociateBrandedLinkFromSubuser.md new file mode 100644 index 00000000..2ec6eb15 --- /dev/null +++ b/rest/api/v3/link_branding/docs/DisassociateBrandedLinkFromSubuser.md @@ -0,0 +1,47 @@ +# DisassociateBrandedLinkFromSubuser + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DisassociateBrandedLinkFromSubuser**](DisassociateBrandedLinkFromSubuser.md#DisassociateBrandedLinkFromSubuser) | **Delete** /v3/whitelabel/links/subuser | Disassociate a branded link from a subuser + + + +## DisassociateBrandedLinkFromSubuser + +> map[string]interface{} DisassociateBrandedLinkFromSubuser(ctx, Username) + +Disassociate a branded link from a subuser + +**This endpoint allows you to take a branded link away from a subuser.** Link branding can be associated with subusers from the parent account. This functionality allows subusers to send mail using their parent's link branding. To associate link branding, the parent account must first create a branded link and validate it. The parent may then associate that branded link with a subuser via the API or the [Subuser Management page of the Twilio SendGrid App](https://app.sendgrid.com/settings/subusers). Your request will receive a response with a 204 status code if the disassociation was successful. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a DisassociateBrandedLinkFromSubuserParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/link_branding/docs/GetBrandedLink.md b/rest/api/v3/link_branding/docs/GetBrandedLink.md new file mode 100644 index 00000000..ae77aa26 --- /dev/null +++ b/rest/api/v3/link_branding/docs/GetBrandedLink.md @@ -0,0 +1,52 @@ +# GetBrandedLink + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetBrandedLink**](GetBrandedLink.md#GetBrandedLink) | **Get** /v3/whitelabel/links/{Id} | Retrieve a branded link + + + +## GetBrandedLink + +> LinkBranding200 GetBrandedLink(ctx, Idoptional) + +Retrieve a branded link + +**This endpoint allows you to retrieve a specific branded link by providing its ID.** You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **int32** | The ID of the branded link you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetBrandedLinkParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**LinkBranding200**](LinkBranding200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/link_branding/docs/Legacy.md b/rest/api/v3/link_branding/docs/Legacy.md new file mode 100644 index 00000000..fb166798 --- /dev/null +++ b/rest/api/v3/link_branding/docs/Legacy.md @@ -0,0 +1,13 @@ +# Legacy + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TRUE** | bool | (value: `true`) +**FALSE** | bool | (value: `false`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/LinkBranding200.md b/rest/api/v3/link_branding/docs/LinkBranding200.md new file mode 100644 index 00000000..1993e342 --- /dev/null +++ b/rest/api/v3/link_branding/docs/LinkBranding200.md @@ -0,0 +1,19 @@ +# LinkBranding200 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The ID of the branded link. | +**Domain** | **string** | The root domain of the branded link. | +**Subdomain** | **string** | The subdomain used to generate the DNS records for this link branding. This subdomain must be different from the subdomain used for your authenticated domain. |[optional] +**Username** | **string** | The username of the account that this link branding is associated with. | +**UserId** | **int32** | The ID of the user that this link branding is associated with. | +**Default** | [**Default2**](Default2.md) | Indicates if this is the default link branding. | +**Valid** | [**Valid3**](Valid3.md) | Indicates if this link branding is valid. | +**Legacy** | [**Legacy**](Legacy.md) | Indicates if this link branding was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create new link branding if you need to update it. | +**Dns** | [**LinkBranding200Dns**](LinkBranding200Dns.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/LinkBranding200Dns.md b/rest/api/v3/link_branding/docs/LinkBranding200Dns.md new file mode 100644 index 00000000..48e06ca8 --- /dev/null +++ b/rest/api/v3/link_branding/docs/LinkBranding200Dns.md @@ -0,0 +1,12 @@ +# LinkBranding200Dns + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DomainCname** | [**LinkBranding200DnsDomainCname**](LinkBranding200DnsDomainCname.md) | | +**OwnerCname** | [**LinkBranding200DnsOwnerCname**](LinkBranding200DnsOwnerCname.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/LinkBranding200DnsDomainCname.md b/rest/api/v3/link_branding/docs/LinkBranding200DnsDomainCname.md new file mode 100644 index 00000000..4642dbe5 --- /dev/null +++ b/rest/api/v3/link_branding/docs/LinkBranding200DnsDomainCname.md @@ -0,0 +1,14 @@ +# LinkBranding200DnsDomainCname + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Valid** | [**Valid4**](Valid4.md) | Indicates if the DNS record is valid. | +**Type** | [**Type**](Type.md) | The type of DNS record that was generated. | +**Host** | **string** | The domain that this link branding will use for the links in your email. | +**Data** | **string** | The domain that the DNS record points to. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/LinkBranding200DnsOwnerCname.md b/rest/api/v3/link_branding/docs/LinkBranding200DnsOwnerCname.md new file mode 100644 index 00000000..d87102cd --- /dev/null +++ b/rest/api/v3/link_branding/docs/LinkBranding200DnsOwnerCname.md @@ -0,0 +1,14 @@ +# LinkBranding200DnsOwnerCname + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Valid** | [**Valid5**](Valid5.md) | Indicates if the DNS record is valid. | +**Type** | [**Type1**](Type1.md) | The type of DNS record generated. |[optional] +**Host** | **string** | Used to verify the link branding. The subdomain of this domain is the ID of the user who created the link branding. | +**Data** | **string** | The domain that the DNS record points to. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/ListBrandedLink.md b/rest/api/v3/link_branding/docs/ListBrandedLink.md new file mode 100644 index 00000000..c9b5a627 --- /dev/null +++ b/rest/api/v3/link_branding/docs/ListBrandedLink.md @@ -0,0 +1,49 @@ +# ListBrandedLink + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListBrandedLink**](ListBrandedLink.md#ListBrandedLink) | **Get** /v3/whitelabel/links | Retrieve all branded links + + + +## ListBrandedLink + +> []LinkBranding200 ListBrandedLink(ctx, optional) + +Retrieve all branded links + +**This endpoint allows you to retrieve all branded links**. You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListBrandedLinkParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **int32** | Limits the number of results returned per page. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**[]LinkBranding200**](LinkBranding200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/link_branding/docs/ListDefaultBrandedLink.md b/rest/api/v3/link_branding/docs/ListDefaultBrandedLink.md new file mode 100644 index 00000000..b8360084 --- /dev/null +++ b/rest/api/v3/link_branding/docs/ListDefaultBrandedLink.md @@ -0,0 +1,49 @@ +# ListDefaultBrandedLink + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListDefaultBrandedLink**](ListDefaultBrandedLink.md#ListDefaultBrandedLink) | **Get** /v3/whitelabel/links/default | Retrieve the default branded link + + + +## ListDefaultBrandedLink + +> LinkBranding200 ListDefaultBrandedLink(ctx, optional) + +Retrieve the default branded link + +**This endpoint allows you to retrieve the default branded link.** The default branded link is the actual URL to be used when sending messages. If you have more than one branded link, the default is determined by the following order: * The validated branded link marked as `default` (set when you call the \"Create a branded link\" endpoint or by calling the \"Update a branded link\" endpoint on an existing link) * Legacy branded links (migrated from the whitelabel wizard) * Default SendGrid-branded links (i.e., `100.ct.sendgrid.net`) You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListDefaultBrandedLinkParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Domain** | **string** | The domain to match against when finding the default branded link. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**LinkBranding200**](LinkBranding200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/link_branding/docs/ListSubuserBrandedLink.md b/rest/api/v3/link_branding/docs/ListSubuserBrandedLink.md new file mode 100644 index 00000000..5ac2695b --- /dev/null +++ b/rest/api/v3/link_branding/docs/ListSubuserBrandedLink.md @@ -0,0 +1,47 @@ +# ListSubuserBrandedLink + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSubuserBrandedLink**](ListSubuserBrandedLink.md#ListSubuserBrandedLink) | **Get** /v3/whitelabel/links/subuser | Retrieve a subuser's branded link + + + +## ListSubuserBrandedLink + +> LinkBranding200 ListSubuserBrandedLink(ctx, Username) + +Retrieve a subuser's branded link + +**This endpoint allows you to retrieve the branded link associated with a subuser.** Link branding can be associated with subusers from the parent account. This functionality allows subusers to send mail using their parent's link branding. To associate link branding, the parent account must first create a branded link and then validate it. The parent may then associate that branded link with a subuser via the API or the [Subuser Management page of the Twilio SendGrid App](https://app.sendgrid.com/settings/subusers). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSubuserBrandedLinkParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**LinkBranding200**](LinkBranding200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/link_branding/docs/Region.md b/rest/api/v3/link_branding/docs/Region.md new file mode 100644 index 00000000..e861b3d5 --- /dev/null +++ b/rest/api/v3/link_branding/docs/Region.md @@ -0,0 +1,13 @@ +# Region + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**EU** | string | (value: `"eu"`) +**US** | string | (value: `"us"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/Type.md b/rest/api/v3/link_branding/docs/Type.md new file mode 100644 index 00000000..a510350e --- /dev/null +++ b/rest/api/v3/link_branding/docs/Type.md @@ -0,0 +1,14 @@ +# Type + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**CNAME** | string | (value: `"cname"`) +**TXT** | string | (value: `"txt"`) +**MX** | string | (value: `"mx"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/Type1.md b/rest/api/v3/link_branding/docs/Type1.md new file mode 100644 index 00000000..5534cbae --- /dev/null +++ b/rest/api/v3/link_branding/docs/Type1.md @@ -0,0 +1,14 @@ +# Type1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**CNAME** | string | (value: `"cname"`) +**TXT** | string | (value: `"txt"`) +**MX** | string | (value: `"mx"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/UpdateBrandedLink.md b/rest/api/v3/link_branding/docs/UpdateBrandedLink.md new file mode 100644 index 00000000..c86f728b --- /dev/null +++ b/rest/api/v3/link_branding/docs/UpdateBrandedLink.md @@ -0,0 +1,53 @@ +# UpdateBrandedLink + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateBrandedLink**](UpdateBrandedLink.md#UpdateBrandedLink) | **Patch** /v3/whitelabel/links/{Id} | Update a branded link + + + +## UpdateBrandedLink + +> LinkBranding200 UpdateBrandedLink(ctx, Idoptional) + +Update a branded link + +**This endpoint allows you to update a specific branded link. You can use this endpoint to change a branded link's default status.** You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **int32** | The ID of the branded link you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateBrandedLinkParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateBrandedLinkRequest** | [**UpdateBrandedLinkRequest**](UpdateBrandedLinkRequest.md) | + +### Return type + +[**LinkBranding200**](LinkBranding200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/link_branding/docs/UpdateBrandedLinkRequest.md b/rest/api/v3/link_branding/docs/UpdateBrandedLinkRequest.md new file mode 100644 index 00000000..2072273a --- /dev/null +++ b/rest/api/v3/link_branding/docs/UpdateBrandedLinkRequest.md @@ -0,0 +1,11 @@ +# UpdateBrandedLinkRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Default** | [**Default1**](Default1.md) | Indicates if the branded link is set as the default. When setting a new default, the existing default link branding will have its default status removed automatically. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/Valid.md b/rest/api/v3/link_branding/docs/Valid.md new file mode 100644 index 00000000..2addd0e7 --- /dev/null +++ b/rest/api/v3/link_branding/docs/Valid.md @@ -0,0 +1,13 @@ +# Valid + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TRUE** | bool | (value: `true`) +**FALSE** | bool | (value: `false`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/Valid1.md b/rest/api/v3/link_branding/docs/Valid1.md new file mode 100644 index 00000000..bca4d56b --- /dev/null +++ b/rest/api/v3/link_branding/docs/Valid1.md @@ -0,0 +1,13 @@ +# Valid1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TRUE** | bool | (value: `true`) +**FALSE** | bool | (value: `false`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/Valid2.md b/rest/api/v3/link_branding/docs/Valid2.md new file mode 100644 index 00000000..3abe1153 --- /dev/null +++ b/rest/api/v3/link_branding/docs/Valid2.md @@ -0,0 +1,13 @@ +# Valid2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TRUE** | bool | (value: `true`) +**FALSE** | bool | (value: `false`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/Valid3.md b/rest/api/v3/link_branding/docs/Valid3.md new file mode 100644 index 00000000..dfdefa92 --- /dev/null +++ b/rest/api/v3/link_branding/docs/Valid3.md @@ -0,0 +1,13 @@ +# Valid3 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TRUE** | bool | (value: `true`) +**FALSE** | bool | (value: `false`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/Valid4.md b/rest/api/v3/link_branding/docs/Valid4.md new file mode 100644 index 00000000..e088e125 --- /dev/null +++ b/rest/api/v3/link_branding/docs/Valid4.md @@ -0,0 +1,13 @@ +# Valid4 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TRUE** | bool | (value: `true`) +**FALSE** | bool | (value: `false`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/Valid5.md b/rest/api/v3/link_branding/docs/Valid5.md new file mode 100644 index 00000000..a3efe196 --- /dev/null +++ b/rest/api/v3/link_branding/docs/Valid5.md @@ -0,0 +1,13 @@ +# Valid5 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TRUE** | bool | (value: `true`) +**FALSE** | bool | (value: `false`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/ValidateBrandedLink.md b/rest/api/v3/link_branding/docs/ValidateBrandedLink.md new file mode 100644 index 00000000..98ebba01 --- /dev/null +++ b/rest/api/v3/link_branding/docs/ValidateBrandedLink.md @@ -0,0 +1,52 @@ +# ValidateBrandedLink + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ValidateBrandedLink**](ValidateBrandedLink.md#ValidateBrandedLink) | **Post** /v3/whitelabel/links/{Id}/validate | Validate a branded link + + + +## ValidateBrandedLink + +> ValidateBrandedLink200Response ValidateBrandedLink(ctx, Idoptional) + +Validate a branded link + +**This endpoint allows you to validate a branded link.** You can submit this request as one of your subusers if you include their ID in the `on-behalf-of` header in the request. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **int32** | The ID of the branded link that you want to validate. + +### Other Parameters + +Other parameters are passed through a pointer to a ValidateBrandedLinkParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ValidateBrandedLink200Response**](ValidateBrandedLink200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/link_branding/docs/ValidateBrandedLink200Response.md b/rest/api/v3/link_branding/docs/ValidateBrandedLink200Response.md new file mode 100644 index 00000000..b90b62ad --- /dev/null +++ b/rest/api/v3/link_branding/docs/ValidateBrandedLink200Response.md @@ -0,0 +1,13 @@ +# ValidateBrandedLink200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The ID of the branded link. | +**Valid** | [**Valid**](Valid.md) | Indicates if the link branding is valid. | +**ValidationResults** | [**ValidateBrandedLink200ResponseValidationResults**](ValidateBrandedLink200ResponseValidationResults.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResults.md b/rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResults.md new file mode 100644 index 00000000..a1fba585 --- /dev/null +++ b/rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResults.md @@ -0,0 +1,12 @@ +# ValidateBrandedLink200ResponseValidationResults + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DomainCname** | [**ValidateBrandedLink200ResponseValidationResultsDomainCname**](ValidateBrandedLink200ResponseValidationResultsDomainCname.md) | | +**OwnerCname** | [**ValidateBrandedLink200ResponseValidationResultsOwnerCname**](ValidateBrandedLink200ResponseValidationResultsOwnerCname.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResultsDomainCname.md b/rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResultsDomainCname.md new file mode 100644 index 00000000..25e06af9 --- /dev/null +++ b/rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResultsDomainCname.md @@ -0,0 +1,12 @@ +# ValidateBrandedLink200ResponseValidationResultsDomainCname + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Valid** | [**Valid1**](Valid1.md) | Indicates if this DNS record is valid. | +**Reason** | **string** | Null if the DNS record is valid. If the DNS record is invalid, this will explain why. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResultsOwnerCname.md b/rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResultsOwnerCname.md new file mode 100644 index 00000000..b9514012 --- /dev/null +++ b/rest/api/v3/link_branding/docs/ValidateBrandedLink200ResponseValidationResultsOwnerCname.md @@ -0,0 +1,12 @@ +# ValidateBrandedLink200ResponseValidationResultsOwnerCname + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Valid** | [**Valid2**](Valid2.md) | Indicates if the DNS record is valid. | +**Reason** | **string** | Null if valid. If the DNS record is invalid, this will explain why. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/ValidateBrandedLink500Response.md b/rest/api/v3/link_branding/docs/ValidateBrandedLink500Response.md new file mode 100644 index 00000000..53528b60 --- /dev/null +++ b/rest/api/v3/link_branding/docs/ValidateBrandedLink500Response.md @@ -0,0 +1,11 @@ +# ValidateBrandedLink500Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ValidateBrandedLink500ResponseErrorsInner**](ValidateBrandedLink500ResponseErrorsInner.md) | The reasons why the validation failed. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/docs/ValidateBrandedLink500ResponseErrorsInner.md b/rest/api/v3/link_branding/docs/ValidateBrandedLink500ResponseErrorsInner.md new file mode 100644 index 00000000..1e8880fd --- /dev/null +++ b/rest/api/v3/link_branding/docs/ValidateBrandedLink500ResponseErrorsInner.md @@ -0,0 +1,11 @@ +# ValidateBrandedLink500ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | The reason why the link whitelabel could not be validated. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/link_branding/model_associate_branded_link_with_subuser_request.go b/rest/api/v3/link_branding/model_associate_branded_link_with_subuser_request.go new file mode 100644 index 00000000..58038420 --- /dev/null +++ b/rest/api/v3/link_branding/model_associate_branded_link_with_subuser_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AssociateBrandedLinkWithSubuserRequest struct for AssociateBrandedLinkWithSubuserRequest +type AssociateBrandedLinkWithSubuserRequest struct { + // The username of the subuser account that you want to associate the branded link with. + Username *string `json:"username,omitempty"` +} diff --git a/rest/api/v3/link_branding/model_create_branded_link_request.go b/rest/api/v3/link_branding/model_create_branded_link_request.go new file mode 100644 index 00000000..7a72f580 --- /dev/null +++ b/rest/api/v3/link_branding/model_create_branded_link_request.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateBrandedLinkRequest struct for CreateBrandedLinkRequest +type CreateBrandedLinkRequest struct { + // The root domain for the subdomain that you are creating the link branding for. This should match your FROM email address. + Domain string `json:"domain"` + // The subdomain to create the link branding for. Must be different from the subdomain you used for authenticating your domain. + Subdomain *string `json:"subdomain,omitempty"` + // Indicates if you want to use this link branding as the default or fallback. When setting a new default, the existing default link branding will have its default status removed automatically. + Default *Default `json:"default,omitempty"` + // The region of the IP address. Can be `eu` or `us`. + Region *Region `json:"region,omitempty"` +} diff --git a/rest/api/v3/link_branding/model_default.go b/rest/api/v3/link_branding/model_default.go new file mode 100644 index 00000000..537e69bc --- /dev/null +++ b/rest/api/v3/link_branding/model_default.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Default the model 'Default' +type Default bool + +// List of Default +const ( + DEFAULT_TRUE Default = true + DEFAULT_FALSE Default = false +) diff --git a/rest/api/v3/link_branding/model_default1.go b/rest/api/v3/link_branding/model_default1.go new file mode 100644 index 00000000..eda59858 --- /dev/null +++ b/rest/api/v3/link_branding/model_default1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Default1 the model 'Default1' +type Default1 bool + +// List of Default1 +const ( + DEFAULT1_TRUE Default1 = true + DEFAULT1_FALSE Default1 = false +) diff --git a/rest/api/v3/link_branding/model_default2.go b/rest/api/v3/link_branding/model_default2.go new file mode 100644 index 00000000..e16aeccb --- /dev/null +++ b/rest/api/v3/link_branding/model_default2.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Default2 the model 'Default2' +type Default2 bool + +// List of Default2 +const ( + DEFAULT2_TRUE Default2 = true + DEFAULT2_FALSE Default2 = false +) diff --git a/rest/api/v3/link_branding/model_legacy.go b/rest/api/v3/link_branding/model_legacy.go new file mode 100644 index 00000000..821b3360 --- /dev/null +++ b/rest/api/v3/link_branding/model_legacy.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Legacy the model 'Legacy' +type Legacy bool + +// List of Legacy +const ( + LEGACY_TRUE Legacy = true + LEGACY_FALSE Legacy = false +) diff --git a/rest/api/v3/link_branding/model_link_branding200.go b/rest/api/v3/link_branding/model_link_branding200.go new file mode 100644 index 00000000..ff249aa3 --- /dev/null +++ b/rest/api/v3/link_branding/model_link_branding200.go @@ -0,0 +1,35 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// LinkBranding200 struct for LinkBranding200 +type LinkBranding200 struct { + // The ID of the branded link. + Id int32 `json:"id"` + // The root domain of the branded link. + Domain string `json:"domain"` + // The subdomain used to generate the DNS records for this link branding. This subdomain must be different from the subdomain used for your authenticated domain. + Subdomain *string `json:"subdomain,omitempty"` + // The username of the account that this link branding is associated with. + Username string `json:"username"` + // The ID of the user that this link branding is associated with. + UserId int32 `json:"user_id"` + // Indicates if this is the default link branding. + Default Default2 `json:"default"` + // Indicates if this link branding is valid. + Valid Valid3 `json:"valid"` + // Indicates if this link branding was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create new link branding if you need to update it. + Legacy Legacy `json:"legacy"` + Dns LinkBranding200Dns `json:"dns"` +} diff --git a/rest/api/v3/link_branding/model_link_branding200_dns.go b/rest/api/v3/link_branding/model_link_branding200_dns.go new file mode 100644 index 00000000..6a3cd783 --- /dev/null +++ b/rest/api/v3/link_branding/model_link_branding200_dns.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// LinkBranding200Dns The DNS records generated for this link branding. +type LinkBranding200Dns struct { + DomainCname LinkBranding200DnsDomainCname `json:"domain_cname"` + OwnerCname *LinkBranding200DnsOwnerCname `json:"owner_cname,omitempty"` +} diff --git a/rest/api/v3/link_branding/model_link_branding200_dns_domain_cname.go b/rest/api/v3/link_branding/model_link_branding200_dns_domain_cname.go new file mode 100644 index 00000000..5a324f64 --- /dev/null +++ b/rest/api/v3/link_branding/model_link_branding200_dns_domain_cname.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// LinkBranding200DnsDomainCname The DNS record generated to point to your link branding subdomain. +type LinkBranding200DnsDomainCname struct { + // Indicates if the DNS record is valid. + Valid Valid4 `json:"valid"` + // The type of DNS record that was generated. + Type Type `json:"type"` + // The domain that this link branding will use for the links in your email. + Host string `json:"host"` + // The domain that the DNS record points to. + Data string `json:"data"` +} diff --git a/rest/api/v3/link_branding/model_link_branding200_dns_owner_cname.go b/rest/api/v3/link_branding/model_link_branding200_dns_owner_cname.go new file mode 100644 index 00000000..7f3f73c9 --- /dev/null +++ b/rest/api/v3/link_branding/model_link_branding200_dns_owner_cname.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// LinkBranding200DnsOwnerCname The DNS record generated to verify who created the link branding. +type LinkBranding200DnsOwnerCname struct { + // Indicates if the DNS record is valid. + Valid Valid5 `json:"valid"` + // The type of DNS record generated. + Type *Type1 `json:"type,omitempty"` + // Used to verify the link branding. The subdomain of this domain is the ID of the user who created the link branding. + Host string `json:"host"` + // The domain that the DNS record points to. + Data string `json:"data"` +} diff --git a/rest/api/v3/link_branding/model_region.go b/rest/api/v3/link_branding/model_region.go new file mode 100644 index 00000000..b3919cb6 --- /dev/null +++ b/rest/api/v3/link_branding/model_region.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Region the model 'Region' +type Region string + +// List of Region +const ( + REGION_EU Region = "eu" + REGION_US Region = "us" +) diff --git a/rest/api/v3/link_branding/model_type.go b/rest/api/v3/link_branding/model_type.go new file mode 100644 index 00000000..81e166bf --- /dev/null +++ b/rest/api/v3/link_branding/model_type.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Type the model 'Type' +type Type string + +// List of Type +const ( + TYPE_CNAME Type = "cname" + TYPE_TXT Type = "txt" + TYPE_MX Type = "mx" +) diff --git a/rest/api/v3/link_branding/model_type1.go b/rest/api/v3/link_branding/model_type1.go new file mode 100644 index 00000000..bf73a4a5 --- /dev/null +++ b/rest/api/v3/link_branding/model_type1.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Type1 the model 'Type1' +type Type1 string + +// List of Type1 +const ( + TYPE1_CNAME Type1 = "cname" + TYPE1_TXT Type1 = "txt" + TYPE1_MX Type1 = "mx" +) diff --git a/rest/api/v3/link_branding/model_update_branded_link_request.go b/rest/api/v3/link_branding/model_update_branded_link_request.go new file mode 100644 index 00000000..8f050b3f --- /dev/null +++ b/rest/api/v3/link_branding/model_update_branded_link_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateBrandedLinkRequest struct for UpdateBrandedLinkRequest +type UpdateBrandedLinkRequest struct { + // Indicates if the branded link is set as the default. When setting a new default, the existing default link branding will have its default status removed automatically. + Default *Default1 `json:"default,omitempty"` +} diff --git a/rest/api/v3/link_branding/model_valid.go b/rest/api/v3/link_branding/model_valid.go new file mode 100644 index 00000000..6ff1130e --- /dev/null +++ b/rest/api/v3/link_branding/model_valid.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Valid the model 'Valid' +type Valid bool + +// List of Valid +const ( + VALID_TRUE Valid = true + VALID_FALSE Valid = false +) diff --git a/rest/api/v3/link_branding/model_valid1.go b/rest/api/v3/link_branding/model_valid1.go new file mode 100644 index 00000000..b0a10088 --- /dev/null +++ b/rest/api/v3/link_branding/model_valid1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Valid1 the model 'Valid1' +type Valid1 bool + +// List of Valid1 +const ( + VALID1_TRUE Valid1 = true + VALID1_FALSE Valid1 = false +) diff --git a/rest/api/v3/link_branding/model_valid2.go b/rest/api/v3/link_branding/model_valid2.go new file mode 100644 index 00000000..b5131fe2 --- /dev/null +++ b/rest/api/v3/link_branding/model_valid2.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Valid2 the model 'Valid2' +type Valid2 bool + +// List of Valid2 +const ( + VALID2_TRUE Valid2 = true + VALID2_FALSE Valid2 = false +) diff --git a/rest/api/v3/link_branding/model_valid3.go b/rest/api/v3/link_branding/model_valid3.go new file mode 100644 index 00000000..5dcb4a84 --- /dev/null +++ b/rest/api/v3/link_branding/model_valid3.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Valid3 the model 'Valid3' +type Valid3 bool + +// List of Valid3 +const ( + VALID3_TRUE Valid3 = true + VALID3_FALSE Valid3 = false +) diff --git a/rest/api/v3/link_branding/model_valid4.go b/rest/api/v3/link_branding/model_valid4.go new file mode 100644 index 00000000..6f6bff20 --- /dev/null +++ b/rest/api/v3/link_branding/model_valid4.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Valid4 the model 'Valid4' +type Valid4 bool + +// List of Valid4 +const ( + VALID4_TRUE Valid4 = true + VALID4_FALSE Valid4 = false +) diff --git a/rest/api/v3/link_branding/model_valid5.go b/rest/api/v3/link_branding/model_valid5.go new file mode 100644 index 00000000..3edd72fb --- /dev/null +++ b/rest/api/v3/link_branding/model_valid5.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Valid5 the model 'Valid5' +type Valid5 bool + +// List of Valid5 +const ( + VALID5_TRUE Valid5 = true + VALID5_FALSE Valid5 = false +) diff --git a/rest/api/v3/link_branding/model_validate_branded_link_200_response.go b/rest/api/v3/link_branding/model_validate_branded_link_200_response.go new file mode 100644 index 00000000..260ce5cd --- /dev/null +++ b/rest/api/v3/link_branding/model_validate_branded_link_200_response.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateBrandedLink200Response struct for ValidateBrandedLink200Response +type ValidateBrandedLink200Response struct { + // The ID of the branded link. + Id int32 `json:"id"` + // Indicates if the link branding is valid. + Valid Valid `json:"valid"` + ValidationResults ValidateBrandedLink200ResponseValidationResults `json:"validation_results"` +} diff --git a/rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results.go b/rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results.go new file mode 100644 index 00000000..5d4035c4 --- /dev/null +++ b/rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateBrandedLink200ResponseValidationResults The individual validation results for each of the DNS records associated with this branded link. +type ValidateBrandedLink200ResponseValidationResults struct { + DomainCname ValidateBrandedLink200ResponseValidationResultsDomainCname `json:"domain_cname"` + OwnerCname *ValidateBrandedLink200ResponseValidationResultsOwnerCname `json:"owner_cname,omitempty"` +} diff --git a/rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results_domain_cname.go b/rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results_domain_cname.go new file mode 100644 index 00000000..4abbea3a --- /dev/null +++ b/rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results_domain_cname.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateBrandedLink200ResponseValidationResultsDomainCname The DNS record generated for the sending domain used for this branded link. +type ValidateBrandedLink200ResponseValidationResultsDomainCname struct { + // Indicates if this DNS record is valid. + Valid Valid1 `json:"valid"` + // Null if the DNS record is valid. If the DNS record is invalid, this will explain why. + Reason string `json:"reason"` +} diff --git a/rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results_owner_cname.go b/rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results_owner_cname.go new file mode 100644 index 00000000..0ee10180 --- /dev/null +++ b/rest/api/v3/link_branding/model_validate_branded_link_200_response_validation_results_owner_cname.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateBrandedLink200ResponseValidationResultsOwnerCname The DNS record created to verify the branded link. +type ValidateBrandedLink200ResponseValidationResultsOwnerCname struct { + // Indicates if the DNS record is valid. + Valid Valid2 `json:"valid"` + // Null if valid. If the DNS record is invalid, this will explain why. + Reason string `json:"reason"` +} diff --git a/rest/api/v3/link_branding/model_validate_branded_link_500_response.go b/rest/api/v3/link_branding/model_validate_branded_link_500_response.go new file mode 100644 index 00000000..f0ddbfc0 --- /dev/null +++ b/rest/api/v3/link_branding/model_validate_branded_link_500_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateBrandedLink500Response struct for ValidateBrandedLink500Response +type ValidateBrandedLink500Response struct { + // The reasons why the validation failed. + Errors []ValidateBrandedLink500ResponseErrorsInner `json:"errors"` +} diff --git a/rest/api/v3/link_branding/model_validate_branded_link_500_response_errors_inner.go b/rest/api/v3/link_branding/model_validate_branded_link_500_response_errors_inner.go new file mode 100644 index 00000000..d0d11fbc --- /dev/null +++ b/rest/api/v3/link_branding/model_validate_branded_link_500_response_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Link Branding API +* The Twilio SendGrid Link Branding API allows you to configure your domain settings so that all of the click-tracked links, opens, and images in your emails are served from your domain rather than `sendgrid.net`. Spam filters and recipient servers look at the links within emails to determine whether the email appear trustworthy. They use the reputation of the root domain to determine whether the links can be trusted. You can also manage Link Branding in the **Sender Authentication** section of the Twilio SendGrid application user interface. See [**How to Set Up Link Branding**](https: //sendgrid.com/docs/ui/account-and-settings/how-to-set-up-link-branding/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateBrandedLink500ResponseErrorsInner struct for ValidateBrandedLink500ResponseErrorsInner +type ValidateBrandedLink500ResponseErrorsInner struct { + // The reason why the link whitelabel could not be validated. + Message string `json:"message"` +} diff --git a/rest/api/v3/lmc_campaigns/README.md b/rest/api/v3/lmc_campaigns/README.md new file mode 100644 index 00000000..214a012e --- /dev/null +++ b/rest/api/v3/lmc_campaigns/README.md @@ -0,0 +1,88 @@ +# Go API client for + +The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). + +See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:01.498878+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateCampaign* | [**CreateCampaign**](docs/CreateCampaign.md#createcampaign) | **Post** /v3/campaigns | Create a Campaign +*DeleteCampaign* | [**DeleteCampaign**](docs/DeleteCampaign.md#deletecampaign) | **Delete** /v3/campaigns/{CampaignId} | Delete a Campaign +*GetCampaign* | [**GetCampaign**](docs/GetCampaign.md#getcampaign) | **Get** /v3/campaigns/{CampaignId} | Retrieve a single campaign +*GetScheduledCampaign* | [**GetScheduledCampaign**](docs/GetScheduledCampaign.md#getscheduledcampaign) | **Get** /v3/campaigns/{CampaignId}/schedules | View Scheduled Time of a Campaign +*ListCampaign* | [**ListCampaign**](docs/ListCampaign.md#listcampaign) | **Get** /v3/campaigns | Retrieve all Campaigns +*ScheduleCampaign* | [**ScheduleCampaign**](docs/ScheduleCampaign.md#schedulecampaign) | **Post** /v3/campaigns/{CampaignId}/schedules | Schedule a Campaign +*SendCampaign* | [**SendCampaign**](docs/SendCampaign.md#sendcampaign) | **Post** /v3/campaigns/{CampaignId}/schedules/now | Send a Campaign +*SendTestCampaign* | [**SendTestCampaign**](docs/SendTestCampaign.md#sendtestcampaign) | **Post** /v3/campaigns/{CampaignId}/schedules/test | Send a Test Campaign +*UnScheduleCampaign* | [**UnScheduleCampaign**](docs/UnScheduleCampaign.md#unschedulecampaign) | **Delete** /v3/campaigns/{CampaignId}/schedules | Unschedule a Scheduled Campaign +*UpdateCampaign* | [**UpdateCampaign**](docs/UpdateCampaign.md#updatecampaign) | **Patch** /v3/campaigns/{CampaignId} | Update a Campaign +*UpdateScheduledCampaign* | [**UpdateScheduledCampaign**](docs/UpdateScheduledCampaign.md#updatescheduledcampaign) | **Patch** /v3/campaigns/{CampaignId}/schedules | Update a Scheduled Campaign + + +## Documentation For Models + + - [Campaigns2xx](Campaigns2xx.md) + - [Editor](Editor.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [GetCampaign200Response](GetCampaign200Response.md) + - [ListCampaign200Response](ListCampaign200Response.md) + - [PostCampaignsRequest](PostCampaignsRequest.md) + - [ScheduleACampaignRequest](ScheduleACampaignRequest.md) + - [ScheduleACampaignResponse](ScheduleACampaignResponse.md) + - [SendACampaignResponse](SendACampaignResponse.md) + - [SendATestCampaignRequest](SendATestCampaignRequest.md) + - [SendTestCampaignRequest](SendTestCampaignRequest.md) + - [Status](Status.md) + - [UpdateACampaignRequest](UpdateACampaignRequest.md) + - [UpdateAScheduledCampaignRequest](UpdateAScheduledCampaignRequest.md) + - [UpdateAScheduledCampaignResponse](UpdateAScheduledCampaignResponse.md) + - [ViewScheduledTimeOfACampaignResponse](ViewScheduledTimeOfACampaignResponse.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/lmc_campaigns/api_create_campaign.go b/rest/api/v3/lmc_campaigns/api_create_campaign.go new file mode 100644 index 00000000..1b96d7c3 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/api_create_campaign.go @@ -0,0 +1,90 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateCampaignParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + PostCampaignsRequest *PostCampaignsRequest `json:"PostCampaignsRequest,omitempty"` +} + +func (params *CreateCampaignParam) SetOnbehalfof(Onbehalfof string) *CreateCampaignParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateCampaignParam) SetPostCampaignsRequest(PostCampaignsRequest PostCampaignsRequest) *CreateCampaignParam { + params.PostCampaignsRequest = &PostCampaignsRequest + return params +} + +// **This endpoint allows you to create a campaign.** In order to send or schedule the campaign, you will be required to provide a subject, sender ID, content (we suggest both html and plain text), and at least one list or segment ID. This information is not required when you create a campaign. +func (c *ApiService) CreateCampaign(params *CreateCampaignParam) (interface{}, error) { + path := "/v3/campaigns" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.PostCampaignsRequest != nil { + b, err := json.Marshal(*params.PostCampaignsRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &Campaigns2xx{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_campaigns/api_delete_campaign.go b/rest/api/v3/lmc_campaigns/api_delete_campaign.go new file mode 100644 index 00000000..7224c1b0 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/api_delete_campaign.go @@ -0,0 +1,79 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type DeleteCampaignParam struct { + // The id of the campaign you would like to retrieve. + CampaignId *int32 `json:"campaign_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteCampaignParam) SetCampaignId(CampaignId int32) *DeleteCampaignParam { + params.CampaignId = &CampaignId + return params +} +func (params *DeleteCampaignParam) SetOnbehalfof(Onbehalfof string) *DeleteCampaignParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete a specific campaign.** +func (c *ApiService) DeleteCampaign(params *DeleteCampaignParam) (interface{}, error) { + path := "/v3/campaigns/{CampaignId}" + if params != nil && params.CampaignId != nil { + path = strings.Replace(path, "{"+"CampaignId"+"}", fmt.Sprint(*params.CampaignId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 401 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_campaigns/api_get_campaign.go b/rest/api/v3/lmc_campaigns/api_get_campaign.go new file mode 100644 index 00000000..a1fcf38b --- /dev/null +++ b/rest/api/v3/lmc_campaigns/api_get_campaign.go @@ -0,0 +1,87 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type GetCampaignParam struct { + // The id of the campaign you would like to retrieve. + CampaignId *int32 `json:"campaign_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetCampaignParam) SetCampaignId(CampaignId int32) *GetCampaignParam { + params.CampaignId = &CampaignId + return params +} +func (params *GetCampaignParam) SetOnbehalfof(Onbehalfof string) *GetCampaignParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a specific campaign.** +func (c *ApiService) GetCampaign(params *GetCampaignParam) (interface{}, error) { + path := "/v3/campaigns/{CampaignId}" + if params != nil && params.CampaignId != nil { + path = strings.Replace(path, "{"+"CampaignId"+"}", fmt.Sprint(*params.CampaignId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetCampaign200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_campaigns/api_get_scheduled_campaign.go b/rest/api/v3/lmc_campaigns/api_get_scheduled_campaign.go new file mode 100644 index 00000000..731ccec7 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/api_get_scheduled_campaign.go @@ -0,0 +1,79 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type GetScheduledCampaignParam struct { + // + CampaignId *int32 `json:"campaign_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetScheduledCampaignParam) SetCampaignId(CampaignId int32) *GetScheduledCampaignParam { + params.CampaignId = &CampaignId + return params +} +func (params *GetScheduledCampaignParam) SetOnbehalfof(Onbehalfof string) *GetScheduledCampaignParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve the date and time that a campaign has been scheduled to be sent.** +func (c *ApiService) GetScheduledCampaign(params *GetScheduledCampaignParam) (interface{}, error) { + path := "/v3/campaigns/{CampaignId}/schedules" + if params != nil && params.CampaignId != nil { + path = strings.Replace(path, "{"+"CampaignId"+"}", fmt.Sprint(*params.CampaignId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ViewScheduledTimeOfACampaignResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_campaigns/api_list_campaign.go b/rest/api/v3/lmc_campaigns/api_list_campaign.go new file mode 100644 index 00000000..29b304e1 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/api_list_campaign.go @@ -0,0 +1,79 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListCampaignParam struct { + // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. + Limit *int32 `json:"limit,omitempty"` + // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + Offset *int32 `json:"offset,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListCampaignParam) SetLimit(Limit int32) *ListCampaignParam { + params.Limit = &Limit + return params +} +func (params *ListCampaignParam) SetOffset(Offset int32) *ListCampaignParam { + params.Offset = &Offset + return params +} +func (params *ListCampaignParam) SetOnbehalfof(Onbehalfof string) *ListCampaignParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a paginated list of all of your campaigns.** Returns campaigns in reverse order they were created (newest first). Returns an empty array if no campaigns exist. You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. +func (c *ApiService) ListCampaign(params *ListCampaignParam) (interface{}, error) { + path := "/v3/campaigns" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListCampaign200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_campaigns/api_schedule_campaign.go b/rest/api/v3/lmc_campaigns/api_schedule_campaign.go new file mode 100644 index 00000000..1394c148 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/api_schedule_campaign.go @@ -0,0 +1,118 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type ScheduleCampaignParam struct { + // + CampaignId *int32 `json:"campaign_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + ScheduleACampaignRequest *ScheduleACampaignRequest `json:"ScheduleACampaignRequest,omitempty"` +} + +func (params *ScheduleCampaignParam) SetCampaignId(CampaignId int32) *ScheduleCampaignParam { + params.CampaignId = &CampaignId + return params +} +func (params *ScheduleCampaignParam) SetOnbehalfof(Onbehalfof string) *ScheduleCampaignParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *ScheduleCampaignParam) SetScheduleACampaignRequest(ScheduleACampaignRequest ScheduleACampaignRequest) *ScheduleCampaignParam { + params.ScheduleACampaignRequest = &ScheduleACampaignRequest + return params +} + +// **This endpoint allows you to schedule a specific date and time for your campaign to be sent.** If you have the flexibility, it's better to schedule mail for off-peak times. Most emails are scheduled and sent at the top of the hour or half hour. Scheduling email to avoid those times (for example, scheduling at 10:53) can result in lower deferral rates because it won't be going through our servers at the same times as everyone else's mail. +func (c *ApiService) ScheduleCampaign(params *ScheduleCampaignParam) (interface{}, error) { + path := "/v3/campaigns/{CampaignId}/schedules" + if params != nil && params.CampaignId != nil { + path = strings.Replace(path, "{"+"CampaignId"+"}", fmt.Sprint(*params.CampaignId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.ScheduleACampaignRequest != nil { + b, err := json.Marshal(*params.ScheduleACampaignRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &ScheduleACampaignResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_campaigns/api_send_campaign.go b/rest/api/v3/lmc_campaigns/api_send_campaign.go new file mode 100644 index 00000000..8b65c436 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/api_send_campaign.go @@ -0,0 +1,103 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type SendCampaignParam struct { + // + CampaignId *int32 `json:"campaign_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *SendCampaignParam) SetCampaignId(CampaignId int32) *SendCampaignParam { + params.CampaignId = &CampaignId + return params +} +func (params *SendCampaignParam) SetOnbehalfof(Onbehalfof string) *SendCampaignParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to immediately send an existing campaign.** Normally a POST request would have a body, but since this endpoint is telling us to send a resource that is already created, a request body is not needed. +func (c *ApiService) SendCampaign(params *SendCampaignParam) (interface{}, error) { + path := "/v3/campaigns/{CampaignId}/schedules/now" + if params != nil && params.CampaignId != nil { + path = strings.Replace(path, "{"+"CampaignId"+"}", fmt.Sprint(*params.CampaignId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &SendACampaignResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_campaigns/api_send_test_campaign.go b/rest/api/v3/lmc_campaigns/api_send_test_campaign.go new file mode 100644 index 00000000..6c48dcf0 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/api_send_test_campaign.go @@ -0,0 +1,102 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type SendTestCampaignParam struct { + // + CampaignId *int32 `json:"campaign_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + SendTestCampaignRequest *SendTestCampaignRequest `json:"SendTestCampaignRequest,omitempty"` +} + +func (params *SendTestCampaignParam) SetCampaignId(CampaignId int32) *SendTestCampaignParam { + params.CampaignId = &CampaignId + return params +} +func (params *SendTestCampaignParam) SetOnbehalfof(Onbehalfof string) *SendTestCampaignParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *SendTestCampaignParam) SetSendTestCampaignRequest(SendTestCampaignRequest SendTestCampaignRequest) *SendTestCampaignParam { + params.SendTestCampaignRequest = &SendTestCampaignRequest + return params +} + +// **This endpoint allows you to send a test campaign.** To send to multiple addresses, use an array for the JSON \"to\" value [\"one@address\",\"two@address\"] +func (c *ApiService) SendTestCampaign(params *SendTestCampaignParam) (interface{}, error) { + path := "/v3/campaigns/{CampaignId}/schedules/test" + if params != nil && params.CampaignId != nil { + path = strings.Replace(path, "{"+"CampaignId"+"}", fmt.Sprint(*params.CampaignId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SendTestCampaignRequest != nil { + b, err := json.Marshal(*params.SendTestCampaignRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &SendATestCampaignRequest{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_campaigns/api_service.go b/rest/api/v3/lmc_campaigns/api_service.go new file mode 100644 index 00000000..8f9dfc14 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/lmc_campaigns/api_un_schedule_campaign.go b/rest/api/v3/lmc_campaigns/api_un_schedule_campaign.go new file mode 100644 index 00000000..e6bb7253 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/api_un_schedule_campaign.go @@ -0,0 +1,79 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type UnScheduleCampaignParam struct { + // + CampaignId *int32 `json:"campaign_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *UnScheduleCampaignParam) SetCampaignId(CampaignId int32) *UnScheduleCampaignParam { + params.CampaignId = &CampaignId + return params +} +func (params *UnScheduleCampaignParam) SetOnbehalfof(Onbehalfof string) *UnScheduleCampaignParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to unschedule a campaign that has already been scheduled to be sent.** A successful unschedule will return a 204. If the specified campaign is in the process of being sent, the only option is to cancel (a different method). +func (c *ApiService) UnScheduleCampaign(params *UnScheduleCampaignParam) (interface{}, error) { + path := "/v3/campaigns/{CampaignId}/schedules" + if params != nil && params.CampaignId != nil { + path = strings.Replace(path, "{"+"CampaignId"+"}", fmt.Sprint(*params.CampaignId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_campaigns/api_update_campaign.go b/rest/api/v3/lmc_campaigns/api_update_campaign.go new file mode 100644 index 00000000..cb35f513 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/api_update_campaign.go @@ -0,0 +1,118 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type UpdateCampaignParam struct { + // The id of the campaign you would like to retrieve. + CampaignId *int32 `json:"campaign_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateACampaignRequest *UpdateACampaignRequest `json:"UpdateACampaignRequest,omitempty"` +} + +func (params *UpdateCampaignParam) SetCampaignId(CampaignId int32) *UpdateCampaignParam { + params.CampaignId = &CampaignId + return params +} +func (params *UpdateCampaignParam) SetOnbehalfof(Onbehalfof string) *UpdateCampaignParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateCampaignParam) SetUpdateACampaignRequest(UpdateACampaignRequest UpdateACampaignRequest) *UpdateCampaignParam { + params.UpdateACampaignRequest = &UpdateACampaignRequest + return params +} + +// **This endpoint allows you to update a specific campaign.** This is especially useful if you only set up the campaign using POST /campaigns, but didn't set many of the parameters. +func (c *ApiService) UpdateCampaign(params *UpdateCampaignParam) (interface{}, error) { + path := "/v3/campaigns/{CampaignId}" + if params != nil && params.CampaignId != nil { + path = strings.Replace(path, "{"+"CampaignId"+"}", fmt.Sprint(*params.CampaignId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateACampaignRequest != nil { + b, err := json.Marshal(*params.UpdateACampaignRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &Campaigns2xx{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_campaigns/api_update_scheduled_campaign.go b/rest/api/v3/lmc_campaigns/api_update_scheduled_campaign.go new file mode 100644 index 00000000..433ec883 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/api_update_scheduled_campaign.go @@ -0,0 +1,110 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type UpdateScheduledCampaignParam struct { + // + CampaignId *int32 `json:"campaign_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateAScheduledCampaignRequest *UpdateAScheduledCampaignRequest `json:"UpdateAScheduledCampaignRequest,omitempty"` +} + +func (params *UpdateScheduledCampaignParam) SetCampaignId(CampaignId int32) *UpdateScheduledCampaignParam { + params.CampaignId = &CampaignId + return params +} +func (params *UpdateScheduledCampaignParam) SetOnbehalfof(Onbehalfof string) *UpdateScheduledCampaignParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateScheduledCampaignParam) SetUpdateAScheduledCampaignRequest(UpdateAScheduledCampaignRequest UpdateAScheduledCampaignRequest) *UpdateScheduledCampaignParam { + params.UpdateAScheduledCampaignRequest = &UpdateAScheduledCampaignRequest + return params +} + +// **This endpoint allows to you change the scheduled time and date for a campaign to be sent.** +func (c *ApiService) UpdateScheduledCampaign(params *UpdateScheduledCampaignParam) (interface{}, error) { + path := "/v3/campaigns/{CampaignId}/schedules" + if params != nil && params.CampaignId != nil { + path = strings.Replace(path, "{"+"CampaignId"+"}", fmt.Sprint(*params.CampaignId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateAScheduledCampaignRequest != nil { + b, err := json.Marshal(*params.UpdateAScheduledCampaignRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &UpdateAScheduledCampaignResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_campaigns/docs/Campaigns2xx.md b/rest/api/v3/lmc_campaigns/docs/Campaigns2xx.md new file mode 100644 index 00000000..0d21e23c --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/Campaigns2xx.md @@ -0,0 +1,24 @@ +# Campaigns2xx + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | **string** | The display title of your campaign. This will be viewable by you in the Marketing Campaigns UI. | +**Subject** | **string** | The subject of your campaign that your recipients will see. |[optional] +**SenderId** | **int32** | The ID of the \"sender\" identity that you have created. Your recipients will see this as the \"from\" on your marketing emails. |[optional] +**ListIds** | **[]int32** | The IDs of the lists you are sending this campaign to. You can have both segment IDs and list IDs |[optional] +**SegmentIds** | **[]int32** | The segment IDs that you are sending this list to. You can have both segment IDs and list IDs. Segments are limited to 10 segment IDs. |[optional] +**Categories** | **[]string** | The categories you would like associated to this campaign. |[optional] +**SuppressionGroupId** | **int32** | The suppression group that this marketing email belongs to, allowing recipients to opt-out of emails of this type. |[optional] +**CustomUnsubscribeUrl** | **string** | This is the url of the custom unsubscribe page that you provide for customers to unsubscribe from your suppression groups. |[optional] +**IpPool** | **string** | The pool of IPs that you would like to send this email from. |[optional] +**HtmlContent** | **string** | The HTML of your marketing email. |[optional] +**PlainContent** | **string** | The plain text content of your emails. |[optional] +**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] +**Status** | **string** | The status of your campaign. | +**Id** | **int32** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/CreateCampaign.md b/rest/api/v3/lmc_campaigns/docs/CreateCampaign.md new file mode 100644 index 00000000..f7c28367 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/CreateCampaign.md @@ -0,0 +1,49 @@ +# CreateCampaign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateCampaign**](CreateCampaign.md#CreateCampaign) | **Post** /v3/campaigns | Create a Campaign + + + +## CreateCampaign + +> Campaigns2xx CreateCampaign(ctx, optional) + +Create a Campaign + +**This endpoint allows you to create a campaign.** In order to send or schedule the campaign, you will be required to provide a subject, sender ID, content (we suggest both html and plain text), and at least one list or segment ID. This information is not required when you create a campaign. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateCampaignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**PostCampaignsRequest** | [**PostCampaignsRequest**](PostCampaignsRequest.md) | + +### Return type + +[**Campaigns2xx**](Campaigns2xx.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_campaigns/docs/DeleteCampaign.md b/rest/api/v3/lmc_campaigns/docs/DeleteCampaign.md new file mode 100644 index 00000000..9cec6c51 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/DeleteCampaign.md @@ -0,0 +1,52 @@ +# DeleteCampaign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteCampaign**](DeleteCampaign.md#DeleteCampaign) | **Delete** /v3/campaigns/{CampaignId} | Delete a Campaign + + + +## DeleteCampaign + +> interface{} DeleteCampaign(ctx, CampaignIdoptional) + +Delete a Campaign + +**This endpoint allows you to delete a specific campaign.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CampaignId** | **int32** | The id of the campaign you would like to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteCampaignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_campaigns/docs/Editor.md b/rest/api/v3/lmc_campaigns/docs/Editor.md new file mode 100644 index 00000000..9d170841 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/Editor.md @@ -0,0 +1,13 @@ +# Editor + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**CODE** | string | (value: `"code"`) +**DESIGN** | string | (value: `"design"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/ErrorResponse.md b/rest/api/v3/lmc_campaigns/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/ErrorResponseErrorsInner.md b/rest/api/v3/lmc_campaigns/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/GetCampaign.md b/rest/api/v3/lmc_campaigns/docs/GetCampaign.md new file mode 100644 index 00000000..7fe9f996 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/GetCampaign.md @@ -0,0 +1,52 @@ +# GetCampaign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetCampaign**](GetCampaign.md#GetCampaign) | **Get** /v3/campaigns/{CampaignId} | Retrieve a single campaign + + + +## GetCampaign + +> GetCampaign200Response GetCampaign(ctx, CampaignIdoptional) + +Retrieve a single campaign + +**This endpoint allows you to retrieve a specific campaign.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CampaignId** | **int32** | The id of the campaign you would like to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetCampaignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**GetCampaign200Response**](GetCampaign200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_campaigns/docs/GetCampaign200Response.md b/rest/api/v3/lmc_campaigns/docs/GetCampaign200Response.md new file mode 100644 index 00000000..081bf696 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/GetCampaign200Response.md @@ -0,0 +1,23 @@ +# GetCampaign200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Categories** | **[]string** | |[optional] +**CustomUnsubscribeUrl** | **string** | |[optional] +**HtmlContent** | **string** | |[optional] +**Id** | **int32** | |[optional] +**IpPool** | **string** | |[optional] +**ListIds** | **[]int32** | |[optional] +**PlainContent** | **string** | |[optional] +**SegmentIds** | **[]int32** | |[optional] +**SenderId** | **int32** | |[optional] +**Status** | **string** | |[optional] +**Subject** | **string** | |[optional] +**SuppressionGroupId** | **int32** | |[optional] +**Title** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/GetScheduledCampaign.md b/rest/api/v3/lmc_campaigns/docs/GetScheduledCampaign.md new file mode 100644 index 00000000..66847be7 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/GetScheduledCampaign.md @@ -0,0 +1,52 @@ +# GetScheduledCampaign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetScheduledCampaign**](GetScheduledCampaign.md#GetScheduledCampaign) | **Get** /v3/campaigns/{CampaignId}/schedules | View Scheduled Time of a Campaign + + + +## GetScheduledCampaign + +> ViewScheduledTimeOfACampaignResponse GetScheduledCampaign(ctx, CampaignIdoptional) + +View Scheduled Time of a Campaign + +**This endpoint allows you to retrieve the date and time that a campaign has been scheduled to be sent.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CampaignId** | **int32** | + +### Other Parameters + +Other parameters are passed through a pointer to a GetScheduledCampaignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ViewScheduledTimeOfACampaignResponse**](ViewScheduledTimeOfACampaignResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_campaigns/docs/ListCampaign.md b/rest/api/v3/lmc_campaigns/docs/ListCampaign.md new file mode 100644 index 00000000..103eaf98 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/ListCampaign.md @@ -0,0 +1,50 @@ +# ListCampaign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListCampaign**](ListCampaign.md#ListCampaign) | **Get** /v3/campaigns | Retrieve all Campaigns + + + +## ListCampaign + +> ListCampaign200Response ListCampaign(ctx, optional) + +Retrieve all Campaigns + +**This endpoint allows you to retrieve a paginated list of all of your campaigns.** Returns campaigns in reverse order they were created (newest first). Returns an empty array if no campaigns exist. You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListCampaignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. +**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListCampaign200Response**](ListCampaign200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_campaigns/docs/ListCampaign200Response.md b/rest/api/v3/lmc_campaigns/docs/ListCampaign200Response.md new file mode 100644 index 00000000..4cb67061 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/ListCampaign200Response.md @@ -0,0 +1,11 @@ +# ListCampaign200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]Campaigns2xx**](Campaigns2xx.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/PostCampaignsRequest.md b/rest/api/v3/lmc_campaigns/docs/PostCampaignsRequest.md new file mode 100644 index 00000000..aa92e8b4 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/PostCampaignsRequest.md @@ -0,0 +1,22 @@ +# PostCampaignsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | **string** | The display title of your campaign. This will be viewable by you in the Marketing Campaigns UI. | +**Subject** | **string** | The subject of your campaign that your recipients will see. |[optional] +**SenderId** | **int32** | The ID of the \"sender\" identity that you have created. Your recipients will see this as the \"from\" on your marketing emails. |[optional] +**ListIds** | **[]int32** | The IDs of the lists you are sending this campaign to. You can have both segment IDs and list IDs |[optional] +**SegmentIds** | **[]int32** | The segment IDs that you are sending this list to. You can have both segment IDs and list IDs. Segments are limited to 10 segment IDs. |[optional] +**Categories** | **[]string** | The categories you would like associated to this campaign. |[optional] +**SuppressionGroupId** | **int32** | The suppression group that this marketing email belongs to, allowing recipients to opt-out of emails of this type. |[optional] +**CustomUnsubscribeUrl** | **string** | This is the url of the custom unsubscribe page that you provide for customers to unsubscribe from your suppression groups. |[optional] +**IpPool** | **string** | The pool of IPs that you would like to send this email from. |[optional] +**HtmlContent** | **string** | The HTML of your marketing email. |[optional] +**PlainContent** | **string** | The plain text content of your emails. |[optional] +**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/ScheduleACampaignRequest.md b/rest/api/v3/lmc_campaigns/docs/ScheduleACampaignRequest.md new file mode 100644 index 00000000..489650a2 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/ScheduleACampaignRequest.md @@ -0,0 +1,11 @@ +# ScheduleACampaignRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SendAt** | **int32** | The unix timestamp for the date and time you would like your campaign to be sent out. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/ScheduleACampaignResponse.md b/rest/api/v3/lmc_campaigns/docs/ScheduleACampaignResponse.md new file mode 100644 index 00000000..3e850370 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/ScheduleACampaignResponse.md @@ -0,0 +1,13 @@ +# ScheduleACampaignResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The campaign ID. | +**SendAt** | **int32** | The date time you scheduled your campaign to be sent. | +**Status** | [**Status**](Status.md) | The status of your campaign. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/ScheduleCampaign.md b/rest/api/v3/lmc_campaigns/docs/ScheduleCampaign.md new file mode 100644 index 00000000..257a83bf --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/ScheduleCampaign.md @@ -0,0 +1,53 @@ +# ScheduleCampaign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ScheduleCampaign**](ScheduleCampaign.md#ScheduleCampaign) | **Post** /v3/campaigns/{CampaignId}/schedules | Schedule a Campaign + + + +## ScheduleCampaign + +> ScheduleACampaignResponse ScheduleCampaign(ctx, CampaignIdoptional) + +Schedule a Campaign + +**This endpoint allows you to schedule a specific date and time for your campaign to be sent.** If you have the flexibility, it's better to schedule mail for off-peak times. Most emails are scheduled and sent at the top of the hour or half hour. Scheduling email to avoid those times (for example, scheduling at 10:53) can result in lower deferral rates because it won't be going through our servers at the same times as everyone else's mail. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CampaignId** | **int32** | + +### Other Parameters + +Other parameters are passed through a pointer to a ScheduleCampaignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**ScheduleACampaignRequest** | [**ScheduleACampaignRequest**](ScheduleACampaignRequest.md) | + +### Return type + +[**ScheduleACampaignResponse**](ScheduleACampaignResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_campaigns/docs/SendACampaignResponse.md b/rest/api/v3/lmc_campaigns/docs/SendACampaignResponse.md new file mode 100644 index 00000000..5b5d6e36 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/SendACampaignResponse.md @@ -0,0 +1,12 @@ +# SendACampaignResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int64** | | +**Status** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/SendATestCampaignRequest.md b/rest/api/v3/lmc_campaigns/docs/SendATestCampaignRequest.md new file mode 100644 index 00000000..7312efcb --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/SendATestCampaignRequest.md @@ -0,0 +1,11 @@ +# SendATestCampaignRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**To** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/SendCampaign.md b/rest/api/v3/lmc_campaigns/docs/SendCampaign.md new file mode 100644 index 00000000..8e303880 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/SendCampaign.md @@ -0,0 +1,52 @@ +# SendCampaign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SendCampaign**](SendCampaign.md#SendCampaign) | **Post** /v3/campaigns/{CampaignId}/schedules/now | Send a Campaign + + + +## SendCampaign + +> SendACampaignResponse SendCampaign(ctx, CampaignIdoptional) + +Send a Campaign + +**This endpoint allows you to immediately send an existing campaign.** Normally a POST request would have a body, but since this endpoint is telling us to send a resource that is already created, a request body is not needed. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CampaignId** | **int32** | + +### Other Parameters + +Other parameters are passed through a pointer to a SendCampaignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**SendACampaignResponse**](SendACampaignResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_campaigns/docs/SendTestCampaign.md b/rest/api/v3/lmc_campaigns/docs/SendTestCampaign.md new file mode 100644 index 00000000..8fdf3672 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/SendTestCampaign.md @@ -0,0 +1,53 @@ +# SendTestCampaign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SendTestCampaign**](SendTestCampaign.md#SendTestCampaign) | **Post** /v3/campaigns/{CampaignId}/schedules/test | Send a Test Campaign + + + +## SendTestCampaign + +> SendATestCampaignRequest SendTestCampaign(ctx, CampaignIdoptional) + +Send a Test Campaign + +**This endpoint allows you to send a test campaign.** To send to multiple addresses, use an array for the JSON \"to\" value [\"one@address\",\"two@address\"] + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CampaignId** | **int32** | + +### Other Parameters + +Other parameters are passed through a pointer to a SendTestCampaignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**SendTestCampaignRequest** | [**SendTestCampaignRequest**](SendTestCampaignRequest.md) | + +### Return type + +[**SendATestCampaignRequest**](SendATestCampaignRequest.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_campaigns/docs/SendTestCampaignRequest.md b/rest/api/v3/lmc_campaigns/docs/SendTestCampaignRequest.md new file mode 100644 index 00000000..3b22fcad --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/SendTestCampaignRequest.md @@ -0,0 +1,11 @@ +# SendTestCampaignRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**To** | **string** | The email address that should receive the test campaign. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/Status.md b/rest/api/v3/lmc_campaigns/docs/Status.md new file mode 100644 index 00000000..6f087e79 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/Status.md @@ -0,0 +1,12 @@ +# Status + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**SCHEDULED** | string | (value: `"Scheduled"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/UnScheduleCampaign.md b/rest/api/v3/lmc_campaigns/docs/UnScheduleCampaign.md new file mode 100644 index 00000000..a6b87142 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/UnScheduleCampaign.md @@ -0,0 +1,52 @@ +# UnScheduleCampaign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UnScheduleCampaign**](UnScheduleCampaign.md#UnScheduleCampaign) | **Delete** /v3/campaigns/{CampaignId}/schedules | Unschedule a Scheduled Campaign + + + +## UnScheduleCampaign + +> interface{} UnScheduleCampaign(ctx, CampaignIdoptional) + +Unschedule a Scheduled Campaign + +**This endpoint allows you to unschedule a campaign that has already been scheduled to be sent.** A successful unschedule will return a 204. If the specified campaign is in the process of being sent, the only option is to cancel (a different method). + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CampaignId** | **int32** | + +### Other Parameters + +Other parameters are passed through a pointer to a UnScheduleCampaignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_campaigns/docs/UpdateACampaignRequest.md b/rest/api/v3/lmc_campaigns/docs/UpdateACampaignRequest.md new file mode 100644 index 00000000..18686464 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/UpdateACampaignRequest.md @@ -0,0 +1,15 @@ +# UpdateACampaignRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | **string** | The title of the campaign. | +**Subject** | **string** | The subject line for your campaign. | +**Categories** | **[]string** | The categories you want to tag on this campaign. | +**HtmlContent** | **string** | The HTML content of this campaign. | +**PlainContent** | **string** | The plain content of this campaign. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/UpdateAScheduledCampaignRequest.md b/rest/api/v3/lmc_campaigns/docs/UpdateAScheduledCampaignRequest.md new file mode 100644 index 00000000..95153a0c --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/UpdateAScheduledCampaignRequest.md @@ -0,0 +1,11 @@ +# UpdateAScheduledCampaignRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SendAt** | **int64** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/UpdateAScheduledCampaignResponse.md b/rest/api/v3/lmc_campaigns/docs/UpdateAScheduledCampaignResponse.md new file mode 100644 index 00000000..ca58edfc --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/UpdateAScheduledCampaignResponse.md @@ -0,0 +1,13 @@ +# UpdateAScheduledCampaignResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The campaign ID | +**SendAt** | **int32** | The unix timestamp to send the campaign. | +**Status** | **string** | The status of the schedule. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/docs/UpdateCampaign.md b/rest/api/v3/lmc_campaigns/docs/UpdateCampaign.md new file mode 100644 index 00000000..763d4a0a --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/UpdateCampaign.md @@ -0,0 +1,53 @@ +# UpdateCampaign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateCampaign**](UpdateCampaign.md#UpdateCampaign) | **Patch** /v3/campaigns/{CampaignId} | Update a Campaign + + + +## UpdateCampaign + +> Campaigns2xx UpdateCampaign(ctx, CampaignIdoptional) + +Update a Campaign + +**This endpoint allows you to update a specific campaign.** This is especially useful if you only set up the campaign using POST /campaigns, but didn't set many of the parameters. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CampaignId** | **int32** | The id of the campaign you would like to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateCampaignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateACampaignRequest** | [**UpdateACampaignRequest**](UpdateACampaignRequest.md) | + +### Return type + +[**Campaigns2xx**](Campaigns2xx.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_campaigns/docs/UpdateScheduledCampaign.md b/rest/api/v3/lmc_campaigns/docs/UpdateScheduledCampaign.md new file mode 100644 index 00000000..936135ed --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/UpdateScheduledCampaign.md @@ -0,0 +1,53 @@ +# UpdateScheduledCampaign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateScheduledCampaign**](UpdateScheduledCampaign.md#UpdateScheduledCampaign) | **Patch** /v3/campaigns/{CampaignId}/schedules | Update a Scheduled Campaign + + + +## UpdateScheduledCampaign + +> UpdateAScheduledCampaignResponse UpdateScheduledCampaign(ctx, CampaignIdoptional) + +Update a Scheduled Campaign + +**This endpoint allows to you change the scheduled time and date for a campaign to be sent.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CampaignId** | **int32** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateScheduledCampaignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateAScheduledCampaignRequest** | [**UpdateAScheduledCampaignRequest**](UpdateAScheduledCampaignRequest.md) | + +### Return type + +[**UpdateAScheduledCampaignResponse**](UpdateAScheduledCampaignResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_campaigns/docs/ViewScheduledTimeOfACampaignResponse.md b/rest/api/v3/lmc_campaigns/docs/ViewScheduledTimeOfACampaignResponse.md new file mode 100644 index 00000000..76d1e22d --- /dev/null +++ b/rest/api/v3/lmc_campaigns/docs/ViewScheduledTimeOfACampaignResponse.md @@ -0,0 +1,11 @@ +# ViewScheduledTimeOfACampaignResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SendAt** | **int64** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_campaigns/model_campaigns2xx.go b/rest/api/v3/lmc_campaigns/model_campaigns2xx.go new file mode 100644 index 00000000..f8c3ccfd --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_campaigns2xx.go @@ -0,0 +1,45 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Campaigns2xx struct for Campaigns2xx +type Campaigns2xx struct { + // The display title of your campaign. This will be viewable by you in the Marketing Campaigns UI. + Title string `json:"title"` + // The subject of your campaign that your recipients will see. + Subject *string `json:"subject,omitempty"` + // The ID of the \"sender\" identity that you have created. Your recipients will see this as the \"from\" on your marketing emails. + SenderId *int32 `json:"sender_id,omitempty"` + // The IDs of the lists you are sending this campaign to. You can have both segment IDs and list IDs + ListIds *[]int32 `json:"list_ids,omitempty"` + // The segment IDs that you are sending this list to. You can have both segment IDs and list IDs. Segments are limited to 10 segment IDs. + SegmentIds *[]int32 `json:"segment_ids,omitempty"` + // The categories you would like associated to this campaign. + Categories *[]string `json:"categories,omitempty"` + // The suppression group that this marketing email belongs to, allowing recipients to opt-out of emails of this type. + SuppressionGroupId *int32 `json:"suppression_group_id,omitempty"` + // This is the url of the custom unsubscribe page that you provide for customers to unsubscribe from your suppression groups. + CustomUnsubscribeUrl *string `json:"custom_unsubscribe_url,omitempty"` + // The pool of IPs that you would like to send this email from. + IpPool *string `json:"ip_pool,omitempty"` + // The HTML of your marketing email. + HtmlContent *string `json:"html_content,omitempty"` + // The plain text content of your emails. + PlainContent *string `json:"plain_content,omitempty"` + // The editor used in the UI. + Editor *Editor `json:"editor,omitempty"` + // The status of your campaign. + Status string `json:"status"` + Id *int32 `json:"id,omitempty"` +} diff --git a/rest/api/v3/lmc_campaigns/model_editor.go b/rest/api/v3/lmc_campaigns/model_editor.go new file mode 100644 index 00000000..4af6f4bb --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_editor.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Editor the model 'Editor' +type Editor string + +// List of Editor +const ( + EDITOR_CODE Editor = "code" + EDITOR_DESIGN Editor = "design" +) diff --git a/rest/api/v3/lmc_campaigns/model_error_response.go b/rest/api/v3/lmc_campaigns/model_error_response.go new file mode 100644 index 00000000..fd2e601a --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/lmc_campaigns/model_error_response_errors_inner.go b/rest/api/v3/lmc_campaigns/model_error_response_errors_inner.go new file mode 100644 index 00000000..77addddc --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/lmc_campaigns/model_get_campaign_200_response.go b/rest/api/v3/lmc_campaigns/model_get_campaign_200_response.go new file mode 100644 index 00000000..7c675785 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_get_campaign_200_response.go @@ -0,0 +1,31 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetCampaign200Response struct for GetCampaign200Response +type GetCampaign200Response struct { + Categories *[]string `json:"categories,omitempty"` + CustomUnsubscribeUrl *string `json:"custom_unsubscribe_url,omitempty"` + HtmlContent *string `json:"html_content,omitempty"` + Id *int32 `json:"id,omitempty"` + IpPool *string `json:"ip_pool,omitempty"` + ListIds *[]int32 `json:"list_ids,omitempty"` + PlainContent *string `json:"plain_content,omitempty"` + SegmentIds *[]int32 `json:"segment_ids,omitempty"` + SenderId *int32 `json:"sender_id,omitempty"` + Status *string `json:"status,omitempty"` + Subject *string `json:"subject,omitempty"` + SuppressionGroupId *int32 `json:"suppression_group_id,omitempty"` + Title *string `json:"title,omitempty"` +} diff --git a/rest/api/v3/lmc_campaigns/model_list_campaign_200_response.go b/rest/api/v3/lmc_campaigns/model_list_campaign_200_response.go new file mode 100644 index 00000000..47cc209c --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_list_campaign_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListCampaign200Response struct for ListCampaign200Response +type ListCampaign200Response struct { + Result *[]Campaigns2xx `json:"result,omitempty"` +} diff --git a/rest/api/v3/lmc_campaigns/model_post_campaigns_request.go b/rest/api/v3/lmc_campaigns/model_post_campaigns_request.go new file mode 100644 index 00000000..0cc45837 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_post_campaigns_request.go @@ -0,0 +1,42 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// PostCampaignsRequest struct for PostCampaignsRequest +type PostCampaignsRequest struct { + // The display title of your campaign. This will be viewable by you in the Marketing Campaigns UI. + Title string `json:"title"` + // The subject of your campaign that your recipients will see. + Subject *string `json:"subject,omitempty"` + // The ID of the \"sender\" identity that you have created. Your recipients will see this as the \"from\" on your marketing emails. + SenderId *int32 `json:"sender_id,omitempty"` + // The IDs of the lists you are sending this campaign to. You can have both segment IDs and list IDs + ListIds *[]int32 `json:"list_ids,omitempty"` + // The segment IDs that you are sending this list to. You can have both segment IDs and list IDs. Segments are limited to 10 segment IDs. + SegmentIds *[]int32 `json:"segment_ids,omitempty"` + // The categories you would like associated to this campaign. + Categories *[]string `json:"categories,omitempty"` + // The suppression group that this marketing email belongs to, allowing recipients to opt-out of emails of this type. + SuppressionGroupId *int32 `json:"suppression_group_id,omitempty"` + // This is the url of the custom unsubscribe page that you provide for customers to unsubscribe from your suppression groups. + CustomUnsubscribeUrl *string `json:"custom_unsubscribe_url,omitempty"` + // The pool of IPs that you would like to send this email from. + IpPool *string `json:"ip_pool,omitempty"` + // The HTML of your marketing email. + HtmlContent *string `json:"html_content,omitempty"` + // The plain text content of your emails. + PlainContent *string `json:"plain_content,omitempty"` + // The editor used in the UI. + Editor *Editor `json:"editor,omitempty"` +} diff --git a/rest/api/v3/lmc_campaigns/model_schedule_a_campaign_request.go b/rest/api/v3/lmc_campaigns/model_schedule_a_campaign_request.go new file mode 100644 index 00000000..4b53f35b --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_schedule_a_campaign_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ScheduleACampaignRequest struct for ScheduleACampaignRequest +type ScheduleACampaignRequest struct { + // The unix timestamp for the date and time you would like your campaign to be sent out. + SendAt int32 `json:"send_at"` +} diff --git a/rest/api/v3/lmc_campaigns/model_schedule_a_campaign_response.go b/rest/api/v3/lmc_campaigns/model_schedule_a_campaign_response.go new file mode 100644 index 00000000..62df9ad9 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_schedule_a_campaign_response.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ScheduleACampaignResponse struct for ScheduleACampaignResponse +type ScheduleACampaignResponse struct { + // The campaign ID. + Id int32 `json:"id"` + // The date time you scheduled your campaign to be sent. + SendAt int32 `json:"send_at"` + // The status of your campaign. + Status Status `json:"status"` +} diff --git a/rest/api/v3/lmc_campaigns/model_send_a_campaign_response.go b/rest/api/v3/lmc_campaigns/model_send_a_campaign_response.go new file mode 100644 index 00000000..75f64bda --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_send_a_campaign_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendACampaignResponse struct for SendACampaignResponse +type SendACampaignResponse struct { + Id int64 `json:"id"` + Status string `json:"status"` +} diff --git a/rest/api/v3/lmc_campaigns/model_send_a_test_campaign_request.go b/rest/api/v3/lmc_campaigns/model_send_a_test_campaign_request.go new file mode 100644 index 00000000..48db5624 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_send_a_test_campaign_request.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendATestCampaignRequest struct for SendATestCampaignRequest +type SendATestCampaignRequest struct { + To string `json:"to"` +} diff --git a/rest/api/v3/lmc_campaigns/model_send_test_campaign_request.go b/rest/api/v3/lmc_campaigns/model_send_test_campaign_request.go new file mode 100644 index 00000000..facd4d89 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_send_test_campaign_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendTestCampaignRequest struct for SendTestCampaignRequest +type SendTestCampaignRequest struct { + // The email address that should receive the test campaign. + To string `json:"to"` +} diff --git a/rest/api/v3/lmc_campaigns/model_status.go b/rest/api/v3/lmc_campaigns/model_status.go new file mode 100644 index 00000000..099841ea --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_status.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status the model 'Status' +type Status string + +// List of Status +const ( + STATUS_SCHEDULED Status = "Scheduled" +) diff --git a/rest/api/v3/lmc_campaigns/model_update_a_campaign_request.go b/rest/api/v3/lmc_campaigns/model_update_a_campaign_request.go new file mode 100644 index 00000000..be297454 --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_update_a_campaign_request.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateACampaignRequest struct for UpdateACampaignRequest +type UpdateACampaignRequest struct { + // The title of the campaign. + Title string `json:"title"` + // The subject line for your campaign. + Subject string `json:"subject"` + // The categories you want to tag on this campaign. + Categories []string `json:"categories"` + // The HTML content of this campaign. + HtmlContent string `json:"html_content"` + // The plain content of this campaign. + PlainContent string `json:"plain_content"` +} diff --git a/rest/api/v3/lmc_campaigns/model_update_a_scheduled_campaign_request.go b/rest/api/v3/lmc_campaigns/model_update_a_scheduled_campaign_request.go new file mode 100644 index 00000000..e7a6d7cf --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_update_a_scheduled_campaign_request.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateAScheduledCampaignRequest struct for UpdateAScheduledCampaignRequest +type UpdateAScheduledCampaignRequest struct { + SendAt int64 `json:"send_at"` +} diff --git a/rest/api/v3/lmc_campaigns/model_update_a_scheduled_campaign_response.go b/rest/api/v3/lmc_campaigns/model_update_a_scheduled_campaign_response.go new file mode 100644 index 00000000..1f31db5a --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_update_a_scheduled_campaign_response.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateAScheduledCampaignResponse struct for UpdateAScheduledCampaignResponse +type UpdateAScheduledCampaignResponse struct { + // The campaign ID + Id int32 `json:"id"` + // The unix timestamp to send the campaign. + SendAt int32 `json:"send_at"` + // The status of the schedule. + Status string `json:"status"` +} diff --git a/rest/api/v3/lmc_campaigns/model_view_scheduled_time_of_a_campaign_response.go b/rest/api/v3/lmc_campaigns/model_view_scheduled_time_of_a_campaign_response.go new file mode 100644 index 00000000..e224df4c --- /dev/null +++ b/rest/api/v3/lmc_campaigns/model_view_scheduled_time_of_a_campaign_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Campaigns API +* The Twilio SendGrid Legacy Marketing Campaigns Campaigns API allows you to manage your marketing email messages programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your marketing messages with SendGrid [Single Sends](https://docs.sendgrid.com/api-reference/single-sends/) and [Automations](https://docs.sendgrid.com/ui/sending-email/getting-started-with-automation). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ViewScheduledTimeOfACampaignResponse struct for ViewScheduledTimeOfACampaignResponse +type ViewScheduledTimeOfACampaignResponse struct { + SendAt int64 `json:"send_at"` +} diff --git a/rest/api/v3/lmc_contactdb/README.md b/rest/api/v3/lmc_contactdb/README.md new file mode 100644 index 00000000..45861477 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/README.md @@ -0,0 +1,134 @@ +# Go API client for + +The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. + +See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:01.502496+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*AddRecipient* | [**AddRecipient**](docs/AddRecipient.md#addrecipient) | **Post** /v3/contactdb/recipients | Add recipients +*AddRecipientToContactDbList* | [**AddRecipientToContactDbList**](docs/AddRecipientToContactDbList.md#addrecipienttocontactdblist) | **Post** /v3/contactdb/lists/{ListId}/recipients/{RecipientId} | Add a Single Recipient to a List +*AddRecipientsToContactDbList* | [**AddRecipientsToContactDbList**](docs/AddRecipientsToContactDbList.md#addrecipientstocontactdblist) | **Post** /v3/contactdb/lists/{ListId}/recipients | Add Multiple Recipients to a List +*CreateContactDbList* | [**CreateContactDbList**](docs/CreateContactDbList.md#createcontactdblist) | **Post** /v3/contactdb/lists | Create a List +*CreateCustomField* | [**CreateCustomField**](docs/CreateCustomField.md#createcustomfield) | **Post** /v3/contactdb/custom_fields | Create a Custom Field +*CreateSegment* | [**CreateSegment**](docs/CreateSegment.md#createsegment) | **Post** /v3/contactdb/segments | Create a Segment +*DeleteContactDbList* | [**DeleteContactDbList**](docs/DeleteContactDbList.md#deletecontactdblist) | **Delete** /v3/contactdb/lists/{ListId} | Delete a List +*DeleteContactDbLists* | [**DeleteContactDbLists**](docs/DeleteContactDbLists.md#deletecontactdblists) | **Delete** /v3/contactdb/lists | Delete Multiple lists +*DeleteCustomField* | [**DeleteCustomField**](docs/DeleteCustomField.md#deletecustomfield) | **Delete** /v3/contactdb/custom_fields/{CustomFieldId} | Delete a Custom Field +*DeleteRecipient* | [**DeleteRecipient**](docs/DeleteRecipient.md#deleterecipient) | **Delete** /v3/contactdb/recipients/{RecipientId} | Delete a Recipient +*DeleteRecipientFromContactDbList* | [**DeleteRecipientFromContactDbList**](docs/DeleteRecipientFromContactDbList.md#deleterecipientfromcontactdblist) | **Delete** /v3/contactdb/lists/{ListId}/recipients/{RecipientId} | Delete a Single Recipient from a Single List +*DeleteRecipients* | [**DeleteRecipients**](docs/DeleteRecipients.md#deleterecipients) | **Delete** /v3/contactdb/recipients | Delete Recipients +*DeleteSegment* | [**DeleteSegment**](docs/DeleteSegment.md#deletesegment) | **Delete** /v3/contactdb/segments/{SegmentId} | Delete a segment +*GetBillable* | [**GetBillable**](docs/GetBillable.md#getbillable) | **Get** /v3/contactdb/recipients/billable_count | Retrieve the count of billable recipients +*GetContactDbList* | [**GetContactDbList**](docs/GetContactDbList.md#getcontactdblist) | **Get** /v3/contactdb/lists/{ListId} | Retrieve a single list +*GetCustomField* | [**GetCustomField**](docs/GetCustomField.md#getcustomfield) | **Get** /v3/contactdb/custom_fields/{CustomFieldId} | Retrieve a Custom Field +*GetRecipient* | [**GetRecipient**](docs/GetRecipient.md#getrecipient) | **Get** /v3/contactdb/recipients/{RecipientId} | Retrieve a single recipient +*GetRecipientList* | [**GetRecipientList**](docs/GetRecipientList.md#getrecipientlist) | **Get** /v3/contactdb/recipients/{RecipientId}/lists | Retrieve the lists that a recipient is on +*GetSegment* | [**GetSegment**](docs/GetSegment.md#getsegment) | **Get** /v3/contactdb/segments/{SegmentId} | Retrieve a segment +*ListContactDbList* | [**ListContactDbList**](docs/ListContactDbList.md#listcontactdblist) | **Get** /v3/contactdb/lists | Retrieve all lists +*ListCustomField* | [**ListCustomField**](docs/ListCustomField.md#listcustomfield) | **Get** /v3/contactdb/custom_fields | Retrieve all custom fields +*ListRecipient* | [**ListRecipient**](docs/ListRecipient.md#listrecipient) | **Get** /v3/contactdb/recipients | Retrieve recipients +*ListRecipientCount* | [**ListRecipientCount**](docs/ListRecipientCount.md#listrecipientcount) | **Get** /v3/contactdb/recipients/count | Retrieve a Count of Recipients +*ListRecipientForSegment* | [**ListRecipientForSegment**](docs/ListRecipientForSegment.md#listrecipientforsegment) | **Get** /v3/contactdb/segments/{SegmentId}/recipients | Retrieve recipients on a segment +*ListRecipientsFromContactDbList* | [**ListRecipientsFromContactDbList**](docs/ListRecipientsFromContactDbList.md#listrecipientsfromcontactdblist) | **Get** /v3/contactdb/lists/{ListId}/recipients | Retrieve all recipients on a List +*ListReservedField* | [**ListReservedField**](docs/ListReservedField.md#listreservedfield) | **Get** /v3/contactdb/reserved_fields | Retrieve reserved fields +*ListSearchRecipient* | [**ListSearchRecipient**](docs/ListSearchRecipient.md#listsearchrecipient) | **Get** /v3/contactdb/recipients/search | Search recipients +*ListSegment* | [**ListSegment**](docs/ListSegment.md#listsegment) | **Get** /v3/contactdb/segments | Retrieve all segments +*ListStatus* | [**ListStatus**](docs/ListStatus.md#liststatus) | **Get** /v3/contactdb/status | Get Recipient Upload Status +*SearchRecipient* | [**SearchRecipient**](docs/SearchRecipient.md#searchrecipient) | **Post** /v3/contactdb/recipients/search | Search recipients +*UpdateContactDbList* | [**UpdateContactDbList**](docs/UpdateContactDbList.md#updatecontactdblist) | **Patch** /v3/contactdb/lists/{ListId} | Update a List +*UpdateRecipient* | [**UpdateRecipient**](docs/UpdateRecipient.md#updaterecipient) | **Patch** /v3/contactdb/recipients | Update Recipient +*UpdateSegment* | [**UpdateSegment**](docs/UpdateSegment.md#updatesegment) | **Patch** /v3/contactdb/segments/{SegmentId} | Update a segment + + +## Documentation For Models + + - [AddRecipientRequestInner](AddRecipientRequestInner.md) + - [AndOr](AndOr.md) + - [ContactdbCustomField](ContactdbCustomField.md) + - [ContactdbCustomFieldId2xx](ContactdbCustomFieldId2xx.md) + - [ContactdbCustomFieldIdValue](ContactdbCustomFieldIdValue.md) + - [ContactdbList2xx](ContactdbList2xx.md) + - [ContactdbRecipient200](ContactdbRecipient200.md) + - [ContactdbRecipient200RecipientsInner](ContactdbRecipient200RecipientsInner.md) + - [ContactdbRecipientCount200](ContactdbRecipientCount200.md) + - [ContactdbRecipientResponse201](ContactdbRecipientResponse201.md) + - [ContactdbRecipientResponse201ErrorsInner](ContactdbRecipientResponse201ErrorsInner.md) + - [ContactdbSegments](ContactdbSegments.md) + - [ContactdbSegmentsConditions](ContactdbSegmentsConditions.md) + - [ContactdbSegmentsId200](ContactdbSegmentsId200.md) + - [CreateAListRequest](CreateAListRequest.md) + - [CreateCustomFieldRequest](CreateCustomFieldRequest.md) + - [DeleteContacts](DeleteContacts.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [GetRecipientList200Response](GetRecipientList200Response.md) + - [ListAllCustomFieldsResponse](ListAllCustomFieldsResponse.md) + - [ListAllListsResponse](ListAllListsResponse.md) + - [ListAllSegmentsResponse](ListAllSegmentsResponse.md) + - [ListRecipientsFromContactDbList200Response](ListRecipientsFromContactDbList200Response.md) + - [ListRecipientsOnASegmentResponse](ListRecipientsOnASegmentResponse.md) + - [ListRecipientsResponse](ListRecipientsResponse.md) + - [ListReservedField200Response](ListReservedField200Response.md) + - [ListReservedField200ResponseReservedFieldsInner](ListReservedField200ResponseReservedFieldsInner.md) + - [ListStatus200Response](ListStatus200Response.md) + - [ListStatus200ResponseStatusInner](ListStatus200ResponseStatusInner.md) + - [Operator](Operator.md) + - [SearchRecipient200Response](SearchRecipient200Response.md) + - [SearchRecipient200ResponseRecipientsInner](SearchRecipient200ResponseRecipientsInner.md) + - [SearchRecipient200ResponseRecipientsInnerCustomFieldsInner](SearchRecipient200ResponseRecipientsInnerCustomFieldsInner.md) + - [SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue](SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue.md) + - [SearchRecipientRequest](SearchRecipientRequest.md) + - [Type](Type.md) + - [UpdateAListRequest](UpdateAListRequest.md) + - [UpdateContactDbList200Response](UpdateContactDbList200Response.md) + - [UpdateRecipientRequestInner](UpdateRecipientRequestInner.md) + - [UpdateSegmentRequest](UpdateSegmentRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/lmc_contactdb/api_add_recipient.go b/rest/api/v3/lmc_contactdb/api_add_recipient.go new file mode 100644 index 00000000..b769b98b --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_add_recipient.go @@ -0,0 +1,90 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type AddRecipientParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + AddRecipientRequestInner *[]AddRecipientRequestInner `json:"AddRecipientRequestInner,omitempty"` +} + +func (params *AddRecipientParam) SetOnbehalfof(Onbehalfof string) *AddRecipientParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *AddRecipientParam) SetAddRecipientRequestInner(AddRecipientRequestInner []AddRecipientRequestInner) *AddRecipientParam { + params.AddRecipientRequestInner = &AddRecipientRequestInner + return params +} + +// **This endpoint allows you to add a Marketing Campaigns recipient.** You can add custom field data as a parameter on this endpoint. We have provided an example using some of the default custom fields SendGrid provides. The rate limit is three requests every 2 seconds. You can upload 1000 contacts per request. So the maximum upload rate is 1500 recipients per second. +func (c *ApiService) AddRecipient(params *AddRecipientParam) (interface{}, error) { + path := "/v3/contactdb/recipients" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.AddRecipientRequestInner != nil { + b, err := json.Marshal(*params.AddRecipientRequestInner) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &ContactdbRecipientResponse201{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_add_recipient_to_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_add_recipient_to_contact_db_list.go new file mode 100644 index 00000000..c5df2a19 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_add_recipient_to_contact_db_list.go @@ -0,0 +1,96 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type AddRecipientToContactDbListParam struct { + // The ID of the list that you want to add the recipient to. + ListId *int32 `json:"list_id"` + // The ID of the recipient you are adding to the list. + RecipientId *string `json:"recipient_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *AddRecipientToContactDbListParam) SetListId(ListId int32) *AddRecipientToContactDbListParam { + params.ListId = &ListId + return params +} +func (params *AddRecipientToContactDbListParam) SetRecipientId(RecipientId string) *AddRecipientToContactDbListParam { + params.RecipientId = &RecipientId + return params +} +func (params *AddRecipientToContactDbListParam) SetOnbehalfof(Onbehalfof string) *AddRecipientToContactDbListParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to add a single recipient to a list.** +func (c *ApiService) AddRecipientToContactDbList(params *AddRecipientToContactDbListParam) (interface{}, error) { + path := "/v3/contactdb/lists/{ListId}/recipients/{RecipientId}" + if params != nil && params.ListId != nil { + path = strings.Replace(path, "{"+"ListId"+"}", fmt.Sprint(*params.ListId), -1) + } + if params != nil && params.RecipientId != nil { + path = strings.Replace(path, "{"+"RecipientId"+"}", *params.RecipientId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_add_recipients_to_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_add_recipients_to_contact_db_list.go new file mode 100644 index 00000000..f41944ce --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_add_recipients_to_contact_db_list.go @@ -0,0 +1,102 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type AddRecipientsToContactDbListParam struct { + // The id of the list of recipients you want to retrieve. + ListId *int32 `json:"list_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + RequestBody *[]string `json:"request_body,omitempty"` +} + +func (params *AddRecipientsToContactDbListParam) SetListId(ListId int32) *AddRecipientsToContactDbListParam { + params.ListId = &ListId + return params +} +func (params *AddRecipientsToContactDbListParam) SetOnbehalfof(Onbehalfof string) *AddRecipientsToContactDbListParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *AddRecipientsToContactDbListParam) SetRequestBody(RequestBody []string) *AddRecipientsToContactDbListParam { + params.RequestBody = &RequestBody + return params +} + +// **This endpoint allows you to add multiple recipients to a list.** Adds existing recipients to a list, passing in the recipient IDs to add. Recipient IDs (base64-encoded email addresses) should be passed exactly as they are returned from recipient endpoints. +func (c *ApiService) AddRecipientsToContactDbList(params *AddRecipientsToContactDbListParam) (interface{}, error) { + path := "/v3/contactdb/lists/{ListId}/recipients" + if params != nil && params.ListId != nil { + path = strings.Replace(path, "{"+"ListId"+"}", fmt.Sprint(*params.ListId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.RequestBody != nil { + b, err := json.Marshal(*params.RequestBody) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_create_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_create_contact_db_list.go new file mode 100644 index 00000000..a16254d8 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_create_contact_db_list.go @@ -0,0 +1,90 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateContactDbListParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + CreateAListRequest *CreateAListRequest `json:"CreateAListRequest,omitempty"` +} + +func (params *CreateContactDbListParam) SetOnbehalfof(Onbehalfof string) *CreateContactDbListParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateContactDbListParam) SetCreateAListRequest(CreateAListRequest CreateAListRequest) *CreateContactDbListParam { + params.CreateAListRequest = &CreateAListRequest + return params +} + +// **This endpoint allows you to create a list for your recipients.** +func (c *ApiService) CreateContactDbList(params *CreateContactDbListParam) (interface{}, error) { + path := "/v3/contactdb/lists" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateAListRequest != nil { + b, err := json.Marshal(*params.CreateAListRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &ContactdbList2xx{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_create_custom_field.go b/rest/api/v3/lmc_contactdb/api_create_custom_field.go new file mode 100644 index 00000000..79fb8a50 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_create_custom_field.go @@ -0,0 +1,82 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateCustomFieldParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + CreateCustomFieldRequest *CreateCustomFieldRequest `json:"CreateCustomFieldRequest,omitempty"` +} + +func (params *CreateCustomFieldParam) SetOnbehalfof(Onbehalfof string) *CreateCustomFieldParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateCustomFieldParam) SetCreateCustomFieldRequest(CreateCustomFieldRequest CreateCustomFieldRequest) *CreateCustomFieldParam { + params.CreateCustomFieldRequest = &CreateCustomFieldRequest + return params +} + +// **This endpoint allows you to create a custom field.** **You can create up to 120 custom fields.** +func (c *ApiService) CreateCustomField(params *CreateCustomFieldParam) (interface{}, error) { + path := "/v3/contactdb/custom_fields" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateCustomFieldRequest != nil { + b, err := json.Marshal(*params.CreateCustomFieldRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &ContactdbCustomFieldId2xx{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_create_segment.go b/rest/api/v3/lmc_contactdb/api_create_segment.go new file mode 100644 index 00000000..883987dc --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_create_segment.go @@ -0,0 +1,90 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateSegmentParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + ContactdbSegments *ContactdbSegments `json:"ContactdbSegments,omitempty"` +} + +func (params *CreateSegmentParam) SetOnbehalfof(Onbehalfof string) *CreateSegmentParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateSegmentParam) SetContactdbSegments(ContactdbSegments ContactdbSegments) *CreateSegmentParam { + params.ContactdbSegments = &ContactdbSegments + return params +} + +// **This endpoint allows you to create a new segment.** Valid operators for create and update depend on the type of the field for which you are searching. **Dates** - \"eq\", \"ne\", \"lt\" (before), \"gt\" (after) - You may use MM/DD/YYYY for day granularity or an epoch for second granularity. - \"empty\", \"not_empty\" - \"is within\" - You may use an [ISO 8601 date format](https://en.wikipedia.org/wiki/ISO_8601) or the # of days. **Text** - \"contains\" - \"eq\" (is/equals - matches the full field) - \"ne\" (is not/not equals - matches any field where the entire field is not the condition value) - \"empty\" - \"not_empty\" **Numbers** - \"eq\" (is/equals) - \"lt\" (is less than) - \"gt\" (is greater than) - \"empty\" - \"not_empty\" **Email Clicks and Opens** - \"eq\" (opened) - \"ne\" (not opened) All field values must be a string. Conditions using \"eq\" or \"ne\" for email clicks and opens should provide a \"field\" of either `clicks.campaign_identifier` or `opens.campaign_identifier`. The condition value should be a string containing the id of a completed campaign. The conditions list may contain multiple conditions, joined by an \"and\" or \"or\" in the \"and_or\" field. The first condition in the conditions list must have an empty \"and_or\", and subsequent conditions must all specify an \"and_or\". +func (c *ApiService) CreateSegment(params *CreateSegmentParam) (interface{}, error) { + path := "/v3/contactdb/segments" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.ContactdbSegments != nil { + b, err := json.Marshal(*params.ContactdbSegments) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ContactdbSegmentsId200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_delete_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_delete_contact_db_list.go new file mode 100644 index 00000000..a8619196 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_delete_contact_db_list.go @@ -0,0 +1,111 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type DeleteContactDbListParam struct { + // + ListId *int32 `json:"list_id"` + // Adds the ability to delete all contacts on the list in addition to deleting the list. + DeleteContacts *DeleteContacts `json:"delete_contacts,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + Body *interface{} `json:"body,omitempty"` +} + +func (params *DeleteContactDbListParam) SetListId(ListId int32) *DeleteContactDbListParam { + params.ListId = &ListId + return params +} +func (params *DeleteContactDbListParam) SetDeleteContacts(DeleteContacts DeleteContacts) *DeleteContactDbListParam { + params.DeleteContacts = &DeleteContacts + return params +} +func (params *DeleteContactDbListParam) SetOnbehalfof(Onbehalfof string) *DeleteContactDbListParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *DeleteContactDbListParam) SetBody(Body interface{}) *DeleteContactDbListParam { + params.Body = &Body + return params +} + +// **This endpoint allows you to delete a specific recipient list with the given ID.** +func (c *ApiService) DeleteContactDbList(params *DeleteContactDbListParam) (interface{}, error) { + path := "/v3/contactdb/lists/{ListId}" + if params != nil && params.ListId != nil { + path = strings.Replace(path, "{"+"ListId"+"}", fmt.Sprint(*params.ListId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + if params != nil && params.DeleteContacts != nil { + data.Set("delete_contacts", fmt.Sprint(*params.DeleteContacts)) + } + body := []byte{} + if params != nil && params.Body != nil { + b, err := json.Marshal(*params.Body) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_delete_contact_db_lists.go b/rest/api/v3/lmc_contactdb/api_delete_contact_db_lists.go new file mode 100644 index 00000000..4eca4942 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_delete_contact_db_lists.go @@ -0,0 +1,82 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type DeleteContactDbListsParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + RequestBody *[]int32 `json:"request_body,omitempty"` +} + +func (params *DeleteContactDbListsParam) SetOnbehalfof(Onbehalfof string) *DeleteContactDbListsParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *DeleteContactDbListsParam) SetRequestBody(RequestBody []int32) *DeleteContactDbListsParam { + params.RequestBody = &RequestBody + return params +} + +// **This endpoint allows you to delete multiple recipient lists.** +func (c *ApiService) DeleteContactDbLists(params *DeleteContactDbListsParam) (interface{}, error) { + path := "/v3/contactdb/lists" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.RequestBody != nil { + b, err := json.Marshal(*params.RequestBody) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_delete_custom_field.go b/rest/api/v3/lmc_contactdb/api_delete_custom_field.go new file mode 100644 index 00000000..6922e534 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_delete_custom_field.go @@ -0,0 +1,95 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type DeleteCustomFieldParam struct { + // The ID of the custom field that you want to retrieve. + CustomFieldId *int32 `json:"custom_field_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteCustomFieldParam) SetCustomFieldId(CustomFieldId int32) *DeleteCustomFieldParam { + params.CustomFieldId = &CustomFieldId + return params +} +func (params *DeleteCustomFieldParam) SetOnbehalfof(Onbehalfof string) *DeleteCustomFieldParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete a custom field by ID.** +func (c *ApiService) DeleteCustomField(params *DeleteCustomFieldParam) (interface{}, error) { + path := "/v3/contactdb/custom_fields/{CustomFieldId}" + if params != nil && params.CustomFieldId != nil { + path = strings.Replace(path, "{"+"CustomFieldId"+"}", fmt.Sprint(*params.CustomFieldId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 202 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_delete_recipient.go b/rest/api/v3/lmc_contactdb/api_delete_recipient.go new file mode 100644 index 00000000..ae613ae6 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_delete_recipient.go @@ -0,0 +1,94 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteRecipientParam struct { + // The ID of the recipient that you want to retrieve. + RecipientId *string `json:"recipient_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteRecipientParam) SetRecipientId(RecipientId string) *DeleteRecipientParam { + params.RecipientId = &RecipientId + return params +} +func (params *DeleteRecipientParam) SetOnbehalfof(Onbehalfof string) *DeleteRecipientParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete a single recipient with the given ID from your contact database.** > Use this to permanently delete your recipients from all of your contact lists and all segments if required by applicable law. +func (c *ApiService) DeleteRecipient(params *DeleteRecipientParam) (interface{}, error) { + path := "/v3/contactdb/recipients/{RecipientId}" + if params != nil && params.RecipientId != nil { + path = strings.Replace(path, "{"+"RecipientId"+"}", *params.RecipientId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_delete_recipient_from_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_delete_recipient_from_contact_db_list.go new file mode 100644 index 00000000..ef0e3b8b --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_delete_recipient_from_contact_db_list.go @@ -0,0 +1,111 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type DeleteRecipientFromContactDbListParam struct { + // The ID of the list that you want to add the recipient to. + ListId *int32 `json:"list_id"` + // The ID of the recipient you are adding to the list. + RecipientId *string `json:"recipient_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + Body *interface{} `json:"body,omitempty"` +} + +func (params *DeleteRecipientFromContactDbListParam) SetListId(ListId int32) *DeleteRecipientFromContactDbListParam { + params.ListId = &ListId + return params +} +func (params *DeleteRecipientFromContactDbListParam) SetRecipientId(RecipientId string) *DeleteRecipientFromContactDbListParam { + params.RecipientId = &RecipientId + return params +} +func (params *DeleteRecipientFromContactDbListParam) SetOnbehalfof(Onbehalfof string) *DeleteRecipientFromContactDbListParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *DeleteRecipientFromContactDbListParam) SetBody(Body interface{}) *DeleteRecipientFromContactDbListParam { + params.Body = &Body + return params +} + +// **This endpoint allows you to delete a single recipient from a list.** +func (c *ApiService) DeleteRecipientFromContactDbList(params *DeleteRecipientFromContactDbListParam) (interface{}, error) { + path := "/v3/contactdb/lists/{ListId}/recipients/{RecipientId}" + if params != nil && params.ListId != nil { + path = strings.Replace(path, "{"+"ListId"+"}", fmt.Sprint(*params.ListId), -1) + } + if params != nil && params.RecipientId != nil { + path = strings.Replace(path, "{"+"RecipientId"+"}", *params.RecipientId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.Body != nil { + b, err := json.Marshal(*params.Body) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_delete_recipients.go b/rest/api/v3/lmc_contactdb/api_delete_recipients.go new file mode 100644 index 00000000..1789c0e9 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_delete_recipients.go @@ -0,0 +1,90 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type DeleteRecipientsParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + RequestBody *[]string `json:"request_body,omitempty"` +} + +func (params *DeleteRecipientsParam) SetOnbehalfof(Onbehalfof string) *DeleteRecipientsParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *DeleteRecipientsParam) SetRequestBody(RequestBody []string) *DeleteRecipientsParam { + params.RequestBody = &RequestBody + return params +} + +// **This endpoint allows you to deletes one or more recipients.** The body of an API call to this endpoint must include an array of recipient IDs of the recipients you want to delete. +func (c *ApiService) DeleteRecipients(params *DeleteRecipientsParam) (interface{}, error) { + path := "/v3/contactdb/recipients" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.RequestBody != nil { + b, err := json.Marshal(*params.RequestBody) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_delete_segment.go b/rest/api/v3/lmc_contactdb/api_delete_segment.go new file mode 100644 index 00000000..7c9c5d15 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_delete_segment.go @@ -0,0 +1,111 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type DeleteSegmentParam struct { + // + SegmentId *int32 `json:"segment_id"` + // True to delete all contacts matching the segment in addition to deleting the segment + DeleteContacts *bool `json:"delete_contacts,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + Body *interface{} `json:"body,omitempty"` +} + +func (params *DeleteSegmentParam) SetSegmentId(SegmentId int32) *DeleteSegmentParam { + params.SegmentId = &SegmentId + return params +} +func (params *DeleteSegmentParam) SetDeleteContacts(DeleteContacts bool) *DeleteSegmentParam { + params.DeleteContacts = &DeleteContacts + return params +} +func (params *DeleteSegmentParam) SetOnbehalfof(Onbehalfof string) *DeleteSegmentParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *DeleteSegmentParam) SetBody(Body interface{}) *DeleteSegmentParam { + params.Body = &Body + return params +} + +// **This endpoint allows you to delete a segment from your recipients database.** You also have the option to delete all the contacts from your Marketing Campaigns recipient database who were in this segment. +func (c *ApiService) DeleteSegment(params *DeleteSegmentParam) (interface{}, error) { + path := "/v3/contactdb/segments/{SegmentId}" + if params != nil && params.SegmentId != nil { + path = strings.Replace(path, "{"+"SegmentId"+"}", fmt.Sprint(*params.SegmentId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + if params != nil && params.DeleteContacts != nil { + data.Set("delete_contacts", fmt.Sprint(*params.DeleteContacts)) + } + body := []byte{} + if params != nil && params.Body != nil { + b, err := json.Marshal(*params.Body) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_get_billable.go b/rest/api/v3/lmc_contactdb/api_get_billable.go new file mode 100644 index 00000000..efe82e8b --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_get_billable.go @@ -0,0 +1,67 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type GetBillableParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetBillableParam) SetOnbehalfof(Onbehalfof string) *GetBillableParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve the number of Marketing Campaigns recipients that you will be billed for.** You are billed for marketing campaigns based on the highest number of recipients you have had in your account at one time. This endpoint will allow you to know the current billable count value. +func (c *ApiService) GetBillable(params *GetBillableParam) (interface{}, error) { + path := "/v3/contactdb/recipients/billable_count" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ContactdbRecipientCount200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_get_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_get_contact_db_list.go new file mode 100644 index 00000000..4ae1cd3c --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_get_contact_db_list.go @@ -0,0 +1,95 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type GetContactDbListParam struct { + // + ListId *int32 `json:"list_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetContactDbListParam) SetListId(ListId int32) *GetContactDbListParam { + params.ListId = &ListId + return params +} +func (params *GetContactDbListParam) SetOnbehalfof(Onbehalfof string) *GetContactDbListParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a single recipient list.** +func (c *ApiService) GetContactDbList(params *GetContactDbListParam) (interface{}, error) { + path := "/v3/contactdb/lists/{ListId}" + if params != nil && params.ListId != nil { + path = strings.Replace(path, "{"+"ListId"+"}", fmt.Sprint(*params.ListId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ContactdbList2xx{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_get_custom_field.go b/rest/api/v3/lmc_contactdb/api_get_custom_field.go new file mode 100644 index 00000000..b54e79b6 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_get_custom_field.go @@ -0,0 +1,95 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type GetCustomFieldParam struct { + // The ID of the custom field that you want to retrieve. + CustomFieldId *int32 `json:"custom_field_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetCustomFieldParam) SetCustomFieldId(CustomFieldId int32) *GetCustomFieldParam { + params.CustomFieldId = &CustomFieldId + return params +} +func (params *GetCustomFieldParam) SetOnbehalfof(Onbehalfof string) *GetCustomFieldParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a custom field by ID.** +func (c *ApiService) GetCustomField(params *GetCustomFieldParam) (interface{}, error) { + path := "/v3/contactdb/custom_fields/{CustomFieldId}" + if params != nil && params.CustomFieldId != nil { + path = strings.Replace(path, "{"+"CustomFieldId"+"}", fmt.Sprint(*params.CustomFieldId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ContactdbCustomFieldId2xx{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_get_recipient.go b/rest/api/v3/lmc_contactdb/api_get_recipient.go new file mode 100644 index 00000000..15be33fc --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_get_recipient.go @@ -0,0 +1,94 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetRecipientParam struct { + // The ID of the recipient that you want to retrieve. + RecipientId *string `json:"recipient_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetRecipientParam) SetRecipientId(RecipientId string) *GetRecipientParam { + params.RecipientId = &RecipientId + return params +} +func (params *GetRecipientParam) SetOnbehalfof(Onbehalfof string) *GetRecipientParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a single recipient by ID from your contact database.** +func (c *ApiService) GetRecipient(params *GetRecipientParam) (interface{}, error) { + path := "/v3/contactdb/recipients/{RecipientId}" + if params != nil && params.RecipientId != nil { + path = strings.Replace(path, "{"+"RecipientId"+"}", *params.RecipientId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ContactdbRecipient200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_get_recipient_list.go b/rest/api/v3/lmc_contactdb/api_get_recipient_list.go new file mode 100644 index 00000000..7bd02ed3 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_get_recipient_list.go @@ -0,0 +1,94 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetRecipientListParam struct { + // The ID of the recipient for whom you are retrieving lists. + RecipientId *string `json:"recipient_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetRecipientListParam) SetRecipientId(RecipientId string) *GetRecipientListParam { + params.RecipientId = &RecipientId + return params +} +func (params *GetRecipientListParam) SetOnbehalfof(Onbehalfof string) *GetRecipientListParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve the lists that a given recipient belongs to.** Each recipient can be on many lists. This endpoint gives you all of the lists that any one recipient has been added to. +func (c *ApiService) GetRecipientList(params *GetRecipientListParam) (interface{}, error) { + path := "/v3/contactdb/recipients/{RecipientId}/lists" + if params != nil && params.RecipientId != nil { + path = strings.Replace(path, "{"+"RecipientId"+"}", *params.RecipientId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetRecipientList200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_get_segment.go b/rest/api/v3/lmc_contactdb/api_get_segment.go new file mode 100644 index 00000000..d9a2f56f --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_get_segment.go @@ -0,0 +1,95 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type GetSegmentParam struct { + // + SegmentId *int32 `json:"segment_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetSegmentParam) SetSegmentId(SegmentId int32) *GetSegmentParam { + params.SegmentId = &SegmentId + return params +} +func (params *GetSegmentParam) SetOnbehalfof(Onbehalfof string) *GetSegmentParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a single segment with the given ID.** +func (c *ApiService) GetSegment(params *GetSegmentParam) (interface{}, error) { + path := "/v3/contactdb/segments/{SegmentId}" + if params != nil && params.SegmentId != nil { + path = strings.Replace(path, "{"+"SegmentId"+"}", fmt.Sprint(*params.SegmentId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ContactdbSegments{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_list_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_list_contact_db_list.go new file mode 100644 index 00000000..4973479f --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_list_contact_db_list.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListContactDbListParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListContactDbListParam) SetOnbehalfof(Onbehalfof string) *ListContactDbListParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve all of your recipient lists. If you don't have any lists, an empty array will be returned.** +func (c *ApiService) ListContactDbList(params *ListContactDbListParam) (interface{}, error) { + path := "/v3/contactdb/lists" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListAllListsResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_list_custom_field.go b/rest/api/v3/lmc_contactdb/api_list_custom_field.go new file mode 100644 index 00000000..439cb1fe --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_list_custom_field.go @@ -0,0 +1,67 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListCustomFieldParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListCustomFieldParam) SetOnbehalfof(Onbehalfof string) *ListCustomFieldParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve all custom fields.** +func (c *ApiService) ListCustomField(params *ListCustomFieldParam) (interface{}, error) { + path := "/v3/contactdb/custom_fields" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListAllCustomFieldsResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_list_recipient.go b/rest/api/v3/lmc_contactdb/api_list_recipient.go new file mode 100644 index 00000000..2d0cdbe0 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_list_recipient.go @@ -0,0 +1,95 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListRecipientParam struct { + // Page index of first recipients to return (must be a positive integer) + Page *int32 `json:"page,omitempty"` + // Number of recipients to return at a time (must be a positive integer between 1 and 1000) + PageSize *int32 `json:"page_size,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListRecipientParam) SetPage(Page int32) *ListRecipientParam { + params.Page = &Page + return params +} +func (params *ListRecipientParam) SetPageSize(PageSize int32) *ListRecipientParam { + params.PageSize = &PageSize + return params +} +func (params *ListRecipientParam) SetOnbehalfof(Onbehalfof string) *ListRecipientParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve all of your Marketing Campaigns recipients.** Batch deletion of a page makes it possible to receive an empty page of recipients before reaching the end of the list of recipients. To avoid this issue; iterate over pages until a 404 is retrieved. +func (c *ApiService) ListRecipient(params *ListRecipientParam) (interface{}, error) { + path := "/v3/contactdb/recipients" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Page != nil { + data.Set("page", fmt.Sprint(*params.Page)) + } + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListRecipientsResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_list_recipient_count.go b/rest/api/v3/lmc_contactdb/api_list_recipient_count.go new file mode 100644 index 00000000..7f4e6d95 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_list_recipient_count.go @@ -0,0 +1,67 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListRecipientCountParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListRecipientCountParam) SetOnbehalfof(Onbehalfof string) *ListRecipientCountParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve the total number of Marketing Campaigns recipients.** +func (c *ApiService) ListRecipientCount(params *ListRecipientCountParam) (interface{}, error) { + path := "/v3/contactdb/recipients/count" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ContactdbRecipientCount200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_list_recipient_for_segment.go b/rest/api/v3/lmc_contactdb/api_list_recipient_for_segment.go new file mode 100644 index 00000000..4fac33fc --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_list_recipient_for_segment.go @@ -0,0 +1,114 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type ListRecipientForSegmentParam struct { + // The ID of the segment from which you want to retrieve recipients. + SegmentId *int32 `json:"segment_id"` + // + Page *int32 `json:"page,omitempty"` + // + PageSize *int32 `json:"page_size,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListRecipientForSegmentParam) SetSegmentId(SegmentId int32) *ListRecipientForSegmentParam { + params.SegmentId = &SegmentId + return params +} +func (params *ListRecipientForSegmentParam) SetPage(Page int32) *ListRecipientForSegmentParam { + params.Page = &Page + return params +} +func (params *ListRecipientForSegmentParam) SetPageSize(PageSize int32) *ListRecipientForSegmentParam { + params.PageSize = &PageSize + return params +} +func (params *ListRecipientForSegmentParam) SetOnbehalfof(Onbehalfof string) *ListRecipientForSegmentParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve all of the recipients in a segment with the given ID.** +func (c *ApiService) ListRecipientForSegment(params *ListRecipientForSegmentParam) (interface{}, error) { + path := "/v3/contactdb/segments/{SegmentId}/recipients" + if params != nil && params.SegmentId != nil { + path = strings.Replace(path, "{"+"SegmentId"+"}", fmt.Sprint(*params.SegmentId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Page != nil { + data.Set("page", fmt.Sprint(*params.Page)) + } + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListRecipientsOnASegmentResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_list_recipients_from_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_list_recipients_from_contact_db_list.go new file mode 100644 index 00000000..c52901f2 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_list_recipients_from_contact_db_list.go @@ -0,0 +1,106 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type ListRecipientsFromContactDbListParam struct { + // The id of the list of recipients you want to retrieve. + ListId *int32 `json:"list_id"` + // Page index of first recipient to return (must be a positive integer) + Page *int32 `json:"page,omitempty"` + // Number of recipients to return at a time (must be a positive integer between 1 and 1000) + PageSize *int32 `json:"page_size,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListRecipientsFromContactDbListParam) SetListId(ListId int32) *ListRecipientsFromContactDbListParam { + params.ListId = &ListId + return params +} +func (params *ListRecipientsFromContactDbListParam) SetPage(Page int32) *ListRecipientsFromContactDbListParam { + params.Page = &Page + return params +} +func (params *ListRecipientsFromContactDbListParam) SetPageSize(PageSize int32) *ListRecipientsFromContactDbListParam { + params.PageSize = &PageSize + return params +} +func (params *ListRecipientsFromContactDbListParam) SetOnbehalfof(Onbehalfof string) *ListRecipientsFromContactDbListParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve all recipients on the list with the given ID.** +func (c *ApiService) ListRecipientsFromContactDbList(params *ListRecipientsFromContactDbListParam) (interface{}, error) { + path := "/v3/contactdb/lists/{ListId}/recipients" + if params != nil && params.ListId != nil { + path = strings.Replace(path, "{"+"ListId"+"}", fmt.Sprint(*params.ListId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Page != nil { + data.Set("page", fmt.Sprint(*params.Page)) + } + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListRecipientsFromContactDbList200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_list_reserved_field.go b/rest/api/v3/lmc_contactdb/api_list_reserved_field.go new file mode 100644 index 00000000..080d2d83 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_list_reserved_field.go @@ -0,0 +1,67 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListReservedFieldParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListReservedFieldParam) SetOnbehalfof(Onbehalfof string) *ListReservedFieldParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to list all fields that are reserved and can't be used for custom field names.** +func (c *ApiService) ListReservedField(params *ListReservedFieldParam) (interface{}, error) { + path := "/v3/contactdb/reserved_fields" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListReservedField200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_list_search_recipient.go b/rest/api/v3/lmc_contactdb/api_list_search_recipient.go new file mode 100644 index 00000000..3cae2eea --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_list_search_recipient.go @@ -0,0 +1,85 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListSearchRecipientParam struct { + // + FieldName *string `json:"{field_name},omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListSearchRecipientParam) SetFieldName(FieldName string) *ListSearchRecipientParam { + params.FieldName = &FieldName + return params +} +func (params *ListSearchRecipientParam) SetOnbehalfof(Onbehalfof string) *ListSearchRecipientParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to perform a search on all of your Marketing Campaigns recipients.** field_name: * is a variable that is substituted for your actual custom field name from your recipient. * Text fields must be url-encoded. Date fields are searchable only by unix timestamp (e.g. 2/2/2015 becomes 1422835200) * If field_name is a 'reserved' date field, such as created_at or updated_at, the system will internally convert your epoch time to a date range encompassing the entire day. For example, an epoch time of 1422835600 converts to Mon, 02 Feb 2015 00:06:40 GMT, but internally the system will search from Mon, 02 Feb 2015 00:00:00 GMT through Mon, 02 Feb 2015 23:59:59 GMT. +func (c *ApiService) ListSearchRecipient(params *ListSearchRecipientParam) (interface{}, error) { + path := "/v3/contactdb/recipients/search" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.FieldName != nil { + data.Set("{field_name}", *params.FieldName) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListRecipientsFromContactDbList200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_list_segment.go b/rest/api/v3/lmc_contactdb/api_list_segment.go new file mode 100644 index 00000000..9e71d3c2 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_list_segment.go @@ -0,0 +1,67 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListSegmentParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListSegmentParam) SetOnbehalfof(Onbehalfof string) *ListSegmentParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve all of your segments.** +func (c *ApiService) ListSegment(params *ListSegmentParam) (interface{}, error) { + path := "/v3/contactdb/segments" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListAllSegmentsResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_list_status.go b/rest/api/v3/lmc_contactdb/api_list_status.go new file mode 100644 index 00000000..08180a42 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_list_status.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListStatusParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListStatusParam) SetOnbehalfof(Onbehalfof string) *ListStatusParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to check the upload status of a Marketing Campaigns recipient.** +func (c *ApiService) ListStatus(params *ListStatusParam) (interface{}, error) { + path := "/v3/contactdb/status" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListStatus200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_search_recipient.go b/rest/api/v3/lmc_contactdb/api_search_recipient.go new file mode 100644 index 00000000..810296ef --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_search_recipient.go @@ -0,0 +1,65 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type SearchRecipientParam struct { + // + SearchRecipientRequest *SearchRecipientRequest `json:"SearchRecipientRequest,omitempty"` +} + +func (params *SearchRecipientParam) SetSearchRecipientRequest(SearchRecipientRequest SearchRecipientRequest) *SearchRecipientParam { + params.SearchRecipientRequest = &SearchRecipientRequest + return params +} + +// Search using segment conditions without actually creating a segment. Body contains a JSON object with `conditions`, a list of conditions as described below, and an optional `list_id`, which is a valid list ID for a list to limit the search on. Valid operators for create and update depend on the type of the field for which you are searching. - Dates: - `\"eq\"`, `\"ne\"`, `\"lt\"` (before), `\"gt\"` (after) - You may use MM/DD/YYYY for day granularity or an epoch for second granularity. - `\"empty\"`, `\"not_empty\"` - `\"is within\"` - You may use an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date format or the # of days. - Text: `\"contains\"`, `\"eq\"` (is - matches the full field), `\"ne\"` (is not - matches any field where the entire field is not the condition value), `\"empty\"`, `\"not_empty\"` - Numbers: `\"eq\"`, `\"lt\"`, `\"gt\"`, `\"empty\"`, `\"not_empty\"` - Email Clicks and Opens: `\"eq\"` (opened), `\"ne\"` (not opened) Field values must all be a string. Search conditions using `\"eq\"` or `\"ne\"` for email clicks and opens should provide a \"field\" of either `clicks.campaign_identifier` or `opens.campaign_identifier`. The condition value should be a string containing the id of a completed campaign. Search conditions list may contain multiple conditions, joined by an `\"and\"` or `\"or\"` in the `\"and_or\"` field. The first condition in the conditions list must have an empty `\"and_or\"`, and subsequent conditions must all specify an `\"and_or\"`. +func (c *ApiService) SearchRecipient(params *SearchRecipientParam) (interface{}, error) { + path := "/v3/contactdb/recipients/search" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SearchRecipientRequest != nil { + b, err := json.Marshal(*params.SearchRecipientRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SearchRecipient200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_service.go b/rest/api/v3/lmc_contactdb/api_service.go new file mode 100644 index 00000000..47aac07a --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/lmc_contactdb/api_update_contact_db_list.go b/rest/api/v3/lmc_contactdb/api_update_contact_db_list.go new file mode 100644 index 00000000..f4e48e57 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_update_contact_db_list.go @@ -0,0 +1,102 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type UpdateContactDbListParam struct { + // + ListId *int32 `json:"list_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateAListRequest *UpdateAListRequest `json:"UpdateAListRequest,omitempty"` +} + +func (params *UpdateContactDbListParam) SetListId(ListId int32) *UpdateContactDbListParam { + params.ListId = &ListId + return params +} +func (params *UpdateContactDbListParam) SetOnbehalfof(Onbehalfof string) *UpdateContactDbListParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateContactDbListParam) SetUpdateAListRequest(UpdateAListRequest UpdateAListRequest) *UpdateContactDbListParam { + params.UpdateAListRequest = &UpdateAListRequest + return params +} + +// **This endpoint allows you to update the name of one of your recipient lists.** +func (c *ApiService) UpdateContactDbList(params *UpdateContactDbListParam) (interface{}, error) { + path := "/v3/contactdb/lists/{ListId}" + if params != nil && params.ListId != nil { + path = strings.Replace(path, "{"+"ListId"+"}", fmt.Sprint(*params.ListId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateAListRequest != nil { + b, err := json.Marshal(*params.UpdateAListRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &UpdateContactDbList200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_update_recipient.go b/rest/api/v3/lmc_contactdb/api_update_recipient.go new file mode 100644 index 00000000..ccb7fa86 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_update_recipient.go @@ -0,0 +1,90 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type UpdateRecipientParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateRecipientRequestInner *[]UpdateRecipientRequestInner `json:"UpdateRecipientRequestInner,omitempty"` +} + +func (params *UpdateRecipientParam) SetOnbehalfof(Onbehalfof string) *UpdateRecipientParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateRecipientParam) SetUpdateRecipientRequestInner(UpdateRecipientRequestInner []UpdateRecipientRequestInner) *UpdateRecipientParam { + params.UpdateRecipientRequestInner = &UpdateRecipientRequestInner + return params +} + +// **This endpoint allows you to update one or more recipients.** The body of an API call to this endpoint must include an array of one or more recipient objects. It is of note that you can add custom field data as parameters on recipient objects. We have provided an example using some of the default custom fields SendGrid provides. +func (c *ApiService) UpdateRecipient(params *UpdateRecipientParam) (interface{}, error) { + path := "/v3/contactdb/recipients" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateRecipientRequestInner != nil { + b, err := json.Marshal(*params.UpdateRecipientRequestInner) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &ContactdbRecipientResponse201{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/api_update_segment.go b/rest/api/v3/lmc_contactdb/api_update_segment.go new file mode 100644 index 00000000..d5023966 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/api_update_segment.go @@ -0,0 +1,102 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type UpdateSegmentParam struct { + // + SegmentId *int32 `json:"segment_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateSegmentRequest *UpdateSegmentRequest `json:"UpdateSegmentRequest,omitempty"` +} + +func (params *UpdateSegmentParam) SetSegmentId(SegmentId int32) *UpdateSegmentParam { + params.SegmentId = &SegmentId + return params +} +func (params *UpdateSegmentParam) SetOnbehalfof(Onbehalfof string) *UpdateSegmentParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateSegmentParam) SetUpdateSegmentRequest(UpdateSegmentRequest UpdateSegmentRequest) *UpdateSegmentParam { + params.UpdateSegmentRequest = &UpdateSegmentRequest + return params +} + +// **This endpoint allows you to update a segment.** +func (c *ApiService) UpdateSegment(params *UpdateSegmentParam) (interface{}, error) { + path := "/v3/contactdb/segments/{SegmentId}" + if params != nil && params.SegmentId != nil { + path = strings.Replace(path, "{"+"SegmentId"+"}", fmt.Sprint(*params.SegmentId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateSegmentRequest != nil { + b, err := json.Marshal(*params.UpdateSegmentRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ContactdbSegments{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_contactdb/docs/AddRecipient.md b/rest/api/v3/lmc_contactdb/docs/AddRecipient.md new file mode 100644 index 00000000..9bb1614c --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/AddRecipient.md @@ -0,0 +1,49 @@ +# AddRecipient + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddRecipient**](AddRecipient.md#AddRecipient) | **Post** /v3/contactdb/recipients | Add recipients + + + +## AddRecipient + +> ContactdbRecipientResponse201 AddRecipient(ctx, optional) + +Add recipients + +**This endpoint allows you to add a Marketing Campaigns recipient.** You can add custom field data as a parameter on this endpoint. We have provided an example using some of the default custom fields SendGrid provides. The rate limit is three requests every 2 seconds. You can upload 1000 contacts per request. So the maximum upload rate is 1500 recipients per second. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a AddRecipientParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**AddRecipientRequestInner** | [**[]AddRecipientRequestInner**](AddRecipientRequestInner.md) | + +### Return type + +[**ContactdbRecipientResponse201**](ContactdbRecipientResponse201.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/AddRecipientRequestInner.md b/rest/api/v3/lmc_contactdb/docs/AddRecipientRequestInner.md new file mode 100644 index 00000000..3860b0d0 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/AddRecipientRequestInner.md @@ -0,0 +1,14 @@ +# AddRecipientRequestInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address of the recipient. | +**FirstName** | **string** | The first name of the recipient. |[optional] +**LastName** | **string** | The last name of the recipient. |[optional] +**Age** | **int32** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/AddRecipientToContactDbList.md b/rest/api/v3/lmc_contactdb/docs/AddRecipientToContactDbList.md new file mode 100644 index 00000000..0a1cbd6c --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/AddRecipientToContactDbList.md @@ -0,0 +1,53 @@ +# AddRecipientToContactDbList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddRecipientToContactDbList**](AddRecipientToContactDbList.md#AddRecipientToContactDbList) | **Post** /v3/contactdb/lists/{ListId}/recipients/{RecipientId} | Add a Single Recipient to a List + + + +## AddRecipientToContactDbList + +> interface{} AddRecipientToContactDbList(ctx, ListIdRecipientIdoptional) + +Add a Single Recipient to a List + +**This endpoint allows you to add a single recipient to a list.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ListId** | **int32** | The ID of the list that you want to add the recipient to. +**RecipientId** | **string** | The ID of the recipient you are adding to the list. + +### Other Parameters + +Other parameters are passed through a pointer to a AddRecipientToContactDbListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/AddRecipientsToContactDbList.md b/rest/api/v3/lmc_contactdb/docs/AddRecipientsToContactDbList.md new file mode 100644 index 00000000..4e67a243 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/AddRecipientsToContactDbList.md @@ -0,0 +1,53 @@ +# AddRecipientsToContactDbList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**AddRecipientsToContactDbList**](AddRecipientsToContactDbList.md#AddRecipientsToContactDbList) | **Post** /v3/contactdb/lists/{ListId}/recipients | Add Multiple Recipients to a List + + + +## AddRecipientsToContactDbList + +> interface{} AddRecipientsToContactDbList(ctx, ListIdoptional) + +Add Multiple Recipients to a List + +**This endpoint allows you to add multiple recipients to a list.** Adds existing recipients to a list, passing in the recipient IDs to add. Recipient IDs (base64-encoded email addresses) should be passed exactly as they are returned from recipient endpoints. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ListId** | **int32** | The id of the list of recipients you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a AddRecipientsToContactDbListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**RequestBody** | **[]string** | + +### Return type + +**interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/AndOr.md b/rest/api/v3/lmc_contactdb/docs/AndOr.md new file mode 100644 index 00000000..acf7be53 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/AndOr.md @@ -0,0 +1,14 @@ +# AndOr + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**AND** | string | (value: `"and"`) +**OR** | string | (value: `"or"`) +**EMPTY** | string | (value: `""`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbCustomField.md b/rest/api/v3/lmc_contactdb/docs/ContactdbCustomField.md new file mode 100644 index 00000000..d152b843 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ContactdbCustomField.md @@ -0,0 +1,12 @@ +# ContactdbCustomField + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the field |[optional] +**Type** | [**Type**](Type.md) | The type of the field. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbCustomFieldId2xx.md b/rest/api/v3/lmc_contactdb/docs/ContactdbCustomFieldId2xx.md new file mode 100644 index 00000000..c8223d54 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ContactdbCustomFieldId2xx.md @@ -0,0 +1,13 @@ +# ContactdbCustomFieldId2xx + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the field |[optional] +**Type** | [**Type**](Type.md) | The type of the field. |[optional] +**Id** | **float32** | The ID of the custom field. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbCustomFieldIdValue.md b/rest/api/v3/lmc_contactdb/docs/ContactdbCustomFieldIdValue.md new file mode 100644 index 00000000..411b325c --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ContactdbCustomFieldIdValue.md @@ -0,0 +1,14 @@ +# ContactdbCustomFieldIdValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the field |[optional] +**Type** | [**Type**](Type.md) | The type of the field. |[optional] +**Id** | **float32** | The ID of the custom field. |[optional] +**Value** | **string** | The value of this recipient's custom field |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbList2xx.md b/rest/api/v3/lmc_contactdb/docs/ContactdbList2xx.md new file mode 100644 index 00000000..ce51cebb --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ContactdbList2xx.md @@ -0,0 +1,13 @@ +# ContactdbList2xx + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The reference ID of your list. | +**Name** | **string** | The name of your list. Must be unique against all other list and segment names. | +**RecipientCount** | **int32** | The count of recipients currently in the list. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbRecipient200.md b/rest/api/v3/lmc_contactdb/docs/ContactdbRecipient200.md new file mode 100644 index 00000000..b07a679b --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ContactdbRecipient200.md @@ -0,0 +1,11 @@ +# ContactdbRecipient200 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Recipients** | [**[]ContactdbRecipient200RecipientsInner**](ContactdbRecipient200RecipientsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbRecipient200RecipientsInner.md b/rest/api/v3/lmc_contactdb/docs/ContactdbRecipient200RecipientsInner.md new file mode 100644 index 00000000..8ec7cf16 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ContactdbRecipient200RecipientsInner.md @@ -0,0 +1,20 @@ +# ContactdbRecipient200RecipientsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The ID of this recipient. |[optional] +**CreatedAt** | **float32** | The time this record was created in your contactdb, in unixtime. |[optional] +**CustomFields** | [**[]ContactdbCustomFieldIdValue**](ContactdbCustomFieldIdValue.md) | The custom fields assigned to this recipient and their values. |[optional] +**Email** | **string** | The email address of this recipient. This is a default custom field that SendGrid provides. | +**FirstName** | **string** | The first name of this recipient. This is a default custom field that SendGrid provides. |[optional] +**LastName** | **string** | The last name of the recipient. |[optional] +**LastClicked** | **float32** | The last time this recipient clicked a link from one of your campaigns, in unixtime. |[optional] +**LastEmailed** | **float32** | The last time this user was emailed by one of your campaigns, in unixtime. |[optional] +**LastOpened** | **float32** | The last time this recipient opened an email from you, in unixtime. |[optional] +**UpdatedAt** | **float32** | The last update date for this recipient's record. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbRecipientCount200.md b/rest/api/v3/lmc_contactdb/docs/ContactdbRecipientCount200.md new file mode 100644 index 00000000..3a605dbc --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ContactdbRecipientCount200.md @@ -0,0 +1,11 @@ +# ContactdbRecipientCount200 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**RecipientCount** | **float32** | The count of recipients. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbRecipientResponse201.md b/rest/api/v3/lmc_contactdb/docs/ContactdbRecipientResponse201.md new file mode 100644 index 00000000..f5b31dc6 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ContactdbRecipientResponse201.md @@ -0,0 +1,16 @@ +# ContactdbRecipientResponse201 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ErrorCount** | **float32** | The number of errors found while adding recipients. |[default to 0] +**ErrorIndices** | **[]float32** | The indices of the recipient(s) sent that caused the error. |[optional] [default to []] +**NewCount** | **float32** | The count of new recipients added to the contactdb. |[default to 0] +**PersistedRecipients** | **[]string** | The recipient IDs of the recipients that already existed from this request. |[default to []] +**UpdatedCount** | **float32** | The recipients who were updated from this request. |[default to 0] +**Errors** | [**[]ContactdbRecipientResponse201ErrorsInner**](ContactdbRecipientResponse201ErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbRecipientResponse201ErrorsInner.md b/rest/api/v3/lmc_contactdb/docs/ContactdbRecipientResponse201ErrorsInner.md new file mode 100644 index 00000000..d7994f83 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ContactdbRecipientResponse201ErrorsInner.md @@ -0,0 +1,12 @@ +# ContactdbRecipientResponse201ErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | |[optional] +**ErrorIndices** | **[]float32** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbSegments.md b/rest/api/v3/lmc_contactdb/docs/ContactdbSegments.md new file mode 100644 index 00000000..c9573dfd --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ContactdbSegments.md @@ -0,0 +1,14 @@ +# ContactdbSegments + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of this segment. | +**ListId** | **int32** | The list id from which to make this segment. Not including this ID will mean your segment is created from the main contactdb rather than a list. |[optional] +**Conditions** | [**[]ContactdbSegmentsConditions**](ContactdbSegmentsConditions.md) | The conditions for a recipient to be included in this segment. | +**RecipientCount** | **float32** | The count of recipients in this list. This is not included on creation of segments. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbSegmentsConditions.md b/rest/api/v3/lmc_contactdb/docs/ContactdbSegmentsConditions.md new file mode 100644 index 00000000..0cac8eb2 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ContactdbSegmentsConditions.md @@ -0,0 +1,14 @@ +# ContactdbSegmentsConditions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | | +**Value** | **string** | | +**Operator** | [**Operator**](Operator.md) | | +**AndOr** | [**AndOr**](AndOr.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ContactdbSegmentsId200.md b/rest/api/v3/lmc_contactdb/docs/ContactdbSegmentsId200.md new file mode 100644 index 00000000..8e94dfe6 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ContactdbSegmentsId200.md @@ -0,0 +1,15 @@ +# ContactdbSegmentsId200 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **float32** | The ID of the segment. | +**Name** | **string** | The name of this segment. | +**ListId** | **int32** | The list id from which to make this segment. Not including this ID will mean your segment is created from the main contactdb rather than a list. |[optional] +**Conditions** | [**[]ContactdbSegmentsConditions**](ContactdbSegmentsConditions.md) | The conditions for a recipient to be included in this segment. | +**RecipientCount** | **float32** | The count of recipients in this list. This is not included on creation of segments. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/CreateAListRequest.md b/rest/api/v3/lmc_contactdb/docs/CreateAListRequest.md new file mode 100644 index 00000000..0657b896 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/CreateAListRequest.md @@ -0,0 +1,11 @@ +# CreateAListRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/CreateContactDbList.md b/rest/api/v3/lmc_contactdb/docs/CreateContactDbList.md new file mode 100644 index 00000000..e513375e --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/CreateContactDbList.md @@ -0,0 +1,49 @@ +# CreateContactDbList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateContactDbList**](CreateContactDbList.md#CreateContactDbList) | **Post** /v3/contactdb/lists | Create a List + + + +## CreateContactDbList + +> ContactdbList2xx CreateContactDbList(ctx, optional) + +Create a List + +**This endpoint allows you to create a list for your recipients.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateContactDbListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**CreateAListRequest** | [**CreateAListRequest**](CreateAListRequest.md) | + +### Return type + +[**ContactdbList2xx**](ContactdbList2xx.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/CreateCustomField.md b/rest/api/v3/lmc_contactdb/docs/CreateCustomField.md new file mode 100644 index 00000000..6e9ca61e --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/CreateCustomField.md @@ -0,0 +1,49 @@ +# CreateCustomField + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateCustomField**](CreateCustomField.md#CreateCustomField) | **Post** /v3/contactdb/custom_fields | Create a Custom Field + + + +## CreateCustomField + +> ContactdbCustomFieldId2xx CreateCustomField(ctx, optional) + +Create a Custom Field + +**This endpoint allows you to create a custom field.** **You can create up to 120 custom fields.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateCustomFieldParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**CreateCustomFieldRequest** | [**CreateCustomFieldRequest**](CreateCustomFieldRequest.md) | + +### Return type + +[**ContactdbCustomFieldId2xx**](ContactdbCustomFieldId2xx.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/CreateCustomFieldRequest.md b/rest/api/v3/lmc_contactdb/docs/CreateCustomFieldRequest.md new file mode 100644 index 00000000..7254d6af --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/CreateCustomFieldRequest.md @@ -0,0 +1,12 @@ +# CreateCustomFieldRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | |[optional] +**Type** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/CreateSegment.md b/rest/api/v3/lmc_contactdb/docs/CreateSegment.md new file mode 100644 index 00000000..4019fb85 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/CreateSegment.md @@ -0,0 +1,49 @@ +# CreateSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateSegment**](CreateSegment.md#CreateSegment) | **Post** /v3/contactdb/segments | Create a Segment + + + +## CreateSegment + +> ContactdbSegmentsId200 CreateSegment(ctx, optional) + +Create a Segment + +**This endpoint allows you to create a new segment.** Valid operators for create and update depend on the type of the field for which you are searching. **Dates** - \"eq\", \"ne\", \"lt\" (before), \"gt\" (after) - You may use MM/DD/YYYY for day granularity or an epoch for second granularity. - \"empty\", \"not_empty\" - \"is within\" - You may use an [ISO 8601 date format](https://en.wikipedia.org/wiki/ISO_8601) or the # of days. **Text** - \"contains\" - \"eq\" (is/equals - matches the full field) - \"ne\" (is not/not equals - matches any field where the entire field is not the condition value) - \"empty\" - \"not_empty\" **Numbers** - \"eq\" (is/equals) - \"lt\" (is less than) - \"gt\" (is greater than) - \"empty\" - \"not_empty\" **Email Clicks and Opens** - \"eq\" (opened) - \"ne\" (not opened) All field values must be a string. Conditions using \"eq\" or \"ne\" for email clicks and opens should provide a \"field\" of either `clicks.campaign_identifier` or `opens.campaign_identifier`. The condition value should be a string containing the id of a completed campaign. The conditions list may contain multiple conditions, joined by an \"and\" or \"or\" in the \"and_or\" field. The first condition in the conditions list must have an empty \"and_or\", and subsequent conditions must all specify an \"and_or\". + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**ContactdbSegments** | [**ContactdbSegments**](ContactdbSegments.md) | + +### Return type + +[**ContactdbSegmentsId200**](ContactdbSegmentsId200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/DeleteContactDbList.md b/rest/api/v3/lmc_contactdb/docs/DeleteContactDbList.md new file mode 100644 index 00000000..23af3f29 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/DeleteContactDbList.md @@ -0,0 +1,54 @@ +# DeleteContactDbList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteContactDbList**](DeleteContactDbList.md#DeleteContactDbList) | **Delete** /v3/contactdb/lists/{ListId} | Delete a List + + + +## DeleteContactDbList + +> interface{} DeleteContactDbList(ctx, ListIdoptional) + +Delete a List + +**This endpoint allows you to delete a specific recipient list with the given ID.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ListId** | **int32** | + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteContactDbListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**DeleteContacts** | [**DeleteContacts**](DeleteContactsDeleteContacts.md) | Adds the ability to delete all contacts on the list in addition to deleting the list. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**Body** | **interface{}** | + +### Return type + +**interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/DeleteContactDbLists.md b/rest/api/v3/lmc_contactdb/docs/DeleteContactDbLists.md new file mode 100644 index 00000000..9f510860 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/DeleteContactDbLists.md @@ -0,0 +1,49 @@ +# DeleteContactDbLists + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteContactDbLists**](DeleteContactDbLists.md#DeleteContactDbLists) | **Delete** /v3/contactdb/lists | Delete Multiple lists + + + +## DeleteContactDbLists + +> interface{} DeleteContactDbLists(ctx, optional) + +Delete Multiple lists + +**This endpoint allows you to delete multiple recipient lists.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteContactDbListsParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**RequestBody** | **[]int32** | + +### Return type + +**interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/DeleteContacts.md b/rest/api/v3/lmc_contactdb/docs/DeleteContacts.md new file mode 100644 index 00000000..46341479 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/DeleteContacts.md @@ -0,0 +1,13 @@ +# DeleteContacts + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TRUE** | bool | (value: `true`) +**FALSE** | bool | (value: `false`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/DeleteCustomField.md b/rest/api/v3/lmc_contactdb/docs/DeleteCustomField.md new file mode 100644 index 00000000..7e69ff8f --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/DeleteCustomField.md @@ -0,0 +1,52 @@ +# DeleteCustomField + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteCustomField**](DeleteCustomField.md#DeleteCustomField) | **Delete** /v3/contactdb/custom_fields/{CustomFieldId} | Delete a Custom Field + + + +## DeleteCustomField + +> ErrorResponse DeleteCustomField(ctx, CustomFieldIdoptional) + +Delete a Custom Field + +**This endpoint allows you to delete a custom field by ID.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CustomFieldId** | **int32** | The ID of the custom field that you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteCustomFieldParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ErrorResponse**](ErrorResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/DeleteRecipient.md b/rest/api/v3/lmc_contactdb/docs/DeleteRecipient.md new file mode 100644 index 00000000..58d9ecb7 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/DeleteRecipient.md @@ -0,0 +1,52 @@ +# DeleteRecipient + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteRecipient**](DeleteRecipient.md#DeleteRecipient) | **Delete** /v3/contactdb/recipients/{RecipientId} | Delete a Recipient + + + +## DeleteRecipient + +> map[string]interface{} DeleteRecipient(ctx, RecipientIdoptional) + +Delete a Recipient + +**This endpoint allows you to delete a single recipient with the given ID from your contact database.** > Use this to permanently delete your recipients from all of your contact lists and all segments if required by applicable law. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RecipientId** | **string** | The ID of the recipient that you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteRecipientParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/DeleteRecipientFromContactDbList.md b/rest/api/v3/lmc_contactdb/docs/DeleteRecipientFromContactDbList.md new file mode 100644 index 00000000..250be368 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/DeleteRecipientFromContactDbList.md @@ -0,0 +1,54 @@ +# DeleteRecipientFromContactDbList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteRecipientFromContactDbList**](DeleteRecipientFromContactDbList.md#DeleteRecipientFromContactDbList) | **Delete** /v3/contactdb/lists/{ListId}/recipients/{RecipientId} | Delete a Single Recipient from a Single List + + + +## DeleteRecipientFromContactDbList + +> interface{} DeleteRecipientFromContactDbList(ctx, ListIdRecipientIdoptional) + +Delete a Single Recipient from a Single List + +**This endpoint allows you to delete a single recipient from a list.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ListId** | **int32** | The ID of the list that you want to add the recipient to. +**RecipientId** | **string** | The ID of the recipient you are adding to the list. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteRecipientFromContactDbListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**Body** | **interface{}** | + +### Return type + +**interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/DeleteRecipients.md b/rest/api/v3/lmc_contactdb/docs/DeleteRecipients.md new file mode 100644 index 00000000..69fe918f --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/DeleteRecipients.md @@ -0,0 +1,49 @@ +# DeleteRecipients + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteRecipients**](DeleteRecipients.md#DeleteRecipients) | **Delete** /v3/contactdb/recipients | Delete Recipients + + + +## DeleteRecipients + +> map[string]interface{} DeleteRecipients(ctx, optional) + +Delete Recipients + +**This endpoint allows you to deletes one or more recipients.** The body of an API call to this endpoint must include an array of recipient IDs of the recipients you want to delete. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteRecipientsParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**RequestBody** | **[]string** | + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/DeleteSegment.md b/rest/api/v3/lmc_contactdb/docs/DeleteSegment.md new file mode 100644 index 00000000..fbda5503 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/DeleteSegment.md @@ -0,0 +1,54 @@ +# DeleteSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSegment**](DeleteSegment.md#DeleteSegment) | **Delete** /v3/contactdb/segments/{SegmentId} | Delete a segment + + + +## DeleteSegment + +> interface{} DeleteSegment(ctx, SegmentIdoptional) + +Delete a segment + +**This endpoint allows you to delete a segment from your recipients database.** You also have the option to delete all the contacts from your Marketing Campaigns recipient database who were in this segment. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SegmentId** | **int32** | + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**DeleteContacts** | **bool** | True to delete all contacts matching the segment in addition to deleting the segment +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**Body** | **interface{}** | + +### Return type + +**interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/ErrorResponse.md b/rest/api/v3/lmc_contactdb/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ErrorResponseErrorsInner.md b/rest/api/v3/lmc_contactdb/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/GetBillable.md b/rest/api/v3/lmc_contactdb/docs/GetBillable.md new file mode 100644 index 00000000..ec9018ef --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/GetBillable.md @@ -0,0 +1,48 @@ +# GetBillable + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetBillable**](GetBillable.md#GetBillable) | **Get** /v3/contactdb/recipients/billable_count | Retrieve the count of billable recipients + + + +## GetBillable + +> ContactdbRecipientCount200 GetBillable(ctx, optional) + +Retrieve the count of billable recipients + +**This endpoint allows you to retrieve the number of Marketing Campaigns recipients that you will be billed for.** You are billed for marketing campaigns based on the highest number of recipients you have had in your account at one time. This endpoint will allow you to know the current billable count value. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a GetBillableParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ContactdbRecipientCount200**](ContactdbRecipientCount200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/GetContactDbList.md b/rest/api/v3/lmc_contactdb/docs/GetContactDbList.md new file mode 100644 index 00000000..c7814353 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/GetContactDbList.md @@ -0,0 +1,52 @@ +# GetContactDbList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetContactDbList**](GetContactDbList.md#GetContactDbList) | **Get** /v3/contactdb/lists/{ListId} | Retrieve a single list + + + +## GetContactDbList + +> ContactdbList2xx GetContactDbList(ctx, ListIdoptional) + +Retrieve a single list + +**This endpoint allows you to retrieve a single recipient list.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ListId** | **int32** | + +### Other Parameters + +Other parameters are passed through a pointer to a GetContactDbListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ContactdbList2xx**](ContactdbList2xx.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/GetCustomField.md b/rest/api/v3/lmc_contactdb/docs/GetCustomField.md new file mode 100644 index 00000000..9f0bd912 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/GetCustomField.md @@ -0,0 +1,52 @@ +# GetCustomField + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetCustomField**](GetCustomField.md#GetCustomField) | **Get** /v3/contactdb/custom_fields/{CustomFieldId} | Retrieve a Custom Field + + + +## GetCustomField + +> ContactdbCustomFieldId2xx GetCustomField(ctx, CustomFieldIdoptional) + +Retrieve a Custom Field + +**This endpoint allows you to retrieve a custom field by ID.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CustomFieldId** | **int32** | The ID of the custom field that you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetCustomFieldParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ContactdbCustomFieldId2xx**](ContactdbCustomFieldId2xx.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/GetRecipient.md b/rest/api/v3/lmc_contactdb/docs/GetRecipient.md new file mode 100644 index 00000000..e4908f98 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/GetRecipient.md @@ -0,0 +1,52 @@ +# GetRecipient + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetRecipient**](GetRecipient.md#GetRecipient) | **Get** /v3/contactdb/recipients/{RecipientId} | Retrieve a single recipient + + + +## GetRecipient + +> ContactdbRecipient200 GetRecipient(ctx, RecipientIdoptional) + +Retrieve a single recipient + +**This endpoint allows you to retrieve a single recipient by ID from your contact database.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RecipientId** | **string** | The ID of the recipient that you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetRecipientParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ContactdbRecipient200**](ContactdbRecipient200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/GetRecipientList.md b/rest/api/v3/lmc_contactdb/docs/GetRecipientList.md new file mode 100644 index 00000000..23c85802 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/GetRecipientList.md @@ -0,0 +1,52 @@ +# GetRecipientList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetRecipientList**](GetRecipientList.md#GetRecipientList) | **Get** /v3/contactdb/recipients/{RecipientId}/lists | Retrieve the lists that a recipient is on + + + +## GetRecipientList + +> GetRecipientList200Response GetRecipientList(ctx, RecipientIdoptional) + +Retrieve the lists that a recipient is on + +**This endpoint allows you to retrieve the lists that a given recipient belongs to.** Each recipient can be on many lists. This endpoint gives you all of the lists that any one recipient has been added to. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RecipientId** | **string** | The ID of the recipient for whom you are retrieving lists. + +### Other Parameters + +Other parameters are passed through a pointer to a GetRecipientListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**GetRecipientList200Response**](GetRecipientList200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/GetRecipientList200Response.md b/rest/api/v3/lmc_contactdb/docs/GetRecipientList200Response.md new file mode 100644 index 00000000..ff8b2268 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/GetRecipientList200Response.md @@ -0,0 +1,11 @@ +# GetRecipientList200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Lists** | [**[]ContactdbList2xx**](ContactdbList2xx.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/GetSegment.md b/rest/api/v3/lmc_contactdb/docs/GetSegment.md new file mode 100644 index 00000000..c6d62133 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/GetSegment.md @@ -0,0 +1,52 @@ +# GetSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetSegment**](GetSegment.md#GetSegment) | **Get** /v3/contactdb/segments/{SegmentId} | Retrieve a segment + + + +## GetSegment + +> ContactdbSegments GetSegment(ctx, SegmentIdoptional) + +Retrieve a segment + +**This endpoint allows you to retrieve a single segment with the given ID.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SegmentId** | **int32** | + +### Other Parameters + +Other parameters are passed through a pointer to a GetSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ContactdbSegments**](ContactdbSegments.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/ListAllCustomFieldsResponse.md b/rest/api/v3/lmc_contactdb/docs/ListAllCustomFieldsResponse.md new file mode 100644 index 00000000..58fabba7 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListAllCustomFieldsResponse.md @@ -0,0 +1,11 @@ +# ListAllCustomFieldsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomFields** | [**[]ContactdbCustomFieldId2xx**](ContactdbCustomFieldId2xx.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ListAllListsResponse.md b/rest/api/v3/lmc_contactdb/docs/ListAllListsResponse.md new file mode 100644 index 00000000..c94eff0b --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListAllListsResponse.md @@ -0,0 +1,11 @@ +# ListAllListsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Lists** | [**[]ContactdbList2xx**](ContactdbList2xx.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ListAllSegmentsResponse.md b/rest/api/v3/lmc_contactdb/docs/ListAllSegmentsResponse.md new file mode 100644 index 00000000..1d8fc71c --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListAllSegmentsResponse.md @@ -0,0 +1,11 @@ +# ListAllSegmentsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Segments** | [**[]ContactdbSegments**](ContactdbSegments.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ListContactDbList.md b/rest/api/v3/lmc_contactdb/docs/ListContactDbList.md new file mode 100644 index 00000000..d0a72af7 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListContactDbList.md @@ -0,0 +1,48 @@ +# ListContactDbList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListContactDbList**](ListContactDbList.md#ListContactDbList) | **Get** /v3/contactdb/lists | Retrieve all lists + + + +## ListContactDbList + +> ListAllListsResponse ListContactDbList(ctx, optional) + +Retrieve all lists + +**This endpoint allows you to retrieve all of your recipient lists. If you don't have any lists, an empty array will be returned.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListContactDbListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListAllListsResponse**](ListAllListsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/ListCustomField.md b/rest/api/v3/lmc_contactdb/docs/ListCustomField.md new file mode 100644 index 00000000..d6450a9d --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListCustomField.md @@ -0,0 +1,48 @@ +# ListCustomField + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListCustomField**](ListCustomField.md#ListCustomField) | **Get** /v3/contactdb/custom_fields | Retrieve all custom fields + + + +## ListCustomField + +> ListAllCustomFieldsResponse ListCustomField(ctx, optional) + +Retrieve all custom fields + +**This endpoint allows you to retrieve all custom fields.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListCustomFieldParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListAllCustomFieldsResponse**](ListAllCustomFieldsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/ListRecipient.md b/rest/api/v3/lmc_contactdb/docs/ListRecipient.md new file mode 100644 index 00000000..614b17ca --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListRecipient.md @@ -0,0 +1,50 @@ +# ListRecipient + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListRecipient**](ListRecipient.md#ListRecipient) | **Get** /v3/contactdb/recipients | Retrieve recipients + + + +## ListRecipient + +> ListRecipientsResponse ListRecipient(ctx, optional) + +Retrieve recipients + +**This endpoint allows you to retrieve all of your Marketing Campaigns recipients.** Batch deletion of a page makes it possible to receive an empty page of recipients before reaching the end of the list of recipients. To avoid this issue; iterate over pages until a 404 is retrieved. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListRecipientParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Page** | **int32** | Page index of first recipients to return (must be a positive integer) +**PageSize** | **int32** | Number of recipients to return at a time (must be a positive integer between 1 and 1000) +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListRecipientsResponse**](ListRecipientsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/ListRecipientCount.md b/rest/api/v3/lmc_contactdb/docs/ListRecipientCount.md new file mode 100644 index 00000000..32ab38da --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListRecipientCount.md @@ -0,0 +1,48 @@ +# ListRecipientCount + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListRecipientCount**](ListRecipientCount.md#ListRecipientCount) | **Get** /v3/contactdb/recipients/count | Retrieve a Count of Recipients + + + +## ListRecipientCount + +> ContactdbRecipientCount200 ListRecipientCount(ctx, optional) + +Retrieve a Count of Recipients + +**This endpoint allows you to retrieve the total number of Marketing Campaigns recipients.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListRecipientCountParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ContactdbRecipientCount200**](ContactdbRecipientCount200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/ListRecipientForSegment.md b/rest/api/v3/lmc_contactdb/docs/ListRecipientForSegment.md new file mode 100644 index 00000000..e1484761 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListRecipientForSegment.md @@ -0,0 +1,54 @@ +# ListRecipientForSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListRecipientForSegment**](ListRecipientForSegment.md#ListRecipientForSegment) | **Get** /v3/contactdb/segments/{SegmentId}/recipients | Retrieve recipients on a segment + + + +## ListRecipientForSegment + +> ListRecipientsOnASegmentResponse ListRecipientForSegment(ctx, SegmentIdoptional) + +Retrieve recipients on a segment + +**This endpoint allows you to retrieve all of the recipients in a segment with the given ID.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SegmentId** | **int32** | The ID of the segment from which you want to retrieve recipients. + +### Other Parameters + +Other parameters are passed through a pointer to a ListRecipientForSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Page** | **int32** | +**PageSize** | **int32** | +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListRecipientsOnASegmentResponse**](ListRecipientsOnASegmentResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/ListRecipientsFromContactDbList.md b/rest/api/v3/lmc_contactdb/docs/ListRecipientsFromContactDbList.md new file mode 100644 index 00000000..a0670961 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListRecipientsFromContactDbList.md @@ -0,0 +1,54 @@ +# ListRecipientsFromContactDbList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListRecipientsFromContactDbList**](ListRecipientsFromContactDbList.md#ListRecipientsFromContactDbList) | **Get** /v3/contactdb/lists/{ListId}/recipients | Retrieve all recipients on a List + + + +## ListRecipientsFromContactDbList + +> ListRecipientsFromContactDbList200Response ListRecipientsFromContactDbList(ctx, ListIdoptional) + +Retrieve all recipients on a List + +**This endpoint allows you to retrieve all recipients on the list with the given ID.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ListId** | **int32** | The id of the list of recipients you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a ListRecipientsFromContactDbListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Page** | **int32** | Page index of first recipient to return (must be a positive integer) +**PageSize** | **int32** | Number of recipients to return at a time (must be a positive integer between 1 and 1000) +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListRecipientsFromContactDbList200Response**](ListRecipientsFromContactDbList200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/ListRecipientsFromContactDbList200Response.md b/rest/api/v3/lmc_contactdb/docs/ListRecipientsFromContactDbList200Response.md new file mode 100644 index 00000000..2b06300b --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListRecipientsFromContactDbList200Response.md @@ -0,0 +1,11 @@ +# ListRecipientsFromContactDbList200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Recipients** | [**[]ContactdbRecipient200**](ContactdbRecipient200.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ListRecipientsOnASegmentResponse.md b/rest/api/v3/lmc_contactdb/docs/ListRecipientsOnASegmentResponse.md new file mode 100644 index 00000000..cc781fe7 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListRecipientsOnASegmentResponse.md @@ -0,0 +1,11 @@ +# ListRecipientsOnASegmentResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Recipients** | [**[]ContactdbRecipient200**](ContactdbRecipient200.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ListRecipientsResponse.md b/rest/api/v3/lmc_contactdb/docs/ListRecipientsResponse.md new file mode 100644 index 00000000..9b46f996 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListRecipientsResponse.md @@ -0,0 +1,11 @@ +# ListRecipientsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Recipients** | **[]map[string]interface{}** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ListReservedField.md b/rest/api/v3/lmc_contactdb/docs/ListReservedField.md new file mode 100644 index 00000000..18387270 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListReservedField.md @@ -0,0 +1,48 @@ +# ListReservedField + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListReservedField**](ListReservedField.md#ListReservedField) | **Get** /v3/contactdb/reserved_fields | Retrieve reserved fields + + + +## ListReservedField + +> ListReservedField200Response ListReservedField(ctx, optional) + +Retrieve reserved fields + +**This endpoint allows you to list all fields that are reserved and can't be used for custom field names.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListReservedFieldParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListReservedField200Response**](ListReservedField200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/ListReservedField200Response.md b/rest/api/v3/lmc_contactdb/docs/ListReservedField200Response.md new file mode 100644 index 00000000..5cad5ed8 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListReservedField200Response.md @@ -0,0 +1,11 @@ +# ListReservedField200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ReservedFields** | [**[]ListReservedField200ResponseReservedFieldsInner**](ListReservedField200ResponseReservedFieldsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ListReservedField200ResponseReservedFieldsInner.md b/rest/api/v3/lmc_contactdb/docs/ListReservedField200ResponseReservedFieldsInner.md new file mode 100644 index 00000000..01d7b2cd --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListReservedField200ResponseReservedFieldsInner.md @@ -0,0 +1,12 @@ +# ListReservedField200ResponseReservedFieldsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | |[optional] +**Type** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ListSearchRecipient.md b/rest/api/v3/lmc_contactdb/docs/ListSearchRecipient.md new file mode 100644 index 00000000..1ff79ab8 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListSearchRecipient.md @@ -0,0 +1,49 @@ +# ListSearchRecipient + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSearchRecipient**](ListSearchRecipient.md#ListSearchRecipient) | **Get** /v3/contactdb/recipients/search | Search recipients + + + +## ListSearchRecipient + +> ListRecipientsFromContactDbList200Response ListSearchRecipient(ctx, optional) + +Search recipients + +**This endpoint allows you to perform a search on all of your Marketing Campaigns recipients.** field_name: * is a variable that is substituted for your actual custom field name from your recipient. * Text fields must be url-encoded. Date fields are searchable only by unix timestamp (e.g. 2/2/2015 becomes 1422835200) * If field_name is a 'reserved' date field, such as created_at or updated_at, the system will internally convert your epoch time to a date range encompassing the entire day. For example, an epoch time of 1422835600 converts to Mon, 02 Feb 2015 00:06:40 GMT, but internally the system will search from Mon, 02 Feb 2015 00:00:00 GMT through Mon, 02 Feb 2015 23:59:59 GMT. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSearchRecipientParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**FieldName** | **string** | +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListRecipientsFromContactDbList200Response**](ListRecipientsFromContactDbList200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/ListSegment.md b/rest/api/v3/lmc_contactdb/docs/ListSegment.md new file mode 100644 index 00000000..d4f37a4f --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListSegment.md @@ -0,0 +1,48 @@ +# ListSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSegment**](ListSegment.md#ListSegment) | **Get** /v3/contactdb/segments | Retrieve all segments + + + +## ListSegment + +> ListAllSegmentsResponse ListSegment(ctx, optional) + +Retrieve all segments + +**This endpoint allows you to retrieve all of your segments.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListAllSegmentsResponse**](ListAllSegmentsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/ListStatus.md b/rest/api/v3/lmc_contactdb/docs/ListStatus.md new file mode 100644 index 00000000..99c3cd47 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListStatus.md @@ -0,0 +1,48 @@ +# ListStatus + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListStatus**](ListStatus.md#ListStatus) | **Get** /v3/contactdb/status | Get Recipient Upload Status + + + +## ListStatus + +> ListStatus200Response ListStatus(ctx, optional) + +Get Recipient Upload Status + +**This endpoint allows you to check the upload status of a Marketing Campaigns recipient.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListStatusParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListStatus200Response**](ListStatus200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/ListStatus200Response.md b/rest/api/v3/lmc_contactdb/docs/ListStatus200Response.md new file mode 100644 index 00000000..942a9d91 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListStatus200Response.md @@ -0,0 +1,11 @@ +# ListStatus200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | [**[]ListStatus200ResponseStatusInner**](ListStatus200ResponseStatusInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/ListStatus200ResponseStatusInner.md b/rest/api/v3/lmc_contactdb/docs/ListStatus200ResponseStatusInner.md new file mode 100644 index 00000000..4e008b0b --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/ListStatus200ResponseStatusInner.md @@ -0,0 +1,12 @@ +# ListStatus200ResponseStatusInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | Valid values are \"worker_delay\" and \"worker_delay_seconds\" (the second value appears only if \"worker_delay\" has a value of \"delayed\"). |[optional] [default to ""] +**Value** | **string** | Valid values for the ID \"worker_delay\" are \"OK\" or \"Delayed\". Valid values for the ID \"worker_delay_seconds\" is the time of delay to upload. |[optional] [default to ""] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/Operator.md b/rest/api/v3/lmc_contactdb/docs/Operator.md new file mode 100644 index 00000000..180b3c04 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/Operator.md @@ -0,0 +1,16 @@ +# Operator + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**EQ** | string | (value: `"eq"`) +**NE** | string | (value: `"ne"`) +**LT** | string | (value: `"lt"`) +**GT** | string | (value: `"gt"`) +**CONTAINS** | string | (value: `"contains"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/SearchRecipient.md b/rest/api/v3/lmc_contactdb/docs/SearchRecipient.md new file mode 100644 index 00000000..81e7460c --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/SearchRecipient.md @@ -0,0 +1,48 @@ +# SearchRecipient + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SearchRecipient**](SearchRecipient.md#SearchRecipient) | **Post** /v3/contactdb/recipients/search | Search recipients + + + +## SearchRecipient + +> SearchRecipient200Response SearchRecipient(ctx, optional) + +Search recipients + +Search using segment conditions without actually creating a segment. Body contains a JSON object with `conditions`, a list of conditions as described below, and an optional `list_id`, which is a valid list ID for a list to limit the search on. Valid operators for create and update depend on the type of the field for which you are searching. - Dates: - `\"eq\"`, `\"ne\"`, `\"lt\"` (before), `\"gt\"` (after) - You may use MM/DD/YYYY for day granularity or an epoch for second granularity. - `\"empty\"`, `\"not_empty\"` - `\"is within\"` - You may use an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date format or the # of days. - Text: `\"contains\"`, `\"eq\"` (is - matches the full field), `\"ne\"` (is not - matches any field where the entire field is not the condition value), `\"empty\"`, `\"not_empty\"` - Numbers: `\"eq\"`, `\"lt\"`, `\"gt\"`, `\"empty\"`, `\"not_empty\"` - Email Clicks and Opens: `\"eq\"` (opened), `\"ne\"` (not opened) Field values must all be a string. Search conditions using `\"eq\"` or `\"ne\"` for email clicks and opens should provide a \"field\" of either `clicks.campaign_identifier` or `opens.campaign_identifier`. The condition value should be a string containing the id of a completed campaign. Search conditions list may contain multiple conditions, joined by an `\"and\"` or `\"or\"` in the `\"and_or\"` field. The first condition in the conditions list must have an empty `\"and_or\"`, and subsequent conditions must all specify an `\"and_or\"`. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a SearchRecipientParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**SearchRecipientRequest** | [**SearchRecipientRequest**](SearchRecipientRequest.md) | + +### Return type + +[**SearchRecipient200Response**](SearchRecipient200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/SearchRecipient200Response.md b/rest/api/v3/lmc_contactdb/docs/SearchRecipient200Response.md new file mode 100644 index 00000000..c91ecb0a --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/SearchRecipient200Response.md @@ -0,0 +1,12 @@ +# SearchRecipient200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Recipients** | [**[]SearchRecipient200ResponseRecipientsInner**](SearchRecipient200ResponseRecipientsInner.md) | |[optional] +**RecipientCount** | **int32** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInner.md b/rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInner.md new file mode 100644 index 00000000..7ebc565e --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInner.md @@ -0,0 +1,19 @@ +# SearchRecipient200ResponseRecipientsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | **int32** | |[optional] +**Email** | **string** | |[optional] +**Id** | **string** | |[optional] +**LastEmailed** | **int32** | |[optional] +**LastClicked** | **int32** | |[optional] +**LastOpened** | **int32** | |[optional] +**CustomFields** | [**[]SearchRecipient200ResponseRecipientsInnerCustomFieldsInner**](SearchRecipient200ResponseRecipientsInnerCustomFieldsInner.md) | |[optional] +**UpdatedAt** | **int32** | |[optional] +**FirstName** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInnerCustomFieldsInner.md b/rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInnerCustomFieldsInner.md new file mode 100644 index 00000000..6d09dded --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInnerCustomFieldsInner.md @@ -0,0 +1,14 @@ +# SearchRecipient200ResponseRecipientsInnerCustomFieldsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | |[optional] +**Name** | **string** | |[optional] +**Value** | [**SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue**](SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue.md) | |[optional] +**Type** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue.md b/rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue.md new file mode 100644 index 00000000..73d53eb3 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue.md @@ -0,0 +1,10 @@ +# SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/SearchRecipientRequest.md b/rest/api/v3/lmc_contactdb/docs/SearchRecipientRequest.md new file mode 100644 index 00000000..de0b218c --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/SearchRecipientRequest.md @@ -0,0 +1,12 @@ +# SearchRecipientRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ListId** | **int32** | | +**Conditions** | [**[]ContactdbSegmentsConditions**](ContactdbSegmentsConditions.md) | The conditions by which this segment should be created. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/Type.md b/rest/api/v3/lmc_contactdb/docs/Type.md new file mode 100644 index 00000000..94e01859 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/Type.md @@ -0,0 +1,14 @@ +# Type + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DATE** | string | (value: `"date"`) +**TEXT** | string | (value: `"text"`) +**NUMBER** | string | (value: `"number"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/UpdateAListRequest.md b/rest/api/v3/lmc_contactdb/docs/UpdateAListRequest.md new file mode 100644 index 00000000..5d1b4ce2 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/UpdateAListRequest.md @@ -0,0 +1,11 @@ +# UpdateAListRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The new name for your list. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/UpdateContactDbList.md b/rest/api/v3/lmc_contactdb/docs/UpdateContactDbList.md new file mode 100644 index 00000000..3285fc16 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/UpdateContactDbList.md @@ -0,0 +1,53 @@ +# UpdateContactDbList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateContactDbList**](UpdateContactDbList.md#UpdateContactDbList) | **Patch** /v3/contactdb/lists/{ListId} | Update a List + + + +## UpdateContactDbList + +> UpdateContactDbList200Response UpdateContactDbList(ctx, ListIdoptional) + +Update a List + +**This endpoint allows you to update the name of one of your recipient lists.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ListId** | **int32** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateContactDbListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateAListRequest** | [**UpdateAListRequest**](UpdateAListRequest.md) | + +### Return type + +[**UpdateContactDbList200Response**](UpdateContactDbList200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/UpdateContactDbList200Response.md b/rest/api/v3/lmc_contactdb/docs/UpdateContactDbList200Response.md new file mode 100644 index 00000000..de79f5bc --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/UpdateContactDbList200Response.md @@ -0,0 +1,13 @@ +# UpdateContactDbList200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The ID of the list |[optional] +**Name** | **string** | The new name for the list |[optional] +**RecipientCount** | **int32** | The number of recipients on the list |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/UpdateRecipient.md b/rest/api/v3/lmc_contactdb/docs/UpdateRecipient.md new file mode 100644 index 00000000..91d05ad5 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/UpdateRecipient.md @@ -0,0 +1,49 @@ +# UpdateRecipient + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateRecipient**](UpdateRecipient.md#UpdateRecipient) | **Patch** /v3/contactdb/recipients | Update Recipient + + + +## UpdateRecipient + +> ContactdbRecipientResponse201 UpdateRecipient(ctx, optional) + +Update Recipient + +**This endpoint allows you to update one or more recipients.** The body of an API call to this endpoint must include an array of one or more recipient objects. It is of note that you can add custom field data as parameters on recipient objects. We have provided an example using some of the default custom fields SendGrid provides. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateRecipientParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateRecipientRequestInner** | [**[]UpdateRecipientRequestInner**](UpdateRecipientRequestInner.md) | + +### Return type + +[**ContactdbRecipientResponse201**](ContactdbRecipientResponse201.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/UpdateRecipientRequestInner.md b/rest/api/v3/lmc_contactdb/docs/UpdateRecipientRequestInner.md new file mode 100644 index 00000000..0babc15d --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/UpdateRecipientRequestInner.md @@ -0,0 +1,13 @@ +# UpdateRecipientRequestInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | | +**LastName** | **string** | The last name of the recipient. This is one of the default custom fields. |[optional] +**FirstName** | **string** | The first name of the recipient. This is one of the default custom fields. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/docs/UpdateSegment.md b/rest/api/v3/lmc_contactdb/docs/UpdateSegment.md new file mode 100644 index 00000000..57d79bd4 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/UpdateSegment.md @@ -0,0 +1,53 @@ +# UpdateSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSegment**](UpdateSegment.md#UpdateSegment) | **Patch** /v3/contactdb/segments/{SegmentId} | Update a segment + + + +## UpdateSegment + +> ContactdbSegments UpdateSegment(ctx, SegmentIdoptional) + +Update a segment + +**This endpoint allows you to update a segment.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SegmentId** | **int32** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateSegmentRequest** | [**UpdateSegmentRequest**](UpdateSegmentRequest.md) | + +### Return type + +[**ContactdbSegments**](ContactdbSegments.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_contactdb/docs/UpdateSegmentRequest.md b/rest/api/v3/lmc_contactdb/docs/UpdateSegmentRequest.md new file mode 100644 index 00000000..606cf19d --- /dev/null +++ b/rest/api/v3/lmc_contactdb/docs/UpdateSegmentRequest.md @@ -0,0 +1,13 @@ +# UpdateSegmentRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**ListId** | **float32** | The list ID you would like this segment to be built from. |[optional] +**Conditions** | [**[]ContactdbSegmentsConditions**](ContactdbSegmentsConditions.md) | The conditions by which this segment should be created. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_contactdb/model_add_recipient_request_inner.go b/rest/api/v3/lmc_contactdb/model_add_recipient_request_inner.go new file mode 100644 index 00000000..e5fa05f6 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_add_recipient_request_inner.go @@ -0,0 +1,25 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AddRecipientRequestInner struct for AddRecipientRequestInner +type AddRecipientRequestInner struct { + // The email address of the recipient. + Email string `json:"email"` + // The first name of the recipient. + FirstName *string `json:"first_name,omitempty"` + // The last name of the recipient. + LastName *string `json:"last_name,omitempty"` + Age *int32 `json:"age,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_and_or.go b/rest/api/v3/lmc_contactdb/model_and_or.go new file mode 100644 index 00000000..60a341a2 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_and_or.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AndOr the model 'AndOr' +type AndOr string + +// List of AndOr +const ( + ANDOR_AND AndOr = "and" + ANDOR_OR AndOr = "or" + ANDOR_EMPTY AndOr = "" +) diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_custom_field.go b/rest/api/v3/lmc_contactdb/model_contactdb_custom_field.go new file mode 100644 index 00000000..480b2ede --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_contactdb_custom_field.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactdbCustomField struct for ContactdbCustomField +type ContactdbCustomField struct { + // The name of the field + Name *string `json:"name,omitempty"` + // The type of the field. + Type *Type `json:"type,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_custom_field_id2xx.go b/rest/api/v3/lmc_contactdb/model_contactdb_custom_field_id2xx.go new file mode 100644 index 00000000..607a50eb --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_contactdb_custom_field_id2xx.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactdbCustomFieldId2xx struct for ContactdbCustomFieldId2xx +type ContactdbCustomFieldId2xx struct { + // The name of the field + Name *string `json:"name,omitempty"` + // The type of the field. + Type *Type `json:"type,omitempty"` + // The ID of the custom field. + Id *float32 `json:"id,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_custom_field_id_value.go b/rest/api/v3/lmc_contactdb/model_contactdb_custom_field_id_value.go new file mode 100644 index 00000000..0e99ac75 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_contactdb_custom_field_id_value.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactdbCustomFieldIdValue struct for ContactdbCustomFieldIdValue +type ContactdbCustomFieldIdValue struct { + // The name of the field + Name *string `json:"name,omitempty"` + // The type of the field. + Type *Type `json:"type,omitempty"` + // The ID of the custom field. + Id *float32 `json:"id,omitempty"` + // The value of this recipient's custom field + Value *string `json:"value,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_list2xx.go b/rest/api/v3/lmc_contactdb/model_contactdb_list2xx.go new file mode 100644 index 00000000..9a8f2703 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_contactdb_list2xx.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactdbList2xx struct for ContactdbList2xx +type ContactdbList2xx struct { + // The reference ID of your list. + Id int32 `json:"id"` + // The name of your list. Must be unique against all other list and segment names. + Name string `json:"name"` + // The count of recipients currently in the list. + RecipientCount int32 `json:"recipient_count"` +} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_recipient200.go b/rest/api/v3/lmc_contactdb/model_contactdb_recipient200.go new file mode 100644 index 00000000..59735840 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_contactdb_recipient200.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactdbRecipient200 struct for ContactdbRecipient200 +type ContactdbRecipient200 struct { + Recipients *[]ContactdbRecipient200RecipientsInner `json:"recipients,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_recipient200_recipients_inner.go b/rest/api/v3/lmc_contactdb/model_contactdb_recipient200_recipients_inner.go new file mode 100644 index 00000000..5b165ca2 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_contactdb_recipient200_recipients_inner.go @@ -0,0 +1,38 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactdbRecipient200RecipientsInner struct for ContactdbRecipient200RecipientsInner +type ContactdbRecipient200RecipientsInner struct { + // The ID of this recipient. + Id *string `json:"id,omitempty"` + // The time this record was created in your contactdb, in unixtime. + CreatedAt *float32 `json:"created_at,omitempty"` + // The custom fields assigned to this recipient and their values. + CustomFields *[]ContactdbCustomFieldIdValue `json:"custom_fields,omitempty"` + // The email address of this recipient. This is a default custom field that SendGrid provides. + Email string `json:"email"` + // The first name of this recipient. This is a default custom field that SendGrid provides. + FirstName *string `json:"first_name,omitempty"` + // The last name of the recipient. + LastName *string `json:"last_name,omitempty"` + // The last time this recipient clicked a link from one of your campaigns, in unixtime. + LastClicked *float32 `json:"last_clicked,omitempty"` + // The last time this user was emailed by one of your campaigns, in unixtime. + LastEmailed *float32 `json:"last_emailed,omitempty"` + // The last time this recipient opened an email from you, in unixtime. + LastOpened *float32 `json:"last_opened,omitempty"` + // The last update date for this recipient's record. + UpdatedAt *float32 `json:"updated_at,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_recipient_count200.go b/rest/api/v3/lmc_contactdb/model_contactdb_recipient_count200.go new file mode 100644 index 00000000..7e4a3521 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_contactdb_recipient_count200.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactdbRecipientCount200 struct for ContactdbRecipientCount200 +type ContactdbRecipientCount200 struct { + // The count of recipients. + RecipientCount float32 `json:"recipient_count"` +} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_recipient_response201.go b/rest/api/v3/lmc_contactdb/model_contactdb_recipient_response201.go new file mode 100644 index 00000000..b48d3be5 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_contactdb_recipient_response201.go @@ -0,0 +1,29 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactdbRecipientResponse201 struct for ContactdbRecipientResponse201 +type ContactdbRecipientResponse201 struct { + // The number of errors found while adding recipients. + ErrorCount float32 `json:"error_count"` + // The indices of the recipient(s) sent that caused the error. + ErrorIndices *[]float32 `json:"error_indices,omitempty"` + // The count of new recipients added to the contactdb. + NewCount float32 `json:"new_count"` + // The recipient IDs of the recipients that already existed from this request. + PersistedRecipients []string `json:"persisted_recipients"` + // The recipients who were updated from this request. + UpdatedCount float32 `json:"updated_count"` + Errors *[]ContactdbRecipientResponse201ErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_recipient_response201_errors_inner.go b/rest/api/v3/lmc_contactdb/model_contactdb_recipient_response201_errors_inner.go new file mode 100644 index 00000000..4ae71cd8 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_contactdb_recipient_response201_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactdbRecipientResponse201ErrorsInner struct for ContactdbRecipientResponse201ErrorsInner +type ContactdbRecipientResponse201ErrorsInner struct { + Message *string `json:"message,omitempty"` + ErrorIndices *[]float32 `json:"error_indices,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_segments.go b/rest/api/v3/lmc_contactdb/model_contactdb_segments.go new file mode 100644 index 00000000..7fe704db --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_contactdb_segments.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactdbSegments struct for ContactdbSegments +type ContactdbSegments struct { + // The name of this segment. + Name string `json:"name"` + // The list id from which to make this segment. Not including this ID will mean your segment is created from the main contactdb rather than a list. + ListId *int32 `json:"list_id,omitempty"` + // The conditions for a recipient to be included in this segment. + Conditions []ContactdbSegmentsConditions `json:"conditions"` + // The count of recipients in this list. This is not included on creation of segments. + RecipientCount *float32 `json:"recipient_count,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_segments_conditions.go b/rest/api/v3/lmc_contactdb/model_contactdb_segments_conditions.go new file mode 100644 index 00000000..c0e67a33 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_contactdb_segments_conditions.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactdbSegmentsConditions struct for ContactdbSegmentsConditions +type ContactdbSegmentsConditions struct { + Field string `json:"field"` + Value string `json:"value"` + Operator Operator `json:"operator"` + AndOr *AndOr `json:"and_or,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_contactdb_segments_id200.go b/rest/api/v3/lmc_contactdb/model_contactdb_segments_id200.go new file mode 100644 index 00000000..b3a4b612 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_contactdb_segments_id200.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactdbSegmentsId200 struct for ContactdbSegmentsId200 +type ContactdbSegmentsId200 struct { + // The ID of the segment. + Id float32 `json:"id"` + // The name of this segment. + Name string `json:"name"` + // The list id from which to make this segment. Not including this ID will mean your segment is created from the main contactdb rather than a list. + ListId *int32 `json:"list_id,omitempty"` + // The conditions for a recipient to be included in this segment. + Conditions []ContactdbSegmentsConditions `json:"conditions"` + // The count of recipients in this list. This is not included on creation of segments. + RecipientCount *float32 `json:"recipient_count,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_create_a_list_request.go b/rest/api/v3/lmc_contactdb/model_create_a_list_request.go new file mode 100644 index 00000000..773c84de --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_create_a_list_request.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateAListRequest struct for CreateAListRequest +type CreateAListRequest struct { + Name string `json:"name"` +} diff --git a/rest/api/v3/lmc_contactdb/model_create_custom_field_request.go b/rest/api/v3/lmc_contactdb/model_create_custom_field_request.go new file mode 100644 index 00000000..e17c24ac --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_create_custom_field_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateCustomFieldRequest struct for CreateCustomFieldRequest +type CreateCustomFieldRequest struct { + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_delete_contacts.go b/rest/api/v3/lmc_contactdb/model_delete_contacts.go new file mode 100644 index 00000000..f916ee14 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_delete_contacts.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteContacts the model 'DeleteContacts' +type DeleteContacts bool + +// List of DeleteContacts +const ( + DELETECONTACTS_TRUE DeleteContacts = true + DELETECONTACTS_FALSE DeleteContacts = false +) diff --git a/rest/api/v3/lmc_contactdb/model_error_response.go b/rest/api/v3/lmc_contactdb/model_error_response.go new file mode 100644 index 00000000..9edcd5e2 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_error_response_errors_inner.go b/rest/api/v3/lmc_contactdb/model_error_response_errors_inner.go new file mode 100644 index 00000000..64ff20ee --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_get_recipient_list_200_response.go b/rest/api/v3/lmc_contactdb/model_get_recipient_list_200_response.go new file mode 100644 index 00000000..3812b9ef --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_get_recipient_list_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetRecipientList200Response struct for GetRecipientList200Response +type GetRecipientList200Response struct { + Lists *[]ContactdbList2xx `json:"lists,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_list_all_custom_fields_response.go b/rest/api/v3/lmc_contactdb/model_list_all_custom_fields_response.go new file mode 100644 index 00000000..80c1834b --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_list_all_custom_fields_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListAllCustomFieldsResponse struct for ListAllCustomFieldsResponse +type ListAllCustomFieldsResponse struct { + CustomFields []ContactdbCustomFieldId2xx `json:"custom_fields"` +} diff --git a/rest/api/v3/lmc_contactdb/model_list_all_lists_response.go b/rest/api/v3/lmc_contactdb/model_list_all_lists_response.go new file mode 100644 index 00000000..beb23c3c --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_list_all_lists_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListAllListsResponse struct for ListAllListsResponse +type ListAllListsResponse struct { + Lists []ContactdbList2xx `json:"lists"` +} diff --git a/rest/api/v3/lmc_contactdb/model_list_all_segments_response.go b/rest/api/v3/lmc_contactdb/model_list_all_segments_response.go new file mode 100644 index 00000000..9df8c58e --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_list_all_segments_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListAllSegmentsResponse struct for ListAllSegmentsResponse +type ListAllSegmentsResponse struct { + Segments []ContactdbSegments `json:"segments"` +} diff --git a/rest/api/v3/lmc_contactdb/model_list_recipients_from_contact_db_list_200_response.go b/rest/api/v3/lmc_contactdb/model_list_recipients_from_contact_db_list_200_response.go new file mode 100644 index 00000000..d271c30d --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_list_recipients_from_contact_db_list_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListRecipientsFromContactDbList200Response struct for ListRecipientsFromContactDbList200Response +type ListRecipientsFromContactDbList200Response struct { + Recipients *[]ContactdbRecipient200 `json:"recipients,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_list_recipients_on_a_segment_response.go b/rest/api/v3/lmc_contactdb/model_list_recipients_on_a_segment_response.go new file mode 100644 index 00000000..2c9656c9 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_list_recipients_on_a_segment_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListRecipientsOnASegmentResponse struct for ListRecipientsOnASegmentResponse +type ListRecipientsOnASegmentResponse struct { + Recipients []ContactdbRecipient200 `json:"recipients"` +} diff --git a/rest/api/v3/lmc_contactdb/model_list_recipients_response.go b/rest/api/v3/lmc_contactdb/model_list_recipients_response.go new file mode 100644 index 00000000..b09ef108 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_list_recipients_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListRecipientsResponse struct for ListRecipientsResponse +type ListRecipientsResponse struct { + Recipients []map[string]interface{} `json:"recipients"` +} diff --git a/rest/api/v3/lmc_contactdb/model_list_reserved_field_200_response.go b/rest/api/v3/lmc_contactdb/model_list_reserved_field_200_response.go new file mode 100644 index 00000000..19b63d9e --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_list_reserved_field_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListReservedField200Response struct for ListReservedField200Response +type ListReservedField200Response struct { + ReservedFields *[]ListReservedField200ResponseReservedFieldsInner `json:"reserved_fields,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_list_reserved_field_200_response_reserved_fields_inner.go b/rest/api/v3/lmc_contactdb/model_list_reserved_field_200_response_reserved_fields_inner.go new file mode 100644 index 00000000..d213170a --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_list_reserved_field_200_response_reserved_fields_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListReservedField200ResponseReservedFieldsInner struct for ListReservedField200ResponseReservedFieldsInner +type ListReservedField200ResponseReservedFieldsInner struct { + Name *string `json:"name,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_list_status_200_response.go b/rest/api/v3/lmc_contactdb/model_list_status_200_response.go new file mode 100644 index 00000000..b357ab9a --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_list_status_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListStatus200Response struct for ListStatus200Response +type ListStatus200Response struct { + Status *[]ListStatus200ResponseStatusInner `json:"status,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_list_status_200_response_status_inner.go b/rest/api/v3/lmc_contactdb/model_list_status_200_response_status_inner.go new file mode 100644 index 00000000..89247e3e --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_list_status_200_response_status_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListStatus200ResponseStatusInner struct for ListStatus200ResponseStatusInner +type ListStatus200ResponseStatusInner struct { + // Valid values are \"worker_delay\" and \"worker_delay_seconds\" (the second value appears only if \"worker_delay\" has a value of \"delayed\"). + Id *string `json:"id,omitempty"` + // Valid values for the ID \"worker_delay\" are \"OK\" or \"Delayed\". Valid values for the ID \"worker_delay_seconds\" is the time of delay to upload. + Value *string `json:"value,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_operator.go b/rest/api/v3/lmc_contactdb/model_operator.go new file mode 100644 index 00000000..da90b9e6 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_operator.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Operator the model 'Operator' +type Operator string + +// List of Operator +const ( + OPERATOR_EQ Operator = "eq" + OPERATOR_NE Operator = "ne" + OPERATOR_LT Operator = "lt" + OPERATOR_GT Operator = "gt" + OPERATOR_CONTAINS Operator = "contains" +) diff --git a/rest/api/v3/lmc_contactdb/model_search_recipient_200_response.go b/rest/api/v3/lmc_contactdb/model_search_recipient_200_response.go new file mode 100644 index 00000000..0285df3f --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_search_recipient_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SearchRecipient200Response struct for SearchRecipient200Response +type SearchRecipient200Response struct { + Recipients *[]SearchRecipient200ResponseRecipientsInner `json:"recipients,omitempty"` + RecipientCount *int32 `json:"recipient_count,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner.go b/rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner.go new file mode 100644 index 00000000..2eba7382 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner.go @@ -0,0 +1,27 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SearchRecipient200ResponseRecipientsInner struct for SearchRecipient200ResponseRecipientsInner +type SearchRecipient200ResponseRecipientsInner struct { + CreatedAt *int32 `json:"created_at,omitempty"` + Email *string `json:"email,omitempty"` + Id *string `json:"id,omitempty"` + LastEmailed *int32 `json:"last_emailed,omitempty"` + LastClicked *int32 `json:"last_clicked,omitempty"` + LastOpened *int32 `json:"last_opened,omitempty"` + CustomFields *[]SearchRecipient200ResponseRecipientsInnerCustomFieldsInner `json:"custom_fields,omitempty"` + UpdatedAt *int32 `json:"updated_at,omitempty"` + FirstName *string `json:"first_name,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner_custom_fields_inner.go b/rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner_custom_fields_inner.go new file mode 100644 index 00000000..d541c438 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner_custom_fields_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SearchRecipient200ResponseRecipientsInnerCustomFieldsInner struct for SearchRecipient200ResponseRecipientsInnerCustomFieldsInner +type SearchRecipient200ResponseRecipientsInnerCustomFieldsInner struct { + Id *int32 `json:"id,omitempty"` + Name *string `json:"name,omitempty"` + Value *SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue `json:"value,omitempty"` + Type *string `json:"type,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner_custom_fields_inner_value.go b/rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner_custom_fields_inner_value.go new file mode 100644 index 00000000..6465eb37 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_search_recipient_200_response_recipients_inner_custom_fields_inner_value.go @@ -0,0 +1,18 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue struct for SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue +type SearchRecipient200ResponseRecipientsInnerCustomFieldsInnerValue struct { +} diff --git a/rest/api/v3/lmc_contactdb/model_search_recipient_request.go b/rest/api/v3/lmc_contactdb/model_search_recipient_request.go new file mode 100644 index 00000000..8f940790 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_search_recipient_request.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SearchRecipientRequest struct for SearchRecipientRequest +type SearchRecipientRequest struct { + ListId int32 `json:"list_id"` + // The conditions by which this segment should be created. + Conditions []ContactdbSegmentsConditions `json:"conditions"` +} diff --git a/rest/api/v3/lmc_contactdb/model_type.go b/rest/api/v3/lmc_contactdb/model_type.go new file mode 100644 index 00000000..92c5e4b6 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_type.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Type the model 'Type' +type Type string + +// List of Type +const ( + TYPE_DATE Type = "date" + TYPE_TEXT Type = "text" + TYPE_NUMBER Type = "number" +) diff --git a/rest/api/v3/lmc_contactdb/model_update_a_list_request.go b/rest/api/v3/lmc_contactdb/model_update_a_list_request.go new file mode 100644 index 00000000..db1099c4 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_update_a_list_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateAListRequest struct for UpdateAListRequest +type UpdateAListRequest struct { + // The new name for your list. + Name string `json:"name"` +} diff --git a/rest/api/v3/lmc_contactdb/model_update_contact_db_list_200_response.go b/rest/api/v3/lmc_contactdb/model_update_contact_db_list_200_response.go new file mode 100644 index 00000000..852e50f7 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_update_contact_db_list_200_response.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateContactDbList200Response struct for UpdateContactDbList200Response +type UpdateContactDbList200Response struct { + // The ID of the list + Id *int32 `json:"id,omitempty"` + // The new name for the list + Name *string `json:"name,omitempty"` + // The number of recipients on the list + RecipientCount *int32 `json:"recipient_count,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_update_recipient_request_inner.go b/rest/api/v3/lmc_contactdb/model_update_recipient_request_inner.go new file mode 100644 index 00000000..5382ec99 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_update_recipient_request_inner.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateRecipientRequestInner struct for UpdateRecipientRequestInner +type UpdateRecipientRequestInner struct { + Email string `json:"email"` + // The last name of the recipient. This is one of the default custom fields. + LastName *string `json:"last_name,omitempty"` + // The first name of the recipient. This is one of the default custom fields. + FirstName *string `json:"first_name,omitempty"` +} diff --git a/rest/api/v3/lmc_contactdb/model_update_segment_request.go b/rest/api/v3/lmc_contactdb/model_update_segment_request.go new file mode 100644 index 00000000..f2d1e726 --- /dev/null +++ b/rest/api/v3/lmc_contactdb/model_update_segment_request.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Contacts API +* The Twilio SendGrid Legacy Marketing Campaigns Contacts API allows you to manage your marketing contacts programmatically. This API is operational, but we recommend using the current version of Marketing Campaigns' [Contacts API](https://docs.sendgrid.com/api-reference/contacts/), [Lists API](https://docs.sendgrid.com/api-reference/lists/), and [Segments API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) to manage your contacts. See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateSegmentRequest struct for UpdateSegmentRequest +type UpdateSegmentRequest struct { + Name string `json:"name"` + // The list ID you would like this segment to be built from. + ListId *float32 `json:"list_id,omitempty"` + // The conditions by which this segment should be created. + Conditions *[]ContactdbSegmentsConditions `json:"conditions,omitempty"` +} diff --git a/rest/api/v3/lmc_senders/README.md b/rest/api/v3/lmc_senders/README.md new file mode 100644 index 00000000..7f23b87b --- /dev/null +++ b/rest/api/v3/lmc_senders/README.md @@ -0,0 +1,74 @@ +# Go API client for + +The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). + +See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:01.505489+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateSender* | [**CreateSender**](docs/CreateSender.md#createsender) | **Post** /v3/senders | Create a Sender Identity +*DeleteSender* | [**DeleteSender**](docs/DeleteSender.md#deletesender) | **Delete** /v3/senders/{SenderId} | Delete a Sender Identity +*GetSender* | [**GetSender**](docs/GetSender.md#getsender) | **Get** /v3/senders/{SenderId} | View a Sender Identity +*ListSender* | [**ListSender**](docs/ListSender.md#listsender) | **Get** /v3/senders | Get all Sender Identities +*ResetSenderVerification* | [**ResetSenderVerification**](docs/ResetSenderVerification.md#resetsenderverification) | **Post** /v3/senders/{SenderId}/resend_verification | Resend Sender Identity Verification +*UpdateSender* | [**UpdateSender**](docs/UpdateSender.md#updatesender) | **Patch** /v3/senders/{SenderId} | Update a Sender Identity + + +## Documentation For Models + + - [CreateSender400Response](CreateSender400Response.md) + - [CreateSender400ResponseErrorsInner](CreateSender400ResponseErrorsInner.md) + - [CreateSenderRequest](CreateSenderRequest.md) + - [ListSender200Response](ListSender200Response.md) + - [SenderId](SenderId.md) + - [SenderIdRequest](SenderIdRequest.md) + - [SenderIdRequestFrom](SenderIdRequestFrom.md) + - [SenderIdRequestReplyTo](SenderIdRequestReplyTo.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/lmc_senders/api_create_sender.go b/rest/api/v3/lmc_senders/api_create_sender.go new file mode 100644 index 00000000..a3420d11 --- /dev/null +++ b/rest/api/v3/lmc_senders/api_create_sender.go @@ -0,0 +1,82 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateSenderParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + CreateSenderRequest *CreateSenderRequest `json:"CreateSenderRequest,omitempty"` +} + +func (params *CreateSenderParam) SetOnbehalfof(Onbehalfof string) *CreateSenderParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateSenderParam) SetCreateSenderRequest(CreateSenderRequest CreateSenderRequest) *CreateSenderParam { + params.CreateSenderRequest = &CreateSenderRequest + return params +} + +// **This endpoint allows you to create a new sender identity.** You may create up to 100 unique sender identities. +func (c *ApiService) CreateSender(params *CreateSenderParam) (interface{}, error) { + path := "/v3/senders" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateSenderRequest != nil { + b, err := json.Marshal(*params.CreateSenderRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &SenderId{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &CreateSender400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_senders/api_delete_sender.go b/rest/api/v3/lmc_senders/api_delete_sender.go new file mode 100644 index 00000000..abdf177e --- /dev/null +++ b/rest/api/v3/lmc_senders/api_delete_sender.go @@ -0,0 +1,87 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type DeleteSenderParam struct { + // The ID of the sender identity that you want to retrieve. + SenderId *int32 `json:"sender_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteSenderParam) SetSenderId(SenderId int32) *DeleteSenderParam { + params.SenderId = &SenderId + return params +} +func (params *DeleteSenderParam) SetOnbehalfof(Onbehalfof string) *DeleteSenderParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete one of your sender identities.** +func (c *ApiService) DeleteSender(params *DeleteSenderParam) (interface{}, error) { + path := "/v3/senders/{SenderId}" + if params != nil && params.SenderId != nil { + path = strings.Replace(path, "{"+"SenderId"+"}", fmt.Sprint(*params.SenderId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &CreateSender400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &CreateSender400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_senders/api_get_sender.go b/rest/api/v3/lmc_senders/api_get_sender.go new file mode 100644 index 00000000..125c0007 --- /dev/null +++ b/rest/api/v3/lmc_senders/api_get_sender.go @@ -0,0 +1,79 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type GetSenderParam struct { + // The ID of the sender identity that you want to retrieve. + SenderId *int32 `json:"sender_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetSenderParam) SetSenderId(SenderId int32) *GetSenderParam { + params.SenderId = &SenderId + return params +} +func (params *GetSenderParam) SetOnbehalfof(Onbehalfof string) *GetSenderParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a specific sender identity.** +func (c *ApiService) GetSender(params *GetSenderParam) (interface{}, error) { + path := "/v3/senders/{SenderId}" + if params != nil && params.SenderId != nil { + path = strings.Replace(path, "{"+"SenderId"+"}", fmt.Sprint(*params.SenderId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SenderId{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &CreateSender400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_senders/api_list_sender.go b/rest/api/v3/lmc_senders/api_list_sender.go new file mode 100644 index 00000000..f612bc1e --- /dev/null +++ b/rest/api/v3/lmc_senders/api_list_sender.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListSenderParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListSenderParam) SetOnbehalfof(Onbehalfof string) *ListSenderParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a list of all sender identities that have been created for your account.** +func (c *ApiService) ListSender(params *ListSenderParam) (interface{}, error) { + path := "/v3/senders" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListSender200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_senders/api_reset_sender_verification.go b/rest/api/v3/lmc_senders/api_reset_sender_verification.go new file mode 100644 index 00000000..4e93f231 --- /dev/null +++ b/rest/api/v3/lmc_senders/api_reset_sender_verification.go @@ -0,0 +1,87 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type ResetSenderVerificationParam struct { + // The ID of the sender identity for which you would like to resend a verification email. + SenderId *int32 `json:"sender_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ResetSenderVerificationParam) SetSenderId(SenderId int32) *ResetSenderVerificationParam { + params.SenderId = &SenderId + return params +} +func (params *ResetSenderVerificationParam) SetOnbehalfof(Onbehalfof string) *ResetSenderVerificationParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to resend a sender identity verification email.** +func (c *ApiService) ResetSenderVerification(params *ResetSenderVerificationParam) (interface{}, error) { + path := "/v3/senders/{SenderId}/resend_verification" + if params != nil && params.SenderId != nil { + path = strings.Replace(path, "{"+"SenderId"+"}", fmt.Sprint(*params.SenderId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &CreateSender400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &CreateSender400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_senders/api_service.go b/rest/api/v3/lmc_senders/api_service.go new file mode 100644 index 00000000..aa0529a6 --- /dev/null +++ b/rest/api/v3/lmc_senders/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/lmc_senders/api_update_sender.go b/rest/api/v3/lmc_senders/api_update_sender.go new file mode 100644 index 00000000..ea0161ba --- /dev/null +++ b/rest/api/v3/lmc_senders/api_update_sender.go @@ -0,0 +1,110 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type UpdateSenderParam struct { + // The ID of the sender identity that you want to retrieve. + SenderId *int32 `json:"sender_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + SenderIdRequest *SenderIdRequest `json:"SenderIdRequest,omitempty"` +} + +func (params *UpdateSenderParam) SetSenderId(SenderId int32) *UpdateSenderParam { + params.SenderId = &SenderId + return params +} +func (params *UpdateSenderParam) SetOnbehalfof(Onbehalfof string) *UpdateSenderParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateSenderParam) SetSenderIdRequest(SenderIdRequest SenderIdRequest) *UpdateSenderParam { + params.SenderIdRequest = &SenderIdRequest + return params +} + +// **This endpoint allows you to update a sender identity.** Updates to `from.email` require re-verification. Partial updates are allowed, but fields that are marked as \"required\" in the POST (create) endpoint must not be nil if that field is included in the PATCH request. +func (c *ApiService) UpdateSender(params *UpdateSenderParam) (interface{}, error) { + path := "/v3/senders/{SenderId}" + if params != nil && params.SenderId != nil { + path = strings.Replace(path, "{"+"SenderId"+"}", fmt.Sprint(*params.SenderId), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SenderIdRequest != nil { + b, err := json.Marshal(*params.SenderIdRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SenderId{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &CreateSender400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &CreateSender400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &CreateSender400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/lmc_senders/docs/CreateSender.md b/rest/api/v3/lmc_senders/docs/CreateSender.md new file mode 100644 index 00000000..c3e50784 --- /dev/null +++ b/rest/api/v3/lmc_senders/docs/CreateSender.md @@ -0,0 +1,49 @@ +# CreateSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateSender**](CreateSender.md#CreateSender) | **Post** /v3/senders | Create a Sender Identity + + + +## CreateSender + +> SenderId CreateSender(ctx, optional) + +Create a Sender Identity + +**This endpoint allows you to create a new sender identity.** You may create up to 100 unique sender identities. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**CreateSenderRequest** | [**CreateSenderRequest**](CreateSenderRequest.md) | + +### Return type + +[**SenderId**](SenderId.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_senders/docs/CreateSender400Response.md b/rest/api/v3/lmc_senders/docs/CreateSender400Response.md new file mode 100644 index 00000000..82215c7b --- /dev/null +++ b/rest/api/v3/lmc_senders/docs/CreateSender400Response.md @@ -0,0 +1,11 @@ +# CreateSender400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]CreateSender400ResponseErrorsInner**](CreateSender400ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_senders/docs/CreateSender400ResponseErrorsInner.md b/rest/api/v3/lmc_senders/docs/CreateSender400ResponseErrorsInner.md new file mode 100644 index 00000000..9ed78de2 --- /dev/null +++ b/rest/api/v3/lmc_senders/docs/CreateSender400ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# CreateSender400ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | |[optional] +**Field** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_senders/docs/CreateSenderRequest.md b/rest/api/v3/lmc_senders/docs/CreateSenderRequest.md new file mode 100644 index 00000000..97a03bec --- /dev/null +++ b/rest/api/v3/lmc_senders/docs/CreateSenderRequest.md @@ -0,0 +1,19 @@ +# CreateSenderRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Nickname** | **string** | A nickname for the sender identity. Not used for sending. | +**From** | **map[string]interface{}** | |[optional] +**ReplyTo** | **map[string]interface{}** | |[optional] +**Address** | **string** | The physical address of the sender identity. | +**Address2** | **string** | Additional sender identity address information. |[optional] +**City** | **string** | The city of the sender identity. | +**State** | **string** | The state of the sender identity. |[optional] +**Zip** | **string** | The zipcode of the sender identity. |[optional] +**Country** | **string** | The country of the sender identity. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_senders/docs/DeleteSender.md b/rest/api/v3/lmc_senders/docs/DeleteSender.md new file mode 100644 index 00000000..5a3cd16b --- /dev/null +++ b/rest/api/v3/lmc_senders/docs/DeleteSender.md @@ -0,0 +1,52 @@ +# DeleteSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSender**](DeleteSender.md#DeleteSender) | **Delete** /v3/senders/{SenderId} | Delete a Sender Identity + + + +## DeleteSender + +> map[string]interface{} DeleteSender(ctx, SenderIdoptional) + +Delete a Sender Identity + +**This endpoint allows you to delete one of your sender identities.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SenderId** | **int32** | The ID of the sender identity that you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_senders/docs/GetSender.md b/rest/api/v3/lmc_senders/docs/GetSender.md new file mode 100644 index 00000000..e183cdfd --- /dev/null +++ b/rest/api/v3/lmc_senders/docs/GetSender.md @@ -0,0 +1,52 @@ +# GetSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetSender**](GetSender.md#GetSender) | **Get** /v3/senders/{SenderId} | View a Sender Identity + + + +## GetSender + +> SenderId GetSender(ctx, SenderIdoptional) + +View a Sender Identity + +**This endpoint allows you to retrieve a specific sender identity.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SenderId** | **int32** | The ID of the sender identity that you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**SenderId**](SenderId.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_senders/docs/ListSender.md b/rest/api/v3/lmc_senders/docs/ListSender.md new file mode 100644 index 00000000..e2cdca72 --- /dev/null +++ b/rest/api/v3/lmc_senders/docs/ListSender.md @@ -0,0 +1,48 @@ +# ListSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSender**](ListSender.md#ListSender) | **Get** /v3/senders | Get all Sender Identities + + + +## ListSender + +> ListSender200Response ListSender(ctx, optional) + +Get all Sender Identities + +**This endpoint allows you to retrieve a list of all sender identities that have been created for your account.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListSender200Response**](ListSender200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_senders/docs/ListSender200Response.md b/rest/api/v3/lmc_senders/docs/ListSender200Response.md new file mode 100644 index 00000000..a43f2cf1 --- /dev/null +++ b/rest/api/v3/lmc_senders/docs/ListSender200Response.md @@ -0,0 +1,11 @@ +# ListSender200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]SenderId**](SenderId.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_senders/docs/ResetSenderVerification.md b/rest/api/v3/lmc_senders/docs/ResetSenderVerification.md new file mode 100644 index 00000000..772fee5c --- /dev/null +++ b/rest/api/v3/lmc_senders/docs/ResetSenderVerification.md @@ -0,0 +1,52 @@ +# ResetSenderVerification + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ResetSenderVerification**](ResetSenderVerification.md#ResetSenderVerification) | **Post** /v3/senders/{SenderId}/resend_verification | Resend Sender Identity Verification + + + +## ResetSenderVerification + +> map[string]interface{} ResetSenderVerification(ctx, SenderIdoptional) + +Resend Sender Identity Verification + +**This endpoint allows you to resend a sender identity verification email.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SenderId** | **int32** | The ID of the sender identity for which you would like to resend a verification email. + +### Other Parameters + +Other parameters are passed through a pointer to a ResetSenderVerificationParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_senders/docs/SenderId.md b/rest/api/v3/lmc_senders/docs/SenderId.md new file mode 100644 index 00000000..5873d37d --- /dev/null +++ b/rest/api/v3/lmc_senders/docs/SenderId.md @@ -0,0 +1,24 @@ +# SenderId + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Nickname** | **string** | A nickname for the sender identity. Not used for sending. | +**From** | [**SenderIdRequestFrom**](SenderIdRequestFrom.md) | |[optional] +**ReplyTo** | [**SenderIdRequestReplyTo**](SenderIdRequestReplyTo.md) | |[optional] +**Address** | **string** | The physical address of the sender identity. | +**Address2** | **string** | Additional sender identity address information. |[optional] +**City** | **string** | The city of the sender identity. | +**State** | **string** | The state of the sender identity. |[optional] +**Zip** | **string** | The zipcode of the sender identity. |[optional] +**Country** | **string** | The country of the sender identity. | +**Id** | **int32** | The unique identifier of the sender identity. |[optional] +**Verified** | **bool** | If the sender identity is verified or not. Only verified sender identities can be used to send email. |[optional] +**UpdatedAt** | **int32** | The time the sender identity was last updated. |[optional] +**CreatedAt** | **int32** | The time the sender identity was created. |[optional] +**Locked** | **bool** | True when the sender id is associated to a campaign in the Draft, Scheduled, or In Progress status. You cannot update or delete a locked sender identity. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_senders/docs/SenderIdRequest.md b/rest/api/v3/lmc_senders/docs/SenderIdRequest.md new file mode 100644 index 00000000..263408e5 --- /dev/null +++ b/rest/api/v3/lmc_senders/docs/SenderIdRequest.md @@ -0,0 +1,19 @@ +# SenderIdRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Nickname** | **string** | A nickname for the sender identity. Not used for sending. |[optional] +**From** | [**SenderIdRequestFrom**](SenderIdRequestFrom.md) | |[optional] +**ReplyTo** | [**SenderIdRequestReplyTo**](SenderIdRequestReplyTo.md) | |[optional] +**Address** | **string** | The physical address of the sender identity. |[optional] +**Address2** | **string** | Additional sender identity address information. |[optional] +**City** | **string** | The city of the sender identity. |[optional] +**State** | **string** | The state of the sender identity. |[optional] +**Zip** | **string** | The zipcode of the sender identity. |[optional] +**Country** | **string** | The country of the sender identity. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_senders/docs/SenderIdRequestFrom.md b/rest/api/v3/lmc_senders/docs/SenderIdRequestFrom.md new file mode 100644 index 00000000..eaf4d8fa --- /dev/null +++ b/rest/api/v3/lmc_senders/docs/SenderIdRequestFrom.md @@ -0,0 +1,12 @@ +# SenderIdRequestFrom + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address from which your recipient will receive emails. |[optional] +**Name** | **string** | The name appended to the from email field. Typically your name or company name. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_senders/docs/SenderIdRequestReplyTo.md b/rest/api/v3/lmc_senders/docs/SenderIdRequestReplyTo.md new file mode 100644 index 00000000..bcdd0642 --- /dev/null +++ b/rest/api/v3/lmc_senders/docs/SenderIdRequestReplyTo.md @@ -0,0 +1,12 @@ +# SenderIdRequestReplyTo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address to which your recipient will reply. |[optional] +**Name** | **string** | The name appended to the reply to email field. Typically your name or company name. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/lmc_senders/docs/UpdateSender.md b/rest/api/v3/lmc_senders/docs/UpdateSender.md new file mode 100644 index 00000000..c48c1685 --- /dev/null +++ b/rest/api/v3/lmc_senders/docs/UpdateSender.md @@ -0,0 +1,53 @@ +# UpdateSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSender**](UpdateSender.md#UpdateSender) | **Patch** /v3/senders/{SenderId} | Update a Sender Identity + + + +## UpdateSender + +> SenderId UpdateSender(ctx, SenderIdoptional) + +Update a Sender Identity + +**This endpoint allows you to update a sender identity.** Updates to `from.email` require re-verification. Partial updates are allowed, but fields that are marked as \"required\" in the POST (create) endpoint must not be nil if that field is included in the PATCH request. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SenderId** | **int32** | The ID of the sender identity that you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**SenderIdRequest** | [**SenderIdRequest**](SenderIdRequest.md) | + +### Return type + +[**SenderId**](SenderId.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/lmc_senders/model_create_sender_400_response.go b/rest/api/v3/lmc_senders/model_create_sender_400_response.go new file mode 100644 index 00000000..81a60813 --- /dev/null +++ b/rest/api/v3/lmc_senders/model_create_sender_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateSender400Response struct for CreateSender400Response +type CreateSender400Response struct { + Errors *[]CreateSender400ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/lmc_senders/model_create_sender_400_response_errors_inner.go b/rest/api/v3/lmc_senders/model_create_sender_400_response_errors_inner.go new file mode 100644 index 00000000..829750a6 --- /dev/null +++ b/rest/api/v3/lmc_senders/model_create_sender_400_response_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateSender400ResponseErrorsInner struct for CreateSender400ResponseErrorsInner +type CreateSender400ResponseErrorsInner struct { + Message *string `json:"message,omitempty"` + Field *string `json:"field,omitempty"` +} diff --git a/rest/api/v3/lmc_senders/model_create_sender_request.go b/rest/api/v3/lmc_senders/model_create_sender_request.go new file mode 100644 index 00000000..a8496af9 --- /dev/null +++ b/rest/api/v3/lmc_senders/model_create_sender_request.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateSenderRequest struct for CreateSenderRequest +type CreateSenderRequest struct { + // A nickname for the sender identity. Not used for sending. + Nickname string `json:"nickname"` + From *map[string]interface{} `json:"from,omitempty"` + ReplyTo *map[string]interface{} `json:"reply_to,omitempty"` + // The physical address of the sender identity. + Address string `json:"address"` + // Additional sender identity address information. + Address2 *string `json:"address_2,omitempty"` + // The city of the sender identity. + City string `json:"city"` + // The state of the sender identity. + State *string `json:"state,omitempty"` + // The zipcode of the sender identity. + Zip *string `json:"zip,omitempty"` + // The country of the sender identity. + Country string `json:"country"` +} diff --git a/rest/api/v3/lmc_senders/model_list_sender_200_response.go b/rest/api/v3/lmc_senders/model_list_sender_200_response.go new file mode 100644 index 00000000..7394409a --- /dev/null +++ b/rest/api/v3/lmc_senders/model_list_sender_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSender200Response struct for ListSender200Response +type ListSender200Response struct { + Result *[]SenderId `json:"result,omitempty"` +} diff --git a/rest/api/v3/lmc_senders/model_sender_id.go b/rest/api/v3/lmc_senders/model_sender_id.go new file mode 100644 index 00000000..aa460bd2 --- /dev/null +++ b/rest/api/v3/lmc_senders/model_sender_id.go @@ -0,0 +1,44 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SenderId struct for SenderId +type SenderId struct { + // A nickname for the sender identity. Not used for sending. + Nickname string `json:"nickname"` + From *SenderIdRequestFrom `json:"from,omitempty"` + ReplyTo *SenderIdRequestReplyTo `json:"reply_to,omitempty"` + // The physical address of the sender identity. + Address string `json:"address"` + // Additional sender identity address information. + Address2 *string `json:"address_2,omitempty"` + // The city of the sender identity. + City string `json:"city"` + // The state of the sender identity. + State *string `json:"state,omitempty"` + // The zipcode of the sender identity. + Zip *string `json:"zip,omitempty"` + // The country of the sender identity. + Country string `json:"country"` + // The unique identifier of the sender identity. + Id *int32 `json:"id,omitempty"` + // If the sender identity is verified or not. Only verified sender identities can be used to send email. + Verified *bool `json:"verified,omitempty"` + // The time the sender identity was last updated. + UpdatedAt *int32 `json:"updated_at,omitempty"` + // The time the sender identity was created. + CreatedAt *int32 `json:"created_at,omitempty"` + // True when the sender id is associated to a campaign in the Draft, Scheduled, or In Progress status. You cannot update or delete a locked sender identity. + Locked *bool `json:"locked,omitempty"` +} diff --git a/rest/api/v3/lmc_senders/model_sender_id_request.go b/rest/api/v3/lmc_senders/model_sender_id_request.go new file mode 100644 index 00000000..be2cf28a --- /dev/null +++ b/rest/api/v3/lmc_senders/model_sender_id_request.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SenderIdRequest struct for SenderIdRequest +type SenderIdRequest struct { + // A nickname for the sender identity. Not used for sending. + Nickname *string `json:"nickname,omitempty"` + From *SenderIdRequestFrom `json:"from,omitempty"` + ReplyTo *SenderIdRequestReplyTo `json:"reply_to,omitempty"` + // The physical address of the sender identity. + Address *string `json:"address,omitempty"` + // Additional sender identity address information. + Address2 *string `json:"address_2,omitempty"` + // The city of the sender identity. + City *string `json:"city,omitempty"` + // The state of the sender identity. + State *string `json:"state,omitempty"` + // The zipcode of the sender identity. + Zip *string `json:"zip,omitempty"` + // The country of the sender identity. + Country *string `json:"country,omitempty"` +} diff --git a/rest/api/v3/lmc_senders/model_sender_id_request_from.go b/rest/api/v3/lmc_senders/model_sender_id_request_from.go new file mode 100644 index 00000000..03edf7fe --- /dev/null +++ b/rest/api/v3/lmc_senders/model_sender_id_request_from.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SenderIdRequestFrom struct for SenderIdRequestFrom +type SenderIdRequestFrom struct { + // The email address from which your recipient will receive emails. + Email *string `json:"email,omitempty"` + // The name appended to the from email field. Typically your name or company name. + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/lmc_senders/model_sender_id_request_reply_to.go b/rest/api/v3/lmc_senders/model_sender_id_request_reply_to.go new file mode 100644 index 00000000..725356c0 --- /dev/null +++ b/rest/api/v3/lmc_senders/model_sender_id_request_reply_to.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Legacy Marketing Campaigns Sender Identities API +* The Twilio SendGrid Legacy Marketing Campaigns Sender Identites API allows you to manage the email addresses used to send your marketing email. This API is operational, but we recommend using the current version of Marketing Campaigns to manage your [senders](https://docs.sendgrid.com/api-reference/senders/). See [**Migrating from Legacy Marketing Campaigns**](https://docs.sendgrid.com/ui/sending-email/migrating-from-legacy-marketing-campaigns) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SenderIdRequestReplyTo struct for SenderIdRequestReplyTo +type SenderIdRequestReplyTo struct { + // The email address to which your recipient will reply. + Email *string `json:"email,omitempty"` + // The name appended to the reply to email field. Typically your name or company name. + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/mail/README.md b/rest/api/v3/mail/README.md new file mode 100644 index 00000000..4140add1 --- /dev/null +++ b/rest/api/v3/mail/README.md @@ -0,0 +1,85 @@ +# Go API client for + +The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:01.956960+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateMailBatch* | [**CreateMailBatch**](docs/CreateMailBatch.md#createmailbatch) | **Post** /v3/mail/batch | Create a batch ID. +*GetMailBatch* | [**GetMailBatch**](docs/GetMailBatch.md#getmailbatch) | **Get** /v3/mail/batch/{BatchId} | Validate a batch ID. +*SendMail* | [**SendMail**](docs/SendMail.md#sendmail) | **Post** /v3/mail/send | Send Email with Twilio SendGrid. + + +## Documentation For Models + + - [ContentEncoding](ContentEncoding.md) + - [Disposition](Disposition.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [MailBatchResponse](MailBatchResponse.md) + - [MailFrom](MailFrom.md) + - [MailTo](MailTo.md) + - [SendMailRequest](SendMailRequest.md) + - [SendMailRequestAsm](SendMailRequestAsm.md) + - [SendMailRequestAttachmentsInner](SendMailRequestAttachmentsInner.md) + - [SendMailRequestContentInner](SendMailRequestContentInner.md) + - [SendMailRequestMailSettings](SendMailRequestMailSettings.md) + - [SendMailRequestMailSettingsBypassBounceManagement](SendMailRequestMailSettingsBypassBounceManagement.md) + - [SendMailRequestMailSettingsBypassListManagement](SendMailRequestMailSettingsBypassListManagement.md) + - [SendMailRequestMailSettingsBypassSpamManagement](SendMailRequestMailSettingsBypassSpamManagement.md) + - [SendMailRequestMailSettingsBypassUnsubscribeManagement](SendMailRequestMailSettingsBypassUnsubscribeManagement.md) + - [SendMailRequestMailSettingsFooter](SendMailRequestMailSettingsFooter.md) + - [SendMailRequestMailSettingsSandboxMode](SendMailRequestMailSettingsSandboxMode.md) + - [SendMailRequestPersonalizationsInner](SendMailRequestPersonalizationsInner.md) + - [SendMailRequestTrackingSettings](SendMailRequestTrackingSettings.md) + - [SendMailRequestTrackingSettingsClickTracking](SendMailRequestTrackingSettingsClickTracking.md) + - [SendMailRequestTrackingSettingsGanalytics](SendMailRequestTrackingSettingsGanalytics.md) + - [SendMailRequestTrackingSettingsOpenTracking](SendMailRequestTrackingSettingsOpenTracking.md) + - [SendMailRequestTrackingSettingsSubscriptionTracking](SendMailRequestTrackingSettingsSubscriptionTracking.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/mail/api_create_mail_batch.go b/rest/api/v3/mail/api_create_mail_batch.go new file mode 100644 index 00000000..e832f8cb --- /dev/null +++ b/rest/api/v3/mail/api_create_mail_batch.go @@ -0,0 +1,107 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateMailBatchParam struct { + // Use the `on-behalf-of` header to make API calls for a particular Subuser through the parent account. You can use this header to automate bulk updates or to administer a Subuser without changing the authentication in your code. You will use the parent account's API key when using this header. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *CreateMailBatchParam) SetOnbehalfof(Onbehalfof string) *CreateMailBatchParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This operation allows you to generate a new mail batch ID.** Once a batch ID is created, you can associate it with a mail send by passing it in the request body of the [Mail Send operation](https://docs.sendgrid.com/api-reference/mail-send/mail-send). This makes it possible to group multiple requests to the Mail Send operation by assigning them the same batch ID. A batch ID that's associated with a mail send can be used to access and modify the associated send. For example, you can pause or cancel a send using its batch ID. See the [Scheduled Sends API](https://www.twilio.com/docs/sendgrid/api-reference/cancel-scheduled-sends) for more information about pausing and cancelling a mail send. +func (c *ApiService) CreateMailBatch(params *CreateMailBatchParam) (interface{}, error) { + path := "/v3/mail/batch" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &MailBatchResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 405 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mail/api_get_mail_batch.go b/rest/api/v3/mail/api_get_mail_batch.go new file mode 100644 index 00000000..26ce8e90 --- /dev/null +++ b/rest/api/v3/mail/api_get_mail_batch.go @@ -0,0 +1,99 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type GetMailBatchParam struct { + // Use the `on-behalf-of` header to make API calls for a particular Subuser through the parent account. You can use this header to automate bulk updates or to administer a Subuser without changing the authentication in your code. You will use the parent account's API key when using this header. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetMailBatchParam) SetOnbehalfof(Onbehalfof string) *GetMailBatchParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This operation allows you to validate a mail batch ID.** If you provide a valid batch ID, this operation will return a `200` status code and the batch ID itself. If you provide an invalid batch ID, you will receive a `400` level status code and an error message. A batch ID does not need to be assigned to a send to be considered valid. A successful response means only that the batch ID has been created, but it does not indicate that the ID has been assigned to a send. +func (c *ApiService) GetMailBatch(params *GetMailBatchParam) (interface{}, error) { + path := "/v3/mail/batch/{BatchId}" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &MailBatchResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 405 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mail/api_send_mail.go b/rest/api/v3/mail/api_send_mail.go new file mode 100644 index 00000000..e697d176 --- /dev/null +++ b/rest/api/v3/mail/api_send_mail.go @@ -0,0 +1,122 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type SendMailParam struct { + // Use this header when sending a gzip compressed mail body. Mail body compression is available to some high volume accounts. Submit a [request to support](https://support.sendgrid.com/hc/en-us) to have gzip enabled on your account. + ContentEncoding *ContentEncoding `json:"Content-Encoding,omitempty"` + // + SendMailRequest *SendMailRequest `json:"SendMailRequest,omitempty"` +} + +func (params *SendMailParam) SetContentEncoding(ContentEncoding ContentEncoding) *SendMailParam { + params.ContentEncoding = &ContentEncoding + return params +} +func (params *SendMailParam) SetSendMailRequest(SendMailRequest SendMailRequest) *SendMailParam { + params.SendMailRequest = &SendMailRequest + return params +} + +// *The Mail Send operation allows you to send email over SendGrid's v3 Web API* For an overview of this API, including its features and limitations, please see the [Mail Send API overview page](https://www.twilio.com/docs/sendgrid/api-reference/mail-send) The overview page also includes links to SendGrid's Email API quickstarts and helper libraries to get you working with this endpoint even faster. +func (c *ApiService) SendMail(params *SendMailParam) (interface{}, error) { + path := "/v3/mail/send" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SendMailRequest != nil { + b, err := json.Marshal(*params.SendMailRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.ContentEncoding != nil { + headers["Content-Encoding"] = *params.ContentEncoding + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 405 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 413 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mail/api_service.go b/rest/api/v3/mail/api_service.go new file mode 100644 index 00000000..0ca11aea --- /dev/null +++ b/rest/api/v3/mail/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/mail/docs/ContentEncoding.md b/rest/api/v3/mail/docs/ContentEncoding.md new file mode 100644 index 00000000..d7abc43b --- /dev/null +++ b/rest/api/v3/mail/docs/ContentEncoding.md @@ -0,0 +1,12 @@ +# ContentEncoding + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**GZIP** | string | (value: `"gzip"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/CreateMailBatch.md b/rest/api/v3/mail/docs/CreateMailBatch.md new file mode 100644 index 00000000..f1daaa8b --- /dev/null +++ b/rest/api/v3/mail/docs/CreateMailBatch.md @@ -0,0 +1,48 @@ +# CreateMailBatch + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateMailBatch**](CreateMailBatch.md#CreateMailBatch) | **Post** /v3/mail/batch | Create a batch ID. + + + +## CreateMailBatch + +> MailBatchResponse CreateMailBatch(ctx, optional) + +Create a batch ID. + +**This operation allows you to generate a new mail batch ID.** Once a batch ID is created, you can associate it with a mail send by passing it in the request body of the [Mail Send operation](https://docs.sendgrid.com/api-reference/mail-send/mail-send). This makes it possible to group multiple requests to the Mail Send operation by assigning them the same batch ID. A batch ID that's associated with a mail send can be used to access and modify the associated send. For example, you can pause or cancel a send using its batch ID. See the [Scheduled Sends API](https://www.twilio.com/docs/sendgrid/api-reference/cancel-scheduled-sends) for more information about pausing and cancelling a mail send. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateMailBatchParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | Use the `on-behalf-of` header to make API calls for a particular Subuser through the parent account. You can use this header to automate bulk updates or to administer a Subuser without changing the authentication in your code. You will use the parent account's API key when using this header. + +### Return type + +[**MailBatchResponse**](MailBatchResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail/docs/Disposition.md b/rest/api/v3/mail/docs/Disposition.md new file mode 100644 index 00000000..6240774b --- /dev/null +++ b/rest/api/v3/mail/docs/Disposition.md @@ -0,0 +1,13 @@ +# Disposition + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**INLINE** | string | (value: `"inline"`) +**ATTACHMENT** | string | (value: `"attachment"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/ErrorResponse.md b/rest/api/v3/mail/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/mail/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/ErrorResponseErrorsInner.md b/rest/api/v3/mail/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/mail/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/GetMailBatch.md b/rest/api/v3/mail/docs/GetMailBatch.md new file mode 100644 index 00000000..2257a3fc --- /dev/null +++ b/rest/api/v3/mail/docs/GetMailBatch.md @@ -0,0 +1,48 @@ +# GetMailBatch + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetMailBatch**](GetMailBatch.md#GetMailBatch) | **Get** /v3/mail/batch/{BatchId} | Validate a batch ID. + + + +## GetMailBatch + +> MailBatchResponse GetMailBatch(ctx, optional) + +Validate a batch ID. + +**This operation allows you to validate a mail batch ID.** If you provide a valid batch ID, this operation will return a `200` status code and the batch ID itself. If you provide an invalid batch ID, you will receive a `400` level status code and an error message. A batch ID does not need to be assigned to a send to be considered valid. A successful response means only that the batch ID has been created, but it does not indicate that the ID has been assigned to a send. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a GetMailBatchParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | Use the `on-behalf-of` header to make API calls for a particular Subuser through the parent account. You can use this header to automate bulk updates or to administer a Subuser without changing the authentication in your code. You will use the parent account's API key when using this header. + +### Return type + +[**MailBatchResponse**](MailBatchResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail/docs/MailBatchResponse.md b/rest/api/v3/mail/docs/MailBatchResponse.md new file mode 100644 index 00000000..8103caed --- /dev/null +++ b/rest/api/v3/mail/docs/MailBatchResponse.md @@ -0,0 +1,11 @@ +# MailBatchResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BatchId** | **string** | A mail batch ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/MailFrom.md b/rest/api/v3/mail/docs/MailFrom.md new file mode 100644 index 00000000..3f3d4873 --- /dev/null +++ b/rest/api/v3/mail/docs/MailFrom.md @@ -0,0 +1,12 @@ +# MailFrom + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address from which messages are sent. This address should be a verified sender in your Twilio SendGrid account. Email addresses specified in `personalizations` will override addresses set at the message level outside of the `personalizations` object. | +**Name** | **string** | A name or title associated with the email address such as \"Support\" or \"Alex\". |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/MailTo.md b/rest/api/v3/mail/docs/MailTo.md new file mode 100644 index 00000000..70935e77 --- /dev/null +++ b/rest/api/v3/mail/docs/MailTo.md @@ -0,0 +1,12 @@ +# MailTo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | An email address to which a message is sent. Email addresses specified in `personalizations` will override addresses set at the message level outside of the `personalizations` object. | +**Name** | **string** | A name or title associated with the email address such as \"Alex\". |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMail.md b/rest/api/v3/mail/docs/SendMail.md new file mode 100644 index 00000000..450ee26d --- /dev/null +++ b/rest/api/v3/mail/docs/SendMail.md @@ -0,0 +1,49 @@ +# SendMail + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SendMail**](SendMail.md#SendMail) | **Post** /v3/mail/send | Send Email with Twilio SendGrid. + + + +## SendMail + +> SendMail(ctx, optional) + +Send Email with Twilio SendGrid. + +*The Mail Send operation allows you to send email over SendGrid's v3 Web API* For an overview of this API, including its features and limitations, please see the [Mail Send API overview page](https://www.twilio.com/docs/sendgrid/api-reference/mail-send) The overview page also includes links to SendGrid's Email API quickstarts and helper libraries to get you working with this endpoint even faster. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a SendMailParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**ContentEncoding** | [**ContentEncoding**](ContentEncodingContentEncoding.md) | Use this header when sending a gzip compressed mail body. Mail body compression is available to some high volume accounts. Submit a [request to support](https://support.sendgrid.com/hc/en-us) to have gzip enabled on your account. +**SendMailRequest** | [**SendMailRequest**](SendMailRequest.md) | + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail/docs/SendMailRequest.md b/rest/api/v3/mail/docs/SendMailRequest.md new file mode 100644 index 00000000..0bebde09 --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequest.md @@ -0,0 +1,27 @@ +# SendMailRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Personalizations** | [**[]SendMailRequestPersonalizationsInner**](SendMailRequestPersonalizationsInner.md) | An array of messages and their metadata. Each object within the `personalizations` array can be thought of as a mail envelope—it defines who should receive an individual message and how that message should be handled. See [**Personalizations**](https://sendgrid.com/docs/for-developers/sending-email/personalizations/) for more information. | +**From** | [**MailFrom**](MailFrom.md) | | +**ReplyTo** | [**MailTo**](MailTo.md) | |[optional] +**ReplyToList** | [**[]MailTo**](MailTo.md) | An array of recipients to whom replies will be sent. Each object in this array must contain a recipient's email address. Each object in the array may optionally contain a recipient's name. You can use either the `reply_to` property or `reply_to_list` property but not both. |[optional] +**Subject** | **string** | The global or _message level_ subject of your email. Subject lines set in personalizations objects will override this global subject line. See line length limits specified in [RFC 2822](https://www.rfc-editor.org/rfc/rfc2822#section-2.1.1) for guidance on subject line character limits. |[optional] +**Content** | [**[]SendMailRequestContentInner**](SendMailRequestContentInner.md) | An array of objects, each containing a message body's content and [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types). You must specify at least one MIME type and may include multiple. To include more than one MIME type, add an object for each type to the array. |[optional] +**Attachments** | [**[]SendMailRequestAttachmentsInner**](SendMailRequestAttachmentsInner.md) | An array of objects where you can define any attachments to be included with the message. Each object contains a `content` property, which must be a Base64 encoded string of the attachment itself, and `type`, `filename`, `disposition`, and `content_id` properties that tell SendGrid how to handle the attachment. |[optional] +**TemplateId** | **string** | An email template ID. A template that contains a subject and content—either text or html—will override any subject and content values specified at the `personalizations` or message level. If a template ID begins with `d-`, it is a dynamic template and will work with the `dynamic_template_data` property. If the template ID does not begin with `d-`, it is a standard SendGrid template and will work with the `substitutions` property. See [**How to Send an Email with Dynamic Templates**](https://docs.sendgrid.com/ui/sending-email/how-to-send-an-email-with-dynamic-templates) for more information about working with templates. |[optional] +**Headers** | **map[string]interface{}** | A collection of JSON property name and property value pairs allowing you to specify handling instructions for your email. You may not override the following headers: `x-sg-id`, `x-sg-eid`, `received`, `dkim-signature`, `Content-Type`, `Content-Transfer-Encoding`, `To`, `From`, `Subject`, `Reply-To`, `CC`, `BCC`. |[optional] +**Categories** | **[]string** | An array of category names assigned to this message. Categories allow you to group messages by categories you define. Categories should be used sparingly to create general groups that are relevant to you. Categories are not meant to be used to track individual mail sends. For more granular categorization and tracking, use the `custom_args` property. A category name cannot exceed 255 characters. See [**Working with Categories**](https://docs.sendgrid.com/for-developers/sending-email/categories) for more information. |[optional] +**CustomArgs** | **string** | Values that are specific to the entire send that will be carried along with the email and its activity data. Substitutions will not be made on custom arguments, so any string that is assigned to this property will be assumed to be the custom argument that you would like to be used. This parameter is overridden by `custom_args` set at the personalizations level. Total `custom_args` size may not exceed 10,000 bytes. |[optional] +**SendAt** | **int32** | A [unix timestamp](https://en.wikipedia.org/wiki/Unix_time) allowing you to specify when your email should be sent. A send cannot be scheduled more than 72 hours in advance. This property may be overridden by the `send_at` property set at the personalizations level. |[optional] +**BatchId** | **string** | An ID representing a batch of emails to be sent at the same time. Including a `batch_id` in your request allows you to include this email in that batch. It also enables you to cancel or pause the delivery of that batch. See the [Scheduled Sends API](https://sendgrid.com/docs/api-reference/) for more information about scheduling your email. |[optional] +**Asm** | [**SendMailRequestAsm**](SendMailRequestAsm.md) | |[optional] +**IpPoolName** | **string** | The IP Pool that you would like to send this email from. IP Pools allow you to group your dedicated Twilio SendGrid IP addresses in order to have more control over your deliverability. See [**IP Pools**](https://docs.sendgrid.com/ui/account-and-settings/ip-pools) for more information. |[optional] +**MailSettings** | [**SendMailRequestMailSettings**](SendMailRequestMailSettings.md) | |[optional] +**TrackingSettings** | [**SendMailRequestTrackingSettings**](SendMailRequestTrackingSettings.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestAsm.md b/rest/api/v3/mail/docs/SendMailRequestAsm.md new file mode 100644 index 00000000..b8759b63 --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestAsm.md @@ -0,0 +1,12 @@ +# SendMailRequestAsm + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**GroupId** | **int32** | The unsubscribe group to associate with this email. See the [Suppressions API](https://docs.sendgrid.com/api-reference/suppressions/) to manage unsubscribe group IDs. | +**GroupsToDisplay** | **[]int32** | An array containing the unsubscribe groups that you would like to be displayed to a recipient on the unsubscribe preferences page. This page is displayed in the recipient's browser when they click the unsubscribe link in your message. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestAttachmentsInner.md b/rest/api/v3/mail/docs/SendMailRequestAttachmentsInner.md new file mode 100644 index 00000000..a58a0d58 --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestAttachmentsInner.md @@ -0,0 +1,15 @@ +# SendMailRequestAttachmentsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Content** | **string** | The Base64 encoded content of the attachment. | +**Type** | **string** | The MIME type of the content you are attaching (e.g., `image/jpeg` or `application/pdf`). |[optional] +**Filename** | **string** | The attachment's filename, including the file extension. | +**Disposition** | [**Disposition**](Disposition.md) | The attachment's content-disposition specifies how you would like the attachment to be displayed. For example, `inline` results in the attached file being displayed automatically within the message while `attachment` results in the attached file requiring some action to be taken before it is displayed such as opening or downloading the file. |[optional] +**ContentId** | **string** | The attachment's content ID. The `content_id` is used when the `disposition` is set to `inline` and the attachment is an image, allowing the file to be displayed within the body of the email. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestContentInner.md b/rest/api/v3/mail/docs/SendMailRequestContentInner.md new file mode 100644 index 00000000..43c2ae52 --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestContentInner.md @@ -0,0 +1,12 @@ +# SendMailRequestContentInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | The MIME type of the content assigned in the `value` property of this object (e.g., `text/plain` or `text/html`). | +**Value** | **string** | The content of your message in the specified MIME type assigned in the `type` property of this object. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestMailSettings.md b/rest/api/v3/mail/docs/SendMailRequestMailSettings.md new file mode 100644 index 00000000..c78c164d --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestMailSettings.md @@ -0,0 +1,16 @@ +# SendMailRequestMailSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BypassListManagement** | [**SendMailRequestMailSettingsBypassListManagement**](SendMailRequestMailSettingsBypassListManagement.md) | |[optional] +**BypassSpamManagement** | [**SendMailRequestMailSettingsBypassSpamManagement**](SendMailRequestMailSettingsBypassSpamManagement.md) | |[optional] +**BypassBounceManagement** | [**SendMailRequestMailSettingsBypassBounceManagement**](SendMailRequestMailSettingsBypassBounceManagement.md) | |[optional] +**BypassUnsubscribeManagement** | [**SendMailRequestMailSettingsBypassUnsubscribeManagement**](SendMailRequestMailSettingsBypassUnsubscribeManagement.md) | |[optional] +**Footer** | [**SendMailRequestMailSettingsFooter**](SendMailRequestMailSettingsFooter.md) | |[optional] +**SandboxMode** | [**SendMailRequestMailSettingsSandboxMode**](SendMailRequestMailSettingsSandboxMode.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassBounceManagement.md b/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassBounceManagement.md new file mode 100644 index 00000000..56893dd4 --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassBounceManagement.md @@ -0,0 +1,11 @@ +# SendMailRequestMailSettingsBypassBounceManagement + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enable** | **bool** | Indicates if this setting is enabled. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassListManagement.md b/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassListManagement.md new file mode 100644 index 00000000..fa9c2c7f --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassListManagement.md @@ -0,0 +1,11 @@ +# SendMailRequestMailSettingsBypassListManagement + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enable** | **bool** | Indicates if this setting is enabled. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassSpamManagement.md b/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassSpamManagement.md new file mode 100644 index 00000000..a64754af --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassSpamManagement.md @@ -0,0 +1,11 @@ +# SendMailRequestMailSettingsBypassSpamManagement + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enable** | **bool** | Indicates if this setting is enabled. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassUnsubscribeManagement.md b/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassUnsubscribeManagement.md new file mode 100644 index 00000000..0ba329fe --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestMailSettingsBypassUnsubscribeManagement.md @@ -0,0 +1,11 @@ +# SendMailRequestMailSettingsBypassUnsubscribeManagement + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enable** | **bool** | Indicates if this setting is enabled. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestMailSettingsFooter.md b/rest/api/v3/mail/docs/SendMailRequestMailSettingsFooter.md new file mode 100644 index 00000000..423727ed --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestMailSettingsFooter.md @@ -0,0 +1,13 @@ +# SendMailRequestMailSettingsFooter + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enable** | **bool** | Indicates if this setting is enabled. |[optional] +**Text** | **string** | The plain text content of your footer. |[optional] +**Html** | **string** | The HTML content of your footer. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestMailSettingsSandboxMode.md b/rest/api/v3/mail/docs/SendMailRequestMailSettingsSandboxMode.md new file mode 100644 index 00000000..f23907e5 --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestMailSettingsSandboxMode.md @@ -0,0 +1,11 @@ +# SendMailRequestMailSettingsSandboxMode + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enable** | **bool** | Indicates if this setting is enabled. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestPersonalizationsInner.md b/rest/api/v3/mail/docs/SendMailRequestPersonalizationsInner.md new file mode 100644 index 00000000..f89200e5 --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestPersonalizationsInner.md @@ -0,0 +1,20 @@ +# SendMailRequestPersonalizationsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**From** | [**MailFrom**](MailFrom.md) | |[optional] +**To** | [**[]MailTo**](MailTo.md) | An array of recipients to whom the email will be sent. Each object in this array must contain a recipient's email address. Each object in the array may optionally contain a recipient's name. | +**Cc** | [**[]MailTo**](MailTo.md) | An array of recipients to whom a copy of the email will be sent. Each object in this array must contain a recipient's email address. Each object in the array may optionally contain a recipient's name. |[optional] +**Bcc** | [**[]MailTo**](MailTo.md) | An array of recipients to whom a blind carbon copy of your email will be sent. Each object in this array must contain a recipient's email address. Each object in the array may optionally contain a recipient's name. |[optional] +**Subject** | **string** | The subject of your email. See line length limits specified in [RFC 2822](https://www.rfc-editor.org/rfc/rfc2822#section-2.1.1) for guidance on subject line character limits. |[optional] +**Headers** | **map[string]interface{}** | A collection of JSON property name and property value pairs allowing you to specify handling instructions for your email. You may not override the following headers: `x-sg-id`, `x-sg-eid`, `received`, `dkim-signature`, `Content-Type`, `Content-Transfer-Encoding`, `To`, `From`, `Subject`, `Reply-To`, `CC`, `BCC`. |[optional] +**Substitutions** | **map[string]string** | A collection property names that will be substituted by their corresponding property values in the `subject`, `reply-to` and `content` portions of your message. Name and value pairs follow the pattern `\"substitution_tag\":\"value to substitute\"`. The total collective size of your substitutions may not exceed 10,000 bytes per personalization object. Substitutions allow you to insert data without using SendGrid's Dynamic Templates. This property should not be used in combination with a Dynamic Template, which can be identified by a `template_id` starting with `d-`. See [**Substitution Tags**](https://docs.sendgrid.com/for-developers/sending-email/substitution-tags) for more information. |[optional] +**DynamicTemplateData** | **map[string]interface{}** | A collection property names that will be substituted by their corresponding property values in the `subject`, `reply-to` and `content` portions of a SendGrid Dynamic Template. Dynamic template data is available in a template using [Handlebars](https://docs.sendgrid.com/for-developers/sending-email/using-handlebars) syntax. This property should be used in combination with a Dynamic Template, which can be identified by a `template_id` starting with `d-`. See [**How to Send an Email with Dynamic Templates**](https://docs.sendgrid.com/ui/sending-email/how-to-send-an-email-with-dynamic-templates) for more information. |[optional] +**CustomArgs** | **map[string]interface{}** | Values that are specific to this personalization that will be carried along with the email and its activity data. Substitutions will not be made on custom arguments, so any string that is assigned to this property will be assumed to be the custom argument that you would like to be used. This field may not exceed 10,000 bytes. |[optional] +**SendAt** | **int32** | A [unix timestamp](https://en.wikipedia.org/wiki/Unix_time) allowing you to specify when your email should be sent. A send cannot be scheduled more than 72 hours in advance. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestTrackingSettings.md b/rest/api/v3/mail/docs/SendMailRequestTrackingSettings.md new file mode 100644 index 00000000..f932f68f --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestTrackingSettings.md @@ -0,0 +1,14 @@ +# SendMailRequestTrackingSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ClickTracking** | [**SendMailRequestTrackingSettingsClickTracking**](SendMailRequestTrackingSettingsClickTracking.md) | |[optional] +**OpenTracking** | [**SendMailRequestTrackingSettingsOpenTracking**](SendMailRequestTrackingSettingsOpenTracking.md) | |[optional] +**SubscriptionTracking** | [**SendMailRequestTrackingSettingsSubscriptionTracking**](SendMailRequestTrackingSettingsSubscriptionTracking.md) | |[optional] +**Ganalytics** | [**SendMailRequestTrackingSettingsGanalytics**](SendMailRequestTrackingSettingsGanalytics.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsClickTracking.md b/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsClickTracking.md new file mode 100644 index 00000000..ddcd5c9c --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsClickTracking.md @@ -0,0 +1,12 @@ +# SendMailRequestTrackingSettingsClickTracking + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enable** | **bool** | Indicates if this setting is enabled. |[optional] +**EnableText** | **bool** | Indicates if this setting should be included in the `text/plain` portion of your email. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsGanalytics.md b/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsGanalytics.md new file mode 100644 index 00000000..48a45e0f --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsGanalytics.md @@ -0,0 +1,16 @@ +# SendMailRequestTrackingSettingsGanalytics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enable** | **bool** | Indicates if this setting is enabled. |[optional] +**UtmSource** | **string** | Name of the referrer source. (e.g., Google, SomeDomain.com, or Marketing Email) |[optional] +**UtmMedium** | **string** | Name of the marketing medium. (e.g., Email) |[optional] +**UtmTerm** | **string** | Used to identify any paid keywords. |[optional] +**UtmContent** | **string** | Used to differentiate your campaign from advertisements. |[optional] +**UtmCampaign** | **string** | The name of the campaign. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsOpenTracking.md b/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsOpenTracking.md new file mode 100644 index 00000000..79ee6662 --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsOpenTracking.md @@ -0,0 +1,12 @@ +# SendMailRequestTrackingSettingsOpenTracking + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enable** | **bool** | Indicates if this setting is enabled. |[optional] +**SubstitutionTag** | **string** | Allows you to specify a substitution tag that you can insert in the body of your email at a location that you desire. This tag will be replaced by the open tracking pixel. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsSubscriptionTracking.md b/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsSubscriptionTracking.md new file mode 100644 index 00000000..f4bb0483 --- /dev/null +++ b/rest/api/v3/mail/docs/SendMailRequestTrackingSettingsSubscriptionTracking.md @@ -0,0 +1,14 @@ +# SendMailRequestTrackingSettingsSubscriptionTracking + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enable** | **bool** | Indicates if this setting is enabled. |[optional] +**Text** | **string** | Text to be appended to the email with the subscription tracking link. |[optional] +**Html** | **string** | HTML to be appended to the email with the subscription tracking link. |[optional] +**SubstitutionTag** | **string** | A tag that will be replaced with the unsubscribe URL. If this property is used, it will override both the `text` and `html` properties. The URL of the link will be placed at the substitution tag's location in the message body with no additional formatting. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail/model_content_encoding.go b/rest/api/v3/mail/model_content_encoding.go new file mode 100644 index 00000000..5f356d2c --- /dev/null +++ b/rest/api/v3/mail/model_content_encoding.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContentEncoding the model 'ContentEncoding' +type ContentEncoding string + +// List of ContentEncoding +const ( + CONTENTENCODING_GZIP ContentEncoding = "gzip" +) diff --git a/rest/api/v3/mail/model_disposition.go b/rest/api/v3/mail/model_disposition.go new file mode 100644 index 00000000..ca013977 --- /dev/null +++ b/rest/api/v3/mail/model_disposition.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Disposition the model 'Disposition' +type Disposition string + +// List of Disposition +const ( + DISPOSITION_INLINE Disposition = "inline" + DISPOSITION_ATTACHMENT Disposition = "attachment" +) diff --git a/rest/api/v3/mail/model_error_response.go b/rest/api/v3/mail/model_error_response.go new file mode 100644 index 00000000..e74c4c35 --- /dev/null +++ b/rest/api/v3/mail/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/mail/model_error_response_errors_inner.go b/rest/api/v3/mail/model_error_response_errors_inner.go new file mode 100644 index 00000000..d73b63c2 --- /dev/null +++ b/rest/api/v3/mail/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/mail/model_mail_batch_response.go b/rest/api/v3/mail/model_mail_batch_response.go new file mode 100644 index 00000000..5c4311c1 --- /dev/null +++ b/rest/api/v3/mail/model_mail_batch_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// MailBatchResponse struct for MailBatchResponse +type MailBatchResponse struct { + // A mail batch ID. + BatchId *string `json:"batch_id,omitempty"` +} diff --git a/rest/api/v3/mail/model_mail_from.go b/rest/api/v3/mail/model_mail_from.go new file mode 100644 index 00000000..e055fe14 --- /dev/null +++ b/rest/api/v3/mail/model_mail_from.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// MailFrom struct for MailFrom +type MailFrom struct { + // The email address from which messages are sent. This address should be a verified sender in your Twilio SendGrid account. Email addresses specified in `personalizations` will override addresses set at the message level outside of the `personalizations` object. + Email string `json:"email"` + // A name or title associated with the email address such as \"Support\" or \"Alex\". + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/mail/model_mail_to.go b/rest/api/v3/mail/model_mail_to.go new file mode 100644 index 00000000..e0b3d749 --- /dev/null +++ b/rest/api/v3/mail/model_mail_to.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// MailTo struct for MailTo +type MailTo struct { + // An email address to which a message is sent. Email addresses specified in `personalizations` will override addresses set at the message level outside of the `personalizations` object. + Email string `json:"email"` + // A name or title associated with the email address such as \"Alex\". + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request.go b/rest/api/v3/mail/model_send_mail_request.go new file mode 100644 index 00000000..224118e1 --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request.go @@ -0,0 +1,47 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequest struct for SendMailRequest +type SendMailRequest struct { + // An array of messages and their metadata. Each object within the `personalizations` array can be thought of as a mail envelope—it defines who should receive an individual message and how that message should be handled. See [**Personalizations**](https://sendgrid.com/docs/for-developers/sending-email/personalizations/) for more information. + Personalizations []SendMailRequestPersonalizationsInner `json:"personalizations"` + From MailFrom `json:"from"` + ReplyTo *MailTo `json:"reply_to,omitempty"` + // An array of recipients to whom replies will be sent. Each object in this array must contain a recipient's email address. Each object in the array may optionally contain a recipient's name. You can use either the `reply_to` property or `reply_to_list` property but not both. + ReplyToList *[]MailTo `json:"reply_to_list,omitempty"` + // The global or _message level_ subject of your email. Subject lines set in personalizations objects will override this global subject line. See line length limits specified in [RFC 2822](https://www.rfc-editor.org/rfc/rfc2822#section-2.1.1) for guidance on subject line character limits. + Subject *string `json:"subject,omitempty"` + // An array of objects, each containing a message body's content and [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types). You must specify at least one MIME type and may include multiple. To include more than one MIME type, add an object for each type to the array. + Content *[]SendMailRequestContentInner `json:"content,omitempty"` + // An array of objects where you can define any attachments to be included with the message. Each object contains a `content` property, which must be a Base64 encoded string of the attachment itself, and `type`, `filename`, `disposition`, and `content_id` properties that tell SendGrid how to handle the attachment. + Attachments *[]SendMailRequestAttachmentsInner `json:"attachments,omitempty"` + // An email template ID. A template that contains a subject and content—either text or html—will override any subject and content values specified at the `personalizations` or message level. If a template ID begins with `d-`, it is a dynamic template and will work with the `dynamic_template_data` property. If the template ID does not begin with `d-`, it is a standard SendGrid template and will work with the `substitutions` property. See [**How to Send an Email with Dynamic Templates**](https://docs.sendgrid.com/ui/sending-email/how-to-send-an-email-with-dynamic-templates) for more information about working with templates. + TemplateId *string `json:"template_id,omitempty"` + // A collection of JSON property name and property value pairs allowing you to specify handling instructions for your email. You may not override the following headers: `x-sg-id`, `x-sg-eid`, `received`, `dkim-signature`, `Content-Type`, `Content-Transfer-Encoding`, `To`, `From`, `Subject`, `Reply-To`, `CC`, `BCC`. + Headers *map[string]interface{} `json:"headers,omitempty"` + // An array of category names assigned to this message. Categories allow you to group messages by categories you define. Categories should be used sparingly to create general groups that are relevant to you. Categories are not meant to be used to track individual mail sends. For more granular categorization and tracking, use the `custom_args` property. A category name cannot exceed 255 characters. See [**Working with Categories**](https://docs.sendgrid.com/for-developers/sending-email/categories) for more information. + Categories *[]string `json:"categories,omitempty"` + // Values that are specific to the entire send that will be carried along with the email and its activity data. Substitutions will not be made on custom arguments, so any string that is assigned to this property will be assumed to be the custom argument that you would like to be used. This parameter is overridden by `custom_args` set at the personalizations level. Total `custom_args` size may not exceed 10,000 bytes. + CustomArgs *string `json:"custom_args,omitempty"` + // A [unix timestamp](https://en.wikipedia.org/wiki/Unix_time) allowing you to specify when your email should be sent. A send cannot be scheduled more than 72 hours in advance. This property may be overridden by the `send_at` property set at the personalizations level. + SendAt *int32 `json:"send_at,omitempty"` + // An ID representing a batch of emails to be sent at the same time. Including a `batch_id` in your request allows you to include this email in that batch. It also enables you to cancel or pause the delivery of that batch. See the [Scheduled Sends API](https://sendgrid.com/docs/api-reference/) for more information about scheduling your email. + BatchId *string `json:"batch_id,omitempty"` + Asm *SendMailRequestAsm `json:"asm,omitempty"` + // The IP Pool that you would like to send this email from. IP Pools allow you to group your dedicated Twilio SendGrid IP addresses in order to have more control over your deliverability. See [**IP Pools**](https://docs.sendgrid.com/ui/account-and-settings/ip-pools) for more information. + IpPoolName *string `json:"ip_pool_name,omitempty"` + MailSettings *SendMailRequestMailSettings `json:"mail_settings,omitempty"` + TrackingSettings *SendMailRequestTrackingSettings `json:"tracking_settings,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_asm.go b/rest/api/v3/mail/model_send_mail_request_asm.go new file mode 100644 index 00000000..7d2afe19 --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_asm.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestAsm An object allowing you to specify how to handle unsubscribes. With SendGrid, an unsubscribe is the action an email recipient takes when they opt-out of receiving your messages. A suppression is the action you take as a sender to filter or suppress an unsubscribed address from your email send. From the perspective of the recipient, your suppression is the result of their unsubscribe. See [**Suppression Groups**](https://www.twilio.com/docs/sendgrid/api-reference/suppressions-unsubscribe-groups/create-a-new-suppression-group) for more information. +type SendMailRequestAsm struct { + // The unsubscribe group to associate with this email. See the [Suppressions API](https://docs.sendgrid.com/api-reference/suppressions/) to manage unsubscribe group IDs. + GroupId int32 `json:"group_id"` + // An array containing the unsubscribe groups that you would like to be displayed to a recipient on the unsubscribe preferences page. This page is displayed in the recipient's browser when they click the unsubscribe link in your message. + GroupsToDisplay *[]int32 `json:"groups_to_display,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_attachments_inner.go b/rest/api/v3/mail/model_send_mail_request_attachments_inner.go new file mode 100644 index 00000000..9c39ef33 --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_attachments_inner.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestAttachmentsInner struct for SendMailRequestAttachmentsInner +type SendMailRequestAttachmentsInner struct { + // The Base64 encoded content of the attachment. + Content string `json:"content"` + // The MIME type of the content you are attaching (e.g., `image/jpeg` or `application/pdf`). + Type *string `json:"type,omitempty"` + // The attachment's filename, including the file extension. + Filename string `json:"filename"` + // The attachment's content-disposition specifies how you would like the attachment to be displayed. For example, `inline` results in the attached file being displayed automatically within the message while `attachment` results in the attached file requiring some action to be taken before it is displayed such as opening or downloading the file. + Disposition *Disposition `json:"disposition,omitempty"` + // The attachment's content ID. The `content_id` is used when the `disposition` is set to `inline` and the attachment is an image, allowing the file to be displayed within the body of the email. + ContentId *string `json:"content_id,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_content_inner.go b/rest/api/v3/mail/model_send_mail_request_content_inner.go new file mode 100644 index 00000000..e5377596 --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_content_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestContentInner struct for SendMailRequestContentInner +type SendMailRequestContentInner struct { + // The MIME type of the content assigned in the `value` property of this object (e.g., `text/plain` or `text/html`). + Type string `json:"type"` + // The content of your message in the specified MIME type assigned in the `type` property of this object. + Value string `json:"value"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_mail_settings.go b/rest/api/v3/mail/model_send_mail_request_mail_settings.go new file mode 100644 index 00000000..b1ecabc9 --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_mail_settings.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestMailSettings A collection of different mail settings that you can use to specify how you would like this email to be handled. Mail settings provide extra functionality to your mail send. See [**Mail Settings**](https://docs.sendgrid.com/ui/account-and-settings/mail) for more information. +type SendMailRequestMailSettings struct { + BypassListManagement *SendMailRequestMailSettingsBypassListManagement `json:"bypass_list_management,omitempty"` + BypassSpamManagement *SendMailRequestMailSettingsBypassSpamManagement `json:"bypass_spam_management,omitempty"` + BypassBounceManagement *SendMailRequestMailSettingsBypassBounceManagement `json:"bypass_bounce_management,omitempty"` + BypassUnsubscribeManagement *SendMailRequestMailSettingsBypassUnsubscribeManagement `json:"bypass_unsubscribe_management,omitempty"` + Footer *SendMailRequestMailSettingsFooter `json:"footer,omitempty"` + SandboxMode *SendMailRequestMailSettingsSandboxMode `json:"sandbox_mode,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_bounce_management.go b/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_bounce_management.go new file mode 100644 index 00000000..7eb6b77e --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_bounce_management.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestMailSettingsBypassBounceManagement Allows you to bypass the bounce list to ensure that the email is delivered to recipients. Spam report and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the `bypass_list_management` filter. See the [the \"Bypass suppressions\" section of our **Suppressions Overview**](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters. +type SendMailRequestMailSettingsBypassBounceManagement struct { + // Indicates if this setting is enabled. + Enable *bool `json:"enable,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_list_management.go b/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_list_management.go new file mode 100644 index 00000000..c838c86b --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_list_management.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestMailSettingsBypassListManagement Allows you to bypass all unsubscribe groups and suppressions to ensure that the email is delivered to every single recipient. This should only be used in emergencies when it is absolutely necessary that every recipient receives your email. This filter cannot be combined with any other bypass filters. See the [the \"Bypass suppressions\" section of our **Suppressions Overview**](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters. +type SendMailRequestMailSettingsBypassListManagement struct { + // Indicates if this setting is enabled. + Enable *bool `json:"enable,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_spam_management.go b/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_spam_management.go new file mode 100644 index 00000000..0a81e09a --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_spam_management.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestMailSettingsBypassSpamManagement Allows you to bypass the spam report list to ensure that the email is delivered to recipients. Bounce and unsubscribe lists will still be checked; addresses on these other lists will not receive the message. This filter cannot be combined with the `bypass_list_management` filter. See the [the \"Bypass suppressions\" section of our **Suppressions Overview**](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters. +type SendMailRequestMailSettingsBypassSpamManagement struct { + // Indicates if this setting is enabled. + Enable *bool `json:"enable,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_unsubscribe_management.go b/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_unsubscribe_management.go new file mode 100644 index 00000000..b4990d41 --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_mail_settings_bypass_unsubscribe_management.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestMailSettingsBypassUnsubscribeManagement Allows you to bypass the global unsubscribe list to ensure that the email is delivered to recipients. Bounce and spam report lists will still be checked; addresses on these other lists will not receive the message. This filter applies only to global unsubscribes and will not bypass group unsubscribes. This filter cannot be combined with the `bypass_list_management` filter. See the [the \"Bypass suppressions\" section of our **Suppressions Overview**](https://sendgrid.com/docs/ui/sending-email/index-suppressions/#bypass-suppressions) for more about bypass filters. +type SendMailRequestMailSettingsBypassUnsubscribeManagement struct { + // Indicates if this setting is enabled. + Enable *bool `json:"enable,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_mail_settings_footer.go b/rest/api/v3/mail/model_send_mail_request_mail_settings_footer.go new file mode 100644 index 00000000..b0fa2858 --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_mail_settings_footer.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestMailSettingsFooter Inserts a custom footer at the bottom of the text and HTML bodies of your messages. Use the `html` and `text` properties to include the content of the footers to be inserted. +type SendMailRequestMailSettingsFooter struct { + // Indicates if this setting is enabled. + Enable *bool `json:"enable,omitempty"` + // The plain text content of your footer. + Text *string `json:"text,omitempty"` + // The HTML content of your footer. + Html *string `json:"html,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_mail_settings_sandbox_mode.go b/rest/api/v3/mail/model_send_mail_request_mail_settings_sandbox_mode.go new file mode 100644 index 00000000..f69f6280 --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_mail_settings_sandbox_mode.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestMailSettingsSandboxMode Sandbox Mode allows you to send a test email to ensure that your request body is valid and formatted correctly. +type SendMailRequestMailSettingsSandboxMode struct { + // Indicates if this setting is enabled. + Enable *bool `json:"enable,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_personalizations_inner.go b/rest/api/v3/mail/model_send_mail_request_personalizations_inner.go new file mode 100644 index 00000000..ebcbc7d5 --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_personalizations_inner.go @@ -0,0 +1,37 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestPersonalizationsInner struct for SendMailRequestPersonalizationsInner +type SendMailRequestPersonalizationsInner struct { + From *MailFrom `json:"from,omitempty"` + // An array of recipients to whom the email will be sent. Each object in this array must contain a recipient's email address. Each object in the array may optionally contain a recipient's name. + To []MailTo `json:"to"` + // An array of recipients to whom a copy of the email will be sent. Each object in this array must contain a recipient's email address. Each object in the array may optionally contain a recipient's name. + Cc *[]MailTo `json:"cc,omitempty"` + // An array of recipients to whom a blind carbon copy of your email will be sent. Each object in this array must contain a recipient's email address. Each object in the array may optionally contain a recipient's name. + Bcc *[]MailTo `json:"bcc,omitempty"` + // The subject of your email. See line length limits specified in [RFC 2822](https://www.rfc-editor.org/rfc/rfc2822#section-2.1.1) for guidance on subject line character limits. + Subject *string `json:"subject,omitempty"` + // A collection of JSON property name and property value pairs allowing you to specify handling instructions for your email. You may not override the following headers: `x-sg-id`, `x-sg-eid`, `received`, `dkim-signature`, `Content-Type`, `Content-Transfer-Encoding`, `To`, `From`, `Subject`, `Reply-To`, `CC`, `BCC`. + Headers *map[string]interface{} `json:"headers,omitempty"` + // A collection property names that will be substituted by their corresponding property values in the `subject`, `reply-to` and `content` portions of your message. Name and value pairs follow the pattern `\"substitution_tag\":\"value to substitute\"`. The total collective size of your substitutions may not exceed 10,000 bytes per personalization object. Substitutions allow you to insert data without using SendGrid's Dynamic Templates. This property should not be used in combination with a Dynamic Template, which can be identified by a `template_id` starting with `d-`. See [**Substitution Tags**](https://docs.sendgrid.com/for-developers/sending-email/substitution-tags) for more information. + Substitutions *map[string]string `json:"substitutions,omitempty"` + // A collection property names that will be substituted by their corresponding property values in the `subject`, `reply-to` and `content` portions of a SendGrid Dynamic Template. Dynamic template data is available in a template using [Handlebars](https://docs.sendgrid.com/for-developers/sending-email/using-handlebars) syntax. This property should be used in combination with a Dynamic Template, which can be identified by a `template_id` starting with `d-`. See [**How to Send an Email with Dynamic Templates**](https://docs.sendgrid.com/ui/sending-email/how-to-send-an-email-with-dynamic-templates) for more information. + DynamicTemplateData *map[string]interface{} `json:"dynamic_template_data,omitempty"` + // Values that are specific to this personalization that will be carried along with the email and its activity data. Substitutions will not be made on custom arguments, so any string that is assigned to this property will be assumed to be the custom argument that you would like to be used. This field may not exceed 10,000 bytes. + CustomArgs *map[string]interface{} `json:"custom_args,omitempty"` + // A [unix timestamp](https://en.wikipedia.org/wiki/Unix_time) allowing you to specify when your email should be sent. A send cannot be scheduled more than 72 hours in advance. + SendAt *int32 `json:"send_at,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_tracking_settings.go b/rest/api/v3/mail/model_send_mail_request_tracking_settings.go new file mode 100644 index 00000000..70621f0e --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_tracking_settings.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestTrackingSettings Settings to determine how you would like to track the metrics of how your recipients interact with your email. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +type SendMailRequestTrackingSettings struct { + ClickTracking *SendMailRequestTrackingSettingsClickTracking `json:"click_tracking,omitempty"` + OpenTracking *SendMailRequestTrackingSettingsOpenTracking `json:"open_tracking,omitempty"` + SubscriptionTracking *SendMailRequestTrackingSettingsSubscriptionTracking `json:"subscription_tracking,omitempty"` + Ganalytics *SendMailRequestTrackingSettingsGanalytics `json:"ganalytics,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_tracking_settings_click_tracking.go b/rest/api/v3/mail/model_send_mail_request_tracking_settings_click_tracking.go new file mode 100644 index 00000000..6c9c7e17 --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_tracking_settings_click_tracking.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestTrackingSettingsClickTracking Allows you to track if a recipient clicked a link in your email. +type SendMailRequestTrackingSettingsClickTracking struct { + // Indicates if this setting is enabled. + Enable *bool `json:"enable,omitempty"` + // Indicates if this setting should be included in the `text/plain` portion of your email. + EnableText *bool `json:"enable_text,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_tracking_settings_ganalytics.go b/rest/api/v3/mail/model_send_mail_request_tracking_settings_ganalytics.go new file mode 100644 index 00000000..d3533334 --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_tracking_settings_ganalytics.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestTrackingSettingsGanalytics Allows you to enable tracking provided by Google Analytics. See [**Google Analytics and SendGrid Statistics**](https://docs.sendgrid.com/ui/analytics-and-reporting/google-analytics) for more information about this property. +type SendMailRequestTrackingSettingsGanalytics struct { + // Indicates if this setting is enabled. + Enable *bool `json:"enable,omitempty"` + // Name of the referrer source. (e.g., Google, SomeDomain.com, or Marketing Email) + UtmSource *string `json:"utm_source,omitempty"` + // Name of the marketing medium. (e.g., Email) + UtmMedium *string `json:"utm_medium,omitempty"` + // Used to identify any paid keywords. + UtmTerm *string `json:"utm_term,omitempty"` + // Used to differentiate your campaign from advertisements. + UtmContent *string `json:"utm_content,omitempty"` + // The name of the campaign. + UtmCampaign *string `json:"utm_campaign,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_tracking_settings_open_tracking.go b/rest/api/v3/mail/model_send_mail_request_tracking_settings_open_tracking.go new file mode 100644 index 00000000..90d6421e --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_tracking_settings_open_tracking.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestTrackingSettingsOpenTracking Allows you to track if the email was opened by including a single transparent pixel image in the body of the message content. When the message is opened, a request for the pixel is sent. That request indicates to Twilio SendGrid that the message was opened. +type SendMailRequestTrackingSettingsOpenTracking struct { + // Indicates if this setting is enabled. + Enable *bool `json:"enable,omitempty"` + // Allows you to specify a substitution tag that you can insert in the body of your email at a location that you desire. This tag will be replaced by the open tracking pixel. + SubstitutionTag *string `json:"substitution_tag,omitempty"` +} diff --git a/rest/api/v3/mail/model_send_mail_request_tracking_settings_subscription_tracking.go b/rest/api/v3/mail/model_send_mail_request_tracking_settings_subscription_tracking.go new file mode 100644 index 00000000..be8695e1 --- /dev/null +++ b/rest/api/v3/mail/model_send_mail_request_tracking_settings_subscription_tracking.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail API +* The Twilio SendGrid v3 Mail API allows you to send email at scale over HTTP. The Mail Send endpoint supports many levels of functionality, allowing you to send templates, set categories and custom arguments that can be used to analyze your send, and configure which tracking settings to include such as opens and clicks. You can also group mail sends into batches, allowing you to schedule and cancel sends by their batch IDs. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendMailRequestTrackingSettingsSubscriptionTracking Allows you to insert a subscription management link at the bottom of the text and HTML bodies of your email. If you would like to specify the location of the link within your email, you may use the `substitution_tag` property. +type SendMailRequestTrackingSettingsSubscriptionTracking struct { + // Indicates if this setting is enabled. + Enable *bool `json:"enable,omitempty"` + // Text to be appended to the email with the subscription tracking link. + Text *string `json:"text,omitempty"` + // HTML to be appended to the email with the subscription tracking link. + Html *string `json:"html,omitempty"` + // A tag that will be replaced with the unsubscribe URL. If this property is used, it will override both the `text` and `html` properties. The URL of the link will be placed at the substitution tag's location in the message body with no additional formatting. + SubstitutionTag *string `json:"substitution_tag,omitempty"` +} diff --git a/rest/api/v3/mail_settings/README.md b/rest/api/v3/mail_settings/README.md new file mode 100644 index 00000000..0ea4bce1 --- /dev/null +++ b/rest/api/v3/mail_settings/README.md @@ -0,0 +1,86 @@ +# Go API client for + +The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. + +For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). + +You can also manage your Mail Settings in the Twilio SendGrid application user interface. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:01.948903+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ListAddressWhitelist* | [**ListAddressWhitelist**](docs/ListAddressWhitelist.md#listaddresswhitelist) | **Get** /v3/mail_settings/address_whitelist | Retrieve address whitelist mail settings +*ListBouncePurge* | [**ListBouncePurge**](docs/ListBouncePurge.md#listbouncepurge) | **Get** /v3/mail_settings/bounce_purge | Retrieve bounce purge mail settings +*ListFooter* | [**ListFooter**](docs/ListFooter.md#listfooter) | **Get** /v3/mail_settings/footer | Retrieve footer mail settings +*ListForwardBounce* | [**ListForwardBounce**](docs/ListForwardBounce.md#listforwardbounce) | **Get** /v3/mail_settings/forward_bounce | Retrieve forward bounce mail settings +*ListForwardSpam* | [**ListForwardSpam**](docs/ListForwardSpam.md#listforwardspam) | **Get** /v3/mail_settings/forward_spam | Retrieve forward spam mail settings +*ListMailSetting* | [**ListMailSetting**](docs/ListMailSetting.md#listmailsetting) | **Get** /v3/mail_settings | Retrieve all mail settings +*ListTemplate* | [**ListTemplate**](docs/ListTemplate.md#listtemplate) | **Get** /v3/mail_settings/template | Retrieve legacy template mail settings +*UpdateAddressWhitelist* | [**UpdateAddressWhitelist**](docs/UpdateAddressWhitelist.md#updateaddresswhitelist) | **Patch** /v3/mail_settings/address_whitelist | Update address whitelist mail settings +*UpdateBouncePurge* | [**UpdateBouncePurge**](docs/UpdateBouncePurge.md#updatebouncepurge) | **Patch** /v3/mail_settings/bounce_purge | Update bounce purge mail settings +*UpdateFooter* | [**UpdateFooter**](docs/UpdateFooter.md#updatefooter) | **Patch** /v3/mail_settings/footer | Update footer mail settings +*UpdateForwardBounce* | [**UpdateForwardBounce**](docs/UpdateForwardBounce.md#updateforwardbounce) | **Patch** /v3/mail_settings/forward_bounce | Update forward bounce mail settings +*UpdateForwardSpam* | [**UpdateForwardSpam**](docs/UpdateForwardSpam.md#updateforwardspam) | **Patch** /v3/mail_settings/forward_spam | Update forward spam mail settings +*UpdateTemplate* | [**UpdateTemplate**](docs/UpdateTemplate.md#updatetemplate) | **Patch** /v3/mail_settings/template | Update template mail settings + + +## Documentation For Models + + - [ListMailSetting200Response](ListMailSetting200Response.md) + - [ListMailSetting200ResponseResultInner](ListMailSetting200ResponseResultInner.md) + - [MailSettingsAddressWhitelabel200](MailSettingsAddressWhitelabel200.md) + - [MailSettingsBouncePurge](MailSettingsBouncePurge.md) + - [MailSettingsFooter](MailSettingsFooter.md) + - [MailSettingsForwardBounce](MailSettingsForwardBounce.md) + - [MailSettingsForwardSpam](MailSettingsForwardSpam.md) + - [MailSettingsTemplate200](MailSettingsTemplate200.md) + - [UpdateAddressWhitelistRequest](UpdateAddressWhitelistRequest.md) + - [UpdateTemplate200Response](UpdateTemplate200Response.md) + - [UpdateTemplateRequest](UpdateTemplateRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/mail_settings/api_list_address_whitelist.go b/rest/api/v3/mail_settings/api_list_address_whitelist.go new file mode 100644 index 00000000..c2421011 --- /dev/null +++ b/rest/api/v3/mail_settings/api_list_address_whitelist.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListAddressWhitelistParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListAddressWhitelistParam) SetOnbehalfof(Onbehalfof string) *ListAddressWhitelistParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve your current email address whitelist settings.** The Address Whitelist setting allows you to specify email addresses or domains for which mail should never be suppressed. For example, if you own the domain `example.com`, and one or more of your recipients use `email@example.com` addresses, placing `example.com` in the address whitelist setting instructs Twilio SendGrid to ignore all bounces, blocks, and unsubscribes logged for that domain. In other words, all bounces, blocks, and unsubscribes will still be sent to `example.com` as if they were sent under normal sending conditions. +func (c *ApiService) ListAddressWhitelist(params *ListAddressWhitelistParam) (interface{}, error) { + path := "/v3/mail_settings/address_whitelist" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &MailSettingsAddressWhitelabel200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mail_settings/api_list_bounce_purge.go b/rest/api/v3/mail_settings/api_list_bounce_purge.go new file mode 100644 index 00000000..30ee837d --- /dev/null +++ b/rest/api/v3/mail_settings/api_list_bounce_purge.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListBouncePurgeParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListBouncePurgeParam) SetOnbehalfof(Onbehalfof string) *ListBouncePurgeParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve your current bounce and purge settings.** The Bounce Perge setting allows you to set a schedule that Twilio SendGrid will use to automatically delete contacts from your soft and hard bounce suppression lists. A hard bounce occurs when an email message has been returned to the sender because the recipient's address is invalid. A hard bounce might occur because the domain name doesn't exist or because the recipient is unknown. A soft bounce occurs when an email message reaches the recipient's mail server but is bounced back undelivered before it actually reaches the recipient. A soft bounce might occur because the recipient's inbox is full. You can also manage this setting in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). You can manage your bounces manually using the [Bounces API](https://docs.sendgrid.com/api-reference/bounces-api) or the [Bounces menu in the Twilio SendGrid App](https://app.sendgrid.com/suppressions/bounces). +func (c *ApiService) ListBouncePurge(params *ListBouncePurgeParam) (interface{}, error) { + path := "/v3/mail_settings/bounce_purge" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &MailSettingsBouncePurge{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mail_settings/api_list_footer.go b/rest/api/v3/mail_settings/api_list_footer.go new file mode 100644 index 00000000..79f3771c --- /dev/null +++ b/rest/api/v3/mail_settings/api_list_footer.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListFooterParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListFooterParam) SetOnbehalfof(Onbehalfof string) *ListFooterParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve your current Footer mail settings.** The Footer setting will insert a custom footer at the bottom of your text and HTML email message bodies. You can insert your HTML or plain text directly using the \"Update footer mail settings\" endpoint, or you can create the footer using the [Mail Settings menu in the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). +func (c *ApiService) ListFooter(params *ListFooterParam) (interface{}, error) { + path := "/v3/mail_settings/footer" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &MailSettingsFooter{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mail_settings/api_list_forward_bounce.go b/rest/api/v3/mail_settings/api_list_forward_bounce.go new file mode 100644 index 00000000..83555b52 --- /dev/null +++ b/rest/api/v3/mail_settings/api_list_forward_bounce.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListForwardBounceParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListForwardBounceParam) SetOnbehalfof(Onbehalfof string) *ListForwardBounceParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve your current bounce forwarding mail settings.** Enabling the Forward Bounce setting allows you to specify `email` addresses to which bounce reports will be forwarded. This endpoint returns the email address you have set to receive forwarded bounces and an `enabled` status indicating if the setting is active. +func (c *ApiService) ListForwardBounce(params *ListForwardBounceParam) (interface{}, error) { + path := "/v3/mail_settings/forward_bounce" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &MailSettingsForwardBounce{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mail_settings/api_list_forward_spam.go b/rest/api/v3/mail_settings/api_list_forward_spam.go new file mode 100644 index 00000000..e6871850 --- /dev/null +++ b/rest/api/v3/mail_settings/api_list_forward_spam.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListForwardSpamParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListForwardSpamParam) SetOnbehalfof(Onbehalfof string) *ListForwardSpamParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve your current Forward Spam mail settings.** Enabling the Forward Spam setting allows you to specify `email` addresses to which spam reports will be forwarded. This endpoint returns any email address(es) you have set to receive forwarded spam and an `enabled` status indicating if the setting is active. +func (c *ApiService) ListForwardSpam(params *ListForwardSpamParam) (interface{}, error) { + path := "/v3/mail_settings/forward_spam" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &MailSettingsForwardSpam{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mail_settings/api_list_mail_setting.go b/rest/api/v3/mail_settings/api_list_mail_setting.go new file mode 100644 index 00000000..fbfe8cb2 --- /dev/null +++ b/rest/api/v3/mail_settings/api_list_mail_setting.go @@ -0,0 +1,79 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListMailSettingParam struct { + // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. + Limit *int32 `json:"limit,omitempty"` + // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + Offset *int32 `json:"offset,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListMailSettingParam) SetLimit(Limit int32) *ListMailSettingParam { + params.Limit = &Limit + return params +} +func (params *ListMailSettingParam) SetOffset(Offset int32) *ListMailSettingParam { + params.Offset = &Offset + return params +} +func (params *ListMailSettingParam) SetOnbehalfof(Onbehalfof string) *ListMailSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a paginated list of all mail settings.** Each setting will be returned with an `enabled` status set to `true` or `false` and a short description that explains what the setting does. You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. +func (c *ApiService) ListMailSetting(params *ListMailSettingParam) (interface{}, error) { + path := "/v3/mail_settings" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListMailSetting200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mail_settings/api_list_template.go b/rest/api/v3/mail_settings/api_list_template.go new file mode 100644 index 00000000..d03cd5ef --- /dev/null +++ b/rest/api/v3/mail_settings/api_list_template.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListTemplateParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListTemplateParam) SetOnbehalfof(Onbehalfof string) *ListTemplateParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve your current legacy email template settings.** This setting refers to our original email templates. We currently support more fully featured [Dynamic Transactional Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/). The legacy email template setting wraps an HTML template around your email content. This can be useful for sending out marketing email and/or other HTML formatted messages. For instructions on using legacy templates, see how to [\"Create and Edit Legacy Transactional Templates](https://sendgrid.com/docs/ui/sending-email/create-and-edit-legacy-transactional-templates/). For help migrating to our current template system, see [\"Migrating from Legacy Templates\"](https://sendgrid.com/docs/ui/sending-email/migrating-from-legacy-templates/). +func (c *ApiService) ListTemplate(params *ListTemplateParam) (interface{}, error) { + path := "/v3/mail_settings/template" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &MailSettingsTemplate200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mail_settings/api_service.go b/rest/api/v3/mail_settings/api_service.go new file mode 100644 index 00000000..e9a35ea3 --- /dev/null +++ b/rest/api/v3/mail_settings/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/mail_settings/api_update_address_whitelist.go b/rest/api/v3/mail_settings/api_update_address_whitelist.go new file mode 100644 index 00000000..8acf2d8b --- /dev/null +++ b/rest/api/v3/mail_settings/api_update_address_whitelist.go @@ -0,0 +1,74 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type UpdateAddressWhitelistParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateAddressWhitelistRequest *UpdateAddressWhitelistRequest `json:"UpdateAddressWhitelistRequest,omitempty"` +} + +func (params *UpdateAddressWhitelistParam) SetOnbehalfof(Onbehalfof string) *UpdateAddressWhitelistParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateAddressWhitelistParam) SetUpdateAddressWhitelistRequest(UpdateAddressWhitelistRequest UpdateAddressWhitelistRequest) *UpdateAddressWhitelistParam { + params.UpdateAddressWhitelistRequest = &UpdateAddressWhitelistRequest + return params +} + +// **This endpoint allows you to update your current email address whitelist settings.** You can select whether or not this setting should be enabled by assigning the `enabled` field a `true` or `false` value. Passing only the `enabled` field to this endpoint will not alter your current `list` of whitelist entries. However, any modifications to your `list` of entries will overwrite the entire list. For this reason, you must included all existing entries you wish to retain in your `list` in addition to any new entries you intend to add. To remove one or more `list` entries, pass a `list` with only the entries you wish to retain. You should not add generic domains such as `gmail.com` or `yahoo.com` in your `list` because your emails will not honor recipients' unsubscribes. This may cause a legal violation of [CAN-SPAM](https://sendgrid.com/docs/glossary/can-spam/) and could damage your sending reputation. The Address Whitelist setting allows you to specify email addresses or domains for which mail should never be suppressed. For example, if you own the domain `example.com`, and one or more of your recipients use `email@example.com` addresses, placing `example.com` in the address whitelist setting instructs Twilio SendGrid to ignore all bounces, blocks, and unsubscribes logged for that domain. In other words, all bounces, blocks, and unsubscribes will still be sent to `example.com` as if they were sent under normal sending conditions. +func (c *ApiService) UpdateAddressWhitelist(params *UpdateAddressWhitelistParam) (interface{}, error) { + path := "/v3/mail_settings/address_whitelist" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateAddressWhitelistRequest != nil { + b, err := json.Marshal(*params.UpdateAddressWhitelistRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &MailSettingsAddressWhitelabel200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mail_settings/api_update_bounce_purge.go b/rest/api/v3/mail_settings/api_update_bounce_purge.go new file mode 100644 index 00000000..80f822e2 --- /dev/null +++ b/rest/api/v3/mail_settings/api_update_bounce_purge.go @@ -0,0 +1,74 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type UpdateBouncePurgeParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + MailSettingsBouncePurge *MailSettingsBouncePurge `json:"MailSettingsBouncePurge,omitempty"` +} + +func (params *UpdateBouncePurgeParam) SetOnbehalfof(Onbehalfof string) *UpdateBouncePurgeParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateBouncePurgeParam) SetMailSettingsBouncePurge(MailSettingsBouncePurge MailSettingsBouncePurge) *UpdateBouncePurgeParam { + params.MailSettingsBouncePurge = &MailSettingsBouncePurge + return params +} + +// **This endpoint allows you to update your current bounce and purge settings.** The Bounce Perge setting allows you to set a schedule that Twilio SendGrid will use to automatically delete contacts from your soft and hard bounce suppression lists. The schedule is set in full days by assigning the number of days, an integer, to the `soft_bounces` and/or `hard_bounces` fields. A hard bounce occurs when an email message has been returned to the sender because the recipient's address is invalid. A hard bounce might occur because the domain name doesn't exist or because the recipient is unknown. A soft bounce occurs when an email message reaches the recipient's mail server but is bounced back undelivered before it actually reaches the recipient. A soft bounce might occur because the recipient's inbox is full. You can also manage this setting in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). You can manage your bounces manually using the [Bounces API](https://docs.sendgrid.com/api-reference/bounces-api) or the [Bounces menu in the Twilio SendGrid App](https://app.sendgrid.com/suppressions/bounces). +func (c *ApiService) UpdateBouncePurge(params *UpdateBouncePurgeParam) (interface{}, error) { + path := "/v3/mail_settings/bounce_purge" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.MailSettingsBouncePurge != nil { + b, err := json.Marshal(*params.MailSettingsBouncePurge) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &MailSettingsBouncePurge{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mail_settings/api_update_footer.go b/rest/api/v3/mail_settings/api_update_footer.go new file mode 100644 index 00000000..9d6bcf09 --- /dev/null +++ b/rest/api/v3/mail_settings/api_update_footer.go @@ -0,0 +1,74 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type UpdateFooterParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + MailSettingsFooter *MailSettingsFooter `json:"MailSettingsFooter,omitempty"` +} + +func (params *UpdateFooterParam) SetOnbehalfof(Onbehalfof string) *UpdateFooterParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateFooterParam) SetMailSettingsFooter(MailSettingsFooter MailSettingsFooter) *UpdateFooterParam { + params.MailSettingsFooter = &MailSettingsFooter + return params +} + +// **This endpoint allows you to update your current Footer mail settings.** The Footer setting will insert a custom footer at the bottom of your text and HTML email message bodies. You can insert your HTML or plain text directly using this endpoint, or you can create the footer using the [Mail Settings menu in the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). +func (c *ApiService) UpdateFooter(params *UpdateFooterParam) (interface{}, error) { + path := "/v3/mail_settings/footer" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.MailSettingsFooter != nil { + b, err := json.Marshal(*params.MailSettingsFooter) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &MailSettingsFooter{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mail_settings/api_update_forward_bounce.go b/rest/api/v3/mail_settings/api_update_forward_bounce.go new file mode 100644 index 00000000..7288ee75 --- /dev/null +++ b/rest/api/v3/mail_settings/api_update_forward_bounce.go @@ -0,0 +1,74 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type UpdateForwardBounceParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + MailSettingsForwardBounce *MailSettingsForwardBounce `json:"MailSettingsForwardBounce,omitempty"` +} + +func (params *UpdateForwardBounceParam) SetOnbehalfof(Onbehalfof string) *UpdateForwardBounceParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateForwardBounceParam) SetMailSettingsForwardBounce(MailSettingsForwardBounce MailSettingsForwardBounce) *UpdateForwardBounceParam { + params.MailSettingsForwardBounce = &MailSettingsForwardBounce + return params +} + +// **This endpoint allows you to update your current bounce forwarding mail settings.** Enabling the Forward Bounce setting allows you to specify an `email` address to which bounce reports will be forwarded. You can also configure the Forward Spam mail settings in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). +func (c *ApiService) UpdateForwardBounce(params *UpdateForwardBounceParam) (interface{}, error) { + path := "/v3/mail_settings/forward_bounce" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.MailSettingsForwardBounce != nil { + b, err := json.Marshal(*params.MailSettingsForwardBounce) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &MailSettingsForwardBounce{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mail_settings/api_update_forward_spam.go b/rest/api/v3/mail_settings/api_update_forward_spam.go new file mode 100644 index 00000000..06bf9f29 --- /dev/null +++ b/rest/api/v3/mail_settings/api_update_forward_spam.go @@ -0,0 +1,74 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type UpdateForwardSpamParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + MailSettingsForwardSpam *MailSettingsForwardSpam `json:"MailSettingsForwardSpam,omitempty"` +} + +func (params *UpdateForwardSpamParam) SetOnbehalfof(Onbehalfof string) *UpdateForwardSpamParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateForwardSpamParam) SetMailSettingsForwardSpam(MailSettingsForwardSpam MailSettingsForwardSpam) *UpdateForwardSpamParam { + params.MailSettingsForwardSpam = &MailSettingsForwardSpam + return params +} + +// **This endpoint allows you to update your current Forward Spam mail settings.** Enabling the Forward Spam setting allows you to specify `email` addresses to which spam reports will be forwarded. You can set multiple addresses by passing this endpoint a comma separated list of emails in a single string. ``` { \"email\": \"address1@example.com, address2@exapmle.com\", \"enabled\": true } ``` The Forward Spam setting may also be used to receive emails sent to `abuse@` and `postmaster@` role addresses if you have authenticated your domain. For example, if you authenticated `example.com` as your root domain and set a custom return path of `sub` for that domain, you could turn on Forward Spam, and any emails sent to `abuse@sub.example.com` or `postmaster@sub.example.com` would be forwarded to the email address you entered in the `email` field. You can authenticate your domain using the \"Authenticate a domain\" endpoint or in the [Sender Authentication section of the Twilio SendGrid App](https://app.sendgrid.com/settings/sender_auth). You can also configure the Forward Spam mail settings in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). +func (c *ApiService) UpdateForwardSpam(params *UpdateForwardSpamParam) (interface{}, error) { + path := "/v3/mail_settings/forward_spam" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.MailSettingsForwardSpam != nil { + b, err := json.Marshal(*params.MailSettingsForwardSpam) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &MailSettingsForwardSpam{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mail_settings/api_update_template.go b/rest/api/v3/mail_settings/api_update_template.go new file mode 100644 index 00000000..aff59dcb --- /dev/null +++ b/rest/api/v3/mail_settings/api_update_template.go @@ -0,0 +1,74 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type UpdateTemplateParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateTemplateRequest *UpdateTemplateRequest `json:"UpdateTemplateRequest,omitempty"` +} + +func (params *UpdateTemplateParam) SetOnbehalfof(Onbehalfof string) *UpdateTemplateParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateTemplateParam) SetUpdateTemplateRequest(UpdateTemplateRequest UpdateTemplateRequest) *UpdateTemplateParam { + params.UpdateTemplateRequest = &UpdateTemplateRequest + return params +} + +// **This endpoint allows you to update your current legacy email template settings.** This setting refers to our original email templates. We currently support more fully featured [Dynamic Transactional Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/). The legacy email template setting wraps an HTML template around your email content. This can be useful for sending out marketing email and/or other HTML formatted messages. For instructions on using legacy templates, see how to [\"Create and Edit Legacy Transactional Templates](https://sendgrid.com/docs/ui/sending-email/create-and-edit-legacy-transactional-templates/). For help migrating to our current template system, see [\"Migrating from Legacy Templates\"](https://sendgrid.com/docs/ui/sending-email/migrating-from-legacy-templates/). +func (c *ApiService) UpdateTemplate(params *UpdateTemplateParam) (interface{}, error) { + path := "/v3/mail_settings/template" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateTemplateRequest != nil { + b, err := json.Marshal(*params.UpdateTemplateRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &UpdateTemplate200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mail_settings/docs/ListAddressWhitelist.md b/rest/api/v3/mail_settings/docs/ListAddressWhitelist.md new file mode 100644 index 00000000..19d14d6b --- /dev/null +++ b/rest/api/v3/mail_settings/docs/ListAddressWhitelist.md @@ -0,0 +1,48 @@ +# ListAddressWhitelist + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListAddressWhitelist**](ListAddressWhitelist.md#ListAddressWhitelist) | **Get** /v3/mail_settings/address_whitelist | Retrieve address whitelist mail settings + + + +## ListAddressWhitelist + +> MailSettingsAddressWhitelabel200 ListAddressWhitelist(ctx, optional) + +Retrieve address whitelist mail settings + +**This endpoint allows you to retrieve your current email address whitelist settings.** The Address Whitelist setting allows you to specify email addresses or domains for which mail should never be suppressed. For example, if you own the domain `example.com`, and one or more of your recipients use `email@example.com` addresses, placing `example.com` in the address whitelist setting instructs Twilio SendGrid to ignore all bounces, blocks, and unsubscribes logged for that domain. In other words, all bounces, blocks, and unsubscribes will still be sent to `example.com` as if they were sent under normal sending conditions. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListAddressWhitelistParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**MailSettingsAddressWhitelabel200**](MailSettingsAddressWhitelabel200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail_settings/docs/ListBouncePurge.md b/rest/api/v3/mail_settings/docs/ListBouncePurge.md new file mode 100644 index 00000000..edf160c3 --- /dev/null +++ b/rest/api/v3/mail_settings/docs/ListBouncePurge.md @@ -0,0 +1,48 @@ +# ListBouncePurge + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListBouncePurge**](ListBouncePurge.md#ListBouncePurge) | **Get** /v3/mail_settings/bounce_purge | Retrieve bounce purge mail settings + + + +## ListBouncePurge + +> MailSettingsBouncePurge ListBouncePurge(ctx, optional) + +Retrieve bounce purge mail settings + +**This endpoint allows you to retrieve your current bounce and purge settings.** The Bounce Perge setting allows you to set a schedule that Twilio SendGrid will use to automatically delete contacts from your soft and hard bounce suppression lists. A hard bounce occurs when an email message has been returned to the sender because the recipient's address is invalid. A hard bounce might occur because the domain name doesn't exist or because the recipient is unknown. A soft bounce occurs when an email message reaches the recipient's mail server but is bounced back undelivered before it actually reaches the recipient. A soft bounce might occur because the recipient's inbox is full. You can also manage this setting in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). You can manage your bounces manually using the [Bounces API](https://docs.sendgrid.com/api-reference/bounces-api) or the [Bounces menu in the Twilio SendGrid App](https://app.sendgrid.com/suppressions/bounces). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListBouncePurgeParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**MailSettingsBouncePurge**](MailSettingsBouncePurge.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail_settings/docs/ListFooter.md b/rest/api/v3/mail_settings/docs/ListFooter.md new file mode 100644 index 00000000..67d15a65 --- /dev/null +++ b/rest/api/v3/mail_settings/docs/ListFooter.md @@ -0,0 +1,48 @@ +# ListFooter + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListFooter**](ListFooter.md#ListFooter) | **Get** /v3/mail_settings/footer | Retrieve footer mail settings + + + +## ListFooter + +> MailSettingsFooter ListFooter(ctx, optional) + +Retrieve footer mail settings + +**This endpoint allows you to retrieve your current Footer mail settings.** The Footer setting will insert a custom footer at the bottom of your text and HTML email message bodies. You can insert your HTML or plain text directly using the \"Update footer mail settings\" endpoint, or you can create the footer using the [Mail Settings menu in the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListFooterParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**MailSettingsFooter**](MailSettingsFooter.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail_settings/docs/ListForwardBounce.md b/rest/api/v3/mail_settings/docs/ListForwardBounce.md new file mode 100644 index 00000000..03f8edb4 --- /dev/null +++ b/rest/api/v3/mail_settings/docs/ListForwardBounce.md @@ -0,0 +1,48 @@ +# ListForwardBounce + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListForwardBounce**](ListForwardBounce.md#ListForwardBounce) | **Get** /v3/mail_settings/forward_bounce | Retrieve forward bounce mail settings + + + +## ListForwardBounce + +> MailSettingsForwardBounce ListForwardBounce(ctx, optional) + +Retrieve forward bounce mail settings + +**This endpoint allows you to retrieve your current bounce forwarding mail settings.** Enabling the Forward Bounce setting allows you to specify `email` addresses to which bounce reports will be forwarded. This endpoint returns the email address you have set to receive forwarded bounces and an `enabled` status indicating if the setting is active. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListForwardBounceParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**MailSettingsForwardBounce**](MailSettingsForwardBounce.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail_settings/docs/ListForwardSpam.md b/rest/api/v3/mail_settings/docs/ListForwardSpam.md new file mode 100644 index 00000000..8a50b2a3 --- /dev/null +++ b/rest/api/v3/mail_settings/docs/ListForwardSpam.md @@ -0,0 +1,48 @@ +# ListForwardSpam + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListForwardSpam**](ListForwardSpam.md#ListForwardSpam) | **Get** /v3/mail_settings/forward_spam | Retrieve forward spam mail settings + + + +## ListForwardSpam + +> MailSettingsForwardSpam ListForwardSpam(ctx, optional) + +Retrieve forward spam mail settings + +**This endpoint allows you to retrieve your current Forward Spam mail settings.** Enabling the Forward Spam setting allows you to specify `email` addresses to which spam reports will be forwarded. This endpoint returns any email address(es) you have set to receive forwarded spam and an `enabled` status indicating if the setting is active. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListForwardSpamParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**MailSettingsForwardSpam**](MailSettingsForwardSpam.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail_settings/docs/ListMailSetting.md b/rest/api/v3/mail_settings/docs/ListMailSetting.md new file mode 100644 index 00000000..112b7db3 --- /dev/null +++ b/rest/api/v3/mail_settings/docs/ListMailSetting.md @@ -0,0 +1,50 @@ +# ListMailSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListMailSetting**](ListMailSetting.md#ListMailSetting) | **Get** /v3/mail_settings | Retrieve all mail settings + + + +## ListMailSetting + +> ListMailSetting200Response ListMailSetting(ctx, optional) + +Retrieve all mail settings + +**This endpoint allows you to retrieve a paginated list of all mail settings.** Each setting will be returned with an `enabled` status set to `true` or `false` and a short description that explains what the setting does. You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListMailSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. +**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListMailSetting200Response**](ListMailSetting200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail_settings/docs/ListMailSetting200Response.md b/rest/api/v3/mail_settings/docs/ListMailSetting200Response.md new file mode 100644 index 00000000..cbfa419e --- /dev/null +++ b/rest/api/v3/mail_settings/docs/ListMailSetting200Response.md @@ -0,0 +1,11 @@ +# ListMailSetting200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ListMailSetting200ResponseResultInner**](ListMailSetting200ResponseResultInner.md) | The list of all mail settings. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail_settings/docs/ListMailSetting200ResponseResultInner.md b/rest/api/v3/mail_settings/docs/ListMailSetting200ResponseResultInner.md new file mode 100644 index 00000000..ffcbe98a --- /dev/null +++ b/rest/api/v3/mail_settings/docs/ListMailSetting200ResponseResultInner.md @@ -0,0 +1,14 @@ +# ListMailSetting200ResponseResultInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | **string** | The title of the mail setting. | +**Enabled** | **bool** | Indicates if this mail setting is currently enabled. | +**Name** | **string** | The name of the mail setting. | +**Description** | **string** | A description of the mail setting. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail_settings/docs/ListTemplate.md b/rest/api/v3/mail_settings/docs/ListTemplate.md new file mode 100644 index 00000000..d793d851 --- /dev/null +++ b/rest/api/v3/mail_settings/docs/ListTemplate.md @@ -0,0 +1,48 @@ +# ListTemplate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListTemplate**](ListTemplate.md#ListTemplate) | **Get** /v3/mail_settings/template | Retrieve legacy template mail settings + + + +## ListTemplate + +> MailSettingsTemplate200 ListTemplate(ctx, optional) + +Retrieve legacy template mail settings + +**This endpoint allows you to retrieve your current legacy email template settings.** This setting refers to our original email templates. We currently support more fully featured [Dynamic Transactional Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/). The legacy email template setting wraps an HTML template around your email content. This can be useful for sending out marketing email and/or other HTML formatted messages. For instructions on using legacy templates, see how to [\"Create and Edit Legacy Transactional Templates](https://sendgrid.com/docs/ui/sending-email/create-and-edit-legacy-transactional-templates/). For help migrating to our current template system, see [\"Migrating from Legacy Templates\"](https://sendgrid.com/docs/ui/sending-email/migrating-from-legacy-templates/). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListTemplateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**MailSettingsTemplate200**](MailSettingsTemplate200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail_settings/docs/MailSettingsAddressWhitelabel200.md b/rest/api/v3/mail_settings/docs/MailSettingsAddressWhitelabel200.md new file mode 100644 index 00000000..faa984c3 --- /dev/null +++ b/rest/api/v3/mail_settings/docs/MailSettingsAddressWhitelabel200.md @@ -0,0 +1,12 @@ +# MailSettingsAddressWhitelabel200 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates if you have an email address whitelist enabled. |[optional] +**List** | **[]string** | All email addresses that are currently on the whitelist. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail_settings/docs/MailSettingsBouncePurge.md b/rest/api/v3/mail_settings/docs/MailSettingsBouncePurge.md new file mode 100644 index 00000000..a23734de --- /dev/null +++ b/rest/api/v3/mail_settings/docs/MailSettingsBouncePurge.md @@ -0,0 +1,13 @@ +# MailSettingsBouncePurge + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates if the bounce purge mail setting is enabled. |[optional] +**SoftBounces** | **int32** | The number of days after which SendGrid will purge all contacts from your soft bounces suppression lists. |[optional] +**HardBounces** | **int32** | The number of days after which SendGrid will purge all contacts from your hard bounces suppression lists. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail_settings/docs/MailSettingsFooter.md b/rest/api/v3/mail_settings/docs/MailSettingsFooter.md new file mode 100644 index 00000000..9e32dc8d --- /dev/null +++ b/rest/api/v3/mail_settings/docs/MailSettingsFooter.md @@ -0,0 +1,13 @@ +# MailSettingsFooter + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates if the Footer mail setting is currently enabled. |[optional] +**HtmlContent** | **string** | The custom HTML content of your email footer. |[optional] +**PlainContent** | **string** | The plain text content of your email footer. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail_settings/docs/MailSettingsForwardBounce.md b/rest/api/v3/mail_settings/docs/MailSettingsForwardBounce.md new file mode 100644 index 00000000..b026f5b9 --- /dev/null +++ b/rest/api/v3/mail_settings/docs/MailSettingsForwardBounce.md @@ -0,0 +1,12 @@ +# MailSettingsForwardBounce + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address that you would like your bounce reports forwarded to. |[optional] +**Enabled** | **bool** | Indicates if the bounce forwarding mail setting is enabled. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail_settings/docs/MailSettingsForwardSpam.md b/rest/api/v3/mail_settings/docs/MailSettingsForwardSpam.md new file mode 100644 index 00000000..ab2ac86c --- /dev/null +++ b/rest/api/v3/mail_settings/docs/MailSettingsForwardSpam.md @@ -0,0 +1,12 @@ +# MailSettingsForwardSpam + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address where you would like the spam reports to be forwarded. |[optional] +**Enabled** | **bool** | Indicates if the Forward Spam setting is enabled. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail_settings/docs/MailSettingsTemplate200.md b/rest/api/v3/mail_settings/docs/MailSettingsTemplate200.md new file mode 100644 index 00000000..17d003ec --- /dev/null +++ b/rest/api/v3/mail_settings/docs/MailSettingsTemplate200.md @@ -0,0 +1,12 @@ +# MailSettingsTemplate200 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates if the legacy email template setting is enabled. |[optional] +**HtmlContent** | **string** | The HTML content that you want to use for your legacy email template. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail_settings/docs/UpdateAddressWhitelist.md b/rest/api/v3/mail_settings/docs/UpdateAddressWhitelist.md new file mode 100644 index 00000000..33b8dcda --- /dev/null +++ b/rest/api/v3/mail_settings/docs/UpdateAddressWhitelist.md @@ -0,0 +1,49 @@ +# UpdateAddressWhitelist + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateAddressWhitelist**](UpdateAddressWhitelist.md#UpdateAddressWhitelist) | **Patch** /v3/mail_settings/address_whitelist | Update address whitelist mail settings + + + +## UpdateAddressWhitelist + +> MailSettingsAddressWhitelabel200 UpdateAddressWhitelist(ctx, optional) + +Update address whitelist mail settings + +**This endpoint allows you to update your current email address whitelist settings.** You can select whether or not this setting should be enabled by assigning the `enabled` field a `true` or `false` value. Passing only the `enabled` field to this endpoint will not alter your current `list` of whitelist entries. However, any modifications to your `list` of entries will overwrite the entire list. For this reason, you must included all existing entries you wish to retain in your `list` in addition to any new entries you intend to add. To remove one or more `list` entries, pass a `list` with only the entries you wish to retain. You should not add generic domains such as `gmail.com` or `yahoo.com` in your `list` because your emails will not honor recipients' unsubscribes. This may cause a legal violation of [CAN-SPAM](https://sendgrid.com/docs/glossary/can-spam/) and could damage your sending reputation. The Address Whitelist setting allows you to specify email addresses or domains for which mail should never be suppressed. For example, if you own the domain `example.com`, and one or more of your recipients use `email@example.com` addresses, placing `example.com` in the address whitelist setting instructs Twilio SendGrid to ignore all bounces, blocks, and unsubscribes logged for that domain. In other words, all bounces, blocks, and unsubscribes will still be sent to `example.com` as if they were sent under normal sending conditions. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateAddressWhitelistParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateAddressWhitelistRequest** | [**UpdateAddressWhitelistRequest**](UpdateAddressWhitelistRequest.md) | + +### Return type + +[**MailSettingsAddressWhitelabel200**](MailSettingsAddressWhitelabel200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail_settings/docs/UpdateAddressWhitelistRequest.md b/rest/api/v3/mail_settings/docs/UpdateAddressWhitelistRequest.md new file mode 100644 index 00000000..26fabf56 --- /dev/null +++ b/rest/api/v3/mail_settings/docs/UpdateAddressWhitelistRequest.md @@ -0,0 +1,12 @@ +# UpdateAddressWhitelistRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates if your email address whitelist is enabled. |[optional] +**List** | **[]string** | Either a single email address that you want whitelisted or a domain, for which all email addresses belonging to this domain will be whitelisted. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail_settings/docs/UpdateBouncePurge.md b/rest/api/v3/mail_settings/docs/UpdateBouncePurge.md new file mode 100644 index 00000000..4ffdeafd --- /dev/null +++ b/rest/api/v3/mail_settings/docs/UpdateBouncePurge.md @@ -0,0 +1,49 @@ +# UpdateBouncePurge + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateBouncePurge**](UpdateBouncePurge.md#UpdateBouncePurge) | **Patch** /v3/mail_settings/bounce_purge | Update bounce purge mail settings + + + +## UpdateBouncePurge + +> MailSettingsBouncePurge UpdateBouncePurge(ctx, optional) + +Update bounce purge mail settings + +**This endpoint allows you to update your current bounce and purge settings.** The Bounce Perge setting allows you to set a schedule that Twilio SendGrid will use to automatically delete contacts from your soft and hard bounce suppression lists. The schedule is set in full days by assigning the number of days, an integer, to the `soft_bounces` and/or `hard_bounces` fields. A hard bounce occurs when an email message has been returned to the sender because the recipient's address is invalid. A hard bounce might occur because the domain name doesn't exist or because the recipient is unknown. A soft bounce occurs when an email message reaches the recipient's mail server but is bounced back undelivered before it actually reaches the recipient. A soft bounce might occur because the recipient's inbox is full. You can also manage this setting in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). You can manage your bounces manually using the [Bounces API](https://docs.sendgrid.com/api-reference/bounces-api) or the [Bounces menu in the Twilio SendGrid App](https://app.sendgrid.com/suppressions/bounces). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateBouncePurgeParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**MailSettingsBouncePurge** | [**MailSettingsBouncePurge**](MailSettingsBouncePurge.md) | + +### Return type + +[**MailSettingsBouncePurge**](MailSettingsBouncePurge.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail_settings/docs/UpdateFooter.md b/rest/api/v3/mail_settings/docs/UpdateFooter.md new file mode 100644 index 00000000..758cbdbd --- /dev/null +++ b/rest/api/v3/mail_settings/docs/UpdateFooter.md @@ -0,0 +1,49 @@ +# UpdateFooter + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateFooter**](UpdateFooter.md#UpdateFooter) | **Patch** /v3/mail_settings/footer | Update footer mail settings + + + +## UpdateFooter + +> MailSettingsFooter UpdateFooter(ctx, optional) + +Update footer mail settings + +**This endpoint allows you to update your current Footer mail settings.** The Footer setting will insert a custom footer at the bottom of your text and HTML email message bodies. You can insert your HTML or plain text directly using this endpoint, or you can create the footer using the [Mail Settings menu in the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateFooterParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**MailSettingsFooter** | [**MailSettingsFooter**](MailSettingsFooter.md) | + +### Return type + +[**MailSettingsFooter**](MailSettingsFooter.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail_settings/docs/UpdateForwardBounce.md b/rest/api/v3/mail_settings/docs/UpdateForwardBounce.md new file mode 100644 index 00000000..f7250ada --- /dev/null +++ b/rest/api/v3/mail_settings/docs/UpdateForwardBounce.md @@ -0,0 +1,49 @@ +# UpdateForwardBounce + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateForwardBounce**](UpdateForwardBounce.md#UpdateForwardBounce) | **Patch** /v3/mail_settings/forward_bounce | Update forward bounce mail settings + + + +## UpdateForwardBounce + +> MailSettingsForwardBounce UpdateForwardBounce(ctx, optional) + +Update forward bounce mail settings + +**This endpoint allows you to update your current bounce forwarding mail settings.** Enabling the Forward Bounce setting allows you to specify an `email` address to which bounce reports will be forwarded. You can also configure the Forward Spam mail settings in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateForwardBounceParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**MailSettingsForwardBounce** | [**MailSettingsForwardBounce**](MailSettingsForwardBounce.md) | + +### Return type + +[**MailSettingsForwardBounce**](MailSettingsForwardBounce.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail_settings/docs/UpdateForwardSpam.md b/rest/api/v3/mail_settings/docs/UpdateForwardSpam.md new file mode 100644 index 00000000..72690164 --- /dev/null +++ b/rest/api/v3/mail_settings/docs/UpdateForwardSpam.md @@ -0,0 +1,49 @@ +# UpdateForwardSpam + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateForwardSpam**](UpdateForwardSpam.md#UpdateForwardSpam) | **Patch** /v3/mail_settings/forward_spam | Update forward spam mail settings + + + +## UpdateForwardSpam + +> MailSettingsForwardSpam UpdateForwardSpam(ctx, optional) + +Update forward spam mail settings + +**This endpoint allows you to update your current Forward Spam mail settings.** Enabling the Forward Spam setting allows you to specify `email` addresses to which spam reports will be forwarded. You can set multiple addresses by passing this endpoint a comma separated list of emails in a single string. ``` { \"email\": \"address1@example.com, address2@exapmle.com\", \"enabled\": true } ``` The Forward Spam setting may also be used to receive emails sent to `abuse@` and `postmaster@` role addresses if you have authenticated your domain. For example, if you authenticated `example.com` as your root domain and set a custom return path of `sub` for that domain, you could turn on Forward Spam, and any emails sent to `abuse@sub.example.com` or `postmaster@sub.example.com` would be forwarded to the email address you entered in the `email` field. You can authenticate your domain using the \"Authenticate a domain\" endpoint or in the [Sender Authentication section of the Twilio SendGrid App](https://app.sendgrid.com/settings/sender_auth). You can also configure the Forward Spam mail settings in the [Mail Settings section of the Twilio SendGrid App](https://app.sendgrid.com/settings/mail_settings). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateForwardSpamParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**MailSettingsForwardSpam** | [**MailSettingsForwardSpam**](MailSettingsForwardSpam.md) | + +### Return type + +[**MailSettingsForwardSpam**](MailSettingsForwardSpam.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail_settings/docs/UpdateTemplate.md b/rest/api/v3/mail_settings/docs/UpdateTemplate.md new file mode 100644 index 00000000..96add61e --- /dev/null +++ b/rest/api/v3/mail_settings/docs/UpdateTemplate.md @@ -0,0 +1,49 @@ +# UpdateTemplate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateTemplate**](UpdateTemplate.md#UpdateTemplate) | **Patch** /v3/mail_settings/template | Update template mail settings + + + +## UpdateTemplate + +> UpdateTemplate200Response UpdateTemplate(ctx, optional) + +Update template mail settings + +**This endpoint allows you to update your current legacy email template settings.** This setting refers to our original email templates. We currently support more fully featured [Dynamic Transactional Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/). The legacy email template setting wraps an HTML template around your email content. This can be useful for sending out marketing email and/or other HTML formatted messages. For instructions on using legacy templates, see how to [\"Create and Edit Legacy Transactional Templates](https://sendgrid.com/docs/ui/sending-email/create-and-edit-legacy-transactional-templates/). For help migrating to our current template system, see [\"Migrating from Legacy Templates\"](https://sendgrid.com/docs/ui/sending-email/migrating-from-legacy-templates/). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateTemplateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateTemplateRequest** | [**UpdateTemplateRequest**](UpdateTemplateRequest.md) | + +### Return type + +[**UpdateTemplate200Response**](UpdateTemplate200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mail_settings/docs/UpdateTemplate200Response.md b/rest/api/v3/mail_settings/docs/UpdateTemplate200Response.md new file mode 100644 index 00000000..507108c7 --- /dev/null +++ b/rest/api/v3/mail_settings/docs/UpdateTemplate200Response.md @@ -0,0 +1,12 @@ +# UpdateTemplate200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates if the legacy email template mail setting is enabled. | +**HtmlContent** | **string** | The HTML content of your legacy email template. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail_settings/docs/UpdateTemplateRequest.md b/rest/api/v3/mail_settings/docs/UpdateTemplateRequest.md new file mode 100644 index 00000000..52fb438d --- /dev/null +++ b/rest/api/v3/mail_settings/docs/UpdateTemplateRequest.md @@ -0,0 +1,12 @@ +# UpdateTemplateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates if you want to enable the legacy email template mail setting. |[optional] +**HtmlContent** | **string** | The new HTML content for your legacy email template. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mail_settings/model_list_mail_setting_200_response.go b/rest/api/v3/mail_settings/model_list_mail_setting_200_response.go new file mode 100644 index 00000000..f39bc1d9 --- /dev/null +++ b/rest/api/v3/mail_settings/model_list_mail_setting_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListMailSetting200Response struct for ListMailSetting200Response +type ListMailSetting200Response struct { + // The list of all mail settings. + Result []ListMailSetting200ResponseResultInner `json:"result"` +} diff --git a/rest/api/v3/mail_settings/model_list_mail_setting_200_response_result_inner.go b/rest/api/v3/mail_settings/model_list_mail_setting_200_response_result_inner.go new file mode 100644 index 00000000..7f4d09cb --- /dev/null +++ b/rest/api/v3/mail_settings/model_list_mail_setting_200_response_result_inner.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListMailSetting200ResponseResultInner struct for ListMailSetting200ResponseResultInner +type ListMailSetting200ResponseResultInner struct { + // The title of the mail setting. + Title string `json:"title"` + // Indicates if this mail setting is currently enabled. + Enabled bool `json:"enabled"` + // The name of the mail setting. + Name string `json:"name"` + // A description of the mail setting. + Description string `json:"description"` +} diff --git a/rest/api/v3/mail_settings/model_mail_settings_address_whitelabel200.go b/rest/api/v3/mail_settings/model_mail_settings_address_whitelabel200.go new file mode 100644 index 00000000..541343fc --- /dev/null +++ b/rest/api/v3/mail_settings/model_mail_settings_address_whitelabel200.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// MailSettingsAddressWhitelabel200 struct for MailSettingsAddressWhitelabel200 +type MailSettingsAddressWhitelabel200 struct { + // Indicates if you have an email address whitelist enabled. + Enabled *bool `json:"enabled,omitempty"` + // All email addresses that are currently on the whitelist. + List *[]string `json:"list,omitempty"` +} diff --git a/rest/api/v3/mail_settings/model_mail_settings_bounce_purge.go b/rest/api/v3/mail_settings/model_mail_settings_bounce_purge.go new file mode 100644 index 00000000..f283828f --- /dev/null +++ b/rest/api/v3/mail_settings/model_mail_settings_bounce_purge.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// MailSettingsBouncePurge struct for MailSettingsBouncePurge +type MailSettingsBouncePurge struct { + // Indicates if the bounce purge mail setting is enabled. + Enabled *bool `json:"enabled,omitempty"` + // The number of days after which SendGrid will purge all contacts from your soft bounces suppression lists. + SoftBounces *int32 `json:"soft_bounces,omitempty"` + // The number of days after which SendGrid will purge all contacts from your hard bounces suppression lists. + HardBounces *int32 `json:"hard_bounces,omitempty"` +} diff --git a/rest/api/v3/mail_settings/model_mail_settings_footer.go b/rest/api/v3/mail_settings/model_mail_settings_footer.go new file mode 100644 index 00000000..b3e44acf --- /dev/null +++ b/rest/api/v3/mail_settings/model_mail_settings_footer.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// MailSettingsFooter struct for MailSettingsFooter +type MailSettingsFooter struct { + // Indicates if the Footer mail setting is currently enabled. + Enabled *bool `json:"enabled,omitempty"` + // The custom HTML content of your email footer. + HtmlContent *string `json:"html_content,omitempty"` + // The plain text content of your email footer. + PlainContent *string `json:"plain_content,omitempty"` +} diff --git a/rest/api/v3/mail_settings/model_mail_settings_forward_bounce.go b/rest/api/v3/mail_settings/model_mail_settings_forward_bounce.go new file mode 100644 index 00000000..6b26be5d --- /dev/null +++ b/rest/api/v3/mail_settings/model_mail_settings_forward_bounce.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// MailSettingsForwardBounce struct for MailSettingsForwardBounce +type MailSettingsForwardBounce struct { + // The email address that you would like your bounce reports forwarded to. + Email *string `json:"email,omitempty"` + // Indicates if the bounce forwarding mail setting is enabled. + Enabled *bool `json:"enabled,omitempty"` +} diff --git a/rest/api/v3/mail_settings/model_mail_settings_forward_spam.go b/rest/api/v3/mail_settings/model_mail_settings_forward_spam.go new file mode 100644 index 00000000..82208334 --- /dev/null +++ b/rest/api/v3/mail_settings/model_mail_settings_forward_spam.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// MailSettingsForwardSpam struct for MailSettingsForwardSpam +type MailSettingsForwardSpam struct { + // The email address where you would like the spam reports to be forwarded. + Email *string `json:"email,omitempty"` + // Indicates if the Forward Spam setting is enabled. + Enabled *bool `json:"enabled,omitempty"` +} diff --git a/rest/api/v3/mail_settings/model_mail_settings_template200.go b/rest/api/v3/mail_settings/model_mail_settings_template200.go new file mode 100644 index 00000000..b2529e26 --- /dev/null +++ b/rest/api/v3/mail_settings/model_mail_settings_template200.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// MailSettingsTemplate200 struct for MailSettingsTemplate200 +type MailSettingsTemplate200 struct { + // Indicates if the legacy email template setting is enabled. + Enabled *bool `json:"enabled,omitempty"` + // The HTML content that you want to use for your legacy email template. + HtmlContent *string `json:"html_content,omitempty"` +} diff --git a/rest/api/v3/mail_settings/model_update_address_whitelist_request.go b/rest/api/v3/mail_settings/model_update_address_whitelist_request.go new file mode 100644 index 00000000..f1881e61 --- /dev/null +++ b/rest/api/v3/mail_settings/model_update_address_whitelist_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateAddressWhitelistRequest struct for UpdateAddressWhitelistRequest +type UpdateAddressWhitelistRequest struct { + // Indicates if your email address whitelist is enabled. + Enabled *bool `json:"enabled,omitempty"` + // Either a single email address that you want whitelisted or a domain, for which all email addresses belonging to this domain will be whitelisted. + List *[]string `json:"list,omitempty"` +} diff --git a/rest/api/v3/mail_settings/model_update_template_200_response.go b/rest/api/v3/mail_settings/model_update_template_200_response.go new file mode 100644 index 00000000..a879398f --- /dev/null +++ b/rest/api/v3/mail_settings/model_update_template_200_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateTemplate200Response struct for UpdateTemplate200Response +type UpdateTemplate200Response struct { + // Indicates if the legacy email template mail setting is enabled. + Enabled bool `json:"enabled"` + // The HTML content of your legacy email template. + HtmlContent string `json:"html_content"` +} diff --git a/rest/api/v3/mail_settings/model_update_template_request.go b/rest/api/v3/mail_settings/model_update_template_request.go new file mode 100644 index 00000000..ce310de0 --- /dev/null +++ b/rest/api/v3/mail_settings/model_update_template_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Mail Settings API +* The Twilio SendGrid Mail Settings API allows you to retrieve and configure the various Mail Settings available. Mail Settings instruct SendGrid to apply specific settings to every email that you send over [SendGrid’s Web API](https://docs.sendgrid.com/api-reference/mail-send/v3-mail-send) or [SMTP relay](https://sendgrid.com/docs/for-developers/sending-email/building-an-x-smtpapi-header/). These settings include how to embed a custom footer, how to manage blocks, spam, and bounces, and more. For a full list of Twilio SendGrid's Mail Settings, and what each one does, see [**Mail Settings**](https://sendgrid.com/docs/ui/account-and-settings/mail/). You can also manage your Mail Settings in the Twilio SendGrid application user interface. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateTemplateRequest struct for UpdateTemplateRequest +type UpdateTemplateRequest struct { + // Indicates if you want to enable the legacy email template mail setting. + Enabled *bool `json:"enabled,omitempty"` + // The new HTML content for your legacy email template. + HtmlContent *string `json:"html_content,omitempty"` +} diff --git a/rest/api/v3/mc_custom_fields/README.md b/rest/api/v3/mc_custom_fields/README.md new file mode 100644 index 00000000..11b6c285 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/README.md @@ -0,0 +1,78 @@ +# Go API client for + +The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. + +With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. + +You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:02.005526+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateFieldDefinition* | [**CreateFieldDefinition**](docs/CreateFieldDefinition.md#createfielddefinition) | **Post** /v3/marketing/field_definitions | Create Custom Field Definition +*DeleteFieldDefinition* | [**DeleteFieldDefinition**](docs/DeleteFieldDefinition.md#deletefielddefinition) | **Delete** /v3/marketing/field_definitions/{CustomFieldId} | Delete Custom Field Definition +*ListFieldDefinition* | [**ListFieldDefinition**](docs/ListFieldDefinition.md#listfielddefinition) | **Get** /v3/marketing/field_definitions | Get All Field Definitions +*UpdateFieldDefinition* | [**UpdateFieldDefinition**](docs/UpdateFieldDefinition.md#updatefielddefinition) | **Patch** /v3/marketing/field_definitions/{CustomFieldId} | Update Custom Field Definition + + +## Documentation For Models + + - [CreateFieldDefinition200Response](CreateFieldDefinition200Response.md) + - [CreateFieldDefinition400Response](CreateFieldDefinition400Response.md) + - [CreateFieldDefinitionRequest](CreateFieldDefinitionRequest.md) + - [CustomFieldDefinitionsResponse](CustomFieldDefinitionsResponse.md) + - [CustomFieldsError](CustomFieldsError.md) + - [FieldType](FieldType.md) + - [FieldType1](FieldType1.md) + - [FieldType2](FieldType2.md) + - [ListFieldDefinition200Response](ListFieldDefinition200Response.md) + - [Metadata](Metadata.md) + - [ReservedFieldDefinitionsResponseInner](ReservedFieldDefinitionsResponseInner.md) + - [UpdateFieldDefinitionRequest](UpdateFieldDefinitionRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/mc_custom_fields/api_create_field_definition.go b/rest/api/v3/mc_custom_fields/api_create_field_definition.go new file mode 100644 index 00000000..ebd824b9 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/api_create_field_definition.go @@ -0,0 +1,73 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateFieldDefinitionParam struct { + // + CreateFieldDefinitionRequest *CreateFieldDefinitionRequest `json:"CreateFieldDefinitionRequest,omitempty"` +} + +func (params *CreateFieldDefinitionParam) SetCreateFieldDefinitionRequest(CreateFieldDefinitionRequest CreateFieldDefinitionRequest) *CreateFieldDefinitionParam { + params.CreateFieldDefinitionRequest = &CreateFieldDefinitionRequest + return params +} + +// **This endpoint creates a new custom field definition.** Custom field definitions are created with the given `name` and `field_type`. Although field names are stored in a case-sensitive manner, all field names must be case-insensitively unique. This means you may create a field named `CamelCase` or `camelcase`, but not both. Additionally, a Custom Field name cannot collide with any Reserved Field names. You should save the returned `id` value in order to update or delete the field at a later date. You can have up to 500 custom fields. The custom field name should be created using only alphanumeric characters (A-Z and 0-9) and underscores (\\_). Custom fields can only begin with letters A-Z or underscores (_). The field type can be date, text, or number fields. The field type is important for creating segments from your contact database. **Note: Creating a custom field that begins with a number will cause issues with sending in Marketing Campaigns.** +func (c *ApiService) CreateFieldDefinition(params *CreateFieldDefinitionParam) (interface{}, error) { + path := "/v3/marketing/field_definitions" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateFieldDefinitionRequest != nil { + b, err := json.Marshal(*params.CreateFieldDefinitionRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &CreateFieldDefinition200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &CreateFieldDefinition400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_custom_fields/api_delete_field_definition.go b/rest/api/v3/mc_custom_fields/api_delete_field_definition.go new file mode 100644 index 00000000..b16b4bbf --- /dev/null +++ b/rest/api/v3/mc_custom_fields/api_delete_field_definition.go @@ -0,0 +1,61 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteFieldDefinitionParam struct { + // + CustomFieldId *string `json:"custom_field_id"` +} + +func (params *DeleteFieldDefinitionParam) SetCustomFieldId(CustomFieldId string) *DeleteFieldDefinitionParam { + params.CustomFieldId = &CustomFieldId + return params +} + +// **This endpoint deletes a defined Custom Field.** You can delete only Custom Fields; Reserved Fields cannot be deleted. +func (c *ApiService) DeleteFieldDefinition(params *DeleteFieldDefinitionParam) (interface{}, error) { + path := "/v3/marketing/field_definitions/{CustomFieldId}" + if params != nil && params.CustomFieldId != nil { + path = strings.Replace(path, "{"+"CustomFieldId"+"}", *params.CustomFieldId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 404 { + ps := &CreateFieldDefinition400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_custom_fields/api_list_field_definition.go b/rest/api/v3/mc_custom_fields/api_list_field_definition.go new file mode 100644 index 00000000..d2724fc0 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/api_list_field_definition.go @@ -0,0 +1,49 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListFieldDefinitionParam struct { +} + +// **This endpoint retrieves all defined Custom Fields and Reserved Fields.** +func (c *ApiService) ListFieldDefinition() (interface{}, error) { + path := "/v3/marketing/field_definitions" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListFieldDefinition200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_custom_fields/api_service.go b/rest/api/v3/mc_custom_fields/api_service.go new file mode 100644 index 00000000..c8f8f2a4 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/mc_custom_fields/api_update_field_definition.go b/rest/api/v3/mc_custom_fields/api_update_field_definition.go new file mode 100644 index 00000000..a7f4164d --- /dev/null +++ b/rest/api/v3/mc_custom_fields/api_update_field_definition.go @@ -0,0 +1,92 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateFieldDefinitionParam struct { + // + CustomFieldId *string `json:"custom_field_id"` + // + UpdateFieldDefinitionRequest *UpdateFieldDefinitionRequest `json:"UpdateFieldDefinitionRequest,omitempty"` +} + +func (params *UpdateFieldDefinitionParam) SetCustomFieldId(CustomFieldId string) *UpdateFieldDefinitionParam { + params.CustomFieldId = &CustomFieldId + return params +} +func (params *UpdateFieldDefinitionParam) SetUpdateFieldDefinitionRequest(UpdateFieldDefinitionRequest UpdateFieldDefinitionRequest) *UpdateFieldDefinitionParam { + params.UpdateFieldDefinitionRequest = &UpdateFieldDefinitionRequest + return params +} + +// **This endpoint allows you to update a defined Custom Field.** Only your Custom fields can be modified; Reserved Fields cannot be updated. +func (c *ApiService) UpdateFieldDefinition(params *UpdateFieldDefinitionParam) (interface{}, error) { + path := "/v3/marketing/field_definitions/{CustomFieldId}" + if params != nil && params.CustomFieldId != nil { + path = strings.Replace(path, "{"+"CustomFieldId"+"}", *params.CustomFieldId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateFieldDefinitionRequest != nil { + b, err := json.Marshal(*params.UpdateFieldDefinitionRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &CreateFieldDefinition200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &CreateFieldDefinition400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &CreateFieldDefinition400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition.md b/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition.md new file mode 100644 index 00000000..08bd9259 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition.md @@ -0,0 +1,48 @@ +# CreateFieldDefinition + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateFieldDefinition**](CreateFieldDefinition.md#CreateFieldDefinition) | **Post** /v3/marketing/field_definitions | Create Custom Field Definition + + + +## CreateFieldDefinition + +> CreateFieldDefinition200Response CreateFieldDefinition(ctx, optional) + +Create Custom Field Definition + +**This endpoint creates a new custom field definition.** Custom field definitions are created with the given `name` and `field_type`. Although field names are stored in a case-sensitive manner, all field names must be case-insensitively unique. This means you may create a field named `CamelCase` or `camelcase`, but not both. Additionally, a Custom Field name cannot collide with any Reserved Field names. You should save the returned `id` value in order to update or delete the field at a later date. You can have up to 500 custom fields. The custom field name should be created using only alphanumeric characters (A-Z and 0-9) and underscores (\\_). Custom fields can only begin with letters A-Z or underscores (_). The field type can be date, text, or number fields. The field type is important for creating segments from your contact database. **Note: Creating a custom field that begins with a number will cause issues with sending in Marketing Campaigns.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateFieldDefinitionParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**CreateFieldDefinitionRequest** | [**CreateFieldDefinitionRequest**](CreateFieldDefinitionRequest.md) | + +### Return type + +[**CreateFieldDefinition200Response**](CreateFieldDefinition200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition200Response.md b/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition200Response.md new file mode 100644 index 00000000..a68cd18e --- /dev/null +++ b/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition200Response.md @@ -0,0 +1,14 @@ +# CreateFieldDefinition200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**Name** | **string** | | +**FieldType** | [**FieldType2**](FieldType2.md) | | +**Metadata** | [**Metadata**](Metadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition400Response.md b/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition400Response.md new file mode 100644 index 00000000..94eaa0b9 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinition400Response.md @@ -0,0 +1,11 @@ +# CreateFieldDefinition400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]CustomFieldsError**](CustomFieldsError.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinitionRequest.md b/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinitionRequest.md new file mode 100644 index 00000000..c1198cfc --- /dev/null +++ b/rest/api/v3/mc_custom_fields/docs/CreateFieldDefinitionRequest.md @@ -0,0 +1,12 @@ +# CreateFieldDefinitionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | +**FieldType** | [**FieldType**](FieldType.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_custom_fields/docs/CustomFieldDefinitionsResponse.md b/rest/api/v3/mc_custom_fields/docs/CustomFieldDefinitionsResponse.md new file mode 100644 index 00000000..c899e1bd --- /dev/null +++ b/rest/api/v3/mc_custom_fields/docs/CustomFieldDefinitionsResponse.md @@ -0,0 +1,13 @@ +# CustomFieldDefinitionsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**Name** | **string** | | +**FieldType** | [**FieldType2**](FieldType2.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_custom_fields/docs/CustomFieldsError.md b/rest/api/v3/mc_custom_fields/docs/CustomFieldsError.md new file mode 100644 index 00000000..efda7914 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/docs/CustomFieldsError.md @@ -0,0 +1,14 @@ +# CustomFieldsError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | | +**Field** | **string** | |[optional] +**ErrorId** | **string** | |[optional] +**Parameter** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_custom_fields/docs/DeleteFieldDefinition.md b/rest/api/v3/mc_custom_fields/docs/DeleteFieldDefinition.md new file mode 100644 index 00000000..4d760132 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/docs/DeleteFieldDefinition.md @@ -0,0 +1,51 @@ +# DeleteFieldDefinition + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteFieldDefinition**](DeleteFieldDefinition.md#DeleteFieldDefinition) | **Delete** /v3/marketing/field_definitions/{CustomFieldId} | Delete Custom Field Definition + + + +## DeleteFieldDefinition + +> DeleteFieldDefinition(ctx, CustomFieldId) + +Delete Custom Field Definition + +**This endpoint deletes a defined Custom Field.** You can delete only Custom Fields; Reserved Fields cannot be deleted. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CustomFieldId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteFieldDefinitionParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_custom_fields/docs/FieldType.md b/rest/api/v3/mc_custom_fields/docs/FieldType.md new file mode 100644 index 00000000..39cade55 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/docs/FieldType.md @@ -0,0 +1,14 @@ +# FieldType + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TEXT** | string | (value: `"Text"`) +**NUMBER** | string | (value: `"Number"`) +**DATE** | string | (value: `"Date"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_custom_fields/docs/FieldType1.md b/rest/api/v3/mc_custom_fields/docs/FieldType1.md new file mode 100644 index 00000000..0d96119b --- /dev/null +++ b/rest/api/v3/mc_custom_fields/docs/FieldType1.md @@ -0,0 +1,14 @@ +# FieldType1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TEXT** | string | (value: `"Text"`) +**NUMBER** | string | (value: `"Number"`) +**DATE** | string | (value: `"Date"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_custom_fields/docs/FieldType2.md b/rest/api/v3/mc_custom_fields/docs/FieldType2.md new file mode 100644 index 00000000..df80145c --- /dev/null +++ b/rest/api/v3/mc_custom_fields/docs/FieldType2.md @@ -0,0 +1,14 @@ +# FieldType2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TEXT** | string | (value: `"Text"`) +**NUMBER** | string | (value: `"Number"`) +**DATE** | string | (value: `"Date"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_custom_fields/docs/ListFieldDefinition.md b/rest/api/v3/mc_custom_fields/docs/ListFieldDefinition.md new file mode 100644 index 00000000..19ca33a6 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/docs/ListFieldDefinition.md @@ -0,0 +1,44 @@ +# ListFieldDefinition + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListFieldDefinition**](ListFieldDefinition.md#ListFieldDefinition) | **Get** /v3/marketing/field_definitions | Get All Field Definitions + + + +## ListFieldDefinition + +> ListFieldDefinition200Response ListFieldDefinition(ctx, ) + +Get All Field Definitions + +**This endpoint retrieves all defined Custom Fields and Reserved Fields.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListFieldDefinitionParams struct + + +### Return type + +[**ListFieldDefinition200Response**](ListFieldDefinition200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_custom_fields/docs/ListFieldDefinition200Response.md b/rest/api/v3/mc_custom_fields/docs/ListFieldDefinition200Response.md new file mode 100644 index 00000000..a3b477f4 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/docs/ListFieldDefinition200Response.md @@ -0,0 +1,13 @@ +# ListFieldDefinition200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomFields** | [**[]CustomFieldDefinitionsResponse**](CustomFieldDefinitionsResponse.md) | | +**ReservedFields** | [**[]ReservedFieldDefinitionsResponseInner**](ReservedFieldDefinitionsResponseInner.md) | | +**Metadata** | [**Metadata**](Metadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_custom_fields/docs/Metadata.md b/rest/api/v3/mc_custom_fields/docs/Metadata.md new file mode 100644 index 00000000..6121300c --- /dev/null +++ b/rest/api/v3/mc_custom_fields/docs/Metadata.md @@ -0,0 +1,14 @@ +# Metadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prev** | **string** | |[optional] +**Self** | **string** | |[optional] +**Next** | **string** | |[optional] +**Count** | **int32** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_custom_fields/docs/ReservedFieldDefinitionsResponseInner.md b/rest/api/v3/mc_custom_fields/docs/ReservedFieldDefinitionsResponseInner.md new file mode 100644 index 00000000..35e65741 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/docs/ReservedFieldDefinitionsResponseInner.md @@ -0,0 +1,13 @@ +# ReservedFieldDefinitionsResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | |[optional] +**FieldType** | [**FieldType1**](FieldType1.md) | |[optional] +**ReadOnly** | **bool** | When `true` this means API consumers are unable to set the value of this field on contacts. |[optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_custom_fields/docs/UpdateFieldDefinition.md b/rest/api/v3/mc_custom_fields/docs/UpdateFieldDefinition.md new file mode 100644 index 00000000..98914789 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/docs/UpdateFieldDefinition.md @@ -0,0 +1,52 @@ +# UpdateFieldDefinition + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateFieldDefinition**](UpdateFieldDefinition.md#UpdateFieldDefinition) | **Patch** /v3/marketing/field_definitions/{CustomFieldId} | Update Custom Field Definition + + + +## UpdateFieldDefinition + +> CreateFieldDefinition200Response UpdateFieldDefinition(ctx, CustomFieldIdoptional) + +Update Custom Field Definition + +**This endpoint allows you to update a defined Custom Field.** Only your Custom fields can be modified; Reserved Fields cannot be updated. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CustomFieldId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateFieldDefinitionParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**UpdateFieldDefinitionRequest** | [**UpdateFieldDefinitionRequest**](UpdateFieldDefinitionRequest.md) | + +### Return type + +[**CreateFieldDefinition200Response**](CreateFieldDefinition200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_custom_fields/docs/UpdateFieldDefinitionRequest.md b/rest/api/v3/mc_custom_fields/docs/UpdateFieldDefinitionRequest.md new file mode 100644 index 00000000..f386d9b3 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/docs/UpdateFieldDefinitionRequest.md @@ -0,0 +1,11 @@ +# UpdateFieldDefinitionRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_custom_fields/model_create_field_definition_200_response.go b/rest/api/v3/mc_custom_fields/model_create_field_definition_200_response.go new file mode 100644 index 00000000..214fb310 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/model_create_field_definition_200_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateFieldDefinition200Response struct for CreateFieldDefinition200Response +type CreateFieldDefinition200Response struct { + Id string `json:"id"` + Name string `json:"name"` + FieldType FieldType2 `json:"field_type"` + Metadata *Metadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/mc_custom_fields/model_create_field_definition_400_response.go b/rest/api/v3/mc_custom_fields/model_create_field_definition_400_response.go new file mode 100644 index 00000000..1ef18211 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/model_create_field_definition_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateFieldDefinition400Response struct for CreateFieldDefinition400Response +type CreateFieldDefinition400Response struct { + Errors []CustomFieldsError `json:"errors"` +} diff --git a/rest/api/v3/mc_custom_fields/model_create_field_definition_request.go b/rest/api/v3/mc_custom_fields/model_create_field_definition_request.go new file mode 100644 index 00000000..599343f6 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/model_create_field_definition_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateFieldDefinitionRequest struct for CreateFieldDefinitionRequest +type CreateFieldDefinitionRequest struct { + Name string `json:"name"` + FieldType FieldType `json:"field_type"` +} diff --git a/rest/api/v3/mc_custom_fields/model_custom_field_definitions_response.go b/rest/api/v3/mc_custom_fields/model_custom_field_definitions_response.go new file mode 100644 index 00000000..029a2c84 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/model_custom_field_definitions_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CustomFieldDefinitionsResponse struct for CustomFieldDefinitionsResponse +type CustomFieldDefinitionsResponse struct { + Id string `json:"id"` + Name string `json:"name"` + FieldType FieldType2 `json:"field_type"` +} diff --git a/rest/api/v3/mc_custom_fields/model_custom_fields_error.go b/rest/api/v3/mc_custom_fields/model_custom_fields_error.go new file mode 100644 index 00000000..c763d2ec --- /dev/null +++ b/rest/api/v3/mc_custom_fields/model_custom_fields_error.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CustomFieldsError struct for CustomFieldsError +type CustomFieldsError struct { + Message string `json:"message"` + Field *string `json:"field,omitempty"` + ErrorId *string `json:"error_id,omitempty"` + Parameter *string `json:"parameter,omitempty"` +} diff --git a/rest/api/v3/mc_custom_fields/model_field_type.go b/rest/api/v3/mc_custom_fields/model_field_type.go new file mode 100644 index 00000000..d667c56f --- /dev/null +++ b/rest/api/v3/mc_custom_fields/model_field_type.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// FieldType the model 'FieldType' +type FieldType string + +// List of FieldType +const ( + FIELDTYPE_TEXT FieldType = "Text" + FIELDTYPE_NUMBER FieldType = "Number" + FIELDTYPE_DATE FieldType = "Date" +) diff --git a/rest/api/v3/mc_custom_fields/model_field_type1.go b/rest/api/v3/mc_custom_fields/model_field_type1.go new file mode 100644 index 00000000..fb7ad5b7 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/model_field_type1.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// FieldType1 the model 'FieldType1' +type FieldType1 string + +// List of FieldType1 +const ( + FIELDTYPE1_TEXT FieldType1 = "Text" + FIELDTYPE1_NUMBER FieldType1 = "Number" + FIELDTYPE1_DATE FieldType1 = "Date" +) diff --git a/rest/api/v3/mc_custom_fields/model_field_type2.go b/rest/api/v3/mc_custom_fields/model_field_type2.go new file mode 100644 index 00000000..93faa534 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/model_field_type2.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// FieldType2 the model 'FieldType2' +type FieldType2 string + +// List of FieldType2 +const ( + FIELDTYPE2_TEXT FieldType2 = "Text" + FIELDTYPE2_NUMBER FieldType2 = "Number" + FIELDTYPE2_DATE FieldType2 = "Date" +) diff --git a/rest/api/v3/mc_custom_fields/model_list_field_definition_200_response.go b/rest/api/v3/mc_custom_fields/model_list_field_definition_200_response.go new file mode 100644 index 00000000..11dd5c80 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/model_list_field_definition_200_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListFieldDefinition200Response struct for ListFieldDefinition200Response +type ListFieldDefinition200Response struct { + CustomFields []CustomFieldDefinitionsResponse `json:"custom_fields"` + ReservedFields []ReservedFieldDefinitionsResponseInner `json:"reserved_fields"` + Metadata *Metadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/mc_custom_fields/model_metadata.go b/rest/api/v3/mc_custom_fields/model_metadata.go new file mode 100644 index 00000000..99bc91cc --- /dev/null +++ b/rest/api/v3/mc_custom_fields/model_metadata.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Metadata struct for Metadata +type Metadata struct { + Prev *string `json:"prev,omitempty"` + Self *string `json:"self,omitempty"` + Next *string `json:"next,omitempty"` + Count *int32 `json:"count,omitempty"` +} diff --git a/rest/api/v3/mc_custom_fields/model_reserved_field_definitions_response_inner.go b/rest/api/v3/mc_custom_fields/model_reserved_field_definitions_response_inner.go new file mode 100644 index 00000000..ef81cb82 --- /dev/null +++ b/rest/api/v3/mc_custom_fields/model_reserved_field_definitions_response_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ReservedFieldDefinitionsResponseInner struct for ReservedFieldDefinitionsResponseInner +type ReservedFieldDefinitionsResponseInner struct { + Name *string `json:"name,omitempty"` + FieldType *FieldType1 `json:"field_type,omitempty"` + // When `true` this means API consumers are unable to set the value of this field on contacts. + ReadOnly *bool `json:"read_only,omitempty"` +} diff --git a/rest/api/v3/mc_custom_fields/model_update_field_definition_request.go b/rest/api/v3/mc_custom_fields/model_update_field_definition_request.go new file mode 100644 index 00000000..1172b9ce --- /dev/null +++ b/rest/api/v3/mc_custom_fields/model_update_field_definition_request.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Custom Fields API +* The Twilio SendGrid Marketing Campaigns Custom Fields API allows you to add extra information about your marketing contacts that is relevant to your needs. For example, a fashion retailer might create a custom field for customers' shoe sizes, an ice cream shop might store customers' favorite flavors in a custom field, and you can create custom fields that make sense for your business. With custom fields, you can also create [segments](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2/) based on custom fields values. Your custom fields are completely customizable to the use-cases and user information that you need. You can also manage your Custom Fields using the SendGrid application user interface. See [**Using Custom Fields**](https://docs.sendgrid.com/ui/managing-contacts/custom-fields) for more information, including a list of Reserved Fields. You can also manage your custom fields in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/custom-fields). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateFieldDefinitionRequest struct for UpdateFieldDefinitionRequest +type UpdateFieldDefinitionRequest struct { + Name string `json:"name"` +} diff --git a/rest/api/v3/mc_designs/README.md b/rest/api/v3/mc_designs/README.md new file mode 100644 index 00000000..cfb76ce1 --- /dev/null +++ b/rest/api/v3/mc_designs/README.md @@ -0,0 +1,84 @@ +# Go API client for + +The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). + +The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. + +You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. + +The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:02.002686+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateDesign* | [**CreateDesign**](docs/CreateDesign.md#createdesign) | **Post** /v3/designs | Create Design +*DeleteDesign* | [**DeleteDesign**](docs/DeleteDesign.md#deletedesign) | **Delete** /v3/designs/{Id} | Delete Design +*DuplicateDesign* | [**DuplicateDesign**](docs/DuplicateDesign.md#duplicatedesign) | **Post** /v3/designs/{Id} | Duplicate Design +*DuplicatePreBuiltDesign* | [**DuplicatePreBuiltDesign**](docs/DuplicatePreBuiltDesign.md#duplicateprebuiltdesign) | **Post** /v3/designs/pre-builts/{Id} | Duplicate SendGrid Pre-built Design +*GetDesign* | [**GetDesign**](docs/GetDesign.md#getdesign) | **Get** /v3/designs/{Id} | Get Design +*GetPreBuiltDesign* | [**GetPreBuiltDesign**](docs/GetPreBuiltDesign.md#getprebuiltdesign) | **Get** /v3/designs/pre-builts/{Id} | Get SendGrid Pre-built Design +*ListDesign* | [**ListDesign**](docs/ListDesign.md#listdesign) | **Get** /v3/designs | List Designs +*ListPreBuiltDesign* | [**ListPreBuiltDesign**](docs/ListPreBuiltDesign.md#listprebuiltdesign) | **Get** /v3/designs/pre-builts | List SendGrid Pre-built Designs +*UpdateDesign* | [**UpdateDesign**](docs/UpdateDesign.md#updatedesign) | **Patch** /v3/designs/{Id} | Update Design + + +## Documentation For Models + + - [ApiError](ApiError.md) + - [ApiErrors](ApiErrors.md) + - [DesignCommonProperties](DesignCommonProperties.md) + - [DesignDuplicateInput](DesignDuplicateInput.md) + - [DesignInput](DesignInput.md) + - [DesignOutput](DesignOutput.md) + - [DesignOutputSummary](DesignOutputSummary.md) + - [Editor](Editor.md) + - [ListDesign200Response](ListDesign200Response.md) + - [Metadata](Metadata.md) + - [UpdateDesignRequest](UpdateDesignRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/mc_designs/api_create_design.go b/rest/api/v3/mc_designs/api_create_design.go new file mode 100644 index 00000000..4d95da09 --- /dev/null +++ b/rest/api/v3/mc_designs/api_create_design.go @@ -0,0 +1,73 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateDesignParam struct { + // + DesignInput *DesignInput `json:"DesignInput,omitempty"` +} + +func (params *CreateDesignParam) SetDesignInput(DesignInput DesignInput) *CreateDesignParam { + params.DesignInput = &DesignInput + return params +} + +// **This endpoint allows you to create a new design**. You can add a new design by passing data, including a string of HTML email content, to `/designs`. When creating designs from scratch, be aware of the styling constraints inherent to many email clients. For a list of best practices, see our guide to [Cross-Platform Email Design](https://sendgrid.com/docs/ui/sending-email/cross-platform-html-design/). The Design Library can also convert your design’s HTML elements into drag and drop modules that are editable in the Designs Library user interface. For more, visit the [Design and Code Editor documentation](https://sendgrid.com/docs/ui/sending-email/editor/#drag--drop-markup). Because the `/designs` endpoint makes it easy to add designs, you can create a design with your preferred tooling or migrate designs you already own without relying on the Design Library UI. +func (c *ApiService) CreateDesign(params *CreateDesignParam) (interface{}, error) { + path := "/v3/designs" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.DesignInput != nil { + b, err := json.Marshal(*params.DesignInput) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &DesignOutput{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ApiErrors{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_designs/api_delete_design.go b/rest/api/v3/mc_designs/api_delete_design.go new file mode 100644 index 00000000..3cb9db85 --- /dev/null +++ b/rest/api/v3/mc_designs/api_delete_design.go @@ -0,0 +1,77 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteDesignParam struct { + // The ID of the Design you want to duplicate. + Id *string `json:"id"` +} + +func (params *DeleteDesignParam) SetId(Id string) *DeleteDesignParam { + params.Id = &Id + return params +} + +// **This endpoint allows you to delete a single design**. Be sure to check the ID of the design you intend to delete before making this request; deleting a design is a permanent action. +func (c *ApiService) DeleteDesign(params *DeleteDesignParam) (interface{}, error) { + path := "/v3/designs/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ApiErrors{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ApiErrors{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_designs/api_duplicate_design.go b/rest/api/v3/mc_designs/api_duplicate_design.go new file mode 100644 index 00000000..10379e3a --- /dev/null +++ b/rest/api/v3/mc_designs/api_duplicate_design.go @@ -0,0 +1,92 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DuplicateDesignParam struct { + // The ID of the Design you want to duplicate. + Id *string `json:"id"` + // + DesignDuplicateInput *DesignDuplicateInput `json:"DesignDuplicateInput,omitempty"` +} + +func (params *DuplicateDesignParam) SetId(Id string) *DuplicateDesignParam { + params.Id = &Id + return params +} +func (params *DuplicateDesignParam) SetDesignDuplicateInput(DesignDuplicateInput DesignDuplicateInput) *DuplicateDesignParam { + params.DesignDuplicateInput = &DesignDuplicateInput + return params +} + +// **This endpoint allows you to duplicate one of your existing designs**. Modifying an existing design is often the easiest way to create something new. You are not required to pass any data in the body of a request to this endpoint. If you choose to leave the `name` field blank, your duplicate will be assigned the name of the design it was copied from with the text \"Duplicate: \" prepended to it. This name change is only a convenience, as the duplicate will be assigned a unique ID that differentiates it from your other designs. You can modify your duplicate’s name at the time of creation by passing an updated value to the `name` field when making the initial request. More on retrieving design IDs can be found below. +func (c *ApiService) DuplicateDesign(params *DuplicateDesignParam) (interface{}, error) { + path := "/v3/designs/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.DesignDuplicateInput != nil { + b, err := json.Marshal(*params.DesignDuplicateInput) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &DesignOutput{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ApiError{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ApiErrors{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_designs/api_duplicate_pre_built_design.go b/rest/api/v3/mc_designs/api_duplicate_pre_built_design.go new file mode 100644 index 00000000..d4b439e4 --- /dev/null +++ b/rest/api/v3/mc_designs/api_duplicate_pre_built_design.go @@ -0,0 +1,92 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DuplicatePreBuiltDesignParam struct { + // The ID of the pre-built Design you want to duplicate. + Id *string `json:"id"` + // + DesignDuplicateInput *DesignDuplicateInput `json:"DesignDuplicateInput,omitempty"` +} + +func (params *DuplicatePreBuiltDesignParam) SetId(Id string) *DuplicatePreBuiltDesignParam { + params.Id = &Id + return params +} +func (params *DuplicatePreBuiltDesignParam) SetDesignDuplicateInput(DesignDuplicateInput DesignDuplicateInput) *DuplicatePreBuiltDesignParam { + params.DesignDuplicateInput = &DesignDuplicateInput + return params +} + +// **This endpoint allows you to duplicate one of the pre-built Twilio SendGrid designs**. Like duplicating one of your existing designs, you are not required to pass any data in the body of a request to this endpoint. If you choose to leave the `name` field blank, your duplicate will be assigned the name of the design it was copied from with the text \"Duplicate: \" prepended to it. This name change is only a convenience, as the duplicate design will be assigned a unique ID that differentiates it from your other designs. You can retrieve the IDs for Twilio SendGrid pre-built designs using the \"List SendGrid Pre-built Designs\" endpoint. You can modify your duplicate’s name at the time of creation by passing an updated value to the `name` field when making the initial request. More on retrieving design IDs can be found above. +func (c *ApiService) DuplicatePreBuiltDesign(params *DuplicatePreBuiltDesignParam) (interface{}, error) { + path := "/v3/designs/pre-builts/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.DesignDuplicateInput != nil { + b, err := json.Marshal(*params.DesignDuplicateInput) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &DesignOutput{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ApiErrors{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ApiErrors{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_designs/api_get_design.go b/rest/api/v3/mc_designs/api_get_design.go new file mode 100644 index 00000000..05438323 --- /dev/null +++ b/rest/api/v3/mc_designs/api_get_design.go @@ -0,0 +1,77 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetDesignParam struct { + // The ID of the Design you want to duplicate. + Id *string `json:"id"` +} + +func (params *GetDesignParam) SetId(Id string) *GetDesignParam { + params.Id = &Id + return params +} + +// **This endpoint allows you to retrieve a single design**. A GET request to `/designs/{id}` will retrieve details about a specific design in your Design Library. This endpoint is valuable when retrieving information stored in a field that you wish to update using a PATCH request. +func (c *ApiService) GetDesign(params *GetDesignParam) (interface{}, error) { + path := "/v3/designs/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &DesignOutput{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ApiErrors{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ApiErrors{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_designs/api_get_pre_built_design.go b/rest/api/v3/mc_designs/api_get_pre_built_design.go new file mode 100644 index 00000000..7cee9d39 --- /dev/null +++ b/rest/api/v3/mc_designs/api_get_pre_built_design.go @@ -0,0 +1,77 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetPreBuiltDesignParam struct { + // The ID of the pre-built Design you want to duplicate. + Id *string `json:"id"` +} + +func (params *GetPreBuiltDesignParam) SetId(Id string) *GetPreBuiltDesignParam { + params.Id = &Id + return params +} + +// **This endpoint allows you to retrieve a single pre-built design**. A GET request to `/designs/pre-builts/{id}` will retrieve details about a specific pre-built design. This endpoint is valuable when retrieving details about a pre-built design that you wish to duplicate and modify. +func (c *ApiService) GetPreBuiltDesign(params *GetPreBuiltDesignParam) (interface{}, error) { + path := "/v3/designs/pre-builts/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &DesignOutput{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ApiErrors{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ApiErrors{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_designs/api_list_design.go b/rest/api/v3/mc_designs/api_list_design.go new file mode 100644 index 00000000..e8c93d96 --- /dev/null +++ b/rest/api/v3/mc_designs/api_list_design.go @@ -0,0 +1,79 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListDesignParam struct { + // number of results to return + PageSize *int32 `json:"page_size,omitempty"` + // token corresponding to a specific page of results, as provided by metadata + PageToken *string `json:"page_token,omitempty"` + // set to false to return all fields + Summary *bool `json:"summary,omitempty"` +} + +func (params *ListDesignParam) SetPageSize(PageSize int32) *ListDesignParam { + params.PageSize = &PageSize + return params +} +func (params *ListDesignParam) SetPageToken(PageToken string) *ListDesignParam { + params.PageToken = &PageToken + return params +} +func (params *ListDesignParam) SetSummary(Summary bool) *ListDesignParam { + params.Summary = &Summary + return params +} + +// **This endpoint allows you to retrieve a list of designs already stored in your Design Library**. A GET request to `/designs` will return a list of your existing designs. This endpoint will not return the pre-built Twilio SendGrid designs. Pre-built designs can be retrieved using the `/designs/pre-builts` endpoint, which is detailed below. By default, you will receive 100 results per request; however, you can modify the number of results returned by passing an integer to the `page_size` query parameter. +func (c *ApiService) ListDesign(params *ListDesignParam) (interface{}, error) { + path := "/v3/designs" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + if params != nil && params.PageToken != nil { + data.Set("page_token", *params.PageToken) + } + if params != nil && params.Summary != nil { + data.Set("summary", fmt.Sprint(*params.Summary)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListDesign200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_designs/api_list_pre_built_design.go b/rest/api/v3/mc_designs/api_list_pre_built_design.go new file mode 100644 index 00000000..8b80f3fa --- /dev/null +++ b/rest/api/v3/mc_designs/api_list_pre_built_design.go @@ -0,0 +1,79 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListPreBuiltDesignParam struct { + // number of results to return + PageSize *int32 `json:"page_size,omitempty"` + // token corresponding to a specific page of results, as provided by metadata + PageToken *string `json:"page_token,omitempty"` + // set to false to return all fields + Summary *bool `json:"summary,omitempty"` +} + +func (params *ListPreBuiltDesignParam) SetPageSize(PageSize int32) *ListPreBuiltDesignParam { + params.PageSize = &PageSize + return params +} +func (params *ListPreBuiltDesignParam) SetPageToken(PageToken string) *ListPreBuiltDesignParam { + params.PageToken = &PageToken + return params +} +func (params *ListPreBuiltDesignParam) SetSummary(Summary bool) *ListPreBuiltDesignParam { + params.Summary = &Summary + return params +} + +// **This endpoint allows you to retrieve a list of pre-built designs provided by Twilio SendGrid**. Unlike the `/designs` endpoint where *your* designs are stored, a GET request made to `designs/pre-builts` will retrieve a list of the pre-built Twilio SendGrid designs. This endpoint will not return the designs stored in your Design Library. By default, you will receive 100 results per request; however, you can modify the number of results returned by passing an integer to the `page_size` query parameter. This endpoint is useful for retrieving the IDs of Twilio SendGrid designs that you want to duplicate and modify. +func (c *ApiService) ListPreBuiltDesign(params *ListPreBuiltDesignParam) (interface{}, error) { + path := "/v3/designs/pre-builts" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + if params != nil && params.PageToken != nil { + data.Set("page_token", *params.PageToken) + } + if params != nil && params.Summary != nil { + data.Set("summary", fmt.Sprint(*params.Summary)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListDesign200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_designs/api_service.go b/rest/api/v3/mc_designs/api_service.go new file mode 100644 index 00000000..d0bf8bbe --- /dev/null +++ b/rest/api/v3/mc_designs/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/mc_designs/api_update_design.go b/rest/api/v3/mc_designs/api_update_design.go new file mode 100644 index 00000000..66cb8bae --- /dev/null +++ b/rest/api/v3/mc_designs/api_update_design.go @@ -0,0 +1,92 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateDesignParam struct { + // The ID of the Design you want to duplicate. + Id *string `json:"id"` + // + UpdateDesignRequest *UpdateDesignRequest `json:"UpdateDesignRequest,omitempty"` +} + +func (params *UpdateDesignParam) SetId(Id string) *UpdateDesignParam { + params.Id = &Id + return params +} +func (params *UpdateDesignParam) SetUpdateDesignRequest(UpdateDesignRequest UpdateDesignRequest) *UpdateDesignParam { + params.UpdateDesignRequest = &UpdateDesignRequest + return params +} + +// **This endpoint allows you to edit a design**. The Design API supports PATCH requests, which allow you to make partial updates to a single design. Passing data to a specific field will update only the data stored in that field; all other fields will be unaltered. For example, updating a design's name requires that you make a PATCH request to this endpoint with data specified for the `name` field only. ``` { \"name\": \"\" } ``` +func (c *ApiService) UpdateDesign(params *UpdateDesignParam) (interface{}, error) { + path := "/v3/designs/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateDesignRequest != nil { + b, err := json.Marshal(*params.UpdateDesignRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &DesignOutput{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ApiErrors{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ApiErrors{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_designs/docs/ApiError.md b/rest/api/v3/mc_designs/docs/ApiError.md new file mode 100644 index 00000000..65ebab4d --- /dev/null +++ b/rest/api/v3/mc_designs/docs/ApiError.md @@ -0,0 +1,13 @@ +# ApiError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | | +**Field** | **string** | | +**ErrorId** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_designs/docs/ApiErrors.md b/rest/api/v3/mc_designs/docs/ApiErrors.md new file mode 100644 index 00000000..9228c171 --- /dev/null +++ b/rest/api/v3/mc_designs/docs/ApiErrors.md @@ -0,0 +1,11 @@ +# ApiErrors + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ApiError**](ApiError.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_designs/docs/CreateDesign.md b/rest/api/v3/mc_designs/docs/CreateDesign.md new file mode 100644 index 00000000..87211de3 --- /dev/null +++ b/rest/api/v3/mc_designs/docs/CreateDesign.md @@ -0,0 +1,48 @@ +# CreateDesign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateDesign**](CreateDesign.md#CreateDesign) | **Post** /v3/designs | Create Design + + + +## CreateDesign + +> DesignOutput CreateDesign(ctx, optional) + +Create Design + +**This endpoint allows you to create a new design**. You can add a new design by passing data, including a string of HTML email content, to `/designs`. When creating designs from scratch, be aware of the styling constraints inherent to many email clients. For a list of best practices, see our guide to [Cross-Platform Email Design](https://sendgrid.com/docs/ui/sending-email/cross-platform-html-design/). The Design Library can also convert your design’s HTML elements into drag and drop modules that are editable in the Designs Library user interface. For more, visit the [Design and Code Editor documentation](https://sendgrid.com/docs/ui/sending-email/editor/#drag--drop-markup). Because the `/designs` endpoint makes it easy to add designs, you can create a design with your preferred tooling or migrate designs you already own without relying on the Design Library UI. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateDesignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**DesignInput** | [**DesignInput**](DesignInput.md) | + +### Return type + +[**DesignOutput**](DesignOutput.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_designs/docs/DeleteDesign.md b/rest/api/v3/mc_designs/docs/DeleteDesign.md new file mode 100644 index 00000000..8b46426a --- /dev/null +++ b/rest/api/v3/mc_designs/docs/DeleteDesign.md @@ -0,0 +1,51 @@ +# DeleteDesign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteDesign**](DeleteDesign.md#DeleteDesign) | **Delete** /v3/designs/{Id} | Delete Design + + + +## DeleteDesign + +> map[string]interface{} DeleteDesign(ctx, Id) + +Delete Design + +**This endpoint allows you to delete a single design**. Be sure to check the ID of the design you intend to delete before making this request; deleting a design is a permanent action. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the Design you want to duplicate. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteDesignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_designs/docs/DesignCommonProperties.md b/rest/api/v3/mc_designs/docs/DesignCommonProperties.md new file mode 100644 index 00000000..70dfa399 --- /dev/null +++ b/rest/api/v3/mc_designs/docs/DesignCommonProperties.md @@ -0,0 +1,15 @@ +# DesignCommonProperties + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the new design. |[optional] [default to "Duplicate: "] +**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] +**GeneratePlainContent** | **bool** | If true, plain_content is always generated from html_content. If false, plain_content is not altered. |[optional] [default to true] +**Subject** | **string** | Subject of the Design. |[optional] +**Categories** | **[]string** | The list of categories applied to the design |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_designs/docs/DesignDuplicateInput.md b/rest/api/v3/mc_designs/docs/DesignDuplicateInput.md new file mode 100644 index 00000000..db86680e --- /dev/null +++ b/rest/api/v3/mc_designs/docs/DesignDuplicateInput.md @@ -0,0 +1,12 @@ +# DesignDuplicateInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the new design. |[optional] [default to "Duplicate: "] +**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_designs/docs/DesignInput.md b/rest/api/v3/mc_designs/docs/DesignInput.md new file mode 100644 index 00000000..3413ae98 --- /dev/null +++ b/rest/api/v3/mc_designs/docs/DesignInput.md @@ -0,0 +1,14 @@ +# DesignInput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the new design. |[optional] [default to "Duplicate: "] +**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] +**HtmlContent** | **string** | The HTML content of the Design. | +**PlainContent** | **string** | Plain text content of the Design. |[optional] [default to ""] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_designs/docs/DesignOutput.md b/rest/api/v3/mc_designs/docs/DesignOutput.md new file mode 100644 index 00000000..f80ba304 --- /dev/null +++ b/rest/api/v3/mc_designs/docs/DesignOutput.md @@ -0,0 +1,14 @@ +# DesignOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the new design. |[optional] [default to "Duplicate: "] +**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] +**HtmlContent** | **string** | The HTML content of the Design. | +**PlainContent** | **string** | Plain text content of the Design. |[optional] [default to ""] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_designs/docs/DesignOutputSummary.md b/rest/api/v3/mc_designs/docs/DesignOutputSummary.md new file mode 100644 index 00000000..5a0c0a76 --- /dev/null +++ b/rest/api/v3/mc_designs/docs/DesignOutputSummary.md @@ -0,0 +1,16 @@ +# DesignOutputSummary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | ID of the Design. |[optional] +**UpdatedAt** | **string** | Datetime that Design was last updated. |[optional] +**CreatedAt** | **string** | Datetime that Design was created. |[optional] +**ThumbnailUrl** | **string** | A Thumbnail preview of the template's html content. |[optional] +**Name** | **string** | The name of the new design. |[optional] [default to "Duplicate: "] +**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_designs/docs/DuplicateDesign.md b/rest/api/v3/mc_designs/docs/DuplicateDesign.md new file mode 100644 index 00000000..2496e786 --- /dev/null +++ b/rest/api/v3/mc_designs/docs/DuplicateDesign.md @@ -0,0 +1,52 @@ +# DuplicateDesign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DuplicateDesign**](DuplicateDesign.md#DuplicateDesign) | **Post** /v3/designs/{Id} | Duplicate Design + + + +## DuplicateDesign + +> DesignOutput DuplicateDesign(ctx, Idoptional) + +Duplicate Design + +**This endpoint allows you to duplicate one of your existing designs**. Modifying an existing design is often the easiest way to create something new. You are not required to pass any data in the body of a request to this endpoint. If you choose to leave the `name` field blank, your duplicate will be assigned the name of the design it was copied from with the text \"Duplicate: \" prepended to it. This name change is only a convenience, as the duplicate will be assigned a unique ID that differentiates it from your other designs. You can modify your duplicate’s name at the time of creation by passing an updated value to the `name` field when making the initial request. More on retrieving design IDs can be found below. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the Design you want to duplicate. + +### Other Parameters + +Other parameters are passed through a pointer to a DuplicateDesignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**DesignDuplicateInput** | [**DesignDuplicateInput**](DesignDuplicateInput.md) | + +### Return type + +[**DesignOutput**](DesignOutput.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_designs/docs/DuplicatePreBuiltDesign.md b/rest/api/v3/mc_designs/docs/DuplicatePreBuiltDesign.md new file mode 100644 index 00000000..9d8e805f --- /dev/null +++ b/rest/api/v3/mc_designs/docs/DuplicatePreBuiltDesign.md @@ -0,0 +1,52 @@ +# DuplicatePreBuiltDesign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DuplicatePreBuiltDesign**](DuplicatePreBuiltDesign.md#DuplicatePreBuiltDesign) | **Post** /v3/designs/pre-builts/{Id} | Duplicate SendGrid Pre-built Design + + + +## DuplicatePreBuiltDesign + +> DesignOutput DuplicatePreBuiltDesign(ctx, Idoptional) + +Duplicate SendGrid Pre-built Design + +**This endpoint allows you to duplicate one of the pre-built Twilio SendGrid designs**. Like duplicating one of your existing designs, you are not required to pass any data in the body of a request to this endpoint. If you choose to leave the `name` field blank, your duplicate will be assigned the name of the design it was copied from with the text \"Duplicate: \" prepended to it. This name change is only a convenience, as the duplicate design will be assigned a unique ID that differentiates it from your other designs. You can retrieve the IDs for Twilio SendGrid pre-built designs using the \"List SendGrid Pre-built Designs\" endpoint. You can modify your duplicate’s name at the time of creation by passing an updated value to the `name` field when making the initial request. More on retrieving design IDs can be found above. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the pre-built Design you want to duplicate. + +### Other Parameters + +Other parameters are passed through a pointer to a DuplicatePreBuiltDesignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**DesignDuplicateInput** | [**DesignDuplicateInput**](DesignDuplicateInput.md) | + +### Return type + +[**DesignOutput**](DesignOutput.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_designs/docs/Editor.md b/rest/api/v3/mc_designs/docs/Editor.md new file mode 100644 index 00000000..9d170841 --- /dev/null +++ b/rest/api/v3/mc_designs/docs/Editor.md @@ -0,0 +1,13 @@ +# Editor + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**CODE** | string | (value: `"code"`) +**DESIGN** | string | (value: `"design"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_designs/docs/GetDesign.md b/rest/api/v3/mc_designs/docs/GetDesign.md new file mode 100644 index 00000000..8bd1d16c --- /dev/null +++ b/rest/api/v3/mc_designs/docs/GetDesign.md @@ -0,0 +1,51 @@ +# GetDesign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetDesign**](GetDesign.md#GetDesign) | **Get** /v3/designs/{Id} | Get Design + + + +## GetDesign + +> DesignOutput GetDesign(ctx, Id) + +Get Design + +**This endpoint allows you to retrieve a single design**. A GET request to `/designs/{id}` will retrieve details about a specific design in your Design Library. This endpoint is valuable when retrieving information stored in a field that you wish to update using a PATCH request. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the Design you want to duplicate. + +### Other Parameters + +Other parameters are passed through a pointer to a GetDesignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**DesignOutput**](DesignOutput.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_designs/docs/GetPreBuiltDesign.md b/rest/api/v3/mc_designs/docs/GetPreBuiltDesign.md new file mode 100644 index 00000000..e49acc07 --- /dev/null +++ b/rest/api/v3/mc_designs/docs/GetPreBuiltDesign.md @@ -0,0 +1,51 @@ +# GetPreBuiltDesign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetPreBuiltDesign**](GetPreBuiltDesign.md#GetPreBuiltDesign) | **Get** /v3/designs/pre-builts/{Id} | Get SendGrid Pre-built Design + + + +## GetPreBuiltDesign + +> DesignOutput GetPreBuiltDesign(ctx, Id) + +Get SendGrid Pre-built Design + +**This endpoint allows you to retrieve a single pre-built design**. A GET request to `/designs/pre-builts/{id}` will retrieve details about a specific pre-built design. This endpoint is valuable when retrieving details about a pre-built design that you wish to duplicate and modify. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the pre-built Design you want to duplicate. + +### Other Parameters + +Other parameters are passed through a pointer to a GetPreBuiltDesignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**DesignOutput**](DesignOutput.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_designs/docs/ListDesign.md b/rest/api/v3/mc_designs/docs/ListDesign.md new file mode 100644 index 00000000..f1677008 --- /dev/null +++ b/rest/api/v3/mc_designs/docs/ListDesign.md @@ -0,0 +1,50 @@ +# ListDesign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListDesign**](ListDesign.md#ListDesign) | **Get** /v3/designs | List Designs + + + +## ListDesign + +> ListDesign200Response ListDesign(ctx, optional) + +List Designs + +**This endpoint allows you to retrieve a list of designs already stored in your Design Library**. A GET request to `/designs` will return a list of your existing designs. This endpoint will not return the pre-built Twilio SendGrid designs. Pre-built designs can be retrieved using the `/designs/pre-builts` endpoint, which is detailed below. By default, you will receive 100 results per request; however, you can modify the number of results returned by passing an integer to the `page_size` query parameter. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListDesignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**PageSize** | **int32** | number of results to return +**PageToken** | **string** | token corresponding to a specific page of results, as provided by metadata +**Summary** | **bool** | set to false to return all fields + +### Return type + +[**ListDesign200Response**](ListDesign200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_designs/docs/ListDesign200Response.md b/rest/api/v3/mc_designs/docs/ListDesign200Response.md new file mode 100644 index 00000000..32f31512 --- /dev/null +++ b/rest/api/v3/mc_designs/docs/ListDesign200Response.md @@ -0,0 +1,12 @@ +# ListDesign200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]DesignOutputSummary**](DesignOutputSummary.md) | |[optional] +**Metadata** | [**Metadata**](Metadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_designs/docs/ListPreBuiltDesign.md b/rest/api/v3/mc_designs/docs/ListPreBuiltDesign.md new file mode 100644 index 00000000..0b635daa --- /dev/null +++ b/rest/api/v3/mc_designs/docs/ListPreBuiltDesign.md @@ -0,0 +1,50 @@ +# ListPreBuiltDesign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListPreBuiltDesign**](ListPreBuiltDesign.md#ListPreBuiltDesign) | **Get** /v3/designs/pre-builts | List SendGrid Pre-built Designs + + + +## ListPreBuiltDesign + +> ListDesign200Response ListPreBuiltDesign(ctx, optional) + +List SendGrid Pre-built Designs + +**This endpoint allows you to retrieve a list of pre-built designs provided by Twilio SendGrid**. Unlike the `/designs` endpoint where *your* designs are stored, a GET request made to `designs/pre-builts` will retrieve a list of the pre-built Twilio SendGrid designs. This endpoint will not return the designs stored in your Design Library. By default, you will receive 100 results per request; however, you can modify the number of results returned by passing an integer to the `page_size` query parameter. This endpoint is useful for retrieving the IDs of Twilio SendGrid designs that you want to duplicate and modify. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListPreBuiltDesignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**PageSize** | **int32** | number of results to return +**PageToken** | **string** | token corresponding to a specific page of results, as provided by metadata +**Summary** | **bool** | set to false to return all fields + +### Return type + +[**ListDesign200Response**](ListDesign200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_designs/docs/Metadata.md b/rest/api/v3/mc_designs/docs/Metadata.md new file mode 100644 index 00000000..6121300c --- /dev/null +++ b/rest/api/v3/mc_designs/docs/Metadata.md @@ -0,0 +1,14 @@ +# Metadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prev** | **string** | |[optional] +**Self** | **string** | |[optional] +**Next** | **string** | |[optional] +**Count** | **int32** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_designs/docs/UpdateDesign.md b/rest/api/v3/mc_designs/docs/UpdateDesign.md new file mode 100644 index 00000000..e7385735 --- /dev/null +++ b/rest/api/v3/mc_designs/docs/UpdateDesign.md @@ -0,0 +1,52 @@ +# UpdateDesign + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateDesign**](UpdateDesign.md#UpdateDesign) | **Patch** /v3/designs/{Id} | Update Design + + + +## UpdateDesign + +> DesignOutput UpdateDesign(ctx, Idoptional) + +Update Design + +**This endpoint allows you to edit a design**. The Design API supports PATCH requests, which allow you to make partial updates to a single design. Passing data to a specific field will update only the data stored in that field; all other fields will be unaltered. For example, updating a design's name requires that you make a PATCH request to this endpoint with data specified for the `name` field only. ``` { \"name\": \"\" } ``` + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the Design you want to duplicate. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateDesignParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**UpdateDesignRequest** | [**UpdateDesignRequest**](UpdateDesignRequest.md) | + +### Return type + +[**DesignOutput**](DesignOutput.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_designs/docs/UpdateDesignRequest.md b/rest/api/v3/mc_designs/docs/UpdateDesignRequest.md new file mode 100644 index 00000000..2187c51b --- /dev/null +++ b/rest/api/v3/mc_designs/docs/UpdateDesignRequest.md @@ -0,0 +1,16 @@ +# UpdateDesignRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the Design. |[optional] [default to "My Design"] +**HtmlContent** | **string** | The HTML content of the Design. |[optional] +**PlainContent** | **string** | Plain text content of the Design. |[optional] [default to ""] +**GeneratePlainContent** | **bool** | If true, plain_content is always generated from html_content. If false, plain_content is not altered. |[optional] [default to true] +**Subject** | **string** | Subject of the Design. |[optional] +**Categories** | **[]string** | The list of categories applied to the design |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_designs/model_api_error.go b/rest/api/v3/mc_designs/model_api_error.go new file mode 100644 index 00000000..9dbc10bb --- /dev/null +++ b/rest/api/v3/mc_designs/model_api_error.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ApiError struct for ApiError +type ApiError struct { + Message string `json:"message"` + Field string `json:"field"` + ErrorId string `json:"error_id"` +} diff --git a/rest/api/v3/mc_designs/model_api_errors.go b/rest/api/v3/mc_designs/model_api_errors.go new file mode 100644 index 00000000..eedccc2a --- /dev/null +++ b/rest/api/v3/mc_designs/model_api_errors.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ApiErrors struct for ApiErrors +type ApiErrors struct { + Errors *[]ApiError `json:"errors,omitempty"` +} diff --git a/rest/api/v3/mc_designs/model_design_common_properties.go b/rest/api/v3/mc_designs/model_design_common_properties.go new file mode 100644 index 00000000..fc498689 --- /dev/null +++ b/rest/api/v3/mc_designs/model_design_common_properties.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DesignCommonProperties struct for DesignCommonProperties +type DesignCommonProperties struct { + // The name of the new design. + Name *string `json:"name,omitempty"` + // The editor used in the UI. + Editor *Editor `json:"editor,omitempty"` + // If true, plain_content is always generated from html_content. If false, plain_content is not altered. + GeneratePlainContent *bool `json:"generate_plain_content,omitempty"` + // Subject of the Design. + Subject *string `json:"subject,omitempty"` + // The list of categories applied to the design + Categories *[]string `json:"categories,omitempty"` +} diff --git a/rest/api/v3/mc_designs/model_design_duplicate_input.go b/rest/api/v3/mc_designs/model_design_duplicate_input.go new file mode 100644 index 00000000..19eac8f3 --- /dev/null +++ b/rest/api/v3/mc_designs/model_design_duplicate_input.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DesignDuplicateInput struct for DesignDuplicateInput +type DesignDuplicateInput struct { + // The name of the new design. + Name *string `json:"name,omitempty"` + // The editor used in the UI. + Editor *Editor `json:"editor,omitempty"` +} diff --git a/rest/api/v3/mc_designs/model_design_input.go b/rest/api/v3/mc_designs/model_design_input.go new file mode 100644 index 00000000..a64b5bf3 --- /dev/null +++ b/rest/api/v3/mc_designs/model_design_input.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DesignInput struct for DesignInput +type DesignInput struct { + // The name of the new design. + Name *string `json:"name,omitempty"` + // The editor used in the UI. + Editor *Editor `json:"editor,omitempty"` + // The HTML content of the Design. + HtmlContent string `json:"html_content"` + // Plain text content of the Design. + PlainContent *string `json:"plain_content,omitempty"` +} diff --git a/rest/api/v3/mc_designs/model_design_output.go b/rest/api/v3/mc_designs/model_design_output.go new file mode 100644 index 00000000..3cb19435 --- /dev/null +++ b/rest/api/v3/mc_designs/model_design_output.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DesignOutput struct for DesignOutput +type DesignOutput struct { + // The name of the new design. + Name *string `json:"name,omitempty"` + // The editor used in the UI. + Editor *Editor `json:"editor,omitempty"` + // The HTML content of the Design. + HtmlContent string `json:"html_content"` + // Plain text content of the Design. + PlainContent *string `json:"plain_content,omitempty"` +} diff --git a/rest/api/v3/mc_designs/model_design_output_summary.go b/rest/api/v3/mc_designs/model_design_output_summary.go new file mode 100644 index 00000000..00b619d3 --- /dev/null +++ b/rest/api/v3/mc_designs/model_design_output_summary.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DesignOutputSummary struct for DesignOutputSummary +type DesignOutputSummary struct { + // ID of the Design. + Id *string `json:"id,omitempty"` + // Datetime that Design was last updated. + UpdatedAt *string `json:"updated_at,omitempty"` + // Datetime that Design was created. + CreatedAt *string `json:"created_at,omitempty"` + // A Thumbnail preview of the template's html content. + ThumbnailUrl *string `json:"thumbnail_url,omitempty"` + // The name of the new design. + Name *string `json:"name,omitempty"` + // The editor used in the UI. + Editor *Editor `json:"editor,omitempty"` +} diff --git a/rest/api/v3/mc_designs/model_editor.go b/rest/api/v3/mc_designs/model_editor.go new file mode 100644 index 00000000..b5fba7d6 --- /dev/null +++ b/rest/api/v3/mc_designs/model_editor.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Editor the model 'Editor' +type Editor string + +// List of Editor +const ( + EDITOR_CODE Editor = "code" + EDITOR_DESIGN Editor = "design" +) diff --git a/rest/api/v3/mc_designs/model_list_design_200_response.go b/rest/api/v3/mc_designs/model_list_design_200_response.go new file mode 100644 index 00000000..e2c23197 --- /dev/null +++ b/rest/api/v3/mc_designs/model_list_design_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListDesign200Response struct for ListDesign200Response +type ListDesign200Response struct { + Result *[]DesignOutputSummary `json:"result,omitempty"` + Metadata *Metadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/mc_designs/model_metadata.go b/rest/api/v3/mc_designs/model_metadata.go new file mode 100644 index 00000000..3d1281ea --- /dev/null +++ b/rest/api/v3/mc_designs/model_metadata.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Metadata struct for Metadata +type Metadata struct { + Prev *string `json:"prev,omitempty"` + Self *string `json:"self,omitempty"` + Next *string `json:"next,omitempty"` + Count *int32 `json:"count,omitempty"` +} diff --git a/rest/api/v3/mc_designs/model_update_design_request.go b/rest/api/v3/mc_designs/model_update_design_request.go new file mode 100644 index 00000000..b25a0cbe --- /dev/null +++ b/rest/api/v3/mc_designs/model_update_design_request.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Designs +* The Twilio SendGrid Designs API offers the ability to manage assets stored in the Twilio SendGrid [Design Library](https://mc.sendgrid.com/design-library/my-designs). The Design Library is a feature-rich email layout tool and media repository. You can [build designs for all your marketing email needs](https://sendgrid.com/docs/ui/sending-email/working-with-marketing-campaigns-email-designs/), including Single Sends and Automations. You can also duplicate and then modify one of the pre-built designs provided by Twilio SendGrid to get you started. The Designs API provides a REST-like interface for creating new designs, retrieving a list of existing designs, duplicating or updating a design, and deleting a design. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateDesignRequest struct for UpdateDesignRequest +type UpdateDesignRequest struct { + // Name of the Design. + Name *string `json:"name,omitempty"` + // The HTML content of the Design. + HtmlContent *string `json:"html_content,omitempty"` + // Plain text content of the Design. + PlainContent *string `json:"plain_content,omitempty"` + // If true, plain_content is always generated from html_content. If false, plain_content is not altered. + GeneratePlainContent *bool `json:"generate_plain_content,omitempty"` + // Subject of the Design. + Subject *string `json:"subject,omitempty"` + // The list of categories applied to the design + Categories *[]string `json:"categories,omitempty"` +} diff --git a/rest/api/v3/mc_lists/README.md b/rest/api/v3/mc_lists/README.md new file mode 100644 index 00000000..e2aa7644 --- /dev/null +++ b/rest/api/v3/mc_lists/README.md @@ -0,0 +1,81 @@ +# Go API client for + +The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). + +You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:02.113131+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateMarketingList* | [**CreateMarketingList**](docs/CreateMarketingList.md#createmarketinglist) | **Post** /v3/marketing/lists | Create List +*DeleteContact* | [**DeleteContact**](docs/DeleteContact.md#deletecontact) | **Delete** /v3/marketing/lists/{Id}/contacts | Remove Contacts from a List +*DeleteMarketingList* | [**DeleteMarketingList**](docs/DeleteMarketingList.md#deletemarketinglist) | **Delete** /v3/marketing/lists/{Id} | Delete a list +*GetMarketingList* | [**GetMarketingList**](docs/GetMarketingList.md#getmarketinglist) | **Get** /v3/marketing/lists/{Id} | Get a List by ID +*ListContactCount* | [**ListContactCount**](docs/ListContactCount.md#listcontactcount) | **Get** /v3/marketing/lists/{Id}/contacts/count | Get List Contact Count +*ListMarketingList* | [**ListMarketingList**](docs/ListMarketingList.md#listmarketinglist) | **Get** /v3/marketing/lists | Get All Lists +*UpdateMarketingList* | [**UpdateMarketingList**](docs/UpdateMarketingList.md#updatemarketinglist) | **Patch** /v3/marketing/lists/{Id} | Update List + + +## Documentation For Models + + - [ContactDetails](ContactDetails.md) + - [CreateMarketingList400Response](CreateMarketingList400Response.md) + - [CreateMarketingListRequest](CreateMarketingListRequest.md) + - [DeleteContact202Response](DeleteContact202Response.md) + - [DeleteMarketingList200Response](DeleteMarketingList200Response.md) + - [DeleteMarketingList404Response](DeleteMarketingList404Response.md) + - [Error](Error.md) + - [GetMarketingList200Response](GetMarketingList200Response.md) + - [List](List.md) + - [ListContactCount200Response](ListContactCount200Response.md) + - [ListMarketingList200Response](ListMarketingList200Response.md) + - [Metadata](Metadata.md) + - [SelfMetadata](SelfMetadata.md) + - [UpdateMarketingListRequest](UpdateMarketingListRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/mc_lists/api_create_marketing_list.go b/rest/api/v3/mc_lists/api_create_marketing_list.go new file mode 100644 index 00000000..2674f041 --- /dev/null +++ b/rest/api/v3/mc_lists/api_create_marketing_list.go @@ -0,0 +1,73 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateMarketingListParam struct { + // + CreateMarketingListRequest *CreateMarketingListRequest `json:"CreateMarketingListRequest,omitempty"` +} + +func (params *CreateMarketingListParam) SetCreateMarketingListRequest(CreateMarketingListRequest CreateMarketingListRequest) *CreateMarketingListParam { + params.CreateMarketingListRequest = &CreateMarketingListRequest + return params +} + +// **This endpoint creates a new contacts list.** Once you create a list, you can use the UI to [trigger an automation](https://sendgrid.com/docs/ui/sending-email/getting-started-with-automation/#create-an-automation) every time you add a new contact to the list. A link to the newly created object is in `_metadata`. +func (c *ApiService) CreateMarketingList(params *CreateMarketingListParam) (interface{}, error) { + path := "/v3/marketing/lists" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateMarketingListRequest != nil { + b, err := json.Marshal(*params.CreateMarketingListRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &List{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &CreateMarketingList400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_lists/api_delete_contact.go b/rest/api/v3/mc_lists/api_delete_contact.go new file mode 100644 index 00000000..b7d09a8e --- /dev/null +++ b/rest/api/v3/mc_lists/api_delete_contact.go @@ -0,0 +1,79 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteContactParam struct { + // Comma separated list of contact IDs that you want to remove from the specified contacts list. + ContactIds *string `json:"contact_ids"` + // The ID of the list on which you want to perform the operation. + Id *string `json:"id"` +} + +func (params *DeleteContactParam) SetContactIds(ContactIds string) *DeleteContactParam { + params.ContactIds = &ContactIds + return params +} +func (params *DeleteContactParam) SetId(Id string) *DeleteContactParam { + params.Id = &Id + return params +} + +// **This endpoint allows you to remove contacts from a given list.** The contacts will not be deleted. Only their list membership will be changed. +func (c *ApiService) DeleteContact(params *DeleteContactParam) (interface{}, error) { + path := "/v3/marketing/lists/{Id}/contacts" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.ContactIds != nil { + data.Set("contact_ids", *params.ContactIds) + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 202 { + ps := &DeleteContact202Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &Error{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_lists/api_delete_marketing_list.go b/rest/api/v3/mc_lists/api_delete_marketing_list.go new file mode 100644 index 00000000..aec93ac9 --- /dev/null +++ b/rest/api/v3/mc_lists/api_delete_marketing_list.go @@ -0,0 +1,89 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type DeleteMarketingListParam struct { + // The ID of the list on which you want to perform the operation. + Id *string `json:"id"` + // Flag indicates that all contacts on the list are also to be deleted. + DeleteContacts *bool `json:"delete_contacts,omitempty"` +} + +func (params *DeleteMarketingListParam) SetId(Id string) *DeleteMarketingListParam { + params.Id = &Id + return params +} +func (params *DeleteMarketingListParam) SetDeleteContacts(DeleteContacts bool) *DeleteMarketingListParam { + params.DeleteContacts = &DeleteContacts + return params +} + +// **This endpoint allows you to deletes a specific list.** Optionally, you can also delete contacts associated to the list. The query parameter, `delete_contacts=true`, will delete the list and start an asynchronous job to delete associated contacts. +func (c *ApiService) DeleteMarketingList(params *DeleteMarketingListParam) (interface{}, error) { + path := "/v3/marketing/lists/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.DeleteContacts != nil { + data.Set("delete_contacts", fmt.Sprint(*params.DeleteContacts)) + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &DeleteMarketingList200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 204 { + s := "" + ps := &s + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &DeleteMarketingList404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_lists/api_get_marketing_list.go b/rest/api/v3/mc_lists/api_get_marketing_list.go new file mode 100644 index 00000000..4c1b6fe6 --- /dev/null +++ b/rest/api/v3/mc_lists/api_get_marketing_list.go @@ -0,0 +1,80 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type GetMarketingListParam struct { + // The ID of the list on which you want to perform the operation. + Id *string `json:"id"` + // Setting this parameter to the true will cause the contact_sample to be returned + ContactSample *bool `json:"contact_sample,omitempty"` +} + +func (params *GetMarketingListParam) SetId(Id string) *GetMarketingListParam { + params.Id = &Id + return params +} +func (params *GetMarketingListParam) SetContactSample(ContactSample bool) *GetMarketingListParam { + params.ContactSample = &ContactSample + return params +} + +// **This endpoint returns data about a specific list.** Setting the optional parameter `contact_sample=true` returns the `contact_sample` in the response body. Up to 50 of the most recent contacts uploaded or attached to a list will be returned. The full contact count is also returned. +func (c *ApiService) GetMarketingList(params *GetMarketingListParam) (interface{}, error) { + path := "/v3/marketing/lists/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.ContactSample != nil { + data.Set("contact_sample", fmt.Sprint(*params.ContactSample)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetMarketingList200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &[]Error{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_lists/api_list_contact_count.go b/rest/api/v3/mc_lists/api_list_contact_count.go new file mode 100644 index 00000000..3018ad40 --- /dev/null +++ b/rest/api/v3/mc_lists/api_list_contact_count.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type ListContactCountParam struct { + // + Id *string `json:"id"` +} + +func (params *ListContactCountParam) SetId(Id string) *ListContactCountParam { + params.Id = &Id + return params +} + +// **This endpoint returns the number of contacts on a specific list.** +func (c *ApiService) ListContactCount(params *ListContactCountParam) (interface{}, error) { + path := "/v3/marketing/lists/{Id}/contacts/count" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListContactCount200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_lists/api_list_marketing_list.go b/rest/api/v3/mc_lists/api_list_marketing_list.go new file mode 100644 index 00000000..c057ef8f --- /dev/null +++ b/rest/api/v3/mc_lists/api_list_marketing_list.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListMarketingListParam struct { + // Maximum number of elements to return. Defaults to 100, returns 1000 max + PageSize *float32 `json:"page_size,omitempty"` + // + PageToken *string `json:"page_token,omitempty"` +} + +func (params *ListMarketingListParam) SetPageSize(PageSize float32) *ListMarketingListParam { + params.PageSize = &PageSize + return params +} +func (params *ListMarketingListParam) SetPageToken(PageToken string) *ListMarketingListParam { + params.PageToken = &PageToken + return params +} + +// **This endpoint returns an array of all of your contact lists.** +func (c *ApiService) ListMarketingList(params *ListMarketingListParam) (interface{}, error) { + path := "/v3/marketing/lists" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + if params != nil && params.PageToken != nil { + data.Set("page_token", *params.PageToken) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListMarketingList200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_lists/api_service.go b/rest/api/v3/mc_lists/api_service.go new file mode 100644 index 00000000..f7079e91 --- /dev/null +++ b/rest/api/v3/mc_lists/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/mc_lists/api_update_marketing_list.go b/rest/api/v3/mc_lists/api_update_marketing_list.go new file mode 100644 index 00000000..73954db0 --- /dev/null +++ b/rest/api/v3/mc_lists/api_update_marketing_list.go @@ -0,0 +1,92 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateMarketingListParam struct { + // The ID of the list on which you want to perform the operation. + Id *string `json:"id"` + // + UpdateMarketingListRequest *UpdateMarketingListRequest `json:"UpdateMarketingListRequest,omitempty"` +} + +func (params *UpdateMarketingListParam) SetId(Id string) *UpdateMarketingListParam { + params.Id = &Id + return params +} +func (params *UpdateMarketingListParam) SetUpdateMarketingListRequest(UpdateMarketingListRequest UpdateMarketingListRequest) *UpdateMarketingListParam { + params.UpdateMarketingListRequest = &UpdateMarketingListRequest + return params +} + +// **This endpoint updates the name of a list.** +func (c *ApiService) UpdateMarketingList(params *UpdateMarketingListParam) (interface{}, error) { + path := "/v3/marketing/lists/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateMarketingListRequest != nil { + b, err := json.Marshal(*params.UpdateMarketingListRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &List{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &CreateMarketingList400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_lists/docs/ContactDetails.md b/rest/api/v3/mc_lists/docs/ContactDetails.md new file mode 100644 index 00000000..0e6d5277 --- /dev/null +++ b/rest/api/v3/mc_lists/docs/ContactDetails.md @@ -0,0 +1,35 @@ +# ContactDetails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**FirstName** | **string** | |[optional] +**LastName** | **string** | |[optional] +**UniqueName** | **string** | |[optional] +**Email** | **string** | |[optional] +**PhoneNumberId** | **string** | |[optional] +**ExternalId** | **string** | |[optional] +**AnonymousId** | **string** | |[optional] +**AlternateEmails** | **[]string** | |[optional] +**AddressLine1** | **string** | |[optional] +**AddressLine2** | **string** | |[optional] +**City** | **string** | |[optional] +**StateProvinceRegion** | **string** | |[optional] +**Country** | **string** | |[optional] +**PostalCode** | **string** | |[optional] +**PhoneNumber** | **string** | |[optional] +**Whatsapp** | **string** | |[optional] +**Line** | **string** | |[optional] +**Facebook** | **string** | |[optional] +**ListIds** | **[]string** | | +**SegmentIds** | **[]string** | |[optional] +**CustomFields** | **map[string]interface{}** | |[optional] +**CreatedAt** | [**time.Time**](time.Time.md) | | +**UpdatedAt** | [**time.Time**](time.Time.md) | | +**Metadata** | [**SelfMetadata**](SelfMetadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_lists/docs/CreateMarketingList.md b/rest/api/v3/mc_lists/docs/CreateMarketingList.md new file mode 100644 index 00000000..e842327c --- /dev/null +++ b/rest/api/v3/mc_lists/docs/CreateMarketingList.md @@ -0,0 +1,48 @@ +# CreateMarketingList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateMarketingList**](CreateMarketingList.md#CreateMarketingList) | **Post** /v3/marketing/lists | Create List + + + +## CreateMarketingList + +> List CreateMarketingList(ctx, optional) + +Create List + +**This endpoint creates a new contacts list.** Once you create a list, you can use the UI to [trigger an automation](https://sendgrid.com/docs/ui/sending-email/getting-started-with-automation/#create-an-automation) every time you add a new contact to the list. A link to the newly created object is in `_metadata`. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateMarketingListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**CreateMarketingListRequest** | [**CreateMarketingListRequest**](CreateMarketingListRequest.md) | + +### Return type + +[**List**](List.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_lists/docs/CreateMarketingList400Response.md b/rest/api/v3/mc_lists/docs/CreateMarketingList400Response.md new file mode 100644 index 00000000..2e203967 --- /dev/null +++ b/rest/api/v3/mc_lists/docs/CreateMarketingList400Response.md @@ -0,0 +1,11 @@ +# CreateMarketingList400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]Error**](Error.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_lists/docs/CreateMarketingListRequest.md b/rest/api/v3/mc_lists/docs/CreateMarketingListRequest.md new file mode 100644 index 00000000..6774aa99 --- /dev/null +++ b/rest/api/v3/mc_lists/docs/CreateMarketingListRequest.md @@ -0,0 +1,11 @@ +# CreateMarketingListRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Your name for your list | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_lists/docs/DeleteContact.md b/rest/api/v3/mc_lists/docs/DeleteContact.md new file mode 100644 index 00000000..63c22e6c --- /dev/null +++ b/rest/api/v3/mc_lists/docs/DeleteContact.md @@ -0,0 +1,51 @@ +# DeleteContact + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteContact**](DeleteContact.md#DeleteContact) | **Delete** /v3/marketing/lists/{Id}/contacts | Remove Contacts from a List + + + +## DeleteContact + +> DeleteContact202Response DeleteContact(ctx, ContactIdsId) + +Remove Contacts from a List + +**This endpoint allows you to remove contacts from a given list.** The contacts will not be deleted. Only their list membership will be changed. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the list on which you want to perform the operation. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteContactParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**DeleteContact202Response**](DeleteContact202Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_lists/docs/DeleteContact202Response.md b/rest/api/v3/mc_lists/docs/DeleteContact202Response.md new file mode 100644 index 00000000..5d30a105 --- /dev/null +++ b/rest/api/v3/mc_lists/docs/DeleteContact202Response.md @@ -0,0 +1,11 @@ +# DeleteContact202Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**JobId** | **string** | job_id of the async job |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_lists/docs/DeleteMarketingList.md b/rest/api/v3/mc_lists/docs/DeleteMarketingList.md new file mode 100644 index 00000000..cc154218 --- /dev/null +++ b/rest/api/v3/mc_lists/docs/DeleteMarketingList.md @@ -0,0 +1,52 @@ +# DeleteMarketingList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteMarketingList**](DeleteMarketingList.md#DeleteMarketingList) | **Delete** /v3/marketing/lists/{Id} | Delete a list + + + +## DeleteMarketingList + +> DeleteMarketingList200Response DeleteMarketingList(ctx, Idoptional) + +Delete a list + +**This endpoint allows you to deletes a specific list.** Optionally, you can also delete contacts associated to the list. The query parameter, `delete_contacts=true`, will delete the list and start an asynchronous job to delete associated contacts. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the list on which you want to perform the operation. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteMarketingListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**DeleteContacts** | **bool** | Flag indicates that all contacts on the list are also to be deleted. + +### Return type + +[**DeleteMarketingList200Response**](DeleteMarketingList200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_lists/docs/DeleteMarketingList200Response.md b/rest/api/v3/mc_lists/docs/DeleteMarketingList200Response.md new file mode 100644 index 00000000..522ea6c4 --- /dev/null +++ b/rest/api/v3/mc_lists/docs/DeleteMarketingList200Response.md @@ -0,0 +1,11 @@ +# DeleteMarketingList200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**JobId** | **string** | job_id of the async job |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_lists/docs/DeleteMarketingList404Response.md b/rest/api/v3/mc_lists/docs/DeleteMarketingList404Response.md new file mode 100644 index 00000000..a4ca0ac5 --- /dev/null +++ b/rest/api/v3/mc_lists/docs/DeleteMarketingList404Response.md @@ -0,0 +1,11 @@ +# DeleteMarketingList404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | **[]map[string]interface{}** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_lists/docs/Error.md b/rest/api/v3/mc_lists/docs/Error.md new file mode 100644 index 00000000..e8d3a6f9 --- /dev/null +++ b/rest/api/v3/mc_lists/docs/Error.md @@ -0,0 +1,14 @@ +# Error + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | | +**Field** | **string** | |[optional] +**ErrorId** | **string** | |[optional] +**Parameter** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_lists/docs/GetMarketingList.md b/rest/api/v3/mc_lists/docs/GetMarketingList.md new file mode 100644 index 00000000..31285c58 --- /dev/null +++ b/rest/api/v3/mc_lists/docs/GetMarketingList.md @@ -0,0 +1,52 @@ +# GetMarketingList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetMarketingList**](GetMarketingList.md#GetMarketingList) | **Get** /v3/marketing/lists/{Id} | Get a List by ID + + + +## GetMarketingList + +> GetMarketingList200Response GetMarketingList(ctx, Idoptional) + +Get a List by ID + +**This endpoint returns data about a specific list.** Setting the optional parameter `contact_sample=true` returns the `contact_sample` in the response body. Up to 50 of the most recent contacts uploaded or attached to a list will be returned. The full contact count is also returned. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the list on which you want to perform the operation. + +### Other Parameters + +Other parameters are passed through a pointer to a GetMarketingListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**ContactSample** | **bool** | Setting this parameter to the true will cause the contact_sample to be returned + +### Return type + +[**GetMarketingList200Response**](GetMarketingList200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_lists/docs/GetMarketingList200Response.md b/rest/api/v3/mc_lists/docs/GetMarketingList200Response.md new file mode 100644 index 00000000..c3f85dc0 --- /dev/null +++ b/rest/api/v3/mc_lists/docs/GetMarketingList200Response.md @@ -0,0 +1,15 @@ +# GetMarketingList200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The generated ID for your list. |[optional] +**Name** | **string** | The name you gave your list. |[optional] +**ContactCount** | **int32** | The number of contacts currently stored on the list. |[optional] +**Metadata** | [**SelfMetadata**](SelfMetadata.md) | |[optional] +**ContactSample** | [**ContactDetails**](ContactDetails.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_lists/docs/List.md b/rest/api/v3/mc_lists/docs/List.md new file mode 100644 index 00000000..7941f244 --- /dev/null +++ b/rest/api/v3/mc_lists/docs/List.md @@ -0,0 +1,14 @@ +# List + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The generated ID for your list. |[optional] +**Name** | **string** | The name you gave your list. |[optional] +**ContactCount** | **int32** | The number of contacts currently stored on the list. |[optional] +**Metadata** | [**SelfMetadata**](SelfMetadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_lists/docs/ListContactCount.md b/rest/api/v3/mc_lists/docs/ListContactCount.md new file mode 100644 index 00000000..2e65fc61 --- /dev/null +++ b/rest/api/v3/mc_lists/docs/ListContactCount.md @@ -0,0 +1,51 @@ +# ListContactCount + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListContactCount**](ListContactCount.md#ListContactCount) | **Get** /v3/marketing/lists/{Id}/contacts/count | Get List Contact Count + + + +## ListContactCount + +> ListContactCount200Response ListContactCount(ctx, Id) + +Get List Contact Count + +**This endpoint returns the number of contacts on a specific list.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a ListContactCountParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**ListContactCount200Response**](ListContactCount200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_lists/docs/ListContactCount200Response.md b/rest/api/v3/mc_lists/docs/ListContactCount200Response.md new file mode 100644 index 00000000..aebf7d3e --- /dev/null +++ b/rest/api/v3/mc_lists/docs/ListContactCount200Response.md @@ -0,0 +1,12 @@ +# ListContactCount200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ContactCount** | **int32** | |[optional] +**BillableCount** | **int32** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_lists/docs/ListMarketingList.md b/rest/api/v3/mc_lists/docs/ListMarketingList.md new file mode 100644 index 00000000..87a1ce7b --- /dev/null +++ b/rest/api/v3/mc_lists/docs/ListMarketingList.md @@ -0,0 +1,49 @@ +# ListMarketingList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListMarketingList**](ListMarketingList.md#ListMarketingList) | **Get** /v3/marketing/lists | Get All Lists + + + +## ListMarketingList + +> ListMarketingList200Response ListMarketingList(ctx, optional) + +Get All Lists + +**This endpoint returns an array of all of your contact lists.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListMarketingListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**PageSize** | **float32** | Maximum number of elements to return. Defaults to 100, returns 1000 max +**PageToken** | **string** | + +### Return type + +[**ListMarketingList200Response**](ListMarketingList200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_lists/docs/ListMarketingList200Response.md b/rest/api/v3/mc_lists/docs/ListMarketingList200Response.md new file mode 100644 index 00000000..cfe95bb0 --- /dev/null +++ b/rest/api/v3/mc_lists/docs/ListMarketingList200Response.md @@ -0,0 +1,12 @@ +# ListMarketingList200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]List**](List.md) | |[optional] +**Metadata** | [**Metadata**](Metadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_lists/docs/Metadata.md b/rest/api/v3/mc_lists/docs/Metadata.md new file mode 100644 index 00000000..79ca153c --- /dev/null +++ b/rest/api/v3/mc_lists/docs/Metadata.md @@ -0,0 +1,14 @@ +# Metadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prev** | **string** | The URL of the previous page of results. If this field isn't present, you're at the start of the list. |[optional] +**Self** | **string** | The URL of the current page of results. |[optional] +**Next** | **string** | The URL of the next page of results. If this field isn't present, you're at the end of the list. |[optional] +**Count** | **float32** | The number of items in the entire list, i.e., across all pages. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_lists/docs/SelfMetadata.md b/rest/api/v3/mc_lists/docs/SelfMetadata.md new file mode 100644 index 00000000..f5efa07a --- /dev/null +++ b/rest/api/v3/mc_lists/docs/SelfMetadata.md @@ -0,0 +1,11 @@ +# SelfMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Self** | **string** | A link to this object. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_lists/docs/UpdateMarketingList.md b/rest/api/v3/mc_lists/docs/UpdateMarketingList.md new file mode 100644 index 00000000..ed8e57ef --- /dev/null +++ b/rest/api/v3/mc_lists/docs/UpdateMarketingList.md @@ -0,0 +1,52 @@ +# UpdateMarketingList + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateMarketingList**](UpdateMarketingList.md#UpdateMarketingList) | **Patch** /v3/marketing/lists/{Id} | Update List + + + +## UpdateMarketingList + +> List UpdateMarketingList(ctx, Idoptional) + +Update List + +**This endpoint updates the name of a list.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the list on which you want to perform the operation. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateMarketingListParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**UpdateMarketingListRequest** | [**UpdateMarketingListRequest**](UpdateMarketingListRequest.md) | + +### Return type + +[**List**](List.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_lists/docs/UpdateMarketingListRequest.md b/rest/api/v3/mc_lists/docs/UpdateMarketingListRequest.md new file mode 100644 index 00000000..2d0bda0c --- /dev/null +++ b/rest/api/v3/mc_lists/docs/UpdateMarketingListRequest.md @@ -0,0 +1,11 @@ +# UpdateMarketingListRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Your name for your list. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_lists/model_contact_details.go b/rest/api/v3/mc_lists/model_contact_details.go new file mode 100644 index 00000000..960045e4 --- /dev/null +++ b/rest/api/v3/mc_lists/model_contact_details.go @@ -0,0 +1,47 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "time" +) + +// ContactDetails struct for ContactDetails +type ContactDetails struct { + Id string `json:"id"` + FirstName *string `json:"first_name,omitempty"` + LastName *string `json:"last_name,omitempty"` + UniqueName *string `json:"unique_name,omitempty"` + Email *string `json:"email,omitempty"` + PhoneNumberId *string `json:"phone_number_id,omitempty"` + ExternalId *string `json:"external_id,omitempty"` + AnonymousId *string `json:"anonymous_id,omitempty"` + AlternateEmails *[]string `json:"alternate_emails,omitempty"` + AddressLine1 *string `json:"address_line_1,omitempty"` + AddressLine2 *string `json:"address_line_2,omitempty"` + City *string `json:"city,omitempty"` + StateProvinceRegion *string `json:"state_province_region,omitempty"` + Country *string `json:"country,omitempty"` + PostalCode *string `json:"postal_code,omitempty"` + PhoneNumber *string `json:"phone_number,omitempty"` + Whatsapp *string `json:"whatsapp,omitempty"` + Line *string `json:"line,omitempty"` + Facebook *string `json:"facebook,omitempty"` + ListIds []string `json:"list_ids"` + SegmentIds *[]string `json:"segment_ids,omitempty"` + CustomFields *map[string]interface{} `json:"custom_fields,omitempty"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + Metadata *SelfMetadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/mc_lists/model_create_marketing_list_400_response.go b/rest/api/v3/mc_lists/model_create_marketing_list_400_response.go new file mode 100644 index 00000000..f202e4ce --- /dev/null +++ b/rest/api/v3/mc_lists/model_create_marketing_list_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateMarketingList400Response struct for CreateMarketingList400Response +type CreateMarketingList400Response struct { + Errors *[]Error `json:"errors,omitempty"` +} diff --git a/rest/api/v3/mc_lists/model_create_marketing_list_request.go b/rest/api/v3/mc_lists/model_create_marketing_list_request.go new file mode 100644 index 00000000..45f22ed6 --- /dev/null +++ b/rest/api/v3/mc_lists/model_create_marketing_list_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateMarketingListRequest struct for CreateMarketingListRequest +type CreateMarketingListRequest struct { + // Your name for your list + Name string `json:"name"` +} diff --git a/rest/api/v3/mc_lists/model_delete_contact_202_response.go b/rest/api/v3/mc_lists/model_delete_contact_202_response.go new file mode 100644 index 00000000..079254f3 --- /dev/null +++ b/rest/api/v3/mc_lists/model_delete_contact_202_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteContact202Response The removal is accepted and processing. +type DeleteContact202Response struct { + // job_id of the async job + JobId *string `json:"job_id,omitempty"` +} diff --git a/rest/api/v3/mc_lists/model_delete_marketing_list_200_response.go b/rest/api/v3/mc_lists/model_delete_marketing_list_200_response.go new file mode 100644 index 00000000..9a1800d8 --- /dev/null +++ b/rest/api/v3/mc_lists/model_delete_marketing_list_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteMarketingList200Response The delete has been accepted and is processing. +type DeleteMarketingList200Response struct { + // job_id of the async job + JobId *string `json:"job_id,omitempty"` +} diff --git a/rest/api/v3/mc_lists/model_delete_marketing_list_404_response.go b/rest/api/v3/mc_lists/model_delete_marketing_list_404_response.go new file mode 100644 index 00000000..14fa0c4c --- /dev/null +++ b/rest/api/v3/mc_lists/model_delete_marketing_list_404_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteMarketingList404Response struct for DeleteMarketingList404Response +type DeleteMarketingList404Response struct { + Errors []map[string]interface{} `json:"errors"` +} diff --git a/rest/api/v3/mc_lists/model_error.go b/rest/api/v3/mc_lists/model_error.go new file mode 100644 index 00000000..60b82046 --- /dev/null +++ b/rest/api/v3/mc_lists/model_error.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Error struct for Error +type Error struct { + Message string `json:"message"` + Field *string `json:"field,omitempty"` + ErrorId *string `json:"error_id,omitempty"` + Parameter *string `json:"parameter,omitempty"` +} diff --git a/rest/api/v3/mc_lists/model_get_marketing_list_200_response.go b/rest/api/v3/mc_lists/model_get_marketing_list_200_response.go new file mode 100644 index 00000000..927ac41b --- /dev/null +++ b/rest/api/v3/mc_lists/model_get_marketing_list_200_response.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetMarketingList200Response struct for GetMarketingList200Response +type GetMarketingList200Response struct { + // The generated ID for your list. + Id *string `json:"id,omitempty"` + // The name you gave your list. + Name *string `json:"name,omitempty"` + // The number of contacts currently stored on the list. + ContactCount *int32 `json:"contact_count,omitempty"` + Metadata *SelfMetadata `json:"_metadata,omitempty"` + ContactSample *ContactDetails `json:"contact_sample,omitempty"` +} diff --git a/rest/api/v3/mc_lists/model_list.go b/rest/api/v3/mc_lists/model_list.go new file mode 100644 index 00000000..2e9d382a --- /dev/null +++ b/rest/api/v3/mc_lists/model_list.go @@ -0,0 +1,25 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// List struct for List +type List struct { + // The generated ID for your list. + Id *string `json:"id,omitempty"` + // The name you gave your list. + Name *string `json:"name,omitempty"` + // The number of contacts currently stored on the list. + ContactCount *int32 `json:"contact_count,omitempty"` + Metadata *SelfMetadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/mc_lists/model_list_contact_count_200_response.go b/rest/api/v3/mc_lists/model_list_contact_count_200_response.go new file mode 100644 index 00000000..bfb78493 --- /dev/null +++ b/rest/api/v3/mc_lists/model_list_contact_count_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListContactCount200Response struct for ListContactCount200Response +type ListContactCount200Response struct { + ContactCount *int32 `json:"contact_count,omitempty"` + BillableCount *int32 `json:"billable_count,omitempty"` +} diff --git a/rest/api/v3/mc_lists/model_list_marketing_list_200_response.go b/rest/api/v3/mc_lists/model_list_marketing_list_200_response.go new file mode 100644 index 00000000..6b652a9e --- /dev/null +++ b/rest/api/v3/mc_lists/model_list_marketing_list_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListMarketingList200Response struct for ListMarketingList200Response +type ListMarketingList200Response struct { + Result *[]List `json:"result,omitempty"` + Metadata *Metadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/mc_lists/model_metadata.go b/rest/api/v3/mc_lists/model_metadata.go new file mode 100644 index 00000000..f0c64e60 --- /dev/null +++ b/rest/api/v3/mc_lists/model_metadata.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Metadata struct for Metadata +type Metadata struct { + // The URL of the previous page of results. If this field isn't present, you're at the start of the list. + Prev *string `json:"prev,omitempty"` + // The URL of the current page of results. + Self *string `json:"self,omitempty"` + // The URL of the next page of results. If this field isn't present, you're at the end of the list. + Next *string `json:"next,omitempty"` + // The number of items in the entire list, i.e., across all pages. + Count *float32 `json:"count,omitempty"` +} diff --git a/rest/api/v3/mc_lists/model_self_metadata.go b/rest/api/v3/mc_lists/model_self_metadata.go new file mode 100644 index 00000000..9ae3c90b --- /dev/null +++ b/rest/api/v3/mc_lists/model_self_metadata.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SelfMetadata struct for SelfMetadata +type SelfMetadata struct { + // A link to this object. + Self *string `json:"self,omitempty"` +} diff --git a/rest/api/v3/mc_lists/model_update_marketing_list_request.go b/rest/api/v3/mc_lists/model_update_marketing_list_request.go new file mode 100644 index 00000000..773e8ba3 --- /dev/null +++ b/rest/api/v3/mc_lists/model_update_marketing_list_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Lists API +* The Twilio SendGrid Marketing Campaigns Lists API allows you to manage your contacts lists programmatically. Lists are static collections of Marketing Campaigns contacts. You can use this API to interact with the list objects themselves. To add contacts to a list, you must use the [Contacts API](https://docs.sendgrid.com/api-reference/contacts/). You can also manage your lists using the Contacts menu in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). For more information about lists and best practices for building them, see [**Building your Contact Lists**](https://sendgrid.com/docs/ui/managing-contacts/building-your-contact-list/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateMarketingListRequest struct for UpdateMarketingListRequest +type UpdateMarketingListRequest struct { + // Your name for your list. + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/mc_segments/README.md b/rest/api/v3/mc_segments/README.md new file mode 100644 index 00000000..eed4bd30 --- /dev/null +++ b/rest/api/v3/mc_segments/README.md @@ -0,0 +1,75 @@ +# Go API client for + +This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). + +To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:02.150414+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DeleteSegment* | [**DeleteSegment**](docs/DeleteSegment.md#deletesegment) | **Delete** /v3/marketing/segments/{SegmentId} | Delete Segment +*GetSegment* | [**GetSegment**](docs/GetSegment.md#getsegment) | **Get** /v3/marketing/segments/{SegmentId} | Get Segment by ID +*ListSegment* | [**ListSegment**](docs/ListSegment.md#listsegment) | **Get** /v3/marketing/segments | Get List of Segments + + +## Documentation For Models + + - [ContactResponse](ContactResponse.md) + - [ContactResponseCustomFields](ContactResponseCustomFields.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [FullSegment](FullSegment.md) + - [GetSegment404Response](GetSegment404Response.md) + - [GetSegment404ResponseErrorsInner](GetSegment404ResponseErrorsInner.md) + - [ListSegment200Response](ListSegment200Response.md) + - [ListSegment500Response](ListSegment500Response.md) + - [ListSegment500ResponseErrorsInner](ListSegment500ResponseErrorsInner.md) + - [SegmentSummary](SegmentSummary.md) + - [SegmentWriteV2](SegmentWriteV2.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/mc_segments/api_delete_segment.go b/rest/api/v3/mc_segments/api_delete_segment.go new file mode 100644 index 00000000..5e82b2f1 --- /dev/null +++ b/rest/api/v3/mc_segments/api_delete_segment.go @@ -0,0 +1,101 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteSegmentParam struct { + // + SegmentId *string `json:"segment_id"` +} + +func (params *DeleteSegmentParam) SetSegmentId(SegmentId string) *DeleteSegmentParam { + params.SegmentId = &SegmentId + return params +} + +// **This endpoint allows you to delete a segment by `segment_id`.** Note that deleting a segment does not delete the contacts associated with the segment by default. Contacts associated with a deleted segment will remain in your list of all contacts and any other segments they belong to. +func (c *ApiService) DeleteSegment(params *DeleteSegmentParam) (interface{}, error) { + path := "/v3/marketing/segments/{SegmentId}" + if params != nil && params.SegmentId != nil { + path = strings.Replace(path, "{"+"SegmentId"+"}", *params.SegmentId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 202 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &GetSegment404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListSegment500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_segments/api_get_segment.go b/rest/api/v3/mc_segments/api_get_segment.go new file mode 100644 index 00000000..8d7fbcc3 --- /dev/null +++ b/rest/api/v3/mc_segments/api_get_segment.go @@ -0,0 +1,104 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type GetSegmentParam struct { + // + SegmentId *string `json:"segment_id"` + // Defaults to `false`. Set to `true` to return the parsed SQL AST as a JSON object in the field `query_json` + QueryJson *bool `json:"query_json,omitempty"` +} + +func (params *GetSegmentParam) SetSegmentId(SegmentId string) *GetSegmentParam { + params.SegmentId = &SegmentId + return params +} +func (params *GetSegmentParam) SetQueryJson(QueryJson bool) *GetSegmentParam { + params.QueryJson = &QueryJson + return params +} + +// **This endpoint allows you to retrieve a single segment by ID.** +func (c *ApiService) GetSegment(params *GetSegmentParam) (interface{}, error) { + path := "/v3/marketing/segments/{SegmentId}" + if params != nil && params.SegmentId != nil { + path = strings.Replace(path, "{"+"SegmentId"+"}", *params.SegmentId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.QueryJson != nil { + data.Set("query_json", fmt.Sprint(*params.QueryJson)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &FullSegment{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &GetSegment404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListSegment500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_segments/api_list_segment.go b/rest/api/v3/mc_segments/api_list_segment.go new file mode 100644 index 00000000..80a58cd6 --- /dev/null +++ b/rest/api/v3/mc_segments/api_list_segment.go @@ -0,0 +1,120 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListSegmentParam struct { + // A list of segment IDs to retrieve. When this parameter is included, the `no_parent_list_ids` and `parent_list_ids` parameters are ignored and only segments with given IDs are returned. + Ids *[]string `json:"ids,omitempty"` + // A comma separated list of list ids to be used when searching for segments with the specified parent_list_id, no more than 50 is allowed + ParentListIds *string `json:"parent_list_ids,omitempty"` + // If set to `true` segments with an empty value of `parent_list_id` will be returned in the filter. If the value is not present it defaults to 'false'. + NoParentListId *bool `json:"no_parent_list_id,omitempty"` +} + +func (params *ListSegmentParam) SetIds(Ids []string) *ListSegmentParam { + params.Ids = &Ids + return params +} +func (params *ListSegmentParam) SetParentListIds(ParentListIds string) *ListSegmentParam { + params.ParentListIds = &ParentListIds + return params +} +func (params *ListSegmentParam) SetNoParentListId(NoParentListId bool) *ListSegmentParam { + params.NoParentListId = &NoParentListId + return params +} + +// **This endpoint allows you to retrieve a list of segments.** The query param `parent_list_ids` is treated as a filter. Any match will be returned. Zero matches will return a response code of 200 with an empty `results` array. `parent_list_ids` | `no_parent_list_id` | `ids` | `result` -----------------:|:--------------------:|:-------------:|:-------------: empty | false | empty | all segments values list_ids | false | empty | segments filtered by list_ids values list_ids |true | empty | segments filtered by list_ids and segments with no parent list_ids empty empty | true | empty | segments with no parent list_ids anything | anything | ids | segments with matching segment ids | +func (c *ApiService) ListSegment(params *ListSegmentParam) (interface{}, error) { + path := "/v3/marketing/segments" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Ids != nil { + for _, item := range *params.Ids { + v, err := json.Marshal(item) + + if err != nil { + return nil, err + } + + data.Add("ids", string(v)) + + } + } + if params != nil && params.ParentListIds != nil { + data.Set("parent_list_ids", *params.ParentListIds) + } + if params != nil && params.NoParentListId != nil { + data.Set("no_parent_list_id", fmt.Sprint(*params.NoParentListId)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListSegment200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListSegment500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_segments/api_service.go b/rest/api/v3/mc_segments/api_service.go new file mode 100644 index 00000000..b3304ebe --- /dev/null +++ b/rest/api/v3/mc_segments/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/mc_segments/docs/ContactResponse.md b/rest/api/v3/mc_segments/docs/ContactResponse.md new file mode 100644 index 00000000..0041ba2e --- /dev/null +++ b/rest/api/v3/mc_segments/docs/ContactResponse.md @@ -0,0 +1,27 @@ +# ContactResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | ID assigned to a contact when added to the system. | +**Email** | **string** | Email of the contact. This is a reserved field. |[optional] +**PhoneNumberId** | **string** | The contact's Phone Number ID. This must be a valid phone number. |[optional] +**ExternalId** | **string** | The contact's External ID. |[optional] +**AnonymousId** | **string** | The contact's Anonymous ID. |[optional] +**AlternateEmails** | **[]string** | Alternate emails of the contact. This is a reserved field. | +**FirstName** | **string** | First name of the contact. This is a reserved field. | +**LastName** | **string** | Last name of the contact. This is a reserved field. | +**AddressLine1** | **string** | First line of address of the contact. This is a reserved field. | +**AddressLine2** | **string** | Second line of address of the contact. This is a reserved field. | +**City** | **string** | City associated with the contact. This is a reserved field. | +**StateProvinceRegion** | **string** | State associated with the contact. This is a reserved field. | +**PostalCode** | **int32** | Zipcode associated with the address of the contact. This is a reserved field. | +**Country** | **string** | Country associated with the address of the contact. This is a reserved field. | +**ListIds** | **[]string** | IDs of all lists the contact is part of |[optional] +**CustomFields** | [**ContactResponseCustomFields**](ContactResponseCustomFields.md) | | +**SegmentIds** | **[]string** | IDs of all segments the contact is part of |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments/docs/ContactResponseCustomFields.md b/rest/api/v3/mc_segments/docs/ContactResponseCustomFields.md new file mode 100644 index 00000000..0fc838a2 --- /dev/null +++ b/rest/api/v3/mc_segments/docs/ContactResponseCustomFields.md @@ -0,0 +1,12 @@ +# ContactResponseCustomFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomFieldName1** | **string** | |[optional] +**CustomFieldName2** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments/docs/DeleteSegment.md b/rest/api/v3/mc_segments/docs/DeleteSegment.md new file mode 100644 index 00000000..786d0f08 --- /dev/null +++ b/rest/api/v3/mc_segments/docs/DeleteSegment.md @@ -0,0 +1,51 @@ +# DeleteSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSegment**](DeleteSegment.md#DeleteSegment) | **Delete** /v3/marketing/segments/{SegmentId} | Delete Segment + + + +## DeleteSegment + +> map[string]interface{} DeleteSegment(ctx, SegmentId) + +Delete Segment + +**This endpoint allows you to delete a segment by `segment_id`.** Note that deleting a segment does not delete the contacts associated with the segment by default. Contacts associated with a deleted segment will remain in your list of all contacts and any other segments they belong to. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SegmentId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_segments/docs/ErrorResponse.md b/rest/api/v3/mc_segments/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/mc_segments/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments/docs/ErrorResponseErrorsInner.md b/rest/api/v3/mc_segments/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/mc_segments/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments/docs/FullSegment.md b/rest/api/v3/mc_segments/docs/FullSegment.md new file mode 100644 index 00000000..f0eb54e4 --- /dev/null +++ b/rest/api/v3/mc_segments/docs/FullSegment.md @@ -0,0 +1,22 @@ +# FullSegment + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**ContactsCount** | **int32** | | +**CreatedAt** | [**time.Time**](time.Time.md) | ISO8601 of created timestamp | +**Name** | **string** | Name of the segment. | +**ParentListId** | **string** | The id of the list if this segment is a child of a list. This implies the query `AND CONTAINS(list_ids, ${parent_list_id})` |[optional] +**SampleUpdatedAt** | [**time.Time**](time.Time.md) | ISO8601 timestamp the sample was last updated | +**UpdatedAt** | [**time.Time**](time.Time.md) | ISO8601 timestamp the object was last updated | +**NextSampleUpdate** | **string** | ISO8601 string that is equal to `sample_updated_at` plus an internally calculated offset that depends on how often contacts enter or exit segments as the scheduled pipeline updates the samples. |[optional] +**ContactsSample** | [**[]ContactResponse**](ContactResponse.md) | | +**QueryJson** | **map[string]interface{}** | AST representation of the query DSL |[optional] +**ParentListIds** | **[]string** | The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future |[optional] +**QueryDsl** | **string** | SQL query which will filter contacts based on the conditions provided | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments/docs/GetSegment.md b/rest/api/v3/mc_segments/docs/GetSegment.md new file mode 100644 index 00000000..c735c438 --- /dev/null +++ b/rest/api/v3/mc_segments/docs/GetSegment.md @@ -0,0 +1,52 @@ +# GetSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetSegment**](GetSegment.md#GetSegment) | **Get** /v3/marketing/segments/{SegmentId} | Get Segment by ID + + + +## GetSegment + +> FullSegment GetSegment(ctx, SegmentIdoptional) + +Get Segment by ID + +**This endpoint allows you to retrieve a single segment by ID.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SegmentId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a GetSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**QueryJson** | **bool** | Defaults to `false`. Set to `true` to return the parsed SQL AST as a JSON object in the field `query_json` + +### Return type + +[**FullSegment**](FullSegment.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_segments/docs/GetSegment404Response.md b/rest/api/v3/mc_segments/docs/GetSegment404Response.md new file mode 100644 index 00000000..1f7701d9 --- /dev/null +++ b/rest/api/v3/mc_segments/docs/GetSegment404Response.md @@ -0,0 +1,11 @@ +# GetSegment404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]GetSegment404ResponseErrorsInner**](GetSegment404ResponseErrorsInner.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments/docs/GetSegment404ResponseErrorsInner.md b/rest/api/v3/mc_segments/docs/GetSegment404ResponseErrorsInner.md new file mode 100644 index 00000000..77220d8b --- /dev/null +++ b/rest/api/v3/mc_segments/docs/GetSegment404ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# GetSegment404ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | | +**Field** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments/docs/ListSegment.md b/rest/api/v3/mc_segments/docs/ListSegment.md new file mode 100644 index 00000000..21a8bd88 --- /dev/null +++ b/rest/api/v3/mc_segments/docs/ListSegment.md @@ -0,0 +1,50 @@ +# ListSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSegment**](ListSegment.md#ListSegment) | **Get** /v3/marketing/segments | Get List of Segments + + + +## ListSegment + +> ListSegment200Response ListSegment(ctx, optional) + +Get List of Segments + +**This endpoint allows you to retrieve a list of segments.** The query param `parent_list_ids` is treated as a filter. Any match will be returned. Zero matches will return a response code of 200 with an empty `results` array. `parent_list_ids` | `no_parent_list_id` | `ids` | `result` -----------------:|:--------------------:|:-------------:|:-------------: empty | false | empty | all segments values list_ids | false | empty | segments filtered by list_ids values list_ids |true | empty | segments filtered by list_ids and segments with no parent list_ids empty empty | true | empty | segments with no parent list_ids anything | anything | ids | segments with matching segment ids | + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Ids** | **[]string** | A list of segment IDs to retrieve. When this parameter is included, the `no_parent_list_ids` and `parent_list_ids` parameters are ignored and only segments with given IDs are returned. +**ParentListIds** | **string** | A comma separated list of list ids to be used when searching for segments with the specified parent_list_id, no more than 50 is allowed +**NoParentListId** | **bool** | If set to `true` segments with an empty value of `parent_list_id` will be returned in the filter. If the value is not present it defaults to 'false'. + +### Return type + +[**ListSegment200Response**](ListSegment200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_segments/docs/ListSegment200Response.md b/rest/api/v3/mc_segments/docs/ListSegment200Response.md new file mode 100644 index 00000000..a943da3b --- /dev/null +++ b/rest/api/v3/mc_segments/docs/ListSegment200Response.md @@ -0,0 +1,11 @@ +# ListSegment200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | [**[]SegmentSummary**](SegmentSummary.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments/docs/ListSegment500Response.md b/rest/api/v3/mc_segments/docs/ListSegment500Response.md new file mode 100644 index 00000000..169e9d8c --- /dev/null +++ b/rest/api/v3/mc_segments/docs/ListSegment500Response.md @@ -0,0 +1,11 @@ +# ListSegment500Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ListSegment500ResponseErrorsInner**](ListSegment500ResponseErrorsInner.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments/docs/ListSegment500ResponseErrorsInner.md b/rest/api/v3/mc_segments/docs/ListSegment500ResponseErrorsInner.md new file mode 100644 index 00000000..ecd184d9 --- /dev/null +++ b/rest/api/v3/mc_segments/docs/ListSegment500ResponseErrorsInner.md @@ -0,0 +1,11 @@ +# ListSegment500ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments/docs/SegmentSummary.md b/rest/api/v3/mc_segments/docs/SegmentSummary.md new file mode 100644 index 00000000..64484678 --- /dev/null +++ b/rest/api/v3/mc_segments/docs/SegmentSummary.md @@ -0,0 +1,18 @@ +# SegmentSummary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**ContactsCount** | **int32** | | +**CreatedAt** | [**time.Time**](time.Time.md) | ISO8601 of created timestamp | +**Name** | **string** | |[optional] +**ParentListId** | **string** | The id of the list if this segment is a child of a list. This implies the query `AND CONTAINS(list_ids, ${parent_list_id})` |[optional] +**SampleUpdatedAt** | [**time.Time**](time.Time.md) | ISO8601 timestamp the sample was last updated | +**UpdatedAt** | [**time.Time**](time.Time.md) | ISO8601 timestamp the object was last updated | +**NextSampleUpdate** | **string** | ISO8601 string that is equal to `sample_updated_at` plus an internally calculated offset that depends on how often contacts enter or exit segments as the scheduled pipeline updates the samples. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments/docs/SegmentWriteV2.md b/rest/api/v3/mc_segments/docs/SegmentWriteV2.md new file mode 100644 index 00000000..25cdc2d6 --- /dev/null +++ b/rest/api/v3/mc_segments/docs/SegmentWriteV2.md @@ -0,0 +1,13 @@ +# SegmentWriteV2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the segment. | +**ParentListIds** | **[]string** | The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future |[optional] +**QueryDsl** | **string** | SQL query which will filter contacts based on the conditions provided | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments/model_contact_response.go b/rest/api/v3/mc_segments/model_contact_response.go new file mode 100644 index 00000000..6977993a --- /dev/null +++ b/rest/api/v3/mc_segments/model_contact_response.go @@ -0,0 +1,51 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactResponse struct for ContactResponse +type ContactResponse struct { + // ID assigned to a contact when added to the system. + Id string `json:"id"` + // Email of the contact. This is a reserved field. + Email *string `json:"email,omitempty"` + // The contact's Phone Number ID. This must be a valid phone number. + PhoneNumberId *string `json:"phone_number_id,omitempty"` + // The contact's External ID. + ExternalId *string `json:"external_id,omitempty"` + // The contact's Anonymous ID. + AnonymousId *string `json:"anonymous_id,omitempty"` + // Alternate emails of the contact. This is a reserved field. + AlternateEmails []string `json:"alternate_emails"` + // First name of the contact. This is a reserved field. + FirstName string `json:"first_name"` + // Last name of the contact. This is a reserved field. + LastName string `json:"last_name"` + // First line of address of the contact. This is a reserved field. + AddressLine1 string `json:"address_line_1"` + // Second line of address of the contact. This is a reserved field. + AddressLine2 string `json:"address_line_2"` + // City associated with the contact. This is a reserved field. + City string `json:"city"` + // State associated with the contact. This is a reserved field. + StateProvinceRegion string `json:"state_province_region"` + // Zipcode associated with the address of the contact. This is a reserved field. + PostalCode int32 `json:"postal_code"` + // Country associated with the address of the contact. This is a reserved field. + Country string `json:"country"` + // IDs of all lists the contact is part of + ListIds *[]string `json:"list_ids,omitempty"` + CustomFields ContactResponseCustomFields `json:"custom_fields"` + // IDs of all segments the contact is part of + SegmentIds *[]string `json:"segment_ids,omitempty"` +} diff --git a/rest/api/v3/mc_segments/model_contact_response_custom_fields.go b/rest/api/v3/mc_segments/model_contact_response_custom_fields.go new file mode 100644 index 00000000..2a736fc7 --- /dev/null +++ b/rest/api/v3/mc_segments/model_contact_response_custom_fields.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactResponseCustomFields The user may choose to create up to 120 custom fields or none at all. This is not a reserved field. +type ContactResponseCustomFields struct { + CustomFieldName1 *string `json:"custom_field_name1,omitempty"` + CustomFieldName2 *string `json:"custom_field_name2,omitempty"` +} diff --git a/rest/api/v3/mc_segments/model_error_response.go b/rest/api/v3/mc_segments/model_error_response.go new file mode 100644 index 00000000..e178f466 --- /dev/null +++ b/rest/api/v3/mc_segments/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/mc_segments/model_error_response_errors_inner.go b/rest/api/v3/mc_segments/model_error_response_errors_inner.go new file mode 100644 index 00000000..b41f116b --- /dev/null +++ b/rest/api/v3/mc_segments/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/mc_segments/model_full_segment.go b/rest/api/v3/mc_segments/model_full_segment.go new file mode 100644 index 00000000..f365e55c --- /dev/null +++ b/rest/api/v3/mc_segments/model_full_segment.go @@ -0,0 +1,43 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "time" +) + +// FullSegment struct for FullSegment +type FullSegment struct { + Id string `json:"id"` + ContactsCount int32 `json:"contacts_count"` + // ISO8601 of created timestamp + CreatedAt time.Time `json:"created_at"` + // Name of the segment. + Name string `json:"name"` + // The id of the list if this segment is a child of a list. This implies the query `AND CONTAINS(list_ids, ${parent_list_id})` + ParentListId *string `json:"parent_list_id,omitempty"` + // ISO8601 timestamp the sample was last updated + SampleUpdatedAt time.Time `json:"sample_updated_at"` + // ISO8601 timestamp the object was last updated + UpdatedAt time.Time `json:"updated_at"` + // ISO8601 string that is equal to `sample_updated_at` plus an internally calculated offset that depends on how often contacts enter or exit segments as the scheduled pipeline updates the samples. + NextSampleUpdate *string `json:"next_sample_update,omitempty"` + ContactsSample []ContactResponse `json:"contacts_sample"` + // AST representation of the query DSL + QueryJson *map[string]interface{} `json:"query_json,omitempty"` + // The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future + ParentListIds *[]string `json:"parent_list_ids,omitempty"` + // SQL query which will filter contacts based on the conditions provided + QueryDsl string `json:"query_dsl"` +} diff --git a/rest/api/v3/mc_segments/model_get_segment_404_response.go b/rest/api/v3/mc_segments/model_get_segment_404_response.go new file mode 100644 index 00000000..b6987ee5 --- /dev/null +++ b/rest/api/v3/mc_segments/model_get_segment_404_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetSegment404Response struct for GetSegment404Response +type GetSegment404Response struct { + Errors []GetSegment404ResponseErrorsInner `json:"errors"` +} diff --git a/rest/api/v3/mc_segments/model_get_segment_404_response_errors_inner.go b/rest/api/v3/mc_segments/model_get_segment_404_response_errors_inner.go new file mode 100644 index 00000000..97445b5f --- /dev/null +++ b/rest/api/v3/mc_segments/model_get_segment_404_response_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetSegment404ResponseErrorsInner struct for GetSegment404ResponseErrorsInner +type GetSegment404ResponseErrorsInner struct { + Message string `json:"message"` + Field string `json:"field"` +} diff --git a/rest/api/v3/mc_segments/model_list_segment_200_response.go b/rest/api/v3/mc_segments/model_list_segment_200_response.go new file mode 100644 index 00000000..44c6533a --- /dev/null +++ b/rest/api/v3/mc_segments/model_list_segment_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSegment200Response struct for ListSegment200Response +type ListSegment200Response struct { + Results []SegmentSummary `json:"results"` +} diff --git a/rest/api/v3/mc_segments/model_list_segment_500_response.go b/rest/api/v3/mc_segments/model_list_segment_500_response.go new file mode 100644 index 00000000..38b58e34 --- /dev/null +++ b/rest/api/v3/mc_segments/model_list_segment_500_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSegment500Response struct for ListSegment500Response +type ListSegment500Response struct { + Errors []ListSegment500ResponseErrorsInner `json:"errors"` +} diff --git a/rest/api/v3/mc_segments/model_list_segment_500_response_errors_inner.go b/rest/api/v3/mc_segments/model_list_segment_500_response_errors_inner.go new file mode 100644 index 00000000..37a40fb1 --- /dev/null +++ b/rest/api/v3/mc_segments/model_list_segment_500_response_errors_inner.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSegment500ResponseErrorsInner struct for ListSegment500ResponseErrorsInner +type ListSegment500ResponseErrorsInner struct { + Message string `json:"message"` +} diff --git a/rest/api/v3/mc_segments/model_segment_summary.go b/rest/api/v3/mc_segments/model_segment_summary.go new file mode 100644 index 00000000..c54aa9da --- /dev/null +++ b/rest/api/v3/mc_segments/model_segment_summary.go @@ -0,0 +1,35 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "time" +) + +// SegmentSummary struct for SegmentSummary +type SegmentSummary struct { + Id string `json:"id"` + ContactsCount int32 `json:"contacts_count"` + // ISO8601 of created timestamp + CreatedAt time.Time `json:"created_at"` + Name *string `json:"name,omitempty"` + // The id of the list if this segment is a child of a list. This implies the query `AND CONTAINS(list_ids, ${parent_list_id})` + ParentListId *string `json:"parent_list_id,omitempty"` + // ISO8601 timestamp the sample was last updated + SampleUpdatedAt time.Time `json:"sample_updated_at"` + // ISO8601 timestamp the object was last updated + UpdatedAt time.Time `json:"updated_at"` + // ISO8601 string that is equal to `sample_updated_at` plus an internally calculated offset that depends on how often contacts enter or exit segments as the scheduled pipeline updates the samples. + NextSampleUpdate *string `json:"next_sample_update,omitempty"` +} diff --git a/rest/api/v3/mc_segments/model_segment_write_v2.go b/rest/api/v3/mc_segments/model_segment_write_v2.go new file mode 100644 index 00000000..04aa8f81 --- /dev/null +++ b/rest/api/v3/mc_segments/model_segment_write_v2.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments API +* This API was deprecated on December 31, 2022. Following deprecation, all segments created in the Marketing Campaigns user interface began using the [Segmentation v2 API](https://docs.sendgrid.com/api-reference/segmenting-contacts-v2). To enable manual migration and data retrieval, this API's GET and DELETE operations will remain available. The POST (create) and PATCH (update) endpoints were removed on January 31, 2023 because it is no longer possible to create new v1 segments or modify existing ones. See our [Segmentation v1 to v2 upgrade instructions](https://docs.sendgrid.com/for-developers/sending-email/getting-started-the-marketing-campaigns-v2-segmentation-api#upgrade-a-v1-segment-to-v2) to manually migrate your segments to the v2 API. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SegmentWriteV2 struct for SegmentWriteV2 +type SegmentWriteV2 struct { + // Name of the segment. + Name string `json:"name"` + // The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future + ParentListIds *[]string `json:"parent_list_ids,omitempty"` + // SQL query which will filter contacts based on the conditions provided + QueryDsl string `json:"query_dsl"` +} diff --git a/rest/api/v3/mc_segments_2/README.md b/rest/api/v3/mc_segments_2/README.md new file mode 100644 index 00000000..a4abdf89 --- /dev/null +++ b/rest/api/v3/mc_segments_2/README.md @@ -0,0 +1,87 @@ +# Go API client for + +The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. + +Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. + +Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. + +Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. + +Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. + +You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:02.151058+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateSegment* | [**CreateSegment**](docs/CreateSegment.md#createsegment) | **Post** /v3/marketing/segments/2.0 | Create Segment +*DeleteSegment* | [**DeleteSegment**](docs/DeleteSegment.md#deletesegment) | **Delete** /v3/marketing/segments/2.0/{SegmentId} | Delete segment +*GetSegment* | [**GetSegment**](docs/GetSegment.md#getsegment) | **Get** /v3/marketing/segments/2.0/{SegmentId} | Get Segment by ID +*ListSegment* | [**ListSegment**](docs/ListSegment.md#listsegment) | **Get** /v3/marketing/segments/2.0 | Get List of Segments +*RefreshSegment* | [**RefreshSegment**](docs/RefreshSegment.md#refreshsegment) | **Post** /v3/marketing/segments/2.0/refresh/{SegmentId} | Manually refresh a segment +*UpdateSegment* | [**UpdateSegment**](docs/UpdateSegment.md#updatesegment) | **Patch** /v3/marketing/segments/2.0/{SegmentId} | Update Segment + + +## Documentation For Models + + - [AllSegments200](AllSegments200.md) + - [ContactResponse](ContactResponse.md) + - [ContactResponseCustomFields](ContactResponseCustomFields.md) + - [ErrorsSegmentV2](ErrorsSegmentV2.md) + - [ErrorsSegmentV2ErrorsInner](ErrorsSegmentV2ErrorsInner.md) + - [Metadata](Metadata.md) + - [Segment2xx](Segment2xx.md) + - [SegmentError](SegmentError.md) + - [SegmentRefresh202](SegmentRefresh202.md) + - [SegmentRefreshRequest](SegmentRefreshRequest.md) + - [SegmentStatusResponse](SegmentStatusResponse.md) + - [SegmentUpdate](SegmentUpdate.md) + - [SegmentWriteV2](SegmentWriteV2.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/mc_segments_2/api_create_segment.go b/rest/api/v3/mc_segments_2/api_create_segment.go new file mode 100644 index 00000000..022d8b8b --- /dev/null +++ b/rest/api/v3/mc_segments_2/api_create_segment.go @@ -0,0 +1,81 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateSegmentParam struct { + // + SegmentWriteV2 *SegmentWriteV2 `json:"SegmentWriteV2,omitempty"` +} + +func (params *CreateSegmentParam) SetSegmentWriteV2(SegmentWriteV2 SegmentWriteV2) *CreateSegmentParam { + params.SegmentWriteV2 = &SegmentWriteV2 + return params +} + +// Segment `name` has to be unique. A user can not create a new segment with an existing segment name. +func (c *ApiService) CreateSegment(params *CreateSegmentParam) (interface{}, error) { + path := "/v3/marketing/segments/2.0" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SegmentWriteV2 != nil { + b, err := json.Marshal(*params.SegmentWriteV2) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &Segment2xx{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorsSegmentV2{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ErrorsSegmentV2{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_segments_2/api_delete_segment.go b/rest/api/v3/mc_segments_2/api_delete_segment.go new file mode 100644 index 00000000..192318c0 --- /dev/null +++ b/rest/api/v3/mc_segments_2/api_delete_segment.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteSegmentParam struct { + // + SegmentId *string `json:"segment_id"` +} + +func (params *DeleteSegmentParam) SetSegmentId(SegmentId string) *DeleteSegmentParam { + params.SegmentId = &SegmentId + return params +} + +// **This endpoint allows you to delete a segment by ID.** +func (c *ApiService) DeleteSegment(params *DeleteSegmentParam) (interface{}, error) { + path := "/v3/marketing/segments/2.0/{SegmentId}" + if params != nil && params.SegmentId != nil { + path = strings.Replace(path, "{"+"SegmentId"+"}", *params.SegmentId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &ErrorsSegmentV2{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ErrorsSegmentV2{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_segments_2/api_get_segment.go b/rest/api/v3/mc_segments_2/api_get_segment.go new file mode 100644 index 00000000..ee17dd6c --- /dev/null +++ b/rest/api/v3/mc_segments_2/api_get_segment.go @@ -0,0 +1,88 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type GetSegmentParam struct { + // + SegmentId *string `json:"segment_id"` + // Defaults to `true`. Set to `false` to exclude the contacts_sample in the response. + ContactsSample *bool `json:"contacts_sample,omitempty"` +} + +func (params *GetSegmentParam) SetSegmentId(SegmentId string) *GetSegmentParam { + params.SegmentId = &SegmentId + return params +} +func (params *GetSegmentParam) SetContactsSample(ContactsSample bool) *GetSegmentParam { + params.ContactsSample = &ContactsSample + return params +} + +// Get Marketing Campaigns Segment by ID +func (c *ApiService) GetSegment(params *GetSegmentParam) (interface{}, error) { + path := "/v3/marketing/segments/2.0/{SegmentId}" + if params != nil && params.SegmentId != nil { + path = strings.Replace(path, "{"+"SegmentId"+"}", *params.SegmentId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.ContactsSample != nil { + data.Set("contacts_sample", fmt.Sprint(*params.ContactsSample)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &Segment2xx{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorsSegmentV2{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ErrorsSegmentV2{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_segments_2/api_list_segment.go b/rest/api/v3/mc_segments_2/api_list_segment.go new file mode 100644 index 00000000..e20699e8 --- /dev/null +++ b/rest/api/v3/mc_segments_2/api_list_segment.go @@ -0,0 +1,104 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListSegmentParam struct { + // A list of segment IDs to retrieve. When this parameter is included, the `no_parent_list_ids` and `parent_list_ids` parameters are ignored and only segments with given IDs are returned. + Ids *[]string `json:"ids,omitempty"` + // A comma separated list up to 50 in size, to filter segments on. Only segments that have any of these list ids as the parent list will be retrieved. This is different from the parameter of the same name used when creating a segment. + ParentListIds *string `json:"parent_list_ids,omitempty"` + // If set to `true`, segments with an empty value of `parent_list_id` will be returned in the filter. If the value is not present, it defaults to 'false'. + NoParentListId *bool `json:"no_parent_list_id,omitempty"` +} + +func (params *ListSegmentParam) SetIds(Ids []string) *ListSegmentParam { + params.Ids = &Ids + return params +} +func (params *ListSegmentParam) SetParentListIds(ParentListIds string) *ListSegmentParam { + params.ParentListIds = &ParentListIds + return params +} +func (params *ListSegmentParam) SetNoParentListId(NoParentListId bool) *ListSegmentParam { + params.NoParentListId = &NoParentListId + return params +} + +// **This endpoint allows you to retrieve a list of segments.** The query param `parent_list_ids` is treated as a filter. Any match will be returned. Zero matches will return a response code of 200 with an empty `results` array. `parent_list_ids` | `no_parent_list_id` | `ids` | `result` -----------------:|:--------------------:|:-------------:|:-------------: empty | false | empty | all segments values list_ids | false | empty | segments filtered by list_ids values list_ids |true | empty | segments filtered by list_ids and segments with no parent list_ids empty empty | true | empty | segments with no parent list_ids anything | anything | ids | segments with matching segment ids | +func (c *ApiService) ListSegment(params *ListSegmentParam) (interface{}, error) { + path := "/v3/marketing/segments/2.0" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Ids != nil { + for _, item := range *params.Ids { + v, err := json.Marshal(item) + + if err != nil { + return nil, err + } + + data.Add("ids", string(v)) + + } + } + if params != nil && params.ParentListIds != nil { + data.Set("parent_list_ids", *params.ParentListIds) + } + if params != nil && params.NoParentListId != nil { + data.Set("no_parent_list_id", fmt.Sprint(*params.NoParentListId)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AllSegments200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorsSegmentV2{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ErrorsSegmentV2{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_segments_2/api_refresh_segment.go b/rest/api/v3/mc_segments_2/api_refresh_segment.go new file mode 100644 index 00000000..b72b78ee --- /dev/null +++ b/rest/api/v3/mc_segments_2/api_refresh_segment.go @@ -0,0 +1,92 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type RefreshSegmentParam struct { + // + SegmentId *string `json:"segment_id"` + // + SegmentRefreshRequest *SegmentRefreshRequest `json:"SegmentRefreshRequest"` +} + +func (params *RefreshSegmentParam) SetSegmentId(SegmentId string) *RefreshSegmentParam { + params.SegmentId = &SegmentId + return params +} +func (params *RefreshSegmentParam) SetSegmentRefreshRequest(SegmentRefreshRequest SegmentRefreshRequest) *RefreshSegmentParam { + params.SegmentRefreshRequest = &SegmentRefreshRequest + return params +} + +// Manually refresh a segment by segment ID. +func (c *ApiService) RefreshSegment(params *RefreshSegmentParam) (interface{}, error) { + path := "/v3/marketing/segments/2.0/refresh/{SegmentId}" + if params != nil && params.SegmentId != nil { + path = strings.Replace(path, "{"+"SegmentId"+"}", *params.SegmentId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SegmentRefreshRequest != nil { + b, err := json.Marshal(*params.SegmentRefreshRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 202 { + ps := &SegmentRefresh202{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &SegmentError{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &SegmentError{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_segments_2/api_service.go b/rest/api/v3/mc_segments_2/api_service.go new file mode 100644 index 00000000..6eb18a06 --- /dev/null +++ b/rest/api/v3/mc_segments_2/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/mc_segments_2/api_update_segment.go b/rest/api/v3/mc_segments_2/api_update_segment.go new file mode 100644 index 00000000..324cc4f4 --- /dev/null +++ b/rest/api/v3/mc_segments_2/api_update_segment.go @@ -0,0 +1,92 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateSegmentParam struct { + // + SegmentId *string `json:"segment_id"` + // + SegmentUpdate *SegmentUpdate `json:"SegmentUpdate,omitempty"` +} + +func (params *UpdateSegmentParam) SetSegmentId(SegmentId string) *UpdateSegmentParam { + params.SegmentId = &SegmentId + return params +} +func (params *UpdateSegmentParam) SetSegmentUpdate(SegmentUpdate SegmentUpdate) *UpdateSegmentParam { + params.SegmentUpdate = &SegmentUpdate + return params +} + +// Segment `name` has to be unique. A user can not create a new segment with an existing segment name. +func (c *ApiService) UpdateSegment(params *UpdateSegmentParam) (interface{}, error) { + path := "/v3/marketing/segments/2.0/{SegmentId}" + if params != nil && params.SegmentId != nil { + path = strings.Replace(path, "{"+"SegmentId"+"}", *params.SegmentId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SegmentUpdate != nil { + b, err := json.Marshal(*params.SegmentUpdate) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &Segment2xx{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorsSegmentV2{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ErrorsSegmentV2{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_segments_2/docs/AllSegments200.md b/rest/api/v3/mc_segments_2/docs/AllSegments200.md new file mode 100644 index 00000000..c0aa6fd7 --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/AllSegments200.md @@ -0,0 +1,21 @@ +# AllSegments200 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | ID assigned to the segment when created. | +**Name** | **string** | Name of the segment. | +**ContactsCount** | **int32** | Total number of contacts present in the segment | +**CreatedAt** | **string** | ISO8601 timestamp of when the object was created | +**UpdatedAt** | **string** | ISO8601 timestamp of when the object was last updated | +**SampleUpdatedAt** | **string** | ISO8601 timestamp of when the samples were last updated | +**NextSampleUpdate** | **string** | ISO8601 timestamp of when the samples will be next updated | +**ParentListIds** | **[]string** | The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future | +**QueryVersion** | **string** | If not set, segment contains a query for use with Segment v1 APIs. If set to '2', segment contains a SQL query for use in v2. | +**Metadata** | [**Metadata**](Metadata.md) | |[optional] +**Status** | [**SegmentStatusResponse**](SegmentStatusResponse.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments_2/docs/ContactResponse.md b/rest/api/v3/mc_segments_2/docs/ContactResponse.md new file mode 100644 index 00000000..0041ba2e --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/ContactResponse.md @@ -0,0 +1,27 @@ +# ContactResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | ID assigned to a contact when added to the system. | +**Email** | **string** | Email of the contact. This is a reserved field. |[optional] +**PhoneNumberId** | **string** | The contact's Phone Number ID. This must be a valid phone number. |[optional] +**ExternalId** | **string** | The contact's External ID. |[optional] +**AnonymousId** | **string** | The contact's Anonymous ID. |[optional] +**AlternateEmails** | **[]string** | Alternate emails of the contact. This is a reserved field. | +**FirstName** | **string** | First name of the contact. This is a reserved field. | +**LastName** | **string** | Last name of the contact. This is a reserved field. | +**AddressLine1** | **string** | First line of address of the contact. This is a reserved field. | +**AddressLine2** | **string** | Second line of address of the contact. This is a reserved field. | +**City** | **string** | City associated with the contact. This is a reserved field. | +**StateProvinceRegion** | **string** | State associated with the contact. This is a reserved field. | +**PostalCode** | **int32** | Zipcode associated with the address of the contact. This is a reserved field. | +**Country** | **string** | Country associated with the address of the contact. This is a reserved field. | +**ListIds** | **[]string** | IDs of all lists the contact is part of |[optional] +**CustomFields** | [**ContactResponseCustomFields**](ContactResponseCustomFields.md) | | +**SegmentIds** | **[]string** | IDs of all segments the contact is part of |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments_2/docs/ContactResponseCustomFields.md b/rest/api/v3/mc_segments_2/docs/ContactResponseCustomFields.md new file mode 100644 index 00000000..0fc838a2 --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/ContactResponseCustomFields.md @@ -0,0 +1,12 @@ +# ContactResponseCustomFields + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CustomFieldName1** | **string** | |[optional] +**CustomFieldName2** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments_2/docs/CreateSegment.md b/rest/api/v3/mc_segments_2/docs/CreateSegment.md new file mode 100644 index 00000000..171e9d2d --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/CreateSegment.md @@ -0,0 +1,48 @@ +# CreateSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateSegment**](CreateSegment.md#CreateSegment) | **Post** /v3/marketing/segments/2.0 | Create Segment + + + +## CreateSegment + +> Segment2xx CreateSegment(ctx, optional) + +Create Segment + +Segment `name` has to be unique. A user can not create a new segment with an existing segment name. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**SegmentWriteV2** | [**SegmentWriteV2**](SegmentWriteV2.md) | + +### Return type + +[**Segment2xx**](Segment2xx.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_segments_2/docs/DeleteSegment.md b/rest/api/v3/mc_segments_2/docs/DeleteSegment.md new file mode 100644 index 00000000..b91fd466 --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/DeleteSegment.md @@ -0,0 +1,51 @@ +# DeleteSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSegment**](DeleteSegment.md#DeleteSegment) | **Delete** /v3/marketing/segments/2.0/{SegmentId} | Delete segment + + + +## DeleteSegment + +> DeleteSegment(ctx, SegmentId) + +Delete segment + +**This endpoint allows you to delete a segment by ID.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SegmentId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_segments_2/docs/ErrorsSegmentV2.md b/rest/api/v3/mc_segments_2/docs/ErrorsSegmentV2.md new file mode 100644 index 00000000..07d67bc7 --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/ErrorsSegmentV2.md @@ -0,0 +1,11 @@ +# ErrorsSegmentV2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorsSegmentV2ErrorsInner**](ErrorsSegmentV2ErrorsInner.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments_2/docs/ErrorsSegmentV2ErrorsInner.md b/rest/api/v3/mc_segments_2/docs/ErrorsSegmentV2ErrorsInner.md new file mode 100644 index 00000000..ec18b439 --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/ErrorsSegmentV2ErrorsInner.md @@ -0,0 +1,12 @@ +# ErrorsSegmentV2ErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | the field in the request body that is incorrect | +**Message** | **string** | a description of what is specifically wrong with the field passed in the request | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments_2/docs/GetSegment.md b/rest/api/v3/mc_segments_2/docs/GetSegment.md new file mode 100644 index 00000000..57cbe39a --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/GetSegment.md @@ -0,0 +1,52 @@ +# GetSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetSegment**](GetSegment.md#GetSegment) | **Get** /v3/marketing/segments/2.0/{SegmentId} | Get Segment by ID + + + +## GetSegment + +> Segment2xx GetSegment(ctx, SegmentIdoptional) + +Get Segment by ID + +Get Marketing Campaigns Segment by ID + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SegmentId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a GetSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**ContactsSample** | **bool** | Defaults to `true`. Set to `false` to exclude the contacts_sample in the response. + +### Return type + +[**Segment2xx**](Segment2xx.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_segments_2/docs/ListSegment.md b/rest/api/v3/mc_segments_2/docs/ListSegment.md new file mode 100644 index 00000000..4ea5db66 --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/ListSegment.md @@ -0,0 +1,50 @@ +# ListSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSegment**](ListSegment.md#ListSegment) | **Get** /v3/marketing/segments/2.0 | Get List of Segments + + + +## ListSegment + +> AllSegments200 ListSegment(ctx, optional) + +Get List of Segments + +**This endpoint allows you to retrieve a list of segments.** The query param `parent_list_ids` is treated as a filter. Any match will be returned. Zero matches will return a response code of 200 with an empty `results` array. `parent_list_ids` | `no_parent_list_id` | `ids` | `result` -----------------:|:--------------------:|:-------------:|:-------------: empty | false | empty | all segments values list_ids | false | empty | segments filtered by list_ids values list_ids |true | empty | segments filtered by list_ids and segments with no parent list_ids empty empty | true | empty | segments with no parent list_ids anything | anything | ids | segments with matching segment ids | + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Ids** | **[]string** | A list of segment IDs to retrieve. When this parameter is included, the `no_parent_list_ids` and `parent_list_ids` parameters are ignored and only segments with given IDs are returned. +**ParentListIds** | **string** | A comma separated list up to 50 in size, to filter segments on. Only segments that have any of these list ids as the parent list will be retrieved. This is different from the parameter of the same name used when creating a segment. +**NoParentListId** | **bool** | If set to `true`, segments with an empty value of `parent_list_id` will be returned in the filter. If the value is not present, it defaults to 'false'. + +### Return type + +[**AllSegments200**](AllSegments200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_segments_2/docs/Metadata.md b/rest/api/v3/mc_segments_2/docs/Metadata.md new file mode 100644 index 00000000..6121300c --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/Metadata.md @@ -0,0 +1,14 @@ +# Metadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prev** | **string** | |[optional] +**Self** | **string** | |[optional] +**Next** | **string** | |[optional] +**Count** | **int32** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments_2/docs/RefreshSegment.md b/rest/api/v3/mc_segments_2/docs/RefreshSegment.md new file mode 100644 index 00000000..d02196d2 --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/RefreshSegment.md @@ -0,0 +1,51 @@ +# RefreshSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**RefreshSegment**](RefreshSegment.md#RefreshSegment) | **Post** /v3/marketing/segments/2.0/refresh/{SegmentId} | Manually refresh a segment + + + +## RefreshSegment + +> SegmentRefresh202 RefreshSegment(ctx, SegmentIdSegmentRefreshRequest) + +Manually refresh a segment + +Manually refresh a segment by segment ID. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SegmentId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a RefreshSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**SegmentRefresh202**](SegmentRefresh202.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_segments_2/docs/Segment2xx.md b/rest/api/v3/mc_segments_2/docs/Segment2xx.md new file mode 100644 index 00000000..7a16f7f4 --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/Segment2xx.md @@ -0,0 +1,25 @@ +# Segment2xx + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | ID assigned to the segment when created. | +**Name** | **string** | Name of the segment. | +**QueryDsl** | **string** | SQL query which will filter contacts based on the conditions provided | +**ContactsCount** | **int32** | Total number of contacts present in the segment | +**ContactsSample** | [**[]ContactResponse**](ContactResponse.md) | A subset of all contacts that are in this segment | +**CreatedAt** | **string** | ISO8601 timestamp of when the object was created | +**UpdatedAt** | **string** | ISO8601 timestamp of when the object was last updated | +**SampleUpdatedAt** | **string** | ISO8601 timestamp of when the samples were last updated | +**NextSampleUpdate** | **string** | ISO8601 timestamp of when the samples will be next updated | +**ParentListIds** | **[]string** | The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future | +**QueryVersion** | **string** | If not set, segment contains a Query for use with Segment v1 APIs. If set to '2', segment contains a SQL query for use in v2. | +**Status** | [**SegmentStatusResponse**](SegmentStatusResponse.md) | | +**RefreshesUsed** | **int32** | The number of times a segment has been manually refreshed since start of today in the user's timezone. |[optional] +**MaxRefreshes** | **int32** | The maximum number of manual refreshes allowed per day for this segment. Currently, only 2 are allowed. |[optional] +**LastRefreshedAt** | **string** | The ISO8601 timestamp when the segment was last refreshed in UTC time. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments_2/docs/SegmentError.md b/rest/api/v3/mc_segments_2/docs/SegmentError.md new file mode 100644 index 00000000..f58e9427 --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/SegmentError.md @@ -0,0 +1,11 @@ +# SegmentError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | **string** | A description of the error. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments_2/docs/SegmentRefresh202.md b/rest/api/v3/mc_segments_2/docs/SegmentRefresh202.md new file mode 100644 index 00000000..d930c1d1 --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/SegmentRefresh202.md @@ -0,0 +1,11 @@ +# SegmentRefresh202 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**JobId** | **string** | The ID of the manual refresh job. Used only for internal purposes. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments_2/docs/SegmentRefreshRequest.md b/rest/api/v3/mc_segments_2/docs/SegmentRefreshRequest.md new file mode 100644 index 00000000..fb12c37b --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/SegmentRefreshRequest.md @@ -0,0 +1,11 @@ +# SegmentRefreshRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UserTimeZone** | **string** | The user's timezone. The timezone is used to reset the refresh count at midnight in the user's local time. Only [IANA time zone format](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) is accepted. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments_2/docs/SegmentStatusResponse.md b/rest/api/v3/mc_segments_2/docs/SegmentStatusResponse.md new file mode 100644 index 00000000..efc40275 --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/SegmentStatusResponse.md @@ -0,0 +1,12 @@ +# SegmentStatusResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**QueryValidation** | **string** | Status of query validation. PENDING, VALID, or INVALID | +**ErrorMessage** | **string** | Describes any errors that were encountered during query validation |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments_2/docs/SegmentUpdate.md b/rest/api/v3/mc_segments_2/docs/SegmentUpdate.md new file mode 100644 index 00000000..9ddb7bfa --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/SegmentUpdate.md @@ -0,0 +1,12 @@ +# SegmentUpdate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the segment. |[optional] +**QueryDsl** | **string** | SQL query which will filter contacts based on the conditions provided |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments_2/docs/SegmentWriteV2.md b/rest/api/v3/mc_segments_2/docs/SegmentWriteV2.md new file mode 100644 index 00000000..25cdc2d6 --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/SegmentWriteV2.md @@ -0,0 +1,13 @@ +# SegmentWriteV2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | Name of the segment. | +**ParentListIds** | **[]string** | The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future |[optional] +**QueryDsl** | **string** | SQL query which will filter contacts based on the conditions provided | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_segments_2/docs/UpdateSegment.md b/rest/api/v3/mc_segments_2/docs/UpdateSegment.md new file mode 100644 index 00000000..87669084 --- /dev/null +++ b/rest/api/v3/mc_segments_2/docs/UpdateSegment.md @@ -0,0 +1,52 @@ +# UpdateSegment + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSegment**](UpdateSegment.md#UpdateSegment) | **Patch** /v3/marketing/segments/2.0/{SegmentId} | Update Segment + + + +## UpdateSegment + +> Segment2xx UpdateSegment(ctx, SegmentIdoptional) + +Update Segment + +Segment `name` has to be unique. A user can not create a new segment with an existing segment name. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SegmentId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSegmentParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**SegmentUpdate** | [**SegmentUpdate**](SegmentUpdate.md) | + +### Return type + +[**Segment2xx**](Segment2xx.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_segments_2/model_all_segments200.go b/rest/api/v3/mc_segments_2/model_all_segments200.go new file mode 100644 index 00000000..497ac8b7 --- /dev/null +++ b/rest/api/v3/mc_segments_2/model_all_segments200.go @@ -0,0 +1,38 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AllSegments200 struct for AllSegments200 +type AllSegments200 struct { + // ID assigned to the segment when created. + Id string `json:"id"` + // Name of the segment. + Name string `json:"name"` + // Total number of contacts present in the segment + ContactsCount int32 `json:"contacts_count"` + // ISO8601 timestamp of when the object was created + CreatedAt string `json:"created_at"` + // ISO8601 timestamp of when the object was last updated + UpdatedAt string `json:"updated_at"` + // ISO8601 timestamp of when the samples were last updated + SampleUpdatedAt string `json:"sample_updated_at"` + // ISO8601 timestamp of when the samples will be next updated + NextSampleUpdate string `json:"next_sample_update"` + // The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future + ParentListIds []string `json:"parent_list_ids"` + // If not set, segment contains a query for use with Segment v1 APIs. If set to '2', segment contains a SQL query for use in v2. + QueryVersion string `json:"query_version"` + Metadata *Metadata `json:"_metadata,omitempty"` + Status SegmentStatusResponse `json:"status"` +} diff --git a/rest/api/v3/mc_segments_2/model_contact_response.go b/rest/api/v3/mc_segments_2/model_contact_response.go new file mode 100644 index 00000000..5a91c038 --- /dev/null +++ b/rest/api/v3/mc_segments_2/model_contact_response.go @@ -0,0 +1,51 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactResponse struct for ContactResponse +type ContactResponse struct { + // ID assigned to a contact when added to the system. + Id string `json:"id"` + // Email of the contact. This is a reserved field. + Email *string `json:"email,omitempty"` + // The contact's Phone Number ID. This must be a valid phone number. + PhoneNumberId *string `json:"phone_number_id,omitempty"` + // The contact's External ID. + ExternalId *string `json:"external_id,omitempty"` + // The contact's Anonymous ID. + AnonymousId *string `json:"anonymous_id,omitempty"` + // Alternate emails of the contact. This is a reserved field. + AlternateEmails []string `json:"alternate_emails"` + // First name of the contact. This is a reserved field. + FirstName string `json:"first_name"` + // Last name of the contact. This is a reserved field. + LastName string `json:"last_name"` + // First line of address of the contact. This is a reserved field. + AddressLine1 string `json:"address_line_1"` + // Second line of address of the contact. This is a reserved field. + AddressLine2 string `json:"address_line_2"` + // City associated with the contact. This is a reserved field. + City string `json:"city"` + // State associated with the contact. This is a reserved field. + StateProvinceRegion string `json:"state_province_region"` + // Zipcode associated with the address of the contact. This is a reserved field. + PostalCode int32 `json:"postal_code"` + // Country associated with the address of the contact. This is a reserved field. + Country string `json:"country"` + // IDs of all lists the contact is part of + ListIds *[]string `json:"list_ids,omitempty"` + CustomFields ContactResponseCustomFields `json:"custom_fields"` + // IDs of all segments the contact is part of + SegmentIds *[]string `json:"segment_ids,omitempty"` +} diff --git a/rest/api/v3/mc_segments_2/model_contact_response_custom_fields.go b/rest/api/v3/mc_segments_2/model_contact_response_custom_fields.go new file mode 100644 index 00000000..754537d5 --- /dev/null +++ b/rest/api/v3/mc_segments_2/model_contact_response_custom_fields.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ContactResponseCustomFields The user may choose to create up to 120 custom fields or none at all. This is not a reserved field. +type ContactResponseCustomFields struct { + CustomFieldName1 *string `json:"custom_field_name1,omitempty"` + CustomFieldName2 *string `json:"custom_field_name2,omitempty"` +} diff --git a/rest/api/v3/mc_segments_2/model_errors_segment_v2.go b/rest/api/v3/mc_segments_2/model_errors_segment_v2.go new file mode 100644 index 00000000..85afe100 --- /dev/null +++ b/rest/api/v3/mc_segments_2/model_errors_segment_v2.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorsSegmentV2 If the request is incorrect, an array of errors will be returned. +type ErrorsSegmentV2 struct { + Errors []ErrorsSegmentV2ErrorsInner `json:"errors"` +} diff --git a/rest/api/v3/mc_segments_2/model_errors_segment_v2_errors_inner.go b/rest/api/v3/mc_segments_2/model_errors_segment_v2_errors_inner.go new file mode 100644 index 00000000..26eeca07 --- /dev/null +++ b/rest/api/v3/mc_segments_2/model_errors_segment_v2_errors_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorsSegmentV2ErrorsInner struct for ErrorsSegmentV2ErrorsInner +type ErrorsSegmentV2ErrorsInner struct { + // the field in the request body that is incorrect + Field string `json:"field"` + // a description of what is specifically wrong with the field passed in the request + Message string `json:"message"` +} diff --git a/rest/api/v3/mc_segments_2/model_metadata.go b/rest/api/v3/mc_segments_2/model_metadata.go new file mode 100644 index 00000000..465ac16a --- /dev/null +++ b/rest/api/v3/mc_segments_2/model_metadata.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Metadata struct for Metadata +type Metadata struct { + Prev *string `json:"prev,omitempty"` + Self *string `json:"self,omitempty"` + Next *string `json:"next,omitempty"` + Count *int32 `json:"count,omitempty"` +} diff --git a/rest/api/v3/mc_segments_2/model_segment2xx.go b/rest/api/v3/mc_segments_2/model_segment2xx.go new file mode 100644 index 00000000..0ce62a86 --- /dev/null +++ b/rest/api/v3/mc_segments_2/model_segment2xx.go @@ -0,0 +1,47 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Segment2xx struct for Segment2xx +type Segment2xx struct { + // ID assigned to the segment when created. + Id string `json:"id"` + // Name of the segment. + Name string `json:"name"` + // SQL query which will filter contacts based on the conditions provided + QueryDsl string `json:"query_dsl"` + // Total number of contacts present in the segment + ContactsCount int32 `json:"contacts_count"` + // A subset of all contacts that are in this segment + ContactsSample []ContactResponse `json:"contacts_sample"` + // ISO8601 timestamp of when the object was created + CreatedAt string `json:"created_at"` + // ISO8601 timestamp of when the object was last updated + UpdatedAt string `json:"updated_at"` + // ISO8601 timestamp of when the samples were last updated + SampleUpdatedAt string `json:"sample_updated_at"` + // ISO8601 timestamp of when the samples will be next updated + NextSampleUpdate string `json:"next_sample_update"` + // The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future + ParentListIds []string `json:"parent_list_ids"` + // If not set, segment contains a Query for use with Segment v1 APIs. If set to '2', segment contains a SQL query for use in v2. + QueryVersion string `json:"query_version"` + Status SegmentStatusResponse `json:"status"` + // The number of times a segment has been manually refreshed since start of today in the user's timezone. + RefreshesUsed *int32 `json:"refreshes_used,omitempty"` + // The maximum number of manual refreshes allowed per day for this segment. Currently, only 2 are allowed. + MaxRefreshes *int32 `json:"max_refreshes,omitempty"` + // The ISO8601 timestamp when the segment was last refreshed in UTC time. + LastRefreshedAt *string `json:"last_refreshed_at,omitempty"` +} diff --git a/rest/api/v3/mc_segments_2/model_segment_error.go b/rest/api/v3/mc_segments_2/model_segment_error.go new file mode 100644 index 00000000..f08b583f --- /dev/null +++ b/rest/api/v3/mc_segments_2/model_segment_error.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SegmentError struct for SegmentError +type SegmentError struct { + // A description of the error. + Error string `json:"error"` +} diff --git a/rest/api/v3/mc_segments_2/model_segment_refresh202.go b/rest/api/v3/mc_segments_2/model_segment_refresh202.go new file mode 100644 index 00000000..5c3e00b0 --- /dev/null +++ b/rest/api/v3/mc_segments_2/model_segment_refresh202.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SegmentRefresh202 struct for SegmentRefresh202 +type SegmentRefresh202 struct { + // The ID of the manual refresh job. Used only for internal purposes. + JobId *string `json:"job_id,omitempty"` +} diff --git a/rest/api/v3/mc_segments_2/model_segment_refresh_request.go b/rest/api/v3/mc_segments_2/model_segment_refresh_request.go new file mode 100644 index 00000000..4b509e53 --- /dev/null +++ b/rest/api/v3/mc_segments_2/model_segment_refresh_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SegmentRefreshRequest struct for SegmentRefreshRequest +type SegmentRefreshRequest struct { + // The user's timezone. The timezone is used to reset the refresh count at midnight in the user's local time. Only [IANA time zone format](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) is accepted. + UserTimeZone string `json:"user_time_zone"` +} diff --git a/rest/api/v3/mc_segments_2/model_segment_status_response.go b/rest/api/v3/mc_segments_2/model_segment_status_response.go new file mode 100644 index 00000000..2bf1bf83 --- /dev/null +++ b/rest/api/v3/mc_segments_2/model_segment_status_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SegmentStatusResponse Segment status indicates whether the segment's contacts will be updated periodically +type SegmentStatusResponse struct { + // Status of query validation. PENDING, VALID, or INVALID + QueryValidation string `json:"query_validation"` + // Describes any errors that were encountered during query validation + ErrorMessage *string `json:"error_message,omitempty"` +} diff --git a/rest/api/v3/mc_segments_2/model_segment_update.go b/rest/api/v3/mc_segments_2/model_segment_update.go new file mode 100644 index 00000000..ebfede4c --- /dev/null +++ b/rest/api/v3/mc_segments_2/model_segment_update.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SegmentUpdate struct for SegmentUpdate +type SegmentUpdate struct { + // Name of the segment. + Name *string `json:"name,omitempty"` + // SQL query which will filter contacts based on the conditions provided + QueryDsl *string `json:"query_dsl,omitempty"` +} diff --git a/rest/api/v3/mc_segments_2/model_segment_write_v2.go b/rest/api/v3/mc_segments_2/model_segment_write_v2.go new file mode 100644 index 00000000..f0acdd74 --- /dev/null +++ b/rest/api/v3/mc_segments_2/model_segment_write_v2.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Segments 2.0 API +* The Twilio SendGrid Marketing Campaigns Segments V2 API allows you to create, edit, and delete segments as well as retrieve a list of segments or an individual segment by ID. Segments are similar to contact lists, except they update dynamically over time as information stored about your contacts or the criteria used to define your segments changes. When you segment your audience, you are able to create personalized Automation emails and Single Sends that directly address the wants and needs of your particular audience. Note that Twilio SendGrid checks for newly added or modified contacts who meet a segment's criteria on an hourly schedule. Only existing contacts who meet a segment's criteria will be included in the segment searches within 15 minutes. Segments built using engagement data such as \"was sent\" or \"clicked\" will take approximately 30 minutes to begin populating. Segment samples and counts are refreshed approximately once per hour; they do not update immediately. If no contacts are added to or removed from a segment since the last refresh, the sample and UI count displayed will be refreshed at increasing time intervals with a maximum sample and count refresh delay of 24 hours. You can also manage your Segments with the [Marketing Campaigns application user interface](https://mc.sendgrid.com/contacts). See [**Segmenting Your Contacts**](https://docs.sendgrid.com/ui/managing-contacts/segmenting-your-contacts) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SegmentWriteV2 struct for SegmentWriteV2 +type SegmentWriteV2 struct { + // Name of the segment. + Name string `json:"name"` + // The array of list ids to filter contacts on when building this segment. It allows only one such list id for now. We will support more in future + ParentListIds *[]string `json:"parent_list_ids,omitempty"` + // SQL query which will filter contacts based on the conditions provided + QueryDsl string `json:"query_dsl"` +} diff --git a/rest/api/v3/mc_senders/README.md b/rest/api/v3/mc_senders/README.md new file mode 100644 index 00000000..716cda89 --- /dev/null +++ b/rest/api/v3/mc_senders/README.md @@ -0,0 +1,74 @@ +# Go API client for + +The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:02.193378+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateSender* | [**CreateSender**](docs/CreateSender.md#createsender) | **Post** /v3/marketing/senders | Create a Sender +*DeleteSender* | [**DeleteSender**](docs/DeleteSender.md#deletesender) | **Delete** /v3/marketing/senders/{Id} | Delete a Sender +*GetSender* | [**GetSender**](docs/GetSender.md#getsender) | **Get** /v3/marketing/senders/{Id} | Get a specific Sender +*ListSender* | [**ListSender**](docs/ListSender.md#listsender) | **Get** /v3/marketing/senders | Get a list of all Senders +*ResetSenderVerification* | [**ResetSenderVerification**](docs/ResetSenderVerification.md#resetsenderverification) | **Post** /v3/marketing/senders/{Id}/resend_verification | Resend a Sender verification +*UpdateSender* | [**UpdateSender**](docs/UpdateSender.md#updatesender) | **Patch** /v3/marketing/senders/{Id} | Update a Sender + + +## Documentation For Models + + - [CreateSenderRequest](CreateSenderRequest.md) + - [CreateSenderRequestFrom](CreateSenderRequestFrom.md) + - [CreateSenderRequestReplyTo](CreateSenderRequestReplyTo.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [ListSender200Response](ListSender200Response.md) + - [Sender](Sender.md) + - [SenderRequest](SenderRequest.md) + - [SenderRequestFrom](SenderRequestFrom.md) + - [SenderRequestReplyTo](SenderRequestReplyTo.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/mc_senders/api_create_sender.go b/rest/api/v3/mc_senders/api_create_sender.go new file mode 100644 index 00000000..c39979a5 --- /dev/null +++ b/rest/api/v3/mc_senders/api_create_sender.go @@ -0,0 +1,98 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateSenderParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + CreateSenderRequest *CreateSenderRequest `json:"CreateSenderRequest,omitempty"` +} + +func (params *CreateSenderParam) SetOnbehalfof(Onbehalfof string) *CreateSenderParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateSenderParam) SetCreateSenderRequest(CreateSenderRequest CreateSenderRequest) *CreateSenderParam { + params.CreateSenderRequest = &CreateSenderRequest + return params +} + +// **This endpoint allows you to create a new Sender.** *You may create up to 100 unique Senders.* Senders are required to be verified before use. If your domain has been authenticated, a new Sender will auto verify on creation. Otherwise an email will be sent to the `from.email`. +func (c *ApiService) CreateSender(params *CreateSenderParam) (interface{}, error) { + path := "/v3/marketing/senders" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateSenderRequest != nil { + b, err := json.Marshal(*params.CreateSenderRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &Sender{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_senders/api_delete_sender.go b/rest/api/v3/mc_senders/api_delete_sender.go new file mode 100644 index 00000000..d2226a7c --- /dev/null +++ b/rest/api/v3/mc_senders/api_delete_sender.go @@ -0,0 +1,79 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type DeleteSenderParam struct { + // The unique identifier of the Sender. + Id *int32 `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteSenderParam) SetId(Id int32) *DeleteSenderParam { + params.Id = &Id + return params +} +func (params *DeleteSenderParam) SetOnbehalfof(Onbehalfof string) *DeleteSenderParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete an existing Sender.** +func (c *ApiService) DeleteSender(params *DeleteSenderParam) (interface{}, error) { + path := "/v3/marketing/senders/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_senders/api_get_sender.go b/rest/api/v3/mc_senders/api_get_sender.go new file mode 100644 index 00000000..17c7ddd2 --- /dev/null +++ b/rest/api/v3/mc_senders/api_get_sender.go @@ -0,0 +1,79 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type GetSenderParam struct { + // The unique identifier of the Sender. + Id *int32 `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetSenderParam) SetId(Id int32) *GetSenderParam { + params.Id = &Id + return params +} +func (params *GetSenderParam) SetOnbehalfof(Onbehalfof string) *GetSenderParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to get the details for a specific Sender by `id`.** +func (c *ApiService) GetSender(params *GetSenderParam) (interface{}, error) { + path := "/v3/marketing/senders/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &Sender{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_senders/api_list_sender.go b/rest/api/v3/mc_senders/api_list_sender.go new file mode 100644 index 00000000..9024a22a --- /dev/null +++ b/rest/api/v3/mc_senders/api_list_sender.go @@ -0,0 +1,67 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListSenderParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListSenderParam) SetOnbehalfof(Onbehalfof string) *ListSenderParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to get a list of all your Senders.** +func (c *ApiService) ListSender(params *ListSenderParam) (interface{}, error) { + path := "/v3/marketing/senders" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListSender200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_senders/api_reset_sender_verification.go b/rest/api/v3/mc_senders/api_reset_sender_verification.go new file mode 100644 index 00000000..270fb3e9 --- /dev/null +++ b/rest/api/v3/mc_senders/api_reset_sender_verification.go @@ -0,0 +1,79 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type ResetSenderVerificationParam struct { + // The unique identifier of the Sender. + Id *int32 `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ResetSenderVerificationParam) SetId(Id int32) *ResetSenderVerificationParam { + params.Id = &Id + return params +} +func (params *ResetSenderVerificationParam) SetOnbehalfof(Onbehalfof string) *ResetSenderVerificationParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to resend the verification request for a specific Sender.** +func (c *ApiService) ResetSenderVerification(params *ResetSenderVerificationParam) (interface{}, error) { + path := "/v3/marketing/senders/{Id}/resend_verification" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_senders/api_service.go b/rest/api/v3/mc_senders/api_service.go new file mode 100644 index 00000000..d8fd91ab --- /dev/null +++ b/rest/api/v3/mc_senders/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/mc_senders/api_update_sender.go b/rest/api/v3/mc_senders/api_update_sender.go new file mode 100644 index 00000000..23892f4e --- /dev/null +++ b/rest/api/v3/mc_senders/api_update_sender.go @@ -0,0 +1,110 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type UpdateSenderParam struct { + // The unique identifier of the Sender. + Id *int32 `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + SenderRequest *SenderRequest `json:"SenderRequest,omitempty"` +} + +func (params *UpdateSenderParam) SetId(Id int32) *UpdateSenderParam { + params.Id = &Id + return params +} +func (params *UpdateSenderParam) SetOnbehalfof(Onbehalfof string) *UpdateSenderParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateSenderParam) SetSenderRequest(SenderRequest SenderRequest) *UpdateSenderParam { + params.SenderRequest = &SenderRequest + return params +} + +// **This endpoint allows you to update an existing Sender.** Updates to `from.email` require re-verification. If your domain has been authenticated, a new Sender will auto verify on creation. Otherwise, an email will be sent to the `from.email`. Partial updates are allowed, but fields that are marked as \"required\" in the `POST` (create) endpoint must not be nil if that field is included in the `PATCH` request. +func (c *ApiService) UpdateSender(params *UpdateSenderParam) (interface{}, error) { + path := "/v3/marketing/senders/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", fmt.Sprint(*params.Id), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SenderRequest != nil { + b, err := json.Marshal(*params.SenderRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &Sender{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_senders/docs/CreateSender.md b/rest/api/v3/mc_senders/docs/CreateSender.md new file mode 100644 index 00000000..c1f21b0e --- /dev/null +++ b/rest/api/v3/mc_senders/docs/CreateSender.md @@ -0,0 +1,49 @@ +# CreateSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateSender**](CreateSender.md#CreateSender) | **Post** /v3/marketing/senders | Create a Sender + + + +## CreateSender + +> Sender CreateSender(ctx, optional) + +Create a Sender + +**This endpoint allows you to create a new Sender.** *You may create up to 100 unique Senders.* Senders are required to be verified before use. If your domain has been authenticated, a new Sender will auto verify on creation. Otherwise an email will be sent to the `from.email`. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**CreateSenderRequest** | [**CreateSenderRequest**](CreateSenderRequest.md) | + +### Return type + +[**Sender**](Sender.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_senders/docs/CreateSenderRequest.md b/rest/api/v3/mc_senders/docs/CreateSenderRequest.md new file mode 100644 index 00000000..1848e991 --- /dev/null +++ b/rest/api/v3/mc_senders/docs/CreateSenderRequest.md @@ -0,0 +1,19 @@ +# CreateSenderRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Nickname** | **string** | A nickname for the Sender. Not used for sending. | +**From** | [**CreateSenderRequestFrom**](CreateSenderRequestFrom.md) | | +**ReplyTo** | [**CreateSenderRequestReplyTo**](CreateSenderRequestReplyTo.md) | | +**Address** | **string** | The physical address of the Sender. | +**Address2** | **string** | Additional Sender address information. |[optional] +**City** | **string** | The city of the Sender. | +**State** | **string** | The state of the Sender. |[optional] +**Zip** | **string** | The zipcode of the Sender. |[optional] +**Country** | **string** | The country of the Sender. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_senders/docs/CreateSenderRequestFrom.md b/rest/api/v3/mc_senders/docs/CreateSenderRequestFrom.md new file mode 100644 index 00000000..14b6faa0 --- /dev/null +++ b/rest/api/v3/mc_senders/docs/CreateSenderRequestFrom.md @@ -0,0 +1,12 @@ +# CreateSenderRequestFrom + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address from which your recipient will receive emails. | +**Name** | **string** | The name appended to the from email field. Typically your name or company name. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_senders/docs/CreateSenderRequestReplyTo.md b/rest/api/v3/mc_senders/docs/CreateSenderRequestReplyTo.md new file mode 100644 index 00000000..8f4f6e5e --- /dev/null +++ b/rest/api/v3/mc_senders/docs/CreateSenderRequestReplyTo.md @@ -0,0 +1,12 @@ +# CreateSenderRequestReplyTo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address to which your recipient will reply. | +**Name** | **string** | The name appended to the reply to email field. Typically your name or company name. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_senders/docs/DeleteSender.md b/rest/api/v3/mc_senders/docs/DeleteSender.md new file mode 100644 index 00000000..90499cef --- /dev/null +++ b/rest/api/v3/mc_senders/docs/DeleteSender.md @@ -0,0 +1,52 @@ +# DeleteSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSender**](DeleteSender.md#DeleteSender) | **Delete** /v3/marketing/senders/{Id} | Delete a Sender + + + +## DeleteSender + +> DeleteSender(ctx, Idoptional) + +Delete a Sender + +**This endpoint allows you to delete an existing Sender.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **int32** | The unique identifier of the Sender. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_senders/docs/ErrorResponse.md b/rest/api/v3/mc_senders/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/mc_senders/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_senders/docs/ErrorResponseErrorsInner.md b/rest/api/v3/mc_senders/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/mc_senders/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_senders/docs/GetSender.md b/rest/api/v3/mc_senders/docs/GetSender.md new file mode 100644 index 00000000..27544663 --- /dev/null +++ b/rest/api/v3/mc_senders/docs/GetSender.md @@ -0,0 +1,52 @@ +# GetSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetSender**](GetSender.md#GetSender) | **Get** /v3/marketing/senders/{Id} | Get a specific Sender + + + +## GetSender + +> Sender GetSender(ctx, Idoptional) + +Get a specific Sender + +**This endpoint allows you to get the details for a specific Sender by `id`.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **int32** | The unique identifier of the Sender. + +### Other Parameters + +Other parameters are passed through a pointer to a GetSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**Sender**](Sender.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_senders/docs/ListSender.md b/rest/api/v3/mc_senders/docs/ListSender.md new file mode 100644 index 00000000..0490f053 --- /dev/null +++ b/rest/api/v3/mc_senders/docs/ListSender.md @@ -0,0 +1,48 @@ +# ListSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSender**](ListSender.md#ListSender) | **Get** /v3/marketing/senders | Get a list of all Senders + + + +## ListSender + +> ListSender200Response ListSender(ctx, optional) + +Get a list of all Senders + +**This endpoint allows you to get a list of all your Senders.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListSender200Response**](ListSender200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_senders/docs/ListSender200Response.md b/rest/api/v3/mc_senders/docs/ListSender200Response.md new file mode 100644 index 00000000..d12cf53e --- /dev/null +++ b/rest/api/v3/mc_senders/docs/ListSender200Response.md @@ -0,0 +1,11 @@ +# ListSender200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | [**[]Sender**](Sender.md) | An array of Sender objects. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_senders/docs/ResetSenderVerification.md b/rest/api/v3/mc_senders/docs/ResetSenderVerification.md new file mode 100644 index 00000000..2351b423 --- /dev/null +++ b/rest/api/v3/mc_senders/docs/ResetSenderVerification.md @@ -0,0 +1,52 @@ +# ResetSenderVerification + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ResetSenderVerification**](ResetSenderVerification.md#ResetSenderVerification) | **Post** /v3/marketing/senders/{Id}/resend_verification | Resend a Sender verification + + + +## ResetSenderVerification + +> ResetSenderVerification(ctx, Idoptional) + +Resend a Sender verification + +**This endpoint allows you to resend the verification request for a specific Sender.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **int32** | The unique identifier of the Sender. + +### Other Parameters + +Other parameters are passed through a pointer to a ResetSenderVerificationParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_senders/docs/Sender.md b/rest/api/v3/mc_senders/docs/Sender.md new file mode 100644 index 00000000..13276770 --- /dev/null +++ b/rest/api/v3/mc_senders/docs/Sender.md @@ -0,0 +1,24 @@ +# Sender + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The unique identifier of the Sender. | +**Nickname** | **string** | A nickname for the Sender. Not used for sending. | +**From** | [**CreateSenderRequestFrom**](CreateSenderRequestFrom.md) | | +**ReplyTo** | [**CreateSenderRequestReplyTo**](CreateSenderRequestReplyTo.md) | | +**Address** | **string** | The physical address of the Sender. | +**Address2** | **string** | Additional Sender address information. |[optional] +**City** | **string** | The city of the Sender. | +**State** | **string** | The state of the Sender. |[optional] +**Zip** | **string** | The zipcode of the Sender. |[optional] +**Country** | **string** | The country of the Sender. | +**Verified** | **bool** | A boolean flag indicating whether the Sender is verified or not. Only verified Senders can be used to send email. | +**Locked** | **bool** | A boolean flag that is `true` when the Sender is associated with a campaign in Draft, Scheduled, or In Progress status. You cannot update or delete a locked Sender. | +**UpdatedAt** | **int32** | The time the Sender was last updated. | +**CreatedAt** | **int32** | The time the Sender was created. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_senders/docs/SenderRequest.md b/rest/api/v3/mc_senders/docs/SenderRequest.md new file mode 100644 index 00000000..8ca97438 --- /dev/null +++ b/rest/api/v3/mc_senders/docs/SenderRequest.md @@ -0,0 +1,19 @@ +# SenderRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Nickname** | **string** | A nickname for the Sender. Not used for sending. |[optional] +**From** | [**SenderRequestFrom**](SenderRequestFrom.md) | |[optional] +**ReplyTo** | [**SenderRequestReplyTo**](SenderRequestReplyTo.md) | |[optional] +**Address** | **string** | The physical address of the Sender. |[optional] +**Address2** | **string** | Additional Sender address information. |[optional] +**City** | **string** | The city of the Sender. |[optional] +**State** | **string** | The state of the Sender. |[optional] +**Zip** | **string** | The zipcode of the Sender. |[optional] +**Country** | **string** | The country of the Sender. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_senders/docs/SenderRequestFrom.md b/rest/api/v3/mc_senders/docs/SenderRequestFrom.md new file mode 100644 index 00000000..8db8be81 --- /dev/null +++ b/rest/api/v3/mc_senders/docs/SenderRequestFrom.md @@ -0,0 +1,12 @@ +# SenderRequestFrom + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address from which your recipient will receive emails. |[optional] +**Name** | **string** | The name appended to the from email field. Typically your name or company name. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_senders/docs/SenderRequestReplyTo.md b/rest/api/v3/mc_senders/docs/SenderRequestReplyTo.md new file mode 100644 index 00000000..cfebfa3c --- /dev/null +++ b/rest/api/v3/mc_senders/docs/SenderRequestReplyTo.md @@ -0,0 +1,12 @@ +# SenderRequestReplyTo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address to which your recipient will reply. |[optional] +**Name** | **string** | The name appended to the reply to email field. Typically your name or company name. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_senders/docs/UpdateSender.md b/rest/api/v3/mc_senders/docs/UpdateSender.md new file mode 100644 index 00000000..2d71e4e0 --- /dev/null +++ b/rest/api/v3/mc_senders/docs/UpdateSender.md @@ -0,0 +1,53 @@ +# UpdateSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSender**](UpdateSender.md#UpdateSender) | **Patch** /v3/marketing/senders/{Id} | Update a Sender + + + +## UpdateSender + +> Sender UpdateSender(ctx, Idoptional) + +Update a Sender + +**This endpoint allows you to update an existing Sender.** Updates to `from.email` require re-verification. If your domain has been authenticated, a new Sender will auto verify on creation. Otherwise, an email will be sent to the `from.email`. Partial updates are allowed, but fields that are marked as \"required\" in the `POST` (create) endpoint must not be nil if that field is included in the `PATCH` request. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **int32** | The unique identifier of the Sender. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**SenderRequest** | [**SenderRequest**](SenderRequest.md) | + +### Return type + +[**Sender**](Sender.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_senders/model_create_sender_request.go b/rest/api/v3/mc_senders/model_create_sender_request.go new file mode 100644 index 00000000..5b037483 --- /dev/null +++ b/rest/api/v3/mc_senders/model_create_sender_request.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateSenderRequest struct for CreateSenderRequest +type CreateSenderRequest struct { + // A nickname for the Sender. Not used for sending. + Nickname string `json:"nickname"` + From CreateSenderRequestFrom `json:"from"` + ReplyTo CreateSenderRequestReplyTo `json:"reply_to"` + // The physical address of the Sender. + Address string `json:"address"` + // Additional Sender address information. + Address2 *string `json:"address_2,omitempty"` + // The city of the Sender. + City string `json:"city"` + // The state of the Sender. + State *string `json:"state,omitempty"` + // The zipcode of the Sender. + Zip *string `json:"zip,omitempty"` + // The country of the Sender. + Country string `json:"country"` +} diff --git a/rest/api/v3/mc_senders/model_create_sender_request_from.go b/rest/api/v3/mc_senders/model_create_sender_request_from.go new file mode 100644 index 00000000..63bdb64e --- /dev/null +++ b/rest/api/v3/mc_senders/model_create_sender_request_from.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateSenderRequestFrom struct for CreateSenderRequestFrom +type CreateSenderRequestFrom struct { + // The email address from which your recipient will receive emails. + Email string `json:"email"` + // The name appended to the from email field. Typically your name or company name. + Name string `json:"name"` +} diff --git a/rest/api/v3/mc_senders/model_create_sender_request_reply_to.go b/rest/api/v3/mc_senders/model_create_sender_request_reply_to.go new file mode 100644 index 00000000..82a5abef --- /dev/null +++ b/rest/api/v3/mc_senders/model_create_sender_request_reply_to.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateSenderRequestReplyTo struct for CreateSenderRequestReplyTo +type CreateSenderRequestReplyTo struct { + // The email address to which your recipient will reply. + Email string `json:"email"` + // The name appended to the reply to email field. Typically your name or company name. + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/mc_senders/model_error_response.go b/rest/api/v3/mc_senders/model_error_response.go new file mode 100644 index 00000000..3513d637 --- /dev/null +++ b/rest/api/v3/mc_senders/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/mc_senders/model_error_response_errors_inner.go b/rest/api/v3/mc_senders/model_error_response_errors_inner.go new file mode 100644 index 00000000..43267f83 --- /dev/null +++ b/rest/api/v3/mc_senders/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/mc_senders/model_list_sender_200_response.go b/rest/api/v3/mc_senders/model_list_sender_200_response.go new file mode 100644 index 00000000..970767db --- /dev/null +++ b/rest/api/v3/mc_senders/model_list_sender_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSender200Response struct for ListSender200Response +type ListSender200Response struct { + // An array of Sender objects. + Results *[]Sender `json:"results,omitempty"` +} diff --git a/rest/api/v3/mc_senders/model_sender.go b/rest/api/v3/mc_senders/model_sender.go new file mode 100644 index 00000000..b204c704 --- /dev/null +++ b/rest/api/v3/mc_senders/model_sender.go @@ -0,0 +1,44 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Sender struct for Sender +type Sender struct { + // The unique identifier of the Sender. + Id int32 `json:"id"` + // A nickname for the Sender. Not used for sending. + Nickname string `json:"nickname"` + From CreateSenderRequestFrom `json:"from"` + ReplyTo CreateSenderRequestReplyTo `json:"reply_to"` + // The physical address of the Sender. + Address string `json:"address"` + // Additional Sender address information. + Address2 *string `json:"address_2,omitempty"` + // The city of the Sender. + City string `json:"city"` + // The state of the Sender. + State *string `json:"state,omitempty"` + // The zipcode of the Sender. + Zip *string `json:"zip,omitempty"` + // The country of the Sender. + Country string `json:"country"` + // A boolean flag indicating whether the Sender is verified or not. Only verified Senders can be used to send email. + Verified bool `json:"verified"` + // A boolean flag that is `true` when the Sender is associated with a campaign in Draft, Scheduled, or In Progress status. You cannot update or delete a locked Sender. + Locked bool `json:"locked"` + // The time the Sender was last updated. + UpdatedAt int32 `json:"updated_at"` + // The time the Sender was created. + CreatedAt int32 `json:"created_at"` +} diff --git a/rest/api/v3/mc_senders/model_sender_request.go b/rest/api/v3/mc_senders/model_sender_request.go new file mode 100644 index 00000000..88d80f3b --- /dev/null +++ b/rest/api/v3/mc_senders/model_sender_request.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SenderRequest struct for SenderRequest +type SenderRequest struct { + // A nickname for the Sender. Not used for sending. + Nickname *string `json:"nickname,omitempty"` + From *SenderRequestFrom `json:"from,omitempty"` + ReplyTo *SenderRequestReplyTo `json:"reply_to,omitempty"` + // The physical address of the Sender. + Address *string `json:"address,omitempty"` + // Additional Sender address information. + Address2 *string `json:"address_2,omitempty"` + // The city of the Sender. + City *string `json:"city,omitempty"` + // The state of the Sender. + State *string `json:"state,omitempty"` + // The zipcode of the Sender. + Zip *string `json:"zip,omitempty"` + // The country of the Sender. + Country *string `json:"country,omitempty"` +} diff --git a/rest/api/v3/mc_senders/model_sender_request_from.go b/rest/api/v3/mc_senders/model_sender_request_from.go new file mode 100644 index 00000000..618487c8 --- /dev/null +++ b/rest/api/v3/mc_senders/model_sender_request_from.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SenderRequestFrom struct for SenderRequestFrom +type SenderRequestFrom struct { + // The email address from which your recipient will receive emails. + Email *string `json:"email,omitempty"` + // The name appended to the from email field. Typically your name or company name. + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/mc_senders/model_sender_request_reply_to.go b/rest/api/v3/mc_senders/model_sender_request_reply_to.go new file mode 100644 index 00000000..4b79fc3b --- /dev/null +++ b/rest/api/v3/mc_senders/model_sender_request_reply_to.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Senders API +* The Twilio SendGrid Marketing Campaigns Senders API allows you to create a verified sender from which your marketing emails will be sent. To ensure our customers maintain the best possible sender reputations and to uphold legitimate sending behavior, we require customers to verify their Senders. A Sender represents your “From” email address—the address your recipients will see as the sender of your emails. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SenderRequestReplyTo struct for SenderRequestReplyTo +type SenderRequestReplyTo struct { + // The email address to which your recipient will reply. + Email *string `json:"email,omitempty"` + // The name appended to the reply to email field. Typically your name or company name. + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/README.md b/rest/api/v3/mc_singlesends/README.md new file mode 100644 index 00000000..c6ab60e7 --- /dev/null +++ b/rest/api/v3/mc_singlesends/README.md @@ -0,0 +1,103 @@ +# Go API client for + +The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. + +A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. + +Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). + +The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:02.231486+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateSingleSend* | [**CreateSingleSend**](docs/CreateSingleSend.md#createsinglesend) | **Post** /v3/marketing/singlesends | Create Single Send +*DeleteScheduledSingleSend* | [**DeleteScheduledSingleSend**](docs/DeleteScheduledSingleSend.md#deletescheduledsinglesend) | **Delete** /v3/marketing/singlesends/{Id}/schedule | Delete Single Send Schedule +*DeleteSingleSend* | [**DeleteSingleSend**](docs/DeleteSingleSend.md#deletesinglesend) | **Delete** /v3/marketing/singlesends/{Id} | Delete Single Send by ID +*DeleteSingleSends* | [**DeleteSingleSends**](docs/DeleteSingleSends.md#deletesinglesends) | **Delete** /v3/marketing/singlesends | Bulk Delete Single Sends +*DuplicateSingleSend* | [**DuplicateSingleSend**](docs/DuplicateSingleSend.md#duplicatesinglesend) | **Post** /v3/marketing/singlesends/{Id} | Duplicate Single Send +*GetSingleSend* | [**GetSingleSend**](docs/GetSingleSend.md#getsinglesend) | **Get** /v3/marketing/singlesends/{Id} | Get Single Send by ID +*ListCategory* | [**ListCategory**](docs/ListCategory.md#listcategory) | **Get** /v3/marketing/singlesends/categories | Get All Categories +*ListSingleSend* | [**ListSingleSend**](docs/ListSingleSend.md#listsinglesend) | **Get** /v3/marketing/singlesends | Get All Single Sends +*ScheduleSingleSend* | [**ScheduleSingleSend**](docs/ScheduleSingleSend.md#schedulesinglesend) | **Put** /v3/marketing/singlesends/{Id}/schedule | Schedule Single Send +*SearchSingleSend* | [**SearchSingleSend**](docs/SearchSingleSend.md#searchsinglesend) | **Post** /v3/marketing/singlesends/search | Get Single Sends Search +*UpdateSingleSend* | [**UpdateSingleSend**](docs/UpdateSingleSend.md#updatesinglesend) | **Patch** /v3/marketing/singlesends/{Id} | Update Single Send + + +## Documentation For Models + + - [AbTestSummary](AbTestSummary.md) + - [DuplicateSingleSendRequest](DuplicateSingleSendRequest.md) + - [Editor](Editor.md) + - [Editor1](Editor1.md) + - [Items](Items.md) + - [ListCategory200Response](ListCategory200Response.md) + - [ListSingleSend200Response](ListSingleSend200Response.md) + - [ListSingleSend500Response](ListSingleSend500Response.md) + - [ListSingleSend500ResponseErrorsInner](ListSingleSend500ResponseErrorsInner.md) + - [Metadata](Metadata.md) + - [ScheduleSingleSend201Response](ScheduleSingleSend201Response.md) + - [ScheduleSingleSendRequest](ScheduleSingleSendRequest.md) + - [SinglesendRequest](SinglesendRequest.md) + - [SinglesendRequestEmailConfig](SinglesendRequestEmailConfig.md) + - [SinglesendRequestSendTo](SinglesendRequestSendTo.md) + - [SinglesendResponse](SinglesendResponse.md) + - [SinglesendResponseEmailConfig](SinglesendResponseEmailConfig.md) + - [SinglesendResponseSendTo](SinglesendResponseSendTo.md) + - [SinglesendResponseShort](SinglesendResponseShort.md) + - [SinglesendResponseWarningsInner](SinglesendResponseWarningsInner.md) + - [SinglesendSchedule](SinglesendSchedule.md) + - [SinglesendSearch](SinglesendSearch.md) + - [Status](Status.md) + - [Status1](Status1.md) + - [Status2](Status2.md) + - [Status3](Status3.md) + - [Type](Type.md) + - [WinnerCriteria](WinnerCriteria.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/mc_singlesends/api_create_single_send.go b/rest/api/v3/mc_singlesends/api_create_single_send.go new file mode 100644 index 00000000..ef5f67fd --- /dev/null +++ b/rest/api/v3/mc_singlesends/api_create_single_send.go @@ -0,0 +1,81 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateSingleSendParam struct { + // + SinglesendRequest *SinglesendRequest `json:"SinglesendRequest,omitempty"` +} + +func (params *CreateSingleSendParam) SetSinglesendRequest(SinglesendRequest SinglesendRequest) *CreateSingleSendParam { + params.SinglesendRequest = &SinglesendRequest + return params +} + +// **This endpoint allows you to create a new Single Send.** Please note that if you are migrating from the previous version of Single Sends, you no longer need to pass a template ID with your request to this endpoint. Instead, you will pass all template data in the `email_config` object. This endpoint will create a draft of the Single Send but will not send it or schedule it to be sent. Any `send_at` property value set with this endpoint will prepopulate the Single Send's send date. However, the Single Send will remain an unscheduled draft until it's updated with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI. +func (c *ApiService) CreateSingleSend(params *CreateSingleSendParam) (interface{}, error) { + path := "/v3/marketing/singlesends" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SinglesendRequest != nil { + b, err := json.Marshal(*params.SinglesendRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &SinglesendResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_singlesends/api_delete_scheduled_single_send.go b/rest/api/v3/mc_singlesends/api_delete_scheduled_single_send.go new file mode 100644 index 00000000..01608356 --- /dev/null +++ b/rest/api/v3/mc_singlesends/api_delete_scheduled_single_send.go @@ -0,0 +1,77 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteScheduledSingleSendParam struct { + // + Id *string `json:"id"` +} + +func (params *DeleteScheduledSingleSendParam) SetId(Id string) *DeleteScheduledSingleSendParam { + params.Id = &Id + return params +} + +// **This endpoint allows you to cancel a scheduled Single Send using a Single Send ID.** Making a DELETE request to this endpoint will cancel the scheduled sending of a Single Send. The request will not delete the Single Send itself. Deleting a Single Send can be done by passing a DELETE request to `/marketing/singlesends/{id}`. +func (c *ApiService) DeleteScheduledSingleSend(params *DeleteScheduledSingleSendParam) (interface{}, error) { + path := "/v3/marketing/singlesends/{Id}/schedule" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SinglesendSchedule{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_singlesends/api_delete_single_send.go b/rest/api/v3/mc_singlesends/api_delete_single_send.go new file mode 100644 index 00000000..e3735759 --- /dev/null +++ b/rest/api/v3/mc_singlesends/api_delete_single_send.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteSingleSendParam struct { + // + Id *string `json:"id"` +} + +func (params *DeleteSingleSendParam) SetId(Id string) *DeleteSingleSendParam { + params.Id = &Id + return params +} + +// **This endpoint allows you to delete one Single Send using a Single Send ID.** To first retrieve all your Single Sends' IDs, you can make a GET request to the `/marketing/singlensends` endpoint. Please note that a `DELETE` request is permanent, and your Single Send will not be recoverable after deletion. +func (c *ApiService) DeleteSingleSend(params *DeleteSingleSendParam) (interface{}, error) { + path := "/v3/marketing/singlesends/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 404 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_singlesends/api_delete_single_sends.go b/rest/api/v3/mc_singlesends/api_delete_single_sends.go new file mode 100644 index 00000000..d6bc40f4 --- /dev/null +++ b/rest/api/v3/mc_singlesends/api_delete_single_sends.go @@ -0,0 +1,77 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type DeleteSingleSendsParam struct { + // Single Send IDs to delete + Ids *[]string `json:"ids,omitempty"` +} + +func (params *DeleteSingleSendsParam) SetIds(Ids []string) *DeleteSingleSendsParam { + params.Ids = &Ids + return params +} + +// **This endpoint allows you to delete multiple Single Sends using an array of Single Sends IDs.** To first retrieve all your Single Sends' IDs, you can make a GET request to the `/marketing/singlensends` endpoint. Please note that a DELETE request is permanent, and your Single Sends will not be recoverable after deletion. +func (c *ApiService) DeleteSingleSends(params *DeleteSingleSendsParam) (interface{}, error) { + path := "/v3/marketing/singlesends" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Ids != nil { + for _, item := range *params.Ids { + v, err := json.Marshal(item) + + if err != nil { + return nil, err + } + + data.Add("ids", string(v)) + + } + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 404 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_singlesends/api_duplicate_single_send.go b/rest/api/v3/mc_singlesends/api_duplicate_single_send.go new file mode 100644 index 00000000..84369624 --- /dev/null +++ b/rest/api/v3/mc_singlesends/api_duplicate_single_send.go @@ -0,0 +1,92 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DuplicateSingleSendParam struct { + // + Id *string `json:"id"` + // + DuplicateSingleSendRequest *DuplicateSingleSendRequest `json:"DuplicateSingleSendRequest,omitempty"` +} + +func (params *DuplicateSingleSendParam) SetId(Id string) *DuplicateSingleSendParam { + params.Id = &Id + return params +} +func (params *DuplicateSingleSendParam) SetDuplicateSingleSendRequest(DuplicateSingleSendRequest DuplicateSingleSendRequest) *DuplicateSingleSendParam { + params.DuplicateSingleSendRequest = &DuplicateSingleSendRequest + return params +} + +// **This endpoint allows you to duplicate an existing Single Send using its Single Send ID.** Duplicating a Single Send is useful when you want to create a Single Send but don't want to start from scratch. Once duplicated, you can update or edit the Single Send by making a PATCH request to the `/marketing/singlesends/{id}` endpoint. If you leave the `name` field blank, your duplicate will be assigned the name of the Single Send it was copied from with the text “Copy of ” prepended to it. The `name` field length is limited to 100 characters, so the end of the new Single Send name, including “Copy of ”, will be trimmed if the name exceeds this limit. +func (c *ApiService) DuplicateSingleSend(params *DuplicateSingleSendParam) (interface{}, error) { + path := "/v3/marketing/singlesends/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.DuplicateSingleSendRequest != nil { + b, err := json.Marshal(*params.DuplicateSingleSendRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &SinglesendResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_singlesends/api_get_single_send.go b/rest/api/v3/mc_singlesends/api_get_single_send.go new file mode 100644 index 00000000..61ed40a2 --- /dev/null +++ b/rest/api/v3/mc_singlesends/api_get_single_send.go @@ -0,0 +1,77 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetSingleSendParam struct { + // + Id *string `json:"id"` +} + +func (params *GetSingleSendParam) SetId(Id string) *GetSingleSendParam { + params.Id = &Id + return params +} + +// **This endpoint allows you to retrieve details about one Single Send using a Single Send ID.** You can retrieve all of your Single Sends by making a GET request to the `/marketing/singlesends` endpoint. +func (c *ApiService) GetSingleSend(params *GetSingleSendParam) (interface{}, error) { + path := "/v3/marketing/singlesends/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SinglesendResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_singlesends/api_list_category.go b/rest/api/v3/mc_singlesends/api_list_category.go new file mode 100644 index 00000000..563d0182 --- /dev/null +++ b/rest/api/v3/mc_singlesends/api_list_category.go @@ -0,0 +1,57 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListCategoryParam struct { +} + +// **This endpoint allows you to retrieve all the categories associated with your Single Sends.** This endpoint will return your latest 1,000 categories. +func (c *ApiService) ListCategory() (interface{}, error) { + path := "/v3/marketing/singlesends/categories" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListCategory200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_singlesends/api_list_single_send.go b/rest/api/v3/mc_singlesends/api_list_single_send.go new file mode 100644 index 00000000..5ea75202 --- /dev/null +++ b/rest/api/v3/mc_singlesends/api_list_single_send.go @@ -0,0 +1,78 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListSingleSendParam struct { + // + PageSize *int32 `json:"page_size,omitempty"` + // + PageToken *string `json:"page_token,omitempty"` +} + +func (params *ListSingleSendParam) SetPageSize(PageSize int32) *ListSingleSendParam { + params.PageSize = &PageSize + return params +} +func (params *ListSingleSendParam) SetPageToken(PageToken string) *ListSingleSendParam { + params.PageToken = &PageToken + return params +} + +// **This endpoint allows you to retrieve all your Single Sends.** Returns all of your Single Sends with condensed details about each, including the Single Sends' IDs. For more details about an individual Single Send, pass the Single Send's ID to the `/marketing/singlesends/{id}` endpoint. +func (c *ApiService) ListSingleSend(params *ListSingleSendParam) (interface{}, error) { + path := "/v3/marketing/singlesends" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + if params != nil && params.PageToken != nil { + data.Set("page_token", *params.PageToken) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListSingleSend200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_singlesends/api_schedule_single_send.go b/rest/api/v3/mc_singlesends/api_schedule_single_send.go new file mode 100644 index 00000000..dc4794fb --- /dev/null +++ b/rest/api/v3/mc_singlesends/api_schedule_single_send.go @@ -0,0 +1,92 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type ScheduleSingleSendParam struct { + // + Id *string `json:"id"` + // + ScheduleSingleSendRequest *ScheduleSingleSendRequest `json:"ScheduleSingleSendRequest,omitempty"` +} + +func (params *ScheduleSingleSendParam) SetId(Id string) *ScheduleSingleSendParam { + params.Id = &Id + return params +} +func (params *ScheduleSingleSendParam) SetScheduleSingleSendRequest(ScheduleSingleSendRequest ScheduleSingleSendRequest) *ScheduleSingleSendParam { + params.ScheduleSingleSendRequest = &ScheduleSingleSendRequest + return params +} + +// **This endpoint allows you to send a Single Send immediately or schedule it to be sent at a later time.** To send your message immediately, set the `send_at` property value to the string `now`. To schedule the Single Send for future delivery, set the `send_at` value to your desired send time in [ISO 8601 date time format](https://www.iso.org/iso-8601-date-and-time-format.html) (`yyyy-MM-ddTHH:mm:ssZ`). +func (c *ApiService) ScheduleSingleSend(params *ScheduleSingleSendParam) (interface{}, error) { + path := "/v3/marketing/singlesends/{Id}/schedule" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.ScheduleSingleSendRequest != nil { + b, err := json.Marshal(*params.ScheduleSingleSendRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &ScheduleSingleSend201Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_singlesends/api_search_single_send.go b/rest/api/v3/mc_singlesends/api_search_single_send.go new file mode 100644 index 00000000..c2c142bd --- /dev/null +++ b/rest/api/v3/mc_singlesends/api_search_single_send.go @@ -0,0 +1,92 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type SearchSingleSendParam struct { + // + PageSize *int32 `json:"page_size,omitempty"` + // + PageToken *string `json:"page_token,omitempty"` + // + SinglesendSearch *SinglesendSearch `json:"SinglesendSearch,omitempty"` +} + +func (params *SearchSingleSendParam) SetPageSize(PageSize int32) *SearchSingleSendParam { + params.PageSize = &PageSize + return params +} +func (params *SearchSingleSendParam) SetPageToken(PageToken string) *SearchSingleSendParam { + params.PageToken = &PageToken + return params +} +func (params *SearchSingleSendParam) SetSinglesendSearch(SinglesendSearch SinglesendSearch) *SearchSingleSendParam { + params.SinglesendSearch = &SinglesendSearch + return params +} + +// **This endpoint allows you to search for Single Sends based on specified criteria.** You can search for Single Sends by passing a combination of values using the `name`, `status`, and `categories` request body fields. For example, if you want to search for all Single Sends that are \"drafts\" or \"scheduled\" and also associated with the category \"shoes,\" your request body may look like the example below. ```javascript { \"status\": [ \"draft\", \"scheduled\" ], \"categories\": [ \"shoes\" ], } ``` +func (c *ApiService) SearchSingleSend(params *SearchSingleSendParam) (interface{}, error) { + path := "/v3/marketing/singlesends/search" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + if params != nil && params.PageToken != nil { + data.Set("page_token", *params.PageToken) + } + body := []byte{} + if params != nil && params.SinglesendSearch != nil { + b, err := json.Marshal(*params.SinglesendSearch) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListSingleSend200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_singlesends/api_service.go b/rest/api/v3/mc_singlesends/api_service.go new file mode 100644 index 00000000..dbf3b326 --- /dev/null +++ b/rest/api/v3/mc_singlesends/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/mc_singlesends/api_update_single_send.go b/rest/api/v3/mc_singlesends/api_update_single_send.go new file mode 100644 index 00000000..ca12d700 --- /dev/null +++ b/rest/api/v3/mc_singlesends/api_update_single_send.go @@ -0,0 +1,100 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateSingleSendParam struct { + // + Id *string `json:"id"` + // + SinglesendRequest *SinglesendRequest `json:"SinglesendRequest,omitempty"` +} + +func (params *UpdateSingleSendParam) SetId(Id string) *UpdateSingleSendParam { + params.Id = &Id + return params +} +func (params *UpdateSingleSendParam) SetSinglesendRequest(SinglesendRequest SinglesendRequest) *UpdateSingleSendParam { + params.SinglesendRequest = &SinglesendRequest + return params +} + +// **This endpoint allows you to update a Single Send using a Single Send ID.** You only need to pass the properties you want to update. Any blank or missing properties will remain unaltered. This endpoint will update a draft of the Single Send but will not send it or schedule it to be sent. Any `send_at` property value set with this endpoint will prepopulate the Single Send's send date. However, the Single Send will remain an unscheduled draft until it's updated with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI. +func (c *ApiService) UpdateSingleSend(params *UpdateSingleSendParam) (interface{}, error) { + path := "/v3/marketing/singlesends/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SinglesendRequest != nil { + b, err := json.Marshal(*params.SinglesendRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 202 { + ps := &SinglesendResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListSingleSend500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_singlesends/docs/AbTestSummary.md b/rest/api/v3/mc_singlesends/docs/AbTestSummary.md new file mode 100644 index 00000000..c0c3c316 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/AbTestSummary.md @@ -0,0 +1,17 @@ +# AbTestSummary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | [**Type**](Type.md) | What differs between the A/B tests | +**WinnerCriteria** | [**WinnerCriteria**](WinnerCriteria.md) | How the winner will be decided | +**TestPercentage** | **int32** | What percentage of your recipient will be included in your A/B testing | +**Duration** | **string** | How long the A/B Testing will last | +**WinningTemplateId** | **string** | Winner of the A/B Test | +**WinnerSelectedAt** | **string** | When the winner was selected | +**ExpirationDate** | **string** | Last day to select an A/B Test Winner | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/CreateSingleSend.md b/rest/api/v3/mc_singlesends/docs/CreateSingleSend.md new file mode 100644 index 00000000..41b0107b --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/CreateSingleSend.md @@ -0,0 +1,48 @@ +# CreateSingleSend + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateSingleSend**](CreateSingleSend.md#CreateSingleSend) | **Post** /v3/marketing/singlesends | Create Single Send + + + +## CreateSingleSend + +> SinglesendResponse CreateSingleSend(ctx, optional) + +Create Single Send + +**This endpoint allows you to create a new Single Send.** Please note that if you are migrating from the previous version of Single Sends, you no longer need to pass a template ID with your request to this endpoint. Instead, you will pass all template data in the `email_config` object. This endpoint will create a draft of the Single Send but will not send it or schedule it to be sent. Any `send_at` property value set with this endpoint will prepopulate the Single Send's send date. However, the Single Send will remain an unscheduled draft until it's updated with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateSingleSendParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**SinglesendRequest** | [**SinglesendRequest**](SinglesendRequest.md) | + +### Return type + +[**SinglesendResponse**](SinglesendResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_singlesends/docs/DeleteScheduledSingleSend.md b/rest/api/v3/mc_singlesends/docs/DeleteScheduledSingleSend.md new file mode 100644 index 00000000..e9d4fd0a --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/DeleteScheduledSingleSend.md @@ -0,0 +1,51 @@ +# DeleteScheduledSingleSend + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteScheduledSingleSend**](DeleteScheduledSingleSend.md#DeleteScheduledSingleSend) | **Delete** /v3/marketing/singlesends/{Id}/schedule | Delete Single Send Schedule + + + +## DeleteScheduledSingleSend + +> SinglesendSchedule DeleteScheduledSingleSend(ctx, Id) + +Delete Single Send Schedule + +**This endpoint allows you to cancel a scheduled Single Send using a Single Send ID.** Making a DELETE request to this endpoint will cancel the scheduled sending of a Single Send. The request will not delete the Single Send itself. Deleting a Single Send can be done by passing a DELETE request to `/marketing/singlesends/{id}`. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteScheduledSingleSendParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**SinglesendSchedule**](SinglesendSchedule.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_singlesends/docs/DeleteSingleSend.md b/rest/api/v3/mc_singlesends/docs/DeleteSingleSend.md new file mode 100644 index 00000000..9d987dcb --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/DeleteSingleSend.md @@ -0,0 +1,51 @@ +# DeleteSingleSend + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSingleSend**](DeleteSingleSend.md#DeleteSingleSend) | **Delete** /v3/marketing/singlesends/{Id} | Delete Single Send by ID + + + +## DeleteSingleSend + +> DeleteSingleSend(ctx, Id) + +Delete Single Send by ID + +**This endpoint allows you to delete one Single Send using a Single Send ID.** To first retrieve all your Single Sends' IDs, you can make a GET request to the `/marketing/singlensends` endpoint. Please note that a `DELETE` request is permanent, and your Single Send will not be recoverable after deletion. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSingleSendParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_singlesends/docs/DeleteSingleSends.md b/rest/api/v3/mc_singlesends/docs/DeleteSingleSends.md new file mode 100644 index 00000000..80c58b83 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/DeleteSingleSends.md @@ -0,0 +1,48 @@ +# DeleteSingleSends + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSingleSends**](DeleteSingleSends.md#DeleteSingleSends) | **Delete** /v3/marketing/singlesends | Bulk Delete Single Sends + + + +## DeleteSingleSends + +> DeleteSingleSends(ctx, optional) + +Bulk Delete Single Sends + +**This endpoint allows you to delete multiple Single Sends using an array of Single Sends IDs.** To first retrieve all your Single Sends' IDs, you can make a GET request to the `/marketing/singlensends` endpoint. Please note that a DELETE request is permanent, and your Single Sends will not be recoverable after deletion. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSingleSendsParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Ids** | **[]string** | Single Send IDs to delete + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_singlesends/docs/DuplicateSingleSend.md b/rest/api/v3/mc_singlesends/docs/DuplicateSingleSend.md new file mode 100644 index 00000000..6a0272f3 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/DuplicateSingleSend.md @@ -0,0 +1,52 @@ +# DuplicateSingleSend + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DuplicateSingleSend**](DuplicateSingleSend.md#DuplicateSingleSend) | **Post** /v3/marketing/singlesends/{Id} | Duplicate Single Send + + + +## DuplicateSingleSend + +> SinglesendResponse DuplicateSingleSend(ctx, Idoptional) + +Duplicate Single Send + +**This endpoint allows you to duplicate an existing Single Send using its Single Send ID.** Duplicating a Single Send is useful when you want to create a Single Send but don't want to start from scratch. Once duplicated, you can update or edit the Single Send by making a PATCH request to the `/marketing/singlesends/{id}` endpoint. If you leave the `name` field blank, your duplicate will be assigned the name of the Single Send it was copied from with the text “Copy of ” prepended to it. The `name` field length is limited to 100 characters, so the end of the new Single Send name, including “Copy of ”, will be trimmed if the name exceeds this limit. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a DuplicateSingleSendParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**DuplicateSingleSendRequest** | [**DuplicateSingleSendRequest**](DuplicateSingleSendRequest.md) | + +### Return type + +[**SinglesendResponse**](SinglesendResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_singlesends/docs/DuplicateSingleSendRequest.md b/rest/api/v3/mc_singlesends/docs/DuplicateSingleSendRequest.md new file mode 100644 index 00000000..9b9c44e6 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/DuplicateSingleSendRequest.md @@ -0,0 +1,11 @@ +# DuplicateSingleSendRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the duplicate Single Send. If you choose to leave the name field blank, your duplicate will be assigned the name of the Single Send it was copied from with the text 'Copy of ' prepended to it. The end of the new Single Send name, including 'Copy of ', will be trimmed if the name exceeds the character limit. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/Editor.md b/rest/api/v3/mc_singlesends/docs/Editor.md new file mode 100644 index 00000000..9d170841 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/Editor.md @@ -0,0 +1,13 @@ +# Editor + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**CODE** | string | (value: `"code"`) +**DESIGN** | string | (value: `"design"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/Editor1.md b/rest/api/v3/mc_singlesends/docs/Editor1.md new file mode 100644 index 00000000..2ddc5d89 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/Editor1.md @@ -0,0 +1,13 @@ +# Editor1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**CODE** | string | (value: `"code"`) +**DESIGN** | string | (value: `"design"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/GetSingleSend.md b/rest/api/v3/mc_singlesends/docs/GetSingleSend.md new file mode 100644 index 00000000..0c7434bb --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/GetSingleSend.md @@ -0,0 +1,51 @@ +# GetSingleSend + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetSingleSend**](GetSingleSend.md#GetSingleSend) | **Get** /v3/marketing/singlesends/{Id} | Get Single Send by ID + + + +## GetSingleSend + +> SinglesendResponse GetSingleSend(ctx, Id) + +Get Single Send by ID + +**This endpoint allows you to retrieve details about one Single Send using a Single Send ID.** You can retrieve all of your Single Sends by making a GET request to the `/marketing/singlesends` endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a GetSingleSendParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**SinglesendResponse**](SinglesendResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_singlesends/docs/Items.md b/rest/api/v3/mc_singlesends/docs/Items.md new file mode 100644 index 00000000..781c4ec7 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/Items.md @@ -0,0 +1,14 @@ +# Items + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DRAFT** | string | (value: `"draft"`) +**SCHEDULED** | string | (value: `"scheduled"`) +**TRIGGERED** | string | (value: `"triggered"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/ListCategory.md b/rest/api/v3/mc_singlesends/docs/ListCategory.md new file mode 100644 index 00000000..4f7a81be --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/ListCategory.md @@ -0,0 +1,44 @@ +# ListCategory + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListCategory**](ListCategory.md#ListCategory) | **Get** /v3/marketing/singlesends/categories | Get All Categories + + + +## ListCategory + +> ListCategory200Response ListCategory(ctx, ) + +Get All Categories + +**This endpoint allows you to retrieve all the categories associated with your Single Sends.** This endpoint will return your latest 1,000 categories. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListCategoryParams struct + + +### Return type + +[**ListCategory200Response**](ListCategory200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_singlesends/docs/ListCategory200Response.md b/rest/api/v3/mc_singlesends/docs/ListCategory200Response.md new file mode 100644 index 00000000..27af5839 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/ListCategory200Response.md @@ -0,0 +1,11 @@ +# ListCategory200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Categories** | **[]string** | list of latest one thousand unique categories associated with all Single Sends in ascending order |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/ListSingleSend.md b/rest/api/v3/mc_singlesends/docs/ListSingleSend.md new file mode 100644 index 00000000..fee8c3fb --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/ListSingleSend.md @@ -0,0 +1,49 @@ +# ListSingleSend + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSingleSend**](ListSingleSend.md#ListSingleSend) | **Get** /v3/marketing/singlesends | Get All Single Sends + + + +## ListSingleSend + +> ListSingleSend200Response ListSingleSend(ctx, optional) + +Get All Single Sends + +**This endpoint allows you to retrieve all your Single Sends.** Returns all of your Single Sends with condensed details about each, including the Single Sends' IDs. For more details about an individual Single Send, pass the Single Send's ID to the `/marketing/singlesends/{id}` endpoint. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSingleSendParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**PageSize** | **int32** | +**PageToken** | **string** | + +### Return type + +[**ListSingleSend200Response**](ListSingleSend200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_singlesends/docs/ListSingleSend200Response.md b/rest/api/v3/mc_singlesends/docs/ListSingleSend200Response.md new file mode 100644 index 00000000..8ad91d0e --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/ListSingleSend200Response.md @@ -0,0 +1,12 @@ +# ListSingleSend200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]SinglesendResponseShort**](SinglesendResponseShort.md) | |[optional] +**Metadata** | [**Metadata**](Metadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/ListSingleSend500Response.md b/rest/api/v3/mc_singlesends/docs/ListSingleSend500Response.md new file mode 100644 index 00000000..a07c4f3a --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/ListSingleSend500Response.md @@ -0,0 +1,11 @@ +# ListSingleSend500Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ListSingleSend500ResponseErrorsInner**](ListSingleSend500ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/ListSingleSend500ResponseErrorsInner.md b/rest/api/v3/mc_singlesends/docs/ListSingleSend500ResponseErrorsInner.md new file mode 100644 index 00000000..24c6f3f9 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/ListSingleSend500ResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ListSingleSend500ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | |[optional] +**Message** | **string** | |[optional] +**ErrorId** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/Metadata.md b/rest/api/v3/mc_singlesends/docs/Metadata.md new file mode 100644 index 00000000..6121300c --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/Metadata.md @@ -0,0 +1,14 @@ +# Metadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prev** | **string** | |[optional] +**Self** | **string** | |[optional] +**Next** | **string** | |[optional] +**Count** | **int32** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/ScheduleSingleSend.md b/rest/api/v3/mc_singlesends/docs/ScheduleSingleSend.md new file mode 100644 index 00000000..738548c6 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/ScheduleSingleSend.md @@ -0,0 +1,52 @@ +# ScheduleSingleSend + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ScheduleSingleSend**](ScheduleSingleSend.md#ScheduleSingleSend) | **Put** /v3/marketing/singlesends/{Id}/schedule | Schedule Single Send + + + +## ScheduleSingleSend + +> ScheduleSingleSend201Response ScheduleSingleSend(ctx, Idoptional) + +Schedule Single Send + +**This endpoint allows you to send a Single Send immediately or schedule it to be sent at a later time.** To send your message immediately, set the `send_at` property value to the string `now`. To schedule the Single Send for future delivery, set the `send_at` value to your desired send time in [ISO 8601 date time format](https://www.iso.org/iso-8601-date-and-time-format.html) (`yyyy-MM-ddTHH:mm:ssZ`). + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a ScheduleSingleSendParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**ScheduleSingleSendRequest** | [**ScheduleSingleSendRequest**](ScheduleSingleSendRequest.md) | + +### Return type + +[**ScheduleSingleSend201Response**](ScheduleSingleSend201Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_singlesends/docs/ScheduleSingleSend201Response.md b/rest/api/v3/mc_singlesends/docs/ScheduleSingleSend201Response.md new file mode 100644 index 00000000..565341af --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/ScheduleSingleSend201Response.md @@ -0,0 +1,12 @@ +# ScheduleSingleSend201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SendAt** | [**time.Time**](time.Time.md) | The ISO 8601 time at which to send the Single Send. This must be in future or the string `now`. SendGrid [Mail Send](https://docs.sendgrid.com/api-reference/mail-send/mail-send) emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via [Marketing Campaigns](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns/). |[optional] +**Status** | [**Status**](Status.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/ScheduleSingleSendRequest.md b/rest/api/v3/mc_singlesends/docs/ScheduleSingleSendRequest.md new file mode 100644 index 00000000..02842731 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/ScheduleSingleSendRequest.md @@ -0,0 +1,11 @@ +# ScheduleSingleSendRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SendAt** | [**time.Time**](time.Time.md) | The ISO 8601 time at which to send the Single Send. This must be in future or the string `now`. SendGrid [Mail Send](https://docs.sendgrid.com/api-reference/mail-send/mail-send) emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via [Marketing Campaigns](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns/). | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/SearchSingleSend.md b/rest/api/v3/mc_singlesends/docs/SearchSingleSend.md new file mode 100644 index 00000000..cf141ace --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/SearchSingleSend.md @@ -0,0 +1,50 @@ +# SearchSingleSend + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SearchSingleSend**](SearchSingleSend.md#SearchSingleSend) | **Post** /v3/marketing/singlesends/search | Get Single Sends Search + + + +## SearchSingleSend + +> ListSingleSend200Response SearchSingleSend(ctx, optional) + +Get Single Sends Search + +**This endpoint allows you to search for Single Sends based on specified criteria.** You can search for Single Sends by passing a combination of values using the `name`, `status`, and `categories` request body fields. For example, if you want to search for all Single Sends that are \"drafts\" or \"scheduled\" and also associated with the category \"shoes,\" your request body may look like the example below. ```javascript { \"status\": [ \"draft\", \"scheduled\" ], \"categories\": [ \"shoes\" ], } ``` + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a SearchSingleSendParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**PageSize** | **int32** | +**PageToken** | **string** | +**SinglesendSearch** | [**SinglesendSearch**](SinglesendSearch.md) | + +### Return type + +[**ListSingleSend200Response**](ListSingleSend200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendRequest.md b/rest/api/v3/mc_singlesends/docs/SinglesendRequest.md new file mode 100644 index 00000000..b84a5487 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/SinglesendRequest.md @@ -0,0 +1,15 @@ +# SinglesendRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the Single Send. | +**Categories** | **[]string** | The categories to associate with this Single Send. |[optional] +**SendAt** | [**time.Time**](time.Time.md) | Set this property to an ISO 8601 formatted date-time when you would like to send the Single Send. Please note that any `send_at` property value set with this endpoint will prepopulate the send date in the SendGrid user interface (UI). However, the Single Send will remain an unscheduled draft until it's updated with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI. Additionally, the `now` keyword is a valid `send_at` value only when using the Schedule Single Send endpoint. Setting this property to `now` with this endpoint will cause an error. |[optional] +**SendTo** | [**SinglesendRequestSendTo**](SinglesendRequestSendTo.md) | |[optional] +**EmailConfig** | [**SinglesendRequestEmailConfig**](SinglesendRequestEmailConfig.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendRequestEmailConfig.md b/rest/api/v3/mc_singlesends/docs/SinglesendRequestEmailConfig.md new file mode 100644 index 00000000..633bd086 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/SinglesendRequestEmailConfig.md @@ -0,0 +1,20 @@ +# SinglesendRequestEmailConfig + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Subject** | **string** | The subject line of the Single Send. Do not include this field when using a `design_id`. |[optional] +**HtmlContent** | **string** | The HTML content of the Single Send. Do not include this field when using a `design_id`. |[optional] +**PlainContent** | **string** | The plain text content of the Single Send. Do not include this field when using a `design_id`. |[optional] +**GeneratePlainContent** | **bool** | If set to `true`, `plain_content` is always generated from `html_content`. If set to false, `plain_content` is not altered. |[optional] [default to true] +**DesignId** | **string** | A `design_id` can be used in place of `html_content`, `plain_content`, and/or `subject`. You can retrieve a design's ID from the [\"List Designs\" endpoint](https://docs.sendgrid.com/api-reference/designs-api/list-designs) or by pulling it from the design's detail page URL in the Marketing Campaigns App. |[optional] +**Editor** | [**Editor**](Editor.md) | The editor — `\"design\"` or `\"code\"` — used to modify the Single Send's design in the Marketing Campaigns App. |[optional] +**SuppressionGroupId** | **int32** | The ID of the Suppression Group to allow recipients to unsubscribe — you must provide this or the `custom_unsubscribe_url`. |[optional] +**CustomUnsubscribeUrl** | **string** | The URL allowing recipients to unsubscribe — you must provide this or the `suppression_group_id`. |[optional] +**SenderId** | **int32** | The ID of the verified Sender. You can retrieve a verified Sender's ID from the [\"Get Verified Senders\" endpoint](https://www.twilio.com/docs/sendgrid/api-reference/sender-verification/get-all-verified-senders) or by pulling it from the Sender's detail page URL in the SendGrid App. |[optional] +**IpPool** | **string** | The name of the IP Pool from which the Single Send emails are sent. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendRequestSendTo.md b/rest/api/v3/mc_singlesends/docs/SinglesendRequestSendTo.md new file mode 100644 index 00000000..f1f2d523 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/SinglesendRequestSendTo.md @@ -0,0 +1,13 @@ +# SinglesendRequestSendTo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ListIds** | **[]string** | The recipient List IDs that will receive the Single Send. |[optional] +**SegmentIds** | **[]string** | The recipient Segment IDs that will receive the Single Send. |[optional] +**All** | **bool** | Set to `true` to send to All Contacts. If set to `false`, at least one `list_ids` or `segment_ids` value must be provided before the Single Send is scheduled to be sent to recipients. |[optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendResponse.md b/rest/api/v3/mc_singlesends/docs/SinglesendResponse.md new file mode 100644 index 00000000..95d0cbcf --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/SinglesendResponse.md @@ -0,0 +1,20 @@ +# SinglesendResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The unique ID for the Single Send. |[optional] +**Name** | **string** | The name of the Single Send. |[optional] +**Status** | [**Status2**](Status2.md) | The current status of the Single Send. The status may be `draft`, `scheduled`, or `triggered`. |[optional] +**Categories** | **[]string** | The categories associated with this Single Send. |[optional] +**SendAt** | [**time.Time**](time.Time.md) | An ISO 8601 formatted date-time when the Single Send is set to be sent. Please note that any `send_at` property value will have no effect while the Single Send `status` is `draft`. You must update the Single Send with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI to schedule it. |[optional] +**SendTo** | [**SinglesendResponseSendTo**](SinglesendResponseSendTo.md) | |[optional] +**UpdatedAt** | [**time.Time**](time.Time.md) | the ISO 8601 time at which the Single Send was last updated. |[optional] +**CreatedAt** | [**time.Time**](time.Time.md) | the ISO 8601 time at which the Single Send was created. |[optional] +**EmailConfig** | [**SinglesendResponseEmailConfig**](SinglesendResponseEmailConfig.md) | |[optional] +**Warnings** | [**[]SinglesendResponseWarningsInner**](SinglesendResponseWarningsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendResponseEmailConfig.md b/rest/api/v3/mc_singlesends/docs/SinglesendResponseEmailConfig.md new file mode 100644 index 00000000..e9faf1fb --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/SinglesendResponseEmailConfig.md @@ -0,0 +1,20 @@ +# SinglesendResponseEmailConfig + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Subject** | **string** | The subject line of the Single Send. This property is not used when a `design_id` value is set. |[optional] +**HtmlContent** | **string** | The HTML content of the Single Send. This property is not used when a `design_id` value is set. |[optional] +**PlainContent** | **string** | The plain text content of the Single Send. This property is not used when a `design_id` value is set. |[optional] +**GeneratePlainContent** | **bool** | If this property is set to `true`, `plain_content` is always generated from `html_content`. If it's set to false, `plain_content` is not altered. |[optional] [default to true] +**DesignId** | **string** | A `design_id` can be used in place of `html_content`, `plain_content`, and/or `subject`. You can retrieve a design's ID from the [**List Designs** endpoint](https://docs.sendgrid.com/api-reference/designs-api/list-designs) or by pulling it from the design's detail page URL in the Marketing Campaigns App. |[optional] +**Editor** | [**Editor1**](Editor1.md) | The editor, `design` or `code`, used to modify the Single Send's design in the Marketing Campaigns application user interface. |[optional] +**SuppressionGroupId** | **int32** | The ID of the Suppression Group to allow recipients to unsubscribe. You must provide a `suppression_group_id` or the `custom_unsubscribe_url` with your Single Send. |[optional] +**CustomUnsubscribeUrl** | **string** | The URL allowing recipients to unsubscribe. You must provide a `custom_unsubscribe_url` or a `suppression_group_id` with your Single Send. |[optional] +**SenderId** | **int32** | The ID of the verified sender from whom the Single Send will be sent. You can retrieve a verified sender's ID from the [**Get Verified Senders** endpoint](https://www.twilio.com/docs/sendgrid/api-reference/sender-verification/get-all-verified-senders) or by pulling it from the sender's detail page URL in the SendGrid App. |[optional] +**IpPool** | **string** | The name of the IP Pool from which the Single Send emails are sent. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendResponseSendTo.md b/rest/api/v3/mc_singlesends/docs/SinglesendResponseSendTo.md new file mode 100644 index 00000000..d7e33ea8 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/SinglesendResponseSendTo.md @@ -0,0 +1,13 @@ +# SinglesendResponseSendTo + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ListIds** | **[]string** | The IDs of each contact list to which the Single Send will be sent. |[optional] +**SegmentIds** | **[]string** | The IDs of each segment to which the Single Send will be sent. |[optional] +**All** | **bool** | If this property is set to `true`, the Single Send will be sent to all of your contacts. If it's set to `false`, at least one `list_ids` or `segment_ids` value must be provided before the Single Send is scheduled to be sent. |[optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendResponseShort.md b/rest/api/v3/mc_singlesends/docs/SinglesendResponseShort.md new file mode 100644 index 00000000..bfe6a053 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/SinglesendResponseShort.md @@ -0,0 +1,19 @@ +# SinglesendResponseShort + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**Name** | **string** | name of the Single Send | +**Abtest** | [**AbTestSummary**](AbTestSummary.md) | | +**Status** | [**Status3**](Status3.md) | current status of the Single Send | +**Categories** | **[]string** | categories to associate with this Single Send | +**SendAt** | [**time.Time**](time.Time.md) | The ISO 8601 time at which to send the Single Send. This must be in future or the string `now`. SendGrid [Mail Send](https://docs.sendgrid.com/api-reference/mail-send/mail-send) emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via [Marketing Campaigns](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns/). |[optional] +**IsAbtest** | **bool** | true if the Single Send's AB Test functionality has been toggled on | +**UpdatedAt** | [**time.Time**](time.Time.md) | the ISO 8601 time at which the Single Send was last updated | +**CreatedAt** | [**time.Time**](time.Time.md) | the ISO 8601 time at which the Single Send was created | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendResponseWarningsInner.md b/rest/api/v3/mc_singlesends/docs/SinglesendResponseWarningsInner.md new file mode 100644 index 00000000..15c969c3 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/SinglesendResponseWarningsInner.md @@ -0,0 +1,13 @@ +# SinglesendResponseWarningsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | |[optional] +**Field** | **string** | |[optional] +**WarningId** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendSchedule.md b/rest/api/v3/mc_singlesends/docs/SinglesendSchedule.md new file mode 100644 index 00000000..df6d4402 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/SinglesendSchedule.md @@ -0,0 +1,12 @@ +# SinglesendSchedule + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SendAt** | [**time.Time**](time.Time.md) | The ISO 8601 time at which to send the Single Send. This must be in future or the string `now`. SendGrid [Mail Send](https://docs.sendgrid.com/api-reference/mail-send/mail-send) emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via [Marketing Campaigns](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns/). | +**Status** | [**Status1**](Status1.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/SinglesendSearch.md b/rest/api/v3/mc_singlesends/docs/SinglesendSearch.md new file mode 100644 index 00000000..79589188 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/SinglesendSearch.md @@ -0,0 +1,13 @@ +# SinglesendSearch + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | leading and trailing wildcard search on name of the Single Send |[optional] +**Status** | [**[]Items**](Items.md) | current status of the Single Send |[optional] +**Categories** | **[]string** | categories to associate with this Single Send, match any single send that has at least one of the categories |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/Status.md b/rest/api/v3/mc_singlesends/docs/Status.md new file mode 100644 index 00000000..533fff83 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/Status.md @@ -0,0 +1,12 @@ +# Status + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**SCHEDULED** | string | (value: `"scheduled"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/Status1.md b/rest/api/v3/mc_singlesends/docs/Status1.md new file mode 100644 index 00000000..b19ad21b --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/Status1.md @@ -0,0 +1,14 @@ +# Status1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DRAFT** | string | (value: `"draft"`) +**SCHEDULED** | string | (value: `"scheduled"`) +**TRIGGERED** | string | (value: `"triggered"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/Status2.md b/rest/api/v3/mc_singlesends/docs/Status2.md new file mode 100644 index 00000000..eb4cca4d --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/Status2.md @@ -0,0 +1,14 @@ +# Status2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DRAFT** | string | (value: `"draft"`) +**SCHEDULED** | string | (value: `"scheduled"`) +**TRIGGERED** | string | (value: `"triggered"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/Status3.md b/rest/api/v3/mc_singlesends/docs/Status3.md new file mode 100644 index 00000000..1b7a0104 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/Status3.md @@ -0,0 +1,14 @@ +# Status3 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DRAFT** | string | (value: `"draft"`) +**SCHEDULED** | string | (value: `"scheduled"`) +**TRIGGERED** | string | (value: `"triggered"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/Type.md b/rest/api/v3/mc_singlesends/docs/Type.md new file mode 100644 index 00000000..1ea1cee4 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/Type.md @@ -0,0 +1,13 @@ +# Type + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**SUBJECT** | string | (value: `"subject"`) +**CONTENT** | string | (value: `"content"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/docs/UpdateSingleSend.md b/rest/api/v3/mc_singlesends/docs/UpdateSingleSend.md new file mode 100644 index 00000000..9614a701 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/UpdateSingleSend.md @@ -0,0 +1,52 @@ +# UpdateSingleSend + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSingleSend**](UpdateSingleSend.md#UpdateSingleSend) | **Patch** /v3/marketing/singlesends/{Id} | Update Single Send + + + +## UpdateSingleSend + +> SinglesendResponse UpdateSingleSend(ctx, Idoptional) + +Update Single Send + +**This endpoint allows you to update a Single Send using a Single Send ID.** You only need to pass the properties you want to update. Any blank or missing properties will remain unaltered. This endpoint will update a draft of the Single Send but will not send it or schedule it to be sent. Any `send_at` property value set with this endpoint will prepopulate the Single Send's send date. However, the Single Send will remain an unscheduled draft until it's updated with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSingleSendParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**SinglesendRequest** | [**SinglesendRequest**](SinglesendRequest.md) | + +### Return type + +[**SinglesendResponse**](SinglesendResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_singlesends/docs/WinnerCriteria.md b/rest/api/v3/mc_singlesends/docs/WinnerCriteria.md new file mode 100644 index 00000000..d35ce1e3 --- /dev/null +++ b/rest/api/v3/mc_singlesends/docs/WinnerCriteria.md @@ -0,0 +1,14 @@ +# WinnerCriteria + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**OPEN** | string | (value: `"open"`) +**CLICK** | string | (value: `"click"`) +**MANUAL** | string | (value: `"manual"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_singlesends/model_ab_test_summary.go b/rest/api/v3/mc_singlesends/model_ab_test_summary.go new file mode 100644 index 00000000..c7a67236 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_ab_test_summary.go @@ -0,0 +1,32 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AbTestSummary struct for AbTestSummary +type AbTestSummary struct { + // What differs between the A/B tests + Type Type `json:"type"` + // How the winner will be decided + WinnerCriteria WinnerCriteria `json:"winner_criteria"` + // What percentage of your recipient will be included in your A/B testing + TestPercentage int32 `json:"test_percentage"` + // How long the A/B Testing will last + Duration string `json:"duration"` + // Winner of the A/B Test + WinningTemplateId string `json:"winning_template_id"` + // When the winner was selected + WinnerSelectedAt string `json:"winner_selected_at"` + // Last day to select an A/B Test Winner + ExpirationDate string `json:"expiration_date"` +} diff --git a/rest/api/v3/mc_singlesends/model_duplicate_single_send_request.go b/rest/api/v3/mc_singlesends/model_duplicate_single_send_request.go new file mode 100644 index 00000000..48f96a53 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_duplicate_single_send_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DuplicateSingleSendRequest struct for DuplicateSingleSendRequest +type DuplicateSingleSendRequest struct { + // The name of the duplicate Single Send. If you choose to leave the name field blank, your duplicate will be assigned the name of the Single Send it was copied from with the text 'Copy of ' prepended to it. The end of the new Single Send name, including 'Copy of ', will be trimmed if the name exceeds the character limit. + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_editor.go b/rest/api/v3/mc_singlesends/model_editor.go new file mode 100644 index 00000000..d498173d --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_editor.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Editor the model 'Editor' +type Editor string + +// List of Editor +const ( + EDITOR_CODE Editor = "code" + EDITOR_DESIGN Editor = "design" +) diff --git a/rest/api/v3/mc_singlesends/model_editor1.go b/rest/api/v3/mc_singlesends/model_editor1.go new file mode 100644 index 00000000..b5e0aff7 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_editor1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Editor1 the model 'Editor1' +type Editor1 string + +// List of Editor1 +const ( + EDITOR1_CODE Editor1 = "code" + EDITOR1_DESIGN Editor1 = "design" +) diff --git a/rest/api/v3/mc_singlesends/model_items.go b/rest/api/v3/mc_singlesends/model_items.go new file mode 100644 index 00000000..cb49393e --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_items.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Items the model 'Items' +type Items string + +// List of Items +const ( + ITEMS_DRAFT Items = "draft" + ITEMS_SCHEDULED Items = "scheduled" + ITEMS_TRIGGERED Items = "triggered" +) diff --git a/rest/api/v3/mc_singlesends/model_list_category_200_response.go b/rest/api/v3/mc_singlesends/model_list_category_200_response.go new file mode 100644 index 00000000..53e5017a --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_list_category_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListCategory200Response struct for ListCategory200Response +type ListCategory200Response struct { + // list of latest one thousand unique categories associated with all Single Sends in ascending order + Categories *[]string `json:"categories,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_list_single_send_200_response.go b/rest/api/v3/mc_singlesends/model_list_single_send_200_response.go new file mode 100644 index 00000000..655bd91e --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_list_single_send_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSingleSend200Response struct for ListSingleSend200Response +type ListSingleSend200Response struct { + Result *[]SinglesendResponseShort `json:"result,omitempty"` + Metadata *Metadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_list_single_send_500_response.go b/rest/api/v3/mc_singlesends/model_list_single_send_500_response.go new file mode 100644 index 00000000..4475e149 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_list_single_send_500_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSingleSend500Response struct for ListSingleSend500Response +type ListSingleSend500Response struct { + Errors *[]ListSingleSend500ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_list_single_send_500_response_errors_inner.go b/rest/api/v3/mc_singlesends/model_list_single_send_500_response_errors_inner.go new file mode 100644 index 00000000..00fae477 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_list_single_send_500_response_errors_inner.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSingleSend500ResponseErrorsInner struct for ListSingleSend500ResponseErrorsInner +type ListSingleSend500ResponseErrorsInner struct { + Field *string `json:"field,omitempty"` + Message *string `json:"message,omitempty"` + ErrorId *string `json:"error_id,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_metadata.go b/rest/api/v3/mc_singlesends/model_metadata.go new file mode 100644 index 00000000..56fb60e7 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_metadata.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Metadata struct for Metadata +type Metadata struct { + Prev *string `json:"prev,omitempty"` + Self *string `json:"self,omitempty"` + Next *string `json:"next,omitempty"` + Count *int32 `json:"count,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_schedule_single_send_201_response.go b/rest/api/v3/mc_singlesends/model_schedule_single_send_201_response.go new file mode 100644 index 00000000..01d2c672 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_schedule_single_send_201_response.go @@ -0,0 +1,25 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "time" +) + +// ScheduleSingleSend201Response struct for ScheduleSingleSend201Response +type ScheduleSingleSend201Response struct { + // The ISO 8601 time at which to send the Single Send. This must be in future or the string `now`. SendGrid [Mail Send](https://docs.sendgrid.com/api-reference/mail-send/mail-send) emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via [Marketing Campaigns](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns/). + SendAt *time.Time `json:"send_at,omitempty"` + Status *Status `json:"status,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_schedule_single_send_request.go b/rest/api/v3/mc_singlesends/model_schedule_single_send_request.go new file mode 100644 index 00000000..cf2c6448 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_schedule_single_send_request.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "time" +) + +// ScheduleSingleSendRequest struct for ScheduleSingleSendRequest +type ScheduleSingleSendRequest struct { + // The ISO 8601 time at which to send the Single Send. This must be in future or the string `now`. SendGrid [Mail Send](https://docs.sendgrid.com/api-reference/mail-send/mail-send) emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via [Marketing Campaigns](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns/). + SendAt time.Time `json:"send_at"` +} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_request.go b/rest/api/v3/mc_singlesends/model_singlesend_request.go new file mode 100644 index 00000000..790d1be9 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_singlesend_request.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "time" +) + +// SinglesendRequest struct for SinglesendRequest +type SinglesendRequest struct { + // The name of the Single Send. + Name string `json:"name"` + // The categories to associate with this Single Send. + Categories *[]string `json:"categories,omitempty"` + // Set this property to an ISO 8601 formatted date-time when you would like to send the Single Send. Please note that any `send_at` property value set with this endpoint will prepopulate the send date in the SendGrid user interface (UI). However, the Single Send will remain an unscheduled draft until it's updated with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI. Additionally, the `now` keyword is a valid `send_at` value only when using the Schedule Single Send endpoint. Setting this property to `now` with this endpoint will cause an error. + SendAt *time.Time `json:"send_at,omitempty"` + SendTo *SinglesendRequestSendTo `json:"send_to,omitempty"` + EmailConfig *SinglesendRequestEmailConfig `json:"email_config,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_request_email_config.go b/rest/api/v3/mc_singlesends/model_singlesend_request_email_config.go new file mode 100644 index 00000000..666324db --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_singlesend_request_email_config.go @@ -0,0 +1,38 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SinglesendRequestEmailConfig struct for SinglesendRequestEmailConfig +type SinglesendRequestEmailConfig struct { + // The subject line of the Single Send. Do not include this field when using a `design_id`. + Subject *string `json:"subject,omitempty"` + // The HTML content of the Single Send. Do not include this field when using a `design_id`. + HtmlContent *string `json:"html_content,omitempty"` + // The plain text content of the Single Send. Do not include this field when using a `design_id`. + PlainContent *string `json:"plain_content,omitempty"` + // If set to `true`, `plain_content` is always generated from `html_content`. If set to false, `plain_content` is not altered. + GeneratePlainContent *bool `json:"generate_plain_content,omitempty"` + // A `design_id` can be used in place of `html_content`, `plain_content`, and/or `subject`. You can retrieve a design's ID from the [\"List Designs\" endpoint](https://docs.sendgrid.com/api-reference/designs-api/list-designs) or by pulling it from the design's detail page URL in the Marketing Campaigns App. + DesignId *string `json:"design_id,omitempty"` + // The editor — `\"design\"` or `\"code\"` — used to modify the Single Send's design in the Marketing Campaigns App. + Editor *Editor `json:"editor,omitempty"` + // The ID of the Suppression Group to allow recipients to unsubscribe — you must provide this or the `custom_unsubscribe_url`. + SuppressionGroupId *int32 `json:"suppression_group_id,omitempty"` + // The URL allowing recipients to unsubscribe — you must provide this or the `suppression_group_id`. + CustomUnsubscribeUrl *string `json:"custom_unsubscribe_url,omitempty"` + // The ID of the verified Sender. You can retrieve a verified Sender's ID from the [\"Get Verified Senders\" endpoint](https://www.twilio.com/docs/sendgrid/api-reference/sender-verification/get-all-verified-senders) or by pulling it from the Sender's detail page URL in the SendGrid App. + SenderId *int32 `json:"sender_id,omitempty"` + // The name of the IP Pool from which the Single Send emails are sent. + IpPool *string `json:"ip_pool,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_request_send_to.go b/rest/api/v3/mc_singlesends/model_singlesend_request_send_to.go new file mode 100644 index 00000000..5de4bf4b --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_singlesend_request_send_to.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SinglesendRequestSendTo struct for SinglesendRequestSendTo +type SinglesendRequestSendTo struct { + // The recipient List IDs that will receive the Single Send. + ListIds *[]string `json:"list_ids,omitempty"` + // The recipient Segment IDs that will receive the Single Send. + SegmentIds *[]string `json:"segment_ids,omitempty"` + // Set to `true` to send to All Contacts. If set to `false`, at least one `list_ids` or `segment_ids` value must be provided before the Single Send is scheduled to be sent to recipients. + All *bool `json:"all,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_response.go b/rest/api/v3/mc_singlesends/model_singlesend_response.go new file mode 100644 index 00000000..580d2fe2 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_singlesend_response.go @@ -0,0 +1,39 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "time" +) + +// SinglesendResponse struct for SinglesendResponse +type SinglesendResponse struct { + // The unique ID for the Single Send. + Id *string `json:"id,omitempty"` + // The name of the Single Send. + Name *string `json:"name,omitempty"` + // The current status of the Single Send. The status may be `draft`, `scheduled`, or `triggered`. + Status *Status2 `json:"status,omitempty"` + // The categories associated with this Single Send. + Categories *[]string `json:"categories,omitempty"` + // An ISO 8601 formatted date-time when the Single Send is set to be sent. Please note that any `send_at` property value will have no effect while the Single Send `status` is `draft`. You must update the Single Send with the [**Schedule Single Send**](https://docs.sendgrid.com/api-reference/single-sends/schedule-single-send) endpoint or SendGrid application UI to schedule it. + SendAt *time.Time `json:"send_at,omitempty"` + SendTo *SinglesendResponseSendTo `json:"send_to,omitempty"` + // the ISO 8601 time at which the Single Send was last updated. + UpdatedAt *time.Time `json:"updated_at,omitempty"` + // the ISO 8601 time at which the Single Send was created. + CreatedAt *time.Time `json:"created_at,omitempty"` + EmailConfig *SinglesendResponseEmailConfig `json:"email_config,omitempty"` + Warnings *[]SinglesendResponseWarningsInner `json:"warnings,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_response_email_config.go b/rest/api/v3/mc_singlesends/model_singlesend_response_email_config.go new file mode 100644 index 00000000..678c3ac1 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_singlesend_response_email_config.go @@ -0,0 +1,38 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SinglesendResponseEmailConfig struct for SinglesendResponseEmailConfig +type SinglesendResponseEmailConfig struct { + // The subject line of the Single Send. This property is not used when a `design_id` value is set. + Subject *string `json:"subject,omitempty"` + // The HTML content of the Single Send. This property is not used when a `design_id` value is set. + HtmlContent *string `json:"html_content,omitempty"` + // The plain text content of the Single Send. This property is not used when a `design_id` value is set. + PlainContent *string `json:"plain_content,omitempty"` + // If this property is set to `true`, `plain_content` is always generated from `html_content`. If it's set to false, `plain_content` is not altered. + GeneratePlainContent *bool `json:"generate_plain_content,omitempty"` + // A `design_id` can be used in place of `html_content`, `plain_content`, and/or `subject`. You can retrieve a design's ID from the [**List Designs** endpoint](https://docs.sendgrid.com/api-reference/designs-api/list-designs) or by pulling it from the design's detail page URL in the Marketing Campaigns App. + DesignId *string `json:"design_id,omitempty"` + // The editor, `design` or `code`, used to modify the Single Send's design in the Marketing Campaigns application user interface. + Editor *Editor1 `json:"editor,omitempty"` + // The ID of the Suppression Group to allow recipients to unsubscribe. You must provide a `suppression_group_id` or the `custom_unsubscribe_url` with your Single Send. + SuppressionGroupId *int32 `json:"suppression_group_id,omitempty"` + // The URL allowing recipients to unsubscribe. You must provide a `custom_unsubscribe_url` or a `suppression_group_id` with your Single Send. + CustomUnsubscribeUrl *string `json:"custom_unsubscribe_url,omitempty"` + // The ID of the verified sender from whom the Single Send will be sent. You can retrieve a verified sender's ID from the [**Get Verified Senders** endpoint](https://www.twilio.com/docs/sendgrid/api-reference/sender-verification/get-all-verified-senders) or by pulling it from the sender's detail page URL in the SendGrid App. + SenderId *int32 `json:"sender_id,omitempty"` + // The name of the IP Pool from which the Single Send emails are sent. + IpPool *string `json:"ip_pool,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_response_send_to.go b/rest/api/v3/mc_singlesends/model_singlesend_response_send_to.go new file mode 100644 index 00000000..fee100a5 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_singlesend_response_send_to.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SinglesendResponseSendTo struct for SinglesendResponseSendTo +type SinglesendResponseSendTo struct { + // The IDs of each contact list to which the Single Send will be sent. + ListIds *[]string `json:"list_ids,omitempty"` + // The IDs of each segment to which the Single Send will be sent. + SegmentIds *[]string `json:"segment_ids,omitempty"` + // If this property is set to `true`, the Single Send will be sent to all of your contacts. If it's set to `false`, at least one `list_ids` or `segment_ids` value must be provided before the Single Send is scheduled to be sent. + All *bool `json:"all,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_response_short.go b/rest/api/v3/mc_singlesends/model_singlesend_response_short.go new file mode 100644 index 00000000..dcf0ed8f --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_singlesend_response_short.go @@ -0,0 +1,38 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "time" +) + +// SinglesendResponseShort struct for SinglesendResponseShort +type SinglesendResponseShort struct { + Id string `json:"id"` + // name of the Single Send + Name string `json:"name"` + Abtest AbTestSummary `json:"abtest"` + // current status of the Single Send + Status Status3 `json:"status"` + // categories to associate with this Single Send + Categories []string `json:"categories"` + // The ISO 8601 time at which to send the Single Send. This must be in future or the string `now`. SendGrid [Mail Send](https://docs.sendgrid.com/api-reference/mail-send/mail-send) emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via [Marketing Campaigns](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns/). + SendAt *time.Time `json:"send_at,omitempty"` + // true if the Single Send's AB Test functionality has been toggled on + IsAbtest bool `json:"is_abtest"` + // the ISO 8601 time at which the Single Send was last updated + UpdatedAt time.Time `json:"updated_at"` + // the ISO 8601 time at which the Single Send was created + CreatedAt time.Time `json:"created_at"` +} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_response_warnings_inner.go b/rest/api/v3/mc_singlesends/model_singlesend_response_warnings_inner.go new file mode 100644 index 00000000..7a9ce910 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_singlesend_response_warnings_inner.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SinglesendResponseWarningsInner struct for SinglesendResponseWarningsInner +type SinglesendResponseWarningsInner struct { + Message *string `json:"message,omitempty"` + Field *string `json:"field,omitempty"` + WarningId *string `json:"warning_id,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_schedule.go b/rest/api/v3/mc_singlesends/model_singlesend_schedule.go new file mode 100644 index 00000000..b0902355 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_singlesend_schedule.go @@ -0,0 +1,25 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "time" +) + +// SinglesendSchedule struct for SinglesendSchedule +type SinglesendSchedule struct { + // The ISO 8601 time at which to send the Single Send. This must be in future or the string `now`. SendGrid [Mail Send](https://docs.sendgrid.com/api-reference/mail-send/mail-send) emails can be scheduled up to 72 hours in advance. However, this scheduling constraint does not apply to emails sent via [Marketing Campaigns](https://docs.sendgrid.com/ui/sending-email/how-to-send-email-with-marketing-campaigns/). + SendAt time.Time `json:"send_at"` + Status *Status1 `json:"status,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_singlesend_search.go b/rest/api/v3/mc_singlesends/model_singlesend_search.go new file mode 100644 index 00000000..c4576308 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_singlesend_search.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SinglesendSearch struct for SinglesendSearch +type SinglesendSearch struct { + // leading and trailing wildcard search on name of the Single Send + Name *string `json:"name,omitempty"` + // current status of the Single Send + Status *[]Items `json:"status,omitempty"` + // categories to associate with this Single Send, match any single send that has at least one of the categories + Categories *[]string `json:"categories,omitempty"` +} diff --git a/rest/api/v3/mc_singlesends/model_status.go b/rest/api/v3/mc_singlesends/model_status.go new file mode 100644 index 00000000..7e88d91f --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_status.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status the model 'Status' +type Status string + +// List of Status +const ( + STATUS_SCHEDULED Status = "scheduled" +) diff --git a/rest/api/v3/mc_singlesends/model_status1.go b/rest/api/v3/mc_singlesends/model_status1.go new file mode 100644 index 00000000..90636c6e --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_status1.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status1 the model 'Status1' +type Status1 string + +// List of Status1 +const ( + STATUS1_DRAFT Status1 = "draft" + STATUS1_SCHEDULED Status1 = "scheduled" + STATUS1_TRIGGERED Status1 = "triggered" +) diff --git a/rest/api/v3/mc_singlesends/model_status2.go b/rest/api/v3/mc_singlesends/model_status2.go new file mode 100644 index 00000000..42c16a05 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_status2.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status2 the model 'Status2' +type Status2 string + +// List of Status2 +const ( + STATUS2_DRAFT Status2 = "draft" + STATUS2_SCHEDULED Status2 = "scheduled" + STATUS2_TRIGGERED Status2 = "triggered" +) diff --git a/rest/api/v3/mc_singlesends/model_status3.go b/rest/api/v3/mc_singlesends/model_status3.go new file mode 100644 index 00000000..7caa1f9d --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_status3.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status3 the model 'Status3' +type Status3 string + +// List of Status3 +const ( + STATUS3_DRAFT Status3 = "draft" + STATUS3_SCHEDULED Status3 = "scheduled" + STATUS3_TRIGGERED Status3 = "triggered" +) diff --git a/rest/api/v3/mc_singlesends/model_type.go b/rest/api/v3/mc_singlesends/model_type.go new file mode 100644 index 00000000..a2fc86e3 --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_type.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Type the model 'Type' +type Type string + +// List of Type +const ( + TYPE_SUBJECT Type = "subject" + TYPE_CONTENT Type = "content" +) diff --git a/rest/api/v3/mc_singlesends/model_winner_criteria.go b/rest/api/v3/mc_singlesends/model_winner_criteria.go new file mode 100644 index 00000000..069e7c0f --- /dev/null +++ b/rest/api/v3/mc_singlesends/model_winner_criteria.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Single Sends API +* The Twilio SendGrid Single Sends API allows you to create, manage, and send Single Sends. You can also search Single Sends and retrieve statistics about them to help you maintain, alter, and further develop your campaigns. A Single Send is a one-time non-automated email message delivered to a list or segment of your audience. A Single Send may be sent immediately or scheduled for future delivery. Single Sends can serve many use cases, including promotional offers, engagement campaigns, newsletters, announcements, legal notices, or policy updates. You can also create and manage Single Sends in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/single-sends). The Single Sends API changed on May 6, 2020. See [**Single Sends 2020 Update**](https://docs.sendgrid.com/for-developers/sending-email/single-sends-2020-update) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// WinnerCriteria the model 'WinnerCriteria' +type WinnerCriteria string + +// List of WinnerCriteria +const ( + WINNERCRITERIA_OPEN WinnerCriteria = "open" + WINNERCRITERIA_CLICK WinnerCriteria = "click" + WINNERCRITERIA_MANUAL WinnerCriteria = "manual" +) diff --git a/rest/api/v3/mc_stats/README.md b/rest/api/v3/mc_stats/README.md new file mode 100644 index 00000000..bf3ec742 --- /dev/null +++ b/rest/api/v3/mc_stats/README.md @@ -0,0 +1,88 @@ +# Go API client for + +The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). + +This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:02.236131+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ExportAutomationStat* | [**ExportAutomationStat**](docs/ExportAutomationStat.md#exportautomationstat) | **Get** /v3/marketing/stats/automations/export | Export Single Send Stats +*ExportSingleSendStat* | [**ExportSingleSendStat**](docs/ExportSingleSendStat.md#exportsinglesendstat) | **Get** /v3/marketing/stats/singlesends/export | Export Single Send Stats +*GetAutomationStat* | [**GetAutomationStat**](docs/GetAutomationStat.md#getautomationstat) | **Get** /v3/marketing/stats/automations/{Id} | Get Automation Stats by ID +*GetSingleSendStat* | [**GetSingleSendStat**](docs/GetSingleSendStat.md#getsinglesendstat) | **Get** /v3/marketing/stats/singlesends/{Id} | Get Single Send Stats by ID +*ListAutomationStat* | [**ListAutomationStat**](docs/ListAutomationStat.md#listautomationstat) | **Get** /v3/marketing/stats/automations | Get All Automation Stats +*ListClickTrackingStat* | [**ListClickTrackingStat**](docs/ListClickTrackingStat.md#listclicktrackingstat) | **Get** /v3/marketing/stats/automations/{Id}/links | Get Automation Click Tracking Stats by ID +*ListSingleSendStat* | [**ListSingleSendStat**](docs/ListSingleSendStat.md#listsinglesendstat) | **Get** /v3/marketing/stats/singlesends | Get All Single Sends Stats +*ListSingleSendTrackingStat* | [**ListSingleSendTrackingStat**](docs/ListSingleSendTrackingStat.md#listsinglesendtrackingstat) | **Get** /v3/marketing/stats/singlesends/{Id}/links | Get Single Send Click Tracking Stats by ID + + +## Documentation For Models + + - [AbPhase](AbPhase.md) + - [AbPhase1](AbPhase1.md) + - [AbPhaseId](AbPhaseId.md) + - [AggregatedBy](AggregatedBy.md) + - [AutmoationsLinkStatsResponse](AutmoationsLinkStatsResponse.md) + - [AutmoationsLinkStatsResponseResultsInner](AutmoationsLinkStatsResponseResultsInner.md) + - [AutomationsResponse](AutomationsResponse.md) + - [AutomationsResponseResultsInner](AutomationsResponseResultsInner.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [Items](Items.md) + - [Items1](Items1.md) + - [Items2](Items2.md) + - [LinkTrackingMetadata](LinkTrackingMetadata.md) + - [Metadata](Metadata.md) + - [Metrics](Metrics.md) + - [SinglesendsLinkStatsResponse](SinglesendsLinkStatsResponse.md) + - [SinglesendsLinkStatsResponseResultsInner](SinglesendsLinkStatsResponseResultsInner.md) + - [SinglesendsResponse](SinglesendsResponse.md) + - [SinglesendsResponseResultsInner](SinglesendsResponseResultsInner.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/mc_stats/api_export_automation_stat.go b/rest/api/v3/mc_stats/api_export_automation_stat.go new file mode 100644 index 00000000..4d7ffc17 --- /dev/null +++ b/rest/api/v3/mc_stats/api_export_automation_stat.go @@ -0,0 +1,79 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ExportAutomationStatParam struct { + // The IDs of Single Sends for which to export stats. + Ids *[]string `json:"ids,omitempty"` + // The [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_timezones) string representing the timezone in which the stats are to be presented; i.e. `\"America/Chicago\"`. This parameter changes the timezone format only; it does not alter which stats are returned. + Timezone *string `json:"timezone,omitempty"` +} + +func (params *ExportAutomationStatParam) SetIds(Ids []string) *ExportAutomationStatParam { + params.Ids = &Ids + return params +} +func (params *ExportAutomationStatParam) SetTimezone(Timezone string) *ExportAutomationStatParam { + params.Timezone = &Timezone + return params +} + +// **This endpoint allows you to export Single Send stats as .CSV data**. You can specify one Single Send or many: include as many Single Send IDs as you need, separating them with commas, as the value of the `ids` query string parameter. The data is returned as plain text response but in .CSV format, so your application making the call can present the information in whatever way is most appropriate, or just save the data as a .csv file. +func (c *ApiService) ExportAutomationStat(params *ExportAutomationStatParam) (interface{}, error) { + path := "/v3/marketing/stats/automations/export" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Ids != nil { + for _, item := range *params.Ids { + v, err := json.Marshal(item) + + if err != nil { + return nil, err + } + + data.Add("ids", string(v)) + + } + } + if params != nil && params.Timezone != nil { + data.Set("timezone", *params.Timezone) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + s := "" + ps := &s + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_stats/api_export_single_send_stat.go b/rest/api/v3/mc_stats/api_export_single_send_stat.go new file mode 100644 index 00000000..721aa2c3 --- /dev/null +++ b/rest/api/v3/mc_stats/api_export_single_send_stat.go @@ -0,0 +1,79 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ExportSingleSendStatParam struct { + // The IDs of Single Sends for which to export stats. + Ids *[]string `json:"ids,omitempty"` + // The [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_timezones) string representing the timezone in which the stats are to be presented; i.e. `\"America/Chicago\"`. This parameter changes the timezone format only; it does not alter which stats are returned. + Timezone *string `json:"timezone,omitempty"` +} + +func (params *ExportSingleSendStatParam) SetIds(Ids []string) *ExportSingleSendStatParam { + params.Ids = &Ids + return params +} +func (params *ExportSingleSendStatParam) SetTimezone(Timezone string) *ExportSingleSendStatParam { + params.Timezone = &Timezone + return params +} + +// **This endpoint allows you to export Single Send stats as .CSV data**. You can specify one Single Send or many: include as many Single Send IDs as you need, separating them with commas, as the value of the `ids` query string parameter. The data is returned as plain text response but in .CSV format, so your application making the call can present the information in whatever way is most appropriate, or just save the data as a .csv file. +func (c *ApiService) ExportSingleSendStat(params *ExportSingleSendStatParam) (interface{}, error) { + path := "/v3/marketing/stats/singlesends/export" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Ids != nil { + for _, item := range *params.Ids { + v, err := json.Marshal(item) + + if err != nil { + return nil, err + } + + data.Add("ids", string(v)) + + } + } + if params != nil && params.Timezone != nil { + data.Set("timezone", *params.Timezone) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + s := "" + ps := &s + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_stats/api_get_automation_stat.go b/rest/api/v3/mc_stats/api_get_automation_stat.go new file mode 100644 index 00000000..4a82a99d --- /dev/null +++ b/rest/api/v3/mc_stats/api_get_automation_stat.go @@ -0,0 +1,161 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type GetAutomationStatParam struct { + // The ID of the Automation for which you want to retrieve statistics. + Id *string `json:"id"` + // Automations can have multiple steps. Including `step_id` as a `group_by` metric allows further granularity of stats. + GroupBy *[]Items `json:"group_by,omitempty"` + // Comma-separated list of `step_ids` that you want the link stats for. + StepIds *[]string `json:"step_ids,omitempty"` + // Dictates how the stats are time-sliced. Currently, `\"total\"` and `\"day\"` are supported. + AggregatedBy *AggregatedBy `json:"aggregated_by,omitempty"` + // Format: `YYYY-MM-DD`. If this parameter is included, the stats' start date is included in the search. + StartDate *string `json:"start_date,omitempty"` + // Format: `YYYY-MM-DD`.If this parameter is included, the stats' end date is included in the search. + EndDate *string `json:"end_date,omitempty"` + // [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_timezones) string representing the timezone in which the stats are to be presented, e.g., \"America/Chicago\". + Timezone *string `json:"timezone,omitempty"` + // The number of elements you want returned on each page. + PageSize *int32 `json:"page_size,omitempty"` + // The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. + PageToken *string `json:"page_token,omitempty"` +} + +func (params *GetAutomationStatParam) SetId(Id string) *GetAutomationStatParam { + params.Id = &Id + return params +} +func (params *GetAutomationStatParam) SetGroupBy(GroupBy []Items) *GetAutomationStatParam { + params.GroupBy = &GroupBy + return params +} +func (params *GetAutomationStatParam) SetStepIds(StepIds []string) *GetAutomationStatParam { + params.StepIds = &StepIds + return params +} +func (params *GetAutomationStatParam) SetAggregatedBy(AggregatedBy AggregatedBy) *GetAutomationStatParam { + params.AggregatedBy = &AggregatedBy + return params +} +func (params *GetAutomationStatParam) SetStartDate(StartDate string) *GetAutomationStatParam { + params.StartDate = &StartDate + return params +} +func (params *GetAutomationStatParam) SetEndDate(EndDate string) *GetAutomationStatParam { + params.EndDate = &EndDate + return params +} +func (params *GetAutomationStatParam) SetTimezone(Timezone string) *GetAutomationStatParam { + params.Timezone = &Timezone + return params +} +func (params *GetAutomationStatParam) SetPageSize(PageSize int32) *GetAutomationStatParam { + params.PageSize = &PageSize + return params +} +func (params *GetAutomationStatParam) SetPageToken(PageToken string) *GetAutomationStatParam { + params.PageToken = &PageToken + return params +} + +// **This endpoint allows you to retrieve stats for a single Automation using its ID.** Multiple Automation IDs can be retrieved using the \"Get All Automation Stats\" endpoint. Once you have an ID, this endpoint will return detailed stats for the single automation specified. You may constrain the stats returned using the `start_date` and `end_date` query string parameters. You can also use the `group_by` and `aggregated_by` query string parameters to further refine the stats returned. +func (c *ApiService) GetAutomationStat(params *GetAutomationStatParam) (interface{}, error) { + path := "/v3/marketing/stats/automations/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.GroupBy != nil { + for _, item := range *params.GroupBy { + v, err := json.Marshal(item) + + if err != nil { + return nil, err + } + + data.Add("group_by", string(v)) + + } + } + if params != nil && params.StepIds != nil { + for _, item := range *params.StepIds { + v, err := json.Marshal(item) + + if err != nil { + return nil, err + } + + data.Add("step_ids", string(v)) + + } + } + if params != nil && params.AggregatedBy != nil { + data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) + } + if params != nil && params.StartDate != nil { + data.Set("start_date", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.Timezone != nil { + data.Set("timezone", *params.Timezone) + } + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + if params != nil && params.PageToken != nil { + data.Set("page_token", *params.PageToken) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AutomationsResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_stats/api_get_single_send_stat.go b/rest/api/v3/mc_stats/api_get_single_send_stat.go new file mode 100644 index 00000000..bfdfb2d9 --- /dev/null +++ b/rest/api/v3/mc_stats/api_get_single_send_stat.go @@ -0,0 +1,143 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type GetSingleSendStatParam struct { + // The ID of Single Send for which you want to retrieve stats. + Id *string `json:"id"` + // Dictates how the stats are time-sliced. Currently, `\"total\"` and `\"day\"` are supported. + AggregatedBy *AggregatedBy `json:"aggregated_by,omitempty"` + // Format: `YYYY-MM-DD`. If this parameter is included, the stats' start date is included in the search. + StartDate *string `json:"start_date,omitempty"` + // Format: `YYYY-MM-DD`.If this parameter is included, the stats' end date is included in the search. + EndDate *string `json:"end_date,omitempty"` + // [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_timezones) string representing the timezone in which the stats are to be presented, e.g., \"America/Chicago\". + Timezone *string `json:"timezone,omitempty"` + // The number of elements you want returned on each page. + PageSize *int32 `json:"page_size,omitempty"` + // The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. + PageToken *string `json:"page_token,omitempty"` + // A/B Single Sends have multiple variation IDs and phase IDs. Including these additional fields allows further granularity of stats by these fields. + GroupBy *[]Items1 `json:"group_by,omitempty"` +} + +func (params *GetSingleSendStatParam) SetId(Id string) *GetSingleSendStatParam { + params.Id = &Id + return params +} +func (params *GetSingleSendStatParam) SetAggregatedBy(AggregatedBy AggregatedBy) *GetSingleSendStatParam { + params.AggregatedBy = &AggregatedBy + return params +} +func (params *GetSingleSendStatParam) SetStartDate(StartDate string) *GetSingleSendStatParam { + params.StartDate = &StartDate + return params +} +func (params *GetSingleSendStatParam) SetEndDate(EndDate string) *GetSingleSendStatParam { + params.EndDate = &EndDate + return params +} +func (params *GetSingleSendStatParam) SetTimezone(Timezone string) *GetSingleSendStatParam { + params.Timezone = &Timezone + return params +} +func (params *GetSingleSendStatParam) SetPageSize(PageSize int32) *GetSingleSendStatParam { + params.PageSize = &PageSize + return params +} +func (params *GetSingleSendStatParam) SetPageToken(PageToken string) *GetSingleSendStatParam { + params.PageToken = &PageToken + return params +} +func (params *GetSingleSendStatParam) SetGroupBy(GroupBy []Items1) *GetSingleSendStatParam { + params.GroupBy = &GroupBy + return params +} + +// **This endpoint allows you to retrieve stats for an individual Single Send using a Single Send ID.** Multiple Single Send IDs can be retrieved using the \"Get All Single Sends Stats\" endpoint. Once you have an ID, this endpoint will return detailed stats for the Single Send specified. You may constrain the stats returned using the `start_date` and `end_date` query string parameters. You can also use the `group_by` and `aggregated_by` query string parameters to further refine the stats returned. +func (c *ApiService) GetSingleSendStat(params *GetSingleSendStatParam) (interface{}, error) { + path := "/v3/marketing/stats/singlesends/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.AggregatedBy != nil { + data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) + } + if params != nil && params.StartDate != nil { + data.Set("start_date", fmt.Sprint(*params.StartDate)) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", fmt.Sprint(*params.EndDate)) + } + if params != nil && params.Timezone != nil { + data.Set("timezone", *params.Timezone) + } + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + if params != nil && params.PageToken != nil { + data.Set("page_token", *params.PageToken) + } + if params != nil && params.GroupBy != nil { + for _, item := range *params.GroupBy { + v, err := json.Marshal(item) + + if err != nil { + return nil, err + } + + data.Add("group_by", string(v)) + + } + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SinglesendsResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_stats/api_list_automation_stat.go b/rest/api/v3/mc_stats/api_list_automation_stat.go new file mode 100644 index 00000000..d2dc34e0 --- /dev/null +++ b/rest/api/v3/mc_stats/api_list_automation_stat.go @@ -0,0 +1,96 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListAutomationStatParam struct { + // This endpoint returns all automation IDs if no `automation_ids` are specified. + AutomationIds *[]string `json:"automation_ids,omitempty"` + // The number of elements you want returned on each page. + PageSize *int32 `json:"page_size,omitempty"` + // The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. + PageToken *string `json:"page_token,omitempty"` +} + +func (params *ListAutomationStatParam) SetAutomationIds(AutomationIds []string) *ListAutomationStatParam { + params.AutomationIds = &AutomationIds + return params +} +func (params *ListAutomationStatParam) SetPageSize(PageSize int32) *ListAutomationStatParam { + params.PageSize = &PageSize + return params +} +func (params *ListAutomationStatParam) SetPageToken(PageToken string) *ListAutomationStatParam { + params.PageToken = &PageToken + return params +} + +// **This endpoint allows you to retrieve stats for all your Automations.** By default, all of your Automations will be returned, but you can specify a selection by passing in a comma-separated list of Automation IDs as the value of the query string parameter `automation_ids`. Responses are paginated. You can limit the number of responses returned per batch using the `page_size` query string parameter. The default is 25, but you can specify a value between 1 and 50. You can retrieve a specific page of responses with the `page_token` query string parameter. +func (c *ApiService) ListAutomationStat(params *ListAutomationStatParam) (interface{}, error) { + path := "/v3/marketing/stats/automations" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.AutomationIds != nil { + for _, item := range *params.AutomationIds { + v, err := json.Marshal(item) + + if err != nil { + return nil, err + } + + data.Add("automation_ids", string(v)) + + } + } + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + if params != nil && params.PageToken != nil { + data.Set("page_token", *params.PageToken) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AutomationsResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_stats/api_list_click_tracking_stat.go b/rest/api/v3/mc_stats/api_list_click_tracking_stat.go new file mode 100644 index 00000000..8f891cbc --- /dev/null +++ b/rest/api/v3/mc_stats/api_list_click_tracking_stat.go @@ -0,0 +1,133 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type ListClickTrackingStatParam struct { + // The ID of the Automation you want to get click tracking stats for. + Id *string `json:"id"` + // Automations can have multiple steps. Including `step_id` as a `group_by` metric allows further granularity of stats. + GroupBy *[]Items `json:"group_by,omitempty"` + // Comma-separated list of `step_ids` that you want the link stats for. + StepIds *[]string `json:"step_ids,omitempty"` + // The number of elements you want returned on each page. + PageSize *int32 `json:"page_size,omitempty"` + // The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. + PageToken *string `json:"page_token,omitempty"` +} + +func (params *ListClickTrackingStatParam) SetId(Id string) *ListClickTrackingStatParam { + params.Id = &Id + return params +} +func (params *ListClickTrackingStatParam) SetGroupBy(GroupBy []Items) *ListClickTrackingStatParam { + params.GroupBy = &GroupBy + return params +} +func (params *ListClickTrackingStatParam) SetStepIds(StepIds []string) *ListClickTrackingStatParam { + params.StepIds = &StepIds + return params +} +func (params *ListClickTrackingStatParam) SetPageSize(PageSize int32) *ListClickTrackingStatParam { + params.PageSize = &PageSize + return params +} +func (params *ListClickTrackingStatParam) SetPageToken(PageToken string) *ListClickTrackingStatParam { + params.PageToken = &PageToken + return params +} + +// **This endpoint lets you retrieve click-tracking stats for a single Automation**. The stats returned list the URLs embedded in your Automation and the number of clicks each one received. +func (c *ApiService) ListClickTrackingStat(params *ListClickTrackingStatParam) (interface{}, error) { + path := "/v3/marketing/stats/automations/{Id}/links" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.GroupBy != nil { + for _, item := range *params.GroupBy { + v, err := json.Marshal(item) + + if err != nil { + return nil, err + } + + data.Add("group_by", string(v)) + + } + } + if params != nil && params.StepIds != nil { + for _, item := range *params.StepIds { + v, err := json.Marshal(item) + + if err != nil { + return nil, err + } + + data.Add("step_ids", string(v)) + + } + } + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + if params != nil && params.PageToken != nil { + data.Set("page_token", *params.PageToken) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &AutmoationsLinkStatsResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_stats/api_list_single_send_stat.go b/rest/api/v3/mc_stats/api_list_single_send_stat.go new file mode 100644 index 00000000..70028d19 --- /dev/null +++ b/rest/api/v3/mc_stats/api_list_single_send_stat.go @@ -0,0 +1,96 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListSingleSendStatParam struct { + // This endpoint returns all Single Send IDs if no IDs are included in `singlesend_ids`. + SinglesendIds *[]string `json:"singlesend_ids,omitempty"` + // The number of elements you want returned on each page. + PageSize *int32 `json:"page_size,omitempty"` + // The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. + PageToken *string `json:"page_token,omitempty"` +} + +func (params *ListSingleSendStatParam) SetSinglesendIds(SinglesendIds []string) *ListSingleSendStatParam { + params.SinglesendIds = &SinglesendIds + return params +} +func (params *ListSingleSendStatParam) SetPageSize(PageSize int32) *ListSingleSendStatParam { + params.PageSize = &PageSize + return params +} +func (params *ListSingleSendStatParam) SetPageToken(PageToken string) *ListSingleSendStatParam { + params.PageToken = &PageToken + return params +} + +// **This endpoint allows you to retrieve stats for all your Single Sends.** By default, all of your Single Sends will be returned, but you can specify a selection by passing in a comma-separated list of Single Send IDs as the value of the query string parameter `singlesend_ids`. Responses are paginated. You can limit the number of responses returned per batch using the `page_size` query string parameter. The default is 25, but you specify a value between 1 and 50. You can retrieve a specific page of responses with the `page_token` query string parameter. +func (c *ApiService) ListSingleSendStat(params *ListSingleSendStatParam) (interface{}, error) { + path := "/v3/marketing/stats/singlesends" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.SinglesendIds != nil { + for _, item := range *params.SinglesendIds { + v, err := json.Marshal(item) + + if err != nil { + return nil, err + } + + data.Add("singlesend_ids", string(v)) + + } + } + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + if params != nil && params.PageToken != nil { + data.Set("page_token", *params.PageToken) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SinglesendsResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_stats/api_list_single_send_tracking_stat.go b/rest/api/v3/mc_stats/api_list_single_send_tracking_stat.go new file mode 100644 index 00000000..a0aca60f --- /dev/null +++ b/rest/api/v3/mc_stats/api_list_single_send_tracking_stat.go @@ -0,0 +1,133 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type ListSingleSendTrackingStatParam struct { + // The ID of Single Send for which you want to retrieve link stats. + Id *string `json:"id"` + // The number of elements you want returned on each page. + PageSize *int32 `json:"page_size,omitempty"` + // The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. + PageToken *string `json:"page_token,omitempty"` + // A/B Single Sends have multiple variation IDs and phase IDs. Including these additional fields allows further granularity of stats by these fields. + GroupBy *[]Items2 `json:"group_by,omitempty"` + // + AbVariationId *string `json:"ab_variation_id,omitempty"` + // + AbPhaseId *AbPhaseId `json:"ab_phase_id,omitempty"` +} + +func (params *ListSingleSendTrackingStatParam) SetId(Id string) *ListSingleSendTrackingStatParam { + params.Id = &Id + return params +} +func (params *ListSingleSendTrackingStatParam) SetPageSize(PageSize int32) *ListSingleSendTrackingStatParam { + params.PageSize = &PageSize + return params +} +func (params *ListSingleSendTrackingStatParam) SetPageToken(PageToken string) *ListSingleSendTrackingStatParam { + params.PageToken = &PageToken + return params +} +func (params *ListSingleSendTrackingStatParam) SetGroupBy(GroupBy []Items2) *ListSingleSendTrackingStatParam { + params.GroupBy = &GroupBy + return params +} +func (params *ListSingleSendTrackingStatParam) SetAbVariationId(AbVariationId string) *ListSingleSendTrackingStatParam { + params.AbVariationId = &AbVariationId + return params +} +func (params *ListSingleSendTrackingStatParam) SetAbPhaseId(AbPhaseId AbPhaseId) *ListSingleSendTrackingStatParam { + params.AbPhaseId = &AbPhaseId + return params +} + +// **This endpoint lets you retrieve click-tracking stats for one Single Send**. The stats returned list the URLs embedded in the specified Single Send and the number of clicks each one received. +func (c *ApiService) ListSingleSendTrackingStat(params *ListSingleSendTrackingStatParam) (interface{}, error) { + path := "/v3/marketing/stats/singlesends/{Id}/links" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + if params != nil && params.PageToken != nil { + data.Set("page_token", *params.PageToken) + } + if params != nil && params.GroupBy != nil { + for _, item := range *params.GroupBy { + v, err := json.Marshal(item) + + if err != nil { + return nil, err + } + + data.Add("group_by", string(v)) + + } + } + if params != nil && params.AbVariationId != nil { + data.Set("ab_variation_id", *params.AbVariationId) + } + if params != nil && params.AbPhaseId != nil { + data.Set("ab_phase_id", fmt.Sprint(*params.AbPhaseId)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SinglesendsLinkStatsResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_stats/api_service.go b/rest/api/v3/mc_stats/api_service.go new file mode 100644 index 00000000..913b3580 --- /dev/null +++ b/rest/api/v3/mc_stats/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/mc_stats/docs/AbPhase.md b/rest/api/v3/mc_stats/docs/AbPhase.md new file mode 100644 index 00000000..db2402b9 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/AbPhase.md @@ -0,0 +1,14 @@ +# AbPhase + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**SEND** | string | (value: `"send"`) +**TEST** | string | (value: `"test"`) +**ALL** | string | (value: `"all"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/AbPhase1.md b/rest/api/v3/mc_stats/docs/AbPhase1.md new file mode 100644 index 00000000..2c5a9fdc --- /dev/null +++ b/rest/api/v3/mc_stats/docs/AbPhase1.md @@ -0,0 +1,14 @@ +# AbPhase1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**SEND** | string | (value: `"send"`) +**TEST** | string | (value: `"test"`) +**ALL** | string | (value: `"all"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/AbPhaseId.md b/rest/api/v3/mc_stats/docs/AbPhaseId.md new file mode 100644 index 00000000..8ce3a5ed --- /dev/null +++ b/rest/api/v3/mc_stats/docs/AbPhaseId.md @@ -0,0 +1,13 @@ +# AbPhaseId + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TEST** | string | (value: `"test"`) +**SEND** | string | (value: `"send"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/AggregatedBy.md b/rest/api/v3/mc_stats/docs/AggregatedBy.md new file mode 100644 index 00000000..5de3ca2f --- /dev/null +++ b/rest/api/v3/mc_stats/docs/AggregatedBy.md @@ -0,0 +1,13 @@ +# AggregatedBy + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DAY** | string | (value: `"day"`) +**TOTAL** | string | (value: `"total"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/AutmoationsLinkStatsResponse.md b/rest/api/v3/mc_stats/docs/AutmoationsLinkStatsResponse.md new file mode 100644 index 00000000..7efaf2f3 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/AutmoationsLinkStatsResponse.md @@ -0,0 +1,13 @@ +# AutmoationsLinkStatsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | [**[]AutmoationsLinkStatsResponseResultsInner**](AutmoationsLinkStatsResponseResultsInner.md) | | +**TotalClicks** | **int32** | | +**Metadata** | [**LinkTrackingMetadata**](LinkTrackingMetadata.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/AutmoationsLinkStatsResponseResultsInner.md b/rest/api/v3/mc_stats/docs/AutmoationsLinkStatsResponseResultsInner.md new file mode 100644 index 00000000..ba1436ce --- /dev/null +++ b/rest/api/v3/mc_stats/docs/AutmoationsLinkStatsResponseResultsInner.md @@ -0,0 +1,14 @@ +# AutmoationsLinkStatsResponseResultsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | This is the URL of the link clicked. If `{{custom_fields}}` are part of the URL, they will be included. | +**UrlLocation** | **int32** | This is the location of the link clicked in each Automation step. Links are located according to their position within the message; the topmost link has index `0`. |[optional] +**StepId** | **string** | This is the ID of the step if the stats were requested to be grouped by `step_id`. | +**Clicks** | **int32** | The number of clicks on this particular link. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/AutomationsResponse.md b/rest/api/v3/mc_stats/docs/AutomationsResponse.md new file mode 100644 index 00000000..856db55d --- /dev/null +++ b/rest/api/v3/mc_stats/docs/AutomationsResponse.md @@ -0,0 +1,12 @@ +# AutomationsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | [**[]AutomationsResponseResultsInner**](AutomationsResponseResultsInner.md) | | +**Metadata** | [**Metadata**](Metadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/AutomationsResponseResultsInner.md b/rest/api/v3/mc_stats/docs/AutomationsResponseResultsInner.md new file mode 100644 index 00000000..204c3c2e --- /dev/null +++ b/rest/api/v3/mc_stats/docs/AutomationsResponseResultsInner.md @@ -0,0 +1,14 @@ +# AutomationsResponseResultsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | This is the ID of the Automation you are requesting stats for. | +**Aggregation** | **string** | This describes the time unit to which the stat is rolled up. It is based on the `aggregated_by` parameter included in the request. It can be \"total\" or the date (in YYYY-MM-DD format) the stats are for. |[default to "total"] +**StepId** | **string** | This is the ID of the step if the stats were requested to be grouped by `step_id`. |[default to "all"] +**Stats** | [**Metrics**](Metrics.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/ErrorResponse.md b/rest/api/v3/mc_stats/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/ErrorResponseErrorsInner.md b/rest/api/v3/mc_stats/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/ExportAutomationStat.md b/rest/api/v3/mc_stats/docs/ExportAutomationStat.md new file mode 100644 index 00000000..71980e81 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/ExportAutomationStat.md @@ -0,0 +1,49 @@ +# ExportAutomationStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ExportAutomationStat**](ExportAutomationStat.md#ExportAutomationStat) | **Get** /v3/marketing/stats/automations/export | Export Single Send Stats + + + +## ExportAutomationStat + +> string ExportAutomationStat(ctx, optional) + +Export Single Send Stats + +**This endpoint allows you to export Single Send stats as .CSV data**. You can specify one Single Send or many: include as many Single Send IDs as you need, separating them with commas, as the value of the `ids` query string parameter. The data is returned as plain text response but in .CSV format, so your application making the call can present the information in whatever way is most appropriate, or just save the data as a .csv file. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ExportAutomationStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Ids** | **[]string** | The IDs of Single Sends for which to export stats. +**Timezone** | **string** | The [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_timezones) string representing the timezone in which the stats are to be presented; i.e. `\"America/Chicago\"`. This parameter changes the timezone format only; it does not alter which stats are returned. + +### Return type + +**string** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_stats/docs/ExportSingleSendStat.md b/rest/api/v3/mc_stats/docs/ExportSingleSendStat.md new file mode 100644 index 00000000..e2a8a528 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/ExportSingleSendStat.md @@ -0,0 +1,49 @@ +# ExportSingleSendStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ExportSingleSendStat**](ExportSingleSendStat.md#ExportSingleSendStat) | **Get** /v3/marketing/stats/singlesends/export | Export Single Send Stats + + + +## ExportSingleSendStat + +> string ExportSingleSendStat(ctx, optional) + +Export Single Send Stats + +**This endpoint allows you to export Single Send stats as .CSV data**. You can specify one Single Send or many: include as many Single Send IDs as you need, separating them with commas, as the value of the `ids` query string parameter. The data is returned as plain text response but in .CSV format, so your application making the call can present the information in whatever way is most appropriate, or just save the data as a .csv file. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ExportSingleSendStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Ids** | **[]string** | The IDs of Single Sends for which to export stats. +**Timezone** | **string** | The [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_timezones) string representing the timezone in which the stats are to be presented; i.e. `\"America/Chicago\"`. This parameter changes the timezone format only; it does not alter which stats are returned. + +### Return type + +**string** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_stats/docs/GetAutomationStat.md b/rest/api/v3/mc_stats/docs/GetAutomationStat.md new file mode 100644 index 00000000..e97b64e5 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/GetAutomationStat.md @@ -0,0 +1,59 @@ +# GetAutomationStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetAutomationStat**](GetAutomationStat.md#GetAutomationStat) | **Get** /v3/marketing/stats/automations/{Id} | Get Automation Stats by ID + + + +## GetAutomationStat + +> AutomationsResponse GetAutomationStat(ctx, Idoptional) + +Get Automation Stats by ID + +**This endpoint allows you to retrieve stats for a single Automation using its ID.** Multiple Automation IDs can be retrieved using the \"Get All Automation Stats\" endpoint. Once you have an ID, this endpoint will return detailed stats for the single automation specified. You may constrain the stats returned using the `start_date` and `end_date` query string parameters. You can also use the `group_by` and `aggregated_by` query string parameters to further refine the stats returned. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the Automation for which you want to retrieve statistics. + +### Other Parameters + +Other parameters are passed through a pointer to a GetAutomationStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**GroupBy** | [**[]Items**](Items.md) | Automations can have multiple steps. Including `step_id` as a `group_by` metric allows further granularity of stats. +**StepIds** | **[]string** | Comma-separated list of `step_ids` that you want the link stats for. +**AggregatedBy** | [**AggregatedBy**](AggregatedByAggregatedBy.md) | Dictates how the stats are time-sliced. Currently, `\"total\"` and `\"day\"` are supported. +**StartDate** | **string** | Format: `YYYY-MM-DD`. If this parameter is included, the stats' start date is included in the search. +**EndDate** | **string** | Format: `YYYY-MM-DD`.If this parameter is included, the stats' end date is included in the search. +**Timezone** | **string** | [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_timezones) string representing the timezone in which the stats are to be presented, e.g., \"America/Chicago\". +**PageSize** | **int32** | The number of elements you want returned on each page. +**PageToken** | **string** | The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. + +### Return type + +[**AutomationsResponse**](AutomationsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_stats/docs/GetSingleSendStat.md b/rest/api/v3/mc_stats/docs/GetSingleSendStat.md new file mode 100644 index 00000000..59fa7e2c --- /dev/null +++ b/rest/api/v3/mc_stats/docs/GetSingleSendStat.md @@ -0,0 +1,58 @@ +# GetSingleSendStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetSingleSendStat**](GetSingleSendStat.md#GetSingleSendStat) | **Get** /v3/marketing/stats/singlesends/{Id} | Get Single Send Stats by ID + + + +## GetSingleSendStat + +> SinglesendsResponse GetSingleSendStat(ctx, Idoptional) + +Get Single Send Stats by ID + +**This endpoint allows you to retrieve stats for an individual Single Send using a Single Send ID.** Multiple Single Send IDs can be retrieved using the \"Get All Single Sends Stats\" endpoint. Once you have an ID, this endpoint will return detailed stats for the Single Send specified. You may constrain the stats returned using the `start_date` and `end_date` query string parameters. You can also use the `group_by` and `aggregated_by` query string parameters to further refine the stats returned. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of Single Send for which you want to retrieve stats. + +### Other Parameters + +Other parameters are passed through a pointer to a GetSingleSendStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**AggregatedBy** | [**AggregatedBy**](AggregatedByAggregatedBy.md) | Dictates how the stats are time-sliced. Currently, `\"total\"` and `\"day\"` are supported. +**StartDate** | **string** | Format: `YYYY-MM-DD`. If this parameter is included, the stats' start date is included in the search. +**EndDate** | **string** | Format: `YYYY-MM-DD`.If this parameter is included, the stats' end date is included in the search. +**Timezone** | **string** | [IANA Area/Region](https://en.wikipedia.org/wiki/Tz_database#Names_of_timezones) string representing the timezone in which the stats are to be presented, e.g., \"America/Chicago\". +**PageSize** | **int32** | The number of elements you want returned on each page. +**PageToken** | **string** | The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. +**GroupBy** | [**[]Items1**](Items1.md) | A/B Single Sends have multiple variation IDs and phase IDs. Including these additional fields allows further granularity of stats by these fields. + +### Return type + +[**SinglesendsResponse**](SinglesendsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_stats/docs/Items.md b/rest/api/v3/mc_stats/docs/Items.md new file mode 100644 index 00000000..a670ab6d --- /dev/null +++ b/rest/api/v3/mc_stats/docs/Items.md @@ -0,0 +1,12 @@ +# Items + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**STEP_ID** | string | (value: `"step_id"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/Items1.md b/rest/api/v3/mc_stats/docs/Items1.md new file mode 100644 index 00000000..b9d5f118 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/Items1.md @@ -0,0 +1,13 @@ +# Items1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**VARIATION** | string | (value: `"ab_variation"`) +**PHASE** | string | (value: `"ab_phase"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/Items2.md b/rest/api/v3/mc_stats/docs/Items2.md new file mode 100644 index 00000000..5ef14d6d --- /dev/null +++ b/rest/api/v3/mc_stats/docs/Items2.md @@ -0,0 +1,13 @@ +# Items2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**VARIATION** | string | (value: `"ab_variation"`) +**PHASE** | string | (value: `"ab_phase"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/LinkTrackingMetadata.md b/rest/api/v3/mc_stats/docs/LinkTrackingMetadata.md new file mode 100644 index 00000000..200bf168 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/LinkTrackingMetadata.md @@ -0,0 +1,14 @@ +# LinkTrackingMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prev** | **string** | The URL of the previous page of results. If this field isn't present, you're at the start of the list. |[optional] +**Self** | **string** | The URL of the current page of results. |[optional] +**Next** | **string** | The URL of the next page of results. If this field isn't present, you're at the end of the list. |[optional] +**Count** | **float32** | The number of items in the entire list, i.e., across all pages. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/ListAutomationStat.md b/rest/api/v3/mc_stats/docs/ListAutomationStat.md new file mode 100644 index 00000000..7bb19791 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/ListAutomationStat.md @@ -0,0 +1,50 @@ +# ListAutomationStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListAutomationStat**](ListAutomationStat.md#ListAutomationStat) | **Get** /v3/marketing/stats/automations | Get All Automation Stats + + + +## ListAutomationStat + +> AutomationsResponse ListAutomationStat(ctx, optional) + +Get All Automation Stats + +**This endpoint allows you to retrieve stats for all your Automations.** By default, all of your Automations will be returned, but you can specify a selection by passing in a comma-separated list of Automation IDs as the value of the query string parameter `automation_ids`. Responses are paginated. You can limit the number of responses returned per batch using the `page_size` query string parameter. The default is 25, but you can specify a value between 1 and 50. You can retrieve a specific page of responses with the `page_token` query string parameter. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListAutomationStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**AutomationIds** | **[]string** | This endpoint returns all automation IDs if no `automation_ids` are specified. +**PageSize** | **int32** | The number of elements you want returned on each page. +**PageToken** | **string** | The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. + +### Return type + +[**AutomationsResponse**](AutomationsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_stats/docs/ListClickTrackingStat.md b/rest/api/v3/mc_stats/docs/ListClickTrackingStat.md new file mode 100644 index 00000000..48466b6f --- /dev/null +++ b/rest/api/v3/mc_stats/docs/ListClickTrackingStat.md @@ -0,0 +1,55 @@ +# ListClickTrackingStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListClickTrackingStat**](ListClickTrackingStat.md#ListClickTrackingStat) | **Get** /v3/marketing/stats/automations/{Id}/links | Get Automation Click Tracking Stats by ID + + + +## ListClickTrackingStat + +> AutmoationsLinkStatsResponse ListClickTrackingStat(ctx, Idoptional) + +Get Automation Click Tracking Stats by ID + +**This endpoint lets you retrieve click-tracking stats for a single Automation**. The stats returned list the URLs embedded in your Automation and the number of clicks each one received. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the Automation you want to get click tracking stats for. + +### Other Parameters + +Other parameters are passed through a pointer to a ListClickTrackingStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**GroupBy** | [**[]Items**](Items.md) | Automations can have multiple steps. Including `step_id` as a `group_by` metric allows further granularity of stats. +**StepIds** | **[]string** | Comma-separated list of `step_ids` that you want the link stats for. +**PageSize** | **int32** | The number of elements you want returned on each page. +**PageToken** | **string** | The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. + +### Return type + +[**AutmoationsLinkStatsResponse**](AutmoationsLinkStatsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_stats/docs/ListSingleSendStat.md b/rest/api/v3/mc_stats/docs/ListSingleSendStat.md new file mode 100644 index 00000000..43d4841b --- /dev/null +++ b/rest/api/v3/mc_stats/docs/ListSingleSendStat.md @@ -0,0 +1,50 @@ +# ListSingleSendStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSingleSendStat**](ListSingleSendStat.md#ListSingleSendStat) | **Get** /v3/marketing/stats/singlesends | Get All Single Sends Stats + + + +## ListSingleSendStat + +> SinglesendsResponse ListSingleSendStat(ctx, optional) + +Get All Single Sends Stats + +**This endpoint allows you to retrieve stats for all your Single Sends.** By default, all of your Single Sends will be returned, but you can specify a selection by passing in a comma-separated list of Single Send IDs as the value of the query string parameter `singlesend_ids`. Responses are paginated. You can limit the number of responses returned per batch using the `page_size` query string parameter. The default is 25, but you specify a value between 1 and 50. You can retrieve a specific page of responses with the `page_token` query string parameter. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSingleSendStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**SinglesendIds** | **[]string** | This endpoint returns all Single Send IDs if no IDs are included in `singlesend_ids`. +**PageSize** | **int32** | The number of elements you want returned on each page. +**PageToken** | **string** | The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. + +### Return type + +[**SinglesendsResponse**](SinglesendsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_stats/docs/ListSingleSendTrackingStat.md b/rest/api/v3/mc_stats/docs/ListSingleSendTrackingStat.md new file mode 100644 index 00000000..8c831e70 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/ListSingleSendTrackingStat.md @@ -0,0 +1,56 @@ +# ListSingleSendTrackingStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSingleSendTrackingStat**](ListSingleSendTrackingStat.md#ListSingleSendTrackingStat) | **Get** /v3/marketing/stats/singlesends/{Id}/links | Get Single Send Click Tracking Stats by ID + + + +## ListSingleSendTrackingStat + +> SinglesendsLinkStatsResponse ListSingleSendTrackingStat(ctx, Idoptional) + +Get Single Send Click Tracking Stats by ID + +**This endpoint lets you retrieve click-tracking stats for one Single Send**. The stats returned list the URLs embedded in the specified Single Send and the number of clicks each one received. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of Single Send for which you want to retrieve link stats. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSingleSendTrackingStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**PageSize** | **int32** | The number of elements you want returned on each page. +**PageToken** | **string** | The stats endpoints are paginated. To get the next page, call the passed `_metadata.next` URL. If `_metadata.prev` doesn't exist, you're at the first page. Similarly, if `_metadata.next` is not present, you're at the last page. +**GroupBy** | [**[]Items2**](Items2.md) | A/B Single Sends have multiple variation IDs and phase IDs. Including these additional fields allows further granularity of stats by these fields. +**AbVariationId** | **string** | +**AbPhaseId** | [**AbPhaseId**](AbPhaseIdAbPhaseId.md) | + +### Return type + +[**SinglesendsLinkStatsResponse**](SinglesendsLinkStatsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_stats/docs/Metadata.md b/rest/api/v3/mc_stats/docs/Metadata.md new file mode 100644 index 00000000..79ca153c --- /dev/null +++ b/rest/api/v3/mc_stats/docs/Metadata.md @@ -0,0 +1,14 @@ +# Metadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prev** | **string** | The URL of the previous page of results. If this field isn't present, you're at the start of the list. |[optional] +**Self** | **string** | The URL of the current page of results. |[optional] +**Next** | **string** | The URL of the next page of results. If this field isn't present, you're at the end of the list. |[optional] +**Count** | **float32** | The number of items in the entire list, i.e., across all pages. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/Metrics.md b/rest/api/v3/mc_stats/docs/Metrics.md new file mode 100644 index 00000000..029b2ac5 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/Metrics.md @@ -0,0 +1,22 @@ +# Metrics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BounceDrops** | **int32** | | +**Bounces** | **int32** | | +**Clicks** | **int32** | | +**Delivered** | **int32** | | +**InvalidEmails** | **int32** | | +**Opens** | **int32** | | +**Requests** | **int32** | | +**SpamReportDrops** | **int32** | | +**SpamReports** | **int32** | | +**UniqueClicks** | **int32** | | +**UniqueOpens** | **int32** | | +**Unsubscribes** | **int32** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/SinglesendsLinkStatsResponse.md b/rest/api/v3/mc_stats/docs/SinglesendsLinkStatsResponse.md new file mode 100644 index 00000000..e6d5eb4f --- /dev/null +++ b/rest/api/v3/mc_stats/docs/SinglesendsLinkStatsResponse.md @@ -0,0 +1,13 @@ +# SinglesendsLinkStatsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | [**[]SinglesendsLinkStatsResponseResultsInner**](SinglesendsLinkStatsResponseResultsInner.md) | This is the index of the link's location in the email contents. | +**Metadata** | [**LinkTrackingMetadata**](LinkTrackingMetadata.md) | | +**TotalClicks** | **int32** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/SinglesendsLinkStatsResponseResultsInner.md b/rest/api/v3/mc_stats/docs/SinglesendsLinkStatsResponseResultsInner.md new file mode 100644 index 00000000..4d8176d8 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/SinglesendsLinkStatsResponseResultsInner.md @@ -0,0 +1,15 @@ +# SinglesendsLinkStatsResponseResultsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | This is the URL of the link clicked. If `{{custom_fields}}` are part of the URL, they will be included. | +**UrlLocation** | **int32** | This is the location of the link clicked in each Single Send A/B variation, or in the Single Send itself if there are no variations. Links are numbered from the top down; the topmost link is index `0`. |[optional] +**AbVariation** | **string** | This is the A/B variation of the Single Send stat returned. It is set to `\"all\"` if the `ab_variation` query parameter was not set in the request and `group_by` doesn't contain `ab_variation`. | +**AbPhase** | [**AbPhase1**](AbPhase1.md) | This is the A/B phase of the Single Send stat returned. If the `ab_phase` query parameter was not provided, it will return `\"all\"`. | +**Clicks** | **int32** | the number of clicks on this particular link | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/SinglesendsResponse.md b/rest/api/v3/mc_stats/docs/SinglesendsResponse.md new file mode 100644 index 00000000..057df7b1 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/SinglesendsResponse.md @@ -0,0 +1,12 @@ +# SinglesendsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | [**[]SinglesendsResponseResultsInner**](SinglesendsResponseResultsInner.md) | | +**Metadata** | [**Metadata**](Metadata.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/docs/SinglesendsResponseResultsInner.md b/rest/api/v3/mc_stats/docs/SinglesendsResponseResultsInner.md new file mode 100644 index 00000000..319301d6 --- /dev/null +++ b/rest/api/v3/mc_stats/docs/SinglesendsResponseResultsInner.md @@ -0,0 +1,15 @@ +# SinglesendsResponseResultsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | This is the ID of the Single Send you require stats for. | +**AbVariation** | **string** | This is the A/B variation of the Single Send stat returned. If the `group_by` parameter doesn't include `ab_variation` in the request, then the value is \"all\". |[default to "a14dcc63-d651-4c57-9826-4a3705f5c78d"] +**AbPhase** | [**AbPhase**](AbPhase.md) | This is the A/B phase of the Single Send stat returned. If the `group_by` parameter doesn't include `ab_phase` in the request, then the value is \"all\". | +**Aggregation** | **string** | This describes the time unit to which the stat is rolled up. It is based on the `aggregated_by` parameter included in the request. It can be \"total\" or the date (in YYYY-MM-DD format) the stats are for. |[optional] [default to "total"] +**Stats** | [**Metrics**](Metrics.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_stats/model_ab_phase.go b/rest/api/v3/mc_stats/model_ab_phase.go new file mode 100644 index 00000000..4b242ec7 --- /dev/null +++ b/rest/api/v3/mc_stats/model_ab_phase.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AbPhase the model 'AbPhase' +type AbPhase string + +// List of AbPhase +const ( + ABPHASE_SEND AbPhase = "send" + ABPHASE_TEST AbPhase = "test" + ABPHASE_ALL AbPhase = "all" +) diff --git a/rest/api/v3/mc_stats/model_ab_phase1.go b/rest/api/v3/mc_stats/model_ab_phase1.go new file mode 100644 index 00000000..d2ead496 --- /dev/null +++ b/rest/api/v3/mc_stats/model_ab_phase1.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AbPhase1 the model 'AbPhase1' +type AbPhase1 string + +// List of AbPhase1 +const ( + ABPHASE1_SEND AbPhase1 = "send" + ABPHASE1_TEST AbPhase1 = "test" + ABPHASE1_ALL AbPhase1 = "all" +) diff --git a/rest/api/v3/mc_stats/model_ab_phase_id.go b/rest/api/v3/mc_stats/model_ab_phase_id.go new file mode 100644 index 00000000..ef008051 --- /dev/null +++ b/rest/api/v3/mc_stats/model_ab_phase_id.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AbPhaseId the model 'AbPhaseId' +type AbPhaseId string + +// List of AbPhaseId +const ( + ABPHASEID_TEST AbPhaseId = "test" + ABPHASEID_SEND AbPhaseId = "send" +) diff --git a/rest/api/v3/mc_stats/model_aggregated_by.go b/rest/api/v3/mc_stats/model_aggregated_by.go new file mode 100644 index 00000000..9a5f47ea --- /dev/null +++ b/rest/api/v3/mc_stats/model_aggregated_by.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AggregatedBy the model 'AggregatedBy' +type AggregatedBy string + +// List of AggregatedBy +const ( + AGGREGATEDBY_DAY AggregatedBy = "day" + AGGREGATEDBY_TOTAL AggregatedBy = "total" +) diff --git a/rest/api/v3/mc_stats/model_autmoations_link_stats_response.go b/rest/api/v3/mc_stats/model_autmoations_link_stats_response.go new file mode 100644 index 00000000..eb0f0456 --- /dev/null +++ b/rest/api/v3/mc_stats/model_autmoations_link_stats_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AutmoationsLinkStatsResponse struct for AutmoationsLinkStatsResponse +type AutmoationsLinkStatsResponse struct { + // + Results []AutmoationsLinkStatsResponseResultsInner `json:"results"` + TotalClicks int32 `json:"total_clicks"` + Metadata LinkTrackingMetadata `json:"_metadata"` +} diff --git a/rest/api/v3/mc_stats/model_autmoations_link_stats_response_results_inner.go b/rest/api/v3/mc_stats/model_autmoations_link_stats_response_results_inner.go new file mode 100644 index 00000000..dd2efae5 --- /dev/null +++ b/rest/api/v3/mc_stats/model_autmoations_link_stats_response_results_inner.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AutmoationsLinkStatsResponseResultsInner struct for AutmoationsLinkStatsResponseResultsInner +type AutmoationsLinkStatsResponseResultsInner struct { + // This is the URL of the link clicked. If `{{custom_fields}}` are part of the URL, they will be included. + Url string `json:"url"` + // This is the location of the link clicked in each Automation step. Links are located according to their position within the message; the topmost link has index `0`. + UrlLocation *int32 `json:"url_location,omitempty"` + // This is the ID of the step if the stats were requested to be grouped by `step_id`. + StepId string `json:"step_id"` + // The number of clicks on this particular link. + Clicks int32 `json:"clicks"` +} diff --git a/rest/api/v3/mc_stats/model_automations_response.go b/rest/api/v3/mc_stats/model_automations_response.go new file mode 100644 index 00000000..6ac11cde --- /dev/null +++ b/rest/api/v3/mc_stats/model_automations_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AutomationsResponse struct for AutomationsResponse +type AutomationsResponse struct { + Results []AutomationsResponseResultsInner `json:"results"` + Metadata *Metadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/mc_stats/model_automations_response_results_inner.go b/rest/api/v3/mc_stats/model_automations_response_results_inner.go new file mode 100644 index 00000000..18bfe774 --- /dev/null +++ b/rest/api/v3/mc_stats/model_automations_response_results_inner.go @@ -0,0 +1,25 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AutomationsResponseResultsInner struct for AutomationsResponseResultsInner +type AutomationsResponseResultsInner struct { + // This is the ID of the Automation you are requesting stats for. + Id string `json:"id"` + // This describes the time unit to which the stat is rolled up. It is based on the `aggregated_by` parameter included in the request. It can be \"total\" or the date (in YYYY-MM-DD format) the stats are for. + Aggregation string `json:"aggregation"` + // This is the ID of the step if the stats were requested to be grouped by `step_id`. + StepId string `json:"step_id"` + Stats *Metrics `json:"stats,omitempty"` +} diff --git a/rest/api/v3/mc_stats/model_error_response.go b/rest/api/v3/mc_stats/model_error_response.go new file mode 100644 index 00000000..523ed1d3 --- /dev/null +++ b/rest/api/v3/mc_stats/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/mc_stats/model_error_response_errors_inner.go b/rest/api/v3/mc_stats/model_error_response_errors_inner.go new file mode 100644 index 00000000..7e65ce73 --- /dev/null +++ b/rest/api/v3/mc_stats/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/mc_stats/model_items.go b/rest/api/v3/mc_stats/model_items.go new file mode 100644 index 00000000..bc42ad0a --- /dev/null +++ b/rest/api/v3/mc_stats/model_items.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Items the model 'Items' +type Items string + +// List of Items +const ( + ITEMS_STEP_ID Items = "step_id" +) diff --git a/rest/api/v3/mc_stats/model_items1.go b/rest/api/v3/mc_stats/model_items1.go new file mode 100644 index 00000000..7f1fba4f --- /dev/null +++ b/rest/api/v3/mc_stats/model_items1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Items1 the model 'Items1' +type Items1 string + +// List of Items1 +const ( + ITEMS1_VARIATION Items1 = "ab_variation" + ITEMS1_PHASE Items1 = "ab_phase" +) diff --git a/rest/api/v3/mc_stats/model_items2.go b/rest/api/v3/mc_stats/model_items2.go new file mode 100644 index 00000000..686f84b8 --- /dev/null +++ b/rest/api/v3/mc_stats/model_items2.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Items2 the model 'Items2' +type Items2 string + +// List of Items2 +const ( + ITEMS2_VARIATION Items2 = "ab_variation" + ITEMS2_PHASE Items2 = "ab_phase" +) diff --git a/rest/api/v3/mc_stats/model_link_tracking_metadata.go b/rest/api/v3/mc_stats/model_link_tracking_metadata.go new file mode 100644 index 00000000..e5ba7a4e --- /dev/null +++ b/rest/api/v3/mc_stats/model_link_tracking_metadata.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// LinkTrackingMetadata struct for LinkTrackingMetadata +type LinkTrackingMetadata struct { + // The URL of the previous page of results. If this field isn't present, you're at the start of the list. + Prev *string `json:"prev,omitempty"` + // The URL of the current page of results. + Self *string `json:"self,omitempty"` + // The URL of the next page of results. If this field isn't present, you're at the end of the list. + Next *string `json:"next,omitempty"` + // The number of items in the entire list, i.e., across all pages. + Count *float32 `json:"count,omitempty"` +} diff --git a/rest/api/v3/mc_stats/model_metadata.go b/rest/api/v3/mc_stats/model_metadata.go new file mode 100644 index 00000000..25cdeaa3 --- /dev/null +++ b/rest/api/v3/mc_stats/model_metadata.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Metadata struct for Metadata +type Metadata struct { + // The URL of the previous page of results. If this field isn't present, you're at the start of the list. + Prev *string `json:"prev,omitempty"` + // The URL of the current page of results. + Self *string `json:"self,omitempty"` + // The URL of the next page of results. If this field isn't present, you're at the end of the list. + Next *string `json:"next,omitempty"` + // The number of items in the entire list, i.e., across all pages. + Count *float32 `json:"count,omitempty"` +} diff --git a/rest/api/v3/mc_stats/model_metrics.go b/rest/api/v3/mc_stats/model_metrics.go new file mode 100644 index 00000000..1242dc27 --- /dev/null +++ b/rest/api/v3/mc_stats/model_metrics.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Metrics struct for Metrics +type Metrics struct { + BounceDrops int32 `json:"bounce_drops"` + Bounces int32 `json:"bounces"` + Clicks int32 `json:"clicks"` + Delivered int32 `json:"delivered"` + InvalidEmails int32 `json:"invalid_emails"` + Opens int32 `json:"opens"` + Requests int32 `json:"requests"` + SpamReportDrops int32 `json:"spam_report_drops"` + SpamReports int32 `json:"spam_reports"` + UniqueClicks int32 `json:"unique_clicks"` + UniqueOpens int32 `json:"unique_opens"` + Unsubscribes int32 `json:"unsubscribes"` +} diff --git a/rest/api/v3/mc_stats/model_singlesends_link_stats_response.go b/rest/api/v3/mc_stats/model_singlesends_link_stats_response.go new file mode 100644 index 00000000..a5c9989d --- /dev/null +++ b/rest/api/v3/mc_stats/model_singlesends_link_stats_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SinglesendsLinkStatsResponse struct for SinglesendsLinkStatsResponse +type SinglesendsLinkStatsResponse struct { + // This is the index of the link's location in the email contents. + Results []SinglesendsLinkStatsResponseResultsInner `json:"results"` + Metadata LinkTrackingMetadata `json:"_metadata"` + TotalClicks *int32 `json:"total_clicks,omitempty"` +} diff --git a/rest/api/v3/mc_stats/model_singlesends_link_stats_response_results_inner.go b/rest/api/v3/mc_stats/model_singlesends_link_stats_response_results_inner.go new file mode 100644 index 00000000..b07590ac --- /dev/null +++ b/rest/api/v3/mc_stats/model_singlesends_link_stats_response_results_inner.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SinglesendsLinkStatsResponseResultsInner struct for SinglesendsLinkStatsResponseResultsInner +type SinglesendsLinkStatsResponseResultsInner struct { + // This is the URL of the link clicked. If `{{custom_fields}}` are part of the URL, they will be included. + Url string `json:"url"` + // This is the location of the link clicked in each Single Send A/B variation, or in the Single Send itself if there are no variations. Links are numbered from the top down; the topmost link is index `0`. + UrlLocation *int32 `json:"url_location,omitempty"` + // This is the A/B variation of the Single Send stat returned. It is set to `\"all\"` if the `ab_variation` query parameter was not set in the request and `group_by` doesn't contain `ab_variation`. + AbVariation string `json:"ab_variation"` + // This is the A/B phase of the Single Send stat returned. If the `ab_phase` query parameter was not provided, it will return `\"all\"`. + AbPhase AbPhase1 `json:"ab_phase"` + // the number of clicks on this particular link + Clicks int32 `json:"clicks"` +} diff --git a/rest/api/v3/mc_stats/model_singlesends_response.go b/rest/api/v3/mc_stats/model_singlesends_response.go new file mode 100644 index 00000000..6dcecd1e --- /dev/null +++ b/rest/api/v3/mc_stats/model_singlesends_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SinglesendsResponse struct for SinglesendsResponse +type SinglesendsResponse struct { + Results []SinglesendsResponseResultsInner `json:"results"` + Metadata Metadata `json:"_metadata"` +} diff --git a/rest/api/v3/mc_stats/model_singlesends_response_results_inner.go b/rest/api/v3/mc_stats/model_singlesends_response_results_inner.go new file mode 100644 index 00000000..98b52187 --- /dev/null +++ b/rest/api/v3/mc_stats/model_singlesends_response_results_inner.go @@ -0,0 +1,27 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Statistics API +* The Marketing Campaigns Stats API allows you to retrieve statistics for both Automations and Single Sends. The statistics provided include bounces, clicks, opens, and more. You can export stats in CSV format for use in other applications. You can also retrieve Marketing Campaigns stats in the [Marketing Campaigns application user interface](https://mc.sendgrid.com/). This API provides statistics for Marketing Campaigns only. For stats related to event tracking, please see the [Stats API](https://docs.sendgrid.com/api-reference/stats). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SinglesendsResponseResultsInner struct for SinglesendsResponseResultsInner +type SinglesendsResponseResultsInner struct { + // This is the ID of the Single Send you require stats for. + Id string `json:"id"` + // This is the A/B variation of the Single Send stat returned. If the `group_by` parameter doesn't include `ab_variation` in the request, then the value is \"all\". + AbVariation string `json:"ab_variation"` + // This is the A/B phase of the Single Send stat returned. If the `group_by` parameter doesn't include `ab_phase` in the request, then the value is \"all\". + AbPhase AbPhase `json:"ab_phase"` + // This describes the time unit to which the stat is rolled up. It is based on the `aggregated_by` parameter included in the request. It can be \"total\" or the date (in YYYY-MM-DD format) the stats are for. + Aggregation *string `json:"aggregation,omitempty"` + Stats *Metrics `json:"stats,omitempty"` +} diff --git a/rest/api/v3/mc_test/README.md b/rest/api/v3/mc_test/README.md new file mode 100644 index 00000000..2bf6a68d --- /dev/null +++ b/rest/api/v3/mc_test/README.md @@ -0,0 +1,62 @@ +# Go API client for + +The Twilio SendGrid Test Email API allows you to test a marketing email by first sending it to a list of up to 10 email addresses before pushing to a contact list or segment. With this feature, you can test the layout and content of your message in multiple email clients and with multiple recipients to see how it will function in a real-world scenario. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:02.229382+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*SendTestMarketingEmail* | [**SendTestMarketingEmail**](docs/SendTestMarketingEmail.md#sendtestmarketingemail) | **Post** /v3/marketing/test/send_email | Send a Test Marketing Email + + +## Documentation For Models + + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [SendTestMarketingEmailRequest](SendTestMarketingEmailRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/mc_test/api_send_test_marketing_email.go b/rest/api/v3/mc_test/api_send_test_marketing_email.go new file mode 100644 index 00000000..a84adcc3 --- /dev/null +++ b/rest/api/v3/mc_test/api_send_test_marketing_email.go @@ -0,0 +1,73 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Send Test Email API +* The Twilio SendGrid Test Email API allows you to test a marketing email by first sending it to a list of up to 10 email addresses before pushing to a contact list or segment. With this feature, you can test the layout and content of your message in multiple email clients and with multiple recipients to see how it will function in a real-world scenario. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type SendTestMarketingEmailParam struct { + // + SendTestMarketingEmailRequest *SendTestMarketingEmailRequest `json:"SendTestMarketingEmailRequest,omitempty"` +} + +func (params *SendTestMarketingEmailParam) SetSendTestMarketingEmailRequest(SendTestMarketingEmailRequest SendTestMarketingEmailRequest) *SendTestMarketingEmailParam { + params.SendTestMarketingEmailRequest = &SendTestMarketingEmailRequest + return params +} + +// **This endpoint allows you to send a test marketing email to a list of email addresses**. Before sending a marketing message, you can test it using this endpoint. You may specify up to **10 contacts** in the `emails` request body field. You must also specify a `template_id` and include either a `from_address` or `sender_id`. You can manage your templates with the [Twilio SendGrid App](https://mc.sendgrid.com/dynamic-templates) or the [Transactional Templates API](https://docs.sendgrid.com/api-reference/transactional-templates). > Please note that this endpoint works with Dynamic Transactional Templates only. Legacy Transactional Templates will not be delivered. For more information about managing Dynamic Transactional Templates, see [How to Send Email with Dynamic Transactional Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/). You can also test your Single Sends in the [Twilio SendGrid Marketing Campaigns UI](https://mc.sendgrid.com/single-sends). +func (c *ApiService) SendTestMarketingEmail(params *SendTestMarketingEmailParam) (interface{}, error) { + path := "/v3/marketing/test/send_email" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SendTestMarketingEmailRequest != nil { + b, err := json.Marshal(*params.SendTestMarketingEmailRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 202 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/mc_test/api_service.go b/rest/api/v3/mc_test/api_service.go new file mode 100644 index 00000000..352104a5 --- /dev/null +++ b/rest/api/v3/mc_test/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Send Test Email API +* The Twilio SendGrid Test Email API allows you to test a marketing email by first sending it to a list of up to 10 email addresses before pushing to a contact list or segment. With this feature, you can test the layout and content of your message in multiple email clients and with multiple recipients to see how it will function in a real-world scenario. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/mc_test/docs/ErrorResponse.md b/rest/api/v3/mc_test/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/mc_test/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_test/docs/ErrorResponseErrorsInner.md b/rest/api/v3/mc_test/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/mc_test/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_test/docs/SendTestMarketingEmail.md b/rest/api/v3/mc_test/docs/SendTestMarketingEmail.md new file mode 100644 index 00000000..11a3daf9 --- /dev/null +++ b/rest/api/v3/mc_test/docs/SendTestMarketingEmail.md @@ -0,0 +1,48 @@ +# SendTestMarketingEmail + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SendTestMarketingEmail**](SendTestMarketingEmail.md#SendTestMarketingEmail) | **Post** /v3/marketing/test/send_email | Send a Test Marketing Email + + + +## SendTestMarketingEmail + +> map[string]interface{} SendTestMarketingEmail(ctx, optional) + +Send a Test Marketing Email + +**This endpoint allows you to send a test marketing email to a list of email addresses**. Before sending a marketing message, you can test it using this endpoint. You may specify up to **10 contacts** in the `emails` request body field. You must also specify a `template_id` and include either a `from_address` or `sender_id`. You can manage your templates with the [Twilio SendGrid App](https://mc.sendgrid.com/dynamic-templates) or the [Transactional Templates API](https://docs.sendgrid.com/api-reference/transactional-templates). > Please note that this endpoint works with Dynamic Transactional Templates only. Legacy Transactional Templates will not be delivered. For more information about managing Dynamic Transactional Templates, see [How to Send Email with Dynamic Transactional Templates](https://sendgrid.com/docs/ui/sending-email/how-to-send-an-email-with-dynamic-transactional-templates/). You can also test your Single Sends in the [Twilio SendGrid Marketing Campaigns UI](https://mc.sendgrid.com/single-sends). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a SendTestMarketingEmailParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**SendTestMarketingEmailRequest** | [**SendTestMarketingEmailRequest**](SendTestMarketingEmailRequest.md) | + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/mc_test/docs/SendTestMarketingEmailRequest.md b/rest/api/v3/mc_test/docs/SendTestMarketingEmailRequest.md new file mode 100644 index 00000000..930d86ba --- /dev/null +++ b/rest/api/v3/mc_test/docs/SendTestMarketingEmailRequest.md @@ -0,0 +1,17 @@ +# SendTestMarketingEmailRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**TemplateId** | **string** | The ID of the template that you would like to use. If you use a template that contains a subject and content (either text or HTML), then those values specified at the personalizations or message level will not be used. | +**VersionIdOverride** | **string** | You can override the active template with an alternative template version by passing the version ID in this field. If this field is blank, the active template version will be used. |[optional] +**SenderId** | **int32** | This ID must belong to a verified sender. Alternatively, you may supply a `from_address` email. |[optional] +**CustomUnsubscribeUrl** | **string** | A custom unsubscribe URL. |[optional] +**SuppressionGroupId** | **int32** | |[optional] +**Emails** | **[]string** | An array of email addresses you want to send the test message to. | +**FromAddress** | **string** | You can either specify this address or specify a verified sender ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/mc_test/model_error_response.go b/rest/api/v3/mc_test/model_error_response.go new file mode 100644 index 00000000..db9a301c --- /dev/null +++ b/rest/api/v3/mc_test/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Send Test Email API +* The Twilio SendGrid Test Email API allows you to test a marketing email by first sending it to a list of up to 10 email addresses before pushing to a contact list or segment. With this feature, you can test the layout and content of your message in multiple email clients and with multiple recipients to see how it will function in a real-world scenario. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/mc_test/model_error_response_errors_inner.go b/rest/api/v3/mc_test/model_error_response_errors_inner.go new file mode 100644 index 00000000..9c7eb834 --- /dev/null +++ b/rest/api/v3/mc_test/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Send Test Email API +* The Twilio SendGrid Test Email API allows you to test a marketing email by first sending it to a list of up to 10 email addresses before pushing to a contact list or segment. With this feature, you can test the layout and content of your message in multiple email clients and with multiple recipients to see how it will function in a real-world scenario. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/mc_test/model_send_test_marketing_email_request.go b/rest/api/v3/mc_test/model_send_test_marketing_email_request.go new file mode 100644 index 00000000..79bf2781 --- /dev/null +++ b/rest/api/v3/mc_test/model_send_test_marketing_email_request.go @@ -0,0 +1,31 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Marketing Campaigns Send Test Email API +* The Twilio SendGrid Test Email API allows you to test a marketing email by first sending it to a list of up to 10 email addresses before pushing to a contact list or segment. With this feature, you can test the layout and content of your message in multiple email clients and with multiple recipients to see how it will function in a real-world scenario. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SendTestMarketingEmailRequest struct for SendTestMarketingEmailRequest +type SendTestMarketingEmailRequest struct { + // The ID of the template that you would like to use. If you use a template that contains a subject and content (either text or HTML), then those values specified at the personalizations or message level will not be used. + TemplateId string `json:"template_id"` + // You can override the active template with an alternative template version by passing the version ID in this field. If this field is blank, the active template version will be used. + VersionIdOverride *string `json:"version_id_override,omitempty"` + // This ID must belong to a verified sender. Alternatively, you may supply a `from_address` email. + SenderId *int32 `json:"sender_id,omitempty"` + // A custom unsubscribe URL. + CustomUnsubscribeUrl *string `json:"custom_unsubscribe_url,omitempty"` + SuppressionGroupId *int32 `json:"suppression_group_id,omitempty"` + // An array of email addresses you want to send the test message to. + Emails []string `json:"emails"` + // You can either specify this address or specify a verified sender ID. + FromAddress *string `json:"from_address,omitempty"` +} diff --git a/rest/api/v3/partner/README.md b/rest/api/v3/partner/README.md new file mode 100644 index 00000000..2de743a8 --- /dev/null +++ b/rest/api/v3/partner/README.md @@ -0,0 +1,61 @@ +# Go API client for + +The Twilio SendGrid Partner Settings API allows you to integrate your SendGrid account with our partners to increase your SendGrid experience and functionality. For more information about our partners and how you can begin integrating with them, please visit our [Partners page](https://sendgrid.com/partners/marketplace/). + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:02.288735+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ListPartnerSetting* | [**ListPartnerSetting**](docs/ListPartnerSetting.md#listpartnersetting) | **Get** /v3/partner_settings | Returns a list of all partner settings. + + +## Documentation For Models + + - [ListPartnerSetting200Response](ListPartnerSetting200Response.md) + - [ListPartnerSetting200ResponseResultInner](ListPartnerSetting200ResponseResultInner.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/partner/api_list_partner_setting.go b/rest/api/v3/partner/api_list_partner_setting.go new file mode 100644 index 00000000..31efe6d4 --- /dev/null +++ b/rest/api/v3/partner/api_list_partner_setting.go @@ -0,0 +1,79 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Partner API +* The Twilio SendGrid Partner Settings API allows you to integrate your SendGrid account with our partners to increase your SendGrid experience and functionality. For more information about our partners and how you can begin integrating with them, please visit our [Partners page](https://sendgrid.com/partners/marketplace/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListPartnerSettingParam struct { + // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. + Limit *int32 `json:"limit,omitempty"` + // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + Offset *int32 `json:"offset,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListPartnerSettingParam) SetLimit(Limit int32) *ListPartnerSettingParam { + params.Limit = &Limit + return params +} +func (params *ListPartnerSettingParam) SetOffset(Offset int32) *ListPartnerSettingParam { + params.Offset = &Offset + return params +} +func (params *ListPartnerSettingParam) SetOnbehalfof(Onbehalfof string) *ListPartnerSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a paginated list of all partner settings that you can enable.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items.' +func (c *ApiService) ListPartnerSetting(params *ListPartnerSettingParam) (interface{}, error) { + path := "/v3/partner_settings" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListPartnerSetting200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/partner/api_service.go b/rest/api/v3/partner/api_service.go new file mode 100644 index 00000000..f4bf0ab0 --- /dev/null +++ b/rest/api/v3/partner/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Partner API +* The Twilio SendGrid Partner Settings API allows you to integrate your SendGrid account with our partners to increase your SendGrid experience and functionality. For more information about our partners and how you can begin integrating with them, please visit our [Partners page](https://sendgrid.com/partners/marketplace/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/partner/docs/ListPartnerSetting.md b/rest/api/v3/partner/docs/ListPartnerSetting.md new file mode 100644 index 00000000..c8a2675b --- /dev/null +++ b/rest/api/v3/partner/docs/ListPartnerSetting.md @@ -0,0 +1,50 @@ +# ListPartnerSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListPartnerSetting**](ListPartnerSetting.md#ListPartnerSetting) | **Get** /v3/partner_settings | Returns a list of all partner settings. + + + +## ListPartnerSetting + +> ListPartnerSetting200Response ListPartnerSetting(ctx, optional) + +Returns a list of all partner settings. + +**This endpoint allows you to retrieve a paginated list of all partner settings that you can enable.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items.' + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListPartnerSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. +**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListPartnerSetting200Response**](ListPartnerSetting200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/partner/docs/ListPartnerSetting200Response.md b/rest/api/v3/partner/docs/ListPartnerSetting200Response.md new file mode 100644 index 00000000..ab110ce2 --- /dev/null +++ b/rest/api/v3/partner/docs/ListPartnerSetting200Response.md @@ -0,0 +1,11 @@ +# ListPartnerSetting200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ListPartnerSetting200ResponseResultInner**](ListPartnerSetting200ResponseResultInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/partner/docs/ListPartnerSetting200ResponseResultInner.md b/rest/api/v3/partner/docs/ListPartnerSetting200ResponseResultInner.md new file mode 100644 index 00000000..92854890 --- /dev/null +++ b/rest/api/v3/partner/docs/ListPartnerSetting200ResponseResultInner.md @@ -0,0 +1,14 @@ +# ListPartnerSetting200ResponseResultInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Title** | **string** | The title of the partner. | +**Enabled** | **bool** | Indicates if this partner setting has been enabled. | +**Name** | **string** | The name of the partner setting. | +**Description** | **string** | A description of this partner setting. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/partner/model_list_partner_setting_200_response.go b/rest/api/v3/partner/model_list_partner_setting_200_response.go new file mode 100644 index 00000000..f4ad199e --- /dev/null +++ b/rest/api/v3/partner/model_list_partner_setting_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Partner API +* The Twilio SendGrid Partner Settings API allows you to integrate your SendGrid account with our partners to increase your SendGrid experience and functionality. For more information about our partners and how you can begin integrating with them, please visit our [Partners page](https://sendgrid.com/partners/marketplace/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListPartnerSetting200Response struct for ListPartnerSetting200Response +type ListPartnerSetting200Response struct { + Result *[]ListPartnerSetting200ResponseResultInner `json:"result,omitempty"` +} diff --git a/rest/api/v3/partner/model_list_partner_setting_200_response_result_inner.go b/rest/api/v3/partner/model_list_partner_setting_200_response_result_inner.go new file mode 100644 index 00000000..7aa81206 --- /dev/null +++ b/rest/api/v3/partner/model_list_partner_setting_200_response_result_inner.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Partner API +* The Twilio SendGrid Partner Settings API allows you to integrate your SendGrid account with our partners to increase your SendGrid experience and functionality. For more information about our partners and how you can begin integrating with them, please visit our [Partners page](https://sendgrid.com/partners/marketplace/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListPartnerSetting200ResponseResultInner struct for ListPartnerSetting200ResponseResultInner +type ListPartnerSetting200ResponseResultInner struct { + // The title of the partner. + Title string `json:"title"` + // Indicates if this partner setting has been enabled. + Enabled bool `json:"enabled"` + // The name of the partner setting. + Name string `json:"name"` + // A description of this partner setting. + Description string `json:"description"` +} diff --git a/rest/api/v3/recipients_data_erasure/README.md b/rest/api/v3/recipients_data_erasure/README.md new file mode 100644 index 00000000..79de6829 --- /dev/null +++ b/rest/api/v3/recipients_data_erasure/README.md @@ -0,0 +1,62 @@ +# Go API client for + +The Recipients' Data Erasure API allows Twilio SendGrid customers to delete their own customers' personal data from the Twilio SendGrid Platform. The use of this API facilitates the self-service removal of email personal data from the Twilio SendGrid platform and will enable customers to comply with various obligatory data privacy regulations. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:02.362527+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*EraseRecipientEmailData* | [**EraseRecipientEmailData**](docs/EraseRecipientEmailData.md#eraserecipientemaildata) | **Post** /v3/recipients/erasejob | Erase recipients' email data + + +## Documentation For Models + + - [RecipientsDataErasureEraseRecipientsRequest](RecipientsDataErasureEraseRecipientsRequest.md) + - [RecipientsDataErasureErrorV1](RecipientsDataErasureErrorV1.md) + - [RecipientsDataErasureJobId](RecipientsDataErasureJobId.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/recipients_data_erasure/api_erase_recipient_email_data.go b/rest/api/v3/recipients_data_erasure/api_erase_recipient_email_data.go new file mode 100644 index 00000000..a3394ef6 --- /dev/null +++ b/rest/api/v3/recipients_data_erasure/api_erase_recipient_email_data.go @@ -0,0 +1,74 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Recipients' Data Erasure API +* The Recipients' Data Erasure API allows Twilio SendGrid customers to delete their own customers' personal data from the Twilio SendGrid Platform. The use of this API facilitates the self-service removal of email personal data from the Twilio SendGrid platform and will enable customers to comply with various obligatory data privacy regulations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type EraseRecipientEmailDataParam struct { + // + RecipientsDataErasureEraseRecipientsRequest *RecipientsDataErasureEraseRecipientsRequest `json:"RecipientsDataErasureEraseRecipientsRequest"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *EraseRecipientEmailDataParam) SetRecipientsDataErasureEraseRecipientsRequest(RecipientsDataErasureEraseRecipientsRequest RecipientsDataErasureEraseRecipientsRequest) *EraseRecipientEmailDataParam { + params.RecipientsDataErasureEraseRecipientsRequest = &RecipientsDataErasureEraseRecipientsRequest + return params +} +func (params *EraseRecipientEmailDataParam) SetOnbehalfof(Onbehalfof string) *EraseRecipientEmailDataParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This operation allows you to delete your recipients' personal email data** The Delete Recipients' Email Data operation accepts a list of 5,000 `email_addresses` or a total payload size of 256Kb per request, whichever comes first. Upon a successful request with this operation, SendGrid will run a search on the email addresses provided against the SendGrid system to identify matches. SendGrid will then delete all personal data associated with the matched users such as the recipients' names, email addresses, subject lines, categories, and IP addresses. All email addresses are filtered for uniqueness and tested for structural validity—any invalid addresses will be returned in an error response. Please note that recipient data is deleted for the account making the request only—deletions do not cascade from a parent account to its Subusers' recipients. To delete a Subuser's recipients' data, you can use the `on-behalf-of` header. +func (c *ApiService) EraseRecipientEmailData(params *EraseRecipientEmailDataParam) (interface{}, error) { + path := "/v3/recipients/erasejob" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.RecipientsDataErasureEraseRecipientsRequest != nil { + b, err := json.Marshal(*params.RecipientsDataErasureEraseRecipientsRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 202 { + ps := &RecipientsDataErasureJobId{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/recipients_data_erasure/api_service.go b/rest/api/v3/recipients_data_erasure/api_service.go new file mode 100644 index 00000000..b823caa4 --- /dev/null +++ b/rest/api/v3/recipients_data_erasure/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Recipients' Data Erasure API +* The Recipients' Data Erasure API allows Twilio SendGrid customers to delete their own customers' personal data from the Twilio SendGrid Platform. The use of this API facilitates the self-service removal of email personal data from the Twilio SendGrid platform and will enable customers to comply with various obligatory data privacy regulations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/recipients_data_erasure/docs/EraseRecipientEmailData.md b/rest/api/v3/recipients_data_erasure/docs/EraseRecipientEmailData.md new file mode 100644 index 00000000..ef961a3d --- /dev/null +++ b/rest/api/v3/recipients_data_erasure/docs/EraseRecipientEmailData.md @@ -0,0 +1,48 @@ +# EraseRecipientEmailData + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**EraseRecipientEmailData**](EraseRecipientEmailData.md#EraseRecipientEmailData) | **Post** /v3/recipients/erasejob | Erase recipients' email data + + + +## EraseRecipientEmailData + +> RecipientsDataErasureJobId EraseRecipientEmailData(ctx, RecipientsDataErasureEraseRecipientsRequestoptional) + +Erase recipients' email data + +**This operation allows you to delete your recipients' personal email data** The Delete Recipients' Email Data operation accepts a list of 5,000 `email_addresses` or a total payload size of 256Kb per request, whichever comes first. Upon a successful request with this operation, SendGrid will run a search on the email addresses provided against the SendGrid system to identify matches. SendGrid will then delete all personal data associated with the matched users such as the recipients' names, email addresses, subject lines, categories, and IP addresses. All email addresses are filtered for uniqueness and tested for structural validity—any invalid addresses will be returned in an error response. Please note that recipient data is deleted for the account making the request only—deletions do not cascade from a parent account to its Subusers' recipients. To delete a Subuser's recipients' data, you can use the `on-behalf-of` header. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a EraseRecipientEmailDataParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**RecipientsDataErasureJobId**](RecipientsDataErasureJobId.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureEraseRecipientsRequest.md b/rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureEraseRecipientsRequest.md new file mode 100644 index 00000000..fed050d6 --- /dev/null +++ b/rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureEraseRecipientsRequest.md @@ -0,0 +1,11 @@ +# RecipientsDataErasureEraseRecipientsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EmailAddresses** | **[]string** | List of unique recipient email addresses whose PII will be erased. You may include a maximum of 5,000 addresses or a maximum payload size of 256Kb, whichever comes first. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureErrorV1.md b/rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureErrorV1.md new file mode 100644 index 00000000..2f32e4f2 --- /dev/null +++ b/rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureErrorV1.md @@ -0,0 +1,12 @@ +# RecipientsDataErasureErrorV1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | The message representing the error from the API | +**Field** | **string** | The field associated with the error | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureJobId.md b/rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureJobId.md new file mode 100644 index 00000000..6e21073b --- /dev/null +++ b/rest/api/v3/recipients_data_erasure/docs/RecipientsDataErasureJobId.md @@ -0,0 +1,11 @@ +# RecipientsDataErasureJobId + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**JobId** | **string** | The job ID associated with the data erasure request. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_erase_recipients_request.go b/rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_erase_recipients_request.go new file mode 100644 index 00000000..d2ce724b --- /dev/null +++ b/rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_erase_recipients_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Recipients' Data Erasure API +* The Recipients' Data Erasure API allows Twilio SendGrid customers to delete their own customers' personal data from the Twilio SendGrid Platform. The use of this API facilitates the self-service removal of email personal data from the Twilio SendGrid platform and will enable customers to comply with various obligatory data privacy regulations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// RecipientsDataErasureEraseRecipientsRequest struct for RecipientsDataErasureEraseRecipientsRequest +type RecipientsDataErasureEraseRecipientsRequest struct { + // List of unique recipient email addresses whose PII will be erased. You may include a maximum of 5,000 addresses or a maximum payload size of 256Kb, whichever comes first. + EmailAddresses []string `json:"email_addresses"` +} diff --git a/rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_error_v1.go b/rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_error_v1.go new file mode 100644 index 00000000..80864193 --- /dev/null +++ b/rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_error_v1.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Recipients' Data Erasure API +* The Recipients' Data Erasure API allows Twilio SendGrid customers to delete their own customers' personal data from the Twilio SendGrid Platform. The use of this API facilitates the self-service removal of email personal data from the Twilio SendGrid platform and will enable customers to comply with various obligatory data privacy regulations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// RecipientsDataErasureErrorV1 struct for RecipientsDataErasureErrorV1 +type RecipientsDataErasureErrorV1 struct { + // The message representing the error from the API + Message string `json:"message"` + // The field associated with the error + Field string `json:"field"` +} diff --git a/rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_job_id.go b/rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_job_id.go new file mode 100644 index 00000000..c8a68be1 --- /dev/null +++ b/rest/api/v3/recipients_data_erasure/model_recipients_data_erasure_job_id.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Recipients' Data Erasure API +* The Recipients' Data Erasure API allows Twilio SendGrid customers to delete their own customers' personal data from the Twilio SendGrid Platform. The use of this API facilitates the self-service removal of email personal data from the Twilio SendGrid platform and will enable customers to comply with various obligatory data privacy regulations. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// RecipientsDataErasureJobId struct for RecipientsDataErasureJobId +type RecipientsDataErasureJobId struct { + // The job ID associated with the data erasure request. + JobId string `json:"job_id"` +} diff --git a/rest/api/v3/reverse_dns/README.md b/rest/api/v3/reverse_dns/README.md new file mode 100644 index 00000000..d3767ab4 --- /dev/null +++ b/rest/api/v3/reverse_dns/README.md @@ -0,0 +1,84 @@ +# Go API client for + +The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. + +When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. + +Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. + +You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). + +See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:02.347891+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DeleteReverseDns* | [**DeleteReverseDns**](docs/DeleteReverseDns.md#deletereversedns) | **Delete** /v3/whitelabel/ips/{Id} | Delete a reverse DNS record +*GetReverseDns* | [**GetReverseDns**](docs/GetReverseDns.md#getreversedns) | **Get** /v3/whitelabel/ips/{Id} | Retrieve a reverse DNS record +*ListReverseDns* | [**ListReverseDns**](docs/ListReverseDns.md#listreversedns) | **Get** /v3/whitelabel/ips | Retrieve all reverse DNS records +*SetUpReverseDns* | [**SetUpReverseDns**](docs/SetUpReverseDns.md#setupreversedns) | **Post** /v3/whitelabel/ips | Set up reverse DNS +*ValidateReverseDns* | [**ValidateReverseDns**](docs/ValidateReverseDns.md#validatereversedns) | **Post** /v3/whitelabel/ips/{Id}/validate | Validate a reverse DNS record + + +## Documentation For Models + + - [ReverseDns](ReverseDns.md) + - [ReverseDnsARecord](ReverseDnsARecord.md) + - [ReverseDnsUsersInner](ReverseDnsUsersInner.md) + - [SetUpReverseDnsRequest](SetUpReverseDnsRequest.md) + - [Valid](Valid.md) + - [Valid1](Valid1.md) + - [ValidateReverseDns200Response](ValidateReverseDns200Response.md) + - [ValidateReverseDns200ResponseValidationResults](ValidateReverseDns200ResponseValidationResults.md) + - [ValidateReverseDns200ResponseValidationResultsARecord](ValidateReverseDns200ResponseValidationResultsARecord.md) + - [ValidateReverseDns404Response](ValidateReverseDns404Response.md) + - [ValidateReverseDns404ResponseErrorsInner](ValidateReverseDns404ResponseErrorsInner.md) + - [ValidateReverseDns500Response](ValidateReverseDns500Response.md) + - [ValidateReverseDns500ResponseErrorsInner](ValidateReverseDns500ResponseErrorsInner.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/reverse_dns/api_delete_reverse_dns.go b/rest/api/v3/reverse_dns/api_delete_reverse_dns.go new file mode 100644 index 00000000..9d41024c --- /dev/null +++ b/rest/api/v3/reverse_dns/api_delete_reverse_dns.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteReverseDnsParam struct { + // The ID of the reverse DNS record that you would like to retrieve. + Id *string `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteReverseDnsParam) SetId(Id string) *DeleteReverseDnsParam { + params.Id = &Id + return params +} +func (params *DeleteReverseDnsParam) SetOnbehalfof(Onbehalfof string) *DeleteReverseDnsParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete a reverse DNS record.** A call to this endpoint will respond with a 204 status code if the deletion was successful. You can retrieve the IDs associated with all your reverse DNS records using the \"Retrieve all reverse DNS records\" endpoint. +func (c *ApiService) DeleteReverseDns(params *DeleteReverseDnsParam) (interface{}, error) { + path := "/v3/whitelabel/ips/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/reverse_dns/api_get_reverse_dns.go b/rest/api/v3/reverse_dns/api_get_reverse_dns.go new file mode 100644 index 00000000..d93067b1 --- /dev/null +++ b/rest/api/v3/reverse_dns/api_get_reverse_dns.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetReverseDnsParam struct { + // The ID of the reverse DNS record that you would like to retrieve. + Id *string `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetReverseDnsParam) SetId(Id string) *GetReverseDnsParam { + params.Id = &Id + return params +} +func (params *GetReverseDnsParam) SetOnbehalfof(Onbehalfof string) *GetReverseDnsParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a reverse DNS record.** You can retrieve the IDs associated with all your reverse DNS records using the \"Retrieve all reverse DNS records\" endpoint. +func (c *ApiService) GetReverseDns(params *GetReverseDnsParam) (interface{}, error) { + path := "/v3/whitelabel/ips/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ReverseDns{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/reverse_dns/api_list_reverse_dns.go b/rest/api/v3/reverse_dns/api_list_reverse_dns.go new file mode 100644 index 00000000..4eb8b76c --- /dev/null +++ b/rest/api/v3/reverse_dns/api_list_reverse_dns.go @@ -0,0 +1,88 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListReverseDnsParam struct { + // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. + Limit *int32 `json:"limit,omitempty"` + // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + Offset *int32 `json:"offset,omitempty"` + // The IP address segment that you'd like to use in a prefix search. + Ip *string `json:"ip,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListReverseDnsParam) SetLimit(Limit int32) *ListReverseDnsParam { + params.Limit = &Limit + return params +} +func (params *ListReverseDnsParam) SetOffset(Offset int32) *ListReverseDnsParam { + params.Offset = &Offset + return params +} +func (params *ListReverseDnsParam) SetIp(Ip string) *ListReverseDnsParam { + params.Ip = &Ip + return params +} +func (params *ListReverseDnsParam) SetOnbehalfof(Onbehalfof string) *ListReverseDnsParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a paginated list of all the Reverse DNS records created by this account.** You may include a search key by using the `ip` query string parameter. This enables you to perform a prefix search for a given IP segment (e.g., `?ip=\"192.\"`). You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. +func (c *ApiService) ListReverseDns(params *ListReverseDnsParam) (interface{}, error) { + path := "/v3/whitelabel/ips" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + if params != nil && params.Ip != nil { + data.Set("ip", *params.Ip) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ReverseDns{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/reverse_dns/api_service.go b/rest/api/v3/reverse_dns/api_service.go new file mode 100644 index 00000000..6e1bfe2b --- /dev/null +++ b/rest/api/v3/reverse_dns/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/reverse_dns/api_set_up_reverse_dns.go b/rest/api/v3/reverse_dns/api_set_up_reverse_dns.go new file mode 100644 index 00000000..6bf9ea86 --- /dev/null +++ b/rest/api/v3/reverse_dns/api_set_up_reverse_dns.go @@ -0,0 +1,74 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type SetUpReverseDnsParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + SetUpReverseDnsRequest *SetUpReverseDnsRequest `json:"SetUpReverseDnsRequest,omitempty"` +} + +func (params *SetUpReverseDnsParam) SetOnbehalfof(Onbehalfof string) *SetUpReverseDnsParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *SetUpReverseDnsParam) SetSetUpReverseDnsRequest(SetUpReverseDnsRequest SetUpReverseDnsRequest) *SetUpReverseDnsParam { + params.SetUpReverseDnsRequest = &SetUpReverseDnsRequest + return params +} + +// **This endpoint allows you to set up reverse DNS.** +func (c *ApiService) SetUpReverseDns(params *SetUpReverseDnsParam) (interface{}, error) { + path := "/v3/whitelabel/ips" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SetUpReverseDnsRequest != nil { + b, err := json.Marshal(*params.SetUpReverseDnsRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &ReverseDns{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/reverse_dns/api_validate_reverse_dns.go b/rest/api/v3/reverse_dns/api_validate_reverse_dns.go new file mode 100644 index 00000000..a9721489 --- /dev/null +++ b/rest/api/v3/reverse_dns/api_validate_reverse_dns.go @@ -0,0 +1,86 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type ValidateReverseDnsParam struct { + // The ID of the reverse DNS record that you would like to validate. + Id *string `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ValidateReverseDnsParam) SetId(Id string) *ValidateReverseDnsParam { + params.Id = &Id + return params +} +func (params *ValidateReverseDnsParam) SetOnbehalfof(Onbehalfof string) *ValidateReverseDnsParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to validate a reverse DNS record.** Always check the `valid` property of the response’s `validation_results.a_record` object. This field will indicate whether it was possible to validate the reverse DNS record. If the `validation_results.a_record.valid` is `false`, this indicates only that Twilio SendGrid could not determine the validity your reverse DNS record — it may still be valid. If validity couldn’t be determined, you can check the value of `validation_results.a_record.reason` to find out why. You can retrieve the IDs associated with all your reverse DNS records using the \"Retrieve all reverse DNS records\" endpoint. +func (c *ApiService) ValidateReverseDns(params *ValidateReverseDnsParam) (interface{}, error) { + path := "/v3/whitelabel/ips/{Id}/validate" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ValidateReverseDns200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ValidateReverseDns404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ValidateReverseDns500Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/reverse_dns/docs/DeleteReverseDns.md b/rest/api/v3/reverse_dns/docs/DeleteReverseDns.md new file mode 100644 index 00000000..13f51043 --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/DeleteReverseDns.md @@ -0,0 +1,52 @@ +# DeleteReverseDns + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteReverseDns**](DeleteReverseDns.md#DeleteReverseDns) | **Delete** /v3/whitelabel/ips/{Id} | Delete a reverse DNS record + + + +## DeleteReverseDns + +> map[string]interface{} DeleteReverseDns(ctx, Idoptional) + +Delete a reverse DNS record + +**This endpoint allows you to delete a reverse DNS record.** A call to this endpoint will respond with a 204 status code if the deletion was successful. You can retrieve the IDs associated with all your reverse DNS records using the \"Retrieve all reverse DNS records\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the reverse DNS record that you would like to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteReverseDnsParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/reverse_dns/docs/GetReverseDns.md b/rest/api/v3/reverse_dns/docs/GetReverseDns.md new file mode 100644 index 00000000..c54a9054 --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/GetReverseDns.md @@ -0,0 +1,52 @@ +# GetReverseDns + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetReverseDns**](GetReverseDns.md#GetReverseDns) | **Get** /v3/whitelabel/ips/{Id} | Retrieve a reverse DNS record + + + +## GetReverseDns + +> ReverseDns GetReverseDns(ctx, Idoptional) + +Retrieve a reverse DNS record + +**This endpoint allows you to retrieve a reverse DNS record.** You can retrieve the IDs associated with all your reverse DNS records using the \"Retrieve all reverse DNS records\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the reverse DNS record that you would like to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetReverseDnsParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ReverseDns**](ReverseDns.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/reverse_dns/docs/ListReverseDns.md b/rest/api/v3/reverse_dns/docs/ListReverseDns.md new file mode 100644 index 00000000..28c28b73 --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/ListReverseDns.md @@ -0,0 +1,51 @@ +# ListReverseDns + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListReverseDns**](ListReverseDns.md#ListReverseDns) | **Get** /v3/whitelabel/ips | Retrieve all reverse DNS records + + + +## ListReverseDns + +> []ReverseDns ListReverseDns(ctx, optional) + +Retrieve all reverse DNS records + +**This endpoint allows you to retrieve a paginated list of all the Reverse DNS records created by this account.** You may include a search key by using the `ip` query string parameter. This enables you to perform a prefix search for a given IP segment (e.g., `?ip=\"192.\"`). You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListReverseDnsParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. +**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. +**Ip** | **string** | The IP address segment that you'd like to use in a prefix search. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**[]ReverseDns**](ReverseDns.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/reverse_dns/docs/ReverseDns.md b/rest/api/v3/reverse_dns/docs/ReverseDns.md new file mode 100644 index 00000000..0e3e4d96 --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/ReverseDns.md @@ -0,0 +1,20 @@ +# ReverseDns + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The ID of the Reverse DNS. | +**Ip** | **string** | The IP address that this Reverse DNS was created for. | +**Rdns** | **string** | The reverse DNS record for the IP address. This points to the Reverse DNS subdomain. | +**Users** | [**[]ReverseDnsUsersInner**](ReverseDnsUsersInner.md) | The users who are able to send mail from the IP address. | +**Subdomain** | **string** | The subdomain created for this reverse DNS. This is where the rDNS record points. |[optional] +**Domain** | **string** | The root, or sending, domain. | +**Valid** | **bool** | Indicates if this is a valid Reverse DNS. | +**Legacy** | **bool** | Indicates if this Reverse DNS was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new Reverse DNS if you need to update it. | +**LastValidationAttemptAt** | **int32** | A Unix epoch timestamp representing the last time of a validation attempt. |[optional] +**ARecord** | [**ReverseDnsARecord**](ReverseDnsARecord.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/reverse_dns/docs/ReverseDnsARecord.md b/rest/api/v3/reverse_dns/docs/ReverseDnsARecord.md new file mode 100644 index 00000000..e0c2fb73 --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/ReverseDnsARecord.md @@ -0,0 +1,14 @@ +# ReverseDnsARecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Valid** | **bool** | Indicates if the a_record is valid. | +**Type** | **string** | The type of DNS record. | +**Host** | **string** | This is the web address that will be mapped to the IP address. | +**Data** | **string** | The IP address being set up with Reverse DNS. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/reverse_dns/docs/ReverseDnsUsersInner.md b/rest/api/v3/reverse_dns/docs/ReverseDnsUsersInner.md new file mode 100644 index 00000000..f28c8202 --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/ReverseDnsUsersInner.md @@ -0,0 +1,12 @@ +# ReverseDnsUsersInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | The username of a user who can send mail from the IP address. | +**UserId** | **int32** | The ID of a user who can send mail from the IP address. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/reverse_dns/docs/SetUpReverseDns.md b/rest/api/v3/reverse_dns/docs/SetUpReverseDns.md new file mode 100644 index 00000000..dbf9cdd7 --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/SetUpReverseDns.md @@ -0,0 +1,49 @@ +# SetUpReverseDns + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SetUpReverseDns**](SetUpReverseDns.md#SetUpReverseDns) | **Post** /v3/whitelabel/ips | Set up reverse DNS + + + +## SetUpReverseDns + +> ReverseDns SetUpReverseDns(ctx, optional) + +Set up reverse DNS + +**This endpoint allows you to set up reverse DNS.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a SetUpReverseDnsParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**SetUpReverseDnsRequest** | [**SetUpReverseDnsRequest**](SetUpReverseDnsRequest.md) | + +### Return type + +[**ReverseDns**](ReverseDns.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/reverse_dns/docs/SetUpReverseDnsRequest.md b/rest/api/v3/reverse_dns/docs/SetUpReverseDnsRequest.md new file mode 100644 index 00000000..c0e04d6b --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/SetUpReverseDnsRequest.md @@ -0,0 +1,13 @@ +# SetUpReverseDnsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ip** | **string** | The IP address for which you want to set up reverse DNS. | +**Subdomain** | **string** | The subdomain that will be used to send emails from the IP address. This should be the same as the subdomain used to set up an authenticated domain. |[optional] +**Domain** | **string** | The root, or sending, domain that will be used to send message from the IP address. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/reverse_dns/docs/Valid.md b/rest/api/v3/reverse_dns/docs/Valid.md new file mode 100644 index 00000000..2addd0e7 --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/Valid.md @@ -0,0 +1,13 @@ +# Valid + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TRUE** | bool | (value: `true`) +**FALSE** | bool | (value: `false`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/reverse_dns/docs/Valid1.md b/rest/api/v3/reverse_dns/docs/Valid1.md new file mode 100644 index 00000000..bca4d56b --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/Valid1.md @@ -0,0 +1,13 @@ +# Valid1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**TRUE** | bool | (value: `true`) +**FALSE** | bool | (value: `false`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/reverse_dns/docs/ValidateReverseDns.md b/rest/api/v3/reverse_dns/docs/ValidateReverseDns.md new file mode 100644 index 00000000..fa170b18 --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/ValidateReverseDns.md @@ -0,0 +1,52 @@ +# ValidateReverseDns + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ValidateReverseDns**](ValidateReverseDns.md#ValidateReverseDns) | **Post** /v3/whitelabel/ips/{Id}/validate | Validate a reverse DNS record + + + +## ValidateReverseDns + +> ValidateReverseDns200Response ValidateReverseDns(ctx, Idoptional) + +Validate a reverse DNS record + +**This endpoint allows you to validate a reverse DNS record.** Always check the `valid` property of the response’s `validation_results.a_record` object. This field will indicate whether it was possible to validate the reverse DNS record. If the `validation_results.a_record.valid` is `false`, this indicates only that Twilio SendGrid could not determine the validity your reverse DNS record — it may still be valid. If validity couldn’t be determined, you can check the value of `validation_results.a_record.reason` to find out why. You can retrieve the IDs associated with all your reverse DNS records using the \"Retrieve all reverse DNS records\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the reverse DNS record that you would like to validate. + +### Other Parameters + +Other parameters are passed through a pointer to a ValidateReverseDnsParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ValidateReverseDns200Response**](ValidateReverseDns200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/reverse_dns/docs/ValidateReverseDns200Response.md b/rest/api/v3/reverse_dns/docs/ValidateReverseDns200Response.md new file mode 100644 index 00000000..5ca8da4c --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/ValidateReverseDns200Response.md @@ -0,0 +1,13 @@ +# ValidateReverseDns200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The ID of the reverse DNS record. | +**Valid** | [**Valid**](Valid.md) | Indicates if the reverse DNS record is valid. | +**ValidationResults** | [**ValidateReverseDns200ResponseValidationResults**](ValidateReverseDns200ResponseValidationResults.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/reverse_dns/docs/ValidateReverseDns200ResponseValidationResults.md b/rest/api/v3/reverse_dns/docs/ValidateReverseDns200ResponseValidationResults.md new file mode 100644 index 00000000..4cb2f1ed --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/ValidateReverseDns200ResponseValidationResults.md @@ -0,0 +1,11 @@ +# ValidateReverseDns200ResponseValidationResults + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ARecord** | [**ValidateReverseDns200ResponseValidationResultsARecord**](ValidateReverseDns200ResponseValidationResultsARecord.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/reverse_dns/docs/ValidateReverseDns200ResponseValidationResultsARecord.md b/rest/api/v3/reverse_dns/docs/ValidateReverseDns200ResponseValidationResultsARecord.md new file mode 100644 index 00000000..4ed45863 --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/ValidateReverseDns200ResponseValidationResultsARecord.md @@ -0,0 +1,12 @@ +# ValidateReverseDns200ResponseValidationResultsARecord + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Valid** | [**Valid1**](Valid1.md) | Indicates if the reverse DNS record could be validated. | +**Reason** | **string** | The reason the reverse DNS record could not be validated. Is `null` if the reverse DNS record was validated. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/reverse_dns/docs/ValidateReverseDns404Response.md b/rest/api/v3/reverse_dns/docs/ValidateReverseDns404Response.md new file mode 100644 index 00000000..18de5e6c --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/ValidateReverseDns404Response.md @@ -0,0 +1,11 @@ +# ValidateReverseDns404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ValidateReverseDns404ResponseErrorsInner**](ValidateReverseDns404ResponseErrorsInner.md) | The error messages for the failed validation. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/reverse_dns/docs/ValidateReverseDns404ResponseErrorsInner.md b/rest/api/v3/reverse_dns/docs/ValidateReverseDns404ResponseErrorsInner.md new file mode 100644 index 00000000..ec8b260a --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/ValidateReverseDns404ResponseErrorsInner.md @@ -0,0 +1,11 @@ +# ValidateReverseDns404ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | A message describing why the reverse DNS could not be validated. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/reverse_dns/docs/ValidateReverseDns500Response.md b/rest/api/v3/reverse_dns/docs/ValidateReverseDns500Response.md new file mode 100644 index 00000000..62f027dc --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/ValidateReverseDns500Response.md @@ -0,0 +1,11 @@ +# ValidateReverseDns500Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ValidateReverseDns500ResponseErrorsInner**](ValidateReverseDns500ResponseErrorsInner.md) | The error messages for the failed validation. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/reverse_dns/docs/ValidateReverseDns500ResponseErrorsInner.md b/rest/api/v3/reverse_dns/docs/ValidateReverseDns500ResponseErrorsInner.md new file mode 100644 index 00000000..214fa0ca --- /dev/null +++ b/rest/api/v3/reverse_dns/docs/ValidateReverseDns500ResponseErrorsInner.md @@ -0,0 +1,11 @@ +# ValidateReverseDns500ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | A message describing why the IP whitelabel could not be validated. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/reverse_dns/model_reverse_dns.go b/rest/api/v3/reverse_dns/model_reverse_dns.go new file mode 100644 index 00000000..7c91cd7f --- /dev/null +++ b/rest/api/v3/reverse_dns/model_reverse_dns.go @@ -0,0 +1,37 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ReverseDns struct for ReverseDns +type ReverseDns struct { + // The ID of the Reverse DNS. + Id int32 `json:"id"` + // The IP address that this Reverse DNS was created for. + Ip string `json:"ip"` + // The reverse DNS record for the IP address. This points to the Reverse DNS subdomain. + Rdns string `json:"rdns"` + // The users who are able to send mail from the IP address. + Users []ReverseDnsUsersInner `json:"users"` + // The subdomain created for this reverse DNS. This is where the rDNS record points. + Subdomain *string `json:"subdomain,omitempty"` + // The root, or sending, domain. + Domain string `json:"domain"` + // Indicates if this is a valid Reverse DNS. + Valid bool `json:"valid"` + // Indicates if this Reverse DNS was created using the legacy whitelabel tool. If it is a legacy whitelabel, it will still function, but you'll need to create a new Reverse DNS if you need to update it. + Legacy bool `json:"legacy"` + // A Unix epoch timestamp representing the last time of a validation attempt. + LastValidationAttemptAt *int32 `json:"last_validation_attempt_at,omitempty"` + ARecord ReverseDnsARecord `json:"a_record"` +} diff --git a/rest/api/v3/reverse_dns/model_reverse_dns_a_record.go b/rest/api/v3/reverse_dns/model_reverse_dns_a_record.go new file mode 100644 index 00000000..646a9624 --- /dev/null +++ b/rest/api/v3/reverse_dns/model_reverse_dns_a_record.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ReverseDnsARecord struct for ReverseDnsARecord +type ReverseDnsARecord struct { + // Indicates if the a_record is valid. + Valid bool `json:"valid"` + // The type of DNS record. + Type string `json:"type"` + // This is the web address that will be mapped to the IP address. + Host string `json:"host"` + // The IP address being set up with Reverse DNS. + Data string `json:"data"` +} diff --git a/rest/api/v3/reverse_dns/model_reverse_dns_users_inner.go b/rest/api/v3/reverse_dns/model_reverse_dns_users_inner.go new file mode 100644 index 00000000..6b6ee09c --- /dev/null +++ b/rest/api/v3/reverse_dns/model_reverse_dns_users_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ReverseDnsUsersInner struct for ReverseDnsUsersInner +type ReverseDnsUsersInner struct { + // The username of a user who can send mail from the IP address. + Username string `json:"username"` + // The ID of a user who can send mail from the IP address. + UserId int32 `json:"user_id"` +} diff --git a/rest/api/v3/reverse_dns/model_set_up_reverse_dns_request.go b/rest/api/v3/reverse_dns/model_set_up_reverse_dns_request.go new file mode 100644 index 00000000..9cdc1c22 --- /dev/null +++ b/rest/api/v3/reverse_dns/model_set_up_reverse_dns_request.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SetUpReverseDnsRequest struct for SetUpReverseDnsRequest +type SetUpReverseDnsRequest struct { + // The IP address for which you want to set up reverse DNS. + Ip string `json:"ip"` + // The subdomain that will be used to send emails from the IP address. This should be the same as the subdomain used to set up an authenticated domain. + Subdomain *string `json:"subdomain,omitempty"` + // The root, or sending, domain that will be used to send message from the IP address. + Domain string `json:"domain"` +} diff --git a/rest/api/v3/reverse_dns/model_valid.go b/rest/api/v3/reverse_dns/model_valid.go new file mode 100644 index 00000000..5a8ea14f --- /dev/null +++ b/rest/api/v3/reverse_dns/model_valid.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Valid the model 'Valid' +type Valid bool + +// List of Valid +const ( + VALID_TRUE Valid = true + VALID_FALSE Valid = false +) diff --git a/rest/api/v3/reverse_dns/model_valid1.go b/rest/api/v3/reverse_dns/model_valid1.go new file mode 100644 index 00000000..b4e28b4a --- /dev/null +++ b/rest/api/v3/reverse_dns/model_valid1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Valid1 the model 'Valid1' +type Valid1 bool + +// List of Valid1 +const ( + VALID1_TRUE Valid1 = true + VALID1_FALSE Valid1 = false +) diff --git a/rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response.go b/rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response.go new file mode 100644 index 00000000..f44812f5 --- /dev/null +++ b/rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateReverseDns200Response struct for ValidateReverseDns200Response +type ValidateReverseDns200Response struct { + // The ID of the reverse DNS record. + Id int32 `json:"id"` + // Indicates if the reverse DNS record is valid. + Valid Valid `json:"valid"` + ValidationResults ValidateReverseDns200ResponseValidationResults `json:"validation_results"` +} diff --git a/rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response_validation_results.go b/rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response_validation_results.go new file mode 100644 index 00000000..9859bcfc --- /dev/null +++ b/rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response_validation_results.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateReverseDns200ResponseValidationResults The specific results of the validation. +type ValidateReverseDns200ResponseValidationResults struct { + ARecord *ValidateReverseDns200ResponseValidationResultsARecord `json:"a_record,omitempty"` +} diff --git a/rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response_validation_results_a_record.go b/rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response_validation_results_a_record.go new file mode 100644 index 00000000..30a88911 --- /dev/null +++ b/rest/api/v3/reverse_dns/model_validate_reverse_dns_200_response_validation_results_a_record.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateReverseDns200ResponseValidationResultsARecord struct for ValidateReverseDns200ResponseValidationResultsARecord +type ValidateReverseDns200ResponseValidationResultsARecord struct { + // Indicates if the reverse DNS record could be validated. + Valid Valid1 `json:"valid"` + // The reason the reverse DNS record could not be validated. Is `null` if the reverse DNS record was validated. + Reason string `json:"reason"` +} diff --git a/rest/api/v3/reverse_dns/model_validate_reverse_dns_404_response.go b/rest/api/v3/reverse_dns/model_validate_reverse_dns_404_response.go new file mode 100644 index 00000000..f1d7b077 --- /dev/null +++ b/rest/api/v3/reverse_dns/model_validate_reverse_dns_404_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateReverseDns404Response struct for ValidateReverseDns404Response +type ValidateReverseDns404Response struct { + // The error messages for the failed validation. + Errors []ValidateReverseDns404ResponseErrorsInner `json:"errors"` +} diff --git a/rest/api/v3/reverse_dns/model_validate_reverse_dns_404_response_errors_inner.go b/rest/api/v3/reverse_dns/model_validate_reverse_dns_404_response_errors_inner.go new file mode 100644 index 00000000..c214310b --- /dev/null +++ b/rest/api/v3/reverse_dns/model_validate_reverse_dns_404_response_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateReverseDns404ResponseErrorsInner struct for ValidateReverseDns404ResponseErrorsInner +type ValidateReverseDns404ResponseErrorsInner struct { + // A message describing why the reverse DNS could not be validated. + Message string `json:"message"` +} diff --git a/rest/api/v3/reverse_dns/model_validate_reverse_dns_500_response.go b/rest/api/v3/reverse_dns/model_validate_reverse_dns_500_response.go new file mode 100644 index 00000000..61e3fc40 --- /dev/null +++ b/rest/api/v3/reverse_dns/model_validate_reverse_dns_500_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateReverseDns500Response struct for ValidateReverseDns500Response +type ValidateReverseDns500Response struct { + // The error messages for the failed validation. + Errors []ValidateReverseDns500ResponseErrorsInner `json:"errors"` +} diff --git a/rest/api/v3/reverse_dns/model_validate_reverse_dns_500_response_errors_inner.go b/rest/api/v3/reverse_dns/model_validate_reverse_dns_500_response_errors_inner.go new file mode 100644 index 00000000..0e85cc78 --- /dev/null +++ b/rest/api/v3/reverse_dns/model_validate_reverse_dns_500_response_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Reverse DNS API +* The Twilio SendGrid Reverse DNS API (formerly IP Whitelabel) allows you to configure reverse DNS settings for your account. Mailbox providers verify the sender of your emails by performing a reverse DNS lookup. When setting up Reverse DNS, Twilio SendGrid will provide an A Record (address record) for you to add to the DNS records of your sending domain. The A record maps your sending domain to a dedicated Twilio SendGrid IP address. Once Twilio SendGrid has verified that the appropriate A record for the IP address has been created, the appropriate reverse DNS record for the IP address is generated. Reverse DNS is available for [dedicated IP addresses](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) only. You can also manage your reverse DNS settings in the Sender Authentication setion of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**How to Set Up Reverse DNS**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ValidateReverseDns500ResponseErrorsInner struct for ValidateReverseDns500ResponseErrorsInner +type ValidateReverseDns500ResponseErrorsInner struct { + // A message describing why the IP whitelabel could not be validated. + Message string `json:"message"` +} diff --git a/rest/api/v3/scheduled_sends/README.md b/rest/api/v3/scheduled_sends/README.md new file mode 100644 index 00000000..8c2cd905 --- /dev/null +++ b/rest/api/v3/scheduled_sends/README.md @@ -0,0 +1,82 @@ +# Go API client for + +The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. + +A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. + +See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. + +See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. + +When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. + +When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:02.346578+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateScheduledSend* | [**CreateScheduledSend**](docs/CreateScheduledSend.md#createscheduledsend) | **Post** /v3/user/scheduled_sends | Cancel or pause a scheduled send +*DeleteScheduledSend* | [**DeleteScheduledSend**](docs/DeleteScheduledSend.md#deletescheduledsend) | **Delete** /v3/user/scheduled_sends/{BatchId} | Delete a cancellation or pause from a scheduled send +*GetScheduledSend* | [**GetScheduledSend**](docs/GetScheduledSend.md#getscheduledsend) | **Get** /v3/user/scheduled_sends/{BatchId} | Retrieve scheduled send +*ListScheduledSend* | [**ListScheduledSend**](docs/ListScheduledSend.md#listscheduledsend) | **Get** /v3/user/scheduled_sends | Retrieve all scheduled sends +*UpdateScheduledSend* | [**UpdateScheduledSend**](docs/UpdateScheduledSend.md#updatescheduledsend) | **Patch** /v3/user/scheduled_sends/{BatchId} | Update a scheduled send + + +## Documentation For Models + + - [CancelOrPauseAScheduledSendRequest](CancelOrPauseAScheduledSendRequest.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [MailBatchId](MailBatchId.md) + - [ScheduledSendStatus](ScheduledSendStatus.md) + - [Status](Status.md) + - [Status1](Status1.md) + - [Status2](Status2.md) + - [UpdateScheduledSendRequest](UpdateScheduledSendRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/scheduled_sends/api_create_scheduled_send.go b/rest/api/v3/scheduled_sends/api_create_scheduled_send.go new file mode 100644 index 00000000..536ba3b9 --- /dev/null +++ b/rest/api/v3/scheduled_sends/api_create_scheduled_send.go @@ -0,0 +1,106 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateScheduledSendParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + CancelOrPauseAScheduledSendRequest *CancelOrPauseAScheduledSendRequest `json:"CancelOrPauseAScheduledSendRequest,omitempty"` +} + +func (params *CreateScheduledSendParam) SetOnbehalfof(Onbehalfof string) *CreateScheduledSendParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateScheduledSendParam) SetCancelOrPauseAScheduledSendRequest(CancelOrPauseAScheduledSendRequest CancelOrPauseAScheduledSendRequest) *CreateScheduledSendParam { + params.CancelOrPauseAScheduledSendRequest = &CancelOrPauseAScheduledSendRequest + return params +} + +// **This endpoint allows you to cancel or pause a scheduled send associated with a `batch_id`.** Passing this endpoint a `batch_id` and status will cancel or pause the scheduled send. Once a scheduled send is set to `pause` or `cancel` you must use the \"Update a scheduled send\" endpoint to change its status or the \"Delete a cancellation or pause from a scheduled send\" endpoint to remove the status. Passing a status change to a scheduled send that has already been paused or cancelled will result in a `400` level status code. If the maximum number of cancellations/pauses are added to a send, a `400` level status code will be returned. +func (c *ApiService) CreateScheduledSend(params *CreateScheduledSendParam) (interface{}, error) { + path := "/v3/user/scheduled_sends" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CancelOrPauseAScheduledSendRequest != nil { + b, err := json.Marshal(*params.CancelOrPauseAScheduledSendRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &ScheduledSendStatus{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/scheduled_sends/api_delete_scheduled_send.go b/rest/api/v3/scheduled_sends/api_delete_scheduled_send.go new file mode 100644 index 00000000..ed4e6a6e --- /dev/null +++ b/rest/api/v3/scheduled_sends/api_delete_scheduled_send.go @@ -0,0 +1,94 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteScheduledSendParam struct { + // + BatchId *string `json:"batch_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteScheduledSendParam) SetBatchId(BatchId string) *DeleteScheduledSendParam { + params.BatchId = &BatchId + return params +} +func (params *DeleteScheduledSendParam) SetOnbehalfof(Onbehalfof string) *DeleteScheduledSendParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete the cancellation/pause of a scheduled send.** Scheduled sends cancelled less than 10 minutes before the scheduled time are not guaranteed to be cancelled. +func (c *ApiService) DeleteScheduledSend(params *DeleteScheduledSendParam) (interface{}, error) { + path := "/v3/user/scheduled_sends/{BatchId}" + if params != nil && params.BatchId != nil { + path = strings.Replace(path, "{"+"BatchId"+"}", *params.BatchId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/scheduled_sends/api_get_scheduled_send.go b/rest/api/v3/scheduled_sends/api_get_scheduled_send.go new file mode 100644 index 00000000..b254b33b --- /dev/null +++ b/rest/api/v3/scheduled_sends/api_get_scheduled_send.go @@ -0,0 +1,102 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetScheduledSendParam struct { + // + BatchId *string `json:"batch_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetScheduledSendParam) SetBatchId(BatchId string) *GetScheduledSendParam { + params.BatchId = &BatchId + return params +} +func (params *GetScheduledSendParam) SetOnbehalfof(Onbehalfof string) *GetScheduledSendParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve the cancel/paused scheduled send information for a specific `batch_id`.** +func (c *ApiService) GetScheduledSend(params *GetScheduledSendParam) (interface{}, error) { + path := "/v3/user/scheduled_sends/{BatchId}" + if params != nil && params.BatchId != nil { + path = strings.Replace(path, "{"+"BatchId"+"}", *params.BatchId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ScheduledSendStatus{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/scheduled_sends/api_list_scheduled_send.go b/rest/api/v3/scheduled_sends/api_list_scheduled_send.go new file mode 100644 index 00000000..4c179891 --- /dev/null +++ b/rest/api/v3/scheduled_sends/api_list_scheduled_send.go @@ -0,0 +1,91 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListScheduledSendParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListScheduledSendParam) SetOnbehalfof(Onbehalfof string) *ListScheduledSendParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve all cancelled and paused scheduled send information.** This endpoint will return only the scheduled sends that are associated with a `batch_id`. If you have scheduled a send using the `/mail/send` endpoint and the `send_at` field but no `batch_id`, the send will be scheduled for delivery; however, it will not be returned by this endpoint. For this reason, you should assign a `batch_id` to any scheduled send you may need to pause or cancel in the future. +func (c *ApiService) ListScheduledSend(params *ListScheduledSendParam) (interface{}, error) { + path := "/v3/user/scheduled_sends" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ScheduledSendStatus{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/scheduled_sends/api_service.go b/rest/api/v3/scheduled_sends/api_service.go new file mode 100644 index 00000000..e86bc8be --- /dev/null +++ b/rest/api/v3/scheduled_sends/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/scheduled_sends/api_update_scheduled_send.go b/rest/api/v3/scheduled_sends/api_update_scheduled_send.go new file mode 100644 index 00000000..6627c809 --- /dev/null +++ b/rest/api/v3/scheduled_sends/api_update_scheduled_send.go @@ -0,0 +1,109 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateScheduledSendParam struct { + // + BatchId *string `json:"batch_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateScheduledSendRequest *UpdateScheduledSendRequest `json:"UpdateScheduledSendRequest,omitempty"` +} + +func (params *UpdateScheduledSendParam) SetBatchId(BatchId string) *UpdateScheduledSendParam { + params.BatchId = &BatchId + return params +} +func (params *UpdateScheduledSendParam) SetOnbehalfof(Onbehalfof string) *UpdateScheduledSendParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateScheduledSendParam) SetUpdateScheduledSendRequest(UpdateScheduledSendRequest UpdateScheduledSendRequest) *UpdateScheduledSendParam { + params.UpdateScheduledSendRequest = &UpdateScheduledSendRequest + return params +} + +// **This endpoint allows you to update the status of a scheduled send for the given `batch_id`.** If you have already set a `cancel` or `pause` status on a scheduled send using the \"Cancel or pause a scheduled send\" endpoint, you can update it's status using this endpoint. Attempting to update a status once it has been set with the \"Cancel or pause a scheduled send\" endpoint will result in a `400` error. +func (c *ApiService) UpdateScheduledSend(params *UpdateScheduledSendParam) (interface{}, error) { + path := "/v3/user/scheduled_sends/{BatchId}" + if params != nil && params.BatchId != nil { + path = strings.Replace(path, "{"+"BatchId"+"}", *params.BatchId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateScheduledSendRequest != nil { + b, err := json.Marshal(*params.UpdateScheduledSendRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/scheduled_sends/docs/CancelOrPauseAScheduledSendRequest.md b/rest/api/v3/scheduled_sends/docs/CancelOrPauseAScheduledSendRequest.md new file mode 100644 index 00000000..1c192628 --- /dev/null +++ b/rest/api/v3/scheduled_sends/docs/CancelOrPauseAScheduledSendRequest.md @@ -0,0 +1,12 @@ +# CancelOrPauseAScheduledSendRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BatchId** | **string** | The batch ID is the identifier that your scheduled mail sends share. | +**Status** | [**Status**](Status.md) | The status of the send you would like to implement. This can be pause or cancel. To delete a pause or cancel status see DELETE /v3/user/scheduled_sends/{batch_id} | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scheduled_sends/docs/CreateScheduledSend.md b/rest/api/v3/scheduled_sends/docs/CreateScheduledSend.md new file mode 100644 index 00000000..e72ddd5b --- /dev/null +++ b/rest/api/v3/scheduled_sends/docs/CreateScheduledSend.md @@ -0,0 +1,49 @@ +# CreateScheduledSend + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateScheduledSend**](CreateScheduledSend.md#CreateScheduledSend) | **Post** /v3/user/scheduled_sends | Cancel or pause a scheduled send + + + +## CreateScheduledSend + +> ScheduledSendStatus CreateScheduledSend(ctx, optional) + +Cancel or pause a scheduled send + +**This endpoint allows you to cancel or pause a scheduled send associated with a `batch_id`.** Passing this endpoint a `batch_id` and status will cancel or pause the scheduled send. Once a scheduled send is set to `pause` or `cancel` you must use the \"Update a scheduled send\" endpoint to change its status or the \"Delete a cancellation or pause from a scheduled send\" endpoint to remove the status. Passing a status change to a scheduled send that has already been paused or cancelled will result in a `400` level status code. If the maximum number of cancellations/pauses are added to a send, a `400` level status code will be returned. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateScheduledSendParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**CancelOrPauseAScheduledSendRequest** | [**CancelOrPauseAScheduledSendRequest**](CancelOrPauseAScheduledSendRequest.md) | + +### Return type + +[**ScheduledSendStatus**](ScheduledSendStatus.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/scheduled_sends/docs/DeleteScheduledSend.md b/rest/api/v3/scheduled_sends/docs/DeleteScheduledSend.md new file mode 100644 index 00000000..1d198b9d --- /dev/null +++ b/rest/api/v3/scheduled_sends/docs/DeleteScheduledSend.md @@ -0,0 +1,52 @@ +# DeleteScheduledSend + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteScheduledSend**](DeleteScheduledSend.md#DeleteScheduledSend) | **Delete** /v3/user/scheduled_sends/{BatchId} | Delete a cancellation or pause from a scheduled send + + + +## DeleteScheduledSend + +> DeleteScheduledSend(ctx, BatchIdoptional) + +Delete a cancellation or pause from a scheduled send + +**This endpoint allows you to delete the cancellation/pause of a scheduled send.** Scheduled sends cancelled less than 10 minutes before the scheduled time are not guaranteed to be cancelled. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**BatchId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteScheduledSendParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/scheduled_sends/docs/ErrorResponse.md b/rest/api/v3/scheduled_sends/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/scheduled_sends/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scheduled_sends/docs/ErrorResponseErrorsInner.md b/rest/api/v3/scheduled_sends/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/scheduled_sends/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scheduled_sends/docs/GetScheduledSend.md b/rest/api/v3/scheduled_sends/docs/GetScheduledSend.md new file mode 100644 index 00000000..1f9e8925 --- /dev/null +++ b/rest/api/v3/scheduled_sends/docs/GetScheduledSend.md @@ -0,0 +1,52 @@ +# GetScheduledSend + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetScheduledSend**](GetScheduledSend.md#GetScheduledSend) | **Get** /v3/user/scheduled_sends/{BatchId} | Retrieve scheduled send + + + +## GetScheduledSend + +> []ScheduledSendStatus GetScheduledSend(ctx, BatchIdoptional) + +Retrieve scheduled send + +**This endpoint allows you to retrieve the cancel/paused scheduled send information for a specific `batch_id`.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**BatchId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a GetScheduledSendParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**[]ScheduledSendStatus**](ScheduledSendStatus.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/scheduled_sends/docs/ListScheduledSend.md b/rest/api/v3/scheduled_sends/docs/ListScheduledSend.md new file mode 100644 index 00000000..e6fbb8fe --- /dev/null +++ b/rest/api/v3/scheduled_sends/docs/ListScheduledSend.md @@ -0,0 +1,48 @@ +# ListScheduledSend + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListScheduledSend**](ListScheduledSend.md#ListScheduledSend) | **Get** /v3/user/scheduled_sends | Retrieve all scheduled sends + + + +## ListScheduledSend + +> []ScheduledSendStatus ListScheduledSend(ctx, optional) + +Retrieve all scheduled sends + +**This endpoint allows you to retrieve all cancelled and paused scheduled send information.** This endpoint will return only the scheduled sends that are associated with a `batch_id`. If you have scheduled a send using the `/mail/send` endpoint and the `send_at` field but no `batch_id`, the send will be scheduled for delivery; however, it will not be returned by this endpoint. For this reason, you should assign a `batch_id` to any scheduled send you may need to pause or cancel in the future. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListScheduledSendParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**[]ScheduledSendStatus**](ScheduledSendStatus.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/scheduled_sends/docs/MailBatchId.md b/rest/api/v3/scheduled_sends/docs/MailBatchId.md new file mode 100644 index 00000000..9537317a --- /dev/null +++ b/rest/api/v3/scheduled_sends/docs/MailBatchId.md @@ -0,0 +1,11 @@ +# MailBatchId + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BatchId** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scheduled_sends/docs/ScheduledSendStatus.md b/rest/api/v3/scheduled_sends/docs/ScheduledSendStatus.md new file mode 100644 index 00000000..c5498cc4 --- /dev/null +++ b/rest/api/v3/scheduled_sends/docs/ScheduledSendStatus.md @@ -0,0 +1,12 @@ +# ScheduledSendStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**BatchId** | **string** | | +**Status** | [**Status2**](Status2.md) | The status of the scheduled send. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scheduled_sends/docs/Status.md b/rest/api/v3/scheduled_sends/docs/Status.md new file mode 100644 index 00000000..8a3e53e1 --- /dev/null +++ b/rest/api/v3/scheduled_sends/docs/Status.md @@ -0,0 +1,13 @@ +# Status + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**PAUSE** | string | (value: `"pause"`) +**CANCEL** | string | (value: `"cancel"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scheduled_sends/docs/Status1.md b/rest/api/v3/scheduled_sends/docs/Status1.md new file mode 100644 index 00000000..0dcc9ff0 --- /dev/null +++ b/rest/api/v3/scheduled_sends/docs/Status1.md @@ -0,0 +1,13 @@ +# Status1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**CANCEL** | string | (value: `"cancel"`) +**PAUSE** | string | (value: `"pause"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scheduled_sends/docs/Status2.md b/rest/api/v3/scheduled_sends/docs/Status2.md new file mode 100644 index 00000000..5c7d4c92 --- /dev/null +++ b/rest/api/v3/scheduled_sends/docs/Status2.md @@ -0,0 +1,13 @@ +# Status2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**CANCEL** | string | (value: `"cancel"`) +**PAUSE** | string | (value: `"pause"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scheduled_sends/docs/UpdateScheduledSend.md b/rest/api/v3/scheduled_sends/docs/UpdateScheduledSend.md new file mode 100644 index 00000000..b2ec61ee --- /dev/null +++ b/rest/api/v3/scheduled_sends/docs/UpdateScheduledSend.md @@ -0,0 +1,53 @@ +# UpdateScheduledSend + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateScheduledSend**](UpdateScheduledSend.md#UpdateScheduledSend) | **Patch** /v3/user/scheduled_sends/{BatchId} | Update a scheduled send + + + +## UpdateScheduledSend + +> interface{} UpdateScheduledSend(ctx, BatchIdoptional) + +Update a scheduled send + +**This endpoint allows you to update the status of a scheduled send for the given `batch_id`.** If you have already set a `cancel` or `pause` status on a scheduled send using the \"Cancel or pause a scheduled send\" endpoint, you can update it's status using this endpoint. Attempting to update a status once it has been set with the \"Cancel or pause a scheduled send\" endpoint will result in a `400` error. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**BatchId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateScheduledSendParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateScheduledSendRequest** | [**UpdateScheduledSendRequest**](UpdateScheduledSendRequest.md) | + +### Return type + +**interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/scheduled_sends/docs/UpdateScheduledSendRequest.md b/rest/api/v3/scheduled_sends/docs/UpdateScheduledSendRequest.md new file mode 100644 index 00000000..a01e9aa8 --- /dev/null +++ b/rest/api/v3/scheduled_sends/docs/UpdateScheduledSendRequest.md @@ -0,0 +1,11 @@ +# UpdateScheduledSendRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Status** | [**Status1**](Status1.md) | The status you would like the scheduled send to have. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scheduled_sends/model_cancel_or_pause_a_scheduled_send_request.go b/rest/api/v3/scheduled_sends/model_cancel_or_pause_a_scheduled_send_request.go new file mode 100644 index 00000000..6e635983 --- /dev/null +++ b/rest/api/v3/scheduled_sends/model_cancel_or_pause_a_scheduled_send_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CancelOrPauseAScheduledSendRequest struct for CancelOrPauseAScheduledSendRequest +type CancelOrPauseAScheduledSendRequest struct { + // The batch ID is the identifier that your scheduled mail sends share. + BatchId string `json:"batch_id"` + // The status of the send you would like to implement. This can be pause or cancel. To delete a pause or cancel status see DELETE /v3/user/scheduled_sends/{batch_id} + Status Status `json:"status"` +} diff --git a/rest/api/v3/scheduled_sends/model_error_response.go b/rest/api/v3/scheduled_sends/model_error_response.go new file mode 100644 index 00000000..894e8251 --- /dev/null +++ b/rest/api/v3/scheduled_sends/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/scheduled_sends/model_error_response_errors_inner.go b/rest/api/v3/scheduled_sends/model_error_response_errors_inner.go new file mode 100644 index 00000000..341c7d99 --- /dev/null +++ b/rest/api/v3/scheduled_sends/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/scheduled_sends/model_mail_batch_id.go b/rest/api/v3/scheduled_sends/model_mail_batch_id.go new file mode 100644 index 00000000..dbd323c8 --- /dev/null +++ b/rest/api/v3/scheduled_sends/model_mail_batch_id.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// MailBatchId struct for MailBatchId +type MailBatchId struct { + BatchId string `json:"batch_id"` +} diff --git a/rest/api/v3/scheduled_sends/model_scheduled_send_status.go b/rest/api/v3/scheduled_sends/model_scheduled_send_status.go new file mode 100644 index 00000000..d6fe3d8f --- /dev/null +++ b/rest/api/v3/scheduled_sends/model_scheduled_send_status.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ScheduledSendStatus struct for ScheduledSendStatus +type ScheduledSendStatus struct { + BatchId string `json:"batch_id"` + // The status of the scheduled send. + Status Status2 `json:"status"` +} diff --git a/rest/api/v3/scheduled_sends/model_status.go b/rest/api/v3/scheduled_sends/model_status.go new file mode 100644 index 00000000..d31bbe05 --- /dev/null +++ b/rest/api/v3/scheduled_sends/model_status.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status the model 'Status' +type Status string + +// List of Status +const ( + STATUS_PAUSE Status = "pause" + STATUS_CANCEL Status = "cancel" +) diff --git a/rest/api/v3/scheduled_sends/model_status1.go b/rest/api/v3/scheduled_sends/model_status1.go new file mode 100644 index 00000000..c43f388d --- /dev/null +++ b/rest/api/v3/scheduled_sends/model_status1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status1 the model 'Status1' +type Status1 string + +// List of Status1 +const ( + STATUS1_CANCEL Status1 = "cancel" + STATUS1_PAUSE Status1 = "pause" +) diff --git a/rest/api/v3/scheduled_sends/model_status2.go b/rest/api/v3/scheduled_sends/model_status2.go new file mode 100644 index 00000000..96ac6a91 --- /dev/null +++ b/rest/api/v3/scheduled_sends/model_status2.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Status2 the model 'Status2' +type Status2 string + +// List of Status2 +const ( + STATUS2_CANCEL Status2 = "cancel" + STATUS2_PAUSE Status2 = "pause" +) diff --git a/rest/api/v3/scheduled_sends/model_update_scheduled_send_request.go b/rest/api/v3/scheduled_sends/model_update_scheduled_send_request.go new file mode 100644 index 00000000..fb8b4ac2 --- /dev/null +++ b/rest/api/v3/scheduled_sends/model_update_scheduled_send_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scheduled Sends API +* The Twilio SendGrid Scheduled Sends API allows you to cancel or pause the send of one or more emails using a batch ID. A `batch_id` groups multiple scheduled mail send requests together with the same ID. You can cancel or pause all of the requests associated with a batch ID up to 10 minutes before the scheduled send time. See [**Canceling a Scheduled Send**](https://docs.sendgrid.com/for-developers/sending-email/stopping-a-scheduled-send) for a guide on creating a `batch_id`, assigning it to a scheduled send, and modifying the send. See the Mail API's batching operations to validate a `batch_id` and retrieve all scheduled sends as an array. When a batch is canceled, all messages associated with that batch will stay in your sending queue. When their `send_at` value is reached, they will be discarded. When a batch is paused, all messages associated with that batch will stay in your sending queue, even after their `send_at` value has passed. This means you can remove a pause status, and your scheduled send will be delivered once the pause is removed. Any messages left with a pause status that are more than 72 hours old will be discarded as Expired. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateScheduledSendRequest struct for UpdateScheduledSendRequest +type UpdateScheduledSendRequest struct { + // The status you would like the scheduled send to have. + Status Status1 `json:"status"` +} diff --git a/rest/api/v3/scopes/README.md b/rest/api/v3/scopes/README.md new file mode 100644 index 00000000..f7d951c0 --- /dev/null +++ b/rest/api/v3/scopes/README.md @@ -0,0 +1,71 @@ +# Go API client for + +The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:02.375456+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ApproveScopeRequest* | [**ApproveScopeRequest**](docs/ApproveScopeRequest.md#approvescoperequest) | **Patch** /v3/scopes/requests/{RequestId}/approve | Approve access request +*DenyScopeRequest* | [**DenyScopeRequest**](docs/DenyScopeRequest.md#denyscoperequest) | **Delete** /v3/scopes/requests/{RequestId} | Deny access request +*ListScope* | [**ListScope**](docs/ListScope.md#listscope) | **Get** /v3/scopes | Retrieve a list of scopes for which this user has access. +*ListScopeRequest* | [**ListScopeRequest**](docs/ListScopeRequest.md#listscoperequest) | **Get** /v3/scopes/requests | Retrieve access requests + + +## Documentation For Models + + - [ApproveScopeRequest200Response](ApproveScopeRequest200Response.md) + - [DenyScopeRequest404Response](DenyScopeRequest404Response.md) + - [DenyScopeRequest404ResponseErrorsInner](DenyScopeRequest404ResponseErrorsInner.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [ListScope200Response](ListScope200Response.md) + - [ListScope401Response](ListScope401Response.md) + - [ListScope401ResponseErrorsInner](ListScope401ResponseErrorsInner.md) + - [ListScopeRequest200ResponseInner](ListScopeRequest200ResponseInner.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/scopes/api_approve_scope_request.go b/rest/api/v3/scopes/api_approve_scope_request.go new file mode 100644 index 00000000..9c23ae58 --- /dev/null +++ b/rest/api/v3/scopes/api_approve_scope_request.go @@ -0,0 +1,77 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scopes API +* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type ApproveScopeRequestParam struct { + // The ID of the request that you want to approve. + RequestId *string `json:"request_id"` +} + +func (params *ApproveScopeRequestParam) SetRequestId(RequestId string) *ApproveScopeRequestParam { + params.RequestId = &RequestId + return params +} + +// **This endpoint allows you to approve an access attempt.** **Note:** Only teammate admins may approve another teammate’s access request. +func (c *ApiService) ApproveScopeRequest(params *ApproveScopeRequestParam) (interface{}, error) { + path := "/v3/scopes/requests/{RequestId}/approve" + if params != nil && params.RequestId != nil { + path = strings.Replace(path, "{"+"RequestId"+"}", *params.RequestId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ApproveScopeRequest200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &DenyScopeRequest404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/scopes/api_deny_scope_request.go b/rest/api/v3/scopes/api_deny_scope_request.go new file mode 100644 index 00000000..71ad46ff --- /dev/null +++ b/rest/api/v3/scopes/api_deny_scope_request.go @@ -0,0 +1,61 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scopes API +* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DenyScopeRequestParam struct { + // The ID of the request that you want to deny. + RequestId *string `json:"request_id"` +} + +func (params *DenyScopeRequestParam) SetRequestId(RequestId string) *DenyScopeRequestParam { + params.RequestId = &RequestId + return params +} + +// **This endpoint allows you to deny an attempt to access your account.** **Note:** Only teammate admins may delete a teammate's access request. +func (c *ApiService) DenyScopeRequest(params *DenyScopeRequestParam) (interface{}, error) { + path := "/v3/scopes/requests/{RequestId}" + if params != nil && params.RequestId != nil { + path = strings.Replace(path, "{"+"RequestId"+"}", *params.RequestId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 404 { + ps := &DenyScopeRequest404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/scopes/api_list_scope.go b/rest/api/v3/scopes/api_list_scope.go new file mode 100644 index 00000000..67384406 --- /dev/null +++ b/rest/api/v3/scopes/api_list_scope.go @@ -0,0 +1,91 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scopes API +* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListScopeParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListScopeParam) SetOnbehalfof(Onbehalfof string) *ListScopeParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint returns a list of all scopes that this user has access to.** API Keys are used to authenticate with [SendGrid's v3 API](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/authorization). API Keys may be assigned certain permissions, or scopes, that limit which API endpoints they are able to access. This endpoint returns all the scopes assigned to the key you use to authenticate with it. To retrieve the scopes assigned to another key, you can pass an API key ID to the \"Retrieve an existing API key\" endpoint. For a more detailed explanation of how you can use API Key permissions, please visit our [API Keys documentation](https://sendgrid.com/docs/ui/account-and-settings/api-keys/). +func (c *ApiService) ListScope(params *ListScopeParam) (interface{}, error) { + path := "/v3/scopes" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListScope200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ListScope401Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/scopes/api_list_scope_request.go b/rest/api/v3/scopes/api_list_scope_request.go new file mode 100644 index 00000000..9cf8ed7e --- /dev/null +++ b/rest/api/v3/scopes/api_list_scope_request.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scopes API +* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListScopeRequestParam struct { + // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. + Limit *int32 `json:"limit,omitempty"` + // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + Offset *int32 `json:"offset,omitempty"` +} + +func (params *ListScopeRequestParam) SetLimit(Limit int32) *ListScopeRequestParam { + params.Limit = &Limit + return params +} +func (params *ListScopeRequestParam) SetOffset(Offset int32) *ListScopeRequestParam { + params.Offset = &Offset + return params +} + +// **This endpoint allows you to retrieve a paginated list of all recent access requests.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. +func (c *ApiService) ListScopeRequest(params *ListScopeRequestParam) (interface{}, error) { + path := "/v3/scopes/requests" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListScopeRequest200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/scopes/api_service.go b/rest/api/v3/scopes/api_service.go new file mode 100644 index 00000000..bc846141 --- /dev/null +++ b/rest/api/v3/scopes/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scopes API +* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/scopes/docs/ApproveScopeRequest.md b/rest/api/v3/scopes/docs/ApproveScopeRequest.md new file mode 100644 index 00000000..2b701325 --- /dev/null +++ b/rest/api/v3/scopes/docs/ApproveScopeRequest.md @@ -0,0 +1,51 @@ +# ApproveScopeRequest + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ApproveScopeRequest**](ApproveScopeRequest.md#ApproveScopeRequest) | **Patch** /v3/scopes/requests/{RequestId}/approve | Approve access request + + + +## ApproveScopeRequest + +> ApproveScopeRequest200Response ApproveScopeRequest(ctx, RequestId) + +Approve access request + +**This endpoint allows you to approve an access attempt.** **Note:** Only teammate admins may approve another teammate’s access request. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RequestId** | **string** | The ID of the request that you want to approve. + +### Other Parameters + +Other parameters are passed through a pointer to a ApproveScopeRequestParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**ApproveScopeRequest200Response**](ApproveScopeRequest200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/scopes/docs/ApproveScopeRequest200Response.md b/rest/api/v3/scopes/docs/ApproveScopeRequest200Response.md new file mode 100644 index 00000000..99c4ce7e --- /dev/null +++ b/rest/api/v3/scopes/docs/ApproveScopeRequest200Response.md @@ -0,0 +1,11 @@ +# ApproveScopeRequest200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ScopeGroupName** | **string** | name of feature teammate will be given access to |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scopes/docs/DenyScopeRequest.md b/rest/api/v3/scopes/docs/DenyScopeRequest.md new file mode 100644 index 00000000..56947c47 --- /dev/null +++ b/rest/api/v3/scopes/docs/DenyScopeRequest.md @@ -0,0 +1,51 @@ +# DenyScopeRequest + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DenyScopeRequest**](DenyScopeRequest.md#DenyScopeRequest) | **Delete** /v3/scopes/requests/{RequestId} | Deny access request + + + +## DenyScopeRequest + +> DenyScopeRequest(ctx, RequestId) + +Deny access request + +**This endpoint allows you to deny an attempt to access your account.** **Note:** Only teammate admins may delete a teammate's access request. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**RequestId** | **string** | The ID of the request that you want to deny. + +### Other Parameters + +Other parameters are passed through a pointer to a DenyScopeRequestParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/scopes/docs/DenyScopeRequest404Response.md b/rest/api/v3/scopes/docs/DenyScopeRequest404Response.md new file mode 100644 index 00000000..4a41f9dd --- /dev/null +++ b/rest/api/v3/scopes/docs/DenyScopeRequest404Response.md @@ -0,0 +1,11 @@ +# DenyScopeRequest404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]DenyScopeRequest404ResponseErrorsInner**](DenyScopeRequest404ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scopes/docs/DenyScopeRequest404ResponseErrorsInner.md b/rest/api/v3/scopes/docs/DenyScopeRequest404ResponseErrorsInner.md new file mode 100644 index 00000000..6f6d4c6a --- /dev/null +++ b/rest/api/v3/scopes/docs/DenyScopeRequest404ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# DenyScopeRequest404ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | |[optional] +**Field** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scopes/docs/ErrorResponse.md b/rest/api/v3/scopes/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/scopes/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scopes/docs/ErrorResponseErrorsInner.md b/rest/api/v3/scopes/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/scopes/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scopes/docs/ListScope.md b/rest/api/v3/scopes/docs/ListScope.md new file mode 100644 index 00000000..01d7815e --- /dev/null +++ b/rest/api/v3/scopes/docs/ListScope.md @@ -0,0 +1,48 @@ +# ListScope + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListScope**](ListScope.md#ListScope) | **Get** /v3/scopes | Retrieve a list of scopes for which this user has access. + + + +## ListScope + +> ListScope200Response ListScope(ctx, optional) + +Retrieve a list of scopes for which this user has access. + +**This endpoint returns a list of all scopes that this user has access to.** API Keys are used to authenticate with [SendGrid's v3 API](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/authorization). API Keys may be assigned certain permissions, or scopes, that limit which API endpoints they are able to access. This endpoint returns all the scopes assigned to the key you use to authenticate with it. To retrieve the scopes assigned to another key, you can pass an API key ID to the \"Retrieve an existing API key\" endpoint. For a more detailed explanation of how you can use API Key permissions, please visit our [API Keys documentation](https://sendgrid.com/docs/ui/account-and-settings/api-keys/). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListScopeParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListScope200Response**](ListScope200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/scopes/docs/ListScope200Response.md b/rest/api/v3/scopes/docs/ListScope200Response.md new file mode 100644 index 00000000..d21786da --- /dev/null +++ b/rest/api/v3/scopes/docs/ListScope200Response.md @@ -0,0 +1,11 @@ +# ListScope200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Scopes** | **[]string** | The list of scopes for which this user has access. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scopes/docs/ListScope401Response.md b/rest/api/v3/scopes/docs/ListScope401Response.md new file mode 100644 index 00000000..0ee64c00 --- /dev/null +++ b/rest/api/v3/scopes/docs/ListScope401Response.md @@ -0,0 +1,11 @@ +# ListScope401Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ListScope401ResponseErrorsInner**](ListScope401ResponseErrorsInner.md) | This 401 response indicates that the user making the call doesn't have the authorization to view the list of scopes. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scopes/docs/ListScope401ResponseErrorsInner.md b/rest/api/v3/scopes/docs/ListScope401ResponseErrorsInner.md new file mode 100644 index 00000000..533dc68c --- /dev/null +++ b/rest/api/v3/scopes/docs/ListScope401ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# ListScope401ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | This empty field is returned instead of the list of scopes if the user making the call doesn't have the authorization required. |[optional] +**Message** | **string** | Explains why the scopes cannot be returned. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scopes/docs/ListScopeRequest.md b/rest/api/v3/scopes/docs/ListScopeRequest.md new file mode 100644 index 00000000..9af40e3c --- /dev/null +++ b/rest/api/v3/scopes/docs/ListScopeRequest.md @@ -0,0 +1,49 @@ +# ListScopeRequest + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListScopeRequest**](ListScopeRequest.md#ListScopeRequest) | **Get** /v3/scopes/requests | Retrieve access requests + + + +## ListScopeRequest + +> []ListScopeRequest200ResponseInner ListScopeRequest(ctx, optional) + +Retrieve access requests + +**This endpoint allows you to retrieve a paginated list of all recent access requests.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListScopeRequestParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. +**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + +### Return type + +[**[]ListScopeRequest200ResponseInner**](ListScopeRequest200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/scopes/docs/ListScopeRequest200ResponseInner.md b/rest/api/v3/scopes/docs/ListScopeRequest200ResponseInner.md new file mode 100644 index 00000000..10495fad --- /dev/null +++ b/rest/api/v3/scopes/docs/ListScopeRequest200ResponseInner.md @@ -0,0 +1,16 @@ +# ListScopeRequest200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | Request ID |[optional] +**ScopeGroupName** | **string** | Name of group of scopes associated to page teammate is requesting access to |[optional] +**Username** | **string** | Teammate's username |[optional] +**Email** | **string** | Teammate's email |[optional] +**FirstName** | **string** | Teammate's first name |[optional] +**LastName** | **string** | Teammate's last name |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/scopes/model_approve_scope_request_200_response.go b/rest/api/v3/scopes/model_approve_scope_request_200_response.go new file mode 100644 index 00000000..38fd571e --- /dev/null +++ b/rest/api/v3/scopes/model_approve_scope_request_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scopes API +* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ApproveScopeRequest200Response struct for ApproveScopeRequest200Response +type ApproveScopeRequest200Response struct { + // name of feature teammate will be given access to + ScopeGroupName *string `json:"scope_group_name,omitempty"` +} diff --git a/rest/api/v3/scopes/model_deny_scope_request_404_response.go b/rest/api/v3/scopes/model_deny_scope_request_404_response.go new file mode 100644 index 00000000..0117edee --- /dev/null +++ b/rest/api/v3/scopes/model_deny_scope_request_404_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scopes API +* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DenyScopeRequest404Response struct for DenyScopeRequest404Response +type DenyScopeRequest404Response struct { + Errors *[]DenyScopeRequest404ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/scopes/model_deny_scope_request_404_response_errors_inner.go b/rest/api/v3/scopes/model_deny_scope_request_404_response_errors_inner.go new file mode 100644 index 00000000..b2801e34 --- /dev/null +++ b/rest/api/v3/scopes/model_deny_scope_request_404_response_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scopes API +* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DenyScopeRequest404ResponseErrorsInner struct for DenyScopeRequest404ResponseErrorsInner +type DenyScopeRequest404ResponseErrorsInner struct { + Message *string `json:"message,omitempty"` + Field *string `json:"field,omitempty"` +} diff --git a/rest/api/v3/scopes/model_error_response.go b/rest/api/v3/scopes/model_error_response.go new file mode 100644 index 00000000..4adefcdf --- /dev/null +++ b/rest/api/v3/scopes/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scopes API +* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/scopes/model_error_response_errors_inner.go b/rest/api/v3/scopes/model_error_response_errors_inner.go new file mode 100644 index 00000000..de2012d0 --- /dev/null +++ b/rest/api/v3/scopes/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scopes API +* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/scopes/model_list_scope_200_response.go b/rest/api/v3/scopes/model_list_scope_200_response.go new file mode 100644 index 00000000..f9c8775e --- /dev/null +++ b/rest/api/v3/scopes/model_list_scope_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scopes API +* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListScope200Response struct for ListScope200Response +type ListScope200Response struct { + // The list of scopes for which this user has access. + Scopes []string `json:"scopes"` +} diff --git a/rest/api/v3/scopes/model_list_scope_401_response.go b/rest/api/v3/scopes/model_list_scope_401_response.go new file mode 100644 index 00000000..bb9109ba --- /dev/null +++ b/rest/api/v3/scopes/model_list_scope_401_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scopes API +* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListScope401Response struct for ListScope401Response +type ListScope401Response struct { + // This 401 response indicates that the user making the call doesn't have the authorization to view the list of scopes. + Errors []ListScope401ResponseErrorsInner `json:"errors"` +} diff --git a/rest/api/v3/scopes/model_list_scope_401_response_errors_inner.go b/rest/api/v3/scopes/model_list_scope_401_response_errors_inner.go new file mode 100644 index 00000000..82cec172 --- /dev/null +++ b/rest/api/v3/scopes/model_list_scope_401_response_errors_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scopes API +* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListScope401ResponseErrorsInner struct for ListScope401ResponseErrorsInner +type ListScope401ResponseErrorsInner struct { + // This empty field is returned instead of the list of scopes if the user making the call doesn't have the authorization required. + Field *string `json:"field,omitempty"` + // Explains why the scopes cannot be returned. + Message string `json:"message"` +} diff --git a/rest/api/v3/scopes/model_list_scope_request_200_response_inner.go b/rest/api/v3/scopes/model_list_scope_request_200_response_inner.go new file mode 100644 index 00000000..5392887d --- /dev/null +++ b/rest/api/v3/scopes/model_list_scope_request_200_response_inner.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Scopes API +* The Twilio SendGrid Scopes API allows you to retrieve the scopes or permissions available to a user, see the user's attempts to access your SendGrid account, and, if necessary, deny an access request. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListScopeRequest200ResponseInner struct for ListScopeRequest200ResponseInner +type ListScopeRequest200ResponseInner struct { + // Request ID + Id *int32 `json:"id,omitempty"` + // Name of group of scopes associated to page teammate is requesting access to + ScopeGroupName *string `json:"scope_group_name,omitempty"` + // Teammate's username + Username *string `json:"username,omitempty"` + // Teammate's email + Email *string `json:"email,omitempty"` + // Teammate's first name + FirstName *string `json:"first_name,omitempty"` + // Teammate's last name + LastName *string `json:"last_name,omitempty"` +} diff --git a/rest/api/v3/seq/README.md b/rest/api/v3/seq/README.md new file mode 100644 index 00000000..0f4e4cb4 --- /dev/null +++ b/rest/api/v3/seq/README.md @@ -0,0 +1,71 @@ +# Go API client for + +The SendGrid Engagement Quality (SEQ) API allows you to retrieve metrics that define the quality of your email program. + +An SEQ score is correlated with: +- The quality of the data in a sender’s program. +- How “wanted” the sender's email is by their recipients. + +Because “wanted” email and deliverability are closely related, a higher SEQ metric is correlated with greater deliverability. This means the higher your SEQ score, the more likely you are to land in your recipients' inboxes. See the SEQ Overview page to understand SEQ, how it's calculated, and how you can address your score. The SEQ endpoints allow you to retrieve your scores and scores for your Subusers. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:02.378456+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ListEngagementQualityScore* | [**ListEngagementQualityScore**](docs/ListEngagementQualityScore.md#listengagementqualityscore) | **Get** /v3/engagementquality/scores | Get Engagement Quality Scores +*ListSubuserEngagementQualityScore* | [**ListSubuserEngagementQualityScore**](docs/ListSubuserEngagementQualityScore.md#listsubuserengagementqualityscore) | **Get** /v3/engagementquality/subusers/scores | Get Subusers' Engagement Quality Scores + + +## Documentation For Models + + - [SeqError](SeqError.md) + - [SeqMetadata](SeqMetadata.md) + - [SeqMetadataNextParams](SeqMetadataNextParams.md) + - [SeqMetrics](SeqMetrics.md) + - [SeqScore](SeqScore.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/seq/api_list_engagement_quality_score.go b/rest/api/v3/seq/api_list_engagement_quality_score.go new file mode 100644 index 00000000..878812db --- /dev/null +++ b/rest/api/v3/seq/api_list_engagement_quality_score.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Engagement Quality API +* The SendGrid Engagement Quality (SEQ) API allows you to retrieve metrics that define the quality of your email program. An SEQ score is correlated with: - The quality of the data in a sender’s program. - How “wanted” the sender's email is by their recipients. Because “wanted” email and deliverability are closely related, a higher SEQ metric is correlated with greater deliverability. This means the higher your SEQ score, the more likely you are to land in your recipients' inboxes. See the SEQ Overview page to understand SEQ, how it's calculated, and how you can address your score. The SEQ endpoints allow you to retrieve your scores and scores for your Subusers. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "fmt" + "net/http" + "net/url" +) + +type ListEngagementQualityScoreParam struct { + // The starting date in YYYY-MM-DD format (UTC) for which you want to retrieve scores. + From *string `json:"from"` + // The ending date in YYYY-MM-DD format (UTC) for which you want to retrieve scores. + To *string `json:"to"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListEngagementQualityScoreParam) SetFrom(From string) *ListEngagementQualityScoreParam { + params.From = &From + return params +} +func (params *ListEngagementQualityScoreParam) SetTo(To string) *ListEngagementQualityScoreParam { + params.To = &To + return params +} +func (params *ListEngagementQualityScoreParam) SetOnbehalfof(Onbehalfof string) *ListEngagementQualityScoreParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This operation allows you to retrieve your SendGrid Engagement Quality (SEQ) scores for a specified date range**. A successful request with this API operation will return either a `200` or `202` response. ### 202 This operation returns a `202` response when SendGrid does not yet have scores available for the specified date range. Scores are calculated asynchronously from requests to this endpoint. This means a score may be available for the specified date at a later time, but a score is not available at the time of your API request. ### 200 A 200 response will include all available scores beginning on the `from` and ending on the `to` dates specified. The `score` and `metrics` properties will be omitted from the response for any days in which the user is not eligible to receive a score. The `score` property represents a user's overall engagement quality. The `metrics` property provides additional scores for the input categories that contribute to that overall score. All scores range from `1` to `5` with a higher number representing better engagement quality. See [**SendGrid Engagement Quality Overview**](https://docs.sendgrid.com/api-reference/sendgrid-engagement-quality-api/overview) for more information +func (c *ApiService) ListEngagementQualityScore(params *ListEngagementQualityScoreParam) (interface{}, error) { + path := "/v3/engagementquality/scores" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.From != nil { + data.Set("from", fmt.Sprint(*params.From)) + } + if params != nil && params.To != nil { + data.Set("to", fmt.Sprint(*params.To)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/seq/api_list_subuser_engagement_quality_score.go b/rest/api/v3/seq/api_list_subuser_engagement_quality_score.go new file mode 100644 index 00000000..8176b507 --- /dev/null +++ b/rest/api/v3/seq/api_list_subuser_engagement_quality_score.go @@ -0,0 +1,79 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Engagement Quality API +* The SendGrid Engagement Quality (SEQ) API allows you to retrieve metrics that define the quality of your email program. An SEQ score is correlated with: - The quality of the data in a sender’s program. - How “wanted” the sender's email is by their recipients. Because “wanted” email and deliverability are closely related, a higher SEQ metric is correlated with greater deliverability. This means the higher your SEQ score, the more likely you are to land in your recipients' inboxes. See the SEQ Overview page to understand SEQ, how it's calculated, and how you can address your score. The SEQ endpoints allow you to retrieve your scores and scores for your Subusers. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "fmt" + "net/http" + "net/url" +) + +type ListSubuserEngagementQualityScoreParam struct { + // The date in YYYY-MM-DD format (UTC) for which you want to retrieve a SendGrid Engagement Quality score. + Date *string `json:"date"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // Specifies the number of results to be returned by the API. This parameter can be used to limit the results returned or in combination with the `after_key` parameter to iterate through paginated results. + Limit *int32 `json:"limit,omitempty"` + // Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. + AfterKey *int32 `json:"after_key,omitempty"` +} + +func (params *ListSubuserEngagementQualityScoreParam) SetDate(Date string) *ListSubuserEngagementQualityScoreParam { + params.Date = &Date + return params +} +func (params *ListSubuserEngagementQualityScoreParam) SetOnbehalfof(Onbehalfof string) *ListSubuserEngagementQualityScoreParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *ListSubuserEngagementQualityScoreParam) SetLimit(Limit int32) *ListSubuserEngagementQualityScoreParam { + params.Limit = &Limit + return params +} +func (params *ListSubuserEngagementQualityScoreParam) SetAfterKey(AfterKey int32) *ListSubuserEngagementQualityScoreParam { + params.AfterKey = &AfterKey + return params +} + +// **This operation allows you to retrieve SendGrid Engagement Quality (SEQ) scores for your Subusers or customer accounts for a specific date.** A successful request with this API operation will return either a `200` or `202` response. ### 202 This operation returns a `202` response when SendGrid does not yet have scores available for the specified date range. Scores are calculated asynchronously from requests to this endpoint. This means a score may be available for the specified date at a later time, but a score is not available at the time of your API request. ### 200 A `200` response will include scores for all Subusers or customer accounts belonging to the requesting parent or reseller account. The `score` and `metrics` properties will be omitted from the response if a Subuser or customer account is not eligible to receive a score for the specified date. The `score` property represents a Subuser or customer account's overall engagement quality. The `metrics` property provides additional scores for the input categories that contribute to that overall score. All scores range from `1` to `5` with a higher number representing better engagement quality. See [**SendGrid Engagement Quality Overview**](https://docs.sendgrid.com/api-reference/sendgrid-engagement-quality-api/overview) for more information +func (c *ApiService) ListSubuserEngagementQualityScore(params *ListSubuserEngagementQualityScoreParam) (interface{}, error) { + path := "/v3/engagementquality/subusers/scores" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Date != nil { + data.Set("date", fmt.Sprint(*params.Date)) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.AfterKey != nil { + data.Set("after_key", fmt.Sprint(*params.AfterKey)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/seq/api_service.go b/rest/api/v3/seq/api_service.go new file mode 100644 index 00000000..5a7df229 --- /dev/null +++ b/rest/api/v3/seq/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Engagement Quality API +* The SendGrid Engagement Quality (SEQ) API allows you to retrieve metrics that define the quality of your email program. An SEQ score is correlated with: - The quality of the data in a sender’s program. - How “wanted” the sender's email is by their recipients. Because “wanted” email and deliverability are closely related, a higher SEQ metric is correlated with greater deliverability. This means the higher your SEQ score, the more likely you are to land in your recipients' inboxes. See the SEQ Overview page to understand SEQ, how it's calculated, and how you can address your score. The SEQ endpoints allow you to retrieve your scores and scores for your Subusers. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/seq/docs/ListEngagementQualityScore.md b/rest/api/v3/seq/docs/ListEngagementQualityScore.md new file mode 100644 index 00000000..468dac7f --- /dev/null +++ b/rest/api/v3/seq/docs/ListEngagementQualityScore.md @@ -0,0 +1,48 @@ +# ListEngagementQualityScore + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListEngagementQualityScore**](ListEngagementQualityScore.md#ListEngagementQualityScore) | **Get** /v3/engagementquality/scores | Get Engagement Quality Scores + + + +## ListEngagementQualityScore + +> interface{} ListEngagementQualityScore(ctx, FromTooptional) + +Get Engagement Quality Scores + +**This operation allows you to retrieve your SendGrid Engagement Quality (SEQ) scores for a specified date range**. A successful request with this API operation will return either a `200` or `202` response. ### 202 This operation returns a `202` response when SendGrid does not yet have scores available for the specified date range. Scores are calculated asynchronously from requests to this endpoint. This means a score may be available for the specified date at a later time, but a score is not available at the time of your API request. ### 200 A 200 response will include all available scores beginning on the `from` and ending on the `to` dates specified. The `score` and `metrics` properties will be omitted from the response for any days in which the user is not eligible to receive a score. The `score` property represents a user's overall engagement quality. The `metrics` property provides additional scores for the input categories that contribute to that overall score. All scores range from `1` to `5` with a higher number representing better engagement quality. See [**SendGrid Engagement Quality Overview**](https://docs.sendgrid.com/api-reference/sendgrid-engagement-quality-api/overview) for more information + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListEngagementQualityScoreParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/seq/docs/ListSubuserEngagementQualityScore.md b/rest/api/v3/seq/docs/ListSubuserEngagementQualityScore.md new file mode 100644 index 00000000..7f22b452 --- /dev/null +++ b/rest/api/v3/seq/docs/ListSubuserEngagementQualityScore.md @@ -0,0 +1,50 @@ +# ListSubuserEngagementQualityScore + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSubuserEngagementQualityScore**](ListSubuserEngagementQualityScore.md#ListSubuserEngagementQualityScore) | **Get** /v3/engagementquality/subusers/scores | Get Subusers' Engagement Quality Scores + + + +## ListSubuserEngagementQualityScore + +> interface{} ListSubuserEngagementQualityScore(ctx, Dateoptional) + +Get Subusers' Engagement Quality Scores + +**This operation allows you to retrieve SendGrid Engagement Quality (SEQ) scores for your Subusers or customer accounts for a specific date.** A successful request with this API operation will return either a `200` or `202` response. ### 202 This operation returns a `202` response when SendGrid does not yet have scores available for the specified date range. Scores are calculated asynchronously from requests to this endpoint. This means a score may be available for the specified date at a later time, but a score is not available at the time of your API request. ### 200 A `200` response will include scores for all Subusers or customer accounts belonging to the requesting parent or reseller account. The `score` and `metrics` properties will be omitted from the response if a Subuser or customer account is not eligible to receive a score for the specified date. The `score` property represents a Subuser or customer account's overall engagement quality. The `metrics` property provides additional scores for the input categories that contribute to that overall score. All scores range from `1` to `5` with a higher number representing better engagement quality. See [**SendGrid Engagement Quality Overview**](https://docs.sendgrid.com/api-reference/sendgrid-engagement-quality-api/overview) for more information + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSubuserEngagementQualityScoreParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**Limit** | **int32** | Specifies the number of results to be returned by the API. This parameter can be used to limit the results returned or in combination with the `after_key` parameter to iterate through paginated results. +**AfterKey** | **int32** | Specifies which items to be returned by the API. When the `after_key` is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with `limit` to iterate through paginated results. + +### Return type + +**interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/seq/docs/SeqError.md b/rest/api/v3/seq/docs/SeqError.md new file mode 100644 index 00000000..a36145cf --- /dev/null +++ b/rest/api/v3/seq/docs/SeqError.md @@ -0,0 +1,12 @@ +# SeqError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Message** | **string** | An error message. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/seq/docs/SeqMetadata.md b/rest/api/v3/seq/docs/SeqMetadata.md new file mode 100644 index 00000000..f13d51d3 --- /dev/null +++ b/rest/api/v3/seq/docs/SeqMetadata.md @@ -0,0 +1,11 @@ +# SeqMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NextParams** | [**SeqMetadataNextParams**](SeqMetadataNextParams.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/seq/docs/SeqMetadataNextParams.md b/rest/api/v3/seq/docs/SeqMetadataNextParams.md new file mode 100644 index 00000000..a361a0e5 --- /dev/null +++ b/rest/api/v3/seq/docs/SeqMetadataNextParams.md @@ -0,0 +1,11 @@ +# SeqMetadataNextParams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AfterKey** | **string** | The `after_key` property represents the last processed key. If the `after_key` property is `null`, there are no more entries available. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/seq/docs/SeqMetrics.md b/rest/api/v3/seq/docs/SeqMetrics.md new file mode 100644 index 00000000..13404179 --- /dev/null +++ b/rest/api/v3/seq/docs/SeqMetrics.md @@ -0,0 +1,15 @@ +# SeqMetrics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EngagementRecency** | **float32** | Indicates whether or not you are sending to an engaged audience. Engagement recency is determined by factors such as how regularly your messages are being opened and clicked. Your score will range from `1` to `5` with a higher score representing better engagement quality. | +**OpenRate** | **float32** | Indicates the degree to which your audience is opening your messages. Your score will range from `1` to `5` with a higher score representing a better open rate and better engagement quality. | +**BounceClassification** | **float32** | Indicates the degree to which mailbox providers are rejecting your mail due to reputation issues or content that looks like spam. Your score is calculated based on a ratio of these specific types of bounces to your total processed email. Your score will range from `1` to `5` with a higher score representing a lower percentage of bounces and better engagement quality. | +**BounceRate** | **float32** | Indicates if you are attempting to send too many messages to addresses that don't exist. This score is determined by calculating your permanent bounces (bounces to invalid mailboxes). Your score will range from `1` to `5` with a higher score representing fewer bounces and better engagement quality. | +**SpamRate** | **float32** | Indicates if your messages are generating excessive spam complaints from recipients. This score is determined by calculating the number of recipients who open your mail and then mark it as spam. Your score will range from `1` to `5` with a higher score representing fewer spam reports and better engagement quality. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/seq/docs/SeqScore.md b/rest/api/v3/seq/docs/SeqScore.md new file mode 100644 index 00000000..84b13574 --- /dev/null +++ b/rest/api/v3/seq/docs/SeqScore.md @@ -0,0 +1,15 @@ +# SeqScore + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**UserId** | **string** | The user identifier associated with this score. | +**Username** | **string** | The username associated with this score. |[optional] +**Date** | **string** | The date (UTC) for which this score was calculated. |[optional] +**Score** | **float32** | Your SendGrid Engagement Quality Score. The `score` property will be omitted when a score is unknown. A score may be unknown if you have not turned on [open tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking) and/or your account or Subuser has not sent at least 1,000 messages during the previous 30 days. |[optional] +**Metrics** | [**SeqMetrics**](SeqMetrics.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/seq/model_seq_error.go b/rest/api/v3/seq/model_seq_error.go new file mode 100644 index 00000000..1494de42 --- /dev/null +++ b/rest/api/v3/seq/model_seq_error.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Engagement Quality API +* The SendGrid Engagement Quality (SEQ) API allows you to retrieve metrics that define the quality of your email program. An SEQ score is correlated with: - The quality of the data in a sender’s program. - How “wanted” the sender's email is by their recipients. Because “wanted” email and deliverability are closely related, a higher SEQ metric is correlated with greater deliverability. This means the higher your SEQ score, the more likely you are to land in your recipients' inboxes. See the SEQ Overview page to understand SEQ, how it's calculated, and how you can address your score. The SEQ endpoints allow you to retrieve your scores and scores for your Subusers. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SeqError This object contains error details +type SeqError struct { + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // An error message. + Message string `json:"message"` +} diff --git a/rest/api/v3/seq/model_seq_metadata.go b/rest/api/v3/seq/model_seq_metadata.go new file mode 100644 index 00000000..91510ac6 --- /dev/null +++ b/rest/api/v3/seq/model_seq_metadata.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Engagement Quality API +* The SendGrid Engagement Quality (SEQ) API allows you to retrieve metrics that define the quality of your email program. An SEQ score is correlated with: - The quality of the data in a sender’s program. - How “wanted” the sender's email is by their recipients. Because “wanted” email and deliverability are closely related, a higher SEQ metric is correlated with greater deliverability. This means the higher your SEQ score, the more likely you are to land in your recipients' inboxes. See the SEQ Overview page to understand SEQ, how it's calculated, and how you can address your score. The SEQ endpoints allow you to retrieve your scores and scores for your Subusers. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SeqMetadata This object contains response metadata. The presence of the `after_key` property in the metadata indicates that some items are still outstanding and have not been retrieved. You can use the `after_key` value to retrieve additional items with another request. +type SeqMetadata struct { + NextParams *SeqMetadataNextParams `json:"next_params,omitempty"` +} diff --git a/rest/api/v3/seq/model_seq_metadata_next_params.go b/rest/api/v3/seq/model_seq_metadata_next_params.go new file mode 100644 index 00000000..0016951c --- /dev/null +++ b/rest/api/v3/seq/model_seq_metadata_next_params.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Engagement Quality API +* The SendGrid Engagement Quality (SEQ) API allows you to retrieve metrics that define the quality of your email program. An SEQ score is correlated with: - The quality of the data in a sender’s program. - How “wanted” the sender's email is by their recipients. Because “wanted” email and deliverability are closely related, a higher SEQ metric is correlated with greater deliverability. This means the higher your SEQ score, the more likely you are to land in your recipients' inboxes. See the SEQ Overview page to understand SEQ, how it's calculated, and how you can address your score. The SEQ endpoints allow you to retrieve your scores and scores for your Subusers. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SeqMetadataNextParams struct for SeqMetadataNextParams +type SeqMetadataNextParams struct { + // The `after_key` property represents the last processed key. If the `after_key` property is `null`, there are no more entries available. + AfterKey *string `json:"after_key,omitempty"` +} diff --git a/rest/api/v3/seq/model_seq_metrics.go b/rest/api/v3/seq/model_seq_metrics.go new file mode 100644 index 00000000..21ef4bb5 --- /dev/null +++ b/rest/api/v3/seq/model_seq_metrics.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Engagement Quality API +* The SendGrid Engagement Quality (SEQ) API allows you to retrieve metrics that define the quality of your email program. An SEQ score is correlated with: - The quality of the data in a sender’s program. - How “wanted” the sender's email is by their recipients. Because “wanted” email and deliverability are closely related, a higher SEQ metric is correlated with greater deliverability. This means the higher your SEQ score, the more likely you are to land in your recipients' inboxes. See the SEQ Overview page to understand SEQ, how it's calculated, and how you can address your score. The SEQ endpoints allow you to retrieve your scores and scores for your Subusers. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SeqMetrics A collection of metrics representing your engagement score across multiple indicators such as your open rate, spam rate, and bounce rate. Each metric is assigned a score from `1` to `5` with a higher score representing better engagement quality for that particular metric. The `metrics` property will be omitted when a score is unknown. A score may be unknown if you have not turned on [open tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking) and/or your account or Subuser has not sent at least 1,000 messages during the previous 30 days. +type SeqMetrics struct { + // Indicates whether or not you are sending to an engaged audience. Engagement recency is determined by factors such as how regularly your messages are being opened and clicked. Your score will range from `1` to `5` with a higher score representing better engagement quality. + EngagementRecency float32 `json:"engagement_recency"` + // Indicates the degree to which your audience is opening your messages. Your score will range from `1` to `5` with a higher score representing a better open rate and better engagement quality. + OpenRate float32 `json:"open_rate"` + // Indicates the degree to which mailbox providers are rejecting your mail due to reputation issues or content that looks like spam. Your score is calculated based on a ratio of these specific types of bounces to your total processed email. Your score will range from `1` to `5` with a higher score representing a lower percentage of bounces and better engagement quality. + BounceClassification float32 `json:"bounce_classification"` + // Indicates if you are attempting to send too many messages to addresses that don't exist. This score is determined by calculating your permanent bounces (bounces to invalid mailboxes). Your score will range from `1` to `5` with a higher score representing fewer bounces and better engagement quality. + BounceRate float32 `json:"bounce_rate"` + // Indicates if your messages are generating excessive spam complaints from recipients. This score is determined by calculating the number of recipients who open your mail and then mark it as spam. Your score will range from `1` to `5` with a higher score representing fewer spam reports and better engagement quality. + SpamRate float32 `json:"spam_rate"` +} diff --git a/rest/api/v3/seq/model_seq_score.go b/rest/api/v3/seq/model_seq_score.go new file mode 100644 index 00000000..04818407 --- /dev/null +++ b/rest/api/v3/seq/model_seq_score.go @@ -0,0 +1,27 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Engagement Quality API +* The SendGrid Engagement Quality (SEQ) API allows you to retrieve metrics that define the quality of your email program. An SEQ score is correlated with: - The quality of the data in a sender’s program. - How “wanted” the sender's email is by their recipients. Because “wanted” email and deliverability are closely related, a higher SEQ metric is correlated with greater deliverability. This means the higher your SEQ score, the more likely you are to land in your recipients' inboxes. See the SEQ Overview page to understand SEQ, how it's calculated, and how you can address your score. The SEQ endpoints allow you to retrieve your scores and scores for your Subusers. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SeqScore A user's SendGrid Engagement Quality (SEQ) score for a specified date. Your SEQ score is determined by measuring several key metrics including your open rate, spam rate, and engagement recency. Your overall score allows you to quickly assess how your email program is performing at a high level. You will receive a score from `1` to `5` with a higher number representing better engagement quality. See the `metrics` property to understand how your program is performing across the input categories that determine your overall score. +type SeqScore struct { + // The user identifier associated with this score. + UserId string `json:"user_id"` + // The username associated with this score. + Username *string `json:"username,omitempty"` + // The date (UTC) for which this score was calculated. + Date *string `json:"date,omitempty"` + // Your SendGrid Engagement Quality Score. The `score` property will be omitted when a score is unknown. A score may be unknown if you have not turned on [open tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking) and/or your account or Subuser has not sent at least 1,000 messages during the previous 30 days. + Score *float32 `json:"score,omitempty"` + Metrics *SeqMetrics `json:"metrics,omitempty"` +} diff --git a/rest/api/v3/sso/README.md b/rest/api/v3/sso/README.md new file mode 100644 index 00000000..f754ac08 --- /dev/null +++ b/rest/api/v3/sso/README.md @@ -0,0 +1,94 @@ +# Go API client for + +The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). + +The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. + +The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. + +The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:02.408909+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateSsoCertificate* | [**CreateSsoCertificate**](docs/CreateSsoCertificate.md#createssocertificate) | **Post** /v3/sso/certificates | Create an SSO Certificate +*CreateSsoIntegration* | [**CreateSsoIntegration**](docs/CreateSsoIntegration.md#createssointegration) | **Post** /v3/sso/integrations | Create an SSO Integration +*CreateSsoTeammate* | [**CreateSsoTeammate**](docs/CreateSsoTeammate.md#createssoteammate) | **Post** /v3/sso/teammates | Create an SSO Teammate. +*DeleteSsoCertificate* | [**DeleteSsoCertificate**](docs/DeleteSsoCertificate.md#deletessocertificate) | **Delete** /v3/sso/certificates/{CertId} | Delete an SSO Certificate +*DeleteSsoIntegration* | [**DeleteSsoIntegration**](docs/DeleteSsoIntegration.md#deletessointegration) | **Delete** /v3/sso/integrations/{Id} | Delete an SSO Integration +*GetSsoCertificate* | [**GetSsoCertificate**](docs/GetSsoCertificate.md#getssocertificate) | **Get** /v3/sso/certificates/{CertId} | Get an SSO Certificate +*GetSsoIntegration* | [**GetSsoIntegration**](docs/GetSsoIntegration.md#getssointegration) | **Get** /v3/sso/integrations/{Id} | Get an SSO Integration +*ListSsoIntegration* | [**ListSsoIntegration**](docs/ListSsoIntegration.md#listssointegration) | **Get** /v3/sso/integrations | Get All SSO Integrations +*ListSsoIntegrationCertificate* | [**ListSsoIntegrationCertificate**](docs/ListSsoIntegrationCertificate.md#listssointegrationcertificate) | **Get** /v3/sso/integrations/{IntegrationId}/certificates | Get All SSO Certificates by Integration +*UpdateSsoCertificate* | [**UpdateSsoCertificate**](docs/UpdateSsoCertificate.md#updatessocertificate) | **Patch** /v3/sso/certificates/{CertId} | Update SSO Certificate +*UpdateSsoIntegration* | [**UpdateSsoIntegration**](docs/UpdateSsoIntegration.md#updatessointegration) | **Patch** /v3/sso/integrations/{Id} | Update an SSO Integration +*UpdateSsoTeammate* | [**UpdateSsoTeammate**](docs/UpdateSsoTeammate.md#updatessoteammate) | **Patch** /v3/sso/teammates/{Username} | Edit an SSO Teammate + + +## Documentation For Models + + - [CreateSsoCertificateRequest](CreateSsoCertificateRequest.md) + - [PatchSsoTeammates200](PatchSsoTeammates200.md) + - [PermissionType](PermissionType.md) + - [PermissionType1](PermissionType1.md) + - [Persona](Persona.md) + - [PostPatchIntegrationRequest](PostPatchIntegrationRequest.md) + - [PostSsoTeammates201](PostSsoTeammates201.md) + - [PostSsoTeammatesRequest](PostSsoTeammatesRequest.md) + - [SsoCertificateBody](SsoCertificateBody.md) + - [SsoErrorResponseInner](SsoErrorResponseInner.md) + - [SsoIntegration](SsoIntegration.md) + - [SsoTeammatesBaseRequestProps](SsoTeammatesBaseRequestProps.md) + - [SsoTeammatesBaseRequestPropsSubuserAccessInner](SsoTeammatesBaseRequestPropsSubuserAccessInner.md) + - [SsoTeammatesBaseResponseProps](SsoTeammatesBaseResponseProps.md) + - [SsoTeammatesRestrictedSubuserResponseProps](SsoTeammatesRestrictedSubuserResponseProps.md) + - [SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner](SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md) + - [UpdateSsoCertificateRequest](UpdateSsoCertificateRequest.md) + - [UserType](UserType.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/sso/api_create_sso_certificate.go b/rest/api/v3/sso/api_create_sso_certificate.go new file mode 100644 index 00000000..93f844de --- /dev/null +++ b/rest/api/v3/sso/api_create_sso_certificate.go @@ -0,0 +1,105 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateSsoCertificateParam struct { + // + CreateSsoCertificateRequest *CreateSsoCertificateRequest `json:"CreateSsoCertificateRequest,omitempty"` +} + +func (params *CreateSsoCertificateParam) SetCreateSsoCertificateRequest(CreateSsoCertificateRequest CreateSsoCertificateRequest) *CreateSsoCertificateParam { + params.CreateSsoCertificateRequest = &CreateSsoCertificateRequest + return params +} + +// **This endpoint allows you to create an SSO certificate.** +func (c *ApiService) CreateSsoCertificate(params *CreateSsoCertificateParam) (interface{}, error) { + path := "/v3/sso/certificates" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateSsoCertificateRequest != nil { + b, err := json.Marshal(*params.CreateSsoCertificateRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SsoCertificateBody{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/sso/api_create_sso_integration.go b/rest/api/v3/sso/api_create_sso_integration.go new file mode 100644 index 00000000..8544aa17 --- /dev/null +++ b/rest/api/v3/sso/api_create_sso_integration.go @@ -0,0 +1,105 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateSsoIntegrationParam struct { + // + PostPatchIntegrationRequest *PostPatchIntegrationRequest `json:"PostPatchIntegrationRequest,omitempty"` +} + +func (params *CreateSsoIntegrationParam) SetPostPatchIntegrationRequest(PostPatchIntegrationRequest PostPatchIntegrationRequest) *CreateSsoIntegrationParam { + params.PostPatchIntegrationRequest = &PostPatchIntegrationRequest + return params +} + +// **This endpoint allows you to create an SSO integration.** +func (c *ApiService) CreateSsoIntegration(params *CreateSsoIntegrationParam) (interface{}, error) { + path := "/v3/sso/integrations" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.PostPatchIntegrationRequest != nil { + b, err := json.Marshal(*params.PostPatchIntegrationRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SsoIntegration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/sso/api_create_sso_teammate.go b/rest/api/v3/sso/api_create_sso_teammate.go new file mode 100644 index 00000000..ae49f75c --- /dev/null +++ b/rest/api/v3/sso/api_create_sso_teammate.go @@ -0,0 +1,105 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateSsoTeammateParam struct { + // + PostSsoTeammatesRequest *PostSsoTeammatesRequest `json:"PostSsoTeammatesRequest,omitempty"` +} + +func (params *CreateSsoTeammateParam) SetPostSsoTeammatesRequest(PostSsoTeammatesRequest PostSsoTeammatesRequest) *CreateSsoTeammateParam { + params.PostSsoTeammatesRequest = &PostSsoTeammatesRequest + return params +} + +// **This endpoint allows you to create an SSO Teammate.** The email address provided for the Teammate will also function as the Teammate's username. Once created, the Teammate's email address cannot be changed. ### Scopes When creating a Teammate, you will assign it permissions or scopes. These scopes determine which actions the Teammate can perform and which features they can access. Scopes are provided with one of three properties passed to this endpoint: `is_admin`, `scopes`, and `persona`. You can make a Teammate an administrator by setting `is_admin` to `true`. Administrators will have all scopes assigned to them. Alternatively, you can assign a `persona` to the teammate, which will assign them a block of permissions commonly required for that type of user. See the \"Persona scopes\" section of [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions#persona-scopes) for a list of permsissions granted by persona. Lastly, you can assign individual permissions with the `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of scopes that can be assigned to a Teammate. ### Subuser access SendGrid Teammates may be assigned access to one or more Subusers. Subusers function like SendGrid sub-accounts with their own resources. See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. When assigning Subuser access to a Teammate, you may set the `has_restricted_subuser_access` property to `true` to constrain the Teammate so that they can operate only on behalf of the Subusers to which they are assigned. You may further set the level of access the Teammate has to each Subuser with the `subuser_access` property. +func (c *ApiService) CreateSsoTeammate(params *CreateSsoTeammateParam) (interface{}, error) { + path := "/v3/sso/teammates" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.PostSsoTeammatesRequest != nil { + b, err := json.Marshal(*params.PostSsoTeammatesRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &PostSsoTeammates201{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/sso/api_delete_sso_certificate.go b/rest/api/v3/sso/api_delete_sso_certificate.go new file mode 100644 index 00000000..d47bc8a3 --- /dev/null +++ b/rest/api/v3/sso/api_delete_sso_certificate.go @@ -0,0 +1,101 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteSsoCertificateParam struct { + // + CertId *string `json:"cert_id"` +} + +func (params *DeleteSsoCertificateParam) SetCertId(CertId string) *DeleteSsoCertificateParam { + params.CertId = &CertId + return params +} + +// **This endpoint allows you to delete an SSO certificate.** You can retrieve a certificate's ID from the response provided by the \"Get All SSO Integrations\" endpoint. +func (c *ApiService) DeleteSsoCertificate(params *DeleteSsoCertificateParam) (interface{}, error) { + path := "/v3/sso/certificates/{CertId}" + if params != nil && params.CertId != nil { + path = strings.Replace(path, "{"+"CertId"+"}", *params.CertId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SsoCertificateBody{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/sso/api_delete_sso_integration.go b/rest/api/v3/sso/api_delete_sso_integration.go new file mode 100644 index 00000000..5ecefab4 --- /dev/null +++ b/rest/api/v3/sso/api_delete_sso_integration.go @@ -0,0 +1,93 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteSsoIntegrationParam struct { + // + Id *string `json:"id"` +} + +func (params *DeleteSsoIntegrationParam) SetId(Id string) *DeleteSsoIntegrationParam { + params.Id = &Id + return params +} + +// **This endpoint allows you to delete an IdP configuration by ID.** You can retrieve the IDs for your configurations from the response provided by the \"Get All SSO Integrations\" endpoint. +func (c *ApiService) DeleteSsoIntegration(params *DeleteSsoIntegrationParam) (interface{}, error) { + path := "/v3/sso/integrations/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 400 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/sso/api_get_sso_certificate.go b/rest/api/v3/sso/api_get_sso_certificate.go new file mode 100644 index 00000000..cc1c9ee0 --- /dev/null +++ b/rest/api/v3/sso/api_get_sso_certificate.go @@ -0,0 +1,101 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetSsoCertificateParam struct { + // + CertId *string `json:"cert_id"` +} + +func (params *GetSsoCertificateParam) SetCertId(CertId string) *GetSsoCertificateParam { + params.CertId = &CertId + return params +} + +// **This endpoint allows you to retrieve an individual SSO certificate.** +func (c *ApiService) GetSsoCertificate(params *GetSsoCertificateParam) (interface{}, error) { + path := "/v3/sso/certificates/{CertId}" + if params != nil && params.CertId != nil { + path = strings.Replace(path, "{"+"CertId"+"}", *params.CertId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SsoCertificateBody{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/sso/api_get_sso_integration.go b/rest/api/v3/sso/api_get_sso_integration.go new file mode 100644 index 00000000..69b10522 --- /dev/null +++ b/rest/api/v3/sso/api_get_sso_integration.go @@ -0,0 +1,112 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type GetSsoIntegrationParam struct { + // + Id *string `json:"id"` + // If this parameter is set to `true`, the response will include the `completed_integration` field. + Si *bool `json:"si,omitempty"` +} + +func (params *GetSsoIntegrationParam) SetId(Id string) *GetSsoIntegrationParam { + params.Id = &Id + return params +} +func (params *GetSsoIntegrationParam) SetSi(Si bool) *GetSsoIntegrationParam { + params.Si = &Si + return params +} + +// **This endpoint allows you to retrieve an SSO integration by ID.** You can retrieve the IDs for your configurations from the response provided by the \"Get All SSO Integrations\" endpoint. +func (c *ApiService) GetSsoIntegration(params *GetSsoIntegrationParam) (interface{}, error) { + path := "/v3/sso/integrations/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Si != nil { + data.Set("si", fmt.Sprint(*params.Si)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SsoIntegration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/sso/api_list_sso_integration.go b/rest/api/v3/sso/api_list_sso_integration.go new file mode 100644 index 00000000..45ae2724 --- /dev/null +++ b/rest/api/v3/sso/api_list_sso_integration.go @@ -0,0 +1,101 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListSsoIntegrationParam struct { + // If this parameter is set to `true`, the response will include the `completed_integration` field. + Si *bool `json:"si,omitempty"` +} + +func (params *ListSsoIntegrationParam) SetSi(Si bool) *ListSsoIntegrationParam { + params.Si = &Si + return params +} + +// **This endpoint allows you to retrieve all SSO integrations tied to your Twilio SendGrid account.** The IDs returned by this endpoint can be used by the APIs additional endpoints to modify your SSO integrations. +func (c *ApiService) ListSsoIntegration(params *ListSsoIntegrationParam) (interface{}, error) { + path := "/v3/sso/integrations" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Si != nil { + data.Set("si", fmt.Sprint(*params.Si)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]SsoIntegration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/sso/api_list_sso_integration_certificate.go b/rest/api/v3/sso/api_list_sso_integration_certificate.go new file mode 100644 index 00000000..716201f5 --- /dev/null +++ b/rest/api/v3/sso/api_list_sso_integration_certificate.go @@ -0,0 +1,101 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type ListSsoIntegrationCertificateParam struct { + // An ID that matches a certificate to a specific IdP integration. + IntegrationId *string `json:"integration_id"` +} + +func (params *ListSsoIntegrationCertificateParam) SetIntegrationId(IntegrationId string) *ListSsoIntegrationCertificateParam { + params.IntegrationId = &IntegrationId + return params +} + +// **This endpoint allows you to retrieve all your IdP configurations by configuration ID.** The `integration_id` expected by this endpoint is the `id` returned in the response by the \"Get All SSO Integrations\" endpoint. +func (c *ApiService) ListSsoIntegrationCertificate(params *ListSsoIntegrationCertificateParam) (interface{}, error) { + path := "/v3/sso/integrations/{IntegrationId}/certificates" + if params != nil && params.IntegrationId != nil { + path = strings.Replace(path, "{"+"IntegrationId"+"}", *params.IntegrationId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]SsoCertificateBody{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/sso/api_service.go b/rest/api/v3/sso/api_service.go new file mode 100644 index 00000000..1564dab4 --- /dev/null +++ b/rest/api/v3/sso/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/sso/api_update_sso_certificate.go b/rest/api/v3/sso/api_update_sso_certificate.go new file mode 100644 index 00000000..f06da50e --- /dev/null +++ b/rest/api/v3/sso/api_update_sso_certificate.go @@ -0,0 +1,116 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateSsoCertificateParam struct { + // + CertId *string `json:"cert_id"` + // + UpdateSsoCertificateRequest *UpdateSsoCertificateRequest `json:"UpdateSsoCertificateRequest,omitempty"` +} + +func (params *UpdateSsoCertificateParam) SetCertId(CertId string) *UpdateSsoCertificateParam { + params.CertId = &CertId + return params +} +func (params *UpdateSsoCertificateParam) SetUpdateSsoCertificateRequest(UpdateSsoCertificateRequest UpdateSsoCertificateRequest) *UpdateSsoCertificateParam { + params.UpdateSsoCertificateRequest = &UpdateSsoCertificateRequest + return params +} + +// **This endpoint allows you to update an existing certificate by ID.** You can retrieve a certificate's ID from the response provided by the \"Get All SSO Integrations\" endpoint. +func (c *ApiService) UpdateSsoCertificate(params *UpdateSsoCertificateParam) (interface{}, error) { + path := "/v3/sso/certificates/{CertId}" + if params != nil && params.CertId != nil { + path = strings.Replace(path, "{"+"CertId"+"}", *params.CertId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateSsoCertificateRequest != nil { + b, err := json.Marshal(*params.UpdateSsoCertificateRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SsoCertificateBody{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/sso/api_update_sso_integration.go b/rest/api/v3/sso/api_update_sso_integration.go new file mode 100644 index 00000000..f5a8415b --- /dev/null +++ b/rest/api/v3/sso/api_update_sso_integration.go @@ -0,0 +1,126 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type UpdateSsoIntegrationParam struct { + // + Id *string `json:"id"` + // If this parameter is set to `true`, the response will include the `completed_integration` field. + Si *bool `json:"si,omitempty"` + // + PostPatchIntegrationRequest *PostPatchIntegrationRequest `json:"PostPatchIntegrationRequest,omitempty"` +} + +func (params *UpdateSsoIntegrationParam) SetId(Id string) *UpdateSsoIntegrationParam { + params.Id = &Id + return params +} +func (params *UpdateSsoIntegrationParam) SetSi(Si bool) *UpdateSsoIntegrationParam { + params.Si = &Si + return params +} +func (params *UpdateSsoIntegrationParam) SetPostPatchIntegrationRequest(PostPatchIntegrationRequest PostPatchIntegrationRequest) *UpdateSsoIntegrationParam { + params.PostPatchIntegrationRequest = &PostPatchIntegrationRequest + return params +} + +// **This endpoint allows you to modify an exisiting SSO integration.** You can retrieve the IDs for your configurations from the response provided by the \"Get All SSO Integrations\" endpoint. +func (c *ApiService) UpdateSsoIntegration(params *UpdateSsoIntegrationParam) (interface{}, error) { + path := "/v3/sso/integrations/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + if params != nil && params.Si != nil { + data.Set("si", fmt.Sprint(*params.Si)) + } + body := []byte{} + if params != nil && params.PostPatchIntegrationRequest != nil { + b, err := json.Marshal(*params.PostPatchIntegrationRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SsoIntegration{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/sso/api_update_sso_teammate.go b/rest/api/v3/sso/api_update_sso_teammate.go new file mode 100644 index 00000000..ded4c5ba --- /dev/null +++ b/rest/api/v3/sso/api_update_sso_teammate.go @@ -0,0 +1,116 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateSsoTeammateParam struct { + // Set this parameter to the Teammate's email address. This address must be the same address assigned to the Teammate in your IdP. + Username *string `json:"username"` + // + Body *SsoTeammatesBaseRequestProps `json:"body,omitempty"` +} + +func (params *UpdateSsoTeammateParam) SetUsername(Username string) *UpdateSsoTeammateParam { + params.Username = &Username + return params +} +func (params *UpdateSsoTeammateParam) SetBody(Body SsoTeammatesBaseRequestProps) *UpdateSsoTeammateParam { + params.Body = &Body + return params +} + +// **This endpoint allows you to modify an existing SSO Teammate.** Only the parent user and Teammates with admin permissions can update another Teammate's permissions. ### Scopes When updating a Teammate, you will assign it permissions or scopes. These scopes determine which actions the Teammate can perform and which features they can access. Scopes are provided with one of three properties passed to this endpoint: `is_admin`, `scopes`, and `persona`. You can make a Teammate an administrator by setting `is_admin` to `true`. Administrators will have all scopes assigned to them. Alternatively, you can assign a `persona` to the teammate, which will assign them a block of permissions commonly required for that type of user. See the \"Persona scopes\" section of [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions#persona-scopes) for a list of permsissions granted by persona. Lastly, you can assign individual permissions with the `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of scopes that can be assigned to a Teammate. ### Subuser access SendGrid Teammates may be assigned access to one or more Subusers. Subusers function like SendGrid sub-accounts with their own resources. See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. When assigning Subuser access to a Teammate, you may set the `has_restricted_subuser_access` property to `true` to constrain the Teammate so that they can operate only on behalf of the Subusers to which they are assigned. You may further set the level of access the Teammate has to each Subuser with the `subuser_access` property. +func (c *ApiService) UpdateSsoTeammate(params *UpdateSsoTeammateParam) (interface{}, error) { + path := "/v3/sso/teammates/{Username}" + if params != nil && params.Username != nil { + path = strings.Replace(path, "{"+"Username"+"}", *params.Username, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.Body != nil { + b, err := json.Marshal(*params.Body) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &PatchSsoTeammates200{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 429 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &[]SsoErrorResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/sso/docs/CreateSsoCertificate.md b/rest/api/v3/sso/docs/CreateSsoCertificate.md new file mode 100644 index 00000000..0f1b57e1 --- /dev/null +++ b/rest/api/v3/sso/docs/CreateSsoCertificate.md @@ -0,0 +1,48 @@ +# CreateSsoCertificate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateSsoCertificate**](CreateSsoCertificate.md#CreateSsoCertificate) | **Post** /v3/sso/certificates | Create an SSO Certificate + + + +## CreateSsoCertificate + +> SsoCertificateBody CreateSsoCertificate(ctx, optional) + +Create an SSO Certificate + +**This endpoint allows you to create an SSO certificate.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateSsoCertificateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**CreateSsoCertificateRequest** | [**CreateSsoCertificateRequest**](CreateSsoCertificateRequest.md) | + +### Return type + +[**SsoCertificateBody**](SsoCertificateBody.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/sso/docs/CreateSsoCertificateRequest.md b/rest/api/v3/sso/docs/CreateSsoCertificateRequest.md new file mode 100644 index 00000000..ff047454 --- /dev/null +++ b/rest/api/v3/sso/docs/CreateSsoCertificateRequest.md @@ -0,0 +1,13 @@ +# CreateSsoCertificateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PublicCertificate** | **string** | This public certificate allows SendGrid to verify that SAML requests it receives are signed by an IdP that it recognizes. | +**Enabled** | **bool** | Indicates if the certificate is enabled. |[optional] +**IntegrationId** | **string** | An ID that matches a certificate to a specific IdP integration. This is the `id` returned by the \"Get All SSO Integrations\" endpoint. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/CreateSsoIntegration.md b/rest/api/v3/sso/docs/CreateSsoIntegration.md new file mode 100644 index 00000000..cc6926e3 --- /dev/null +++ b/rest/api/v3/sso/docs/CreateSsoIntegration.md @@ -0,0 +1,48 @@ +# CreateSsoIntegration + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateSsoIntegration**](CreateSsoIntegration.md#CreateSsoIntegration) | **Post** /v3/sso/integrations | Create an SSO Integration + + + +## CreateSsoIntegration + +> SsoIntegration CreateSsoIntegration(ctx, optional) + +Create an SSO Integration + +**This endpoint allows you to create an SSO integration.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateSsoIntegrationParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**PostPatchIntegrationRequest** | [**PostPatchIntegrationRequest**](PostPatchIntegrationRequest.md) | + +### Return type + +[**SsoIntegration**](SsoIntegration.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/sso/docs/CreateSsoTeammate.md b/rest/api/v3/sso/docs/CreateSsoTeammate.md new file mode 100644 index 00000000..98907b69 --- /dev/null +++ b/rest/api/v3/sso/docs/CreateSsoTeammate.md @@ -0,0 +1,48 @@ +# CreateSsoTeammate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateSsoTeammate**](CreateSsoTeammate.md#CreateSsoTeammate) | **Post** /v3/sso/teammates | Create an SSO Teammate. + + + +## CreateSsoTeammate + +> PostSsoTeammates201 CreateSsoTeammate(ctx, optional) + +Create an SSO Teammate. + +**This endpoint allows you to create an SSO Teammate.** The email address provided for the Teammate will also function as the Teammate's username. Once created, the Teammate's email address cannot be changed. ### Scopes When creating a Teammate, you will assign it permissions or scopes. These scopes determine which actions the Teammate can perform and which features they can access. Scopes are provided with one of three properties passed to this endpoint: `is_admin`, `scopes`, and `persona`. You can make a Teammate an administrator by setting `is_admin` to `true`. Administrators will have all scopes assigned to them. Alternatively, you can assign a `persona` to the teammate, which will assign them a block of permissions commonly required for that type of user. See the \"Persona scopes\" section of [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions#persona-scopes) for a list of permsissions granted by persona. Lastly, you can assign individual permissions with the `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of scopes that can be assigned to a Teammate. ### Subuser access SendGrid Teammates may be assigned access to one or more Subusers. Subusers function like SendGrid sub-accounts with their own resources. See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. When assigning Subuser access to a Teammate, you may set the `has_restricted_subuser_access` property to `true` to constrain the Teammate so that they can operate only on behalf of the Subusers to which they are assigned. You may further set the level of access the Teammate has to each Subuser with the `subuser_access` property. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateSsoTeammateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**PostSsoTeammatesRequest** | [**PostSsoTeammatesRequest**](PostSsoTeammatesRequest.md) | + +### Return type + +[**PostSsoTeammates201**](PostSsoTeammates201.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/sso/docs/DeleteSsoCertificate.md b/rest/api/v3/sso/docs/DeleteSsoCertificate.md new file mode 100644 index 00000000..27eba6d0 --- /dev/null +++ b/rest/api/v3/sso/docs/DeleteSsoCertificate.md @@ -0,0 +1,51 @@ +# DeleteSsoCertificate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSsoCertificate**](DeleteSsoCertificate.md#DeleteSsoCertificate) | **Delete** /v3/sso/certificates/{CertId} | Delete an SSO Certificate + + + +## DeleteSsoCertificate + +> SsoCertificateBody DeleteSsoCertificate(ctx, CertId) + +Delete an SSO Certificate + +**This endpoint allows you to delete an SSO certificate.** You can retrieve a certificate's ID from the response provided by the \"Get All SSO Integrations\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CertId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSsoCertificateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**SsoCertificateBody**](SsoCertificateBody.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/sso/docs/DeleteSsoIntegration.md b/rest/api/v3/sso/docs/DeleteSsoIntegration.md new file mode 100644 index 00000000..d9961b65 --- /dev/null +++ b/rest/api/v3/sso/docs/DeleteSsoIntegration.md @@ -0,0 +1,51 @@ +# DeleteSsoIntegration + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSsoIntegration**](DeleteSsoIntegration.md#DeleteSsoIntegration) | **Delete** /v3/sso/integrations/{Id} | Delete an SSO Integration + + + +## DeleteSsoIntegration + +> DeleteSsoIntegration(ctx, Id) + +Delete an SSO Integration + +**This endpoint allows you to delete an IdP configuration by ID.** You can retrieve the IDs for your configurations from the response provided by the \"Get All SSO Integrations\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSsoIntegrationParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/sso/docs/GetSsoCertificate.md b/rest/api/v3/sso/docs/GetSsoCertificate.md new file mode 100644 index 00000000..e6ecfde7 --- /dev/null +++ b/rest/api/v3/sso/docs/GetSsoCertificate.md @@ -0,0 +1,51 @@ +# GetSsoCertificate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetSsoCertificate**](GetSsoCertificate.md#GetSsoCertificate) | **Get** /v3/sso/certificates/{CertId} | Get an SSO Certificate + + + +## GetSsoCertificate + +> SsoCertificateBody GetSsoCertificate(ctx, CertId) + +Get an SSO Certificate + +**This endpoint allows you to retrieve an individual SSO certificate.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CertId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a GetSsoCertificateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**SsoCertificateBody**](SsoCertificateBody.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/sso/docs/GetSsoIntegration.md b/rest/api/v3/sso/docs/GetSsoIntegration.md new file mode 100644 index 00000000..ea49cd71 --- /dev/null +++ b/rest/api/v3/sso/docs/GetSsoIntegration.md @@ -0,0 +1,52 @@ +# GetSsoIntegration + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetSsoIntegration**](GetSsoIntegration.md#GetSsoIntegration) | **Get** /v3/sso/integrations/{Id} | Get an SSO Integration + + + +## GetSsoIntegration + +> SsoIntegration GetSsoIntegration(ctx, Idoptional) + +Get an SSO Integration + +**This endpoint allows you to retrieve an SSO integration by ID.** You can retrieve the IDs for your configurations from the response provided by the \"Get All SSO Integrations\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a GetSsoIntegrationParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Si** | **bool** | If this parameter is set to `true`, the response will include the `completed_integration` field. + +### Return type + +[**SsoIntegration**](SsoIntegration.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/sso/docs/ListSsoIntegration.md b/rest/api/v3/sso/docs/ListSsoIntegration.md new file mode 100644 index 00000000..8082cbe7 --- /dev/null +++ b/rest/api/v3/sso/docs/ListSsoIntegration.md @@ -0,0 +1,48 @@ +# ListSsoIntegration + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSsoIntegration**](ListSsoIntegration.md#ListSsoIntegration) | **Get** /v3/sso/integrations | Get All SSO Integrations + + + +## ListSsoIntegration + +> []SsoIntegration ListSsoIntegration(ctx, optional) + +Get All SSO Integrations + +**This endpoint allows you to retrieve all SSO integrations tied to your Twilio SendGrid account.** The IDs returned by this endpoint can be used by the APIs additional endpoints to modify your SSO integrations. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSsoIntegrationParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Si** | **bool** | If this parameter is set to `true`, the response will include the `completed_integration` field. + +### Return type + +[**[]SsoIntegration**](SsoIntegration.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/sso/docs/ListSsoIntegrationCertificate.md b/rest/api/v3/sso/docs/ListSsoIntegrationCertificate.md new file mode 100644 index 00000000..526ad85d --- /dev/null +++ b/rest/api/v3/sso/docs/ListSsoIntegrationCertificate.md @@ -0,0 +1,51 @@ +# ListSsoIntegrationCertificate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSsoIntegrationCertificate**](ListSsoIntegrationCertificate.md#ListSsoIntegrationCertificate) | **Get** /v3/sso/integrations/{IntegrationId}/certificates | Get All SSO Certificates by Integration + + + +## ListSsoIntegrationCertificate + +> []SsoCertificateBody ListSsoIntegrationCertificate(ctx, IntegrationId) + +Get All SSO Certificates by Integration + +**This endpoint allows you to retrieve all your IdP configurations by configuration ID.** The `integration_id` expected by this endpoint is the `id` returned in the response by the \"Get All SSO Integrations\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**IntegrationId** | **string** | An ID that matches a certificate to a specific IdP integration. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSsoIntegrationCertificateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**[]SsoCertificateBody**](SsoCertificateBody.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/sso/docs/PatchSsoTeammates200.md b/rest/api/v3/sso/docs/PatchSsoTeammates200.md new file mode 100644 index 00000000..b1b277d5 --- /dev/null +++ b/rest/api/v3/sso/docs/PatchSsoTeammates200.md @@ -0,0 +1,29 @@ +# PatchSsoTeammates200 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Address** | **string** | The Teammate's street address. |[optional] +**Address2** | **string** | The Teammate's apartment number, suite number, or other secondary address information that is not part of the physical street address. |[optional] +**City** | **string** | The Teammate's city. |[optional] +**Company** | **string** | The Teammate's company name. |[optional] +**Country** | **string** | The Teammate's country of residence. |[optional] +**Username** | **string** | The Teammate's username. This property is set to the Teammate's email address. |[optional] +**Phone** | **string** | The Teammate's phone number. |[optional] +**State** | **string** | The Teammate's state or province. |[optional] +**UserType** | [**UserType**](UserType.md) | A Teammate can be an `admin`, `owner`, or `teammate`. Each role is associated with the scope of the Teammate's permissions. |[optional] +**Website** | **string** | A website associated with the Teammate. |[optional] +**Zip** | **string** | The Teammate's zip code. |[optional] +**FirstName** | **string** | The Teammate's first name. |[optional] +**LastName** | **string** | The Teammate's last name. |[optional] +**Email** | **string** | Teammate's email address. This email address also functions as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. |[optional] +**IsAdmin** | **bool** | Indicates if the Teammate has administrator permissions. When set to `true`, the Teammate is an admin. |[optional] +**IsSso** | **bool** | Indicates how the Teammate authenticates with SendGrid. When set to `true`, the Teammate will access SendGrid via SSO and their IdP. When set to `false`, the Teammate will authenticate directly with SendGrid via a username and password. |[optional] +**Scopes** | **[]string** | The permissions or scopes currently assigned to the Teammate. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. |[optional] +**HasRestrictedSubuserAccess** | **bool** | When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. |[optional] +**SubuserAccess** | [**[]SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner**](SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md) | Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/PermissionType.md b/rest/api/v3/sso/docs/PermissionType.md new file mode 100644 index 00000000..da44f853 --- /dev/null +++ b/rest/api/v3/sso/docs/PermissionType.md @@ -0,0 +1,13 @@ +# PermissionType + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**ADMIN** | string | (value: `"admin"`) +**RESTRICTED** | string | (value: `"restricted"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/PermissionType1.md b/rest/api/v3/sso/docs/PermissionType1.md new file mode 100644 index 00000000..5fa3bbb8 --- /dev/null +++ b/rest/api/v3/sso/docs/PermissionType1.md @@ -0,0 +1,13 @@ +# PermissionType1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**ADMIN** | string | (value: `"admin"`) +**RESTRICTED** | string | (value: `"restricted"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/Persona.md b/rest/api/v3/sso/docs/Persona.md new file mode 100644 index 00000000..a422b3d2 --- /dev/null +++ b/rest/api/v3/sso/docs/Persona.md @@ -0,0 +1,15 @@ +# Persona + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**ACCOUNTANT** | string | (value: `"accountant"`) +**DEVELOPER** | string | (value: `"developer"`) +**MARKETER** | string | (value: `"marketer"`) +**OBSERVER** | string | (value: `"observer"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/PostPatchIntegrationRequest.md b/rest/api/v3/sso/docs/PostPatchIntegrationRequest.md new file mode 100644 index 00000000..813db37b --- /dev/null +++ b/rest/api/v3/sso/docs/PostPatchIntegrationRequest.md @@ -0,0 +1,16 @@ +# PostPatchIntegrationRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of your integration. This name can be anything that makes sense for your organization (eg. Twilio SendGrid) | +**Enabled** | **bool** | Indicates if the integration is enabled. | +**SigninUrl** | **string** | The IdP's SAML POST endpoint. This endpoint should receive requests and initiate an SSO login flow. This is called the \"Embed Link\" in the Twilio SendGrid UI. | +**SignoutUrl** | **string** | This URL is relevant only for an IdP-initiated authentication flow. If a user authenticates from their IdP, this URL will return them to their IdP when logging out. | +**EntityId** | **string** | An identifier provided by your IdP to identify Twilio SendGrid in the SAML interaction. This is called the \"SAML Issuer ID\" in the Twilio SendGrid UI. | +**CompletedIntegration** | **bool** | Indicates if the integration is complete. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/PostSsoTeammates201.md b/rest/api/v3/sso/docs/PostSsoTeammates201.md new file mode 100644 index 00000000..90d13d83 --- /dev/null +++ b/rest/api/v3/sso/docs/PostSsoTeammates201.md @@ -0,0 +1,18 @@ +# PostSsoTeammates201 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstName** | **string** | The Teammate's first name. |[optional] +**LastName** | **string** | The Teammate's last name. |[optional] +**Email** | **string** | Teammate's email address. This email address also functions as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. |[optional] +**IsAdmin** | **bool** | Indicates if the Teammate has administrator permissions. When set to `true`, the Teammate is an admin. |[optional] +**IsSso** | **bool** | Indicates how the Teammate authenticates with SendGrid. When set to `true`, the Teammate will access SendGrid via SSO and their IdP. When set to `false`, the Teammate will authenticate directly with SendGrid via a username and password. |[optional] +**Scopes** | **[]string** | The permissions or scopes currently assigned to the Teammate. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. |[optional] +**HasRestrictedSubuserAccess** | **bool** | When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. |[optional] +**SubuserAccess** | [**[]SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner**](SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md) | Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/PostSsoTeammatesRequest.md b/rest/api/v3/sso/docs/PostSsoTeammatesRequest.md new file mode 100644 index 00000000..ef110ee3 --- /dev/null +++ b/rest/api/v3/sso/docs/PostSsoTeammatesRequest.md @@ -0,0 +1,18 @@ +# PostSsoTeammatesRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | Set this property to the Teammate's email address. This email address will also function as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. | +**FirstName** | **string** | Set this property to the Teammate's first name. | +**LastName** | **string** | Set this property to the Teammate's last name. | +**IsAdmin** | **bool** | Set this property to `true` if the Teammate has admin permissions. You should not include the `scopes` or `persona` properties when setting the `is_admin` property to `true`—an admin will be allocated all scopes. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of scopes. |[optional] +**Persona** | [**Persona**](Persona.md) | A persona represents a group of permissions often required by a type of Teammate such as a developer or marketer. Assigning a persona allows you to allocate a group of pre-defined permissions rather than assigning each scope individually. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of the scopes assigned to each persona. |[optional] +**Scopes** | **[]string** | Add or remove permissions from a Teammate using this `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this propety in the request when using the `persona` property or when setting the `is_admin` property to `true`—assigning a `persona` or setting `is_admin` to `true` will allocate a group of permissions to the Teammate. |[optional] +**HasRestrictedSubuserAccess** | **bool** | Set this property to `true` to give the Teammate permissions to operate only on behalf of a Subuser. This property value must be `true` if the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. If this property is set to `true`, you cannot specify individual `scopes`, assign a `persona`, or set `is_admin` to `true`—a Teammate cannot specify scopes for the parent account and have restricted Subuser access. |[optional] +**SubuserAccess** | [**[]SsoTeammatesBaseRequestPropsSubuserAccessInner**](SsoTeammatesBaseRequestPropsSubuserAccessInner.md) | Specify which Subusers the Teammate may access and act on behalf of with this property. If this property is populated, you must set the `has_restricted_subuser_access` property to `true`. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/SsoCertificateBody.md b/rest/api/v3/sso/docs/SsoCertificateBody.md new file mode 100644 index 00000000..68cb6289 --- /dev/null +++ b/rest/api/v3/sso/docs/SsoCertificateBody.md @@ -0,0 +1,15 @@ +# SsoCertificateBody + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PublicCertificate** | **string** | This certificate is used by Twilio SendGrid to verify that SAML requests are coming from Okta. This is called the X509 certificate in the Twilio SendGrid UI. |[optional] +**Id** | **float32** | A unique ID assigned to the certificate by SendGrid. |[optional] +**NotBefore** | **float32** | A unix timestamp (e.g., 1603915954) that indicates the time before which the certificate is not valid. |[optional] +**NotAfter** | **float32** | A unix timestamp (e.g., 1603915954) that indicates the time after which the certificate is no longer valid. |[optional] +**IntergrationId** | **string** | An ID that matches a certificate to a specific IdP integration. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/SsoErrorResponseInner.md b/rest/api/v3/sso/docs/SsoErrorResponseInner.md new file mode 100644 index 00000000..df959452 --- /dev/null +++ b/rest/api/v3/sso/docs/SsoErrorResponseInner.md @@ -0,0 +1,13 @@ +# SsoErrorResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | |[optional] +**Field** | **string** | |[optional] +**ErrorId** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/SsoIntegration.md b/rest/api/v3/sso/docs/SsoIntegration.md new file mode 100644 index 00000000..aa5f45f8 --- /dev/null +++ b/rest/api/v3/sso/docs/SsoIntegration.md @@ -0,0 +1,20 @@ +# SsoIntegration + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of your integration. This name can be anything that makes sense for your organization (eg. Twilio SendGrid) | +**Enabled** | **bool** | Indicates if the integration is enabled. | +**SigninUrl** | **string** | The IdP's SAML POST endpoint. This endpoint should receive requests and initiate an SSO login flow. This is called the \"Embed Link\" in the Twilio SendGrid UI. | +**SignoutUrl** | **string** | This URL is relevant only for an IdP-initiated authentication flow. If a user authenticates from their IdP, this URL will return them to their IdP when logging out. | +**EntityId** | **string** | An identifier provided by your IdP to identify Twilio SendGrid in the SAML interaction. This is called the \"SAML Issuer ID\" in the Twilio SendGrid UI. | +**CompletedIntegration** | **bool** | Indicates if the integration is complete. |[optional] +**LastUpdated** | **float32** | A timestamp representing the last time the configuration was modified. | +**Id** | **string** | A unique ID assigned to the configuration by SendGrid. |[optional] +**SingleSignonUrl** | **string** | The URL where your IdP should POST its SAML response. This is the Twilio SendGrid URL that is responsible for receiving and parsing a SAML assertion. This is the same URL as the Audience URL when using SendGrid. |[optional] +**AudienceUrl** | **string** | The URL where your IdP should POST its SAML response. This is the Twilio SendGrid URL that is responsible for receiving and parsing a SAML assertion. This is the same URL as the Single Sign-On URL when using SendGrid. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/SsoTeammatesBaseRequestProps.md b/rest/api/v3/sso/docs/SsoTeammatesBaseRequestProps.md new file mode 100644 index 00000000..fcededd9 --- /dev/null +++ b/rest/api/v3/sso/docs/SsoTeammatesBaseRequestProps.md @@ -0,0 +1,17 @@ +# SsoTeammatesBaseRequestProps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstName** | **string** | Set this property to the Teammate's first name. | +**LastName** | **string** | Set this property to the Teammate's last name. | +**IsAdmin** | **bool** | Set this property to `true` if the Teammate has admin permissions. You should not include the `scopes` or `persona` properties when setting the `is_admin` property to `true`—an admin will be allocated all scopes. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of scopes. |[optional] +**Persona** | [**Persona**](Persona.md) | A persona represents a group of permissions often required by a type of Teammate such as a developer or marketer. Assigning a persona allows you to allocate a group of pre-defined permissions rather than assigning each scope individually. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of the scopes assigned to each persona. |[optional] +**Scopes** | **[]string** | Add or remove permissions from a Teammate using this `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this propety in the request when using the `persona` property or when setting the `is_admin` property to `true`—assigning a `persona` or setting `is_admin` to `true` will allocate a group of permissions to the Teammate. |[optional] +**HasRestrictedSubuserAccess** | **bool** | Set this property to `true` to give the Teammate permissions to operate only on behalf of a Subuser. This property value must be `true` if the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. If this property is set to `true`, you cannot specify individual `scopes`, assign a `persona`, or set `is_admin` to `true`—a Teammate cannot specify scopes for the parent account and have restricted Subuser access. |[optional] +**SubuserAccess** | [**[]SsoTeammatesBaseRequestPropsSubuserAccessInner**](SsoTeammatesBaseRequestPropsSubuserAccessInner.md) | Specify which Subusers the Teammate may access and act on behalf of with this property. If this property is populated, you must set the `has_restricted_subuser_access` property to `true`. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/SsoTeammatesBaseRequestPropsSubuserAccessInner.md b/rest/api/v3/sso/docs/SsoTeammatesBaseRequestPropsSubuserAccessInner.md new file mode 100644 index 00000000..80c452b4 --- /dev/null +++ b/rest/api/v3/sso/docs/SsoTeammatesBaseRequestPropsSubuserAccessInner.md @@ -0,0 +1,13 @@ +# SsoTeammatesBaseRequestPropsSubuserAccessInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | Set this property to the ID of a Subuser to which the Teammate should have access. You can retrieve Subuser IDs from the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/). | +**PermissionType** | [**PermissionType**](PermissionType.md) | Grant the level of access the Teammate should have to the specified Subuser with this property. This property value may be either `admin` or `restricted`. When set to `restricted`, the Teammate has only the permissions assigned in the `scopes` property. | +**Scopes** | **[]string** | Add or remove permissions that the Teammate can access on behalf of the Subuser. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this property in the request when the `permission_type` property is set to `admin`—administrators have full access to the specified Subuser. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/SsoTeammatesBaseResponseProps.md b/rest/api/v3/sso/docs/SsoTeammatesBaseResponseProps.md new file mode 100644 index 00000000..a2de9c35 --- /dev/null +++ b/rest/api/v3/sso/docs/SsoTeammatesBaseResponseProps.md @@ -0,0 +1,16 @@ +# SsoTeammatesBaseResponseProps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstName** | **string** | The Teammate's first name. |[optional] +**LastName** | **string** | The Teammate's last name. |[optional] +**Email** | **string** | Teammate's email address. This email address also functions as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. |[optional] +**IsAdmin** | **bool** | Indicates if the Teammate has administrator permissions. When set to `true`, the Teammate is an admin. |[optional] +**IsSso** | **bool** | Indicates how the Teammate authenticates with SendGrid. When set to `true`, the Teammate will access SendGrid via SSO and their IdP. When set to `false`, the Teammate will authenticate directly with SendGrid via a username and password. |[optional] +**Scopes** | **[]string** | The permissions or scopes currently assigned to the Teammate. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponseProps.md b/rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponseProps.md new file mode 100644 index 00000000..a22ffc8f --- /dev/null +++ b/rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponseProps.md @@ -0,0 +1,12 @@ +# SsoTeammatesRestrictedSubuserResponseProps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**HasRestrictedSubuserAccess** | **bool** | When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. |[optional] +**SubuserAccess** | [**[]SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner**](SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md) | Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md b/rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md new file mode 100644 index 00000000..c7c93940 --- /dev/null +++ b/rest/api/v3/sso/docs/SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner.md @@ -0,0 +1,16 @@ +# SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The ID of a Subuser to which the Teammate has access. You can retrieve Subuser IDs from the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/). |[optional] +**Username** | **string** | The username of a Subuser to which the Teammate has access. |[optional] +**Email** | **string** | The email address of a Subuser to which the Teammate has access. |[optional] +**Disabled** | **bool** | Indicates if the Subuser is active for the SendGrid account. |[optional] +**PermissionType** | [**PermissionType1**](PermissionType1.md) | The level of access the Teammate has to the specified Subuser. This property value may be either `admin` or `restricted`. When is property is set to `restricted`, the Teammate has only the permissions assigned in the `scopes` property. |[optional] +**Scopes** | **[]string** | The permissions or scopes that the Teammate can access on behalf of the Subuser. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/UpdateSsoCertificate.md b/rest/api/v3/sso/docs/UpdateSsoCertificate.md new file mode 100644 index 00000000..0873a139 --- /dev/null +++ b/rest/api/v3/sso/docs/UpdateSsoCertificate.md @@ -0,0 +1,52 @@ +# UpdateSsoCertificate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSsoCertificate**](UpdateSsoCertificate.md#UpdateSsoCertificate) | **Patch** /v3/sso/certificates/{CertId} | Update SSO Certificate + + + +## UpdateSsoCertificate + +> SsoCertificateBody UpdateSsoCertificate(ctx, CertIdoptional) + +Update SSO Certificate + +**This endpoint allows you to update an existing certificate by ID.** You can retrieve a certificate's ID from the response provided by the \"Get All SSO Integrations\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**CertId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSsoCertificateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**UpdateSsoCertificateRequest** | [**UpdateSsoCertificateRequest**](UpdateSsoCertificateRequest.md) | + +### Return type + +[**SsoCertificateBody**](SsoCertificateBody.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/sso/docs/UpdateSsoCertificateRequest.md b/rest/api/v3/sso/docs/UpdateSsoCertificateRequest.md new file mode 100644 index 00000000..6155b47c --- /dev/null +++ b/rest/api/v3/sso/docs/UpdateSsoCertificateRequest.md @@ -0,0 +1,13 @@ +# UpdateSsoCertificateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PublicCertificate** | **string** | This public certificate allows SendGrid to verify that SAML requests it receives are signed by an IdP that it recognizes. |[optional] +**Enabled** | **bool** | Indicates whether or not the certificate is enabled. |[optional] +**IntegrationId** | **string** | An ID that matches a certificate to a specific IdP integration. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/docs/UpdateSsoIntegration.md b/rest/api/v3/sso/docs/UpdateSsoIntegration.md new file mode 100644 index 00000000..c6e31fe7 --- /dev/null +++ b/rest/api/v3/sso/docs/UpdateSsoIntegration.md @@ -0,0 +1,53 @@ +# UpdateSsoIntegration + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSsoIntegration**](UpdateSsoIntegration.md#UpdateSsoIntegration) | **Patch** /v3/sso/integrations/{Id} | Update an SSO Integration + + + +## UpdateSsoIntegration + +> SsoIntegration UpdateSsoIntegration(ctx, Idoptional) + +Update an SSO Integration + +**This endpoint allows you to modify an exisiting SSO integration.** You can retrieve the IDs for your configurations from the response provided by the \"Get All SSO Integrations\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSsoIntegrationParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Si** | **bool** | If this parameter is set to `true`, the response will include the `completed_integration` field. +**PostPatchIntegrationRequest** | [**PostPatchIntegrationRequest**](PostPatchIntegrationRequest.md) | + +### Return type + +[**SsoIntegration**](SsoIntegration.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/sso/docs/UpdateSsoTeammate.md b/rest/api/v3/sso/docs/UpdateSsoTeammate.md new file mode 100644 index 00000000..cc802214 --- /dev/null +++ b/rest/api/v3/sso/docs/UpdateSsoTeammate.md @@ -0,0 +1,52 @@ +# UpdateSsoTeammate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSsoTeammate**](UpdateSsoTeammate.md#UpdateSsoTeammate) | **Patch** /v3/sso/teammates/{Username} | Edit an SSO Teammate + + + +## UpdateSsoTeammate + +> PatchSsoTeammates200 UpdateSsoTeammate(ctx, Usernameoptional) + +Edit an SSO Teammate + +**This endpoint allows you to modify an existing SSO Teammate.** Only the parent user and Teammates with admin permissions can update another Teammate's permissions. ### Scopes When updating a Teammate, you will assign it permissions or scopes. These scopes determine which actions the Teammate can perform and which features they can access. Scopes are provided with one of three properties passed to this endpoint: `is_admin`, `scopes`, and `persona`. You can make a Teammate an administrator by setting `is_admin` to `true`. Administrators will have all scopes assigned to them. Alternatively, you can assign a `persona` to the teammate, which will assign them a block of permissions commonly required for that type of user. See the \"Persona scopes\" section of [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions#persona-scopes) for a list of permsissions granted by persona. Lastly, you can assign individual permissions with the `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of scopes that can be assigned to a Teammate. ### Subuser access SendGrid Teammates may be assigned access to one or more Subusers. Subusers function like SendGrid sub-accounts with their own resources. See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. When assigning Subuser access to a Teammate, you may set the `has_restricted_subuser_access` property to `true` to constrain the Teammate so that they can operate only on behalf of the Subusers to which they are assigned. You may further set the level of access the Teammate has to each Subuser with the `subuser_access` property. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Username** | **string** | Set this parameter to the Teammate's email address. This address must be the same address assigned to the Teammate in your IdP. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSsoTeammateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Body** | **SsoTeammatesBaseRequestProps** | + +### Return type + +[**PatchSsoTeammates200**](PatchSsoTeammates200.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/sso/docs/UserType.md b/rest/api/v3/sso/docs/UserType.md new file mode 100644 index 00000000..f9f8db1d --- /dev/null +++ b/rest/api/v3/sso/docs/UserType.md @@ -0,0 +1,14 @@ +# UserType + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**ADMIN** | string | (value: `"admin"`) +**OWNER** | string | (value: `"owner"`) +**TEAMMATE** | string | (value: `"teammate"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/sso/model_create_sso_certificate_request.go b/rest/api/v3/sso/model_create_sso_certificate_request.go new file mode 100644 index 00000000..da1fc7ba --- /dev/null +++ b/rest/api/v3/sso/model_create_sso_certificate_request.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateSsoCertificateRequest +type CreateSsoCertificateRequest struct { + // This public certificate allows SendGrid to verify that SAML requests it receives are signed by an IdP that it recognizes. + PublicCertificate string `json:"public_certificate"` + // Indicates if the certificate is enabled. + Enabled *bool `json:"enabled,omitempty"` + // An ID that matches a certificate to a specific IdP integration. This is the `id` returned by the \"Get All SSO Integrations\" endpoint. + IntegrationId string `json:"integration_id"` +} diff --git a/rest/api/v3/sso/model_patch_sso_teammates200.go b/rest/api/v3/sso/model_patch_sso_teammates200.go new file mode 100644 index 00000000..0031305b --- /dev/null +++ b/rest/api/v3/sso/model_patch_sso_teammates200.go @@ -0,0 +1,56 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// PatchSsoTeammates200 Successful SSO Teammates PATCH response. +type PatchSsoTeammates200 struct { + // The Teammate's street address. + Address *string `json:"address,omitempty"` + // The Teammate's apartment number, suite number, or other secondary address information that is not part of the physical street address. + Address2 *string `json:"address2,omitempty"` + // The Teammate's city. + City *string `json:"city,omitempty"` + // The Teammate's company name. + Company *string `json:"company,omitempty"` + // The Teammate's country of residence. + Country *string `json:"country,omitempty"` + // The Teammate's username. This property is set to the Teammate's email address. + Username *string `json:"username,omitempty"` + // The Teammate's phone number. + Phone *string `json:"phone,omitempty"` + // The Teammate's state or province. + State *string `json:"state,omitempty"` + // A Teammate can be an `admin`, `owner`, or `teammate`. Each role is associated with the scope of the Teammate's permissions. + UserType *UserType `json:"user_type,omitempty"` + // A website associated with the Teammate. + Website *string `json:"website,omitempty"` + // The Teammate's zip code. + Zip *string `json:"zip,omitempty"` + // The Teammate's first name. + FirstName *string `json:"first_name,omitempty"` + // The Teammate's last name. + LastName *string `json:"last_name,omitempty"` + // Teammate's email address. This email address also functions as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. + Email *string `json:"email,omitempty"` + // Indicates if the Teammate has administrator permissions. When set to `true`, the Teammate is an admin. + IsAdmin *bool `json:"is_admin,omitempty"` + // Indicates how the Teammate authenticates with SendGrid. When set to `true`, the Teammate will access SendGrid via SSO and their IdP. When set to `false`, the Teammate will authenticate directly with SendGrid via a username and password. + IsSso *bool `json:"is_sso,omitempty"` + // The permissions or scopes currently assigned to the Teammate. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. + Scopes *[]string `json:"scopes,omitempty"` + // When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. + HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"` + // Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. + SubuserAccess *[]SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner `json:"subuser_access,omitempty"` +} diff --git a/rest/api/v3/sso/model_permission_type.go b/rest/api/v3/sso/model_permission_type.go new file mode 100644 index 00000000..c496f95f --- /dev/null +++ b/rest/api/v3/sso/model_permission_type.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// PermissionType the model 'PermissionType' +type PermissionType string + +// List of PermissionType +const ( + PERMISSIONTYPE_ADMIN PermissionType = "admin" + PERMISSIONTYPE_RESTRICTED PermissionType = "restricted" +) diff --git a/rest/api/v3/sso/model_permission_type1.go b/rest/api/v3/sso/model_permission_type1.go new file mode 100644 index 00000000..03271a27 --- /dev/null +++ b/rest/api/v3/sso/model_permission_type1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// PermissionType1 the model 'PermissionType1' +type PermissionType1 string + +// List of PermissionType1 +const ( + PERMISSIONTYPE1_ADMIN PermissionType1 = "admin" + PERMISSIONTYPE1_RESTRICTED PermissionType1 = "restricted" +) diff --git a/rest/api/v3/sso/model_persona.go b/rest/api/v3/sso/model_persona.go new file mode 100644 index 00000000..bbd9d832 --- /dev/null +++ b/rest/api/v3/sso/model_persona.go @@ -0,0 +1,25 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Persona the model 'Persona' +type Persona string + +// List of Persona +const ( + PERSONA_ACCOUNTANT Persona = "accountant" + PERSONA_DEVELOPER Persona = "developer" + PERSONA_MARKETER Persona = "marketer" + PERSONA_OBSERVER Persona = "observer" +) diff --git a/rest/api/v3/sso/model_post_patch_integration_request.go b/rest/api/v3/sso/model_post_patch_integration_request.go new file mode 100644 index 00000000..6cdedd95 --- /dev/null +++ b/rest/api/v3/sso/model_post_patch_integration_request.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// PostPatchIntegrationRequest struct for PostPatchIntegrationRequest +type PostPatchIntegrationRequest struct { + // The name of your integration. This name can be anything that makes sense for your organization (eg. Twilio SendGrid) + Name string `json:"name"` + // Indicates if the integration is enabled. + Enabled bool `json:"enabled"` + // The IdP's SAML POST endpoint. This endpoint should receive requests and initiate an SSO login flow. This is called the \"Embed Link\" in the Twilio SendGrid UI. + SigninUrl string `json:"signin_url"` + // This URL is relevant only for an IdP-initiated authentication flow. If a user authenticates from their IdP, this URL will return them to their IdP when logging out. + SignoutUrl string `json:"signout_url"` + // An identifier provided by your IdP to identify Twilio SendGrid in the SAML interaction. This is called the \"SAML Issuer ID\" in the Twilio SendGrid UI. + EntityId string `json:"entity_id"` + // Indicates if the integration is complete. + CompletedIntegration *bool `json:"completed_integration,omitempty"` +} diff --git a/rest/api/v3/sso/model_post_sso_teammates201.go b/rest/api/v3/sso/model_post_sso_teammates201.go new file mode 100644 index 00000000..5863ff95 --- /dev/null +++ b/rest/api/v3/sso/model_post_sso_teammates201.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// PostSsoTeammates201 Successful SSO Teammates POST Response. +type PostSsoTeammates201 struct { + // The Teammate's first name. + FirstName *string `json:"first_name,omitempty"` + // The Teammate's last name. + LastName *string `json:"last_name,omitempty"` + // Teammate's email address. This email address also functions as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. + Email *string `json:"email,omitempty"` + // Indicates if the Teammate has administrator permissions. When set to `true`, the Teammate is an admin. + IsAdmin *bool `json:"is_admin,omitempty"` + // Indicates how the Teammate authenticates with SendGrid. When set to `true`, the Teammate will access SendGrid via SSO and their IdP. When set to `false`, the Teammate will authenticate directly with SendGrid via a username and password. + IsSso *bool `json:"is_sso,omitempty"` + // The permissions or scopes currently assigned to the Teammate. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. + Scopes *[]string `json:"scopes,omitempty"` + // When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. + HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"` + // Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. + SubuserAccess *[]SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner `json:"subuser_access,omitempty"` +} diff --git a/rest/api/v3/sso/model_post_sso_teammates_request.go b/rest/api/v3/sso/model_post_sso_teammates_request.go new file mode 100644 index 00000000..5f4e5543 --- /dev/null +++ b/rest/api/v3/sso/model_post_sso_teammates_request.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// PostSsoTeammatesRequest struct for PostSsoTeammatesRequest +type PostSsoTeammatesRequest struct { + // Set this property to the Teammate's email address. This email address will also function as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. + Email string `json:"email"` + // Set this property to the Teammate's first name. + FirstName string `json:"first_name"` + // Set this property to the Teammate's last name. + LastName string `json:"last_name"` + // Set this property to `true` if the Teammate has admin permissions. You should not include the `scopes` or `persona` properties when setting the `is_admin` property to `true`—an admin will be allocated all scopes. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of scopes. + IsAdmin *bool `json:"is_admin,omitempty"` + // A persona represents a group of permissions often required by a type of Teammate such as a developer or marketer. Assigning a persona allows you to allocate a group of pre-defined permissions rather than assigning each scope individually. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of the scopes assigned to each persona. + Persona *Persona `json:"persona,omitempty"` + // Add or remove permissions from a Teammate using this `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this propety in the request when using the `persona` property or when setting the `is_admin` property to `true`—assigning a `persona` or setting `is_admin` to `true` will allocate a group of permissions to the Teammate. + Scopes *[]string `json:"scopes,omitempty"` + // Set this property to `true` to give the Teammate permissions to operate only on behalf of a Subuser. This property value must be `true` if the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. If this property is set to `true`, you cannot specify individual `scopes`, assign a `persona`, or set `is_admin` to `true`—a Teammate cannot specify scopes for the parent account and have restricted Subuser access. + HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"` + // Specify which Subusers the Teammate may access and act on behalf of with this property. If this property is populated, you must set the `has_restricted_subuser_access` property to `true`. + SubuserAccess *[]SsoTeammatesBaseRequestPropsSubuserAccessInner `json:"subuser_access,omitempty"` +} diff --git a/rest/api/v3/sso/model_sso_certificate_body.go b/rest/api/v3/sso/model_sso_certificate_body.go new file mode 100644 index 00000000..1a001b81 --- /dev/null +++ b/rest/api/v3/sso/model_sso_certificate_body.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SsoCertificateBody struct for SsoCertificateBody +type SsoCertificateBody struct { + // This certificate is used by Twilio SendGrid to verify that SAML requests are coming from Okta. This is called the X509 certificate in the Twilio SendGrid UI. + PublicCertificate *string `json:"public_certificate,omitempty"` + // A unique ID assigned to the certificate by SendGrid. + Id *float32 `json:"id,omitempty"` + // A unix timestamp (e.g., 1603915954) that indicates the time before which the certificate is not valid. + NotBefore *float32 `json:"not_before,omitempty"` + // A unix timestamp (e.g., 1603915954) that indicates the time after which the certificate is no longer valid. + NotAfter *float32 `json:"not_after,omitempty"` + // An ID that matches a certificate to a specific IdP integration. + IntergrationId *string `json:"intergration_id,omitempty"` +} diff --git a/rest/api/v3/sso/model_sso_error_response_inner.go b/rest/api/v3/sso/model_sso_error_response_inner.go new file mode 100644 index 00000000..17711b3d --- /dev/null +++ b/rest/api/v3/sso/model_sso_error_response_inner.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SsoErrorResponseInner struct for SsoErrorResponseInner +type SsoErrorResponseInner struct { + Message *string `json:"message,omitempty"` + Field *string `json:"field,omitempty"` + ErrorId *string `json:"error_id,omitempty"` +} diff --git a/rest/api/v3/sso/model_sso_integration.go b/rest/api/v3/sso/model_sso_integration.go new file mode 100644 index 00000000..888e08da --- /dev/null +++ b/rest/api/v3/sso/model_sso_integration.go @@ -0,0 +1,38 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SsoIntegration struct for SsoIntegration +type SsoIntegration struct { + // The name of your integration. This name can be anything that makes sense for your organization (eg. Twilio SendGrid) + Name string `json:"name"` + // Indicates if the integration is enabled. + Enabled bool `json:"enabled"` + // The IdP's SAML POST endpoint. This endpoint should receive requests and initiate an SSO login flow. This is called the \"Embed Link\" in the Twilio SendGrid UI. + SigninUrl string `json:"signin_url"` + // This URL is relevant only for an IdP-initiated authentication flow. If a user authenticates from their IdP, this URL will return them to their IdP when logging out. + SignoutUrl string `json:"signout_url"` + // An identifier provided by your IdP to identify Twilio SendGrid in the SAML interaction. This is called the \"SAML Issuer ID\" in the Twilio SendGrid UI. + EntityId string `json:"entity_id"` + // Indicates if the integration is complete. + CompletedIntegration *bool `json:"completed_integration,omitempty"` + // A timestamp representing the last time the configuration was modified. + LastUpdated float32 `json:"last_updated"` + // A unique ID assigned to the configuration by SendGrid. + Id *string `json:"id,omitempty"` + // The URL where your IdP should POST its SAML response. This is the Twilio SendGrid URL that is responsible for receiving and parsing a SAML assertion. This is the same URL as the Audience URL when using SendGrid. + SingleSignonUrl *string `json:"single_signon_url,omitempty"` + // The URL where your IdP should POST its SAML response. This is the Twilio SendGrid URL that is responsible for receiving and parsing a SAML assertion. This is the same URL as the Single Sign-On URL when using SendGrid. + AudienceUrl *string `json:"audience_url,omitempty"` +} diff --git a/rest/api/v3/sso/model_sso_teammates_base_request_props.go b/rest/api/v3/sso/model_sso_teammates_base_request_props.go new file mode 100644 index 00000000..8fd3ef6d --- /dev/null +++ b/rest/api/v3/sso/model_sso_teammates_base_request_props.go @@ -0,0 +1,32 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SsoTeammatesBaseRequestProps struct for SsoTeammatesBaseRequestProps +type SsoTeammatesBaseRequestProps struct { + // Set this property to the Teammate's first name. + FirstName string `json:"first_name"` + // Set this property to the Teammate's last name. + LastName string `json:"last_name"` + // Set this property to `true` if the Teammate has admin permissions. You should not include the `scopes` or `persona` properties when setting the `is_admin` property to `true`—an admin will be allocated all scopes. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of scopes. + IsAdmin *bool `json:"is_admin,omitempty"` + // A persona represents a group of permissions often required by a type of Teammate such as a developer or marketer. Assigning a persona allows you to allocate a group of pre-defined permissions rather than assigning each scope individually. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a full list of the scopes assigned to each persona. + Persona *Persona `json:"persona,omitempty"` + // Add or remove permissions from a Teammate using this `scopes` property. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this propety in the request when using the `persona` property or when setting the `is_admin` property to `true`—assigning a `persona` or setting `is_admin` to `true` will allocate a group of permissions to the Teammate. + Scopes *[]string `json:"scopes,omitempty"` + // Set this property to `true` to give the Teammate permissions to operate only on behalf of a Subuser. This property value must be `true` if the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. If this property is set to `true`, you cannot specify individual `scopes`, assign a `persona`, or set `is_admin` to `true`—a Teammate cannot specify scopes for the parent account and have restricted Subuser access. + HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"` + // Specify which Subusers the Teammate may access and act on behalf of with this property. If this property is populated, you must set the `has_restricted_subuser_access` property to `true`. + SubuserAccess *[]SsoTeammatesBaseRequestPropsSubuserAccessInner `json:"subuser_access,omitempty"` +} diff --git a/rest/api/v3/sso/model_sso_teammates_base_request_props_subuser_access_inner.go b/rest/api/v3/sso/model_sso_teammates_base_request_props_subuser_access_inner.go new file mode 100644 index 00000000..6a9499bd --- /dev/null +++ b/rest/api/v3/sso/model_sso_teammates_base_request_props_subuser_access_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SsoTeammatesBaseRequestPropsSubuserAccessInner An array of Subusers to which the Teammate should have access. +type SsoTeammatesBaseRequestPropsSubuserAccessInner struct { + // Set this property to the ID of a Subuser to which the Teammate should have access. You can retrieve Subuser IDs from the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/). + Id int32 `json:"id"` + // Grant the level of access the Teammate should have to the specified Subuser with this property. This property value may be either `admin` or `restricted`. When set to `restricted`, the Teammate has only the permissions assigned in the `scopes` property. + PermissionType PermissionType `json:"permission_type"` + // Add or remove permissions that the Teammate can access on behalf of the Subuser. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. You should not include this property in the request when the `permission_type` property is set to `admin`—administrators have full access to the specified Subuser. + Scopes *[]string `json:"scopes,omitempty"` +} diff --git a/rest/api/v3/sso/model_sso_teammates_base_response_props.go b/rest/api/v3/sso/model_sso_teammates_base_response_props.go new file mode 100644 index 00000000..ca10b302 --- /dev/null +++ b/rest/api/v3/sso/model_sso_teammates_base_response_props.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SsoTeammatesBaseResponseProps struct for SsoTeammatesBaseResponseProps +type SsoTeammatesBaseResponseProps struct { + // The Teammate's first name. + FirstName *string `json:"first_name,omitempty"` + // The Teammate's last name. + LastName *string `json:"last_name,omitempty"` + // Teammate's email address. This email address also functions as the Teammate's username and must match the address assigned to the user in your IdP. This address cannot be changed after the Teammate is created. + Email *string `json:"email,omitempty"` + // Indicates if the Teammate has administrator permissions. When set to `true`, the Teammate is an admin. + IsAdmin *bool `json:"is_admin,omitempty"` + // Indicates how the Teammate authenticates with SendGrid. When set to `true`, the Teammate will access SendGrid via SSO and their IdP. When set to `false`, the Teammate will authenticate directly with SendGrid via a username and password. + IsSso *bool `json:"is_sso,omitempty"` + // The permissions or scopes currently assigned to the Teammate. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. + Scopes *[]string `json:"scopes,omitempty"` +} diff --git a/rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props.go b/rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props.go new file mode 100644 index 00000000..4570072d --- /dev/null +++ b/rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SsoTeammatesRestrictedSubuserResponseProps struct for SsoTeammatesRestrictedSubuserResponseProps +type SsoTeammatesRestrictedSubuserResponseProps struct { + // When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. + HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"` + // Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. + SubuserAccess *[]SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner `json:"subuser_access,omitempty"` +} diff --git a/rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props_subuser_access_inner.go b/rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props_subuser_access_inner.go new file mode 100644 index 00000000..9d151365 --- /dev/null +++ b/rest/api/v3/sso/model_sso_teammates_restricted_subuser_response_props_subuser_access_inner.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner An array of Subusers to which the Teammate has access. +type SsoTeammatesRestrictedSubuserResponsePropsSubuserAccessInner struct { + // The ID of a Subuser to which the Teammate has access. You can retrieve Subuser IDs from the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/). + Id *int32 `json:"id,omitempty"` + // The username of a Subuser to which the Teammate has access. + Username *string `json:"username,omitempty"` + // The email address of a Subuser to which the Teammate has access. + Email *string `json:"email,omitempty"` + // Indicates if the Subuser is active for the SendGrid account. + Disabled *bool `json:"disabled,omitempty"` + // The level of access the Teammate has to the specified Subuser. This property value may be either `admin` or `restricted`. When is property is set to `restricted`, the Teammate has only the permissions assigned in the `scopes` property. + PermissionType *PermissionType1 `json:"permission_type,omitempty"` + // The permissions or scopes that the Teammate can access on behalf of the Subuser. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. + Scopes *[]string `json:"scopes,omitempty"` +} diff --git a/rest/api/v3/sso/model_update_sso_certificate_request.go b/rest/api/v3/sso/model_update_sso_certificate_request.go new file mode 100644 index 00000000..fd83330d --- /dev/null +++ b/rest/api/v3/sso/model_update_sso_certificate_request.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateSsoCertificateRequest struct for UpdateSsoCertificateRequest +type UpdateSsoCertificateRequest struct { + // This public certificate allows SendGrid to verify that SAML requests it receives are signed by an IdP that it recognizes. + PublicCertificate *string `json:"public_certificate,omitempty"` + // Indicates whether or not the certificate is enabled. + Enabled *bool `json:"enabled,omitempty"` + // An ID that matches a certificate to a specific IdP integration. + IntegrationId *string `json:"integration_id,omitempty"` +} diff --git a/rest/api/v3/sso/model_user_type.go b/rest/api/v3/sso/model_user_type.go new file mode 100644 index 00000000..3042c84a --- /dev/null +++ b/rest/api/v3/sso/model_user_type.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Single Sign-On API +* The Single Sign-On API allows you to manage your SAML 2.0 SSO configurations. You can also work with your SSO integrations using the SSO section of the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/sso). The Single Sign-On Settings operations allow you to create, retrieve, modify, and delete SSO integrations for your Twilio SendGrid account. Each integration will correspond to a specific IdP such as Okta, Duo, or Microsoft Azure Active Directory. The Single Sign-On Certificates operations allow you to create, modify, and delete SSO certificates. A SAML certificate allows your IdP and Twilio SendGrid to verify requests are coming from one another using the `public_certificate` and `integration_id` parameters. The Single Sign-On Teammates operations allow you to add and modify SSO Teammates. SSO Teammates are the individual user accounts who will access your Twilio SendGrid account with SSO credentials. To retrieve or delete an SSO Teammate, you will use the separate [Teammates API](https://docs.sendgrid.com/api-reference/teammates/). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UserType the model 'UserType' +type UserType string + +// List of UserType +const ( + USERTYPE_ADMIN UserType = "admin" + USERTYPE_OWNER UserType = "owner" + USERTYPE_TEAMMATE UserType = "teammate" +) diff --git a/rest/api/v3/stats/README.md b/rest/api/v3/stats/README.md new file mode 100644 index 00000000..cbe90f58 --- /dev/null +++ b/rest/api/v3/stats/README.md @@ -0,0 +1,104 @@ +# Go API client for + +The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. + +Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. + +SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. + +Category statistics are available for the previous thirteen months only. + +See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:02.483887+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*GetClientStat* | [**GetClientStat**](docs/GetClientStat.md#getclientstat) | **Get** /v3/clients/{ClientType}/stats | Retrieve stats by a specific client type. +*ListBrowserStat* | [**ListBrowserStat**](docs/ListBrowserStat.md#listbrowserstat) | **Get** /v3/browsers/stats | Retrieve email statistics by browser. +*ListCategory* | [**ListCategory**](docs/ListCategory.md#listcategory) | **Get** /v3/categories | Retrieve all categories +*ListCategoryStat* | [**ListCategoryStat**](docs/ListCategoryStat.md#listcategorystat) | **Get** /v3/categories/stats | Retrieve Email Statistics for Categories +*ListCategoryStatSum* | [**ListCategoryStatSum**](docs/ListCategoryStatSum.md#listcategorystatsum) | **Get** /v3/categories/stats/sums | Retrieve sums of email stats for each category. +*ListClientStat* | [**ListClientStat**](docs/ListClientStat.md#listclientstat) | **Get** /v3/clients/stats | Retrieve email statistics by client type. +*ListDeviceStat* | [**ListDeviceStat**](docs/ListDeviceStat.md#listdevicestat) | **Get** /v3/devices/stats | Retrieve email statistics by device type. +*ListGeoStat* | [**ListGeoStat**](docs/ListGeoStat.md#listgeostat) | **Get** /v3/geo/stats | Retrieve email statistics by country and state/province. +*ListMailboxProviderStat* | [**ListMailboxProviderStat**](docs/ListMailboxProviderStat.md#listmailboxproviderstat) | **Get** /v3/mailbox_providers/stats | Retrieve email statistics by mailbox provider. +*ListStat* | [**ListStat**](docs/ListStat.md#liststat) | **Get** /v3/stats | Retrieve global email statistics + + +## Documentation For Models + + - [AdvancedStatsClicks](AdvancedStatsClicks.md) + - [AdvancedStatsClicksOpens](AdvancedStatsClicksOpens.md) + - [AdvancedStatsMailboxProvider](AdvancedStatsMailboxProvider.md) + - [AdvancedStatsOpens](AdvancedStatsOpens.md) + - [AggregatedBy](AggregatedBy.md) + - [AggregatedBy1](AggregatedBy1.md) + - [AggregatedBy2](AggregatedBy2.md) + - [AggregatedBy3](AggregatedBy3.md) + - [CategoryStats](CategoryStats.md) + - [CategoryStatsStatsInner](CategoryStatsStatsInner.md) + - [CategoryStatsStatsInnerMetrics](CategoryStatsStatsInnerMetrics.md) + - [ClientType](ClientType.md) + - [Country](Country.md) + - [ListBrowserStat200ResponseInner](ListBrowserStat200ResponseInner.md) + - [ListBrowserStat200ResponseInnerStatsInner](ListBrowserStat200ResponseInnerStatsInner.md) + - [ListCategory200ResponseInner](ListCategory200ResponseInner.md) + - [ListCategory400Response](ListCategory400Response.md) + - [ListCategory400ResponseErrorsInner](ListCategory400ResponseErrorsInner.md) + - [ListClientStat200ResponseInner](ListClientStat200ResponseInner.md) + - [ListClientStat200ResponseInnerStatsInner](ListClientStat200ResponseInnerStatsInner.md) + - [ListGeoStat200ResponseInner](ListGeoStat200ResponseInner.md) + - [ListGeoStat200ResponseInnerStatsInner](ListGeoStat200ResponseInnerStatsInner.md) + - [ListMailboxProviderStat200ResponseInner](ListMailboxProviderStat200ResponseInner.md) + - [ListMailboxProviderStat200ResponseInnerStatsInner](ListMailboxProviderStat200ResponseInnerStatsInner.md) + - [ListStat200ResponseInner](ListStat200ResponseInner.md) + - [ListStat200ResponseInnerStatsInner](ListStat200ResponseInnerStatsInner.md) + - [SortByDirection](SortByDirection.md) + - [StatsAdvancedGlobalStats](StatsAdvancedGlobalStats.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/stats/api_get_client_stat.go b/rest/api/v3/stats/api_get_client_stat.go new file mode 100644 index 00000000..79d26053 --- /dev/null +++ b/rest/api/v3/stats/api_get_client_stat.go @@ -0,0 +1,99 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type GetClientStatParam struct { + // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. + StartDate *string `json:"start_date"` + // Specifies the type of client to retrieve stats for. Must be either \"phone\", \"tablet\", \"webmail\", or \"desktop\". + ClientType *ClientType `json:"client_type"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + EndDate *string `json:"end_date,omitempty"` + // How to group the statistics. Must be either \"day\", \"week\", or \"month\". + AggregatedBy *AggregatedBy2 `json:"aggregated_by,omitempty"` +} + +func (params *GetClientStatParam) SetStartDate(StartDate string) *GetClientStatParam { + params.StartDate = &StartDate + return params +} +func (params *GetClientStatParam) SetClientType(ClientType ClientType) *GetClientStatParam { + params.ClientType = &ClientType + return params +} +func (params *GetClientStatParam) SetOnbehalfof(Onbehalfof string) *GetClientStatParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *GetClientStatParam) SetEndDate(EndDate string) *GetClientStatParam { + params.EndDate = &EndDate + return params +} +func (params *GetClientStatParam) SetAggregatedBy(AggregatedBy AggregatedBy2) *GetClientStatParam { + params.AggregatedBy = &AggregatedBy + return params +} + +// **This endpoint allows you to retrieve your email statistics segmented by a specific client type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. ### Available Client Types - phone - tablet - webmail - desktop Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). +func (c *ApiService) GetClientStat(params *GetClientStatParam) (interface{}, error) { + path := "/v3/clients/{ClientType}/stats" + if params != nil && params.ClientType != nil { + path = strings.Replace(path, "{"+"ClientType"+"}", fmt.Sprint(*params.ClientType), -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartDate != nil { + data.Set("start_date", *params.StartDate) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", *params.EndDate) + } + if params != nil && params.AggregatedBy != nil { + data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListClientStat200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/stats/api_list_browser_stat.go b/rest/api/v3/stats/api_list_browser_stat.go new file mode 100644 index 00000000..ba98d00b --- /dev/null +++ b/rest/api/v3/stats/api_list_browser_stat.go @@ -0,0 +1,115 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListBrowserStatParam struct { + // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. + StartDate *string `json:"start_date"` + // The browsers to get statistics for. You can include up to 10 different browsers by including this parameter multiple times. + Browsers *string `json:"browsers,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // The number of results to return. + Limit *int32 `json:"limit,omitempty"` + // The point in the list to begin retrieving results. + Offset *int32 `json:"offset,omitempty"` + // How to group the statistics. Must be either \"day\", \"week\", or \"month\". + AggregatedBy *AggregatedBy3 `json:"aggregated_by,omitempty"` + // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + EndDate *string `json:"end_date,omitempty"` +} + +func (params *ListBrowserStatParam) SetStartDate(StartDate string) *ListBrowserStatParam { + params.StartDate = &StartDate + return params +} +func (params *ListBrowserStatParam) SetBrowsers(Browsers string) *ListBrowserStatParam { + params.Browsers = &Browsers + return params +} +func (params *ListBrowserStatParam) SetOnbehalfof(Onbehalfof string) *ListBrowserStatParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *ListBrowserStatParam) SetLimit(Limit int32) *ListBrowserStatParam { + params.Limit = &Limit + return params +} +func (params *ListBrowserStatParam) SetOffset(Offset int32) *ListBrowserStatParam { + params.Offset = &Offset + return params +} +func (params *ListBrowserStatParam) SetAggregatedBy(AggregatedBy AggregatedBy3) *ListBrowserStatParam { + params.AggregatedBy = &AggregatedBy + return params +} +func (params *ListBrowserStatParam) SetEndDate(EndDate string) *ListBrowserStatParam { + params.EndDate = &EndDate + return params +} + +// **This endpoint allows you to retrieve your email statistics segmented by browser type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). +func (c *ApiService) ListBrowserStat(params *ListBrowserStatParam) (interface{}, error) { + path := "/v3/browsers/stats" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartDate != nil { + data.Set("start_date", *params.StartDate) + } + if params != nil && params.Browsers != nil { + data.Set("browsers", *params.Browsers) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + if params != nil && params.AggregatedBy != nil { + data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", *params.EndDate) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListBrowserStat200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/stats/api_list_category.go b/rest/api/v3/stats/api_list_category.go new file mode 100644 index 00000000..7e8feae7 --- /dev/null +++ b/rest/api/v3/stats/api_list_category.go @@ -0,0 +1,96 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListCategoryParam struct { + // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. + Limit *int32 `json:"limit,omitempty"` + // Allows you to perform a prefix search on this particular category. + Category *string `json:"category,omitempty"` + // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + Offset *int32 `json:"offset,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListCategoryParam) SetLimit(Limit int32) *ListCategoryParam { + params.Limit = &Limit + return params +} +func (params *ListCategoryParam) SetCategory(Category string) *ListCategoryParam { + params.Category = &Category + return params +} +func (params *ListCategoryParam) SetOffset(Offset int32) *ListCategoryParam { + params.Offset = &Offset + return params +} +func (params *ListCategoryParam) SetOnbehalfof(Onbehalfof string) *ListCategoryParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a paginated list of all of your categories.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. +func (c *ApiService) ListCategory(params *ListCategoryParam) (interface{}, error) { + path := "/v3/categories" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Category != nil { + data.Set("category", *params.Category) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListCategory200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ListCategory400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/stats/api_list_category_stat.go b/rest/api/v3/stats/api_list_category_stat.go new file mode 100644 index 00000000..c3fdfd6d --- /dev/null +++ b/rest/api/v3/stats/api_list_category_stat.go @@ -0,0 +1,97 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListCategoryStatParam struct { + // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD + StartDate *string `json:"start_date"` + // The individual categories that you want to retrieve statistics for. You may include up to 10 different categories. + Categories *string `json:"categories"` + // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + EndDate *string `json:"end_date,omitempty"` + // How to group the statistics. Must be either \"day\", \"week\", or \"month\". + AggregatedBy *AggregatedBy `json:"aggregated_by,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListCategoryStatParam) SetStartDate(StartDate string) *ListCategoryStatParam { + params.StartDate = &StartDate + return params +} +func (params *ListCategoryStatParam) SetCategories(Categories string) *ListCategoryStatParam { + params.Categories = &Categories + return params +} +func (params *ListCategoryStatParam) SetEndDate(EndDate string) *ListCategoryStatParam { + params.EndDate = &EndDate + return params +} +func (params *ListCategoryStatParam) SetAggregatedBy(AggregatedBy AggregatedBy) *ListCategoryStatParam { + params.AggregatedBy = &AggregatedBy + return params +} +func (params *ListCategoryStatParam) SetOnbehalfof(Onbehalfof string) *ListCategoryStatParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve all of your email statistics for each of your categories.** If you do not define any query parameters, this endpoint will return a sum for each category in groups of 10. +func (c *ApiService) ListCategoryStat(params *ListCategoryStatParam) (interface{}, error) { + path := "/v3/categories/stats" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartDate != nil { + data.Set("start_date", *params.StartDate) + } + if params != nil && params.Categories != nil { + data.Set("categories", *params.Categories) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", *params.EndDate) + } + if params != nil && params.AggregatedBy != nil { + data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]CategoryStats{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/stats/api_list_category_stat_sum.go b/rest/api/v3/stats/api_list_category_stat_sum.go new file mode 100644 index 00000000..4e438e67 --- /dev/null +++ b/rest/api/v3/stats/api_list_category_stat_sum.go @@ -0,0 +1,124 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListCategoryStatSumParam struct { + // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. + StartDate *string `json:"start_date"` + // The metric that you want to sort by. Must be a single metric. + SortByMetric *string `json:"sort_by_metric,omitempty"` + // The direction you want to sort. + SortByDirection *SortByDirection `json:"sort_by_direction,omitempty"` + // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + EndDate *string `json:"end_date,omitempty"` + // Limits the number of results returned. + Limit *int32 `json:"limit,omitempty"` + // The point in the list to begin retrieving results. + Offset *int32 `json:"offset,omitempty"` + // How to group the statistics. Must be either \"day\", \"week\", or \"month\". + AggregatedBy *AggregatedBy1 `json:"aggregated_by,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListCategoryStatSumParam) SetStartDate(StartDate string) *ListCategoryStatSumParam { + params.StartDate = &StartDate + return params +} +func (params *ListCategoryStatSumParam) SetSortByMetric(SortByMetric string) *ListCategoryStatSumParam { + params.SortByMetric = &SortByMetric + return params +} +func (params *ListCategoryStatSumParam) SetSortByDirection(SortByDirection SortByDirection) *ListCategoryStatSumParam { + params.SortByDirection = &SortByDirection + return params +} +func (params *ListCategoryStatSumParam) SetEndDate(EndDate string) *ListCategoryStatSumParam { + params.EndDate = &EndDate + return params +} +func (params *ListCategoryStatSumParam) SetLimit(Limit int32) *ListCategoryStatSumParam { + params.Limit = &Limit + return params +} +func (params *ListCategoryStatSumParam) SetOffset(Offset int32) *ListCategoryStatSumParam { + params.Offset = &Offset + return params +} +func (params *ListCategoryStatSumParam) SetAggregatedBy(AggregatedBy AggregatedBy1) *ListCategoryStatSumParam { + params.AggregatedBy = &AggregatedBy + return params +} +func (params *ListCategoryStatSumParam) SetOnbehalfof(Onbehalfof string) *ListCategoryStatSumParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve the total sum of each email statistic for every category over the given date range.** If you do not define any query parameters, this endpoint will return a sum for each category in groups of 10. +func (c *ApiService) ListCategoryStatSum(params *ListCategoryStatSumParam) (interface{}, error) { + path := "/v3/categories/stats/sums" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartDate != nil { + data.Set("start_date", *params.StartDate) + } + if params != nil && params.SortByMetric != nil { + data.Set("sort_by_metric", *params.SortByMetric) + } + if params != nil && params.SortByDirection != nil { + data.Set("sort_by_direction", fmt.Sprint(*params.SortByDirection)) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", *params.EndDate) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + if params != nil && params.AggregatedBy != nil { + data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &CategoryStats{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/stats/api_list_client_stat.go b/rest/api/v3/stats/api_list_client_stat.go new file mode 100644 index 00000000..baa57667 --- /dev/null +++ b/rest/api/v3/stats/api_list_client_stat.go @@ -0,0 +1,88 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListClientStatParam struct { + // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. + StartDate *string `json:"start_date"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + EndDate *string `json:"end_date,omitempty"` + // How to group the statistics. Must be either \"day\", \"week\", or \"month\". + AggregatedBy *AggregatedBy2 `json:"aggregated_by,omitempty"` +} + +func (params *ListClientStatParam) SetStartDate(StartDate string) *ListClientStatParam { + params.StartDate = &StartDate + return params +} +func (params *ListClientStatParam) SetOnbehalfof(Onbehalfof string) *ListClientStatParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *ListClientStatParam) SetEndDate(EndDate string) *ListClientStatParam { + params.EndDate = &EndDate + return params +} +func (params *ListClientStatParam) SetAggregatedBy(AggregatedBy AggregatedBy2) *ListClientStatParam { + params.AggregatedBy = &AggregatedBy + return params +} + +// **This endpoint allows you to retrieve your email statistics segmented by client type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). +func (c *ApiService) ListClientStat(params *ListClientStatParam) (interface{}, error) { + path := "/v3/clients/stats" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartDate != nil { + data.Set("start_date", *params.StartDate) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", *params.EndDate) + } + if params != nil && params.AggregatedBy != nil { + data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListClientStat200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/stats/api_list_device_stat.go b/rest/api/v3/stats/api_list_device_stat.go new file mode 100644 index 00000000..0f099f97 --- /dev/null +++ b/rest/api/v3/stats/api_list_device_stat.go @@ -0,0 +1,106 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListDeviceStatParam struct { + // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. + StartDate *string `json:"start_date"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // The number of results to return. + Limit *int32 `json:"limit,omitempty"` + // The point in the list to begin retrieving results. + Offset *int32 `json:"offset,omitempty"` + // How to group the statistics. Must be either \"day\", \"week\", or \"month\". + AggregatedBy *AggregatedBy3 `json:"aggregated_by,omitempty"` + // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + EndDate *string `json:"end_date,omitempty"` +} + +func (params *ListDeviceStatParam) SetStartDate(StartDate string) *ListDeviceStatParam { + params.StartDate = &StartDate + return params +} +func (params *ListDeviceStatParam) SetOnbehalfof(Onbehalfof string) *ListDeviceStatParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *ListDeviceStatParam) SetLimit(Limit int32) *ListDeviceStatParam { + params.Limit = &Limit + return params +} +func (params *ListDeviceStatParam) SetOffset(Offset int32) *ListDeviceStatParam { + params.Offset = &Offset + return params +} +func (params *ListDeviceStatParam) SetAggregatedBy(AggregatedBy AggregatedBy3) *ListDeviceStatParam { + params.AggregatedBy = &AggregatedBy + return params +} +func (params *ListDeviceStatParam) SetEndDate(EndDate string) *ListDeviceStatParam { + params.EndDate = &EndDate + return params +} + +// **This endpoint allows you to retrieve your email statistics segmented by the device type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. ## Available Device Types | **Device** | **Description** | **Example** | |---|---|---| | Desktop | Email software on desktop computer. | I.E., Outlook, Sparrow, or Apple Mail. | | Webmail | A web-based email client. | I.E., Yahoo, Google, AOL, or Outlook.com. | | Phone | A smart phone. | iPhone, Android, Blackberry, etc. | Tablet | A tablet computer. | iPad, android based tablet, etc. | | Other | An unrecognized device. | Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). +func (c *ApiService) ListDeviceStat(params *ListDeviceStatParam) (interface{}, error) { + path := "/v3/devices/stats" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartDate != nil { + data.Set("start_date", *params.StartDate) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + if params != nil && params.AggregatedBy != nil { + data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", *params.EndDate) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListClientStat200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/stats/api_list_geo_stat.go b/rest/api/v3/stats/api_list_geo_stat.go new file mode 100644 index 00000000..fda486f1 --- /dev/null +++ b/rest/api/v3/stats/api_list_geo_stat.go @@ -0,0 +1,115 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListGeoStatParam struct { + // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. + StartDate *string `json:"start_date"` + // The country you would like to see statistics for. Currently only supported for US and CA. + Country *Country `json:"country,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // The number of results to return. + Limit *int32 `json:"limit,omitempty"` + // The point in the list to begin retrieving results. + Offset *int32 `json:"offset,omitempty"` + // How to group the statistics. Must be either \"day\", \"week\", or \"month\". + AggregatedBy *AggregatedBy3 `json:"aggregated_by,omitempty"` + // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + EndDate *string `json:"end_date,omitempty"` +} + +func (params *ListGeoStatParam) SetStartDate(StartDate string) *ListGeoStatParam { + params.StartDate = &StartDate + return params +} +func (params *ListGeoStatParam) SetCountry(Country Country) *ListGeoStatParam { + params.Country = &Country + return params +} +func (params *ListGeoStatParam) SetOnbehalfof(Onbehalfof string) *ListGeoStatParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *ListGeoStatParam) SetLimit(Limit int32) *ListGeoStatParam { + params.Limit = &Limit + return params +} +func (params *ListGeoStatParam) SetOffset(Offset int32) *ListGeoStatParam { + params.Offset = &Offset + return params +} +func (params *ListGeoStatParam) SetAggregatedBy(AggregatedBy AggregatedBy3) *ListGeoStatParam { + params.AggregatedBy = &AggregatedBy + return params +} +func (params *ListGeoStatParam) SetEndDate(EndDate string) *ListGeoStatParam { + params.EndDate = &EndDate + return params +} + +// **This endpoint allows you to retrieve your email statistics segmented by country and state/province.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [User Guide](https://wwww.twilio.com/docs/sendgrid/ui/analytics-and-reporting/stats-overview). +func (c *ApiService) ListGeoStat(params *ListGeoStatParam) (interface{}, error) { + path := "/v3/geo/stats" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartDate != nil { + data.Set("start_date", *params.StartDate) + } + if params != nil && params.Country != nil { + data.Set("country", fmt.Sprint(*params.Country)) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + if params != nil && params.AggregatedBy != nil { + data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", *params.EndDate) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListGeoStat200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/stats/api_list_mailbox_provider_stat.go b/rest/api/v3/stats/api_list_mailbox_provider_stat.go new file mode 100644 index 00000000..b9e15837 --- /dev/null +++ b/rest/api/v3/stats/api_list_mailbox_provider_stat.go @@ -0,0 +1,115 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListMailboxProviderStatParam struct { + // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. + StartDate *string `json:"start_date"` + // The mail box providers to get statistics for. You can include up to 10 by including this parameter multiple times. + MailboxProviders *string `json:"mailbox_providers,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // The number of results to return. + Limit *int32 `json:"limit,omitempty"` + // The point in the list to begin retrieving results. + Offset *int32 `json:"offset,omitempty"` + // How to group the statistics. Must be either \"day\", \"week\", or \"month\". + AggregatedBy *AggregatedBy3 `json:"aggregated_by,omitempty"` + // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + EndDate *string `json:"end_date,omitempty"` +} + +func (params *ListMailboxProviderStatParam) SetStartDate(StartDate string) *ListMailboxProviderStatParam { + params.StartDate = &StartDate + return params +} +func (params *ListMailboxProviderStatParam) SetMailboxProviders(MailboxProviders string) *ListMailboxProviderStatParam { + params.MailboxProviders = &MailboxProviders + return params +} +func (params *ListMailboxProviderStatParam) SetOnbehalfof(Onbehalfof string) *ListMailboxProviderStatParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *ListMailboxProviderStatParam) SetLimit(Limit int32) *ListMailboxProviderStatParam { + params.Limit = &Limit + return params +} +func (params *ListMailboxProviderStatParam) SetOffset(Offset int32) *ListMailboxProviderStatParam { + params.Offset = &Offset + return params +} +func (params *ListMailboxProviderStatParam) SetAggregatedBy(AggregatedBy AggregatedBy3) *ListMailboxProviderStatParam { + params.AggregatedBy = &AggregatedBy + return params +} +func (params *ListMailboxProviderStatParam) SetEndDate(EndDate string) *ListMailboxProviderStatParam { + params.EndDate = &EndDate + return params +} + +// **This endpoint allows you to retrieve your email statistics segmented by recipient mailbox provider.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). +func (c *ApiService) ListMailboxProviderStat(params *ListMailboxProviderStatParam) (interface{}, error) { + path := "/v3/mailbox_providers/stats" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartDate != nil { + data.Set("start_date", *params.StartDate) + } + if params != nil && params.MailboxProviders != nil { + data.Set("mailbox_providers", *params.MailboxProviders) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + if params != nil && params.AggregatedBy != nil { + data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", *params.EndDate) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListMailboxProviderStat200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/stats/api_list_stat.go b/rest/api/v3/stats/api_list_stat.go new file mode 100644 index 00000000..ee9c2531 --- /dev/null +++ b/rest/api/v3/stats/api_list_stat.go @@ -0,0 +1,106 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListStatParam struct { + // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. + StartDate *string `json:"start_date"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // The number of results to return. + Limit *int32 `json:"limit,omitempty"` + // The point in the list to begin retrieving results. + Offset *int32 `json:"offset,omitempty"` + // How to group the statistics. Must be either \"day\", \"week\", or \"month\". + AggregatedBy *AggregatedBy3 `json:"aggregated_by,omitempty"` + // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + EndDate *string `json:"end_date,omitempty"` +} + +func (params *ListStatParam) SetStartDate(StartDate string) *ListStatParam { + params.StartDate = &StartDate + return params +} +func (params *ListStatParam) SetOnbehalfof(Onbehalfof string) *ListStatParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *ListStatParam) SetLimit(Limit int32) *ListStatParam { + params.Limit = &Limit + return params +} +func (params *ListStatParam) SetOffset(Offset int32) *ListStatParam { + params.Offset = &Offset + return params +} +func (params *ListStatParam) SetAggregatedBy(AggregatedBy AggregatedBy3) *ListStatParam { + params.AggregatedBy = &AggregatedBy + return params +} +func (params *ListStatParam) SetEndDate(EndDate string) *ListStatParam { + params.EndDate = &EndDate + return params +} + +// **This endpoint allows you to retrieve all of your global email statistics between a given date range.** Parent accounts can see either aggregated stats for the parent account or aggregated stats for a subuser specified in the `on-behalf-of` header. Subuser accounts will see only their own stats. +func (c *ApiService) ListStat(params *ListStatParam) (interface{}, error) { + path := "/v3/stats" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartDate != nil { + data.Set("start_date", *params.StartDate) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + if params != nil && params.AggregatedBy != nil { + data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", *params.EndDate) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListStat200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/stats/api_service.go b/rest/api/v3/stats/api_service.go new file mode 100644 index 00000000..29d8f9f5 --- /dev/null +++ b/rest/api/v3/stats/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/stats/docs/AdvancedStatsClicks.md b/rest/api/v3/stats/docs/AdvancedStatsClicks.md new file mode 100644 index 00000000..3f2f87ae --- /dev/null +++ b/rest/api/v3/stats/docs/AdvancedStatsClicks.md @@ -0,0 +1,12 @@ +# AdvancedStatsClicks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Clicks** | **int32** | The number of links that were clicked in your emails. |[optional] +**UniqueClicks** | **int32** | The number of unique recipients who clicked links in your emails. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/AdvancedStatsClicksOpens.md b/rest/api/v3/stats/docs/AdvancedStatsClicksOpens.md new file mode 100644 index 00000000..38d8c2e1 --- /dev/null +++ b/rest/api/v3/stats/docs/AdvancedStatsClicksOpens.md @@ -0,0 +1,14 @@ +# AdvancedStatsClicksOpens + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Clicks** | **int32** | The number of links that were clicked in your emails. |[optional] +**UniqueClicks** | **int32** | The number of unique recipients who clicked links in your emails. |[optional] +**Opens** | **int32** | The total number of times your emails were opened by recipients. |[optional] +**UniqueOpens** | **int32** | The number of unique recipients who opened your emails. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/AdvancedStatsMailboxProvider.md b/rest/api/v3/stats/docs/AdvancedStatsMailboxProvider.md new file mode 100644 index 00000000..403c4943 --- /dev/null +++ b/rest/api/v3/stats/docs/AdvancedStatsMailboxProvider.md @@ -0,0 +1,18 @@ +# AdvancedStatsMailboxProvider + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Blocks** | **int32** | The number of emails that were not allowed to be delivered by ISPs. |[optional] +**Bounces** | **int32** | The number of emails that bounced instead of being delivered. |[optional] +**Deferred** | **int32** | The number of emails that temporarily could not be delivered. |[optional] +**Delivered** | **int32** | The number of emails SendGrid was able to confirm were actually delivered to a recipient. |[optional] +**Drops** | **int32** | The number of emails that were not delivered due to the recipient email address being on a suppression list. |[optional] +**Requests** | **int32** | The number of emails that were requested to be delivered. |[optional] +**Processed** | **int32** | Requests from your website, application, or mail client via SMTP Relay or the Web API that SendGrid processed. |[optional] +**SpamReports** | **int32** | The number of recipients who marked your email as spam. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/AdvancedStatsOpens.md b/rest/api/v3/stats/docs/AdvancedStatsOpens.md new file mode 100644 index 00000000..ebab3e99 --- /dev/null +++ b/rest/api/v3/stats/docs/AdvancedStatsOpens.md @@ -0,0 +1,12 @@ +# AdvancedStatsOpens + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Opens** | **int32** | The total number of times your emails were opened by recipients. |[optional] +**UniqueOpens** | **int32** | The number of unique recipients who opened your emails. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/AggregatedBy.md b/rest/api/v3/stats/docs/AggregatedBy.md new file mode 100644 index 00000000..96f02c9f --- /dev/null +++ b/rest/api/v3/stats/docs/AggregatedBy.md @@ -0,0 +1,14 @@ +# AggregatedBy + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DAY** | string | (value: `"day"`) +**WEEK** | string | (value: `"week"`) +**MONTH** | string | (value: `"month"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/AggregatedBy1.md b/rest/api/v3/stats/docs/AggregatedBy1.md new file mode 100644 index 00000000..b34f829d --- /dev/null +++ b/rest/api/v3/stats/docs/AggregatedBy1.md @@ -0,0 +1,14 @@ +# AggregatedBy1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DAY** | string | (value: `"day"`) +**WEEK** | string | (value: `"week"`) +**MONTH** | string | (value: `"month"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/AggregatedBy2.md b/rest/api/v3/stats/docs/AggregatedBy2.md new file mode 100644 index 00000000..9bf04eed --- /dev/null +++ b/rest/api/v3/stats/docs/AggregatedBy2.md @@ -0,0 +1,14 @@ +# AggregatedBy2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DAY** | string | (value: `"day"`) +**WEEK** | string | (value: `"week"`) +**MONTH** | string | (value: `"month"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/AggregatedBy3.md b/rest/api/v3/stats/docs/AggregatedBy3.md new file mode 100644 index 00000000..7504b230 --- /dev/null +++ b/rest/api/v3/stats/docs/AggregatedBy3.md @@ -0,0 +1,14 @@ +# AggregatedBy3 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DAY** | string | (value: `"day"`) +**WEEK** | string | (value: `"week"`) +**MONTH** | string | (value: `"month"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/CategoryStats.md b/rest/api/v3/stats/docs/CategoryStats.md new file mode 100644 index 00000000..2b136fe2 --- /dev/null +++ b/rest/api/v3/stats/docs/CategoryStats.md @@ -0,0 +1,12 @@ +# CategoryStats + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | **string** | The date the statistics were gathered. | +**Stats** | [**[]CategoryStatsStatsInner**](CategoryStatsStatsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/CategoryStatsStatsInner.md b/rest/api/v3/stats/docs/CategoryStatsStatsInner.md new file mode 100644 index 00000000..9c188e0c --- /dev/null +++ b/rest/api/v3/stats/docs/CategoryStatsStatsInner.md @@ -0,0 +1,13 @@ +# CategoryStatsStatsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Metrics** | [**CategoryStatsStatsInnerMetrics**](CategoryStatsStatsInnerMetrics.md) | |[optional] +**Name** | **string** | The name of the category. |[optional] +**Type** | **string** | How you are segmenting your statistics. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/CategoryStatsStatsInnerMetrics.md b/rest/api/v3/stats/docs/CategoryStatsStatsInnerMetrics.md new file mode 100644 index 00000000..8129c1f4 --- /dev/null +++ b/rest/api/v3/stats/docs/CategoryStatsStatsInnerMetrics.md @@ -0,0 +1,26 @@ +# CategoryStatsStatsInnerMetrics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Blocks** | **int32** | The number of emails that were not allowed to be delivered by ISPs. | +**BounceDrops** | **int32** | The number of emails that were dropped because of a bounce. | +**Bounces** | **int32** | The number of emails that bounced instead of being delivered. | +**Clicks** | **int32** | The number of links that were clicked. | +**Deferred** | **int32** | The number of emails that temporarily could not be delivered. | +**Delivered** | **int32** | The number of emails SendGrid was able to confirm were actually delivered to a recipient. | +**InvalidEmails** | **int32** | The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. | +**Opens** | **int32** | The total number of times your emails were opened by recipients. | +**Processed** | **int32** | Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. | +**Requests** | **int32** | The number of emails that were requested to be delivered. | +**SpamReportDrops** | **int32** | The number of emails that were dropped due to a recipient previously marking your emails as spam. | +**SpamReports** | **int32** | The number of recipients who marked your email as spam. | +**UniqueClicks** | **int32** | The number of unique recipients who clicked links in your emails. | +**UniqueOpens** | **int32** | The number of unique recipients who opened your emails. | +**UnsubscribeDrops** | **int32** | The number of emails dropped due to a recipient unsubscribing from your emails. | +**Unsubscribes** | **int32** | The number of recipients who unsubscribed from your emails. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ClientType.md b/rest/api/v3/stats/docs/ClientType.md new file mode 100644 index 00000000..8a7f8487 --- /dev/null +++ b/rest/api/v3/stats/docs/ClientType.md @@ -0,0 +1,15 @@ +# ClientType + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**PHONE** | string | (value: `"phone"`) +**TABLET** | string | (value: `"tablet"`) +**WEBMAIL** | string | (value: `"webmail"`) +**DESKTOP** | string | (value: `"desktop"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/Country.md b/rest/api/v3/stats/docs/Country.md new file mode 100644 index 00000000..00c5f179 --- /dev/null +++ b/rest/api/v3/stats/docs/Country.md @@ -0,0 +1,13 @@ +# Country + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**US** | string | (value: `"US"`) +**CA** | string | (value: `"CA"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/GetClientStat.md b/rest/api/v3/stats/docs/GetClientStat.md new file mode 100644 index 00000000..bdd7639d --- /dev/null +++ b/rest/api/v3/stats/docs/GetClientStat.md @@ -0,0 +1,54 @@ +# GetClientStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetClientStat**](GetClientStat.md#GetClientStat) | **Get** /v3/clients/{ClientType}/stats | Retrieve stats by a specific client type. + + + +## GetClientStat + +> []ListClientStat200ResponseInner GetClientStat(ctx, StartDateClientTypeoptional) + +Retrieve stats by a specific client type. + +**This endpoint allows you to retrieve your email statistics segmented by a specific client type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. ### Available Client Types - phone - tablet - webmail - desktop Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**ClientType** | [**ClientType**](ClientType.md) | Specifies the type of client to retrieve stats for. Must be either \"phone\", \"tablet\", \"webmail\", or \"desktop\". + +### Other Parameters + +Other parameters are passed through a pointer to a GetClientStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. +**AggregatedBy** | [**AggregatedBy2**](AggregatedBy2AggregatedBy2.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". + +### Return type + +[**[]ListClientStat200ResponseInner**](ListClientStat200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/stats/docs/ListBrowserStat.md b/rest/api/v3/stats/docs/ListBrowserStat.md new file mode 100644 index 00000000..00b5d584 --- /dev/null +++ b/rest/api/v3/stats/docs/ListBrowserStat.md @@ -0,0 +1,53 @@ +# ListBrowserStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListBrowserStat**](ListBrowserStat.md#ListBrowserStat) | **Get** /v3/browsers/stats | Retrieve email statistics by browser. + + + +## ListBrowserStat + +> []ListBrowserStat200ResponseInner ListBrowserStat(ctx, StartDateoptional) + +Retrieve email statistics by browser. + +**This endpoint allows you to retrieve your email statistics segmented by browser type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListBrowserStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Browsers** | **string** | The browsers to get statistics for. You can include up to 10 different browsers by including this parameter multiple times. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**Limit** | **int32** | The number of results to return. +**Offset** | **int32** | The point in the list to begin retrieving results. +**AggregatedBy** | [**AggregatedBy3**](AggregatedBy3AggregatedBy3.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". +**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + +### Return type + +[**[]ListBrowserStat200ResponseInner**](ListBrowserStat200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/stats/docs/ListBrowserStat200ResponseInner.md b/rest/api/v3/stats/docs/ListBrowserStat200ResponseInner.md new file mode 100644 index 00000000..b4f98ab1 --- /dev/null +++ b/rest/api/v3/stats/docs/ListBrowserStat200ResponseInner.md @@ -0,0 +1,12 @@ +# ListBrowserStat200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | **string** | The date that the statistics were gathered. |[optional] +**Stats** | [**[]ListBrowserStat200ResponseInnerStatsInner**](ListBrowserStat200ResponseInnerStatsInner.md) | The list of statistics. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ListBrowserStat200ResponseInnerStatsInner.md b/rest/api/v3/stats/docs/ListBrowserStat200ResponseInnerStatsInner.md new file mode 100644 index 00000000..42ea5d07 --- /dev/null +++ b/rest/api/v3/stats/docs/ListBrowserStat200ResponseInnerStatsInner.md @@ -0,0 +1,13 @@ +# ListBrowserStat200ResponseInnerStatsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | The type of segmentation. |[optional] +**Name** | **string** | The name of the specific segmentation. |[optional] +**Metrics** | [**AdvancedStatsClicks**](AdvancedStatsClicks.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ListCategory.md b/rest/api/v3/stats/docs/ListCategory.md new file mode 100644 index 00000000..02a75cbb --- /dev/null +++ b/rest/api/v3/stats/docs/ListCategory.md @@ -0,0 +1,51 @@ +# ListCategory + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListCategory**](ListCategory.md#ListCategory) | **Get** /v3/categories | Retrieve all categories + + + +## ListCategory + +> []ListCategory200ResponseInner ListCategory(ctx, optional) + +Retrieve all categories + +**This endpoint allows you to retrieve a paginated list of all of your categories.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListCategoryParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. +**Category** | **string** | Allows you to perform a prefix search on this particular category. +**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**[]ListCategory200ResponseInner**](ListCategory200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/stats/docs/ListCategory200ResponseInner.md b/rest/api/v3/stats/docs/ListCategory200ResponseInner.md new file mode 100644 index 00000000..528bed33 --- /dev/null +++ b/rest/api/v3/stats/docs/ListCategory200ResponseInner.md @@ -0,0 +1,11 @@ +# ListCategory200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Category** | **string** | A category used to group emails by broad topic. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ListCategory400Response.md b/rest/api/v3/stats/docs/ListCategory400Response.md new file mode 100644 index 00000000..1163a96f --- /dev/null +++ b/rest/api/v3/stats/docs/ListCategory400Response.md @@ -0,0 +1,11 @@ +# ListCategory400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ListCategory400ResponseErrorsInner**](ListCategory400ResponseErrorsInner.md) | The error returned. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ListCategory400ResponseErrorsInner.md b/rest/api/v3/stats/docs/ListCategory400ResponseErrorsInner.md new file mode 100644 index 00000000..413c97ee --- /dev/null +++ b/rest/api/v3/stats/docs/ListCategory400ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# ListCategory400ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | | +**Message** | **string** | A message explaining why your categories could not be retrieved. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ListCategoryStat.md b/rest/api/v3/stats/docs/ListCategoryStat.md new file mode 100644 index 00000000..715c2215 --- /dev/null +++ b/rest/api/v3/stats/docs/ListCategoryStat.md @@ -0,0 +1,50 @@ +# ListCategoryStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListCategoryStat**](ListCategoryStat.md#ListCategoryStat) | **Get** /v3/categories/stats | Retrieve Email Statistics for Categories + + + +## ListCategoryStat + +> []CategoryStats ListCategoryStat(ctx, StartDateCategoriesoptional) + +Retrieve Email Statistics for Categories + +**This endpoint allows you to retrieve all of your email statistics for each of your categories.** If you do not define any query parameters, this endpoint will return a sum for each category in groups of 10. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListCategoryStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. +**AggregatedBy** | [**AggregatedBy**](AggregatedByAggregatedBy.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**[]CategoryStats**](CategoryStats.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/stats/docs/ListCategoryStatSum.md b/rest/api/v3/stats/docs/ListCategoryStatSum.md new file mode 100644 index 00000000..18067fc6 --- /dev/null +++ b/rest/api/v3/stats/docs/ListCategoryStatSum.md @@ -0,0 +1,54 @@ +# ListCategoryStatSum + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListCategoryStatSum**](ListCategoryStatSum.md#ListCategoryStatSum) | **Get** /v3/categories/stats/sums | Retrieve sums of email stats for each category. + + + +## ListCategoryStatSum + +> CategoryStats ListCategoryStatSum(ctx, StartDateoptional) + +Retrieve sums of email stats for each category. + +**This endpoint allows you to retrieve the total sum of each email statistic for every category over the given date range.** If you do not define any query parameters, this endpoint will return a sum for each category in groups of 10. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListCategoryStatSumParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**SortByMetric** | **string** | The metric that you want to sort by. Must be a single metric. +**SortByDirection** | [**SortByDirection**](SortByDirectionSortByDirection.md) | The direction you want to sort. +**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. +**Limit** | **int32** | Limits the number of results returned. +**Offset** | **int32** | The point in the list to begin retrieving results. +**AggregatedBy** | [**AggregatedBy1**](AggregatedBy1AggregatedBy1.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**CategoryStats**](CategoryStats.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/stats/docs/ListClientStat.md b/rest/api/v3/stats/docs/ListClientStat.md new file mode 100644 index 00000000..12cd3294 --- /dev/null +++ b/rest/api/v3/stats/docs/ListClientStat.md @@ -0,0 +1,50 @@ +# ListClientStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListClientStat**](ListClientStat.md#ListClientStat) | **Get** /v3/clients/stats | Retrieve email statistics by client type. + + + +## ListClientStat + +> []ListClientStat200ResponseInner ListClientStat(ctx, StartDateoptional) + +Retrieve email statistics by client type. + +**This endpoint allows you to retrieve your email statistics segmented by client type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListClientStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. +**AggregatedBy** | [**AggregatedBy2**](AggregatedBy2AggregatedBy2.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". + +### Return type + +[**[]ListClientStat200ResponseInner**](ListClientStat200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/stats/docs/ListClientStat200ResponseInner.md b/rest/api/v3/stats/docs/ListClientStat200ResponseInner.md new file mode 100644 index 00000000..dfc7e624 --- /dev/null +++ b/rest/api/v3/stats/docs/ListClientStat200ResponseInner.md @@ -0,0 +1,12 @@ +# ListClientStat200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | **string** | The date that the statistics were gathered. |[optional] +**Stats** | [**[]ListClientStat200ResponseInnerStatsInner**](ListClientStat200ResponseInnerStatsInner.md) | The list of statistics. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ListClientStat200ResponseInnerStatsInner.md b/rest/api/v3/stats/docs/ListClientStat200ResponseInnerStatsInner.md new file mode 100644 index 00000000..c065ab77 --- /dev/null +++ b/rest/api/v3/stats/docs/ListClientStat200ResponseInnerStatsInner.md @@ -0,0 +1,13 @@ +# ListClientStat200ResponseInnerStatsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | The type of segmentation. |[optional] +**Name** | **string** | The name of the specific segmentation. |[optional] +**Metrics** | [**AdvancedStatsOpens**](AdvancedStatsOpens.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ListDeviceStat.md b/rest/api/v3/stats/docs/ListDeviceStat.md new file mode 100644 index 00000000..e3f910f4 --- /dev/null +++ b/rest/api/v3/stats/docs/ListDeviceStat.md @@ -0,0 +1,52 @@ +# ListDeviceStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListDeviceStat**](ListDeviceStat.md#ListDeviceStat) | **Get** /v3/devices/stats | Retrieve email statistics by device type. + + + +## ListDeviceStat + +> []ListClientStat200ResponseInner ListDeviceStat(ctx, StartDateoptional) + +Retrieve email statistics by device type. + +**This endpoint allows you to retrieve your email statistics segmented by the device type.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. ## Available Device Types | **Device** | **Description** | **Example** | |---|---|---| | Desktop | Email software on desktop computer. | I.E., Outlook, Sparrow, or Apple Mail. | | Webmail | A web-based email client. | I.E., Yahoo, Google, AOL, or Outlook.com. | | Phone | A smart phone. | iPhone, Android, Blackberry, etc. | Tablet | A tablet computer. | iPad, android based tablet, etc. | | Other | An unrecognized device. | Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListDeviceStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**Limit** | **int32** | The number of results to return. +**Offset** | **int32** | The point in the list to begin retrieving results. +**AggregatedBy** | [**AggregatedBy3**](AggregatedBy3AggregatedBy3.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". +**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + +### Return type + +[**[]ListClientStat200ResponseInner**](ListClientStat200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/stats/docs/ListGeoStat.md b/rest/api/v3/stats/docs/ListGeoStat.md new file mode 100644 index 00000000..3c66f64e --- /dev/null +++ b/rest/api/v3/stats/docs/ListGeoStat.md @@ -0,0 +1,53 @@ +# ListGeoStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListGeoStat**](ListGeoStat.md#ListGeoStat) | **Get** /v3/geo/stats | Retrieve email statistics by country and state/province. + + + +## ListGeoStat + +> []ListGeoStat200ResponseInner ListGeoStat(ctx, StartDateoptional) + +Retrieve email statistics by country and state/province. + +**This endpoint allows you to retrieve your email statistics segmented by country and state/province.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [User Guide](https://wwww.twilio.com/docs/sendgrid/ui/analytics-and-reporting/stats-overview). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListGeoStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Country** | [**Country**](CountryCountry.md) | The country you would like to see statistics for. Currently only supported for US and CA. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**Limit** | **int32** | The number of results to return. +**Offset** | **int32** | The point in the list to begin retrieving results. +**AggregatedBy** | [**AggregatedBy3**](AggregatedBy3AggregatedBy3.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". +**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + +### Return type + +[**[]ListGeoStat200ResponseInner**](ListGeoStat200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/stats/docs/ListGeoStat200ResponseInner.md b/rest/api/v3/stats/docs/ListGeoStat200ResponseInner.md new file mode 100644 index 00000000..b8b712fe --- /dev/null +++ b/rest/api/v3/stats/docs/ListGeoStat200ResponseInner.md @@ -0,0 +1,12 @@ +# ListGeoStat200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | **string** | The date that the statistics were gathered. |[optional] +**Stats** | [**[]ListGeoStat200ResponseInnerStatsInner**](ListGeoStat200ResponseInnerStatsInner.md) | The list of statistics. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ListGeoStat200ResponseInnerStatsInner.md b/rest/api/v3/stats/docs/ListGeoStat200ResponseInnerStatsInner.md new file mode 100644 index 00000000..059cb893 --- /dev/null +++ b/rest/api/v3/stats/docs/ListGeoStat200ResponseInnerStatsInner.md @@ -0,0 +1,13 @@ +# ListGeoStat200ResponseInnerStatsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | The type of segmentation. |[optional] +**Name** | **string** | The name of the specific segmentation. |[optional] +**Metrics** | [**AdvancedStatsClicksOpens**](AdvancedStatsClicksOpens.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ListMailboxProviderStat.md b/rest/api/v3/stats/docs/ListMailboxProviderStat.md new file mode 100644 index 00000000..6500d3a7 --- /dev/null +++ b/rest/api/v3/stats/docs/ListMailboxProviderStat.md @@ -0,0 +1,53 @@ +# ListMailboxProviderStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListMailboxProviderStat**](ListMailboxProviderStat.md#ListMailboxProviderStat) | **Get** /v3/mailbox_providers/stats | Retrieve email statistics by mailbox provider. + + + +## ListMailboxProviderStat + +> []ListMailboxProviderStat200ResponseInner ListMailboxProviderStat(ctx, StartDateoptional) + +Retrieve email statistics by mailbox provider. + +**This endpoint allows you to retrieve your email statistics segmented by recipient mailbox provider.** **We only store up to 7 days of email activity in our database.** By default, 500 items will be returned per request via the Advanced Stats API endpoints. Advanced Stats provide a more in-depth view of your email statistics and the actions taken by your recipients. You can segment these statistics by geographic location, device type, client type, browser, and mailbox provider. For more information about statistics, please see our [Statistics Overview](https://sendgrid.com/docs/ui/analytics-and-reporting/stats-overview/). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListMailboxProviderStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**MailboxProviders** | **string** | The mail box providers to get statistics for. You can include up to 10 by including this parameter multiple times. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**Limit** | **int32** | The number of results to return. +**Offset** | **int32** | The point in the list to begin retrieving results. +**AggregatedBy** | [**AggregatedBy3**](AggregatedBy3AggregatedBy3.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". +**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + +### Return type + +[**[]ListMailboxProviderStat200ResponseInner**](ListMailboxProviderStat200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInner.md b/rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInner.md new file mode 100644 index 00000000..0e9cf740 --- /dev/null +++ b/rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInner.md @@ -0,0 +1,12 @@ +# ListMailboxProviderStat200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | **string** | The date that the statistics were gathered. |[optional] +**Stats** | [**[]ListMailboxProviderStat200ResponseInnerStatsInner**](ListMailboxProviderStat200ResponseInnerStatsInner.md) | The list of statistics. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInnerStatsInner.md b/rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInnerStatsInner.md new file mode 100644 index 00000000..73748c49 --- /dev/null +++ b/rest/api/v3/stats/docs/ListMailboxProviderStat200ResponseInnerStatsInner.md @@ -0,0 +1,13 @@ +# ListMailboxProviderStat200ResponseInnerStatsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | The type of segmentation. |[optional] +**Name** | **string** | The name of the specific segmentation. |[optional] +**Metrics** | [**AdvancedStatsMailboxProvider**](AdvancedStatsMailboxProvider.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ListStat.md b/rest/api/v3/stats/docs/ListStat.md new file mode 100644 index 00000000..b0afdd99 --- /dev/null +++ b/rest/api/v3/stats/docs/ListStat.md @@ -0,0 +1,52 @@ +# ListStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListStat**](ListStat.md#ListStat) | **Get** /v3/stats | Retrieve global email statistics + + + +## ListStat + +> []ListStat200ResponseInner ListStat(ctx, StartDateoptional) + +Retrieve global email statistics + +**This endpoint allows you to retrieve all of your global email statistics between a given date range.** Parent accounts can see either aggregated stats for the parent account or aggregated stats for a subuser specified in the `on-behalf-of` header. Subuser accounts will see only their own stats. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**Limit** | **int32** | The number of results to return. +**Offset** | **int32** | The point in the list to begin retrieving results. +**AggregatedBy** | [**AggregatedBy3**](AggregatedBy3AggregatedBy3.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". +**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + +### Return type + +[**[]ListStat200ResponseInner**](ListStat200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/stats/docs/ListStat200ResponseInner.md b/rest/api/v3/stats/docs/ListStat200ResponseInner.md new file mode 100644 index 00000000..e510d3d0 --- /dev/null +++ b/rest/api/v3/stats/docs/ListStat200ResponseInner.md @@ -0,0 +1,12 @@ +# ListStat200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | **string** | The date the stats were gathered. | +**Stats** | [**[]ListStat200ResponseInnerStatsInner**](ListStat200ResponseInnerStatsInner.md) | The individual email activity stats. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/ListStat200ResponseInnerStatsInner.md b/rest/api/v3/stats/docs/ListStat200ResponseInnerStatsInner.md new file mode 100644 index 00000000..7cfd11e2 --- /dev/null +++ b/rest/api/v3/stats/docs/ListStat200ResponseInnerStatsInner.md @@ -0,0 +1,11 @@ +# ListStat200ResponseInnerStatsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Metrics** | [**StatsAdvancedGlobalStats**](StatsAdvancedGlobalStats.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/SortByDirection.md b/rest/api/v3/stats/docs/SortByDirection.md new file mode 100644 index 00000000..0431e9a0 --- /dev/null +++ b/rest/api/v3/stats/docs/SortByDirection.md @@ -0,0 +1,13 @@ +# SortByDirection + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DESC** | string | (value: `"desc"`) +**ASC** | string | (value: `"asc"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/docs/StatsAdvancedGlobalStats.md b/rest/api/v3/stats/docs/StatsAdvancedGlobalStats.md new file mode 100644 index 00000000..cf8ff1d7 --- /dev/null +++ b/rest/api/v3/stats/docs/StatsAdvancedGlobalStats.md @@ -0,0 +1,26 @@ +# StatsAdvancedGlobalStats + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Clicks** | **int32** | The number of links that were clicked in your emails. |[optional] +**UniqueClicks** | **int32** | The number of unique recipients who clicked links in your emails. |[optional] +**Opens** | **int32** | The total number of times your emails were opened by recipients. |[optional] +**UniqueOpens** | **int32** | The number of unique recipients who opened your emails. |[optional] +**Blocks** | **int32** | The number of emails that were not allowed to be delivered by ISPs. |[optional] +**BounceDrops** | **int32** | The number of emails that were dropped because of a bounce. |[optional] +**Bounces** | **int32** | The number of emails that bounced instead of being delivered. |[optional] +**Deferred** | **int32** | The number of emails that temporarily could not be delivered. |[optional] +**Delivered** | **int32** | The number of emails SendGrid was able to confirm were actually delivered to a recipient. |[optional] +**InvalidEmails** | **int32** | The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. |[optional] +**Processed** | **int32** | Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. |[optional] +**Requests** | **int32** | The number of emails that were requested to be delivered. |[optional] +**SpamReportDrops** | **int32** | The number of emails that were dropped due to a recipient previously marking your emails as spam. |[optional] +**SpamReports** | **int32** | The number of recipients who marked your email as spam. |[optional] +**UnsubscribeDrops** | **int32** | The number of emails dropped due to a recipient unsubscribing from your emails. |[optional] +**Unsubscribes** | **int32** | The number of recipients who unsubscribed from your emails. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/stats/model_advanced_stats_clicks.go b/rest/api/v3/stats/model_advanced_stats_clicks.go new file mode 100644 index 00000000..e26aca54 --- /dev/null +++ b/rest/api/v3/stats/model_advanced_stats_clicks.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AdvancedStatsClicks The individual events and their stats. +type AdvancedStatsClicks struct { + // The number of links that were clicked in your emails. + Clicks *int32 `json:"clicks,omitempty"` + // The number of unique recipients who clicked links in your emails. + UniqueClicks *int32 `json:"unique_clicks,omitempty"` +} diff --git a/rest/api/v3/stats/model_advanced_stats_clicks_opens.go b/rest/api/v3/stats/model_advanced_stats_clicks_opens.go new file mode 100644 index 00000000..a8a339f8 --- /dev/null +++ b/rest/api/v3/stats/model_advanced_stats_clicks_opens.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AdvancedStatsClicksOpens The individual events and their stats. +type AdvancedStatsClicksOpens struct { + // The number of links that were clicked in your emails. + Clicks *int32 `json:"clicks,omitempty"` + // The number of unique recipients who clicked links in your emails. + UniqueClicks *int32 `json:"unique_clicks,omitempty"` + // The total number of times your emails were opened by recipients. + Opens *int32 `json:"opens,omitempty"` + // The number of unique recipients who opened your emails. + UniqueOpens *int32 `json:"unique_opens,omitempty"` +} diff --git a/rest/api/v3/stats/model_advanced_stats_mailbox_provider.go b/rest/api/v3/stats/model_advanced_stats_mailbox_provider.go new file mode 100644 index 00000000..ee75f598 --- /dev/null +++ b/rest/api/v3/stats/model_advanced_stats_mailbox_provider.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AdvancedStatsMailboxProvider The individual events and their stats. +type AdvancedStatsMailboxProvider struct { + // The number of emails that were not allowed to be delivered by ISPs. + Blocks *int32 `json:"blocks,omitempty"` + // The number of emails that bounced instead of being delivered. + Bounces *int32 `json:"bounces,omitempty"` + // The number of emails that temporarily could not be delivered. + Deferred *int32 `json:"deferred,omitempty"` + // The number of emails SendGrid was able to confirm were actually delivered to a recipient. + Delivered *int32 `json:"delivered,omitempty"` + // The number of emails that were not delivered due to the recipient email address being on a suppression list. + Drops *int32 `json:"drops,omitempty"` + // The number of emails that were requested to be delivered. + Requests *int32 `json:"requests,omitempty"` + // Requests from your website, application, or mail client via SMTP Relay or the Web API that SendGrid processed. + Processed *int32 `json:"processed,omitempty"` + // The number of recipients who marked your email as spam. + SpamReports *int32 `json:"spam_reports,omitempty"` +} diff --git a/rest/api/v3/stats/model_advanced_stats_opens.go b/rest/api/v3/stats/model_advanced_stats_opens.go new file mode 100644 index 00000000..8af689e0 --- /dev/null +++ b/rest/api/v3/stats/model_advanced_stats_opens.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AdvancedStatsOpens The individual events and their stats. +type AdvancedStatsOpens struct { + // The total number of times your emails were opened by recipients. + Opens *int32 `json:"opens,omitempty"` + // The number of unique recipients who opened your emails. + UniqueOpens *int32 `json:"unique_opens,omitempty"` +} diff --git a/rest/api/v3/stats/model_aggregated_by.go b/rest/api/v3/stats/model_aggregated_by.go new file mode 100644 index 00000000..7030e628 --- /dev/null +++ b/rest/api/v3/stats/model_aggregated_by.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AggregatedBy the model 'AggregatedBy' +type AggregatedBy string + +// List of AggregatedBy +const ( + AGGREGATEDBY_DAY AggregatedBy = "day" + AGGREGATEDBY_WEEK AggregatedBy = "week" + AGGREGATEDBY_MONTH AggregatedBy = "month" +) diff --git a/rest/api/v3/stats/model_aggregated_by1.go b/rest/api/v3/stats/model_aggregated_by1.go new file mode 100644 index 00000000..1d03db31 --- /dev/null +++ b/rest/api/v3/stats/model_aggregated_by1.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AggregatedBy1 the model 'AggregatedBy1' +type AggregatedBy1 string + +// List of AggregatedBy1 +const ( + AGGREGATEDBY1_DAY AggregatedBy1 = "day" + AGGREGATEDBY1_WEEK AggregatedBy1 = "week" + AGGREGATEDBY1_MONTH AggregatedBy1 = "month" +) diff --git a/rest/api/v3/stats/model_aggregated_by2.go b/rest/api/v3/stats/model_aggregated_by2.go new file mode 100644 index 00000000..d9a0ac73 --- /dev/null +++ b/rest/api/v3/stats/model_aggregated_by2.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AggregatedBy2 the model 'AggregatedBy2' +type AggregatedBy2 string + +// List of AggregatedBy2 +const ( + AGGREGATEDBY2_DAY AggregatedBy2 = "day" + AGGREGATEDBY2_WEEK AggregatedBy2 = "week" + AGGREGATEDBY2_MONTH AggregatedBy2 = "month" +) diff --git a/rest/api/v3/stats/model_aggregated_by3.go b/rest/api/v3/stats/model_aggregated_by3.go new file mode 100644 index 00000000..f5d4b9e4 --- /dev/null +++ b/rest/api/v3/stats/model_aggregated_by3.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AggregatedBy3 the model 'AggregatedBy3' +type AggregatedBy3 string + +// List of AggregatedBy3 +const ( + AGGREGATEDBY3_DAY AggregatedBy3 = "day" + AGGREGATEDBY3_WEEK AggregatedBy3 = "week" + AGGREGATEDBY3_MONTH AggregatedBy3 = "month" +) diff --git a/rest/api/v3/stats/model_category_stats.go b/rest/api/v3/stats/model_category_stats.go new file mode 100644 index 00000000..67f280ca --- /dev/null +++ b/rest/api/v3/stats/model_category_stats.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CategoryStats struct for CategoryStats +type CategoryStats struct { + // The date the statistics were gathered. + Date string `json:"date"` + Stats *[]CategoryStatsStatsInner `json:"stats,omitempty"` +} diff --git a/rest/api/v3/stats/model_category_stats_stats_inner.go b/rest/api/v3/stats/model_category_stats_stats_inner.go new file mode 100644 index 00000000..9484fa58 --- /dev/null +++ b/rest/api/v3/stats/model_category_stats_stats_inner.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CategoryStatsStatsInner struct for CategoryStatsStatsInner +type CategoryStatsStatsInner struct { + Metrics *CategoryStatsStatsInnerMetrics `json:"metrics,omitempty"` + // The name of the category. + Name *string `json:"name,omitempty"` + // How you are segmenting your statistics. + Type string `json:"type"` +} diff --git a/rest/api/v3/stats/model_category_stats_stats_inner_metrics.go b/rest/api/v3/stats/model_category_stats_stats_inner_metrics.go new file mode 100644 index 00000000..99765698 --- /dev/null +++ b/rest/api/v3/stats/model_category_stats_stats_inner_metrics.go @@ -0,0 +1,50 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CategoryStatsStatsInnerMetrics struct for CategoryStatsStatsInnerMetrics +type CategoryStatsStatsInnerMetrics struct { + // The number of emails that were not allowed to be delivered by ISPs. + Blocks int32 `json:"blocks"` + // The number of emails that were dropped because of a bounce. + BounceDrops int32 `json:"bounce_drops"` + // The number of emails that bounced instead of being delivered. + Bounces int32 `json:"bounces"` + // The number of links that were clicked. + Clicks int32 `json:"clicks"` + // The number of emails that temporarily could not be delivered. + Deferred int32 `json:"deferred"` + // The number of emails SendGrid was able to confirm were actually delivered to a recipient. + Delivered int32 `json:"delivered"` + // The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. + InvalidEmails int32 `json:"invalid_emails"` + // The total number of times your emails were opened by recipients. + Opens int32 `json:"opens"` + // Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. + Processed int32 `json:"processed"` + // The number of emails that were requested to be delivered. + Requests int32 `json:"requests"` + // The number of emails that were dropped due to a recipient previously marking your emails as spam. + SpamReportDrops int32 `json:"spam_report_drops"` + // The number of recipients who marked your email as spam. + SpamReports int32 `json:"spam_reports"` + // The number of unique recipients who clicked links in your emails. + UniqueClicks int32 `json:"unique_clicks"` + // The number of unique recipients who opened your emails. + UniqueOpens int32 `json:"unique_opens"` + // The number of emails dropped due to a recipient unsubscribing from your emails. + UnsubscribeDrops int32 `json:"unsubscribe_drops"` + // The number of recipients who unsubscribed from your emails. + Unsubscribes int32 `json:"unsubscribes"` +} diff --git a/rest/api/v3/stats/model_client_type.go b/rest/api/v3/stats/model_client_type.go new file mode 100644 index 00000000..3c36ab04 --- /dev/null +++ b/rest/api/v3/stats/model_client_type.go @@ -0,0 +1,25 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ClientType the model 'ClientType' +type ClientType string + +// List of ClientType +const ( + CLIENTTYPE_PHONE ClientType = "phone" + CLIENTTYPE_TABLET ClientType = "tablet" + CLIENTTYPE_WEBMAIL ClientType = "webmail" + CLIENTTYPE_DESKTOP ClientType = "desktop" +) diff --git a/rest/api/v3/stats/model_country.go b/rest/api/v3/stats/model_country.go new file mode 100644 index 00000000..867da48a --- /dev/null +++ b/rest/api/v3/stats/model_country.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Country the model 'Country' +type Country string + +// List of Country +const ( + COUNTRY_US Country = "US" + COUNTRY_CA Country = "CA" +) diff --git a/rest/api/v3/stats/model_list_browser_stat_200_response_inner.go b/rest/api/v3/stats/model_list_browser_stat_200_response_inner.go new file mode 100644 index 00000000..6abdbd78 --- /dev/null +++ b/rest/api/v3/stats/model_list_browser_stat_200_response_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListBrowserStat200ResponseInner struct for ListBrowserStat200ResponseInner +type ListBrowserStat200ResponseInner struct { + // The date that the statistics were gathered. + Date *string `json:"date,omitempty"` + // The list of statistics. + Stats *[]ListBrowserStat200ResponseInnerStatsInner `json:"stats,omitempty"` +} diff --git a/rest/api/v3/stats/model_list_browser_stat_200_response_inner_stats_inner.go b/rest/api/v3/stats/model_list_browser_stat_200_response_inner_stats_inner.go new file mode 100644 index 00000000..b33842eb --- /dev/null +++ b/rest/api/v3/stats/model_list_browser_stat_200_response_inner_stats_inner.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListBrowserStat200ResponseInnerStatsInner struct for ListBrowserStat200ResponseInnerStatsInner +type ListBrowserStat200ResponseInnerStatsInner struct { + // The type of segmentation. + Type *string `json:"type,omitempty"` + // The name of the specific segmentation. + Name *string `json:"name,omitempty"` + Metrics *AdvancedStatsClicks `json:"metrics,omitempty"` +} diff --git a/rest/api/v3/stats/model_list_category_200_response_inner.go b/rest/api/v3/stats/model_list_category_200_response_inner.go new file mode 100644 index 00000000..8b6aa73d --- /dev/null +++ b/rest/api/v3/stats/model_list_category_200_response_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListCategory200ResponseInner struct for ListCategory200ResponseInner +type ListCategory200ResponseInner struct { + // A category used to group emails by broad topic. + Category string `json:"category"` +} diff --git a/rest/api/v3/stats/model_list_category_400_response.go b/rest/api/v3/stats/model_list_category_400_response.go new file mode 100644 index 00000000..1ddd6eb7 --- /dev/null +++ b/rest/api/v3/stats/model_list_category_400_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListCategory400Response struct for ListCategory400Response +type ListCategory400Response struct { + // The error returned. + Errors *[]ListCategory400ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/stats/model_list_category_400_response_errors_inner.go b/rest/api/v3/stats/model_list_category_400_response_errors_inner.go new file mode 100644 index 00000000..33dbbfe5 --- /dev/null +++ b/rest/api/v3/stats/model_list_category_400_response_errors_inner.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListCategory400ResponseErrorsInner struct for ListCategory400ResponseErrorsInner +type ListCategory400ResponseErrorsInner struct { + Field string `json:"field"` + // A message explaining why your categories could not be retrieved. + Message string `json:"message"` +} diff --git a/rest/api/v3/stats/model_list_client_stat_200_response_inner.go b/rest/api/v3/stats/model_list_client_stat_200_response_inner.go new file mode 100644 index 00000000..f7f802fd --- /dev/null +++ b/rest/api/v3/stats/model_list_client_stat_200_response_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListClientStat200ResponseInner struct for ListClientStat200ResponseInner +type ListClientStat200ResponseInner struct { + // The date that the statistics were gathered. + Date *string `json:"date,omitempty"` + // The list of statistics. + Stats *[]ListClientStat200ResponseInnerStatsInner `json:"stats,omitempty"` +} diff --git a/rest/api/v3/stats/model_list_client_stat_200_response_inner_stats_inner.go b/rest/api/v3/stats/model_list_client_stat_200_response_inner_stats_inner.go new file mode 100644 index 00000000..fc6e6ec6 --- /dev/null +++ b/rest/api/v3/stats/model_list_client_stat_200_response_inner_stats_inner.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListClientStat200ResponseInnerStatsInner struct for ListClientStat200ResponseInnerStatsInner +type ListClientStat200ResponseInnerStatsInner struct { + // The type of segmentation. + Type *string `json:"type,omitempty"` + // The name of the specific segmentation. + Name *string `json:"name,omitempty"` + Metrics *AdvancedStatsOpens `json:"metrics,omitempty"` +} diff --git a/rest/api/v3/stats/model_list_geo_stat_200_response_inner.go b/rest/api/v3/stats/model_list_geo_stat_200_response_inner.go new file mode 100644 index 00000000..2c097da9 --- /dev/null +++ b/rest/api/v3/stats/model_list_geo_stat_200_response_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListGeoStat200ResponseInner struct for ListGeoStat200ResponseInner +type ListGeoStat200ResponseInner struct { + // The date that the statistics were gathered. + Date *string `json:"date,omitempty"` + // The list of statistics. + Stats *[]ListGeoStat200ResponseInnerStatsInner `json:"stats,omitempty"` +} diff --git a/rest/api/v3/stats/model_list_geo_stat_200_response_inner_stats_inner.go b/rest/api/v3/stats/model_list_geo_stat_200_response_inner_stats_inner.go new file mode 100644 index 00000000..0b755f7e --- /dev/null +++ b/rest/api/v3/stats/model_list_geo_stat_200_response_inner_stats_inner.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListGeoStat200ResponseInnerStatsInner struct for ListGeoStat200ResponseInnerStatsInner +type ListGeoStat200ResponseInnerStatsInner struct { + // The type of segmentation. + Type *string `json:"type,omitempty"` + // The name of the specific segmentation. + Name *string `json:"name,omitempty"` + Metrics *AdvancedStatsClicksOpens `json:"metrics,omitempty"` +} diff --git a/rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner.go b/rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner.go new file mode 100644 index 00000000..94550611 --- /dev/null +++ b/rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListMailboxProviderStat200ResponseInner struct for ListMailboxProviderStat200ResponseInner +type ListMailboxProviderStat200ResponseInner struct { + // The date that the statistics were gathered. + Date *string `json:"date,omitempty"` + // The list of statistics. + Stats *[]ListMailboxProviderStat200ResponseInnerStatsInner `json:"stats,omitempty"` +} diff --git a/rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner_stats_inner.go b/rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner_stats_inner.go new file mode 100644 index 00000000..049a1771 --- /dev/null +++ b/rest/api/v3/stats/model_list_mailbox_provider_stat_200_response_inner_stats_inner.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListMailboxProviderStat200ResponseInnerStatsInner struct for ListMailboxProviderStat200ResponseInnerStatsInner +type ListMailboxProviderStat200ResponseInnerStatsInner struct { + // The type of segmentation. + Type *string `json:"type,omitempty"` + // The name of the specific segmentation. + Name *string `json:"name,omitempty"` + Metrics *AdvancedStatsMailboxProvider `json:"metrics,omitempty"` +} diff --git a/rest/api/v3/stats/model_list_stat_200_response_inner.go b/rest/api/v3/stats/model_list_stat_200_response_inner.go new file mode 100644 index 00000000..ff32341b --- /dev/null +++ b/rest/api/v3/stats/model_list_stat_200_response_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListStat200ResponseInner struct for ListStat200ResponseInner +type ListStat200ResponseInner struct { + // The date the stats were gathered. + Date string `json:"date"` + // The individual email activity stats. + Stats []ListStat200ResponseInnerStatsInner `json:"stats"` +} diff --git a/rest/api/v3/stats/model_list_stat_200_response_inner_stats_inner.go b/rest/api/v3/stats/model_list_stat_200_response_inner_stats_inner.go new file mode 100644 index 00000000..5ff7e17f --- /dev/null +++ b/rest/api/v3/stats/model_list_stat_200_response_inner_stats_inner.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListStat200ResponseInnerStatsInner struct for ListStat200ResponseInnerStatsInner +type ListStat200ResponseInnerStatsInner struct { + Metrics *StatsAdvancedGlobalStats `json:"metrics,omitempty"` +} diff --git a/rest/api/v3/stats/model_sort_by_direction.go b/rest/api/v3/stats/model_sort_by_direction.go new file mode 100644 index 00000000..83900dd5 --- /dev/null +++ b/rest/api/v3/stats/model_sort_by_direction.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SortByDirection the model 'SortByDirection' +type SortByDirection string + +// List of SortByDirection +const ( + SORTBYDIRECTION_DESC SortByDirection = "desc" + SORTBYDIRECTION_ASC SortByDirection = "asc" +) diff --git a/rest/api/v3/stats/model_stats_advanced_global_stats.go b/rest/api/v3/stats/model_stats_advanced_global_stats.go new file mode 100644 index 00000000..1a7151de --- /dev/null +++ b/rest/api/v3/stats/model_stats_advanced_global_stats.go @@ -0,0 +1,50 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Statistics API +* The Twilio SendGrid Statistics API allows you to retrieve the various statistics related to your email program. Tracking your emails is an important part of being a good sender and learning about how your users interact with your email. This includes everything from clicks and opens to looking at which browsers and mailbox providers your customers use. SendGrid has broken up statistics in specific ways so that you can get at-a-glance data, as well as the details of how your email is being used. Category statistics are available for the previous thirteen months only. See [**Statistics Overview**](https://docs.sendgrid.com/ui/analytics-and-reporting/stats-overview) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// StatsAdvancedGlobalStats struct for StatsAdvancedGlobalStats +type StatsAdvancedGlobalStats struct { + // The number of links that were clicked in your emails. + Clicks *int32 `json:"clicks,omitempty"` + // The number of unique recipients who clicked links in your emails. + UniqueClicks *int32 `json:"unique_clicks,omitempty"` + // The total number of times your emails were opened by recipients. + Opens *int32 `json:"opens,omitempty"` + // The number of unique recipients who opened your emails. + UniqueOpens *int32 `json:"unique_opens,omitempty"` + // The number of emails that were not allowed to be delivered by ISPs. + Blocks *int32 `json:"blocks,omitempty"` + // The number of emails that were dropped because of a bounce. + BounceDrops *int32 `json:"bounce_drops,omitempty"` + // The number of emails that bounced instead of being delivered. + Bounces *int32 `json:"bounces,omitempty"` + // The number of emails that temporarily could not be delivered. + Deferred *int32 `json:"deferred,omitempty"` + // The number of emails SendGrid was able to confirm were actually delivered to a recipient. + Delivered *int32 `json:"delivered,omitempty"` + // The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. + InvalidEmails *int32 `json:"invalid_emails,omitempty"` + // Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. + Processed *int32 `json:"processed,omitempty"` + // The number of emails that were requested to be delivered. + Requests *int32 `json:"requests,omitempty"` + // The number of emails that were dropped due to a recipient previously marking your emails as spam. + SpamReportDrops *int32 `json:"spam_report_drops,omitempty"` + // The number of recipients who marked your email as spam. + SpamReports *int32 `json:"spam_reports,omitempty"` + // The number of emails dropped due to a recipient unsubscribing from your emails. + UnsubscribeDrops *int32 `json:"unsubscribe_drops,omitempty"` + // The number of recipients who unsubscribed from your emails. + Unsubscribes *int32 `json:"unsubscribes,omitempty"` +} diff --git a/rest/api/v3/subusers/README.md b/rest/api/v3/subusers/README.md new file mode 100644 index 00000000..69ea0a1d --- /dev/null +++ b/rest/api/v3/subusers/README.md @@ -0,0 +1,106 @@ +# Go API client for + +The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. + +You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:02.509910+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateSubuser* | [**CreateSubuser**](docs/CreateSubuser.md#createsubuser) | **Post** /v3/subusers | Create Subuser +*DeleteSubuser* | [**DeleteSubuser**](docs/DeleteSubuser.md#deletesubuser) | **Delete** /v3/subusers/{SubuserName} | Delete a subuser +*GetSubuserCredit* | [**GetSubuserCredit**](docs/GetSubuserCredit.md#getsubusercredit) | **Get** /v3/subusers/{SubuserName}/credits | Get the Credits for a Subuser +*ListMonthlyStat* | [**ListMonthlyStat**](docs/ListMonthlyStat.md#listmonthlystat) | **Get** /v3/subusers/stats/monthly | Retrieve monthly stats for all subusers +*ListReputation* | [**ListReputation**](docs/ListReputation.md#listreputation) | **Get** /v3/subusers/reputations | Retrieve Subuser Reputations +*ListStat* | [**ListStat**](docs/ListStat.md#liststat) | **Get** /v3/subusers/stats | Retrieve email statistics for your subusers. +*ListStatSum* | [**ListStatSum**](docs/ListStatSum.md#liststatsum) | **Get** /v3/subusers/stats/sums | Retrieve the totals for each email statistic metric for all subusers. +*ListSubuser* | [**ListSubuser**](docs/ListSubuser.md#listsubuser) | **Get** /v3/subusers | List all Subusers +*ListSubuserMonthlyStat* | [**ListSubuserMonthlyStat**](docs/ListSubuserMonthlyStat.md#listsubusermonthlystat) | **Get** /v3/subusers/{SubuserName}/stats/monthly | Retrieve the monthly email statistics for a single subuser +*UpdateSubuser* | [**UpdateSubuser**](docs/UpdateSubuser.md#updatesubuser) | **Patch** /v3/subusers/{SubuserName} | Enable/disable a subuser +*UpdateSubuserCredit* | [**UpdateSubuserCredit**](docs/UpdateSubuserCredit.md#updatesubusercredit) | **Put** /v3/subusers/{SubuserName}/credits | Update the Credits for a Subuser +*UpdateSubuserIp* | [**UpdateSubuserIp**](docs/UpdateSubuserIp.md#updatesubuserip) | **Put** /v3/subusers/{SubuserName}/ips | Update IPs assigned to a subuser +*UpdateSubuserRemainingCredit* | [**UpdateSubuserRemainingCredit**](docs/UpdateSubuserRemainingCredit.md#updatesubuserremainingcredit) | **Patch** /v3/subusers/{SubuserName}/credits/remaining | Update the remaining credits for a Subuser +*UpdateSubuserWebsiteAccess* | [**UpdateSubuserWebsiteAccess**](docs/UpdateSubuserWebsiteAccess.md#updatesubuserwebsiteaccess) | **Patch** /v3/subusers/{SubuserName}/website_access | Enable/Disable website access for a Subuser + + +## Documentation For Models + + - [AggregatedBy](AggregatedBy.md) + - [CategoryStats](CategoryStats.md) + - [CategoryStatsStatsInner](CategoryStatsStatsInner.md) + - [CategoryStatsStatsInnerMetrics](CategoryStatsStatsInnerMetrics.md) + - [CreateSubuserRequest](CreateSubuserRequest.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [ListReputation200ResponseInner](ListReputation200ResponseInner.md) + - [Region](Region.md) + - [Region1](Region1.md) + - [Region2](Region2.md) + - [Region3](Region3.md) + - [ResetFrequency](ResetFrequency.md) + - [ResetFrequency1](ResetFrequency1.md) + - [SortByDirection](SortByDirection.md) + - [SortByDirection1](SortByDirection1.md) + - [SortByDirection2](SortByDirection2.md) + - [SortByMetric](SortByMetric.md) + - [Subuser](Subuser.md) + - [SubuserCredits](SubuserCredits.md) + - [SubuserCreditsRequest](SubuserCreditsRequest.md) + - [SubuserPost](SubuserPost.md) + - [SubuserPostCreditAllocation](SubuserPostCreditAllocation.md) + - [SubuserStats](SubuserStats.md) + - [SubuserStatsStatsInner](SubuserStatsStatsInner.md) + - [SubuserStatsStatsInnerMetrics](SubuserStatsStatsInnerMetrics.md) + - [Type](Type.md) + - [Type1](Type1.md) + - [UpdateSubuserIp200Response](UpdateSubuserIp200Response.md) + - [UpdateSubuserRemainingCreditRequest](UpdateSubuserRemainingCreditRequest.md) + - [UpdateSubuserRequest](UpdateSubuserRequest.md) + - [UpdateSubuserWebsiteAccessRequest](UpdateSubuserWebsiteAccessRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/subusers/api_create_subuser.go b/rest/api/v3/subusers/api_create_subuser.go new file mode 100644 index 00000000..3421ac96 --- /dev/null +++ b/rest/api/v3/subusers/api_create_subuser.go @@ -0,0 +1,97 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateSubuserParam struct { + // + CreateSubuserRequest *CreateSubuserRequest `json:"CreateSubuserRequest,omitempty"` +} + +func (params *CreateSubuserParam) SetCreateSubuserRequest(CreateSubuserRequest CreateSubuserRequest) *CreateSubuserParam { + params.CreateSubuserRequest = &CreateSubuserRequest + return params +} + +// **This endpoint allows you to create a new subuser.** +func (c *ApiService) CreateSubuser(params *CreateSubuserParam) (interface{}, error) { + path := "/v3/subusers" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateSubuserRequest != nil { + b, err := json.Marshal(*params.CreateSubuserRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SubuserPost{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/subusers/api_delete_subuser.go b/rest/api/v3/subusers/api_delete_subuser.go new file mode 100644 index 00000000..fcba9fa2 --- /dev/null +++ b/rest/api/v3/subusers/api_delete_subuser.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteSubuserParam struct { + // The username of the Subuser. + SubuserName *string `json:"subuser_name"` +} + +func (params *DeleteSubuserParam) SetSubuserName(SubuserName string) *DeleteSubuserParam { + params.SubuserName = &SubuserName + return params +} + +// **This endpoint allows you to delete a subuser.** This is a permanent action. Once deleted, a subuser cannot be retrieved. +func (c *ApiService) DeleteSubuser(params *DeleteSubuserParam) (interface{}, error) { + path := "/v3/subusers/{SubuserName}" + if params != nil && params.SubuserName != nil { + path = strings.Replace(path, "{"+"SubuserName"+"}", *params.SubuserName, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/subusers/api_get_subuser_credit.go b/rest/api/v3/subusers/api_get_subuser_credit.go new file mode 100644 index 00000000..220e17ec --- /dev/null +++ b/rest/api/v3/subusers/api_get_subuser_credit.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetSubuserCreditParam struct { + // The username of the Subuser. + SubuserName *string `json:"subuser_name"` +} + +func (params *GetSubuserCreditParam) SetSubuserName(SubuserName string) *GetSubuserCreditParam { + params.SubuserName = &SubuserName + return params +} + +// **This endpoint allows you to retrieve a Credits overview for a Subuser.** +func (c *ApiService) GetSubuserCredit(params *GetSubuserCreditParam) (interface{}, error) { + path := "/v3/subusers/{SubuserName}/credits" + if params != nil && params.SubuserName != nil { + path = strings.Replace(path, "{"+"SubuserName"+"}", *params.SubuserName, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SubuserCredits{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/subusers/api_list_monthly_stat.go b/rest/api/v3/subusers/api_list_monthly_stat.go new file mode 100644 index 00000000..459e4fec --- /dev/null +++ b/rest/api/v3/subusers/api_list_monthly_stat.go @@ -0,0 +1,106 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListMonthlyStatParam struct { + // The date of the month to retrieve statistics for. Must be formatted YYYY-MM-DD + Date *string `json:"date"` + // A substring search of your subusers. + Subuser *string `json:"subuser,omitempty"` + // The metric that you want to sort by. Metrics that you can sort by are: `blocks`, `bounces`, `clicks`, `delivered`, `opens`, `requests`, `unique_clicks`, `unique_opens`, and `unsubscribes`.' + SortByMetric *SortByMetric `json:"sort_by_metric,omitempty"` + // The direction you want to sort. + SortByDirection *SortByDirection1 `json:"sort_by_direction,omitempty"` + // Optional field to limit the number of results returned. + Limit *int32 `json:"limit,omitempty"` + // Optional beginning point in the list to retrieve from. + Offset *int32 `json:"offset,omitempty"` +} + +func (params *ListMonthlyStatParam) SetDate(Date string) *ListMonthlyStatParam { + params.Date = &Date + return params +} +func (params *ListMonthlyStatParam) SetSubuser(Subuser string) *ListMonthlyStatParam { + params.Subuser = &Subuser + return params +} +func (params *ListMonthlyStatParam) SetSortByMetric(SortByMetric SortByMetric) *ListMonthlyStatParam { + params.SortByMetric = &SortByMetric + return params +} +func (params *ListMonthlyStatParam) SetSortByDirection(SortByDirection SortByDirection1) *ListMonthlyStatParam { + params.SortByDirection = &SortByDirection + return params +} +func (params *ListMonthlyStatParam) SetLimit(Limit int32) *ListMonthlyStatParam { + params.Limit = &Limit + return params +} +func (params *ListMonthlyStatParam) SetOffset(Offset int32) *ListMonthlyStatParam { + params.Offset = &Offset + return params +} + +// **This endpoint allows you to retrieve the monthly email statistics for all subusers over the given date range.** When using the `sort_by_metric` to sort your stats by a specific metric, you can not sort by the following metrics: `bounce_drops`, `deferred`, `invalid_emails`, `processed`, `spam_report_drops`, `spam_reports`, or `unsubscribe_drops`. +func (c *ApiService) ListMonthlyStat(params *ListMonthlyStatParam) (interface{}, error) { + path := "/v3/subusers/stats/monthly" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Date != nil { + data.Set("date", *params.Date) + } + if params != nil && params.Subuser != nil { + data.Set("subuser", *params.Subuser) + } + if params != nil && params.SortByMetric != nil { + data.Set("sort_by_metric", fmt.Sprint(*params.SortByMetric)) + } + if params != nil && params.SortByDirection != nil { + data.Set("sort_by_direction", fmt.Sprint(*params.SortByDirection)) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SubuserStats{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/subusers/api_list_reputation.go b/rest/api/v3/subusers/api_list_reputation.go new file mode 100644 index 00000000..dd0981dd --- /dev/null +++ b/rest/api/v3/subusers/api_list_reputation.go @@ -0,0 +1,60 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListReputationParam struct { + // + Usernames *string `json:"usernames,omitempty"` +} + +func (params *ListReputationParam) SetUsernames(Usernames string) *ListReputationParam { + params.Usernames = &Usernames + return params +} + +// **This endpoint allows you to request the reputations for your subusers.** Subuser sender reputations give a good idea how well a sender is doing with regards to how recipients and recipient servers react to the mail that is being received. When a bounce, spam report, or other negative action happens on a sent email, it will affect your sender rating. +func (c *ApiService) ListReputation(params *ListReputationParam) (interface{}, error) { + path := "/v3/subusers/reputations" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Usernames != nil { + data.Set("usernames", *params.Usernames) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListReputation200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/subusers/api_list_stat.go b/rest/api/v3/subusers/api_list_stat.go new file mode 100644 index 00000000..29db8ba9 --- /dev/null +++ b/rest/api/v3/subusers/api_list_stat.go @@ -0,0 +1,106 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListStatParam struct { + // The subuser you want to retrieve statistics for. You may include this parameter up to 10 times to retrieve statistics for multiple subusers. + Subusers *string `json:"subusers"` + // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. + StartDate *string `json:"start_date"` + // Limits the number of results returned per page. + Limit *int32 `json:"limit,omitempty"` + // The point in the list to begin retrieving results from. + Offset *int32 `json:"offset,omitempty"` + // How to group the statistics. Must be either \"day\", \"week\", or \"month\". + AggregatedBy *AggregatedBy `json:"aggregated_by,omitempty"` + // The end date of the statistics to retrieve. Defaults to today. + EndDate *string `json:"end_date,omitempty"` +} + +func (params *ListStatParam) SetSubusers(Subusers string) *ListStatParam { + params.Subusers = &Subusers + return params +} +func (params *ListStatParam) SetStartDate(StartDate string) *ListStatParam { + params.StartDate = &StartDate + return params +} +func (params *ListStatParam) SetLimit(Limit int32) *ListStatParam { + params.Limit = &Limit + return params +} +func (params *ListStatParam) SetOffset(Offset int32) *ListStatParam { + params.Offset = &Offset + return params +} +func (params *ListStatParam) SetAggregatedBy(AggregatedBy AggregatedBy) *ListStatParam { + params.AggregatedBy = &AggregatedBy + return params +} +func (params *ListStatParam) SetEndDate(EndDate string) *ListStatParam { + params.EndDate = &EndDate + return params +} + +// **This endpoint allows you to retrieve the email statistics for the given subusers.** You may retrieve statistics for up to 10 different subusers by including an additional _subusers_ parameter for each additional subuser. +func (c *ApiService) ListStat(params *ListStatParam) (interface{}, error) { + path := "/v3/subusers/stats" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Subusers != nil { + data.Set("subusers", *params.Subusers) + } + if params != nil && params.StartDate != nil { + data.Set("start_date", *params.StartDate) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + if params != nil && params.AggregatedBy != nil { + data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", *params.EndDate) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]CategoryStats{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/subusers/api_list_stat_sum.go b/rest/api/v3/subusers/api_list_stat_sum.go new file mode 100644 index 00000000..31a791fa --- /dev/null +++ b/rest/api/v3/subusers/api_list_stat_sum.go @@ -0,0 +1,115 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListStatSumParam struct { + // The starting date of the statistics to retrieve. Must follow format YYYY-MM-DD. + StartDate *string `json:"start_date"` + // The direction you want to sort. + SortByDirection *SortByDirection2 `json:"sort_by_direction,omitempty"` + // The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. + EndDate *string `json:"end_date,omitempty"` + // Limits the number of results returned per page. + Limit *int32 `json:"limit,omitempty"` + // The point in the list to begin retrieving results from. + Offset *int32 `json:"offset,omitempty"` + // How to group the statistics. Defaults to today. Must follow format YYYY-MM-DD. + AggregatedBy *string `json:"aggregated_by,omitempty"` + // The metric that you want to sort by. Must be a single metric. + SortByMetric *string `json:"sort_by_metric,omitempty"` +} + +func (params *ListStatSumParam) SetStartDate(StartDate string) *ListStatSumParam { + params.StartDate = &StartDate + return params +} +func (params *ListStatSumParam) SetSortByDirection(SortByDirection SortByDirection2) *ListStatSumParam { + params.SortByDirection = &SortByDirection + return params +} +func (params *ListStatSumParam) SetEndDate(EndDate string) *ListStatSumParam { + params.EndDate = &EndDate + return params +} +func (params *ListStatSumParam) SetLimit(Limit int32) *ListStatSumParam { + params.Limit = &Limit + return params +} +func (params *ListStatSumParam) SetOffset(Offset int32) *ListStatSumParam { + params.Offset = &Offset + return params +} +func (params *ListStatSumParam) SetAggregatedBy(AggregatedBy string) *ListStatSumParam { + params.AggregatedBy = &AggregatedBy + return params +} +func (params *ListStatSumParam) SetSortByMetric(SortByMetric string) *ListStatSumParam { + params.SortByMetric = &SortByMetric + return params +} + +// **This endpoint allows you to retrieve the total sums of each email statistic metric for all subusers over the given date range.** +func (c *ApiService) ListStatSum(params *ListStatSumParam) (interface{}, error) { + path := "/v3/subusers/stats/sums" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartDate != nil { + data.Set("start_date", *params.StartDate) + } + if params != nil && params.SortByDirection != nil { + data.Set("sort_by_direction", fmt.Sprint(*params.SortByDirection)) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", *params.EndDate) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + if params != nil && params.AggregatedBy != nil { + data.Set("aggregated_by", *params.AggregatedBy) + } + if params != nil && params.SortByMetric != nil { + data.Set("sort_by_metric", *params.SortByMetric) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &CategoryStats{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/subusers/api_list_subuser.go b/rest/api/v3/subusers/api_list_subuser.go new file mode 100644 index 00000000..5e531161 --- /dev/null +++ b/rest/api/v3/subusers/api_list_subuser.go @@ -0,0 +1,105 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListSubuserParam struct { + // The username of this subuser. + Username *string `json:"username,omitempty"` + // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. + Limit *int32 `json:"limit,omitempty"` + // Filter for Subusers in this region. If not provided, all Subusers will be returned. All users can also be explicitly requested by using the filter `all`. Users who are not pinned to a region will be displayed as `global`. + Region *Region `json:"region,omitempty"` + // Optional flag to include the regions of the Subusers in the response. If not provided, the region will be omitted from the response. + IncludeRegion *bool `json:"include_region,omitempty"` + // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + Offset *int32 `json:"offset,omitempty"` +} + +func (params *ListSubuserParam) SetUsername(Username string) *ListSubuserParam { + params.Username = &Username + return params +} +func (params *ListSubuserParam) SetLimit(Limit int32) *ListSubuserParam { + params.Limit = &Limit + return params +} +func (params *ListSubuserParam) SetRegion(Region Region) *ListSubuserParam { + params.Region = &Region + return params +} +func (params *ListSubuserParam) SetIncludeRegion(IncludeRegion bool) *ListSubuserParam { + params.IncludeRegion = &IncludeRegion + return params +} +func (params *ListSubuserParam) SetOffset(Offset int32) *ListSubuserParam { + params.Offset = &Offset + return params +} + +// **This endpoint allows you to retrieve a paginated list of all your subusers.** You can use the `username` query parameter to filter the list for specific subusers. You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. +func (c *ApiService) ListSubuser(params *ListSubuserParam) (interface{}, error) { + path := "/v3/subusers" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Username != nil { + data.Set("username", *params.Username) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Region != nil { + data.Set("region", fmt.Sprint(*params.Region)) + } + if params != nil && params.IncludeRegion != nil { + data.Set("include_region", fmt.Sprint(*params.IncludeRegion)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]Subuser{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/subusers/api_list_subuser_monthly_stat.go b/rest/api/v3/subusers/api_list_subuser_monthly_stat.go new file mode 100644 index 00000000..84c5f03e --- /dev/null +++ b/rest/api/v3/subusers/api_list_subuser_monthly_stat.go @@ -0,0 +1,108 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type ListSubuserMonthlyStatParam struct { + // The date of the month to retrieve statistics for. Must be formatted YYYY-MM-DD + Date *string `json:"date"` + // The username of the Subuser. + SubuserName *string `json:"subuser_name"` + // The metric that you want to sort by. Metrics that you can sort by are: `blocks`, `bounces`, `clicks`, `delivered`, `opens`, `requests`, `unique_clicks`, `unique_opens`, and `unsubscribes`.' + SortByMetric *string `json:"sort_by_metric,omitempty"` + // The direction you want to sort. + SortByDirection *SortByDirection `json:"sort_by_direction,omitempty"` + // Optional field to limit the number of results returned. + Limit *int32 `json:"limit,omitempty"` + // Optional beginning point in the list to retrieve from. + Offset *int32 `json:"offset,omitempty"` +} + +func (params *ListSubuserMonthlyStatParam) SetDate(Date string) *ListSubuserMonthlyStatParam { + params.Date = &Date + return params +} +func (params *ListSubuserMonthlyStatParam) SetSubuserName(SubuserName string) *ListSubuserMonthlyStatParam { + params.SubuserName = &SubuserName + return params +} +func (params *ListSubuserMonthlyStatParam) SetSortByMetric(SortByMetric string) *ListSubuserMonthlyStatParam { + params.SortByMetric = &SortByMetric + return params +} +func (params *ListSubuserMonthlyStatParam) SetSortByDirection(SortByDirection SortByDirection) *ListSubuserMonthlyStatParam { + params.SortByDirection = &SortByDirection + return params +} +func (params *ListSubuserMonthlyStatParam) SetLimit(Limit int32) *ListSubuserMonthlyStatParam { + params.Limit = &Limit + return params +} +func (params *ListSubuserMonthlyStatParam) SetOffset(Offset int32) *ListSubuserMonthlyStatParam { + params.Offset = &Offset + return params +} + +// **This endpoint allows you to retrive the monthly email statistics for a specific subuser.** When using the `sort_by_metric` to sort your stats by a specific metric, you can not sort by the following metrics: `bounce_drops`, `deferred`, `invalid_emails`, `processed`, `spam_report_drops`, `spam_reports`, or `unsubscribe_drops`. +func (c *ApiService) ListSubuserMonthlyStat(params *ListSubuserMonthlyStatParam) (interface{}, error) { + path := "/v3/subusers/{SubuserName}/stats/monthly" + if params != nil && params.SubuserName != nil { + path = strings.Replace(path, "{"+"SubuserName"+"}", *params.SubuserName, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Date != nil { + data.Set("date", *params.Date) + } + if params != nil && params.SortByMetric != nil { + data.Set("sort_by_metric", *params.SortByMetric) + } + if params != nil && params.SortByDirection != nil { + data.Set("sort_by_direction", fmt.Sprint(*params.SortByDirection)) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SubuserStats{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/subusers/api_service.go b/rest/api/v3/subusers/api_service.go new file mode 100644 index 00000000..7169b7eb --- /dev/null +++ b/rest/api/v3/subusers/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/subusers/api_update_subuser.go b/rest/api/v3/subusers/api_update_subuser.go new file mode 100644 index 00000000..55d2254f --- /dev/null +++ b/rest/api/v3/subusers/api_update_subuser.go @@ -0,0 +1,100 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateSubuserParam struct { + // The username of the Subuser. + SubuserName *string `json:"subuser_name"` + // + UpdateSubuserRequest *UpdateSubuserRequest `json:"UpdateSubuserRequest,omitempty"` +} + +func (params *UpdateSubuserParam) SetSubuserName(SubuserName string) *UpdateSubuserParam { + params.SubuserName = &SubuserName + return params +} +func (params *UpdateSubuserParam) SetUpdateSubuserRequest(UpdateSubuserRequest UpdateSubuserRequest) *UpdateSubuserParam { + params.UpdateSubuserRequest = &UpdateSubuserRequest + return params +} + +// **This endpoint allows you to enable or disable a subuser.** +func (c *ApiService) UpdateSubuser(params *UpdateSubuserParam) (interface{}, error) { + path := "/v3/subusers/{SubuserName}" + if params != nil && params.SubuserName != nil { + path = strings.Replace(path, "{"+"SubuserName"+"}", *params.SubuserName, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateSubuserRequest != nil { + b, err := json.Marshal(*params.UpdateSubuserRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/subusers/api_update_subuser_credit.go b/rest/api/v3/subusers/api_update_subuser_credit.go new file mode 100644 index 00000000..9210a304 --- /dev/null +++ b/rest/api/v3/subusers/api_update_subuser_credit.go @@ -0,0 +1,84 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateSubuserCreditParam struct { + // The username of the Subuser. + SubuserName *string `json:"subuser_name"` + // + SubuserCreditsRequest *SubuserCreditsRequest `json:"SubuserCreditsRequest"` +} + +func (params *UpdateSubuserCreditParam) SetSubuserName(SubuserName string) *UpdateSubuserCreditParam { + params.SubuserName = &SubuserName + return params +} +func (params *UpdateSubuserCreditParam) SetSubuserCreditsRequest(SubuserCreditsRequest SubuserCreditsRequest) *UpdateSubuserCreditParam { + params.SubuserCreditsRequest = &SubuserCreditsRequest + return params +} + +// **This endpoint allows you to update the Credits for a Subuser.** +func (c *ApiService) UpdateSubuserCredit(params *UpdateSubuserCreditParam) (interface{}, error) { + path := "/v3/subusers/{SubuserName}/credits" + if params != nil && params.SubuserName != nil { + path = strings.Replace(path, "{"+"SubuserName"+"}", *params.SubuserName, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SubuserCreditsRequest != nil { + b, err := json.Marshal(*params.SubuserCreditsRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SubuserCredits{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/subusers/api_update_subuser_ip.go b/rest/api/v3/subusers/api_update_subuser_ip.go new file mode 100644 index 00000000..62ad065c --- /dev/null +++ b/rest/api/v3/subusers/api_update_subuser_ip.go @@ -0,0 +1,84 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateSubuserIpParam struct { + // The username of the Subuser. + SubuserName *string `json:"subuser_name"` + // + RequestBody *[]string `json:"request_body,omitempty"` +} + +func (params *UpdateSubuserIpParam) SetSubuserName(SubuserName string) *UpdateSubuserIpParam { + params.SubuserName = &SubuserName + return params +} +func (params *UpdateSubuserIpParam) SetRequestBody(RequestBody []string) *UpdateSubuserIpParam { + params.RequestBody = &RequestBody + return params +} + +// **This endpoint allows you update your subusers' assigned IP.** Each subuser should be assigned to an IP address from which all of this subuser's mail will be sent. Often, this is the same IP as the parent account, but each subuser can have one or more of their own IP addresses as well. More information: * [How to request more IPs](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) * [Setup Reverse DNS](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) +func (c *ApiService) UpdateSubuserIp(params *UpdateSubuserIpParam) (interface{}, error) { + path := "/v3/subusers/{SubuserName}/ips" + if params != nil && params.SubuserName != nil { + path = strings.Replace(path, "{"+"SubuserName"+"}", *params.SubuserName, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.RequestBody != nil { + b, err := json.Marshal(*params.RequestBody) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &UpdateSubuserIp200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/subusers/api_update_subuser_remaining_credit.go b/rest/api/v3/subusers/api_update_subuser_remaining_credit.go new file mode 100644 index 00000000..4e34d1d1 --- /dev/null +++ b/rest/api/v3/subusers/api_update_subuser_remaining_credit.go @@ -0,0 +1,84 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateSubuserRemainingCreditParam struct { + // The username of the Subuser. + SubuserName *string `json:"subuser_name"` + // + UpdateSubuserRemainingCreditRequest *UpdateSubuserRemainingCreditRequest `json:"UpdateSubuserRemainingCreditRequest"` +} + +func (params *UpdateSubuserRemainingCreditParam) SetSubuserName(SubuserName string) *UpdateSubuserRemainingCreditParam { + params.SubuserName = &SubuserName + return params +} +func (params *UpdateSubuserRemainingCreditParam) SetUpdateSubuserRemainingCreditRequest(UpdateSubuserRemainingCreditRequest UpdateSubuserRemainingCreditRequest) *UpdateSubuserRemainingCreditParam { + params.UpdateSubuserRemainingCreditRequest = &UpdateSubuserRemainingCreditRequest + return params +} + +// **This endpoint allows you to update the remaining credits for a Subuser.** +func (c *ApiService) UpdateSubuserRemainingCredit(params *UpdateSubuserRemainingCreditParam) (interface{}, error) { + path := "/v3/subusers/{SubuserName}/credits/remaining" + if params != nil && params.SubuserName != nil { + path = strings.Replace(path, "{"+"SubuserName"+"}", *params.SubuserName, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateSubuserRemainingCreditRequest != nil { + b, err := json.Marshal(*params.UpdateSubuserRemainingCreditRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SubuserCredits{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/subusers/api_update_subuser_website_access.go b/rest/api/v3/subusers/api_update_subuser_website_access.go new file mode 100644 index 00000000..54e3572a --- /dev/null +++ b/rest/api/v3/subusers/api_update_subuser_website_access.go @@ -0,0 +1,76 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateSubuserWebsiteAccessParam struct { + // + SubuserName *string `json:"subuser_name"` + // + UpdateSubuserWebsiteAccessRequest *UpdateSubuserWebsiteAccessRequest `json:"UpdateSubuserWebsiteAccessRequest,omitempty"` +} + +func (params *UpdateSubuserWebsiteAccessParam) SetSubuserName(SubuserName string) *UpdateSubuserWebsiteAccessParam { + params.SubuserName = &SubuserName + return params +} +func (params *UpdateSubuserWebsiteAccessParam) SetUpdateSubuserWebsiteAccessRequest(UpdateSubuserWebsiteAccessRequest UpdateSubuserWebsiteAccessRequest) *UpdateSubuserWebsiteAccessParam { + params.UpdateSubuserWebsiteAccessRequest = &UpdateSubuserWebsiteAccessRequest + return params +} + +// Enable/Disable website access for a Subuser, while still preserving email send functionality. +func (c *ApiService) UpdateSubuserWebsiteAccess(params *UpdateSubuserWebsiteAccessParam) (interface{}, error) { + path := "/v3/subusers/{SubuserName}/website_access" + if params != nil && params.SubuserName != nil { + path = strings.Replace(path, "{"+"SubuserName"+"}", *params.SubuserName, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateSubuserWebsiteAccessRequest != nil { + b, err := json.Marshal(*params.UpdateSubuserWebsiteAccessRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/subusers/docs/AggregatedBy.md b/rest/api/v3/subusers/docs/AggregatedBy.md new file mode 100644 index 00000000..96f02c9f --- /dev/null +++ b/rest/api/v3/subusers/docs/AggregatedBy.md @@ -0,0 +1,14 @@ +# AggregatedBy + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DAY** | string | (value: `"day"`) +**WEEK** | string | (value: `"week"`) +**MONTH** | string | (value: `"month"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/CategoryStats.md b/rest/api/v3/subusers/docs/CategoryStats.md new file mode 100644 index 00000000..2b136fe2 --- /dev/null +++ b/rest/api/v3/subusers/docs/CategoryStats.md @@ -0,0 +1,12 @@ +# CategoryStats + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | **string** | The date the statistics were gathered. | +**Stats** | [**[]CategoryStatsStatsInner**](CategoryStatsStatsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/CategoryStatsStatsInner.md b/rest/api/v3/subusers/docs/CategoryStatsStatsInner.md new file mode 100644 index 00000000..9c188e0c --- /dev/null +++ b/rest/api/v3/subusers/docs/CategoryStatsStatsInner.md @@ -0,0 +1,13 @@ +# CategoryStatsStatsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Metrics** | [**CategoryStatsStatsInnerMetrics**](CategoryStatsStatsInnerMetrics.md) | |[optional] +**Name** | **string** | The name of the category. |[optional] +**Type** | **string** | How you are segmenting your statistics. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/CategoryStatsStatsInnerMetrics.md b/rest/api/v3/subusers/docs/CategoryStatsStatsInnerMetrics.md new file mode 100644 index 00000000..8129c1f4 --- /dev/null +++ b/rest/api/v3/subusers/docs/CategoryStatsStatsInnerMetrics.md @@ -0,0 +1,26 @@ +# CategoryStatsStatsInnerMetrics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Blocks** | **int32** | The number of emails that were not allowed to be delivered by ISPs. | +**BounceDrops** | **int32** | The number of emails that were dropped because of a bounce. | +**Bounces** | **int32** | The number of emails that bounced instead of being delivered. | +**Clicks** | **int32** | The number of links that were clicked. | +**Deferred** | **int32** | The number of emails that temporarily could not be delivered. | +**Delivered** | **int32** | The number of emails SendGrid was able to confirm were actually delivered to a recipient. | +**InvalidEmails** | **int32** | The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. | +**Opens** | **int32** | The total number of times your emails were opened by recipients. | +**Processed** | **int32** | Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. | +**Requests** | **int32** | The number of emails that were requested to be delivered. | +**SpamReportDrops** | **int32** | The number of emails that were dropped due to a recipient previously marking your emails as spam. | +**SpamReports** | **int32** | The number of recipients who marked your email as spam. | +**UniqueClicks** | **int32** | The number of unique recipients who clicked links in your emails. | +**UniqueOpens** | **int32** | The number of unique recipients who opened your emails. | +**UnsubscribeDrops** | **int32** | The number of emails dropped due to a recipient unsubscribing from your emails. | +**Unsubscribes** | **int32** | The number of recipients who unsubscribed from your emails. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/CreateSubuser.md b/rest/api/v3/subusers/docs/CreateSubuser.md new file mode 100644 index 00000000..9c47f779 --- /dev/null +++ b/rest/api/v3/subusers/docs/CreateSubuser.md @@ -0,0 +1,48 @@ +# CreateSubuser + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateSubuser**](CreateSubuser.md#CreateSubuser) | **Post** /v3/subusers | Create Subuser + + + +## CreateSubuser + +> SubuserPost CreateSubuser(ctx, optional) + +Create Subuser + +**This endpoint allows you to create a new subuser.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateSubuserParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**CreateSubuserRequest** | [**CreateSubuserRequest**](CreateSubuserRequest.md) | + +### Return type + +[**SubuserPost**](SubuserPost.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/subusers/docs/CreateSubuserRequest.md b/rest/api/v3/subusers/docs/CreateSubuserRequest.md new file mode 100644 index 00000000..c8f80d78 --- /dev/null +++ b/rest/api/v3/subusers/docs/CreateSubuserRequest.md @@ -0,0 +1,16 @@ +# CreateSubuserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | The username for this subuser. | +**Email** | **string** | The email address of the subuser. | +**Password** | **string** | The password this subuser will use when logging into SendGrid. | +**Ips** | **[]string** | The IP addresses that should be assigned to this subuser. | +**Region** | [**Region1**](Region1.md) | The region this Subuser should be assigned to. Can be `global` or `eu`. (Regional email is in Public Beta and requires SendGrid Pro plan or above.). |[optional] +**IncludeRegion** | **bool** | A flag that determines if the Subuser's region should be returned in the response. (Regional email is in Public Beta and requires SendGrid Pro plan or above.) |[optional] [default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/DeleteSubuser.md b/rest/api/v3/subusers/docs/DeleteSubuser.md new file mode 100644 index 00000000..5be2931f --- /dev/null +++ b/rest/api/v3/subusers/docs/DeleteSubuser.md @@ -0,0 +1,51 @@ +# DeleteSubuser + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteSubuser**](DeleteSubuser.md#DeleteSubuser) | **Delete** /v3/subusers/{SubuserName} | Delete a subuser + + + +## DeleteSubuser + +> map[string]interface{} DeleteSubuser(ctx, SubuserName) + +Delete a subuser + +**This endpoint allows you to delete a subuser.** This is a permanent action. Once deleted, a subuser cannot be retrieved. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SubuserName** | **string** | The username of the Subuser. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteSubuserParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/subusers/docs/ErrorResponse.md b/rest/api/v3/subusers/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/subusers/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/ErrorResponseErrorsInner.md b/rest/api/v3/subusers/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/subusers/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/GetSubuserCredit.md b/rest/api/v3/subusers/docs/GetSubuserCredit.md new file mode 100644 index 00000000..8690a1fc --- /dev/null +++ b/rest/api/v3/subusers/docs/GetSubuserCredit.md @@ -0,0 +1,51 @@ +# GetSubuserCredit + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetSubuserCredit**](GetSubuserCredit.md#GetSubuserCredit) | **Get** /v3/subusers/{SubuserName}/credits | Get the Credits for a Subuser + + + +## GetSubuserCredit + +> SubuserCredits GetSubuserCredit(ctx, SubuserName) + +Get the Credits for a Subuser + +**This endpoint allows you to retrieve a Credits overview for a Subuser.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SubuserName** | **string** | The username of the Subuser. + +### Other Parameters + +Other parameters are passed through a pointer to a GetSubuserCreditParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**SubuserCredits**](SubuserCredits.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/subusers/docs/ListMonthlyStat.md b/rest/api/v3/subusers/docs/ListMonthlyStat.md new file mode 100644 index 00000000..ae4d42d6 --- /dev/null +++ b/rest/api/v3/subusers/docs/ListMonthlyStat.md @@ -0,0 +1,52 @@ +# ListMonthlyStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListMonthlyStat**](ListMonthlyStat.md#ListMonthlyStat) | **Get** /v3/subusers/stats/monthly | Retrieve monthly stats for all subusers + + + +## ListMonthlyStat + +> SubuserStats ListMonthlyStat(ctx, Dateoptional) + +Retrieve monthly stats for all subusers + +**This endpoint allows you to retrieve the monthly email statistics for all subusers over the given date range.** When using the `sort_by_metric` to sort your stats by a specific metric, you can not sort by the following metrics: `bounce_drops`, `deferred`, `invalid_emails`, `processed`, `spam_report_drops`, `spam_reports`, or `unsubscribe_drops`. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListMonthlyStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Subuser** | **string** | A substring search of your subusers. +**SortByMetric** | [**SortByMetric**](SortByMetricSortByMetric.md) | The metric that you want to sort by. Metrics that you can sort by are: `blocks`, `bounces`, `clicks`, `delivered`, `opens`, `requests`, `unique_clicks`, `unique_opens`, and `unsubscribes`.' +**SortByDirection** | [**SortByDirection1**](SortByDirection1SortByDirection1.md) | The direction you want to sort. +**Limit** | **int32** | Optional field to limit the number of results returned. +**Offset** | **int32** | Optional beginning point in the list to retrieve from. + +### Return type + +[**SubuserStats**](SubuserStats.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/subusers/docs/ListReputation.md b/rest/api/v3/subusers/docs/ListReputation.md new file mode 100644 index 00000000..1142829c --- /dev/null +++ b/rest/api/v3/subusers/docs/ListReputation.md @@ -0,0 +1,48 @@ +# ListReputation + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListReputation**](ListReputation.md#ListReputation) | **Get** /v3/subusers/reputations | Retrieve Subuser Reputations + + + +## ListReputation + +> []ListReputation200ResponseInner ListReputation(ctx, optional) + +Retrieve Subuser Reputations + +**This endpoint allows you to request the reputations for your subusers.** Subuser sender reputations give a good idea how well a sender is doing with regards to how recipients and recipient servers react to the mail that is being received. When a bounce, spam report, or other negative action happens on a sent email, it will affect your sender rating. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListReputationParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Usernames** | **string** | + +### Return type + +[**[]ListReputation200ResponseInner**](ListReputation200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/subusers/docs/ListReputation200ResponseInner.md b/rest/api/v3/subusers/docs/ListReputation200ResponseInner.md new file mode 100644 index 00000000..c2d0ef07 --- /dev/null +++ b/rest/api/v3/subusers/docs/ListReputation200ResponseInner.md @@ -0,0 +1,12 @@ +# ListReputation200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Reputation** | **float32** | The sender reputation this subuser has attained. | +**Username** | **string** | The subuser that has this reputation. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/ListStat.md b/rest/api/v3/subusers/docs/ListStat.md new file mode 100644 index 00000000..16c65e17 --- /dev/null +++ b/rest/api/v3/subusers/docs/ListStat.md @@ -0,0 +1,51 @@ +# ListStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListStat**](ListStat.md#ListStat) | **Get** /v3/subusers/stats | Retrieve email statistics for your subusers. + + + +## ListStat + +> []CategoryStats ListStat(ctx, SubusersStartDateoptional) + +Retrieve email statistics for your subusers. + +**This endpoint allows you to retrieve the email statistics for the given subusers.** You may retrieve statistics for up to 10 different subusers by including an additional _subusers_ parameter for each additional subuser. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **int32** | Limits the number of results returned per page. +**Offset** | **int32** | The point in the list to begin retrieving results from. +**AggregatedBy** | [**AggregatedBy**](AggregatedByAggregatedBy.md) | How to group the statistics. Must be either \"day\", \"week\", or \"month\". +**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. + +### Return type + +[**[]CategoryStats**](CategoryStats.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/subusers/docs/ListStatSum.md b/rest/api/v3/subusers/docs/ListStatSum.md new file mode 100644 index 00000000..8d801458 --- /dev/null +++ b/rest/api/v3/subusers/docs/ListStatSum.md @@ -0,0 +1,53 @@ +# ListStatSum + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListStatSum**](ListStatSum.md#ListStatSum) | **Get** /v3/subusers/stats/sums | Retrieve the totals for each email statistic metric for all subusers. + + + +## ListStatSum + +> CategoryStats ListStatSum(ctx, StartDateoptional) + +Retrieve the totals for each email statistic metric for all subusers. + +**This endpoint allows you to retrieve the total sums of each email statistic metric for all subusers over the given date range.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListStatSumParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**SortByDirection** | [**SortByDirection2**](SortByDirection2SortByDirection2.md) | The direction you want to sort. +**EndDate** | **string** | The end date of the statistics to retrieve. Defaults to today. Must follow format YYYY-MM-DD. +**Limit** | **int32** | Limits the number of results returned per page. +**Offset** | **int32** | The point in the list to begin retrieving results from. +**AggregatedBy** | **string** | How to group the statistics. Defaults to today. Must follow format YYYY-MM-DD. +**SortByMetric** | **string** | The metric that you want to sort by. Must be a single metric. + +### Return type + +[**CategoryStats**](CategoryStats.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/subusers/docs/ListSubuser.md b/rest/api/v3/subusers/docs/ListSubuser.md new file mode 100644 index 00000000..679e08de --- /dev/null +++ b/rest/api/v3/subusers/docs/ListSubuser.md @@ -0,0 +1,52 @@ +# ListSubuser + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSubuser**](ListSubuser.md#ListSubuser) | **Get** /v3/subusers | List all Subusers + + + +## ListSubuser + +> []Subuser ListSubuser(ctx, optional) + +List all Subusers + +**This endpoint allows you to retrieve a paginated list of all your subusers.** You can use the `username` query parameter to filter the list for specific subusers. You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSubuserParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Username** | **string** | The username of this subuser. +**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. +**Region** | [**Region**](RegionRegion.md) | Filter for Subusers in this region. If not provided, all Subusers will be returned. All users can also be explicitly requested by using the filter `all`. Users who are not pinned to a region will be displayed as `global`. +**IncludeRegion** | **bool** | Optional flag to include the regions of the Subusers in the response. If not provided, the region will be omitted from the response. +**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + +### Return type + +[**[]Subuser**](Subuser.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/subusers/docs/ListSubuserMonthlyStat.md b/rest/api/v3/subusers/docs/ListSubuserMonthlyStat.md new file mode 100644 index 00000000..039a19c5 --- /dev/null +++ b/rest/api/v3/subusers/docs/ListSubuserMonthlyStat.md @@ -0,0 +1,55 @@ +# ListSubuserMonthlyStat + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSubuserMonthlyStat**](ListSubuserMonthlyStat.md#ListSubuserMonthlyStat) | **Get** /v3/subusers/{SubuserName}/stats/monthly | Retrieve the monthly email statistics for a single subuser + + + +## ListSubuserMonthlyStat + +> SubuserStats ListSubuserMonthlyStat(ctx, DateSubuserNameoptional) + +Retrieve the monthly email statistics for a single subuser + +**This endpoint allows you to retrive the monthly email statistics for a specific subuser.** When using the `sort_by_metric` to sort your stats by a specific metric, you can not sort by the following metrics: `bounce_drops`, `deferred`, `invalid_emails`, `processed`, `spam_report_drops`, `spam_reports`, or `unsubscribe_drops`. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SubuserName** | **string** | The username of the Subuser. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSubuserMonthlyStatParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**SortByMetric** | **string** | The metric that you want to sort by. Metrics that you can sort by are: `blocks`, `bounces`, `clicks`, `delivered`, `opens`, `requests`, `unique_clicks`, `unique_opens`, and `unsubscribes`.' +**SortByDirection** | [**SortByDirection**](SortByDirectionSortByDirection.md) | The direction you want to sort. +**Limit** | **int32** | Optional field to limit the number of results returned. +**Offset** | **int32** | Optional beginning point in the list to retrieve from. + +### Return type + +[**SubuserStats**](SubuserStats.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/subusers/docs/Region.md b/rest/api/v3/subusers/docs/Region.md new file mode 100644 index 00000000..5c815839 --- /dev/null +++ b/rest/api/v3/subusers/docs/Region.md @@ -0,0 +1,14 @@ +# Region + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**ALL** | string | (value: `"all"`) +**GLOBAL** | string | (value: `"global"`) +**EU** | string | (value: `"eu"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/Region1.md b/rest/api/v3/subusers/docs/Region1.md new file mode 100644 index 00000000..53994edc --- /dev/null +++ b/rest/api/v3/subusers/docs/Region1.md @@ -0,0 +1,13 @@ +# Region1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**GLOBAL** | string | (value: `"global"`) +**EU** | string | (value: `"eu"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/Region2.md b/rest/api/v3/subusers/docs/Region2.md new file mode 100644 index 00000000..d5a099ad --- /dev/null +++ b/rest/api/v3/subusers/docs/Region2.md @@ -0,0 +1,13 @@ +# Region2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**GLOBAL** | string | (value: `"global"`) +**EU** | string | (value: `"eu"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/Region3.md b/rest/api/v3/subusers/docs/Region3.md new file mode 100644 index 00000000..32404c8e --- /dev/null +++ b/rest/api/v3/subusers/docs/Region3.md @@ -0,0 +1,13 @@ +# Region3 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**GLOBAL** | string | (value: `"global"`) +**EU** | string | (value: `"eu"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/ResetFrequency.md b/rest/api/v3/subusers/docs/ResetFrequency.md new file mode 100644 index 00000000..9b705ddc --- /dev/null +++ b/rest/api/v3/subusers/docs/ResetFrequency.md @@ -0,0 +1,14 @@ +# ResetFrequency + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**MONTHLY** | string | (value: `"monthly"`) +**WEEKLY** | string | (value: `"weekly"`) +**DAILY** | string | (value: `"daily"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/ResetFrequency1.md b/rest/api/v3/subusers/docs/ResetFrequency1.md new file mode 100644 index 00000000..1b6e357e --- /dev/null +++ b/rest/api/v3/subusers/docs/ResetFrequency1.md @@ -0,0 +1,14 @@ +# ResetFrequency1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**MONTHLY** | string | (value: `"monthly"`) +**WEEKLY** | string | (value: `"weekly"`) +**DAILY** | string | (value: `"daily"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/SortByDirection.md b/rest/api/v3/subusers/docs/SortByDirection.md new file mode 100644 index 00000000..0431e9a0 --- /dev/null +++ b/rest/api/v3/subusers/docs/SortByDirection.md @@ -0,0 +1,13 @@ +# SortByDirection + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DESC** | string | (value: `"desc"`) +**ASC** | string | (value: `"asc"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/SortByDirection1.md b/rest/api/v3/subusers/docs/SortByDirection1.md new file mode 100644 index 00000000..aa9dabea --- /dev/null +++ b/rest/api/v3/subusers/docs/SortByDirection1.md @@ -0,0 +1,13 @@ +# SortByDirection1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DESC** | string | (value: `"desc"`) +**ASC** | string | (value: `"asc"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/SortByDirection2.md b/rest/api/v3/subusers/docs/SortByDirection2.md new file mode 100644 index 00000000..a25d133f --- /dev/null +++ b/rest/api/v3/subusers/docs/SortByDirection2.md @@ -0,0 +1,13 @@ +# SortByDirection2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DESC** | string | (value: `"desc"`) +**ASC** | string | (value: `"asc"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/SortByMetric.md b/rest/api/v3/subusers/docs/SortByMetric.md new file mode 100644 index 00000000..d58e068d --- /dev/null +++ b/rest/api/v3/subusers/docs/SortByMetric.md @@ -0,0 +1,20 @@ +# SortByMetric + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**BLOCKS** | string | (value: `"blocks"`) +**BOUNCES** | string | (value: `"bounces"`) +**CLICKS** | string | (value: `"clicks"`) +**DELIVERED** | string | (value: `"delivered"`) +**OPENS** | string | (value: `"opens"`) +**REQUESTS** | string | (value: `"requests"`) +**UNIQUE_CLICKS** | string | (value: `"unique_clicks"`) +**UNIQUE_OPENS** | string | (value: `"unique_opens"`) +**UNSUBSCRIBES** | string | (value: `"unsubscribes"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/Subuser.md b/rest/api/v3/subusers/docs/Subuser.md new file mode 100644 index 00000000..5730bdb1 --- /dev/null +++ b/rest/api/v3/subusers/docs/Subuser.md @@ -0,0 +1,15 @@ +# Subuser + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Disabled** | **bool** | Whether or not the user is enabled or disabled. | +**Id** | **float32** | The ID of this subuser. | +**Username** | **string** | The name by which this subuser will be referred. | +**Email** | **string** | The email address to contact this subuser. | +**Region** | [**Region2**](Region2.md) | The region this Subuser is assigned to. This property is returned only if the `include_region` parameter was included and set to `true` in the API request. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/SubuserCredits.md b/rest/api/v3/subusers/docs/SubuserCredits.md new file mode 100644 index 00000000..5d6b18a9 --- /dev/null +++ b/rest/api/v3/subusers/docs/SubuserCredits.md @@ -0,0 +1,15 @@ +# SubuserCredits + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | [**Type**](Type.md) | Type determines how credits are reset for a Subuser. `unlimited` indicates that there is no limit to the Subuser's credits. `recurring` indicates that the credits for the Subuser are reset according to the frequency determined by `reset_frequency`. `nonrecurring` indicates that there is no recurring schedule to reset credits and resets must be done on an ad hoc basis. | +**ResetFrequency** | [**ResetFrequency**](ResetFrequency.md) | The frequency with which a Subuser's credits are reset if `type` is set to `recurring`, otherwise `null`. | +**Remain** | **int32** | Total number of remaining credits. `remain` is `null` if the reset `type` for the Subuser's credits is set to `unlimited`. | +**Total** | **int32** | Total number of allowable credits. `total` is `null` if the reset `type` for the Subuser's credits is set to `unlimited` or `nonrecurring`. | +**Used** | **int32** | Total number of used credits. `used` is `null` if the reset `type` for the Subuser's credits is set to `unlimited` or `nonrecurring`. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/SubuserCreditsRequest.md b/rest/api/v3/subusers/docs/SubuserCreditsRequest.md new file mode 100644 index 00000000..0ab5910a --- /dev/null +++ b/rest/api/v3/subusers/docs/SubuserCreditsRequest.md @@ -0,0 +1,13 @@ +# SubuserCreditsRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | [**Type1**](Type1.md) | Type determines how credits are reset for a Subuser. `unlimited` indicates that there is no limit to the Subuser's credits. `recurring` indicates that the credits for the Subuser are reset according to the frequency determined by `reset_frequency`. `nonrecurring` indicates that there is no recurring schedule to reset credits and resets must be done on an ad hoc basis. | +**ResetFrequency** | [**ResetFrequency1**](ResetFrequency1.md) | The frequency with which a Subuser's credits are reset if `type` is set to `recurring`. Do _not_ include `reset_frequency` if you choose a reset `type` value of `unlimited` or `nonrecurring`. |[optional] +**Total** | **int32** | Total number of credits to which the Subuser is to be reset. If `type` is `nonrecurring` then the Subuser's credits will be reset to `total` on a one-time basis. If `type` is `recurring` then the Subuser's credits will be reset to `total` every time a reset is scheduled in accordance with the `reset_frequency`. Do _not_ include `total` if you choose a reset `type` value of `unlimited`. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/SubuserPost.md b/rest/api/v3/subusers/docs/SubuserPost.md new file mode 100644 index 00000000..8abc4df3 --- /dev/null +++ b/rest/api/v3/subusers/docs/SubuserPost.md @@ -0,0 +1,15 @@ +# SubuserPost + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | The username of the subuser. | +**UserId** | **float32** | The user ID for this subuser. | +**Email** | **string** | The email address for this subuser. | +**CreditAllocation** | [**SubuserPostCreditAllocation**](SubuserPostCreditAllocation.md) | |[optional] +**Region** | [**Region3**](Region3.md) | The region this Subuser is assigned to. The property is returned only if the `include_region` parameter is included and set to `true` in the API request. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/SubuserPostCreditAllocation.md b/rest/api/v3/subusers/docs/SubuserPostCreditAllocation.md new file mode 100644 index 00000000..fa1e529e --- /dev/null +++ b/rest/api/v3/subusers/docs/SubuserPostCreditAllocation.md @@ -0,0 +1,11 @@ +# SubuserPostCreditAllocation + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/SubuserStats.md b/rest/api/v3/subusers/docs/SubuserStats.md new file mode 100644 index 00000000..5ca5f9fb --- /dev/null +++ b/rest/api/v3/subusers/docs/SubuserStats.md @@ -0,0 +1,12 @@ +# SubuserStats + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | **string** | The date the statistics were gathered. |[optional] +**Stats** | [**[]SubuserStatsStatsInner**](SubuserStatsStatsInner.md) | The list of statistics. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/SubuserStatsStatsInner.md b/rest/api/v3/subusers/docs/SubuserStatsStatsInner.md new file mode 100644 index 00000000..55735232 --- /dev/null +++ b/rest/api/v3/subusers/docs/SubuserStatsStatsInner.md @@ -0,0 +1,15 @@ +# SubuserStatsStatsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**FirstName** | **string** | The first name of the subuser. |[optional] +**LastName** | **string** | The last name of the subuser. |[optional] +**Metrics** | [**SubuserStatsStatsInnerMetrics**](SubuserStatsStatsInnerMetrics.md) | |[optional] +**Name** | **string** | The username of the subuser. |[optional] +**Type** | **string** | The type of account. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/SubuserStatsStatsInnerMetrics.md b/rest/api/v3/subusers/docs/SubuserStatsStatsInnerMetrics.md new file mode 100644 index 00000000..1c7f2071 --- /dev/null +++ b/rest/api/v3/subusers/docs/SubuserStatsStatsInnerMetrics.md @@ -0,0 +1,26 @@ +# SubuserStatsStatsInnerMetrics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Blocks** | **int32** | The number of emails that were not allowed to be delivered by ISPs. |[optional] +**BounceDrops** | **int32** | The number of emails that were dropped because of a bounce. |[optional] +**Bounces** | **int32** | The number of emails that bounced instead of being delivered. |[optional] +**Clicks** | **int32** | The number of links that were clicked in your emails. |[optional] +**Deferred** | **int32** | The number of emails that temporarily could not be delivered. |[optional] +**Delivered** | **int32** | The number of emails SendGrid was able to confirm were actually delivered to a recipient. |[optional] +**InvalidEmails** | **int32** | The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. |[optional] +**Opens** | **int32** | The total number of times your emails were opened by recipients. |[optional] +**Processed** | **int32** | Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. |[optional] +**Requests** | **int32** | The number of emails that were requested to be delivered. |[optional] +**SpamReportDrops** | **int32** | The number of emails that were dropped due to a recipient previously marking your emails as spam. |[optional] +**SpamReports** | **int32** | The number of recipients who marked your email as spam. |[optional] +**UniqueClicks** | **int32** | The number of unique recipients who clicked links in your emails. |[optional] +**UniqueOpens** | **int32** | The number of unique recipients who opened your emails. |[optional] +**UnsubscribeDrops** | **int32** | The number of emails dropped due to a recipient unsubscribing from your emails. |[optional] +**Unsubscribes** | **int32** | The number of recipients who unsubscribed from your emails. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/Type.md b/rest/api/v3/subusers/docs/Type.md new file mode 100644 index 00000000..0a33c4cf --- /dev/null +++ b/rest/api/v3/subusers/docs/Type.md @@ -0,0 +1,14 @@ +# Type + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**UNLIMITED** | string | (value: `"unlimited"`) +**RECURRING** | string | (value: `"recurring"`) +**NONRECURRING** | string | (value: `"nonrecurring"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/Type1.md b/rest/api/v3/subusers/docs/Type1.md new file mode 100644 index 00000000..929d624f --- /dev/null +++ b/rest/api/v3/subusers/docs/Type1.md @@ -0,0 +1,14 @@ +# Type1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**UNLIMITED** | string | (value: `"unlimited"`) +**RECURRING** | string | (value: `"recurring"`) +**NONRECURRING** | string | (value: `"nonrecurring"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/UpdateSubuser.md b/rest/api/v3/subusers/docs/UpdateSubuser.md new file mode 100644 index 00000000..37171280 --- /dev/null +++ b/rest/api/v3/subusers/docs/UpdateSubuser.md @@ -0,0 +1,52 @@ +# UpdateSubuser + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSubuser**](UpdateSubuser.md#UpdateSubuser) | **Patch** /v3/subusers/{SubuserName} | Enable/disable a subuser + + + +## UpdateSubuser + +> map[string]interface{} UpdateSubuser(ctx, SubuserNameoptional) + +Enable/disable a subuser + +**This endpoint allows you to enable or disable a subuser.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SubuserName** | **string** | The username of the Subuser. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSubuserParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**UpdateSubuserRequest** | [**UpdateSubuserRequest**](UpdateSubuserRequest.md) | + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/subusers/docs/UpdateSubuserCredit.md b/rest/api/v3/subusers/docs/UpdateSubuserCredit.md new file mode 100644 index 00000000..7c5088c3 --- /dev/null +++ b/rest/api/v3/subusers/docs/UpdateSubuserCredit.md @@ -0,0 +1,51 @@ +# UpdateSubuserCredit + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSubuserCredit**](UpdateSubuserCredit.md#UpdateSubuserCredit) | **Put** /v3/subusers/{SubuserName}/credits | Update the Credits for a Subuser + + + +## UpdateSubuserCredit + +> SubuserCredits UpdateSubuserCredit(ctx, SubuserNameSubuserCreditsRequest) + +Update the Credits for a Subuser + +**This endpoint allows you to update the Credits for a Subuser.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SubuserName** | **string** | The username of the Subuser. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSubuserCreditParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**SubuserCredits**](SubuserCredits.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/subusers/docs/UpdateSubuserIp.md b/rest/api/v3/subusers/docs/UpdateSubuserIp.md new file mode 100644 index 00000000..402e272e --- /dev/null +++ b/rest/api/v3/subusers/docs/UpdateSubuserIp.md @@ -0,0 +1,52 @@ +# UpdateSubuserIp + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSubuserIp**](UpdateSubuserIp.md#UpdateSubuserIp) | **Put** /v3/subusers/{SubuserName}/ips | Update IPs assigned to a subuser + + + +## UpdateSubuserIp + +> UpdateSubuserIp200Response UpdateSubuserIp(ctx, SubuserNameoptional) + +Update IPs assigned to a subuser + +**This endpoint allows you update your subusers' assigned IP.** Each subuser should be assigned to an IP address from which all of this subuser's mail will be sent. Often, this is the same IP as the parent account, but each subuser can have one or more of their own IP addresses as well. More information: * [How to request more IPs](https://sendgrid.com/docs/ui/account-and-settings/dedicated-ip-addresses/) * [Setup Reverse DNS](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-reverse-dns/) + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SubuserName** | **string** | The username of the Subuser. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSubuserIpParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**RequestBody** | **[]string** | + +### Return type + +[**UpdateSubuserIp200Response**](UpdateSubuserIp200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/subusers/docs/UpdateSubuserIp200Response.md b/rest/api/v3/subusers/docs/UpdateSubuserIp200Response.md new file mode 100644 index 00000000..fe663d5f --- /dev/null +++ b/rest/api/v3/subusers/docs/UpdateSubuserIp200Response.md @@ -0,0 +1,11 @@ +# UpdateSubuserIp200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Ips** | **[]string** | The IP addresses that are assigned to the subuser. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/UpdateSubuserRemainingCredit.md b/rest/api/v3/subusers/docs/UpdateSubuserRemainingCredit.md new file mode 100644 index 00000000..a1a8923d --- /dev/null +++ b/rest/api/v3/subusers/docs/UpdateSubuserRemainingCredit.md @@ -0,0 +1,51 @@ +# UpdateSubuserRemainingCredit + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSubuserRemainingCredit**](UpdateSubuserRemainingCredit.md#UpdateSubuserRemainingCredit) | **Patch** /v3/subusers/{SubuserName}/credits/remaining | Update the remaining credits for a Subuser + + + +## UpdateSubuserRemainingCredit + +> SubuserCredits UpdateSubuserRemainingCredit(ctx, SubuserNameUpdateSubuserRemainingCreditRequest) + +Update the remaining credits for a Subuser + +**This endpoint allows you to update the remaining credits for a Subuser.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SubuserName** | **string** | The username of the Subuser. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSubuserRemainingCreditParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +[**SubuserCredits**](SubuserCredits.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/subusers/docs/UpdateSubuserRemainingCreditRequest.md b/rest/api/v3/subusers/docs/UpdateSubuserRemainingCreditRequest.md new file mode 100644 index 00000000..4431ec58 --- /dev/null +++ b/rest/api/v3/subusers/docs/UpdateSubuserRemainingCreditRequest.md @@ -0,0 +1,11 @@ +# UpdateSubuserRemainingCreditRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**AllocationUpdate** | **int32** | The number of credits to add to or subtract from the current remaining credits for the Subuser. Use a positive number to increase the remaining credits or a negative number to reduce the remaining credits. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/UpdateSubuserRequest.md b/rest/api/v3/subusers/docs/UpdateSubuserRequest.md new file mode 100644 index 00000000..2a1081ef --- /dev/null +++ b/rest/api/v3/subusers/docs/UpdateSubuserRequest.md @@ -0,0 +1,11 @@ +# UpdateSubuserRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Disabled** | **bool** | Whether or not this subuser is disabled. `true` means disabled, `false` means enabled. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/docs/UpdateSubuserWebsiteAccess.md b/rest/api/v3/subusers/docs/UpdateSubuserWebsiteAccess.md new file mode 100644 index 00000000..fdbf5ff8 --- /dev/null +++ b/rest/api/v3/subusers/docs/UpdateSubuserWebsiteAccess.md @@ -0,0 +1,52 @@ +# UpdateSubuserWebsiteAccess + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSubuserWebsiteAccess**](UpdateSubuserWebsiteAccess.md#UpdateSubuserWebsiteAccess) | **Patch** /v3/subusers/{SubuserName}/website_access | Enable/Disable website access for a Subuser + + + +## UpdateSubuserWebsiteAccess + +> map[string]interface{} UpdateSubuserWebsiteAccess(ctx, SubuserNameoptional) + +Enable/Disable website access for a Subuser + +Enable/Disable website access for a Subuser, while still preserving email send functionality. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**SubuserName** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSubuserWebsiteAccessParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**UpdateSubuserWebsiteAccessRequest** | [**UpdateSubuserWebsiteAccessRequest**](UpdateSubuserWebsiteAccessRequest.md) | + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/subusers/docs/UpdateSubuserWebsiteAccessRequest.md b/rest/api/v3/subusers/docs/UpdateSubuserWebsiteAccessRequest.md new file mode 100644 index 00000000..a187eb06 --- /dev/null +++ b/rest/api/v3/subusers/docs/UpdateSubuserWebsiteAccessRequest.md @@ -0,0 +1,11 @@ +# UpdateSubuserWebsiteAccessRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Disabled** | **bool** | Whether or not to disable website access to the Subuser. `true` means disabled, `false` means enabled. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/subusers/model_aggregated_by.go b/rest/api/v3/subusers/model_aggregated_by.go new file mode 100644 index 00000000..5542cabd --- /dev/null +++ b/rest/api/v3/subusers/model_aggregated_by.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AggregatedBy the model 'AggregatedBy' +type AggregatedBy string + +// List of AggregatedBy +const ( + AGGREGATEDBY_DAY AggregatedBy = "day" + AGGREGATEDBY_WEEK AggregatedBy = "week" + AGGREGATEDBY_MONTH AggregatedBy = "month" +) diff --git a/rest/api/v3/subusers/model_category_stats.go b/rest/api/v3/subusers/model_category_stats.go new file mode 100644 index 00000000..1d14ce55 --- /dev/null +++ b/rest/api/v3/subusers/model_category_stats.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CategoryStats struct for CategoryStats +type CategoryStats struct { + // The date the statistics were gathered. + Date string `json:"date"` + Stats *[]CategoryStatsStatsInner `json:"stats,omitempty"` +} diff --git a/rest/api/v3/subusers/model_category_stats_stats_inner.go b/rest/api/v3/subusers/model_category_stats_stats_inner.go new file mode 100644 index 00000000..00fba759 --- /dev/null +++ b/rest/api/v3/subusers/model_category_stats_stats_inner.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CategoryStatsStatsInner struct for CategoryStatsStatsInner +type CategoryStatsStatsInner struct { + Metrics *CategoryStatsStatsInnerMetrics `json:"metrics,omitempty"` + // The name of the category. + Name *string `json:"name,omitempty"` + // How you are segmenting your statistics. + Type string `json:"type"` +} diff --git a/rest/api/v3/subusers/model_category_stats_stats_inner_metrics.go b/rest/api/v3/subusers/model_category_stats_stats_inner_metrics.go new file mode 100644 index 00000000..a7d50efe --- /dev/null +++ b/rest/api/v3/subusers/model_category_stats_stats_inner_metrics.go @@ -0,0 +1,50 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CategoryStatsStatsInnerMetrics struct for CategoryStatsStatsInnerMetrics +type CategoryStatsStatsInnerMetrics struct { + // The number of emails that were not allowed to be delivered by ISPs. + Blocks int32 `json:"blocks"` + // The number of emails that were dropped because of a bounce. + BounceDrops int32 `json:"bounce_drops"` + // The number of emails that bounced instead of being delivered. + Bounces int32 `json:"bounces"` + // The number of links that were clicked. + Clicks int32 `json:"clicks"` + // The number of emails that temporarily could not be delivered. + Deferred int32 `json:"deferred"` + // The number of emails SendGrid was able to confirm were actually delivered to a recipient. + Delivered int32 `json:"delivered"` + // The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. + InvalidEmails int32 `json:"invalid_emails"` + // The total number of times your emails were opened by recipients. + Opens int32 `json:"opens"` + // Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. + Processed int32 `json:"processed"` + // The number of emails that were requested to be delivered. + Requests int32 `json:"requests"` + // The number of emails that were dropped due to a recipient previously marking your emails as spam. + SpamReportDrops int32 `json:"spam_report_drops"` + // The number of recipients who marked your email as spam. + SpamReports int32 `json:"spam_reports"` + // The number of unique recipients who clicked links in your emails. + UniqueClicks int32 `json:"unique_clicks"` + // The number of unique recipients who opened your emails. + UniqueOpens int32 `json:"unique_opens"` + // The number of emails dropped due to a recipient unsubscribing from your emails. + UnsubscribeDrops int32 `json:"unsubscribe_drops"` + // The number of recipients who unsubscribed from your emails. + Unsubscribes int32 `json:"unsubscribes"` +} diff --git a/rest/api/v3/subusers/model_create_subuser_request.go b/rest/api/v3/subusers/model_create_subuser_request.go new file mode 100644 index 00000000..5839b599 --- /dev/null +++ b/rest/api/v3/subusers/model_create_subuser_request.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateSubuserRequest struct for CreateSubuserRequest +type CreateSubuserRequest struct { + // The username for this subuser. + Username string `json:"username"` + // The email address of the subuser. + Email string `json:"email"` + // The password this subuser will use when logging into SendGrid. + Password string `json:"password"` + // The IP addresses that should be assigned to this subuser. + Ips []string `json:"ips"` + // The region this Subuser should be assigned to. Can be `global` or `eu`. (Regional email is in Public Beta and requires SendGrid Pro plan or above.). + Region *Region1 `json:"region,omitempty"` + // A flag that determines if the Subuser's region should be returned in the response. (Regional email is in Public Beta and requires SendGrid Pro plan or above.) + IncludeRegion *bool `json:"include_region,omitempty"` +} diff --git a/rest/api/v3/subusers/model_error_response.go b/rest/api/v3/subusers/model_error_response.go new file mode 100644 index 00000000..c2d757e4 --- /dev/null +++ b/rest/api/v3/subusers/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/subusers/model_error_response_errors_inner.go b/rest/api/v3/subusers/model_error_response_errors_inner.go new file mode 100644 index 00000000..2d3ef35d --- /dev/null +++ b/rest/api/v3/subusers/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/subusers/model_list_reputation_200_response_inner.go b/rest/api/v3/subusers/model_list_reputation_200_response_inner.go new file mode 100644 index 00000000..1f50f157 --- /dev/null +++ b/rest/api/v3/subusers/model_list_reputation_200_response_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListReputation200ResponseInner struct for ListReputation200ResponseInner +type ListReputation200ResponseInner struct { + // The sender reputation this subuser has attained. + Reputation float32 `json:"reputation"` + // The subuser that has this reputation. + Username string `json:"username"` +} diff --git a/rest/api/v3/subusers/model_region.go b/rest/api/v3/subusers/model_region.go new file mode 100644 index 00000000..b7956176 --- /dev/null +++ b/rest/api/v3/subusers/model_region.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Region the model 'Region' +type Region string + +// List of Region +const ( + REGION_ALL Region = "all" + REGION_GLOBAL Region = "global" + REGION_EU Region = "eu" +) diff --git a/rest/api/v3/subusers/model_region1.go b/rest/api/v3/subusers/model_region1.go new file mode 100644 index 00000000..4bd4d938 --- /dev/null +++ b/rest/api/v3/subusers/model_region1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Region1 the model 'Region1' +type Region1 string + +// List of Region1 +const ( + REGION1_GLOBAL Region1 = "global" + REGION1_EU Region1 = "eu" +) diff --git a/rest/api/v3/subusers/model_region2.go b/rest/api/v3/subusers/model_region2.go new file mode 100644 index 00000000..5ae5093e --- /dev/null +++ b/rest/api/v3/subusers/model_region2.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Region2 the model 'Region2' +type Region2 string + +// List of Region2 +const ( + REGION2_GLOBAL Region2 = "global" + REGION2_EU Region2 = "eu" +) diff --git a/rest/api/v3/subusers/model_region3.go b/rest/api/v3/subusers/model_region3.go new file mode 100644 index 00000000..8a827cdc --- /dev/null +++ b/rest/api/v3/subusers/model_region3.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Region3 the model 'Region3' +type Region3 string + +// List of Region3 +const ( + REGION3_GLOBAL Region3 = "global" + REGION3_EU Region3 = "eu" +) diff --git a/rest/api/v3/subusers/model_reset_frequency.go b/rest/api/v3/subusers/model_reset_frequency.go new file mode 100644 index 00000000..e5725d07 --- /dev/null +++ b/rest/api/v3/subusers/model_reset_frequency.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ResetFrequency the model 'ResetFrequency' +type ResetFrequency string + +// List of ResetFrequency +const ( + RESETFREQUENCY_MONTHLY ResetFrequency = "monthly" + RESETFREQUENCY_WEEKLY ResetFrequency = "weekly" + RESETFREQUENCY_DAILY ResetFrequency = "daily" +) diff --git a/rest/api/v3/subusers/model_reset_frequency1.go b/rest/api/v3/subusers/model_reset_frequency1.go new file mode 100644 index 00000000..2f9b7e5d --- /dev/null +++ b/rest/api/v3/subusers/model_reset_frequency1.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ResetFrequency1 the model 'ResetFrequency1' +type ResetFrequency1 string + +// List of ResetFrequency1 +const ( + RESETFREQUENCY1_MONTHLY ResetFrequency1 = "monthly" + RESETFREQUENCY1_WEEKLY ResetFrequency1 = "weekly" + RESETFREQUENCY1_DAILY ResetFrequency1 = "daily" +) diff --git a/rest/api/v3/subusers/model_sort_by_direction.go b/rest/api/v3/subusers/model_sort_by_direction.go new file mode 100644 index 00000000..f0372919 --- /dev/null +++ b/rest/api/v3/subusers/model_sort_by_direction.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SortByDirection the model 'SortByDirection' +type SortByDirection string + +// List of SortByDirection +const ( + SORTBYDIRECTION_DESC SortByDirection = "desc" + SORTBYDIRECTION_ASC SortByDirection = "asc" +) diff --git a/rest/api/v3/subusers/model_sort_by_direction1.go b/rest/api/v3/subusers/model_sort_by_direction1.go new file mode 100644 index 00000000..3eb12c50 --- /dev/null +++ b/rest/api/v3/subusers/model_sort_by_direction1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SortByDirection1 the model 'SortByDirection1' +type SortByDirection1 string + +// List of SortByDirection1 +const ( + SORTBYDIRECTION1_DESC SortByDirection1 = "desc" + SORTBYDIRECTION1_ASC SortByDirection1 = "asc" +) diff --git a/rest/api/v3/subusers/model_sort_by_direction2.go b/rest/api/v3/subusers/model_sort_by_direction2.go new file mode 100644 index 00000000..cb54d9bf --- /dev/null +++ b/rest/api/v3/subusers/model_sort_by_direction2.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SortByDirection2 the model 'SortByDirection2' +type SortByDirection2 string + +// List of SortByDirection2 +const ( + SORTBYDIRECTION2_DESC SortByDirection2 = "desc" + SORTBYDIRECTION2_ASC SortByDirection2 = "asc" +) diff --git a/rest/api/v3/subusers/model_sort_by_metric.go b/rest/api/v3/subusers/model_sort_by_metric.go new file mode 100644 index 00000000..9a400ccb --- /dev/null +++ b/rest/api/v3/subusers/model_sort_by_metric.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SortByMetric the model 'SortByMetric' +type SortByMetric string + +// List of SortByMetric +const ( + SORTBYMETRIC_BLOCKS SortByMetric = "blocks" + SORTBYMETRIC_BOUNCES SortByMetric = "bounces" + SORTBYMETRIC_CLICKS SortByMetric = "clicks" + SORTBYMETRIC_DELIVERED SortByMetric = "delivered" + SORTBYMETRIC_OPENS SortByMetric = "opens" + SORTBYMETRIC_REQUESTS SortByMetric = "requests" + SORTBYMETRIC_UNIQUE_CLICKS SortByMetric = "unique_clicks" + SORTBYMETRIC_UNIQUE_OPENS SortByMetric = "unique_opens" + SORTBYMETRIC_UNSUBSCRIBES SortByMetric = "unsubscribes" +) diff --git a/rest/api/v3/subusers/model_subuser.go b/rest/api/v3/subusers/model_subuser.go new file mode 100644 index 00000000..a5128a1a --- /dev/null +++ b/rest/api/v3/subusers/model_subuser.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Subuser struct for Subuser +type Subuser struct { + // Whether or not the user is enabled or disabled. + Disabled bool `json:"disabled"` + // The ID of this subuser. + Id float32 `json:"id"` + // The name by which this subuser will be referred. + Username string `json:"username"` + // The email address to contact this subuser. + Email string `json:"email"` + // The region this Subuser is assigned to. This property is returned only if the `include_region` parameter was included and set to `true` in the API request. + Region *Region2 `json:"region,omitempty"` +} diff --git a/rest/api/v3/subusers/model_subuser_credits.go b/rest/api/v3/subusers/model_subuser_credits.go new file mode 100644 index 00000000..e3b6597d --- /dev/null +++ b/rest/api/v3/subusers/model_subuser_credits.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SubuserCredits struct for SubuserCredits +type SubuserCredits struct { + // Type determines how credits are reset for a Subuser. `unlimited` indicates that there is no limit to the Subuser's credits. `recurring` indicates that the credits for the Subuser are reset according to the frequency determined by `reset_frequency`. `nonrecurring` indicates that there is no recurring schedule to reset credits and resets must be done on an ad hoc basis. + Type Type `json:"type"` + // The frequency with which a Subuser's credits are reset if `type` is set to `recurring`, otherwise `null`. + ResetFrequency ResetFrequency `json:"reset_frequency"` + // Total number of remaining credits. `remain` is `null` if the reset `type` for the Subuser's credits is set to `unlimited`. + Remain int32 `json:"remain"` + // Total number of allowable credits. `total` is `null` if the reset `type` for the Subuser's credits is set to `unlimited` or `nonrecurring`. + Total int32 `json:"total"` + // Total number of used credits. `used` is `null` if the reset `type` for the Subuser's credits is set to `unlimited` or `nonrecurring`. + Used int32 `json:"used"` +} diff --git a/rest/api/v3/subusers/model_subuser_credits_request.go b/rest/api/v3/subusers/model_subuser_credits_request.go new file mode 100644 index 00000000..4eadc773 --- /dev/null +++ b/rest/api/v3/subusers/model_subuser_credits_request.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SubuserCreditsRequest struct for SubuserCreditsRequest +type SubuserCreditsRequest struct { + // Type determines how credits are reset for a Subuser. `unlimited` indicates that there is no limit to the Subuser's credits. `recurring` indicates that the credits for the Subuser are reset according to the frequency determined by `reset_frequency`. `nonrecurring` indicates that there is no recurring schedule to reset credits and resets must be done on an ad hoc basis. + Type Type1 `json:"type"` + // The frequency with which a Subuser's credits are reset if `type` is set to `recurring`. Do _not_ include `reset_frequency` if you choose a reset `type` value of `unlimited` or `nonrecurring`. + ResetFrequency *ResetFrequency1 `json:"reset_frequency,omitempty"` + // Total number of credits to which the Subuser is to be reset. If `type` is `nonrecurring` then the Subuser's credits will be reset to `total` on a one-time basis. If `type` is `recurring` then the Subuser's credits will be reset to `total` every time a reset is scheduled in accordance with the `reset_frequency`. Do _not_ include `total` if you choose a reset `type` value of `unlimited`. + Total *int32 `json:"total,omitempty"` +} diff --git a/rest/api/v3/subusers/model_subuser_post.go b/rest/api/v3/subusers/model_subuser_post.go new file mode 100644 index 00000000..f1a55390 --- /dev/null +++ b/rest/api/v3/subusers/model_subuser_post.go @@ -0,0 +1,27 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SubuserPost struct for SubuserPost +type SubuserPost struct { + // The username of the subuser. + Username string `json:"username"` + // The user ID for this subuser. + UserId float32 `json:"user_id"` + // The email address for this subuser. + Email string `json:"email"` + CreditAllocation *SubuserPostCreditAllocation `json:"credit_allocation,omitempty"` + // The region this Subuser is assigned to. The property is returned only if the `include_region` parameter is included and set to `true` in the API request. + Region *Region3 `json:"region,omitempty"` +} diff --git a/rest/api/v3/subusers/model_subuser_post_credit_allocation.go b/rest/api/v3/subusers/model_subuser_post_credit_allocation.go new file mode 100644 index 00000000..6f6fb157 --- /dev/null +++ b/rest/api/v3/subusers/model_subuser_post_credit_allocation.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SubuserPostCreditAllocation struct for SubuserPostCreditAllocation +type SubuserPostCreditAllocation struct { + Type *string `json:"type,omitempty"` +} diff --git a/rest/api/v3/subusers/model_subuser_stats.go b/rest/api/v3/subusers/model_subuser_stats.go new file mode 100644 index 00000000..3d1b6cd6 --- /dev/null +++ b/rest/api/v3/subusers/model_subuser_stats.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SubuserStats struct for SubuserStats +type SubuserStats struct { + // The date the statistics were gathered. + Date *string `json:"date,omitempty"` + // The list of statistics. + Stats *[]SubuserStatsStatsInner `json:"stats,omitempty"` +} diff --git a/rest/api/v3/subusers/model_subuser_stats_stats_inner.go b/rest/api/v3/subusers/model_subuser_stats_stats_inner.go new file mode 100644 index 00000000..19e47dfd --- /dev/null +++ b/rest/api/v3/subusers/model_subuser_stats_stats_inner.go @@ -0,0 +1,27 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SubuserStatsStatsInner struct for SubuserStatsStatsInner +type SubuserStatsStatsInner struct { + // The first name of the subuser. + FirstName *string `json:"first_name,omitempty"` + // The last name of the subuser. + LastName *string `json:"last_name,omitempty"` + Metrics *SubuserStatsStatsInnerMetrics `json:"metrics,omitempty"` + // The username of the subuser. + Name *string `json:"name,omitempty"` + // The type of account. + Type *string `json:"type,omitempty"` +} diff --git a/rest/api/v3/subusers/model_subuser_stats_stats_inner_metrics.go b/rest/api/v3/subusers/model_subuser_stats_stats_inner_metrics.go new file mode 100644 index 00000000..cd7afbe9 --- /dev/null +++ b/rest/api/v3/subusers/model_subuser_stats_stats_inner_metrics.go @@ -0,0 +1,50 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SubuserStatsStatsInnerMetrics struct for SubuserStatsStatsInnerMetrics +type SubuserStatsStatsInnerMetrics struct { + // The number of emails that were not allowed to be delivered by ISPs. + Blocks *int32 `json:"blocks,omitempty"` + // The number of emails that were dropped because of a bounce. + BounceDrops *int32 `json:"bounce_drops,omitempty"` + // The number of emails that bounced instead of being delivered. + Bounces *int32 `json:"bounces,omitempty"` + // The number of links that were clicked in your emails. + Clicks *int32 `json:"clicks,omitempty"` + // The number of emails that temporarily could not be delivered. + Deferred *int32 `json:"deferred,omitempty"` + // The number of emails SendGrid was able to confirm were actually delivered to a recipient. + Delivered *int32 `json:"delivered,omitempty"` + // The number of recipients who had malformed email addresses or whose mail provider reported the address as invalid. + InvalidEmails *int32 `json:"invalid_emails,omitempty"` + // The total number of times your emails were opened by recipients. + Opens *int32 `json:"opens,omitempty"` + // Requests from your website, application, or mail client via SMTP Relay or the API that SendGrid processed. + Processed *int32 `json:"processed,omitempty"` + // The number of emails that were requested to be delivered. + Requests *int32 `json:"requests,omitempty"` + // The number of emails that were dropped due to a recipient previously marking your emails as spam. + SpamReportDrops *int32 `json:"spam_report_drops,omitempty"` + // The number of recipients who marked your email as spam. + SpamReports *int32 `json:"spam_reports,omitempty"` + // The number of unique recipients who clicked links in your emails. + UniqueClicks *int32 `json:"unique_clicks,omitempty"` + // The number of unique recipients who opened your emails. + UniqueOpens *int32 `json:"unique_opens,omitempty"` + // The number of emails dropped due to a recipient unsubscribing from your emails. + UnsubscribeDrops *int32 `json:"unsubscribe_drops,omitempty"` + // The number of recipients who unsubscribed from your emails. + Unsubscribes *int32 `json:"unsubscribes,omitempty"` +} diff --git a/rest/api/v3/subusers/model_type.go b/rest/api/v3/subusers/model_type.go new file mode 100644 index 00000000..c7460304 --- /dev/null +++ b/rest/api/v3/subusers/model_type.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Type the model 'Type' +type Type string + +// List of Type +const ( + TYPE_UNLIMITED Type = "unlimited" + TYPE_RECURRING Type = "recurring" + TYPE_NONRECURRING Type = "nonrecurring" +) diff --git a/rest/api/v3/subusers/model_type1.go b/rest/api/v3/subusers/model_type1.go new file mode 100644 index 00000000..0cdf19ad --- /dev/null +++ b/rest/api/v3/subusers/model_type1.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Type1 the model 'Type1' +type Type1 string + +// List of Type1 +const ( + TYPE1_UNLIMITED Type1 = "unlimited" + TYPE1_RECURRING Type1 = "recurring" + TYPE1_NONRECURRING Type1 = "nonrecurring" +) diff --git a/rest/api/v3/subusers/model_update_subuser_ip_200_response.go b/rest/api/v3/subusers/model_update_subuser_ip_200_response.go new file mode 100644 index 00000000..6f8d30ae --- /dev/null +++ b/rest/api/v3/subusers/model_update_subuser_ip_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateSubuserIp200Response struct for UpdateSubuserIp200Response +type UpdateSubuserIp200Response struct { + // The IP addresses that are assigned to the subuser. + Ips *[]string `json:"ips,omitempty"` +} diff --git a/rest/api/v3/subusers/model_update_subuser_remaining_credit_request.go b/rest/api/v3/subusers/model_update_subuser_remaining_credit_request.go new file mode 100644 index 00000000..68f81f3c --- /dev/null +++ b/rest/api/v3/subusers/model_update_subuser_remaining_credit_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateSubuserRemainingCreditRequest struct for UpdateSubuserRemainingCreditRequest +type UpdateSubuserRemainingCreditRequest struct { + // The number of credits to add to or subtract from the current remaining credits for the Subuser. Use a positive number to increase the remaining credits or a negative number to reduce the remaining credits. + AllocationUpdate int32 `json:"allocation_update"` +} diff --git a/rest/api/v3/subusers/model_update_subuser_request.go b/rest/api/v3/subusers/model_update_subuser_request.go new file mode 100644 index 00000000..c4bbc99a --- /dev/null +++ b/rest/api/v3/subusers/model_update_subuser_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateSubuserRequest struct for UpdateSubuserRequest +type UpdateSubuserRequest struct { + // Whether or not this subuser is disabled. `true` means disabled, `false` means enabled. + Disabled *bool `json:"disabled,omitempty"` +} diff --git a/rest/api/v3/subusers/model_update_subuser_website_access_request.go b/rest/api/v3/subusers/model_update_subuser_website_access_request.go new file mode 100644 index 00000000..7af0aac6 --- /dev/null +++ b/rest/api/v3/subusers/model_update_subuser_website_access_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Subusers +* The Twilio SendGrid Subusers API allows you to create and manage your Subuser accounts. Subusers are available on [Pro and Premier plans](https://sendgrid.com/pricing), and you can think of them as sub-accounts. Each Subuser can have its own sending domains, IP addresses, and reporting. SendGrid recommends creating Subusers for each of the different types of emails you send—one Subuser for transactional emails and another for marketing emails. Independent Software Vendor (ISV) customers may also create Subusers for each of their customers. You can also manage Subusers in the [Twilio SendGrid application user interface](https://app.sendgrid.com/settings/subusers). See [**Subusers**](https://docs.sendgrid.com/ui/account-and-settings/subusers) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateSubuserWebsiteAccessRequest struct for UpdateSubuserWebsiteAccessRequest +type UpdateSubuserWebsiteAccessRequest struct { + // Whether or not to disable website access to the Subuser. `true` means disabled, `false` means enabled. + Disabled *bool `json:"disabled,omitempty"` +} diff --git a/rest/api/v3/teammates/README.md b/rest/api/v3/teammates/README.md new file mode 100644 index 00000000..8fc932cd --- /dev/null +++ b/rest/api/v3/teammates/README.md @@ -0,0 +1,89 @@ +# Go API client for + +The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:02.490087+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*DeletePendingTeammate* | [**DeletePendingTeammate**](docs/DeletePendingTeammate.md#deletependingteammate) | **Delete** /v3/teammates/pending/{Token} | Delete pending teammate +*DeleteTeammate* | [**DeleteTeammate**](docs/DeleteTeammate.md#deleteteammate) | **Delete** /v3/teammates/{Username} | Delete teammate +*GetTeammate* | [**GetTeammate**](docs/GetTeammate.md#getteammate) | **Get** /v3/teammates/{Username} | Retrieve specific teammate +*InviteTeammate* | [**InviteTeammate**](docs/InviteTeammate.md#inviteteammate) | **Post** /v3/teammates | Invite teammate +*ListPendingTeammate* | [**ListPendingTeammate**](docs/ListPendingTeammate.md#listpendingteammate) | **Get** /v3/teammates/pending | Retrieve all pending teammates +*ListSubuserByTemplate* | [**ListSubuserByTemplate**](docs/ListSubuserByTemplate.md#listsubuserbytemplate) | **Get** /v3/teammates/{TeammateName}/subuser_access | Get Teammate Subuser Access +*ListTeammate* | [**ListTeammate**](docs/ListTeammate.md#listteammate) | **Get** /v3/teammates | Retrieve all teammates +*ResendTeammateInvite* | [**ResendTeammateInvite**](docs/ResendTeammateInvite.md#resendteammateinvite) | **Post** /v3/teammates/pending/{Token}/resend | Resend teammate invite +*UpdateTeammate* | [**UpdateTeammate**](docs/UpdateTeammate.md#updateteammate) | **Patch** /v3/teammates/{Username} | Update teammate's permissions + + +## Documentation For Models + + - [GetTeammate200Response](GetTeammate200Response.md) + - [InviteTeammate201Response](InviteTeammate201Response.md) + - [InviteTeammate400Response](InviteTeammate400Response.md) + - [InviteTeammate400ResponseErrorsInner](InviteTeammate400ResponseErrorsInner.md) + - [InviteTeammateRequest](InviteTeammateRequest.md) + - [ListPendingTeammate200Response](ListPendingTeammate200Response.md) + - [ListPendingTeammate200ResponseResultInner](ListPendingTeammate200ResponseResultInner.md) + - [ListSubuserByTemplate200Response](ListSubuserByTemplate200Response.md) + - [ListSubuserByTemplate200ResponseMetadata](ListSubuserByTemplate200ResponseMetadata.md) + - [ListSubuserByTemplate200ResponseMetadataNextParams](ListSubuserByTemplate200ResponseMetadataNextParams.md) + - [ListSubuserByTemplate200ResponseSubuserAccessInner](ListSubuserByTemplate200ResponseSubuserAccessInner.md) + - [ListSubuserByTemplate400Response](ListSubuserByTemplate400Response.md) + - [ListSubuserByTemplate400ResponseErrorsInner](ListSubuserByTemplate400ResponseErrorsInner.md) + - [ListTeammate200Response](ListTeammate200Response.md) + - [ListTeammate200ResponseResultInner](ListTeammate200ResponseResultInner.md) + - [PermissionType](PermissionType.md) + - [ResendTeammateInvite200Response](ResendTeammateInvite200Response.md) + - [UpdateTeammate200Response](UpdateTeammate200Response.md) + - [UpdateTeammateRequest](UpdateTeammateRequest.md) + - [UserType](UserType.md) + - [UserType1](UserType1.md) + - [UserType2](UserType2.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/teammates/api_delete_pending_teammate.go b/rest/api/v3/teammates/api_delete_pending_teammate.go new file mode 100644 index 00000000..0bb4e0dd --- /dev/null +++ b/rest/api/v3/teammates/api_delete_pending_teammate.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeletePendingTeammateParam struct { + // The token for the invite you want to delete. + Token *string `json:"token"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeletePendingTeammateParam) SetToken(Token string) *DeletePendingTeammateParam { + params.Token = &Token + return params +} +func (params *DeletePendingTeammateParam) SetOnbehalfof(Onbehalfof string) *DeletePendingTeammateParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete a pending teammate invite.** +func (c *ApiService) DeletePendingTeammate(params *DeletePendingTeammateParam) (interface{}, error) { + path := "/v3/teammates/pending/{Token}" + if params != nil && params.Token != nil { + path = strings.Replace(path, "{"+"Token"+"}", *params.Token, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 404 { + ps := &InviteTeammate400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/teammates/api_delete_teammate.go b/rest/api/v3/teammates/api_delete_teammate.go new file mode 100644 index 00000000..16e08595 --- /dev/null +++ b/rest/api/v3/teammates/api_delete_teammate.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteTeammateParam struct { + // The username of the teammate that you want to retrieve. + Username *string `json:"username"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteTeammateParam) SetUsername(Username string) *DeleteTeammateParam { + params.Username = &Username + return params +} +func (params *DeleteTeammateParam) SetOnbehalfof(Onbehalfof string) *DeleteTeammateParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete a teammate.** **Only the parent user or an admin teammate can delete another teammate.** +func (c *ApiService) DeleteTeammate(params *DeleteTeammateParam) (interface{}, error) { + path := "/v3/teammates/{Username}" + if params != nil && params.Username != nil { + path = strings.Replace(path, "{"+"Username"+"}", *params.Username, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 404 { + ps := &InviteTeammate400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/teammates/api_get_teammate.go b/rest/api/v3/teammates/api_get_teammate.go new file mode 100644 index 00000000..c80fb7ae --- /dev/null +++ b/rest/api/v3/teammates/api_get_teammate.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetTeammateParam struct { + // The username of the teammate that you want to retrieve. + Username *string `json:"username"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetTeammateParam) SetUsername(Username string) *GetTeammateParam { + params.Username = &Username + return params +} +func (params *GetTeammateParam) SetOnbehalfof(Onbehalfof string) *GetTeammateParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a specific Teammate by username.** You can retrieve the username's for each of your Teammates using the \"Retrieve all Teammates\" endpoint. +func (c *ApiService) GetTeammate(params *GetTeammateParam) (interface{}, error) { + path := "/v3/teammates/{Username}" + if params != nil && params.Username != nil { + path = strings.Replace(path, "{"+"Username"+"}", *params.Username, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetTeammate200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/teammates/api_invite_teammate.go b/rest/api/v3/teammates/api_invite_teammate.go new file mode 100644 index 00000000..90b19902 --- /dev/null +++ b/rest/api/v3/teammates/api_invite_teammate.go @@ -0,0 +1,82 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type InviteTeammateParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + InviteTeammateRequest *InviteTeammateRequest `json:"InviteTeammateRequest,omitempty"` +} + +func (params *InviteTeammateParam) SetOnbehalfof(Onbehalfof string) *InviteTeammateParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *InviteTeammateParam) SetInviteTeammateRequest(InviteTeammateRequest InviteTeammateRequest) *InviteTeammateParam { + params.InviteTeammateRequest = &InviteTeammateRequest + return params +} + +// **This endpoint allows you to invite a Teammate to your account via email.** You can set a Teammate's initial permissions using the `scopes` array in the request body. Teammate's will receive a minimum set of scopes from Twilio SendGrid that are necessary for the Teammate to function. **Note:** A teammate invite will expire after 7 days, but you may resend the invitation at any time to reset the expiration date. +func (c *ApiService) InviteTeammate(params *InviteTeammateParam) (interface{}, error) { + path := "/v3/teammates" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.InviteTeammateRequest != nil { + b, err := json.Marshal(*params.InviteTeammateRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &InviteTeammate201Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &InviteTeammate400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/teammates/api_list_pending_teammate.go b/rest/api/v3/teammates/api_list_pending_teammate.go new file mode 100644 index 00000000..2fefdcea --- /dev/null +++ b/rest/api/v3/teammates/api_list_pending_teammate.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListPendingTeammateParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListPendingTeammateParam) SetOnbehalfof(Onbehalfof string) *ListPendingTeammateParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a list of all pending Teammate invitations.** Each teammate invitation is valid for 7 days. Users may resend the invitation to refresh the expiration date. +func (c *ApiService) ListPendingTeammate(params *ListPendingTeammateParam) (interface{}, error) { + path := "/v3/teammates/pending" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListPendingTeammate200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/teammates/api_list_subuser_by_template.go b/rest/api/v3/teammates/api_list_subuser_by_template.go new file mode 100644 index 00000000..fcd7c60f --- /dev/null +++ b/rest/api/v3/teammates/api_list_subuser_by_template.go @@ -0,0 +1,122 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" + + "strings" +) + +type ListSubuserByTemplateParam struct { + // The username of the Teammate for whom you want to retrieve Subuser access information. + TeammateName *string `json:"teammate_name"` + // The Subuser ID from which the API request will begin retrieving Subusers. This query parameter can be used in successive API calls to retrieve additional Subusers. + AfterSubuserId *int32 `json:"after_subuser_id,omitempty"` + // Limit the number of Subusers to be returned. The default `limit` is `100` per request. + Limit *int32 `json:"limit,omitempty"` + // A Subuser's username that will be used to filter the returned result. + Username *string `json:"username,omitempty"` +} + +func (params *ListSubuserByTemplateParam) SetTeammateName(TeammateName string) *ListSubuserByTemplateParam { + params.TeammateName = &TeammateName + return params +} +func (params *ListSubuserByTemplateParam) SetAfterSubuserId(AfterSubuserId int32) *ListSubuserByTemplateParam { + params.AfterSubuserId = &AfterSubuserId + return params +} +func (params *ListSubuserByTemplateParam) SetLimit(Limit int32) *ListSubuserByTemplateParam { + params.Limit = &Limit + return params +} +func (params *ListSubuserByTemplateParam) SetUsername(Username string) *ListSubuserByTemplateParam { + params.Username = &Username + return params +} + +// **This operation allows you to retrieve the Subusers that can be accessed by a specified Teammate.** This operation will return the Subusers available to a Teammate, including the scopes available. If the Teammate is an administrator, all Subusers will be returned. +func (c *ApiService) ListSubuserByTemplate(params *ListSubuserByTemplateParam) (interface{}, error) { + path := "/v3/teammates/{TeammateName}/subuser_access" + if params != nil && params.TeammateName != nil { + path = strings.Replace(path, "{"+"TeammateName"+"}", *params.TeammateName, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.AfterSubuserId != nil { + data.Set("after_subuser_id", fmt.Sprint(*params.AfterSubuserId)) + } + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Username != nil { + data.Set("username", *params.Username) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListSubuserByTemplate200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ListSubuserByTemplate400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ListSubuserByTemplate400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ListSubuserByTemplate400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 500 { + ps := &ListSubuserByTemplate400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/teammates/api_list_teammate.go b/rest/api/v3/teammates/api_list_teammate.go new file mode 100644 index 00000000..32d03d2b --- /dev/null +++ b/rest/api/v3/teammates/api_list_teammate.go @@ -0,0 +1,79 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListTeammateParam struct { + // `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. The maximum page size for this endpoint is 500 items per page. + Limit *int32 `json:"limit,omitempty"` + // The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. + Offset *int32 `json:"offset,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListTeammateParam) SetLimit(Limit int32) *ListTeammateParam { + params.Limit = &Limit + return params +} +func (params *ListTeammateParam) SetOffset(Offset int32) *ListTeammateParam { + params.Offset = &Offset + return params +} +func (params *ListTeammateParam) SetOnbehalfof(Onbehalfof string) *ListTeammateParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a paginated list of all current Teammates.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. +func (c *ApiService) ListTeammate(params *ListTeammateParam) (interface{}, error) { + path := "/v3/teammates" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.Offset != nil { + data.Set("offset", fmt.Sprint(*params.Offset)) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListTeammate200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/teammates/api_resend_teammate_invite.go b/rest/api/v3/teammates/api_resend_teammate_invite.go new file mode 100644 index 00000000..fc8e2137 --- /dev/null +++ b/rest/api/v3/teammates/api_resend_teammate_invite.go @@ -0,0 +1,78 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type ResendTeammateInviteParam struct { + // The token for the invite that you want to resend. + Token *string `json:"token"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ResendTeammateInviteParam) SetToken(Token string) *ResendTeammateInviteParam { + params.Token = &Token + return params +} +func (params *ResendTeammateInviteParam) SetOnbehalfof(Onbehalfof string) *ResendTeammateInviteParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to resend a Teammate invitation.** Teammate invitations will expire after 7 days. Resending an invitation will reset the expiration date. +func (c *ApiService) ResendTeammateInvite(params *ResendTeammateInviteParam) (interface{}, error) { + path := "/v3/teammates/pending/{Token}/resend" + if params != nil && params.Token != nil { + path = strings.Replace(path, "{"+"Token"+"}", *params.Token, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ResendTeammateInvite200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &InviteTeammate400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/teammates/api_service.go b/rest/api/v3/teammates/api_service.go new file mode 100644 index 00000000..9ffc80f5 --- /dev/null +++ b/rest/api/v3/teammates/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/teammates/api_update_teammate.go b/rest/api/v3/teammates/api_update_teammate.go new file mode 100644 index 00000000..e3146553 --- /dev/null +++ b/rest/api/v3/teammates/api_update_teammate.go @@ -0,0 +1,101 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateTeammateParam struct { + // The username of the teammate that you want to retrieve. + Username *string `json:"username"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateTeammateRequest *UpdateTeammateRequest `json:"UpdateTeammateRequest,omitempty"` +} + +func (params *UpdateTeammateParam) SetUsername(Username string) *UpdateTeammateParam { + params.Username = &Username + return params +} +func (params *UpdateTeammateParam) SetOnbehalfof(Onbehalfof string) *UpdateTeammateParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateTeammateParam) SetUpdateTeammateRequest(UpdateTeammateRequest UpdateTeammateRequest) *UpdateTeammateParam { + params.UpdateTeammateRequest = &UpdateTeammateRequest + return params +} + +// **This endpoint allows you to update a teammate’s permissions.** To turn a teammate into an admin, the request body should contain an `is_admin` set to `true`. Otherwise, set `is_admin` to `false` and pass in all the scopes that a teammate should have. **Only the parent user or other admin teammates can update another teammate’s permissions.** **Admin users can only update permissions.** +func (c *ApiService) UpdateTeammate(params *UpdateTeammateParam) (interface{}, error) { + path := "/v3/teammates/{Username}" + if params != nil && params.Username != nil { + path = strings.Replace(path, "{"+"Username"+"}", *params.Username, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateTeammateRequest != nil { + b, err := json.Marshal(*params.UpdateTeammateRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &UpdateTeammate200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &InviteTeammate400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &InviteTeammate400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/teammates/docs/DeletePendingTeammate.md b/rest/api/v3/teammates/docs/DeletePendingTeammate.md new file mode 100644 index 00000000..c2dfe25e --- /dev/null +++ b/rest/api/v3/teammates/docs/DeletePendingTeammate.md @@ -0,0 +1,52 @@ +# DeletePendingTeammate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeletePendingTeammate**](DeletePendingTeammate.md#DeletePendingTeammate) | **Delete** /v3/teammates/pending/{Token} | Delete pending teammate + + + +## DeletePendingTeammate + +> DeletePendingTeammate(ctx, Tokenoptional) + +Delete pending teammate + +**This endpoint allows you to delete a pending teammate invite.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Token** | **string** | The token for the invite you want to delete. + +### Other Parameters + +Other parameters are passed through a pointer to a DeletePendingTeammateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/teammates/docs/DeleteTeammate.md b/rest/api/v3/teammates/docs/DeleteTeammate.md new file mode 100644 index 00000000..49d1d4d4 --- /dev/null +++ b/rest/api/v3/teammates/docs/DeleteTeammate.md @@ -0,0 +1,52 @@ +# DeleteTeammate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteTeammate**](DeleteTeammate.md#DeleteTeammate) | **Delete** /v3/teammates/{Username} | Delete teammate + + + +## DeleteTeammate + +> DeleteTeammate(ctx, Usernameoptional) + +Delete teammate + +**This endpoint allows you to delete a teammate.** **Only the parent user or an admin teammate can delete another teammate.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Username** | **string** | The username of the teammate that you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteTeammateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/teammates/docs/GetTeammate.md b/rest/api/v3/teammates/docs/GetTeammate.md new file mode 100644 index 00000000..9a3c21dd --- /dev/null +++ b/rest/api/v3/teammates/docs/GetTeammate.md @@ -0,0 +1,52 @@ +# GetTeammate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetTeammate**](GetTeammate.md#GetTeammate) | **Get** /v3/teammates/{Username} | Retrieve specific teammate + + + +## GetTeammate + +> GetTeammate200Response GetTeammate(ctx, Usernameoptional) + +Retrieve specific teammate + +**This endpoint allows you to retrieve a specific Teammate by username.** You can retrieve the username's for each of your Teammates using the \"Retrieve all Teammates\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Username** | **string** | The username of the teammate that you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetTeammateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**GetTeammate200Response**](GetTeammate200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/teammates/docs/GetTeammate200Response.md b/rest/api/v3/teammates/docs/GetTeammate200Response.md new file mode 100644 index 00000000..96209510 --- /dev/null +++ b/rest/api/v3/teammates/docs/GetTeammate200Response.md @@ -0,0 +1,25 @@ +# GetTeammate200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | Teammate's username |[optional] +**FirstName** | **string** | Teammate's first name |[optional] +**LastName** | **string** | Teammate's last name |[optional] +**Email** | **string** | Teammate's email |[optional] +**Scopes** | **[]interface{}** | Scopes associated to teammate |[optional] +**UserType** | [**UserType1**](UserType1.md) | Indicate the type of user: account owner, teammate admin user, or normal teammate |[optional] +**IsAdmin** | **bool** | Set to true if teammate has admin privileges |[optional] +**Phone** | **string** | (optional) Teammate's phone number |[optional] +**Website** | **string** | (optional) Teammate's website |[optional] +**Address** | **string** | (optional) Teammate's address |[optional] +**Address2** | **string** | (optional) Teammate's address |[optional] +**City** | **string** | (optional) Teammate's city |[optional] +**State** | **string** | (optional) Teammate's state |[optional] +**Zip** | **string** | (optional) Teammate's zip |[optional] +**Country** | **string** | (optional) Teammate's country |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/InviteTeammate.md b/rest/api/v3/teammates/docs/InviteTeammate.md new file mode 100644 index 00000000..c4041719 --- /dev/null +++ b/rest/api/v3/teammates/docs/InviteTeammate.md @@ -0,0 +1,49 @@ +# InviteTeammate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**InviteTeammate**](InviteTeammate.md#InviteTeammate) | **Post** /v3/teammates | Invite teammate + + + +## InviteTeammate + +> InviteTeammate201Response InviteTeammate(ctx, optional) + +Invite teammate + +**This endpoint allows you to invite a Teammate to your account via email.** You can set a Teammate's initial permissions using the `scopes` array in the request body. Teammate's will receive a minimum set of scopes from Twilio SendGrid that are necessary for the Teammate to function. **Note:** A teammate invite will expire after 7 days, but you may resend the invitation at any time to reset the expiration date. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a InviteTeammateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**InviteTeammateRequest** | [**InviteTeammateRequest**](InviteTeammateRequest.md) | + +### Return type + +[**InviteTeammate201Response**](InviteTeammate201Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/teammates/docs/InviteTeammate201Response.md b/rest/api/v3/teammates/docs/InviteTeammate201Response.md new file mode 100644 index 00000000..63648c38 --- /dev/null +++ b/rest/api/v3/teammates/docs/InviteTeammate201Response.md @@ -0,0 +1,14 @@ +# InviteTeammate201Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Token** | **string** | Token to identify invite |[optional] +**Email** | **string** | Teammate's email address |[optional] +**Scopes** | **[]interface{}** | Initial set of permissions to give to teammate if they accept the invite |[optional] +**IsAdmin** | **bool** | Set to true if teammate should have admin privileges |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/InviteTeammate400Response.md b/rest/api/v3/teammates/docs/InviteTeammate400Response.md new file mode 100644 index 00000000..7d0f0c73 --- /dev/null +++ b/rest/api/v3/teammates/docs/InviteTeammate400Response.md @@ -0,0 +1,11 @@ +# InviteTeammate400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]InviteTeammate400ResponseErrorsInner**](InviteTeammate400ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/InviteTeammate400ResponseErrorsInner.md b/rest/api/v3/teammates/docs/InviteTeammate400ResponseErrorsInner.md new file mode 100644 index 00000000..6bf97048 --- /dev/null +++ b/rest/api/v3/teammates/docs/InviteTeammate400ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# InviteTeammate400ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | |[optional] +**Field** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/InviteTeammateRequest.md b/rest/api/v3/teammates/docs/InviteTeammateRequest.md new file mode 100644 index 00000000..5d3912fd --- /dev/null +++ b/rest/api/v3/teammates/docs/InviteTeammateRequest.md @@ -0,0 +1,13 @@ +# InviteTeammateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | New teammate's email | +**Scopes** | **[]string** | Set to specify list of scopes that teammate should have. Should be empty if teammate is an admin. | +**IsAdmin** | **bool** | Set to true if teammate should be an admin user |[default to false] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/ListPendingTeammate.md b/rest/api/v3/teammates/docs/ListPendingTeammate.md new file mode 100644 index 00000000..84312df6 --- /dev/null +++ b/rest/api/v3/teammates/docs/ListPendingTeammate.md @@ -0,0 +1,48 @@ +# ListPendingTeammate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListPendingTeammate**](ListPendingTeammate.md#ListPendingTeammate) | **Get** /v3/teammates/pending | Retrieve all pending teammates + + + +## ListPendingTeammate + +> ListPendingTeammate200Response ListPendingTeammate(ctx, optional) + +Retrieve all pending teammates + +**This endpoint allows you to retrieve a list of all pending Teammate invitations.** Each teammate invitation is valid for 7 days. Users may resend the invitation to refresh the expiration date. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListPendingTeammateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListPendingTeammate200Response**](ListPendingTeammate200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/teammates/docs/ListPendingTeammate200Response.md b/rest/api/v3/teammates/docs/ListPendingTeammate200Response.md new file mode 100644 index 00000000..acaf8ee6 --- /dev/null +++ b/rest/api/v3/teammates/docs/ListPendingTeammate200Response.md @@ -0,0 +1,11 @@ +# ListPendingTeammate200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ListPendingTeammate200ResponseResultInner**](ListPendingTeammate200ResponseResultInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/ListPendingTeammate200ResponseResultInner.md b/rest/api/v3/teammates/docs/ListPendingTeammate200ResponseResultInner.md new file mode 100644 index 00000000..e5ea2c9c --- /dev/null +++ b/rest/api/v3/teammates/docs/ListPendingTeammate200ResponseResultInner.md @@ -0,0 +1,15 @@ +# ListPendingTeammate200ResponseResultInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | Email address teammate invite will be sent to |[optional] +**Scopes** | **[]string** | List of permissions to give teammate if they accept |[optional] +**IsAdmin** | **bool** | Set to true to indicate teammate should have the same set of permissions as parent user |[optional] +**Token** | **string** | Invitation token used to identify user |[optional] +**ExpirationDate** | **int32** | timestamp indicates when invite will expire. Expiration is 7 days after invite creation |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/ListSubuserByTemplate.md b/rest/api/v3/teammates/docs/ListSubuserByTemplate.md new file mode 100644 index 00000000..828e71ce --- /dev/null +++ b/rest/api/v3/teammates/docs/ListSubuserByTemplate.md @@ -0,0 +1,54 @@ +# ListSubuserByTemplate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSubuserByTemplate**](ListSubuserByTemplate.md#ListSubuserByTemplate) | **Get** /v3/teammates/{TeammateName}/subuser_access | Get Teammate Subuser Access + + + +## ListSubuserByTemplate + +> ListSubuserByTemplate200Response ListSubuserByTemplate(ctx, TeammateNameoptional) + +Get Teammate Subuser Access + +**This operation allows you to retrieve the Subusers that can be accessed by a specified Teammate.** This operation will return the Subusers available to a Teammate, including the scopes available. If the Teammate is an administrator, all Subusers will be returned. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TeammateName** | **string** | The username of the Teammate for whom you want to retrieve Subuser access information. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSubuserByTemplateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**AfterSubuserId** | **int32** | The Subuser ID from which the API request will begin retrieving Subusers. This query parameter can be used in successive API calls to retrieve additional Subusers. +**Limit** | **int32** | Limit the number of Subusers to be returned. The default `limit` is `100` per request. +**Username** | **string** | A Subuser's username that will be used to filter the returned result. + +### Return type + +[**ListSubuserByTemplate200Response**](ListSubuserByTemplate200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/teammates/docs/ListSubuserByTemplate200Response.md b/rest/api/v3/teammates/docs/ListSubuserByTemplate200Response.md new file mode 100644 index 00000000..491b1817 --- /dev/null +++ b/rest/api/v3/teammates/docs/ListSubuserByTemplate200Response.md @@ -0,0 +1,13 @@ +# ListSubuserByTemplate200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**HasRestrictedSubuserAccess** | **bool** | When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. |[optional] +**SubuserAccess** | [**[]ListSubuserByTemplate200ResponseSubuserAccessInner**](ListSubuserByTemplate200ResponseSubuserAccessInner.md) | Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. |[optional] +**Metadata** | [**ListSubuserByTemplate200ResponseMetadata**](ListSubuserByTemplate200ResponseMetadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadata.md b/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadata.md new file mode 100644 index 00000000..ed90d06a --- /dev/null +++ b/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadata.md @@ -0,0 +1,11 @@ +# ListSubuserByTemplate200ResponseMetadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NextParams** | [**ListSubuserByTemplate200ResponseMetadataNextParams**](ListSubuserByTemplate200ResponseMetadataNextParams.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadataNextParams.md b/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadataNextParams.md new file mode 100644 index 00000000..66b7c05d --- /dev/null +++ b/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseMetadataNextParams.md @@ -0,0 +1,13 @@ +# ListSubuserByTemplate200ResponseMetadataNextParams + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Limit** | **int32** | The limit specified in the `limit` query parameter to constrain the number of Subusers returned. |[optional] +**AfterSubuserId** | **int32** | The `after_subuser_id` property represents the last processed Subuser. If the `after_subuser_id` property is `null`, there are no more entries available. |[optional] +**Username** | **string** | The username of a Subuser passed in the `name` query parameter to filter results by username. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseSubuserAccessInner.md b/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseSubuserAccessInner.md new file mode 100644 index 00000000..2264a516 --- /dev/null +++ b/rest/api/v3/teammates/docs/ListSubuserByTemplate200ResponseSubuserAccessInner.md @@ -0,0 +1,16 @@ +# ListSubuserByTemplate200ResponseSubuserAccessInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | The ID of a Subuser to which the Teammate has access. You can retrieve Subuser IDs from the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/). |[optional] +**Username** | **string** | The username of a Subuser to which the Teammate has access. |[optional] +**Email** | **string** | The email address of a Subuser to which the Teammate has access. |[optional] +**Disabled** | **bool** | Indicates if the Subuser is active for the SendGrid account. |[optional] +**PermissionType** | [**PermissionType**](PermissionType.md) | The level of access the Teammate has to the specified Subuser. This property value may be either `admin` or `restricted`. When is property is set to `restricted`, the Teammate has only the permissions assigned in the `scopes` property. |[optional] +**Scopes** | **[]string** | The permissions or scopes that the Teammate can access on behalf of the Subuser. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/ListSubuserByTemplate400Response.md b/rest/api/v3/teammates/docs/ListSubuserByTemplate400Response.md new file mode 100644 index 00000000..cce6bfd0 --- /dev/null +++ b/rest/api/v3/teammates/docs/ListSubuserByTemplate400Response.md @@ -0,0 +1,11 @@ +# ListSubuserByTemplate400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ListSubuserByTemplate400ResponseErrorsInner**](ListSubuserByTemplate400ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/ListSubuserByTemplate400ResponseErrorsInner.md b/rest/api/v3/teammates/docs/ListSubuserByTemplate400ResponseErrorsInner.md new file mode 100644 index 00000000..e82f043b --- /dev/null +++ b/rest/api/v3/teammates/docs/ListSubuserByTemplate400ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# ListSubuserByTemplate400ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | The message representing the error from the API. |[optional] +**Field** | **string** | The field associated with the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/ListTeammate.md b/rest/api/v3/teammates/docs/ListTeammate.md new file mode 100644 index 00000000..b2747274 --- /dev/null +++ b/rest/api/v3/teammates/docs/ListTeammate.md @@ -0,0 +1,50 @@ +# ListTeammate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListTeammate**](ListTeammate.md#ListTeammate) | **Get** /v3/teammates | Retrieve all teammates + + + +## ListTeammate + +> ListTeammate200Response ListTeammate(ctx, optional) + +Retrieve all teammates + +**This endpoint allows you to retrieve a paginated list of all current Teammates.** You can use the `limit` query parameter to set the page size. If your list contains more items than the page size permits, you can make multiple requests. Use the `offset` query parameter to control the position in the list from which to start retrieving additional items. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListTeammateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **int32** | `limit` sets the page size, i.e. maximum number of items from the list to be returned for a single API request. If omitted, the default page size is used. The maximum page size for this endpoint is 500 items per page. +**Offset** | **int32** | The number of items in the list to skip over before starting to retrieve the items for the requested page. The default `offset` of `0` represents the beginning of the list, i.e. the start of the first page. To request the second page of the list, set the `offset` to the page size as determined by `limit`. Use multiples of the page size as your `offset` to request further consecutive pages. E.g. assume your page size is set to `10`. An `offset` of `10` requests the second page, an `offset` of `20` requests the third page and so on, provided there are sufficiently many items in your list. +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListTeammate200Response**](ListTeammate200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/teammates/docs/ListTeammate200Response.md b/rest/api/v3/teammates/docs/ListTeammate200Response.md new file mode 100644 index 00000000..8bbca76d --- /dev/null +++ b/rest/api/v3/teammates/docs/ListTeammate200Response.md @@ -0,0 +1,11 @@ +# ListTeammate200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ListTeammate200ResponseResultInner**](ListTeammate200ResponseResultInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/ListTeammate200ResponseResultInner.md b/rest/api/v3/teammates/docs/ListTeammate200ResponseResultInner.md new file mode 100644 index 00000000..d7a2c068 --- /dev/null +++ b/rest/api/v3/teammates/docs/ListTeammate200ResponseResultInner.md @@ -0,0 +1,24 @@ +# ListTeammate200ResponseResultInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | Teammate's username |[optional] +**Email** | **string** | Teammate's email |[optional] +**FirstName** | **string** | Teammate's first name |[optional] +**LastName** | **string** | Teammate's last name |[optional] +**UserType** | [**UserType**](UserType.md) | Indicate the type of user: owner user, teammate admin user, or normal teammate |[optional] +**IsAdmin** | **bool** | Set to true if teammate has admin privileges |[optional] +**Phone** | **string** | (optional) Teammate's phone number |[optional] +**Website** | **string** | (optional) Teammate's website |[optional] +**Address** | **string** | (optional) Teammate's address |[optional] +**Address2** | **string** | (optional) Teammate's address |[optional] +**City** | **string** | (optional) Teammate's city |[optional] +**State** | **string** | (optional) Teammate's state |[optional] +**Zip** | **string** | (optional) Teammate's zip |[optional] +**Country** | **string** | (optional) Teammate's country |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/PermissionType.md b/rest/api/v3/teammates/docs/PermissionType.md new file mode 100644 index 00000000..da44f853 --- /dev/null +++ b/rest/api/v3/teammates/docs/PermissionType.md @@ -0,0 +1,13 @@ +# PermissionType + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**ADMIN** | string | (value: `"admin"`) +**RESTRICTED** | string | (value: `"restricted"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/ResendTeammateInvite.md b/rest/api/v3/teammates/docs/ResendTeammateInvite.md new file mode 100644 index 00000000..24f8e42d --- /dev/null +++ b/rest/api/v3/teammates/docs/ResendTeammateInvite.md @@ -0,0 +1,52 @@ +# ResendTeammateInvite + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ResendTeammateInvite**](ResendTeammateInvite.md#ResendTeammateInvite) | **Post** /v3/teammates/pending/{Token}/resend | Resend teammate invite + + + +## ResendTeammateInvite + +> ResendTeammateInvite200Response ResendTeammateInvite(ctx, Tokenoptional) + +Resend teammate invite + +**This endpoint allows you to resend a Teammate invitation.** Teammate invitations will expire after 7 days. Resending an invitation will reset the expiration date. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Token** | **string** | The token for the invite that you want to resend. + +### Other Parameters + +Other parameters are passed through a pointer to a ResendTeammateInviteParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ResendTeammateInvite200Response**](ResendTeammateInvite200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/teammates/docs/ResendTeammateInvite200Response.md b/rest/api/v3/teammates/docs/ResendTeammateInvite200Response.md new file mode 100644 index 00000000..c203789a --- /dev/null +++ b/rest/api/v3/teammates/docs/ResendTeammateInvite200Response.md @@ -0,0 +1,14 @@ +# ResendTeammateInvite200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Token** | **string** | ID to identify invite |[optional] +**Email** | **string** | Teammate's email address |[optional] +**Scopes** | **[]string** | Initial set of permissions to give to teammate if they accept the invite |[optional] +**IsAdmin** | **bool** | Set to true if teammate should have admin privileges |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/UpdateTeammate.md b/rest/api/v3/teammates/docs/UpdateTeammate.md new file mode 100644 index 00000000..593e02cd --- /dev/null +++ b/rest/api/v3/teammates/docs/UpdateTeammate.md @@ -0,0 +1,53 @@ +# UpdateTeammate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateTeammate**](UpdateTeammate.md#UpdateTeammate) | **Patch** /v3/teammates/{Username} | Update teammate's permissions + + + +## UpdateTeammate + +> UpdateTeammate200Response UpdateTeammate(ctx, Usernameoptional) + +Update teammate's permissions + +**This endpoint allows you to update a teammate’s permissions.** To turn a teammate into an admin, the request body should contain an `is_admin` set to `true`. Otherwise, set `is_admin` to `false` and pass in all the scopes that a teammate should have. **Only the parent user or other admin teammates can update another teammate’s permissions.** **Admin users can only update permissions.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Username** | **string** | The username of the teammate that you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateTeammateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateTeammateRequest** | [**UpdateTeammateRequest**](UpdateTeammateRequest.md) | + +### Return type + +[**UpdateTeammate200Response**](UpdateTeammate200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/teammates/docs/UpdateTeammate200Response.md b/rest/api/v3/teammates/docs/UpdateTeammate200Response.md new file mode 100644 index 00000000..65414c2e --- /dev/null +++ b/rest/api/v3/teammates/docs/UpdateTeammate200Response.md @@ -0,0 +1,25 @@ +# UpdateTeammate200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | Teammate's username |[optional] +**FirstName** | **string** | Teammate's first name |[optional] +**LastName** | **string** | Teammate's last name |[optional] +**Email** | **string** | Teammate's email address |[optional] +**Scopes** | **[]string** | Scopes given to teammate |[optional] +**UserType** | [**UserType2**](UserType2.md) | Indicate the type of user: owner user, teammate admin user, or normal teammate |[optional] +**IsAdmin** | **bool** | Set to true if teammate has admin priveleges |[optional] +**Phone** | **string** | (optional) Teammate's phone number |[optional] +**Website** | **string** | (optional) Teammate's website |[optional] +**Address** | **string** | (optional) Teammate's address |[optional] +**Address2** | **string** | (optional) Teammate's address |[optional] +**City** | **string** | (optional) Teammate's city |[optional] +**State** | **string** | (optional) Teammate's state |[optional] +**Zip** | **string** | (optional) Teammate's zip |[optional] +**Country** | **string** | (optional) Teammate's country |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/UpdateTeammateRequest.md b/rest/api/v3/teammates/docs/UpdateTeammateRequest.md new file mode 100644 index 00000000..ca9956e0 --- /dev/null +++ b/rest/api/v3/teammates/docs/UpdateTeammateRequest.md @@ -0,0 +1,12 @@ +# UpdateTeammateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Scopes** | **[]string** | Provide list of scopes that should be given to teammate. If specifying list of scopes, is_admin should be set to False. | +**IsAdmin** | **bool** | Set to True if this teammate should be promoted to an admin user. If True, scopes should be an empty array. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/UserType.md b/rest/api/v3/teammates/docs/UserType.md new file mode 100644 index 00000000..f9f8db1d --- /dev/null +++ b/rest/api/v3/teammates/docs/UserType.md @@ -0,0 +1,14 @@ +# UserType + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**ADMIN** | string | (value: `"admin"`) +**OWNER** | string | (value: `"owner"`) +**TEAMMATE** | string | (value: `"teammate"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/UserType1.md b/rest/api/v3/teammates/docs/UserType1.md new file mode 100644 index 00000000..008e09e1 --- /dev/null +++ b/rest/api/v3/teammates/docs/UserType1.md @@ -0,0 +1,14 @@ +# UserType1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**ADMIN** | string | (value: `"admin"`) +**OWNER** | string | (value: `"owner"`) +**TEAMMATE** | string | (value: `"teammate"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/docs/UserType2.md b/rest/api/v3/teammates/docs/UserType2.md new file mode 100644 index 00000000..59679096 --- /dev/null +++ b/rest/api/v3/teammates/docs/UserType2.md @@ -0,0 +1,14 @@ +# UserType2 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**ADMIN** | string | (value: `"admin"`) +**OWNER** | string | (value: `"owner"`) +**TEAMMATE** | string | (value: `"teammate"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/teammates/model_get_teammate_200_response.go b/rest/api/v3/teammates/model_get_teammate_200_response.go new file mode 100644 index 00000000..a1c30f71 --- /dev/null +++ b/rest/api/v3/teammates/model_get_teammate_200_response.go @@ -0,0 +1,48 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetTeammate200Response struct for GetTeammate200Response +type GetTeammate200Response struct { + // Teammate's username + Username *string `json:"username,omitempty"` + // Teammate's first name + FirstName *string `json:"first_name,omitempty"` + // Teammate's last name + LastName *string `json:"last_name,omitempty"` + // Teammate's email + Email *string `json:"email,omitempty"` + // Scopes associated to teammate + Scopes *[]interface{} `json:"scopes,omitempty"` + // Indicate the type of user: account owner, teammate admin user, or normal teammate + UserType *UserType1 `json:"user_type,omitempty"` + // Set to true if teammate has admin privileges + IsAdmin *bool `json:"is_admin,omitempty"` + // (optional) Teammate's phone number + Phone *string `json:"phone,omitempty"` + // (optional) Teammate's website + Website *string `json:"website,omitempty"` + // (optional) Teammate's address + Address *string `json:"address,omitempty"` + // (optional) Teammate's address + Address2 *string `json:"address2,omitempty"` + // (optional) Teammate's city + City *string `json:"city,omitempty"` + // (optional) Teammate's state + State *string `json:"state,omitempty"` + // (optional) Teammate's zip + Zip *string `json:"zip,omitempty"` + // (optional) Teammate's country + Country *string `json:"country,omitempty"` +} diff --git a/rest/api/v3/teammates/model_invite_teammate_201_response.go b/rest/api/v3/teammates/model_invite_teammate_201_response.go new file mode 100644 index 00000000..ae183bf4 --- /dev/null +++ b/rest/api/v3/teammates/model_invite_teammate_201_response.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// InviteTeammate201Response struct for InviteTeammate201Response +type InviteTeammate201Response struct { + // Token to identify invite + Token *string `json:"token,omitempty"` + // Teammate's email address + Email *string `json:"email,omitempty"` + // Initial set of permissions to give to teammate if they accept the invite + Scopes *[]interface{} `json:"scopes,omitempty"` + // Set to true if teammate should have admin privileges + IsAdmin *bool `json:"is_admin,omitempty"` +} diff --git a/rest/api/v3/teammates/model_invite_teammate_400_response.go b/rest/api/v3/teammates/model_invite_teammate_400_response.go new file mode 100644 index 00000000..f3bd0fd1 --- /dev/null +++ b/rest/api/v3/teammates/model_invite_teammate_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// InviteTeammate400Response struct for InviteTeammate400Response +type InviteTeammate400Response struct { + Errors *[]InviteTeammate400ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/teammates/model_invite_teammate_400_response_errors_inner.go b/rest/api/v3/teammates/model_invite_teammate_400_response_errors_inner.go new file mode 100644 index 00000000..e21587e5 --- /dev/null +++ b/rest/api/v3/teammates/model_invite_teammate_400_response_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// InviteTeammate400ResponseErrorsInner struct for InviteTeammate400ResponseErrorsInner +type InviteTeammate400ResponseErrorsInner struct { + Message *string `json:"message,omitempty"` + Field *string `json:"field,omitempty"` +} diff --git a/rest/api/v3/teammates/model_invite_teammate_request.go b/rest/api/v3/teammates/model_invite_teammate_request.go new file mode 100644 index 00000000..ee0342cd --- /dev/null +++ b/rest/api/v3/teammates/model_invite_teammate_request.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// InviteTeammateRequest struct for InviteTeammateRequest +type InviteTeammateRequest struct { + // New teammate's email + Email string `json:"email"` + // Set to specify list of scopes that teammate should have. Should be empty if teammate is an admin. + Scopes []string `json:"scopes"` + // Set to true if teammate should be an admin user + IsAdmin bool `json:"is_admin"` +} diff --git a/rest/api/v3/teammates/model_list_pending_teammate_200_response.go b/rest/api/v3/teammates/model_list_pending_teammate_200_response.go new file mode 100644 index 00000000..e23aa0d5 --- /dev/null +++ b/rest/api/v3/teammates/model_list_pending_teammate_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListPendingTeammate200Response struct for ListPendingTeammate200Response +type ListPendingTeammate200Response struct { + Result *[]ListPendingTeammate200ResponseResultInner `json:"result,omitempty"` +} diff --git a/rest/api/v3/teammates/model_list_pending_teammate_200_response_result_inner.go b/rest/api/v3/teammates/model_list_pending_teammate_200_response_result_inner.go new file mode 100644 index 00000000..2ec83181 --- /dev/null +++ b/rest/api/v3/teammates/model_list_pending_teammate_200_response_result_inner.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListPendingTeammate200ResponseResultInner struct for ListPendingTeammate200ResponseResultInner +type ListPendingTeammate200ResponseResultInner struct { + // Email address teammate invite will be sent to + Email *string `json:"email,omitempty"` + // List of permissions to give teammate if they accept + Scopes *[]string `json:"scopes,omitempty"` + // Set to true to indicate teammate should have the same set of permissions as parent user + IsAdmin *bool `json:"is_admin,omitempty"` + // Invitation token used to identify user + Token *string `json:"token,omitempty"` + // timestamp indicates when invite will expire. Expiration is 7 days after invite creation + ExpirationDate *int32 `json:"expiration_date,omitempty"` +} diff --git a/rest/api/v3/teammates/model_list_subuser_by_template_200_response.go b/rest/api/v3/teammates/model_list_subuser_by_template_200_response.go new file mode 100644 index 00000000..6b55158e --- /dev/null +++ b/rest/api/v3/teammates/model_list_subuser_by_template_200_response.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSubuserByTemplate200Response struct for ListSubuserByTemplate200Response +type ListSubuserByTemplate200Response struct { + // When this property is set to `true`, the Teammate has permissions to operate only on behalf of a Subuser. This property value is `true` when the `subuser_access` property is not empty. The `subuser_access` property determines which Subusers the Teammate may act on behalf of. + HasRestrictedSubuserAccess *bool `json:"has_restricted_subuser_access,omitempty"` + // Specifies which Subusers the Teammate may access and act on behalf of. If this property is populated, the `has_restricted_subuser_access` property will be `true`. + SubuserAccess *[]ListSubuserByTemplate200ResponseSubuserAccessInner `json:"subuser_access,omitempty"` + Metadata *ListSubuserByTemplate200ResponseMetadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata.go b/rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata.go new file mode 100644 index 00000000..4c207d5e --- /dev/null +++ b/rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSubuserByTemplate200ResponseMetadata This object contains response metadata. The presence of the `after_subuser_id` property in the metadata indicates that some items are still outstanding and have not been retrieved. You can use the `after_subuser_id` value to retrieve additional items with another request. +type ListSubuserByTemplate200ResponseMetadata struct { + NextParams *ListSubuserByTemplate200ResponseMetadataNextParams `json:"next_params,omitempty"` +} diff --git a/rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata_next_params.go b/rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata_next_params.go new file mode 100644 index 00000000..c28bf633 --- /dev/null +++ b/rest/api/v3/teammates/model_list_subuser_by_template_200_response__metadata_next_params.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSubuserByTemplate200ResponseMetadataNextParams struct for ListSubuserByTemplate200ResponseMetadataNextParams +type ListSubuserByTemplate200ResponseMetadataNextParams struct { + // The limit specified in the `limit` query parameter to constrain the number of Subusers returned. + Limit *int32 `json:"limit,omitempty"` + // The `after_subuser_id` property represents the last processed Subuser. If the `after_subuser_id` property is `null`, there are no more entries available. + AfterSubuserId *int32 `json:"after_subuser_id,omitempty"` + // The username of a Subuser passed in the `name` query parameter to filter results by username. + Username *string `json:"username,omitempty"` +} diff --git a/rest/api/v3/teammates/model_list_subuser_by_template_200_response_subuser_access_inner.go b/rest/api/v3/teammates/model_list_subuser_by_template_200_response_subuser_access_inner.go new file mode 100644 index 00000000..100906bb --- /dev/null +++ b/rest/api/v3/teammates/model_list_subuser_by_template_200_response_subuser_access_inner.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSubuserByTemplate200ResponseSubuserAccessInner An array of Subusers to which the Teammate has access. +type ListSubuserByTemplate200ResponseSubuserAccessInner struct { + // The ID of a Subuser to which the Teammate has access. You can retrieve Subuser IDs from the [Subusers API](https://docs.sendgrid.com/api-reference/subusers-api/). + Id *int32 `json:"id,omitempty"` + // The username of a Subuser to which the Teammate has access. + Username *string `json:"username,omitempty"` + // The email address of a Subuser to which the Teammate has access. + Email *string `json:"email,omitempty"` + // Indicates if the Subuser is active for the SendGrid account. + Disabled *bool `json:"disabled,omitempty"` + // The level of access the Teammate has to the specified Subuser. This property value may be either `admin` or `restricted`. When is property is set to `restricted`, the Teammate has only the permissions assigned in the `scopes` property. + PermissionType *PermissionType `json:"permission_type,omitempty"` + // The permissions or scopes that the Teammate can access on behalf of the Subuser. See [**Teammate Permissions**](https://docs.sendgrid.com/ui/account-and-settings/teammate-permissions) for a complete list of available scopes. + Scopes *[]string `json:"scopes,omitempty"` +} diff --git a/rest/api/v3/teammates/model_list_subuser_by_template_400_response.go b/rest/api/v3/teammates/model_list_subuser_by_template_400_response.go new file mode 100644 index 00000000..a404698d --- /dev/null +++ b/rest/api/v3/teammates/model_list_subuser_by_template_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSubuserByTemplate400Response An object containing an array of errors objects. +type ListSubuserByTemplate400Response struct { + Errors *[]ListSubuserByTemplate400ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/teammates/model_list_subuser_by_template_400_response_errors_inner.go b/rest/api/v3/teammates/model_list_subuser_by_template_400_response_errors_inner.go new file mode 100644 index 00000000..8a442ec9 --- /dev/null +++ b/rest/api/v3/teammates/model_list_subuser_by_template_400_response_errors_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListSubuserByTemplate400ResponseErrorsInner struct for ListSubuserByTemplate400ResponseErrorsInner +type ListSubuserByTemplate400ResponseErrorsInner struct { + // The message representing the error from the API. + Message *string `json:"message,omitempty"` + // The field associated with the error. + Field *string `json:"field,omitempty"` +} diff --git a/rest/api/v3/teammates/model_list_teammate_200_response.go b/rest/api/v3/teammates/model_list_teammate_200_response.go new file mode 100644 index 00000000..09609911 --- /dev/null +++ b/rest/api/v3/teammates/model_list_teammate_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListTeammate200Response struct for ListTeammate200Response +type ListTeammate200Response struct { + Result *[]ListTeammate200ResponseResultInner `json:"result,omitempty"` +} diff --git a/rest/api/v3/teammates/model_list_teammate_200_response_result_inner.go b/rest/api/v3/teammates/model_list_teammate_200_response_result_inner.go new file mode 100644 index 00000000..c0a8d40c --- /dev/null +++ b/rest/api/v3/teammates/model_list_teammate_200_response_result_inner.go @@ -0,0 +1,46 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListTeammate200ResponseResultInner struct for ListTeammate200ResponseResultInner +type ListTeammate200ResponseResultInner struct { + // Teammate's username + Username *string `json:"username,omitempty"` + // Teammate's email + Email *string `json:"email,omitempty"` + // Teammate's first name + FirstName *string `json:"first_name,omitempty"` + // Teammate's last name + LastName *string `json:"last_name,omitempty"` + // Indicate the type of user: owner user, teammate admin user, or normal teammate + UserType *UserType `json:"user_type,omitempty"` + // Set to true if teammate has admin privileges + IsAdmin *bool `json:"is_admin,omitempty"` + // (optional) Teammate's phone number + Phone *string `json:"phone,omitempty"` + // (optional) Teammate's website + Website *string `json:"website,omitempty"` + // (optional) Teammate's address + Address *string `json:"address,omitempty"` + // (optional) Teammate's address + Address2 *string `json:"address2,omitempty"` + // (optional) Teammate's city + City *string `json:"city,omitempty"` + // (optional) Teammate's state + State *string `json:"state,omitempty"` + // (optional) Teammate's zip + Zip *string `json:"zip,omitempty"` + // (optional) Teammate's country + Country *string `json:"country,omitempty"` +} diff --git a/rest/api/v3/teammates/model_permission_type.go b/rest/api/v3/teammates/model_permission_type.go new file mode 100644 index 00000000..b581984f --- /dev/null +++ b/rest/api/v3/teammates/model_permission_type.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// PermissionType the model 'PermissionType' +type PermissionType string + +// List of PermissionType +const ( + PERMISSIONTYPE_ADMIN PermissionType = "admin" + PERMISSIONTYPE_RESTRICTED PermissionType = "restricted" +) diff --git a/rest/api/v3/teammates/model_resend_teammate_invite_200_response.go b/rest/api/v3/teammates/model_resend_teammate_invite_200_response.go new file mode 100644 index 00000000..a229bfa2 --- /dev/null +++ b/rest/api/v3/teammates/model_resend_teammate_invite_200_response.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ResendTeammateInvite200Response struct for ResendTeammateInvite200Response +type ResendTeammateInvite200Response struct { + // ID to identify invite + Token *string `json:"token,omitempty"` + // Teammate's email address + Email *string `json:"email,omitempty"` + // Initial set of permissions to give to teammate if they accept the invite + Scopes *[]string `json:"scopes,omitempty"` + // Set to true if teammate should have admin privileges + IsAdmin *bool `json:"is_admin,omitempty"` +} diff --git a/rest/api/v3/teammates/model_update_teammate_200_response.go b/rest/api/v3/teammates/model_update_teammate_200_response.go new file mode 100644 index 00000000..37332bfe --- /dev/null +++ b/rest/api/v3/teammates/model_update_teammate_200_response.go @@ -0,0 +1,48 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateTeammate200Response struct for UpdateTeammate200Response +type UpdateTeammate200Response struct { + // Teammate's username + Username *string `json:"username,omitempty"` + // Teammate's first name + FirstName *string `json:"first_name,omitempty"` + // Teammate's last name + LastName *string `json:"last_name,omitempty"` + // Teammate's email address + Email *string `json:"email,omitempty"` + // Scopes given to teammate + Scopes *[]string `json:"scopes,omitempty"` + // Indicate the type of user: owner user, teammate admin user, or normal teammate + UserType *UserType2 `json:"user_type,omitempty"` + // Set to true if teammate has admin priveleges + IsAdmin *bool `json:"is_admin,omitempty"` + // (optional) Teammate's phone number + Phone *string `json:"phone,omitempty"` + // (optional) Teammate's website + Website *string `json:"website,omitempty"` + // (optional) Teammate's address + Address *string `json:"address,omitempty"` + // (optional) Teammate's address + Address2 *string `json:"address2,omitempty"` + // (optional) Teammate's city + City *string `json:"city,omitempty"` + // (optional) Teammate's state + State *string `json:"state,omitempty"` + // (optional) Teammate's zip + Zip *string `json:"zip,omitempty"` + // (optional) Teammate's country + Country *string `json:"country,omitempty"` +} diff --git a/rest/api/v3/teammates/model_update_teammate_request.go b/rest/api/v3/teammates/model_update_teammate_request.go new file mode 100644 index 00000000..a7869ed0 --- /dev/null +++ b/rest/api/v3/teammates/model_update_teammate_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateTeammateRequest struct for UpdateTeammateRequest +type UpdateTeammateRequest struct { + // Provide list of scopes that should be given to teammate. If specifying list of scopes, is_admin should be set to False. + Scopes []string `json:"scopes"` + // Set to True if this teammate should be promoted to an admin user. If True, scopes should be an empty array. + IsAdmin bool `json:"is_admin"` +} diff --git a/rest/api/v3/teammates/model_user_type.go b/rest/api/v3/teammates/model_user_type.go new file mode 100644 index 00000000..ca06b801 --- /dev/null +++ b/rest/api/v3/teammates/model_user_type.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UserType the model 'UserType' +type UserType string + +// List of UserType +const ( + USERTYPE_ADMIN UserType = "admin" + USERTYPE_OWNER UserType = "owner" + USERTYPE_TEAMMATE UserType = "teammate" +) diff --git a/rest/api/v3/teammates/model_user_type1.go b/rest/api/v3/teammates/model_user_type1.go new file mode 100644 index 00000000..133a3591 --- /dev/null +++ b/rest/api/v3/teammates/model_user_type1.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UserType1 the model 'UserType1' +type UserType1 string + +// List of UserType1 +const ( + USERTYPE1_ADMIN UserType1 = "admin" + USERTYPE1_OWNER UserType1 = "owner" + USERTYPE1_TEAMMATE UserType1 = "teammate" +) diff --git a/rest/api/v3/teammates/model_user_type2.go b/rest/api/v3/teammates/model_user_type2.go new file mode 100644 index 00000000..4dcb15df --- /dev/null +++ b/rest/api/v3/teammates/model_user_type2.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Teammates API +* The Twilio SendGrid Teammates API allows you to add, manage, and remove Teammates, or user accounts, from your SendGrid account. Teammates function like user accounts on the SendGrid account, allowing you to invite additional users to your account with scoped access. You can think of Teammates as SendGrid's approach to enabling [role-based access control](https://en.wikipedia.org/wiki/Role-based_access_control) for your SendGrid account. For even more control over the access to your account, see the [Twilio SendGrid SSO API](https://docs.sendgrid.com/api-reference/single-sign-on-teammates/), which enables SSO-authenticated Teammates to be managed through a SAML 2.0 identity provider. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UserType2 the model 'UserType2' +type UserType2 string + +// List of UserType2 +const ( + USERTYPE2_ADMIN UserType2 = "admin" + USERTYPE2_OWNER UserType2 = "owner" + USERTYPE2_TEAMMATE UserType2 = "teammate" +) diff --git a/rest/api/v3/templates/README.md b/rest/api/v3/templates/README.md new file mode 100644 index 00000000..a3219329 --- /dev/null +++ b/rest/api/v3/templates/README.md @@ -0,0 +1,93 @@ +# Go API client for + +The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. + +This API provides operations to create and manage your templates as well as their versions. + +Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:02.479210+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ActivateTemplateVersion* | [**ActivateTemplateVersion**](docs/ActivateTemplateVersion.md#activatetemplateversion) | **Post** /v3/templates/{TemplateId}/versions/{VersionId}/activate | Activate a transactional template version. +*CreateTemplate* | [**CreateTemplate**](docs/CreateTemplate.md#createtemplate) | **Post** /v3/templates | Create a transactional template. +*CreateTemplateVersion* | [**CreateTemplateVersion**](docs/CreateTemplateVersion.md#createtemplateversion) | **Post** /v3/templates/{TemplateId}/versions | Create a new transactional template version. +*DeleteTemplate* | [**DeleteTemplate**](docs/DeleteTemplate.md#deletetemplate) | **Delete** /v3/templates/{TemplateId} | Delete a template. +*DeleteTemplateVersion* | [**DeleteTemplateVersion**](docs/DeleteTemplateVersion.md#deletetemplateversion) | **Delete** /v3/templates/{TemplateId}/versions/{VersionId} | Delete a transactional template version. +*DuplicateTemplate* | [**DuplicateTemplate**](docs/DuplicateTemplate.md#duplicatetemplate) | **Post** /v3/templates/{TemplateId} | Duplicate a transactional template. +*GetTemplate* | [**GetTemplate**](docs/GetTemplate.md#gettemplate) | **Get** /v3/templates/{TemplateId} | Retrieve a single transactional template. +*GetTemplateVersion* | [**GetTemplateVersion**](docs/GetTemplateVersion.md#gettemplateversion) | **Get** /v3/templates/{TemplateId}/versions/{VersionId} | Retrieve a specific transactional template version. +*ListTemplate* | [**ListTemplate**](docs/ListTemplate.md#listtemplate) | **Get** /v3/templates | Retrieve paged transactional templates. +*UpdateTemplate* | [**UpdateTemplate**](docs/UpdateTemplate.md#updatetemplate) | **Patch** /v3/templates/{TemplateId} | Edit a transactional template. +*UpdateTemplateVersion* | [**UpdateTemplateVersion**](docs/UpdateTemplateVersion.md#updatetemplateversion) | **Patch** /v3/templates/{TemplateId}/versions/{VersionId} | Edit a transactional template version. + + +## Documentation For Models + + - [Active](Active.md) + - [Active1](Active1.md) + - [CreateTemplateRequest](CreateTemplateRequest.md) + - [DuplicateTemplateRequest](DuplicateTemplateRequest.md) + - [Editor](Editor.md) + - [Editor1](Editor1.md) + - [Generation](Generation.md) + - [Generation1](Generation1.md) + - [Generations](Generations.md) + - [ListTemplate200Response](ListTemplate200Response.md) + - [ListTemplate400Response](ListTemplate400Response.md) + - [ListTemplate400ResponseErrorsInner](ListTemplate400ResponseErrorsInner.md) + - [Metadata](Metadata.md) + - [TransactionalTemplate](TransactionalTemplate.md) + - [TransactionalTemplateVersionCreate](TransactionalTemplateVersionCreate.md) + - [TransactionalTemplateVersionOutput](TransactionalTemplateVersionOutput.md) + - [TransactionalTemplateWarning](TransactionalTemplateWarning.md) + - [TransactionalTemplatesTemplateLean](TransactionalTemplatesTemplateLean.md) + - [TransactionalTemplatesVersionOutputLean](TransactionalTemplatesVersionOutputLean.md) + - [UpdateTemplateRequest](UpdateTemplateRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/templates/api_activate_template_version.go b/rest/api/v3/templates/api_activate_template_version.go new file mode 100644 index 00000000..440b1ae8 --- /dev/null +++ b/rest/api/v3/templates/api_activate_template_version.go @@ -0,0 +1,79 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type ActivateTemplateVersionParam struct { + // The ID of the original template + TemplateId *string `json:"template_id"` + // The ID of the template version + VersionId *string `json:"version_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ActivateTemplateVersionParam) SetTemplateId(TemplateId string) *ActivateTemplateVersionParam { + params.TemplateId = &TemplateId + return params +} +func (params *ActivateTemplateVersionParam) SetVersionId(VersionId string) *ActivateTemplateVersionParam { + params.VersionId = &VersionId + return params +} +func (params *ActivateTemplateVersionParam) SetOnbehalfof(Onbehalfof string) *ActivateTemplateVersionParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to activate a version of one of your templates.** +func (c *ApiService) ActivateTemplateVersion(params *ActivateTemplateVersionParam) (interface{}, error) { + path := "/v3/templates/{TemplateId}/versions/{VersionId}/activate" + if params != nil && params.TemplateId != nil { + path = strings.Replace(path, "{"+"TemplateId"+"}", *params.TemplateId, -1) + } + if params != nil && params.VersionId != nil { + path = strings.Replace(path, "{"+"VersionId"+"}", *params.VersionId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &TransactionalTemplateVersionOutput{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/templates/api_create_template.go b/rest/api/v3/templates/api_create_template.go new file mode 100644 index 00000000..1e8f6a53 --- /dev/null +++ b/rest/api/v3/templates/api_create_template.go @@ -0,0 +1,74 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateTemplateParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + CreateTemplateRequest *CreateTemplateRequest `json:"CreateTemplateRequest,omitempty"` +} + +func (params *CreateTemplateParam) SetOnbehalfof(Onbehalfof string) *CreateTemplateParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateTemplateParam) SetCreateTemplateRequest(CreateTemplateRequest CreateTemplateRequest) *CreateTemplateParam { + params.CreateTemplateRequest = &CreateTemplateRequest + return params +} + +// **This endpoint allows you to create a transactional template.** +func (c *ApiService) CreateTemplate(params *CreateTemplateParam) (interface{}, error) { + path := "/v3/templates" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.CreateTemplateRequest != nil { + b, err := json.Marshal(*params.CreateTemplateRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &TransactionalTemplate{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/templates/api_create_template_version.go b/rest/api/v3/templates/api_create_template_version.go new file mode 100644 index 00000000..a4fad70e --- /dev/null +++ b/rest/api/v3/templates/api_create_template_version.go @@ -0,0 +1,85 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type CreateTemplateVersionParam struct { + // + TemplateId *string `json:"template_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + TransactionalTemplateVersionCreate *TransactionalTemplateVersionCreate `json:"TransactionalTemplateVersionCreate,omitempty"` +} + +func (params *CreateTemplateVersionParam) SetTemplateId(TemplateId string) *CreateTemplateVersionParam { + params.TemplateId = &TemplateId + return params +} +func (params *CreateTemplateVersionParam) SetOnbehalfof(Onbehalfof string) *CreateTemplateVersionParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateTemplateVersionParam) SetTransactionalTemplateVersionCreate(TransactionalTemplateVersionCreate TransactionalTemplateVersionCreate) *CreateTemplateVersionParam { + params.TransactionalTemplateVersionCreate = &TransactionalTemplateVersionCreate + return params +} + +// **This endpoint allows you to create a new version of a template.** +func (c *ApiService) CreateTemplateVersion(params *CreateTemplateVersionParam) (interface{}, error) { + path := "/v3/templates/{TemplateId}/versions" + if params != nil && params.TemplateId != nil { + path = strings.Replace(path, "{"+"TemplateId"+"}", *params.TemplateId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.TransactionalTemplateVersionCreate != nil { + b, err := json.Marshal(*params.TransactionalTemplateVersionCreate) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &TransactionalTemplateVersionOutput{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/templates/api_delete_template.go b/rest/api/v3/templates/api_delete_template.go new file mode 100644 index 00000000..18dfb477 --- /dev/null +++ b/rest/api/v3/templates/api_delete_template.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteTemplateParam struct { + // + TemplateId *string `json:"template_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteTemplateParam) SetTemplateId(TemplateId string) *DeleteTemplateParam { + params.TemplateId = &TemplateId + return params +} +func (params *DeleteTemplateParam) SetOnbehalfof(Onbehalfof string) *DeleteTemplateParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete a transactional template.** +func (c *ApiService) DeleteTemplate(params *DeleteTemplateParam) (interface{}, error) { + path := "/v3/templates/{TemplateId}" + if params != nil && params.TemplateId != nil { + path = strings.Replace(path, "{"+"TemplateId"+"}", *params.TemplateId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/templates/api_delete_template_version.go b/rest/api/v3/templates/api_delete_template_version.go new file mode 100644 index 00000000..761b8d6e --- /dev/null +++ b/rest/api/v3/templates/api_delete_template_version.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "net/http" + "net/url" + + "strings" +) + +type DeleteTemplateVersionParam struct { + // The ID of the original template + TemplateId *string `json:"template_id"` + // The ID of the template version + VersionId *string `json:"version_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteTemplateVersionParam) SetTemplateId(TemplateId string) *DeleteTemplateVersionParam { + params.TemplateId = &TemplateId + return params +} +func (params *DeleteTemplateVersionParam) SetVersionId(VersionId string) *DeleteTemplateVersionParam { + params.VersionId = &VersionId + return params +} +func (params *DeleteTemplateVersionParam) SetOnbehalfof(Onbehalfof string) *DeleteTemplateVersionParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete a transactional template version.** +func (c *ApiService) DeleteTemplateVersion(params *DeleteTemplateVersionParam) (interface{}, error) { + path := "/v3/templates/{TemplateId}/versions/{VersionId}" + if params != nil && params.TemplateId != nil { + path = strings.Replace(path, "{"+"TemplateId"+"}", *params.TemplateId, -1) + } + if params != nil && params.VersionId != nil { + path = strings.Replace(path, "{"+"VersionId"+"}", *params.VersionId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/templates/api_duplicate_template.go b/rest/api/v3/templates/api_duplicate_template.go new file mode 100644 index 00000000..58551315 --- /dev/null +++ b/rest/api/v3/templates/api_duplicate_template.go @@ -0,0 +1,85 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DuplicateTemplateParam struct { + // + TemplateId *string `json:"template_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + DuplicateTemplateRequest *DuplicateTemplateRequest `json:"DuplicateTemplateRequest,omitempty"` +} + +func (params *DuplicateTemplateParam) SetTemplateId(TemplateId string) *DuplicateTemplateParam { + params.TemplateId = &TemplateId + return params +} +func (params *DuplicateTemplateParam) SetOnbehalfof(Onbehalfof string) *DuplicateTemplateParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *DuplicateTemplateParam) SetDuplicateTemplateRequest(DuplicateTemplateRequest DuplicateTemplateRequest) *DuplicateTemplateParam { + params.DuplicateTemplateRequest = &DuplicateTemplateRequest + return params +} + +// **This endpoint allows you to duplicate a transactional template.** +func (c *ApiService) DuplicateTemplate(params *DuplicateTemplateParam) (interface{}, error) { + path := "/v3/templates/{TemplateId}" + if params != nil && params.TemplateId != nil { + path = strings.Replace(path, "{"+"TemplateId"+"}", *params.TemplateId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.DuplicateTemplateRequest != nil { + b, err := json.Marshal(*params.DuplicateTemplateRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &TransactionalTemplate{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/templates/api_get_template.go b/rest/api/v3/templates/api_get_template.go new file mode 100644 index 00000000..9df68311 --- /dev/null +++ b/rest/api/v3/templates/api_get_template.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetTemplateParam struct { + // + TemplateId *string `json:"template_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetTemplateParam) SetTemplateId(TemplateId string) *GetTemplateParam { + params.TemplateId = &TemplateId + return params +} +func (params *GetTemplateParam) SetOnbehalfof(Onbehalfof string) *GetTemplateParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a single transactional template.** +func (c *ApiService) GetTemplate(params *GetTemplateParam) (interface{}, error) { + path := "/v3/templates/{TemplateId}" + if params != nil && params.TemplateId != nil { + path = strings.Replace(path, "{"+"TemplateId"+"}", *params.TemplateId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &TransactionalTemplate{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/templates/api_get_template_version.go b/rest/api/v3/templates/api_get_template_version.go new file mode 100644 index 00000000..5b6e002d --- /dev/null +++ b/rest/api/v3/templates/api_get_template_version.go @@ -0,0 +1,79 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetTemplateVersionParam struct { + // The ID of the original template + TemplateId *string `json:"template_id"` + // The ID of the template version + VersionId *string `json:"version_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetTemplateVersionParam) SetTemplateId(TemplateId string) *GetTemplateVersionParam { + params.TemplateId = &TemplateId + return params +} +func (params *GetTemplateVersionParam) SetVersionId(VersionId string) *GetTemplateVersionParam { + params.VersionId = &VersionId + return params +} +func (params *GetTemplateVersionParam) SetOnbehalfof(Onbehalfof string) *GetTemplateVersionParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a specific version of a template.** +func (c *ApiService) GetTemplateVersion(params *GetTemplateVersionParam) (interface{}, error) { + path := "/v3/templates/{TemplateId}/versions/{VersionId}" + if params != nil && params.TemplateId != nil { + path = strings.Replace(path, "{"+"TemplateId"+"}", *params.TemplateId, -1) + } + if params != nil && params.VersionId != nil { + path = strings.Replace(path, "{"+"VersionId"+"}", *params.VersionId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &TransactionalTemplateVersionOutput{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/templates/api_list_template.go b/rest/api/v3/templates/api_list_template.go new file mode 100644 index 00000000..6ad261eb --- /dev/null +++ b/rest/api/v3/templates/api_list_template.go @@ -0,0 +1,96 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListTemplateParam struct { + // The number of templates to be returned in each page of results + PageSize *float32 `json:"page_size"` + // Comma-delimited list specifying which generations of templates to return. Options are `legacy`, `dynamic` or `legacy,dynamic`. + Generations *Generations `json:"generations,omitempty"` + // A token corresponding to a specific page of results, as provided by metadata + PageToken *string `json:"page_token,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListTemplateParam) SetPageSize(PageSize float32) *ListTemplateParam { + params.PageSize = &PageSize + return params +} +func (params *ListTemplateParam) SetGenerations(Generations Generations) *ListTemplateParam { + params.Generations = &Generations + return params +} +func (params *ListTemplateParam) SetPageToken(PageToken string) *ListTemplateParam { + params.PageToken = &PageToken + return params +} +func (params *ListTemplateParam) SetOnbehalfof(Onbehalfof string) *ListTemplateParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve all transactional templates.** +func (c *ApiService) ListTemplate(params *ListTemplateParam) (interface{}, error) { + path := "/v3/templates" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.PageSize != nil { + data.Set("page_size", fmt.Sprint(*params.PageSize)) + } + if params != nil && params.Generations != nil { + data.Set("generations", fmt.Sprint(*params.Generations)) + } + if params != nil && params.PageToken != nil { + data.Set("page_token", *params.PageToken) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListTemplate200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &ListTemplate400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/templates/api_service.go b/rest/api/v3/templates/api_service.go new file mode 100644 index 00000000..3716cd28 --- /dev/null +++ b/rest/api/v3/templates/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/templates/api_update_template.go b/rest/api/v3/templates/api_update_template.go new file mode 100644 index 00000000..29317d5b --- /dev/null +++ b/rest/api/v3/templates/api_update_template.go @@ -0,0 +1,85 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateTemplateParam struct { + // + TemplateId *string `json:"template_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateTemplateRequest *UpdateTemplateRequest `json:"UpdateTemplateRequest,omitempty"` +} + +func (params *UpdateTemplateParam) SetTemplateId(TemplateId string) *UpdateTemplateParam { + params.TemplateId = &TemplateId + return params +} +func (params *UpdateTemplateParam) SetOnbehalfof(Onbehalfof string) *UpdateTemplateParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateTemplateParam) SetUpdateTemplateRequest(UpdateTemplateRequest UpdateTemplateRequest) *UpdateTemplateParam { + params.UpdateTemplateRequest = &UpdateTemplateRequest + return params +} + +// **This endpoint allows you to edit the name of a transactional template.** To edit the template itself, [create a new transactional template version](https://docs.sendgrid.com/api-reference/transactional-templates-versions/create-a-new-transactional-template-version). +func (c *ApiService) UpdateTemplate(params *UpdateTemplateParam) (interface{}, error) { + path := "/v3/templates/{TemplateId}" + if params != nil && params.TemplateId != nil { + path = strings.Replace(path, "{"+"TemplateId"+"}", *params.TemplateId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateTemplateRequest != nil { + b, err := json.Marshal(*params.UpdateTemplateRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &TransactionalTemplate{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/templates/api_update_template_version.go b/rest/api/v3/templates/api_update_template_version.go new file mode 100644 index 00000000..74d7aedf --- /dev/null +++ b/rest/api/v3/templates/api_update_template_version.go @@ -0,0 +1,94 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateTemplateVersionParam struct { + // The ID of the original template + TemplateId *string `json:"template_id"` + // The ID of the template version + VersionId *string `json:"version_id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + TransactionalTemplateVersionCreate *TransactionalTemplateVersionCreate `json:"TransactionalTemplateVersionCreate,omitempty"` +} + +func (params *UpdateTemplateVersionParam) SetTemplateId(TemplateId string) *UpdateTemplateVersionParam { + params.TemplateId = &TemplateId + return params +} +func (params *UpdateTemplateVersionParam) SetVersionId(VersionId string) *UpdateTemplateVersionParam { + params.VersionId = &VersionId + return params +} +func (params *UpdateTemplateVersionParam) SetOnbehalfof(Onbehalfof string) *UpdateTemplateVersionParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateTemplateVersionParam) SetTransactionalTemplateVersionCreate(TransactionalTemplateVersionCreate TransactionalTemplateVersionCreate) *UpdateTemplateVersionParam { + params.TransactionalTemplateVersionCreate = &TransactionalTemplateVersionCreate + return params +} + +// **This endpoint allows you to edit the content of your template version.** +func (c *ApiService) UpdateTemplateVersion(params *UpdateTemplateVersionParam) (interface{}, error) { + path := "/v3/templates/{TemplateId}/versions/{VersionId}" + if params != nil && params.TemplateId != nil { + path = strings.Replace(path, "{"+"TemplateId"+"}", *params.TemplateId, -1) + } + if params != nil && params.VersionId != nil { + path = strings.Replace(path, "{"+"VersionId"+"}", *params.VersionId, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.TransactionalTemplateVersionCreate != nil { + b, err := json.Marshal(*params.TransactionalTemplateVersionCreate) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &TransactionalTemplateVersionOutput{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/templates/docs/ActivateTemplateVersion.md b/rest/api/v3/templates/docs/ActivateTemplateVersion.md new file mode 100644 index 00000000..501c4c70 --- /dev/null +++ b/rest/api/v3/templates/docs/ActivateTemplateVersion.md @@ -0,0 +1,53 @@ +# ActivateTemplateVersion + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ActivateTemplateVersion**](ActivateTemplateVersion.md#ActivateTemplateVersion) | **Post** /v3/templates/{TemplateId}/versions/{VersionId}/activate | Activate a transactional template version. + + + +## ActivateTemplateVersion + +> TransactionalTemplateVersionOutput ActivateTemplateVersion(ctx, TemplateIdVersionIdoptional) + +Activate a transactional template version. + +**This endpoint allows you to activate a version of one of your templates.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TemplateId** | **string** | The ID of the original template +**VersionId** | **string** | The ID of the template version + +### Other Parameters + +Other parameters are passed through a pointer to a ActivateTemplateVersionParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**TransactionalTemplateVersionOutput**](TransactionalTemplateVersionOutput.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/templates/docs/Active.md b/rest/api/v3/templates/docs/Active.md new file mode 100644 index 00000000..d69716ca --- /dev/null +++ b/rest/api/v3/templates/docs/Active.md @@ -0,0 +1,13 @@ +# Active + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**_0** | int32 | (value: `0`) +**_1** | int32 | (value: `1`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/Active1.md b/rest/api/v3/templates/docs/Active1.md new file mode 100644 index 00000000..4b05d8e0 --- /dev/null +++ b/rest/api/v3/templates/docs/Active1.md @@ -0,0 +1,13 @@ +# Active1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**_0** | int32 | (value: `0`) +**_1** | int32 | (value: `1`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/CreateTemplate.md b/rest/api/v3/templates/docs/CreateTemplate.md new file mode 100644 index 00000000..ae22f59f --- /dev/null +++ b/rest/api/v3/templates/docs/CreateTemplate.md @@ -0,0 +1,49 @@ +# CreateTemplate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateTemplate**](CreateTemplate.md#CreateTemplate) | **Post** /v3/templates | Create a transactional template. + + + +## CreateTemplate + +> TransactionalTemplate CreateTemplate(ctx, optional) + +Create a transactional template. + +**This endpoint allows you to create a transactional template.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateTemplateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**CreateTemplateRequest** | [**CreateTemplateRequest**](CreateTemplateRequest.md) | + +### Return type + +[**TransactionalTemplate**](TransactionalTemplate.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/templates/docs/CreateTemplateRequest.md b/rest/api/v3/templates/docs/CreateTemplateRequest.md new file mode 100644 index 00000000..3257102d --- /dev/null +++ b/rest/api/v3/templates/docs/CreateTemplateRequest.md @@ -0,0 +1,12 @@ +# CreateTemplateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name for the new transactional template. | +**Generation** | [**Generation**](Generation.md) | Defines whether the template supports dynamic replacement. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/CreateTemplateVersion.md b/rest/api/v3/templates/docs/CreateTemplateVersion.md new file mode 100644 index 00000000..e5ba2395 --- /dev/null +++ b/rest/api/v3/templates/docs/CreateTemplateVersion.md @@ -0,0 +1,53 @@ +# CreateTemplateVersion + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateTemplateVersion**](CreateTemplateVersion.md#CreateTemplateVersion) | **Post** /v3/templates/{TemplateId}/versions | Create a new transactional template version. + + + +## CreateTemplateVersion + +> TransactionalTemplateVersionOutput CreateTemplateVersion(ctx, TemplateIdoptional) + +Create a new transactional template version. + +**This endpoint allows you to create a new version of a template.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TemplateId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a CreateTemplateVersionParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**TransactionalTemplateVersionCreate** | [**TransactionalTemplateVersionCreate**](TransactionalTemplateVersionCreate.md) | + +### Return type + +[**TransactionalTemplateVersionOutput**](TransactionalTemplateVersionOutput.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/templates/docs/DeleteTemplate.md b/rest/api/v3/templates/docs/DeleteTemplate.md new file mode 100644 index 00000000..fa5ca8f0 --- /dev/null +++ b/rest/api/v3/templates/docs/DeleteTemplate.md @@ -0,0 +1,52 @@ +# DeleteTemplate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteTemplate**](DeleteTemplate.md#DeleteTemplate) | **Delete** /v3/templates/{TemplateId} | Delete a template. + + + +## DeleteTemplate + +> map[string]interface{} DeleteTemplate(ctx, TemplateIdoptional) + +Delete a template. + +**This endpoint allows you to delete a transactional template.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TemplateId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteTemplateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/templates/docs/DeleteTemplateVersion.md b/rest/api/v3/templates/docs/DeleteTemplateVersion.md new file mode 100644 index 00000000..a0a2bf5c --- /dev/null +++ b/rest/api/v3/templates/docs/DeleteTemplateVersion.md @@ -0,0 +1,53 @@ +# DeleteTemplateVersion + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteTemplateVersion**](DeleteTemplateVersion.md#DeleteTemplateVersion) | **Delete** /v3/templates/{TemplateId}/versions/{VersionId} | Delete a transactional template version. + + + +## DeleteTemplateVersion + +> DeleteTemplateVersion(ctx, TemplateIdVersionIdoptional) + +Delete a transactional template version. + +**This endpoint allows you to delete a transactional template version.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TemplateId** | **string** | The ID of the original template +**VersionId** | **string** | The ID of the template version + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteTemplateVersionParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/templates/docs/DuplicateTemplate.md b/rest/api/v3/templates/docs/DuplicateTemplate.md new file mode 100644 index 00000000..b1ff510b --- /dev/null +++ b/rest/api/v3/templates/docs/DuplicateTemplate.md @@ -0,0 +1,53 @@ +# DuplicateTemplate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DuplicateTemplate**](DuplicateTemplate.md#DuplicateTemplate) | **Post** /v3/templates/{TemplateId} | Duplicate a transactional template. + + + +## DuplicateTemplate + +> TransactionalTemplate DuplicateTemplate(ctx, TemplateIdoptional) + +Duplicate a transactional template. + +**This endpoint allows you to duplicate a transactional template.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TemplateId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a DuplicateTemplateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**DuplicateTemplateRequest** | [**DuplicateTemplateRequest**](DuplicateTemplateRequest.md) | + +### Return type + +[**TransactionalTemplate**](TransactionalTemplate.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/templates/docs/DuplicateTemplateRequest.md b/rest/api/v3/templates/docs/DuplicateTemplateRequest.md new file mode 100644 index 00000000..02a361b6 --- /dev/null +++ b/rest/api/v3/templates/docs/DuplicateTemplateRequest.md @@ -0,0 +1,11 @@ +# DuplicateTemplateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name for the new transactional template. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/Editor.md b/rest/api/v3/templates/docs/Editor.md new file mode 100644 index 00000000..9d170841 --- /dev/null +++ b/rest/api/v3/templates/docs/Editor.md @@ -0,0 +1,13 @@ +# Editor + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**CODE** | string | (value: `"code"`) +**DESIGN** | string | (value: `"design"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/Editor1.md b/rest/api/v3/templates/docs/Editor1.md new file mode 100644 index 00000000..2ddc5d89 --- /dev/null +++ b/rest/api/v3/templates/docs/Editor1.md @@ -0,0 +1,13 @@ +# Editor1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**CODE** | string | (value: `"code"`) +**DESIGN** | string | (value: `"design"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/Generation.md b/rest/api/v3/templates/docs/Generation.md new file mode 100644 index 00000000..04e09451 --- /dev/null +++ b/rest/api/v3/templates/docs/Generation.md @@ -0,0 +1,13 @@ +# Generation + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**LEGACY** | string | (value: `"legacy"`) +**DYNAMIC** | string | (value: `"dynamic"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/Generation1.md b/rest/api/v3/templates/docs/Generation1.md new file mode 100644 index 00000000..7b1f26b0 --- /dev/null +++ b/rest/api/v3/templates/docs/Generation1.md @@ -0,0 +1,13 @@ +# Generation1 + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**LEGACY** | string | (value: `"legacy"`) +**DYNAMIC** | string | (value: `"dynamic"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/Generations.md b/rest/api/v3/templates/docs/Generations.md new file mode 100644 index 00000000..61e985f0 --- /dev/null +++ b/rest/api/v3/templates/docs/Generations.md @@ -0,0 +1,14 @@ +# Generations + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**LEGACY** | string | (value: `"legacy"`) +**DYNAMIC** | string | (value: `"dynamic"`) +**LEGACYDYNAMIC** | string | (value: `"legacy,dynamic"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/GetTemplate.md b/rest/api/v3/templates/docs/GetTemplate.md new file mode 100644 index 00000000..6deed867 --- /dev/null +++ b/rest/api/v3/templates/docs/GetTemplate.md @@ -0,0 +1,52 @@ +# GetTemplate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetTemplate**](GetTemplate.md#GetTemplate) | **Get** /v3/templates/{TemplateId} | Retrieve a single transactional template. + + + +## GetTemplate + +> TransactionalTemplate GetTemplate(ctx, TemplateIdoptional) + +Retrieve a single transactional template. + +**This endpoint allows you to retrieve a single transactional template.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TemplateId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a GetTemplateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**TransactionalTemplate**](TransactionalTemplate.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/templates/docs/GetTemplateVersion.md b/rest/api/v3/templates/docs/GetTemplateVersion.md new file mode 100644 index 00000000..8beed210 --- /dev/null +++ b/rest/api/v3/templates/docs/GetTemplateVersion.md @@ -0,0 +1,53 @@ +# GetTemplateVersion + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetTemplateVersion**](GetTemplateVersion.md#GetTemplateVersion) | **Get** /v3/templates/{TemplateId}/versions/{VersionId} | Retrieve a specific transactional template version. + + + +## GetTemplateVersion + +> TransactionalTemplateVersionOutput GetTemplateVersion(ctx, TemplateIdVersionIdoptional) + +Retrieve a specific transactional template version. + +**This endpoint allows you to retrieve a specific version of a template.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TemplateId** | **string** | The ID of the original template +**VersionId** | **string** | The ID of the template version + +### Other Parameters + +Other parameters are passed through a pointer to a GetTemplateVersionParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**TransactionalTemplateVersionOutput**](TransactionalTemplateVersionOutput.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/templates/docs/ListTemplate.md b/rest/api/v3/templates/docs/ListTemplate.md new file mode 100644 index 00000000..f6af7acd --- /dev/null +++ b/rest/api/v3/templates/docs/ListTemplate.md @@ -0,0 +1,50 @@ +# ListTemplate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListTemplate**](ListTemplate.md#ListTemplate) | **Get** /v3/templates | Retrieve paged transactional templates. + + + +## ListTemplate + +> ListTemplate200Response ListTemplate(ctx, PageSizeoptional) + +Retrieve paged transactional templates. + +**This endpoint allows you to retrieve all transactional templates.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListTemplateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Generations** | [**Generations**](GenerationsGenerations.md) | Comma-delimited list specifying which generations of templates to return. Options are `legacy`, `dynamic` or `legacy,dynamic`. +**PageToken** | **string** | A token corresponding to a specific page of results, as provided by metadata +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListTemplate200Response**](ListTemplate200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/templates/docs/ListTemplate200Response.md b/rest/api/v3/templates/docs/ListTemplate200Response.md new file mode 100644 index 00000000..5ec1a162 --- /dev/null +++ b/rest/api/v3/templates/docs/ListTemplate200Response.md @@ -0,0 +1,12 @@ +# ListTemplate200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]TransactionalTemplatesTemplateLean**](TransactionalTemplatesTemplateLean.md) | |[optional] +**Metadata** | [**Metadata**](Metadata.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/ListTemplate400Response.md b/rest/api/v3/templates/docs/ListTemplate400Response.md new file mode 100644 index 00000000..006916af --- /dev/null +++ b/rest/api/v3/templates/docs/ListTemplate400Response.md @@ -0,0 +1,11 @@ +# ListTemplate400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ListTemplate400ResponseErrorsInner**](ListTemplate400ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/ListTemplate400ResponseErrorsInner.md b/rest/api/v3/templates/docs/ListTemplate400ResponseErrorsInner.md new file mode 100644 index 00000000..a1aaa499 --- /dev/null +++ b/rest/api/v3/templates/docs/ListTemplate400ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# ListTemplate400ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | |[optional] +**ErrorId** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/Metadata.md b/rest/api/v3/templates/docs/Metadata.md new file mode 100644 index 00000000..6121300c --- /dev/null +++ b/rest/api/v3/templates/docs/Metadata.md @@ -0,0 +1,14 @@ +# Metadata + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Prev** | **string** | |[optional] +**Self** | **string** | |[optional] +**Next** | **string** | |[optional] +**Count** | **int32** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/TransactionalTemplate.md b/rest/api/v3/templates/docs/TransactionalTemplate.md new file mode 100644 index 00000000..9d4b55ca --- /dev/null +++ b/rest/api/v3/templates/docs/TransactionalTemplate.md @@ -0,0 +1,16 @@ +# TransactionalTemplate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The ID of the transactional template. | +**Name** | **string** | The name for the transactional template. | +**Generation** | [**Generation1**](Generation1.md) | Defines the generation of the template. | +**UpdatedAt** | **string** | The date and time that this transactional template version was updated. | +**Versions** | [**[]TransactionalTemplatesVersionOutputLean**](TransactionalTemplatesVersionOutputLean.md) | The different versions of this transactional template. |[optional] +**Warning** | [**TransactionalTemplateWarning**](TransactionalTemplateWarning.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/TransactionalTemplateVersionCreate.md b/rest/api/v3/templates/docs/TransactionalTemplateVersionCreate.md new file mode 100644 index 00000000..958d7c58 --- /dev/null +++ b/rest/api/v3/templates/docs/TransactionalTemplateVersionCreate.md @@ -0,0 +1,18 @@ +# TransactionalTemplateVersionCreate + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Active** | [**Active**](Active.md) | Set the version as the active version associated with the template (0 is inactive, 1 is active). Only one version of a template can be active. The first version created for a template will automatically be set to Active. |[optional] +**Name** | **string** | Name of the transactional template version. | +**HtmlContent** | **string** | The HTML content of the version. Maximum of 1048576 bytes allowed. |[optional] +**PlainContent** | **string** | Text/plain content of the transactional template version. Maximum of 1048576 bytes allowed. |[optional] [default to ""] +**GeneratePlainContent** | **bool** | If true, plain_content is always generated from html_content. If false, plain_content is not altered. |[optional] [default to true] +**Subject** | **string** | Subject of the new transactional template version. | +**Editor** | [**Editor**](Editor.md) | The editor used in the UI. |[optional] +**TestData** | **string** | For dynamic templates only, the mock json data that will be used for template preview and test sends. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/TransactionalTemplateVersionOutput.md b/rest/api/v3/templates/docs/TransactionalTemplateVersionOutput.md new file mode 100644 index 00000000..b2b0e299 --- /dev/null +++ b/rest/api/v3/templates/docs/TransactionalTemplateVersionOutput.md @@ -0,0 +1,23 @@ +# TransactionalTemplateVersionOutput + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Warnings** | [**[]TransactionalTemplateWarning**](TransactionalTemplateWarning.md) | |[optional] +**Active** | [**Active1**](Active1.md) | Set the version as the active version associated with the template. Only one version of a template can be active. The first version created for a template will automatically be set to Active. |[optional] +**Name** | **string** | Name of the transactional template version. | +**HtmlContent** | **string** | The HTML content of the Design. |[optional] +**PlainContent** | **string** | Plain text content of the Design. |[optional] +**GeneratePlainContent** | **bool** | If true, plain_content is always generated from html_content. If false, plain_content is not altered. |[optional] [default to true] +**Subject** | **string** | Subject of the new transactional template version. | +**Editor** | [**Editor1**](Editor1.md) | The editor used in the UI. |[optional] +**TestData** | **string** | For dynamic templates only, the mock json data that will be used for template preview and test sends. |[optional] +**Id** | **string** | ID of the transactional template version. |[optional] +**TemplateId** | **string** | ID of the transactional template. |[optional] +**UpdatedAt** | **string** | The date and time that this transactional template version was updated. |[optional] +**ThumbnailUrl** | **string** | A Thumbnail preview of the template's html content. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/TransactionalTemplateWarning.md b/rest/api/v3/templates/docs/TransactionalTemplateWarning.md new file mode 100644 index 00000000..0b22b1bd --- /dev/null +++ b/rest/api/v3/templates/docs/TransactionalTemplateWarning.md @@ -0,0 +1,11 @@ +# TransactionalTemplateWarning + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | Warning message for the user |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/TransactionalTemplatesTemplateLean.md b/rest/api/v3/templates/docs/TransactionalTemplatesTemplateLean.md new file mode 100644 index 00000000..631f5def --- /dev/null +++ b/rest/api/v3/templates/docs/TransactionalTemplatesTemplateLean.md @@ -0,0 +1,15 @@ +# TransactionalTemplatesTemplateLean + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The ID of the transactional template. | +**Name** | **string** | The name for the transactional template. | +**Generation** | [**Generation1**](Generation1.md) | Defines the generation of the template. | +**UpdatedAt** | **string** | The date and time that this transactional template version was updated. | +**Versions** | [**[]TransactionalTemplatesVersionOutputLean**](TransactionalTemplatesVersionOutputLean.md) | The different versions of this transactional template. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/TransactionalTemplatesVersionOutputLean.md b/rest/api/v3/templates/docs/TransactionalTemplatesVersionOutputLean.md new file mode 100644 index 00000000..0462c525 --- /dev/null +++ b/rest/api/v3/templates/docs/TransactionalTemplatesVersionOutputLean.md @@ -0,0 +1,21 @@ +# TransactionalTemplatesVersionOutputLean + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | ID of the transactional template version. |[optional] +**TemplateId** | **string** | ID of the transactional template. |[optional] +**Active** | [**Active1**](Active1.md) | Set the version as the active version associated with the template. Only one version of a template can be active. The first version created for a template will automatically be set to Active. |[optional] +**Name** | **string** | Name of the transactional template version. |[optional] +**Subject** | **string** | Subject of the new transactional template version. |[optional] +**UpdatedAt** | **string** | The date and time that this transactional template version was updated. |[optional] +**GeneratePlainContent** | **bool** | If true, plain_content is always generated from html_content. If false, plain_content is not altered. |[optional] [default to true] +**HtmlContent** | **string** | The HTML content of the Design. |[optional] +**PlainContent** | **string** | Plain text content of the Design. |[optional] +**Editor** | [**Editor1**](Editor1.md) | The editor used in the UI. |[optional] +**ThumbnailUrl** | **string** | A Thumbnail preview of the template's html content. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/UpdateTemplate.md b/rest/api/v3/templates/docs/UpdateTemplate.md new file mode 100644 index 00000000..ca71abfb --- /dev/null +++ b/rest/api/v3/templates/docs/UpdateTemplate.md @@ -0,0 +1,53 @@ +# UpdateTemplate + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateTemplate**](UpdateTemplate.md#UpdateTemplate) | **Patch** /v3/templates/{TemplateId} | Edit a transactional template. + + + +## UpdateTemplate + +> TransactionalTemplate UpdateTemplate(ctx, TemplateIdoptional) + +Edit a transactional template. + +**This endpoint allows you to edit the name of a transactional template.** To edit the template itself, [create a new transactional template version](https://docs.sendgrid.com/api-reference/transactional-templates-versions/create-a-new-transactional-template-version). + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TemplateId** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateTemplateParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateTemplateRequest** | [**UpdateTemplateRequest**](UpdateTemplateRequest.md) | + +### Return type + +[**TransactionalTemplate**](TransactionalTemplate.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/templates/docs/UpdateTemplateRequest.md b/rest/api/v3/templates/docs/UpdateTemplateRequest.md new file mode 100644 index 00000000..beb9d891 --- /dev/null +++ b/rest/api/v3/templates/docs/UpdateTemplateRequest.md @@ -0,0 +1,11 @@ +# UpdateTemplateRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the transactional template. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/templates/docs/UpdateTemplateVersion.md b/rest/api/v3/templates/docs/UpdateTemplateVersion.md new file mode 100644 index 00000000..79ab9221 --- /dev/null +++ b/rest/api/v3/templates/docs/UpdateTemplateVersion.md @@ -0,0 +1,54 @@ +# UpdateTemplateVersion + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateTemplateVersion**](UpdateTemplateVersion.md#UpdateTemplateVersion) | **Patch** /v3/templates/{TemplateId}/versions/{VersionId} | Edit a transactional template version. + + + +## UpdateTemplateVersion + +> TransactionalTemplateVersionOutput UpdateTemplateVersion(ctx, TemplateIdVersionIdoptional) + +Edit a transactional template version. + +**This endpoint allows you to edit the content of your template version.** + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**TemplateId** | **string** | The ID of the original template +**VersionId** | **string** | The ID of the template version + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateTemplateVersionParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**TransactionalTemplateVersionCreate** | [**TransactionalTemplateVersionCreate**](TransactionalTemplateVersionCreate.md) | + +### Return type + +[**TransactionalTemplateVersionOutput**](TransactionalTemplateVersionOutput.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/templates/model_active.go b/rest/api/v3/templates/model_active.go new file mode 100644 index 00000000..f2cf3f4c --- /dev/null +++ b/rest/api/v3/templates/model_active.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Active the model 'Active' +type Active int32 + +// List of Active +const ( + ACTIVE__0 Active = 0 + ACTIVE__1 Active = 1 +) diff --git a/rest/api/v3/templates/model_active1.go b/rest/api/v3/templates/model_active1.go new file mode 100644 index 00000000..063d82be --- /dev/null +++ b/rest/api/v3/templates/model_active1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Active1 the model 'Active1' +type Active1 int32 + +// List of Active1 +const ( + ACTIVE1__0 Active1 = 0 + ACTIVE1__1 Active1 = 1 +) diff --git a/rest/api/v3/templates/model_create_template_request.go b/rest/api/v3/templates/model_create_template_request.go new file mode 100644 index 00000000..d2dcd300 --- /dev/null +++ b/rest/api/v3/templates/model_create_template_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateTemplateRequest struct for CreateTemplateRequest +type CreateTemplateRequest struct { + // The name for the new transactional template. + Name string `json:"name"` + // Defines whether the template supports dynamic replacement. + Generation *Generation `json:"generation,omitempty"` +} diff --git a/rest/api/v3/templates/model_duplicate_template_request.go b/rest/api/v3/templates/model_duplicate_template_request.go new file mode 100644 index 00000000..7b69dd8e --- /dev/null +++ b/rest/api/v3/templates/model_duplicate_template_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DuplicateTemplateRequest struct for DuplicateTemplateRequest +type DuplicateTemplateRequest struct { + // The name for the new transactional template. + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/templates/model_editor.go b/rest/api/v3/templates/model_editor.go new file mode 100644 index 00000000..e4bfb1be --- /dev/null +++ b/rest/api/v3/templates/model_editor.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Editor the model 'Editor' +type Editor string + +// List of Editor +const ( + EDITOR_CODE Editor = "code" + EDITOR_DESIGN Editor = "design" +) diff --git a/rest/api/v3/templates/model_editor1.go b/rest/api/v3/templates/model_editor1.go new file mode 100644 index 00000000..6fabeaf4 --- /dev/null +++ b/rest/api/v3/templates/model_editor1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Editor1 the model 'Editor1' +type Editor1 string + +// List of Editor1 +const ( + EDITOR1_CODE Editor1 = "code" + EDITOR1_DESIGN Editor1 = "design" +) diff --git a/rest/api/v3/templates/model_generation.go b/rest/api/v3/templates/model_generation.go new file mode 100644 index 00000000..7056829d --- /dev/null +++ b/rest/api/v3/templates/model_generation.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Generation the model 'Generation' +type Generation string + +// List of Generation +const ( + GENERATION_LEGACY Generation = "legacy" + GENERATION_DYNAMIC Generation = "dynamic" +) diff --git a/rest/api/v3/templates/model_generation1.go b/rest/api/v3/templates/model_generation1.go new file mode 100644 index 00000000..49ece636 --- /dev/null +++ b/rest/api/v3/templates/model_generation1.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Generation1 the model 'Generation1' +type Generation1 string + +// List of Generation1 +const ( + GENERATION1_LEGACY Generation1 = "legacy" + GENERATION1_DYNAMIC Generation1 = "dynamic" +) diff --git a/rest/api/v3/templates/model_generations.go b/rest/api/v3/templates/model_generations.go new file mode 100644 index 00000000..1c57da46 --- /dev/null +++ b/rest/api/v3/templates/model_generations.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Generations the model 'Generations' +type Generations string + +// List of Generations +const ( + GENERATIONS_LEGACY Generations = "legacy" + GENERATIONS_DYNAMIC Generations = "dynamic" + GENERATIONS_LEGACYDYNAMIC Generations = "legacy,dynamic" +) diff --git a/rest/api/v3/templates/model_list_template_200_response.go b/rest/api/v3/templates/model_list_template_200_response.go new file mode 100644 index 00000000..6cb5f0a0 --- /dev/null +++ b/rest/api/v3/templates/model_list_template_200_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListTemplate200Response struct for ListTemplate200Response +type ListTemplate200Response struct { + // + Result *[]TransactionalTemplatesTemplateLean `json:"result,omitempty"` + Metadata *Metadata `json:"_metadata,omitempty"` +} diff --git a/rest/api/v3/templates/model_list_template_400_response.go b/rest/api/v3/templates/model_list_template_400_response.go new file mode 100644 index 00000000..b2834d68 --- /dev/null +++ b/rest/api/v3/templates/model_list_template_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListTemplate400Response struct for ListTemplate400Response +type ListTemplate400Response struct { + Errors *[]ListTemplate400ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/templates/model_list_template_400_response_errors_inner.go b/rest/api/v3/templates/model_list_template_400_response_errors_inner.go new file mode 100644 index 00000000..dd133220 --- /dev/null +++ b/rest/api/v3/templates/model_list_template_400_response_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListTemplate400ResponseErrorsInner struct for ListTemplate400ResponseErrorsInner +type ListTemplate400ResponseErrorsInner struct { + Message *string `json:"message,omitempty"` + ErrorId *string `json:"error_id,omitempty"` +} diff --git a/rest/api/v3/templates/model_metadata.go b/rest/api/v3/templates/model_metadata.go new file mode 100644 index 00000000..20681118 --- /dev/null +++ b/rest/api/v3/templates/model_metadata.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Metadata struct for Metadata +type Metadata struct { + Prev *string `json:"prev,omitempty"` + Self *string `json:"self,omitempty"` + Next *string `json:"next,omitempty"` + Count *int32 `json:"count,omitempty"` +} diff --git a/rest/api/v3/templates/model_transactional_template.go b/rest/api/v3/templates/model_transactional_template.go new file mode 100644 index 00000000..2298d217 --- /dev/null +++ b/rest/api/v3/templates/model_transactional_template.go @@ -0,0 +1,29 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// TransactionalTemplate struct for TransactionalTemplate +type TransactionalTemplate struct { + // The ID of the transactional template. + Id string `json:"id"` + // The name for the transactional template. + Name string `json:"name"` + // Defines the generation of the template. + Generation Generation1 `json:"generation"` + // The date and time that this transactional template version was updated. + UpdatedAt string `json:"updated_at"` + // The different versions of this transactional template. + Versions *[]TransactionalTemplatesVersionOutputLean `json:"versions,omitempty"` + Warning *TransactionalTemplateWarning `json:"warning,omitempty"` +} diff --git a/rest/api/v3/templates/model_transactional_template_version_create.go b/rest/api/v3/templates/model_transactional_template_version_create.go new file mode 100644 index 00000000..876459d7 --- /dev/null +++ b/rest/api/v3/templates/model_transactional_template_version_create.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// TransactionalTemplateVersionCreate struct for TransactionalTemplateVersionCreate +type TransactionalTemplateVersionCreate struct { + // Set the version as the active version associated with the template (0 is inactive, 1 is active). Only one version of a template can be active. The first version created for a template will automatically be set to Active. + Active *Active `json:"active,omitempty"` + // Name of the transactional template version. + Name string `json:"name"` + // The HTML content of the version. Maximum of 1048576 bytes allowed. + HtmlContent *string `json:"html_content,omitempty"` + // Text/plain content of the transactional template version. Maximum of 1048576 bytes allowed. + PlainContent *string `json:"plain_content,omitempty"` + // If true, plain_content is always generated from html_content. If false, plain_content is not altered. + GeneratePlainContent *bool `json:"generate_plain_content,omitempty"` + // Subject of the new transactional template version. + Subject string `json:"subject"` + // The editor used in the UI. + Editor *Editor `json:"editor,omitempty"` + // For dynamic templates only, the mock json data that will be used for template preview and test sends. + TestData *string `json:"test_data,omitempty"` +} diff --git a/rest/api/v3/templates/model_transactional_template_version_output.go b/rest/api/v3/templates/model_transactional_template_version_output.go new file mode 100644 index 00000000..5874ebbe --- /dev/null +++ b/rest/api/v3/templates/model_transactional_template_version_output.go @@ -0,0 +1,43 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// TransactionalTemplateVersionOutput struct for TransactionalTemplateVersionOutput +type TransactionalTemplateVersionOutput struct { + Warnings *[]TransactionalTemplateWarning `json:"warnings,omitempty"` + // Set the version as the active version associated with the template. Only one version of a template can be active. The first version created for a template will automatically be set to Active. + Active *Active1 `json:"active,omitempty"` + // Name of the transactional template version. + Name string `json:"name"` + // The HTML content of the Design. + HtmlContent *string `json:"html_content,omitempty"` + // Plain text content of the Design. + PlainContent *string `json:"plain_content,omitempty"` + // If true, plain_content is always generated from html_content. If false, plain_content is not altered. + GeneratePlainContent *bool `json:"generate_plain_content,omitempty"` + // Subject of the new transactional template version. + Subject string `json:"subject"` + // The editor used in the UI. + Editor *Editor1 `json:"editor,omitempty"` + // For dynamic templates only, the mock json data that will be used for template preview and test sends. + TestData *string `json:"test_data,omitempty"` + // ID of the transactional template version. + Id *string `json:"id,omitempty"` + // ID of the transactional template. + TemplateId *string `json:"template_id,omitempty"` + // The date and time that this transactional template version was updated. + UpdatedAt *string `json:"updated_at,omitempty"` + // A Thumbnail preview of the template's html content. + ThumbnailUrl *string `json:"thumbnail_url,omitempty"` +} diff --git a/rest/api/v3/templates/model_transactional_template_warning.go b/rest/api/v3/templates/model_transactional_template_warning.go new file mode 100644 index 00000000..3d110410 --- /dev/null +++ b/rest/api/v3/templates/model_transactional_template_warning.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// TransactionalTemplateWarning struct for TransactionalTemplateWarning +type TransactionalTemplateWarning struct { + // Warning message for the user + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/templates/model_transactional_templates_template_lean.go b/rest/api/v3/templates/model_transactional_templates_template_lean.go new file mode 100644 index 00000000..eb295990 --- /dev/null +++ b/rest/api/v3/templates/model_transactional_templates_template_lean.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// TransactionalTemplatesTemplateLean struct for TransactionalTemplatesTemplateLean +type TransactionalTemplatesTemplateLean struct { + // The ID of the transactional template. + Id string `json:"id"` + // The name for the transactional template. + Name string `json:"name"` + // Defines the generation of the template. + Generation Generation1 `json:"generation"` + // The date and time that this transactional template version was updated. + UpdatedAt string `json:"updated_at"` + // The different versions of this transactional template. + Versions *[]TransactionalTemplatesVersionOutputLean `json:"versions,omitempty"` +} diff --git a/rest/api/v3/templates/model_transactional_templates_version_output_lean.go b/rest/api/v3/templates/model_transactional_templates_version_output_lean.go new file mode 100644 index 00000000..47f42a36 --- /dev/null +++ b/rest/api/v3/templates/model_transactional_templates_version_output_lean.go @@ -0,0 +1,40 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// TransactionalTemplatesVersionOutputLean struct for TransactionalTemplatesVersionOutputLean +type TransactionalTemplatesVersionOutputLean struct { + // ID of the transactional template version. + Id *string `json:"id,omitempty"` + // ID of the transactional template. + TemplateId *string `json:"template_id,omitempty"` + // Set the version as the active version associated with the template. Only one version of a template can be active. The first version created for a template will automatically be set to Active. + Active *Active1 `json:"active,omitempty"` + // Name of the transactional template version. + Name *string `json:"name,omitempty"` + // Subject of the new transactional template version. + Subject *string `json:"subject,omitempty"` + // The date and time that this transactional template version was updated. + UpdatedAt *string `json:"updated_at,omitempty"` + // If true, plain_content is always generated from html_content. If false, plain_content is not altered. + GeneratePlainContent *bool `json:"generate_plain_content,omitempty"` + // The HTML content of the Design. + HtmlContent *string `json:"html_content,omitempty"` + // Plain text content of the Design. + PlainContent *string `json:"plain_content,omitempty"` + // The editor used in the UI. + Editor *Editor1 `json:"editor,omitempty"` + // A Thumbnail preview of the template's html content. + ThumbnailUrl *string `json:"thumbnail_url,omitempty"` +} diff --git a/rest/api/v3/templates/model_update_template_request.go b/rest/api/v3/templates/model_update_template_request.go new file mode 100644 index 00000000..bb110304 --- /dev/null +++ b/rest/api/v3/templates/model_update_template_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Templates API +* The Twilio SendGrid Templates API allows you to create and manage email templates to be delivered with SendGrid's sending APIs. The templates you create will be available using a template ID that is passed to our sending APIs as part of the request. Each template may then have multiple versions associated with it. Whichever version is set as \"active\" at the time of the request will be sent to your recipients. This system allows you to update a single template's look and feel entirely without modifying your requests to our Mail Send API. For example, you could have a single template for welcome emails. That welcome template could then have a version for each season of the year that's themed appropriately and marked as active during the appropriate season. The template ID passed to our sending APIs never needs to change; you can just modify which version is active. This API provides operations to create and manage your templates as well as their versions. Each user can create up to 300 different templates. Templates are specific to accounts and Subusers. Templates created on a parent account will not be accessible from the Subusers' accounts. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateTemplateRequest struct for UpdateTemplateRequest +type UpdateTemplateRequest struct { + // The name of the transactional template. + Name *string `json:"name,omitempty"` +} diff --git a/rest/api/v3/tracking_settings/README.md b/rest/api/v3/tracking_settings/README.md new file mode 100644 index 00000000..c7da454a --- /dev/null +++ b/rest/api/v3/tracking_settings/README.md @@ -0,0 +1,75 @@ +# Go API client for + +The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:02.489222+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ListClickTrackingSetting* | [**ListClickTrackingSetting**](docs/ListClickTrackingSetting.md#listclicktrackingsetting) | **Get** /v3/tracking_settings/click | Retrieve Click Track Settings +*ListGoogleAnalyticsTrackingSetting* | [**ListGoogleAnalyticsTrackingSetting**](docs/ListGoogleAnalyticsTrackingSetting.md#listgoogleanalyticstrackingsetting) | **Get** /v3/tracking_settings/google_analytics | Retrieve Google Analytics Settings +*ListOpenTrackingSetting* | [**ListOpenTrackingSetting**](docs/ListOpenTrackingSetting.md#listopentrackingsetting) | **Get** /v3/tracking_settings/open | Get Open Tracking Settings +*ListSubscriptionTrackingSetting* | [**ListSubscriptionTrackingSetting**](docs/ListSubscriptionTrackingSetting.md#listsubscriptiontrackingsetting) | **Get** /v3/tracking_settings/subscription | Retrieve Subscription Tracking Settings +*ListTrackingSetting* | [**ListTrackingSetting**](docs/ListTrackingSetting.md#listtrackingsetting) | **Get** /v3/tracking_settings | Retrieve Tracking Settings +*UpdateClickTrackingSetting* | [**UpdateClickTrackingSetting**](docs/UpdateClickTrackingSetting.md#updateclicktrackingsetting) | **Patch** /v3/tracking_settings/click | Update Click Tracking Settings +*UpdateGoogleAnalyticsTrackingSetting* | [**UpdateGoogleAnalyticsTrackingSetting**](docs/UpdateGoogleAnalyticsTrackingSetting.md#updategoogleanalyticstrackingsetting) | **Patch** /v3/tracking_settings/google_analytics | Update Google Analytics Settings +*UpdateOpenTrackingSetting* | [**UpdateOpenTrackingSetting**](docs/UpdateOpenTrackingSetting.md#updateopentrackingsetting) | **Patch** /v3/tracking_settings/open | Update Open Tracking Settings +*UpdateSubscriptionTrackingSetting* | [**UpdateSubscriptionTrackingSetting**](docs/UpdateSubscriptionTrackingSetting.md#updatesubscriptiontrackingsetting) | **Patch** /v3/tracking_settings/subscription | Update Subscription Tracking Settings + + +## Documentation For Models + + - [ClickTracking](ClickTracking.md) + - [GoogleAnalyticsSettings](GoogleAnalyticsSettings.md) + - [ListOpenTrackingSetting200Response](ListOpenTrackingSetting200Response.md) + - [ListTrackingSetting200Response](ListTrackingSetting200Response.md) + - [ListTrackingSetting200ResponseResultInner](ListTrackingSetting200ResponseResultInner.md) + - [SubscriptionTrackingSettings](SubscriptionTrackingSettings.md) + - [UpdateClickTrackingSettingRequest](UpdateClickTrackingSettingRequest.md) + - [UpdateOpenTrackingSettingRequest](UpdateOpenTrackingSettingRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/tracking_settings/api_list_click_tracking_setting.go b/rest/api/v3/tracking_settings/api_list_click_tracking_setting.go new file mode 100644 index 00000000..e9c1c2ce --- /dev/null +++ b/rest/api/v3/tracking_settings/api_list_click_tracking_setting.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListClickTrackingSettingParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListClickTrackingSettingParam) SetOnbehalfof(Onbehalfof string) *ListClickTrackingSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve your current click tracking setting.** Click Tracking overrides all the links and URLs in your emails and points them to either SendGrid’s servers or the domain with which you branded your link. When a customer clicks a link, SendGrid tracks those [clicks](https://sendgrid.com/docs/glossary/clicks/). Click tracking helps you understand how users are engaging with your communications. SendGrid can track up to 1000 links per email +func (c *ApiService) ListClickTrackingSetting(params *ListClickTrackingSettingParam) (interface{}, error) { + path := "/v3/tracking_settings/click" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ClickTracking{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/tracking_settings/api_list_google_analytics_tracking_setting.go b/rest/api/v3/tracking_settings/api_list_google_analytics_tracking_setting.go new file mode 100644 index 00000000..78afc83f --- /dev/null +++ b/rest/api/v3/tracking_settings/api_list_google_analytics_tracking_setting.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListGoogleAnalyticsTrackingSettingParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListGoogleAnalyticsTrackingSettingParam) SetOnbehalfof(Onbehalfof string) *ListGoogleAnalyticsTrackingSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve your current setting for Google Analytics.** Google Analytics helps you understand how users got to your site and what they're doing there. For more information about using Google Analytics, please refer to [Google’s URL Builder](https://support.google.com/analytics/answer/1033867?hl=en) and their article on [\"Best Practices for Campaign Building\"](https://support.google.com/analytics/answer/1037445). We default the settings to Google’s recommendations. For more information, see [Google Analytics Demystified](https://sendgrid.com/docs/ui/analytics-and-reporting/google-analytics/). +func (c *ApiService) ListGoogleAnalyticsTrackingSetting(params *ListGoogleAnalyticsTrackingSettingParam) (interface{}, error) { + path := "/v3/tracking_settings/google_analytics" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GoogleAnalyticsSettings{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/tracking_settings/api_list_open_tracking_setting.go b/rest/api/v3/tracking_settings/api_list_open_tracking_setting.go new file mode 100644 index 00000000..3d834495 --- /dev/null +++ b/rest/api/v3/tracking_settings/api_list_open_tracking_setting.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListOpenTrackingSettingParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListOpenTrackingSettingParam) SetOnbehalfof(Onbehalfof string) *ListOpenTrackingSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve your current settings for open tracking.** Open Tracking adds an invisible image at the end of the email which can track email opens. If the email recipient has images enabled on their email client, a request to SendGrid’s server for the invisible image is executed and an open event is logged. These events are logged in the Statistics portal, Email Activity interface, and are reported by the Event Webhook. +func (c *ApiService) ListOpenTrackingSetting(params *ListOpenTrackingSettingParam) (interface{}, error) { + path := "/v3/tracking_settings/open" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListOpenTrackingSetting200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/tracking_settings/api_list_subscription_tracking_setting.go b/rest/api/v3/tracking_settings/api_list_subscription_tracking_setting.go new file mode 100644 index 00000000..d540ac73 --- /dev/null +++ b/rest/api/v3/tracking_settings/api_list_subscription_tracking_setting.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListSubscriptionTrackingSettingParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListSubscriptionTrackingSettingParam) SetOnbehalfof(Onbehalfof string) *ListSubscriptionTrackingSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve your current settings for subscription tracking.** Subscription tracking adds links to the bottom of your emails that allows your recipients to subscribe to, or unsubscribe from, your emails. +func (c *ApiService) ListSubscriptionTrackingSetting(params *ListSubscriptionTrackingSettingParam) (interface{}, error) { + path := "/v3/tracking_settings/subscription" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SubscriptionTrackingSettings{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/tracking_settings/api_list_tracking_setting.go b/rest/api/v3/tracking_settings/api_list_tracking_setting.go new file mode 100644 index 00000000..64b13c74 --- /dev/null +++ b/rest/api/v3/tracking_settings/api_list_tracking_setting.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListTrackingSettingParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListTrackingSettingParam) SetOnbehalfof(Onbehalfof string) *ListTrackingSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a list of all tracking settings on your account.** +func (c *ApiService) ListTrackingSetting(params *ListTrackingSettingParam) (interface{}, error) { + path := "/v3/tracking_settings" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListTrackingSetting200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/tracking_settings/api_service.go b/rest/api/v3/tracking_settings/api_service.go new file mode 100644 index 00000000..66f5e1d2 --- /dev/null +++ b/rest/api/v3/tracking_settings/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/tracking_settings/api_update_click_tracking_setting.go b/rest/api/v3/tracking_settings/api_update_click_tracking_setting.go new file mode 100644 index 00000000..06bd79ff --- /dev/null +++ b/rest/api/v3/tracking_settings/api_update_click_tracking_setting.go @@ -0,0 +1,74 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type UpdateClickTrackingSettingParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateClickTrackingSettingRequest *UpdateClickTrackingSettingRequest `json:"UpdateClickTrackingSettingRequest,omitempty"` +} + +func (params *UpdateClickTrackingSettingParam) SetOnbehalfof(Onbehalfof string) *UpdateClickTrackingSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateClickTrackingSettingParam) SetUpdateClickTrackingSettingRequest(UpdateClickTrackingSettingRequest UpdateClickTrackingSettingRequest) *UpdateClickTrackingSettingParam { + params.UpdateClickTrackingSettingRequest = &UpdateClickTrackingSettingRequest + return params +} + +// **This endpoint allows you to enable or disable your current click tracking setting.** Click Tracking overrides all the links and URLs in your emails and points them to either SendGrid’s servers or the domain with which you branded your link. When a customer clicks a link, SendGrid tracks those [clicks](https://sendgrid.com/docs/glossary/clicks/). Click tracking helps you understand how users are engaging with your communications. SendGrid can track up to 1000 links per email +func (c *ApiService) UpdateClickTrackingSetting(params *UpdateClickTrackingSettingParam) (interface{}, error) { + path := "/v3/tracking_settings/click" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateClickTrackingSettingRequest != nil { + b, err := json.Marshal(*params.UpdateClickTrackingSettingRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ClickTracking{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/tracking_settings/api_update_google_analytics_tracking_setting.go b/rest/api/v3/tracking_settings/api_update_google_analytics_tracking_setting.go new file mode 100644 index 00000000..c0e4e45c --- /dev/null +++ b/rest/api/v3/tracking_settings/api_update_google_analytics_tracking_setting.go @@ -0,0 +1,74 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type UpdateGoogleAnalyticsTrackingSettingParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + GoogleAnalyticsSettings *GoogleAnalyticsSettings `json:"GoogleAnalyticsSettings,omitempty"` +} + +func (params *UpdateGoogleAnalyticsTrackingSettingParam) SetOnbehalfof(Onbehalfof string) *UpdateGoogleAnalyticsTrackingSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateGoogleAnalyticsTrackingSettingParam) SetGoogleAnalyticsSettings(GoogleAnalyticsSettings GoogleAnalyticsSettings) *UpdateGoogleAnalyticsTrackingSettingParam { + params.GoogleAnalyticsSettings = &GoogleAnalyticsSettings + return params +} + +// **This endpoint allows you to update your current setting for Google Analytics.** Google Analytics helps you understand how users got to your site and what they're doing there. For more information about using Google Analytics, please refer to [Google’s URL Builder](https://support.google.com/analytics/answer/1033867?hl=en) and their article on [\"Best Practices for Campaign Building\"](https://support.google.com/analytics/answer/1037445). We default the settings to Google’s recommendations. For more information, see [Google Analytics Demystified](https://sendgrid.com/docs/ui/analytics-and-reporting/google-analytics/). +func (c *ApiService) UpdateGoogleAnalyticsTrackingSetting(params *UpdateGoogleAnalyticsTrackingSettingParam) (interface{}, error) { + path := "/v3/tracking_settings/google_analytics" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.GoogleAnalyticsSettings != nil { + b, err := json.Marshal(*params.GoogleAnalyticsSettings) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GoogleAnalyticsSettings{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/tracking_settings/api_update_open_tracking_setting.go b/rest/api/v3/tracking_settings/api_update_open_tracking_setting.go new file mode 100644 index 00000000..3d634c20 --- /dev/null +++ b/rest/api/v3/tracking_settings/api_update_open_tracking_setting.go @@ -0,0 +1,74 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type UpdateOpenTrackingSettingParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateOpenTrackingSettingRequest *UpdateOpenTrackingSettingRequest `json:"UpdateOpenTrackingSettingRequest,omitempty"` +} + +func (params *UpdateOpenTrackingSettingParam) SetOnbehalfof(Onbehalfof string) *UpdateOpenTrackingSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateOpenTrackingSettingParam) SetUpdateOpenTrackingSettingRequest(UpdateOpenTrackingSettingRequest UpdateOpenTrackingSettingRequest) *UpdateOpenTrackingSettingParam { + params.UpdateOpenTrackingSettingRequest = &UpdateOpenTrackingSettingRequest + return params +} + +// **This endpoint allows you to update your current settings for open tracking.** Open Tracking adds an invisible image at the end of the email which can track email opens. If the email recipient has images enabled on their email client, a request to SendGrid’s server for the invisible image is executed and an open event is logged. These events are logged in the Statistics portal, Email Activity interface, and are reported by the Event Webhook. +func (c *ApiService) UpdateOpenTrackingSetting(params *UpdateOpenTrackingSettingParam) (interface{}, error) { + path := "/v3/tracking_settings/open" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateOpenTrackingSettingRequest != nil { + b, err := json.Marshal(*params.UpdateOpenTrackingSettingRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListOpenTrackingSetting200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/tracking_settings/api_update_subscription_tracking_setting.go b/rest/api/v3/tracking_settings/api_update_subscription_tracking_setting.go new file mode 100644 index 00000000..899c7ef0 --- /dev/null +++ b/rest/api/v3/tracking_settings/api_update_subscription_tracking_setting.go @@ -0,0 +1,74 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type UpdateSubscriptionTrackingSettingParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + SubscriptionTrackingSettings *SubscriptionTrackingSettings `json:"SubscriptionTrackingSettings,omitempty"` +} + +func (params *UpdateSubscriptionTrackingSettingParam) SetOnbehalfof(Onbehalfof string) *UpdateSubscriptionTrackingSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateSubscriptionTrackingSettingParam) SetSubscriptionTrackingSettings(SubscriptionTrackingSettings SubscriptionTrackingSettings) *UpdateSubscriptionTrackingSettingParam { + params.SubscriptionTrackingSettings = &SubscriptionTrackingSettings + return params +} + +// **This endpoint allows you to update your current settings for subscription tracking.** Subscription tracking adds links to the bottom of your emails that allows your recipients to subscribe to, or unsubscribe from, your emails. +func (c *ApiService) UpdateSubscriptionTrackingSetting(params *UpdateSubscriptionTrackingSettingParam) (interface{}, error) { + path := "/v3/tracking_settings/subscription" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.SubscriptionTrackingSettings != nil { + b, err := json.Marshal(*params.SubscriptionTrackingSettings) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &SubscriptionTrackingSettings{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/tracking_settings/docs/ClickTracking.md b/rest/api/v3/tracking_settings/docs/ClickTracking.md new file mode 100644 index 00000000..1ed22ee2 --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/ClickTracking.md @@ -0,0 +1,12 @@ +# ClickTracking + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**EnableText** | **bool** | Indicates if click tracking is enabled for plain text emails. | +**Enabled** | **bool** | Indicates if click tracking is enabled or disabled. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/tracking_settings/docs/GoogleAnalyticsSettings.md b/rest/api/v3/tracking_settings/docs/GoogleAnalyticsSettings.md new file mode 100644 index 00000000..e55f7b45 --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/GoogleAnalyticsSettings.md @@ -0,0 +1,16 @@ +# GoogleAnalyticsSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates if Google Analytics is enabled. |[optional] +**UtmCampaign** | **string** | The name of the campaign. |[optional] +**UtmContent** | **string** | Used to differentiate ads |[optional] +**UtmMedium** | **string** | Name of the marketing medium (e.g. \"Email\"). |[optional] +**UtmSource** | **string** | Name of the referrer source. |[optional] +**UtmTerm** | **string** | Any paid keywords. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/tracking_settings/docs/ListClickTrackingSetting.md b/rest/api/v3/tracking_settings/docs/ListClickTrackingSetting.md new file mode 100644 index 00000000..2437d770 --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/ListClickTrackingSetting.md @@ -0,0 +1,48 @@ +# ListClickTrackingSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListClickTrackingSetting**](ListClickTrackingSetting.md#ListClickTrackingSetting) | **Get** /v3/tracking_settings/click | Retrieve Click Track Settings + + + +## ListClickTrackingSetting + +> ClickTracking ListClickTrackingSetting(ctx, optional) + +Retrieve Click Track Settings + +**This endpoint allows you to retrieve your current click tracking setting.** Click Tracking overrides all the links and URLs in your emails and points them to either SendGrid’s servers or the domain with which you branded your link. When a customer clicks a link, SendGrid tracks those [clicks](https://sendgrid.com/docs/glossary/clicks/). Click tracking helps you understand how users are engaging with your communications. SendGrid can track up to 1000 links per email + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListClickTrackingSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ClickTracking**](ClickTracking.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/tracking_settings/docs/ListGoogleAnalyticsTrackingSetting.md b/rest/api/v3/tracking_settings/docs/ListGoogleAnalyticsTrackingSetting.md new file mode 100644 index 00000000..fdb71673 --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/ListGoogleAnalyticsTrackingSetting.md @@ -0,0 +1,48 @@ +# ListGoogleAnalyticsTrackingSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListGoogleAnalyticsTrackingSetting**](ListGoogleAnalyticsTrackingSetting.md#ListGoogleAnalyticsTrackingSetting) | **Get** /v3/tracking_settings/google_analytics | Retrieve Google Analytics Settings + + + +## ListGoogleAnalyticsTrackingSetting + +> GoogleAnalyticsSettings ListGoogleAnalyticsTrackingSetting(ctx, optional) + +Retrieve Google Analytics Settings + +**This endpoint allows you to retrieve your current setting for Google Analytics.** Google Analytics helps you understand how users got to your site and what they're doing there. For more information about using Google Analytics, please refer to [Google’s URL Builder](https://support.google.com/analytics/answer/1033867?hl=en) and their article on [\"Best Practices for Campaign Building\"](https://support.google.com/analytics/answer/1037445). We default the settings to Google’s recommendations. For more information, see [Google Analytics Demystified](https://sendgrid.com/docs/ui/analytics-and-reporting/google-analytics/). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListGoogleAnalyticsTrackingSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**GoogleAnalyticsSettings**](GoogleAnalyticsSettings.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/tracking_settings/docs/ListOpenTrackingSetting.md b/rest/api/v3/tracking_settings/docs/ListOpenTrackingSetting.md new file mode 100644 index 00000000..958867f9 --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/ListOpenTrackingSetting.md @@ -0,0 +1,48 @@ +# ListOpenTrackingSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListOpenTrackingSetting**](ListOpenTrackingSetting.md#ListOpenTrackingSetting) | **Get** /v3/tracking_settings/open | Get Open Tracking Settings + + + +## ListOpenTrackingSetting + +> ListOpenTrackingSetting200Response ListOpenTrackingSetting(ctx, optional) + +Get Open Tracking Settings + +**This endpoint allows you to retrieve your current settings for open tracking.** Open Tracking adds an invisible image at the end of the email which can track email opens. If the email recipient has images enabled on their email client, a request to SendGrid’s server for the invisible image is executed and an open event is logged. These events are logged in the Statistics portal, Email Activity interface, and are reported by the Event Webhook. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListOpenTrackingSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListOpenTrackingSetting200Response**](ListOpenTrackingSetting200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/tracking_settings/docs/ListOpenTrackingSetting200Response.md b/rest/api/v3/tracking_settings/docs/ListOpenTrackingSetting200Response.md new file mode 100644 index 00000000..3a4a7db5 --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/ListOpenTrackingSetting200Response.md @@ -0,0 +1,11 @@ +# ListOpenTrackingSetting200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates if open tracking is enabled. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/tracking_settings/docs/ListSubscriptionTrackingSetting.md b/rest/api/v3/tracking_settings/docs/ListSubscriptionTrackingSetting.md new file mode 100644 index 00000000..12d9be73 --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/ListSubscriptionTrackingSetting.md @@ -0,0 +1,48 @@ +# ListSubscriptionTrackingSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListSubscriptionTrackingSetting**](ListSubscriptionTrackingSetting.md#ListSubscriptionTrackingSetting) | **Get** /v3/tracking_settings/subscription | Retrieve Subscription Tracking Settings + + + +## ListSubscriptionTrackingSetting + +> SubscriptionTrackingSettings ListSubscriptionTrackingSetting(ctx, optional) + +Retrieve Subscription Tracking Settings + +**This endpoint allows you to retrieve your current settings for subscription tracking.** Subscription tracking adds links to the bottom of your emails that allows your recipients to subscribe to, or unsubscribe from, your emails. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListSubscriptionTrackingSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**SubscriptionTrackingSettings**](SubscriptionTrackingSettings.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/tracking_settings/docs/ListTrackingSetting.md b/rest/api/v3/tracking_settings/docs/ListTrackingSetting.md new file mode 100644 index 00000000..24b3b155 --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/ListTrackingSetting.md @@ -0,0 +1,48 @@ +# ListTrackingSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListTrackingSetting**](ListTrackingSetting.md#ListTrackingSetting) | **Get** /v3/tracking_settings | Retrieve Tracking Settings + + + +## ListTrackingSetting + +> ListTrackingSetting200Response ListTrackingSetting(ctx, optional) + +Retrieve Tracking Settings + +**This endpoint allows you to retrieve a list of all tracking settings on your account.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListTrackingSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListTrackingSetting200Response**](ListTrackingSetting200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/tracking_settings/docs/ListTrackingSetting200Response.md b/rest/api/v3/tracking_settings/docs/ListTrackingSetting200Response.md new file mode 100644 index 00000000..9e49cf92 --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/ListTrackingSetting200Response.md @@ -0,0 +1,11 @@ +# ListTrackingSetting200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ListTrackingSetting200ResponseResultInner**](ListTrackingSetting200ResponseResultInner.md) | The list of all tracking settings. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/tracking_settings/docs/ListTrackingSetting200ResponseResultInner.md b/rest/api/v3/tracking_settings/docs/ListTrackingSetting200ResponseResultInner.md new file mode 100644 index 00000000..de2cbab9 --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/ListTrackingSetting200ResponseResultInner.md @@ -0,0 +1,14 @@ +# ListTrackingSetting200ResponseResultInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Name** | **string** | The name of the event being tracked. |[optional] +**Title** | **string** | The title of the tracking setting. |[optional] +**Description** | **string** | A description about the event that is being tracked. |[optional] +**Enabled** | **bool** | Indicates if this tracking setting is currently enabled. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/tracking_settings/docs/SubscriptionTrackingSettings.md b/rest/api/v3/tracking_settings/docs/SubscriptionTrackingSettings.md new file mode 100644 index 00000000..2d7ac4bb --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/SubscriptionTrackingSettings.md @@ -0,0 +1,16 @@ +# SubscriptionTrackingSettings + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates if subscription tracking is enabled. |[optional] +**HtmlContent** | **string** | The information and HTML for your unsubscribe link. |[optional] +**Landing** | **string** | The HTML that will be displayed on the page that your customers will see after clicking unsubscribe, hosted on SendGrid’s server. |[optional] +**PlainContent** | **string** | The information in plain text for your unsubscribe link. You should have the “<% %>” tag in your content, otherwise the user will have no URL for unsubscribing. |[optional] +**Replace** | **string** | Your custom defined replacement tag for your templates. Use this tag to place your unsubscribe content anywhere in your emailtemplate. |[optional] +**Url** | **string** | The URL where you would like your users sent to unsubscribe. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/tracking_settings/docs/UpdateClickTrackingSetting.md b/rest/api/v3/tracking_settings/docs/UpdateClickTrackingSetting.md new file mode 100644 index 00000000..78a5a4e5 --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/UpdateClickTrackingSetting.md @@ -0,0 +1,49 @@ +# UpdateClickTrackingSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateClickTrackingSetting**](UpdateClickTrackingSetting.md#UpdateClickTrackingSetting) | **Patch** /v3/tracking_settings/click | Update Click Tracking Settings + + + +## UpdateClickTrackingSetting + +> ClickTracking UpdateClickTrackingSetting(ctx, optional) + +Update Click Tracking Settings + +**This endpoint allows you to enable or disable your current click tracking setting.** Click Tracking overrides all the links and URLs in your emails and points them to either SendGrid’s servers or the domain with which you branded your link. When a customer clicks a link, SendGrid tracks those [clicks](https://sendgrid.com/docs/glossary/clicks/). Click tracking helps you understand how users are engaging with your communications. SendGrid can track up to 1000 links per email + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateClickTrackingSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateClickTrackingSettingRequest** | [**UpdateClickTrackingSettingRequest**](UpdateClickTrackingSettingRequest.md) | + +### Return type + +[**ClickTracking**](ClickTracking.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/tracking_settings/docs/UpdateClickTrackingSettingRequest.md b/rest/api/v3/tracking_settings/docs/UpdateClickTrackingSettingRequest.md new file mode 100644 index 00000000..61b2c708 --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/UpdateClickTrackingSettingRequest.md @@ -0,0 +1,11 @@ +# UpdateClickTrackingSettingRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | The setting you want to use for click tracking. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/tracking_settings/docs/UpdateGoogleAnalyticsTrackingSetting.md b/rest/api/v3/tracking_settings/docs/UpdateGoogleAnalyticsTrackingSetting.md new file mode 100644 index 00000000..d3310250 --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/UpdateGoogleAnalyticsTrackingSetting.md @@ -0,0 +1,49 @@ +# UpdateGoogleAnalyticsTrackingSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateGoogleAnalyticsTrackingSetting**](UpdateGoogleAnalyticsTrackingSetting.md#UpdateGoogleAnalyticsTrackingSetting) | **Patch** /v3/tracking_settings/google_analytics | Update Google Analytics Settings + + + +## UpdateGoogleAnalyticsTrackingSetting + +> GoogleAnalyticsSettings UpdateGoogleAnalyticsTrackingSetting(ctx, optional) + +Update Google Analytics Settings + +**This endpoint allows you to update your current setting for Google Analytics.** Google Analytics helps you understand how users got to your site and what they're doing there. For more information about using Google Analytics, please refer to [Google’s URL Builder](https://support.google.com/analytics/answer/1033867?hl=en) and their article on [\"Best Practices for Campaign Building\"](https://support.google.com/analytics/answer/1037445). We default the settings to Google’s recommendations. For more information, see [Google Analytics Demystified](https://sendgrid.com/docs/ui/analytics-and-reporting/google-analytics/). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateGoogleAnalyticsTrackingSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**GoogleAnalyticsSettings** | [**GoogleAnalyticsSettings**](GoogleAnalyticsSettings.md) | + +### Return type + +[**GoogleAnalyticsSettings**](GoogleAnalyticsSettings.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/tracking_settings/docs/UpdateOpenTrackingSetting.md b/rest/api/v3/tracking_settings/docs/UpdateOpenTrackingSetting.md new file mode 100644 index 00000000..8e05d80f --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/UpdateOpenTrackingSetting.md @@ -0,0 +1,49 @@ +# UpdateOpenTrackingSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateOpenTrackingSetting**](UpdateOpenTrackingSetting.md#UpdateOpenTrackingSetting) | **Patch** /v3/tracking_settings/open | Update Open Tracking Settings + + + +## UpdateOpenTrackingSetting + +> ListOpenTrackingSetting200Response UpdateOpenTrackingSetting(ctx, optional) + +Update Open Tracking Settings + +**This endpoint allows you to update your current settings for open tracking.** Open Tracking adds an invisible image at the end of the email which can track email opens. If the email recipient has images enabled on their email client, a request to SendGrid’s server for the invisible image is executed and an open event is logged. These events are logged in the Statistics portal, Email Activity interface, and are reported by the Event Webhook. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateOpenTrackingSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateOpenTrackingSettingRequest** | [**UpdateOpenTrackingSettingRequest**](UpdateOpenTrackingSettingRequest.md) | + +### Return type + +[**ListOpenTrackingSetting200Response**](ListOpenTrackingSetting200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/tracking_settings/docs/UpdateOpenTrackingSettingRequest.md b/rest/api/v3/tracking_settings/docs/UpdateOpenTrackingSettingRequest.md new file mode 100644 index 00000000..0b5d7d38 --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/UpdateOpenTrackingSettingRequest.md @@ -0,0 +1,11 @@ +# UpdateOpenTrackingSettingRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | The new status that you want to set for open tracking. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/tracking_settings/docs/UpdateSubscriptionTrackingSetting.md b/rest/api/v3/tracking_settings/docs/UpdateSubscriptionTrackingSetting.md new file mode 100644 index 00000000..627a0d9f --- /dev/null +++ b/rest/api/v3/tracking_settings/docs/UpdateSubscriptionTrackingSetting.md @@ -0,0 +1,49 @@ +# UpdateSubscriptionTrackingSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSubscriptionTrackingSetting**](UpdateSubscriptionTrackingSetting.md#UpdateSubscriptionTrackingSetting) | **Patch** /v3/tracking_settings/subscription | Update Subscription Tracking Settings + + + +## UpdateSubscriptionTrackingSetting + +> SubscriptionTrackingSettings UpdateSubscriptionTrackingSetting(ctx, optional) + +Update Subscription Tracking Settings + +**This endpoint allows you to update your current settings for subscription tracking.** Subscription tracking adds links to the bottom of your emails that allows your recipients to subscribe to, or unsubscribe from, your emails. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSubscriptionTrackingSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**SubscriptionTrackingSettings** | [**SubscriptionTrackingSettings**](SubscriptionTrackingSettings.md) | + +### Return type + +[**SubscriptionTrackingSettings**](SubscriptionTrackingSettings.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/tracking_settings/model_click_tracking.go b/rest/api/v3/tracking_settings/model_click_tracking.go new file mode 100644 index 00000000..6f9e6da9 --- /dev/null +++ b/rest/api/v3/tracking_settings/model_click_tracking.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ClickTracking struct for ClickTracking +type ClickTracking struct { + // Indicates if click tracking is enabled for plain text emails. + EnableText bool `json:"enable_text"` + // Indicates if click tracking is enabled or disabled. + Enabled bool `json:"enabled"` +} diff --git a/rest/api/v3/tracking_settings/model_google_analytics_settings.go b/rest/api/v3/tracking_settings/model_google_analytics_settings.go new file mode 100644 index 00000000..26e187e8 --- /dev/null +++ b/rest/api/v3/tracking_settings/model_google_analytics_settings.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GoogleAnalyticsSettings struct for GoogleAnalyticsSettings +type GoogleAnalyticsSettings struct { + // Indicates if Google Analytics is enabled. + Enabled *bool `json:"enabled,omitempty"` + // The name of the campaign. + UtmCampaign *string `json:"utm_campaign,omitempty"` + // Used to differentiate ads + UtmContent *string `json:"utm_content,omitempty"` + // Name of the marketing medium (e.g. \"Email\"). + UtmMedium *string `json:"utm_medium,omitempty"` + // Name of the referrer source. + UtmSource *string `json:"utm_source,omitempty"` + // Any paid keywords. + UtmTerm *string `json:"utm_term,omitempty"` +} diff --git a/rest/api/v3/tracking_settings/model_list_open_tracking_setting_200_response.go b/rest/api/v3/tracking_settings/model_list_open_tracking_setting_200_response.go new file mode 100644 index 00000000..84973abc --- /dev/null +++ b/rest/api/v3/tracking_settings/model_list_open_tracking_setting_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListOpenTrackingSetting200Response struct for ListOpenTrackingSetting200Response +type ListOpenTrackingSetting200Response struct { + // Indicates if open tracking is enabled. + Enabled bool `json:"enabled"` +} diff --git a/rest/api/v3/tracking_settings/model_list_tracking_setting_200_response.go b/rest/api/v3/tracking_settings/model_list_tracking_setting_200_response.go new file mode 100644 index 00000000..92bad2b6 --- /dev/null +++ b/rest/api/v3/tracking_settings/model_list_tracking_setting_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListTrackingSetting200Response struct for ListTrackingSetting200Response +type ListTrackingSetting200Response struct { + // The list of all tracking settings. + Result *[]ListTrackingSetting200ResponseResultInner `json:"result,omitempty"` +} diff --git a/rest/api/v3/tracking_settings/model_list_tracking_setting_200_response_result_inner.go b/rest/api/v3/tracking_settings/model_list_tracking_setting_200_response_result_inner.go new file mode 100644 index 00000000..849d497a --- /dev/null +++ b/rest/api/v3/tracking_settings/model_list_tracking_setting_200_response_result_inner.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListTrackingSetting200ResponseResultInner struct for ListTrackingSetting200ResponseResultInner +type ListTrackingSetting200ResponseResultInner struct { + // The name of the event being tracked. + Name *string `json:"name,omitempty"` + // The title of the tracking setting. + Title *string `json:"title,omitempty"` + // A description about the event that is being tracked. + Description *string `json:"description,omitempty"` + // Indicates if this tracking setting is currently enabled. + Enabled *bool `json:"enabled,omitempty"` +} diff --git a/rest/api/v3/tracking_settings/model_subscription_tracking_settings.go b/rest/api/v3/tracking_settings/model_subscription_tracking_settings.go new file mode 100644 index 00000000..ba674b35 --- /dev/null +++ b/rest/api/v3/tracking_settings/model_subscription_tracking_settings.go @@ -0,0 +1,30 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// SubscriptionTrackingSettings struct for SubscriptionTrackingSettings +type SubscriptionTrackingSettings struct { + // Indicates if subscription tracking is enabled. + Enabled *bool `json:"enabled,omitempty"` + // The information and HTML for your unsubscribe link. + HtmlContent *string `json:"html_content,omitempty"` + // The HTML that will be displayed on the page that your customers will see after clicking unsubscribe, hosted on SendGrid’s server. + Landing *string `json:"landing,omitempty"` + // The information in plain text for your unsubscribe link. You should have the “<% %>” tag in your content, otherwise the user will have no URL for unsubscribing. + PlainContent *string `json:"plain_content,omitempty"` + // Your custom defined replacement tag for your templates. Use this tag to place your unsubscribe content anywhere in your emailtemplate. + Replace *string `json:"replace,omitempty"` + // The URL where you would like your users sent to unsubscribe. + Url *string `json:"url,omitempty"` +} diff --git a/rest/api/v3/tracking_settings/model_update_click_tracking_setting_request.go b/rest/api/v3/tracking_settings/model_update_click_tracking_setting_request.go new file mode 100644 index 00000000..b94df6e7 --- /dev/null +++ b/rest/api/v3/tracking_settings/model_update_click_tracking_setting_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateClickTrackingSettingRequest struct for UpdateClickTrackingSettingRequest +type UpdateClickTrackingSettingRequest struct { + // The setting you want to use for click tracking. + Enabled *bool `json:"enabled,omitempty"` +} diff --git a/rest/api/v3/tracking_settings/model_update_open_tracking_setting_request.go b/rest/api/v3/tracking_settings/model_update_open_tracking_setting_request.go new file mode 100644 index 00000000..b1c1b301 --- /dev/null +++ b/rest/api/v3/tracking_settings/model_update_open_tracking_setting_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Tracking Settings API +* The Twilio SendGrid Tracking Settings API allows you to configure which tracking settings are enabled for your messages. You can track many of your recipients' interactions with your emails, including which emails they open, which links they click, and when they subscribe to or unsubscribe from your emails. See [**Tracking Settings**](https://docs.sendgrid.com/ui/account-and-settings/tracking) for more information. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateOpenTrackingSettingRequest struct for UpdateOpenTrackingSettingRequest +type UpdateOpenTrackingSettingRequest struct { + // The new status that you want to set for open tracking. + Enabled *bool `json:"enabled,omitempty"` +} diff --git a/rest/api/v3/user/README.md b/rest/api/v3/user/README.md new file mode 100644 index 00000000..c97dd8f9 --- /dev/null +++ b/rest/api/v3/user/README.md @@ -0,0 +1,83 @@ +# Go API client for + +The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. + +See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:02.512612+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*ListAccount* | [**ListAccount**](docs/ListAccount.md#listaccount) | **Get** /v3/user/account | Get a user's account information. +*ListCredit* | [**ListCredit**](docs/ListCredit.md#listcredit) | **Get** /v3/user/credits | Retrieve your credit balance +*ListEmail* | [**ListEmail**](docs/ListEmail.md#listemail) | **Get** /v3/user/email | Retrieve your account email address +*ListProfile* | [**ListProfile**](docs/ListProfile.md#listprofile) | **Get** /v3/user/profile | Get a user's profile +*ListUsername* | [**ListUsername**](docs/ListUsername.md#listusername) | **Get** /v3/user/username | Retrieve your username +*UpdateEmail* | [**UpdateEmail**](docs/UpdateEmail.md#updateemail) | **Put** /v3/user/email | Update your account email address +*UpdatePassword* | [**UpdatePassword**](docs/UpdatePassword.md#updatepassword) | **Put** /v3/user/password | Update your password +*UpdateProfile* | [**UpdateProfile**](docs/UpdateProfile.md#updateprofile) | **Patch** /v3/user/profile | Update a user's profile +*UpdateUsername* | [**UpdateUsername**](docs/UpdateUsername.md#updateusername) | **Put** /v3/user/username | Update your username + + +## Documentation For Models + + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [GETUserAccountResponse](GETUserAccountResponse.md) + - [GETUserProfileResponse](GETUserProfileResponse.md) + - [ListCredit200Response](ListCredit200Response.md) + - [ListEmail200Response](ListEmail200Response.md) + - [ListUsername200Response](ListUsername200Response.md) + - [Type](Type.md) + - [UpdateEmail200Response](UpdateEmail200Response.md) + - [UpdateEmailRequest](UpdateEmailRequest.md) + - [UpdatePasswordRequest](UpdatePasswordRequest.md) + - [UpdateUsername200Response](UpdateUsername200Response.md) + - [UpdateUsernameRequest](UpdateUsernameRequest.md) + - [UserProfile](UserProfile.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/user/api_list_account.go b/rest/api/v3/user/api_list_account.go new file mode 100644 index 00000000..42434726 --- /dev/null +++ b/rest/api/v3/user/api_list_account.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListAccountParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListAccountParam) SetOnbehalfof(Onbehalfof string) *ListAccountParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve your user account details.** Your user's account information includes the user's account type and reputation. +func (c *ApiService) ListAccount(params *ListAccountParam) (interface{}, error) { + path := "/v3/user/account" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GETUserAccountResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/user/api_list_credit.go b/rest/api/v3/user/api_list_credit.go new file mode 100644 index 00000000..7e9d122b --- /dev/null +++ b/rest/api/v3/user/api_list_credit.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListCreditParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListCreditParam) SetOnbehalfof(Onbehalfof string) *ListCreditParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve the current credit balance for your account.** Each account has a credit balance, which is a base number of emails it can send before receiving per-email charges. For more information about credits and billing, see [Billing and Plan details information](https://sendgrid.com/docs/ui/account-and-settings/billing/). +func (c *ApiService) ListCredit(params *ListCreditParam) (interface{}, error) { + path := "/v3/user/credits" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListCredit200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/user/api_list_email.go b/rest/api/v3/user/api_list_email.go new file mode 100644 index 00000000..a1f5ef16 --- /dev/null +++ b/rest/api/v3/user/api_list_email.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListEmailParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListEmailParam) SetOnbehalfof(Onbehalfof string) *ListEmailParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve the email address currently on file for your account.** +func (c *ApiService) ListEmail(params *ListEmailParam) (interface{}, error) { + path := "/v3/user/email" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListEmail200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/user/api_list_profile.go b/rest/api/v3/user/api_list_profile.go new file mode 100644 index 00000000..a63187f2 --- /dev/null +++ b/rest/api/v3/user/api_list_profile.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListProfileParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListProfileParam) SetOnbehalfof(Onbehalfof string) *ListProfileParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve your current profile details.** +func (c *ApiService) ListProfile(params *ListProfileParam) (interface{}, error) { + path := "/v3/user/profile" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GETUserProfileResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/user/api_list_username.go b/rest/api/v3/user/api_list_username.go new file mode 100644 index 00000000..7b375167 --- /dev/null +++ b/rest/api/v3/user/api_list_username.go @@ -0,0 +1,59 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListUsernameParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListUsernameParam) SetOnbehalfof(Onbehalfof string) *ListUsernameParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve your current account username.** +func (c *ApiService) ListUsername(params *ListUsernameParam) (interface{}, error) { + path := "/v3/user/username" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListUsername200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/user/api_service.go b/rest/api/v3/user/api_service.go new file mode 100644 index 00000000..67bbc6b4 --- /dev/null +++ b/rest/api/v3/user/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/user/api_update_email.go b/rest/api/v3/user/api_update_email.go new file mode 100644 index 00000000..6a2f6867 --- /dev/null +++ b/rest/api/v3/user/api_update_email.go @@ -0,0 +1,74 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type UpdateEmailParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateEmailRequest *UpdateEmailRequest `json:"UpdateEmailRequest,omitempty"` +} + +func (params *UpdateEmailParam) SetOnbehalfof(Onbehalfof string) *UpdateEmailParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateEmailParam) SetUpdateEmailRequest(UpdateEmailRequest UpdateEmailRequest) *UpdateEmailParam { + params.UpdateEmailRequest = &UpdateEmailRequest + return params +} + +// **This endpoint allows you to update the email address currently on file for your account.** +func (c *ApiService) UpdateEmail(params *UpdateEmailParam) (interface{}, error) { + path := "/v3/user/email" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateEmailRequest != nil { + b, err := json.Marshal(*params.UpdateEmailRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &UpdateEmail200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/user/api_update_password.go b/rest/api/v3/user/api_update_password.go new file mode 100644 index 00000000..bb22ffae --- /dev/null +++ b/rest/api/v3/user/api_update_password.go @@ -0,0 +1,74 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type UpdatePasswordParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdatePasswordRequest *UpdatePasswordRequest `json:"UpdatePasswordRequest,omitempty"` +} + +func (params *UpdatePasswordParam) SetOnbehalfof(Onbehalfof string) *UpdatePasswordParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdatePasswordParam) SetUpdatePasswordRequest(UpdatePasswordRequest UpdatePasswordRequest) *UpdatePasswordParam { + params.UpdatePasswordRequest = &UpdatePasswordRequest + return params +} + +// **This endpoint allows you to update your password.** +func (c *ApiService) UpdatePassword(params *UpdatePasswordParam) (interface{}, error) { + path := "/v3/user/password" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdatePasswordRequest != nil { + b, err := json.Marshal(*params.UpdatePasswordRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/user/api_update_profile.go b/rest/api/v3/user/api_update_profile.go new file mode 100644 index 00000000..834287f3 --- /dev/null +++ b/rest/api/v3/user/api_update_profile.go @@ -0,0 +1,82 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type UpdateProfileParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UserProfile *UserProfile `json:"UserProfile,omitempty"` +} + +func (params *UpdateProfileParam) SetOnbehalfof(Onbehalfof string) *UpdateProfileParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateProfileParam) SetUserProfile(UserProfile UserProfile) *UpdateProfileParam { + params.UserProfile = &UserProfile + return params +} + +// **This endpoint allows you to update your current profile details.** Any one or more of the parameters can be updated via the PATCH `/user/profile` endpoint. You must include at least one when you PATCH. +func (c *ApiService) UpdateProfile(params *UpdateProfileParam) (interface{}, error) { + path := "/v3/user/profile" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UserProfile != nil { + b, err := json.Marshal(*params.UserProfile) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &UserProfile{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/user/api_update_username.go b/rest/api/v3/user/api_update_username.go new file mode 100644 index 00000000..61335518 --- /dev/null +++ b/rest/api/v3/user/api_update_username.go @@ -0,0 +1,74 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type UpdateUsernameParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateUsernameRequest *UpdateUsernameRequest `json:"UpdateUsernameRequest,omitempty"` +} + +func (params *UpdateUsernameParam) SetOnbehalfof(Onbehalfof string) *UpdateUsernameParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateUsernameParam) SetUpdateUsernameRequest(UpdateUsernameRequest UpdateUsernameRequest) *UpdateUsernameParam { + params.UpdateUsernameRequest = &UpdateUsernameRequest + return params +} + +// **This endpoint allows you to update the username for your account.** +func (c *ApiService) UpdateUsername(params *UpdateUsernameParam) (interface{}, error) { + path := "/v3/user/username" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateUsernameRequest != nil { + b, err := json.Marshal(*params.UpdateUsernameRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Put(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &UpdateUsername200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/user/docs/ErrorResponse.md b/rest/api/v3/user/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/user/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/user/docs/ErrorResponseErrorsInner.md b/rest/api/v3/user/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/user/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/user/docs/GETUserAccountResponse.md b/rest/api/v3/user/docs/GETUserAccountResponse.md new file mode 100644 index 00000000..3c2144b8 --- /dev/null +++ b/rest/api/v3/user/docs/GETUserAccountResponse.md @@ -0,0 +1,12 @@ +# GETUserAccountResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Type** | [**Type**](Type.md) | The type of account for this user. | +**Reputation** | **float32** | The sender reputation for this user. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/user/docs/GETUserProfileResponse.md b/rest/api/v3/user/docs/GETUserProfileResponse.md new file mode 100644 index 00000000..37a24d1d --- /dev/null +++ b/rest/api/v3/user/docs/GETUserProfileResponse.md @@ -0,0 +1,21 @@ +# GETUserProfileResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Address** | **string** | The user's address. | +**Address2** | **string** | The second line of the user's address. |[optional] +**City** | **string** | The user's city. | +**Company** | **string** | The name of the user's company. | +**Country** | **string** | The user's country. | +**FirstName** | **string** | The user's first name. | +**LastName** | **string** | The user's last name. | +**Phone** | **string** | The user's phone number. | +**State** | **string** | The user's state. | +**Website** | **string** | The user's website URL. | +**Zip** | **string** | The user's zip code. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/user/docs/ListAccount.md b/rest/api/v3/user/docs/ListAccount.md new file mode 100644 index 00000000..ca5f15ad --- /dev/null +++ b/rest/api/v3/user/docs/ListAccount.md @@ -0,0 +1,48 @@ +# ListAccount + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListAccount**](ListAccount.md#ListAccount) | **Get** /v3/user/account | Get a user's account information. + + + +## ListAccount + +> GETUserAccountResponse ListAccount(ctx, optional) + +Get a user's account information. + +**This endpoint allows you to retrieve your user account details.** Your user's account information includes the user's account type and reputation. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListAccountParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**GETUserAccountResponse**](GETUserAccountResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/user/docs/ListCredit.md b/rest/api/v3/user/docs/ListCredit.md new file mode 100644 index 00000000..48078ae9 --- /dev/null +++ b/rest/api/v3/user/docs/ListCredit.md @@ -0,0 +1,48 @@ +# ListCredit + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListCredit**](ListCredit.md#ListCredit) | **Get** /v3/user/credits | Retrieve your credit balance + + + +## ListCredit + +> ListCredit200Response ListCredit(ctx, optional) + +Retrieve your credit balance + +**This endpoint allows you to retrieve the current credit balance for your account.** Each account has a credit balance, which is a base number of emails it can send before receiving per-email charges. For more information about credits and billing, see [Billing and Plan details information](https://sendgrid.com/docs/ui/account-and-settings/billing/). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListCreditParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListCredit200Response**](ListCredit200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/user/docs/ListCredit200Response.md b/rest/api/v3/user/docs/ListCredit200Response.md new file mode 100644 index 00000000..9a650e21 --- /dev/null +++ b/rest/api/v3/user/docs/ListCredit200Response.md @@ -0,0 +1,17 @@ +# ListCredit200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Remain** | **int32** | The remaining number of credits available on your account. | +**Total** | **int32** | The total number of credits assigned to your account. | +**Overage** | **int32** | The number of overdrawn credits for your account. | +**Used** | **int32** | The number of credits that you have used. | +**LastReset** | **string** | The date that your credit balance was last reset. | +**NextReset** | **string** | The next date that your credit balance will be reset. | +**ResetFrequency** | **string** | The frequency at which your credit balance will be reset. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/user/docs/ListEmail.md b/rest/api/v3/user/docs/ListEmail.md new file mode 100644 index 00000000..aa5614c1 --- /dev/null +++ b/rest/api/v3/user/docs/ListEmail.md @@ -0,0 +1,48 @@ +# ListEmail + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListEmail**](ListEmail.md#ListEmail) | **Get** /v3/user/email | Retrieve your account email address + + + +## ListEmail + +> ListEmail200Response ListEmail(ctx, optional) + +Retrieve your account email address + +**This endpoint allows you to retrieve the email address currently on file for your account.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListEmailParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListEmail200Response**](ListEmail200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/user/docs/ListEmail200Response.md b/rest/api/v3/user/docs/ListEmail200Response.md new file mode 100644 index 00000000..a7387a81 --- /dev/null +++ b/rest/api/v3/user/docs/ListEmail200Response.md @@ -0,0 +1,11 @@ +# ListEmail200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The email address currently on file for your account. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/user/docs/ListProfile.md b/rest/api/v3/user/docs/ListProfile.md new file mode 100644 index 00000000..d41f9b32 --- /dev/null +++ b/rest/api/v3/user/docs/ListProfile.md @@ -0,0 +1,48 @@ +# ListProfile + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListProfile**](ListProfile.md#ListProfile) | **Get** /v3/user/profile | Get a user's profile + + + +## ListProfile + +> GETUserProfileResponse ListProfile(ctx, optional) + +Get a user's profile + +**This endpoint allows you to retrieve your current profile details.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListProfileParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**GETUserProfileResponse**](GETUserProfileResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/user/docs/ListUsername.md b/rest/api/v3/user/docs/ListUsername.md new file mode 100644 index 00000000..e9f91d80 --- /dev/null +++ b/rest/api/v3/user/docs/ListUsername.md @@ -0,0 +1,48 @@ +# ListUsername + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListUsername**](ListUsername.md#ListUsername) | **Get** /v3/user/username | Retrieve your username + + + +## ListUsername + +> ListUsername200Response ListUsername(ctx, optional) + +Retrieve your username + +**This endpoint allows you to retrieve your current account username.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListUsernameParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListUsername200Response**](ListUsername200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/user/docs/ListUsername200Response.md b/rest/api/v3/user/docs/ListUsername200Response.md new file mode 100644 index 00000000..c1d23200 --- /dev/null +++ b/rest/api/v3/user/docs/ListUsername200Response.md @@ -0,0 +1,12 @@ +# ListUsername200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | Your account username. | +**UserId** | **int32** | The user ID for your account. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/user/docs/Type.md b/rest/api/v3/user/docs/Type.md new file mode 100644 index 00000000..7736c70d --- /dev/null +++ b/rest/api/v3/user/docs/Type.md @@ -0,0 +1,13 @@ +# Type + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**FREE** | string | (value: `"free"`) +**PAID** | string | (value: `"paid"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/user/docs/UpdateEmail.md b/rest/api/v3/user/docs/UpdateEmail.md new file mode 100644 index 00000000..aa382b8c --- /dev/null +++ b/rest/api/v3/user/docs/UpdateEmail.md @@ -0,0 +1,49 @@ +# UpdateEmail + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateEmail**](UpdateEmail.md#UpdateEmail) | **Put** /v3/user/email | Update your account email address + + + +## UpdateEmail + +> UpdateEmail200Response UpdateEmail(ctx, optional) + +Update your account email address + +**This endpoint allows you to update the email address currently on file for your account.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateEmailParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateEmailRequest** | [**UpdateEmailRequest**](UpdateEmailRequest.md) | + +### Return type + +[**UpdateEmail200Response**](UpdateEmail200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/user/docs/UpdateEmail200Response.md b/rest/api/v3/user/docs/UpdateEmail200Response.md new file mode 100644 index 00000000..795960c4 --- /dev/null +++ b/rest/api/v3/user/docs/UpdateEmail200Response.md @@ -0,0 +1,11 @@ +# UpdateEmail200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The current email address on file for your account. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/user/docs/UpdateEmailRequest.md b/rest/api/v3/user/docs/UpdateEmailRequest.md new file mode 100644 index 00000000..1cde2463 --- /dev/null +++ b/rest/api/v3/user/docs/UpdateEmailRequest.md @@ -0,0 +1,11 @@ +# UpdateEmailRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Email** | **string** | The new email address that you would like to use for your account. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/user/docs/UpdatePassword.md b/rest/api/v3/user/docs/UpdatePassword.md new file mode 100644 index 00000000..d393707f --- /dev/null +++ b/rest/api/v3/user/docs/UpdatePassword.md @@ -0,0 +1,49 @@ +# UpdatePassword + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdatePassword**](UpdatePassword.md#UpdatePassword) | **Put** /v3/user/password | Update your password + + + +## UpdatePassword + +> map[string]interface{} UpdatePassword(ctx, optional) + +Update your password + +**This endpoint allows you to update your password.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdatePasswordParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdatePasswordRequest** | [**UpdatePasswordRequest**](UpdatePasswordRequest.md) | + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/user/docs/UpdatePasswordRequest.md b/rest/api/v3/user/docs/UpdatePasswordRequest.md new file mode 100644 index 00000000..a1264921 --- /dev/null +++ b/rest/api/v3/user/docs/UpdatePasswordRequest.md @@ -0,0 +1,12 @@ +# UpdatePasswordRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**NewPassword** | **string** | The new password you would like to use for your account. | +**OldPassword** | **string** | The old password for your account. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/user/docs/UpdateProfile.md b/rest/api/v3/user/docs/UpdateProfile.md new file mode 100644 index 00000000..b0dc8f42 --- /dev/null +++ b/rest/api/v3/user/docs/UpdateProfile.md @@ -0,0 +1,49 @@ +# UpdateProfile + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateProfile**](UpdateProfile.md#UpdateProfile) | **Patch** /v3/user/profile | Update a user's profile + + + +## UpdateProfile + +> UserProfile UpdateProfile(ctx, optional) + +Update a user's profile + +**This endpoint allows you to update your current profile details.** Any one or more of the parameters can be updated via the PATCH `/user/profile` endpoint. You must include at least one when you PATCH. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateProfileParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UserProfile** | [**UserProfile**](UserProfile.md) | + +### Return type + +[**UserProfile**](UserProfile.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/user/docs/UpdateUsername.md b/rest/api/v3/user/docs/UpdateUsername.md new file mode 100644 index 00000000..96938ac8 --- /dev/null +++ b/rest/api/v3/user/docs/UpdateUsername.md @@ -0,0 +1,49 @@ +# UpdateUsername + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateUsername**](UpdateUsername.md#UpdateUsername) | **Put** /v3/user/username | Update your username + + + +## UpdateUsername + +> UpdateUsername200Response UpdateUsername(ctx, optional) + +Update your username + +**This endpoint allows you to update the username for your account.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateUsernameParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateUsernameRequest** | [**UpdateUsernameRequest**](UpdateUsernameRequest.md) | + +### Return type + +[**UpdateUsername200Response**](UpdateUsername200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/user/docs/UpdateUsername200Response.md b/rest/api/v3/user/docs/UpdateUsername200Response.md new file mode 100644 index 00000000..07ffae6c --- /dev/null +++ b/rest/api/v3/user/docs/UpdateUsername200Response.md @@ -0,0 +1,11 @@ +# UpdateUsername200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | The current username on file for your account. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/user/docs/UpdateUsernameRequest.md b/rest/api/v3/user/docs/UpdateUsernameRequest.md new file mode 100644 index 00000000..85e3d52f --- /dev/null +++ b/rest/api/v3/user/docs/UpdateUsernameRequest.md @@ -0,0 +1,11 @@ +# UpdateUsernameRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Username** | **string** | The new username you would like to use for your account. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/user/docs/UserProfile.md b/rest/api/v3/user/docs/UserProfile.md new file mode 100644 index 00000000..bd9d571e --- /dev/null +++ b/rest/api/v3/user/docs/UserProfile.md @@ -0,0 +1,21 @@ +# UserProfile + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Address** | **string** | The street address for this user profile. |[optional] +**Address2** | **string** | An optional second line for the street address of this user profile. |[optional] +**City** | **string** | The city for the user profile. |[optional] +**Company** | **string** | That company that this user profile is associated with. |[optional] +**Country** | **string** | Th country of this user profile. |[optional] +**FirstName** | **string** | The first name of the user. |[optional] +**LastName** | **string** | The last name of the user. |[optional] +**Phone** | **string** | The phone number for the user. |[optional] +**State** | **string** | The state for this user. |[optional] +**Website** | **string** | The website associated with this user. |[optional] +**Zip** | **string** | The zip code for this user. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/user/model_error_response.go b/rest/api/v3/user/model_error_response.go new file mode 100644 index 00000000..a7e81b7e --- /dev/null +++ b/rest/api/v3/user/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/user/model_error_response_errors_inner.go b/rest/api/v3/user/model_error_response_errors_inner.go new file mode 100644 index 00000000..623e0242 --- /dev/null +++ b/rest/api/v3/user/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/user/model_get_user_account_response.go b/rest/api/v3/user/model_get_user_account_response.go new file mode 100644 index 00000000..c910dc5f --- /dev/null +++ b/rest/api/v3/user/model_get_user_account_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GETUserAccountResponse struct for GETUserAccountResponse +type GETUserAccountResponse struct { + // The type of account for this user. + Type Type `json:"type"` + // The sender reputation for this user. + Reputation float32 `json:"reputation"` +} diff --git a/rest/api/v3/user/model_get_user_profile_response.go b/rest/api/v3/user/model_get_user_profile_response.go new file mode 100644 index 00000000..ab9bc7d3 --- /dev/null +++ b/rest/api/v3/user/model_get_user_profile_response.go @@ -0,0 +1,40 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GETUserProfileResponse struct for GETUserProfileResponse +type GETUserProfileResponse struct { + // The user's address. + Address string `json:"address"` + // The second line of the user's address. + Address2 *string `json:"address2,omitempty"` + // The user's city. + City string `json:"city"` + // The name of the user's company. + Company string `json:"company"` + // The user's country. + Country string `json:"country"` + // The user's first name. + FirstName string `json:"first_name"` + // The user's last name. + LastName string `json:"last_name"` + // The user's phone number. + Phone string `json:"phone"` + // The user's state. + State string `json:"state"` + // The user's website URL. + Website string `json:"website"` + // The user's zip code. + Zip string `json:"zip"` +} diff --git a/rest/api/v3/user/model_list_credit_200_response.go b/rest/api/v3/user/model_list_credit_200_response.go new file mode 100644 index 00000000..515d6d5d --- /dev/null +++ b/rest/api/v3/user/model_list_credit_200_response.go @@ -0,0 +1,32 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListCredit200Response struct for ListCredit200Response +type ListCredit200Response struct { + // The remaining number of credits available on your account. + Remain int32 `json:"remain"` + // The total number of credits assigned to your account. + Total int32 `json:"total"` + // The number of overdrawn credits for your account. + Overage int32 `json:"overage"` + // The number of credits that you have used. + Used int32 `json:"used"` + // The date that your credit balance was last reset. + LastReset string `json:"last_reset"` + // The next date that your credit balance will be reset. + NextReset string `json:"next_reset"` + // The frequency at which your credit balance will be reset. + ResetFrequency string `json:"reset_frequency"` +} diff --git a/rest/api/v3/user/model_list_email_200_response.go b/rest/api/v3/user/model_list_email_200_response.go new file mode 100644 index 00000000..d1b39a6e --- /dev/null +++ b/rest/api/v3/user/model_list_email_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListEmail200Response struct for ListEmail200Response +type ListEmail200Response struct { + // The email address currently on file for your account. + Email string `json:"email"` +} diff --git a/rest/api/v3/user/model_list_username_200_response.go b/rest/api/v3/user/model_list_username_200_response.go new file mode 100644 index 00000000..b024b8c7 --- /dev/null +++ b/rest/api/v3/user/model_list_username_200_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListUsername200Response struct for ListUsername200Response +type ListUsername200Response struct { + // Your account username. + Username string `json:"username"` + // The user ID for your account. + UserId int32 `json:"user_id"` +} diff --git a/rest/api/v3/user/model_type.go b/rest/api/v3/user/model_type.go new file mode 100644 index 00000000..aa8dbdd4 --- /dev/null +++ b/rest/api/v3/user/model_type.go @@ -0,0 +1,23 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// Type the model 'Type' +type Type string + +// List of Type +const ( + TYPE_FREE Type = "free" + TYPE_PAID Type = "paid" +) diff --git a/rest/api/v3/user/model_update_email_200_response.go b/rest/api/v3/user/model_update_email_200_response.go new file mode 100644 index 00000000..12777e4f --- /dev/null +++ b/rest/api/v3/user/model_update_email_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateEmail200Response struct for UpdateEmail200Response +type UpdateEmail200Response struct { + // The current email address on file for your account. + Email string `json:"email"` +} diff --git a/rest/api/v3/user/model_update_email_request.go b/rest/api/v3/user/model_update_email_request.go new file mode 100644 index 00000000..b6d70118 --- /dev/null +++ b/rest/api/v3/user/model_update_email_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateEmailRequest struct for UpdateEmailRequest +type UpdateEmailRequest struct { + // The new email address that you would like to use for your account. + Email *string `json:"email,omitempty"` +} diff --git a/rest/api/v3/user/model_update_password_request.go b/rest/api/v3/user/model_update_password_request.go new file mode 100644 index 00000000..ed046469 --- /dev/null +++ b/rest/api/v3/user/model_update_password_request.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdatePasswordRequest struct for UpdatePasswordRequest +type UpdatePasswordRequest struct { + // The new password you would like to use for your account. + NewPassword string `json:"new_password"` + // The old password for your account. + OldPassword string `json:"old_password"` +} diff --git a/rest/api/v3/user/model_update_username_200_response.go b/rest/api/v3/user/model_update_username_200_response.go new file mode 100644 index 00000000..455a234c --- /dev/null +++ b/rest/api/v3/user/model_update_username_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateUsername200Response struct for UpdateUsername200Response +type UpdateUsername200Response struct { + // The current username on file for your account. + Username string `json:"username"` +} diff --git a/rest/api/v3/user/model_update_username_request.go b/rest/api/v3/user/model_update_username_request.go new file mode 100644 index 00000000..ec922edc --- /dev/null +++ b/rest/api/v3/user/model_update_username_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateUsernameRequest struct for UpdateUsernameRequest +type UpdateUsernameRequest struct { + // The new username you would like to use for your account. + Username *string `json:"username,omitempty"` +} diff --git a/rest/api/v3/user/model_user_profile.go b/rest/api/v3/user/model_user_profile.go new file mode 100644 index 00000000..9d9ffcf4 --- /dev/null +++ b/rest/api/v3/user/model_user_profile.go @@ -0,0 +1,40 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid User API +* The Twilio SendGrid User API allows you to modify the settings of a SendGrid user account such as the user's email address or username. Keeping your user profile up to date helps SendGrid verify who you are and share important communications with you. See [**Account Details**](https://docs.sendgrid.com/ui/account-and-settings/account) for more information. You can also manage your user settings in the [SendGrid application user interface](https://app.sendgrid.com/account/details). +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UserProfile struct for UserProfile +type UserProfile struct { + // The street address for this user profile. + Address *string `json:"address,omitempty"` + // An optional second line for the street address of this user profile. + Address2 *string `json:"address2,omitempty"` + // The city for the user profile. + City *string `json:"city,omitempty"` + // That company that this user profile is associated with. + Company *string `json:"company,omitempty"` + // Th country of this user profile. + Country *string `json:"country,omitempty"` + // The first name of the user. + FirstName *string `json:"first_name,omitempty"` + // The last name of the user. + LastName *string `json:"last_name,omitempty"` + // The phone number for the user. + Phone *string `json:"phone,omitempty"` + // The state for this user. + State *string `json:"state,omitempty"` + // The website associated with this user. + Website *string `json:"website,omitempty"` + // The zip code for this user. + Zip *string `json:"zip,omitempty"` +} diff --git a/rest/api/v3/verified_senders/README.md b/rest/api/v3/verified_senders/README.md new file mode 100644 index 00000000..f2f60a3e --- /dev/null +++ b/rest/api/v3/verified_senders/README.md @@ -0,0 +1,84 @@ +# Go API client for + +The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. + +You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. + +This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:02.559197+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateVerifiedSender* | [**CreateVerifiedSender**](docs/CreateVerifiedSender.md#createverifiedsender) | **Post** /v3/verified_senders | Create Verified Sender Request +*DeleteVerifiedSender* | [**DeleteVerifiedSender**](docs/DeleteVerifiedSender.md#deleteverifiedsender) | **Delete** /v3/verified_senders/{Id} | Delete Verified Sender +*ListVerifiedSender* | [**ListVerifiedSender**](docs/ListVerifiedSender.md#listverifiedsender) | **Get** /v3/verified_senders | Get All Verified Senders +*ListVerifiedSenderDomain* | [**ListVerifiedSenderDomain**](docs/ListVerifiedSenderDomain.md#listverifiedsenderdomain) | **Get** /v3/verified_senders/domains | Domain Warn List +*ListVerifiedSenderStepsCompleted* | [**ListVerifiedSenderStepsCompleted**](docs/ListVerifiedSenderStepsCompleted.md#listverifiedsenderstepscompleted) | **Get** /v3/verified_senders/steps_completed | Completed Steps +*ResendVerifiedSender* | [**ResendVerifiedSender**](docs/ResendVerifiedSender.md#resendverifiedsender) | **Post** /v3/verified_senders/resend/{Id} | Resend Verified Sender Request +*UpdateVerifiedSender* | [**UpdateVerifiedSender**](docs/UpdateVerifiedSender.md#updateverifiedsender) | **Patch** /v3/verified_senders/{Id} | Edit Verified Sender +*VerifySenderToken* | [**VerifySenderToken**](docs/VerifySenderToken.md#verifysendertoken) | **Get** /v3/verified_senders/verify/{Token} | Verify Sender Request + + +## Documentation For Models + + - [CreateVerifiedSender400Response](CreateVerifiedSender400Response.md) + - [CreateVerifiedSender400ResponseErrorsInner](CreateVerifiedSender400ResponseErrorsInner.md) + - [DeleteVerifiedSender403Response](DeleteVerifiedSender403Response.md) + - [DeleteVerifiedSender403ResponseErrorsInner](DeleteVerifiedSender403ResponseErrorsInner.md) + - [DeleteVerifiedSender404Response](DeleteVerifiedSender404Response.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [ListVerifiedSender200Response](ListVerifiedSender200Response.md) + - [ListVerifiedSenderDomain200Response](ListVerifiedSenderDomain200Response.md) + - [ListVerifiedSenderDomain200ResponseResults](ListVerifiedSenderDomain200ResponseResults.md) + - [ListVerifiedSenderStepsCompleted200Response](ListVerifiedSenderStepsCompleted200Response.md) + - [ListVerifiedSenderStepsCompleted200ResponseResults](ListVerifiedSenderStepsCompleted200ResponseResults.md) + - [VerifiedSenderRequest](VerifiedSenderRequest.md) + - [VerifiedSenderResponse](VerifiedSenderResponse.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/verified_senders/api_create_verified_sender.go b/rest/api/v3/verified_senders/api_create_verified_sender.go new file mode 100644 index 00000000..f2443d7b --- /dev/null +++ b/rest/api/v3/verified_senders/api_create_verified_sender.go @@ -0,0 +1,97 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateVerifiedSenderParam struct { + // + VerifiedSenderRequest *VerifiedSenderRequest `json:"VerifiedSenderRequest,omitempty"` +} + +func (params *CreateVerifiedSenderParam) SetVerifiedSenderRequest(VerifiedSenderRequest VerifiedSenderRequest) *CreateVerifiedSenderParam { + params.VerifiedSenderRequest = &VerifiedSenderRequest + return params +} + +// **This endpoint allows you to create a new Sender Identify**. Upon successful submission of a `POST` request to this endpoint, an identity will be created, and a verification email will be sent to the address assigned to the `from_email` field. You must complete the verification process using the sent email to fully verify the sender. If you need to resend the verification email, you can do so with the Resend Verified Sender Request, `/resend/{id}`, endpoint. If you need to authenticate a domain rather than a Single Sender, see the [Domain Authentication API](https://docs.sendgrid.com/api-reference/domain-authentication/authenticate-a-domain). +func (c *ApiService) CreateVerifiedSender(params *CreateVerifiedSenderParam) (interface{}, error) { + path := "/v3/verified_senders" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.VerifiedSenderRequest != nil { + b, err := json.Marshal(*params.VerifiedSenderRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &VerifiedSenderResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &CreateVerifiedSender400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/verified_senders/api_delete_verified_sender.go b/rest/api/v3/verified_senders/api_delete_verified_sender.go new file mode 100644 index 00000000..bf97081c --- /dev/null +++ b/rest/api/v3/verified_senders/api_delete_verified_sender.go @@ -0,0 +1,85 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteVerifiedSenderParam struct { + // + Id *string `json:"id"` +} + +func (params *DeleteVerifiedSenderParam) SetId(Id string) *DeleteVerifiedSenderParam { + params.Id = &Id + return params +} + +// **This endpoint allows you to delete a Sender Identity**. Pass the `id` assigned to a Sender Identity to this endpoint to delete the Sender Identity from your account. You can retrieve the IDs associated with Sender Identities using the \"Get All Verified Senders\" endpoint. +func (c *ApiService) DeleteVerifiedSender(params *DeleteVerifiedSenderParam) (interface{}, error) { + path := "/v3/verified_senders/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &DeleteVerifiedSender403Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &DeleteVerifiedSender404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/verified_senders/api_list_verified_sender.go b/rest/api/v3/verified_senders/api_list_verified_sender.go new file mode 100644 index 00000000..e7b8ab0e --- /dev/null +++ b/rest/api/v3/verified_senders/api_list_verified_sender.go @@ -0,0 +1,103 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListVerifiedSenderParam struct { + // Specifies the number of results to be returned by the API. This parameter can be used to limit the results returned or in combination with the `lastSeenID` parameter to iterate through paginated results. + Limit *float32 `json:"limit,omitempty"` + // Returns senders with an ID number occurring after the passed in ID. In other words, the `lastSeenID` provides a starting point from which SendGrid will iterate to find Sender Identities associated with your account. + LastSeenID *float32 `json:"lastSeenID,omitempty"` + // Returns information about only the Sender Identity passed in the request. + Id *int32 `json:"id,omitempty"` +} + +func (params *ListVerifiedSenderParam) SetLimit(Limit float32) *ListVerifiedSenderParam { + params.Limit = &Limit + return params +} +func (params *ListVerifiedSenderParam) SetLastSeenID(LastSeenID float32) *ListVerifiedSenderParam { + params.LastSeenID = &LastSeenID + return params +} +func (params *ListVerifiedSenderParam) SetId(Id int32) *ListVerifiedSenderParam { + params.Id = &Id + return params +} + +// **This endpoint allows you to retrieve all the Sender Identities associated with an account.** This endpoint will return both verified and unverified senders. You can limit the number of results returned using the `limit`, `lastSeenID`, and `id` query string parameters. * `limit` allows you to specify an exact number of Sender Identities to return. * `lastSeenID` will return senders with an ID number occuring after the passed in ID. In other words, the `lastSeenID` provides a starting point from which SendGrid will iterate to find Sender Identities associated with your account. * `id` will return information about only the Sender Identity passed in the request. +func (c *ApiService) ListVerifiedSender(params *ListVerifiedSenderParam) (interface{}, error) { + path := "/v3/verified_senders" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Limit != nil { + data.Set("limit", fmt.Sprint(*params.Limit)) + } + if params != nil && params.LastSeenID != nil { + data.Set("lastSeenID", fmt.Sprint(*params.LastSeenID)) + } + if params != nil && params.Id != nil { + data.Set("id", fmt.Sprint(*params.Id)) + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListVerifiedSender200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/verified_senders/api_list_verified_sender_domain.go b/rest/api/v3/verified_senders/api_list_verified_sender_domain.go new file mode 100644 index 00000000..84b8ec99 --- /dev/null +++ b/rest/api/v3/verified_senders/api_list_verified_sender_domain.go @@ -0,0 +1,73 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListVerifiedSenderDomainParam struct { +} + +// **This endpoint returns a list of domains known to implement DMARC and categorizes them by failure type — hard failure or soft failure**. Domains listed as hard failures will not deliver mail when used as a [Sender Identity](https://sendgrid.com/docs/for-developers/sending-email/sender-identity/) due to the domain's DMARC policy settings. For example, using a `yahoo.com` email address as a Sender Identity will likely result in the rejection of your mail. For more information about DMARC, see [Everything about DMARC](https://sendgrid.com/docs/ui/sending-email/dmarc/). +func (c *ApiService) ListVerifiedSenderDomain() (interface{}, error) { + path := "/v3/verified_senders/domains" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListVerifiedSenderDomain200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/verified_senders/api_list_verified_sender_steps_completed.go b/rest/api/v3/verified_senders/api_list_verified_sender_steps_completed.go new file mode 100644 index 00000000..63aaa124 --- /dev/null +++ b/rest/api/v3/verified_senders/api_list_verified_sender_steps_completed.go @@ -0,0 +1,73 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListVerifiedSenderStepsCompletedParam struct { +} + +// **This endpoint allows you to determine which of SendGrid’s verification processes have been completed for an account**. This endpoint returns boolean values, `true` and `false`, for [Domain Authentication](https://sendgrid.com/docs/for-developers/sending-email/sender-identity/#domain-authentication), `domain_verified`, and [Single Sender Verification](https://sendgrid.com/docs/for-developers/sending-email/sender-identity/#single-sender-verification), `sender_verified`, for the account. An account may have one, both, or neither verification steps completed. If you need to authenticate a domain rather than a Single Sender, see the \"Authenticate a domain\" endpoint. +func (c *ApiService) ListVerifiedSenderStepsCompleted() (interface{}, error) { + path := "/v3/verified_senders/steps_completed" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListVerifiedSenderStepsCompleted200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/verified_senders/api_resend_verified_sender.go b/rest/api/v3/verified_senders/api_resend_verified_sender.go new file mode 100644 index 00000000..cedc66b8 --- /dev/null +++ b/rest/api/v3/verified_senders/api_resend_verified_sender.go @@ -0,0 +1,93 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type ResendVerifiedSenderParam struct { + // + Id *string `json:"id"` +} + +func (params *ResendVerifiedSenderParam) SetId(Id string) *ResendVerifiedSenderParam { + params.Id = &Id + return params +} + +// **This endpoint allows you to resend a verification email to a specified Sender Identity**. Passing the `id` assigned to a Sender Identity to this endpoint will resend a verification email to the `from_address` associated with the Sender Identity. This can be useful if someone loses their verification email or needs to have it resent for any other reason. You can retrieve the IDs associated with Sender Identities by passing a \"Get All Verified Senders\" endpoint. +func (c *ApiService) ResendVerifiedSender(params *ResendVerifiedSenderParam) (interface{}, error) { + path := "/v3/verified_senders/resend/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &DeleteVerifiedSender404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &DeleteVerifiedSender404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/verified_senders/api_service.go b/rest/api/v3/verified_senders/api_service.go new file mode 100644 index 00000000..4ef324e5 --- /dev/null +++ b/rest/api/v3/verified_senders/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/verified_senders/api_update_verified_sender.go b/rest/api/v3/verified_senders/api_update_verified_sender.go new file mode 100644 index 00000000..ef407e2f --- /dev/null +++ b/rest/api/v3/verified_senders/api_update_verified_sender.go @@ -0,0 +1,108 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateVerifiedSenderParam struct { + // + Id *string `json:"id"` + // + VerifiedSenderRequest *VerifiedSenderRequest `json:"VerifiedSenderRequest,omitempty"` +} + +func (params *UpdateVerifiedSenderParam) SetId(Id string) *UpdateVerifiedSenderParam { + params.Id = &Id + return params +} +func (params *UpdateVerifiedSenderParam) SetVerifiedSenderRequest(VerifiedSenderRequest VerifiedSenderRequest) *UpdateVerifiedSenderParam { + params.VerifiedSenderRequest = &VerifiedSenderRequest + return params +} + +// **This endpoint allows you to update an existing Sender Identity**. Pass the `id` assigned to a Sender Identity to this endpoint as a path parameter. Include any fields you wish to update in the request body in JSON format. You can retrieve the IDs associated with Sender Identities by passing a `GET` request to the Get All Verified Senders endpoint, `/verified_senders`. **Note:** Unlike a `PUT` request, `PATCH` allows you to update only the fields you wish to edit. Fields that are not passed as part of a request will remain unaltered. +func (c *ApiService) UpdateVerifiedSender(params *UpdateVerifiedSenderParam) (interface{}, error) { + path := "/v3/verified_senders/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.VerifiedSenderRequest != nil { + b, err := json.Marshal(*params.VerifiedSenderRequest) + if err != nil { + return nil, err + } + body = b + } + + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &VerifiedSenderResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &CreateVerifiedSender400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &DeleteVerifiedSender404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &DeleteVerifiedSender404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/verified_senders/api_verify_sender_token.go b/rest/api/v3/verified_senders/api_verify_sender_token.go new file mode 100644 index 00000000..237bd442 --- /dev/null +++ b/rest/api/v3/verified_senders/api_verify_sender_token.go @@ -0,0 +1,77 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type VerifySenderTokenParam struct { + // + Token *string `json:"token"` +} + +func (params *VerifySenderTokenParam) SetToken(Token string) *VerifySenderTokenParam { + params.Token = &Token + return params +} + +// **This endpoint allows you to verify a sender requests.** The token is generated by SendGrid and included in a verification email delivered to the address that's pending verification. +func (c *ApiService) VerifySenderToken(params *VerifySenderTokenParam) (interface{}, error) { + path := "/v3/verified_senders/verify/{Token}" + if params != nil && params.Token != nil { + path = strings.Replace(path, "{"+"Token"+"}", *params.Token, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &DeleteVerifiedSender404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/verified_senders/docs/CreateVerifiedSender.md b/rest/api/v3/verified_senders/docs/CreateVerifiedSender.md new file mode 100644 index 00000000..2d228f45 --- /dev/null +++ b/rest/api/v3/verified_senders/docs/CreateVerifiedSender.md @@ -0,0 +1,48 @@ +# CreateVerifiedSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateVerifiedSender**](CreateVerifiedSender.md#CreateVerifiedSender) | **Post** /v3/verified_senders | Create Verified Sender Request + + + +## CreateVerifiedSender + +> VerifiedSenderResponse CreateVerifiedSender(ctx, optional) + +Create Verified Sender Request + +**This endpoint allows you to create a new Sender Identify**. Upon successful submission of a `POST` request to this endpoint, an identity will be created, and a verification email will be sent to the address assigned to the `from_email` field. You must complete the verification process using the sent email to fully verify the sender. If you need to resend the verification email, you can do so with the Resend Verified Sender Request, `/resend/{id}`, endpoint. If you need to authenticate a domain rather than a Single Sender, see the [Domain Authentication API](https://docs.sendgrid.com/api-reference/domain-authentication/authenticate-a-domain). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateVerifiedSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**VerifiedSenderRequest** | [**VerifiedSenderRequest**](VerifiedSenderRequest.md) | + +### Return type + +[**VerifiedSenderResponse**](VerifiedSenderResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/verified_senders/docs/CreateVerifiedSender400Response.md b/rest/api/v3/verified_senders/docs/CreateVerifiedSender400Response.md new file mode 100644 index 00000000..600ce1a3 --- /dev/null +++ b/rest/api/v3/verified_senders/docs/CreateVerifiedSender400Response.md @@ -0,0 +1,11 @@ +# CreateVerifiedSender400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]CreateVerifiedSender400ResponseErrorsInner**](CreateVerifiedSender400ResponseErrorsInner.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/verified_senders/docs/CreateVerifiedSender400ResponseErrorsInner.md b/rest/api/v3/verified_senders/docs/CreateVerifiedSender400ResponseErrorsInner.md new file mode 100644 index 00000000..490e7921 --- /dev/null +++ b/rest/api/v3/verified_senders/docs/CreateVerifiedSender400ResponseErrorsInner.md @@ -0,0 +1,13 @@ +# CreateVerifiedSender400ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Field** | **string** | |[optional] +**Message** | **string** | | +**ErrorId** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/verified_senders/docs/DeleteVerifiedSender.md b/rest/api/v3/verified_senders/docs/DeleteVerifiedSender.md new file mode 100644 index 00000000..64eb0663 --- /dev/null +++ b/rest/api/v3/verified_senders/docs/DeleteVerifiedSender.md @@ -0,0 +1,51 @@ +# DeleteVerifiedSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteVerifiedSender**](DeleteVerifiedSender.md#DeleteVerifiedSender) | **Delete** /v3/verified_senders/{Id} | Delete Verified Sender + + + +## DeleteVerifiedSender + +> map[string]interface{} DeleteVerifiedSender(ctx, Id) + +Delete Verified Sender + +**This endpoint allows you to delete a Sender Identity**. Pass the `id` assigned to a Sender Identity to this endpoint to delete the Sender Identity from your account. You can retrieve the IDs associated with Sender Identities using the \"Get All Verified Senders\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteVerifiedSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/verified_senders/docs/DeleteVerifiedSender403Response.md b/rest/api/v3/verified_senders/docs/DeleteVerifiedSender403Response.md new file mode 100644 index 00000000..0f07e32b --- /dev/null +++ b/rest/api/v3/verified_senders/docs/DeleteVerifiedSender403Response.md @@ -0,0 +1,11 @@ +# DeleteVerifiedSender403Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]DeleteVerifiedSender403ResponseErrorsInner**](DeleteVerifiedSender403ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/verified_senders/docs/DeleteVerifiedSender403ResponseErrorsInner.md b/rest/api/v3/verified_senders/docs/DeleteVerifiedSender403ResponseErrorsInner.md new file mode 100644 index 00000000..89ece5f2 --- /dev/null +++ b/rest/api/v3/verified_senders/docs/DeleteVerifiedSender403ResponseErrorsInner.md @@ -0,0 +1,12 @@ +# DeleteVerifiedSender403ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | | +**ErrorId** | **string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/verified_senders/docs/DeleteVerifiedSender404Response.md b/rest/api/v3/verified_senders/docs/DeleteVerifiedSender404Response.md new file mode 100644 index 00000000..ef2a483c --- /dev/null +++ b/rest/api/v3/verified_senders/docs/DeleteVerifiedSender404Response.md @@ -0,0 +1,11 @@ +# DeleteVerifiedSender404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]DeleteVerifiedSender403ResponseErrorsInner**](DeleteVerifiedSender403ResponseErrorsInner.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/verified_senders/docs/ErrorResponse.md b/rest/api/v3/verified_senders/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/verified_senders/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/verified_senders/docs/ErrorResponseErrorsInner.md b/rest/api/v3/verified_senders/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/verified_senders/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/verified_senders/docs/ListVerifiedSender.md b/rest/api/v3/verified_senders/docs/ListVerifiedSender.md new file mode 100644 index 00000000..115a8292 --- /dev/null +++ b/rest/api/v3/verified_senders/docs/ListVerifiedSender.md @@ -0,0 +1,50 @@ +# ListVerifiedSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListVerifiedSender**](ListVerifiedSender.md#ListVerifiedSender) | **Get** /v3/verified_senders | Get All Verified Senders + + + +## ListVerifiedSender + +> ListVerifiedSender200Response ListVerifiedSender(ctx, optional) + +Get All Verified Senders + +**This endpoint allows you to retrieve all the Sender Identities associated with an account.** This endpoint will return both verified and unverified senders. You can limit the number of results returned using the `limit`, `lastSeenID`, and `id` query string parameters. * `limit` allows you to specify an exact number of Sender Identities to return. * `lastSeenID` will return senders with an ID number occuring after the passed in ID. In other words, the `lastSeenID` provides a starting point from which SendGrid will iterate to find Sender Identities associated with your account. * `id` will return information about only the Sender Identity passed in the request. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListVerifiedSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **float32** | Specifies the number of results to be returned by the API. This parameter can be used to limit the results returned or in combination with the `lastSeenID` parameter to iterate through paginated results. +**LastSeenID** | **float32** | Returns senders with an ID number occurring after the passed in ID. In other words, the `lastSeenID` provides a starting point from which SendGrid will iterate to find Sender Identities associated with your account. +**Id** | **int32** | Returns information about only the Sender Identity passed in the request. + +### Return type + +[**ListVerifiedSender200Response**](ListVerifiedSender200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/verified_senders/docs/ListVerifiedSender200Response.md b/rest/api/v3/verified_senders/docs/ListVerifiedSender200Response.md new file mode 100644 index 00000000..6d5bfc9d --- /dev/null +++ b/rest/api/v3/verified_senders/docs/ListVerifiedSender200Response.md @@ -0,0 +1,11 @@ +# ListVerifiedSender200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | [**[]VerifiedSenderResponse**](VerifiedSenderResponse.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain.md b/rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain.md new file mode 100644 index 00000000..1669c7e7 --- /dev/null +++ b/rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain.md @@ -0,0 +1,44 @@ +# ListVerifiedSenderDomain + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListVerifiedSenderDomain**](ListVerifiedSenderDomain.md#ListVerifiedSenderDomain) | **Get** /v3/verified_senders/domains | Domain Warn List + + + +## ListVerifiedSenderDomain + +> ListVerifiedSenderDomain200Response ListVerifiedSenderDomain(ctx, ) + +Domain Warn List + +**This endpoint returns a list of domains known to implement DMARC and categorizes them by failure type — hard failure or soft failure**. Domains listed as hard failures will not deliver mail when used as a [Sender Identity](https://sendgrid.com/docs/for-developers/sending-email/sender-identity/) due to the domain's DMARC policy settings. For example, using a `yahoo.com` email address as a Sender Identity will likely result in the rejection of your mail. For more information about DMARC, see [Everything about DMARC](https://sendgrid.com/docs/ui/sending-email/dmarc/). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListVerifiedSenderDomainParams struct + + +### Return type + +[**ListVerifiedSenderDomain200Response**](ListVerifiedSenderDomain200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain200Response.md b/rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain200Response.md new file mode 100644 index 00000000..fed32ddc --- /dev/null +++ b/rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain200Response.md @@ -0,0 +1,11 @@ +# ListVerifiedSenderDomain200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | [**ListVerifiedSenderDomain200ResponseResults**](ListVerifiedSenderDomain200ResponseResults.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain200ResponseResults.md b/rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain200ResponseResults.md new file mode 100644 index 00000000..2217409c --- /dev/null +++ b/rest/api/v3/verified_senders/docs/ListVerifiedSenderDomain200ResponseResults.md @@ -0,0 +1,12 @@ +# ListVerifiedSenderDomain200ResponseResults + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SoftFailures** | **[]string** | | +**HardFailures** | **[]string** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted.md b/rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted.md new file mode 100644 index 00000000..e793dd48 --- /dev/null +++ b/rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted.md @@ -0,0 +1,44 @@ +# ListVerifiedSenderStepsCompleted + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListVerifiedSenderStepsCompleted**](ListVerifiedSenderStepsCompleted.md#ListVerifiedSenderStepsCompleted) | **Get** /v3/verified_senders/steps_completed | Completed Steps + + + +## ListVerifiedSenderStepsCompleted + +> ListVerifiedSenderStepsCompleted200Response ListVerifiedSenderStepsCompleted(ctx, ) + +Completed Steps + +**This endpoint allows you to determine which of SendGrid’s verification processes have been completed for an account**. This endpoint returns boolean values, `true` and `false`, for [Domain Authentication](https://sendgrid.com/docs/for-developers/sending-email/sender-identity/#domain-authentication), `domain_verified`, and [Single Sender Verification](https://sendgrid.com/docs/for-developers/sending-email/sender-identity/#single-sender-verification), `sender_verified`, for the account. An account may have one, both, or neither verification steps completed. If you need to authenticate a domain rather than a Single Sender, see the \"Authenticate a domain\" endpoint. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListVerifiedSenderStepsCompletedParams struct + + +### Return type + +[**ListVerifiedSenderStepsCompleted200Response**](ListVerifiedSenderStepsCompleted200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted200Response.md b/rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted200Response.md new file mode 100644 index 00000000..2257b312 --- /dev/null +++ b/rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted200Response.md @@ -0,0 +1,11 @@ +# ListVerifiedSenderStepsCompleted200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Results** | [**ListVerifiedSenderStepsCompleted200ResponseResults**](ListVerifiedSenderStepsCompleted200ResponseResults.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted200ResponseResults.md b/rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted200ResponseResults.md new file mode 100644 index 00000000..b114a2ad --- /dev/null +++ b/rest/api/v3/verified_senders/docs/ListVerifiedSenderStepsCompleted200ResponseResults.md @@ -0,0 +1,12 @@ +# ListVerifiedSenderStepsCompleted200ResponseResults + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**SenderVerified** | **bool** | |[optional] +**DomainVerified** | **bool** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/verified_senders/docs/ResendVerifiedSender.md b/rest/api/v3/verified_senders/docs/ResendVerifiedSender.md new file mode 100644 index 00000000..d7837503 --- /dev/null +++ b/rest/api/v3/verified_senders/docs/ResendVerifiedSender.md @@ -0,0 +1,51 @@ +# ResendVerifiedSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ResendVerifiedSender**](ResendVerifiedSender.md#ResendVerifiedSender) | **Post** /v3/verified_senders/resend/{Id} | Resend Verified Sender Request + + + +## ResendVerifiedSender + +> map[string]interface{} ResendVerifiedSender(ctx, Id) + +Resend Verified Sender Request + +**This endpoint allows you to resend a verification email to a specified Sender Identity**. Passing the `id` assigned to a Sender Identity to this endpoint will resend a verification email to the `from_address` associated with the Sender Identity. This can be useful if someone loses their verification email or needs to have it resent for any other reason. You can retrieve the IDs associated with Sender Identities by passing a \"Get All Verified Senders\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a ResendVerifiedSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/verified_senders/docs/UpdateVerifiedSender.md b/rest/api/v3/verified_senders/docs/UpdateVerifiedSender.md new file mode 100644 index 00000000..cf10ee97 --- /dev/null +++ b/rest/api/v3/verified_senders/docs/UpdateVerifiedSender.md @@ -0,0 +1,52 @@ +# UpdateVerifiedSender + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateVerifiedSender**](UpdateVerifiedSender.md#UpdateVerifiedSender) | **Patch** /v3/verified_senders/{Id} | Edit Verified Sender + + + +## UpdateVerifiedSender + +> VerifiedSenderResponse UpdateVerifiedSender(ctx, Idoptional) + +Edit Verified Sender + +**This endpoint allows you to update an existing Sender Identity**. Pass the `id` assigned to a Sender Identity to this endpoint as a path parameter. Include any fields you wish to update in the request body in JSON format. You can retrieve the IDs associated with Sender Identities by passing a `GET` request to the Get All Verified Senders endpoint, `/verified_senders`. **Note:** Unlike a `PUT` request, `PATCH` allows you to update only the fields you wish to edit. Fields that are not passed as part of a request will remain unaltered. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateVerifiedSenderParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**VerifiedSenderRequest** | [**VerifiedSenderRequest**](VerifiedSenderRequest.md) | + +### Return type + +[**VerifiedSenderResponse**](VerifiedSenderResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/verified_senders/docs/VerifiedSenderRequest.md b/rest/api/v3/verified_senders/docs/VerifiedSenderRequest.md new file mode 100644 index 00000000..adb9c1cf --- /dev/null +++ b/rest/api/v3/verified_senders/docs/VerifiedSenderRequest.md @@ -0,0 +1,21 @@ +# VerifiedSenderRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Nickname** | **string** | | +**FromEmail** | **string** | | +**FromName** | **string** | |[optional] +**ReplyTo** | **string** | | +**ReplyToName** | **string** | |[optional] +**Address** | **string** | |[optional] +**Address2** | **string** | |[optional] +**State** | **string** | |[optional] +**City** | **string** | |[optional] +**Zip** | **string** | |[optional] +**Country** | **string** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/verified_senders/docs/VerifiedSenderResponse.md b/rest/api/v3/verified_senders/docs/VerifiedSenderResponse.md new file mode 100644 index 00000000..4a6bf8df --- /dev/null +++ b/rest/api/v3/verified_senders/docs/VerifiedSenderResponse.md @@ -0,0 +1,24 @@ +# VerifiedSenderResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **int32** | |[optional] +**Nickname** | **string** | |[optional] +**FromEmail** | **string** | |[optional] +**FromName** | **string** | |[optional] +**ReplyTo** | **string** | |[optional] +**ReplyToName** | **string** | |[optional] +**Address** | **string** | |[optional] +**Address2** | **string** | |[optional] +**State** | **string** | |[optional] +**City** | **string** | |[optional] +**Zip** | **string** | |[optional] +**Country** | **string** | |[optional] +**Verified** | **bool** | |[optional] +**Locked** | **bool** | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/verified_senders/docs/VerifySenderToken.md b/rest/api/v3/verified_senders/docs/VerifySenderToken.md new file mode 100644 index 00000000..5dec772e --- /dev/null +++ b/rest/api/v3/verified_senders/docs/VerifySenderToken.md @@ -0,0 +1,51 @@ +# VerifySenderToken + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**VerifySenderToken**](VerifySenderToken.md#VerifySenderToken) | **Get** /v3/verified_senders/verify/{Token} | Verify Sender Request + + + +## VerifySenderToken + +> VerifySenderToken(ctx, Token) + +Verify Sender Request + +**This endpoint allows you to verify a sender requests.** The token is generated by SendGrid and included in a verification email delivered to the address that's pending verification. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Token** | **string** | + +### Other Parameters + +Other parameters are passed through a pointer to a VerifySenderTokenParams struct + + +Name | Type | Description +------------- | ------------- | ------------- + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/verified_senders/model_create_verified_sender_400_response.go b/rest/api/v3/verified_senders/model_create_verified_sender_400_response.go new file mode 100644 index 00000000..5b15d971 --- /dev/null +++ b/rest/api/v3/verified_senders/model_create_verified_sender_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateVerifiedSender400Response struct for CreateVerifiedSender400Response +type CreateVerifiedSender400Response struct { + Errors []CreateVerifiedSender400ResponseErrorsInner `json:"errors"` +} diff --git a/rest/api/v3/verified_senders/model_create_verified_sender_400_response_errors_inner.go b/rest/api/v3/verified_senders/model_create_verified_sender_400_response_errors_inner.go new file mode 100644 index 00000000..6682ad11 --- /dev/null +++ b/rest/api/v3/verified_senders/model_create_verified_sender_400_response_errors_inner.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateVerifiedSender400ResponseErrorsInner struct for CreateVerifiedSender400ResponseErrorsInner +type CreateVerifiedSender400ResponseErrorsInner struct { + Field *string `json:"field,omitempty"` + Message string `json:"message"` + ErrorId string `json:"error_id"` +} diff --git a/rest/api/v3/verified_senders/model_delete_verified_sender_403_response.go b/rest/api/v3/verified_senders/model_delete_verified_sender_403_response.go new file mode 100644 index 00000000..2aa7215f --- /dev/null +++ b/rest/api/v3/verified_senders/model_delete_verified_sender_403_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteVerifiedSender403Response struct for DeleteVerifiedSender403Response +type DeleteVerifiedSender403Response struct { + Errors *[]DeleteVerifiedSender403ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/verified_senders/model_delete_verified_sender_403_response_errors_inner.go b/rest/api/v3/verified_senders/model_delete_verified_sender_403_response_errors_inner.go new file mode 100644 index 00000000..f3f8a340 --- /dev/null +++ b/rest/api/v3/verified_senders/model_delete_verified_sender_403_response_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteVerifiedSender403ResponseErrorsInner struct for DeleteVerifiedSender403ResponseErrorsInner +type DeleteVerifiedSender403ResponseErrorsInner struct { + Message string `json:"message"` + ErrorId string `json:"error_id"` +} diff --git a/rest/api/v3/verified_senders/model_delete_verified_sender_404_response.go b/rest/api/v3/verified_senders/model_delete_verified_sender_404_response.go new file mode 100644 index 00000000..b25527ed --- /dev/null +++ b/rest/api/v3/verified_senders/model_delete_verified_sender_404_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// DeleteVerifiedSender404Response struct for DeleteVerifiedSender404Response +type DeleteVerifiedSender404Response struct { + Errors []DeleteVerifiedSender403ResponseErrorsInner `json:"errors"` +} diff --git a/rest/api/v3/verified_senders/model_error_response.go b/rest/api/v3/verified_senders/model_error_response.go new file mode 100644 index 00000000..e607f39f --- /dev/null +++ b/rest/api/v3/verified_senders/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/verified_senders/model_error_response_errors_inner.go b/rest/api/v3/verified_senders/model_error_response_errors_inner.go new file mode 100644 index 00000000..f544f8bb --- /dev/null +++ b/rest/api/v3/verified_senders/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/verified_senders/model_list_verified_sender_200_response.go b/rest/api/v3/verified_senders/model_list_verified_sender_200_response.go new file mode 100644 index 00000000..3a68dd4b --- /dev/null +++ b/rest/api/v3/verified_senders/model_list_verified_sender_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListVerifiedSender200Response struct for ListVerifiedSender200Response +type ListVerifiedSender200Response struct { + Results *[]VerifiedSenderResponse `json:"results,omitempty"` +} diff --git a/rest/api/v3/verified_senders/model_list_verified_sender_domain_200_response.go b/rest/api/v3/verified_senders/model_list_verified_sender_domain_200_response.go new file mode 100644 index 00000000..3f77bce9 --- /dev/null +++ b/rest/api/v3/verified_senders/model_list_verified_sender_domain_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListVerifiedSenderDomain200Response struct for ListVerifiedSenderDomain200Response +type ListVerifiedSenderDomain200Response struct { + Results ListVerifiedSenderDomain200ResponseResults `json:"results"` +} diff --git a/rest/api/v3/verified_senders/model_list_verified_sender_domain_200_response_results.go b/rest/api/v3/verified_senders/model_list_verified_sender_domain_200_response_results.go new file mode 100644 index 00000000..703a3515 --- /dev/null +++ b/rest/api/v3/verified_senders/model_list_verified_sender_domain_200_response_results.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListVerifiedSenderDomain200ResponseResults struct for ListVerifiedSenderDomain200ResponseResults +type ListVerifiedSenderDomain200ResponseResults struct { + SoftFailures []string `json:"soft_failures"` + HardFailures []string `json:"hard_failures"` +} diff --git a/rest/api/v3/verified_senders/model_list_verified_sender_steps_completed_200_response.go b/rest/api/v3/verified_senders/model_list_verified_sender_steps_completed_200_response.go new file mode 100644 index 00000000..a252d30c --- /dev/null +++ b/rest/api/v3/verified_senders/model_list_verified_sender_steps_completed_200_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListVerifiedSenderStepsCompleted200Response struct for ListVerifiedSenderStepsCompleted200Response +type ListVerifiedSenderStepsCompleted200Response struct { + Results *ListVerifiedSenderStepsCompleted200ResponseResults `json:"results,omitempty"` +} diff --git a/rest/api/v3/verified_senders/model_list_verified_sender_steps_completed_200_response_results.go b/rest/api/v3/verified_senders/model_list_verified_sender_steps_completed_200_response_results.go new file mode 100644 index 00000000..21b54ce8 --- /dev/null +++ b/rest/api/v3/verified_senders/model_list_verified_sender_steps_completed_200_response_results.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListVerifiedSenderStepsCompleted200ResponseResults struct for ListVerifiedSenderStepsCompleted200ResponseResults +type ListVerifiedSenderStepsCompleted200ResponseResults struct { + SenderVerified *bool `json:"sender_verified,omitempty"` + DomainVerified *bool `json:"domain_verified,omitempty"` +} diff --git a/rest/api/v3/verified_senders/model_verified_sender_request.go b/rest/api/v3/verified_senders/model_verified_sender_request.go new file mode 100644 index 00000000..3dc370c4 --- /dev/null +++ b/rest/api/v3/verified_senders/model_verified_sender_request.go @@ -0,0 +1,29 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// VerifiedSenderRequest struct for VerifiedSenderRequest +type VerifiedSenderRequest struct { + Nickname string `json:"nickname"` + FromEmail string `json:"from_email"` + FromName *string `json:"from_name,omitempty"` + ReplyTo string `json:"reply_to"` + ReplyToName *string `json:"reply_to_name,omitempty"` + Address *string `json:"address,omitempty"` + Address2 *string `json:"address2,omitempty"` + State *string `json:"state,omitempty"` + City *string `json:"city,omitempty"` + Zip *string `json:"zip,omitempty"` + Country *string `json:"country,omitempty"` +} diff --git a/rest/api/v3/verified_senders/model_verified_sender_response.go b/rest/api/v3/verified_senders/model_verified_sender_response.go new file mode 100644 index 00000000..308efbc6 --- /dev/null +++ b/rest/api/v3/verified_senders/model_verified_sender_response.go @@ -0,0 +1,32 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Verified Senders API +* The Twilio SendGrid Verified Senders API allows you to programmatically manage the Sender Identities that are authorized to send email for your account. You can also manage Sender Identities in the [SendGrid application user interface](https://app.sendgrid.com/settings/sender_auth). See [**Single Sender Verification**](https://sendgrid.com/docs/ui/sending-email/sender-verification/) for more information. You an use this API to create new Sender Identities, retrieve a list of existing Sender Identities, check the status of a Sender Identity, update a Sender Identity, and delete a Sender Identity. This API offers additional operations to check for domains known to implement DMARC and resend verification emails to Sender Identities that have yet to complete the verification process. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// VerifiedSenderResponse struct for VerifiedSenderResponse +type VerifiedSenderResponse struct { + Id *int32 `json:"id,omitempty"` + Nickname *string `json:"nickname,omitempty"` + FromEmail *string `json:"from_email,omitempty"` + FromName *string `json:"from_name,omitempty"` + ReplyTo *string `json:"reply_to,omitempty"` + ReplyToName *string `json:"reply_to_name,omitempty"` + Address *string `json:"address,omitempty"` + Address2 *string `json:"address2,omitempty"` + State *string `json:"state,omitempty"` + City *string `json:"city,omitempty"` + Zip *string `json:"zip,omitempty"` + Country *string `json:"country,omitempty"` + Verified *bool `json:"verified,omitempty"` + Locked *bool `json:"locked,omitempty"` +} diff --git a/rest/api/v3/webhooks/README.md b/rest/api/v3/webhooks/README.md new file mode 100644 index 00000000..4eedcf03 --- /dev/null +++ b/rest/api/v3/webhooks/README.md @@ -0,0 +1,100 @@ +# Go API client for + +The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. + +Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. + +The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. + +## Overview +This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project from the OpenAPI specs located at [twilio/sendgrid-oai](https://github.com/twilio/sendgrid-oai/tree/main/spec). By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. + +- API version: 1.0.0 +- Package version: +- Build date: 2024-10-04T18:29:02.588795+05:30[Asia/Kolkata] +- Build package: com.sendgrid.oai.go.SendgridGoGenerator +For more information, please visit [https://support.sendgrid.com/hc/en-us](https://support.sendgrid.com/hc/en-us) + +## Installation + +Install the following dependencies: + +```shell +go get github.com/stretchr/testify/assert +go get golang.org/x/net/context +``` + +Put the package under your project folder and add the following in import: + +```golang +import "./" +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://api.sendgrid.com* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*CreateEventWebhook* | [**CreateEventWebhook**](docs/CreateEventWebhook.md#createeventwebhook) | **Post** /v3/user/webhooks/event/settings | Create a new Event Webhook +*CreateParseSetting* | [**CreateParseSetting**](docs/CreateParseSetting.md#createparsesetting) | **Post** /v3/user/webhooks/parse/settings | Create a parse setting +*DeleteEventWebhook* | [**DeleteEventWebhook**](docs/DeleteEventWebhook.md#deleteeventwebhook) | **Delete** /v3/user/webhooks/event/settings/{Id} | Delete a single Event Webhook by ID. +*DeleteParseSetting* | [**DeleteParseSetting**](docs/DeleteParseSetting.md#deleteparsesetting) | **Delete** /v3/user/webhooks/parse/settings/{Hostname} | Delete a parse setting +*GetEventWebhook* | [**GetEventWebhook**](docs/GetEventWebhook.md#geteventwebhook) | **Get** /v3/user/webhooks/event/settings/{Id} | Get the settings for a single Event Webhook. +*GetParseSetting* | [**GetParseSetting**](docs/GetParseSetting.md#getparsesetting) | **Get** /v3/user/webhooks/parse/settings/{Hostname} | Retrieve a specific parse setting +*GetSignedEventWebhook* | [**GetSignedEventWebhook**](docs/GetSignedEventWebhook.md#getsignedeventwebhook) | **Get** /v3/user/webhooks/event/settings/signed/{Id} | Get Signed Event Webhook's Public Key +*ListEventWebhook* | [**ListEventWebhook**](docs/ListEventWebhook.md#listeventwebhook) | **Get** /v3/user/webhooks/event/settings/all | Retrieve all of your Event Webhooks. +*ListParseSetting* | [**ListParseSetting**](docs/ListParseSetting.md#listparsesetting) | **Get** /v3/user/webhooks/parse/settings | Retrieve all parse settings +*ListParseStatic* | [**ListParseStatic**](docs/ListParseStatic.md#listparsestatic) | **Get** /v3/user/webhooks/parse/stats | Retrieves Inbound Parse Webhook statistics. +*TestEventWebhook* | [**TestEventWebhook**](docs/TestEventWebhook.md#testeventwebhook) | **Post** /v3/user/webhooks/event/test | Test an Event Webhook's settings +*UpdateEventWebhook* | [**UpdateEventWebhook**](docs/UpdateEventWebhook.md#updateeventwebhook) | **Patch** /v3/user/webhooks/event/settings/{Id} | Update a single Event Webhook by ID. +*UpdateParseSetting* | [**UpdateParseSetting**](docs/UpdateParseSetting.md#updateparsesetting) | **Patch** /v3/user/webhooks/parse/settings/{Hostname} | Update a parse setting +*UpdateSignedEventWebhook* | [**UpdateSignedEventWebhook**](docs/UpdateSignedEventWebhook.md#updatesignedeventwebhook) | **Patch** /v3/user/webhooks/event/settings/signed/{Id} | Toggle signature verification for a single Event Webhook by ID + + +## Documentation For Models + + - [AggregatedBy](AggregatedBy.md) + - [CreateEventWebhook400Response](CreateEventWebhook400Response.md) + - [CreateEventWebhook400ResponseErrorsInner](CreateEventWebhook400ResponseErrorsInner.md) + - [ErrorResponse](ErrorResponse.md) + - [ErrorResponseErrorsInner](ErrorResponseErrorsInner.md) + - [EventWebhookAllResponse](EventWebhookAllResponse.md) + - [EventWebhookBaseResponseProps](EventWebhookBaseResponseProps.md) + - [EventWebhookDateResponseProps](EventWebhookDateResponseProps.md) + - [EventWebhookNoDatesResponse](EventWebhookNoDatesResponse.md) + - [EventWebhookOauthResponseProps](EventWebhookOauthResponseProps.md) + - [EventWebhookRequest](EventWebhookRequest.md) + - [EventWebhookSignedResponse](EventWebhookSignedResponse.md) + - [EventWebhookSignedResponseProp](EventWebhookSignedResponseProp.md) + - [EventWebhookTestRequest](EventWebhookTestRequest.md) + - [EventWebhookUnsignedResponse](EventWebhookUnsignedResponse.md) + - [GetSignedEventWebhook200Response](GetSignedEventWebhook200Response.md) + - [GetSignedEventWebhook404Response](GetSignedEventWebhook404Response.md) + - [GetSignedEventWebhook404ResponseErrorsInner](GetSignedEventWebhook404ResponseErrorsInner.md) + - [ListParseSetting200Response](ListParseSetting200Response.md) + - [ListParseStatic200ResponseInner](ListParseStatic200ResponseInner.md) + - [ListParseStatic200ResponseInnerStatsInner](ListParseStatic200ResponseInnerStatsInner.md) + - [ListParseStatic200ResponseInnerStatsInnerMetrics](ListParseStatic200ResponseInnerStatsInnerMetrics.md) + - [ParseSetting](ParseSetting.md) + - [UpdateSignedEventWebhookRequest](UpdateSignedEventWebhookRequest.md) + + +## Documentation For Authorization + + + +## BearerAuth + +- **Type**: HTTP basic authentication + +Example + +```golang +auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{ + UserName: "username", + Password: "password", +}) +r, err := client.Service.Operation(auth, args) +``` + diff --git a/rest/api/v3/webhooks/api_create_event_webhook.go b/rest/api/v3/webhooks/api_create_event_webhook.go new file mode 100644 index 00000000..06a7f84e --- /dev/null +++ b/rest/api/v3/webhooks/api_create_event_webhook.go @@ -0,0 +1,82 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateEventWebhookParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + EventWebhookRequest *EventWebhookRequest `json:"EventWebhookRequest,omitempty"` +} + +func (params *CreateEventWebhookParam) SetOnbehalfof(Onbehalfof string) *CreateEventWebhookParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateEventWebhookParam) SetEventWebhookRequest(EventWebhookRequest EventWebhookRequest) *CreateEventWebhookParam { + params.EventWebhookRequest = &EventWebhookRequest + return params +} + +// **This endpoint allows you to create a new Event Webhook.** When creating a webhook, you will provide a URL where you want the webhook to send POST requests, and you will select which events you want to receive in those request. See the [**Event Webhook Reference**](https://docs.sendgrid.com/for-developers/tracking-events/event#delivery-events) for details about each event type. ### Webhook identifiers When your webhook is succesfully created, you will receive a webhook `id` in the response returned by this endpoint. You can use that ID to [update the webhook's settings](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook), [delete the webhook](https://docs.sendgrid.com/api-reference/webhooks/delete-an-event-webhook), [enable or disable signature verification for the webhook](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook), and, if signature verification is enabled, [retrieve the webhook's public key](https://docs.sendgrid.com/api-reference/webhooks/get-signed-event-webhooks-public-key). You may also assign an optional friendly name to each of your webhooks. The friendly name is for convenience only and should not be used to programmatically differentiate your webhooks because it does not need to be unique. Use the webhook ID to reliably differentiate among your webhooks. ### OAuth You can optionally configure OAuth verification for your webhook at the time of creation by passing the appropriate values in the `oauth_client_id`, `oauth_client_secret`, and `oauth_token_url` properties. You can enable or disable OAuth for the webhook after creation with the [**Update an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) operation. You may share one OAuth configuration across all your webhooks or create unique credentials for each. See our [webhook security documentation](https://docs.sendgrid.com/for-developers/tracking-events/getting-started-event-webhook-security-features#oauth-20) for details about OAuth and the Event Webhook. ### Signature verification Enabling signature verification for your webhook is a separate process and cannot be done at the time of creation with this endpoint. You can use the webhook ID to [enable or disable signature verification with the endpoint dedicated for that operation](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook). +func (c *ApiService) CreateEventWebhook(params *CreateEventWebhookParam) (interface{}, error) { + path := "/v3/user/webhooks/event/settings" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.EventWebhookRequest != nil { + b, err := json.Marshal(*params.EventWebhookRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &EventWebhookUnsignedResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &CreateEventWebhook400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/webhooks/api_create_parse_setting.go b/rest/api/v3/webhooks/api_create_parse_setting.go new file mode 100644 index 00000000..06da2b1e --- /dev/null +++ b/rest/api/v3/webhooks/api_create_parse_setting.go @@ -0,0 +1,98 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type CreateParseSettingParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + ParseSetting *ParseSetting `json:"ParseSetting,omitempty"` +} + +func (params *CreateParseSettingParam) SetOnbehalfof(Onbehalfof string) *CreateParseSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *CreateParseSettingParam) SetParseSetting(ParseSetting ParseSetting) *CreateParseSettingParam { + params.ParseSetting = &ParseSetting + return params +} + +// **This endpoint allows you to create a new inbound parse setting.** Creating an Inbound Parse setting requires two pieces of information: a `url` and a `hostname`. The `hostname` must correspond to a domain authenticated by Twilio SendGrid on your account. If you need to complete domain authentication, you can use the [Twilio SendGrid App](https://app.sendgrid.com/settings/sender_auth) or the **Authenticate a Domain** endpoint. See [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/) for instructions. Any email received by the `hostname` will be parsed when you complete this setup. You must also add a Twilio SendGrid MX record to this domain's DNS records. See [**Setting up the Inbound Parse Webhook**](https://sendgrid.com/docs/for-developers/parsing-email/setting-up-the-inbound-parse-webhook/) for full instructions. The `url` represents a location where the parsed message data will be delivered. Twilio SendGrid will make an HTTP POST request to this `url` with the message data. The `url` must be publicly reachable, and your application must return a `200` status code to signal that the message data has been received. +func (c *ApiService) CreateParseSetting(params *CreateParseSettingParam) (interface{}, error) { + path := "/v3/user/webhooks/parse/settings" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.ParseSetting != nil { + b, err := json.Marshal(*params.ParseSetting) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 201 { + ps := &ParseSetting{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/webhooks/api_delete_event_webhook.go b/rest/api/v3/webhooks/api_delete_event_webhook.go new file mode 100644 index 00000000..b503351a --- /dev/null +++ b/rest/api/v3/webhooks/api_delete_event_webhook.go @@ -0,0 +1,70 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteEventWebhookParam struct { + // The ID of the Event Webhook you want to retrieve. + Id *string `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteEventWebhookParam) SetId(Id string) *DeleteEventWebhookParam { + params.Id = &Id + return params +} +func (params *DeleteEventWebhookParam) SetOnbehalfof(Onbehalfof string) *DeleteEventWebhookParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete a single Event Webhook by ID.** Unlike the [**Get an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/get-an-event-webhook) and [**Update an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) endpoints, which will operate on your oldest webhook by `created_date` when you don't provide an ID, this endpoint will return an error if you do not pass it an ID. This behavior prevents customers from unintentionally deleting a webhook. You can retrieve your webhooks' IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. ### Enable or disable the webhook This endpoint will permanently delete the webhook specified. If you instead want to disable a webhook, you can set the `enabled` property to `false` with the [**Update an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) endpoint. +func (c *ApiService) DeleteEventWebhook(params *DeleteEventWebhookParam) (interface{}, error) { + path := "/v3/user/webhooks/event/settings/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 404 { + ps := &GetSignedEventWebhook404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/webhooks/api_delete_parse_setting.go b/rest/api/v3/webhooks/api_delete_parse_setting.go new file mode 100644 index 00000000..d5711ce9 --- /dev/null +++ b/rest/api/v3/webhooks/api_delete_parse_setting.go @@ -0,0 +1,94 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type DeleteParseSettingParam struct { + // The hostname associated with the inbound parse setting that you would like to retrieve. + Hostname *string `json:"hostname"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *DeleteParseSettingParam) SetHostname(Hostname string) *DeleteParseSettingParam { + params.Hostname = &Hostname + return params +} +func (params *DeleteParseSettingParam) SetOnbehalfof(Onbehalfof string) *DeleteParseSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to delete a specific inbound parse setting by hostname.** You can retrieve all your Inbound Parse settings and their associated host names with the \"Retrieve all parse settings\" endpoint. +func (c *ApiService) DeleteParseSetting(params *DeleteParseSettingParam) (interface{}, error) { + path := "/v3/user/webhooks/parse/settings/{Hostname}" + if params != nil && params.Hostname != nil { + path = strings.Replace(path, "{"+"Hostname"+"}", *params.Hostname, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 204 { + ps := &map[string]interface{}{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/webhooks/api_get_event_webhook.go b/rest/api/v3/webhooks/api_get_event_webhook.go new file mode 100644 index 00000000..e487f65d --- /dev/null +++ b/rest/api/v3/webhooks/api_get_event_webhook.go @@ -0,0 +1,88 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetEventWebhookParam struct { + // The ID of the Event Webhook you want to retrieve. + Id *string `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // Use this to include optional fields in the response payload. When this is set to `include=account_status_change`, the `account_status_change` field will be part of the response payload and set to `false` by default. See [Update an event webhook](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) for enabling this webhook notification which lets you subscribe to account status change events related to compliance action taken by SendGrid. + Include *string `json:"include,omitempty"` +} + +func (params *GetEventWebhookParam) SetId(Id string) *GetEventWebhookParam { + params.Id = &Id + return params +} +func (params *GetEventWebhookParam) SetOnbehalfof(Onbehalfof string) *GetEventWebhookParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *GetEventWebhookParam) SetInclude(Include string) *GetEventWebhookParam { + params.Include = &Include + return params +} + +// **This endpoint allows you to retrieve a single Event Webhook by ID.** If you do not pass a webhook ID to this endpoint, it will return your oldest webhook by `created_date`. This means the default webhook returned by this endpoint when no ID is provided will be the first one you created. This functionality allows customers who do not have multiple webhooks to use this endpoint to retrieve their only webhook, even if they do not supply an ID. If you have multiple webhooks, you can retrieve their IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. ### Event settings Your webhook will be returned with all of its settings, which include the events that will be included in the POST request by the webhook and the URL where they will be sent. If an event type is marked as `true`, the event webhook will send information about that event type. See the [**Event Webhook Reference**](https://docs.sendgrid.com/for-developers/tracking-events/event#delivery-events) for details about each event type. ### Signature verification The `public_key` property will be returned only for webhooks with signature verification enabled. ### OAuth You may share one OAuth configuration across all your webhooks or create unique credentials for each. The OAuth properties will be returned only for webhooks with OAuth configured. +func (c *ApiService) GetEventWebhook(params *GetEventWebhookParam) (interface{}, error) { + path := "/v3/user/webhooks/event/settings/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Include != nil { + data.Set("include", *params.Include) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &EventWebhookNoDatesResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &GetSignedEventWebhook404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/webhooks/api_get_parse_setting.go b/rest/api/v3/webhooks/api_get_parse_setting.go new file mode 100644 index 00000000..8914ba24 --- /dev/null +++ b/rest/api/v3/webhooks/api_get_parse_setting.go @@ -0,0 +1,94 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetParseSettingParam struct { + // The hostname associated with the inbound parse setting that you would like to retrieve. + Hostname *string `json:"hostname"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetParseSettingParam) SetHostname(Hostname string) *GetParseSettingParam { + params.Hostname = &Hostname + return params +} +func (params *GetParseSettingParam) SetOnbehalfof(Onbehalfof string) *GetParseSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve a specific inbound parse setting by hostname.** You can retrieve all your Inbound Parse settings and their associated host names with the \"Retrieve all parse settings\" endpoint. +func (c *ApiService) GetParseSetting(params *GetParseSettingParam) (interface{}, error) { + path := "/v3/user/webhooks/parse/settings/{Hostname}" + if params != nil && params.Hostname != nil { + path = strings.Replace(path, "{"+"Hostname"+"}", *params.Hostname, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ParseSetting{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/webhooks/api_get_signed_event_webhook.go b/rest/api/v3/webhooks/api_get_signed_event_webhook.go new file mode 100644 index 00000000..27b29365 --- /dev/null +++ b/rest/api/v3/webhooks/api_get_signed_event_webhook.go @@ -0,0 +1,78 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type GetSignedEventWebhookParam struct { + // The ID of the Event Webhook you want to retrieve. + Id *string `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *GetSignedEventWebhookParam) SetId(Id string) *GetSignedEventWebhookParam { + params.Id = &Id + return params +} +func (params *GetSignedEventWebhookParam) SetOnbehalfof(Onbehalfof string) *GetSignedEventWebhookParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve the public key for a single Event Webhook by ID.** If you do not pass a webhook ID to this endpoint, it will return the public key for your oldest webhook by `created_date`. This means the default key returned by this endpoint when no ID is provided will be for the first webhook you created. This functionality allows customers who do not have multiple webhooks to use this endpoint to retrieve their only webhook's public key, even if they do not supply an ID. If you have multiple webhooks, you can retrieve their IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. Once you have enabled signature verification for a webhook, you will need the public key provided to verify the signatures on requests coming from Twilio SendGrid. You can use the webhook ID to [enable or disable signature verification with the endpoint dedicated for that operation](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook). For more information about cryptographically signing the Event Webhook, see [**Getting Started with the Event Webhook Security Features**](https://sendgrid.com/docs/for-developers/tracking-events/getting-started-event-webhook-security-features). +func (c *ApiService) GetSignedEventWebhook(params *GetSignedEventWebhookParam) (interface{}, error) { + path := "/v3/user/webhooks/event/settings/signed/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetSignedEventWebhook200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &GetSignedEventWebhook404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/webhooks/api_list_event_webhook.go b/rest/api/v3/webhooks/api_list_event_webhook.go new file mode 100644 index 00000000..bb7dbec9 --- /dev/null +++ b/rest/api/v3/webhooks/api_list_event_webhook.go @@ -0,0 +1,69 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListEventWebhookParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // Use this to include optional fields in the response payload. When this is set to `include=account_status_change`, the `account_status_change` field will be part of the response payload and set to `false` by default. See [Update an event webhook](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) for enabling this webhook notification which lets you subscribe to account status change events related to compliance action taken by SendGrid. + Include *string `json:"include,omitempty"` +} + +func (params *ListEventWebhookParam) SetOnbehalfof(Onbehalfof string) *ListEventWebhookParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *ListEventWebhookParam) SetInclude(Include string) *ListEventWebhookParam { + params.Include = &Include + return params +} + +// **This endpoint allows you to retrieve all of your Event Webhooks.** Each webhook will be returned as an object in the `webhooks` array with the webhook's configuration details and ID. You can use a webhook's ID to [update the webhook's settings](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook), [delete the webhook](https://docs.sendgrid.com/api-reference/webhooks/delete-an-event-webhook), [enable or disable signature verification for the webhook](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook), and, if signature verification is enabled, [retrieve the webhook's public key](https://docs.sendgrid.com/api-reference/webhooks/get-signed-event-webhooks-public-key) when signature verification is enabled. ### Event settings Each webhook's settings determine which events will be included in the POST request by the webhook and the URL where the request will be sent. See the [**Event Webhook Reference**](https://docs.sendgrid.com/for-developers/tracking-events/event#delivery-events) for details about each event type. ### Signature verification The `public_key` property will be returned only for webhooks with signature verification enabled. ### OAuth You may share one OAuth configuration across all your webhooks or create unique credentials for each. The OAuth properties will be returned only for webhooks with OAuth configured. +func (c *ApiService) ListEventWebhook(params *ListEventWebhookParam) (interface{}, error) { + path := "/v3/user/webhooks/event/settings/all" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Include != nil { + data.Set("include", *params.Include) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &EventWebhookAllResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/webhooks/api_list_parse_setting.go b/rest/api/v3/webhooks/api_list_parse_setting.go new file mode 100644 index 00000000..ab066d56 --- /dev/null +++ b/rest/api/v3/webhooks/api_list_parse_setting.go @@ -0,0 +1,83 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type ListParseSettingParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListParseSettingParam) SetOnbehalfof(Onbehalfof string) *ListParseSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve all of your current inbound parse settings.** +func (c *ApiService) ListParseSetting(params *ListParseSettingParam) (interface{}, error) { + path := "/v3/user/webhooks/parse/settings" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ListParseSetting200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/webhooks/api_list_parse_static.go b/rest/api/v3/webhooks/api_list_parse_static.go new file mode 100644 index 00000000..1fc38e96 --- /dev/null +++ b/rest/api/v3/webhooks/api_list_parse_static.go @@ -0,0 +1,106 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "fmt" + "net/http" + "net/url" +) + +type ListParseStaticParam struct { + // The starting date of the statistics you want to retrieve. Must be in the format YYYY-MM-DD + StartDate *string `json:"start_date"` + // The number of statistics to return on each page. + Limit *string `json:"limit,omitempty"` + // The number of statistics to skip. + Offset *string `json:"offset,omitempty"` + // How you would like the statistics to by grouped. + AggregatedBy *AggregatedBy `json:"aggregated_by,omitempty"` + // The end date of the statistics you want to retrieve. Must be in the format YYYY-MM-DD + EndDate *string `json:"end_date,omitempty"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` +} + +func (params *ListParseStaticParam) SetStartDate(StartDate string) *ListParseStaticParam { + params.StartDate = &StartDate + return params +} +func (params *ListParseStaticParam) SetLimit(Limit string) *ListParseStaticParam { + params.Limit = &Limit + return params +} +func (params *ListParseStaticParam) SetOffset(Offset string) *ListParseStaticParam { + params.Offset = &Offset + return params +} +func (params *ListParseStaticParam) SetAggregatedBy(AggregatedBy AggregatedBy) *ListParseStaticParam { + params.AggregatedBy = &AggregatedBy + return params +} +func (params *ListParseStaticParam) SetEndDate(EndDate string) *ListParseStaticParam { + params.EndDate = &EndDate + return params +} +func (params *ListParseStaticParam) SetOnbehalfof(Onbehalfof string) *ListParseStaticParam { + params.Onbehalfof = &Onbehalfof + return params +} + +// **This endpoint allows you to retrieve the statistics for your Parse Webhook usage.** SendGrid's Inbound Parse Webhook allows you to parse the contents and attachments of incoming emails. The Parse API can then POST the parsed emails to a URL that you specify. The Inbound Parse Webhook cannot parse messages greater than 30MB in size, including all attachments. There are a number of pre-made integrations for the SendGrid Parse Webhook which make processing events easy. You can find these integrations in the [Library Index](https://docs.sendgrid.com/for-developers/sending-email/libraries#webhook-libraries). +func (c *ApiService) ListParseStatic(params *ListParseStaticParam) (interface{}, error) { + path := "/v3/user/webhooks/parse/stats" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/x-www-form-urlencoded", + } + + if params != nil && params.StartDate != nil { + data.Set("start_date", *params.StartDate) + } + if params != nil && params.Limit != nil { + data.Set("limit", *params.Limit) + } + if params != nil && params.Offset != nil { + data.Set("offset", *params.Offset) + } + if params != nil && params.AggregatedBy != nil { + data.Set("aggregated_by", fmt.Sprint(*params.AggregatedBy)) + } + if params != nil && params.EndDate != nil { + data.Set("end_date", *params.EndDate) + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Get(c.baseURL+path, data, headers) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &[]ListParseStatic200ResponseInner{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/webhooks/api_service.go b/rest/api/v3/webhooks/api_service.go new file mode 100644 index 00000000..a92477c0 --- /dev/null +++ b/rest/api/v3/webhooks/api_service.go @@ -0,0 +1,34 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + sendgrid "github.com/sendgrid/sendgrid-go/client" +) + +type ApiService struct { + baseURL string + requestHandler *sendgrid.RequestHandler +} + +func NewApiService(requestHandler *sendgrid.RequestHandler) *ApiService { + return &ApiService{ + requestHandler: requestHandler, + baseURL: "https://api.sendgrid.com", + } +} + +func NewApiServiceWithClient(client sendgrid.BaseClient) *ApiService { + return NewApiService(sendgrid.NewRequestHandler(client)) +} diff --git a/rest/api/v3/webhooks/api_test_event_webhook.go b/rest/api/v3/webhooks/api_test_event_webhook.go new file mode 100644 index 00000000..9a15fb2d --- /dev/null +++ b/rest/api/v3/webhooks/api_test_event_webhook.go @@ -0,0 +1,66 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" +) + +type TestEventWebhookParam struct { + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + EventWebhookTestRequest *EventWebhookTestRequest `json:"EventWebhookTestRequest,omitempty"` +} + +func (params *TestEventWebhookParam) SetOnbehalfof(Onbehalfof string) *TestEventWebhookParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *TestEventWebhookParam) SetEventWebhookTestRequest(EventWebhookTestRequest EventWebhookTestRequest) *TestEventWebhookParam { + params.EventWebhookTestRequest = &EventWebhookTestRequest + return params +} + +// **This endpoint allows you to test an Event Webhook.** Retry logic for this endpoint differs from other endpoints, which use a rolling 24-hour retry. This endpoint will make a POST request with a fake event notification to a URL you provide. This allows you to verify that you have properly configured the webhook before sending real data to your URL. ### Test OAuth configuration To test your OAuth configuration, you must include the necessary OAuth properties: `oauth_client_id`, `oauth_client_secret`, and `oauth_token_url`. If the webhook you are testing already has OAuth credentials saved, you will provide only the `oauth_client_id` and `oauth_token_url`—we will pull the secret for you. If you are testing a new set of OAuth credentials that have not been saved with SendGrid, you must provide all three property values. You can retrieve a previously saved `oauth_client_id` and `oauth_token_url` from the [**Get an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/get-an-event-webhook) endpoint; however, for security reasons, SendGrid will not provide your `oauth_client_secret`. +func (c *ApiService) TestEventWebhook(params *TestEventWebhookParam) (interface{}, error) { + path := "/v3/user/webhooks/event/test" + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.EventWebhookTestRequest != nil { + b, err := json.Marshal(*params.EventWebhookTestRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Post(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/webhooks/api_update_event_webhook.go b/rest/api/v3/webhooks/api_update_event_webhook.go new file mode 100644 index 00000000..815da018 --- /dev/null +++ b/rest/api/v3/webhooks/api_update_event_webhook.go @@ -0,0 +1,110 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateEventWebhookParam struct { + // The ID of the Event Webhook you want to retrieve. + Id *string `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // Use this to include optional fields in the response payload. When this is set to `include=account_status_change`, the `account_status_change` field will be part of the response payload and set to `false` by default. See [Update an event webhook](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) for enabling this webhook notification which lets you subscribe to account status change events related to compliance action taken by SendGrid. + Include *string `json:"include,omitempty"` + // + EventWebhookRequest *EventWebhookRequest `json:"EventWebhookRequest,omitempty"` +} + +func (params *UpdateEventWebhookParam) SetId(Id string) *UpdateEventWebhookParam { + params.Id = &Id + return params +} +func (params *UpdateEventWebhookParam) SetOnbehalfof(Onbehalfof string) *UpdateEventWebhookParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateEventWebhookParam) SetInclude(Include string) *UpdateEventWebhookParam { + params.Include = &Include + return params +} +func (params *UpdateEventWebhookParam) SetEventWebhookRequest(EventWebhookRequest EventWebhookRequest) *UpdateEventWebhookParam { + params.EventWebhookRequest = &EventWebhookRequest + return params +} + +// **This endpoint allows you to update a single Event Webhook by ID.** If you do not pass a webhook ID to this endpoint, it will update and return your oldest webhook by `created_date`. This means the default webhook updated by this endpoint when no ID is provided will be the first one you created. This functionality allows customers who do not have multiple webhooks to use this endpoint to update their only webhook, even if they do not supply an ID. If you have multiple webhooks, you can retrieve their IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. ### Enable or disable the webhook You can set the `enabled` property to `true` to enable the webhook or `false` to disable it. Disabling a webhook will not delete it from your account, but it will prevent the webhook from sending events to your designated URL. ### URL A webhook's URL is the endpoint where you want the webhook to send POST requests containing event data. No more than one webhook may be configured to send to the same URL. SendGrid will return an error if you attempt to set a URL for a webhook that is already in use by the user on another webhook. ### Event settings If an event type is marked as `true`, the event webhook will send information about that event type. See the [**Event Webhook Reference**](https://docs.sendgrid.com/for-developers/tracking-events/event#delivery-events) for details about each event type. ### Webhook identifiers You may assign an optional friendly name to each of your webhooks. The friendly name is for convenience only and should not be used to programmatically differentiate your webhooks because it does not need to be unique. ### OAuth You can configure OAuth for your webhook by passing the required values to this endpoint in the `oauth_client_id`, `oauth_client_secret`, and `oauth_token_url` properties. To disable OAuth, pass an empty string to this endpoint for each of the OAuth properties. You may share one OAuth configuration across all your webhooks or create unique credentials for each. See our [webhook security documentation](https://docs.sendgrid.com/for-developers/tracking-events/getting-started-event-webhook-security-features#oauth-20) for more detailed information about OAuth and the Event Webhook. ### Signature verification Enabling signature verification for your webhook is a separate process and cannot be done with this endpoint. You can use the webhook ID to [enable or disable signature verification with the endpoint dedicated for that operation](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook). +func (c *ApiService) UpdateEventWebhook(params *UpdateEventWebhookParam) (interface{}, error) { + path := "/v3/user/webhooks/event/settings/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + if params != nil && params.Include != nil { + data.Set("include", *params.Include) + } + body := []byte{} + if params != nil && params.EventWebhookRequest != nil { + b, err := json.Marshal(*params.EventWebhookRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &EventWebhookUnsignedResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 400 { + ps := &CreateEventWebhook400Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &GetSignedEventWebhook404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/webhooks/api_update_parse_setting.go b/rest/api/v3/webhooks/api_update_parse_setting.go new file mode 100644 index 00000000..96179afa --- /dev/null +++ b/rest/api/v3/webhooks/api_update_parse_setting.go @@ -0,0 +1,109 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateParseSettingParam struct { + // The hostname associated with the inbound parse setting that you would like to retrieve. + Hostname *string `json:"hostname"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + ParseSetting *ParseSetting `json:"ParseSetting,omitempty"` +} + +func (params *UpdateParseSettingParam) SetHostname(Hostname string) *UpdateParseSettingParam { + params.Hostname = &Hostname + return params +} +func (params *UpdateParseSettingParam) SetOnbehalfof(Onbehalfof string) *UpdateParseSettingParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateParseSettingParam) SetParseSetting(ParseSetting ParseSetting) *UpdateParseSettingParam { + params.ParseSetting = &ParseSetting + return params +} + +// **This endpoint allows you to update a specific inbound parse setting by hostname.** You can retrieve all your Inbound Parse settings and their associated host names with the \"Retrieve all parse settings\" endpoint. +func (c *ApiService) UpdateParseSetting(params *UpdateParseSettingParam) (interface{}, error) { + path := "/v3/user/webhooks/parse/settings/{Hostname}" + if params != nil && params.Hostname != nil { + path = strings.Replace(path, "{"+"Hostname"+"}", *params.Hostname, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.ParseSetting != nil { + b, err := json.Marshal(*params.ParseSetting) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &ParseSetting{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 401 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 403 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &ErrorResponse{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/webhooks/api_update_signed_event_webhook.go b/rest/api/v3/webhooks/api_update_signed_event_webhook.go new file mode 100644 index 00000000..7cc2f68a --- /dev/null +++ b/rest/api/v3/webhooks/api_update_signed_event_webhook.go @@ -0,0 +1,93 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "encoding/json" + "net/http" + "net/url" + + "strings" +) + +type UpdateSignedEventWebhookParam struct { + // The ID of the Event Webhook you want to retrieve. + Id *string `json:"id"` + // The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + Onbehalfof *string `json:"on-behalf-of,omitempty"` + // + UpdateSignedEventWebhookRequest *UpdateSignedEventWebhookRequest `json:"UpdateSignedEventWebhookRequest,omitempty"` +} + +func (params *UpdateSignedEventWebhookParam) SetId(Id string) *UpdateSignedEventWebhookParam { + params.Id = &Id + return params +} +func (params *UpdateSignedEventWebhookParam) SetOnbehalfof(Onbehalfof string) *UpdateSignedEventWebhookParam { + params.Onbehalfof = &Onbehalfof + return params +} +func (params *UpdateSignedEventWebhookParam) SetUpdateSignedEventWebhookRequest(UpdateSignedEventWebhookRequest UpdateSignedEventWebhookRequest) *UpdateSignedEventWebhookParam { + params.UpdateSignedEventWebhookRequest = &UpdateSignedEventWebhookRequest + return params +} + +// **This endpoint allows you to enable or disable signature verification for a single Event Webhook by ID.** If you do not pass a webhook ID to this endpoint, it will enable signature verification for your oldest webhook by `created_date`. This means the default webhook operated on by this endpoint when no ID is provided will be the first one you created. This functionality allows customers who do not have multiple webhooks to enable or disable signature verifiction for their only webhook, even if they do not supply an ID. If you have multiple webhooks, you can retrieve their IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. This endpoint accepts a single boolean request property, `enabled`, that can be set `true` or `false` to enable or disable signature verification. This endpoint will return the public key required to verify Twilio SendGrid signatures if it is enabled or an empty string if signing is disabled. You can also retrieve your public key using the [**Get an Event Webhook's Public Key**](https://docs.sendgrid.com/api-reference/webhooks/get-signed-event-webhooks-public-key) endpoint. For more information about cryptographically signing the Event Webhook, see [**Getting Started with the Event Webhook Security Features**](https://sendgrid.com/docs/for-developers/tracking-events/getting-started-event-webhook-security-features). +func (c *ApiService) UpdateSignedEventWebhook(params *UpdateSignedEventWebhookParam) (interface{}, error) { + path := "/v3/user/webhooks/event/settings/signed/{Id}" + if params != nil && params.Id != nil { + path = strings.Replace(path, "{"+"Id"+"}", *params.Id, -1) + } + + data := url.Values{} + headers := map[string]interface{}{ + "Content-Type": "application/json", + } + + body := []byte{} + if params != nil && params.UpdateSignedEventWebhookRequest != nil { + b, err := json.Marshal(*params.UpdateSignedEventWebhookRequest) + if err != nil { + return nil, err + } + body = b + } + + if params != nil && params.Onbehalfof != nil { + headers["on-behalf-of"] = *params.Onbehalfof + } + resp, err := c.requestHandler.Patch(c.baseURL+path, data, headers, body...) + if err != nil { + return nil, err + } + + defer resp.Body.Close() + if resp.StatusCode == 200 { + ps := &GetSignedEventWebhook200Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + if resp.StatusCode == 404 { + ps := &GetSignedEventWebhook404Response{} + if err := json.NewDecoder(resp.Body).Decode(ps); err != nil { + return nil, err + } + + return ps, err + } + return http.Response{StatusCode: resp.StatusCode, Body: resp.Body, Header: resp.Header}, nil +} diff --git a/rest/api/v3/webhooks/docs/AggregatedBy.md b/rest/api/v3/webhooks/docs/AggregatedBy.md new file mode 100644 index 00000000..96f02c9f --- /dev/null +++ b/rest/api/v3/webhooks/docs/AggregatedBy.md @@ -0,0 +1,14 @@ +# AggregatedBy + +## Enum + +Name | Type | Notes +------------ | ------------- | ------------- +**DAY** | string | (value: `"day"`) +**WEEK** | string | (value: `"week"`) +**MONTH** | string | (value: `"month"`) + + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/CreateEventWebhook.md b/rest/api/v3/webhooks/docs/CreateEventWebhook.md new file mode 100644 index 00000000..b14e0354 --- /dev/null +++ b/rest/api/v3/webhooks/docs/CreateEventWebhook.md @@ -0,0 +1,49 @@ +# CreateEventWebhook + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateEventWebhook**](CreateEventWebhook.md#CreateEventWebhook) | **Post** /v3/user/webhooks/event/settings | Create a new Event Webhook + + + +## CreateEventWebhook + +> EventWebhookUnsignedResponse CreateEventWebhook(ctx, optional) + +Create a new Event Webhook + +**This endpoint allows you to create a new Event Webhook.** When creating a webhook, you will provide a URL where you want the webhook to send POST requests, and you will select which events you want to receive in those request. See the [**Event Webhook Reference**](https://docs.sendgrid.com/for-developers/tracking-events/event#delivery-events) for details about each event type. ### Webhook identifiers When your webhook is succesfully created, you will receive a webhook `id` in the response returned by this endpoint. You can use that ID to [update the webhook's settings](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook), [delete the webhook](https://docs.sendgrid.com/api-reference/webhooks/delete-an-event-webhook), [enable or disable signature verification for the webhook](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook), and, if signature verification is enabled, [retrieve the webhook's public key](https://docs.sendgrid.com/api-reference/webhooks/get-signed-event-webhooks-public-key). You may also assign an optional friendly name to each of your webhooks. The friendly name is for convenience only and should not be used to programmatically differentiate your webhooks because it does not need to be unique. Use the webhook ID to reliably differentiate among your webhooks. ### OAuth You can optionally configure OAuth verification for your webhook at the time of creation by passing the appropriate values in the `oauth_client_id`, `oauth_client_secret`, and `oauth_token_url` properties. You can enable or disable OAuth for the webhook after creation with the [**Update an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) operation. You may share one OAuth configuration across all your webhooks or create unique credentials for each. See our [webhook security documentation](https://docs.sendgrid.com/for-developers/tracking-events/getting-started-event-webhook-security-features#oauth-20) for details about OAuth and the Event Webhook. ### Signature verification Enabling signature verification for your webhook is a separate process and cannot be done at the time of creation with this endpoint. You can use the webhook ID to [enable or disable signature verification with the endpoint dedicated for that operation](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateEventWebhookParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**EventWebhookRequest** | [**EventWebhookRequest**](EventWebhookRequest.md) | + +### Return type + +[**EventWebhookUnsignedResponse**](EventWebhookUnsignedResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/webhooks/docs/CreateEventWebhook400Response.md b/rest/api/v3/webhooks/docs/CreateEventWebhook400Response.md new file mode 100644 index 00000000..36edd9c5 --- /dev/null +++ b/rest/api/v3/webhooks/docs/CreateEventWebhook400Response.md @@ -0,0 +1,11 @@ +# CreateEventWebhook400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]CreateEventWebhook400ResponseErrorsInner**](CreateEventWebhook400ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/CreateEventWebhook400ResponseErrorsInner.md b/rest/api/v3/webhooks/docs/CreateEventWebhook400ResponseErrorsInner.md new file mode 100644 index 00000000..d41fff3d --- /dev/null +++ b/rest/api/v3/webhooks/docs/CreateEventWebhook400ResponseErrorsInner.md @@ -0,0 +1,13 @@ +# CreateEventWebhook400ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The ID of a Webhook that exists on your account that is already configured to send events to the endpoint URL you provided. |[optional] +**Message** | **string** | Error message. |[optional] +**Url** | **string** | The URL that is already configured as a Webhook endpoint for one of your existing Webhooks. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/CreateParseSetting.md b/rest/api/v3/webhooks/docs/CreateParseSetting.md new file mode 100644 index 00000000..75e24a9f --- /dev/null +++ b/rest/api/v3/webhooks/docs/CreateParseSetting.md @@ -0,0 +1,49 @@ +# CreateParseSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**CreateParseSetting**](CreateParseSetting.md#CreateParseSetting) | **Post** /v3/user/webhooks/parse/settings | Create a parse setting + + + +## CreateParseSetting + +> ParseSetting CreateParseSetting(ctx, optional) + +Create a parse setting + +**This endpoint allows you to create a new inbound parse setting.** Creating an Inbound Parse setting requires two pieces of information: a `url` and a `hostname`. The `hostname` must correspond to a domain authenticated by Twilio SendGrid on your account. If you need to complete domain authentication, you can use the [Twilio SendGrid App](https://app.sendgrid.com/settings/sender_auth) or the **Authenticate a Domain** endpoint. See [**How to Set Up Domain Authentication**](https://sendgrid.com/docs/ui/account-and-settings/how-to-set-up-domain-authentication/) for instructions. Any email received by the `hostname` will be parsed when you complete this setup. You must also add a Twilio SendGrid MX record to this domain's DNS records. See [**Setting up the Inbound Parse Webhook**](https://sendgrid.com/docs/for-developers/parsing-email/setting-up-the-inbound-parse-webhook/) for full instructions. The `url` represents a location where the parsed message data will be delivered. Twilio SendGrid will make an HTTP POST request to this `url` with the message data. The `url` must be publicly reachable, and your application must return a `200` status code to signal that the message data has been received. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a CreateParseSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**ParseSetting** | [**ParseSetting**](ParseSetting.md) | + +### Return type + +[**ParseSetting**](ParseSetting.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/webhooks/docs/DeleteEventWebhook.md b/rest/api/v3/webhooks/docs/DeleteEventWebhook.md new file mode 100644 index 00000000..135249c7 --- /dev/null +++ b/rest/api/v3/webhooks/docs/DeleteEventWebhook.md @@ -0,0 +1,52 @@ +# DeleteEventWebhook + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteEventWebhook**](DeleteEventWebhook.md#DeleteEventWebhook) | **Delete** /v3/user/webhooks/event/settings/{Id} | Delete a single Event Webhook by ID. + + + +## DeleteEventWebhook + +> DeleteEventWebhook(ctx, Idoptional) + +Delete a single Event Webhook by ID. + +**This endpoint allows you to delete a single Event Webhook by ID.** Unlike the [**Get an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/get-an-event-webhook) and [**Update an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) endpoints, which will operate on your oldest webhook by `created_date` when you don't provide an ID, this endpoint will return an error if you do not pass it an ID. This behavior prevents customers from unintentionally deleting a webhook. You can retrieve your webhooks' IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. ### Enable or disable the webhook This endpoint will permanently delete the webhook specified. If you instead want to disable a webhook, you can set the `enabled` property to `false` with the [**Update an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the Event Webhook you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteEventWebhookParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/webhooks/docs/DeleteParseSetting.md b/rest/api/v3/webhooks/docs/DeleteParseSetting.md new file mode 100644 index 00000000..5bdf1dc3 --- /dev/null +++ b/rest/api/v3/webhooks/docs/DeleteParseSetting.md @@ -0,0 +1,52 @@ +# DeleteParseSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DeleteParseSetting**](DeleteParseSetting.md#DeleteParseSetting) | **Delete** /v3/user/webhooks/parse/settings/{Hostname} | Delete a parse setting + + + +## DeleteParseSetting + +> map[string]interface{} DeleteParseSetting(ctx, Hostnameoptional) + +Delete a parse setting + +**This endpoint allows you to delete a specific inbound parse setting by hostname.** You can retrieve all your Inbound Parse settings and their associated host names with the \"Retrieve all parse settings\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Hostname** | **string** | The hostname associated with the inbound parse setting that you would like to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a DeleteParseSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +**map[string]interface{}** + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/webhooks/docs/ErrorResponse.md b/rest/api/v3/webhooks/docs/ErrorResponse.md new file mode 100644 index 00000000..ec2d41f6 --- /dev/null +++ b/rest/api/v3/webhooks/docs/ErrorResponse.md @@ -0,0 +1,12 @@ +# ErrorResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]ErrorResponseErrorsInner**](ErrorResponseErrorsInner.md) | |[optional] +**Id** | **string** | When applicable, this property value will be an error ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/ErrorResponseErrorsInner.md b/rest/api/v3/webhooks/docs/ErrorResponseErrorsInner.md new file mode 100644 index 00000000..5449c685 --- /dev/null +++ b/rest/api/v3/webhooks/docs/ErrorResponseErrorsInner.md @@ -0,0 +1,13 @@ +# ErrorResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | An error message. |[optional] +**Field** | **string** | When applicable, this property value will be the field that generated the error. |[optional] +**Help** | **map[string]interface{}** | When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/EventWebhookAllResponse.md b/rest/api/v3/webhooks/docs/EventWebhookAllResponse.md new file mode 100644 index 00000000..fd85723d --- /dev/null +++ b/rest/api/v3/webhooks/docs/EventWebhookAllResponse.md @@ -0,0 +1,12 @@ +# EventWebhookAllResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**MaxAllowed** | **float32** | The maximum number of Event Webhooks you can have enabled under your current Twilio SendGrid plan. See the [Twilio SendGrid pricing page](https://sendgrid.com/pricing) for more information about the features available with each plan. |[optional] +**Webhooks** | [**[]EventWebhookSignedResponse**](EventWebhookSignedResponse.md) | An array of Event Webhook objects. Each object represents one of your webhooks and contains its configuration settings, including which events it is set to send in the POST request, the URL where it will send those events, and the webhook's ID. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/EventWebhookBaseResponseProps.md b/rest/api/v3/webhooks/docs/EventWebhookBaseResponseProps.md new file mode 100644 index 00000000..31b021d3 --- /dev/null +++ b/rest/api/v3/webhooks/docs/EventWebhookBaseResponseProps.md @@ -0,0 +1,26 @@ +# EventWebhookBaseResponseProps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates if the Event Webhook is enabled. |[optional] +**Url** | **string** | The URL where SendGrid will send event data. |[optional] +**AccountStatusChange** | **bool** | Indicates if the webhook is configured to send account status change events related to compliance action taken by SendGrid. |[optional] +**GroupResubscribe** | **bool** | Indicates if the webhook is configured to send group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**Delivered** | **bool** | Indicates if the webhook is configured to send delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. |[optional] +**GroupUnsubscribe** | **bool** | Indicates if the webhook is configured to send group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**SpamReport** | **bool** | Indicates if the webhook is configured to send spam report events. Spam reports occur when recipients mark a message as spam. |[optional] +**Bounce** | **bool** | Indicates if the webhook is configured to send bounce events. A bounce occurs when a receiving server could not or would not accept a message. |[optional] +**Deferred** | **bool** | Indicates if the webhook is configured to send deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. |[optional] +**Unsubscribe** | **bool** | Indicates if the webhook is configured to send unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**Processed** | **bool** | Indicates if the webhook is configured to send processed events. Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered. |[optional] +**Open** | **bool** | Indicates if the webhook is configured to send open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. |[optional] +**Click** | **bool** | Indicates if the webhook is configured to send click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. |[optional] +**Dropped** | **bool** | Indicates if the webhook is configured to send dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. |[optional] +**FriendlyName** | **string** | An optional friendly name assigned to the Event Webhook to help you differentiate it. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. |[optional] +**Id** | **string** | A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/EventWebhookDateResponseProps.md b/rest/api/v3/webhooks/docs/EventWebhookDateResponseProps.md new file mode 100644 index 00000000..e6c48f23 --- /dev/null +++ b/rest/api/v3/webhooks/docs/EventWebhookDateResponseProps.md @@ -0,0 +1,12 @@ +# EventWebhookDateResponseProps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedDate** | [**time.Time**](time.Time.md) | An ISO 8601 timestamp in UTC timezone when the Event Webhook was created. If a Webhook's `created_date` is `null`, it is a [legacy Event Webook](https://www.twilio.com/en-us/changelog/event-webhooks), which means it is your oldest Webhook. |[optional] +**UpdatedDate** | [**time.Time**](time.Time.md) | An ISO 8601 timestamp in UTC timezone when the Event Webhook was last modified. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/EventWebhookNoDatesResponse.md b/rest/api/v3/webhooks/docs/EventWebhookNoDatesResponse.md new file mode 100644 index 00000000..3da1ae81 --- /dev/null +++ b/rest/api/v3/webhooks/docs/EventWebhookNoDatesResponse.md @@ -0,0 +1,29 @@ +# EventWebhookNoDatesResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates if the Event Webhook is enabled. |[optional] +**Url** | **string** | The URL where SendGrid will send event data. |[optional] +**AccountStatusChange** | **bool** | Indicates if the webhook is configured to send account status change events related to compliance action taken by SendGrid. |[optional] +**GroupResubscribe** | **bool** | Indicates if the webhook is configured to send group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**Delivered** | **bool** | Indicates if the webhook is configured to send delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. |[optional] +**GroupUnsubscribe** | **bool** | Indicates if the webhook is configured to send group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**SpamReport** | **bool** | Indicates if the webhook is configured to send spam report events. Spam reports occur when recipients mark a message as spam. |[optional] +**Bounce** | **bool** | Indicates if the webhook is configured to send bounce events. A bounce occurs when a receiving server could not or would not accept a message. |[optional] +**Deferred** | **bool** | Indicates if the webhook is configured to send deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. |[optional] +**Unsubscribe** | **bool** | Indicates if the webhook is configured to send unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**Processed** | **bool** | Indicates if the webhook is configured to send processed events. Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered. |[optional] +**Open** | **bool** | Indicates if the webhook is configured to send open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. |[optional] +**Click** | **bool** | Indicates if the webhook is configured to send click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. |[optional] +**Dropped** | **bool** | Indicates if the webhook is configured to send dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. |[optional] +**FriendlyName** | **string** | An optional friendly name assigned to the Event Webhook to help you differentiate it. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. |[optional] +**Id** | **string** | A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. |[optional] +**OauthClientId** | **string** | The OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token. |[optional] +**OauthTokenUrl** | **string** | The URL where SendGrid sends the OAuth client ID and client secret to generate an access token. This should be your OAuth server or service provider. |[optional] +**PublicKey** | **string** | The public key you can use to verify the SendGrid signature. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/EventWebhookOauthResponseProps.md b/rest/api/v3/webhooks/docs/EventWebhookOauthResponseProps.md new file mode 100644 index 00000000..fc98cdca --- /dev/null +++ b/rest/api/v3/webhooks/docs/EventWebhookOauthResponseProps.md @@ -0,0 +1,12 @@ +# EventWebhookOauthResponseProps + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**OauthClientId** | **string** | The OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token. |[optional] +**OauthTokenUrl** | **string** | The URL where SendGrid sends the OAuth client ID and client secret to generate an access token. This should be your OAuth server or service provider. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/EventWebhookRequest.md b/rest/api/v3/webhooks/docs/EventWebhookRequest.md new file mode 100644 index 00000000..26906ee3 --- /dev/null +++ b/rest/api/v3/webhooks/docs/EventWebhookRequest.md @@ -0,0 +1,27 @@ +# EventWebhookRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Set this property to `true` to enable the Event Webhook or `false` to disable it. |[optional] +**Url** | **string** | Set this property to the URL where you want the Event Webhook to send event data. | +**GroupResubscribe** | **bool** | Set this property to `true` to receive group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**Delivered** | **bool** | Set this property to `true` to receive delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. |[optional] +**GroupUnsubscribe** | **bool** | Set this property to `true` to receive group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**SpamReport** | **bool** | Set this property to `true` to receive spam report events. Spam reports occur when recipients mark a message as spam. |[optional] +**Bounce** | **bool** | Set this property to `true` to receive bounce events. A bounce occurs when a receiving server could not or would not accept a message. |[optional] +**Deferred** | **bool** | Set this property to `true` to receive deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. |[optional] +**Unsubscribe** | **bool** | Set this property to `true` to receive unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**Processed** | **bool** | Set this property to `true` to receive processed events. Processed events occur when a message has been received by Twilio SendGrid and the message is ready to be delivered. |[optional] +**Open** | **bool** | Set this property to `true` to receive open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. |[optional] +**Click** | **bool** | Set this property to `true` to receive click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. |[optional] +**Dropped** | **bool** | Set this property to `true` to receive dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. |[optional] +**FriendlyName** | **string** | Optionally set this property to a friendly name for the Event Webhook. A friendly name may be assigned to each of your webhooks to help you differentiate them. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. |[optional] +**OauthClientId** | **string** | Set this property to the OAuth client ID that SendGrid will pass to your OAuth server or service provider to generate an OAuth access token. When passing data in this property, you must also include the `oauth_token_url` property. |[optional] +**OauthClientSecret** | **string** | Set this property to the OAuth client secret that SendGrid will pass to your OAuth server or service provider to generate an OAuth access token. This secret is needed only once to create an access token. SendGrid will store the secret, allowing you to update your client ID and Token URL without passing the secret to SendGrid again. When passing data in this field, you must also include the `oauth_client_id` and `oauth_token_url` properties. |[optional] +**OauthTokenUrl** | **string** | Set this property to the URL where SendGrid will send the OAuth client ID and client secret to generate an OAuth access token. This should be your OAuth server or service provider. When passing data in this field, you must also include the `oauth_client_id` property. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/EventWebhookSignedResponse.md b/rest/api/v3/webhooks/docs/EventWebhookSignedResponse.md new file mode 100644 index 00000000..089b485e --- /dev/null +++ b/rest/api/v3/webhooks/docs/EventWebhookSignedResponse.md @@ -0,0 +1,31 @@ +# EventWebhookSignedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates if the Event Webhook is enabled. |[optional] +**Url** | **string** | The URL where SendGrid will send event data. |[optional] +**AccountStatusChange** | **bool** | Indicates if the webhook is configured to send account status change events related to compliance action taken by SendGrid. |[optional] +**GroupResubscribe** | **bool** | Indicates if the webhook is configured to send group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**Delivered** | **bool** | Indicates if the webhook is configured to send delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. |[optional] +**GroupUnsubscribe** | **bool** | Indicates if the webhook is configured to send group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**SpamReport** | **bool** | Indicates if the webhook is configured to send spam report events. Spam reports occur when recipients mark a message as spam. |[optional] +**Bounce** | **bool** | Indicates if the webhook is configured to send bounce events. A bounce occurs when a receiving server could not or would not accept a message. |[optional] +**Deferred** | **bool** | Indicates if the webhook is configured to send deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. |[optional] +**Unsubscribe** | **bool** | Indicates if the webhook is configured to send unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**Processed** | **bool** | Indicates if the webhook is configured to send processed events. Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered. |[optional] +**Open** | **bool** | Indicates if the webhook is configured to send open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. |[optional] +**Click** | **bool** | Indicates if the webhook is configured to send click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. |[optional] +**Dropped** | **bool** | Indicates if the webhook is configured to send dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. |[optional] +**FriendlyName** | **string** | An optional friendly name assigned to the Event Webhook to help you differentiate it. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. |[optional] +**Id** | **string** | A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. |[optional] +**CreatedDate** | [**time.Time**](time.Time.md) | An ISO 8601 timestamp in UTC timezone when the Event Webhook was created. If a Webhook's `created_date` is `null`, it is a [legacy Event Webook](https://www.twilio.com/en-us/changelog/event-webhooks), which means it is your oldest Webhook. |[optional] +**UpdatedDate** | [**time.Time**](time.Time.md) | An ISO 8601 timestamp in UTC timezone when the Event Webhook was last modified. |[optional] +**OauthClientId** | **string** | The OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token. |[optional] +**OauthTokenUrl** | **string** | The URL where SendGrid sends the OAuth client ID and client secret to generate an access token. This should be your OAuth server or service provider. |[optional] +**PublicKey** | **string** | The public key you can use to verify the SendGrid signature. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/EventWebhookSignedResponseProp.md b/rest/api/v3/webhooks/docs/EventWebhookSignedResponseProp.md new file mode 100644 index 00000000..dfdae0d7 --- /dev/null +++ b/rest/api/v3/webhooks/docs/EventWebhookSignedResponseProp.md @@ -0,0 +1,11 @@ +# EventWebhookSignedResponseProp + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**PublicKey** | **string** | The public key you can use to verify the SendGrid signature. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/EventWebhookTestRequest.md b/rest/api/v3/webhooks/docs/EventWebhookTestRequest.md new file mode 100644 index 00000000..f09ac2de --- /dev/null +++ b/rest/api/v3/webhooks/docs/EventWebhookTestRequest.md @@ -0,0 +1,15 @@ +# EventWebhookTestRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | The ID of the Event Webhook you want to retrieve. |[optional] +**Url** | **string** | The URL where you would like the test notification to be sent. | +**OauthClientId** | **string** | The client ID Twilio SendGrid sends to your OAuth server or service provider to generate an OAuth access token. When passing data in this property, you must also include the `oauth_token_url` property. |[optional] +**OauthClientSecret** | **string** | The `oauth_client_secret` is needed only once to create an access token. SendGrid will store this secret, allowing you to update your Client ID and Token URL without passing the secret to SendGrid again. When passing data in this field, you must also include the `oauth_client_id` and `oauth_token_url` properties. |[optional] +**OauthTokenUrl** | **string** | The URL where Twilio SendGrid sends the Client ID and Client Secret to generate an access token. This should be your OAuth server or service provider. When passing data in this field, you must also include the `oauth_client_id` property. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/EventWebhookUnsignedResponse.md b/rest/api/v3/webhooks/docs/EventWebhookUnsignedResponse.md new file mode 100644 index 00000000..e2e3a0d8 --- /dev/null +++ b/rest/api/v3/webhooks/docs/EventWebhookUnsignedResponse.md @@ -0,0 +1,30 @@ +# EventWebhookUnsignedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Indicates if the Event Webhook is enabled. |[optional] +**Url** | **string** | The URL where SendGrid will send event data. |[optional] +**AccountStatusChange** | **bool** | Indicates if the webhook is configured to send account status change events related to compliance action taken by SendGrid. |[optional] +**GroupResubscribe** | **bool** | Indicates if the webhook is configured to send group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**Delivered** | **bool** | Indicates if the webhook is configured to send delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. |[optional] +**GroupUnsubscribe** | **bool** | Indicates if the webhook is configured to send group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**SpamReport** | **bool** | Indicates if the webhook is configured to send spam report events. Spam reports occur when recipients mark a message as spam. |[optional] +**Bounce** | **bool** | Indicates if the webhook is configured to send bounce events. A bounce occurs when a receiving server could not or would not accept a message. |[optional] +**Deferred** | **bool** | Indicates if the webhook is configured to send deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. |[optional] +**Unsubscribe** | **bool** | Indicates if the webhook is configured to send unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. |[optional] +**Processed** | **bool** | Indicates if the webhook is configured to send processed events. Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered. |[optional] +**Open** | **bool** | Indicates if the webhook is configured to send open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. |[optional] +**Click** | **bool** | Indicates if the webhook is configured to send click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. |[optional] +**Dropped** | **bool** | Indicates if the webhook is configured to send dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. |[optional] +**FriendlyName** | **string** | An optional friendly name assigned to the Event Webhook to help you differentiate it. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. |[optional] +**Id** | **string** | A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. |[optional] +**CreatedDate** | [**time.Time**](time.Time.md) | An ISO 8601 timestamp in UTC timezone when the Event Webhook was created. If a Webhook's `created_date` is `null`, it is a [legacy Event Webook](https://www.twilio.com/en-us/changelog/event-webhooks), which means it is your oldest Webhook. |[optional] +**UpdatedDate** | [**time.Time**](time.Time.md) | An ISO 8601 timestamp in UTC timezone when the Event Webhook was last modified. |[optional] +**OauthClientId** | **string** | The OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token. |[optional] +**OauthTokenUrl** | **string** | The URL where SendGrid sends the OAuth client ID and client secret to generate an access token. This should be your OAuth server or service provider. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/GetEventWebhook.md b/rest/api/v3/webhooks/docs/GetEventWebhook.md new file mode 100644 index 00000000..db760440 --- /dev/null +++ b/rest/api/v3/webhooks/docs/GetEventWebhook.md @@ -0,0 +1,53 @@ +# GetEventWebhook + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetEventWebhook**](GetEventWebhook.md#GetEventWebhook) | **Get** /v3/user/webhooks/event/settings/{Id} | Get the settings for a single Event Webhook. + + + +## GetEventWebhook + +> EventWebhookNoDatesResponse GetEventWebhook(ctx, Idoptional) + +Get the settings for a single Event Webhook. + +**This endpoint allows you to retrieve a single Event Webhook by ID.** If you do not pass a webhook ID to this endpoint, it will return your oldest webhook by `created_date`. This means the default webhook returned by this endpoint when no ID is provided will be the first one you created. This functionality allows customers who do not have multiple webhooks to use this endpoint to retrieve their only webhook, even if they do not supply an ID. If you have multiple webhooks, you can retrieve their IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. ### Event settings Your webhook will be returned with all of its settings, which include the events that will be included in the POST request by the webhook and the URL where they will be sent. If an event type is marked as `true`, the event webhook will send information about that event type. See the [**Event Webhook Reference**](https://docs.sendgrid.com/for-developers/tracking-events/event#delivery-events) for details about each event type. ### Signature verification The `public_key` property will be returned only for webhooks with signature verification enabled. ### OAuth You may share one OAuth configuration across all your webhooks or create unique credentials for each. The OAuth properties will be returned only for webhooks with OAuth configured. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the Event Webhook you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetEventWebhookParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**Include** | **string** | Use this to include optional fields in the response payload. When this is set to `include=account_status_change`, the `account_status_change` field will be part of the response payload and set to `false` by default. See [Update an event webhook](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) for enabling this webhook notification which lets you subscribe to account status change events related to compliance action taken by SendGrid. + +### Return type + +[**EventWebhookNoDatesResponse**](EventWebhookNoDatesResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/webhooks/docs/GetParseSetting.md b/rest/api/v3/webhooks/docs/GetParseSetting.md new file mode 100644 index 00000000..7350f622 --- /dev/null +++ b/rest/api/v3/webhooks/docs/GetParseSetting.md @@ -0,0 +1,52 @@ +# GetParseSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetParseSetting**](GetParseSetting.md#GetParseSetting) | **Get** /v3/user/webhooks/parse/settings/{Hostname} | Retrieve a specific parse setting + + + +## GetParseSetting + +> ParseSetting GetParseSetting(ctx, Hostnameoptional) + +Retrieve a specific parse setting + +**This endpoint allows you to retrieve a specific inbound parse setting by hostname.** You can retrieve all your Inbound Parse settings and their associated host names with the \"Retrieve all parse settings\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Hostname** | **string** | The hostname associated with the inbound parse setting that you would like to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetParseSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ParseSetting**](ParseSetting.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/webhooks/docs/GetSignedEventWebhook.md b/rest/api/v3/webhooks/docs/GetSignedEventWebhook.md new file mode 100644 index 00000000..bef22a2c --- /dev/null +++ b/rest/api/v3/webhooks/docs/GetSignedEventWebhook.md @@ -0,0 +1,52 @@ +# GetSignedEventWebhook + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GetSignedEventWebhook**](GetSignedEventWebhook.md#GetSignedEventWebhook) | **Get** /v3/user/webhooks/event/settings/signed/{Id} | Get Signed Event Webhook's Public Key + + + +## GetSignedEventWebhook + +> GetSignedEventWebhook200Response GetSignedEventWebhook(ctx, Idoptional) + +Get Signed Event Webhook's Public Key + +**This endpoint allows you to retrieve the public key for a single Event Webhook by ID.** If you do not pass a webhook ID to this endpoint, it will return the public key for your oldest webhook by `created_date`. This means the default key returned by this endpoint when no ID is provided will be for the first webhook you created. This functionality allows customers who do not have multiple webhooks to use this endpoint to retrieve their only webhook's public key, even if they do not supply an ID. If you have multiple webhooks, you can retrieve their IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. Once you have enabled signature verification for a webhook, you will need the public key provided to verify the signatures on requests coming from Twilio SendGrid. You can use the webhook ID to [enable or disable signature verification with the endpoint dedicated for that operation](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook). For more information about cryptographically signing the Event Webhook, see [**Getting Started with the Event Webhook Security Features**](https://sendgrid.com/docs/for-developers/tracking-events/getting-started-event-webhook-security-features). + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the Event Webhook you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a GetSignedEventWebhookParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**GetSignedEventWebhook200Response**](GetSignedEventWebhook200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/webhooks/docs/GetSignedEventWebhook200Response.md b/rest/api/v3/webhooks/docs/GetSignedEventWebhook200Response.md new file mode 100644 index 00000000..d6c88517 --- /dev/null +++ b/rest/api/v3/webhooks/docs/GetSignedEventWebhook200Response.md @@ -0,0 +1,12 @@ +# GetSignedEventWebhook200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. |[optional] +**PublicKey** | **string** | The public key you can use to verify the Twilio SendGrid signature. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/GetSignedEventWebhook404Response.md b/rest/api/v3/webhooks/docs/GetSignedEventWebhook404Response.md new file mode 100644 index 00000000..61619203 --- /dev/null +++ b/rest/api/v3/webhooks/docs/GetSignedEventWebhook404Response.md @@ -0,0 +1,11 @@ +# GetSignedEventWebhook404Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Errors** | [**[]GetSignedEventWebhook404ResponseErrorsInner**](GetSignedEventWebhook404ResponseErrorsInner.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/GetSignedEventWebhook404ResponseErrorsInner.md b/rest/api/v3/webhooks/docs/GetSignedEventWebhook404ResponseErrorsInner.md new file mode 100644 index 00000000..4dc38426 --- /dev/null +++ b/rest/api/v3/webhooks/docs/GetSignedEventWebhook404ResponseErrorsInner.md @@ -0,0 +1,11 @@ +# GetSignedEventWebhook404ResponseErrorsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Message** | **string** | Error message. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/ListEventWebhook.md b/rest/api/v3/webhooks/docs/ListEventWebhook.md new file mode 100644 index 00000000..d6193762 --- /dev/null +++ b/rest/api/v3/webhooks/docs/ListEventWebhook.md @@ -0,0 +1,49 @@ +# ListEventWebhook + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListEventWebhook**](ListEventWebhook.md#ListEventWebhook) | **Get** /v3/user/webhooks/event/settings/all | Retrieve all of your Event Webhooks. + + + +## ListEventWebhook + +> EventWebhookAllResponse ListEventWebhook(ctx, optional) + +Retrieve all of your Event Webhooks. + +**This endpoint allows you to retrieve all of your Event Webhooks.** Each webhook will be returned as an object in the `webhooks` array with the webhook's configuration details and ID. You can use a webhook's ID to [update the webhook's settings](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook), [delete the webhook](https://docs.sendgrid.com/api-reference/webhooks/delete-an-event-webhook), [enable or disable signature verification for the webhook](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook), and, if signature verification is enabled, [retrieve the webhook's public key](https://docs.sendgrid.com/api-reference/webhooks/get-signed-event-webhooks-public-key) when signature verification is enabled. ### Event settings Each webhook's settings determine which events will be included in the POST request by the webhook and the URL where the request will be sent. See the [**Event Webhook Reference**](https://docs.sendgrid.com/for-developers/tracking-events/event#delivery-events) for details about each event type. ### Signature verification The `public_key` property will be returned only for webhooks with signature verification enabled. ### OAuth You may share one OAuth configuration across all your webhooks or create unique credentials for each. The OAuth properties will be returned only for webhooks with OAuth configured. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListEventWebhookParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**Include** | **string** | Use this to include optional fields in the response payload. When this is set to `include=account_status_change`, the `account_status_change` field will be part of the response payload and set to `false` by default. See [Update an event webhook](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) for enabling this webhook notification which lets you subscribe to account status change events related to compliance action taken by SendGrid. + +### Return type + +[**EventWebhookAllResponse**](EventWebhookAllResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/webhooks/docs/ListParseSetting.md b/rest/api/v3/webhooks/docs/ListParseSetting.md new file mode 100644 index 00000000..919d1c50 --- /dev/null +++ b/rest/api/v3/webhooks/docs/ListParseSetting.md @@ -0,0 +1,48 @@ +# ListParseSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListParseSetting**](ListParseSetting.md#ListParseSetting) | **Get** /v3/user/webhooks/parse/settings | Retrieve all parse settings + + + +## ListParseSetting + +> ListParseSetting200Response ListParseSetting(ctx, optional) + +Retrieve all parse settings + +**This endpoint allows you to retrieve all of your current inbound parse settings.** + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListParseSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**ListParseSetting200Response**](ListParseSetting200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/webhooks/docs/ListParseSetting200Response.md b/rest/api/v3/webhooks/docs/ListParseSetting200Response.md new file mode 100644 index 00000000..b6777bb0 --- /dev/null +++ b/rest/api/v3/webhooks/docs/ListParseSetting200Response.md @@ -0,0 +1,11 @@ +# ListParseSetting200Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Result** | [**[]ParseSetting**](ParseSetting.md) | The list of your current inbound parse settings. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/ListParseStatic.md b/rest/api/v3/webhooks/docs/ListParseStatic.md new file mode 100644 index 00000000..7da90539 --- /dev/null +++ b/rest/api/v3/webhooks/docs/ListParseStatic.md @@ -0,0 +1,52 @@ +# ListParseStatic + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ListParseStatic**](ListParseStatic.md#ListParseStatic) | **Get** /v3/user/webhooks/parse/stats | Retrieves Inbound Parse Webhook statistics. + + + +## ListParseStatic + +> []ListParseStatic200ResponseInner ListParseStatic(ctx, StartDateoptional) + +Retrieves Inbound Parse Webhook statistics. + +**This endpoint allows you to retrieve the statistics for your Parse Webhook usage.** SendGrid's Inbound Parse Webhook allows you to parse the contents and attachments of incoming emails. The Parse API can then POST the parsed emails to a URL that you specify. The Inbound Parse Webhook cannot parse messages greater than 30MB in size, including all attachments. There are a number of pre-made integrations for the SendGrid Parse Webhook which make processing events easy. You can find these integrations in the [Library Index](https://docs.sendgrid.com/for-developers/sending-email/libraries#webhook-libraries). + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a ListParseStaticParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Limit** | **string** | The number of statistics to return on each page. +**Offset** | **string** | The number of statistics to skip. +**AggregatedBy** | [**AggregatedBy**](AggregatedByAggregatedBy.md) | How you would like the statistics to by grouped. +**EndDate** | **string** | The end date of the statistics you want to retrieve. Must be in the format YYYY-MM-DD +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. + +### Return type + +[**[]ListParseStatic200ResponseInner**](ListParseStatic200ResponseInner.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/webhooks/docs/ListParseStatic200ResponseInner.md b/rest/api/v3/webhooks/docs/ListParseStatic200ResponseInner.md new file mode 100644 index 00000000..71c9d470 --- /dev/null +++ b/rest/api/v3/webhooks/docs/ListParseStatic200ResponseInner.md @@ -0,0 +1,12 @@ +# ListParseStatic200ResponseInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Date** | **string** | The date that the stats were collected. | +**Stats** | [**[]ListParseStatic200ResponseInnerStatsInner**](ListParseStatic200ResponseInnerStatsInner.md) | The Parse Webhook usage statistics. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/ListParseStatic200ResponseInnerStatsInner.md b/rest/api/v3/webhooks/docs/ListParseStatic200ResponseInnerStatsInner.md new file mode 100644 index 00000000..31d9441c --- /dev/null +++ b/rest/api/v3/webhooks/docs/ListParseStatic200ResponseInnerStatsInner.md @@ -0,0 +1,11 @@ +# ListParseStatic200ResponseInnerStatsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Metrics** | [**ListParseStatic200ResponseInnerStatsInnerMetrics**](ListParseStatic200ResponseInnerStatsInnerMetrics.md) | |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/ListParseStatic200ResponseInnerStatsInnerMetrics.md b/rest/api/v3/webhooks/docs/ListParseStatic200ResponseInnerStatsInnerMetrics.md new file mode 100644 index 00000000..a0648924 --- /dev/null +++ b/rest/api/v3/webhooks/docs/ListParseStatic200ResponseInnerStatsInnerMetrics.md @@ -0,0 +1,11 @@ +# ListParseStatic200ResponseInnerStatsInnerMetrics + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Received** | **float32** | The number of emails received and parsed by the Parse Webhook. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/ParseSetting.md b/rest/api/v3/webhooks/docs/ParseSetting.md new file mode 100644 index 00000000..344e4bf8 --- /dev/null +++ b/rest/api/v3/webhooks/docs/ParseSetting.md @@ -0,0 +1,14 @@ +# ParseSetting + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Url** | **string** | The public URL where you would like SendGrid to POST the data parsed from your email. Any emails sent with the given hostname provided (whose MX records have been updated to point to SendGrid) will be parsed and POSTed to this URL. |[optional] +**Hostname** | **string** | A specific and unique domain or subdomain that you have created to use exclusively to parse your incoming email. For example, `parse.yourdomain.com`. |[optional] +**SpamCheck** | **bool** | Indicates if you would like SendGrid to check the content parsed from your emails for spam before POSTing them to your domain. |[optional] +**SendRaw** | **bool** | Indicates if you would like SendGrid to post the original MIME-type content of your parsed email. When this parameter is set to `true`, SendGrid will send a JSON payload of the content of your email. |[optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/docs/TestEventWebhook.md b/rest/api/v3/webhooks/docs/TestEventWebhook.md new file mode 100644 index 00000000..86581df0 --- /dev/null +++ b/rest/api/v3/webhooks/docs/TestEventWebhook.md @@ -0,0 +1,49 @@ +# TestEventWebhook + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**TestEventWebhook**](TestEventWebhook.md#TestEventWebhook) | **Post** /v3/user/webhooks/event/test | Test an Event Webhook's settings + + + +## TestEventWebhook + +> TestEventWebhook(ctx, optional) + +Test an Event Webhook's settings + +**This endpoint allows you to test an Event Webhook.** Retry logic for this endpoint differs from other endpoints, which use a rolling 24-hour retry. This endpoint will make a POST request with a fake event notification to a URL you provide. This allows you to verify that you have properly configured the webhook before sending real data to your URL. ### Test OAuth configuration To test your OAuth configuration, you must include the necessary OAuth properties: `oauth_client_id`, `oauth_client_secret`, and `oauth_token_url`. If the webhook you are testing already has OAuth credentials saved, you will provide only the `oauth_client_id` and `oauth_token_url`—we will pull the secret for you. If you are testing a new set of OAuth credentials that have not been saved with SendGrid, you must provide all three property values. You can retrieve a previously saved `oauth_client_id` and `oauth_token_url` from the [**Get an Event Webhook**](https://docs.sendgrid.com/api-reference/webhooks/get-an-event-webhook) endpoint; however, for security reasons, SendGrid will not provide your `oauth_client_secret`. + +### Path Parameters + +This endpoint does not need any path parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a TestEventWebhookParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**EventWebhookTestRequest** | [**EventWebhookTestRequest**](EventWebhookTestRequest.md) | + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: Not defined + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/webhooks/docs/UpdateEventWebhook.md b/rest/api/v3/webhooks/docs/UpdateEventWebhook.md new file mode 100644 index 00000000..005976c1 --- /dev/null +++ b/rest/api/v3/webhooks/docs/UpdateEventWebhook.md @@ -0,0 +1,54 @@ +# UpdateEventWebhook + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateEventWebhook**](UpdateEventWebhook.md#UpdateEventWebhook) | **Patch** /v3/user/webhooks/event/settings/{Id} | Update a single Event Webhook by ID. + + + +## UpdateEventWebhook + +> EventWebhookUnsignedResponse UpdateEventWebhook(ctx, Idoptional) + +Update a single Event Webhook by ID. + +**This endpoint allows you to update a single Event Webhook by ID.** If you do not pass a webhook ID to this endpoint, it will update and return your oldest webhook by `created_date`. This means the default webhook updated by this endpoint when no ID is provided will be the first one you created. This functionality allows customers who do not have multiple webhooks to use this endpoint to update their only webhook, even if they do not supply an ID. If you have multiple webhooks, you can retrieve their IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. ### Enable or disable the webhook You can set the `enabled` property to `true` to enable the webhook or `false` to disable it. Disabling a webhook will not delete it from your account, but it will prevent the webhook from sending events to your designated URL. ### URL A webhook's URL is the endpoint where you want the webhook to send POST requests containing event data. No more than one webhook may be configured to send to the same URL. SendGrid will return an error if you attempt to set a URL for a webhook that is already in use by the user on another webhook. ### Event settings If an event type is marked as `true`, the event webhook will send information about that event type. See the [**Event Webhook Reference**](https://docs.sendgrid.com/for-developers/tracking-events/event#delivery-events) for details about each event type. ### Webhook identifiers You may assign an optional friendly name to each of your webhooks. The friendly name is for convenience only and should not be used to programmatically differentiate your webhooks because it does not need to be unique. ### OAuth You can configure OAuth for your webhook by passing the required values to this endpoint in the `oauth_client_id`, `oauth_client_secret`, and `oauth_token_url` properties. To disable OAuth, pass an empty string to this endpoint for each of the OAuth properties. You may share one OAuth configuration across all your webhooks or create unique credentials for each. See our [webhook security documentation](https://docs.sendgrid.com/for-developers/tracking-events/getting-started-event-webhook-security-features#oauth-20) for more detailed information about OAuth and the Event Webhook. ### Signature verification Enabling signature verification for your webhook is a separate process and cannot be done with this endpoint. You can use the webhook ID to [enable or disable signature verification with the endpoint dedicated for that operation](https://docs.sendgrid.com/api-reference/webhooks/toggle-signature-verification-for-an-event-webhook). + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the Event Webhook you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateEventWebhookParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**Include** | **string** | Use this to include optional fields in the response payload. When this is set to `include=account_status_change`, the `account_status_change` field will be part of the response payload and set to `false` by default. See [Update an event webhook](https://docs.sendgrid.com/api-reference/webhooks/update-an-event-webhook) for enabling this webhook notification which lets you subscribe to account status change events related to compliance action taken by SendGrid. +**EventWebhookRequest** | [**EventWebhookRequest**](EventWebhookRequest.md) | + +### Return type + +[**EventWebhookUnsignedResponse**](EventWebhookUnsignedResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/webhooks/docs/UpdateParseSetting.md b/rest/api/v3/webhooks/docs/UpdateParseSetting.md new file mode 100644 index 00000000..ae9e970e --- /dev/null +++ b/rest/api/v3/webhooks/docs/UpdateParseSetting.md @@ -0,0 +1,53 @@ +# UpdateParseSetting + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateParseSetting**](UpdateParseSetting.md#UpdateParseSetting) | **Patch** /v3/user/webhooks/parse/settings/{Hostname} | Update a parse setting + + + +## UpdateParseSetting + +> ParseSetting UpdateParseSetting(ctx, Hostnameoptional) + +Update a parse setting + +**This endpoint allows you to update a specific inbound parse setting by hostname.** You can retrieve all your Inbound Parse settings and their associated host names with the \"Retrieve all parse settings\" endpoint. + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Hostname** | **string** | The hostname associated with the inbound parse setting that you would like to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateParseSettingParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**ParseSetting** | [**ParseSetting**](ParseSetting.md) | + +### Return type + +[**ParseSetting**](ParseSetting.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/webhooks/docs/UpdateSignedEventWebhook.md b/rest/api/v3/webhooks/docs/UpdateSignedEventWebhook.md new file mode 100644 index 00000000..8fa6e5d7 --- /dev/null +++ b/rest/api/v3/webhooks/docs/UpdateSignedEventWebhook.md @@ -0,0 +1,53 @@ +# UpdateSignedEventWebhook + +All URIs are relative to *https://api.sendgrid.com* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**UpdateSignedEventWebhook**](UpdateSignedEventWebhook.md#UpdateSignedEventWebhook) | **Patch** /v3/user/webhooks/event/settings/signed/{Id} | Toggle signature verification for a single Event Webhook by ID + + + +## UpdateSignedEventWebhook + +> GetSignedEventWebhook200Response UpdateSignedEventWebhook(ctx, Idoptional) + +Toggle signature verification for a single Event Webhook by ID + +**This endpoint allows you to enable or disable signature verification for a single Event Webhook by ID.** If you do not pass a webhook ID to this endpoint, it will enable signature verification for your oldest webhook by `created_date`. This means the default webhook operated on by this endpoint when no ID is provided will be the first one you created. This functionality allows customers who do not have multiple webhooks to enable or disable signature verifiction for their only webhook, even if they do not supply an ID. If you have multiple webhooks, you can retrieve their IDs using the [**Get All Event Webhooks**](https://docs.sendgrid.com/api-reference/webhooks/get-all-event-webhooks) endpoint. This endpoint accepts a single boolean request property, `enabled`, that can be set `true` or `false` to enable or disable signature verification. This endpoint will return the public key required to verify Twilio SendGrid signatures if it is enabled or an empty string if signing is disabled. You can also retrieve your public key using the [**Get an Event Webhook's Public Key**](https://docs.sendgrid.com/api-reference/webhooks/get-signed-event-webhooks-public-key) endpoint. For more information about cryptographically signing the Event Webhook, see [**Getting Started with the Event Webhook Security Features**](https://sendgrid.com/docs/for-developers/tracking-events/getting-started-event-webhook-security-features). + +### Path Parameters + + +Name | Type | Description +------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**Id** | **string** | The ID of the Event Webhook you want to retrieve. + +### Other Parameters + +Other parameters are passed through a pointer to a UpdateSignedEventWebhookParams struct + + +Name | Type | Description +------------- | ------------- | ------------- +**Onbehalfof** | **string** | The `on-behalf-of` header allows you to make API calls from a parent account on behalf of the parent's Subusers or customer accounts. You will use the parent account's API key when using this header. When making a call on behalf of a customer account, the property value should be \"account-id\" followed by the customer account's ID (e.g., `on-behalf-of: account-id `). When making a call on behalf of a Subuser, the property value should be the Subuser's username (e.g., `on-behalf-of: `). See [**On Behalf Of**](https://docs.sendgrid.com/api-reference/how-to-use-the-sendgrid-v3-api/on-behalf-of) for more information. +**UpdateSignedEventWebhookRequest** | [**UpdateSignedEventWebhookRequest**](UpdateSignedEventWebhookRequest.md) | + +### Return type + +[**GetSignedEventWebhook200Response**](GetSignedEventWebhook200Response.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) +[[Back to Model list]](../README.md#documentation-for-models) +[[Back to README]](../README.md) + diff --git a/rest/api/v3/webhooks/docs/UpdateSignedEventWebhookRequest.md b/rest/api/v3/webhooks/docs/UpdateSignedEventWebhookRequest.md new file mode 100644 index 00000000..d2364a21 --- /dev/null +++ b/rest/api/v3/webhooks/docs/UpdateSignedEventWebhookRequest.md @@ -0,0 +1,11 @@ +# UpdateSignedEventWebhookRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Enabled** | **bool** | Enable or disable the webhook by setting this property to `true` or `false`, respectively. | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/rest/api/v3/webhooks/model_aggregated_by.go b/rest/api/v3/webhooks/model_aggregated_by.go new file mode 100644 index 00000000..32a394b9 --- /dev/null +++ b/rest/api/v3/webhooks/model_aggregated_by.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// AggregatedBy the model 'AggregatedBy' +type AggregatedBy string + +// List of AggregatedBy +const ( + AGGREGATEDBY_DAY AggregatedBy = "day" + AGGREGATEDBY_WEEK AggregatedBy = "week" + AGGREGATEDBY_MONTH AggregatedBy = "month" +) diff --git a/rest/api/v3/webhooks/model_create_event_webhook_400_response.go b/rest/api/v3/webhooks/model_create_event_webhook_400_response.go new file mode 100644 index 00000000..d6e50ac2 --- /dev/null +++ b/rest/api/v3/webhooks/model_create_event_webhook_400_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateEventWebhook400Response struct for CreateEventWebhook400Response +type CreateEventWebhook400Response struct { + Errors *[]CreateEventWebhook400ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_create_event_webhook_400_response_errors_inner.go b/rest/api/v3/webhooks/model_create_event_webhook_400_response_errors_inner.go new file mode 100644 index 00000000..74a5296f --- /dev/null +++ b/rest/api/v3/webhooks/model_create_event_webhook_400_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// CreateEventWebhook400ResponseErrorsInner struct for CreateEventWebhook400ResponseErrorsInner +type CreateEventWebhook400ResponseErrorsInner struct { + // The ID of a Webhook that exists on your account that is already configured to send events to the endpoint URL you provided. + Id *string `json:"id,omitempty"` + // Error message. + Message *string `json:"message,omitempty"` + // The URL that is already configured as a Webhook endpoint for one of your existing Webhooks. + Url *string `json:"url,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_error_response.go b/rest/api/v3/webhooks/model_error_response.go new file mode 100644 index 00000000..ee43ea98 --- /dev/null +++ b/rest/api/v3/webhooks/model_error_response.go @@ -0,0 +1,21 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponse struct for ErrorResponse +type ErrorResponse struct { + Errors *[]ErrorResponseErrorsInner `json:"errors,omitempty"` + // When applicable, this property value will be an error ID. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_error_response_errors_inner.go b/rest/api/v3/webhooks/model_error_response_errors_inner.go new file mode 100644 index 00000000..a946dccd --- /dev/null +++ b/rest/api/v3/webhooks/model_error_response_errors_inner.go @@ -0,0 +1,24 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ErrorResponseErrorsInner struct for ErrorResponseErrorsInner +type ErrorResponseErrorsInner struct { + // An error message. + Message *string `json:"message,omitempty"` + // When applicable, this property value will be the field that generated the error. + Field *string `json:"field,omitempty"` + // When applicable, this property value will be helper text or a link to documentation to help you troubleshoot the error. + Help *map[string]interface{} `json:"help,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_event_webhook_all_response.go b/rest/api/v3/webhooks/model_event_webhook_all_response.go new file mode 100644 index 00000000..88a98136 --- /dev/null +++ b/rest/api/v3/webhooks/model_event_webhook_all_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// EventWebhookAllResponse struct for EventWebhookAllResponse +type EventWebhookAllResponse struct { + // The maximum number of Event Webhooks you can have enabled under your current Twilio SendGrid plan. See the [Twilio SendGrid pricing page](https://sendgrid.com/pricing) for more information about the features available with each plan. + MaxAllowed *float32 `json:"max_allowed,omitempty"` + // An array of Event Webhook objects. Each object represents one of your webhooks and contains its configuration settings, including which events it is set to send in the POST request, the URL where it will send those events, and the webhook's ID. + Webhooks *[]EventWebhookSignedResponse `json:"webhooks,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_event_webhook_base_response_props.go b/rest/api/v3/webhooks/model_event_webhook_base_response_props.go new file mode 100644 index 00000000..54cc937e --- /dev/null +++ b/rest/api/v3/webhooks/model_event_webhook_base_response_props.go @@ -0,0 +1,50 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// EventWebhookBaseResponseProps struct for EventWebhookBaseResponseProps +type EventWebhookBaseResponseProps struct { + // Indicates if the Event Webhook is enabled. + Enabled *bool `json:"enabled,omitempty"` + // The URL where SendGrid will send event data. + Url *string `json:"url,omitempty"` + // Indicates if the webhook is configured to send account status change events related to compliance action taken by SendGrid. + AccountStatusChange *bool `json:"account_status_change,omitempty"` + // Indicates if the webhook is configured to send group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + GroupResubscribe *bool `json:"group_resubscribe,omitempty"` + // Indicates if the webhook is configured to send delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. + Delivered *bool `json:"delivered,omitempty"` + // Indicates if the webhook is configured to send group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + GroupUnsubscribe *bool `json:"group_unsubscribe,omitempty"` + // Indicates if the webhook is configured to send spam report events. Spam reports occur when recipients mark a message as spam. + SpamReport *bool `json:"spam_report,omitempty"` + // Indicates if the webhook is configured to send bounce events. A bounce occurs when a receiving server could not or would not accept a message. + Bounce *bool `json:"bounce,omitempty"` + // Indicates if the webhook is configured to send deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. + Deferred *bool `json:"deferred,omitempty"` + // Indicates if the webhook is configured to send unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + Unsubscribe *bool `json:"unsubscribe,omitempty"` + // Indicates if the webhook is configured to send processed events. Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered. + Processed *bool `json:"processed,omitempty"` + // Indicates if the webhook is configured to send open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. + Open *bool `json:"open,omitempty"` + // Indicates if the webhook is configured to send click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. + Click *bool `json:"click,omitempty"` + // Indicates if the webhook is configured to send dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. + Dropped *bool `json:"dropped,omitempty"` + // An optional friendly name assigned to the Event Webhook to help you differentiate it. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. + FriendlyName *string `json:"friendly_name,omitempty"` + // A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. + Id *string `json:"id,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_event_webhook_date_response_props.go b/rest/api/v3/webhooks/model_event_webhook_date_response_props.go new file mode 100644 index 00000000..b848c4ae --- /dev/null +++ b/rest/api/v3/webhooks/model_event_webhook_date_response_props.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "time" +) + +// EventWebhookDateResponseProps struct for EventWebhookDateResponseProps +type EventWebhookDateResponseProps struct { + // An ISO 8601 timestamp in UTC timezone when the Event Webhook was created. If a Webhook's `created_date` is `null`, it is a [legacy Event Webook](https://www.twilio.com/en-us/changelog/event-webhooks), which means it is your oldest Webhook. + CreatedDate *time.Time `json:"created_date,omitempty"` + // An ISO 8601 timestamp in UTC timezone when the Event Webhook was last modified. + UpdatedDate *time.Time `json:"updated_date,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_event_webhook_no_dates_response.go b/rest/api/v3/webhooks/model_event_webhook_no_dates_response.go new file mode 100644 index 00000000..1b91692a --- /dev/null +++ b/rest/api/v3/webhooks/model_event_webhook_no_dates_response.go @@ -0,0 +1,56 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// EventWebhookNoDatesResponse struct for EventWebhookNoDatesResponse +type EventWebhookNoDatesResponse struct { + // Indicates if the Event Webhook is enabled. + Enabled *bool `json:"enabled,omitempty"` + // The URL where SendGrid will send event data. + Url *string `json:"url,omitempty"` + // Indicates if the webhook is configured to send account status change events related to compliance action taken by SendGrid. + AccountStatusChange *bool `json:"account_status_change,omitempty"` + // Indicates if the webhook is configured to send group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + GroupResubscribe *bool `json:"group_resubscribe,omitempty"` + // Indicates if the webhook is configured to send delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. + Delivered *bool `json:"delivered,omitempty"` + // Indicates if the webhook is configured to send group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + GroupUnsubscribe *bool `json:"group_unsubscribe,omitempty"` + // Indicates if the webhook is configured to send spam report events. Spam reports occur when recipients mark a message as spam. + SpamReport *bool `json:"spam_report,omitempty"` + // Indicates if the webhook is configured to send bounce events. A bounce occurs when a receiving server could not or would not accept a message. + Bounce *bool `json:"bounce,omitempty"` + // Indicates if the webhook is configured to send deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. + Deferred *bool `json:"deferred,omitempty"` + // Indicates if the webhook is configured to send unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + Unsubscribe *bool `json:"unsubscribe,omitempty"` + // Indicates if the webhook is configured to send processed events. Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered. + Processed *bool `json:"processed,omitempty"` + // Indicates if the webhook is configured to send open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. + Open *bool `json:"open,omitempty"` + // Indicates if the webhook is configured to send click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. + Click *bool `json:"click,omitempty"` + // Indicates if the webhook is configured to send dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. + Dropped *bool `json:"dropped,omitempty"` + // An optional friendly name assigned to the Event Webhook to help you differentiate it. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. + FriendlyName *string `json:"friendly_name,omitempty"` + // A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. + Id *string `json:"id,omitempty"` + // The OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token. + OauthClientId *string `json:"oauth_client_id,omitempty"` + // The URL where SendGrid sends the OAuth client ID and client secret to generate an access token. This should be your OAuth server or service provider. + OauthTokenUrl *string `json:"oauth_token_url,omitempty"` + // The public key you can use to verify the SendGrid signature. + PublicKey *string `json:"public_key,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_event_webhook_oauth_response_props.go b/rest/api/v3/webhooks/model_event_webhook_oauth_response_props.go new file mode 100644 index 00000000..b57aa7d3 --- /dev/null +++ b/rest/api/v3/webhooks/model_event_webhook_oauth_response_props.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// EventWebhookOauthResponseProps struct for EventWebhookOauthResponseProps +type EventWebhookOauthResponseProps struct { + // The OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token. + OauthClientId *string `json:"oauth_client_id,omitempty"` + // The URL where SendGrid sends the OAuth client ID and client secret to generate an access token. This should be your OAuth server or service provider. + OauthTokenUrl *string `json:"oauth_token_url,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_event_webhook_request.go b/rest/api/v3/webhooks/model_event_webhook_request.go new file mode 100644 index 00000000..352f8866 --- /dev/null +++ b/rest/api/v3/webhooks/model_event_webhook_request.go @@ -0,0 +1,52 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// EventWebhookRequest struct for EventWebhookRequest +type EventWebhookRequest struct { + // Set this property to `true` to enable the Event Webhook or `false` to disable it. + Enabled *bool `json:"enabled,omitempty"` + // Set this property to the URL where you want the Event Webhook to send event data. + Url string `json:"url"` + // Set this property to `true` to receive group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + GroupResubscribe *bool `json:"group_resubscribe,omitempty"` + // Set this property to `true` to receive delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. + Delivered *bool `json:"delivered,omitempty"` + // Set this property to `true` to receive group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + GroupUnsubscribe *bool `json:"group_unsubscribe,omitempty"` + // Set this property to `true` to receive spam report events. Spam reports occur when recipients mark a message as spam. + SpamReport *bool `json:"spam_report,omitempty"` + // Set this property to `true` to receive bounce events. A bounce occurs when a receiving server could not or would not accept a message. + Bounce *bool `json:"bounce,omitempty"` + // Set this property to `true` to receive deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. + Deferred *bool `json:"deferred,omitempty"` + // Set this property to `true` to receive unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + Unsubscribe *bool `json:"unsubscribe,omitempty"` + // Set this property to `true` to receive processed events. Processed events occur when a message has been received by Twilio SendGrid and the message is ready to be delivered. + Processed *bool `json:"processed,omitempty"` + // Set this property to `true` to receive open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. + Open *bool `json:"open,omitempty"` + // Set this property to `true` to receive click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. + Click *bool `json:"click,omitempty"` + // Set this property to `true` to receive dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. + Dropped *bool `json:"dropped,omitempty"` + // Optionally set this property to a friendly name for the Event Webhook. A friendly name may be assigned to each of your webhooks to help you differentiate them. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. + FriendlyName *string `json:"friendly_name,omitempty"` + // Set this property to the OAuth client ID that SendGrid will pass to your OAuth server or service provider to generate an OAuth access token. When passing data in this property, you must also include the `oauth_token_url` property. + OauthClientId *string `json:"oauth_client_id,omitempty"` + // Set this property to the OAuth client secret that SendGrid will pass to your OAuth server or service provider to generate an OAuth access token. This secret is needed only once to create an access token. SendGrid will store the secret, allowing you to update your client ID and Token URL without passing the secret to SendGrid again. When passing data in this field, you must also include the `oauth_client_id` and `oauth_token_url` properties. + OauthClientSecret *string `json:"oauth_client_secret,omitempty"` + // Set this property to the URL where SendGrid will send the OAuth client ID and client secret to generate an OAuth access token. This should be your OAuth server or service provider. When passing data in this field, you must also include the `oauth_client_id` property. + OauthTokenUrl *string `json:"oauth_token_url,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_event_webhook_signed_response.go b/rest/api/v3/webhooks/model_event_webhook_signed_response.go new file mode 100644 index 00000000..b867cfff --- /dev/null +++ b/rest/api/v3/webhooks/model_event_webhook_signed_response.go @@ -0,0 +1,64 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "time" +) + +// EventWebhookSignedResponse struct for EventWebhookSignedResponse +type EventWebhookSignedResponse struct { + // Indicates if the Event Webhook is enabled. + Enabled *bool `json:"enabled,omitempty"` + // The URL where SendGrid will send event data. + Url *string `json:"url,omitempty"` + // Indicates if the webhook is configured to send account status change events related to compliance action taken by SendGrid. + AccountStatusChange *bool `json:"account_status_change,omitempty"` + // Indicates if the webhook is configured to send group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + GroupResubscribe *bool `json:"group_resubscribe,omitempty"` + // Indicates if the webhook is configured to send delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. + Delivered *bool `json:"delivered,omitempty"` + // Indicates if the webhook is configured to send group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + GroupUnsubscribe *bool `json:"group_unsubscribe,omitempty"` + // Indicates if the webhook is configured to send spam report events. Spam reports occur when recipients mark a message as spam. + SpamReport *bool `json:"spam_report,omitempty"` + // Indicates if the webhook is configured to send bounce events. A bounce occurs when a receiving server could not or would not accept a message. + Bounce *bool `json:"bounce,omitempty"` + // Indicates if the webhook is configured to send deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. + Deferred *bool `json:"deferred,omitempty"` + // Indicates if the webhook is configured to send unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + Unsubscribe *bool `json:"unsubscribe,omitempty"` + // Indicates if the webhook is configured to send processed events. Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered. + Processed *bool `json:"processed,omitempty"` + // Indicates if the webhook is configured to send open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. + Open *bool `json:"open,omitempty"` + // Indicates if the webhook is configured to send click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. + Click *bool `json:"click,omitempty"` + // Indicates if the webhook is configured to send dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. + Dropped *bool `json:"dropped,omitempty"` + // An optional friendly name assigned to the Event Webhook to help you differentiate it. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. + FriendlyName *string `json:"friendly_name,omitempty"` + // A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. + Id *string `json:"id,omitempty"` + // An ISO 8601 timestamp in UTC timezone when the Event Webhook was created. If a Webhook's `created_date` is `null`, it is a [legacy Event Webook](https://www.twilio.com/en-us/changelog/event-webhooks), which means it is your oldest Webhook. + CreatedDate *time.Time `json:"created_date,omitempty"` + // An ISO 8601 timestamp in UTC timezone when the Event Webhook was last modified. + UpdatedDate *time.Time `json:"updated_date,omitempty"` + // The OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token. + OauthClientId *string `json:"oauth_client_id,omitempty"` + // The URL where SendGrid sends the OAuth client ID and client secret to generate an access token. This should be your OAuth server or service provider. + OauthTokenUrl *string `json:"oauth_token_url,omitempty"` + // The public key you can use to verify the SendGrid signature. + PublicKey *string `json:"public_key,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_event_webhook_signed_response_prop.go b/rest/api/v3/webhooks/model_event_webhook_signed_response_prop.go new file mode 100644 index 00000000..6751471b --- /dev/null +++ b/rest/api/v3/webhooks/model_event_webhook_signed_response_prop.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// EventWebhookSignedResponseProp struct for EventWebhookSignedResponseProp +type EventWebhookSignedResponseProp struct { + // The public key you can use to verify the SendGrid signature. + PublicKey *string `json:"public_key,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_event_webhook_test_request.go b/rest/api/v3/webhooks/model_event_webhook_test_request.go new file mode 100644 index 00000000..402bed8c --- /dev/null +++ b/rest/api/v3/webhooks/model_event_webhook_test_request.go @@ -0,0 +1,28 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// EventWebhookTestRequest struct for EventWebhookTestRequest +type EventWebhookTestRequest struct { + // The ID of the Event Webhook you want to retrieve. + Id *string `json:"id,omitempty"` + // The URL where you would like the test notification to be sent. + Url string `json:"url"` + // The client ID Twilio SendGrid sends to your OAuth server or service provider to generate an OAuth access token. When passing data in this property, you must also include the `oauth_token_url` property. + OauthClientId *string `json:"oauth_client_id,omitempty"` + // The `oauth_client_secret` is needed only once to create an access token. SendGrid will store this secret, allowing you to update your Client ID and Token URL without passing the secret to SendGrid again. When passing data in this field, you must also include the `oauth_client_id` and `oauth_token_url` properties. + OauthClientSecret *string `json:"oauth_client_secret,omitempty"` + // The URL where Twilio SendGrid sends the Client ID and Client Secret to generate an access token. This should be your OAuth server or service provider. When passing data in this field, you must also include the `oauth_client_id` property. + OauthTokenUrl *string `json:"oauth_token_url,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_event_webhook_unsigned_response.go b/rest/api/v3/webhooks/model_event_webhook_unsigned_response.go new file mode 100644 index 00000000..9739fa46 --- /dev/null +++ b/rest/api/v3/webhooks/model_event_webhook_unsigned_response.go @@ -0,0 +1,62 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +import ( + "time" +) + +// EventWebhookUnsignedResponse struct for EventWebhookUnsignedResponse +type EventWebhookUnsignedResponse struct { + // Indicates if the Event Webhook is enabled. + Enabled *bool `json:"enabled,omitempty"` + // The URL where SendGrid will send event data. + Url *string `json:"url,omitempty"` + // Indicates if the webhook is configured to send account status change events related to compliance action taken by SendGrid. + AccountStatusChange *bool `json:"account_status_change,omitempty"` + // Indicates if the webhook is configured to send group resubscribe events. Group resubscribes occur when recipients resubscribe to a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + GroupResubscribe *bool `json:"group_resubscribe,omitempty"` + // Indicates if the webhook is configured to send delivered events. Delivered events occur when a message has been successfully delivered to the receiving server. + Delivered *bool `json:"delivered,omitempty"` + // Indicates if the webhook is configured to send group unsubscribe events. Group unsubscribes occur when recipients unsubscribe from a specific [unsubscribe group](https://docs.sendgrid.com/ui/sending-email/create-and-manage-unsubscribe-groups) either by direct link or by updating their subscription preferences. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + GroupUnsubscribe *bool `json:"group_unsubscribe,omitempty"` + // Indicates if the webhook is configured to send spam report events. Spam reports occur when recipients mark a message as spam. + SpamReport *bool `json:"spam_report,omitempty"` + // Indicates if the webhook is configured to send bounce events. A bounce occurs when a receiving server could not or would not accept a message. + Bounce *bool `json:"bounce,omitempty"` + // Indicates if the webhook is configured to send deferred events. Deferred events occur when a recipient's email server temporarily rejects a message. + Deferred *bool `json:"deferred,omitempty"` + // Indicates if the webhook is configured to send unsubscribe events. Unsubscribes occur when recipients click on a message's subscription management link. You must [enable Subscription Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#subscription-tracking) to receive this type of event. + Unsubscribe *bool `json:"unsubscribe,omitempty"` + // Indicates if the webhook is configured to send processed events. Processed events occur when a message has been received by Twilio SendGrid and is ready to be delivered. + Processed *bool `json:"processed,omitempty"` + // Indicates if the webhook is configured to send open events. Open events occur when a recipient has opened the HTML message. You must [enable Open Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#open-tracking) to receive this type of event. + Open *bool `json:"open,omitempty"` + // Indicates if the webhook is configured to send click events. Click events occur when a recipient clicks on a link within the message. You must [enable Click Tracking](https://docs.sendgrid.com/ui/account-and-settings/tracking#click-tracking) to receive this type of event. + Click *bool `json:"click,omitempty"` + // Indicates if the webhook is configured to send dropped events. Dropped events occur when your message is not delivered by Twilio SendGrid. Dropped events are accomponied by a `reason` property, which indicates why the message was dropped. Reasons for a dropped message include: Invalid SMTPAPI header, Spam Content (if spam checker app enabled), Unsubscribed Address, Bounced Address, Spam Reporting Address, Invalid, Recipient List over Package Quota. + Dropped *bool `json:"dropped,omitempty"` + // An optional friendly name assigned to the Event Webhook to help you differentiate it. The friendly name is for convenience only. You should use the webhook `id` property for any programmatic tasks. + FriendlyName *string `json:"friendly_name,omitempty"` + // A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. + Id *string `json:"id,omitempty"` + // An ISO 8601 timestamp in UTC timezone when the Event Webhook was created. If a Webhook's `created_date` is `null`, it is a [legacy Event Webook](https://www.twilio.com/en-us/changelog/event-webhooks), which means it is your oldest Webhook. + CreatedDate *time.Time `json:"created_date,omitempty"` + // An ISO 8601 timestamp in UTC timezone when the Event Webhook was last modified. + UpdatedDate *time.Time `json:"updated_date,omitempty"` + // The OAuth client ID SendGrid sends to your OAuth server or service provider to generate an OAuth access token. + OauthClientId *string `json:"oauth_client_id,omitempty"` + // The URL where SendGrid sends the OAuth client ID and client secret to generate an access token. This should be your OAuth server or service provider. + OauthTokenUrl *string `json:"oauth_token_url,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_get_signed_event_webhook_200_response.go b/rest/api/v3/webhooks/model_get_signed_event_webhook_200_response.go new file mode 100644 index 00000000..0282f0ed --- /dev/null +++ b/rest/api/v3/webhooks/model_get_signed_event_webhook_200_response.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetSignedEventWebhook200Response struct for GetSignedEventWebhook200Response +type GetSignedEventWebhook200Response struct { + // A unique string used to identify the webhook. A webhook's ID is generated programmatically and cannot be changed after creation. You can assign a natural language identifier to your webhook using the `friendly_name` property. + Id *string `json:"id,omitempty"` + // The public key you can use to verify the Twilio SendGrid signature. + PublicKey *string `json:"public_key,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_get_signed_event_webhook_404_response.go b/rest/api/v3/webhooks/model_get_signed_event_webhook_404_response.go new file mode 100644 index 00000000..162dcb9b --- /dev/null +++ b/rest/api/v3/webhooks/model_get_signed_event_webhook_404_response.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetSignedEventWebhook404Response struct for GetSignedEventWebhook404Response +type GetSignedEventWebhook404Response struct { + Errors *[]GetSignedEventWebhook404ResponseErrorsInner `json:"errors,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_get_signed_event_webhook_404_response_errors_inner.go b/rest/api/v3/webhooks/model_get_signed_event_webhook_404_response_errors_inner.go new file mode 100644 index 00000000..9c83f2aa --- /dev/null +++ b/rest/api/v3/webhooks/model_get_signed_event_webhook_404_response_errors_inner.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// GetSignedEventWebhook404ResponseErrorsInner struct for GetSignedEventWebhook404ResponseErrorsInner +type GetSignedEventWebhook404ResponseErrorsInner struct { + // Error message. + Message *string `json:"message,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_list_parse_setting_200_response.go b/rest/api/v3/webhooks/model_list_parse_setting_200_response.go new file mode 100644 index 00000000..29e79746 --- /dev/null +++ b/rest/api/v3/webhooks/model_list_parse_setting_200_response.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListParseSetting200Response struct for ListParseSetting200Response +type ListParseSetting200Response struct { + // The list of your current inbound parse settings. + Result *[]ParseSetting `json:"result,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_list_parse_static_200_response_inner.go b/rest/api/v3/webhooks/model_list_parse_static_200_response_inner.go new file mode 100644 index 00000000..2ed8fae6 --- /dev/null +++ b/rest/api/v3/webhooks/model_list_parse_static_200_response_inner.go @@ -0,0 +1,22 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListParseStatic200ResponseInner struct for ListParseStatic200ResponseInner +type ListParseStatic200ResponseInner struct { + // The date that the stats were collected. + Date string `json:"date"` + // The Parse Webhook usage statistics. + Stats []ListParseStatic200ResponseInnerStatsInner `json:"stats"` +} diff --git a/rest/api/v3/webhooks/model_list_parse_static_200_response_inner_stats_inner.go b/rest/api/v3/webhooks/model_list_parse_static_200_response_inner_stats_inner.go new file mode 100644 index 00000000..5a2cc1ad --- /dev/null +++ b/rest/api/v3/webhooks/model_list_parse_static_200_response_inner_stats_inner.go @@ -0,0 +1,19 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListParseStatic200ResponseInnerStatsInner struct for ListParseStatic200ResponseInnerStatsInner +type ListParseStatic200ResponseInnerStatsInner struct { + Metrics *ListParseStatic200ResponseInnerStatsInnerMetrics `json:"metrics,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_list_parse_static_200_response_inner_stats_inner_metrics.go b/rest/api/v3/webhooks/model_list_parse_static_200_response_inner_stats_inner_metrics.go new file mode 100644 index 00000000..929a73b4 --- /dev/null +++ b/rest/api/v3/webhooks/model_list_parse_static_200_response_inner_stats_inner_metrics.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ListParseStatic200ResponseInnerStatsInnerMetrics struct for ListParseStatic200ResponseInnerStatsInnerMetrics +type ListParseStatic200ResponseInnerStatsInnerMetrics struct { + // The number of emails received and parsed by the Parse Webhook. + Received float32 `json:"received"` +} diff --git a/rest/api/v3/webhooks/model_parse_setting.go b/rest/api/v3/webhooks/model_parse_setting.go new file mode 100644 index 00000000..44d9eddf --- /dev/null +++ b/rest/api/v3/webhooks/model_parse_setting.go @@ -0,0 +1,26 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// ParseSetting struct for ParseSetting +type ParseSetting struct { + // The public URL where you would like SendGrid to POST the data parsed from your email. Any emails sent with the given hostname provided (whose MX records have been updated to point to SendGrid) will be parsed and POSTed to this URL. + Url *string `json:"url,omitempty"` + // A specific and unique domain or subdomain that you have created to use exclusively to parse your incoming email. For example, `parse.yourdomain.com`. + Hostname *string `json:"hostname,omitempty"` + // Indicates if you would like SendGrid to check the content parsed from your emails for spam before POSTing them to your domain. + SpamCheck *bool `json:"spam_check,omitempty"` + // Indicates if you would like SendGrid to post the original MIME-type content of your parsed email. When this parameter is set to `true`, SendGrid will send a JSON payload of the content of your email. + SendRaw *bool `json:"send_raw,omitempty"` +} diff --git a/rest/api/v3/webhooks/model_update_signed_event_webhook_request.go b/rest/api/v3/webhooks/model_update_signed_event_webhook_request.go new file mode 100644 index 00000000..c3d5ecaa --- /dev/null +++ b/rest/api/v3/webhooks/model_update_signed_event_webhook_request.go @@ -0,0 +1,20 @@ +/* +* This code was generated by +* +* SENDGRID-OAI-GENERATOR +* +* Twilio SendGrid Webhook Configuration API +* The Twilio SendGrid Webhooks API allows you to configure the Event and Parse Webhooks. Email is a data-rich channel, and implementing the Event Webhook will allow you to consume those data in nearly real time. This means you can actively monitor and participate in the health of your email program throughout the send cycle. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments and then POSTs `multipart/form-data` to a URL that you choose. +* +* NOTE: This class is auto generated by OpenAPI Generator. +* https://openapi-generator.tech +* Do not edit the class manually. + */ + +package openapi + +// UpdateSignedEventWebhookRequest struct for UpdateSignedEventWebhookRequest +type UpdateSignedEventWebhookRequest struct { + // Enable or disable the webhook by setting this property to `true` or `false`, respectively. + Enabled bool `json:"enabled"` +} diff --git a/sendgrid.go b/sendgrid.go index f9986f6e..5dd16ea0 100644 --- a/sendgrid.go +++ b/sendgrid.go @@ -36,8 +36,8 @@ import ( LmcSendersV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/lmc_senders" MailV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mail" MailSettingsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mail_settings" - McContactsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_contacts" McCustomFieldsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_custom_fields" + McDesignsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_designs" McListsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_lists" McSegmentsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_segments" McSegments2V3 "github.com/sendgrid/sendgrid-go/rest/api/v3/mc_segments_2" @@ -51,8 +51,9 @@ import ( ScheduledSendsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/scheduled_sends" ScopesV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/scopes" SeqV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/seq" + SsoV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/sso" + StatsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/stats" SubusersV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/subusers" - SuppressionsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/suppressions" TeammatesV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/teammates" TemplatesV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/templates" TrackingSettingsV3 "github.com/sendgrid/sendgrid-go/rest/api/v3/tracking_settings" @@ -82,8 +83,8 @@ type RestClient struct { LmcSendersV3 *LmcSendersV3.ApiService MailV3 *MailV3.ApiService MailSettingsV3 *MailSettingsV3.ApiService - McContactsV3 *McContactsV3.ApiService McCustomFieldsV3 *McCustomFieldsV3.ApiService + McDesignsV3 *McDesignsV3.ApiService McListsV3 *McListsV3.ApiService McSegmentsV3 *McSegmentsV3.ApiService McSegments2V3 *McSegments2V3.ApiService @@ -97,8 +98,9 @@ type RestClient struct { ScheduledSendsV3 *ScheduledSendsV3.ApiService ScopesV3 *ScopesV3.ApiService SeqV3 *SeqV3.ApiService + SsoV3 *SsoV3.ApiService + StatsV3 *StatsV3.ApiService SubusersV3 *SubusersV3.ApiService - SuppressionsV3 *SuppressionsV3.ApiService TeammatesV3 *TeammatesV3.ApiService TemplatesV3 *TemplatesV3.ApiService TrackingSettingsV3 *TrackingSettingsV3.ApiService @@ -212,8 +214,8 @@ func NewRestClientWithParams(params ClientParams) *RestClient { c.LmcSendersV3 = LmcSendersV3.NewApiService(c.RequestHandler) c.MailV3 = MailV3.NewApiService(c.RequestHandler) c.MailSettingsV3 = MailSettingsV3.NewApiService(c.RequestHandler) - c.McContactsV3 = McContactsV3.NewApiService(c.RequestHandler) c.McCustomFieldsV3 = McCustomFieldsV3.NewApiService(c.RequestHandler) + c.McDesignsV3 = McDesignsV3.NewApiService(c.RequestHandler) c.McListsV3 = McListsV3.NewApiService(c.RequestHandler) c.McSegmentsV3 = McSegmentsV3.NewApiService(c.RequestHandler) c.McSegments2V3 = McSegments2V3.NewApiService(c.RequestHandler) @@ -227,8 +229,9 @@ func NewRestClientWithParams(params ClientParams) *RestClient { c.ScheduledSendsV3 = ScheduledSendsV3.NewApiService(c.RequestHandler) c.ScopesV3 = ScopesV3.NewApiService(c.RequestHandler) c.SeqV3 = SeqV3.NewApiService(c.RequestHandler) + c.SsoV3 = SsoV3.NewApiService(c.RequestHandler) + c.StatsV3 = StatsV3.NewApiService(c.RequestHandler) c.SubusersV3 = SubusersV3.NewApiService(c.RequestHandler) - c.SuppressionsV3 = SuppressionsV3.NewApiService(c.RequestHandler) c.TeammatesV3 = TeammatesV3.NewApiService(c.RequestHandler) c.TemplatesV3 = TemplatesV3.NewApiService(c.RequestHandler) c.TrackingSettingsV3 = TrackingSettingsV3.NewApiService(c.RequestHandler)